build: minor updates
authorDan Winship <danw@gnome.org>
Mon, 18 Feb 2013 23:07:14 +0000 (18:07 -0500)
committerDan Winship <danw@gnome.org>
Mon, 18 Feb 2013 23:07:14 +0000 (18:07 -0500)
Only call g_type_init() on older glibs.

Add a missing #include (that presumably used to get accidentally
pulled in by something else).

Use -DGDK_VERSION_MIN_REQUIRED to avoid deprecation warnings on
GtkTable.

configure.ac
properties/tests/test-import-export.c
src/nm-openvpn-service-openvpn-helper.c
src/nm-openvpn-service.c

index 58cb2c6..d99153d 100644 (file)
@@ -93,6 +93,8 @@ if test x"$with_gnome" != xno; then
        AC_SUBST(GTK_CFLAGS)
        AC_SUBST(GTK_LIBS)
 
+       GTK_CFLAGS="$GTK_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_0"
+
        PKG_CHECK_MODULES(GNOMEKEYRING, gnome-keyring-1)
        AC_SUBST(GNOMEKEYRING_CFLAGS)
        AC_SUBST(GNOMEKEYRING_LIBS)
index 5f0c92e..3932ce7 100644 (file)
@@ -955,7 +955,9 @@ int main (int argc, char **argv)
        if (argc != 3)
                FAIL ("args", "usage: %s <conf path> <tmp dir>", argv[0]);
 
+#if !GLIB_CHECK_VERSION (2, 35, 0)
        g_type_init ();
+#endif
 
        if (!nm_utils_init (&error))
                FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);
index 7a0abb3..ac3230f 100644 (file)
@@ -375,7 +375,9 @@ main (int argc, char *argv[])
        gboolean tapdev = FALSE;
        char **iter;
 
+#if !GLIB_CHECK_VERSION (2, 35, 0)
        g_type_init ();
+#endif
 
        connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &err);
        if (!connection) {
index 1aaeddd..cabb5a0 100644 (file)
@@ -45,6 +45,7 @@
 #include <arpa/inet.h>
 #include <ctype.h>
 #include <errno.h>
+#include <locale.h>
 
 #include <NetworkManager.h>
 #include <NetworkManagerVPN.h>
@@ -1390,7 +1391,9 @@ main (int argc, char *argv[])
                {NULL}
        };
 
+#if !GLIB_CHECK_VERSION (2, 35, 0)
        g_type_init ();
+#endif
 
        /* locale will be set according to environment LC_* variables */
        setlocale (LC_ALL, "");