mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-11 18:13:46 +00:00
Added driver for contactless PC/SC readers
- only initiator mode is supported - properties are choosen as they are available via PC/SC, the rest of the defaults are chosen to be compatible with Mifare DESFire - This commit allows reading Mifare DESFire via PC/SC with libfreefare
This commit is contained in:
@@ -4,7 +4,7 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
||||
[
|
||||
AC_MSG_CHECKING(which drivers to build)
|
||||
AC_ARG_WITH(drivers,
|
||||
AS_HELP_STRING([--with-drivers=DRIVERS], [Use a custom driver set, where DRIVERS is a coma-separated list of drivers to build support for. Available drivers are: 'acr122_pcsc', 'acr122_usb', 'acr122s', 'arygon', 'pn532_i2c', 'pn532_spi', 'pn532_uart' and 'pn53x_usb'. Default drivers set is 'acr122_usb,acr122s,arygon,pn532_i2c,pn532_spi,pn532_uart,pn53x_usb'. The special driver set 'all' compile all available drivers.]),
|
||||
AS_HELP_STRING([--with-drivers=DRIVERS], [Use a custom driver set, where DRIVERS is a coma-separated list of drivers to build support for. Available drivers are: 'pcsc', 'acr122_pcsc', 'acr122_usb', 'acr122s', 'arygon', 'pn532_i2c', 'pn532_spi', 'pn532_uart' and 'pn53x_usb'. Default drivers set is 'acr122_usb,acr122s,arygon,pn532_i2c,pn532_spi,pn532_uart,pn53x_usb'. The special driver set 'all' compile all available drivers.]),
|
||||
[ case "${withval}" in
|
||||
yes | no)
|
||||
dnl ignore calls without any arguments
|
||||
@@ -36,7 +36,7 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
||||
fi
|
||||
;;
|
||||
all)
|
||||
DRIVER_BUILD_LIST="acr122_pcsc acr122_usb acr122s arygon pn53x_usb pn532_uart"
|
||||
DRIVER_BUILD_LIST="pcsc acr122_pcsc acr122_usb acr122s arygon pn53x_usb pn532_uart"
|
||||
if test x"$spi_available" = x"yes"
|
||||
then
|
||||
DRIVER_BUILD_LIST="$DRIVER_BUILD_LIST pn532_spi"
|
||||
@@ -50,6 +50,7 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
||||
|
||||
DRIVERS_CFLAGS=""
|
||||
|
||||
driver_pcsc_enabled="no"
|
||||
driver_acr122_pcsc_enabled="no"
|
||||
driver_acr122_usb_enabled="no"
|
||||
driver_acr122s_enabled="no"
|
||||
@@ -62,6 +63,11 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
||||
for driver in ${DRIVER_BUILD_LIST}
|
||||
do
|
||||
case "${driver}" in
|
||||
pcsc)
|
||||
pcsc_required="yes"
|
||||
driver_pcsc_enabled="yes"
|
||||
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_PCSC_ENABLED"
|
||||
;;
|
||||
acr122_pcsc)
|
||||
pcsc_required="yes"
|
||||
driver_acr122_pcsc_enabled="yes"
|
||||
@@ -109,6 +115,7 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
||||
done
|
||||
AC_SUBST(DRIVERS_CFLAGS)
|
||||
AM_CONDITIONAL(DRIVER_ACR122_PCSC_ENABLED, [test x"$driver_acr122_pcsc_enabled" = xyes])
|
||||
AM_CONDITIONAL(DRIVER_PCSC_ENABLED, [test x"$driver_pcsc_enabled" = xyes])
|
||||
AM_CONDITIONAL(DRIVER_ACR122_USB_ENABLED, [test x"$driver_acr122_usb_enabled" = xyes])
|
||||
AM_CONDITIONAL(DRIVER_ACR122S_ENABLED, [test x"$driver_acr122s_enabled" = xyes])
|
||||
AM_CONDITIONAL(DRIVER_PN53X_USB_ENABLED, [test x"$driver_pn53x_usb_enabled" = xyes])
|
||||
@@ -121,6 +128,7 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
||||
AC_DEFUN([LIBNFC_DRIVERS_SUMMARY],[
|
||||
echo
|
||||
echo "Selected drivers:"
|
||||
echo " pcsc............. $driver_pcsc_enabled"
|
||||
echo " acr122_pcsc...... $driver_acr122_pcsc_enabled"
|
||||
echo " acr122_usb....... $driver_acr122_usb_enabled"
|
||||
echo " acr122s.......... $driver_acr122s_enabled"
|
||||
|
||||
Reference in New Issue
Block a user