added the --with-luajit=PATH option to ./configure per NginxUser's suggestion.

This commit is contained in:
agentzh (章亦春) 2011-09-18 13:06:57 +08:00
parent 1bac07b50c
commit 733e37e053
4 changed files with 285 additions and 202 deletions

File diff suppressed because it is too large Load Diff

31
util/configure vendored
View File

@ -172,6 +172,9 @@ for my $opt (@ARGV) {
} elsif ($opt eq '--with-luajit') {
$resty_opts{luajit} = 1;
} elsif ($opt =~ /^--with-luajit=(.*)/) {
$resty_opts{luajit_path} = $1;
} elsif ($opt =~ /^--with-libdrizzle=(.*)/) {
$resty_opts{libdrizzle} = $1;
@ -329,10 +332,16 @@ _END_
}
}
if (! $opts->{luajit} && ! $opts->{no_http_lua} && ! $opts->{no_lua}) {
if (! $opts->{luajit} && ! $opts->{luajit_path}
&& ! $opts->{no_http_lua} && ! $opts->{no_lua})
{
$opts->{lua} = 1;
}
if ($opts->{luajit} && $opts->{luajit_path}) {
die "--with-luajit and --with-luajit=PATH are mutually exclusive.\n";
}
if ($opts->{no_http_ssl} && $opts->{http_ssl}) {
die "--with-http_ssl_module conflicts with --without-http_ssl_module.\n";
}
@ -432,7 +441,14 @@ _END_
push @ngx_rpaths, $pg_lib;
}
if ($opts->{luajit}) {
if ($opts->{luajit_path}) {
my $luajit_prefix = $opts->{luajit_path};
env LUAJIT_LIB => "$luajit_prefix/lib";
env LUAJIT_INC => "$luajit_prefix/include/luajit-2.0";
push @ngx_rpaths, "$luajit_prefix/lib";
} elsif ($opts->{luajit}) {
my $luajit_src = auto_complete 'LuaJIT';
my $luajit_prefix = "$prefix/luajit";
my $luajit_root = File::Spec->rel2abs("luajit-root");
@ -523,7 +539,7 @@ _END_
}
if ($opts->{lua} || $opts->{luajit}) {
if ($opts->{lua} || $opts->{luajit} || $opts->{luajit_path}) {
# build lua modules
my $lualib_prefix = "$prefix/lualib";
@ -549,7 +565,7 @@ _EOC_
}
my $lua_inc;
if ($opts->{luajit}) {
if ($opts->{luajit} || $opts->{luajit_path}) {
$lua_inc = $ENV{LUAJIT_INC};
} else {
@ -598,7 +614,7 @@ _EOC_
}
my $lua_inc;
if ($opts->{luajit}) {
if ($opts->{luajit} || $opts->{luajit_path}) {
$lua_inc = $ENV{LUAJIT_INC};
} else {
@ -645,7 +661,7 @@ _EOC_
}
my $lua_inc;
if ($opts->{luajit}) {
if ($opts->{luajit} || $opts->{luajit_path}) {
$lua_inc = $ENV{LUAJIT_INC};
} else {
@ -781,7 +797,8 @@ _EOC_
--without-lua_rds_parser disable the lua-rds-parser library
--without-lua51 disable the bundled Lua 5.1 interpreter
--with-luajit enable LuaJIT 2.0
--with-luajit enable and build LuaJIT 2.0
--with-luajit=PATH use the external LuaJIT 2.0 installation specified by PATH
--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

@ -92,7 +92,7 @@ mv agentzh-headers-more-nginx-module-* headers-more-nginx-module-$ver || exit 1
#################################
ver=0.1.1rc4
ver=0.1.1
$root/util/get-tarball "http://github.com/chaoslawful/drizzle-nginx-module/tarball/v$ver" -O drizzle-nginx-module-$ver.tar.gz || exit 1
tar -xzf drizzle-nginx-module-$ver.tar.gz || exit 1
mv chaoslawful-drizzle-nginx-module-* drizzle-nginx-module-$ver || exit 1

View File

@ -1,7 +1,7 @@
#!/bin/bash
main_ver=1.0.6
minor_ver=5
minor_ver=7
version=$main_ver.$minor_ver
echo $version