All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-4.5] systemd: use pkg-config to determine systemd library availability
@ 2014-12-02 15:11 Wei Liu
  2014-12-02 15:15 ` Ian Campbell
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Wei Liu @ 2014-12-02 15:11 UTC (permalink / raw)
  To: xen-devel
  Cc: Mark Pryor, Wei Liu, Ian Campbell, Luis R. Rodriguez, Ian Jackson,
	Anthony Perard

AC_CHECK_LIB fails on Debian Jessie since the ld flag it generates is
incorrect, even in the event systemd library is available.  Use
PKG_CHECK_MODULES instead.

Tested on Debian Jessie and Arch Linux.

Please rerun autogen.sh after applying this patch.

Reported-by: Mark Pryor <tlviewer@yahoo.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Cc: Mark Pryor <tlviewer@yahoo.com>
---
 m4/systemd.m4 | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/m4/systemd.m4 b/m4/systemd.m4
index a832d59..b04964b 100644
--- a/m4/systemd.m4
+++ b/m4/systemd.m4
@@ -42,13 +42,6 @@ AC_DEFUN([AX_ALLOW_SYSTEMD_OPTS], [
 ])
 
 AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [
-	AC_CHECK_HEADER([systemd/sd-daemon.h], [
-	    AC_CHECK_LIB([systemd-daemon], [sd_listen_fds], [libsystemddaemon="y"])
-	])
-	AS_IF([test "x$libsystemddaemon" = x], [
-	    AC_MSG_ERROR([Unable to find a suitable libsystemd-daemon library])
-	])
-
 	PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon])
 	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
@@ -98,9 +91,8 @@ AC_DEFUN([AX_CHECK_SYSTEMD], [
 ])
 
 AC_DEFUN([AX_CHECK_SYSTEMD_ENABLE_AVAILABLE], [
-	AC_CHECK_HEADER([systemd/sd-daemon.h], [
-	    AC_CHECK_LIB([systemd-daemon], [sd_listen_fds], [systemd="y"])
-	])
+	PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon], [systemd="y"],
+                          [systemd="n"])
 ])
 
 dnl Enables systemd by default and requires a --disable-systemd option flag
-- 
2.1.3

^ permalink raw reply related	[flat|nested] 16+ messages in thread
* Re: [PATCH for-4.5] systemd: use pkg-config to determine systemd library availability
@ 2014-12-04 12:13 Konrad Rzeszutek Wilk
  2014-12-04 13:27 ` Ian Campbell
  0 siblings, 1 reply; 16+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-12-04 12:13 UTC (permalink / raw)
  To: Ian Campbell
  Cc: Mark Pryor, Olaf Hering, Wei Liu, Luis R. Rodriguez, Ian Jackson,
	xen-devel, M A Young, Anthony Perard


On Dec 4, 2014 6:55 AM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>
> On Wed, 2014-12-03 at 10:51 +0000, Ian Campbell wrote: 
> > On Wed, 2014-12-03 at 11:49 +0100, Olaf Hering wrote: 
> > > On Wed, Dec 03, Ian Campbell wrote: 
> > > 
> > > > Ah I didn't know about the sd_listen_fds thing, so I think that what we 
> > > > need then is to use pkg-config first to determine if systemd-daemon is 
> > > > present at all, and then check for specific symbols we require using the 
> > > > pkg-config supplied CFLAGS and LDFLAGS rather than assuming 
> > > > -lsystemd-daemon. 
> > > 
> > > Correction: sd_listen_fds is available since at least v1. 
> > >  git describe --contains abbbea81a8fa70badb7a05e518d6b07c360fc09d 
> > >  v1~390 
> > 
> > In that case I don't think we realistically need to check for it? 
>
> The implication here being that Wei's original patch is correct. Konrad, 
> do you think this is OK for the release? 
>
> > 

Yes. Release-Axked-By: Konrad Rzeszutek Wilk <Konrad.wilk@oracle.com>
> > Ian. 
> > 
> > 
> > 
> > _______________________________________________ 
> > Xen-devel mailing list 
> > Xen-devel@lists.xen.org 
> > http://lists.xen.org/xen-devel 
>
>
>
> _______________________________________________ 
> Xen-devel mailing list 
> Xen-devel@lists.xen.org 
> http://lists.xen.org/xen-devel 
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

end of thread, other threads:[~2014-12-05 10:02 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-02 15:11 [PATCH for-4.5] systemd: use pkg-config to determine systemd library availability Wei Liu
2014-12-02 15:15 ` Ian Campbell
2014-12-02 18:37 ` Konrad Rzeszutek Wilk
2014-12-03 10:26   ` Olaf Hering
2014-12-03 10:28     ` Ian Campbell
2014-12-03 10:49       ` Olaf Hering
2014-12-03 10:51         ` Ian Campbell
2014-12-03 10:55           ` Olaf Hering
2014-12-03 21:05             ` Konrad Rzeszutek Wilk
2014-12-03 21:20               ` M A Young
2014-12-04 11:55           ` Ian Campbell
2014-12-05  9:51 ` Olaf Hering
2014-12-05  9:59   ` Ian Campbell
2014-12-05 10:02     ` Olaf Hering
  -- strict thread matches above, loose matches on Subject: below --
2014-12-04 12:13 Konrad Rzeszutek Wilk
2014-12-04 13:27 ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.