From 2715604894ca3cbcd23d53584c8adc36a320d408 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Tue, 14 Oct 2025 15:28:21 +0200 Subject: [PATCH] auth and rec: Allow selecting a specific version of Lua with meson Signed-off-by: Otto Moerbeek --- meson/lua-records/meson.build | 2 +- meson/lua/meson.build | 7 +++++++ meson_options.txt | 2 +- pdns/recursordist/meson_options.txt | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/meson/lua-records/meson.build b/meson/lua-records/meson.build index a13cea6505..6871bcf3d4 100644 --- a/meson/lua-records/meson.build +++ b/meson/lua-records/meson.build @@ -3,7 +3,7 @@ opt_lua_records = get_option('lua-records') dep_libcurl = dependency('libcurl', version: '>= 7.21.3', required: opt_lua_records) conf.set('HAVE_LIBCURL', dep_libcurl.found(), description: 'Whether we have libcurl') -opt_lua_enabled = opt_lua in ['auto', 'luajit', 'lua'] +opt_lua_enabled = opt_lua in ['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'] if not opt_lua_enabled error('Lua records require Lua, make sure it is enabled') diff --git a/meson/lua/meson.build b/meson/lua/meson.build index ab014f1882..db00e9871a 100644 --- a/meson/lua/meson.build +++ b/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/meson_options.txt b/meson_options.txt index e9b61ae147..994c8fccd5 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,4 +1,4 @@ -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') diff --git a/pdns/recursordist/meson_options.txt b/pdns/recursordist/meson_options.txt index e1f6d7545e..f0a3750ebc 100644 --- a/pdns/recursordist/meson_options.txt +++ b/pdns/recursordist/meson_options.txt @@ -1,4 +1,4 @@ -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