aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-07-07 22:11:39 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-07-08 17:40:30 +0800
commitfc57cd132b0563feeec4dba0e5a7298c7d904a0a (patch)
tree4b47f47c97196d09923b8500b9a859e004acadb9
parentbc2b3bf0966076e8452a170a9741ded016051f44 (diff)
downloadgsoc2013-empathy-fc57cd132b0563feeec4dba0e5a7298c7d904a0a.tar
gsoc2013-empathy-fc57cd132b0563feeec4dba0e5a7298c7d904a0a.tar.gz
gsoc2013-empathy-fc57cd132b0563feeec4dba0e5a7298c7d904a0a.tar.bz2
gsoc2013-empathy-fc57cd132b0563feeec4dba0e5a7298c7d904a0a.tar.lz
gsoc2013-empathy-fc57cd132b0563feeec4dba0e5a7298c7d904a0a.tar.xz
gsoc2013-empathy-fc57cd132b0563feeec4dba0e5a7298c7d904a0a.tar.zst
gsoc2013-empathy-fc57cd132b0563feeec4dba0e5a7298c7d904a0a.zip
Build with GTK+3 if available (#621753)
-rw-r--r--configure.ac31
1 files changed, 26 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 12d9cac08..03e0620fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,9 +57,6 @@ WEBKIT_REQUIRED=1.1.15
# maintainer mode is forced
ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
GNOME_MAINTAINER_MODE_DEFINES
-if test $USE_MAINTAINER_MODE = yes; then
- AC_DEFINE(GSEAL_ENABLE, [], [Seal public structs to force usage of accessors])
-fi
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
@@ -165,11 +162,34 @@ PKG_CHECK_MODULES(EMPATHY,
x11
])
-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
-
PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED)
# -----------------------------------------------------------
+# GTK+
+# -----------------------------------------------------------
+AC_ARG_ENABLE(gtk3,
+ AS_HELP_STRING([--enable-gtk3=@<:@no/yes/auto@:>@],
+ [build with GTK+3]), ,
+ enable_gtk3=auto)
+
+# Try to use GTK+3 if available
+if test "x$enable_gtk3" != "xno"; then
+ PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= $GTK_REQUIRED],
+ enable_gtk3="yes", enable_gtk3="no")
+fi
+
+# ...if not use GTK+2
+if test "x$enable_gtk3" == "xno"; then
+ enable_gtk3=no
+ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
+
+ # Enable GSEAL checks if needed
+ if test $USE_MAINTAINER_MODE = yes; then
+ AC_DEFINE(GSEAL_ENABLE, [], [Seal public structs to force usage of accessors])
+ fi
+fi
+
+# -----------------------------------------------------------
# Enable debug
# -----------------------------------------------------------
@@ -489,6 +509,7 @@ Configure summary:
Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
Prefix......................: ${prefix}
Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
+ Use GTK+3...................: ${enable_gtk3}
Features:
Spell checking (enchant)....: ${have_enchant}