I humbly submit a patch to revamp the pkg.m4 and associated infrastructure, the highlights are: Users can set PKG_CONFIG environment variable which is used instead of locating pkg-config in the PATH. When cross-compiling (--host=foo) ${host}-pkg-config is used if it exists (otherwise falls back on pkg-config). Users may set xxx_CFLAGS and xxx_LIBS environment variables if they think they know better, if they do pkg-config isn't used for that invocation. xxx_CFLAGS and xxx_LIBS are Autoconf "precious" variables so they're cached and automatically AC_SUBSTed where appropriate. The results of pkg-config runs are cached, so repeated configure runs with the cache enabled will be faster. PKG_PROG_PKG_CONFIG macro added to allow people to require a minimum version of pkg-config (defaults to 0.9.0), called automatically by PKG_CHECK_MODULES if not invoked. New pkg-configize script for developers that copies the pkg.m4 file into the directory specified by AC_CONFIG_MACRO_DIR. /usr/share/aclocal is being deprecated, and this is the new way this should work. aclocal-1.8 will correctly notice this and only place "m4_include([pkg.m4])" in aclocal.m4 instead of the verbatim file. I stuck a manual package in too :-) (This was filed as #132701 over in GNOME Bugzilla, Ross said I should submit it here)
Created attachment 153 [details] [review] Patch against pkgconfig-0.15.0 Apply with 'patch -p1', as you'd expect.
*** Bug 153 has been marked as a duplicate of this bug. ***
this pkg.m4 has really been in pkg-config for a while, so closing this bug.
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.