From e85ba9b1a7e7d5fc38d295e1538173893c79eaaf Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 13 Oct 2025 16:54:07 +0200 Subject: [PATCH] dnsdist: Allow selecting a specific version of Lua with meson Signed-off-by: Remi Gacogne --- pdns/dnsdistdist/meson/lua/meson.build | 7 +++++++ pdns/dnsdistdist/meson_options.txt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pdns/dnsdistdist/meson/lua/meson.build b/pdns/dnsdistdist/meson/lua/meson.build index 62aafc046b..c66ecfbb6a 100644 --- a/pdns/dnsdistdist/meson/lua/meson.build +++ b/pdns/dnsdistdist/meson/lua/meson.build @@ -12,6 +12,9 @@ endif if not dep_lua.found() and (opt_lua == 'auto' or opt_lua == 'lua') variants = [ + 'lua5.4', + 'lua-5.4', + 'lua54', 'lua5.3', 'lua-5.3', 'lua53', @@ -32,6 +35,10 @@ if not dep_lua.found() and (opt_lua == 'auto' or opt_lua == 'lua') endforeach endif +if not dep_lua.found() and opt_lua != 'lua' and opt_lua.startswith('lua') + dep_lua = dependency(opt_lua, version: '>= 5.1', required: false) +endif + if not dep_lua.found() error('No Lua implementation was found') endif diff --git a/pdns/dnsdistdist/meson_options.txt b/pdns/dnsdistdist/meson_options.txt index 3c95c5d8af..5fd8ac92d7 100644 --- a/pdns/dnsdistdist/meson_options.txt +++ b/pdns/dnsdistdist/meson_options.txt @@ -5,7 +5,7 @@ option('libsodium', type: 'feature', value: 'auto', description: 'Enable libsodi option('libcrypto', type: 'feature', value: 'auto', description: 'Enable OpenSSL libcrypto)') option('libcrypto-path', type: 'string', value: '', description: 'Custom path to find OpenSSL libcrypto') option('tls-gnutls', type: 'feature', value: 'auto', description: 'GnuTLS-based TLS') -option('lua', type: 'combo', choices: ['auto', 'luajit', 'lua'], value: 'auto', description: 'Lua implementation to use') +option('lua', type: 'combo', choices: ['auto', 'luajit', 'lua', 'lua51', 'lua-5.1', 'lua5.1', 'lua52', 'lua-5.2', 'lua5.2', 'lua53', 'lua-5.3', 'lua5.3', 'lua54', 'lua-5.4', 'lua5.4'], value: 'auto', description: 'Lua implementation to use') option('hardening', type: 'feature', value: 'auto', description: 'Compiler security checks') option('hardening-experimental-cf', type: 'combo', choices: ['disabled', 'full', 'branch', 'return', 'check'], value: 'disabled', description: 'Control Flow hardening') option('hardening-experimental-scp', type: 'feature', value: 'disabled', description: 'Stack Clash Protection') -- 2.47.3