--- configure.ac.orig 2015-02-28 17:28:11.000000000 +0100
+++ configure.ac 2016-01-02 01:37:51.000000000 +0100
@@ -190,7 +190,8 @@ if test x$with_backend = x; then
[*-linux*], [with_backend=linux],
[*-*freebsd*], [with_backend=freebsd],
[*-*dragonfly*], [with_backend=freebsd],
- [*-openbsd*], [with_backend=openbsd])
+ [*-openbsd*], [with_backend=openbsd],
+ [*-darwin*], [with_backend=darwin])
AC_DEFINE_UNQUOTED(BACKEND, "$with_backend", [backend])
AC_SUBST(BACKEND, "$with_backend")
if test x$with_backend = xopenbsd; then
AC_DEFINE(BACKEND_TYPE_OPENBSD, 1, [OpenBSD suspend/hibernate backend])
+if test x$with_backend = xdarwin; then
+ AC_DEFINE(BACKEND_TYPE_DARWIN, 1, [Darwin suspend/hibernate backend])
dnl check for location Xfce glade files were installed to
XFCE_GLADE_CATALOG_PATH="`pkg-config --variable glade_catalogdir libxfce4ui-1`"
--- xfce4-session/xfsm-shutdown-fallback.c.orig 2015-02-28 17:28:00.000000000 +0100
+++ xfce4-session/xfsm-shutdown-fallback.c 2016-01-02 01:09:29.000000000 +0100
@@ -291,6 +291,9 @@ xfsm_shutdown_fallback_can_suspend (void
#ifdef BACKEND_TYPE_OPENBSD
+#ifdef BACKEND_TYPE_DARWIN
--- xfsm-shutdown-helper/main.c.orig 2016-01-02 01:09:14.000000000 +0100
+++ xfsm-shutdown-helper/main.c 2016-01-02 01:28:03.000000000 +0100
#define UP_BACKEND_SUSPEND_COMMAND "/usr/sbin/zzz"
#define UP_BACKEND_HIBERNATE_COMMAND "/usr/sbin/ZZZ"
+#ifdef BACKEND_TYPE_DARWIN
+#define UP_BACKEND_SUSPEND_COMMAND "/usr/bin/pmset sleepnow" /* hibernatemode 0 */
+#define UP_BACKEND_HIBERNATE_COMMAND "/usr/bin/pmset sleepnow" /* hibernatemode 3 */