pkg-config files differ between Autotools and Meson build
Since 3c76114e, the .pc
files for pkg-config are generated by Meson. However, they are not identical to the .pc
files used for the Autotools build: for Autotools, variables referring to binaries only include the name of the binary (e.g. gdbus_codegen=gdbus-codegen
), while for Meson, the full path is specified (e.g. gdbus_codegen=${bindir}/gdbus-codegen
).
The contents of the pkg-config files should be identical across the different build systems as projects using glib rely on a consistent interface. I am aware of at least one downstream project which has problems with this change: in tpm2-abrmd, the location of gdbus-codegen
is queried using
AC_PATH_PROG([GDBUS_CODEGEN], [`$PKG_CONFIG --variable=gdbus_codegen gio-2.0`])
This works if pkgconf returns just the executable name gdbus-codegen
, but fails if the complete path is returned as this cannot be handled by AC_PATH_PROG
.
The convention not to include the file path in the variable was established six years ago in 47692845 in order to fix Bug 673911: gio-2.0.pc lists full path to executables, breaking cross compiling.