]> git.alsa-project.org Git - alsa-utils.git/commitdiff
configure.ac: add a check for rst2man, a reStructuredText man page generator
authorAntonio Ospite <ao2@ao2.it>
Fri, 9 Dec 2016 13:02:30 +0000 (14:02 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 9 Dec 2016 16:22:11 +0000 (17:22 +0100)
Define a USE_RST2MAN conditional so that, when available, rst2man can be
used to generate man pages from reStructuredText source files.

The code follows what is done to check for xmlto.

On Debian system, the rst2man executable is provided by python-docutils
or python3-docutils.

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
configure.ac

index c9629bbb13dc130bb12df46425e5af62a6087b02..d8fcf0f47741218a38af85a6c2ca96a927a45dd3 100644 (file)
@@ -175,6 +175,15 @@ if test "$xmlto" = "yes"; then
 fi
 AM_CONDITIONAL(USE_XMLTO, test x"$xmlto_available" = xyes)
 
+rst2man_available=""
+AC_ARG_ENABLE(rst2man,
+ AS_HELP_STRING([--disable-rst2man], [Disable man page creation via rst2man]),
+ rst2man="$enableval", rst2man="yes")
+if test "$rst2man" = "yes"; then
+  AC_CHECK_PROG([rst2man_available], [rst2man], [yes])
+fi
+AM_CONDITIONAL(USE_RST2MAN, test x"$rst2man_available" = xyes)
+
 AC_ARG_WITH(
         [udev-rules-dir],
         AS_HELP_STRING([--with-udev-rules-dir=DIR],[Directory where to install udev rules to (default=auto)]),