Dmitry Katsubo <dma_k@mail.ru> writes:
> The first problem I faced is that it is difficult to explore what should
> be the list of libraries for static linking (as I have to provide the
> list of libraries which are direct dependencies as well as indirect). I
> know this problem is solved with libtool (which consumes the information
> from *.la) and with pkg-config (which consumes the information from
> *.pc). The problems I faced:
> * General question. What is the current trend: to use libtool or
> pkg-config? For me it is easier to use pkg-config CLI, rather then
> re-write autoconf scripts to fit libtool ideology (maybe I don't need
> to, fixme).
pkg-config is much superior to libtool, since libtool includes all the
libraries on dynamic links as well, which creates unwanted shared library
dependencies and causes other problems. Because of that, the trend in
Debian is to empty that information from libtool *.la files or not ship
them at all, making them useless for static linking information.
> * Some libraries (e.g. GraphicsMagick) does not provide the list of
> libraries for statis linking via .pc (compare 'pkg-config --static
> --libs GraphicsMagick++' and 'GraphicsMagick++-config --libs'). Should
> it be fired as a bug for GraphicsMagick package?
I think it's reasonable to consider that a bug, although it's probably a
minor one and it may be closed wontfix if the GraphicsMagick maintainers
aren't interested in supporting static linking. (A lot of upstreams just
don't care about static linking and aren't willing to support it.)
> * Some libraries (e.g.) do not follow the agreement for .NET/CLI
> (http://pkg-mono.alioth.debian.org/cli-policy/ch-packaging.html#s-pkg-config-file)
> which I think is also good to follow for common libraries:
> - xfprint4-4.6.1 package contains xfprint-1.0.pc (expected: xfprint4.pc
> or xfprint4.pc -symlink-> xfprint4-4.6.1.pc)
> - libxml2-dev package contains libxml-2.0.pc (expected: libxml2.pc or
> libxml2.pc -symlink-> libxml2-2.7.7.pc)
Er, what does an agreement for .NET/CLI have to do with pkg-config files
for libraries written in C? I don't see any relevance of that packaging
documentation to the libraries you list.
The pkg-config configuration file name is not, in general, going to be
determinable from the Debian package name.
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>