[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rpath problems
From: |
Werner LEMBERG |
Subject: |
Re: rpath problems |
Date: |
Wed, 03 Mar 2004 23:28:48 +0100 (CET) |
I've sent the mail below to the bug-libtool list, without any reply.
So I send it again, this time to the libtool list.
Werner
======================================================================
> Assume that a library is built with --enable-shared, and that libtool
> isn't used for linking later on. Today it is common that a library
> `foo' provide its own `foo-config' script to get the necessary
> compilation and linking flags right.
>
> Now consider the command `foo-config --libs'. Besides giving the
> arguments to -L it makes sense IMHO to give arguments to --rpath (or
> -R, depending on the platform) also. Unfortunately, it seems there
> is no documented way to pass the necessary information.
>
> Currently, I have the following in my configure.ac script:
>
>
> AC_PROG_LIBTOOL
> # urgh -- these are internal libtool variables...
> AC_SUBST([enable_shared])
> AC_SUBST([hardcode_libdir_flag_spec])
> AC_SUBST([wl])
>
>
> and the following code in my foo-config file:
>
>
> ...
> address@hidden@
> address@hidden@
> hardcode_libdir_flag_spec='@hardcode_libdir_flag_spec@'
> ...
>
> rpath=
> if test "$enable_shared" = "yes" ; then
> eval "rpath=\"$hardcode_libdir_flag_spec\""
> fi
> libs=-L$libdir $rpath -lfoo
>
>
> Is there something better available?
- Re: rpath problems,
Werner LEMBERG <=