Hi,
I have two libraries in paths that are not searched by default (e.g.
/opt/foo/lib). So I have this in my pkgconfig files:
foo.pc: Libs: -L${libdir} -lfoo
bar.pc: Libs: -L${libdir} -lbar
The linker will find -lfoo,-lbar and successfully create the output file
-- which is an .la library --, but running `ldd` on it says
"libfoo.so.0 => not found", and that seems fine to me, since no -rpath
was given. So I try to add -rpath in the pkgconfig files:
foo.pc: Libs: -L${libdir} -rpath ${libdir} -lfoo
bar.pc: Libs: -L${libdir} -rpath ${libdir} -lbar
Then unfortunately, libtool complains with
libtool: link: warning: ignoring multiple `-rpath's for a libtool
library
The Makefile.am line is just:
lib_LTLIBRARIES = baz.la
baz_la_LDFLAGS = -avoid-version -module ${libfoo_LIBS} ${libbar_LIBS}
with ${lib*_LIBS} being mapped to the pkgconfig parts, respectively.
How would I achieve what I am trying here? (Possibly without using
non-portable linker flags or workarounds like -Wl,-rpath,${libdir} -- I
seem to remember Solaris ld does not like -rpath at all and wants -R
instead.)
thanks,
Jan
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool