Do not try openusb is libusb 1.0 is found.
Signed-off-by: Linus Walleij <triad@df.lth.se>
diff --git a/configure.ac b/configure.ac
index 11c7283..74402e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -117,15 +117,6 @@
AC_DEFINE(HAVE_LIBUSB1, [], [Have libusb 1.0])
fi
-# Check for libopenusb
-AC_CHECK_LIB([openusb], [openusb_init])
-if test x"$found_libusb1_pkg" = "xno" ; then
- if test x"$ac_cv_lib_openusb_openusb_init" = "xyes" ; then
- AC_DEFINE(HAVE_OPENUSB, [], [Have libopenusb 1.0])
- LIBUSB_VER=1.0
- fi
-fi
-
# Check for libusb 0.x
if test x"$found_libusb1_pkg" = "xno" ; then
if test x"$ac_cv_lib_openusb_openusb_init" = "xno" ; then
@@ -148,6 +139,17 @@
fi
fi
+# Check for libopenusb
+if test x"$found_libusb1_pkg" = "xno" ; then
+ AC_CHECK_LIB([openusb], [openusb_init])
+ if test x"$found_libusb1_pkg" = "xno" ; then
+ if test x"$ac_cv_lib_openusb_openusb_init" = "xyes" ; then
+ AC_DEFINE(HAVE_OPENUSB, [], [Have libopenusb 1.0])
+ LIBUSB_VER=1.0
+ fi
+ fi
+fi
+
# Optionally disable MTPZ functionality.
AC_ARG_ENABLE([mtpz],
AC_HELP_STRING([--disable-mtpz], [Disable functionality to connect to MTPZ devices (e.g. Zune)]),