[gnutls-dev] Re: pkg-config support for opencdk

Simon Josefsson jas at extundo.com
Fri Aug 18 10:34:24 CEST 2006

Andreas Metzler <ametzler at downhill.at.eu.org> writes:

> On 2006-08-08 Simon Josefsson <jas at extundo.com> wrote:
> [...]
>> Agreed, and the gnutls*-config scripts are even more deprecated than
>> the pkg-config approach.  Maybe we should remove them in 1.5.0 to make
>> sure people stop using them.
> [...]
> Hello,
> They currently look like the official way to get the info, as the
> included autoconf macros use them.

Yes, I know.

> - Could these macros seamlessly be replaced with better versions, or
> is there no way against requiring people to update their
> configure.ac scripts?

It should be possible.  However, I'm not sure what the best solution

1) libgnutls-config 

2) pkg-config

3) Bruno's lib-link.m4 macros.

There are advantages and disadvantages with all.

Bruno's macro is what I prefer, but the disadvantage there is that the
macro requires the 'config.rpath' script.  Not all applications have
that script, and copying both a libgnutls.m4 and a config.rpath may be
a bit complicated.  Maybe this is a small price to pay?

Pkg-config has the problem that it adds another dependency, and it
seems unclear (to me, not being a pkg-config expert) whether
pkg-config does the right thing for libtool, cross-compilation, and
various platform behaviours (-rpath, -Wl,-rpath, -R, etc).  At the
least, it seems that a new libgnutls.m4 could use pkg-config, but
additionally try to link with the library, to check that it works,
before using it.  This will help when cross-compiling; e.g., it won't
automatically try to use a i386-linux library when you build for

libgnutls-config is a maintenance problem, but not really a huge
problem, the scripts have only been touched a few times in several
years.  The current design seems to have the same problems as
pkg-config, though.

I think we should try to solve this in 1.5.x, before 1.6.


More information about the Gnutls-devel mailing list