move libusb/libftdi linking out of global LIBS and into specific binaries LIBADD to avoid unnecessary linking in other apps

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1915 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 14 years ago
parent a03c13d1d3
commit 6487fb2c72

@ -5,6 +5,11 @@
* configure.ac: Use AS_VAR_APPEND rather than touching the var directly.
* configure.ac: Do not add libusb/libftdi to LIBS directly as these are
used for all libs/apps in the tree, and we only want to use these with
specific ones. Export LIBFTDI_LIBS/LIBUSB_LIBS to Makefile.am files.
* src/Makefile.am: Use new LIBFTDI_LIBS/LIBUSB_LIBS in liburjtag.la LIBADD.
2011-06-23 Mike Frysinger <vapier@gentoo.org>
* src/cmd/Makefile.am: Tweak dependencies so things work from a fresh

@ -181,6 +181,7 @@ AC_ARG_WITH([libusb],
[with_libusb=detect])
HAVELIBUSB=no
LIBUSB_LIBS=
AS_IF([test "x$with_libusb" != xno], [
AS_IF([test "x$with_libusb" != x0.1 -a \
"x$with_libusb" != x1.0 -a \
@ -209,9 +210,9 @@ AS_IF([test "x$with_libusb" != xno], [
AC_DEFINE(HAVE_LIBUSB, 1, [Define if you have libusb])
])
])
AS_VAR_APPEND([LIBS], " $LIBUSB_LIBS")
AS_VAR_APPEND([CPPFLAGS], " $LIBUSB_CFLAGS")
])
AC_SUBST(LIBUSB_LIBS)
AM_CONDITIONAL(HAVE_LIBUSB, [test "x$HAVELIBUSB" != "xno"])
@ -223,6 +224,7 @@ AC_ARG_WITH([libftdi],
[], [with_libftdi=check])
HAVELIBFTDI=no
LIBFTDI_LIBS=
AS_IF([test "x$with_libftdi" != xno], [
save_LIBS=$LIBS
save_CPPFLAGS=$CPPFLAGS
@ -245,7 +247,6 @@ AS_IF([test "x$with_libftdi" != xno], [
HAVELIBFTDI=yes
],[
AC_MSG_WARN([*** libftdi not detected. No support for FTDI-based USB JTAG cables via libftdi.])
LIBS=$save_LIBS
CPPFLAGS=$save_CPPFLAGS
])
AC_CHECK_FUNC([ftdi_read_data_submit], [
@ -255,7 +256,9 @@ AS_IF([test "x$with_libftdi" != xno], [
AC_DEFINE(HAVE_LIBFTDI_ASYNC_MODE, 1, [Define if libftdi support async mode])
HAVELIBFTDI_ASYNCMODE=yes
])
LIBS=$save_LIBS
])
AC_SUBST(LIBFTDI_LIBS)
AM_CONDITIONAL(HAVE_LIBFTDI, [test "x$HAVELIBFTDI" = "xyes"])
AM_CONDITIONAL(HAVE_LIBFTDI_ASYNC_MODE, [test "x$HAVELIBFTDI_ASYNCMODE" = "xyes"])

@ -65,7 +65,9 @@ liburjtag_la_LIBADD = \
pld/libpld.la \
global/libglobal.la \
-lm \
$(LIBFTDI_LIBS) \
@FTD2XXLIB@ \
$(LIBUSB_LIBS) \
@LIBINTL@
if ENABLE_SVF

Loading…
Cancel
Save