blob: cd516e1e78cee9ce788a64c9fb639088178d1a90 [file] [log] [blame]
Igor Sysoeve9b2cb12004-02-09 20:47:18 +00001
Igor Sysoevff8da912004-09-29 16:00:49 +00002# Copyright (C) Igor Sysoev
3
4
Igor Sysoeve9b2cb12004-02-09 20:47:18 +00005if [ $PCRE != NONE ]; then
Igor Sysoev11dbe972004-03-29 17:43:58 +00006 CORE_INCS="$CORE_INCS $PCRE"
Igor Sysoeve9b2cb12004-02-09 20:47:18 +00007 CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
8 CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
9
Igor Sysoevc0edbcc2004-10-21 15:34:38 +000010 case "$NGX_CC_NAME" in
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000011
Igor Sysoevc0edbcc2004-10-21 15:34:38 +000012 msvc | owc | bcc)
13 have=NGX_PCRE . auto/have
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000014 have=PCRE_STATIC . auto/have
Igor Sysoev3646a162004-03-14 20:46:25 +000015 CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
16 LINK_DEPS="$LINK_DEPS $PCRE/pcre.lib"
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000017 CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib"
18 ;;
19
Igor Sysoevc0edbcc2004-10-21 15:34:38 +000020 icc)
21 have=NGX_PCRE . auto/have
Igor Sysoev3646a162004-03-14 20:46:25 +000022 CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
23
24 LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
25
26 # to allow -ipo optimization we link with the *.o but not library
27 CORE_LIBS="$CORE_LIBS $PCRE/maketables.o"
28 CORE_LIBS="$CORE_LIBS $PCRE/get.o"
29 CORE_LIBS="$CORE_LIBS $PCRE/study.o"
30 CORE_LIBS="$CORE_LIBS $PCRE/pcre.o"
31 ;;
32
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000033 *)
Igor Sysoevc0edbcc2004-10-21 15:34:38 +000034 have=NGX_PCRE . auto/have
Igor Sysoeva893eab2004-03-11 21:34:52 +000035 CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
36 LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
Igor Sysoev9a864bd2004-04-04 20:32:09 +000037 CORE_LIBS="$CORE_LIBS $PCRE/.libs/libpcre.a"
38 #CORE_LIBS="$CORE_LIBS -L $PCRE/.libs -lpcre"
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000039 ;;
40
41 esac
Igor Sysoeve9b2cb12004-02-09 20:47:18 +000042
43else
44
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000045 if [ $PLATFORM != win32 ]; then
Igor Sysoevc0edbcc2004-10-21 15:34:38 +000046 PCRE=NO
Igor Sysoev9bfb4342004-04-18 19:06:02 +000047
Igor Sysoevc0edbcc2004-10-21 15:34:38 +000048 # FreeBSD PCRE port requires --with-cc-opt="-I /usr/local/include"
49 # --with-ld-opt="-L /usr/local/lib"
50
51 ngx_feature="PCRE library"
52 ngx_feature_name="PCRE"
53 ngx_feature_run=no
54 ngx_feature_incs="#include <pcre.h>"
55 ngx_feature_libs="-lpcre"
56 ngx_feature_test="pcre *re; re = pcre_compile(NULL, 0, NULL, 0, NULL)"
57 . auto/feature
Igor Sysoeve9b2cb12004-02-09 20:47:18 +000058
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000059 if [ $ngx_found = yes ]; then
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000060 CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
61 CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
Igor Sysoevc0edbcc2004-10-21 15:34:38 +000062 CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000063 PCRE=YES
Igor Sysoev9bfb4342004-04-18 19:06:02 +000064 ngx_found=no
Igor Sysoevfc5a10a2004-03-09 19:47:07 +000065 fi
Igor Sysoeve9b2cb12004-02-09 20:47:18 +000066 fi
Igor Sysoeve9b2cb12004-02-09 20:47:18 +000067fi