Created attachment 73115 [details] configure.ac patch The configure script of pkg-config tries to use pkg-config to locate GLib. The problem is that it immediately tries "pkg-config"; it should first try "${host}-pkg-config", in case pkg-config is being cross-compiled, to pick up GLib in the sysroot and not the one in the build system. Note: ${host}-pkg-config is normally set up by the distribution to wrap pkg-config via PKG_CONFIG_SYSROOT_DIR.
Good catch. I think the more appropriate autoconf way to handle this would be to change the check to: AC_CHECK_TOOL([PKG_CONFIG], [pkg-config], []) Can you try that out?
Yes, this one works too, I've tested both cross-compile and native.
Thanks. I ended up checking in something different, which was just to use PKG_CHECK_MODULES from the in-tree pkg.m4. That will allow our glib check to work exactly the same way as projects using pkg-config. This includes using AC_PATH_TOOL for pkg-config, which will check for $host-pkg-config if you pass --host to configure. Fixed in 7867cbd. Please report if this doesn't work for you.
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.