[Top][All Lists]

[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 12:00:45 -0600 (CST)

On Sat, 6 Mar 2004, Werner LEMBERG wrote:
> >
> > 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.
> Do you have sample code from a package to do that?

I have seen it done before, but I forget which package did it.  The
information is in the dependency_libs definition in the .la file.
Note that this information is highly detailed since it may also
include libraries which are implicitly provided by the compiler.
Additional library .la files may be listed, which would need to be
recursively parsed/expanded to add additional dependencies.

> > > > 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.
> Any alternative?

pkg-config (there is a gnome-related package called 'pkg-config')
seems to be somewhat better than concatenating the output of
`foo-config' shell scripts.  Libtool itself does best for the linking
part (i.e. just use libtool to link), but it doesn't help at all for
preprocessor definitions, include paths, and compiler options.

There is still no perfect tool.

Bob Friesenhahn

reply via email to

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