(apologies, David, for the private-only mail)

David Brownell a écrit :
> On Friday 04 December 2009, Albert ARIBAUD wrote:
>> While at it, the OpenOCD configure.in should use pgk-config or 
>> libftdi-config to find out the current LIBFTDI libs and CFLAGS, 
>> especially the include path.
> 
> 
> Feel free to craft that patch.  :)

:) Here comes:

Signed-off-by: Albert Aribaud <albert.arib...@free.fr>
---
  configure.in |   14 ++++++++++++--
  1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/configure.in b/configure.in
index 81e4326..7b1d528 100644
--- a/configure.in
+++ b/configure.in
@@ -930,8 +930,18 @@ fi

  if test $build_ft2232_libftdi = yes ; then
    # We assume: the package is preinstalled in the proper place
-  # these present as 2 libraries..
-  LIBS="$LIBS -lftdi -lusb"
+  # and the libs and C Flags are available via libftdi-config
+  # or pkg-config.
+  FTDILIBS=`libftdi-config --libs`
+  FTDICFLAGS=`libftdi-config --cflags`
+  if test "$FTDILIBS" = ""; then
+    FTDILIBS=`pkg-config --libs libftdi`
+    FTDICFLAGS=`pkg-config --cflags libftdi`
+  fi;
+  if test "$FTDILIBS" != ""; then
+    LIBS="$LIBS $FTDILIBS"
+    CFLAGS="$CFLAGS $FTDICFLAGS"
+  fi
    #
    # Try to build a small program.
    AC_MSG_CHECKING([Build & Link with libftdi...])
-- 
1.6.4.4



Amicalement,
-- 
Albert.

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to