summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-02-02 05:06:25 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-02-07 16:06:33 +0000
commitba71873c7299f9aa58a1e0537ab11831b98ab376 (patch)
tree92706108b476bcaf4c67c6db68ba74ea946b07a5 /configure.ac
parent7eca1ce532c9e1af68fb059f29a34ff25a5ac850 (diff)
downloaddbus-ba71873c7299f9aa58a1e0537ab11831b98ab376.tar.gz
at_console: ask systemd whether a user is at the console
systemd manages seats and users. This patch optionally asks systemd whether a user is at the console. It used libsystemd-login for that, a low-level library that allows querying this kind of information without expensive round trips. In order to be nice to the Debian folks this patch falls back to traditional modes of operation if systemd is not found to be around. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39609 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6ecea15e..2b9e740d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,6 +137,7 @@ AC_ARG_ENABLE(kqueue, AS_HELP_STRING([--enable-kqueue],[build with kqueue suppor
AC_ARG_ENABLE(console-owner-file, AS_HELP_STRING([--enable-console-owner-file],[enable console owner file]),enable_console_owner_file=$enableval,enable_console_owner_file=auto)
AC_ARG_ENABLE(userdb-cache, AS_HELP_STRING([--enable-userdb-cache],[build with userdb-cache support]),enable_userdb_cache=$enableval,enable_userdb_cache=yes)
AC_ARG_ENABLE(launchd, AS_HELP_STRING([--enable-launchd],[build with launchd auto-launch support]),enable_launchd=$enableval,enable_launchd=auto)
+AC_ARG_ENABLE(systemd, AS_HELP_STRING([--enable-systemd],[build with systemd at_console support]),enable_systemd=$enableval,enable_systemd=auto)
AC_ARG_WITH(xml, AS_HELP_STRING([--with-xml=[libxml/expat]],[XML library to use (libxml may be named libxml2 on some systems)]))
AC_ARG_WITH(init-scripts, AS_HELP_STRING([--with-init-scripts=[redhat]],[Style of init scripts to install]))
@@ -1134,6 +1135,26 @@ fi
AM_CONDITIONAL(HAVE_CONSOLE_OWNER_FILE, test x$have_console_owner_file = xyes)
+dnl systemd detection
+if test x$enable_systemd = xno ; then
+ have_systemd=no;
+else
+ PKG_CHECK_MODULES(SYSTEMD,
+ [ libsystemd-login libsystemd-daemon ],
+ have_systemd=yes,
+ have_systemd=no)
+ AC_SUBST(SYSTEMD_CFLAGS)
+ AC_SUBST(SYSTEMD_LIBS)
+fi
+
+if test x$have_systemd = xyes; then
+ AC_DEFINE(HAVE_SYSTEMD,1,[Have systemd])
+fi
+
+if test x$enable_systemd = xyes -a x$have_systemd != xyes ; then
+ AC_MSG_ERROR([Explicitly requested systemd support, but systemd not found])
+fi
+
# libaudit detection
if test x$enable_libaudit = xno ; then
have_libaudit=no;
@@ -1720,6 +1741,7 @@ echo "
Building inotify support: ${have_inotify}
Building dnotify support: ${have_dnotify}
Building kqueue support: ${have_kqueue}
+ Building systemd support: ${have_systemd}
Building X11 code: ${enable_x11}
Building Doxygen docs: ${enable_doxygen_docs}
Building XML docs: ${enable_xml_docs}