move libusb checks before libftdi checks as libftdi needs libusb

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1186 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 17 years ago
parent c2acae0f50
commit 715abd1fed

@ -1,3 +1,8 @@
2008-05-01 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Check for libusb before libftdi since the latter needs
the former.
2008-04-26 Kolja Waschk <kawk>
* src/flash/amd.c: Separate Chip name by Manufacturer (Andrey F. Ilchuk)

@ -113,36 +113,6 @@ AC_CHECK_HEADERS(wchar.h)
VL_LIB_READLINE
AC_ARG_WITH([libftdi],
[AS_HELP_STRING([--with-libftdi],
[use libftdi for FTDI-based cables])],
[], [with_libftdi=check])
AS_IF([test "x$with_libftdi" != xno], [
AS_IF([test "x$with_libftdi" != xyes -a "x$with_libftdi" != xcheck], [
CFLAGS="$CFLAGS -I$with_libftdi -L$with_libftdi"
LIBS="$LIBS -lftdi"
],[
AC_PATH_PROG(LIBFTDI_CONFIG, libftdi-config, no)
AS_IF([test "$LIBFTDI_CONFIG" != "no"],[
LIBS="$LIBS `$LIBFTDI_CONFIG --libs`"
CFLAGS="$CFLAGS `$LIBFTDI_CONFIG --cflags`"
],)
])
AC_CHECK_FUNC([ftdi_usb_open], [
AC_DEFINE(HAVE_LIBFTDI, 1, [Define if you have libftdi])
HAVELIBFTDI=yes
],[
AC_MSG_WARN([*** libftdi not detected. No support for FTDI-based USB JTAG cables via libftdi.])
])
],)
AS_IF([test "x$HAVELIBFTDI" == "xyes"],[
AM_CONDITIONAL(HAVE_LIBFTDI, true)
],[
AM_CONDITIONAL(HAVE_LIBFTDI, false)
])
dnl check for libusb-config
@ -190,6 +160,39 @@ AS_IF([test "x$HAVELIBUSB" == "xyes"],[
])
dnl Use FTDI library?
AC_ARG_WITH([libftdi],
[AS_HELP_STRING([--with-libftdi],
[use libftdi for FTDI-based cables])],
[], [with_libftdi=check])
AS_IF([test "x$with_libftdi" != xno], [
AS_IF([test "x$with_libftdi" != xyes -a "x$with_libftdi" != xcheck], [
CFLAGS="$CFLAGS -I$with_libftdi -L$with_libftdi"
LIBS="$LIBS -lftdi"
],[
AC_PATH_PROG(LIBFTDI_CONFIG, libftdi-config, no)
AS_IF([test "$LIBFTDI_CONFIG" != "no"],[
LIBS="$LIBS `$LIBFTDI_CONFIG --libs`"
CFLAGS="$CFLAGS `$LIBFTDI_CONFIG --cflags`"
],)
])
AC_CHECK_FUNC([ftdi_usb_open], [
AC_DEFINE(HAVE_LIBFTDI, 1, [Define if you have libftdi])
HAVELIBFTDI=yes
],[
AC_MSG_WARN([*** libftdi not detected. No support for FTDI-based USB JTAG cables via libftdi.])
])
],)
AS_IF([test "x$HAVELIBFTDI" == "xyes"],[
AM_CONDITIONAL(HAVE_LIBFTDI, true)
],[
AM_CONDITIONAL(HAVE_LIBFTDI, false)
])
dnl Use FTDI ftd2xx library?
AC_ARG_WITH([ftd2xx],

Loading…
Cancel
Save