diff --git a/configure b/configure
index 8af0dccf2467f6008e4c236ff57f72bee0cde01d..d16ee682e3ae723c72cea2a7ccd2bead9b348303 100755
--- a/configure
+++ b/configure
@@ -2834,7 +2834,7 @@ fi
 
 exesuf() {
     case $1 in
-        mingw32*|win32|win64|cygwin*|*-dos|freedos|opendos|os/2*|symbian) echo .exe ;;
+        mingw32*|mingw64*|win32|win64|cygwin*|*-dos|freedos|opendos|os/2*|symbian) echo .exe ;;
     esac
 }
 
@@ -3750,7 +3750,7 @@ case $target_os in
     msys*)
         die "Native MSYS builds are discouraged, please use the MINGW environment.";
         ;;
-    mingw32*)
+    mingw32*|mingw64*)
         if test $target_os = "mingw32ce"; then
             disable network
         else