xref: /unit/auto/modules/conf (revision 86:3b77edf46701)
1
2# Copyright (C) NGINX, Inc.
3# Copyright (C) Valentin V. Bartenev
4
5
6NXT_MODULES_INIT=
7NXT_MODULES_SRCS=
8
9
10if [ $NXT_PYTHON_MODULE != NO ]; then
11    . auto/modules/python/conf
12fi
13
14if [ $NXT_PHP_MODULE != NO ]; then
15    . auto/modules/php/conf
16fi
17
18
19NXT_MODULES_SRC=$NXT_BUILD_DIR/nxt_modules.c
20
21
22cat << END                                            > $NXT_MODULES_SRC
23
24#include <nxt_main.h>
25#include <nxt_runtime.h>
26
27
28END
29
30
31for nxt_init in $NXT_MODULES_INIT
32do
33    $echo "extern nxt_int_t $nxt_init(nxt_thread_t *thr, nxt_runtime_t *rt);" \
34                                                     >> $NXT_MODULES_SRC
35done
36
37
38cat << END                                           >> $NXT_MODULES_SRC
39
40
41nxt_module_init_t  nxt_init_modules[] = {
42END
43
44for nxt_init in $NXT_MODULES_INIT
45do
46    $echo "    $nxt_init,"                           >> $NXT_MODULES_SRC
47done
48
49cat << END                                           >> $NXT_MODULES_SRC
50};
51
52
53nxt_uint_t  nxt_init_modules_n = nxt_nitems(nxt_init_modules);
54END
55