From cd8bc06e8786018ddb16cea4cb10971b63d0efd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Wed, 3 Jul 2019 04:20:37 +0200 Subject: [PATCH] autoconf: Add comment on use of `false`. This is to avoid confusion as in commit a0d29040f79b365598fe75d01f72d29ab538206b. --- configure.ac | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index f510f8a9..1e3a8091 100644 --- a/configure.ac +++ b/configure.ac @@ -119,10 +119,12 @@ if test -z "$$1"; then fi ]) +# Note: Usage of `AC_PATH_PROG(..., ..., false)` indicates that this program +# is not required in all cases. (e.g. not when building from a release tarball). +# The use of `false` isn't ideal, because when used somewhere in the build it +# will silently fail without error message; this should be improved. NEED_PROG(bash, bash) NEED_PROG(patch, patch) -AC_PATH_PROG(xmllint, xmllint, false) -AC_PATH_PROG(xsltproc, xsltproc, false) AC_PATH_PROG(flex, flex, false) AC_PATH_PROG(bison, bison, false) NEED_PROG(sed, sed) @@ -258,8 +260,12 @@ AC_ARG_ENABLE(doc-gen, AC_HELP_STRING([--disable-doc-gen], doc_generate=$enableval, doc_generate=yes) AC_SUBST(doc_generate) -# Check if docbook works without Internet (if not, likely packages providing the .xsl files are not installed) if test "$doc_generate" = yes; then + # Programs required to build the manual + NEED_PROG(xmllint, xmllint) + NEED_PROG(xsltproc, xsltproc) + + # Check if docbook works without Internet (if not, likely packages providing the .xsl files are not installed) AC_MSG_CHECKING([if docbook can run without networking]) if "$xsltproc" --nonet --novalid http://docbook.sourceforge.net/release/xsl-ns/current/profiling/profile.xsl >&AS_MESSAGE_LOG_FD 2>&1; then AC_MSG_RESULT(yes)