aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Van Assche <me@dylanvanassche.be>2020-11-27 18:07:02 +0100
committerDylan Van Assche <me@dylanvanassche.be>2020-11-27 18:07:02 +0100
commit756894bc7682250821c3b80e96fea66d73a3e837 (patch)
tree5ca598c03143b67eda52648f72734af244223243
parent1f0c04644dd48b086bc00f9765f94342f3badc3f (diff)
build: Allow elogind for suspend/resume support
-rw-r--r--configure.ac7
1 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index e3c9a4f8..032c4c4c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -248,13 +248,14 @@ dnl
PKG_CHECK_MODULES(LIBSYSTEMD, [libsystemd >= 209],[have_libsystemd=yes],[have_libsystemd=no])
PKG_CHECK_MODULES(LIBSYSTEMD_LOGIN, [libsystemd-login >= 183],[have_libsystemd_login=yes],[have_libsystemd_login=no])
+PKG_CHECK_MODULES(LIBELOGIND, [libelogind >= 209], [have_elogind=yes], [have_elogind=no])
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])
if test "x$with_systemd_suspend_resume" = "xauto"; then
- if test "x$have_libsystemd" = "xyes" || test "x$have_libsystemd_login" = "xyes"; then
+ if test "x$have_libsystemd" = "xyes" || test "x$have_libsystemd_login" = "xyes" || test "x$have_elogind" = "xyes"; then
with_systemd_suspend_resume=yes
else
with_systemd_suspend_resume=no
@@ -263,8 +264,8 @@ fi
case $with_systemd_suspend_resume in
yes)
- if test "x$have_libsystemd" = "xno" && test "x$have_libsystemd_login" = "xno"; then
- AC_MSG_ERROR(libsystemd or libsystemd-login development headers are required)
+ 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])
;;