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

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
From 32b630692a319c14fc2cdba7e6f34404bf47957b Mon Sep 17 00:00:00 2001
From: Michael Biebl <[email protected]>
Date: Tue, 30 Sep 2014 05:38:25 +0200
Subject: [PATCH] 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 | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index e24ce73..af6efb5 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])
-- 
2.1.1

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to