Mercurial > hg > nginx
comparison auto/cc/conf @ 6383:85dea406e18f
Dynamic modules.
The auto/module script is extended to understand ngx_module_link=DYNAMIC.
When set, it links the module as a shared object rather than statically
into nginx binary. The module can later be loaded using the "load_module"
directive.
New auto/module parameter ngx_module_order allows to define module loading
order in complex cases. By default the order is set based on ngx_module_type.
3rd party modules can be compiled dynamically using the --add-dynamic-module
configure option, which will preset ngx_module_link to "DYNAMIC" before
calling the module config script.
Win32 support is rudimentary, and only works when using MinGW gcc (which
is able to handle exports/imports automatically).
In collaboration with Ruslan Ermilov.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 04 Feb 2016 20:25:29 +0300 |
parents | 945aa9c7f282 |
children | ba3c2ca21aa5 |
comparison
equal
deleted
inserted
replaced
6382:392959224560 | 6383:85dea406e18f |
---|---|
3 # Copyright (C) Nginx, Inc. | 3 # Copyright (C) Nginx, Inc. |
4 | 4 |
5 | 5 |
6 LINK="\$(CC)" | 6 LINK="\$(CC)" |
7 | 7 |
8 MAIN_LINK= | |
9 MODULE_LINK="-shared" | |
10 | |
8 ngx_include_opt="-I " | 11 ngx_include_opt="-I " |
9 ngx_compile_opt="-c" | 12 ngx_compile_opt="-c" |
13 ngx_pic_opt="-fPIC" | |
10 ngx_objout="-o " | 14 ngx_objout="-o " |
11 ngx_binout="-o " | 15 ngx_binout="-o " |
12 ngx_objext="o" | 16 ngx_objext="o" |
13 ngx_binext= | 17 ngx_binext= |
18 ngx_modext=".so" | |
14 | 19 |
15 ngx_long_start= | 20 ngx_long_start= |
16 ngx_long_end= | 21 ngx_long_end= |
17 | 22 |
18 ngx_regex_dirsep="\/" | 23 ngx_regex_dirsep="\/" |
42 | 47 |
43 ngx_include_opt="-I" | 48 ngx_include_opt="-I" |
44 ;; | 49 ;; |
45 | 50 |
46 sunc) | 51 sunc) |
52 | |
53 MAIN_LINK= | |
54 MODULE_LINK="-G" | |
47 | 55 |
48 case "$NGX_MACHINE" in | 56 case "$NGX_MACHINE" in |
49 | 57 |
50 i86pc) | 58 i86pc) |
51 NGX_AUX=" src/os/unix/ngx_sunpro_x86.il" | 59 NGX_AUX=" src/os/unix/ngx_sunpro_x86.il" |
151 if [ $ngx_found = no ]; then | 159 if [ $ngx_found = no ]; then |
152 echo $0: error: the invalid value in --with-ld-opt=\"$NGX_LD_OPT\" | 160 echo $0: error: the invalid value in --with-ld-opt=\"$NGX_LD_OPT\" |
153 echo | 161 echo |
154 exit 1 | 162 exit 1 |
155 fi | 163 fi |
164 fi | |
165 | |
166 | |
167 ngx_feature="-Wl,-E switch" | |
168 ngx_feature_name= | |
169 ngx_feature_run=no | |
170 ngx_feature_incs= | |
171 ngx_feature_path= | |
172 ngx_feature_libs=-Wl,-E | |
173 ngx_feature_test= | |
174 . auto/feature | |
175 | |
176 if [ $ngx_found = yes ]; then | |
177 MAIN_LINK="-Wl,-E" | |
156 fi | 178 fi |
157 | 179 |
158 | 180 |
159 ngx_feature="gcc builtin atomic operations" | 181 ngx_feature="gcc builtin atomic operations" |
160 ngx_feature_name=NGX_HAVE_GCC_ATOMIC | 182 ngx_feature_name=NGX_HAVE_GCC_ATOMIC |