Use of pkg-config

Phil Pennock gnupg-devel at spodhuis.org
Wed May 14 20:42:59 CEST 2014


On 2014-05-14 at 17:20 +0200, Werner Koch wrote:
> pkg-config is mess because it is not based on standard Unix tools but
> introduces extra dependencies.  The idea behind ./configure is to be
> able to run the build process on an arbitrary Unix box without extra
> dependencies. pkg-config introduces such extra dependencies because of
> itself and - even worse - because it depends on glib.
> 
> Yes, I am talking about generic Unix systems.  There are still other
> systems in active use than Linux, Windows, and MacOS.  Those systems
> don't come with pkg-config or glib installed as standard tools.  They
> don't come with GNU make but with a standard make.  This is why we need
> most of the configure stuff.
> 
> pkg-config makes sense for projects like GNOME and KDE where it is part
> of their framework.

FreeBSD Ports includes "pkgconf", written from scratch to have few
dependencies, after pkg-config switched to requiring pkg-config to build
pkg-config.

FWIW, the idea of template files is sane, and so is making life easier
where the tools are available to do so.  Thus I switched the Exim build
system so that while you _can_ still modify the includes and library
paths to explicitly link various libraries, you can also just say
"AUTH_GSASL_PC=libgsasl" and the build framework will use
`pkg-config --cflags libgsasl` for finding these arguments
automatically.  The results still go into the same place.  It just makes
it easier to adapt for various platforms.  By providing commented-out
examples for each module, we make life easier for the porters/packagers
who have pkg-config or are willing to depend upon it, while still
letting anyone and everyone do things the long way around.  The results
plumb into the same configuration variables which would be set by doing
things the long way, so if we break the long way around, we also break
pkg-config -- we don't risk rot.

I think _requiring_ pkg-config is a mistake, you're completely right.

Being able to _optionally_ use pkg-config, if it's available, to make
life easier, is worth considering.
-- 
My employer, Apcera Inc, is hiring sysadmin; primarily San Francisco:
 http://www.apcera.com/jobs/#operations-engineer
(but all the mistakes in this email are made in my personal capacity)



More information about the Gnupg-devel mailing list