From 4a40271e6267dcca80231c132da9ec176421c400 Mon Sep 17 00:00:00 2001
From: John Ericson <John.Ericson@Obsidian.Systems>
Date: Sat, 23 Sep 2023 01:09:24 -0400
Subject: [PATCH] Configure scripts: `checkOS`: Make a bit more robust

`mingw64` and `mingw32` are now both accepted for `OSMinGW32`. This
allows us to cope with configs/triples that we haven't normalized extra
being what GNU `config.sub` does.
---
 m4/fptools_set_haskell_platform_vars.m4 | 2 +-
 m4/ghc_convert_os.m4                    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/m4/fptools_set_haskell_platform_vars.m4 b/m4/fptools_set_haskell_platform_vars.m4
index 1c4976bfbca3..8cc721d79b8f 100644
--- a/m4/fptools_set_haskell_platform_vars.m4
+++ b/m4/fptools_set_haskell_platform_vars.m4
@@ -82,7 +82,7 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS_SHELL_FUNCTIONS],
         solaris2)
             test -z "[$]2" || eval "[$]2=OSSolaris2"
             ;;
-        mingw32|windows)
+        mingw32|mingw64|windows)
             test -z "[$]2" || eval "[$]2=OSMinGW32"
             ;;
         freebsd)
diff --git a/m4/ghc_convert_os.m4 b/m4/ghc_convert_os.m4
index 586b33d09b52..b39c20c6de75 100644
--- a/m4/ghc_convert_os.m4
+++ b/m4/ghc_convert_os.m4
@@ -22,7 +22,7 @@ AC_DEFUN([GHC_CONVERT_OS],[
       openbsd*)
         $3="openbsd"
         ;;
-      windows|mingw32)
+      windows|mingw32|mingw64)
         $3="mingw32"
         ;;
       # As far as I'm aware, none of these have relevant variants
-- 
GitLab