anitazha / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone

Blame SOURCES/0166-man-include-autoconf-snippet-in-daemon-7.patch

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