Patch from http://bugzilla.xfce.org/show_bug.cgi?id=9952 with modification to edit configure.ac (release tarball) instead of configure.ac.in (git) From 38afe446cdc889266f1e553952397cc4a876ecf8 Mon Sep 17 00:00:00 2001 From: Eric Koegel Date: Mon, 7 Jul 2014 11:30:06 +0300 Subject: [PATCH] Add suspend/hibernate to shutdown-helper Upower 0.99 dropped support for suspend/hibernate as an obsolete feature in this commit: http://cgit.freedesktop.org/upower/commit/?id=1ee642e705a63f5ad56a6b55e4bf5c4a64c959b8 Add that functionality into the shutdown-helper so these features will work again. Additionally Upower is an optional build dependency and the minimum required is 0.9.7 to support FreeBSD 9 and 10. --- configure.ac.in | 30 ++++++++ xfce4-session/Makefile.am | 4 +- xfce4-session/xfsm-shutdown.c | 167 +++++++++++++++++++++++++++++++++++++++++- xfce4-session/xfsm-upower.c | 8 +- xfce4-session/xfsm-upower.h | 4 + xfsm-shutdown-helper/main.c | 26 +++++++ 6 files changed, 234 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 910fd35..b9c9a90 100644 --- a/configure.ac +++ b/configure.ac @@ -96,6 +96,10 @@ XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.1.0]) XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84]) XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.9.0]) +dnl Check for Upower +XDT_CHECK_OPTIONAL_PACKAGE([UPOWER],[upower-glib], [0.9.7], + [upower],[Upower support]) + dnl Check for polkit / systemd integration XDT_CHECK_OPTIONAL_PACKAGE([SYSTEMD], [polkit-gobject-1], [0.100], [systemd], [Systemd support (through polit)]) @@ -157,6 +161,31 @@ if test "x$linux_ioprio_works" = "xyes"; then [Defined if linux/ioprio.h not only exists, but works properly]) fi +dnl Compile time default choice of backend +AC_ARG_WITH([backend], + AS_HELP_STRING([--with-backend=