[Top][All Lists]

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

Re: pkg-config wisdom

From: Russell Shaw
Subject: Re: pkg-config wisdom
Date: Sun, 25 Oct 2009 00:46:51 +1100
User-agent: Mozilla-Thunderbird (X11/20090701)

Alfred M. Szmidt wrote:
   > pkg-config tries to solve an important problem, but it does so in the
> wrong way. pkg-config checks for an exact library name,
   PKG_CHECK_MODULES does not check for a library name at all,
   but for the name of the .pc file.  This gives the administrator
   one extra level of indirection.

The .pc file specifies the library name, so my point stands.  A user
cannot modify the .pc files, so it makes it hard to modify that file
for a user without setting PKG_CONFIG_PATH or similar, in which case
you are back to square one with CFLAGS/LDFLAGS which are far more

   > optionally exact version numbers.  A similar library can exist with
   > the same API, but with different name and version, in which case any
   > checks done by PKG_CHECK_* during configure will fail.

   Only if the author of uses the option to check for
   a version number.  PKG_CHECK_MODULES can be used without
   an explicit version number check, and many people do
   explicit version number checks without pkg-config, so this
   is not a compelling argument against pkg-config.

Which will break things silently if things are changed in the API from
one version to another.  Checking for the features you need will never
break, since you are checking for the behaviour you want/need.

pkg-config is simply broken in far to many ways.


I regard pkg-config as useful only for one-off libraries that have
no generic substitutes, and for this purpose i haven't figured out
any problems.

reply via email to

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