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