mirror of
https://github.com/dovecot/core.git
synced 2026-10-23 22:08:58 +03:00
meson: pcre
This commit is contained in:
committed by
timo.sirainen
parent
cc26a28e30
commit
73b594851a
@@ -130,6 +130,7 @@ subdir('meson' / 'ssl')
|
||||
subdir('meson' / 'iconv')
|
||||
subdir('meson' / 'zlib')
|
||||
subdir('meson' / 'sodium')
|
||||
subdir('meson' / 'pcre')
|
||||
|
||||
dovecot_moduledir = get_option('moduledir')
|
||||
if dovecot_moduledir == ''
|
||||
|
||||
@@ -14,3 +14,4 @@ option('random-source', type: 'string', value : '/dev/urandom', description: 'De
|
||||
option('ioloop', type: 'combo', choices: ['best', 'epoll', 'kqueue', 'poll', 'select'], value: 'best', description: 'I/O loop method to use (best for the fastest available)')
|
||||
option('notify', type: 'combo', choices: ['best', 'inotify', 'kqueue', 'none'], value: 'best', description: 'File system notification method to use (best for the fastest available)')
|
||||
option('sodium', type: 'feature', value: 'auto', description: 'Build with libsodium support (enables argon2)')
|
||||
option('pcre', type: 'feature', value: 'auto', description: 'Build with libpcre2 support (enables regular expressions)')
|
||||
|
||||
25
meson/pcre/meson.build
Normal file
25
meson/pcre/meson.build
Normal file
@@ -0,0 +1,25 @@
|
||||
opt_pcre = get_option('pcre')
|
||||
ext_pcre = dependency('libpcre2-32', required: opt_pcre)
|
||||
|
||||
conf.set(
|
||||
'HAVE_LIBPCRE',
|
||||
ext_pcre.found(),
|
||||
description: 'Have libpcre2 backed regular expressions',
|
||||
)
|
||||
|
||||
if ext_pcre.found()
|
||||
# pcre2.h needs PCRE2_CODE_UNIT_WIDTH before it will declare anything; 0 asks for the
|
||||
# width-agnostic names.
|
||||
conf.set(
|
||||
'HAVE_PCRE2_SUBSTITUTE_CALLOUT_BLOCK',
|
||||
cc.has_header_symbol(
|
||||
'pcre2.h',
|
||||
'pcre2_substitute_callout_block',
|
||||
prefix: '#define PCRE2_CODE_UNIT_WIDTH 0',
|
||||
dependencies: ext_pcre,
|
||||
),
|
||||
description: 'Have pcre2_substitute_callout_block',
|
||||
)
|
||||
endif
|
||||
|
||||
summary({'PCRE': ext_pcre}, section: 'Features')
|
||||
Reference in New Issue
Block a user