[gnome-session] New configure flag to switch GTK+ version
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] New configure flag to switch GTK+ version
- Date: Wed, 28 Jul 2010 14:31:14 +0000 (UTC)
commit 6e527bf69e5cfd9f2ac1b683e93163ef0fa539fc
Author: Frédéric Péters <fpeters 0d be>
Date: Wed Jul 28 16:30:49 2010 +0200
New configure flag to switch GTK+ version
configure.in | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
---
diff --git a/configure.in b/configure.in
index b8c291f..aa37a14 100644
--- a/configure.in
+++ b/configure.in
@@ -37,11 +37,29 @@ if test "x$enable_deprecations" = "xyes"; then
AC_SUBST([DISABLE_DEPRECATED_CFLAGS])
fi
+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])
+
GLIB_REQUIRED=2.16.0
-GTK_REQUIRED=2.90.0
DBUS_GLIB_REQUIRED=0.76
UPOWER_REQUIRED=0.9.0
+case "$with_gtk" in
+ 2.0) GTK_API_VERSION=2.0
+ GTK_REQUIRED=2.14.0
+ ;;
+ 3.0) GTK_API_VERSION=3.0
+ GTK_REQUIRED=2.90.0
+ ;;
+esac
+
dnl ====================================================================
dnl Dependency Checks
dnl ====================================================================
@@ -50,14 +68,14 @@ PKG_PROG_PKG_CONFIG()
PKG_CHECK_MODULES(GNOME_SESSION,
glib-2.0 >= $GLIB_REQUIRED
gio-2.0 >= $GLIB_REQUIRED
- gtk+-3.0 >= $GTK_REQUIRED
+ gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
dbus-glib-1 >= $DBUS_GLIB_REQUIRED
upower-glib >= $UPOWER_REQUIRED
)
PKG_CHECK_MODULES(SESSION_PROPERTIES,
glib-2.0 >= $GLIB_REQUIRED
- gtk+-3.0 >= $GTK_REQUIRED
+ gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
)
PKG_CHECK_MODULES(SM, sm)
@@ -67,7 +85,7 @@ PKG_CHECK_MODULES(XEXT, xext xau)
PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= $DBUS_GLIB_REQUIRED)
PKG_CHECK_MODULES(GCONF, gconf-2.0)
-PKG_CHECK_MODULES(EGG_SMCLIENT, gtk+-3.0)
+PKG_CHECK_MODULES(EGG_SMCLIENT, gtk+-$GTK_API_VERSION)
dnl ====================================================================
@@ -361,6 +379,7 @@ echo "
Maintainer mode: ${USE_MAINTAINER_MODE}
Warn about deprecations: ${enable_deprecations}
+ GTK+ version: ${with_gtk}
Default WM: ${with_default_wm}
IPv6 support: ${have_full_ipv6}
Backtrace support: ${have_backtrace}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]