From c8c03fe2e01ad2b5c1a296406fd26f7f43bcd757 Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Wed, 10 Feb 2010 11:23:01 +0000 Subject: [PATCH] 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. --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac index 109c5b1..13526a9 100644 --- a/configure.ac +++ b/configure.ac @@ -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