Lines Matching +full:test +full:- +full:only

21 # SPDX-License-Identifier: curl
30 dnl -------------------------------------------------
53 mips-sgi-irix*)
61 if test "$compiler_id" = "unknown"; then
72 *** mailing list: https://lists.haxx.selistinfo/curl-library/
80 dnl -------------------------------------------------
87 if test "$curl_cv_have_def___clang__" = "yes"; then
91 if test "$curl_cv_have_def___ibmxl__" = "yes" ; then
92 dnl IBM's almost-compatible clang version
100 fullclangver=`$CC -v 2>&1 | grep version`
110 …clangver | grep "based on LLVM " | "$SED" 's/.*(based on LLVM \(@<:@0-9@:>@*\.@<:@0-9@:>@*\).*)/\1…
111 if test -z "$clangver"; then
112 clangver=`echo $fullclangver | "$SED" 's/.*version \(@<:@0-9@:>@*\.@<:@0-9@:>@*\).*/\1/'`
117 clangvhi=`echo $clangver | cut -d . -f1`
118 clangvlo=`echo $clangver | cut -d . -f2`
121 if test "$appleclang" = '1' && test "$oldapple" = '0'; then
123 if test "$compiler_num" -ge '1300'; then compiler_num='1200'
124 elif test "$compiler_num" -ge '1205'; then compiler_num='1101'
125 elif test "$compiler_num" -ge '1204'; then compiler_num='1000'
126 elif test "$compiler_num" -ge '1107'; then compiler_num='900'
127 elif test "$compiler_num" -ge '1103'; then compiler_num='800'
128 elif test "$compiler_num" -ge '1003'; then compiler_num='700'
129 elif test "$compiler_num" -ge '1001'; then compiler_num='600'
130 elif test "$compiler_num" -ge '904'; then compiler_num='500'
131 elif test "$compiler_num" -ge '902'; then compiler_num='400'
132 elif test "$compiler_num" -ge '803'; then compiler_num='309'
133 elif test "$compiler_num" -ge '703'; then compiler_num='308'
138 flags_dbg_yes="-g"
139 flags_opt_all="-O -O0 -O1 -O2 -Os -O3 -O4"
140 flags_opt_yes="-O2"
141 flags_opt_off="-O0"
149 dnl -------------------------------------------------
156 if test "$curl_cv_have_def___DECC" = "yes" &&
157 test "$curl_cv_have_def___DECC_VER" = "yes"; then
160 flags_dbg_yes="-g2"
161 flags_opt_all="-O -O0 -O1 -O2 -O3 -O4"
162 flags_opt_yes="-O1"
163 flags_opt_off="-O0"
171 dnl -------------------------------------------------
188 if test "$curl_cv_have_def___GNUC__" = "yes" &&
189 test "$compiler_id" = "unknown"; then
193 # strip '-suffix' parts, e.g. Ubuntu Windows cross-gcc returns '10-win32'
194 gccver=`$CC -dumpversion | "$SED" 's/-.\{1,\}$//'`
195 gccvhi=`echo $gccver | cut -d . -f1`
196 if echo $gccver | grep -F '.' >/dev/null; then
197 gccvlo=`echo $gccver | cut -d . -f2`
204 flags_dbg_yes="-g"
205 flags_opt_all="-O -O0 -O1 -O2 -O3 -Os -Og -Ofast"
206 flags_opt_yes="-O2"
207 flags_opt_off="-O0"
215 dnl -------------------------------------------------
216 dnl Verify if compiler being used is HP-UX C.
219 AC_MSG_CHECKING([if compiler is HP-UX C])
221 if test "$curl_cv_have_def___HP_cc" = "yes"; then
224 flags_dbg_yes="-g"
225 flags_opt_all="-O +O0 +O1 +O2 +O3 +O4"
235 dnl -------------------------------------------------
241 if test "$curl_cv_have_def___IBMC__" = "yes"; then
244 flags_dbg_yes="-g"
245 flags_opt_all="-O -O0 -O1 -O2 -O3 -O4 -O5"
246 flags_opt_all="$flags_opt_all -qnooptimize"
247 flags_opt_all="$flags_opt_all -qoptimize=0"
248 flags_opt_all="$flags_opt_all -qoptimize=1"
249 flags_opt_all="$flags_opt_all -qoptimize=2"
250 flags_opt_all="$flags_opt_all -qoptimize=3"
251 flags_opt_all="$flags_opt_all -qoptimize=4"
252 flags_opt_all="$flags_opt_all -qoptimize=5"
253 flags_opt_yes="-O2"
254 flags_opt_off="-qnooptimize"
263 dnl -------------------------------------------------
270 if test "$curl_cv_have_def___INTEL_COMPILER" = "yes"; then
274 …compiler_ver=`echo "$compiler_num" | cut -c -2 | $SED 's/^0//'`.`echo "$compiler_num" | cut -c 3-4…
277 if test "$curl_cv_have_def___unix__" = "yes"; then
279 flags_dbg_yes="-g"
280 flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
281 flags_opt_yes="-O2"
282 flags_opt_off="-O0"
285 flags_dbg_yes="/Zi /Oy-"
286 flags_opt_all="/O /O0 /O1 /O2 /O3 /Od /Og /Og- /Oi /Oi-"
297 dnl -------------------------------------------------
305 if test "$curl_cv_have_def___GNUC__" = "no" &&
306 test "$curl_cv_have_def___sgi" = "yes" &&
307 test "$compiler_id" = "unknown"; then
310 flags_dbg_yes="-g"
311 flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
312 flags_opt_yes="-O2"
313 flags_opt_off="-O0"
321 dnl -------------------------------------------------
330 if test "$curl_cv_have_def___GNUC__" = "no" &&
331 (test "$curl_cv_have_def__SGI_COMPILER_VERSION" = "yes" ||
332 test "$curl_cv_have_def__COMPILER_VERSION" = "yes"); then
335 flags_dbg_yes="-g"
336 flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast"
337 flags_opt_yes="-O2"
338 flags_opt_off="-O0"
346 dnl -------------------------------------------------
352 if test "$curl_cv_have_def___SUNPRO_C" = "yes"; then
355 flags_dbg_yes="-g"
356 flags_opt_all="-O -xO -xO1 -xO2 -xO3 -xO4 -xO5"
357 flags_opt_yes="-xO2"
366 dnl -------------------------------------------------
372 if test "$curl_cv_have_def___TINYC__" = "yes"; then
375 flags_dbg_yes="-g"
385 dnl -------------------------------------------------
395 AC_MSG_CHECKING([convert -I options to -isystem])
396 if test "$compiler_id" = "GNU_C" ||
397 test "$compiler_id" = "CLANG" -o "$compiler_id" = "APPLECLANG"; then
403 -I*)
408 if test "$tmp_has_include" = "yes"; then
409 tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
410 tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
418 -I*)
423 if test "$tmp_has_include" = "yes"; then
424 tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
425 tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
435 dnl CURL_COMPILER_WORKS_IFELSE ([ACTION-IF-WORKS], [ACTION-IF-NOT-WORKS])
436 dnl -------------------------------------------------
438 dnl settings that are 'active' at the time the test
455 sed 's/^/cc-fail: /' conftest.err >&6
459 if test "$tmp_compiler_works" = "yes"; then
471 sed 's/^/link-fail: /' conftest.err >&6
475 dnl only do runtime verification when not cross-compiling
476 if test "x$cross_compiling" != "xyes" &&
477 test "$tmp_compiler_works" = "yes"; then
492 echo "run-fail: test program exited with status $ac_status" >&6
496 dnl branch upon test result
497 if test "$tmp_compiler_works" = "yes"; then
506 dnl -------------------------------------------------
515 if test "$compiler_id" != "unknown"; then
527 dnl warn about compile-time arguments used during link-time, like
528 dnl -O and -g and -pedantic.
529 tmp_CFLAGS="$tmp_CFLAGS -Qunused-arguments"
530 tmp_CFLAGS="$tmp_CFLAGS -Werror-implicit-function-declaration"
536 tmp_CFLAGS="$tmp_CFLAGS -std1"
538 tmp_CFLAGS="$tmp_CFLAGS -noansi_alias"
540 tmp_CFLAGS="$tmp_CFLAGS -warnprotos"
542 tmp_CFLAGS="$tmp_CFLAGS -msg_fatal toofewargs,toomanyargs"
547 dnl turn implicit-function-declaration warning into error,
549 if test "$compiler_num" -ge "295"; then
550 tmp_CFLAGS="$tmp_CFLAGS -Werror-implicit-function-declaration"
556 dnl Disallow run-time dereferencing of null pointers
557 tmp_CFLAGS="$tmp_CFLAGS -z"
566 dnl Ensure that compiler optimizations are always thread-safe.
567 tmp_CPPFLAGS="$tmp_CPPFLAGS -qthreaded"
572 tmp_CPPFLAGS="$tmp_CPPFLAGS -qnoansialias"
575 tmp_CPPFLAGS="$tmp_CPPFLAGS -qhalt=e"
582 tmp_CFLAGS="$tmp_CFLAGS -std=gnu89"
588 tmp_CPPFLAGS="$tmp_CPPFLAGS -diag-error 140,147,165,266"
594 dnl #2259: non-pointer conversion from X to Y may lose significant bits
595 tmp_CPPFLAGS="$tmp_CPPFLAGS -diag-disable 279,981,1025,1469,2259"
633 if test ! -z "$tmp_CFLAGS" || test ! -z "$tmp_CPPFLAGS"; then
656 dnl -------------------------------------------------
665 if test "$compiler_id" != "unknown"; then
674 if test "$want_debug" = "yes"; then
679 if test "$flags_prefer_cppflags" = "yes"; then
693 dnl -------------------------------------------------
702 if test "$compiler_id" != "unknown"; then
718 if test "$want_optimize" = "assume_no" ||
719 test "$want_optimize" = "assume_yes"; then
728 if test "$honor_optimize_option" = "yes"; then
729 if test "$want_optimize" = "assume_yes"; then
732 if test "$want_optimize" = "assume_no"; then
738 if test "$honor_optimize_option" = "yes"; then
741 if test "$want_optimize" = "yes"; then
745 if test "$want_optimize" = "no"; then
749 if test "$flags_prefer_cppflags" = "yes"; then
775 dnl -------------------------------------------------
784 if test "$compiler_id" != "unknown"; then
795 if test "$want_warnings" = "yes"; then
796 tmp_CFLAGS="$tmp_CFLAGS -pedantic"
798 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [pointer-arith write-strings])
800 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [inline nested-externs])
801 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-declarations])
802 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-prototypes])
803 tmp_CFLAGS="$tmp_CFLAGS -Wno-long-long"
804 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [float-equal])
805 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [sign-compare])
806 tmp_CFLAGS="$tmp_CFLAGS -Wno-multichar"
808 tmp_CFLAGS="$tmp_CFLAGS -Wno-format-nonliteral"
809 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [endif-labels strict-prototypes])
810 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [declaration-after-statement])
811 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [cast-align])
812 tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
813 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [shorten-64-to-32])
815 dnl Only clang 1.1 or later
816 if test "$compiler_num" -ge "101"; then
820 dnl Only clang 2.7 or later
821 if test "$compiler_num" -ge "207"; then
824 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [bad-function-cast])
826 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [div-by-zero format-security])
827 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [empty-body])
828 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-field-initializers])
829 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-noreturn])
830 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [old-style-definition])
831 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [redundant-decls])
832 …# CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [switch-enum]) # Not used because this basically d…
833 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [type-limits])
834 # CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused-macros]) # Not practical
835 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unreachable-code unused-parameter])
838 dnl Only clang 2.8 or later
839 if test "$compiler_num" -ge "208"; then
840 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [ignored-qualifiers])
844 dnl Only clang 2.9 or later
845 if test "$compiler_num" -ge "209"; then
846 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [sign-conversion])
847 tmp_CFLAGS="$tmp_CFLAGS -Wno-error=sign-conversion" # FIXME
848 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [shift-sign-overflow])
852 dnl Only clang 3.0 or later
853 if test "$compiler_num" -ge "300"; then
854 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [language-extension-token])
855 tmp_CFLAGS="$tmp_CFLAGS -Wformat=2"
858 dnl Only clang 3.2 or later
859 if test "$compiler_num" -ge "302"; then
860 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [enum-conversion])
861 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [sometimes-uninitialized])
864 dnl skip missing-variable-declarations warnings for Cygwin and
868 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-variable-declarations])
873 dnl Only clang 3.4 or later
874 if test "$compiler_num" -ge "304"; then
875 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [header-guard])
876 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused-const-variable])
879 dnl Only clang 3.5 or later
880 if test "$compiler_num" -ge "305"; then
882 …# CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unreachable-code-break]) # Not used: Silent in "unity…
885 dnl Only clang 3.6 or later
886 if test "$compiler_num" -ge "306"; then
887 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [double-promotion])
890 dnl Only clang 3.9 or later
891 if test "$compiler_num" -ge "309"; then
895 if test "$compiler_num" -lt "400"; then
896 tmp_CFLAGS="$tmp_CFLAGS -Wno-varargs"
900 if test "$compiler_num" -ge "700"; then
901 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [assign-enum])
902 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [extra-semi-stmt])
905 if test "$compiler_num" -ge "1000"; then
906 …tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough" # we have silencing markup for clang 10.0 and abo…
913 if test "$want_warnings" = "yes"; then
915 tmp_CFLAGS="$tmp_CFLAGS -msg_enable level3"
921 if test "$want_warnings" = "yes"; then
923 dnl Do not enable -pedantic when cross-compiling with a gcc older
925 if test "x$cross_compiling" != "xyes" ||
926 test "$compiler_num" -ge "300"; then
927 tmp_CFLAGS="$tmp_CFLAGS -pedantic"
932 tmp_CFLAGS="$tmp_CFLAGS -W"
934 dnl Only gcc 1.4 or later
935 if test "$compiler_num" -ge "104"; then
936 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [pointer-arith write-strings])
937 dnl If not cross-compiling with a gcc older than 3.0
938 if test "x$cross_compiling" != "xyes" ||
939 test "$compiler_num" -ge "300"; then
944 dnl Only gcc 2.7 or later
945 if test "$compiler_num" -ge "207"; then
946 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [inline nested-externs])
947 dnl If not cross-compiling with a gcc older than 3.0
948 if test "x$cross_compiling" != "xyes" ||
949 test "$compiler_num" -ge "300"; then
950 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-declarations])
951 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-prototypes])
955 dnl Only gcc 2.95 or later
956 if test "$compiler_num" -ge "295"; then
957 tmp_CFLAGS="$tmp_CFLAGS -Wno-long-long"
958 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [bad-function-cast])
961 dnl Only gcc 2.96 or later
962 if test "$compiler_num" -ge "296"; then
963 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [float-equal])
964 tmp_CFLAGS="$tmp_CFLAGS -Wno-multichar"
965 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [sign-compare])
966 dnl -Wundef used only if gcc is 2.96 or later since we get
972 dnl Only gcc 2.97 or later
973 if test "$compiler_num" -ge "297"; then
974 tmp_CFLAGS="$tmp_CFLAGS -Wno-format-nonliteral"
977 dnl Only gcc 3.0 or later
978 if test "$compiler_num" -ge "300"; then
979 dnl -Wunreachable-code seems totally unreliable on my gcc 3.3.2 on
980 dnl on i686-Linux as it gives us heaps with false positives.
986 dnl Only gcc 3.3 or later
987 if test "$compiler_num" -ge "303"; then
988 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [endif-labels strict-prototypes])
991 dnl Only gcc 3.4 or later
992 if test "$compiler_num" -ge "304"; then
993 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [declaration-after-statement])
994 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [old-style-definition])
997 dnl Only gcc 4.0 or later
998 if test "$compiler_num" -ge "400"; then
999 tmp_CFLAGS="$tmp_CFLAGS -Wstrict-aliasing=3"
1002 dnl Only gcc 4.1 or later
1003 if test "$compiler_num" -ge "401"; then
1005 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [div-by-zero format-security])
1006 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-field-initializers])
1008 *-*-msys*)
1011 …CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-noreturn]) # Seen to clash with libtool-generat…
1014 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unreachable-code unused-parameter])
1017 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [redundant-decls])
1018 …# CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [switch-enum]) # Not used because this basically d…
1019 # CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused-macros]) # Not practical
1022 dnl Only gcc 4.2 or later
1023 if test "$compiler_num" -ge "402"; then
1024 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [cast-align])
1027 dnl Only gcc 4.3 or later
1028 if test "$compiler_num" -ge "403"; then
1030 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [type-limits old-style-declaration])
1031 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-parameter-type empty-body])
1032 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [clobbered ignored-qualifiers])
1034 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [sign-conversion])
1035 tmp_CFLAGS="$tmp_CFLAGS -Wno-error=sign-conversion" # FIXME
1037 dnl required for -Warray-bounds, included in -Wall
1038 tmp_CFLAGS="$tmp_CFLAGS -ftree-vrp"
1041 dnl Only gcc 4.5 or later
1042 if test "$compiler_num" -ge "405"; then
1043 dnl Only Windows targets
1044 if test "$curl_cv_native_windows" = "yes"; then
1045 tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format"
1049 dnl Only gcc 4.6 or later
1050 if test "$compiler_num" -ge "406"; then
1051 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [double-promotion])
1054 dnl only gcc 4.8 or later
1055 if test "$compiler_num" -ge "408"; then
1056 tmp_CFLAGS="$tmp_CFLAGS -Wformat=2"
1059 dnl Only gcc 5 or later
1060 if test "$compiler_num" -ge "500"; then
1061 tmp_CFLAGS="$tmp_CFLAGS -Warray-bounds=2"
1064 dnl Only gcc 6 or later
1065 if test "$compiler_num" -ge "600"; then
1066 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [shift-negative-value])
1067 tmp_CFLAGS="$tmp_CFLAGS -Wshift-overflow=2"
1068 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [null-dereference])
1069 tmp_CFLAGS="$tmp_CFLAGS -fdelete-null-pointer-checks"
1070 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [duplicated-cond])
1071 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused-const-variable])
1074 dnl Only gcc 7 or later
1075 if test "$compiler_num" -ge "700"; then
1076 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [duplicated-branches])
1078 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [alloc-zero])
1079 tmp_CFLAGS="$tmp_CFLAGS -Wformat-truncation=2"
1080 tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough"
1083 dnl Only gcc 10 or later
1084 if test "$compiler_num" -ge "1000"; then
1085 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [arith-conversion])
1086 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [enum-conversion])
1092 if test "$compiler_num" -ge "300"; then
1093 tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
1095 dnl When cross-compiling with a gcc older than 3.0, disable
1097 if test "x$cross_compiling" = "xyes"; then
1098 if test "$compiler_num" -ge "104"; then
1100 tmp_CFLAGS="$tmp_CFLAGS -Wno-unused -Wno-shadow"
1102 if test "$compiler_num" -ge "207"; then
1104 tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-declarations"
1105 tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-prototypes"
1113 if test "$want_warnings" = "yes"; then
1127 if test "$want_warnings" = "yes"; then
1128 if test "$compiler_num" -gt "600"; then
1130 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wall -w2"
1131 dnl Perform extra compile-time code checking
1132 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wcheck"
1134 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wcomment"
1136 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wdeprecated"
1138 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wmissing-prototypes"
1139 dnl Enable warnings for 64-bit portability issues
1140 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wp64"
1142 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wpointer-arith"
1144 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wreturn-type"
1146 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wshadow"
1148 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wuninitialized"
1150 tmp_CPPFLAGS="$tmp_CPPFLAGS -Wunused-function"
1154 tmp_CFLAGS="$tmp_CFLAGS -fno-omit-frame-pointer"
1156 tmp_CFLAGS="$tmp_CFLAGS -fno-strict-aliasing"
1157 dnl Value-safe optimizations on floating-point data
1158 tmp_CFLAGS="$tmp_CFLAGS -fp-model precise"
1169 if test "$want_warnings" = "yes"; then
1170 dnl Perform stricter semantic and lint-like checks
1171 tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
1177 if test "$want_warnings" = "yes"; then
1178 dnl Perform stricter semantic and lint-like checks
1179 tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
1182 tmp_CFLAGS="$tmp_CFLAGS -woff 1209"
1188 if test "$want_warnings" = "yes"; then
1189 dnl Perform stricter semantic and lint-like checks
1190 tmp_CFLAGS="$tmp_CFLAGS -v"
1196 if test "$want_warnings" = "yes"; then
1200 CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [write-strings])
1211 if test ! -z "$tmp_CFLAGS" || test ! -z "$tmp_CPPFLAGS"; then
1234 dnl -------------------------------------------------
1243 if test -z "$_sqz_result"; then
1256 dnl -------------------------------------------------
1278 dnl -------------------------------------------------
1289 typedef char bad_t[sizeof(char) == sizeof(int) ? -1 : -1 ];
1303 dnl -------------------------------------------------
1306 dnl result, as a compilation-time condition inside the
1321 typedef char good_t1[sizeof(myfunc().mi) == sizeof(int) ? 1 : -1 ];
1322 typedef char good_t2[sizeof(myfunc().mc) == sizeof(char) ? 1 : -1 ];
1331 sed 's/^/cc-src: /' conftest.$ac_ext >&6
1332 sed 's/^/cc-err: /' conftest.err >&6
1343 typedef char bad_t1[sizeof(myfunc().mi) != sizeof(int) ? 1 : -1 ];
1344 typedef char bad_t2[sizeof(myfunc().mc) != sizeof(char) ? 1 : -1 ];
1354 if test "$tst_compiler_check_one_works" = "yes" &&
1355 test "$tst_compiler_check_two_works" = "yes"; then
1365 dnl -------------------------------------------------
1381 dnl All versions of clang support -fvisibility=
1383 tmp_CFLAGS="-fvisibility=hidden"
1387 dnl Only gcc 3.4 or later
1388 if test "$compiler_num" -ge "304"; then
1389 if $CC --help --verbose 2>/dev/null | grep fvisibility= >/dev/null ; then
1391 tmp_CFLAGS="-fvisibility=hidden"
1397 dnl Only icc 9.0 or later
1398 if test "$compiler_num" -ge "900"; then
1399 if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
1401 CFLAGS="$CFLAGS -fvisibility=hidden"
1406 printf("icc fvisibility bug test");
1410 tmp_CFLAGS="-fvisibility=hidden"
1418 if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
1420 tmp_CFLAGS="-xldscope=hidden"
1425 if test "$supports_symbol_hiding" = "yes"; then
1447 if test -f conftest.err; then
1449 if test "$?" -eq "0"; then
1456 sed 's/^/cc-src: /' conftest.$ac_ext >&6
1457 sed 's/^/cc-err: /' conftest.err >&6
1462 if test "$supports_symbol_hiding" = "yes"; then
1473 dnl -------------------------------------------------
1509 dnl -------------------------------------------------
1520 if test "$word1" = "$word2"; then
1529 dnl [ACTION-IF-MATCH], [ACTION-IF-NOT-MATCH])
1530 dnl -------------------------------------------------
1537 if test "$ac_var_match_word" = "yes"; then
1546 dnl -------------------------------------------------
1557 if test "$word1" = "$word2"; then
1561 if test "$ac_var_strip_word" = "no"; then
1570 dnl CURL_ADD_COMPILER_WARNINGS (WARNING-LIST, NEW-WARNINGS)
1571 dnl -------------------------------------------------------
1572 dnl Contents of variable WARNING-LIST and NEW-WARNINGS are
1574 dnl Add each compiler warning from NEW-WARNINGS that has not
1575 dnl been disabled via CFLAGS to WARNING-LIST.
1581 CURL_VAR_MATCH(CFLAGS, [-Wno-$warning -W$warning])
1582 if test "$ac_var_match_word" = "no"; then
1583 ac_var_added_warnings="$ac_var_added_warnings -W$warning"