diff -Naur a/build-aux/config.guess b/build-aux/config.guess
--- a/build-aux/config.guess	2013-02-22 17:56:24.000000000 +0400
+++ b/build-aux/config.guess	2014-08-01 09:40:46.402400000 +0400
@@ -845,6 +845,9 @@
     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 ;;
