Smart merge of acr122_usb branch: add acr122_usb driver without removing acr122_pcsc support.
This commit is contained in:
commit
82b2cfa883
14 changed files with 813 additions and 88 deletions
|
|
@ -4,7 +4,7 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
|||
[
|
||||
AC_MSG_CHECKING(which drivers to build)
|
||||
AC_ARG_WITH(drivers,
|
||||
AC_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', 'acr122s', 'arygon', 'pn532_uart' and 'pn53x_usb'. Default drivers set is 'acr122,acr122s,arygon,pn53x_usb'. The special driver set 'all' compile all available drivers.]),
|
||||
AC_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_uart' and 'pn53x_usb'. Default drivers set is 'acr122_usb,acr122s,arygon,pn53x_usb'. The special driver set 'all' compile all available drivers.]),
|
||||
[ case "${withval}" in
|
||||
yes | no)
|
||||
dnl ignore calls without any arguments
|
||||
|
|
@ -25,16 +25,17 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
|||
|
||||
case "${DRIVER_BUILD_LIST}" in
|
||||
default)
|
||||
DRIVER_BUILD_LIST="acr122 acr122s arygon pn53x_usb"
|
||||
DRIVER_BUILD_LIST="acr122_usb acr122s arygon pn53x_usb"
|
||||
;;
|
||||
all)
|
||||
DRIVER_BUILD_LIST="acr122 acr122s arygon pn53x_usb pn532_uart"
|
||||
DRIVER_BUILD_LIST="acr122_pcsc acr122_usb acr122s arygon pn53x_usb pn532_uart"
|
||||
;;
|
||||
esac
|
||||
|
||||
DRIVERS_CFLAGS=""
|
||||
|
||||
driver_acr122_enabled="no"
|
||||
driver_acr122_pcsc_enabled="no"
|
||||
driver_acr122_usb_enabled="no"
|
||||
driver_acr122s_enabled="no"
|
||||
driver_pn53x_usb_enabled="no"
|
||||
driver_arygon_enabled="no"
|
||||
|
|
@ -43,10 +44,15 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
|||
for driver in ${DRIVER_BUILD_LIST}
|
||||
do
|
||||
case "${driver}" in
|
||||
acr122)
|
||||
acr122_pcsc)
|
||||
pcsc_required="yes"
|
||||
driver_acr122_enabled="yes"
|
||||
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_ACR122_ENABLED"
|
||||
driver_acr122_pcsc_enabled="yes"
|
||||
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_ACR122_PCSC_ENABLED"
|
||||
;;
|
||||
acr122_usb)
|
||||
libusb_required="yes"
|
||||
driver_acr122_usb_enabled="yes"
|
||||
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_ACR122_USB_ENABLED"
|
||||
;;
|
||||
acr122s)
|
||||
driver_acr122s_enabled="yes"
|
||||
|
|
@ -54,7 +60,7 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
|||
;;
|
||||
pn53x_usb)
|
||||
libusb_required="yes"
|
||||
driver_pn53x_usb_enabled="yes"
|
||||
driver_pn53x_usb_enabled="yes"
|
||||
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_PN53X_USB_ENABLED"
|
||||
;;
|
||||
arygon)
|
||||
|
|
@ -71,7 +77,8 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
|||
esac
|
||||
done
|
||||
AC_SUBST(DRIVERS_CFLAGS)
|
||||
AM_CONDITIONAL(DRIVER_ACR122_ENABLED, [test x"$driver_acr122_enabled" = xyes])
|
||||
AM_CONDITIONAL(DRIVER_ACR122_PCSC_ENABLED, [test x"$driver_acr122_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])
|
||||
AM_CONDITIONAL(DRIVER_ARYGON_ENABLED, [test x"$driver_arygon_enabled" = xyes])
|
||||
|
|
@ -81,7 +88,8 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
|||
AC_DEFUN([LIBNFC_DRIVERS_SUMMARY],[
|
||||
echo
|
||||
echo "Selected drivers:"
|
||||
echo " acr122........... $driver_acr122_enabled"
|
||||
echo " acr122_pcsc...... $driver_acr122_pcsc_enabled"
|
||||
echo " acr122_usb....... $driver_acr122_usb_enabled"
|
||||
echo " acr122s.......... $driver_acr122s_enabled"
|
||||
echo " arygon........... $driver_arygon_enabled"
|
||||
echo " pn53x_usb........ $driver_pn53x_usb_enabled"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue