From 4b8ec36731ddc675df0d5b56751243231068b1df Mon Sep 17 00:00:00 2001 From: Fred Morcos Date: Fri, 28 Jul 2023 11:24:25 +0200 Subject: [PATCH] Meson: Lua records --- meson.build | 1 + meson/lua-records/meson.build | 21 +++++++++++++++++++++ meson_options.txt | 1 + 3 files changed, 23 insertions(+) create mode 100644 meson/lua-records/meson.build diff --git a/meson.build b/meson.build index ce1e831875..cca334bc9f 100644 --- a/meson.build +++ b/meson.build @@ -32,6 +32,7 @@ subdir('meson/pthread-headers') # Check pthread headers subdir('meson/pthread-setname') # Pthread setname madness subdir('meson/strerror') # Strerror_r subdir('meson/lua') # Lua +subdir('meson/lua-records') # Lua Records subdir('meson/hardening') # Hardening subdir('meson/kiss-rng') # Unsafe KISS RNG subdir('meson/net-libs') # Network Libraries diff --git a/meson/lua-records/meson.build b/meson/lua-records/meson.build new file mode 100644 index 0000000000..16b330a33e --- /dev/null +++ b/meson/lua-records/meson.build @@ -0,0 +1,21 @@ +# Lua Records +# Inputs: conf deps opt_lua dep_lua + +opt_lua_records = get_option('lua-records') + +dep_libcurl = dependency('libcurl', version: '>= 7.21.3', required: opt_lua_records) +conf.set10('HAVE_LIBCURL', dep_libcurl.found(), description: 'Whether we have libcurl') + +opt_lua_enabled = opt_lua in ['auto', 'luajit', 'lua'] + +if not opt_lua_enabled + error('Lua records require Lua, make sure it is enabled') +endif + +if not dep_lua.found() + error('Lua records require Lua, make sure it is detected on your system') +endif + +found = opt_lua_records and opt_lua_enabled and dep_lua.found() and dep_libcurl.found() +conf.set10('HAVE_LUA_RECORDS', found, description: 'Whether we have Lua records') +summary('Lua Records', found, bool_yn: true, section: 'Configuration') diff --git a/meson_options.txt b/meson_options.txt index 7322971447..da13931d4c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -37,3 +37,4 @@ option('module-lmdb', type: 'boolean', value: false, description: 'Build the LMD option('module-lmdb-dyn', type: 'boolean', value: false, description: 'Build the dynamically loadable LMDB backend') option('tools', type: 'boolean', value: false, description: 'Build the extra tools') option('ixfrdist', type: 'boolean', value: false, description: 'Build ixfrdist') +option('lua-records', type: 'boolean', value: true, description: 'Build support for Lua records') -- 2.47.2