Duane> --with-ftd2xx-win32-zipdir
Duane> --with-ftd2xx-linux-tardir
Dirk> Could you tell what is the different functionality? Would help to
better align our discussion ;)
In the case of the "zip" file - it is quite simple, this adds a "-I"
option and a "-L" and '-l<name>' option as needed.
In the case of the "tar" file - the ".h" is simple.
In the case of the "tar" file - the "libfile" is another matter.
there is no directly findable "libfile" - in the standard way, ie:
"-llibftd2xx" - will not work.
Why? because the filename in both cases is decorated with
".(so|a).X.Y.Z"
And may exist in other directories.
(a) From a forward looking point of view, I need to look for the
version number
and ensure it that it is reasonably present - and of a greater
number ... then ?Something?
and convert that to an actual file that is linked
verses a library that GCC/LD see as "a library" - recognizable with
"-l"
(b) Secondly, I have to add the "-Wl,-rpath,<DIRNAME>" if we choose
to use the .SO file.
Otherwise - well - openocd will not find the file when you run it.
It will link - due to the "-L", but not *FIND* due to missing '-rpath'
In *BOTH* cases, the configure script needs to compile & link and run a
test program against the library.
Compiling is not sufficient - because while the user may have specified
a "-L" that finds the SO file during link, it may not find the .SO
during run time due to other misconfiguration, hence when you have a
'non-installed' configuration one must specify the "-rpath" @ compile
time, or run with LD_LIBRARY_PATH - that gets uglier by the second.
Sure, in the end, the two "linux-tardir" and "win32-zipdir" are "do the
same sort of thing" but the "linux-tardir" has to do quite a bit more.
I am also quite concerned about cryptic messages when users do not
./configure correctly. In my view - the name "-win32-" or "-linux-"
should sort of blink like neon lights in their face that the option only
applies to a specific platform. (maybe i am overly hopeful somebody
will actually figure that out it)
----
All of this is in contrast to "libftdi" - which - if the "--prefix"
and/or "--exec-prefix" is non-standard... ie: like you and I do things -
on linux I need to add "-rpath".
Not sure about Win32.
-Duane.
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development