[Top][All Lists]
[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: |
Bruce Korb |
Subject: |
Re: I still do not know how to use -rpath with libtool+automake |
Date: |
Mon, 21 Feb 2005 08:50:47 -0800 |
User-agent: |
KMail/1.7.1 |
On Monday 21 February 2005 04:08 am, Gary V. Vaughan wrote:
> Hallo Bruce!
>
> Cc:ing automake list incase I need to be corrected here...
> 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
Hi Gary!!
YES! That explains all the symptoms I've been hassling over. The deal is
is that I ship autoconf macros for using the autoopts library. Rather than
have a duplicate, essentially identical second set, I leverage off of these
for configuring the autogen build. Ah, silly me. I've got to rejigger the
macros to emit ``-L/path -lopts'' only for configuring autoopts client programs
*other* than autogen. Thank you again!!
Regards, Bruce