mirror of
https://github.com/openresty/openresty.git
synced 2024-10-13 00:29:41 +00:00
feature: added "<openresty-prefix>/site/lualib/" to the default Lua module search paths used by OpenResty. This location is for 3rd-party Lua modules so that the users will not pollute the "<openresty-prefix>/lualib/" directory with non-standard Lua module files.
This commit is contained in:
parent
8d76d5910f
commit
5429150ab6
14
util/configure
vendored
14
util/configure
vendored
@ -753,6 +753,7 @@ _END_
|
|||||||
# build lua modules
|
# build lua modules
|
||||||
|
|
||||||
my $lualib_prefix = File::Spec->catfile($prefix, "lualib");
|
my $lualib_prefix = File::Spec->catfile($prefix, "lualib");
|
||||||
|
my $site_lualib_prefix = File::Spec->catfile($prefix, "site/lualib");
|
||||||
|
|
||||||
my $ngx_lua_dir = auto_complete 'ngx_lua';
|
my $ngx_lua_dir = auto_complete 'ngx_lua';
|
||||||
|
|
||||||
@ -760,20 +761,11 @@ _END_
|
|||||||
die "Cannot open $ngx_lua_dir/config for appending: $!\n";
|
die "Cannot open $ngx_lua_dir/config for appending: $!\n";
|
||||||
|
|
||||||
{
|
{
|
||||||
my $path_prefix = $lualib_prefix;
|
|
||||||
|
|
||||||
#if (File::Spec->rel2abs($lualib_prefix) ne File::Spec->canonpath($lualib_prefix)
|
|
||||||
#&& $platform eq 'msys')
|
|
||||||
#{
|
|
||||||
# being a relative path and on MSYS
|
|
||||||
#$path_prefix = "!/$lualib_prefix";
|
|
||||||
#}
|
|
||||||
|
|
||||||
print $in <<"_EOC_";
|
print $in <<"_EOC_";
|
||||||
|
|
||||||
ngx_lua_dquote='"'
|
ngx_lua_dquote='"'
|
||||||
CFLAGS="\$CFLAGS -DLUA_DEFAULT_PATH='\${ngx_lua_dquote}$path_prefix/?.lua;$path_prefix/?/init.lua\$ngx_lua_dquote'"
|
CFLAGS="\$CFLAGS -DLUA_DEFAULT_PATH='\${ngx_lua_dquote}$site_lualib_prefix/?.lua;$site_lualib_prefix/?/init.lua;$lualib_prefix/?.lua;$lualib_prefix/?/init.lua\$ngx_lua_dquote'"
|
||||||
CFLAGS="\$CFLAGS -DLUA_DEFAULT_CPATH='\${ngx_lua_dquote}$path_prefix/?.so\$ngx_lua_dquote'"
|
CFLAGS="\$CFLAGS -DLUA_DEFAULT_CPATH='\${ngx_lua_dquote}$site_lualib_prefix/?.so;$lualib_prefix/?.so\$ngx_lua_dquote'"
|
||||||
_EOC_
|
_EOC_
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user