./configure: added --with-threads to usage; also added --with-threads test to dist-check.

This commit is contained in:
Yichun Zhang (agentzh) 2015-07-03 23:23:41 +08:00
parent ce65738299
commit 7d0443d5d7
2 changed files with 20 additions and 0 deletions

2
util/configure vendored
View File

@ -1013,6 +1013,8 @@ Options directly inherited from nginx
--with-poll_module enable poll module
--without-poll_module disable poll module
--with-threads enable thread pool support
--with-file-aio enable file aio support
--with-ipv6 enable ipv6 support

View File

@ -87,6 +87,24 @@ sh "sudo $prefix/nginx/sbin/nginx -sstop";
$cfg_opts .= " --with-http_iconv_module";
warn "\n=== --with-threads ===\n";
$prefix = "/usr/local/openresty-threads";
unless ($opts{f}) {
sh "./configure $cfg_opts --with-threads --prefix=$prefix -j$jobs > /dev/null";
}
sh "$make -j$jobs > /dev/null";
sh "sudo $make install > /dev/null";
sh "sudo cp /tmp/nginx.conf $prefix/nginx/conf/nginx.conf";
sh "$prefix/nginx/sbin/nginx -V 2>&1 |grep $ver";
sh "$prefix/nginx/sbin/nginx -V 2>&1 |grep '\\--with-threads'";
system "sudo killall nginx > /dev/null 2>&1";
sh "sudo $prefix/nginx/sbin/nginx";
sh "curl -si localhost/lua|grep $lua";
sh "curl -si localhost/lua|grep $ver";
sh "curl -si localhost/cjson|grep 'json.safe: '";
sh qq{$prefix/bin/resty -e 'ngx.say("Hello World!")'|grep 'Hello World'};
sh "sudo $prefix/nginx/sbin/nginx -sstop";
warn "\n=== No Pool Build ===\n";
$prefix = "/usr/local/openresty-nopool";
unless ($opts{f}) {