See the following: http://lists.freedesktop.org/archives/pkg-config/2008-January/000257.html the PKG_CONFIG_SYSROOT environment variable is used when cross compiling. If I don't use this environment variable all the -I's and -L's are the wrong path. If I do use the environment variable the paths are right, but the bug mentioned in the link strips all the cflags and -l's. Either way it isn't very build friendly. The link above provides a small patch which fixes the problem.
Updating version, this bug is still present in F11. See the output for an explicit example: $ pkg-config glib-2.0 --cflags -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include $ PKG_CONFIG_SYSROOT_DIR="/home" pkg-config glib-2.0 --cflags -I/home/usr/include/glib-2.0 -I/home/usr/lib/glib-2.0/include $ pkg-config glib-2.0 --libs -lglib-2.0 $ PKG_CONFIG_SYSROOT_DIR="/home" pkg-config glib-2.0 --libs $ Notice the environment variable PKG_CONFIG_SYSROOT_DIR will correctly modify paths, but incorrectly removes flags, such as -lglib-2.0 in the example.
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle. Changing version to '11'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
I got bitten by this one as well. It has been fixed upstream already: https://bugs.freedesktop.org/show_bug.cgi?id=16905 However, pkgconfig maintainer has not yet released a stable version which includes this fix. Nevertheless, a fix for the Fedora 11 pkgconfig package would really be helpful...
This message is a reminder that Fedora 11 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 11. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '11'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 11's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 11 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Bug still present in fedora 13.
I've asked upstream to finally get 0.24 released.
I've just built 0.24 in rawhide