Mercurial > hg > nginx
comparison auto/lib/pcre/conf @ 4960:b39d947fcb82
Configure: better check for PCRE JIT.
On Mac OS X system toolchain by default prefers include files
from /usr/local/include, but libraries from /usr/lib. This might result in
various problems, in particular the one outlined below.
If the PCRE library is installed into /usr/local/, this results in pcre.h
being used from /usr/local/include (with PCRE_CONFIG_JIT defined), but
libpcre from /usr/lib (as shipped with the OS, without pcre_free_study()
symbol). As a result build fails as we use pcre_free_study() function
if we try to compile with PCRE JIT support.
Obvious workaround is to the root cause is to ask compiler to prefer
library from /usr/local/lib via ./configure --with-ld-opt="-L/usr/local/lib".
On the other hand, in any case it would be good to check if the function
we are going to use is available, hence the change.
See thread here for details:
http://mailman.nginx.org/pipermail/nginx-devel/2012-December/003074.html
Prodded by Piotr Sikora.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 12 Dec 2012 13:50:07 +0000 |
parents | 62d8db8c7157 |
children | 3d2d3e1cf427 |
comparison
equal
deleted
inserted
replaced
4948:d03712b6914b | 4960:b39d947fcb82 |
---|---|
170 | 170 |
171 if [ $PCRE = YES ]; then | 171 if [ $PCRE = YES ]; then |
172 ngx_feature="PCRE JIT support" | 172 ngx_feature="PCRE JIT support" |
173 ngx_feature_name="NGX_HAVE_PCRE_JIT" | 173 ngx_feature_name="NGX_HAVE_PCRE_JIT" |
174 ngx_feature_test="int jit = 0; | 174 ngx_feature_test="int jit = 0; |
175 pcre_free_study(NULL); | |
175 pcre_config(PCRE_CONFIG_JIT, &jit); | 176 pcre_config(PCRE_CONFIG_JIT, &jit); |
176 if (jit != 1) return 1;" | 177 if (jit != 1) return 1;" |
177 . auto/feature | 178 . auto/feature |
178 | 179 |
179 if [ $ngx_found = yes ]; then | 180 if [ $ngx_found = yes ]; then |