--- /a/configure.ac +++ /b/configure.ac @@ -124,7 +124,6 @@ PKG_CHECK_MODULES(NETWORK_PANEL, $COMMON_MODULES gmodule-2.0) PKG_CHECK_MODULES(POWER_PANEL, $COMMON_MODULES upower-glib >= 0.9.1 cinnamon-settings-daemon >= $CSD_REQUIRED_VERSION) -PKG_CHECK_MODULES(COLOR_PANEL, $COMMON_MODULES colord >= 0.1.8) PKG_CHECK_MODULES(REGION_PANEL, $COMMON_MODULES libgnomekbd >= 2.91.91 polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION libxklavier >= 5.1 libgnomekbdui >= 2.91.91) @@ -201,15 +200,51 @@ AC_SUBST(CUPS_LIBS) fi +build_color=false +AC_ARG_ENABLE(color, + AC_HELP_STRING([--disable-color], + [disable color management panel]), + [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_PANEL, $COMMON_MODULES colord >= 0.1.8) + build_color=true +fi +if test "x$build_color" = xtrue ; then + AC_DEFINE(BUILD_COLOR, 1, [Define to 1 to build the Color panel]) +fi +AM_CONDITIONAL(BUILD_COLOR, test "x$build_color" = "xtrue") +AC_SUBST(COLOR_PANEL_CFLAGS) +AC_SUBST(COLOR_PANEL_LIBS) + build_wacom=false -PKG_CHECK_MODULES(WACOM_PANEL, [$COMMON_MODULES +AC_ARG_ENABLE(wacom, + AC_HELP_STRING([--disable-wacom], + [disable wacom management panel]), + [case "${enableval}" in + yes) WANT_WACOM=yes ;; + no) WANT_WACOM=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-wacom) ;; + esac], + [WANT_WACOM=yes]) dnl Default value + +if test x$WANT_WACOM = xyes; then + PKG_CHECK_MODULES(WACOM_PANEL, [$COMMON_MODULES cinnamon-settings-daemon >= $CSD_REQUIRED_VERSION xi >= 1.2 x11 libwacom >= $LIBWACOM_REQUIRED_VERSION cinnamon-desktop - gtk+-3.0 >= 3.8.0], - [build_wacom="true" AC_DEFINE(HAVE_WACOM, 1, [Define if wacom is being build])], [build_wacom="false"]) - + gtk+-3.0 >= 3.8.0]) + build_wacom="true" + AC_DEFINE(HAVE_WACOM, 1, [Define if wacom is being build])] +fi AM_CONDITIONAL(BUILD_WACOM, test "x$build_wacom" = "xtrue") +AC_SUBST(WACOM_PANEL_CFLAGS) +AC_SUBST(WACOM_PANEL_LIBS) # This is a hard-dependency for the region and user-accounts panels PKG_CHECK_MODULES(ISOCODES, iso-codes) --- /a/panels/Makefile.am +++ /b/panels/Makefile.am @@ -3,7 +3,6 @@ enabled_panels = \ common \ screen \ - color \ display \ region \ universal-access \ @@ -14,6 +13,12 @@ disabled_panels = $(NULL) +if BUILD_COLOR +enabled_panels += color +else +disabled_panels += color +endif + if BUILD_NETWORK enabled_panels += network else