[metacity] Allow building with Gtk+-3.0
- From: Thomas James Alexander Thurman <tthurman src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] Allow building with Gtk+-3.0
- Date: Wed, 14 Jul 2010 13:01:47 +0000 (UTC)
commit f701f761908509f48d905fa8c687cec6d5447368
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Jun 19 18:39:48 2010 +0200
Allow building with Gtk+-3.0
Add a configure switch to select the Gtk+ version to build with. The
default is to build against Gtk+-2.0 >= 2.20.0.
https://bugzilla.gnome.org/show_bug.cgi?id=622285
configure.in | 31 +++++++++++++++++++++++++++----
1 files changed, 27 insertions(+), 4 deletions(-)
---
diff --git a/configure.in b/configure.in
index 67b6ba5..d84d38e 100644
--- a/configure.in
+++ b/configure.in
@@ -107,7 +107,30 @@ if test "x$GCC" = "xyes"; then
fi
changequote([,])dnl
-METACITY_PC_MODULES='gtk+-2.0 >= 2.20.0 pango >= 1.2.0 libcanberra-gtk'
+AC_MSG_CHECKING([which gtk+ version to compile against])
+AC_ARG_WITH([gtk],
+ AC_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_MIN_VERSION=2.20.0
+ CANBERRA_GTK=libcanberra-gtk
+ ;;
+ 3.0) GTK_API_VERSION=3.0
+ GTK_MIN_VERSION=2.90.0
+ CANBERRA_GTK=libcanberra-gtk3
+ ;;
+esac
+
+METACITY_PC_MODULES="gtk+-$GTK_API_VERSION >= $GTK_MIN_VERSION pango >= 1.2.0 $CANBERRA_GTK"
+AC_SUBST(GTK_API_VERSION)
AC_ARG_ENABLE(gconf,
AC_HELP_STRING([--disable-gconf],
@@ -167,8 +190,8 @@ AM_GLIB_GNU_GETTEXT
# GOptionEntry requires glib-2.6.0
PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.6.0)
# gtk_window_set_icon_name requires gtk2+-2.60
-PKG_CHECK_MODULES(METACITY_MESSAGE, gtk+-2.0 >= 2.6.0)
-PKG_CHECK_MODULES(METACITY_WINDOW_DEMO, gtk+-2.0 >= 2.19.7)
+PKG_CHECK_MODULES(METACITY_MESSAGE, gtk+-$GTK_API_VERSION >= $GTK_MIN_VERSION)
+PKG_CHECK_MODULES(METACITY_WINDOW_DEMO, gtk+-$GTK_API_VERSION >= $GTK_MIN_VERSION)
if $PKG_CONFIG --atleast-version 1.2.0 pangoxft; then
echo "pangoxft found"
@@ -537,7 +560,7 @@ fi
dnl ==========================================================================
echo "
-metacity-$VERSION:
+metacity-$VERSION (using gtk+-${GTK_API_VERSION}):
prefix: ${prefix}
source code location: ${srcdir}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]