[Pcsclite-cvs-commit] r3299 - in /trunk/Drivers/ccid: MacOSX/configure configure.in

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Wed Feb 4 14:32:20 UTC 2009


Author: rousseau
Date: Wed Feb  4 14:32:19 2009
New Revision: 3299

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=3299
Log:
use PKG_CHECK_EXISTS() before PKG_CHECK_MODULES() so that the *_CFLAGS
and *_LIBS are not erased if pkg-config does not find the searched lib

Modified:
    trunk/Drivers/ccid/MacOSX/configure
    trunk/Drivers/ccid/configure.in

Modified: trunk/Drivers/ccid/MacOSX/configure
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/MacOSX/configure?rev=3299&op=diff
==============================================================================
--- trunk/Drivers/ccid/MacOSX/configure (original)
+++ trunk/Drivers/ccid/MacOSX/configure Wed Feb  4 14:32:19 2009
@@ -39,10 +39,6 @@
 
 ./MacOSX/convert_reader_h.pl MacOSX/reader.h.in > MacOSX/reader.h
 
-# we define PKG_CONFIG so that pkg-config is not used and PCSC_CFLAGS
-# and PCSC_LIBS are used instead
-PKG_CONFIG="foobar"
-
 # find pcsc-lite header files in MacOSX/
 # use ${varname:-word} to return word only if varname is not already defined
 PCSC_CFLAGS=${PCSC_CFLAGS:--I$(pwd)/MacOSX}
@@ -79,7 +75,6 @@
 
 set -x
 ./configure \
-	PKG_CONFIG="$PKG_CONFIG" \
 	CFLAGS="$CFLAGS" \
 	PCSC_CFLAGS="$PCSC_CFLAGS" \
 	PCSC_LIBS="$PCSC_LIBS" \

Modified: trunk/Drivers/ccid/configure.in
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/configure.in?rev=3299&op=diff
==============================================================================
--- trunk/Drivers/ccid/configure.in (original)
+++ trunk/Drivers/ccid/configure.in Wed Feb  4 14:32:19 2009
@@ -35,14 +35,17 @@
 
 # check pcsc-lite version
 PCSC_NEEDED_VERSION="1.3.3"
-PKG_CHECK_MODULES(PCSC, libpcsclite >= $PCSC_NEEDED_VERSION, [],
+PKG_CHECK_EXISTS([libpcsclite],
+	PKG_CHECK_MODULES(PCSC, libpcsclite >= $PCSC_NEEDED_VERSION, [],
 	[
 	if test -f /usr/local/lib/pkgconfig/libpcsclite.pc -a "x$PKG_CONFIG" != x ; then
 		AC_MSG_ERROR([use PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure])
 	  else
 		AC_MSG_WARN([install pcsc-lite $PCSC_NEEDED_VERSION or later])
 	  fi
-	])
+	]),
+	AC_MSG_WARN([libpcsclite not found by pkg-config])
+)
 
 saved_CPPFLAGS="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS $PCSC_CFLAGS"
@@ -111,6 +114,7 @@
 
 # check if libusb is used
 if test "x$use_libusb" != xno ; then
+	PKG_CHECK_EXISTS([libusb], [
 	PKG_CHECK_MODULES(LIBUSB, libusb, [],
 		[
 			AC_CHECK_PROG([LIBUSBCONFIG], [libusb-config], [yes])
@@ -122,6 +126,7 @@
 				AC_MSG_WARN([libusb-config not found.])
 			fi
 		])
+	])
 
 	saved_CPPFLAGS="$CPPFLAGS"
 	saved_LIBS="$LIBS"




More information about the Pcsclite-cvs-commit mailing list