From a70d512823b818f46ddb40213c2658100d4cadc0 Mon Sep 17 00:00:00 2001 From: Alexandre Rostovtsev Date: Thu, 27 Oct 2011 23:30:41 -0400 Subject: [PATCH] Make colord optional Conflicts: configure.ac plugins/Makefile.am --- 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 08b1a2f..4f6f75f 100644 --- a/configure.ac +++ b/configure.ac @@ -105,6 +105,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) @@ -219,12 +251,6 @@ dnl --------------------------------------------------------------------------- PKG_CHECK_MODULES(MEDIA_KEYS, [gio-unix-2.0 libpulse >= $PA_REQUIRED_VERSION $GUDEV_PKG libpulse-mainloop-glib >= $PA_REQUIRED_VERSION libcanberra gconf-2.0 >= $GCONF_REQUIRED_VERSION]) -dnl --------------------------------------------------------------------------- -dnl - color -dnl --------------------------------------------------------------------------- - -PKG_CHECK_MODULES(COLOR, [colord >= 0.1.9 gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION libcanberra-gtk3]) - dnl ============================================== dnl PackageKit section dnl ============================================== diff --git a/data/Makefile.am b/data/Makefile.am index 43ba27c..1f3bbef 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 83d223a..ad88aa9 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -6,7 +6,6 @@ enabled_plugins = \ automount \ background \ clipboard \ - color \ cursor \ datetime \ dummy \ @@ -23,6 +22,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.8.rc0.dirty