Mercurial > hg > nginx
comparison auto/lib/pcre/conf @ 7980:8007ea138d6a
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sat, 25 Dec 2021 01:07:14 +0300 |
parents | 78f8ac479735 |
children | 0b5f12d5c531 |
comparison
equal
deleted
inserted
replaced
7979:060bf88d2473 | 7980:8007ea138d6a |
---|---|
2 # Copyright (C) Igor Sysoev | 2 # Copyright (C) Igor Sysoev |
3 # Copyright (C) Nginx, Inc. | 3 # Copyright (C) Nginx, Inc. |
4 | 4 |
5 | 5 |
6 if [ $PCRE != NONE ]; then | 6 if [ $PCRE != NONE ]; then |
7 | |
8 have=NGX_PCRE . auto/have | |
9 | |
10 if [ "$NGX_PLATFORM" = win32 ]; then | |
11 have=PCRE_STATIC . auto/have | |
12 fi | |
13 | |
7 CORE_INCS="$CORE_INCS $PCRE" | 14 CORE_INCS="$CORE_INCS $PCRE" |
15 CORE_DEPS="$CORE_DEPS $PCRE/pcre.h" | |
8 | 16 |
9 case "$NGX_CC_NAME" in | 17 case "$NGX_CC_NAME" in |
10 | 18 |
11 msvc | owc | bcc) | 19 msvc | owc | bcc) |
12 have=NGX_PCRE . auto/have | |
13 have=PCRE_STATIC . auto/have | |
14 CORE_DEPS="$CORE_DEPS $PCRE/pcre.h" | |
15 LINK_DEPS="$LINK_DEPS $PCRE/pcre.lib" | 20 LINK_DEPS="$LINK_DEPS $PCRE/pcre.lib" |
16 CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib" | 21 CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib" |
17 ;; | 22 ;; |
18 | 23 |
19 icc) | |
20 have=NGX_PCRE . auto/have | |
21 CORE_DEPS="$CORE_DEPS $PCRE/pcre.h" | |
22 | |
23 LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a" | |
24 | |
25 echo $ngx_n "checking for PCRE library ...$ngx_c" | |
26 | |
27 if [ -f $PCRE/pcre.h ]; then | |
28 ngx_pcre_ver=`grep PCRE_MAJOR $PCRE/pcre.h \ | |
29 | sed -e 's/^.*PCRE_MAJOR.* \(.*\)$/\1/'` | |
30 | |
31 else if [ -f $PCRE/configure.in ]; then | |
32 ngx_pcre_ver=`grep PCRE_MAJOR= $PCRE/configure.in \ | |
33 | sed -e 's/^.*=\(.*\)$/\1/'` | |
34 | |
35 else | |
36 ngx_pcre_ver=`grep pcre_major, $PCRE/configure.ac \ | |
37 | sed -e 's/^.*pcre_major,.*\[\(.*\)\].*$/\1/'` | |
38 fi | |
39 fi | |
40 | |
41 echo " $ngx_pcre_ver major version found" | |
42 | |
43 # to allow -ipo optimization we link with the *.o but not library | |
44 | |
45 case "$ngx_pcre_ver" in | |
46 4|5) | |
47 CORE_LIBS="$CORE_LIBS $PCRE/pcre.o" | |
48 ;; | |
49 | |
50 6) | |
51 CORE_LIBS="$CORE_LIBS $PCRE/pcre_chartables.o" | |
52 CORE_LIBS="$CORE_LIBS $PCRE/pcre_compile.o" | |
53 CORE_LIBS="$CORE_LIBS $PCRE/pcre_exec.o" | |
54 CORE_LIBS="$CORE_LIBS $PCRE/pcre_fullinfo.o" | |
55 CORE_LIBS="$CORE_LIBS $PCRE/pcre_globals.o" | |
56 CORE_LIBS="$CORE_LIBS $PCRE/pcre_tables.o" | |
57 CORE_LIBS="$CORE_LIBS $PCRE/pcre_try_flipped.o" | |
58 ;; | |
59 | |
60 *) | |
61 CORE_LIBS="$CORE_LIBS $PCRE/pcre_chartables.o" | |
62 CORE_LIBS="$CORE_LIBS $PCRE/pcre_compile.o" | |
63 CORE_LIBS="$CORE_LIBS $PCRE/pcre_exec.o" | |
64 CORE_LIBS="$CORE_LIBS $PCRE/pcre_fullinfo.o" | |
65 CORE_LIBS="$CORE_LIBS $PCRE/pcre_globals.o" | |
66 CORE_LIBS="$CORE_LIBS $PCRE/pcre_tables.o" | |
67 CORE_LIBS="$CORE_LIBS $PCRE/pcre_try_flipped.o" | |
68 CORE_LIBS="$CORE_LIBS $PCRE/pcre_newline.o" | |
69 ;; | |
70 | |
71 esac | |
72 ;; | |
73 | |
74 *) | 24 *) |
75 have=NGX_PCRE . auto/have | |
76 | |
77 if [ "$NGX_PLATFORM" = win32 ]; then | |
78 have=PCRE_STATIC . auto/have | |
79 fi | |
80 | |
81 CORE_DEPS="$CORE_DEPS $PCRE/pcre.h" | |
82 LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a" | 25 LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a" |
83 CORE_LIBS="$CORE_LIBS $PCRE/.libs/libpcre.a" | 26 CORE_LIBS="$CORE_LIBS $PCRE/.libs/libpcre.a" |
84 ;; | 27 ;; |
85 | 28 |
86 esac | 29 esac |