diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2016-03-01 11:46:36 +0100 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2016-03-01 11:55:47 +0100 |
commit | eb01d32221c540a179bb32f122bce3b4ca7d21c2 (patch) | |
tree | 997940a9f17cb9c410f9d040a2cf8a18b6e46910 | |
parent | fff3058216e68afedf74ed027a93ea188f402f2d (diff) |
buildsys: Support libsystemd in addition to libsystemd-login
Since systemd 209, the various systemd helper libraries are gathered in
a single libsystemd, and libsystemd-login is only built when systemd is
built with compat libraries support. Since commit
https://github.com/systemd/systemd/commit/4de282c
"build-sys: drop libsystemd-{id128,daemon,login,journal}.so compat libs"
(2016-02-12), these compat libraries are no longer available.
This commit checks for both libsystemd and libsystemd-login to ensure we
can build on both older and newer systemd versions.
https://bugs.freedesktop.org/show_bug.cgi?id=94209
-rw-r--r-- | configure.ac | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index ca9a15b..de72ea2 100644 --- a/configure.ac +++ b/configure.ac @@ -84,9 +84,16 @@ PKG_CHECK_MODULES(ALSA, [alsa >= 1.0.22]) if test "$with_session_info" = "auto" || test "$with_session_info" = "systemd"; then PKG_CHECK_MODULES([LIBSYSTEMD_LOGIN], - [libsystemd-login >= 42], + [libsystemd >= 209], [have_libsystemd_login="yes"], [have_libsystemd_login="no"]) + if test "$have_libsystemd_login" = "no"; then + # for backward compatibility with older systemd versions + PKG_CHECK_MODULES([LIBSYSTEMD_LOGIN], + [libsystemd-login >= 42], + [have_libsystemd_login="yes"], + [have_libsystemd_login="no"]) + fi if test x"$have_libsystemd_login" = "xno" && test "$with_session_info" = "systemd"; then AC_MSG_ERROR([libsystemd-login support explicitly requested, but some required packages are not available]) fi |