Lines Matching +full:clang +full:- +full:6
21 # SPDX-License-Identifier: curl
30 dnl -------------------------------------------------
52 mips-sgi-irix*)
71 *** mailing list: https://lists.haxx.selistinfo/curl-library/
79 dnl -------------------------------------------------
80 dnl Verify if compiler being used is clang.
84 AC_MSG_CHECKING([if compiler is clang])
91 dnl IBM's almost-compatible clang version
96 compiler_id="CLANG"
99 fullclangver=`$CC -v 2>&1 | grep version`
105 …clangver | grep "based on LLVM " | "$SED" 's/.*(based on LLVM \(@<:@0-9@:>@*\.@<:@0-9@:>@*\).*)/\1…
106 if test -z "$clangver"; then
107 clangver=`echo $fullclangver | "$SED" 's/.*version \(@<:@0-9@:>@*\.@<:@0-9@:>@*\).*/\1/'`
112 clangvhi=`echo $clangver | cut -d . -f1`
113 clangvlo=`echo $clangver | cut -d . -f2`
116 dnl Starting with Xcode 7 / clang 3.7, Apple clang won't tell its upstream version
117 if test "$compiler_num" -ge '1300'; then compiler_num='1200'
118 elif test "$compiler_num" -ge '1205'; then compiler_num='1101'
119 elif test "$compiler_num" -ge '1204'; then compiler_num='1000'
120 elif test "$compiler_num" -ge '1107'; then compiler_num='900'
121 elif test "$compiler_num" -ge '1103'; then compiler_num='800'
122 elif test "$compiler_num" -ge '1003'; then compiler_num='700'
123 elif test "$compiler_num" -ge '1001'; then compiler_num='600'
124 elif test "$compiler_num" -ge '904'; then compiler_num='500'
125 elif test "$compiler_num" -ge '902'; then compiler_num='400'
126 elif test "$compiler_num" -ge '803'; then compiler_num='309'
127 elif test "$compiler_num" -ge '703'; then compiler_num='308'
131 AC_MSG_RESULT([clang '$compiler_num' (raw: '$fullclangver' / '$clangver')])
132 flags_dbg_yes="-g"
133 flags_opt_all="-O -O0 -O1 -O2 -Os -O3 -O4"
134 flags_opt_yes="-O2"
135 flags_opt_off="-O0"
143 dnl -------------------------------------------------
154 flags_dbg_yes="-g2"
155 flags_opt_all="-O -O0 -O1 -O2 -O3 -O4"
156 flags_opt_yes="-O1"
157 flags_opt_off="-O0"
165 dnl -------------------------------------------------
187 # strip '-suffix' parts, e.g. Ubuntu Windows cross-gcc returns '10-win32'
188 gccver=`$CC -dumpversion | sed -E 's/-.+$//'`
189 gccvhi=`echo $gccver | cut -d . -f1`
190 if echo $gccver | grep -F '.' >/dev/null; then
191 gccvlo=`echo $gccver | cut -d . -f2`
197 flags_dbg_yes="-g"
198 flags_opt_all="-O -O0 -O1 -O2 -O3 -Os -Og -Ofast"
199 flags_opt_yes="-O2"
200 flags_opt_off="-O0"
208 dnl -------------------------------------------------
209 dnl Verify if compiler being used is HP-UX C.
212 AC_MSG_CHECKING([if compiler is HP-UX C])
217 flags_dbg_yes="-g"
218 flags_opt_all="-O +O0 +O1 +O2 +O3 +O4"
228 dnl -------------------------------------------------
237 flags_dbg_yes="-g"
238 flags_opt_all="-O -O0 -O1 -O2 -O3 -O4 -O5"
239 flags_opt_all="$flags_opt_all -qnooptimize"
240 flags_opt_all="$flags_opt_all -qoptimize=0"
241 flags_opt_all="$flags_opt_all -qoptimize=1"
242 flags_opt_all="$flags_opt_all -qoptimize=2"
243 flags_opt_all="$flags_opt_all -qoptimize=3"
244 flags_opt_all="$flags_opt_all -qoptimize=4"
245 flags_opt_all="$flags_opt_all -qoptimize=5"
246 flags_opt_yes="-O2"
247 flags_opt_off="-qnooptimize"
256 dnl -------------------------------------------------
271 flags_dbg_yes="-g"
272 flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
273 flags_opt_yes="-O2"
274 flags_opt_off="-O0"
277 flags_dbg_yes="/Zi /Oy-"
278 flags_opt_all="/O /O0 /O1 /O2 /O3 /Od /Og /Og- /Oi /Oi-"
289 dnl -------------------------------------------------
302 flags_dbg_yes="-g"
303 flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
304 flags_opt_yes="-O2"
305 flags_opt_off="-O0"
313 dnl -------------------------------------------------
327 flags_dbg_yes="-g"
328 flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
329 flags_opt_yes="-O2"
330 flags_opt_off="-O0"
338 dnl -------------------------------------------------
347 flags_dbg_yes="-g"
348 flags_opt_all="-O -xO -xO1 -xO2 -xO3 -xO4 -xO5"
349 flags_opt_yes="-xO2"
358 dnl -------------------------------------------------
367 flags_dbg_yes="-g"
377 dnl -------------------------------------------------
387 AC_MSG_CHECKING([convert -I options to -isystem])
389 test "$compiler_id" = "CLANG"; then
395 -I*)
401 tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
402 tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
410 -I*)
416 tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
417 tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
427 dnl CURL_COMPILER_WORKS_IFELSE ([ACTION-IF-WORKS], [ACTION-IF-NOT-WORKS])
428 dnl -------------------------------------------------
446 echo " " >&6
447 sed 's/^/cc-fail: /' conftest.err >&6
448 echo " " >&6
462 echo " " >&6
463 sed 's/^/link-fail: /' conftest.err >&6
464 echo " " >&6
467 dnl only do runtime verification when not cross-compiling
483 echo " " >&6
484 echo "run-fail: test program exited with status $ac_status" >&6
485 echo " " >&6
498 dnl -------------------------------------------------
516 CLANG)
518 dnl Disable warnings for unused arguments, otherwise clang will
519 dnl warn about compile-time arguments used during link-time, like
520 dnl -O and -g and -pedantic.
521 tmp_CFLAGS="$tmp_CFLAGS -Qunused-arguments"
527 tmp_CFLAGS="$tmp_CFLAGS -std1"
529 tmp_CFLAGS="$tmp_CFLAGS -noansi_alias"
531 tmp_CFLAGS="$tmp_CFLAGS -warnprotos"
533 tmp_CFLAGS="$tmp_CFLAGS -msg_fatal toofewargs,toomanyargs"
538 dnl turn implicit-function-declaration warning into error,
540 if test "$compiler_num" -ge "295"; then
541 tmp_CFLAGS="$tmp_CFLAGS -Werror-implicit-function-declaration"
547 dnl Disallow run-time dereferencing of null pointers
548 tmp_CFLAGS="$tmp_CFLAGS -z"
557 dnl Ensure that compiler optimizations are always thread-safe.
558 tmp_CPPFLAGS="$tmp_CPPFLAGS -qthreaded"
563 tmp_CPPFLAGS="$tmp_CPPFLAGS -qnoansialias"
566 tmp_CPPFLAGS="$tmp_CPPFLAGS -qhalt=e"
573 tmp_CFLAGS="$tmp_CFLAGS -std=gnu89"
579 tmp_CPPFLAGS="$tmp_CPPFLAGS -diag-error 140,147,165,266"
585 dnl #2259: non-pointer conversion from X to Y may lose significant bits
586 tmp_CPPFLAGS="$tmp_CPPFLAGS -diag-disable 279,981,1025,1469,2259"
624 if test ! -z "$tmp_CFLAGS" || test ! -z "$tmp_CPPFLAGS"; then
647 dnl -------------------------------------------------
684 dnl -------------------------------------------------
766 dnl -------------------------------------------------
784 CLANG)
787 tmp_CFLAGS="$tmp_CFLAGS -pedantic"
789 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [pointer-arith write-strings])
791 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [inline nested-externs])
792 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-declarations])
793 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-prototypes])
794 tmp_CFLAGS="$tmp_CFLAGS -Wno-long-long"
795 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [float-equal])
796 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [sign-compare])
797 tmp_CFLAGS="$tmp_CFLAGS -Wno-multichar"
799 tmp_CFLAGS="$tmp_CFLAGS -Wno-format-nonliteral"
800 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [endif-labels strict-prototypes])
801 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [declaration-after-statement])
802 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [cast-align])
803 tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
804 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [shorten-64-to-32])
806 dnl Only clang 1.1 or later
807 if test "$compiler_num" -ge "101"; then
811 dnl Only clang 2.7 or later
812 if test "$compiler_num" -ge "207"; then
815 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [bad-function-cast])
817 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [div-by-zero format-security])
818 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [empty-body])
819 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-field-initializers])
820 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-noreturn])
821 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [old-style-definition])
822 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [redundant-decls])
823 …# CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [switch-enum]) # Not used because this basically d…
824 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [type-limits])
825 # CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused-macros]) # Not practical
826 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unreachable-code unused-parameter])
829 dnl Only clang 2.8 or later
830 if test "$compiler_num" -ge "208"; then
831 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [ignored-qualifiers])
835 dnl Only clang 2.9 or later
836 if test "$compiler_num" -ge "209"; then
837 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [sign-conversion])
838 tmp_CFLAGS="$tmp_CFLAGS -Wno-error=sign-conversion" # FIXME
839 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [shift-sign-overflow])
843 dnl Only clang 3.0 or later
844 if test "$compiler_num" -ge "300"; then
845 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [language-extension-token])
846 tmp_CFLAGS="$tmp_CFLAGS -Wformat=2"
849 dnl Only clang 3.2 or later
850 if test "$compiler_num" -ge "302"; then
851 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [enum-conversion])
852 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [sometimes-uninitialized])
855 dnl skip missing-variable-declarations warnings for cygwin and
859 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-variable-declarations])
864 dnl Only clang 3.4 or later
865 if test "$compiler_num" -ge "304"; then
866 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [header-guard])
867 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused-const-variable])
870 dnl Only clang 3.5 or later
871 if test "$compiler_num" -ge "305"; then
873 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unreachable-code-break])
876 dnl Only clang 3.6 or later
877 if test "$compiler_num" -ge "306"; then
878 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [double-promotion])
881 dnl Only clang 3.9 or later
882 if test "$compiler_num" -ge "309"; then
886 if test "$compiler_num" -lt "400"; then
887 tmp_CFLAGS="$tmp_CFLAGS -Wno-varargs"
890 dnl clang 7 or later
891 if test "$compiler_num" -ge "700"; then
892 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [assign-enum])
893 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [extra-semi-stmt])
895 dnl clang 10 or later
896 if test "$compiler_num" -ge "1000"; then
897 …tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough" # we have silencing markup for clang 10.0 and abo…
902 dnl This option should be placed after -Wconversion.
903 tmp_CFLAGS="$tmp_CFLAGS -Wno-pointer-bool-conversion"
910 tmp_CFLAGS="$tmp_CFLAGS -msg_enable level3"
918 dnl Do not enable -pedantic when cross-compiling with a gcc older
921 test "$compiler_num" -ge "300"; then
922 tmp_CFLAGS="$tmp_CFLAGS -pedantic"
927 tmp_CFLAGS="$tmp_CFLAGS -W"
930 if test "$compiler_num" -ge "104"; then
931 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [pointer-arith write-strings])
932 dnl If not cross-compiling with a gcc older than 3.0
934 test "$compiler_num" -ge "300"; then
940 if test "$compiler_num" -ge "207"; then
941 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [inline nested-externs])
942 dnl If not cross-compiling with a gcc older than 3.0
944 test "$compiler_num" -ge "300"; then
945 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-declarations])
946 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-prototypes])
951 if test "$compiler_num" -ge "295"; then
952 tmp_CFLAGS="$tmp_CFLAGS -Wno-long-long"
953 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [bad-function-cast])
957 if test "$compiler_num" -ge "296"; then
958 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [float-equal])
959 tmp_CFLAGS="$tmp_CFLAGS -Wno-multichar"
960 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [sign-compare])
961 dnl -Wundef used only if gcc is 2.96 or later since we get
968 if test "$compiler_num" -ge "297"; then
969 tmp_CFLAGS="$tmp_CFLAGS -Wno-format-nonliteral"
973 if test "$compiler_num" -ge "300"; then
974 dnl -Wunreachable-code seems totally unreliable on my gcc 3.3.2 on
975 dnl on i686-Linux as it gives us heaps with false positives.
982 if test "$compiler_num" -ge "303"; then
983 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [endif-labels strict-prototypes])
987 if test "$compiler_num" -ge "304"; then
988 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [declaration-after-statement])
989 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [old-style-definition])
993 if test "$compiler_num" -ge "400"; then
994 tmp_CFLAGS="$tmp_CFLAGS -Wstrict-aliasing=3"
998 if test "$compiler_num" -ge "401"; then
1000 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [div-by-zero format-security])
1001 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-field-initializers])
1003 *-*-msys*)
1006 …CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-noreturn]) # Seen to clash with libtool-generat…
1009 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unreachable-code unused-parameter])
1012 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [redundant-decls])
1013 …# CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [switch-enum]) # Not used because this basically d…
1014 # CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused-macros]) # Not practical
1018 if test "$compiler_num" -ge "402"; then
1019 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [cast-align])
1023 if test "$compiler_num" -ge "403"; then
1025 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [type-limits old-style-declaration])
1026 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-parameter-type empty-body])
1027 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [clobbered ignored-qualifiers])
1029 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [sign-conversion])
1030 tmp_CFLAGS="$tmp_CFLAGS -Wno-error=sign-conversion" # FIXME
1032 dnl required for -Warray-bounds, included in -Wall
1033 tmp_CFLAGS="$tmp_CFLAGS -ftree-vrp"
1037 if test "$compiler_num" -ge "405"; then
1040 tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format"
1045 if test "$compiler_num" -ge "406"; then
1046 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [double-promotion])
1050 if test "$compiler_num" -ge "408"; then
1051 tmp_CFLAGS="$tmp_CFLAGS -Wformat=2"
1055 if test "$compiler_num" -ge "500"; then
1056 tmp_CFLAGS="$tmp_CFLAGS -Warray-bounds=2"
1059 dnl Only gcc 6 or later
1060 if test "$compiler_num" -ge "600"; then
1061 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [shift-negative-value])
1062 tmp_CFLAGS="$tmp_CFLAGS -Wshift-overflow=2"
1063 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [null-dereference])
1064 tmp_CFLAGS="$tmp_CFLAGS -fdelete-null-pointer-checks"
1065 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [duplicated-cond])
1066 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused-const-variable])
1070 if test "$compiler_num" -ge "700"; then
1071 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [duplicated-branches])
1073 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [alloc-zero])
1074 tmp_CFLAGS="$tmp_CFLAGS -Wformat-overflow=2"
1075 tmp_CFLAGS="$tmp_CFLAGS -Wformat-truncation=2"
1076 tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough"
1080 if test "$compiler_num" -ge "1000"; then
1081 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [arith-conversion])
1082 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [enum-conversion])
1088 if test "$compiler_num" -ge "300"; then
1089 tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
1091 dnl When cross-compiling with a gcc older than 3.0, disable
1094 if test "$compiler_num" -ge "104"; then
1096 tmp_CFLAGS="$tmp_CFLAGS -Wno-unused -Wno-shadow"
1098 if test "$compiler_num" -ge "207"; then
1100 tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-declarations"
1101 tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-prototypes"
1124 if test "$compiler_num" -gt "600"; then
1126 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wall -w2"
1127 dnl Perform extra compile-time code checking
1128 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wcheck"
1130 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wcomment"
1132 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wdeprecated"
1134 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wmissing-prototypes"
1135 dnl Enable warnings for 64-bit portability issues
1136 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wp64"
1138 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wpointer-arith"
1140 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wreturn-type"
1142 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wshadow"
1144 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wuninitialized"
1146 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wunused-function"
1150 tmp_CFLAGS="$tmp_CFLAGS -fno-omit-frame-pointer"
1152 tmp_CFLAGS="$tmp_CFLAGS -fno-strict-aliasing"
1153 dnl Value-safe optimizations on floating-point data
1154 tmp_CFLAGS="$tmp_CFLAGS -fp-model precise"
1166 dnl Perform stricter semantic and lint-like checks
1167 tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
1174 dnl Perform stricter semantic and lint-like checks
1175 tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
1178 tmp_CFLAGS="$tmp_CFLAGS -woff 1209"
1185 dnl Perform stricter semantic and lint-like checks
1186 tmp_CFLAGS="$tmp_CFLAGS -v"
1196 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [write-strings])
1207 if test ! -z "$tmp_CFLAGS" || test ! -z "$tmp_CPPFLAGS"; then
1230 dnl -------------------------------------------------
1239 if test -z "$_sqz_result"; then
1252 dnl -------------------------------------------------
1254 dnl option, and other additional configure pre-requisites.
1298 dnl -------------------------------------------------
1320 dnl -------------------------------------------------
1331 typedef char bad_t[sizeof(char) == sizeof(int) ? -1 : -1 ];
1345 dnl -------------------------------------------------
1348 dnl result, as a compilation-time condition inside the
1363 typedef char good_t1[sizeof(myfunc().mi) == sizeof(int) ? 1 : -1 ];
1364 typedef char good_t2[sizeof(myfunc().mc) == sizeof(char) ? 1 : -1 ];
1373 sed 's/^/cc-src: /' conftest.$ac_ext >&6
1374 sed 's/^/cc-err: /' conftest.err >&6
1385 typedef char bad_t1[sizeof(myfunc().mi) != sizeof(int) ? 1 : -1 ];
1386 typedef char bad_t2[sizeof(myfunc().mc) != sizeof(char) ? 1 : -1 ];
1407 dnl -------------------------------------------------
1422 CLANG)
1423 dnl All versions of clang support -fvisibility=
1425 tmp_CFLAGS="-fvisibility=hidden"
1430 if test "$compiler_num" -ge "304"; then
1431 if $CC --help --verbose 2>/dev/null | grep fvisibility= >/dev/null ; then
1433 tmp_CFLAGS="-fvisibility=hidden"
1440 if test "$compiler_num" -ge "900"; then
1441 if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
1443 CFLAGS="$CFLAGS -fvisibility=hidden"
1452 tmp_CFLAGS="-fvisibility=hidden"
1460 if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
1462 tmp_CFLAGS="-xldscope=hidden"
1489 if test -f conftest.err; then
1491 if test "$?" -eq "0"; then
1497 echo " " >&6
1498 sed 's/^/cc-src: /' conftest.$ac_ext >&6
1499 sed 's/^/cc-err: /' conftest.err >&6
1500 echo " " >&6
1515 dnl -------------------------------------------------
1551 dnl -------------------------------------------------
1571 dnl [ACTION-IF-MATCH], [ACTION-IF-NOT-MATCH])
1572 dnl -------------------------------------------------
1588 dnl -------------------------------------------------
1612 dnl CURL_ADD_COMPILER_WARNINGS (WARNING-LIST, NEW-WARNINGS)
1613 dnl -------------------------------------------------------
1614 dnl Contents of variable WARNING-LIST and NEW-WARNINGS are
1616 dnl Add each compiler warning from NEW-WARNINGS that has not
1617 dnl been disabled via CFLAGS to WARNING-LIST.
1623 CURL_VAR_MATCH(CFLAGS, [-Wno-$warning -W$warning])
1625 ac_var_added_warnings="$ac_var_added_warnings -W$warning"