Lowercase configuration arguments on VMS
[openssl.git] / Configure
index 8bdf92c9d2d455d5f80e5abf7de41fa36d76af59..9a4a9a9dd0dea1bdcc3bdef06f009fdbdad45bae 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -109,9 +109,9 @@ my $clang_devteam_warn = ""
         . " -Wmissing-variable-declarations"
         ;
 
         . " -Wmissing-variable-declarations"
         ;
 
-# These are used in addition to $gcc_devteam_warn unless this is a mingw build.
-# This adds backtrace information to the memory leak info.
-my $memleak_devteam_backtrace = "-rdynamic -DCRYPTO_MDEBUG_BACKTRACE";
+# This adds backtrace information to the memory leak info.  Is only used
+# when crypto-mdebug-backtrace is enabled.
+my $memleak_devteam_backtrace = "-rdynamic";
 
 my $strict_warnings = 0;
 
 
 my $strict_warnings = 0;
 
@@ -252,6 +252,7 @@ my @disablables = (
     "cms",
     "comp",
     "crypto-mdebug",
     "cms",
     "comp",
     "crypto-mdebug",
+    "crypto-mdebug-backtrace",
     "ct",
     "deprecated",
     "des",
     "ct",
     "deprecated",
     "des",
@@ -377,6 +378,8 @@ my @disable_cascades = (
 
     # SRP and HEARTBEATS require TLSEXT
     "tlsext"           => [ "srp", "heartbeats" ],
 
     # SRP and HEARTBEATS require TLSEXT
     "tlsext"           => [ "srp", "heartbeats" ],
+
+    "crypto-mdebug"     => [ "crypto-mdebug-backtrace" ],
     );
 
 # Avoid protocol support holes.  Also disable all versions below N, if version
     );
 
 # Avoid protocol support holes.  Also disable all versions below N, if version
@@ -498,6 +501,13 @@ $config{perlargv} = [ @argvcopy ];
 my %unsupported_options = ();
 foreach (@argvcopy)
        {
 my %unsupported_options = ();
 foreach (@argvcopy)
        {
+       # VMS is a case insensitive environment, and depending on settings
+       # out of our control, we may receive options uppercased.  Let's
+       # downcase at least the part before any equal sign.
+       if ($^O eq "VMS")
+               {
+               s/^([^=]*)/lc($1)/e;
+               }
        s /^-no-/no-/; # some people just can't read the instructions
 
        # rewrite some options in "enable-..." form
        s /^-no-/no-/; # some people just can't read the instructions
 
        # rewrite some options in "enable-..." form
@@ -1162,16 +1172,17 @@ if ($strict_warnings)
                        $config{cflags} .= " $wopt" unless ($config{cflags} =~ /(^|\s)$wopt(\s|$)/)
                        }
                }
                        $config{cflags} .= " $wopt" unless ($config{cflags} =~ /(^|\s)$wopt(\s|$)/)
                        }
                }
-       if ($target !~ /^mingw/)
+       }
+
+unless ($disabled{"crypto-mdebug-backtrace"})
+       {
+       foreach my $wopt (split /\s+/, $memleak_devteam_backtrace)
                {
                {
-               foreach $wopt (split /\s+/, $memleak_devteam_backtrace)
-                       {
-                       $config{cflags} .= " $wopt" unless ($config{cflags} =~ /(^|\s)$wopt(\s|$)/)
-                       }
-               if ($target =~ /^BSD-/)
-                       {
-                       $config{ex_libs} .= " -lexecinfo";
-                       }
+               $config{cflags} .= " $wopt" unless ($config{cflags} =~ /(^|\s)$wopt(\s|$)/)
+               }
+       if ($target =~ /^BSD-/)
+               {
+               $config{ex_libs} .= " -lexecinfo";
                }
        }
 
                }
        }