From: Emil Velikov <emil.veli...@collabora.com>

Current systemd/systemd-login integration requires dbus. Although that
is far from clear the way current checks are handled.

Be explicit and clear, effectively fixing cases where the systemd
auto detection will trip when dbus is explicitly disabled.

Using git show -w will make things easier to read ;-)

Cc: Michael Tretter <m.tret...@pengutronix.de>
Reported-by: Michael Tretter <m.tret...@pengutronix.de>
Signed-off-by: Emil Velikov <emil.veli...@collabora.com>
---
Michael, can you give this a try instead?
---
 configure.ac | 29 +++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/configure.ac b/configure.ac
index dd344d6a..89b89d3c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -524,7 +524,11 @@ AC_ARG_ENABLE(systemd-login,
               AS_HELP_STRING([--enable-systemd-login],
                              [Enable logind support]),,
               enable_systemd_login=auto)
-if test x$enable_systemd_login != xno -a x$have_dbus != xno; then
+if test x$enable_systemd_login != xno; then
+  if test x$enable_systemd_login = xyes -a x$enable_dbus = xno; then
+    AC_MSG_ERROR([systemd-login support explicitly requested, but dbus not 
available])
+  fi
+
   PKG_CHECK_MODULES(SYSTEMD_LOGIN,
                     [libsystemd >= 209],
                     [have_systemd_login_209=yes;have_systemd_login=yes],
@@ -537,20 +541,21 @@ if test x$enable_systemd_login != xno -a x$have_dbus != 
xno; then
                           [have_systemd_login=yes],
                           [have_systemd_login=no])
         ])
-else
-  have_systemd_login=no
-fi
 
-if test "x$have_systemd_login" = "xno" -a "x$enable_systemd_login" = "xyes"; 
then
-  AC_MSG_ERROR([systemd-login support explicitly enabled, but can't find 
libsystemd>=209, libsystemd-login or dbus])
-fi
+  if test "x$have_systemd_login" = "xno" -a "x$enable_systemd_login" = "xyes"; 
then
+    AC_MSG_ERROR([systemd-login support explicitly requested, but can't find 
libsystemd>=209 or libsystemd-login])
+  fi
 
-AS_IF([test "x$have_systemd_login" = "xyes"],
-      [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])])
-AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes")
+  if test "x$have_systemd_login" = "xyes"; then
+    AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])]
+  else
+    have_systemd_login=no
+  fi
 
-AS_IF([test "x$have_systemd_login_209" = "xyes"],
-      [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])])
+  AS_IF([test "x$have_systemd_login_209" = "xyes"],
+        [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 
209])])
+fi
+AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes")
 
 
 # Note that other features might want libxml2, or this feature might use
-- 
2.16.0

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to