Skip to content

Commit fdd76c8

Browse files
R. Diezborneoa
authored andcommitted
configure.ac: show the sysfsgpio adapter in the config summary
Also enable this adapter by default (auto). Change-Id: I43b9f1a1873b381d015114da57efc1d78e6e7780 Signed-off-by: R. Diez <[email protected]> Reviewed-on: https://review.openocd.org/c/openocd/+/8834 Tested-by: jenkins Reviewed-by: Antonio Borneo <[email protected]>
1 parent d8a2f6d commit fdd76c8

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

configure.ac

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ m4_define([LIBFTDI_USB1_ADAPTERS],
164164
m4_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+
167170
m4_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-
386386
can_build_rshim=no
387387

388388
AS_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-
614603
PKG_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
702691
PROCESS_ADAPTERS([LIBFTDI_ADAPTERS], ["x$use_libftdi" = "xyes"], [libftdi])
703692
PROCESS_ADAPTERS([LIBFTDI_USB1_ADAPTERS], ["x$use_libftdi" = "xyes" -a "x$use_libusb1" = "xyes"], [libftdi and libusb-1.x])
704693
PROCESS_ADAPTERS([LIBGPIOD_ADAPTERS], ["x$use_libgpiod" = "xyes"], [Linux libgpiod])
694+
PROCESS_ADAPTERS([SYSFSGPIO_ADAPTER], ["x$is_linux" = "xyes"], [Linux sysfs])
705695
PROCESS_ADAPTERS([REMOTE_BITBANG_ADAPTER], [true], [unused])
706696
PROCESS_ADAPTERS([LIBJAYLINK_ADAPTERS], ["x$use_internal_libjaylink" = "xyes" -o "x$use_libjaylink" = "xyes"], [libjaylink-0.2])
707697
PROCESS_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+
723717
AS_IF([test "x$enable_remote_bitbang" != "xno"], [
724718
build_bitbang=yes
725719
])
@@ -767,7 +761,6 @@ AM_CONDITIONAL([AM335XGPIO], [test "x$build_am335xgpio" = "xyes"])
767761
AM_CONDITIONAL([BITBANG], [test "x$build_bitbang" = "xyes"])
768762
AM_CONDITIONAL([USB_BLASTER_DRIVER], [test "x$enable_usb_blaster" != "xno" -o "x$enable_usb_blaster_2" != "xno"])
769763
AM_CONDITIONAL([GW16012], [test "x$build_gw16012" = "xyes"])
770-
AM_CONDITIONAL([SYSFSGPIO], [test "x$build_sysfsgpio" = "xyes"])
771764
AM_CONDITIONAL([USE_LIBUSB1], [test "x$use_libusb1" = "xyes"])
772765
AM_CONDITIONAL([IS_CYGWIN], [test "x$is_cygwin" = "xyes"])
773766
AM_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

Comments
 (0)