configure: Specify GLib min/max version
authorColin Walters <walters@verbum.org>
Thu, 11 Apr 2013 18:36:33 +0000 (14:36 -0400)
committerColin Walters <walters@verbum.org>
Fri, 12 Apr 2013 22:22:59 +0000 (18:22 -0400)
Mainly to avoid deprecation warnings about g_type_init().

https://bugs.freedesktop.org/show_bug.cgi?id=63440

configure.ac
src/examples/cancel.c
test/polkitbackend/test-polkitbackendjsauthority.c

index a9c24c4295d4dce21429f4cd8b12ef938d5d8181..73a978ef4040c74ed460675cb230883cc082f537 100644 (file)
@@ -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)
index 8de5cd3cf1e9946b3644147139d34e2beaaceea1..7978ebe8f461e88d3b9cdd725c51952eb750713c 100644 (file)
@@ -32,6 +32,7 @@
  * authentication dialog is removed.
  */
 
+#include "config.h"
 #include <polkit/polkit.h>
 
 static gboolean
index c7160f3f7969bb1912564d6d66f6307a027fdc9c..cc7b15f493502e32f06872055cfacbdbc2b23f7c 100644 (file)
@@ -21,6 +21,7 @@
  *         David Zeuthen <davidz@redhat.com>
  */
 
+#include "config.h"
 #include "glib.h"
 
 #include <locale.h>