configure.ac: fix build with libusb0 and without libusb1
Driver 'openjtag' requires both libftdi and libusb1. The current check is incorrect and the driver is built when libftdi is present with libusb0 and without libusb1, which causes the linker to fail resolving the required libusb1 symbols. Remove the check for libusb0 on driver 'openjtag'. Create a new adapters group LIBFTDI_USB1_ADAPTERS to hold the driver 'openjtag'. Change-Id: I1f5e554b519e51c829d116ede894639cb55a26aa Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5989 Tested-by: jenkins
This commit is contained in:
parent
2c82d9ea7d
commit
cc79bcd587
16
configure.ac
16
configure.ac
|
@ -138,8 +138,10 @@ m4_define([HIDAPI_USB1_ADAPTERS],
|
||||||
|
|
||||||
m4_define([LIBFTDI_ADAPTERS],
|
m4_define([LIBFTDI_ADAPTERS],
|
||||||
[[[usb_blaster], [Altera USB-Blaster Compatible], [USB_BLASTER]],
|
[[[usb_blaster], [Altera USB-Blaster Compatible], [USB_BLASTER]],
|
||||||
[[presto], [ASIX Presto Adapter], [PRESTO]],
|
[[presto], [ASIX Presto Adapter], [PRESTO]]])
|
||||||
[[openjtag], [OpenJTAG Adapter], [OPENJTAG]]])
|
|
||||||
|
m4_define([LIBFTDI_USB1_ADAPTERS],
|
||||||
|
[[[openjtag], [OpenJTAG Adapter], [OPENJTAG]]])
|
||||||
|
|
||||||
m4_define([LIBGPIOD_ADAPTERS],
|
m4_define([LIBGPIOD_ADAPTERS],
|
||||||
[[[linuxgpiod], [Linux GPIO bitbang through libgpiod], [LINUXGPIOD]]])
|
[[[linuxgpiod], [Linux GPIO bitbang through libgpiod], [LINUXGPIOD]]])
|
||||||
|
@ -250,6 +252,7 @@ AC_ARG_ADAPTERS([
|
||||||
HIDAPI_ADAPTERS,
|
HIDAPI_ADAPTERS,
|
||||||
HIDAPI_USB1_ADAPTERS,
|
HIDAPI_USB1_ADAPTERS,
|
||||||
LIBFTDI_ADAPTERS,
|
LIBFTDI_ADAPTERS,
|
||||||
|
LIBFTDI_USB1_ADAPTERS
|
||||||
LIBGPIOD_ADAPTERS,
|
LIBGPIOD_ADAPTERS,
|
||||||
LIBJAYLINK_ADAPTERS
|
LIBJAYLINK_ADAPTERS
|
||||||
],[auto])
|
],[auto])
|
||||||
|
@ -723,16 +726,10 @@ PROCESS_ADAPTERS([USB0_ADAPTERS], ["x$use_libusb0" = "xyes"], [libusb-0.1])
|
||||||
PROCESS_ADAPTERS([HIDAPI_ADAPTERS], ["x$use_hidapi" = "xyes"], [hidapi])
|
PROCESS_ADAPTERS([HIDAPI_ADAPTERS], ["x$use_hidapi" = "xyes"], [hidapi])
|
||||||
PROCESS_ADAPTERS([HIDAPI_USB1_ADAPTERS], ["x$use_hidapi" = "xyes" -a "x$use_libusb1" = "xyes"], [hidapi and libusb-1.x])
|
PROCESS_ADAPTERS([HIDAPI_USB1_ADAPTERS], ["x$use_hidapi" = "xyes" -a "x$use_libusb1" = "xyes"], [hidapi and libusb-1.x])
|
||||||
PROCESS_ADAPTERS([LIBFTDI_ADAPTERS], ["x$use_libftdi" = "xyes"], [libftdi])
|
PROCESS_ADAPTERS([LIBFTDI_ADAPTERS], ["x$use_libftdi" = "xyes"], [libftdi])
|
||||||
|
PROCESS_ADAPTERS([LIBFTDI_USB1_ADAPTERS], ["x$use_libftdi" = "xyes" -a "x$use_libusb1" = "xyes"], [libftdi and libusb-1.x])
|
||||||
PROCESS_ADAPTERS([LIBGPIOD_ADAPTERS], ["x$use_libgpiod" = "xyes"], [libgpiod])
|
PROCESS_ADAPTERS([LIBGPIOD_ADAPTERS], ["x$use_libgpiod" = "xyes"], [libgpiod])
|
||||||
PROCESS_ADAPTERS([LIBJAYLINK_ADAPTERS], ["x$use_internal_libjaylink" = "xyes" -o "x$use_libjaylink" = "xyes"], [libjaylink-0.2])
|
PROCESS_ADAPTERS([LIBJAYLINK_ADAPTERS], ["x$use_internal_libjaylink" = "xyes" -o "x$use_libjaylink" = "xyes"], [libjaylink-0.2])
|
||||||
|
|
||||||
AS_IF([test "x$build_openjtag" = "xyes"], [
|
|
||||||
AS_IF([test "x$use_libusb1" != "xyes" -a "x$use_libusb0" != "xyes"], [
|
|
||||||
AC_MSG_ERROR([libusb-1.x or libusb-0.1 is required for the OpenJTAG Programmer])
|
|
||||||
build_openjtag=no
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AS_IF([test "x$enable_linuxgpiod" != "xno"], [
|
AS_IF([test "x$enable_linuxgpiod" != "xno"], [
|
||||||
build_bitbang=yes
|
build_bitbang=yes
|
||||||
])
|
])
|
||||||
|
@ -868,6 +865,7 @@ echo OpenOCD configuration summary
|
||||||
echo --------------------------------------------------
|
echo --------------------------------------------------
|
||||||
m4_foreach([adapter], [USB1_ADAPTERS, USB0_ADAPTERS,
|
m4_foreach([adapter], [USB1_ADAPTERS, USB0_ADAPTERS,
|
||||||
HIDAPI_ADAPTERS, HIDAPI_USB1_ADAPTERS, LIBFTDI_ADAPTERS,
|
HIDAPI_ADAPTERS, HIDAPI_USB1_ADAPTERS, LIBFTDI_ADAPTERS,
|
||||||
|
LIBFTDI_USB1_ADAPTERS,
|
||||||
LIBGPIOD_ADAPTERS,
|
LIBGPIOD_ADAPTERS,
|
||||||
LIBJAYLINK_ADAPTERS, PCIE_ADAPTERS,
|
LIBJAYLINK_ADAPTERS, PCIE_ADAPTERS,
|
||||||
OPTIONAL_LIBRARIES],
|
OPTIONAL_LIBRARIES],
|
||||||
|
|
Loading…
Reference in New Issue