summaryrefslogtreecommitdiff
blob: ce7a15af9564854efc2476485ba8a84287f42871 (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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
From b935fd8c7e0452b96e35712054a86899652bb7a4 Mon Sep 17 00:00:00 2001
From: Julien Durillon <julien.durillon@gmail.com>
Date: Mon, 23 Jan 2012 15:50:20 +0100
Subject: [PATCH 1/2] Make colord optional

---
 configure.ac        |   38 ++++++++++++++++++++++++++++++++------
 data/Makefile.am    |    7 ++++++-
 plugins/Makefile.am |    7 ++++++-
 3 files changed, 44 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index a07d422..63f1158 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,6 +99,38 @@ dnl ---------------------------------------------------------------------------
 PKG_CHECK_MODULES(GNOME_DESKTOP, gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
 
 dnl ---------------------------------------------------------------------------
+dnl - Check for colord
+dnl ---------------------------------------------------------------------------
+build_color=false
+AC_ARG_ENABLE(color,
+      AC_HELP_STRING([--disable-color],
+                     [turn off color plugin]),
+          [case "${enableval}" in
+                  yes) WANT_COLOR=yes ;;
+                  no) WANT_COLOR=no ;;
+                  *) AC_MSG_ERROR(bad value ${enableval} for --disable-color) ;;
+          esac],
+          [WANT_COLOR=yes]) dnl Default value
+
+if test x$WANT_COLOR = xyes; then
+    PKG_CHECK_MODULES(COLOR, [colord >= 0.1.9 gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION libcanberra-gtk3])
+    build_color=true
+fi
+AM_CONDITIONAL(BUILD_COLOR, test "x$build_color" = "xtrue")
+
+AC_SUBST(COLORD_CFLAGS)
+AC_SUBST(COLORD_LIBS)
+
+dnl ---------------------------------------------------------------------------
+dnl - Check for libcanberra
+dnl ---------------------------------------------------------------------------
+PKG_CHECK_MODULES(LIBCANBERRA, libcanberra-gtk3,
+                  [have_libcanberra=true
+                   AC_DEFINE(HAVE_LIBCANBERRA, 1, [Define if libcanberra should be used)],
+                   [have_libcanberra=false])
+AM_CONDITIONAL(HAVE_LIBCANBERRA, test "x$have_libcanberra" = "xtrue")
+
+dnl ---------------------------------------------------------------------------
 dnl - Check for LCMS2
 dnl ---------------------------------------------------------------------------
 PKG_CHECK_MODULES(LCMS, lcms2 >= 2.2, have_new_lcms=yes, have_new_lcms=no)
@@ -196,12 +228,6 @@ dnl ---------------------------------------------------------------------------
 PKG_CHECK_MODULES(MEDIA_KEYS, [gio-unix-2.0 libpulse >= $PA_REQUIRED_VERSION $GUDEV_PKG libpulse-mainloop-glib >= $PA_REQUIRED_VERSION libcanberra])
 
 dnl ---------------------------------------------------------------------------
-dnl - color
-dnl ---------------------------------------------------------------------------
-
-PKG_CHECK_MODULES(COLOR, [colord >= 0.1.9 gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION libcanberra-gtk3])
-
-dnl ---------------------------------------------------------------------------
 dnl - wacom
 dnl ---------------------------------------------------------------------------
 
diff --git a/data/Makefile.am b/data/Makefile.am
index 19decc2..cb2c976 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -11,7 +11,6 @@ gsettings_SCHEMAS =							\
 	org.gnome.settings-daemon.plugins.gschema.xml			\
 	org.gnome.settings-daemon.plugins.keyboard.gschema.xml		\
 	org.gnome.settings-daemon.plugins.power.gschema.xml		\
-	org.gnome.settings-daemon.plugins.color.gschema.xml		\
 	org.gnome.settings-daemon.plugins.media-keys.gschema.xml	\
 	org.gnome.settings-daemon.plugins.xsettings.gschema.xml		\
 	org.gnome.settings-daemon.plugins.housekeeping.gschema.xml	\
@@ -21,6 +20,12 @@ gsettings_SCHEMAS =							\
 
 all_schemas = $(gsettings_SCHEMAS)
 
+if BUILD_COLOR
+gsettings_SCHEMAS += org.gnome.settings-daemon.plugins.color.gschema.xml
+else
+all_schemas += org.gnome.settings-daemon.plugins.color.gschema.xml
+endif
+
 if HAVE_PACKAGEKIT
 gsettings_SCHEMAS += org.gnome.settings-daemon.plugins.updates.gschema.xml
 else
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 2b7566a..31fcb74 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -6,7 +6,6 @@ enabled_plugins =	\
 	automount	\
 	background	\
 	clipboard	\
-	color		\
 	cursor		\
 	dummy		\
 	power		\
@@ -22,6 +21,12 @@ enabled_plugins =	\
 
 disabled_plugins = $(NULL)
 
+if BUILD_COLOR
+enabled_plugins += color
+else
+disabled_plugins += color
+endif
+
 if HAVE_PACKAGEKIT
 enabled_plugins += updates
 else
-- 
1.7.9.rc2