forked from auracaster/openocd
ftdi: make ftdi_location command depend on libusb1 version
The function libusb_get_port_numbers(), required for the command ftdi_location, is only available in recent version of libusb1. Compilation will break if the function is not available. This patch enables the command only if libusb1 contains the necessary function. Change-Id: I091e72dafa4ed22eea51692751d43246a8152987 Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com> Reviewed-on: http://openocd.zylin.com/3396 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
This commit is contained in:
committed by
Freddie Chopin
parent
18a6fdc154
commit
414e4eb40e
@@ -1142,6 +1142,8 @@ PKG_CHECK_MODULES([LIBUSB1], [libusb-1.0], [
|
||||
[AC_MSG_WARN([libusb-1.x older than 1.0.9 detected, consider updating])])
|
||||
LIBUSB1_CFLAGS=`echo $LIBUSB1_CFLAGS | sed 's/-I/-isystem /'`
|
||||
AC_MSG_NOTICE([libusb-1.0 header bug workaround: LIBUSB1_CFLAGS changed to "$LIBUSB1_CFLAGS"])
|
||||
PKG_CHECK_EXISTS([libusb-1.0 >= 1.0.16],
|
||||
[AC_DEFINE([HAVE_LIBUSB_GET_PORT_NUMBERS], [1], [Define if your libusb has libusb_get_port_numbers()])])
|
||||
], [
|
||||
use_libusb1=no
|
||||
AC_MSG_WARN([libusb-1.x not found, trying legacy libusb-0.1 as a fallback; consider installing libusb-1.x instead])
|
||||
|
||||
Reference in New Issue
Block a user