From: Fred Morcos Date: Wed, 26 Jul 2023 12:57:16 +0000 (+0200) Subject: Meson: Auth LMDB backend X-Git-Tag: rec-5.1.0-alpha1~80^2~322 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8de4fd912b654dc27563f5a4786418547e87393;p=thirdparty%2Fpdns.git Meson: Auth LMDB backend --- diff --git a/meson.build b/meson.build index 21a9ce444d..b279dd61ca 100644 --- a/meson.build +++ b/meson.build @@ -112,19 +112,21 @@ opt_socket_dir = get_option('socket-dir') # Modules all_modules = [ - ['gmysql', 'mysql'], - ['godbc', 'odbc'], - ['gpgsql', 'pgsql'], - ['gsqlite3', 'sqlite3'], - ['ldap', 'ldap'], - ['remote', 'curl'], - ['tinydns', 'cdb'], - ['geoip', 'geoip'], + ['gmysql', ['mysql']], + ['godbc', ['odbc']], + ['gpgsql', ['pgsql']], + ['gsqlite3', ['sqlite3']], + ['ldap', ['ldap']], + ['remote', ['curl']], + ['tinydns', ['cdb']], + ['geoip', ['geoip']], + ['lmdb', ['lmdb', 'boost-serialization']], ] selected_modules = [] +selected_dyn_modules = [] foreach module: all_modules name = module[0] - dep = module[1] + module_deps = module[1] opt = get_option('module-' + name) opt_dyn = get_option('module-' + name + '-dyn') @@ -133,11 +135,18 @@ foreach module: all_modules selected_modules += name endif - if name == 'remote' and not opt_unittests - continue # We only need cURL for unit tests. + if opt_dyn + selected_dyn_modules += name endif - subdir('meson' / dep) + foreach dep: module_deps + if name == 'remote' and dep == 'curl' and not opt_unittests + continue # We only need cURL for unit tests. + endif + + subdir('meson' / dep) + endforeach + # TODO Also build the actual backend. endif endforeach diff --git a/meson/lmdb/meson.build b/meson/lmdb/meson.build new file mode 100644 index 0000000000..32b3f381d9 --- /dev/null +++ b/meson/lmdb/meson.build @@ -0,0 +1,8 @@ +# LMDB +# Inputs: conf +# Outputs: deps_lmdb + +deps_lmdb = dependency('lmdb', required: true) +conf.set10('HAVE_LMDB', deps_lmdb.found(), description: 'Whether we have LMDB') +conf.set10('LMDB', deps_lmdb.found(), description: 'Whether we have LMDB') +summary('LMDB', deps_lmdb.found(), bool_yn: true, section: 'Configuration') diff --git a/meson_options.txt b/meson_options.txt index 74c4d9bffb..030b7c21e4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -33,3 +33,5 @@ option('module-tinydns', type: 'boolean', value: false, description: 'Build the option('module-tinydns-dyn', type: 'boolean', value: false, description: 'Build the dynamically loadable tinyDNS backend') option('module-geoip', type: 'boolean', value: false, description: 'Build the GeoIP backend') option('module-geoip-dyn', type: 'boolean', value: false, description: 'Build the dynamically loadable GeoIP backend') +option('module-lmdb', type: 'boolean', value: false, description: 'Build the LMDB backend') +option('module-lmdb-dyn', type: 'boolean', value: false, description: 'Build the dynamically loadable LMDB backend')