aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGyörgy Balló <ballogy@freestart.hu>2011-11-23 07:59:47 +0100
committerGyörgy Balló <ballogy@freestart.hu>2011-11-23 07:59:47 +0100
commit78e082682d5d833fd271899b67d6a203acffa803 (patch)
tree4abe1c6a2e6bb3414356f846086a8f18b9919c33 /configure.ac
parentba87e5cb673992cee0fcb0bb3c90523974836a30 (diff)
downloadayatana-indicator-datetime-78e082682d5d833fd271899b67d6a203acffa803.tar.gz
ayatana-indicator-datetime-78e082682d5d833fd271899b67d6a203acffa803.tar.bz2
ayatana-indicator-datetime-78e082682d5d833fd271899b67d6a203acffa803.zip
Make Control Center panel optional
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac55
1 files changed, 39 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac
index 07f52d7..1b5dbf5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -103,14 +103,34 @@ PKG_CHECK_MODULES(SERVICE, indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION
gdk-3.0 >= GDK_REQUIRED_VERSION
gconf-2.0 >= GCONF_REQUIRED_VERSION)
-PKG_CHECK_MODULES(PREF, gio-2.0 >= $GIO_REQUIRED_VERSION
- gtk+-3.0 >= $GTK3_REQUIRED_VERSION
- json-glib-1.0
- libgnome-control-center
- polkit-gobject-1)
-
-PKG_CHECK_MODULES(LIBMAP, gio-2.0 >= $GIO_REQUIRED_VERSION
- gtk+-3.0 >= $GTK3_REQUIRED_VERSION)
+###########################
+# Control Center panel
+###########################
+
+AC_ARG_WITH([ccpanel],
+ AS_HELP_STRING([--with-ccpanel], [enable Control Center panel]),,
+ with_ccpanel=auto)
+
+if test x"$with_ccpanel" != x"no" ; then
+ PKG_CHECK_MODULES(PREF, gio-2.0 >= $GIO_REQUIRED_VERSION
+ gtk+-3.0 >= $GTK3_REQUIRED_VERSION
+ json-glib-1.0
+ libgnome-control-center
+ polkit-gobject-1,
+ [have_ccpanel=yes],
+ [have_ccpanel=no])
+ if test x${have_ccpanel} = xyes; then
+ AC_DEFINE(HAVE_CCPANEL, 1, [Define to 1 to enable Control Center panel])
+ PKG_CHECK_MODULES(LIBMAP, gio-2.0 >= $GIO_REQUIRED_VERSION
+ gtk+-3.0 >= $GTK3_REQUIRED_VERSION)
+ fi
+ if test x${with_ccpanel} = xyes && test x${have_ccpanel} = xno; then
+ AC_MSG_ERROR([Control Center panel configured but not found])
+ fi
+else
+ have_ccpanel=no
+fi
+AM_CONDITIONAL(BUILD_CCPANEL, test x${have_ccpanel} = xyes)
###########################
# Grab the GSettings Macros
@@ -151,16 +171,18 @@ AC_SUBST(INDICATORICONSDIR)
# Control Center Info
###########################
-AS_IF([test "x$with_localinstall" = "xyes"],
- [
- CCPANELDIR="${libdir}/control-center-1/panels/"
- ],
+AS_IF([test "x$have_ccpanel" = "xyes"],
[
- CCPANELDIR=`$PKG_CONFIG --variable=extensiondir libgnome-control-center`
- ])
-
-AC_SUBST(CCPANELDIR)
+ AS_IF([test "x$with_localinstall" = "xyes"],
+ [
+ CCPANELDIR="${libdir}/control-center-1/panels/"
+ ],
+ [
+ CCPANELDIR=`$PKG_CONFIG --variable=extensiondir libgnome-control-center`
+ ])
+ AC_SUBST(CCPANELDIR)
+ ])
###########################
# DBus Service Info
###########################
@@ -224,5 +246,6 @@ Date and Time Indicator Configuration:
Prefix: $prefix
Indicator Dir: $INDICATORDIR
+ CC Panel: $have_ccpanel
CC Panel Dir: $CCPANELDIR
])