# 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')
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
--- /dev/null
+# 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')
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')