I need to include the GLib headers for a project that is built with an autoconf-based system for portability.
How can I safely import the GLib headers in a portable manner? I know about pkg-config, but that is not entirely portable (since some systems don’t have it and I would prefer to only rely on autoconf for configuration).
The GLib 2.22
INSTALLfile states thatpkg-configis a requirement for installing this library. I am not being GLib (pun intended!); statement of this requirement is one of the first things on the top of theINSTALLfile.From the text surrounding it is unclear whether
pkg-configis needed to compile GLib itself, however it is clear that GLib 2.22 authors do not intend for any users to compile against GLib without having pkg-config. In particular, GLib’smake installwill install.pcfiles appropriately.For platform portability, instruct the user to set
$PKG_CONFIG_PATHappropriately.