-while($argv_unprocessed)
- {
- $flags="";
- $depflags="";
- $openssl_experimental_defines="";
- $openssl_algorithm_defines="";
- $openssl_thread_defines="";
- $openssl_sys_defines="";
- $openssl_other_defines="";
- $libs="";
- $target="";
- $options="";
-
- $argv_unprocessed=0;
- $argvstring=join(' ',@argvcopy);
-
-PROCESS_ARGS:
+if (grep /^reconf(igure)?$/, @argvcopy) {
+ if (open IN, "<$Makefile") {
+ while (<IN>) {
+ chomp;
+ if (/^CONFIGURE_ARGS=\s*(.*)\s*/) {
+ my $line = $1;
+ if ($line =~ /^\s*\(/) {
+ # New form perl expression saved in Makefile, eval it
+ @argvcopy = eval $line;
+ } else {
+ # Older form, we split the string and hope for the best
+ @argvcopy = split /\s+/, $line;
+ }
+ die "Incorrect data to reconfigure, please do a normal configuration\n"
+ if (grep(/^reconf/,@argvcopy));
+ } elsif (/^CROSS_COMPILE=\s*(.*)/) {
+ $ENV{CROSS_COMPILE}=$1;
+ } elsif (/^CC=\s*(?:\$\(CROSS_COMPILE\))?(.*?)$/) {
+ $ENV{CC}=$1;
+ }
+ }
+ print "Reconfiguring with: ", join(" ",@argvcopy), "\n";
+ print " CROSS_COMPILE = ",$ENV{CROSS_COMPILE},"\n"
+ if $ENV{CROSS_COMPILE};
+ print " CC = ",$ENV{CC},"\n" if $ENV{CC};
+ close IN;
+ } else {
+ die "Insufficient data to reconfigure, please do a normal configuration\n";
+ }
+}
+
+
+my %unsupported_options = ();
+foreach (@argvcopy)