Fix [ 1828368 ] Compilation fails without libusb/libftdi

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@758 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Kolja Waschk 17 years ago
parent 08617479ef
commit 70ff64e8bf

@ -99,27 +99,31 @@ AC_CHECK_HEADERS(linux/ppdev.h)
VL_LIB_READLINE
dnl check for libftdi-config
AC_PATH_PROG(HAVELIBFTDI, libftdi-config, $PATH)
if test ! -z "$HAVELIBFTDI"; then
AC_PATH_PROG(HAVELIBFTDI, libftdi-config, no)
if test "$HAVELIBFTDI" != "no" ; then
dnl LIBFTDI_CFLAGS=`$HAVELIBFTDI --cflags`
AM_CONDITIONAL(HAVE_LIBFTDI, true)
LIBFTDI_LIBS=`$HAVELIBFTDI --libs`
CFLAGS="$CFLAGS $LIBFTDI_CFLAGS"
LIBS="$LIBS $LIBFTDI_LIBS"
AC_DEFINE(HAVE_LIBFTDI, 1, [Define if you have libftdi])
else
AC_MSG_ERROR([*** libftdi-config not found. You need a working libftdi installation.])
AM_CONDITIONAL(HAVE_LIBFTDI, false)
AC_MSG_WARN([*** libftdi-config not found. No support for FTDI-based USB JTAG cables.])
fi
dnl check for libusb-config
AC_PATH_PROG(HAVELIBUSB, libusb-config, $PATH)
if test ! -z "$HAVELIBUSB"; then
AC_PATH_PROG(HAVELIBUSB, libusb-config, no)
if test "$HAVELIBUSB" != "no" ; then
dnl LIBUSB_CFLAGS=`$HAVELIBUSB --cflags`
AM_CONDITIONAL(HAVE_LIBUSB, true)
LIBUSB_LIBS=`$HAVELIBUSB --libs`
CFLAGS="$CFLAGS $LIBUSB_CFLAGS"
LIBS="$LIBS $LIBUSB_LIBS"
AC_DEFINE(HAVE_LIBUSB, 1, [Define if you have libusb])
else
AC_MSG_ERROR([*** libusb-config not found. You need a working libusb installation.])
AM_CONDITIONAL(HAVE_LIBUSB, false)
AC_MSG_WARN([*** libusb-config not found. Omitting support for some USB JTAG cables.])
fi
CFLAGS="$CFLAGS -Wall"

@ -33,17 +33,12 @@ libtap_a_SOURCES = \
parport.c \
parport/direct.c \
parport/ppdev.c \
parport/xpcu_common.c \
parport/xpcu_pp.c \
parport/ftdi.c \
cable.c \
cable/generic.h \
cable/generic.c \
cable/arcom.c \
cable/byteblaster.c \
cable/usbblaster.c \
cable/dlc5.c \
cable/xpc.c \
cable/ea253.c \
cable/ei012.c \
cable/keithkoep.c \
@ -52,3 +47,17 @@ libtap_a_SOURCES = \
cable/triton.c \
cable/wiggler.c \
cable/wiggler2.c
if HAVE_LIBUSB
libtap_a_SOURCES += \
parport/xpcu_common.c \
parport/xpcu_pp.c \
cable/xpc.c
endif
if HAVE_LIBFTDI
libtap_a_SOURCES += \
parport/ftdi.c \
cable/usbblaster.c
endif

@ -37,7 +37,9 @@
extern cable_driver_t arcom_cable_driver;
extern cable_driver_t byteblaster_cable_driver;
#ifdef HAVE_LIBFTDI
extern cable_driver_t usbblaster_cable_driver;
#endif
extern cable_driver_t dlc5_cable_driver;
extern cable_driver_t ea253_cable_driver;
extern cable_driver_t ei012_cable_driver;
@ -57,7 +59,9 @@ extern cable_driver_t xpc_ext_cable_driver;
cable_driver_t *cable_drivers[] = {
&arcom_cable_driver,
&byteblaster_cable_driver,
#ifdef HAVE_LIBFTDI
&usbblaster_cable_driver,
#endif
&dlc5_cable_driver,
&ea253_cable_driver,
&ei012_cable_driver,

Loading…
Cancel
Save