Ticket #6506: 0001-Config-check-for-asciidoc-and-generated-manpages.patch

File 0001-Config-check-for-asciidoc-and-generated-manpages.patch, 1.4 KB (added by arlolra, 6 years ago)
  • configure.ac

    From e88c6cf93987c663a30e1c9d2abe5c9764e7d617 Mon Sep 17 00:00:00 2001
    From: Arlo Breault <arlolra@gmail.com>
    Date: Tue, 14 May 2013 10:18:28 -0700
    Subject: [PATCH] Config check for asciidoc and generated manpages.
    
    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 | 16 ++++++++++++++++
     1 file changed, 16 insertions(+)
    
    diff --git a/configure.ac b/configure.ac
    index 03155dc..2a53dd8 100644
    a b AC_CONFIG_FILES([ 
    14681468        src/config/torrc.sample
    14691469])
    14701470
     1471if test x$asciidoc = xtrue && test $ASCIIDOC = "none" ; then
     1472  regular_mans=(doc/tor doc/tor-gencert doc/tor-resolve doc/torify)
     1473  for file in $regular_mans ; do
     1474    if ! [[ -f $file.1.in ]] || ! [[ -f $file.html.in ]] ; then
     1475      echo "==================================";
     1476      echo;
     1477      echo "You need asciidoc installed to be able to build the manpage.";
     1478      echo "To build without manpages, use the --disable-asciidoc argument";
     1479      echo "when calling configure.";
     1480      echo;
     1481      echo "==================================";
     1482      exit 1;
     1483    fi
     1484  done
     1485fi
     1486
    14711487AC_OUTPUT
    14721488
    14731489if test -x /usr/bin/perl && test -x ./contrib/updateVersions.pl ; then