Permalink
Browse files

feature: now we can automatically detect the vendor-provided LuaJIT-2…

….0 package on Gentoo. thanks Il'ya V. Yesin for the patch in github pull #167. it is still recommended, however, to explicitly set the environments LUAJIT_INC and LUAJIT_LIB.
  • Loading branch information...
1 parent db2d531 commit b5531ff5bec2d82715b6626f0a4d6b8d85dadb0a @agentzh agentzh committed Oct 15, 2012
Showing with 14 additions and 2 deletions.
  1. +14 −2 config
View
16 config
@@ -20,7 +20,7 @@ if [ -n "$LUAJIT_INC" -o -n "$LUAJIT_LIB" ]; then
if [ $ngx_found = no ]; then
cat << END
- $0: error: ngx_http_lua_module requires the Lua or LuaJIT library and LUAJIT_LIB is defined as $LUAJIT_LIB and LUAJIT_INC $LUAJIT_INC, but we cannot find LuaJIT there.
+ $0: error: ngx_http_lua_module requires the Lua or LuaJIT library and LUAJIT_LIB is defined as $LUAJIT_LIB and LUAJIT_INC (path for lua.h) $LUAJIT_INC, but we cannot find LuaJIT there.
END
exit 1
fi
@@ -56,7 +56,7 @@ else
if [ $ngx_found = no ]; then
cat << END
- $0: error: ngx_http_lua_module requires the Lua or LuaJIT library and LUA_LIB is defined as $LUA_LIB and LUA_INC is $LUA_INC, but we cannot find standard Lua there.
+ $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.
END
exit 1
fi
@@ -125,6 +125,18 @@ END
fi
. auto/feature
fi
+
+ if [ $ngx_found = no ]; then
+ # Gentoo with LuaJIT-2.0
+ ngx_feature="LuaJIT library in /usr/"
+ ngx_feature_path="/usr/include/luajit-2.0"
+ if [ $NGX_RPATH = YES ]; then
+ ngx_feature_libs="-R/usr/lib -L/usr/lib -lm -lluajit-5.1"
+ else
+ ngx_feature_libs="-L/usr/lib -lm -lluajit-5.1"
+ fi
+ . auto/feature
+ fi
fi
fi

0 comments on commit b5531ff

Please sign in to comment.