mirror of
https://github.com/nginx/nginx.git
synced 2024-11-21 16:28:40 +00:00
Configure: simplified PCRE compilation.
Removed ICC-specific PCRE optimizations which tried to link with PCRE object files instead of the library. Made compiler-specific code minimal.
This commit is contained in:
parent
28f8caac37
commit
cddb22cefe
@ -4,81 +4,24 @@
|
||||
|
||||
|
||||
if [ $PCRE != NONE ]; then
|
||||
|
||||
have=NGX_PCRE . auto/have
|
||||
|
||||
if [ "$NGX_PLATFORM" = win32 ]; then
|
||||
have=PCRE_STATIC . auto/have
|
||||
fi
|
||||
|
||||
CORE_INCS="$CORE_INCS $PCRE"
|
||||
CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
|
||||
msvc | owc | bcc)
|
||||
have=NGX_PCRE . auto/have
|
||||
have=PCRE_STATIC . auto/have
|
||||
CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
|
||||
LINK_DEPS="$LINK_DEPS $PCRE/pcre.lib"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib"
|
||||
;;
|
||||
|
||||
icc)
|
||||
have=NGX_PCRE . auto/have
|
||||
CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
|
||||
|
||||
LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
|
||||
|
||||
echo $ngx_n "checking for PCRE library ...$ngx_c"
|
||||
|
||||
if [ -f $PCRE/pcre.h ]; then
|
||||
ngx_pcre_ver=`grep PCRE_MAJOR $PCRE/pcre.h \
|
||||
| sed -e 's/^.*PCRE_MAJOR.* \(.*\)$/\1/'`
|
||||
|
||||
else if [ -f $PCRE/configure.in ]; then
|
||||
ngx_pcre_ver=`grep PCRE_MAJOR= $PCRE/configure.in \
|
||||
| sed -e 's/^.*=\(.*\)$/\1/'`
|
||||
|
||||
else
|
||||
ngx_pcre_ver=`grep pcre_major, $PCRE/configure.ac \
|
||||
| sed -e 's/^.*pcre_major,.*\[\(.*\)\].*$/\1/'`
|
||||
fi
|
||||
fi
|
||||
|
||||
echo " $ngx_pcre_ver major version found"
|
||||
|
||||
# to allow -ipo optimization we link with the *.o but not library
|
||||
|
||||
case "$ngx_pcre_ver" in
|
||||
4|5)
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre.o"
|
||||
;;
|
||||
|
||||
6)
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_chartables.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_compile.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_exec.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_fullinfo.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_globals.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_tables.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_try_flipped.o"
|
||||
;;
|
||||
|
||||
*)
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_chartables.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_compile.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_exec.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_fullinfo.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_globals.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_tables.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_try_flipped.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_newline.o"
|
||||
;;
|
||||
|
||||
esac
|
||||
;;
|
||||
|
||||
*)
|
||||
have=NGX_PCRE . auto/have
|
||||
|
||||
if [ "$NGX_PLATFORM" = win32 ]; then
|
||||
have=PCRE_STATIC . auto/have
|
||||
fi
|
||||
|
||||
CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
|
||||
LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/.libs/libpcre.a"
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user