]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: ODBC
authorFred Morcos <fred.morcos@open-xchange.com>
Wed, 12 Jul 2023 11:48:16 +0000 (13:48 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:29 +0000 (13:28 +0100)
meson/odbc/meson.build [new file with mode: 0644]
meson_options.txt

diff --git a/meson/odbc/meson.build b/meson/odbc/meson.build
new file mode 100644 (file)
index 0000000..dbc45dc
--- /dev/null
@@ -0,0 +1,22 @@
+# ODBC
+# Outputs: deps_odbc
+
+deps_odbc = dependency('odbc', required: false)
+
+if not deps_odbc.found()
+  odbc_config = find_program('odbc_config', required: true)
+
+  odbc_cflags_res = run_command(odbc_config, '--cflags', check: true)
+  odbc_cflags = odbc_cflags_res.stdout().strip().split()
+
+  odbc_ldflags_res = run_command(odbc_config, '--libs', check: true)
+  odbc_ldflags = odbc_ldflags_res.stdout().strip().split()
+
+  odbc_version_res = run_command(odbc_config, '--version', check: true)
+  odbc_version = odbc_version_res.stdout().strip()
+
+  deps_odbc = declare_dependency(compile_args: odbc_cflags, link_args: odbc_ldflags, version: odbc_version)
+endif
+
+summary('ODBC', deps_odbc.found(), bool_yn: true, section: 'Configuration')
+summary('ODBC Version', deps_odbc.version(), section: 'Configuration')
index c478567c44a1a18baf9bf04807f442eab790a669..fc165cc8ae07ebb7326dadea22efaeffcb164348 100644 (file)
@@ -20,3 +20,5 @@ option('gss-tsig', type: 'boolean', value: false, description: 'Enable GSS-TSIG
 option('socket-dir', type: 'string', value: '/var/run', description: 'Where the control socket lives')
 option('module-gmysql', type: 'boolean', value: true, description: 'Build the gmysql backend')
 option('module-gmysql-dyn', type: 'boolean', value: false, description: 'Build the dynamically loadable gmysql backend')
+option('module-godbc', type: 'boolean', value: false, description: 'Build the godbc backend')
+option('module-godbc-dyn', type: 'boolean', value: false, description: 'Build the dynamically loadable godbc backend')