From f3ab629a3ee5fe60591e038f6f7610a819d16a83 Mon Sep 17 00:00:00 2001 From: Fredrik Thulin Date: Sun, 6 Mar 2011 16:36:04 +0100 Subject: [PATCH] Fix FreeBSD libusb detection. --- configure.ac | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index c31c589..f065f1b 100644 --- a/configure.ac +++ b/configure.ac @@ -83,18 +83,18 @@ if test "x$with_backend" = "xlibusb-1.0"; then fi if test x$with_backend = xlibusb; then - AC_LIB_HAVE_LINKFLAGS(usb,, [#include ], [usb_init()]) - if test "$ac_cv_libusb" != yes; then + AC_LIB_HAVE_LINKFLAGS(usb,, [#include ], [libusb_init(NULL)]) + if test "$ac_cv_libusb" = yes; then # FreeBSD 8 has an implementation of the libusb-1.0 API in -lusb - AC_LIB_HAVE_LINKFLAGS(usb,, [#include ], [libusb_init(NULL)]) + with_backend=libusb-1.0 + else + AC_LIB_HAVE_LINKFLAGS(usb,, [#include ], [usb_init()]) if test "$ac_cv_libusb" != yes; then if test "$with_backend_orig" = "check"; then AC_MSG_ERROR([libusb-1.0 or libusb not found, please install one of them]) else AC_MSG_ERROR([libusb not found, please install usb.h and libusb.so]) fi - else - with_backend=libusb-1.0 fi fi fi -- 2.39.5