The meson pkgconfig generator was, in some circumstances, adding
includedir to the pkgconfig
file. Since the pkgconfig file is installed in an
architecture-independent path (e.g.
/usr/share/pkgconfig) this was
causing problems with cross-compile builds or builds on
The extra variables could be avoided by setting the "dataonly" option on the pkgconfig generator, but that causes the "prefix" variable to also be removed. I took a quick check and didn't see anything that used this variable... but there could be something I missed.
So, in the interests of fixing the issue while preserving compatibility with the old autotools build, I've adjusted the meson build to use the pkgconfig template which was leftover from the autotools build system.