On 5/19/19 12:14 AM, Bruno Haible wrote:
Here's the relevant documentation:
https://www.gnu.org/software/gnulib/manual/html_node/Searching-for-Libraries.html#Locating-Libraries
Thanks, I am busy testing `AC_LIB_LINKFLAGS' now. The fact that it
modifies CPPFLAGS and adds `rpath' when necessary is great.
However, from the outputs of `make', I noticed that it doesn't use
`LTLIB<NAME>' (which contains the `-L' option for the library's directory).
As a result on a system with two versions of a library, compilation
passes with the proper version of the library header (when using the
correct `-I' with the updated `CPPFLAGS'). However, during linking, it
links with the wrong version and we get a crash with a linking error.
How can I get the `-L<LIB_PATH>' part of `LTLIB<NAME>' into LDFLAGS?
I am thinking of adding a loop manually in `configure.ac' to do this for
all the libraries I need, but before that, I am confused why
`LTLIB<NAME>' isn't being used by libtool as suggested in the Gnulib
manual: "The macros also set a variable LTLIB<NAME>, that should be used
when linking with libtool."
Thanks a lot,
Mohammad