summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAnton V. Boyarshinov <[email protected]>2013-04-08 18:33:55 +0400
committerAnton V. Boyarshinov <[email protected]>2013-04-08 18:33:55 +0400
commitb19ce03f92d310d8fef5781ee3384572e6ae10f8 (patch)
treed88a75f60cf25e12189f0595828c0cb7c2606d77 /configure.ac
parentfd2ea04942aa4459eefecac1807e4b3107266e76 (diff)
downloadmate-power-manager-b19ce03f92d310d8fef5781ee3384572e6ae10f8.tar.bz2
mate-power-manager-b19ce03f92d310d8fef5781ee3384572e6ae10f8.tar.xz
add logind sleep ability
With upower 0.9.20, sleep and hybernate functions of upower declared deprecated. All applications should use logind for sleep/hybernate. So, there is an implementation of logind-powered sleep for mpm.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 9a4e570..f4bd119 100644
--- a/configure.ac
+++ b/configure.ac
@@ -305,6 +305,27 @@ AM_CONDITIONAL(WITH_SYSTEMD_INHIBIT, test x$use_systemdinhibit = xyes)
AC_SUBST(WITH_SYSTEMD_INHIBIT)
dnl ---------------------------------------------------------------------------
+dnl systemd sleep
+dnl ---------------------------------------------------------------------------
+
+AC_ARG_WITH(systemdsleep,
+ AS_HELP_STRING([--with-systemdsleep],
+ [Use logind for suspend and hibernate instead of upower]),,
+ with_systemdsleep=auto)
+
+use_systemdsleep=no
+if test "x$with_systemdsleep" != "xno" ; then
+ PKG_CHECK_MODULES(SYSTEMD_SLEEP, libsystemd-login >= 195 libsystemd-daemon >= 195 , use_systemdsleep=yes, use_systemdsleep=no)
+
+ if test "x$use_systemdsleep" = "xyes"; then
+ AC_DEFINE(WITH_SYSTEMD_SLEEP, 1, [systemdsleeo support])
+ fi
+
+fi
+AM_CONDITIONAL(WITH_SYSTEMD_SLEEP, test x$use_systemdsleep = xyes)
+AC_SUBST(WITH_SYSTEMD_SLEEP)
+
+dnl ---------------------------------------------------------------------------
dnl - DocBook Documentation
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(docbook-docs,
@@ -419,6 +440,7 @@ echo "
Self test support: ${have_tests}
Use libunique: ${enable_libunique}
systemd support: ${use_systemdinhibit}
+ systemd sleep support: ${use_systemdsleep}
Docbook support: ${enable_docbook_docs}
documentation dir: $DOCDIR
dbus-1 services dir: $DBUS_SERVICES_DIR