From 1f36a6c6852d175b5b0ad37bd5da8da039cc2896 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Fri, 21 Jun 2013 15:11:36 +0200 Subject: [PATCH] configure.ac: Fix build when libusb-1.0 not available. The IKALOGIC Scanalogic2 needs libusb-1.0, thus disable this driver when libusb-1.0 cannot be found. --- configure.ac | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index a49ae870..1e26764e 100644 --- a/configure.ac +++ b/configure.ac @@ -147,10 +147,6 @@ AC_ARG_ENABLE(ikalogic-scanalogic2, AC_HELP_STRING([--enable-ikalogic-scanalogic [enable IKALOGIC Scanalogic2 support [default=yes]]), [HW_IKALOGIC_SCANALOGIC2="$enableval"], [HW_IKALOGIC_SCANALOGIC2=yes]) -AM_CONDITIONAL(HW_IKALOGIC_SCANALOGIC2, test x$HW_IKALOGIC_SCANALOGIC2 = xyes) -if test "x$HW_IKALOGIC_SCANALOGIC2" = "xyes"; then - AC_DEFINE(HAVE_HW_IKALOGIC_SCANALOGIC2, 1, [IKALOGIC Scanalogic2 support]) -fi AC_ARG_ENABLE(lascar-el-usb, AC_HELP_STRING([--enable-lascar-el-usb], [enable Lascar EL-USB support [default=yes]]), @@ -245,8 +241,8 @@ case "$host" in LIBS="$LIBS $libusb_LIBS"; SR_PKGLIBS="$SR_PKGLIBS libusb-1.0"], [have_libusb1_0="no"; HW_FX2LAFW="no"; HW_HANTEK_DSO="no"; - HW_LASCAR_EL_USB="no"; HW_NEXUS_OSCIPRIME="no"; - HW_UNI_T_DMM="no"; HW_VICTOR_DMM="no"; + HW_IKALOGIC_SCANALOGIC2="no"; HW_LASCAR_EL_USB="no"; + HW_NEXUS_OSCIPRIME="no"; HW_UNI_T_DMM="no"; HW_VICTOR_DMM="no"; HW_ZEROPLUS_LOGIC_CUBE="no"]) # Define HAVE_LIBUSB_1_0 in config.h if we found libusb-1.0. @@ -354,6 +350,11 @@ if test "x$HW_HANTEK_DSO" = "xyes"; then AC_DEFINE(HAVE_HW_HANTEK_DSO, 1, [Hantek DSO support]) fi +AM_CONDITIONAL(HW_IKALOGIC_SCANALOGIC2, test x$HW_IKALOGIC_SCANALOGIC2 = xyes) +if test "x$HW_IKALOGIC_SCANALOGIC2" = "xyes"; then + AC_DEFINE(HAVE_HW_IKALOGIC_SCANALOGIC2, 1, [IKALOGIC Scanalogic2 support]) +fi + AM_CONDITIONAL(HW_LASCAR_EL_USB, test x$HW_LASCAR_EL_USB = xyes) if test "x$HW_LASCAR_EL_USB" = "xyes"; then AC_DEFINE(HAVE_HW_LASCAR_EL_USB, 1, [Lascar EL-USB support])