summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-03-08 11:08:13 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-03-08 22:50:34 +0100
commit39a5784a69598547892e01d8815194efb00e1949 (patch)
treefbfbfffd18f3ad0fc0e606807ae3cab9ad45a8e5
parent77336671dc4d036bc36c135afba47ea52b1b6663 (diff)
downloadcurl-39a5784a69598547892e01d8815194efb00e1949.tar.gz
configure: convert -I to -isystem as a last stepbagder/configure-compiler
As all the -I uses in CFLAGS at that point are for system headers and third party libraries this helps us remove/ignore warnings on those!
-rwxr-xr-xconfigure.ac2
-rw-r--r--m4/curl-compilers.m411
2 files changed, 7 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index e7ad63925..e1e8adfcc 100755
--- a/configure.ac
+++ b/configure.ac
@@ -4259,6 +4259,8 @@ if test "$want_thres" = "yes" && test "x$USE_THREADS_POSIX" != "x1"; then
fi
fi
+CURL_CONVERT_INCLUDE_TO_ISYSTEM
+
dnl ************************************************************
dnl disable verbose text strings
dnl
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index c64db4bc6..fd2fef822 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -443,8 +443,10 @@ dnl GNUC versions these warnings are not silenced.
AC_DEFUN([CURL_CONVERT_INCLUDE_TO_ISYSTEM], [
AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
AC_REQUIRE([CURL_CHECK_COMPILER])dnl
+ AC_MSG_CHECKING([convert -I options to -isystem])
if test "$compiler_id" = "GNU_C" ||
test "$compiler_id" = "CLANG"; then
+ AC_MSG_RESULT([yes])
tmp_has_include="no"
tmp_chg_FLAGS="$CFLAGS"
for word1 in $tmp_chg_FLAGS; do
@@ -475,6 +477,8 @@ AC_DEFUN([CURL_CONVERT_INCLUDE_TO_ISYSTEM], [
CPPFLAGS="$tmp_chg_FLAGS"
squeeze CPPFLAGS
fi
+ else
+ AC_MSG_RESULT([no])
fi
])
@@ -561,11 +565,6 @@ AC_DEFUN([CURL_SET_COMPILER_BASIC_OPTS], [
#
if test "$compiler_id" != "unknown"; then
#
- if test "$compiler_id" = "GNU_C" ||
- test "$compiler_id" = "CLANG"; then
- CURL_CONVERT_INCLUDE_TO_ISYSTEM
- fi
- #
tmp_save_CPPFLAGS="$CPPFLAGS"
tmp_save_CFLAGS="$CFLAGS"
tmp_CPPFLAGS=""