[anjuta] anjuta: Allow to build with glib 2.28



commit 57b5aa19170709cc2b56a131c57c595025139e15
Author: SÃbastien Granjoux <seb sfo free fr>
Date:   Wed Sep 14 21:53:15 2011 +0200

    anjuta: Allow to build with glib 2.28

 configure.ac |    9 +++++++++
 src/main.c   |    7 ++++++-
 2 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8762794..2fb9858 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,7 @@ AC_SUBST(BUGZILLA_VERSION)
 
 dnl Anjuta core
 GLIB_REQUIRED=2.28.0
+GLIB_NEW_REQUIRED=2.29.2
 GTK_REQUIRED=3.0.0
 GTHREAD_REQUIRED=2.22.0
 GDK_PIXBUF_REQUIRED=2.0.0
@@ -168,6 +169,14 @@ PKG_CHECK_MODULES([GDA],
 PKG_CHECK_MODULES([VTE],
    [vte-2.90 >= $VTE_REQUIRED])
 
+dnl Check for better module
+
+PKG_CHECK_MODULES([GLIB_NEW],
+   [glib-2.0 >= $GLIB_NEW_REQUIRED],
+   HAVE_GLIB_2_29_2=1,
+   HAVE_GLIB_2_29_2=0)
+AC_SUBST(HAVE_GLIB_2_29_2)
+AC_DEFINE_UNQUOTED([HAVE_GLIB_2_29_2], $HAVE_GLIB_2_29_2, [Define to 1 if glib is version 2.29.2 or greater])
 
 dnl Check for autogen
 dnl -----------------
diff --git a/src/main.c b/src/main.c
index a6fde37..f7f0899 100644
--- a/src/main.c
+++ b/src/main.c
@@ -180,11 +180,16 @@ main (int argc, char *argv[])
 
 	g_set_application_name (_("Anjuta"));
 	anjuta = anjuta_new ();
+#if GLIB_2_29_2 == 1
 	if (no_client) g_application_set_flags (G_APPLICATION (anjuta), G_APPLICATION_NON_UNIQUE);
+#endif
 	g_application_register (G_APPLICATION (anjuta), NULL, NULL);
 
-	
+#if GLIB_2_29_2 == 1	
 	if (g_application_get_is_remote (G_APPLICATION (anjuta)))
+#else
+	if (g_application_get_is_remote (G_APPLICATION (anjuta)) && !no_client)
+#endif
 	{	
 		if (files)
 		{



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