change: now we enable -DLUAJIT_ENABLE_LUA52COMPAT in our bundled LuaJIT build by default, which can be disabled by ./configure --without-luajit-lua52.

This commit is contained in:
Yichun Zhang (agentzh)
2016-11-13 08:17:27 -08:00
parent dbccee1418
commit e254c3d0c1
4 changed files with 264 additions and 86 deletions

14
util/configure vendored
View File

@ -127,6 +127,7 @@ my @ngx_rpaths;
my $cc;
my $cores;
my $luajit_xcflags = '';
my $no_luajit_lua52;
my (@ngx_opts, @ngx_cc_opts, @ngx_ld_opts);
@ -255,6 +256,9 @@ for my $opt (@ARGV) {
} elsif ($opt =~ /^--with-luajit-xcflags=(.*)/) {
$luajit_xcflags .= " $1";
} elsif ($opt =~ /^--without-luajit-lua52/) {
$no_luajit_lua52 = 1;
} elsif ($opt =~ /^--with-libdrizzle=(.*)/) {
$resty_opts{libdrizzle} = $1;
@ -607,6 +611,12 @@ _END_
}
}
if (!$no_luajit_lua52
&& (!$luajit_xcflags || $luajit_xcflags !~ /-DLUAJIT_ENABLE_LUA52COMPAT\b/))
{
$luajit_xcflags .= " -DLUAJIT_ENABLE_LUA52COMPAT";
}
if ($opts->{debug}) {
$luajit_xcflags .= " -DLUA_USE_APICHECK -DLUA_USE_ASSERT";
$luajit_xcflags =~ s/^ +//;
@ -1108,9 +1118,13 @@ _EOC_
--with-lua51 enable and build the bundled standard Lua 5.1 interpreter
--without-lua51 disable the bundled standard Lua 5.1 interpreter
--with-lua51=DIR specify the external installation of Lua 5.1 by DIR
--with-luajit enable and build the bundled LuaJIT 2.1 (the default)
--with-luajit=DIR use the external LuaJIT 2.1 installation specified by DIR
--with-luajit-xcflags=FLAGS Specify extra C compiler flags for LuaJIT 2.1
--without-luajit-lua52 Turns off the LuaJIT extensions from Lua 5.2 that may break
backward compatibility.
--with-libdrizzle=DIR specify the libdrizzle 1.0 (or drizzle) installation prefix
--with-libpq=DIR specify the libpq (or postgresql) installation prefix
--with-pg_config=PATH specify the path of the pg_config utility

View File

@ -758,7 +758,6 @@ cp $root/util/build-win32.sh util/ || exit 1
cp $root/COPYRIGHT ./ || exit 1
perl bundle/$resty_cli/bin/md2pod.pl $root/doc/README-win32.md | pod2text > README-win32.txt || exit 1
unix2dos README-win32.txt || exit 1
find bundle -name '*~' -delete
mkdir patches/ || exit 1
cp $root/patches/openssl-1.0.2h-sess_set_get_cb_yield.patch patches/ || exit 1
@ -782,7 +781,7 @@ else
fi
cd nginx.org/ || exit 1
$nginx_xml2pod xml/en/docs || exit 1
cd $curdir
cd $curdir || exit 1
echo "restydoc-index $root/work/nginx.org"
$restydoc_index --outdir bundle $root/work/nginx.org || exit 1
@ -802,14 +801,15 @@ for indir in bundle/*/; do
if [ "$indir" == "bundle/nginx-$main_ver/" ]; then
continue
fi
echo "restydoc-index $indir"
$restydoc_index --outdir bundle $indir || exit 1
echo "$restydoc_index --outdir bundle $indir"
$restydoc_index --outdir $curdir/bundle $indir || exit 1
done
cd $curdir || exit 1
find bundle -name '*.md' -delete
find bundle -name '*.markdown' -delete
find bundle -name '*.wiki' -delete
find bundle -name '*~' -delete
cd $root || exit 1

View File

@ -1,7 +1,7 @@
#!/bin/bash
main_ver=1.11.2
minor_ver=2rc1
minor_ver=2rc2
version=$main_ver.$minor_ver
echo $version