AC_SUBST(GREETER_USER)
AC_DEFINE_UNQUOTED(GREETER_USER, "$GREETER_USER", User to run greeter as)
+AC_ARG_ENABLE(consolekit,
+ AS_HELP_STRING([--enable-consolekit],
+ [Build with ConsoleKit support @<:@default=yes@:>@]),,
+ enable_consolekit=yes)
+AM_CONDITIONAL(ENABLE_CONSOLEKIT, test x$enable_consolekit = xyes)
+
+if test x$enable_consolekit = xyes; then
+ AC_DEFINE(WITH_CONSOLEKIT, 1, [Define if ConsoleKit support is enabled])
+ AC_DEFINE(LOGIND_RUNNING(), 0,
+ [Define to a check for whether the system is running logind])
+fi
+
+AC_ARG_ENABLE(logind,
+ AS_HELP_STRING([--enable-logind],
+ [Build with systemd logind support @<:@default=no@:>@]),,
+ enable_logind=no)
+AM_CONDITIONAL(ENABLE_LOGIND, test x$enable_logind = xyes)
+
+if test x$enable_logind = xyes; then
+ AC_DEFINE(WITH_LOGIND, 1, [Define if systemd logind support is enabled])
+ AC_DEFINE(LOGIND_RUNNING(), (access("/run/systemd/seats/", F_OK) >= 0),
+ [Define to a check for whether the system is running logind])
+fi
+
+if test x$enable_consolekit = xno -a x$enable_logind = xno; then
+ AC_MSG_ERROR(one of --enable-consolekit or --enable-logind must be supplied)
+fi
+
dnl ###########################################################################
dnl Documentation
dnl ###########################################################################
liblightdm-gobject/liblightdm-gobject-1.pc
liblightdm-gobject/Makefile
liblightdm-qt/Makefile
-liblightdm-qt/liblightdm-qt-3.pc
-liblightdm-qt/liblightdm-qt5-3.pc
+liblightdm-qt/liblightdm-qt-2.pc
+liblightdm-qt/liblightdm-qt5-2.pc
po/Makefile.in
src/Makefile
tests/Makefile
liblightdm-qt: $compile_liblightdm_qt4
liblightdm-qt5: $compile_liblightdm_qt5
Enable tests: $enable_tests
+ ConsoleKit support: $enable_consolekit
+ logind support: $enable_logind
"