From 5feb04e233e1e6f81c727578ad9eae1367a2562f Mon Sep 17 00:00:00 2001 From: Devin Matthews Date: Sun, 23 May 2021 18:46:56 -0500 Subject: [PATCH] Add explicit compiler check for Windows. Check the C compiler for a predefined macro `_WIN32` to indicate (cross-)compilation for Windows. Fixes #463. --- configure | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure b/configure index 67d87a1b01..92a6c229c8 100755 --- a/configure +++ b/configure @@ -2373,6 +2373,11 @@ main() fi echo "${script_name}: using '${found_cc}' C compiler." + + # Also check the compiler to see if we are (cross-)compiling for Windows + if ${found_cc} -dM -E - < /dev/null 2> /dev/null | grep -q _WIN32; then + is_win=yes + fi # -- Find a C++ compiler ---------------------------------------------------