libtool
[Top][All Lists]
Advanced

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

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


From: Gary V. Vaughan
Subject: Re: I still do not know how to use -rpath with libtool+automake
Date: Mon, 21 Feb 2005 12:08:57 +0000
User-agent: Mozilla Thunderbird 0.9 (X11/20041103)

Hallo Bruce!

Cc:ing automake list incase I need to be corrected here...

Bruce Korb wrote:
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.

Automake generates the -rpath flags for libtool automagically, so you
shouldn't try to add your own.  The key is in how the libraries are linked,
and whether they too have .la files:

i) if you use ../lib/libfoo.la to link a library in your local tree, automake
will set the -rpath up and generate a wrapper script to do what you want.

ii) if you use -L/path -lfoo, and there is a /path/libfoo.la, automake will
still do what you want in the build tree, but libtool doesn't relink correctly
at installation time on platforms that need it (HP and AIX IIRC).

iii) if you use -L/path -lfoo but there is no /path/foo.la, then I think
libtool might mess up the -rpath and end up pulling in the wrong library in
the build tree runtime, and possibly install a program not able to find
/path/libfoo.so at runtime.

In short, you want (i) for libs in the build tree, and to get that use:

   prog_LDADD = ../lib/libfoo.la

HTH,
        Gary.
-- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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