[Pcsclite-git-commit] [CCID] 02/04: MacOSX/configure: check static libusb will be used
Ludovic Rousseau
rousseau at moszumanska.debian.org
Fri Dec 16 17:55:52 UTC 2016
This is an automated email from the git hooks/post-receive script.
rousseau pushed a commit to branch master
in repository CCID.
commit 2811a89260bbc4dfabd91dc87c2de991257df755
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date: Fri Dec 16 10:22:21 2016 +0100
MacOSX/configure: check static libusb will be used
If a _dynamic_ version of libusb is present then it will be used by the
linker. This is problematic since we want to use the _static_ version of
libusb to avoid an external dependency.
---
MacOSX/configure | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/MacOSX/configure b/MacOSX/configure
index 069342b..1d0639c 100755
--- a/MacOSX/configure
+++ b/MacOSX/configure
@@ -43,10 +43,22 @@ PCSC_CFLAGS=${PCSC_CFLAGS:--I$(pwd)/MacOSX}
PCSC_LIBS=${PCSC_LIBS:--framework PCSC}
# use libusb-1.0
-LIBUSB_ARCHIVE=$(pkg-config --variable=libdir libusb-1.0)/libusb-1.0.a
+LIBUSB_DIR=$(pkg-config --variable=libdir libusb-1.0)
+LIBUSB_ARCHIVE="$LIBUSB_DIR"/libusb-1.0.a
LIBUSB_CFLAGS=$(pkg-config --cflags --static libusb-1.0)
LIBUSB_LIBS=$(pkg-config --libs --static libusb-1.0)
+if ls "$LIBUSB_DIR"/*.dylib 2> /dev/null
+then
+ echo -en $RED
+ echo "*****************************"
+ echo "Dynamic library libusb found in $LIBUSB_DIR"
+ echo "*****************************"
+ echo -en $NORMAL
+ echo "Rename it to force a static link"
+ exit
+fi
+
# RESPONSECODE is already defined by PCSC/wintypes.h
# define needed here to compile examples/scardcontrol.c since config.h is
# not included
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/CCID.git
More information about the Pcsclite-cvs-commit
mailing list