[dconf] Allow building against GTK+ 3
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf] Allow building against GTK+ 3
- Date: Sun, 3 Oct 2010 21:52:44 +0000 (UTC)
commit ed8d0d54e336f7bbd87cea3bf86ec1b4be795c20
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Oct 3 17:51:03 2010 -0400
Allow building against GTK+ 3
This commit adds the customary --with-gtk configure option.
For now, it defaults to GTK+ 2, since a newer vala is needed
to build successfully against GTK+ 3.
https://bugzilla.gnome.org/show_bug.cgi?id=631251
configure.ac | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 704fb1e..afc89b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,13 +23,32 @@ GTK_DOC_CHECK([1.15])
# Dependencies
PKG_CHECK_MODULES(gio, gio-2.0 >= 2.25.16)
+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.21.8
+ ;;
+ 3.0) GTK_API_VERSION=3.0
+ GTK_REQUIRED=2.90.7
+ ;;
+esac
+
AC_ARG_ENABLE(editor,
AC_HELP_STRING([--disable-editor],
[Disable the dconf editor]))
AM_CONDITIONAL(ENABLE_EDITOR, test "x$enable_editor" != "xno")
if test "x$enable_editor" != "xno"; then
- PKG_CHECK_MODULES(gtk, gtk+-2.0)
+ PKG_CHECK_MODULES(gtk, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED)
PKG_CHECK_MODULES(libxml, libxml-2.0)
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]