From: "Henrique F. Simoes" <henriquesimoes@riseup.net>
Date: Sun, 9 Feb 2025 20:28:14 -0300
Subject: Don't install manpage source with disabled docs

Users should be able to disable documentation installation with
`configure --enable-doc=no`. However, procServ.txt is still installed
when that flag is provided. Teach automake how to properly honor the
--enable-doc=no option by moving the manpage source file along with its
generated files, guarded by `if INSTALL_DOC`.

Fixes: bea57e9 (change doc generation configure option, 2009-11-08)
Co-authored-by: Carlos Henrique Lima Melara <charlesmelara@riseup.net>
---

Forwarded: https://github.com/ralphlange/procServ/pull/65

 Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 0e2444c..4cbe3b1 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,12 +23,12 @@ EXTRA_DIST += procServUtils
 EXTRA_DIST += manage-procs procServ-launcher setup.py
 EXTRA_DIST += systemd-procserv-generator-system systemd-procserv-generator-user
 
-doc_DATA = AUTHORS COPYING ChangeLog NEWS README.md procServ.txt
+doc_DATA = AUTHORS COPYING ChangeLog NEWS README.md
 
 if INSTALL_DOC
 
 dist_man1_MANS = procServ.1
-dist_doc_DATA = procServ.pdf procServ.html
+dist_doc_DATA = procServ.txt procServ.pdf procServ.html
 
 if WITH_SYSTEMD_UTILS
 dist_man1_MANS += manage-procs.1
