From e4d1c1dda523ac52cefaff53b8a968b508dbfa9e Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 17 Aug 2022 14:21:41 +0200 Subject: [PATCH 3/7] meson: Libraries need to be built with -DSO_MAJOR_VERSION=N This is used by NLS to locate the right catalog file. --- src/interfaces/ecpg/compatlib/meson.build | 1 + src/interfaces/ecpg/ecpglib/meson.build | 1 + src/interfaces/ecpg/pgtypeslib/meson.build | 1 + src/interfaces/libpq/meson.build | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/interfaces/ecpg/compatlib/meson.build b/src/interfaces/ecpg/compatlib/meson.build index 328f33e5de..2022dec571 100644 --- a/src/interfaces/ecpg/compatlib/meson.build +++ b/src/interfaces/ecpg/compatlib/meson.build @@ -3,6 +3,7 @@ export_file = custom_target('libpq.exports', kwargs: gen_export_kwargs) ecpg_compat = both_libraries('libecpg_compat', 'informix.c', include_directories : ['.', ecpg_inc, postgres_inc, libpq_inc], + c_args: ['-DSO_MAJOR_VERSION=3'], dependencies: [frontend_shlib_code, thread_dep], link_with: [ecpglib, ecpg_pgtypes], soversion: host_system != 'win32' ? '3' : '', diff --git a/src/interfaces/ecpg/ecpglib/meson.build b/src/interfaces/ecpg/ecpglib/meson.build index 9914aa936d..18300f3ef0 100644 --- a/src/interfaces/ecpg/ecpglib/meson.build +++ b/src/interfaces/ecpg/ecpglib/meson.build @@ -16,6 +16,7 @@ export_file = custom_target('libpq.exports', kwargs: gen_export_kwargs) ecpglib = both_libraries('libecpg', ecpglib_sources, include_directories : ['.', ecpg_inc, postgres_inc], + c_args: ['-DSO_MAJOR_VERSION=6'], dependencies: [frontend_shlib_code, libpq, thread_dep], link_with: [ecpg_pgtypes], soversion: host_system != 'win32' ? '6' : '', diff --git a/src/interfaces/ecpg/pgtypeslib/meson.build b/src/interfaces/ecpg/pgtypeslib/meson.build index 28c4e7314b..a33db144e6 100644 --- a/src/interfaces/ecpg/pgtypeslib/meson.build +++ b/src/interfaces/ecpg/pgtypeslib/meson.build @@ -12,6 +12,7 @@ export_file = custom_target('libpq.exports', kwargs: gen_export_kwargs) ecpg_pgtypes = both_libraries('libpgtypes', ecpg_pgtypes_sources, include_directories : ['.', ecpg_inc, postgres_inc], + c_args: ['-DSO_MAJOR_VERSION=3'], dependencies: [frontend_shlib_code], version: '3.'+pg_version_major.to_string(), soversion: host_system != 'win32' ? '3' : '', diff --git a/src/interfaces/libpq/meson.build b/src/interfaces/libpq/meson.build index bb6a47c5a2..9f29136034 100644 --- a/src/interfaces/libpq/meson.build +++ b/src/interfaces/libpq/meson.build @@ -48,7 +48,7 @@ endif libpq_both = both_libraries('libpq', libpq_sources, include_directories : [libpq_inc, postgres_inc], - c_args: ['-DFRONTEND'], + c_args: ['-DFRONTEND', '-DSO_MAJOR_VERSION=5'], dependencies: libpq_deps, version: '5.'+pg_version_major.to_string(), soversion: host_system != 'win32' ? '5' : '' , -- 2.37.1