From 2a01ecdc5d6ca848502397043f01058aa9af76ef Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Sun, 14 Sep 2025 17:09:09 +0200 Subject: [PATCH] Fix setting the variable HAVE_LIBUSB for makefiles --- configure.ac | 4 +++- tests/Makefile.am | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 150954246..e9fc775b8 100644 --- a/configure.ac +++ b/configure.ac @@ -357,7 +357,6 @@ AC_ARG_WITH([libusb], ) AC_MSG_RESULT([$cf_with_libusb]) -AM_CONDITIONAL([HAVE_LIBUSB], [test x"${cf_with_libusb}" = "xyes"]) LIBUSB="" AC_ARG_VAR([LIBUSB_CFLAGS], [C compiler flags for libusb, overriding configure defaults]) @@ -377,6 +376,9 @@ AS_IF([test x"${cf_with_libusb}" = "xyes"], [ [Define if libusb-1.0 is available]) LIBUSB="libusb-1.0"])]) +AM_CONDITIONAL([HAVE_LIBUSB], [test x"${cf_with_libusb}" = "xyes"]) +AC_SUBST([HAVE_LIBUSB]) + # Only used in hamlib.pc.in AC_SUBST([LIBUSB]) diff --git a/tests/Makefile.am b/tests/Makefile.am index 6a01d8684..bfc57de9c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -4,8 +4,6 @@ # AUTOMAKE_OPTIONS = dejagnu # DEJATOOL = testfreq testbcd testloc rigctl -# For some reason this "if" is not working -- rigtestlibusb is still being included -# Fix for now is to change rigtestlibusb.c instead if HAVE_LIBUSB TESTLIBUSB = rigtestlibusb else