summaryrefslogtreecommitdiff
blob: 46d97392b9e8e60cda482aa99c023656654b4ebf (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
From 8b526c757f0e977eeda9285762e137deba0a31f4 Mon Sep 17 00:00:00 2001
From: Ole Reifschneider <mail@ole-reifschneider.de>
Date: Sat, 11 Apr 2015 23:10:21 +0200
Subject: [PATCH] Make colord and wacom support optional

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

diff --git a/configure.ac b/configure.ac
index 50a6bb1..a42ec20 100644
--- a/configure.ac
+++ b/configure.ac
@@ -236,7 +236,20 @@ dnl ---------------------------------------------------------------------------
 dnl - color
 dnl ---------------------------------------------------------------------------
 
-PKG_CHECK_MODULES(COLOR, [colord >= 1.0.2 gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION libcanberra-gtk3])
+AC_ARG_ENABLE([color],
+  AS_HELP_STRING([--disable-color],
+                 [turn off color plugin]),
+       [with_color=$enableval],
+       [with_color=yes]) dnl Default value
+
+if test x$with_color = xyes; then
+       PKG_CHECK_MODULES(COLOR, [colord >= 1.0.2 gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION libcanberra-gtk3])
+       AC_DEFINE(HAVE_COLOR, 1, [Define if color plugin is enabled])
+fi
+AM_CONDITIONAL(WITH_COLOR, test "x$with_color" = "xyes")
+
+AC_SUBST(COLOR_CFLAGS)
+AC_SUBST(COLOR_LIBS)
 
 dnl ---------------------------------------------------------------------------
 dnl - datetime
@@ -267,15 +280,25 @@ case $host_os in
     if test "$host_cpu" = s390 -o "$host_cpu" = s390x; then
       have_wacom=no
     else
+      have_wacom=no
       if test x$enable_gudev != xno; then
-        PKG_CHECK_MODULES(LIBWACOM, [libwacom >= $LIBWACOM_REQUIRED_VERSION])
-        PKG_CHECK_MODULES(WACOM, [libwacom >= $LIBWACOM_REQUIRED_VERSION x11 xi xtst gudev-1.0 gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION xorg-wacom librsvg-2.0 >= $LIBRSVG_REQUIRED_VERSION libnotify >= $LIBNOTIFY_REQUIRED_VERSION pango >= $PANGO_REQUIRED_VERSION])
-        PKG_CHECK_MODULES(WACOM_OLED, [gudev-1.0])
+        AC_ARG_ENABLE([wacom],
+          AS_HELP_STRING([--disable-wacom],
+                         [turn off wacom plugin]),
+                         [with_wacom=$enableval],
+                         [with_wacom=no]) dnl Default value
+        if test x$with_wacom = xyes; then
+          PKG_CHECK_MODULES(LIBWACOM, [libwacom >= $LIBWACOM_REQUIRED_VERSION])
+          PKG_CHECK_MODULES(WACOM, [libwacom >= $LIBWACOM_REQUIRED_VERSION x11 xi xtst gudev-1.0 gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION xorg-wacom librsvg-2.0 >= $LIBRSVG_REQUIRED_VERSION libnotify >= $LIBNOTIFY_REQUIRED_VERSION pango >= $PANGO_REQUIRED_VERSION])
+          PKG_CHECK_MODULES(WACOM_OLED, [gudev-1.0])
+          have_wacom=yes
+          AC_DEFINE_UNQUOTED(HAVE_WACOM, 1, [Define to 1 if wacom support is available])
+        fi
+        AC_SUBST(WACOM_CFLAGS)
+        AC_SUBST(WACOM_LIBS)
       else
         AC_MSG_ERROR([GUdev is necessary to compile Wacom support])
       fi
-      AC_DEFINE_UNQUOTED(HAVE_WACOM, 1, [Define to 1 if wacom support is available])
-      have_wacom=yes
     fi
     ;;
   *)
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 7365953..779b5d9 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -4,7 +4,6 @@ enabled_plugins =	\
 	a11y-keyboard	\
 	a11y-settings	\
 	clipboard	\
-	color		\
 	datetime	\
 	dummy		\
 	power		\
@@ -21,6 +20,12 @@ enabled_plugins =	\
 
 disabled_plugins = $(NULL)
 
+if WITH_COLOR
+enabled_plugins += color
+else
+disabled_plugins += color
+endif
+
 if SMARTCARD_SUPPORT
 enabled_plugins += smartcard
 else
-- 
2.0.5