1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
From: Michael Biebl <biebl@debian.org>
Date: Tue, 30 Sep 2014 05:38:25 +0200
Subject: Support building against libsystemd 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
---
configure.ac | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 3c216a2..b6eb201 100644
--- a/configure.ac
+++ b/configure.ac
@@ -329,7 +329,9 @@ 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
@@ -340,7 +342,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"
@@ -354,7 +357,8 @@ case $with_suspend_resume in
upower) ;;
systemd)
# Link against libsystemd-daemon for sd_booted()
- PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd-login >= 183 libsystemd-daemon])
+ PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd >= 209],,
+ [PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd-login >= 183 libsystemd-daemon])])
;;
*)
AC_MSG_ERROR(--with-suspend-resume must be one of [upower, systemd])
|