This is an automated email from Gerrit. Jörg Wunsch ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/2052
-- gerrit commit 684f4863db7b724798b1baef96aaae80e08f4493 Author: Jörg Wunsch <[email protected]> Date: Sun Mar 16 22:31:36 2014 +0100 configure.ac: Detect native libusb-1.0 API on FreeBSD FreeBSD (starting with version 8.x) ships with a native libusb which calls itself "libusb20". This library also offers version 0.1 and 1.0 compatible APIs. However, being part of the base OS, it doesn't install a file named libusb-1.0.pc, thus PKG_CHECK_MODULES([LIBUSB1], [libusb-1.0]) fails to detect it. In the "not detected" branch of that macro, fall back to a "classic" AC_CHECK_LIB feature test, testing for libusb_init. If it has been found, assume we are safe to use the libusb-1.0 feature set. Change-Id: I250f47f54aa64bb537a7eaa3c297f968927a0980 Signed-off-by: Jörg Wunsch <[email protected]> diff --git a/configure.ac b/configure.ac index 73f7bef..79c722b 100644 --- a/configure.ac +++ b/configure.ac @@ -1101,8 +1101,14 @@ PKG_CHECK_MODULES([LIBUSB1], [libusb-1.0], [ LIBUSB1_CFLAGS=`echo $LIBUSB1_CFLAGS | sed 's/-I/-isystem /'` AC_MSG_NOTICE([libusb-1.0 header bug workaround: LIBUSB1_CFLAGS changed to "$LIBUSB1_CFLAGS"]) ], [ - use_libusb1=no - AC_MSG_WARN([libusb-1.x not found, trying legacy libusb-0.1 as a fallback; consider installing libusb-1.x instead]) + # Fallback for FreeBSD; it offers a libusb-1.0 compatible API + # as part of the OS, but does not provide a libusb-1.0.pc file + # for it. + AC_CHECK_LIB([usb], [libusb_init], [ + use_libusb1=yes + AC_DEFINE([HAVE_LIBUSB1], [1], [Define if you have libusb-1.x])], [ + use_libusb1=no + AC_MSG_WARN([libusb-1.x not found, trying legacy libusb-0.1 as a fallback; consider installing libusb-1.x instead])]) ]) PKG_CHECK_MODULES([LIBUSB0], [libusb], [use_libusb0=yes], [use_libusb0=no]) -- ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
