Commit 4f7b6fe4c3b810307bda2c78a57d25406976fad9

Con Kolivas 2013-10-23T22:40:13

Avoid entering static libusb directory if --with-system-libusb is enabled.

diff --git a/compat/Makefile.am b/compat/Makefile.am
index 4ed10f8..4cd32d2 100644
--- a/compat/Makefile.am
+++ b/compat/Makefile.am
@@ -2,5 +2,7 @@
 SUBDIRS	= jansson-2.5
 
 if WANT_USBUTILS
+if WANT_STATIC_LIBUSB
 SUBDIRS += libusb-1.0
 endif
+endif
diff --git a/configure.ac b/configure.ac
index 8a505da..f6fa785 100644
--- a/configure.ac
+++ b/configure.ac
@@ -368,6 +368,8 @@ else
 	LIBUSB_LIBS=""
 fi
 
+AM_CONDITIONAL([WANT_STATIC_LIBUSB], [test x$dlibusb = xno])
+
 AC_CONFIG_SUBDIRS([compat/jansson-2.5])
 JANSSON_LIBS="compat/jansson-2.5/src/.libs/libjansson.a"