]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: Lua records
authorFred Morcos <fred.morcos@open-xchange.com>
Fri, 28 Jul 2023 09:24:25 +0000 (11:24 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:30 +0000 (13:28 +0100)
meson.build
meson/lua-records/meson.build [new file with mode: 0644]
meson_options.txt

index ce1e831875dbb6fa7a5d2644c97ae769b9720246..cca334bc9f72957ba1fc8b899c9b2968e2960e4a 100644 (file)
@@ -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 (file)
index 0000000..16b330a
--- /dev/null
@@ -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')
index 7322971447a840d04716dd8d9dc187487061eb51..da13931d4c0bf1c4beeb76ac4d961276a9dbc3ba 100644 (file)
@@ -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')