From 35afee967ea84cac80dfdde7fd977915c1766c6c Mon Sep 17 00:00:00 2001 From: Weibin Yao Date: Wed, 28 Dec 2011 16:19:09 +0800 Subject: [PATCH] support to add relative path module in configure --- util/configure | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/util/configure b/util/configure index 62231e7..064fc80 100755 --- a/util/configure +++ b/util/configure @@ -212,6 +212,25 @@ for my $opt (@ARGV) { } elsif ($opt eq '--without-http_ssl_module') { $resty_opts{no_http_ssl} = 1; + } 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; + } elsif ($opt =~ /^--\w.*/) { push @ngx_opts, $opt;