Command `perl --version` says, e.g., “This is perl 5, version 26, subversion 0 (v5.26.0)”, which Meson interprets as version 26. Signed-off-by: Peter Oliver <git@xxxxxxxxxxxx> --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index f01d81b39f..bf129205ad 100644 --- a/meson.build +++ b/meson.build @@ -755,7 +755,11 @@ endif # Note that we only set NO_PERL if the Perl features were disabled by the user. # It may not be set when we have found Perl, but only use it to run tests. -perl = find_program('perl', version: '>=5.26.0', dirs: program_path, required: perl_required) +# +# When checking here, it would be better to say, +# version: '>=5.26.0', version_argument: '-eprint "$^V"' +# but that requires Meson 1.5.0, which at the time of writing is rather new. +perl = find_program('perl', version: '>=26', dirs: program_path, required: perl_required) perl_features_enabled = perl.found() and get_option('perl').allowed() if perl_features_enabled build_options_config.set('NO_PERL', '') -- 2.48.1