diff -Naur gengetopt-2.22.6-orig/build-aux/config.guess gengetopt-2.22.6/build-aux/config.guess
--- gengetopt-2.22.6-orig/build-aux/config.guess	2012-11-02 17:28:51.000000000 +0400
+++ gengetopt-2.22.6/build-aux/config.guess	2014-07-18 00:44:23.362400000 +0400
@@ -844,6 +844,9 @@
     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
 	echo x86_64-unknown-cygwin
 	exit ;;
+    amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
+	echo x86_64-unknown-msys
+	exit ;;
     prep*:SunOS:5.*:*)
 	echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;