diff options
author | Niklas Hambüchen <mail@nh2.me> | 2019-07-03 03:34:17 +0200 |
---|---|---|
committer | Niklas Hambüchen <mail@nh2.me> | 2019-07-03 04:32:25 +0200 |
commit | c3db9e6f8fd06d691be04cdd95a6bb21a400481d (patch) | |
tree | b06f04cb4355876e50d8eee17a98da95b1810d5b | |
parent | a96006d97fc87c5073f9a39db841625bdb7c401c (diff) |
autoconf: Check if --nonet works. Fixes #967 #506.
Also give a helpful error message on what package the user likely
has to install to make it work.
-rw-r--r-- | configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a52830b38..f510f8a97 100644 --- a/configure.ac +++ b/configure.ac @@ -258,6 +258,15 @@ 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 + 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) + else + AC_MSG_FAILURE([Building the manual requires 'xsltproc --nonet' to work. It did not. Perhaps you lack the necessary xsl files (e.g. package docbook-xsl-ns on Debian)?]) + fi +fi # Setuid installations. AC_CHECK_FUNCS([setresuid setreuid lchown]) |