diff options
author | Frederico Cadete <frederico@cadete.eu> | 2015-09-28 00:30:09 +0200 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2015-09-28 17:28:27 -0700 |
commit | 5eb025a867b42f8bc7bc73279eac8de58e51a13e (patch) | |
tree | 6984f7976dcc30e61d1128ed532886c6aedc2b65 /configure.ac | |
parent | 1a42ca1596e1ef6789c32638fac67baeb8834743 (diff) | |
download | weston-5eb025a867b42f8bc7bc73279eac8de58e51a13e.tar.gz |
configure.ac: add support for new versions of systemd
Starting from systemd version 209, a single libsystemd.pc is provided.
For previous versions, fall back on libsystemd-login.pc.
Signed-off-by: Frederico Cadete <frederico@cadete.eu>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 045291c4..a9cd429b 100644 --- a/configure.ac +++ b/configure.ac @@ -380,14 +380,23 @@ AC_ARG_ENABLE(resize-optimization, AS_IF([test "x$enable_resize_optimization" = "xyes"], [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])]) -PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login >= 198], - [have_systemd_login=yes], [have_systemd_login=no]) +PKG_CHECK_MODULES(SYSTEMD_LOGIN, + [libsystemd >= 209], + [have_systemd_login_209=yes;have_systemd_login=yes], + [have_systemd_login_209=no;have_systemd_login=no]) + +# Older versions of systemd package systemd-login separately. Fall back on that +AS_IF([test x$have_systemd_login != xyes],[ + PKG_CHECK_MODULES(SYSTEMD_LOGIN, + [libsystemd-login >= 198], + [have_systemd_login=yes], + [have_systemd_login=no]) + ]) + AS_IF([test "x$have_systemd_login" = "xyes"], [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])]) AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes") -PKG_CHECK_MODULES(SYSTEMD_LOGIN_209, [libsystemd-login >= 209], - [have_systemd_login_209=yes], [have_systemd_login_209=no]) AS_IF([test "x$have_systemd_login_209" = "xyes"], [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])]) |