From 5f6bd29cc457e73c63efdcd705aeadb2ae2c9174 Mon Sep 17 00:00:00 2001 From: Sobhan Mohammadpour Date: Tue, 19 Feb 2013 17:38:12 +0330 Subject: [PATCH] gnome-control-center-3.7.4-optional-bt-colord-goa-wacom Make wacom, colord, goa optional Original author: Alexandre Rostovtsev --- configure.ac | 107 ++++++++++++++++++++++++++++++++++++++++++++--------- panels/Makefile.am | 10 ++++- 2 files changed, 98 insertions(+), 19 deletions(-) diff --git a/configure.ac b/configure.ac index 85cd015..eda3cbd 100644 --- a/configure.ac +++ b/configure.ac @@ -141,10 +141,48 @@ PKG_CHECK_MODULES(MOUSE_PANEL, $COMMON_MODULES xi >= 1.2 gnome-settings-daemon >= $GSD_REQUIRED_VERSION x11) PKG_CHECK_MODULES(NETWORK_PANEL, $COMMON_MODULES) PKG_CHECK_MODULES(NOTIFICATIONS_PANEL, $COMMON_MODULES libgnome-menu-3.0) -PKG_CHECK_MODULES(ONLINE_ACCOUNTS_PANEL, $COMMON_MODULES goa-1.0 goa-backend-1.0 >= $GOA_REQUIRED_VERSION) + +build_online_accounts=false +AC_ARG_ENABLE(goa, + AC_HELP_STRING([--disable-goa], + [disable online accounts management panel]), + [case "${enableval}" in + yes) WANT_ONLINE_ACCOUNTS=yes ;; + no) WANT_ONLINE_ACCOUNTS=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-goa) ;; + esac], + [WANT_ONLINE_ACCOUNTS=yes]) dnl Default value + +if test x$WANT_ONLINE_ACCOUNTS = xyes; then + PKG_CHECK_MODULES(ONLINE_ACCOUNTS_PANEL, $COMMON_MODULES goa-1.0 goa-backend-1.0 >= $GOA_REQUIRED_VERSION) + build_online_accounts=true +fi +AM_CONDITIONAL(BUILD_ONLINE_ACCOUNTS, test "x$build_online_accounts" = "xtrue") +AC_SUBST(ONLINE_ACCOUNTS_PANEL_CFLAGS) +AC_SUBST(ONLINE_ACCOUNTS_PANEL_LIBS) + PKG_CHECK_MODULES(POWER_PANEL, $COMMON_MODULES upower-glib >= 0.9.1 gnome-settings-daemon >= $GSD_REQUIRED_VERSION) -PKG_CHECK_MODULES(COLOR_PANEL, $COMMON_MODULES colord >= 0.1.8) + +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 +AM_CONDITIONAL(BUILD_COLOR, test "x$build_color" = "xtrue") +AC_SUBST(COLOR_PANEL_CFLAGS) +AC_SUBST(COLOR_PANEL_LIBS) + PKG_CHECK_MODULES(PRINTERS_PANEL, $COMMON_MODULES polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION) PKG_CHECK_MODULES(PRIVACY_PANEL, $COMMON_MODULES) @@ -189,17 +227,26 @@ if test x${have_networkmanager} = xyes; then AC_DEFINE(HAVE_NETWORK_MANAGER, 1, [Define to 1 if NetworkManager is available]) fi -# Check for gnome-bluetooth -PKG_CHECK_MODULES(BLUETOOTH, $COMMON_MODULES gnome-bluetooth-1.0 >= 3.5.5, - [have_bluetooth=yes], have_bluetooth=no) -if test "x$have_bluetooth" = xyes ; then - AC_DEFINE(BUILD_BLUETOOTH, 1, [Define to 1 to build the Network panel]) -fi -AM_CONDITIONAL(BUILD_BLUETOOTH, [test x$have_bluetooth = xyes]) -if test x${have_bluetooth} = xyes; then - AC_DEFINE(HAVE_BLUETOOTH, 1, [Define to 1 if bluetooth support is available]) +have_bluetooth=false +AC_ARG_ENABLE(bluetooth, + AC_HELP_STRING([--disable-bluetooth], + [disable bluetooth management panel]), + [case "${enableval}" in + yes) WANT_BLUETOOTH=yes ;; + no) WANT_BLUETOOTH=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-bluetooth) ;; + esac], + [WANT_BLUETOOTH=yes]) dnl Default value + +if test x$WANT_BLUETOOTH = xyes; then + # Check for gnome-bluetooth + PKG_CHECK_MODULES(BLUETOOTH, $COMMON_MODULES gnome-bluetooth-1.0 >= 3.5.5) + have_bluetooth=true fi +AM_CONDITIONAL(BUILD_BLUETOOTH, [test x$have_bluetooth = xtrue]) + + # Check for CUPS 1.4 or newer AC_ARG_ENABLE([cups], AS_HELP_STRING([--disable-cups], [disable CUPS support (default: enabled)]),, @@ -260,12 +307,23 @@ case $host_os in if test "$host_cpu" = s390 -o "$host_cpu" = s390x; then have_wacom=no else - PKG_CHECK_MODULES(WACOM_PANEL, $COMMON_MODULES - gnome-settings-daemon >= $GSD_REQUIRED_VERSION - xi >= 1.2 x11 libwacom >= $LIBWACOM_REQUIRED_VERSION - gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION) - AC_DEFINE(BUILD_WACOM, 1, [Define to 1 to build the Wacom panel]) - have_wacom=yes + 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 + gnome-settings-daemon >= $GSD_REQUIRED_VERSION + xi >= 1.2 x11 libwacom >= $LIBWACOM_REQUIRED_VERSION + gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION) + have_wacom=yes + fi fi ;; *) @@ -524,6 +582,11 @@ if test "x$have_bluetooth" = "xyes"; then else AC_MSG_NOTICE([ Bluetooth panel disabled]) fi +if test "x$build_color" = "xtrue"; then + AC_MSG_NOTICE([** colord (Color panel)]) +else + AC_MSG_NOTICE([ Color panel disabled]) +fi if test "x$enable_cups" = "xyes"; then AC_MSG_NOTICE([** CUPS (Printers panel)]) else @@ -534,11 +597,21 @@ if test "x$have_cheese" = "xyes"; then else AC_MSG_NOTICE([ Users panel webcam support disabled]) fi +if test "x$build_online_accounts" = "xtrue"; then + AC_MSG_NOTICE([** gnome-online-accounts (Online Accounts panel)]) +else + AC_MSG_NOTICE([ Online Accounts panel disabled]) +fi if test "x$with_libsocialweb" = "xyes"; then AC_MSG_NOTICE([** libsocialweb (Background panel Flickr support)]) else AC_MSG_NOTICE([ Background panel Flickr support disabled]) fi +if test "x$build_wacom" = "xtrue"; then + AC_MSG_NOTICE([** libwacom (Wacom Graphics Tablet panel)]) +else + AC_MSG_NOTICE([ Wacom Graphics Tablet panel disabled]) +fi if test "x$have_wacom" = "xyes"; then AC_MSG_NOTICE([** wacom (Wacom tablet panel)]) else diff --git a/panels/Makefile.am b/panels/Makefile.am index 7becf2c..e037815 100644 --- a/panels/Makefile.am +++ b/panels/Makefile.am @@ -3,11 +3,9 @@ SUBDIRS= \ background \ screen \ power \ - color \ display \ mouse \ notifications \ - online-accounts \ region \ info \ sound \ @@ -19,6 +17,10 @@ SUBDIRS= \ privacy \ sharing +if BUILD_COLOR +SUBDIRS += color +endif + if BUILD_WACOM SUBDIRS += wacom endif @@ -35,4 +37,8 @@ if BUILD_BLUETOOTH SUBDIRS += bluetooth endif +if BUILD_ONLINE_ACCOUNTS +SUBDIRS += online-accounts +endif + -include $(top_srcdir)/git.mk -- 1.8.1.2