@@ -164,6 +164,9 @@ m4_define([LIBFTDI_USB1_ADAPTERS],
164164m4_define ( [ LIBGPIOD_ADAPTERS] ,
165165 [ [ [ linuxgpiod] , [ Linux GPIO bitbang through libgpiod] , [ LINUXGPIOD] ] ] )
166166
167+ m4_define ( [ SYSFSGPIO_ADAPTER] ,
168+ [ [ [ sysfsgpio] , [ Linux GPIO bitbang through sysfs] , [ SYSFSGPIO] ] ] )
169+
167170m4_define ( [ REMOTE_BITBANG_ADAPTER] ,
168171 [ [ [ remote_bitbang] , [ Remote Bitbang driver] , [ REMOTE_BITBANG] ] ] )
169172
@@ -315,6 +318,7 @@ AC_ARG_ADAPTERS([
315318 LIBFTDI_ADAPTERS,
316319 LIBFTDI_USB1_ADAPTERS,
317320 LIBGPIOD_ADAPTERS,
321+ SYSFSGPIO_ADAPTER,
318322 REMOTE_BITBANG_ADAPTER,
319323 LINUXSPIDEV_ADAPTER,
320324 SERIAL_PORT_ADAPTERS,
@@ -379,10 +383,6 @@ AC_ARG_ENABLE([gw16012],
379383 AS_HELP_STRING ( [ --enable-gw16012] , [ Enable building support for the Gateworks GW16012 JTAG Programmer] ) ,
380384 [ build_gw16012=$enableval] , [ build_gw16012=no] )
381385
382- AC_ARG_ENABLE ( [ sysfsgpio] ,
383- AS_HELP_STRING ( [ --enable-sysfsgpio] , [ Enable building support for programming driven via sysfs gpios.] ) ,
384- [ build_sysfsgpio=$enableval] , [ build_sysfsgpio=no] )
385-
386386can_build_rshim=no
387387
388388AS_CASE ( [ $host_os] ,
@@ -391,10 +391,6 @@ AS_CASE([$host_os],
391391 can_build_rshim=yes
392392 ] ,
393393 [
394- AS_IF ( [ test "x$build_sysfsgpio" = "xyes"] , [
395- AC_MSG_ERROR ( [ sysfsgpio is only available on linux] )
396- ] )
397-
398394 AS_CASE ( [ $host_os] , [ freebsd*] , [
399395 can_build_rshim=yes
400396 ] ,
@@ -604,13 +600,6 @@ AS_IF([test "x$use_internal_jimtcl" = "xyes"], [
604600 ] )
605601] )
606602
607- AS_IF ( [ test "x$build_sysfsgpio" = "xyes"] , [
608- build_bitbang=yes
609- AC_DEFINE ( [ BUILD_SYSFSGPIO] , [ 1] , [ 1 if you want the SysfsGPIO driver.] )
610- ] , [
611- AC_DEFINE ( [ BUILD_SYSFSGPIO] , [ 0] , [ 0 if you don't want SysfsGPIO driver.] )
612- ] )
613-
614603PKG_CHECK_MODULES([ LIBUSB1] , [ libusb-1.0] , [
615604 use_libusb1=yes
616605 AC_DEFINE ( [ HAVE_LIBUSB1] , [ 1] , [ Define if you have libusb-1.x] )
@@ -702,6 +691,7 @@ PROCESS_ADAPTERS([HIDAPI_USB1_ADAPTERS], ["x$use_hidapi" = "xyes" -a "x$use_libu
702691PROCESS_ADAPTERS([ LIBFTDI_ADAPTERS] , [ "x$use_libftdi" = "xyes"] , [ libftdi] )
703692PROCESS_ADAPTERS([ LIBFTDI_USB1_ADAPTERS] , [ "x$use_libftdi" = "xyes" -a "x$use_libusb1" = "xyes"] , [ libftdi and libusb-1.x] )
704693PROCESS_ADAPTERS([ LIBGPIOD_ADAPTERS] , [ "x$use_libgpiod" = "xyes"] , [ Linux libgpiod] )
694+ PROCESS_ADAPTERS([ SYSFSGPIO_ADAPTER] , [ "x$is_linux" = "xyes"] , [ Linux sysfs] )
705695PROCESS_ADAPTERS([ REMOTE_BITBANG_ADAPTER] , [ true] , [ unused] )
706696PROCESS_ADAPTERS([ LIBJAYLINK_ADAPTERS] , [ "x$use_internal_libjaylink" = "xyes" -o "x$use_libjaylink" = "xyes"] , [ libjaylink-0.2] )
707697PROCESS_ADAPTERS([ PCIE_ADAPTERS] , [ "x$is_linux" = "xyes"] , [ Linux build] )
@@ -720,6 +710,10 @@ AS_IF([test "x$enable_linuxgpiod" != "xno"], [
720710 build_bitbang=yes
721711] )
722712
713+ AS_IF ( [ test "x$enable_sysfsgpio" != "xno"] , [
714+ build_bitbang=yes
715+ ] )
716+
723717AS_IF ( [ test "x$enable_remote_bitbang" != "xno"] , [
724718 build_bitbang=yes
725719] )
@@ -767,7 +761,6 @@ AM_CONDITIONAL([AM335XGPIO], [test "x$build_am335xgpio" = "xyes"])
767761AM_CONDITIONAL([ BITBANG] , [ test "x$build_bitbang" = "xyes"] )
768762AM_CONDITIONAL([ USB_BLASTER_DRIVER] , [ test "x$enable_usb_blaster" != "xno" -o "x$enable_usb_blaster_2" != "xno"] )
769763AM_CONDITIONAL([ GW16012] , [ test "x$build_gw16012" = "xyes"] )
770- AM_CONDITIONAL([ SYSFSGPIO] , [ test "x$build_sysfsgpio" = "xyes"] )
771764AM_CONDITIONAL([ USE_LIBUSB1] , [ test "x$use_libusb1" = "xyes"] )
772765AM_CONDITIONAL([ IS_CYGWIN] , [ test "x$is_cygwin" = "xyes"] )
773766AM_CONDITIONAL([ IS_MINGW] , [ test "x$is_mingw" = "xyes"] )
@@ -864,6 +857,7 @@ m4_foreach([adapter], [USB1_ADAPTERS,
864857 HIDAPI_ADAPTERS, HIDAPI_USB1_ADAPTERS, LIBFTDI_ADAPTERS,
865858 LIBFTDI_USB1_ADAPTERS,
866859 LIBGPIOD_ADAPTERS,
860+ SYSFSGPIO_ADAPTER,
867861 REMOTE_BITBANG_ADAPTER,
868862 LIBJAYLINK_ADAPTERS, PCIE_ADAPTERS, SERIAL_PORT_ADAPTERS,
869863 LINUXSPIDEV_ADAPTER,
0 commit comments