Dirk Behme wrote:
Duane Ellis wrote:
Patch is not attached [it would be rather large] and - documentation
has been updated.
====================================
Overview of changes:
1) I have added support to help deal with issues with "ftd2xx" - on
Win32, and Linux, and libftdi.
2) In the 'testing' directory, I have added some makefiles that I used
to build OpenOCD through a variety of permutations.
(( should perhaps add more permutations, contributions are welcome ))
see: ${OPENOCD}/testing/build.test1
Some details are below.
-- Duane.
====================================
This ./configure option has been removed:
--with-ftd2xx=<PATH>
And has been replaced with:
--with-fd2xx-linux-tardir=<PATH>
SVN revison 1282:
This doesn't seem to work. Regardless of
./configure --enable-ft2232_ftd2xx
--with-fd2xx-linux-tardir=<path_to>/libftd2xx0.4.16/
or
./configure --enable-ft2232_ftd2xx
--with-fd2xx-linux-tardir=<path_to>/libftd2xx0.4.16/static_lib/
I get
checking for libftd2xx.a (linux)... configure: error: The (linux) ftd2xx
library from FTDICHIP.com is linux only. Try --enable-ft2232-libftdi
instead
I'm on Linux.
> pwd
<path_to>/libftd2xx0.4.16
<path_to>/libftd2xx0.4.16> ls libftd2xx.so.0.4.16
libftd2xx.so.0.4.16
<path_to>/libftd2xx0.4.16> ls static_lib/
libftd2xx.a.0.4.16
--with-ftd2xx-win32-zipdir=<PATH>
Details are in the user manual.
A new option has been added that is applicable to LINUX Only.
--with-ftd2xx-lib=static [the default]
or --with-ftd2xx-lib=shared [not default]
I would prefer shared to be default.
====================================
Documentation for the build test case1 is located in:
${openocd}/testing/build.test1/README.TXT
====================================
END
====================================
Due to missing --prefix handling, --enable-ft2232_libftdi is more broken
now as before. It now stops already at configure time:
> ./configure --prefix=<path> --enable-ft2232_libftdi
...
checking Build & Link with libftdi...... configure: error: Cannot build
& run test program using libftdi
Patch in attachment fixes both libftdi and libftd2xx build for me
under Linux.
Not sure if this is correct configure syntax and why my $host_os is
'linux' without '-gnu', though.
Best regards
Dirk
* For libftd2xx make new new host_os detection work if $host_os is only 'linux'
* For libftdi add path given by --prefix to CFLAGS and LDFLAGS
Signed-off-by: Dirk Behme <[email protected]>
---
configure.in | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
Index: trunk/configure.in
===================================================================
--- trunk.orig/configure.in
+++ trunk/configure.in
@@ -42,7 +42,7 @@ then
# use build specific install library dir
LDFLAGS="$LDFLAGS -L$libdir"
# RPATH becomes an issue on Linux only
- if test $host_os = linux-gnu
+ if test $host_os = linux-gnu || $host_os = linux;
then
LDFLAGS="$LDFLAGS -Wl,-rpath,$libdir"
fi
@@ -487,7 +487,7 @@ if test $build_ft2232_ftd2xx = yes ; the
AC_MSG_CHECKING([for libftd2xx.a (linux)])
# Must be linux -
# Cause FTDICHIP does not supply a MAC-OS version
- if test $host_os != linux-gnu; then
+ if test $host_os != linux-gnu && test $host_os != linux; then
AC_MSG_ERROR([The (linux) ftd2xx library from FTDICHIP.com is linux
only. Try --enable-ft2232-libftdi instead])
fi
# Are we given a TAR directory?
@@ -580,6 +580,15 @@ if test $build_ft2232_libftdi = yes ; th
# We assume: the package is preinstalled in the proper place
# these present as 2 libraries..
LIBS="$LIBS -lftdi -lusb"
+
+ # If option exist
+ if test -d $prefix
+ then
+ # use build specific install library dir
+ LDFLAGS="$LDFLAGS -L$prefix/lib"
+ # us build specific install include dir
+ CFLAGS="$CFLAGS -I$prefix/include"
+ fi
#
# Try to build a small program.
AC_MSG_CHECKING([Build & Link with libftdi...])
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development