diff --git a/doc/build/check-dtd.xml b/doc/build/check-dtd.xml new file mode 100644 index 00000000000..8d361447a19 --- /dev/null +++ b/doc/build/check-dtd.xml @@ -0,0 +1,3 @@ + + diff --git a/meson.build b/meson.build index ab8101d67b2..fb8ce940bbe 100644 --- a/meson.build +++ b/meson.build @@ -621,7 +621,11 @@ docs_opt = get_option('docs') docs_dep = not_found_dep if not docs_opt.disabled() if xmllint_bin.found() and xsltproc_bin.found() - docs_dep = declare_dependency() + if run_command(xmllint_bin, '--nonet', '--valid', '--noout', 'doc/build/check-dtd.xml', check: false).returncode() != 0 + error('missing required DocBook XML DTD (probably missing package docbook-xsl)') + else + docs_dep = declare_dependency() + endif elif docs_opt.enabled() error('missing required tools (xmllint and xsltproc needed) for docs in HTML / man page format') endif