diff options
| author | Valentin Bartenev <vbart@nginx.com> | 2011-12-26 13:10:36 +0000 |
|---|---|---|
| committer | Valentin Bartenev <vbart@nginx.com> | 2011-12-26 13:10:36 +0000 |
| commit | bc5191c7bcfb7df191cbe411882eab9a1c71e518 (patch) | |
| tree | 8e35857c295a4b8d0612a4ae33d1e1fe47ead960 /auto/lib/pcre | |
| parent | 947bdfa7fe9559ccbc9c47a49105d78b9b674a64 (diff) | |
| download | nginx-bc5191c7bcfb7df191cbe411882eab9a1c71e518.tar.gz nginx-bc5191c7bcfb7df191cbe411882eab9a1c71e518.tar.bz2 | |
Added support for regex study and PCRE JIT (ticket #41) optimizations on
configuration phase.
Diffstat (limited to 'auto/lib/pcre')
| -rw-r--r-- | auto/lib/pcre/conf | 23 | ||||
| -rw-r--r-- | auto/lib/pcre/make | 2 |
2 files changed, 20 insertions, 5 deletions
diff --git a/auto/lib/pcre/conf b/auto/lib/pcre/conf index 3008f5892..e90d02307 100644 --- a/auto/lib/pcre/conf +++ b/auto/lib/pcre/conf @@ -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 @@ if [ $PCRE != NONE ]; then 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 @@ else 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 diff --git a/auto/lib/pcre/make b/auto/lib/pcre/make index 9f2c658bf..a9be75e36 100644 --- a/auto/lib/pcre/make +++ b/auto/lib/pcre/make @@ -50,7 +50,7 @@ $PCRE/Makefile: $NGX_MAKEFILE cd $PCRE \\ && if [ -f Makefile ]; then \$(MAKE) distclean; fi \\ && CC="\$(CC)" CFLAGS="$PCRE_OPT" \\ - ./configure --disable-shared + ./configure --disable-shared $PCRE_CONF_OPT $PCRE/.libs/libpcre.a: $PCRE/Makefile cd $PCRE \\ |
