summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-04-17 13:27:17 +0200
committerYang Tse <yangsita@gmail.com>2012-04-17 13:30:02 +0200
commit2c77c33daafe61be09dfcd9b59d092be8baf6166 (patch)
tree8d2b476186d159c2f6ad7c42eb26c4cf1b24001c /m4
parent81db5a00e4232d8567f525fa2a2840fd120979ff (diff)
downloadc-ares-2c77c33daafe61be09dfcd9b59d092be8baf6166.tar.gz
c-ares-2c77c33daafe61be09dfcd9b59d092be8baf6166.tar.bz2
c-ares-2c77c33daafe61be09dfcd9b59d092be8baf6166.zip
cares-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')
-rw-r--r--m4/cares-compilers.m411
1 files changed, 10 insertions, 1 deletions
diff --git a/m4/cares-compilers.m4 b/m4/cares-compilers.m4
index aac86d4..7ee8e0d 100644
--- a/m4/cares-compilers.m4
+++ b/m4/cares-compilers.m4
@@ -15,7 +15,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 69
+# serial 70
dnl CARES_CHECK_COMPILER
@@ -156,6 +156,7 @@ AC_DEFUN([CARES_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
@@ -972,6 +973,14 @@ AC_DEFUN([CARES_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.