From e95d542de51e76121c9a7740bf8efcb235662040 Mon Sep 17 00:00:00 2001 From: Adrian Thurston Date: Thu, 18 Nov 2021 09:09:13 -0800 Subject: enforce manual build dependencies only if manual is requested If the manual is requested, then check for asciidoc and pygmentize. Fail configuration if either are not present. refs #132 --- configure.ac | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 836ab9f0..aa127b68 100644 --- a/configure.ac +++ b/configure.ac @@ -79,9 +79,6 @@ AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable debug statements]), AC_DEFINE([DEBUG], [1], [enable debug statements])) -AC_CHECK_PROG([ASCIIDOC], [asciidoc], [asciidoc]) -AC_CHECK_PROG([PYGMENTIZE], [pygmentize], [pygmentize]) -AM_CONDITIONAL([BUILD_MANUAL], [test "x$ASCIIDOC" != x && test "x$PYGMENTIZE" != x]) dnl Do not build the manual by default. Most of the time the dependencies are dnl not available, as they can be quite big installs. @@ -95,8 +92,13 @@ AC_ARG_ENABLE(manual, [ if test "x$enableval" = "xyes"; then build_manual=yes; - else - build_manual=no; + + AC_CHECK_PROG([ASCIIDOC], [asciidoc], [asciidoc]) + AC_CHECK_PROG([PYGMENTIZE], [pygmentize], [pygmentize]) + + if [test "x$ASCIIDOC" == x || test "x$PYGMENTIZE" == x]; then + AC_ERROR([must have both asciidoc and pygmentize to build the manual]) + fi fi ], ) -- cgit v1.2.1