comparison auto/lib/pcre/conf @ 875:7af8276b1c2f

test PCRE in FreeBSD, Linux, and NetBSD
author Igor Sysoev <igor@sysoev.ru>
date Mon, 27 Nov 2006 11:07:09 +0000
parents 4d9ea73a627a
children 853abb6c4c89
comparison
equal deleted inserted replaced
874:98afa13ea7e5 875:7af8276b1c2f
62 else 62 else
63 63
64 if [ "$NGX_PLATFORM" != win32 ]; then 64 if [ "$NGX_PLATFORM" != win32 ]; then
65 PCRE=NO 65 PCRE=NO
66 66
67 # FreeBSD PCRE port requires --with-cc-opt="-I /usr/local/include"
68 # --with-ld-opt="-L /usr/local/lib"
69
70 ngx_feature="PCRE library" 67 ngx_feature="PCRE library"
71 ngx_feature_name="NGX_PCRE" 68 ngx_feature_name="NGX_PCRE"
72 ngx_feature_run=no 69 ngx_feature_run=no
73 ngx_feature_incs="#include <pcre.h>" 70 ngx_feature_incs="#include <pcre.h>"
71 ngx_feature_path=
74 ngx_feature_libs="-lpcre" 72 ngx_feature_libs="-lpcre"
75 ngx_feature_test="pcre *re; re = pcre_compile(NULL, 0, NULL, 0, NULL)" 73 ngx_feature_test="pcre *re; re = pcre_compile(NULL, 0, NULL, 0, NULL)"
76 . auto/feature 74 . auto/feature
77 75
78 if [ $ngx_found = yes ]; then 76 if [ $ngx_found = yes ]; then
79 CORE_DEPS="$CORE_DEPS $REGEX_DEPS" 77 CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
80 CORE_SRCS="$CORE_SRCS $REGEX_SRCS" 78 CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
81 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" 79 CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
82 PCRE=YES 80 PCRE=YES
83 ngx_found=no 81 ngx_found=no
82
83 else
84 # FreeBSD port
85
86 ngx_feature="PCRE library in /usr/local/"
87 ngx_feature_name="NGX_PCRE"
88 ngx_feature_run=no
89 ngx_feature_incs="#include <pcre.h>"
90 ngx_feature_path="/usr/local/include"
91 ngx_feature_libs="-L /usr/local/lib -lpcre"
92 ngx_feature_test="pcre *re;
93 re = pcre_compile(NULL, 0, NULL, 0, NULL)"
94 . auto/feature
84 fi 95 fi
96
97 if [ $ngx_found = yes ]; then
98 CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
99 CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
100 CORE_INCS="$CORE_INCS $ngx_feature_path"
101 CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
102 PCRE=YES
103 ngx_found=no
104
105 else
106 # Linux package
107
108 ngx_feature="PCRE library in /usr/include/pcre/"
109 ngx_feature_name="NGX_PCRE"
110 ngx_feature_run=no
111 ngx_feature_incs="#include <pcre.h>"
112 ngx_feature_path="/usr/include/pcre"
113 ngx_feature_libs="-lpcre"
114 ngx_feature_test="pcre *re;
115 re = pcre_compile(NULL, 0, NULL, 0, NULL)"
116 . auto/feature
117 fi
118
119 if [ $ngx_found = yes ]; then
120 CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
121 CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
122 CORE_INCS="$CORE_INCS $ngx_feature_path"
123 CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
124 PCRE=YES
125 ngx_found=no
126
127 else
128 # NetBSD port
129
130 ngx_feature="PCRE library in /usr/pkg/"
131 ngx_feature_name="NGX_PCRE"
132 ngx_feature_run=no
133 ngx_feature_incs="#include <pcre.h>"
134 ngx_feature_path="/usr/pkg/include"
135 ngx_feature_libs="-L /usr/pkg/lib -lpcre"
136 ngx_feature_test="pcre *re;
137 re = pcre_compile(NULL, 0, NULL, 0, NULL)"
138 . auto/feature
139 fi
140
141 if [ $ngx_found = yes ]; then
142 CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
143 CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
144 CORE_INCS="$CORE_INCS $ngx_feature_path"
145 CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
146 PCRE=YES
147 ngx_found=no
148 fi
149
85 fi 150 fi
86 fi 151 fi