1
0
Fork 0
mirror of https://github.com/linux-usb-gadgets/libusbgx.git synced 2025-07-12 23:19:43 +03:00

pkgconfig: make Requires for libconfig optional

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
This commit is contained in:
Michael Grzeschik 2021-05-21 00:58:14 +02:00 committed by Paul Wise
parent 38dd92f7c0
commit 92deb97932
No known key found for this signature in database
GPG key ID: 3116BA5E9FFA69A3
2 changed files with 7 additions and 1 deletions

View file

@ -36,12 +36,18 @@ AS_IF([test "x$with_libconfig" = xyes], [
AC_DEFINE(HAVE_LIBCONFIG_15, 1, [detected libconfig equal to or greater than 1.5]),
AC_DEFINE(HAVE_LIBCONFIG_15, 0, []))
])
libconfig_req="libconfig"
CFLAGS="$CFLAGS $LIBCONFIG_CFLAGS"
LIBS="$LIBS $LIBCONFIG_LIBS"
], [
libconfig_req=""
enable_gadget_schemes=no
])
REQUIRES="$libconfig_req"
AC_SUBST([REQUIRES])
AM_CONDITIONAL(BUILD_EXAMPLES, [test "x$enable_examples" = xyes])
AS_IF([test "x$enable_tests" = xyes], [

View file

@ -5,7 +5,7 @@ includedir=@includedir@
Name: libusbgx
Description: USB gadget-configfs library
Requires: libconfig
Requires: @REQUIRES@
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lusbgx
Cflags: -I${includedir}