glib/m4macros
Simon McVittie 4bb16f4845 m4macros: Allow information from pkg-config to be overridden
By using PKG_CHECK_VAR, we declare $GLIB_COMPILE_SCHEMAS,
$GLIB_GENMARSHAL, $GOBJECT_QUERY, $GLIB_MKENUMS and
$GLIB_COMPILE_RESOURCES as Autoconf "precious variables" with AC_ARG_VAR,
similar to $PKG_CONFIG and $CC, so that they can be put on a configure
command line:

    ./configure GLIB_COMPILE_RESOURCES=my-glib-compile-resources

If they are set to a non-empty value, PKG_CHECK_VAR will use that
instead of auto-detecting from pkg-config, so that builders can
override them, for example when cross-compiling.

Similarly, use the standard PKG_CHECK_MODULES macro to get GLib's CFLAGS
and LIBS.

It's possible that most of the rest of each macro can also disappear,
but for the moment I've given them the benefit of the doubt.

This does result in printing "checking for GLIB" twice (once for
PKG_CHECK_MODULES and once for GLib's custom checks), but if you're
using Autotools, you probably don't have a strong objection to overly
verbose output.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-04 20:47:29 +01:00
..
.gitignore Improve .gitignore 2011-03-31 15:51:01 +05:30
attributes.m4 configure: Enable set of standard -Werror=foo flags 2012-11-02 09:03:52 -04:00
glib-2.0.m4 m4macros: Allow information from pkg-config to be overridden 2018-10-04 20:47:29 +01:00
glib-gettext.m4 build: Add #serial lines to m4 files 2017-10-26 12:26:14 +01:00
glibtests.m4 build: Add #serial lines to m4 files 2017-10-26 12:26:14 +01:00
gsettings.m4 m4macros: Allow information from pkg-config to be overridden 2018-10-04 20:47:29 +01:00
Makefile.am Revert "Use upstream gettext instead the glib one" 2016-01-10 22:44:24 +00:00