From: Fred Morcos Date: Wed, 12 Jul 2023 12:00:07 +0000 (+0200) Subject: Meson: PostgreSQL X-Git-Tag: rec-5.1.0-alpha1~80^2~333 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ba31c3e23f66791439c8614d1ffb8fc9c835e35;p=thirdparty%2Fpdns.git Meson: PostgreSQL --- diff --git a/meson/pgsql/meson.build b/meson/pgsql/meson.build new file mode 100644 index 0000000000..c22e2c2ce6 --- /dev/null +++ b/meson/pgsql/meson.build @@ -0,0 +1,25 @@ +# PostgreSQL +# Outputs: deps_pgsql + +deps_pgsql = dependency('libpq', required: false) + +if not deps_pgsql.found() + pg_config = find_program('pg_config', required: true) + + pg_cflags_res = run_command(pg_config, '--cflags', check: true) + pg_cflags = pg_cflags_res.stdout().strip().split() + + pg_cppflags_res = run_command(pg_config, '--cppflags', check: true) + pg_cppflags = pg_cppflags_res.stdout().strip().split() + + pg_ldflags_res = run_command(pg_config, '--libs', check: true) + pg_ldflags = pg_ldflags_res.stdout().strip().split() + + pg_version_res = run_command(pg_config, '--version', check: true) + pg_version = pg_version_res.stdout().strip().split()[1] + + deps_pgsql = declare_dependency(compile_args: pg_cflags + pg_cppflags, link_args: pg_ldflags, version: pg_version) +endif + +summary('PostgreSQL', deps_pgsql.found(), bool_yn: true, section: 'Configuration') +summary('PostgreSQL Version', deps_pgsql.version(), section: 'Configuration') diff --git a/meson_options.txt b/meson_options.txt index fc165cc8ae..06dc83c46f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -22,3 +22,5 @@ option('module-gmysql', type: 'boolean', value: true, description: 'Build the gm 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') +option('module-gpgsql', type: 'boolean', value: false, description: 'Build the gpgsql backend') +option('module-gpgsql-dyn', type: 'boolean', value: false, description: 'Build the dynamically loadable gpgsql backend')