Unbreak and merge PN53x USB drivers.
While here fix some includes that would not work if SRCDIR != BUILDDIR.
This commit is contained in:
parent
094db12a1a
commit
f1f31d1b4c
16 changed files with 391 additions and 487 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', 'arygon', 'pn531_usb', 'pn533_usb' and 'pn532_uart'. Default drivers set is 'acr122,arygon,pn531_usb,pn533_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', 'arygon', 'pn532_uart' and 'pn53x_usb'. Default drivers set is 'acr122,arygon,pn53x_usb'. The special driver set 'all' compile all available drivers.]),
|
||||
[ case "${withval}" in
|
||||
yes | no)
|
||||
dnl ignore calls without any arguments
|
||||
|
|
@ -25,18 +25,17 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
|||
|
||||
case "${DRIVER_BUILD_LIST}" in
|
||||
default)
|
||||
DRIVER_BUILD_LIST="acr122 arygon pn531_usb pn533_usb"
|
||||
DRIVER_BUILD_LIST="acr122 arygon pn53x_usb"
|
||||
;;
|
||||
all)
|
||||
DRIVER_BUILD_LIST="acr122 arygon pn531_usb pn533_usb pn532_uart"
|
||||
DRIVER_BUILD_LIST="acr122 arygon pn53x_usb pn532_uart"
|
||||
;;
|
||||
esac
|
||||
|
||||
DRIVERS_CFLAGS=""
|
||||
|
||||
driver_acr122_enabled="no"
|
||||
driver_pn531_usb_enabled="no"
|
||||
driver_pn533_usb_enabled="no"
|
||||
driver_pn53x_usb_enabled="no"
|
||||
driver_arygon_enabled="no"
|
||||
driver_pn532_uart_enabled="no"
|
||||
|
||||
|
|
@ -48,15 +47,10 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
|||
driver_acr122_enabled="yes"
|
||||
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_ACR122_ENABLED"
|
||||
;;
|
||||
pn531_usb)
|
||||
pn53x_usb)
|
||||
libusb_required="yes"
|
||||
driver_pn531_usb_enabled="yes"
|
||||
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_PN531_USB_ENABLED"
|
||||
;;
|
||||
pn533_usb)
|
||||
libusb_required="yes"
|
||||
driver_pn533_usb_enabled="yes"
|
||||
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_PN533_USB_ENABLED"
|
||||
driver_pn53x_usb_enabled="yes"
|
||||
DRIVERS_CFLAGS="$DRIVERS_CFLAGS -DDRIVER_PN53X_USB_ENABLED"
|
||||
;;
|
||||
arygon)
|
||||
driver_arygon_enabled="yes"
|
||||
|
|
@ -73,8 +67,7 @@ AC_DEFUN([LIBNFC_ARG_WITH_DRIVERS],
|
|||
done
|
||||
AC_SUBST(DRIVERS_CFLAGS)
|
||||
AM_CONDITIONAL(DRIVER_ACR122_ENABLED, [test x"$driver_acr122_enabled" = xyes])
|
||||
AM_CONDITIONAL(DRIVER_PN531_USB_ENABLED, [test x"$driver_pn531_usb_enabled" = xyes])
|
||||
AM_CONDITIONAL(DRIVER_PN533_USB_ENABLED, [test x"$driver_pn533_usb_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])
|
||||
AM_CONDITIONAL(DRIVER_PN532_UART_ENABLED, [test x"$driver_pn532_uart_enabled" = xyes])
|
||||
])
|
||||
|
|
@ -84,7 +77,6 @@ echo
|
|||
echo "Selected drivers:"
|
||||
echo " acr122........... $driver_acr122_enabled"
|
||||
echo " arygon........... $driver_arygon_enabled"
|
||||
echo " pn531_usb........ $driver_pn531_usb_enabled"
|
||||
echo " pn53x_usb........ $driver_pn53x_usb_enabled"
|
||||
echo " pn532_uart....... $driver_pn532_uart_enabled"
|
||||
echo " pn533_usb........ $driver_pn533_usb_enabled"
|
||||
])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue