aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 18b7ae0f1..ff8f5df9b 100755
--- a/configure.ac
+++ b/configure.ac
@@ -61,6 +61,13 @@ AC_SUBST(CONFIGURE_OPTIONS)
CURL_CFLAG_EXTRAS=""
if test X"$want_werror" = Xyes; then
CURL_CFLAG_EXTRAS="-Werror"
+ if test "$compiler_id" = "GNU_C"; then
+ dnl enable -pedantic-errors for GCC 5 and later,
+ dnl as before that it was the same as -Werror=pedantic
+ if test "$compiler_num" -ge "500"; then
+ CURL_CFLAG_EXTRAS="$CURL_CFLAG_EXTRAS -pedantic-errors"
+ fi
+ fi
fi
AC_SUBST(CURL_CFLAG_EXTRAS)