]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Config check for asciidoc and generated manpages.
authorArlo Breault <arlolra@gmail.com>
Tue, 14 May 2013 17:18:28 +0000 (10:18 -0700)
committerNick Mathewson <nickm@torproject.org>
Fri, 24 May 2013 18:38:58 +0000 (14:38 -0400)
If USE_ASCIIDOC is enabled but asciidoc isn't present and manpages
aren't already generated, it'll throw a warning during configure.
Works with the current git / tarball split.

Caveat: regular_mans are listed in the configure.ac

See #6506

configure.ac

index 03155dc892ffd32fbacc6f5ab94d64d48633f747..2a53dd85aa2a792142b12adc8432da3816f6ef4d 100644 (file)
@@ -1468,6 +1468,22 @@ AC_CONFIG_FILES([
         src/config/torrc.sample
 ])
 
+if test x$asciidoc = xtrue && test $ASCIIDOC = "none" ; then
+  regular_mans=(doc/tor doc/tor-gencert doc/tor-resolve doc/torify)
+  for file in $regular_mans ; do
+    if ! [[ -f $file.1.in ]] || ! [[ -f $file.html.in ]] ; then
+      echo "==================================";
+      echo;
+      echo "You need asciidoc installed to be able to build the manpage.";
+      echo "To build without manpages, use the --disable-asciidoc argument";
+      echo "when calling configure.";
+      echo;
+      echo "==================================";
+      exit 1;
+    fi
+  done
+fi
+
 AC_OUTPUT
 
 if test -x /usr/bin/perl && test -x ./contrib/updateVersions.pl ; then