diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2016-12-09 20:06:06 +0100 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2016-12-09 20:06:06 +0100 |
commit | 12cfcf08fffc6e4ec597e0396016d09afdb89fa8 (patch) | |
tree | 66e9f56e55c5e6747d416aae98c153ba7f759cfa /configure.in | |
parent | ProxyPass ! doesn't block per-directory ProxyPass (diff) | |
download | apache2-12cfcf08fffc6e4ec597e0396016d09afdb89fa8.tar.xz apache2-12cfcf08fffc6e4ec597e0396016d09afdb89fa8.zip |
Replace PCRE with PCRE2 where it is available.
This patch removes the needless assignment of re_erroffset in the conf pool
by the worker threads; such mistakes break the shared copy-on-write pages of
memory that should have remained common between all httpd worker processes.
Two de-optimizations are inherent in this patch, the former ovector-on-stack
opportunity is lost unless implemented as a new general context. Safer that
we either create a new general context using pool allocation, or recycle a
per pool or per thread match_data buffer of some arbitrary 10 elts or so.
Submitted by: wrowe, Petr Pisar <ppisar@redhat.com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1773454 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/configure.in b/configure.in index 19b6e1dcfe..5e70d7aee0 100644 --- a/configure.in +++ b/configure.in @@ -223,18 +223,18 @@ fi AC_ARG_WITH(pcre, APACHE_HELP_STRING(--with-pcre=PATH,Use external PCRE library)) -AC_PATH_PROG(PCRE_CONFIG, pcre-config, false) -if test -d "$with_pcre" && test -x "$with_pcre/bin/pcre-config"; then - PCRE_CONFIG=$with_pcre/bin/pcre-config -elif test -x "$with_pcre"; then - PCRE_CONFIG=$with_pcre -fi +AC_CHECK_TARGET_TOOLS(PCRE_CONFIG, [pcre2-config pcre-config], + [`which $with_pcre 2>/dev/null`], + [$with_pcre/bin:$with_pcre]) -if test "$PCRE_CONFIG" != "false"; then +if test "x$PCRE_CONFIG" != "x"; then if $PCRE_CONFIG --version >/dev/null 2>&1; then :; else - AC_MSG_ERROR([Did not find pcre-config script at $PCRE_CONFIG]) + AC_MSG_ERROR([Did not find working script at $PCRE_CONFIG]) fi case `$PCRE_CONFIG --version` in + [1[0-9].*]) + AC_DEFINE(HAVE_PCRE2, 1, [Detected PCRE2]) + ;; [[1-5].*]) AC_MSG_ERROR([Need at least pcre version 6.7]) ;; @@ -244,10 +244,10 @@ if test "$PCRE_CONFIG" != "false"; then esac AC_MSG_NOTICE([Using external PCRE library from $PCRE_CONFIG]) APR_ADDTO(PCRE_INCLUDES, [`$PCRE_CONFIG --cflags`]) - APR_ADDTO(PCRE_LIBS, [`$PCRE_CONFIG --libs`]) + APR_ADDTO(PCRE_LIBS, [`$PCRE_CONFIG --libs8 2>/dev/null || $PCRE_CONFIG --libs`]) APR_ADDTO(HTTPD_LIBS, [\$(PCRE_LIBS)]) else - AC_MSG_ERROR([pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/]) + AC_MSG_ERROR([pcre(2)-config for libpcre not found. PCRE is required and available from http://pcre.org/]) fi APACHE_SUBST(PCRE_LIBS) |