aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorRukun Mao <rmao@google.com>2022-05-13 20:43:32 +0000
committerAleksander Morgado <aleksander@aleksander.es>2022-06-09 08:32:13 +0000
commit3da84c207902b65b7b6a2de9c497966844f87dd9 (patch)
tree17c915338e26082af27f82fc95bc394bb3911d8a /configure.ac
parentac06052b97cc02e60ae1ed7a551727b3c14d6a22 (diff)
suspend: add suspend/resume support with powerd on ChromeOS
ModemManager handles suspend and resume signals sent from powerd Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/547
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 14 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 3b3f5b12..490c70f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -262,6 +262,10 @@ AC_ARG_WITH(systemd-suspend-resume,
AS_HELP_STRING([--with-systemd-suspend-resume=no|yes],
[Enable systemd suspend/resume support [[default=auto]]]),,
[with_systemd_suspend_resume=auto])
+AC_ARG_WITH(powerd-suspend-resume,
+ AS_HELP_STRING([--with-powerd-suspend-resume=no|yes],
+ [Enable powerd suspend/resume support [[default=no]]]),,
+ [with_powerd_suspend_resume=no])
if test "x$with_systemd_suspend_resume" = "xauto"; then
if test "x$have_libsystemd" = "xyes" || test "x$have_libsystemd_login" = "xyes" || test "x$have_elogind" = "xyes"; then
@@ -275,15 +279,23 @@ case $with_systemd_suspend_resume in
yes)
if test "x$have_libsystemd" = "xno" && test "x$have_libsystemd_login" = "xno" && test "x$have_elogind" = "xno"; then
AC_MSG_WARN(libsystemd, libsystemd-login or elogind must be available at runtime for suspend/resume support)
- fi
- AC_DEFINE(WITH_SYSTEMD_SUSPEND_RESUME, 1, [Define if you have systemd suspend-resume support])
+ fi
;;
*)
with_systemd_suspend_resume=no
;;
esac
+if test "x$with_systemd_suspend_resume" = "xyes" && test "x$with_powerd_suspend_resume" = "xyes"; then
+ AC_MSG_ERROR(--with_systemd_suspend_resume and --with_powerd_suspend_resume should not be selected at the same time)
+fi
+
+if test "x$with_systemd_suspend_resume" = "xyes" || test "x$with_powerd_suspend_resume" = "xyes"; then
+ AC_DEFINE(WITH_SUSPEND_RESUME, 1, [Define if you have systemd or powerd suspend-resume support])
+fi
+
AM_CONDITIONAL(WITH_SYSTEMD_SUSPEND_RESUME, test "x$with_systemd_suspend_resume" = "xyes")
+AM_CONDITIONAL(WITH_POWERD_SUSPEND_RESUME, test "x$with_powerd_suspend_resume" = "xyes")
dnl-----------------------------------------------------------------------------
dnl systemd journal support