[network-manager-openswan] build: minor updates



commit bc5c728519254b326cb18ef38a4d3dda15d7d89e
Author: Dan Winship <danw gnome org>
Date:   Wed Feb 20 15:38:26 2013 -0500

    build: minor updates
    
    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.

 auth-dialog/Makefile.am          |    2 --
 configure.ac                     |    2 ++
 src/nm-openswan-service-helper.c |    2 ++
 src/nm-openswan-service.c        |    3 +++
 4 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/auth-dialog/Makefile.am b/auth-dialog/Makefile.am
index 209553b..4b5a01d 100644
--- a/auth-dialog/Makefile.am
+++ b/auth-dialog/Makefile.am
@@ -9,8 +9,6 @@ nm_openswan_auth_dialog_CPPFLAGS = \
        -DICONDIR=\""$(datadir)/pixmaps"\" \
        -DBINDIR=\""$(bindir)"\" \
        -DG_DISABLE_DEPRECATED \
-       -DGDK_DISABLE_DEPRECATED \
-       -DGNOME_DISABLE_DEPRECATED \
        -DGNOMELOCALEDIR=\"$(datadir)/locale\" \
        -DVERSION=\"$(VERSION)\"
 
diff --git a/configure.ac b/configure.ac
index 999784a..87064c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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)
diff --git a/src/nm-openswan-service-helper.c b/src/nm-openswan-service-helper.c
index cbbe927..d0b4e19 100644
--- a/src/nm-openswan-service-helper.c
+++ b/src/nm-openswan-service-helper.c
@@ -209,7 +209,9 @@ main (int argc, char *argv[])
        //struct in_addr temp_addr;
        //long int mtu = 1412;
 
+#if !GLIB_CHECK_VERSION (2, 35, 0)
        g_type_init ();
+#endif
 
        /* openswan gives us a "reason" code.  If we are given one,
         * don't proceed unless its "connect".
diff --git a/src/nm-openswan-service.c b/src/nm-openswan-service.c
index a4a6c18..ec0553c 100644
--- a/src/nm-openswan-service.c
+++ b/src/nm-openswan-service.c
@@ -28,6 +28,7 @@
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <errno.h>
+#include <locale.h>
 
 #include <glib/gi18n.h>
 
@@ -878,7 +879,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, "");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]