From 13dbd38c4aea7d4c4f0e2ad9dd72bb021ad1cb2b Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Fri, 3 Nov 2023 10:06:00 -0700 Subject: [PATCH v1 5/5] meson: Add -Dpkglibdir option Author: Reviewed-by: Discussion: https://postgr.es/m/20231103163848.26egkh5qdgw3vmil@awork3.anarazel.de Backpatch: --- meson.build | 9 ++++++--- meson_options.txt | 3 +++ doc/src/sgml/installation.sgml | 18 +++++++++++++++--- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 2d516c8f372..dbbdb46808f 100644 --- a/meson.build +++ b/meson.build @@ -492,9 +492,12 @@ endif dir_lib = get_option('libdir') -dir_lib_pkg = dir_lib -if not (dir_prefix_contains_pg or dir_lib_pkg.contains('pgsql') or dir_lib_pkg.contains('postgres')) - dir_lib_pkg = dir_lib_pkg / pkg +dir_lib_pkg = get_option('pkglibdir') +if dir_lib_pkg == '' + dir_lib_pkg = dir_lib + if not (dir_prefix_contains_pg or dir_lib_pkg.contains('pgsql') or dir_lib_pkg.contains('postgres')) + dir_lib_pkg = dir_lib_pkg / pkg + endif endif dir_pgxs = dir_lib_pkg / 'pgxs' diff --git a/meson_options.txt b/meson_options.txt index d2f95cfec36..2da3830d006 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -70,6 +70,9 @@ option('darwin_sysroot', type: 'string', value: '', option('rpath', type: 'boolean', value: true, description: 'Embed shared library search path in executables') +option('pkglibdir', type: 'string', value: '', + description: 'Directory to install / load dynamically loadable modules from') + # External dependencies diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index 6050c38be25..ef4489a6fc5 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -2265,9 +2265,21 @@ ninja install - Sets the location to install libraries and dynamically loadable - modules. The default is - PREFIX/lib. + Sets the location to install libraries. The default is + PREFIX/lib. This + option, unless is + specified, also controls where dynamically loadable modules get + installed. + + + + + + + + + Sets the location to dynamically loadable modules. The default is set + by . -- 2.38.0