blob: e6af481ef4e3da4933d7a36b24566b2e04a6ebf3 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001From 1c38d570b33f2b036d4fa47e929bb2b3264e38bd Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Tue, 11 Aug 2015 16:25:38 +0300
4Subject: [PATCH] configure: add option to enable/disable use of GTK+
5
6Distro packagers like predictability and automatically detected optional
7dependencies are not predicable. Add a --with-gtk3 option (default to "auto")
8for forcibly controlling whether GTK+ will be used or not.
9
10Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=712693]
11
12Signed-off-by: Ross Burton <ross.burton@intel.com>
13
14Forward-ported to 2.40.10
15
16Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
17---
18 configure.ac | 17 +++++++++++------
19 1 file changed, 11 insertions(+), 6 deletions(-)
20
21diff --git a/configure.ac b/configure.ac
22index bf77f3a..ca77de8 100644
23--- a/configure.ac
24+++ b/configure.ac
25@@ -128,17 +128,22 @@ AC_CHECK_FUNCS(strtok_r)
26 # GTK
27 # ===========================================================================
28
29-PKG_CHECK_MODULES([GTK3],[gtk+-3.0 >= $GTK3_REQUIRED],[have_gtk_3=yes],[have_gtk_3=no])
30-
31 GTK3_BINARY_VERSION=
32
33-if test "$have_gtk_3" = "yes"; then
34- GTK3_BINARY_VERSION="`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`"
35+AC_MSG_CHECKING([whether to use GTK+ 3])
36+AC_ARG_WITH([gtk3],
37+ [AS_HELP_STRING([--without-gtk3],[Don't build GTK+3 tools (default=auto)])],
38+ [],[PKG_CHECK_EXISTS([gtk+-3.0 >= $GTK3_REQUIRED],[with_gtk3=yes],[with_gtk3=no])])
39+AC_MSG_RESULT([$with_gtk3])
40+
41+if test "$with_gtk3" = "yes"; then
42+ PKG_CHECK_MODULES(GTK3, [gtk+-3.0 >= $GTK3_REQUIRED])
43+ GTK3_BINARY_VERSION="`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`"
44 fi
45
46 AC_SUBST([GTK3_BINARY_VERSION])
47
48-AM_CONDITIONAL([HAVE_GTK_3],[test "$have_gtk_3" = "yes"])
49+AM_CONDITIONAL([HAVE_GTK_3],[test "$with_gtk3" = "yes"])
50
51 dnl ===========================================================================
52 dnl GDK-Pixbuf SVG loader
53@@ -289,6 +294,6 @@ librsvg-$VERSION
54 Build introspectable bindings: ${found_introspection}
55 Build Vala bindings: ${enable_vala}
56 Build GdkPixbuf loader: ${enable_pixbuf_loader}
57- GTK+ $GTK3_REQUIRED or later: ${have_gtk_3}
58+ GTK+ $GTK3_REQUIRED or later: ${with_gtk_3}
59 Build miscellaenous tools: ${build_misc_tools}
60 "
61--
622.1.4
63