blob: fe821300047009786d6e71756d230f4447b82024 [file] [log] [blame]
Igor Sysoeve9b2cb12004-02-09 20:47:18 +00001
2if [ $PCRE != NONE ]; then
3 CORE_INCS="$CORE_INCS -I $PCRE"
4 CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
5 CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
6
Igor Sysoevfc5a10a2004-03-09 19:47:07 +00007 case $CC in
8
9 cl)
10 have=HAVE_PCRE . auto/have
11 have=PCRE_STATIC . auto/have
Igor Sysoev3646a162004-03-14 20:46:25 +000012 CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
13 LINK_DEPS="$LINK_DEPS $PCRE/pcre.lib"
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000014 CORE_LIBS="$CORE_LIBS pcre.lib"
15 CORE_LINK="$CORE_LINK -libpath:$PCRE"
16 ;;
17
18 wcl386)
19 have=HAVE_PCRE . auto/have
20 have=PCRE_STATIC . auto/have
Igor Sysoev3646a162004-03-14 20:46:25 +000021 CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
22 LINK_DEPS="$LINK_DEPS $PCRE/pcre.lib"
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000023 CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib"
24 ;;
25
Igor Sysoev3646a162004-03-14 20:46:25 +000026 *icc)
27 have=HAVE_PCRE . auto/have
28 CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
29
30 LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
31
32 # to allow -ipo optimization we link with the *.o but not library
33 CORE_LIBS="$CORE_LIBS $PCRE/maketables.o"
34 CORE_LIBS="$CORE_LIBS $PCRE/get.o"
35 CORE_LIBS="$CORE_LIBS $PCRE/study.o"
36 CORE_LIBS="$CORE_LIBS $PCRE/pcre.o"
37 ;;
38
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000039 *)
40 have=HAVE_PCRE . auto/have
Igor Sysoeva893eab2004-03-11 21:34:52 +000041 CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
42 LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000043 CORE_LIBS="$CORE_LIBS -L $PCRE/.libs -lpcre"
44 ;;
45
46 esac
Igor Sysoeve9b2cb12004-02-09 20:47:18 +000047
48else
49
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000050 if [ $PLATFORM != win32 ]; then
51 ngx_lib_inc="#include <pcre.h>"
Igor Sysoeve9b2cb12004-02-09 20:47:18 +000052
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000053 ngx_lib="PCRE"
54 ngx_lib_test="pcre *re; pcre_compile(re, 0, NULL, 0, NULL)"
55 ngx_libs=-lpcre
56 . auto/lib/test
Igor Sysoeve9b2cb12004-02-09 20:47:18 +000057
58
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000059 if [ $ngx_found = yes ]; then
60 have=HAVE_PCRE . auto/have
Igor Sysoev43c3cd92004-02-19 08:45:27 +000061
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000062 CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
63 CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
64 CORE_LIBS="$CORE_LIBS $ngx_libs"
Igor Sysoev43c3cd92004-02-19 08:45:27 +000065
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000066 PCRE=YES
67 else
68 PCRE=NO
69 fi
Igor Sysoeve9b2cb12004-02-09 20:47:18 +000070 fi
71
72fi