bug-libtool
[Top][All Lists]
Advanced

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

Re: rpath problems


From: Bob Friesenhahn
Subject: Re: rpath problems
Date: Sat, 6 Mar 2004 09:53:02 -0600 (CST)

On Wed, 3 Mar 2004, Werner LEMBERG wrote:

>
> 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.

It is not really necessary to configure the '--libs' options in the
configure script since the foo-config script can obtain these by
parsing the installed libfoo.la file at run-time.

> > 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.

It is rare that foo-config scripts get "compilation and linking flags
right" since they make gross assumptions in a very naive way which are
likely to cause problems.  Mixing circles and squares together in a
big pot doesn't result in a pot of octagons.

Bob

> >
> > 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?
>
>
> _______________________________________________
> Bug-libtool mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-libtool
>

======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen





reply via email to

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