+# Adapter drivers
+# 1st column -- configure option
+# 2nd column -- description
+# 3rd column -- symbol used for both config.h and automake
+m4_define([ADAPTER_ARG], [m4_argn([1], $1)])
+m4_define([ADAPTER_DESC], [m4_argn([2], $1)])
+m4_define([ADAPTER_SYM], [m4_argn([3], $1)])
+m4_define([ADAPTER_VAR], [enable_[]ADAPTER_ARG($1)])
+m4_define([ADAPTER_OPT], [m4_translit(ADAPTER_ARG($1), [_], [-])])
+
+m4_define([USB1_ADAPTERS],
+ [[[ftdi], [MPSSE mode of FTDI based devices], [FTDI]],
+ [[stlink], [ST-Link JTAG Programmer], [HLADAPTER_STLINK]],
+ [[ti_icdi], [TI ICDI JTAG Programmer], [HLADAPTER_ICDI]],
+ [[ulink], [Keil ULINK JTAG Programmer], [ULINK]],
+ [[usb_blaster_2], [Altera USB-Blaster II Compatible], [USB_BLASTER_2]],
+ [[vsllink], [Versaloon-Link JTAG Programmer], [VSLLINK]]])
+
+m4_define([USB_ADAPTERS],
+ [[[jlink], [Segger J-Link JTAG Programmer], [JLINK]],
+ [[osbdm], [OSBDM (JTAG only) Programmer], [OSBDM]],
+ [[opendous], [eStick/opendous JTAG Programmer], [OPENDOUS]],
+ [[aice], [Andes JTAG Programmer], [AICE]]])
+
+m4_define([USB0_ADAPTERS],
+ [[[usbprog], [USBProg JTAG Programmer], [USBPROG]],
+ [[rlink], [Raisonance RLink JTAG Programmer], [RLINK]],
+ [[armjtagew], [Olimex ARM-JTAG-EW Programmer], [ARMJTAGEW]]])
+
+m4_define([HIDAPI_ADAPTERS],
+ [[[cmsis_dap], [CMSIS-DAP Compliant Debugger], [CMSIS_DAP]]])
+