summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorFrederico Cadete <frederico@cadete.eu>2015-09-28 00:30:10 +0200
committerBryce Harrington <bryce@osg.samsung.com>2015-09-29 18:15:33 -0700
commit8e1efcd40b3bad81c83744e2e120d70c2b567ef2 (patch)
treeb08c643a286c5ad2b67a5a6e402f190f565dc517 /configure.ac
parent94fd9a56942b28f19418e303fef7871099a8ff75 (diff)
downloadweston-8e1efcd40b3bad81c83744e2e120d70c2b567ef2.tar.gz
configure.ac: add explicit enable/disable for systemd-login support
Otherwise, auto-enable depending on whether the system has the necessary libraries. [Updated help text as per pq suggestion -- bwh] Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac36
1 files changed, 24 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index a9cd429b..67e80d0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -380,18 +380,30 @@ 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 >= 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])
- ])
+AC_ARG_ENABLE(systemd-login,
+ AS_HELP_STRING([--enable-systemd-login],
+ [Enable logind support]),,
+ enable_systemd_login=auto)
+if test x$enable_systemd_login != xno; then
+ 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])
+ ])
+else
+ have_systemd_login=no
+fi
+
+if test "x$have_systemd_login" = "xno" -a "x$enable_systemd_login" = "xyes"; then
+ AC_MSG_ERROR([systemd-login support explicitly enabled, but can't find libsystemd>=209 or libsystemd-login])
+fi
AS_IF([test "x$have_systemd_login" = "xyes"],
[AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])])