summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build12
1 files changed, 11 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 1ba9899..c75394a 100644
--- a/meson.build
+++ b/meson.build
@@ -114,7 +114,6 @@ if maintainer_mode and not mm_common_get.found()
mm_common_get = find_program('mm-common-get', required: true)
endif
m4 = find_program('m4', required: maintainer_mode) # For building C++ code
-perl = find_program('perl', required: build_documentation)
doxygen = find_program('doxygen', required: build_documentation)
dot = find_program('dot', required: build_documentation) # Used by Doxygen
xsltproc = find_program('xsltproc', required: build_documentation)
@@ -141,6 +140,17 @@ sys.exit(os.path.isfile("@0@"))
endif
endif
+# Check if perl is required and available.
+# Done now, when the doc_reference script is available.
+doc_perl_prop = run_command(
+ python3, doc_reference, 'get_script_property',
+ '', # MMDOCTOOLDIR is not used
+ 'requires_perl')
+if not (doc_perl_prop.returncode() == 0 and doc_perl_prop.stdout() == 'false')
+ # Perl is required, if documentation shall be built.
+ perl = find_program('perl', required: build_documentation)
+endif
+
# Set compiler warnings.
warning_flags = []
if warning_level == 'min'