autotools: check mingw-w64 version

This commit is contained in:
Viktor Szakats 2025-07-26 14:46:05 +02:00
parent 9f3e554c8d
commit effae02b57
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -530,6 +530,26 @@ if test "$curl_cv_native_windows" = "yes"; then
case "$CPPFLAGS" in
*-DWINSTORECOMPAT*) curl_cv_winuwp='yes';;
esac
case $host_os in
mingw*)
AC_MSG_CHECKING([if building with mingw-w64 3.0 or upper])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <_mingw.h>
]],[[
#if !defined(__MINGW64_VERSION_MAJOR) || (__MINGW64_VERSION_MAJOR < 6)
#error
#endif
]])
],[
AC_MSG_RESULT([yes])
],[
AC_MSG_RESULT([no])
AC_MSG_ERROR([Building with mingw-w64 3.0 or upper is required.])
])
;;
esac
fi
CURL_SET_COMPILER_BASIC_OPTS