http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=98595 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: PKG_CONFIG_PATH=/usr/local/@ and have that automatically expand to: PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig
Created attachment 62 [details] [review] Add PKGDATADIR to default search path
2005-03-18 Tollef Fog Heen <tfheen@err.no> * 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 by default.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.