summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--m4/curl-compilers.m416
1 files changed, 13 insertions, 3 deletions
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index 7d59f0667..4745dee20 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -1074,9 +1074,19 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
fi
#
dnl only gcc 4.8 or later
- if test "$compiler_num" -ge "408"; then
- tmp_CFLAGS="$tmp_CFLAGS -Wformat=2"
- fi
+ case $host_os in
+ mingw*)
+ dnl for mingw, switch it off!
+ if test "$compiler_num" -ge "408"; then
+ tmp_CFLAGS="$tmp_CFLAGS -Wno-format"
+ fi
+ ;;
+ *)
+ if test "$compiler_num" -ge "408"; then
+ tmp_CFLAGS="$tmp_CFLAGS -Wformat=2"
+ fi
+ ;;
+ esac
#
dnl Only gcc 5 or later
if test "$compiler_num" -ge "500"; then