summaryrefslogtreecommitdiff
path: root/m4/curl-compilers.m4
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-04-16 02:49:50 +0200
committerYang Tse <yangsita@gmail.com>2012-04-16 22:12:02 +0200
commitbd12c44d355dcdcb7d094717b2139cec09a3a4c0 (patch)
treef366d5fb46703f6b56f3bdde9bf41fe68e3842c1 /m4/curl-compilers.m4
parent4c385cf8960c05c33a2b7d68f6aaced462759cbc (diff)
downloadcurl-bd12c44d355dcdcb7d094717b2139cec09a3a4c0.tar.gz
curl-compilers.m4: -Wno-pedantic-ms-format for Windows gcc 4.5 builds
When building a Windows target with gcc 4.5 or newer and strict compiler warnings enabled use -Wno-pedantic-ms-format in addition to other flags.
Diffstat (limited to 'm4/curl-compilers.m4')
-rw-r--r--m4/curl-compilers.m411
1 files changed, 10 insertions, 1 deletions
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index fffe85f20..2752f65e4 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -21,7 +21,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 60
+# serial 61
dnl CURL_CHECK_COMPILER
@@ -161,6 +161,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_GNU_C], [
flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
flags_opt_yes="-O2"
flags_opt_off="-O0"
+ CURL_CHECK_DEF([_WIN32], [], [silent])
else
AC_MSG_RESULT([no])
fi
@@ -977,6 +978,14 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
tmp_CFLAGS="$tmp_CFLAGS -Wconversion -Wno-sign-conversion -Wvla"
fi
#
+ dnl Only gcc 4.5 or later
+ if test "$compiler_num" -ge "405"; then
+ dnl Only windows targets
+ if test "$curl_cv_have_def__WIN32" = "yes"; then
+ tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format"
+ fi
+ fi
+ #
fi
#
dnl Do not issue warnings for code in system include paths.