build-sys: use merged systemd library

Since systemd 209 released in Feb 2014 three systemd libraries
including systemd-login have been merged. This change merely
checks for, and links to, the new library.

References:
  http://lists.freedesktop.org/archives/systemd-devel/2014-February/017146.html
  https://bugs.debian.org/731256
This commit is contained in:
Craig Small 2015-07-09 22:12:10 +10:00
parent 35db857ce7
commit 4e7f42375a

View File

@ -150,10 +150,10 @@ AC_ARG_WITH([systemd],
[], [with_systemd=no]
)
if test "x$with_systemd" != xno; then
PKG_CHECK_MODULES([SYSTEMD], [libsystemd-login >= 206], [], [
AC_CHECK_LIB(systemd-login, sd_pid_get_slice, [have_systemd=yes], [have_systemd=no])
PKG_CHECK_MODULES([SYSTEMD], [libsystemd], [], [
AC_CHECK_LIB(systemd, sd_pid_get_slice, [have_systemd=yes], [have_systemd=no])
if test "x$have_systemd" = xno; then
AC_MSG_ERROR([systemd support missing/incomplete (requires >= 206)])
AC_MSG_ERROR([systemd support missing/incomplete (requires >= 209)])
fi
SYSTEMD_LIBS="-lsystemd-login"
])