From 7512d82ca49f1b579819c2974c61de4e3137c70b Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Mon, 22 Nov 2021 00:43:13 -0500 Subject: [core] pcre2 support (--with-pcre2) x-ref: "lighttpd: depends on obsolete pcre3 library" https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1000063 --- SConstruct | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'SConstruct') 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'): -- cgit v1.2.1