pkg-config search path

Owen Taylor otaylor at redhat.com
Thu Sep 25 00:19:10 EEST 2003


On Wed, 2003-09-24 at 16:50, Keith Packard wrote:
> Around 15 o'clock on Sep 24, Owen Taylor wrote:
> 
> > But there are some cases where you have packages that are architecture
> > independent that you want to have .pc files for. An example being
> > the 'gtk-doc' perl scripts.
> 
> So how about if pkg-config uses the following default search path:
> 
> 	/usr/lib/pkgconfig
> 	/usr/lib/X11/pkgconfig
> 	/usr/share/pkgconfig

Not /usr/X11R6/lib/pkgconfig? Where does XFree86 put it's .pc files
currently?

Including the X11/X11R6 path by default sounds reasonable for /usr
installs, I don't think it should be done for installs into an
arbitrary prefix.

> Then, we can ammend that path from /etc/pkgconfig.conf and further ammend 
> the path with PKG_CONFIG_PATH

/etc/pkgconfig.conf (pkg-config.conf?) should replace, instead of
augmenting, IMO.

For PKG_CONFIG_PATH there is the question of whether we want to
make people specify

 /my/prefix/lib:/my/prefix/share

explicitly or whether we want to allow some abbreviation of that.
(Is the complexity and confusion worth the gain?)

> What about /usr/lib64?  What about /usr/local/lib?

For /usr/lib64 that should be covered by making the defaults
include $libdir and $datadir instead of a hardcoded $prefix/lib,
$prefix/share.

There is something of an issue here for multi-architecture platforms
(like x86_64, ppc64) that /etc/pkgconfig.conf should be architecture
dependent. One possibility is to look first for

 /etc/pkg-config/x86_64-redhat-linux/pkgconfig.conf

then for 

 /etc/pkg-config/pkgconfig.conf

Another possibility would be to try and handle it with substitutions,
e.g. to be able to put $libdir into your pkgconfig.conf.

/usr/local/lib should be left up to the person configuring the
system in my opinion. 

<digression>
I used to install lots of stuff into /usr/local, over time I've come to
consider it to be:

 The place where the old version of GLib that's breaking this 
 bug reporters GTK+ build lives
</digression>

Regards,
						Owen





More information about the xdg mailing list