]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: convert -I to -isystem as a last step
authorDaniel Stenberg <daniel@haxx.se>
Sun, 8 Mar 2020 10:08:13 +0000 (11:08 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 11 Mar 2020 07:51:25 +0000 (08:51 +0100)
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!

Closes #5060

configure.ac
m4/curl-compilers.m4

index 4f4aeb91bdac211e407dadc96611e4b5e1ac072d..973394bce3df8ade04125f1aa2693631935d93a3 100755 (executable)
@@ -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
index 79460b6d2018ffc61cc31df7fc2a734d7b4537f5..196b285be828aa2069cc015b0196236032c9a6fd 100644 (file)
@@ -452,8 +452,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
@@ -484,6 +486,8 @@ AC_DEFUN([CURL_CONVERT_INCLUDE_TO_ISYSTEM], [
       CPPFLAGS="$tmp_chg_FLAGS"
       squeeze CPPFLAGS
     fi
+  else
+    AC_MSG_RESULT([no])
   fi
 ])
 
@@ -569,11 +573,6 @@ AC_DEFUN([CURL_SET_COMPILER_BASIC_OPTS], [
   AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
   #
   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"