Mercurial > hg > nginx
diff auto/lib/pcre/conf @ 4388:005fc2d5e84f
Added support for regex study and PCRE JIT (ticket #41) optimizations on
configuration phase.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Mon, 26 Dec 2011 13:10:36 +0000 |
parents | 4d47a0658e7d |
children | eaace502bdf6 |
line wrap: on
line diff
--- a/auto/lib/pcre/conf Mon Dec 26 11:33:11 2011 +0000 +++ b/auto/lib/pcre/conf Mon Dec 26 13:10:36 2011 +0000 @@ -4,8 +4,6 @@ if [ $PCRE != NONE ]; then CORE_INCS="$CORE_INCS $PCRE" - CORE_DEPS="$CORE_DEPS $REGEX_DEPS" - CORE_SRCS="$CORE_SRCS $REGEX_SRCS" case "$NGX_CC_NAME" in @@ -81,6 +79,12 @@ esac + + if [ $PCRE_JIT = YES ]; then + have=NGX_HAVE_PCRE_JIT . auto/have + PCRE_CONF_OPT="$PCRE_CONF_OPT --enable-jit" + fi + else if [ "$NGX_PLATFORM" != win32 ]; then @@ -156,12 +160,23 @@ fi if [ $ngx_found = yes ]; then - CORE_DEPS="$CORE_DEPS $REGEX_DEPS" - CORE_SRCS="$CORE_SRCS $REGEX_SRCS" CORE_INCS="$CORE_INCS $ngx_feature_path" CORE_LIBS="$CORE_LIBS $ngx_feature_libs" PCRE=YES fi + + if [ $PCRE == YES ]; then + ngx_feature="PCRE JIT support" + ngx_feature_name="NGX_HAVE_PCRE_JIT" + ngx_feature_test="int jit = 0; + pcre_config(PCRE_CONFIG_JIT, &jit); + if (jit != 1) return 1;" + . auto/feature + + if [ $ngx_found = yes ]; then + PCRE_JIT=YES + fi + fi fi if [ $PCRE != YES ]; then