summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2021-11-22 00:43:13 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2021-11-22 02:50:26 -0500
commit7512d82ca49f1b579819c2974c61de4e3137c70b (patch)
tree955ad40637d6fb5577427beb15e9c8c82f43dfc7 /SConstruct
parent7db817c59a89375ece9c3ec3b4ef7e4302e64549 (diff)
downloadlighttpd-git-7512d82ca49f1b579819c2974c61de4e3137c70b.tar.gz
[core] pcre2 support (--with-pcre2)
x-ref: "lighttpd: depends on obsolete pcre3 library" https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1000063
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct10
1 files changed, 8 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index c3b415a5..639d387e 100644
--- a/SConstruct
+++ b/SConstruct
@@ -261,6 +261,7 @@ vars.AddVariables(
PackageVariable('with_wolfssl', 'enable wolfSSL support', 'no'),
BoolVariable('with_nettle', 'enable Nettle support', 'no'),
BoolVariable('with_pam', 'enable PAM auth support', 'no'),
+ PackageVariable('with_pcre2', 'enable pcre2 support', 'no'),
PackageVariable('with_pcre', 'enable pcre support', 'yes'),
PackageVariable('with_pgsql', 'enable pgsql support', 'no'),
PackageVariable('with_sasl', 'enable SASL support', 'no'),
@@ -691,11 +692,16 @@ if 1:
LIBPAM = 'pam',
)
- if env['with_pcre']:
+ if env['with_pcre2']:
+ pcre2_config = autoconf.checkProgram('pcre2', 'pcre2-config')
+ if not autoconf.CheckParseConfigForLib('LIBPCRE', pcre2_config + ' --cflags --libs8'):
+ fail("Couldn't find pcre2")
+ autoconf.env.Append(CPPFLAGS = [ '-DHAVE_PCRE2_H', '-DHAVE_PCRE' ])
+ elif env['with_pcre']:
pcre_config = autoconf.checkProgram('pcre', 'pcre-config')
if not autoconf.CheckParseConfigForLib('LIBPCRE', pcre_config + ' --cflags --libs'):
fail("Couldn't find pcre")
- autoconf.env.Append(CPPFLAGS = [ '-DHAVE_PCRE_H', '-DHAVE_LIBPCRE' ])
+ autoconf.env.Append(CPPFLAGS = [ '-DHAVE_PCRE_H', '-DHAVE_PCRE' ])
if env['with_pgsql']:
if not autoconf.CheckParseConfigForLib('LIBPGSQL', 'pkg-config libpq --cflags --libs'):