Configure: 'reconf' to respect CROSS_COMPILE and CC.

Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Andy Polyakov 2015-12-12 12:23:41 +01:00
parent d25aeabca8
commit 0c14d44254

View File

@ -1032,6 +1032,7 @@ PROCESS_ARGS:
{ {
if (open(IN,"<$Makefile")) if (open(IN,"<$Makefile"))
{ {
my $config_args_found=0;
while (<IN>) while (<IN>)
{ {
chomp; chomp;
@ -1043,11 +1044,19 @@ PROCESS_ARGS:
if (grep(/^reconf/,@argvcopy)); if (grep(/^reconf/,@argvcopy));
print "Reconfiguring with: $argvstring\n"; print "Reconfiguring with: $argvstring\n";
$argv_unprocessed=1; $argv_unprocessed=1;
close(IN); $config_args_found=1;
last PROCESS_ARGS; }
elsif (/^CROSS_COMPILE=\s*(.*)/)
{
$ENV{CROSS_COMPILE}=$1;
}
elsif (/^CC=\s*(?:\$\(CROSS_COMPILE\))?(.*?)/)
{
$ENV{CC}=$1;
} }
} }
close(IN); close(IN);
last PROCESS_ARGS if ($config_args_found);
} }
die "Insufficient data to reconfigure, please do a normal configuration\n"; die "Insufficient data to reconfigure, please do a normal configuration\n";
} }