xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony.perard@citrix.com>
To: xen-devel@lists.xen.org
Cc: Anthony PERARD <anthony.perard@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [PATCH for-4.7] configure: Fix when no libsystemd compat lib are available
Date: Tue, 3 May 2016 16:59:49 +0100	[thread overview]
Message-ID: <1462291190-20234-1-git-send-email-anthony.perard@citrix.com> (raw)

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

             reply	other threads:[~2016-05-03 15:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03 15:59 Anthony PERARD [this message]
2016-05-04 11:25 ` [PATCH for-4.7] configure: Fix when no libsystemd compat lib are available Wei Liu
2016-05-04 15:26   ` Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1462291190-20234-1-git-send-email-anthony.perard@citrix.com \
    --to=anthony.perard@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).