configure.ac rework
- Put libusb and PC/SC check in m4 macros. - Suppress --disable-pcsclite and --disable-libusb - Add --with-drivers option: we now could choose which driver to build. without this option a default set is build (ATM all drivers except PN532_UART)
This commit is contained in:
parent
b747573dc7
commit
b55400a0d5
13 changed files with 230 additions and 122 deletions
29
m4/libnfc_check_pcsc.m4
Normal file
29
m4/libnfc_check_pcsc.m4
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
dnl Check for PCSC presence (if required)
|
||||
dnl On success, HAVE_PCSC is set to 1 and PKG_CONFIG_REQUIRES is filled when
|
||||
dnl libpcsclite is found using pkg-config
|
||||
|
||||
AC_DEFUN([LIBNFC_CHECK_PCSC],
|
||||
[
|
||||
if test "x$pcsc_required" = "xyes"; then
|
||||
case "$host" in
|
||||
*darwin*)
|
||||
AC_MSG_CHECKING(for PC/SC)
|
||||
libpcsclite_LIBS="-Wl,-framework,PCSC"
|
||||
libpcsclite_CFLAGS="-I/System/Library/Frameworks/PCSC.framework/Headers"
|
||||
AC_MSG_RESULT(yes: darwin PC/SC framework)
|
||||
;;
|
||||
*)
|
||||
PKG_CHECK_MODULES([libpcsclite], [libpcsclite], [HAVE_PCSC=1], [HAVE_PCSC=0])
|
||||
if test x"$HAVE_PCSC" = "x0" ; then
|
||||
AC_MSG_ERROR([libpcsclite is mandatory.])
|
||||
fi
|
||||
if test x"$PKG_CONFIG_REQUIRES" != x""; then
|
||||
PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES,"
|
||||
fi
|
||||
PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES libpcsclite"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(libpcsclite_LIBS)
|
||||
AC_SUBST(libpcsclite_CFLAGS)
|
||||
fi
|
||||
])
|
||||
Loading…
Add table
Add a link
Reference in a new issue