systemd: use pkg-config to determine systemd library availability

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.

Reported-by: Mark Pryor <tlviewer@yahoo.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: 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>
[ ijc -- reran autogen.sh as requested ]
This commit is contained in:
Wei Liu authored and Ian Campbell committed 2014-12-04 12:17:14 +00:00
1 parent f688aec47c
commit e6c3d371d4
2 files changed
+64 -101

No files matched your search

+2 -10
View File
@@ -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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.