summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2018-07-09 18:38:23 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2018-08-21 18:53:44 +0200
commitd5c0351055d5709da8f3e16c91348092fdb481aa (patch)
tree1e8d54641e57622998b49c3972a6191bc420b42d /acinclude.m4
parenta829c4b25e2197d60afacefe3c868a974c3cd125 (diff)
downloadcurl-d5c0351055d5709da8f3e16c91348092fdb481aa.tar.gz
configure: conditionally enable pedantic-errors
Enable pedantic-errors for GCC >= 5 with --enable-werror. Before GCC 5, pedantic-errors was synonymous to -Werror=pedantic [0], which is still the case for clang [1]. With GCC 5, it became complementary [2]. Also fix a resulting error in acinclude.m4 as main's return type was missing, which is illegal in C99. [0] https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Warning-Options.html [1] https://clang.llvm.org/docs/UsersManual.html#options-to-control-error-and-warning-messages [2] https://gcc.gnu.org/onlinedocs/gcc-5.1.0/gcc/Warning-Options.html Closes https://github.com/curl/curl/pull/2747
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m42
1 files changed, 1 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;
}