MERGE: libnfc-mingw-cross merge with trunk (r805-821)

This commit is contained in:
Romuald Conty 2010-11-17 08:29:41 +00:00
parent 6df612a364
commit 58dcf63e7c
19 changed files with 246 additions and 110 deletions

View file

@ -6,15 +6,30 @@ AC_DEFUN([LIBNFC_CHECK_LIBUSB],
[
if test x"$libusb_required" = "xyes"; then
HAVE_LIBUSB=0
AC_ARG_WITH([libusb-win32],
[AS_HELP_STRING([--with-libusb-win32], [use libusb-win32 from the following location])],
[LIBUSB_WIN32_DIR=$withval],
[LIBUSBWIN32_DIR=""])
# --with-libusb-win32 directory have been set
if test "x$LIBUSB_WIN32_DIR" != "x"; then
AC_MSG_NOTICE(["use libusb-win32 from $LIBUSB_WIN32_DIR"])
libusb_CFLAGS="-I$LIBUSB_WIN32_DIR/include"
libusb_LIBS="-L$LIBUSB_WIN32_DIR/lib/gcc -lusb"
HAVE_LIBUSB=1
fi
# Search using pkg-config
if test x"$PKG_CONFIG" != "x"; then
PKG_CHECK_MODULES([libusb], [libusb], [HAVE_LIBUSB=1], [HAVE_LIBUSB=0])
if test x"$HAVE_LIBUSB" = "x1"; then
if test x"$PKG_CONFIG_REQUIRES" != x""; then
PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES,"
if test x"$HAVE_LIBUSB" = "x0"; then
if test x"$PKG_CONFIG" != "x"; then
PKG_CHECK_MODULES([libusb], [libusb], [HAVE_LIBUSB=1], [HAVE_LIBUSB=0])
if test x"$HAVE_LIBUSB" = "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
PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES libusb"
fi
fi

View file

@ -22,6 +22,11 @@ AC_DEFUN([LIBNFC_CHECK_PCSC],
AC_MSG_RESULT(yes: darwin PC/SC framework)
fi
;;
*mingw*)
dnl FIXME Find a way to cross-compile for Windows
HAVE_PCSC=0
AC_MSG_RESULT(no: Windows PC/SC framework)
;;
*)
if test x"$HAVE_PCSC" = "x0" ; then
AC_MSG_ERROR([libpcsclite is mandatory.])