From 00dd36e41f95a37f61a99be74cc172c05a288e86 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 11 Apr 2013 14:36:33 -0400 Subject: [PATCH] configure: Specify GLib min/max version Mainly to avoid deprecation warnings about g_type_init(). https://bugs.freedesktop.org/show_bug.cgi?id=63440 --- configure.ac | 4 ++++ src/examples/cancel.c | 1 + test/polkitbackend/test-polkitbackendjsauthority.c | 1 + 3 files changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index a9c24c4..73a978e 100644 --- a/configure.ac +++ b/configure.ac @@ -124,6 +124,10 @@ fi PKG_CHECK_MODULES(GLIB, [gmodule-2.0 gio-2.0 >= 2.30.0]) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) +AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_30], + [Avoid warning spew about g_type_init() being deprecated]) +AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [G_ENCODE_VERSION(2,34)], + [Notify us when we'll need to transition away from g_type_init()]) PKG_CHECK_MODULES(LIBJS, [mozjs185]) AC_SUBST(LIBJS_CFLAGS) diff --git a/src/examples/cancel.c b/src/examples/cancel.c index 8de5cd3..7978ebe 100644 --- a/src/examples/cancel.c +++ b/src/examples/cancel.c @@ -32,6 +32,7 @@ * authentication dialog is removed. */ +#include "config.h" #include static gboolean diff --git a/test/polkitbackend/test-polkitbackendjsauthority.c b/test/polkitbackend/test-polkitbackendjsauthority.c index c7160f3..cc7b15f 100644 --- a/test/polkitbackend/test-polkitbackendjsauthority.c +++ b/test/polkitbackend/test-polkitbackendjsauthority.c @@ -21,6 +21,7 @@ * David Zeuthen */ +#include "config.h" #include "glib.h" #include -- 2.7.4