Update from stable branch.
[openssl.git] / Configure
index 367e1683ccb71141a55b063dcf831713c4c3db6b..a2dc83921e1a385523853103ad92cdbc50392a18 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -928,7 +928,7 @@ foreach (sort (keys %disabled))
 
 my $IsMK1MF=scalar grep /^$target$/,@MK1MF_Builds;
 
 
 my $IsMK1MF=scalar grep /^$target$/,@MK1MF_Builds;
 
-$IsMK1MF=1 if ($target eq "mingw" && $^O ne "cygwin");
+$IsMK1MF=1 if ($target eq "mingw" && $^O ne "cygwin" && !is_msys());
 
 $exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target eq "mingw");
 $exe_ext=".pm"  if ($target =~ /vos/);
 
 $exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target eq "mingw");
 $exe_ext=".pm"  if ($target =~ /vos/);
@@ -1829,3 +1829,11 @@ sub test_sanity
        print STDERR "No sanity errors detected!\n" if $errorcnt == 0;
        return $errorcnt;
        }
        print STDERR "No sanity errors detected!\n" if $errorcnt == 0;
        return $errorcnt;
        }
+
+# Attempt to detect MSYS environment
+
+sub is_msys
+       {
+       return 1 if (exists $ENV{"TERM"} && $ENV{"TERM"} eq "msys");
+       return 0;
+       }