Attempt to fix pcsc-lite detection on MacOS
This commit is contained in:
parent
2857b1dd1a
commit
c67d915250
1 changed files with 14 additions and 10 deletions
|
@ -5,23 +5,27 @@ dnl libpcsclite is found using pkg-config
|
||||||
AC_DEFUN([LIBNFC_CHECK_PCSC],
|
AC_DEFUN([LIBNFC_CHECK_PCSC],
|
||||||
[
|
[
|
||||||
if test "x$pcsc_required" = "xyes"; then
|
if test "x$pcsc_required" = "xyes"; then
|
||||||
|
PKG_CHECK_MODULES([libpcsclite], [libpcsclite], [HAVE_PCSC=1], [HAVE_PCSC=0])
|
||||||
|
if test x"$HAVE_PCSC" = "x1" ; then
|
||||||
|
if test x"$PKG_CONFIG_REQUIRES" != x""; then
|
||||||
|
PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES,"
|
||||||
|
fi
|
||||||
|
PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES libpcsclite"
|
||||||
|
fi
|
||||||
case "$host" in
|
case "$host" in
|
||||||
*darwin*)
|
*darwin*)
|
||||||
AC_MSG_CHECKING(for PC/SC)
|
if test x"$HAVE_PCSC" = "x0" ; then
|
||||||
libpcsclite_LIBS="-Wl,-framework,PCSC"
|
AC_MSG_CHECKING(for PC/SC)
|
||||||
libpcsclite_CFLAGS="-I/System/Library/Frameworks/PCSC.framework/Headers"
|
libpcsclite_LIBS="-Wl,-framework,PCSC"
|
||||||
HAVE_PCSC=1
|
libpcsclite_CFLAGS="-I/System/Library/Frameworks/PCSC.framework/Headers"
|
||||||
AC_MSG_RESULT(yes: darwin PC/SC framework)
|
HAVE_PCSC=1
|
||||||
|
AC_MSG_RESULT(yes: darwin PC/SC framework)
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
PKG_CHECK_MODULES([libpcsclite], [libpcsclite], [HAVE_PCSC=1], [HAVE_PCSC=0])
|
|
||||||
if test x"$HAVE_PCSC" = "x0" ; then
|
if test x"$HAVE_PCSC" = "x0" ; then
|
||||||
AC_MSG_ERROR([libpcsclite is mandatory.])
|
AC_MSG_ERROR([libpcsclite is mandatory.])
|
||||||
fi
|
fi
|
||||||
if test x"$PKG_CONFIG_REQUIRES" != x""; then
|
|
||||||
PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES,"
|
|
||||||
fi
|
|
||||||
PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES libpcsclite"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
AC_SUBST(libpcsclite_LIBS)
|
AC_SUBST(libpcsclite_LIBS)
|
||||||
|
|
Loading…
Reference in a new issue