Some packages, such as the gtk-doc perl scripts, are architecture
independent, yet have .pc files. For such packages, the .pc files
should be in $datadir, not in $libdir.
One concrete problem with not putting them into $datadir is that
you can't make architecture independent packages with files in
$libdir, since $libdir can be different for different architectures ...
for instance /usr/lib64 versus /usr/lib.
The main problem that arises here is the interpretation of
PKG_CONFIG_PATH ... it's a bit annoying to have to list each prefix
in PKG_CONFIG_PATH; maybe we could do something like:
and have that automatically expand to:
Created attachment 62 [details] [review]
Add PKGDATADIR to default search path
2005-03-18 Tollef Fog Heen <email@example.com>
* main.c (main): Use add_search_dirs for both the compile-time
defined pc_path and the run-time defined PKG_CONFIG_PATH.
* pkg.h: Add prototype for add_search_dirs.
* pkg.c (add_search_dirs): Add new function which takes a
delimiter-separated list as input and add_search_dir's it.
(package_init): Remove knowledge about which dirs should be
initially added. Moved this to main.c(main)
* ChangeLog: Add emacs variables to set the date to this
ChangeLog's standard format
* Makefile.am (INCLUDES): Pass PKG_CONFIG_PCPATH on to main.c
* configure.in: Add --with-pc-path to define the default search
path for .pc files. (Freedesktop #119, #648)
pkgconfig 0.16 has been released and contains a fix for this bug.
With the change, does pkg-config actually also search in datadir by
default, or was it just made configurable?
The default is pc_path="$libdir/$PACKAGE:$datadir/$PACKAGE", so it searches both