correct handling of --enable-libusb / --disable-libusb in configure.in
This commit is contained in:
+9
-18
@@ -209,36 +209,29 @@ dnl not all options have effect at the moment
|
||||
AC_SUBST(libusb_libs)
|
||||
AC_SUBST(libusb_cflags)
|
||||
|
||||
enable_libusb=yes
|
||||
AC_MSG_CHECKING([if libusb support has been enabled]);
|
||||
AC_ARG_ENABLE(
|
||||
libusb,
|
||||
[ --enable-libusb compile with USB support using libusb. ],
|
||||
[
|
||||
if test "$enable_libusb" = "yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$enableval" != "no"; then
|
||||
enable_libusb="yes"
|
||||
fi
|
||||
],
|
||||
[
|
||||
enable_libusb="no";
|
||||
AC_MSG_RESULT(no)
|
||||
]
|
||||
[ enable_libusb="yes" ]
|
||||
)
|
||||
|
||||
AC_PATH_PROG(libusb_config,libusb-config, :)
|
||||
AC_MSG_RESULT($enable_libusb)
|
||||
|
||||
if test "$enable_libusb" = "yes"; then
|
||||
AC_PATH_PROG(libusb_config, libusb-config, :)
|
||||
|
||||
AC_ARG_WITH(
|
||||
libusb-includes,
|
||||
[ --with-libusb-includes=DIR
|
||||
libusb include files are in DIR
|
||||
(default: found by libusb-config). ],
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
libusb_build_dir="";
|
||||
else
|
||||
if test "$withval" != "no"; then
|
||||
libusb_includepath="$withval"
|
||||
libusb_cflags="-I$withval"
|
||||
fi
|
||||
@@ -251,7 +244,7 @@ AC_ARG_WITH(
|
||||
for libusb_includepath in /usr/include /usr/local/include \
|
||||
/usr/include/libusb /usr/local/include/libusb \
|
||||
/usr/include/usb /usr/local/include/usb ; do \
|
||||
if test -f "${ibusb_includepath}/libusb.h"; then
|
||||
if test -f "${libusb_includepath}/libusb.h" ; then
|
||||
libusb_cflags="-I$libusb_includepath"
|
||||
break
|
||||
fi
|
||||
@@ -277,9 +270,7 @@ AC_ARG_WITH(
|
||||
libusb library files are in DIR
|
||||
(default: found by libusb-config). ],
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
libusb_build_dir="";
|
||||
else
|
||||
if test "$withval" != "no"; then
|
||||
libusb_libs="-L$withval -lusb"
|
||||
fi
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user