Skip to content

Commit

Permalink
feat: config: added a check for Lua language version 5.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultcha committed Aug 28, 2019
1 parent 9b22495 commit fd1e0f8
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ fi
ngx_feature="LuaJIT 2.x"
ngx_feature_run=no
ngx_feature_incs="#include <luajit.h>"
ngx_feature_test='#if !defined(LUAJIT_VERSION_NUM) || (LUAJIT_VERSION_NUM < 20000)
ngx_feature_test="#if !defined(LUAJIT_VERSION_NUM) || LUAJIT_VERSION_NUM < 20000
# error unsupported LuaJIT version
#endif'
#endif"

. auto/feature

Expand All @@ -191,6 +191,24 @@ fi

# ----------------------------------------

ngx_feature="Lua language 5.1"
ngx_feature_run=no
ngx_feature_incs="#include <lua.h>"
ngx_feature_test="#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM != 501
# error unsupported Lua language version
#endif"

. auto/feature

if [ $ngx_found = no ]; then
cat << END
$0: error: unsupported Lua language version; ngx_http_lua_module requires Lua 5.1.
END
exit 1
fi

# ----------------------------------------

ngx_feature="LuaJIT has FFI"
ngx_feature_libs="$LUAJIT_LIB/libluajit-5.1.a $luajit_ld_opt"
ngx_feature_run=yes
Expand Down

0 comments on commit fd1e0f8

Please sign in to comment.