-
Notifications
You must be signed in to change notification settings - Fork 15
/
config.sh
executable file
·86 lines (61 loc) · 1.76 KB
/
config.sh
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
#!/bin/sh
ngx_path=${HOME}/nginx
src_path=${HOME}/github/ngx_ansic_dev
build_date="${USER} build at `date '+%Y.%m.%d %H:%M'`"
cc_opt="-g -O0"
#cc_opt="-g -O0 -DNGX_DEBUG_PALLOC"
prefix="--prefix=/opt/nginx"
common_opts="--with-threads --with-pcre-jit"
debug_opts="--with-debug"
# sudo apt-get install google-perftools
gperf_module="--with-google_perftools_module"
no_modules="--without-http_fastcgi_module
--without-http_uwsgi_module
--without-http_scgi_module
"
aux_module="--add-module=${src_path}/misc"
modules="ngx_http_ndg_hello_module
ngx_http_ndg_basic_module
ngx_http_ndg_advance_module
ngx_http_ndg_echo_module
ngx_http_ndg_filter_module
ngx_http_ndg_upstream_module
ngx_http_ndg_balance_module
ngx_http_ndg_subrequest_module
ngx_http_ndg_variable_module
ngx_http_ndg_complex_value_module
ngx_http_ndg_thread_module
ngx_http_ndg_debug_module
"
http_modules=""
for m in $modules
do
http_modules="${http_modules} --add-module=${src_path}/http/${m} "
done
modules="ngx_stream_ndg_hello_module
ngx_stream_ndg_discard_module
ngx_stream_ndg_time_module
ngx_stream_ndg_echo_module
"
stream_modules="--with-stream "
for m in $modules
do
stream_modules="${stream_modules} --add-module=${src_path}/stream/${m} "
done
misc_modules="--add-module=${src_path}/misc"
opts="${prefix}
${common_opts}
${debug_opts}
${gperf_module}
${aux_module}
${http_modules}
${stream_modules}
${misc_modules}
${no_modules}
"
cd $ngx_path
./configure \
--build="${build_date}" \
--with-cc-opt="${cc_opt}" \
${opts}
cd -