You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-05 00:28:52 +02:00
Allow explicit disabling of optional dependencies in meson builds.
On some platforms, e.g. FreeBSD, there is a requirement to allow the user to disable support for features even when the required library is present. Introduce tri-state options for the optional features: auto mimics the current behavior and is the default, enable requires libraries for the feature to be present, and disable disables the feature without checking the libraries.
This commit is contained in:
@ -1,6 +1,17 @@
|
|||||||
<release date="XXXX-XX-XX" version="2.52dev" title="UNDER DEVELOPMENT">
|
<release date="XXXX-XX-XX" version="2.52dev" title="UNDER DEVELOPMENT">
|
||||||
<release-core-list>
|
<release-core-list>
|
||||||
<release-improvement-list>
|
<release-improvement-list>
|
||||||
|
<release-item>
|
||||||
|
<github-pull-request id="2321"/>
|
||||||
|
|
||||||
|
<release-item-contributor-list>
|
||||||
|
<release-item-contributor id="michael.schout"/>
|
||||||
|
<release-item-reviewer id="david.steele"/>
|
||||||
|
</release-item-contributor-list>
|
||||||
|
|
||||||
|
<p>Allow explicit disabling of optional dependencies in meson builds.</p>
|
||||||
|
</release-item>
|
||||||
|
|
||||||
<release-item>
|
<release-item>
|
||||||
<github-pull-request id="2312"/>
|
<github-pull-request id="2312"/>
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ endif
|
|||||||
lib_bz2 = cc.find_library('bz2')
|
lib_bz2 = cc.find_library('bz2')
|
||||||
|
|
||||||
# Find optional lz4 library
|
# Find optional lz4 library
|
||||||
lib_lz4 = dependency('liblz4', required: false)
|
lib_lz4 = dependency('liblz4', required: get_option('liblz4'))
|
||||||
|
|
||||||
if lib_lz4.found()
|
if lib_lz4.found()
|
||||||
configuration.set('HAVE_LIBLZ4', true, description: 'Is liblz4 present?')
|
configuration.set('HAVE_LIBLZ4', true, description: 'Is liblz4 present?')
|
||||||
@ -168,14 +168,14 @@ lib_z = dependency('zlib')
|
|||||||
configuration.set('ZLIB_CONST', true, description: 'Require zlib const input buffer')
|
configuration.set('ZLIB_CONST', true, description: 'Require zlib const input buffer')
|
||||||
|
|
||||||
# Find optional libssh2 library
|
# Find optional libssh2 library
|
||||||
lib_ssh2 = dependency('libssh2', required: false)
|
lib_ssh2 = dependency('libssh2', required: get_option('libssh2'))
|
||||||
|
|
||||||
if lib_ssh2.found()
|
if lib_ssh2.found()
|
||||||
configuration.set('HAVE_LIBSSH2', true, description: 'Is libssh2 present?')
|
configuration.set('HAVE_LIBSSH2', true, description: 'Is libssh2 present?')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Find optional zstd library
|
# Find optional zstd library
|
||||||
lib_zstd = dependency('libzstd', version: '>=1.0', required: false)
|
lib_zstd = dependency('libzstd', version: '>=1.0', required: get_option('libzstd'))
|
||||||
|
|
||||||
if lib_zstd.found()
|
if lib_zstd.found()
|
||||||
configuration.set('HAVE_LIBZST', true, description: 'Is libzstd present?')
|
configuration.set('HAVE_LIBZST', true, description: 'Is libzstd present?')
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
option('configdir', type: 'string', value: '/etc/pgbackrest', description: 'Configuration directory')
|
option('configdir', type: 'string', value: '/etc/pgbackrest', description: 'Configuration directory')
|
||||||
option('fatal-errors', type: 'boolean', value: false, description: 'Stop compilation on first error')
|
option('fatal-errors', type: 'boolean', value: false, description: 'Stop compilation on first error')
|
||||||
|
option('liblz4', type: 'feature', value: 'auto', description: 'Enable LZ4 compression support')
|
||||||
|
option('libssh2', type: 'feature', value: 'auto', description: 'Enable SFTP storage support')
|
||||||
|
option('libzstd', type: 'feature', value: 'auto', description: 'Enable Zstandard compression support')
|
||||||
|
Reference in New Issue
Block a user