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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2021-10-30 16:38:50 -07:00
parent b6df353752
commit 15d092277f

View File

@ -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"
])
])
])