From 913a65fde6cd8c06aad6c2249f7860a6a6382d38 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Sun, 6 Nov 2022 20:54:34 +0100 Subject: [PATCH] Allow to specify the hidapi library variant On Linux, the hidapi library is usually available in two variants: hidapi-libusb and hidapi-hidraw. By default, the autotools build system won't be able to detect those variants (due to the difference in the name) and will automatically fallback to the libusb implementation instead. If for some reason the hidapi library should be used, the preferred hidapi variant can now be specified during configuation with a parameter: ./configure --with-hidapi=hidapi-libusb|hidapi-hidraw The default value for the parameter remains 'hidapi'. --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index ca39faf..5dc1c63 100644 --- a/configure.ac +++ b/configure.ac @@ -107,12 +107,12 @@ AS_IF([test "x$with_libusb" != "xno"], [ AC_ARG_WITH([hidapi], [AS_HELP_STRING([--without-hidapi], [Build without the hidapi library])], - [], [with_hidapi=auto]) + [], [with_hidapi=hidapi]) AS_IF([test "x$with_hidapi" != "xno"], [ - PKG_CHECK_MODULES([HIDAPI], [hidapi], [have_hidapi=yes], [have_hidapi=no]) + PKG_CHECK_MODULES([HIDAPI], [$with_hidapi], [have_hidapi=yes], [have_hidapi=no]) AS_IF([test "x$have_hidapi" = "xyes"], [ AC_DEFINE([HAVE_HIDAPI], [1], [hidapi library]) - DEPENDENCIES="$DEPENDENCIES hidapi" + DEPENDENCIES="$DEPENDENCIES $with_hidapi" ]) ])