~ubuntu-branches/debian/stretch/nginx/stretch

« back to all changes in this revision

Viewing changes to debian/modules/nginx-lua/config

  • Committer: Package Import Robot
  • Author(s): Christos Trochalakis, Christos Trochalakis
  • Date: 2015-07-14 20:24:52 UTC
  • mfrom: (1.1.49)
  • Revision ID: package-import@ubuntu.com-20150714202452-kcbqvpf6hq97w33q
Tags: 1.9.3-1
[ Christos Trochalakis]
* New upstream Release. (Closes: #789924)
* debian/control:
  + Remove XS-Testsuite header, it is now automatically added when
    `debian/tests/control` is present.
* debian/modules/nginx-lua:
  + Update nginx-lua to v0.9.16 and drop our backported patches.
* debian/conf/*:
  + Add REQUEST_SCHEME to fcgi, wsgi and scgi configs (sync with upstream).

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#   error unsupported Lua language version
9
9
#endif
10
10
(void) luaL_newstate();"
 
11
ngx_lua_opt_I=
 
12
ngx_lua_opt_L=
11
13
 
12
14
if [ -n "$LUAJIT_INC" -o -n "$LUAJIT_LIB" ]; then
13
 
    # explicitly set Lua lib path
14
 
    ngx_feature="LuaJIT library in $LUAJIT_LIB and $LUAJIT_INC (specified by the LUAJIT_LIB and LUAJIT_INC env)"
 
15
    # explicitly set LuaJIT paths
 
16
 
 
17
    # attempt to link with -ldl, static linking on Linux requires it.
 
18
    ngx_feature="LuaJIT library in $LUAJIT_LIB and $LUAJIT_INC (specified by the LUAJIT_LIB and LUAJIT_INC env, with -ldl)"
15
19
    ngx_feature_path="$LUAJIT_INC"
 
20
    ngx_lua_opt_I="-I$LUAJIT_INC"
 
21
    ngx_lua_opt_L="-L$LUAJIT_LIB"
16
22
    if [ $NGX_RPATH = YES ]; then
17
 
        ngx_feature_libs="-R$LUAJIT_LIB -L$LUAJIT_LIB -lluajit-5.1 -lm"
 
23
        ngx_feature_libs="-R$LUAJIT_LIB $ngx_lua_opt_L -lluajit-5.1 -lm -ldl"
18
24
    else
19
 
        ngx_feature_libs="-L$LUAJIT_LIB -lluajit-5.1 -lm"
 
25
        ngx_feature_libs="$ngx_lua_opt_L -lluajit-5.1 -lm -ldl"
20
26
    fi
21
27
 
22
28
    . auto/feature
23
29
 
24
30
    if [ $ngx_found = no ]; then
25
 
        # retry with -ldl, static linking on Linux requires it.
26
 
        ngx_feature="LuaJIT library in $LUAJIT_LIB and $LUAJIT_INC (specified by the LUAJIT_LIB and LUAJIT_INC env, with -ldl)"
 
31
        # retry without -ldl
 
32
        ngx_feature="LuaJIT library in $LUAJIT_LIB and $LUAJIT_INC (specified by the LUAJIT_LIB and LUAJIT_INC env)"
27
33
        ngx_feature_path="$LUAJIT_INC"
 
34
        ngx_lua_opt_I="-I$LUAJIT_INC"
 
35
        ngx_lua_opt_L="-L$LUAJIT_LIB"
28
36
        if [ $NGX_RPATH = YES ]; then
29
 
            ngx_feature_libs="-R$LUAJIT_LIB -L$LUAJIT_LIB -lluajit-5.1 -lm -ldl"
 
37
            ngx_feature_libs="-R$LUAJIT_LIB $ngx_lua_opt_L -lluajit-5.1 -lm"
30
38
        else
31
 
            ngx_feature_libs="-L$LUAJIT_LIB -lluajit-5.1 -lm -ldl"
 
39
            ngx_feature_libs="$ngx_lua_opt_L -lluajit-5.1 -lm"
32
40
        fi
33
41
 
34
42
        . auto/feature
59
67
    esac
60
68
else
61
69
    if [ -n "$LUA_INC" -o -n "$LUA_LIB" ]; then
62
 
        # explicitly set Lua lib path
 
70
        # explicitly set Lua paths
63
71
        ngx_feature="Lua library in $LUA_LIB and $LUA_INC (specified by the LUA_LIB and LUA_INC env)"
64
72
        ngx_feature_path="$LUA_INC"
 
73
        ngx_lua_opt_I="-I$LUA_INC"
 
74
        ngx_lua_opt_L="-L$LUA_LIB"
65
75
        if [ $NGX_RPATH = YES ]; then
66
 
            ngx_feature_libs="-R$LUA_LIB -L$LUA_LIB -llua -lm"
 
76
            ngx_feature_libs="-R$LUA_LIB $ngx_lua_opt_L -llua -lm -ldl"
67
77
        else
68
 
            ngx_feature_libs="-L$LUA_LIB -llua -lm"
 
78
            ngx_feature_libs="$ngx_lua_opt_L -llua -lm -ldl"
69
79
        fi
70
80
 
71
81
        . auto/feature
72
82
 
73
83
        if [ $ngx_found = no ]; then
 
84
            # retry without -ldl
 
85
 
 
86
            ngx_feature_path="$LUA_INC"
 
87
            ngx_lua_opt_I="-I$LUA_INC"
 
88
            ngx_lua_opt_L="-L$LUA_LIB"
 
89
            if [ $NGX_RPATH = YES ]; then
 
90
                ngx_feature_libs="-R$LUA_LIB $ngx_lua_opt_L -llua -lm"
 
91
            else
 
92
                ngx_feature_libs="$ngx_lua_opt_L -llua -lm"
 
93
            fi
 
94
 
 
95
            . auto/feature
 
96
        fi
 
97
 
 
98
        if [ $ngx_found = no ]; then
74
99
            cat << END
75
100
            $0: error: ngx_http_lua_module requires the Lua or LuaJIT library and LUA_LIB is defined as $LUA_LIB and LUA_INC (path for lua.h) is $LUA_INC, but we cannot find standard Lua there.
76
101
END
167
192
        fi
168
193
 
169
194
        if [ $ngx_found = no ]; then
170
 
            # Gentoo with LuaJIT-2.0
 
195
            # Gentoo with LuaJIT-2.0, try with -ldl
 
196
            ngx_feature="LuaJIT library in /usr/"
 
197
            ngx_feature_path="/usr/include/luajit-2.0"
 
198
            if [ $NGX_RPATH = YES ]; then
 
199
                ngx_feature_libs="-R/usr/lib -L/usr/lib -lm -lluajit-5.1 -ldl"
 
200
            else
 
201
                ngx_feature_libs="-L/usr/lib -lm -lluajit-5.1 -ldl"
 
202
            fi
 
203
            . auto/feature
 
204
        fi
 
205
 
 
206
        if [ $ngx_found = no ]; then
 
207
            # Gentoo with LuaJIT 2.0
171
208
            ngx_feature="LuaJIT library in /usr/"
172
209
            ngx_feature_path="/usr/include/luajit-2.0"
173
210
            if [ $NGX_RPATH = YES ]; then
177
214
            fi
178
215
            . auto/feature
179
216
        fi
180
 
 
181
 
        if [ $ngx_found = no ]; then
182
 
            # Gentoo with LuaJIT-2.0, retry with -ldl
183
 
            ngx_feature="LuaJIT library in /usr/"
184
 
            ngx_feature_path="/usr/include/luajit-2.0"
185
 
            if [ $NGX_RPATH = YES ]; then
186
 
                ngx_feature_libs="-R/usr/lib -L/usr/lib -lm -lluajit-5.1 -ldl"
187
 
            else
188
 
                ngx_feature_libs="-L/usr/lib -lm -lluajit-5.1 -ldl"
189
 
            fi
190
 
            . auto/feature
191
 
        fi
192
217
    fi
193
218
fi
194
219
 
195
220
if [ $ngx_found = yes ]; then
 
221
    # this is a hack to persuade nginx's build system to favor
 
222
    # the paths set by our user environments:
 
223
    CFLAGS="$ngx_lua_opt_I $CFLAGS"
 
224
    NGX_LD_OPT="$ngx_lua_opt_L $NGX_LD_OPT"
 
225
 
196
226
    CORE_INCS="$CORE_INCS $ngx_feature_path"
197
227
    CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
198
228
else