blob: 29c561b81e352ba06584c3f470944fbe274e569a [file] [log] [blame]
Igor Sysoeve9b2cb12004-02-09 20:47:18 +00001
2if [ $PCRE != NONE ]; then
Igor Sysoev11dbe972004-03-29 17:43:58 +00003 CORE_INCS="$CORE_INCS $PCRE"
Igor Sysoeve9b2cb12004-02-09 20:47:18 +00004 CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
5 CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
6
Igor Sysoev32769a72004-03-25 20:03:02 +00007 case "$CC" in
Igor Sysoevfc5a10a2004-03-09 19:47:07 +00008
Igor Sysoev11dbe972004-03-29 17:43:58 +00009 cl | wcl386 | bcc32)
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000010 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/pcre.lib"
15 ;;
16
Igor Sysoev3646a162004-03-14 20:46:25 +000017 *icc)
18 have=HAVE_PCRE . auto/have
19 CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
20
21 LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
22
23 # to allow -ipo optimization we link with the *.o but not library
24 CORE_LIBS="$CORE_LIBS $PCRE/maketables.o"
25 CORE_LIBS="$CORE_LIBS $PCRE/get.o"
26 CORE_LIBS="$CORE_LIBS $PCRE/study.o"
27 CORE_LIBS="$CORE_LIBS $PCRE/pcre.o"
28 ;;
29
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000030 *)
31 have=HAVE_PCRE . auto/have
Igor Sysoeva893eab2004-03-11 21:34:52 +000032 CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
33 LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
Igor Sysoev9a864bd2004-04-04 20:32:09 +000034 CORE_LIBS="$CORE_LIBS $PCRE/.libs/libpcre.a"
35 #CORE_LIBS="$CORE_LIBS -L $PCRE/.libs -lpcre"
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000036 ;;
37
38 esac
Igor Sysoeve9b2cb12004-02-09 20:47:18 +000039
40else
41
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000042 if [ $PLATFORM != win32 ]; then
Igor Sysoevfff32322004-04-08 15:58:25 +000043 PCRE=NO
Igor Sysoev9bfb4342004-04-18 19:06:02 +000044 ngx_lib_cflags=
45
46 # Linux
Igor Sysoeve9b2cb12004-02-09 20:47:18 +000047
Igor Sysoevfff32322004-04-08 15:58:25 +000048 ngx_lib_inc="#include <pcre.h>"
49 ngx_lib="PCRE library"
Igor Sysoev407b0de2004-04-09 16:03:04 +000050 ngx_lib_test="pcre *re; re = pcre_compile(NULL, 0, NULL, 0, NULL)"
51 ngx_libs="-lpcre"
Igor Sysoevfff32322004-04-08 15:58:25 +000052 . auto/lib/test
Igor Sysoeve9b2cb12004-02-09 20:47:18 +000053
54
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000055 if [ $ngx_found = yes ]; then
56 have=HAVE_PCRE . auto/have
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000057 CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
58 CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
59 CORE_LIBS="$CORE_LIBS $ngx_libs"
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000060 PCRE=YES
Igor Sysoev9bfb4342004-04-18 19:06:02 +000061 ngx_found=no
Igor Sysoevfff32322004-04-08 15:58:25 +000062
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000063 else
Igor Sysoevfff32322004-04-08 15:58:25 +000064 # FreeBSD PCRE port.
65
66 ngx_lib="PCRE library in /usr/local/"
67 ngx_lib_cflags="-I /usr/local/include"
Igor Sysoev407b0de2004-04-09 16:03:04 +000068 ngx_libs="-L /usr/local/lib -lpcre"
Igor Sysoevfff32322004-04-08 15:58:25 +000069 . auto/lib/test
70 fi
71
72
73 if [ $ngx_found = yes ]; then
74 have=HAVE_PCRE . auto/have
75 CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
76 CORE_INCS="$CORE_INCS /usr/local/include"
77 CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
78 CORE_LIBS="$CORE_LIBS $ngx_libs"
79 PCRE=YES
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000080 fi
Igor Sysoeve9b2cb12004-02-09 20:47:18 +000081 fi
82
83fi