diff -Naur automake-1.15-orig/lib/ar-lib automake-1.15/lib/ar-lib
--- automake-1.15-orig/lib/ar-lib	2014-12-31 00:53:05.000000000 +0300
+++ automake-1.15/lib/ar-lib	2015-01-07 10:46:20.752400000 +0300
@@ -53,7 +53,7 @@
 	  MINGW*)
 	    file_conv=mingw
 	    ;;
-	  CYGWIN*)
+	  CYGWIN*|MSYS*)
 	    file_conv=cygwin
 	    ;;
 	  *)
@@ -65,7 +65,7 @@
 	mingw)
 	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
 	  ;;
-	cygwin)
+	cygwin|msys)
 	  file=`cygpath -m "$file" || echo "$file"`
 	  ;;
 	wine)
diff -Naur automake-1.15-orig/lib/compile automake-1.15/lib/compile
--- automake-1.15-orig/lib/compile	2014-12-31 00:53:05.000000000 +0300
+++ automake-1.15/lib/compile	2015-01-07 10:46:57.337400000 +0300
@@ -53,7 +53,7 @@
 	  MINGW*)
 	    file_conv=mingw
 	    ;;
-	  CYGWIN*)
+	  CYGWIN*|MSYS*)
 	    file_conv=cygwin
 	    ;;
 	  *)
@@ -67,7 +67,7 @@
 	mingw/*)
 	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
 	  ;;
-	cygwin/*)
+	cygwin/*|msys/*)
 	  file=`cygpath -m "$file" || echo "$file"`
 	  ;;
 	wine/*)
diff -aurp automake-1.15.1/lib/config.guess,orig automake-1.15.1/lib/config.guess
--- automake-1.15.1/lib/config.guess.orig	2017-06-17 22:37:14.000000000 -0400
+++ automake-1.15.1/lib/config.guess	2017-10-02 09:10:36.875102700 -0400
@@ -892,6 +892,9 @@ EOF
     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
 	echo x86_64-unknown-cygwin
 	exit ;;
+    amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
+	echo x86_64-unknown-msys
+	exit ;;
     p*:CYGWIN*:*)
 	echo powerpcle-unknown-cygwin
 	exit ;;
diff -Naur automake-1.15-orig/t/compile5.sh automake-1.15/t/compile5.sh
--- automake-1.15-orig/t/compile5.sh	2014-12-30 16:49:41.000000000 +0300
+++ automake-1.15/t/compile5.sh	2015-01-07 10:48:12.160000000 +0300
@@ -47,11 +47,11 @@
     ;;
 esac
 case @build_os@ in
-  mingw* | cygwin*)
+  mingw* | cygwin* | msys*)
     ;;
   *)
     winepath -w / \
-      || skip_ "not on MinGW or Cygwin, and winepath not available"
+      || skip_ "not on MinGW or Cygwin or MSYS, and winepath not available"
     ;;
 esac
 END
