Skip to content

Commit 0baeabe

Browse files
committed
ngx-build: added support for the NGX_BUILD_EXTRA_CONFIG_OPTS environment to allow the user to specify extra options for nginx ./configure.
1 parent 7bc2476 commit 0baeabe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ngx-build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ my $no_debug = $ENV{NGX_BUILD_NO_DEBUG};
1515
my $dtrace = $ENV{NGX_BUILD_DTRACE};
1616
my $cc_opts = $ENV{NGX_BUILD_CC_OPTS};
1717
my $ld_opts = $ENV{NGX_BUILD_LD_OPTS};
18+
my $extra_config_opts = $ENV{NGX_BUILD_EXTRA_CONFIG_OPTS};
1819

1920
my %opts;
2021
getopts("fp:", \%opts) or usage();
@@ -60,6 +61,10 @@ if (($1 == 1 && $2 == 1 && $3 >= 4)
6061
@opts = @ARGV;
6162
}
6263

64+
if (defined $extra_config_opts) {
65+
push @opts, split /\s+/, $extra_config_opts;
66+
}
67+
6368
for (@opts) {
6469
# TODO: we can process paths in other options as well
6570
s/^(--add-module=)(\S+)/$1 . Cwd::realpath($2)/ge;

0 commit comments

Comments
 (0)