[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH for-4.5] systemd: use pkg-config to determine systemd library availability



On Tue, Dec 02, 2014 at 03:11:30PM +0000, Wei Liu wrote:
> 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.

And Fedora and SuSE? CC-ing the other distro maintainers
for their input.

> 
> Please rerun autogen.sh after applying this patch.
> 
> Reported-by: Mark Pryor <tlviewer@xxxxxxxxx>
> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> Cc: Anthony Perard <anthony.perard@xxxxxxxxxx>
> Cc: Luis R. Rodriguez <mcgrof@xxxxxxxxxxxxxxxx>
> Cc: Mark Pryor <tlviewer@xxxxxxxxx>
> ---
>  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
> 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.