bugfix: link failures with openssl might happen on 64-bit Mac OS X when the ./configure option --with-pcre=PATH was used and the openssl source was recent enough. thanks grasses for the report in #3.
This commit is contained in:
parent
97a05513eb
commit
87c988e4ba
|
@ -33,6 +33,8 @@ for my $opt (@ARGV) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my @extra_make_env;
|
||||||
|
|
||||||
my ($platform, $on_solaris);
|
my ($platform, $on_solaris);
|
||||||
|
|
||||||
if ($OS =~ /solaris|sunos/i) {
|
if ($OS =~ /solaris|sunos/i) {
|
||||||
|
@ -276,8 +278,15 @@ for my $opt (@ARGV) {
|
||||||
|
|
||||||
} elsif ($opt =~ /^--with-(openssl|pcre|zlib|libatomic|md5|sha1)=(.*)/) {
|
} elsif ($opt =~ /^--with-(openssl|pcre|zlib|libatomic|md5|sha1)=(.*)/) {
|
||||||
|
|
||||||
my $path = File::Spec->rel2abs($2);
|
my ($lib, $path) = ($1, $2);
|
||||||
push @ngx_opts, "--with-$1=$path";
|
if ($lib eq 'openssl' && $OS eq 'darwin') {
|
||||||
|
if (`uname -a` =~ /\bx86_64\b/) {
|
||||||
|
$ENV{KERNEL_BITS} = 64;
|
||||||
|
push @extra_make_env, 'KERNEL_BITS=64';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$path = File::Spec->rel2abs($path);
|
||||||
|
push @ngx_opts, "--with-$lib=$path";
|
||||||
|
|
||||||
} elsif ($opt =~ /^--\w.*/) {
|
} elsif ($opt =~ /^--\w.*/) {
|
||||||
push @ngx_opts, $opt;
|
push @ngx_opts, $opt;
|
||||||
|
@ -1141,6 +1150,10 @@ sub gen_makefile {
|
||||||
open my $out, ">Makefile" or
|
open my $out, ">Makefile" or
|
||||||
die "Cannot open Makefile for writing: $!\n";
|
die "Cannot open Makefile for writing: $!\n";
|
||||||
|
|
||||||
|
for my $line (@extra_make_env) {
|
||||||
|
print $out "export $line\n";
|
||||||
|
}
|
||||||
|
|
||||||
print $out ".PHONY: all install clean\n\n";
|
print $out ".PHONY: all install clean\n\n";
|
||||||
|
|
||||||
print $out "all:\n\t" . join("\n\t", @make_cmds) . "\n\n";
|
print $out "all:\n\t" . join("\n\t", @make_cmds) . "\n\n";
|
||||||
|
|
Loading…
Reference in New Issue