Browse Source

configure.ac: Don't use pkg-config to search for libusb-1.0 on FreeBSD

Peter Stuge 13 years ago
parent
commit
d0c10b78be
1 changed files with 9 additions and 1 deletions
  1. 9 1
      configure.ac

+ 9 - 1
configure.ac

@@ -346,7 +346,15 @@ AM_CONDITIONAL([HAVE_LIBUDEV], [test x$libudev != xno])
 PKG_PROG_PKG_CONFIG()
 
 if test "x$ztex" != xno; then
-  PKG_CHECK_MODULES(LIBUSB, libusb-1.0, [AC_DEFINE(HAVE_LIBUSB, 1, [Define if you have libusb-1.0])], [AC_MSG_ERROR([Could not find usb library - please install libusb-1.0])])
+  case $target in
+    *-*-freebsd*)
+      LIBUSB_LIBS="-lusb"
+      LIBUSB_CFLAGS=""
+      ;;
+    *)
+      PKG_CHECK_MODULES(LIBUSB, libusb-1.0, [AC_DEFINE(HAVE_LIBUSB, 1, [Define if you have libusb-1.0])], [AC_MSG_ERROR([Could not find usb library - please install libusb-1.0])])
+      ;;
+  esac
   USB_LIBS="$LIBUSB_LIBS"
   USB_FLAGS="$LIBUSB_CFLAGS"
 fi