[Top][All Lists]

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

pkg-config and static builds

From: Werner LEMBERG
Subject: pkg-config and static builds
Date: Mon, 03 Mar 2014 06:14:53 +0100 (CET)


it seems it has been already discussed that libtool should use a
different set of link flags if compiling a static library, especially
for libraries that come without a corresponding `.la' file, cf. this

Such a feature would be useful in combination with `pkg-config', which
has the `--static' command line option to give such a different set.

What's the current state?  As an example, let's assume that my library
uses libpng.  If I'm going to statically link to it, I need to add
`-lz' and `-lm'.  From where do I get this information for static
linking if I want to use libtool for building my own library?  I've
read that it would be better to not specify `-lz' and `-lm' while
building a shared library to avoid built-in references.

I know that `pkg.m4' currently has no support for `--static' either
(which is a bug, I think), but calling pkg-config manually is not
rocket science...


reply via email to

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