diff -Naur libunistring-0.9.3-orig/build-aux/config.guess libunistring-0.9.3/build-aux/config.guess
--- libunistring-0.9.3-orig/build-aux/config.guess	2010-05-02 11:23:58.000000000 +0000
+++ libunistring-0.9.3/build-aux/config.guess	2013-05-02 06:10:25.148437500 +0000
@@ -841,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 ;;
diff -Naur libunistring-0.9.3-orig/build-aux/config.rpath libunistring-0.9.3/build-aux/config.rpath
--- libunistring-0.9.3-orig/build-aux/config.rpath	2010-01-01 10:02:01.000000000 +0000
+++ libunistring-0.9.3/build-aux/config.rpath	2013-05-02 06:09:43.076171800 +0000
@@ -64,7 +64,7 @@
           ;;
       esac
       ;;
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
+    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
       ;;
     hpux9* | hpux10* | hpux11*)
       wl='-Wl,'
@@ -138,7 +138,7 @@
 hardcode_minus_L=no
 
 case "$host_os" in
-  cygwin* | mingw* | pw32* | cegcc*)
+  cygwin* | msys* | mingw* | pw32* | cegcc*)
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
     # Microsoft Visual C++.
@@ -188,7 +188,7 @@
         ld_shlibs=no
       fi
       ;;
-    cygwin* | mingw* | pw32* | cegcc*)
+    cygwin* | msys* | mingw* | pw32* | cegcc*)
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
       hardcode_libdir_flag_spec='-L$libdir'
@@ -332,7 +332,7 @@
       ;;
     bsdi[45]*)
       ;;
-    cygwin* | mingw* | pw32* | cegcc*)
+    cygwin* | msys* | mingw* | pw32* | cegcc*)
       # When not using gcc, we currently assume that we are using
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -523,7 +523,7 @@
   bsdi[45]*)
     library_names_spec='$libname$shrext'
     ;;
-  cygwin* | mingw* | pw32* | cegcc*)
+  cygwin* | msys* | mingw* | pw32* | cegcc*)
     shrext=.dll
     library_names_spec='$libname.dll.a $libname.lib'
     ;;
--- libunistring-0.9.4/gnulib-m4/printf.m4.orig	2014-09-02 18:39:57.871000000 +0400
+++ libunistring-0.9.4/gnulib-m4/printf.m4	2014-09-02 18:45:21.768800000 +0400
@@ -735,7 +735,7 @@
            openbsd*)       gl_cv_func_printf_directive_ls="guessing no";;
            irix*)          gl_cv_func_printf_directive_ls="guessing no";;
            solaris*)       gl_cv_func_printf_directive_ls="guessing no";;
-           cygwin*)        gl_cv_func_printf_directive_ls="guessing no";;
+           cygwin* | msys*)         gl_cv_func_printf_directive_ls="guessing no";;
            beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
                            # Guess yes on native Windows.
            mingw*)         gl_cv_func_printf_directive_ls="guessing yes";;
@@ -812,7 +812,7 @@
         [
 changequote(,)dnl
          case "$host_os" in
-           cygwin*)      gl_cv_func_printf_flag_grouping="guessing no";;
+           cygwin* | msys*)      gl_cv_func_printf_flag_grouping="guessing no";;
            netbsd*)      gl_cv_func_printf_flag_grouping="guessing no";;
            mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
            *)            gl_cv_func_printf_flag_grouping="guessing yes";;
@@ -1464,7 +1464,7 @@
            darwin[1-6].*)        gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
            darwin*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
                                  # Guess yes on Cygwin.
-           cygwin*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+           cygwin* | msys*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
                                  # Guess yes on Solaris >= 2.6.
            solaris2.[0-5] | solaris2.[0-5].*)
                                  gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
diff -Naur libunistring-0.9.3-orig/gnulib-m4/threadlib.m4 libunistring-0.9.3/gnulib-m4/threadlib.m4
--- libunistring-0.9.3-orig/gnulib-m4/threadlib.m4	2010-05-02 11:22:12.000000000 +0000
+++ libunistring-0.9.3/gnulib-m4/threadlib.m4	2013-05-02 06:15:44.551757800 +0000
@@ -61,7 +61,7 @@
          dnl bugs that lead to endless loops or crashes. See
          dnl <http://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
          osf*) gl_use_threads=no ;;
-         cygwin*)
+         cygwin* | msys*)
                case `uname -r` in
                  1.[0-5].*) gl_use_threads=no ;;
                  *)         gl_use_threads=yes ;;
--- libunistring-0.9.4/gnulib-m4/wctob.m4.orig	2014-09-02 18:39:57.871000000 +0400
+++ libunistring-0.9.4/gnulib-m4/wctob.m4	2014-09-02 18:41:54.632000000 +0400
@@ -29,7 +29,7 @@
 changequote(,)dnl
         case "$host_os" in
             # Guess no on Solaris <= 9 and Cygwin.
-          solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
+          solaris2.[1-9] | solaris2.[1-9].* | cygwin* | msys*)
             gl_cv_func_wctob_works="guessing no" ;;
             # Guess no on native Windows.
           mingw*)
@@ -39,7 +39,7 @@
         esac
 changequote([,])dnl
         case "$host_os" in
-          cygwin*)
+          cygwin* | msys*)
             AC_RUN_IFELSE(
               [AC_LANG_SOURCE([[
 #include <locale.h>
diff -Naur libunistring-0.9.3-orig/lib/Makefile.gnulib libunistring-0.9.3/lib/Makefile.gnulib
--- libunistring-0.9.3-orig/lib/Makefile.gnulib	2010-05-02 21:26:54.000000000 +0000
+++ libunistring-0.9.3/lib/Makefile.gnulib	2013-05-02 06:16:31.587890600 +0000
@@ -362,7 +362,7 @@
 	  case '$(host_os)' in \
 	    darwin[56]*) \
 	      need_charset_alias=true ;; \
-	    darwin* | cygwin* | mingw* | pw32* | cegcc*) \
+	    darwin* | cygwin* | msys* | mingw* | pw32* | cegcc*) \
 	      need_charset_alias=false ;; \
 	    *) \
 	      need_charset_alias=true ;; \
diff -Naur libunistring-0.9.3-orig/lib/Makefile.in libunistring-0.9.3/lib/Makefile.in
--- libunistring-0.9.3-orig/lib/Makefile.in	2010-05-02 21:28:19.000000000 +0000
+++ libunistring-0.9.3/lib/Makefile.in	2013-05-02 06:16:50.478515600 +0000
@@ -3895,7 +3895,7 @@
 	  case '$(host_os)' in \
 	    darwin[56]*) \
 	      need_charset_alias=true ;; \
-	    darwin* | cygwin* | mingw* | pw32* | cegcc*) \
+	    darwin* | cygwin* | msys* | mingw* | pw32* | cegcc*) \
 	      need_charset_alias=false ;; \
 	    *) \
 	      need_charset_alias=true ;; \
