From d78efdd98d68ce604fe41a959803a711ec4f0e78 Mon Sep 17 00:00:00 2001 From: Luca Toniolo <10792599+grandixximo@users.noreply.github.com> Date: Sat, 30 May 2026 22:15:18 +0800 Subject: [PATCH] build: hard-fail configure if asciidoctor is missing The manpage build rule in docs/src/Submakefile invokes asciidoctor for every halcompile-built manpage, independent of --enable-build-documentation. The configure probe for it was nested inside `if BUILD_DOCS = yes`, so a plain `./configure --enable-run-in-place` (no docs opt-in) silently passed and later crashed make with `asciidoctor: command not found` (issue #4084). Move the probe out of the BUILD_DOCS gate and promote the warning to a hard error pointing at the package name on Debian / Fedora / RubyGems. The PDF / HTML / Rouge probes stay gated since they only matter when --enable-build-documentation was passed. --- src/configure.ac | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/configure.ac b/src/configure.ac index 3d00a98eb54..68396f2630b 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -1067,16 +1067,19 @@ AC_ARG_ENABLE(build-documentation, # --enable-build-documentation=html). =html itself warn-and-disables # only the missing PDF tools; users who want PDF best-effort can pass # =html and rebuild after installing the missing tools. -if ( test "$BUILD_DOCS" = "yes" ) ; then - AC_PATH_PROG(ASCIIDOCTOR,asciidoctor,"none") - if ( test "none" = "$ASCIIDOCTOR" ) ; then - AC_MSG_WARN([no asciidoctor, documentation cannot be built -install with "sudo apt-get install asciidoctor"]) - BUILD_DOCS=no - BUILD_DOCS_PDF=no - BUILD_DOCS_HTML=no - fi +# asciidoctor is required unconditionally: the manpage build rule in +# docs/src/Submakefile invokes it for every halcompile-built manpage +# (5axisgui.1 etc.), independent of --enable-build-documentation. +# Without it `make` later dies with "asciidoctor: command not found" +# in the middle of the build. Hard-fail at configure time instead. +AC_PATH_PROG(ASCIIDOCTOR,asciidoctor,"none") +if ( test "none" = "$ASCIIDOCTOR" ) ; then + AC_MSG_ERROR([no asciidoctor, manpages cannot be built +install with "sudo apt-get install asciidoctor" on Debian / Ubuntu, +"sudo dnf install rubygem-asciidoctor" on Fedora, or "gem install asciidoctor"]) +fi +if ( test "$BUILD_DOCS" = "yes" ) ; then if ( test "$BUILD_DOCS" = "yes" ) ; then AC_PATH_PROG(GS,gs,"none") if ( test "none" = "$GS" ) ; then