daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
9fc0f6
From f338abbfbc3e385dda57ebc22769e54ab3f5edc8 Mon Sep 17 00:00:00 2001
9fc0f6
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
9fc0f6
Date: Fri, 27 Dec 2013 23:44:27 -0500
9fc0f6
Subject: [PATCH] man: include autoconf snippet in daemon(7)
9fc0f6
9fc0f6
https://bugs.freedesktop.org/show_bug.cgi?id=40446
9fc0f6
---
9fc0f6
 man/daemon.xml | 20 ++++++++++++++------
9fc0f6
 1 file changed, 14 insertions(+), 6 deletions(-)
9fc0f6
9fc0f6
diff --git a/man/daemon.xml b/man/daemon.xml
9fc0f6
index 1fe4546..105826a 100644
9fc0f6
--- a/man/daemon.xml
9fc0f6
+++ b/man/daemon.xml
9fc0f6
@@ -765,12 +765,20 @@
9fc0f6
 
9fc0f6
                         <programlisting>PKG_PROG_PKG_CONFIG
9fc0f6
 AC_ARG_WITH([systemdsystemunitdir],
9fc0f6
-        AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
9fc0f6
-        [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
9fc0f6
-if test "x$with_systemdsystemunitdir" != xno; then
9fc0f6
-        AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
9fc0f6
-fi
9fc0f6
-AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])</programlisting>
9fc0f6
+     AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),,
9fc0f6
+     [with_systemdsystemunitdir=auto])
9fc0f6
+AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [
9fc0f6
+     def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
9fc0f6
+
9fc0f6
+     AS_IF([test "x$def_systemdsystemunitdir" = "x"],
9fc0f6
+         [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
9fc0f6
+                [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
9fc0f6
+          with_systemdsystemunitdir=no],
9fc0f6
+         [with_systemdsystemunitdir=$def_systemdsystemunitdir])])
9fc0f6
+AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
9fc0f6
+      [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
9fc0f6
+AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$with_systemdsystemunitdir" != "xno"])
9fc0f6
+</programlisting>
9fc0f6
 
9fc0f6
                         <para>This snippet allows automatic
9fc0f6
                         installation of the unit files on systemd