blob: 6c23071cd34613dbab136660d72cf725b1508314 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001From 4e0ce3f22d45033a108cbacca3e5ec6728bd44f3 Mon Sep 17 00:00:00 2001
Patrick Williamsc124f4f2015-09-15 14:41:29 -05002From: 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>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
14---
15 configure.ac | 17 +++++++++++------
16 1 file changed, 11 insertions(+), 6 deletions(-)
17
18diff --git a/configure.ac b/configure.ac
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050019index e61a952..c3aae84 100644
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020--- a/configure.ac
21+++ b/configure.ac
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050022@@ -130,17 +130,22 @@ AC_CHECK_FUNCS(strtok_r)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023 # GTK
24 # ===========================================================================
25
26-PKG_CHECK_MODULES([GTK3],[gtk+-3.0 >= $GTK3_REQUIRED],[have_gtk_3=yes],[have_gtk_3=no])
27-
28 GTK3_BINARY_VERSION=
29
30-if test "$have_gtk_3" = "yes"; then
31- GTK3_BINARY_VERSION="`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`"
32+AC_MSG_CHECKING([whether to use GTK+ 3])
33+AC_ARG_WITH([gtk3],
34+ [AS_HELP_STRING([--without-gtk3],[Don't build GTK+3 tools (default=auto)])],
35+ [],[PKG_CHECK_EXISTS([gtk+-3.0 >= $GTK3_REQUIRED],[with_gtk3=yes],[with_gtk3=no])])
36+AC_MSG_RESULT([$with_gtk3])
37+
38+if test "$with_gtk3" = "yes"; then
39+ PKG_CHECK_MODULES(GTK3, [gtk+-3.0 >= $GTK3_REQUIRED])
40+ GTK3_BINARY_VERSION="`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`"
41 fi
42
43 AC_SUBST([GTK3_BINARY_VERSION])
44
45-AM_CONDITIONAL([HAVE_GTK_3],[test "$have_gtk_3" = "yes"])
46+AM_CONDITIONAL([HAVE_GTK_3],[test "$with_gtk3" = "yes"])
47
48 dnl ===========================================================================
49 dnl GDK-Pixbuf SVG loader
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050050@@ -298,6 +303,6 @@ librsvg-$VERSION
Patrick Williamsc124f4f2015-09-15 14:41:29 -050051 Build introspectable bindings: ${found_introspection}
52 Build Vala bindings: ${enable_vala}
53 Build GdkPixbuf loader: ${enable_pixbuf_loader}
54- GTK+ $GTK3_REQUIRED or later: ${have_gtk_3}
55+ GTK+ $GTK3_REQUIRED or later: ${with_gtk_3}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050056 Build miscellaneous tools: ${build_misc_tools}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050057 "
58--
592.1.4
60