diff options
author | Pavel Šimerda <psimerda@redhat.com> | 2015-01-06 15:07:02 +0100 |
---|---|---|
committer | Pavel Šimerda <psimerda@redhat.com> | 2015-01-06 15:20:30 +0100 |
commit | 4c629b03104e7ae10b805b956581482a3879f66b (patch) | |
tree | 8a7192ef41ad11b22518058ef96de926164b39f1 | |
parent | f7880cf114f57054b05e0c805833b41ce392a513 (diff) | |
download | NetworkManager-4c629b03104e7ae10b805b956581482a3879f66b.tar.gz |
session: prefer new configure options
The main motivation for this change is to be able to build configure
command lines that will work for both old and new versions of
NetworkManager.
Acked-By: Thomas Haller <thaller@redhat.com>
-rw-r--r-- | configure.ac | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac index 8d66ecdb44..bf253a5d1b 100644 --- a/configure.ac +++ b/configure.ac @@ -339,26 +339,28 @@ AC_ARG_WITH(consolekit, AS_HELP_STRING([--with-consolekit=yes|no], [Support consolekit session tracking])) AC_ARG_WITH(session-tracking, AS_HELP_STRING([--with-session-tracking=systemd|consolekit|no], [Compatibility option to choose one session tracking module])) -# defaults -AS_IF([test -z "$with_systemd_logind"], [with_systemd_logind="yes"]) -AS_IF([test -z "$with_consolekit"], [with_consolekit="yes"]) # backwards compatibility -AS_IF([test "$with_session_tracking" = "ck"], [with_consolekit="yes" with_systemd_logind="no"]) -AS_IF([test "$with_session_tracking" = "consolekit"], [with_consolekit="yes" with_systemd_logind="no"]) -AS_IF([test "$with_session_tracking" = "systemd"], [with_consolekit="no" with_systemd_logind="yes"]) -AS_IF([test "$with_session_tracking" = "no"], [with_consolekit="no" with_systemd_logind="no"]) -AS_IF([test "$with_session_tracking" = "none"], [with_consolekit="no" with_systemd_logind="no"]) -unset with_session_tracking +AS_IF([test "$with_session_tracking" = "ck"], [use_consolekit="yes" use_systemd_logind="no"]) +AS_IF([test "$with_session_tracking" = "consolekit"], [use_consolekit="yes" use_systemd_logind="no"]) +AS_IF([test "$with_session_tracking" = "systemd"], [use_consolekit="no" use_systemd_logind="yes"]) +AS_IF([test "$with_session_tracking" = "no"], [use_consolekit="no" use_systemd_logind="no"]) +AS_IF([test "$with_session_tracking" = "none"], [use_consolekit="no" use_systemd_logind="no"]) +# current options +AS_IF([test -n "$with_systemd_logind" ], [use_systemd_logind="$with_systemd_logind"]) +AS_IF([test -n "$with_consolekit" ], [use_consolekit="$with_consolekit"]) +# defaults +AS_IF([test -z "$use_systemd_logind"], [use_systemd_logind="yes"]) +AS_IF([test -z "$use_consolekit"], [use_consolekit="yes"]) # output session_tracking= -if test "$with_systemd_logind" = "yes"; then +if test "$use_systemd_logind" = "yes"; then PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login]) AC_SUBST(SYSTEMD_LOGIN_CFLAGS) AC_SUBST(SYSTEMD_LOGIN_LIBS) AC_DEFINE([SESSION_TRACKING_SYSTEMD], 1, [Define to 1 if libsystemd-login is available]) session_tracking="$session_tracking, systemd-logind" fi -if test "$with_consolekit" = "yes"; then +if test "$use_consolekit" = "yes"; then AC_DEFINE([SESSION_TRACKING_CONSOLEKIT], 1, [Define to 1 if ConsoleKit is available]) AC_DEFINE([CKDB_PATH], "/var/run/ConsoleKit/database", [Path to ConsoleKit database]) session_tracking="$session_tracking, consolekit" |