Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
4387:e8181eeddaf8 | 4388:005fc2d5e84f |
---|---|
2 # Copyright (C) Igor Sysoev | 2 # Copyright (C) Igor Sysoev |
3 | 3 |
4 | 4 |
5 if [ $PCRE != NONE ]; then | 5 if [ $PCRE != NONE ]; then |
6 CORE_INCS="$CORE_INCS $PCRE" | 6 CORE_INCS="$CORE_INCS $PCRE" |
7 CORE_DEPS="$CORE_DEPS $REGEX_DEPS" | |
8 CORE_SRCS="$CORE_SRCS $REGEX_SRCS" | |
9 | 7 |
10 case "$NGX_CC_NAME" in | 8 case "$NGX_CC_NAME" in |
11 | 9 |
12 msvc* | owc* | bcc) | 10 msvc* | owc* | bcc) |
13 have=NGX_PCRE . auto/have | 11 have=NGX_PCRE . auto/have |
78 LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a" | 76 LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a" |
79 CORE_LIBS="$CORE_LIBS $PCRE/.libs/libpcre.a" | 77 CORE_LIBS="$CORE_LIBS $PCRE/.libs/libpcre.a" |
80 ;; | 78 ;; |
81 | 79 |
82 esac | 80 esac |
81 | |
82 | |
83 if [ $PCRE_JIT = YES ]; then | |
84 have=NGX_HAVE_PCRE_JIT . auto/have | |
85 PCRE_CONF_OPT="$PCRE_CONF_OPT --enable-jit" | |
86 fi | |
83 | 87 |
84 else | 88 else |
85 | 89 |
86 if [ "$NGX_PLATFORM" != win32 ]; then | 90 if [ "$NGX_PLATFORM" != win32 ]; then |
87 | 91 |
154 | 158 |
155 . auto/feature | 159 . auto/feature |
156 fi | 160 fi |
157 | 161 |
158 if [ $ngx_found = yes ]; then | 162 if [ $ngx_found = yes ]; then |
159 CORE_DEPS="$CORE_DEPS $REGEX_DEPS" | |
160 CORE_SRCS="$CORE_SRCS $REGEX_SRCS" | |
161 CORE_INCS="$CORE_INCS $ngx_feature_path" | 163 CORE_INCS="$CORE_INCS $ngx_feature_path" |
162 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" | 164 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" |
163 PCRE=YES | 165 PCRE=YES |
166 fi | |
167 | |
168 if [ $PCRE == YES ]; then | |
169 ngx_feature="PCRE JIT support" | |
170 ngx_feature_name="NGX_HAVE_PCRE_JIT" | |
171 ngx_feature_test="int jit = 0; | |
172 pcre_config(PCRE_CONFIG_JIT, &jit); | |
173 if (jit != 1) return 1;" | |
174 . auto/feature | |
175 | |
176 if [ $ngx_found = yes ]; then | |
177 PCRE_JIT=YES | |
178 fi | |
164 fi | 179 fi |
165 fi | 180 fi |
166 | 181 |
167 if [ $PCRE != YES ]; then | 182 if [ $PCRE != YES ]; then |
168 cat << END | 183 cat << END |