libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I still do not know how to use -rpath with libtool+automake


From: Bruce Korb
Subject: I still do not know how to use -rpath with libtool+automake
Date: Sun, 20 Feb 2005 14:34:14 -0800
User-agent: KMail/1.7.1

Hi,

This should be really simple.  I find it extraordinarily difficult.
I have a project that has a library and an executable.  When I
run the executable, it needs to get externals resolved against
the library in the build tree, not the installed version.  So far,
my various attempts break things in one way or another.  Usually,
I do not see problems, because the installed library is sufficient
for my test environment.

In order to work, libtool must be given the -rpath option at
link time.  If I put ``-rpath $(libdir)'' into the LDFLAGS
automake variable for the program, I still do not get the effect
I need.  If I put it in LDADD, I get complaints.  If I use
``-Wl,-R$(libdir)'' then the installed library shows up too soon.
If I leave this stuff off, then the build executable has to have
LD_LIBRARY_PATH set in order to function properly.

OK.  That's what is frustrating.  Here's what I want:

I would very much like to know exactly what strings to put into which
Automake variables in order to have the build tree variation of
my program find the build tree variation of the library and then have
the installed version of the program find the installed library
*WITHOUT* having to resort to manual intervention with LD_LIBRARY_PATH.

If this is documented in the .texi manual, then it seems to not be
indexed in a way I can find it.  It may be because the Automake manual
does not cover libtool very well and, conversely, libtool doesn't cover
the Automake usage very well.

So, summarized again slightly differently:  I understand how to invoke
libtool to create a shell script wrapped executable that finds the right
library.  I do not understand how to tell Automake to do the same thing.
Thank you for your kind help.  - Bruce





reply via email to

[Prev in Thread] Current Thread [Next in Thread]