aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--acinclude.m42
-rwxr-xr-xconfigure.ac7
2 files changed, 8 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index f32e86cda..355ee3a61 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2158,7 +2158,7 @@ AC_DEFUN([CURL_VERIFY_RUNTIMELIBS], [
dnl point also is available run-time!
AC_MSG_CHECKING([run-time libs availability])
CURL_RUN_IFELSE([
-main()
+int main()
{
return 0;
}
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)