[Xfce4-commits] [apps/xfce4-screensaver] 120/425: configure: fix --with-systemd=auto

noreply at xfce.org noreply at xfce.org
Mon Oct 15 01:49:27 CEST 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screensaver.

commit 891196bc95d9be45c446206407383b65454b404f
Author: raveit65 <chat-to-me at raveit.de>
Date:   Thu Oct 3 20:50:36 2013 +0200

    configure: fix --with-systemd=auto
---
 configure.ac | 32 +++++++++++++++++++++++---------
 1 file changed, 23 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1d7c401..911f9c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -936,18 +936,32 @@ dnl ---------------------------------------------------------------------------
 
 AC_ARG_WITH(systemd,
             AS_HELP_STRING([--with-systemd],
-            [Add systemd support]),,
-            with_systemd=auto)
+            [Add systemd support]),
+            [with_systemd=$withval], [with_systemd=auto])
+
+PKG_CHECK_MODULES(SYSTEMD,
+                  [libsystemd-login libsystemd-daemon],
+                  [have_systemd=yes], [have_systemd=no])
+
+if test "x$with_systemd" = "xauto" ; then
+        if test x$have_systemd = xno ; then
+                use_systemd=no
+        else
+                use_systemd=yes
+        fi
+else
+	use_systemd=$with_systemd
+fi
 
-use_systemd=no
-if test "x$with_systemd" != "xno" ; then
-    use_systemd=yes
-    AC_DEFINE(WITH_SYSTEMD, 1, [systemd support])
+if test "x$use_systemd" = "xyes"; then
+        if test "x$have_systemd" = "xno"; then
+                AC_MSG_ERROR([Systemd support explicitly required, but systemd not found])
+        fi
 
-    PKG_CHECK_MODULES(SYSTEMD, libsystemd-login libsystemd-daemon)
+        AC_DEFINE(WITH_SYSTEMD, 1, [systemd support])
 fi
-AM_CONDITIONAL(WITH_SYSTEMD, test x$use_systemd = xyes)
-AC_SUBST(WITH_SYSTEMD)
+AC_SUBST(SYSTEMD_CFLAGS)
+AC_SUBST(SYSTEMD_LIBS)
 
 dnl ---------------------------------------------------------------------------
 dnl libmatekbd

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list