Ticket #651 (closed defect: wontfix)
[PATCH] dfu-util - configure.ac uses PKG_CHECK_MODULES which is not available here
| Reported by: | nick@… | Owned by: | mickey@… |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | OE bitbake recipes / build system | Version: | current svn head |
| Severity: | normal | Keywords: | |
| Cc: | buglog@… | Blocked By: | |
| Blocking: | Estimated Completion (week): | ||
| HasPatchForReview: | PatchReviewResult: | ||
| Reproducible: |
Description
I don't know much about autoconf, so this was just a cut&paste fix (from
dfu-programmer's configure script), which looks like a more generic script
(you might not have installed packages on an embedded system)
Index: configure.ac
===================================================================
--- configure.ac (revision 2384)
+++ configure.ac (working copy)
@@ -15,14 +15,14 @@
# Checks for libraries.
-PKG_CHECK_MODULES(USB, libusb >= 0.1.4
- AC_MSG_ERROR([* Required libusb >= 0.1.4 not installed
*]))
+AC_CHECK_LIB([usb], [usb_control_msg]
+ [AC_MSG_ERROR([libusb not found])] )
LIBS="$LIBS $USB_LIBS"
CFLAGS="$CFLAGS $USB_CFLAGS"
# Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS([stdlib.h string.h stdio.h])
+AC_CHECK_HEADERS([usb.h stdlib.h string.h stdio.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
Please note: I am using dfu-util outside the context of OpenMoko? and it works
fine (with a few minor glitches fixed)

pkgconfig now has become almost the standard way to deal with dependencies.