RFC: PKG_CHECK_MODULES() should honor ${libdir} and ${datadir}

Tollef Fog Heen tfheen at err.no
Mon May 10 11:31:36 PDT 2010

]] Peter Johansson 


| Yes, one case I was thinking of was when you have different .pc files
| under $HOME and /usr/local. A similar case is that you have foo.pc
| installed in $HOME but not in /usr/local. That would typically mean
| that configure works if I set prefix=$HOME but not if I use default
| prefix=/usr/local.

Yes, this is unfortunate.

| Another case in which we often set prefix is in autoamke's 'make
| distcheck'. Just to be clear: say that you have foo.pc installed in
| /usr/local. So with the suggested change pkg-config will find the
| foo.pc during the normal `./configure' because default is
| --prefix=/usr/local. Then during 'make distcheck' the rule runs
| `./configure --prefix=$$dc_install_base', which means pkg-config will
| no longer look in `/usr/local' and the configure call will fail. And
| in many cases it would be confusing and very difficult to understand
| why 'make distcheck' fails.

The default search path would still include the compiled-in one (which
defaults to including /usr/lib/lib/pkgconfig), but yes, I see your

All in all, I think we'll drop this idea.

Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are

More information about the pkg-config mailing list