diff options
author | Niklas Hambüchen <mail@nh2.me> | 2019-07-03T01·34+0200 |
---|---|---|
committer | Niklas Hambüchen <mail@nh2.me> | 2019-07-03T02·32+0200 |
commit | c3db9e6f8fd06d691be04cdd95a6bb21a400481d (patch) | |
tree | b06f04cb4355876e50d8eee17a98da95b1810d5b /configure.ac | |
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.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a52830b3835f..f510f8a97828 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]) |