summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2010-06-19 18:39:48 +0200
committerThomas Thurman <tthurman@gnome.org>2010-07-14 09:00:41 -0400
commitf701f761908509f48d905fa8c687cec6d5447368 (patch)
tree07bb6a4349d941343eccd982ca6ae368e7cdb270
parent15f273e77d78f4cad5efdcb849a407014e526b19 (diff)
downloadmetacity-f701f761908509f48d905fa8c687cec6d5447368.tar.gz
metacity-f701f761908509f48d905fa8c687cec6d5447368.tar.bz2
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
-rw-r--r--configure.in31
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}