Do not add libusb to PKG_CONFIG_REQUIRES unless it is located using this method. Fix build failure for software detecting libnfc using pkg-config on FreeBSD (at least) when libusb is part of the system.
This commit is contained in:
parent
2a33e28db9
commit
c8c03fe2e0
1 changed files with 2 additions and 0 deletions
|
@ -118,10 +118,12 @@ if test "x$enable_libusb" = "xyes"; then
|
|||
# Search using pkg-config
|
||||
if test x"$PKG_CONFIG" != "x"; then
|
||||
PKG_CHECK_MODULES([LIBUSB], [libusb], [WITH_USB=1], [WITH_USB=0])
|
||||
if test x"$WITH_USB" = "x1"; then
|
||||
if test x"$PKG_CONFIG_REQUIRES" != x""; then
|
||||
PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES,"
|
||||
fi
|
||||
PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES libusb"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Search using libusb-config
|
||||
|
|
Loading…
Add table
Reference in a new issue