[gnutls-dev] Re: pkg-config support for opencdk
ametzler at downhill.at.eu.org
Mon Aug 7 20:24:14 CEST 2006
On 2006-08-07 Simon Josefsson <jas at extundo.com> wrote:
> Andreas Metzler <ametzler at downhill.at.eu.org> writes:
> > attached a simple patch for adding pkg-config support to opencdk.
> > cu andreas
> Hi, I took your e-mail as a suggestion to implement this, and have
> installed this in CVS now.
Splendid. Thank you.
> Btw, I'd recommend people to use standard autoconf-mechanisms to find
I did provide this as the current *m4 tests shipped in the gnutls
software are problematic. They use foo-config to get the needed
dependency libs and CFLAGS and foo-config is not smart enough. For
example libgnutls-config --libs generates this output:
-L/usr/lib -lgnutls -L/usr/lib -ltasn1 -lgcrypt -lgpg-error
However on many systems (Linux, the Hurd, ...) it is not necessary to
link indirect dependencies when doing symbolic linking. i.e. if you use
gnutls-functions this will be enough
gcc -lgnutls -o foo foo.c
there is no need to link against -ltasn1 -lgcrypt -lgpg-error, the
symbolic linker will handle these just fine at run-time.
This unnecessary linkage hurts us (Debian), because dependency cycles
get a lot bigger than necessary. The greater part of gnome will link
against libtasn although only gnutls functions are used, and if tasn
changes its soname we will need to rebuild a 100 times the packages
than actually necessary (and until that has happened the yet
not-rebuilt ones link against two versions of libtasn).
pkg-config can solve this problem because knowledge about whether
direct linking of dependency libs is necessary is built in,
the output of "pkg-config --libs gnutls" differs in between "broken"
and other systems.
> because pkg-config doesn't work for cross-compilation,
I actually do not know whether this is true, i.e. whether
pkg-config --libs foo
will work in scenarios where
works. I fail to come up with such a szenario at short time however,
and googling seems to suggest that crosscompilation of pkg-config
using software is possible.
> and it also breaks the standard autoconf-approach of testing for
You can use pkg-config to find the library and then use the standard
tests. I am just arguing that pkg-config might do a better job than the
thanks for listening, cu andreas
The 'Galactic Cleaning' policy undertaken by Emperor Zhark is a personal
vision of the emperor's, and its inclusion in this work does not constitute
tacit approval by the author or the publisher for any such projects,
howsoever undertaken. (c) Jasper Ffforde
More information about the Gnutls-devel