summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2015-05-17 20:16:36 +0200
committerLubomir Rintel <lkundrak@v3.sk>2015-06-02 12:30:03 +0200
commite486a3803d74d406d014847cc88f50cd1cef87c7 (patch)
treedeb4fcbeb10d8473fc2c2fcc827ae21263fd9e7c
parentb9b7bb19586934dda19516ed37f50ca91d2e0f1b (diff)
downloadNetworkManager-e486a3803d74d406d014847cc88f50cd1cef87c7.tar.gz
build: don't abort configure if there's no systemd devel headers
Just disable systemd-logind session tracking instead.
-rw-r--r--configure.ac13
1 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 5f2eb2e851..442f25abd3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -364,12 +364,19 @@ AS_IF([test "$with_session_tracking" = "none"], [use_consolekit="no" use_systemd
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_systemd_logind"], [use_systemd_logind="auto"])
AS_IF([test -z "$use_consolekit"], [use_consolekit="yes"])
# output
session_tracking=
-if test "$use_systemd_logind" = "yes"; then
- PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd], , [PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login])])
+if test "$use_systemd_logind" = "yes" -o "$use_systemd_logind" = "auto"; then
+ PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd], [have_systemd_logind=yes], [PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login], [have_systemd_logind=yes], [have_systemd_logind=no])])
+else
+ have_systemd_logind=no
+fi
+if test "$use_systemd_logind" = "yes" -a "$have_systemd_logind" = "no"; then
+ AC_MSG_ERROR([You must have libsystemd installed to build with systemd-logind support.])
+fi
+if test "$have_systemd_logind" = "yes"; then
AC_SUBST(SYSTEMD_LOGIN_CFLAGS)
AC_SUBST(SYSTEMD_LOGIN_LIBS)
AC_DEFINE([SESSION_TRACKING_SYSTEMD], 1, [Define to 1 if libsystemd-login is available])