From 2027302e803a9569a370b429a475dae5ef8afe34 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 19 Dec 2011 22:37:05 -0500 Subject: Add optional systemd support When configured with --enable-systemd, this patch makes polkit use systemd for session tracking instead of ConsoleKit. Signed-off-by: David Zeuthen --- configure.ac | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 2ed8401..51d6890 100644 --- a/configure.ac +++ b/configure.ac @@ -147,6 +147,26 @@ if test "x$GCC" = "xyes"; then LDFLAGS="-Wl,--as-needed $LDFLAGS" fi +dnl --------------------------------------------------------------------------- +dnl - Select wether to use systemd or ConsoleKit for session tracking +dnl --------------------------------------------------------------------------- + +AC_ARG_ENABLE([systemd], + AS_HELP_STRING([--enable-systemd], [Use systemd]), + [with_systemd=$enableval], + [with_systemd=no]) +if test "$with_systemd" = "yes" ; then + PKG_CHECK_MODULES(SYSTEMD, [libsystemd-login]) + SESSION_TRACKING=systemd +else + SESSION_TRACKING=ConsoleKit +fi + +AC_SUBST(SYSTEMD_CFLAGS) +AC_SUBST(SYSTEMD_LIBS) + +AM_CONDITIONAL(HAVE_SYSTEMD, [test "$with_systemd" = "yes"], [Using systemd]) + dnl --------------------------------------------------------------------------- dnl - Select which authentication framework to use dnl --------------------------------------------------------------------------- @@ -449,7 +469,8 @@ echo " introspection: ${found_introspection} Distribution/OS: ${with_os_type} - authentication framework: ${POLKIT_AUTHFW} + Authentication framework: ${POLKIT_AUTHFW} + Session tracking: ${SESSION_TRACKING} PAM support: ${have_pam}" if test "$have_pam" = yes ; then @@ -459,7 +480,6 @@ echo " PAM file password: ${PAM_FILE_INCLUDE_PASSWORD} PAM file session: ${PAM_FILE_INCLUDE_SESSION}" fi - echo " Maintainer mode: ${USE_MAINTAINER_MODE} Building verbose mode: ${enable_verbose_mode} -- cgit v1.2.3