Commit 39a0c81a authored by Martin Pitt's avatar Martin Pitt Committed by Dan Winship
Browse files

configure: Check libsystemd-login version for suspend-resume

Some distributions (Debian and Ubuntu in particular) will soon use systemd's
logind, but not its init part. Check for a recent enough "libsystemd-login"
version instead of "systemd", as suspend/resume and inhibitors are all in
logind.

https://bugzilla.gnome.org/show_bug.cgi?id=698947
parent 190d8aa8
......@@ -308,7 +308,7 @@ AC_MSG_RESULT($with_session_tracking)
AC_ARG_WITH(suspend-resume, AS_HELP_STRING([--with-suspend-resume=upower|systemd], [Build NetworkManager with specific suspend/resume support]))
if test "z$with_suspend_resume" = "z"; then
PKG_CHECK_EXISTS([systemd >= 183], [have_systemd_inhibit=yes], [have_systemd_inhibit=no])
PKG_CHECK_EXISTS([libsystemd-login >= 183], [have_systemd_inhibit=yes], [have_systemd_inhibit=no])
if test "z${have_systemd_inhibit}" = "zyes"; then
# Use systemd if it's new enough
with_suspend_resume="systemd"
......@@ -321,7 +321,7 @@ fi
case $with_suspend_resume in
upower) ;;
systemd)
PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [systemd >= 183])
PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd-login >= 183])
;;
*)
AC_MSG_ERROR(--with-suspend-resume must be one of [upower, systemd])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment