Igor Sysoev | e9b2cb1 | 2004-02-09 20:47:18 +0000 | [diff] [blame] | 1 | |
Igor Sysoev | ff8da91 | 2004-09-29 16:00:49 +0000 | [diff] [blame] | 2 | # Copyright (C) Igor Sysoev |
| 3 | |
| 4 | |
Igor Sysoev | e9b2cb1 | 2004-02-09 20:47:18 +0000 | [diff] [blame] | 5 | if [ $PCRE != NONE ]; then |
Igor Sysoev | 11dbe97 | 2004-03-29 17:43:58 +0000 | [diff] [blame] | 6 | CORE_INCS="$CORE_INCS $PCRE" |
Igor Sysoev | e9b2cb1 | 2004-02-09 20:47:18 +0000 | [diff] [blame] | 7 | CORE_DEPS="$CORE_DEPS $REGEX_DEPS" |
| 8 | CORE_SRCS="$CORE_SRCS $REGEX_SRCS" |
| 9 | |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame^] | 10 | case "$NGX_CC_NAME" in |
Igor Sysoev | fc5a10a | 2004-03-09 19:47:07 +0000 | [diff] [blame] | 11 | |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame^] | 12 | msvc | owc | bcc) |
| 13 | have=NGX_PCRE . auto/have |
Igor Sysoev | fc5a10a | 2004-03-09 19:47:07 +0000 | [diff] [blame] | 14 | have=PCRE_STATIC . auto/have |
Igor Sysoev | 3646a16 | 2004-03-14 20:46:25 +0000 | [diff] [blame] | 15 | CORE_DEPS="$CORE_DEPS $PCRE/pcre.h" |
| 16 | LINK_DEPS="$LINK_DEPS $PCRE/pcre.lib" |
Igor Sysoev | fc5a10a | 2004-03-09 19:47:07 +0000 | [diff] [blame] | 17 | CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib" |
| 18 | ;; |
| 19 | |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame^] | 20 | icc) |
| 21 | have=NGX_PCRE . auto/have |
Igor Sysoev | 3646a16 | 2004-03-14 20:46:25 +0000 | [diff] [blame] | 22 | 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 Sysoev | fc5a10a | 2004-03-09 19:47:07 +0000 | [diff] [blame] | 33 | *) |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame^] | 34 | have=NGX_PCRE . auto/have |
Igor Sysoev | a893eab | 2004-03-11 21:34:52 +0000 | [diff] [blame] | 35 | CORE_DEPS="$CORE_DEPS $PCRE/pcre.h" |
| 36 | LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a" |
Igor Sysoev | 9a864bd | 2004-04-04 20:32:09 +0000 | [diff] [blame] | 37 | CORE_LIBS="$CORE_LIBS $PCRE/.libs/libpcre.a" |
| 38 | #CORE_LIBS="$CORE_LIBS -L $PCRE/.libs -lpcre" |
Igor Sysoev | fc5a10a | 2004-03-09 19:47:07 +0000 | [diff] [blame] | 39 | ;; |
| 40 | |
| 41 | esac |
Igor Sysoev | e9b2cb1 | 2004-02-09 20:47:18 +0000 | [diff] [blame] | 42 | |
| 43 | else |
| 44 | |
Igor Sysoev | fc5a10a | 2004-03-09 19:47:07 +0000 | [diff] [blame] | 45 | if [ $PLATFORM != win32 ]; then |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame^] | 46 | PCRE=NO |
Igor Sysoev | 9bfb434 | 2004-04-18 19:06:02 +0000 | [diff] [blame] | 47 | |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame^] | 48 | # 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 Sysoev | e9b2cb1 | 2004-02-09 20:47:18 +0000 | [diff] [blame] | 58 | |
Igor Sysoev | fc5a10a | 2004-03-09 19:47:07 +0000 | [diff] [blame] | 59 | if [ $ngx_found = yes ]; then |
Igor Sysoev | fc5a10a | 2004-03-09 19:47:07 +0000 | [diff] [blame] | 60 | CORE_DEPS="$CORE_DEPS $REGEX_DEPS" |
| 61 | CORE_SRCS="$CORE_SRCS $REGEX_SRCS" |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame^] | 62 | CORE_LIBS="$CORE_LIBS $ngx_feature_libs" |
Igor Sysoev | fc5a10a | 2004-03-09 19:47:07 +0000 | [diff] [blame] | 63 | PCRE=YES |
Igor Sysoev | 9bfb434 | 2004-04-18 19:06:02 +0000 | [diff] [blame] | 64 | ngx_found=no |
Igor Sysoev | fc5a10a | 2004-03-09 19:47:07 +0000 | [diff] [blame] | 65 | fi |
Igor Sysoev | e9b2cb1 | 2004-02-09 20:47:18 +0000 | [diff] [blame] | 66 | fi |
Igor Sysoev | e9b2cb1 | 2004-02-09 20:47:18 +0000 | [diff] [blame] | 67 | fi |