libtool
[Top][All Lists]
Advanced

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

Re: foo-config scripts and removed .la files


From: Russ Allbery
Subject: Re: foo-config scripts and removed .la files
Date: Sun, 20 May 2012 11:39:33 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Werner LEMBERG <address@hidden> writes:

> My question is how to handle this properly.  Shall the logic to test for
> the existence of the .la in the foo-config file or in the configuration
> script which actually uses foo-config?  And what exactly should be done
> if no .la file is available?  I suppose it's best to fall back to the
> standard foo-config option `--libs'.

If there is no *.la file available, that almost certainly means that
you're on a platform where transitive shared library dependencies work
properly (since that's the motivating reason for dropping the *.la files).
I would therefore check in your configure script whether the *.la file you
got from the --libtool option exists, and, if not, simply link directly
with only the library you're using (-lfreetype, for instance) and assume
everything will work.  That of course doesn't work if you want to do
static linking, but platforms dropping the *.la files are normally making
a conscious decision to not support static linking anyway.

I would also encourage any library maintainer who is providing a *-config
script to also provide a pkgconfig file, since pkgconfig addresses the
issue that is causing distributions to drop the *.la files and they're
becoming more and more widespread beyond their initial community and are
well-supported in Autoconf.  Although that doesn't address your immediate
issue.

-- 
Russ Allbery (address@hidden)             <http://www.eyrie.org/~eagle/>



reply via email to

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