autoconf
[Top][All Lists]
Advanced

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

Re: pkg-config wisdom


From: Alfred M. Szmidt
Subject: Re: pkg-config wisdom
Date: Sat, 24 Oct 2009 09:28:10 -0400

   > 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
flexible.

   > 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 configure.ac 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.




reply via email to

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