[build] default --with-pcre2 unless --with-pcre

master
Glenn Strauss 2 years ago
parent 86c2d30936
commit 750414d3bb

@ -258,8 +258,8 @@ 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_pcre2', 'enable pcre2 support', 'yes'),
PackageVariable('with_pcre', 'enable pcre support', 'no'),
PackageVariable('with_pgsql', 'enable pgsql support', 'no'),
PackageVariable('with_sasl', 'enable SASL support', 'no'),
BoolVariable('with_sqlite3', 'enable sqlite3 support (required for webdav props)', 'no'),
@ -659,7 +659,7 @@ if 1:
LIBPAM = 'pam',
)
if env['with_pcre2']:
if env['with_pcre2'] and not env['with_pcre']:
pcre2_config = autoconf.checkProgram('pcre2', 'pcre2-config')
if not autoconf.CheckParseConfigForLib('LIBPCRE', pcre2_config + ' --cflags --libs8'):
fail("Couldn't find pcre2")

@ -907,17 +907,27 @@ if test "x$use_nss" = "xyes"; then
fi
dnl pcre support
AC_MSG_NOTICE([----------------------------------------])
AC_MSG_CHECKING([for perl regular expressions support])
AC_ARG_WITH([pcre],
[AS_HELP_STRING([--with-pcre], [Enable pcre support (default yes)])],
[WITH_PCRE=$withval],
[WITH_PCRE=no]
)
AC_MSG_RESULT([$WITH_PCRE])
dnl pcre2 support
AC_MSG_NOTICE([----------------------------------------])
AC_MSG_CHECKING([for perl regular expressions support])
AC_ARG_WITH([pcre2],
[AS_HELP_STRING([--with-pcre2], [Enable pcre2 support (default no)])],
[WITH_PCRE2=$withval],
[WITH_PCRE2=no]
[WITH_PCRE2=yes]
)
AC_MSG_RESULT([$WITH_PCRE2])
if test "$WITH_PCRE2" != no; then
if test "$WITH_PCRE2" != no && test "$WITH_PCRE" = "no"; then
if test "$WITH_PCRE2" != yes; then
PCRE_LIB="-L$WITH_PCRE2/lib -lpcre2-8"
CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include"
@ -943,17 +953,7 @@ if test "$WITH_PCRE2" != no; then
AC_SUBST([PCRE_LIB])
fi
dnl pcre support
AC_MSG_NOTICE([----------------------------------------])
AC_MSG_CHECKING([for perl regular expressions support])
AC_ARG_WITH([pcre],
[AS_HELP_STRING([--with-pcre], [Enable pcre support (default yes)])],
[WITH_PCRE=$withval],
[WITH_PCRE=yes]
)
AC_MSG_RESULT([$WITH_PCRE])
if test "$WITH_PCRE" != no && test "$WITH_PCRE2" = "no"; then
if test "$WITH_PCRE" != no; then
if test "$WITH_PCRE" != yes; then
PCRE_LIB="-L$WITH_PCRE/lib -lpcre"
CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include"
@ -974,6 +974,7 @@ if test "$WITH_PCRE" != no && test "$WITH_PCRE2" = "no"; then
AC_SUBST([PCRE_LIB])
fi
dnl zlib
AC_MSG_NOTICE([----------------------------------------])
AC_MSG_CHECKING([for zlib support])

@ -85,12 +85,12 @@ option('with_pam',
)
option('with_pcre2',
type: 'boolean',
value: false,
value: true,
description: 'with regex support [default: off]',
)
option('with_pcre',
type: 'boolean',
value: true,
value: false,
description: 'with regex support [default: on]',
)
option('with_pgsql',

@ -26,8 +26,8 @@ option(WITH_NSS "with NSS-crypto-support [default: off]")
option(WITH_OPENSSL "with openssl-support [default: off]")
option(WITH_WOLFSSL "with wolfSSL-support [default: off]")
option(WITH_NETTLE "with Nettle-support [default: off]")
option(WITH_PCRE2 "with regex support [default: off]")
option(WITH_PCRE "with regex support [default: on]" ON)
option(WITH_PCRE2 "with regex support [default: on]" ON)
option(WITH_PCRE "with regex support [default: off]")
option(WITH_WEBDAV_PROPS "with property-support for mod_webdav [default: off]")
option(WITH_WEBDAV_LOCKS "locks in webdav [default: off]")
option(WITH_BROTLI "with brotli-support for mod_deflate [default: off]")

@ -480,7 +480,7 @@ if get_option('with_nss')
endif
libpcre = []
if get_option('with_pcre2')
if get_option('with_pcre2') and not(get_option('with_pcre'))
# manual search:
# header: pcre2.h
# function: pcre_match (-lpcre2-8)

Loading…
Cancel
Save