ensure that ldconfig is in PATH on linux *and* luajit is enabled.
This commit is contained in:
parent
9415dafc3f
commit
04709aa2e6
|
@ -5,6 +5,7 @@ use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
use File::Spec;
|
use File::Spec;
|
||||||
|
use ExtUtils::MakeMaker ();
|
||||||
|
|
||||||
sub shell ($@);
|
sub shell ($@);
|
||||||
sub env ($$);
|
sub env ($$);
|
||||||
|
@ -258,7 +259,7 @@ sub build_resty_opts {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($opts->{no_http_ssl} && $opts->{http_ssl}) {
|
if ($opts->{no_http_ssl} && $opts->{http_ssl}) {
|
||||||
die "--with-http_ssl_module conflicts with --without-http_ssl_module\n";
|
die "--with-http_ssl_module conflicts with --without-http_ssl_module.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $opts->{no_http_ssl} && ! $opts->{http_ssl}) {
|
if (! $opts->{no_http_ssl} && ! $opts->{http_ssl}) {
|
||||||
|
@ -266,6 +267,10 @@ sub build_resty_opts {
|
||||||
push @ngx_opts, '--with-http_ssl_module';
|
push @ngx_opts, '--with-http_ssl_module';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($platform eq 'linux' && $opts->{luajit} && ! can_run("ldconfig")) {
|
||||||
|
die "you need to have ldconfig in your PATH env when enabling luajit.\n";
|
||||||
|
}
|
||||||
|
|
||||||
my $opts_line = '';
|
my $opts_line = '';
|
||||||
|
|
||||||
if ($opts->{debug}) {
|
if ($opts->{debug}) {
|
||||||
|
@ -628,3 +633,20 @@ sub gen_makefile {
|
||||||
close $out;
|
close $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# check if we can run some command
|
||||||
|
sub can_run {
|
||||||
|
my ($cmd) = @_;
|
||||||
|
|
||||||
|
#warn "can run: @_\n";
|
||||||
|
my $_cmd = $cmd;
|
||||||
|
return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd));
|
||||||
|
|
||||||
|
for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
|
||||||
|
next if $dir eq '';
|
||||||
|
my $abs = File::Spec->catfile($dir, $_[0]);
|
||||||
|
return $abs if (-x $abs or $abs = MM->maybe_command($abs));
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
root=$(readlink -f -- "$(dirname -- "$0")/..")
|
#root=$(readlink -f -- "$(dirname -- "$0")/..")
|
||||||
|
root=`perl -MCwd -e'print Cwd::abs_path(shift)' $(dirname -- "$0")/..`
|
||||||
work=$root/work
|
work=$root/work
|
||||||
|
|
||||||
if [ ! -d $work ]; then
|
if [ ! -d $work ]; then
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
root=$(readlink -f -- "$(dirname -- "$0")/..")
|
#root=$(readlink -f -- "$(dirname -- "$0")/..")
|
||||||
|
root=`perl -MCwd -e'print Cwd::abs_path(shift)' $(dirname -- "$0")/..`
|
||||||
|
|
||||||
. util/ver
|
. util/ver
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue