[gcalctool] Make it possible to build against GTK+ 3



commit a2250ad27e81c60eb35ec7f6701cc7580b6b3655
Author: Frédéric Péters <fpeters 0d be>
Date:   Fri Jul 16 19:46:00 2010 +0200

    Make it possible to build against GTK+ 3

 configure.ac |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b302a81..83ce679 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,8 +22,27 @@ dnl ###########################################################################
 GTK_REQUIRED=2.18
 GIO_REQUIRED=2.25.10
 
+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(GCALCTOOL, [
-    gtk+-2.0 >= $GTK_REQUIRED
+    gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
     gio-2.0 >= $GIO_REQUIRED
     libxml-2.0
     gmodule-export-2.0



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