From 15d092277f98f2eba9603f719b5c2d60d091c385 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 30 Oct 2021 16:38:50 -0700 Subject: [PATCH] find lib hidapi on modern openSUSE There are now two flavors of hidapi and you need to use a different name to get one. Autoconf syntax is... insane. Signed-off-by: Dirk Hohndel --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 1ac86db..43a9546 100644 --- a/configure.ac +++ b/configure.ac @@ -126,6 +126,12 @@ AS_IF([test "x$with_hidapi" != "xno"], [ AS_IF([test "x$have_hidapi" = "xyes"], [ AC_DEFINE([HAVE_HIDAPI], [1], [hidapi library]) DEPENDENCIES="$DEPENDENCIES hidapi" + ], [ + PKG_CHECK_MODULES([HIDAPI], [hidapi-libusb], [have_hidapi=yes], [have_hidapi=no]) + AS_IF([test "x$have_hidapi" = "xyes"], [ + AC_DEFINE([HAVE_HIDAPI], [1], [hidapi library]) + DEPENDENCIES="$DEPENDENCIES hidapi" + ]) ]) ])