From: Andy Polyakov Date: Sat, 12 Dec 2015 11:23:41 +0000 (+0100) Subject: Configure: 'reconf' to respect CROSS_COMPILE and CC. X-Git-Tag: OpenSSL_1_1_0-pre2~240 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0c14d442545aaea01067308c39d7c644239adc23;p=oweals%2Fopenssl.git Configure: 'reconf' to respect CROSS_COMPILE and CC. Reviewed-by: Richard Levitte --- diff --git a/Configure b/Configure index 913773bd1b..b6672a0267 100755 --- a/Configure +++ b/Configure @@ -1032,6 +1032,7 @@ PROCESS_ARGS: { if (open(IN,"<$Makefile")) { + my $config_args_found=0; while () { chomp; @@ -1043,11 +1044,19 @@ PROCESS_ARGS: if (grep(/^reconf/,@argvcopy)); print "Reconfiguring with: $argvstring\n"; $argv_unprocessed=1; - close(IN); - last PROCESS_ARGS; + $config_args_found=1; + } + elsif (/^CROSS_COMPILE=\s*(.*)/) + { + $ENV{CROSS_COMPILE}=$1; + } + elsif (/^CC=\s*(?:\$\(CROSS_COMPILE\))?(.*?)/) + { + $ENV{CC}=$1; } } close(IN); + last PROCESS_ARGS if ($config_args_found); } die "Insufficient data to reconfigure, please do a normal configuration\n"; }