mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 05:55:28 +00:00
[#3731] Fix some compiler checks and some fallbacks on old systems
This commit is contained in:
@@ -2,15 +2,18 @@ project('postgresql')
|
||||
postgresql = disabler()
|
||||
pg_config = find_program('pg_config', required: false)
|
||||
if pg_config.found()
|
||||
cflags = run_command([pg_config, '--cflags'], check: false)
|
||||
cppflags = run_command([pg_config, '--cppflags'], check: false)
|
||||
includedir = run(command[pg_config, '--includedir'], check: false)
|
||||
libs = run_command([pg_config, '--libs'], check: false)
|
||||
version = run_command([pg_config, '--version'], check: false)
|
||||
if cflags.returncode() == 0 and libs.returncode() == 0 and version.returncode() == 0
|
||||
pgsql_compile_args = cflags.stdout().split()
|
||||
if cppflags.returncode() == 0 and includedir.returncode() == 0 and libs.returncode() == 0 and version.returncode() == 0
|
||||
pgsql_compile_args = cppflags.stdout().split()
|
||||
pgsql_includedir_args = includedir.stdout().split()
|
||||
pgsql_link_args = libs.stdout().split()
|
||||
pgsql_version = version.stdout().strip()
|
||||
postgresql = declare_dependency(
|
||||
compile_args: pgsql_compile_args,
|
||||
include_directories: pgsql_includedir_args,
|
||||
link_args: pgsql_link_args,
|
||||
version: pgsql_version,
|
||||
)
|
||||
|
Reference in New Issue
Block a user