Commit 30c5a166798a2985a2d04ee2d5deca74dc9dafe4

Peter Stuge 2012-11-16T00:59:21

configure.ac: Support FreeBSD libusb which doesn't have libusb-1.0.pc

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/configure.ac b/configure.ac
index 04bd80c..73bfc03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -345,6 +345,11 @@ PKG_PROG_PKG_CONFIG()
 
 if test "x$ztex" != xno; then
   case $target in
+    *-*-freebsd*)
+      LIBUSB_LIBS="-lusb"
+      LIBUSB_CFLAGS=""
+      AC_DEFINE(HAVE_LIBUSB, 1, [Define if you have libusb-1.0])
+      ;;
     *)
       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])])
       ;;