From: Richard Levitte <levitte@openssl.org>
Date: Thu, 22 Oct 2015 15:33:47 +0000 (+0200)
Subject: Make Configure die when unsupported options are given
X-Git-Tag: OpenSSL_1_1_0-pre1~398
X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=489eb74090a6327454f4a53213480eaa6659704b;p=oweals%2Fopenssl.git

Make Configure die when unsupported options are given

Reviewed-by: Rich Salz <rsalz@openssl.org>
---

diff --git a/Configure b/Configure
index d8ea689d70..79562477f9 100755
--- a/Configure
+++ b/Configure
@@ -947,6 +947,7 @@ while($argv_unprocessed)
 	$argvstring=join(' ',@argvcopy);
 
 PROCESS_ARGS:
+	my %unsupported_options = ();
 	foreach (@argvcopy)
 		{
 		s /^-no-/no-/; # some people just can't read the instructions
@@ -963,7 +964,7 @@ PROCESS_ARGS:
 			my $word = $2;
 			if (!grep { $word =~ /^${_}$/ } @disablables)
 				{
-				warn "Unsupported option ${word}, ignored...\n";
+				$unsupported_options{$_} = 1;
 				next;
 				}
 			}
@@ -1135,6 +1136,12 @@ PROCESS_ARGS:
 				{ $options .= " ".$_; }
 			}
 		}
+
+	if (keys %unsupported_options)
+		{
+		die "***** Unsupported options: ",
+			join(", ", keys %unsupported_options), "\n";
+		}
 	}