naccyde / rpms / systemd

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