[evince] [build] Add --with-gtk=2.0|3.0 configure flag
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] [build] Add --with-gtk=2.0|3.0 configure flag
- Date: Wed, 4 Aug 2010 15:47:40 +0000 (UTC)
commit fda9745fe0796c07f442a371a60793acb17f6fad
Author: Vincent Untz <vuntz gnome org>
Date: Wed Aug 4 17:32:37 2010 +0200
[build] Add --with-gtk=2.0|3.0 configure flag
https://bugzilla.gnome.org/show_bug.cgi?id=626030
configure.ac | 47 +++++++++++++++++++++++++++++++++++------------
1 files changed, 35 insertions(+), 12 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ccb4482..b326e86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,10 +121,32 @@ fi
AM_CONDITIONAL([PLATFORM_HILDON],[test "$with_platform" = "hildon"])
AM_CONDITIONAL([PLATFORM_WIN32],[test "$with_platform" = "win32"])
+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])
+
dnl Specify required versions of dependencies
-GTK_REQUIRED=2.90.5
+CAIRO_REQUIRED=1.9.10
GLIB_REQUIRED=2.25.11
KEYRING_REQUIRED=2.22.0
+
+case "$with_gtk" in
+ 2.0) GTK_API_VERSION=2.0
+ GAIL_API_VERSION=
+ GTK_REQUIRED=2.21.5
+ ;;
+ 3.0) GTK_API_VERSION=3.0
+ GAIL_API_VERSION=-3.0
+ GTK_REQUIRED=2.90.5
+ ;;
+esac
+
AC_SUBST([GLIB_REQUIRED])
AC_SUBST([GTK_REQUIRED])
@@ -141,10 +163,10 @@ dnl Check dependencies
# SHELL_LIBS
-PKG_CHECK_MODULES(LIBDOCUMENT, gtk+-3.0 >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED)
-PKG_CHECK_MODULES(LIBVIEW, gtk+-3.0 >= $GTK_REQUIRED gail-3.0 >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED)
-PKG_CHECK_MODULES(BACKEND, gtk+-3.0 >= $GTK_REQUIRED)
-PKG_CHECK_MODULES(FRONTEND_CORE, gtk+-3.0 >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED)
+PKG_CHECK_MODULES(LIBDOCUMENT, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED)
+PKG_CHECK_MODULES(LIBVIEW, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED gail$GAIL_API_VERSION >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED)
+PKG_CHECK_MODULES(BACKEND, cairo >= $CAIRO_REQUIRED gtk+-$GTK_API_VERSION >= $GTK_REQUIRED)
+PKG_CHECK_MODULES(FRONTEND_CORE, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED)
SHELL_PLATFORM_PKGS=
case "$with_platform" in
@@ -170,13 +192,13 @@ case "$with_platform" in
;;
esac
-PKG_CHECK_MODULES([SHELL_CORE],[libxml-2.0 >= $LIBXML_REQUIRED gtk+-3.0 >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED gthread-2.0 $SHELL_PLATFORM_PKGS])
+PKG_CHECK_MODULES([SHELL_CORE],[libxml-2.0 >= $LIBXML_REQUIRED gtk+-$GTK_API_VERSION >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED gthread-2.0 $SHELL_PLATFORM_PKGS])
# *********
# SM client
# *********
-GDK_TARGET="$($PKG_CONFIG --variable target gdk-3.0)"
+GDK_TARGET="$($PKG_CONFIG --variable target gdk-$GTK_API_VERSION)"
AC_MSG_CHECKING([which smclient backend to use])
AC_ARG_WITH([smclient],
@@ -202,7 +224,7 @@ if test "$with_smclient" != "no"; then
*) SMCLIENT_PKGS="" ;;
esac
- PKG_CHECK_MODULES([SMCLIENT],[gtk+-3.0 gthread-2.0 $SMCLIENT_PKGS])
+ PKG_CHECK_MODULES([SMCLIENT],[gtk+-$GTK_API_VERSION gthread-2.0 $SMCLIENT_PKGS])
AC_SUBST([SMCLIENT_CFLAGS])
AC_SUBST([SMCLIENT_LIBS])
fi
@@ -239,7 +261,7 @@ AC_ARG_WITH([gtk-unix-print],
AC_MSG_RESULT([$with_gtk_unix_print])
if test "$with_gtk_unix_print" = "yes"; then
- PKG_CHECK_MODULES(GTKUNIXPRINT, [gtk+-unix-print-3.0 >= $GTK_REQUIRED])
+ PKG_CHECK_MODULES(GTKUNIXPRINT, [gtk+-unix-print-$GTK_API_VERSION >= $GTK_REQUIRED])
AC_DEFINE([GTKUNIXPRINT_ENABLED], [1], [Define if gtk+-unix-print is enabled.])
fi
@@ -378,7 +400,7 @@ AC_ARG_ENABLE([nautilus],
esac])
if test "$enable_nautilus" = "yes" ; then
- PKG_CHECK_MODULES([NAUTILUS],[gtk+-x11-3.0 $MM gthread-2.0 libnautilus-extension],
+ PKG_CHECK_MODULES([NAUTILUS],[gtk+-x11-$GTK_API_VERSION $MM gthread-2.0 libnautilus-extension],
[],[AC_MSG_ERROR([libnautilus-extension not found; use --disable-nautilus to disable the nautilus extensions])])
NAUTILUS_EXTENSION_DIR=`$PKG_CONFIG --variable=extensiondir libnautilus-extension`
AC_SUBST([nautilusextensiondir],[$NAUTILUS_EXTENSION_DIR])
@@ -417,7 +439,7 @@ AC_ARG_ENABLE([previewer],
esac])
if test x$enable_previewer = "xyes" ; then
- PKG_CHECK_MODULES([PREVIEWER],[gtk+-3.0 >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED])
+ PKG_CHECK_MODULES([PREVIEWER],[gtk+-$GTK_API_VERSION >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED])
fi
AM_CONDITIONAL([ENABLE_PREVIEWER],[test "$enable_previewer" = "yes"])
@@ -741,7 +763,7 @@ AM_CONDITIONAL(ENABLE_HELP, test "x$enable_help" = "xyes")
GTK_DOC_CHECK([1.13],[--flavour no-tmpl])
AC_SUBST([GLIB_PREFIX],[$($PKG_CONFIG --variable=prefix glib-2.0)])
-AC_SUBST([GTK_PREFIX],[$($PKG_CONFIG --variable=prefix gtk+-3.0)])
+AC_SUBST([GTK_PREFIX],[$($PKG_CONFIG --variable=prefix gtk+-$GTK_API_VERSION)])
# ******************
# Backends directory
@@ -842,6 +864,7 @@ AC_OUTPUT
echo "
Configure summary:
Platform...........: $with_platform
+ GTK+ version.......: $with_gtk
GConf Support......: $with_gconf
GTK+ Unix Print....: $with_gtk_unix_print
Keyring Support....: $with_keyring
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]