improved Yao Weibin's patch for the --add-module option a bit and also added a test case.

This commit is contained in:
agentzh (章亦春)
2011-12-29 11:14:10 +08:00
parent 5fb3e869e5
commit af701e5b64
4 changed files with 66 additions and 19 deletions

18
util/configure vendored
View File

@ -214,22 +214,8 @@ for my $opt (@ARGV) {
} elsif ($opt =~ /^--add-module=(.*)/) {
my $mod_path=$1;
my $path;
my $new_opt;
if ($mod_path =~ /^\//) {
#absolute path
$path = $mod_path;
}
else{
#relative path
$path = "$root_dir/$mod_path";
}
$new_opt = "--add-module=$path";
push @ngx_opts, $new_opt;
my $mod_path = File::Spec->rel2abs($1);
push @ngx_opts, "--add-module=$mod_path";
} elsif ($opt =~ /^--\w.*/) {
push @ngx_opts, $opt;