[gedit] Bug 618240 - Build with gtk+-3.0 if it's available



commit 999a8ddb1d8a5ceeb2324473b09503709d8f5c3c
Author: Garrett Regier <alias301 gmail com>
Date:   Mon May 10 02:33:23 2010 -0700

    Bug 618240 - Build with gtk+-3.0 if it's available
    
    This also bumps the glib dependancy to 2.25.0 so we continue to build successfully

 configure.ac |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b7ea34c..bc05a17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -269,12 +269,25 @@ dnl ================================================================
 dnl Start of pkg-config checks
 dnl ================================================================
 
+# Dependencies
+GTK_REQUIRED=
+GTK_REQUIRED_VERSION=
+
+PKG_CHECK_EXISTS([gtk+-3.0 >= 2.90],
+		 [
+		 	GTK_REQUIRED=gtk+-3.0
+		 	GTK_REQUIRED_VERSION=2.90.0
+		 ],[
+		 	GTK_REQUIRED=gtk+-2.0
+		 	GTK_REQUIRED_VERSION=2.16.0
+		 ])
+
 PKG_CHECK_MODULES(GEDIT, [
 	libxml-2.0 >= 2.5.0
-	glib-2.0 >= 2.22.0
+	glib-2.0 >= 2.25.0
 	gthread-2.0 >= 2.13.0
 	gio-2.0 >= 2.25.4
-	gtk+-2.0 >= 2.16.0
+	$GTK_REQUIRED >= $GTK_REQUIRED_VERSION
 	gtksourceview-2.0 >= 2.9.7
 	gconf-2.0 >= 2.31.1
 ])
@@ -297,7 +310,7 @@ AC_SUBST(GEDIT_LIBS)
 
 dnl FIXME: Remove this when removing gedit-message-area
 
-if $PKG_CONFIG --atleast-version 2.17.1 gtk+-2.0; then
+if $PKG_CONFIG --atleast-version 2.17.1 $GTK_REQUIRED; then
        gtkatleast=
 else
        gtkatleast=no
@@ -307,7 +320,7 @@ AM_CONDITIONAL(BUILD_MESSAGE_AREA, test "$gtkatleast" = "no")
 
 dnl FIXME: Remove this when removing gedit-spinner
 
-if $PKG_CONFIG --atleast-version 2.19.0 gtk+-2.0; then
+if $PKG_CONFIG --atleast-version 2.19.0 $GTK_REQUIRED; then
        gtkatleast=
 else
        gtkatleast=no



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