Werner LEMBERG <w...@gnu.org> 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 (r...@stanford.edu)             <http://www.eyrie.org/~eagle/>

_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool

Reply via email to