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>
dev
Frederico Cadete 9 years ago committed by Bryce Harrington
parent 94fd9a5694
commit 8e1efcd40b
  1. 36
      configure.ac

@ -380,18 +380,30 @@ AC_ARG_ENABLE(resize-optimization,
AS_IF([test "x$enable_resize_optimization" = "xyes"], AS_IF([test "x$enable_resize_optimization" = "xyes"],
[AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])]) [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
PKG_CHECK_MODULES(SYSTEMD_LOGIN, AC_ARG_ENABLE(systemd-login,
[libsystemd >= 209], AS_HELP_STRING([--enable-systemd-login],
[have_systemd_login_209=yes;have_systemd_login=yes], [Enable logind support]),,
[have_systemd_login_209=no;have_systemd_login=no]) enable_systemd_login=auto)
if test x$enable_systemd_login != xno; then
# Older versions of systemd package systemd-login separately. Fall back on that PKG_CHECK_MODULES(SYSTEMD_LOGIN,
AS_IF([test x$have_systemd_login != xyes],[ [libsystemd >= 209],
PKG_CHECK_MODULES(SYSTEMD_LOGIN, [have_systemd_login_209=yes;have_systemd_login=yes],
[libsystemd-login >= 198], [have_systemd_login_209=no;have_systemd_login=no])
[have_systemd_login=yes],
[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"], AS_IF([test "x$have_systemd_login" = "xyes"],
[AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])]) [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])])

Loading…
Cancel
Save