[gconf-editor] New configure flag to switch GTK+ version



commit 6dca56e8a6abfb320e048b86cbacf89ec368545e
Author: Frédéric Péters <fpeters 0d be>
Date:   Wed Jul 28 16:05:33 2010 +0200

    New configure flag to switch GTK+ version

 configure.in |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/configure.in b/configure.in
index f8358e7..b6de93f 100644
--- a/configure.in
+++ b/configure.in
@@ -27,9 +27,28 @@ if test "x$GCC" = "xyes"; then
 fi
 changequote([,])dnl
 
+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)])],
+  [case "$with_gtk" in
+     2.0|3.0) ;;
+     *) AC_MSG_ERROR([invalid gtk version specified]) ;;
+   esac],
+  [with_gtk=2.0])
+AC_MSG_RESULT([$with_gtk])
+
+case "$with_gtk" in
+  2.0) GTK_API_VERSION=2.0
+       GTK_REQUIRED=2.18.0
+       ;;
+  3.0) GTK_API_VERSION=3.0
+       GTK_REQUIRED=2.90.4
+       ;;
+esac
+
 PKG_CHECK_MODULES(GCONF_EDITOR,
 		  gconf-2.0 >= 2.9.2
-		  gtk+-3.0 >= 2.90.0
+		  gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
 		  dbus-glib-1)
 
 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)



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