xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-4.7] configure: Fix when no libsystemd compat lib are available
@ 2016-05-03 15:59 Anthony PERARD
  2016-05-04 11:25 ` Wei Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Anthony PERARD @ 2016-05-03 15:59 UTC (permalink / raw)
  To: xen-devel; +Cc: Anthony PERARD, Wei Liu, Ian Jackson

From systemd change log, since version 209, libsystemd.so contain
everything, including libsystemd-daemon.so. Distro may, or may not provide
the compatibility libraries which libsystemd-daemon is part of.

So, if libsystemd-daemon is not available, check for the presence of
a recent enough libsystemd.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
Please, rerun ./autogen.sh on this patch.
---
 m4/systemd.m4 | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/m4/systemd.m4 b/m4/systemd.m4
index e4b1aa5..112dc11 100644
--- a/m4/systemd.m4
+++ b/m4/systemd.m4
@@ -41,7 +41,9 @@ AC_DEFUN([AX_ALLOW_SYSTEMD_OPTS], [
 ])
 
 AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [
-	PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon])
+	PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon],,
+		[PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209])]
+        )
 	dnl pkg-config older than 0.24 does not set these for
 	dnl PKG_CHECK_MODULES() worth also noting is that as of version 208
 	dnl of systemd pkg-config --cflags currently yields no extra flags yet.
@@ -94,8 +96,10 @@ AC_DEFUN([AX_CHECK_SYSTEMD], [
 ])
 
 AC_DEFUN([AX_CHECK_SYSTEMD_ENABLE_AVAILABLE], [
-	PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon], [systemd="y"],
-                          [systemd="n"])
+	PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon], [systemd="y"],[
+		PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209],
+				  [systemd="y"],[systemd="n"])
+	])
 ])
 
 dnl Enables systemd by default and requires a --disable-systemd option flag
-- 
Anthony PERARD


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-04 15:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-03 15:59 [PATCH for-4.7] configure: Fix when no libsystemd compat lib are available Anthony PERARD
2016-05-04 11:25 ` Wei Liu
2016-05-04 15:26   ` Wei Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).