blob: 40a09b9bd114f7c7052bc78ec6cc81db33e231f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
|
# Copyright (C) Igor Sysoev
help=no
PREFIX=
SBIN_PATH=
CONF_PATH=
ERROR_LOG_PATH=
PID_PATH=
NGX_USER=
NGX_GROUP=
HTTP_LOG_PATH=
CC=${CC:-gcc}
CPP=
NGX_OBJS=objs
DEBUG=NO
NGX_CC_OPT=
NGX_LD_OPT=
CPU=NO
TEST_BUILD_DEVPOLL=NO
TEST_BUILD_EPOLL=NO
TEST_BUILD_RTSIG=NO
EVENT_FOUND=NO
EVENT_RTSIG=NO
EVENT_SELECT=NO
EVENT_POLL=NO
EVENT_AIO=NO
USE_THREADS=NO
HTTP=YES
HTTP_CHARSET=YES
HTTP_GZIP=YES
HTTP_SSL=NO
HTTP_SSI=NO
HTTP_ACCESS=YES
HTTP_USERID=YES
HTTP_AUTOINDEX=YES
HTTP_STATUS=NO
HTTP_REWRITE=YES
HTTP_PROXY=YES
IMAP=NO
USE_PCRE=NO
PCRE=NONE
PCRE_OPT=
USE_OPENSSL=NO
OPENSSL=NONE
USE_MD5=NO
MD5=NONE
MD5_OPT=
MD5_ASM=NO
USE_ZLIB=NO
ZLIB=NONE
ZLIB_OPT=
ZLIB_ASM=NO
for option
do
case "$option" in
-*=*) value=`echo "$option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;;
*) value="" ;;
esac
case "$option" in
--help) help=yes ;;
--prefix=*) PREFIX="$value" ;;
--sbin-path=*) SBIN_PATH="$value" ;;
--conf-path=*) CONF_PATH="$value" ;;
--error-log-path=*) ERROR_LOG_PATH="$value" ;;
--pid-path=*) PID_PATH="$value" ;;
--user=*) NGX_USER="$value" ;;
--group=*) NGX_GROUP="$value" ;;
--crossbuild=*) PLATFORM="$value" ;;
--builddir=*) NGX_OBJS="$value" ;;
--with-rtsig_module) EVENT_RTSIG=YES ;;
--with-select_module) EVENT_SELECT=YES ;;
--without-select_module) EVENT_SELECT=NONE ;;
--with-poll_module) EVENT_POLL=YES ;;
--without-poll_module) EVENT_POLL=NONE ;;
--with-aio_module) EVENT_AIO=YES ;;
--with-threads=*) USE_THREADS="$value" ;;
--with-threads) USE_THREADS="pthreads" ;;
--without-http) HTTP=NO ;;
--http-log-path=*) HTTP_LOG_PATH="$value" ;;
--with-http_ssl_module) HTTP_SSL=YES ;;
--without-http_charset_module) HTTP_CHARSET=NO ;;
--without-http_gzip_module) HTTP_GZIP=NO ;;
--without-http_ssi_module) HTTP_SSI=NO ;;
--without-http_userid_module) HTTP_USERID=NO ;;
--without-http_access_module) HTTP_ACCESS=NO ;;
--without-http_autoindex_module) HTTP_AUTOINDEX=NO ;;
--without-http_status_module) HTTP_STATUS=NO ;;
--without-http_rewrite_module) HTTP_REWRITE=NO ;;
--without-http_proxy_module) HTTP_PROXY=NO ;;
--with-imap) IMAP=YES ;;
--with-cc=*) CC="$value" ;;
--with-cpp=*) CPP="$value" ;;
--with-cc-opt=*) NGX_CC_OPT="$value" ;;
--with-ld-opt=*) NGX_LD_OPT="$value" ;;
--with-cpu-opt=*) CPU="$value" ;;
--with-debug) DEBUG=YES ;;
--without-pcre) USE_PCRE=DISABLED ;;
--with-pcre=*) PCRE="$value" ;;
--with-pcre-opt=*) PCRE_OPT="$value" ;;
--with-openssl=*) OPENSSL="$value" ;;
--with-md5=*) MD5="$value" ;;
--with-md5-opt=*) MD5_OPT="$value" ;;
--with-md5-asm) MD5_ASM=YES ;;
--with-zlib=*) ZLIB="$value" ;;
--with-zlib-opt=*) ZLIB_OPT="$value" ;;
--with-zlib-asm=*) ZLIB_ASM="$value" ;;
--test-build-devpoll) TEST_BUILD_DEVPOLL=YES ;;
--test-build-epoll) TEST_BUILD_EPOLL=YES ;;
--test-build-rtsig) TEST_BUILD_RTSIG=YES ;;
*)
echo "$0: error: invalid option \"$option\""
exit 1
;;
esac
done
if [ $help = yes ]; then
cat << END
--help this message
--user=USER set non-privilege user
for the worker processes
--group=GROUP set non-privilege group
for the worker processes
--with-select_module enable select module
--without-select_module disable select module
--with-poll_module enable poll module
--without-poll_module disable poll module
--without-http_charset_module disable ngx_http_charset_module
--without-http_rewrite_module disable ngx_http_rewrite_module
--without-http_gzip_module disable ngx_http_gzip_module
--without-http_proxy_module disable ngx_http_proxy_module
--with-cc-opt=OPTIONS additional options for compiler
--with-ld-opt=OPTIONS additional options for linker
--with-pcre=DIR path to PCRE library
--with-md5=DIR path to md5 library
--with-zlib=DIR path to zlib library
--with-openssl=DIR path to OpenSSL library
END
exit 1
fi
if [ $HTTP = NO ]; then
HTTP_CHARSET=NO
HTTP_GZIP=NO
HTTP_SSI=NO
HTTP_USERID=NO
HTTP_ACCESS=NO
HTTP_STATUS=NO
HTTP_REWRITE=NO
HTTP_PROXY=NO
fi
if [ ".$PLATFORM" = ".win32" -a $EVENT_POLL = YES ]; then
EVENT_POLL=NO
echo "$0: warning: --with-poll_module option is ignored for win32"
fi
if test -z "$PREFIX"; then
PREFIX=/usr/local/nginx
fi
if test -z "$NGX_GROUP"; then
NGX_GROUP=NGX_USER
fi
if test -z "$NGX_USER"; then
NGX_USER=nobody
NGX_GROUP=nobody
fi
case ".$SBIN_PATH" in
./*)
;;
.)
SBIN_PATH=$PREFIX/sbin/nginx
;;
*)
SBIN_PATH=$PREFIX/$SBIN_PATH
;;
esac
case ".$CONF_PATH" in
./*)
;;
.)
CONF_PATH=$PREFIX/conf/nginx.conf
;;
*)
CONF_PATH=$PREFIX/$CONF_PATH
;;
esac
case ".$PID_PATH" in
./*)
;;
.)
PID_PATH=$PREFIX/logs/nginx.pid
;;
*)
PID_PATH=$PREFIX/$PID_PATH
;;
esac
case ".$ERROR_LOG_PATH" in
./*)
;;
.)
ERROR_LOG_PATH=$PREFIX/logs/error.log
;;
.stderr)
ERROR_LOG_PATH=
;;
*)
ERROR_LOG_PATH=$PREFIX/$ERROR_LOG_PATH
;;
esac
case ".$HTTP_LOG_PATH" in
./*)
;;
.)
HTTP_LOG_PATH=$PREFIX/logs/access.log
;;
*)
HTTP_LOG_PATH=$PREFIX/$HTTP_LOG_PATH
;;
esac
|