--- libidn2-2.3.2/build-aux/config.guess.orig	2021-08-26 06:39:53.435974200 +0200
+++ libidn2-2.3.2/build-aux/config.guess	2021-08-26 06:43:28.455774200 +0200
@@ -947,6 +947,9 @@
     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
 	GUESS=x86_64-pc-cygwin
 	;;
+    amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
+	GUESS=x86_64-pc-msys
+	;;
     prep*:SunOS:5.*:*)
 	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
 	GUESS=powerpcle-unknown-solaris2$SUN_REL
diff -Naur libidn2-2.1.0-orig/build-aux/config.rpath libidn2-2.1.0/build-aux/config.rpath
--- libidn2-2.1.0-orig/build-aux/config.rpath	2019-01-04 21:40:28.000000000 +0300
+++ libidn2-2.1.0/build-aux/config.rpath	2019-01-14 11:49:38.068930800 +0300
@@ -57,7 +57,7 @@
     aix*)
       wl='-Wl,'
       ;;
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
+    mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
       ;;
     hpux9* | hpux10* | hpux11*)
       wl='-Wl,'
@@ -149,7 +149,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++.
@@ -198,7 +198,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'
@@ -348,7 +348,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
@@ -533,7 +533,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'
     ;;
diff -Naur libidn2-2.1.0-orig/m4/double-slash-root.m4 libidn2-2.1.0/m4/double-slash-root.m4
--- libidn2-2.1.0-orig/m4/double-slash-root.m4	2019-01-04 21:26:17.000000000 +0300
+++ libidn2-2.1.0/m4/double-slash-root.m4	2019-01-14 11:49:38.084530800 +0300
@@ -16,7 +16,7 @@
         # special semantics and is distinct from /, please report it to
         # <bug-gnulib@gnu.org>.
         case $host in
-          *-cygwin | i370-ibm-openedition)
+          *-cygwin | *-msys | i370-ibm-openedition)
             gl_cv_double_slash_root=yes ;;
           *)
             # Be optimistic and assume that / and // are the same when we
