Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | From 5eb025a867b42f8bc7bc73279eac8de58e51a13e Mon Sep 17 00:00:00 2001 |
| 2 | From: Frederico Cadete <frederico@cadete.eu> |
| 3 | Date: Mon, 28 Sep 2015 00:30:09 +0200 |
| 4 | Subject: configure.ac: add support for new versions of systemd |
| 5 | |
| 6 | Starting from systemd version 209, a single libsystemd.pc is provided. |
| 7 | For previous versions, fall back on libsystemd-login.pc. |
| 8 | |
| 9 | Signed-off-by: Frederico Cadete <frederico@cadete.eu> |
| 10 | Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> |
| 11 | Reviewed-by: Derek Foreman <derekf@osg.samsung.com> |
| 12 | |
| 13 | Upstream-Status: Backport |
| 14 | Backported from Weston git: |
| 15 | http://cgit.freedesktop.org/wayland/weston/commit/?id=5eb025 |
| 16 | |
| 17 | Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk> |
| 18 | |
| 19 | diff --git a/configure.ac b/configure.ac |
| 20 | index 045291c..a9cd429 100644 |
| 21 | --- a/configure.ac |
| 22 | +++ b/configure.ac |
| 23 | @@ -380,14 +380,23 @@ AC_ARG_ENABLE(resize-optimization, |
| 24 | AS_IF([test "x$enable_resize_optimization" = "xyes"], |
| 25 | [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])]) |
| 26 | |
| 27 | -PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login >= 198], |
| 28 | - [have_systemd_login=yes], [have_systemd_login=no]) |
| 29 | +PKG_CHECK_MODULES(SYSTEMD_LOGIN, |
| 30 | + [libsystemd >= 209], |
| 31 | + [have_systemd_login_209=yes;have_systemd_login=yes], |
| 32 | + [have_systemd_login_209=no;have_systemd_login=no]) |
| 33 | + |
| 34 | +# Older versions of systemd package systemd-login separately. Fall back on that |
| 35 | +AS_IF([test x$have_systemd_login != xyes],[ |
| 36 | + PKG_CHECK_MODULES(SYSTEMD_LOGIN, |
| 37 | + [libsystemd-login >= 198], |
| 38 | + [have_systemd_login=yes], |
| 39 | + [have_systemd_login=no]) |
| 40 | + ]) |
| 41 | + |
| 42 | AS_IF([test "x$have_systemd_login" = "xyes"], |
| 43 | [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])]) |
| 44 | AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes") |
| 45 | |
| 46 | -PKG_CHECK_MODULES(SYSTEMD_LOGIN_209, [libsystemd-login >= 209], |
| 47 | - [have_systemd_login_209=yes], [have_systemd_login_209=no]) |
| 48 | AS_IF([test "x$have_systemd_login_209" = "xyes"], |
| 49 | [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])]) |
| 50 | |
| 51 | -- |
| 52 | cgit v0.10.2 |
| 53 | |