Drop the old perl start magic and replace it with a normal shebang
[openssl.git] / Configure
index d8ea689d704f2029d6e0adfd265f2cd6c725ea0f..cd4f37f4919c0a90e76c95cf1ae713c690181e96 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1,6 +1,6 @@
-:
-eval 'exec perl -S $0 ${1+"$@"}'
-    if $running_under_some_shell;
+#! /usr/bin/env perl
+# -*- mode: perl; -*-
+
 ##
 ##  Configure -- OpenSSL source tree configuration script
 ##  If editing this file, run this command before committing
@@ -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";
+               }
        }
 
 
@@ -1733,13 +1740,13 @@ if ($strict_warnings)
        die "ERROR --strict-warnings requires gcc or clang" unless ($ecc =~ /gcc(-\d(\.\d)*)?$/ or $ecc =~ /clang$/);
        foreach $wopt (split /\s+/, $gcc_devteam_warn)
                {
-               $cflags .= " $wopt" unless ($cflags =~ /$wopt/)
+               $cflags .= " $wopt" unless ($cflags =~ /(^|\s)$wopt(\s|$)/)
                }
        if ($ecc eq "clang")
                {
                foreach $wopt (split /\s+/, $clang_devteam_warn)
                        {
-                       $cflags .= " $wopt" unless ($cflags =~ /$wopt/)
+                       $cflags .= " $wopt" unless ($cflags =~ /(^|\s)$wopt(\s|$)/)
                        }
                }
        }