From 822fbf5f111b83f3cb277377557dcf6ff3547620 Mon Sep 17 00:00:00 2001 From: Monsta Date: Tue, 13 Jan 2015 16:49:55 +0300 Subject: require GLib >= 2.36 and don't use g_type_init Closes https://github.com/mate-desktop/mate-polkit/pull/18 --- configure.ac | 9 ++++++--- src/main.c | 3 --- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 68b89a9..03fe6e6 100644 --- a/configure.ac +++ b/configure.ac @@ -121,6 +121,10 @@ MATE_MAINTAINER_MODE_DEFINES # Check for required packages # *************************** +GLIB_REQUIRED=2.36.0 +POLKIT_AGENT_REQUIRED=0.97 +POLKIT_GOBJECT_REQUIRED=0.97 + AC_MSG_CHECKING([which gtk+ version to compile against]) AC_ARG_WITH([gtk], [AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 2.0)])], @@ -141,13 +145,12 @@ case "$with_gtk" in esac AC_SUBST(GTK_API_VERSION) +PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED) + PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) -POLKIT_AGENT_REQUIRED=0.97 -POLKIT_GOBJECT_REQUIRED=0.97 - PKG_CHECK_MODULES(POLKIT_AGENT, polkit-agent-1 >= $POLKIT_AGENT_REQUIRED) AC_SUBST(POLKIT_AGENT_CFLAGS) AC_SUBST(POLKIT_AGENT_LIBS) diff --git a/src/main.c b/src/main.c index 86b55f3..a03d7e1 100644 --- a/src/main.c +++ b/src/main.c @@ -206,9 +206,6 @@ main (int argc, char **argv) PolkitAgentListener *listener; GError *error; -#if !GLIB_CHECK_VERSION (2, 36, 0) - g_type_init (); -#endif gtk_init (&argc, &argv); loop = NULL; -- cgit v1.2.1