From 414e4eb40e9a5decfaa2a5aef9ceac9768b7740b Mon Sep 17 00:00:00 2001 From: Matthias Welwarsky Date: Wed, 6 Apr 2016 10:35:13 +0200 Subject: ftdi: make ftdi_location command depend on libusb1 version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: http://openocd.zylin.com/3396 Tested-by: jenkins Reviewed-by: Andreas Färber Reviewed-by: Freddie Chopin --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index fb01e1b..aed8bce 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) -- cgit v1.1