Zach Welch a écrit :
> Is it just me, or is there a missing ' ' in your indentation?
> Things don't appear to line up right in the patch for me...
Not too sure where you see the space missing. Can you be more precise?
> Otherwise, it looks good! Minor nits below.
>> + if test "$FTDILIBS" = ""; then
>
> 'test -z "${FTDILIBS}"' would sufficient and idiomatic. Yah?
Agreed.
>> + fi;
>
> Drop the superfluous semicolon.
Ok.
>> + if test "$FTDILIBS" != ""; then
>
> As above, but simply 'test "${FTDILIBS}"' or 'test -n'.
Also agreed. New patch, with good-practice comments added. If spacing
issues are still there, I'll re-email it through git send-email to make
sure.
Signed-off-by: Albert Aribaud <[email protected]>
---
configure.in | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/configure.in b/configure.in
index 81e4326..755f762 100644
--- a/configure.in
+++ b/configure.in
@@ -930,8 +930,21 @@ 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.
+ # try libftdi-config first
+ FTDILIBS=`libftdi-config --libs`
+ FTDICFLAGS=`libftdi-config --cflags`
+ # if libftdi-config failed, try pkg-config
+ if test -z "$FTDILIBS"; then
+ FTDILIBS=`pkg-config --libs libftdi`
+ FTDICFLAGS=`pkg-config --cflags libftdi`
+ fi
+ # if anything succeeded, add libs and flags
+ if test -n "$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
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development