aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-11-29 16:19:34 -0600
committerTed Gould <ted@gould.cx>2011-11-29 16:19:34 -0600
commit77699eb5a22ed5da6b008368486121e9ef7fc4e0 (patch)
tree775c03375ff3bb04e7482b123459c1acf899d9a4 /configure.ac
parentdba878e3338b85c6c3e121b738448f687941e03e (diff)
parentb3d54d8b5d90cdaaa7169a25e9c9a8823d6ef61c (diff)
downloadayatana-indicator-session-77699eb5a22ed5da6b008368486121e9ef7fc4e0.tar.gz
ayatana-indicator-session-77699eb5a22ed5da6b008368486121e9ef7fc4e0.tar.bz2
ayatana-indicator-session-77699eb5a22ed5da6b008368486121e9ef7fc4e0.zip
Making the gtk logout helper and apt optional build time choices
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac54
1 files changed, 45 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 0e20a91..d47d754 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,21 +77,55 @@ AS_IF([test "x$with_gtk" = x3],
AC_SUBST(SESSIONERVICE_CFLAGS)
AC_SUBST(SESSIONERVICE_LIBS)
-AS_IF([test "x$with_gtk" = x3],
- [PKG_CHECK_MODULES(GTKLOGOUTHELPER, gtk+-3.0 >= $GTK3_REQUIRED_VERSION
- polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
- ],
- [test "x$with_gtk" = x2],
- [PKG_CHECK_MODULES(GTKLOGOUTHELPER, gtk+-2.0 >= $GTK_REQUIRED_VERSION
- polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
- ]
-)
+###########################
+# GTK Logout Helper
+###########################
+AC_ARG_ENABLE([gtklogouthelper],
+ AS_HELP_STRING([--enable-gtklogouthelper], [enable GTK Logout Helper]),,
+ enable_gtklogouthelper=auto)
+
+if test x"$enable_gtklogouthelper" != x"no" ; then
+ AS_IF([test "x$with_gtk" = x3],
+ [PKG_CHECK_MODULES(GTKLOGOUTHELPER, gtk+-3.0 >= $GTK3_REQUIRED_VERSION
+ polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
+ [have_gtklogouthelper=yes],
+ [have_gtklogouthelper=no])
+ ],
+ [test "x$with_gtk" = x2],
+ [PKG_CHECK_MODULES(GTKLOGOUTHELPER, gtk+-2.0 >= $GTK_REQUIRED_VERSION
+ polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
+ [have_gtklogouthelper=yes],
+ [have_gtklogouthelper=no])
+ ]
+ )
+ if test x${have_gtklogouthelper} = xyes; then
+ AC_DEFINE(HAVE_GTKLOGOUTHELPER, 1, [Define to 1 to enable GTK Logout Helper])
+ fi
+ if test x${enable_gtklogouthelper} = xyes && test x${have_gtklogouthelper} = xno; then
+ AC_MSG_ERROR([GTK Logout Helper configured but polkit-gobject not found])
+ fi
+else
+ have_gtklogouthelper=no
+fi
+AM_CONDITIONAL(BUILD_GTKLOGOUTHELPER, test x${have_gtklogouthelper} = xyes)
AC_SUBST(GTKLOGOUTHELPER_CFLAGS)
AC_SUBST(GTKLOGOUTHELPER_LIBS)
###########################
+# APT support
+###########################
+AC_ARG_ENABLE([apt],
+ AC_HELP_STRING([--disable-apt], [disable APT support]),,
+ [enable_apt=yes])
+AM_CONDITIONAL([BUILD_APT], [test "x$enable_apt" != "xno"])
+
+if test "x$enable_apt" != "xno"; then
+ AC_DEFINE(HAVE_APT, 1, [Define to 1 to enable APT support])
+fi
+
+###########################
# Check to see if we're local
###########################
@@ -192,4 +226,6 @@ SUS Indicator Configuration:
Prefix: $prefix
Indicator Dir: $INDICATORDIR
Indicator GTK: $with_gtk
+ Logout Helper: $have_gtklogouthelper
+ APT support: $enable_apt
])