summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2014-09-30 05:38:25 +0200
committerDan Williams <dcbw@redhat.com>2014-09-30 12:34:24 -0500
commit8f6317f88a3ca3f42cf72137bb033b4a020b7b82 (patch)
tree4fde1a4672c549a793ea126ad5c1e3b8c4ea3e93
parent94c3f1f70fc071775290f343051d1c0a98af3487 (diff)
build: support building against libsystemd >= 209 library
In systemd v209, the various libraries were merged into a single libsystemd library [1]. Add support for building against this new library and fall back to the old library names if not found. [1] http://lists.freedesktop.org/archives/systemd-devel/2014-February/017146.html
-rw-r--r--configure.ac9
1 files changed, 6 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 13bd82d203..6da2e5f286 100644
--- a/configure.ac
+++ b/configure.ac
@@ -331,7 +331,8 @@ AS_IF([! (echo "$with_session_tracking" | grep -q -E "^(systemd|consolekit|no)$"
AM_CONDITIONAL(SESSION_TRACKING_CK, test "$with_session_tracking" = "consolekit")
AM_CONDITIONAL(SESSION_TRACKING_SYSTEMD, test "$with_session_tracking" = "systemd")
if test "$with_session_tracking" = "systemd"; then
- PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login])
+ PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd],,
+ [PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login])])
AC_SUBST(SYSTEMD_LOGIN_CFLAGS)
AC_SUBST(SYSTEMD_LOGIN_LIBS)
fi
@@ -342,7 +343,8 @@ 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([libsystemd-login >= 183], [have_systemd_inhibit=yes], [have_systemd_inhibit=no])
+ PKG_CHECK_EXISTS([libsystemd >= 209], [have_systemd_inhibit=yes],
+ [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"
@@ -355,7 +357,8 @@ fi
case $with_suspend_resume in
upower) ;;
systemd)
- PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd-login >= 183])
+ PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd >= 209],,
+ [PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd-login >= 183])])
;;
*)
AC_MSG_ERROR(--with-suspend-resume must be one of [upower, systemd])