summaryrefslogtreecommitdiff
blob: e5abe075f5e90f8edb13689ae5a8196cd88feef3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
From 884ce49f5bcdca37a30fef94d6649af012c88fee Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Sat, 13 Jun 2015 18:03:09 -0400
Subject: [PATCH] Make logind, colord, wacom optional and non-automagic

---
 configure.ac        | 31 +++++++++++++++++++++++++++----
 plugins/Makefile.am |  7 ++++++-
 2 files changed, 33 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index ce79a6d..095a7a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -260,14 +260,28 @@ dnl ---------------------------------------------------------------------------
 dnl - color
 dnl ---------------------------------------------------------------------------
 
-PKG_CHECK_MODULES(COLOR, [colord >= 0.1.27 cinnamon-desktop >= $CINNAMON_DESKTOP_REQUIRED_VERSION libcanberra-gtk3])
+AC_ARG_ENABLE(color,
+              AS_HELP_STRING([--disable-color], [disable Colord support (default: enabled)]),,
+              enable_color=yes)
+build_color=false
+if test x"$enable_color" != x"no" ; then
+  PKG_CHECK_MODULES(COLOR, [colord >= 0.1.27 cinnamon-desktop >= $CINNAMON_DESKTOP_REQUIRED_VERSION libcanberra-gtk3])
+  build_color=true
+fi
+
+AM_CONDITIONAL(BUILD_COLOR, [test "x$build_color" = "xtrue"])
 
 dnl ---------------------------------------------------------------------------
 dnl - wacom
 dnl ---------------------------------------------------------------------------
+AC_ARG_ENABLE(wacom,
+              AS_HELP_STRING([--disable-wacom], [disable Wacom support (default: auto)]),,
+              enable_wacom=auto)
 build_wacom=false
-PKG_CHECK_MODULES(WACOM, [libwacom >= $LIBWACOM_REQUIRED_VERSION x11 xi xtst gudev-1.0 cinnamon-desktop xorg-wacom librsvg-2.0 >= $LIBRSVG_REQUIRED_VERSION gtk+-3.0 >= 3.8.0],
-                  [build_wacom="true" AC_DEFINE(HAVE_WACOM, 1, [Define if wacom is being build])], [build_wacom="false"])
+if test x"$enable_wacom" != x"no" ; then
+  PKG_CHECK_MODULES(WACOM, [libwacom >= $LIBWACOM_REQUIRED_VERSION x11 xi xtst gudev-1.0 cinnamon-desktop xorg-wacom librsvg-2.0 >= $LIBRSVG_REQUIRED_VERSION gtk+-3.0 >= 3.8.0],
+                    [build_wacom="true" AC_DEFINE(HAVE_WACOM, 1, [Define if wacom is being build])], [build_wacom="false"])
+fi
 
 AM_CONDITIONAL(BUILD_WACOM, test "x$build_wacom" = "xtrue")
 
@@ -373,7 +387,15 @@ dnl ====================================================================
 dnl Check for logind
 dnl ====================================================================
 
-PKG_CHECK_MODULES(LOGIND, [libsystemd-login], [have_logind=yes], [have_logind=no])
+AC_ARG_ENABLE([logind],
+              AS_HELP_STRING([--disable-logind], [Do not check for logind]),
+              [enable_logind=$enableval],
+              [enable_logind=auto])
+
+have_logind=no
+if test x$enable_logind != xno ; then
+    PKG_CHECK_MODULES(LOGIND, [libsystemd-login], [have_logind=yes], [have_logind=no])
+fi
 
 if test x$have_logind = xyes; then
     AC_DEFINE(HAVE_LOGIND, 1, [Define if logind is supported])
@@ -595,6 +617,7 @@ echo "
         LCMS DICT support:        ${have_new_lcms}
         Libnotify support:        ${have_libnotify}
 
+        Colord support:           ${build_color}
         Wacom support:            ${build_wacom}
 
         Smartcard support:        ${have_smartcard_support}
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index b9cb3a6..f37eec0 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -6,7 +6,6 @@ enabled_plugins =	\
 	automount	\
 	background  \
 	clipboard	\
-	color		\
 	cursor		\
 	dummy		\
     datetime    \
@@ -23,6 +22,12 @@ enabled_plugins =	\
 
 disabled_plugins = $(NULL)
 
+if BUILD_COLOR
+enabled_plugins += color
+else
+disabled_plugins += color
+endif
+
 if BUILD_WACOM
 enabled_plugins += wacom
 else
-- 
2.4.3