[gitg] Add --with-gtk option in the configure.ac. By default it is used gtk+ 2.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Add --with-gtk option in the configure.ac. By default it is used gtk+ 2.
- Date: Thu, 30 Dec 2010 14:07:56 +0000 (UTC)
commit 4b2bbd9bd76f6ebf441fdc228c2a56a8e3447401
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Dec 30 15:07:32 2010 +0100
Add --with-gtk option in the configure.ac. By default it is used gtk+ 2.
configure.ac | 38 ++++++++++++++++++++++++++------------
1 files changed, 26 insertions(+), 12 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 86cb61f..23bb98b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,18 +51,32 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
AC_CHECK_LIB([m], [sinf])
-PKG_CHECK_EXISTS([gtk+-3.0 >= 2.90],
- [
- GTK_REQUIRED=gtk+-3.0
- GTK_REQUIRED_VERSION=2.90.0
- GTKSOURCEVIEW_REQUIRED=gtksourceview-3.0
- GTKSOURCEVIEW_REQUIRED_VERSION=2.90.0
- ],[
- GTK_REQUIRED=gtk+-2.0
- GTK_REQUIRED_VERSION=2.18.0
- GTKSOURCEVIEW_REQUIRED=gtksourceview-2.0
- GTKSOURCEVIEW_REQUIRED_VERSION=2.8.0
- ])
+# Which gtk+ API version to compile against
+
+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_REQUIRED=gtk+-2.0
+ GTK_REQUIRED_VERSION=2.18.0
+ GTKSOURCEVIEW_REQUIRED=gtksourceview-2.0
+ GTKSOURCEVIEW_REQUIRED_VERSION=2.8.0
+ ;;
+ 3.0)
+ GTK_REQUIRED=gtk+-3.0
+ GTK_REQUIRED_VERSION=2.90.0
+ GTKSOURCEVIEW_REQUIRED=gtksourceview-3.0
+ GTKSOURCEVIEW_REQUIRED_VERSION=2.90.0
+ ;;
+esac
GLIB_REQUIRED_VERSION=2.26
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]