Configure: try to make sure every config target name is unique
[openssl.git] / Configure
index b172595ece131c6c61cf0f843e9c025e7dc0a3a6..67e59a252daa0c61805fc6b41898033eb2ceee81 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -2381,6 +2381,17 @@ sub read_config {
 
        %targets = read_eval_file($fname);
     }
+    my %preexisting = ();
+    foreach (sort keys %targets) {
+        $preexisting{$_} = 1 if $table{$_};
+    }
+    die <<"EOF",
+The following config targets from $fname
+shadow pre-existing config targets with the same name:
+EOF
+        map { "  $_\n" } sort keys %preexisting
+        if %preexisting;
+
 
     # For each target, check that it's configured with a hash table.
     foreach (keys %targets) {