1 dnl Copyright © 1997-2016, The AROS Development Team. All rights reserved.
4 dnl Desc: Autoconf source for target compiler feature detection
7 # Note: After file changes, generate features anew and commit _both_ files.
8 -------------------------
12 AC_CONFIG_AUX_DIR(../scripts/autoconf)
14 AROS_BUILDDIR=`${PWDCMD-pwd}`
15 AROS_BUILDDIR_UNIX=${PWD}
17 srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
20 NOLINKFLAGS="-nostdlib -nostartfiles"
22 # The first step is to find the binaries.
25 AC_MSG_CHECKING([target config location])
26 AC_ARG_WITH(config-dir,AC_HELP_STRING([--with-config-dir=VERSION],[Location of generated target config files]),targetcfg_dir="$withval",targetcfg_dir="")
27 if test "$targetcfg_dir" = ""; then
28 AC_MSG_ERROR([missing config directory!])
30 aros_targetcfg_dir="$targetcfg_dir"
32 AC_MSG_RESULT($aros_targetcfg_dir)
34 #-----------------------------------------------------------------------------
36 # Check if the target compiler supports some features:
42 AC_MSG_CHECKING([whether ${CC} accepts -flto])
44 AC_TRY_COMPILE(,, aros_lto="yes", aros_lto="no")
45 AC_MSG_RESULT($aros_lto)
46 if test "x-$aros_lto" = "x-yes" ; then
50 AC_MSG_CHECKING([whether ${CC} accepts -floop-block])
52 AC_TRY_COMPILE(,, aros_loop_block="yes", aros_loop_block="no")
53 AC_MSG_RESULT($aros_loop_block)
54 if test "x-$aros_loop_block" = "x-yes" ; then
55 aros_cflags_loop_block=-floop-block
58 AC_MSG_CHECKING([whether ${CC} accepts -floop-interchange])
59 CFLAGS=-floop-interchange
60 AC_TRY_COMPILE(,, aros_loop_interchange="yes", aros_loop_interchange="no")
61 AC_MSG_RESULT($aros_loop_interchange)
62 if test "x-$aros_loop_interchange" = "x-yes" ; then
63 aros_cflags_loop_interchange=-floop-interchange
66 AC_MSG_CHECKING([whether ${CC} accepts -floop-strip-mine])
67 CFLAGS=-floop-strip-mine
68 AC_TRY_COMPILE(,, aros_loop_strip_mine="yes", aros_loop_strip_mine="no")
69 AC_MSG_RESULT($aros_loop_strip_mine)
70 if test "x-$aros_loop_strip_mine" = "x-yes" ; then
71 aros_cflags_loop_strip_mine=-floop-strip-mine
74 AC_MSG_CHECKING([whether ${CC} accepts -iquote])
76 AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no")
77 AC_MSG_RESULT($has_iquote)
78 if test "x-$has_iquote" = "x-yes" ; then
79 aros_cflags_iquote=-iquote
80 aros_cflags_iquote_end=
83 aros_cflags_iquote_end=-I-
86 #-----------------------------------------------------------------------------
88 # Check if the target compiler supports some options used for de-linting:
89 # -Wunused-command-line-argument
90 # -Wunknown-warning-option
91 # -Wunused-but-set-variable
98 # -Wmisleading-indentation
106 # -Wmaybe-uninitialized
107 # -Wimplicit-function-declaration
112 # -Wformat-contains-nul
114 # -Waggressive-loop-optimizations
117 # -Wdiscarded-qualifiers
120 # -Wdiscarded-array-qualifiers
122 # -Wint-to-pointer-cast
123 # -Wpointer-to-int-cast
124 # -Wunused-const-variable
127 # -Wincompatible-pointer-types
129 # -Wlogical-not-parentheses
133 # -Wdeprecated-declarations
137 # -Wunused-local-typedefs
141 # -Wvolatile-register-var
142 # -Wsizeof-pointer-memaccess
144 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-command-line-argument])
145 CFLAGS=-Wunused-command-line-argument
146 AC_TRY_COMPILE(,, aros_unused_command_line_argument="yes", aros_unused_command_line_argument="no")
147 AC_MSG_RESULT($aros_unused_command_line_argument)
148 if test "x-$aros_unused_command_line_argument" = "x-yes" ; then
149 aros_cflags_unused_command_line_argument=-Wno-unused-command-line-argument
152 AC_MSG_CHECKING([whether ${CC} accepts -Wunknown-warning-option])
153 CFLAGS=-Wunknown-warning-option
154 AC_TRY_COMPILE(,, aros_unknown_warning_option="yes", aros_unknown_warning_option="no")
155 AC_MSG_RESULT($aros_unknown_warning_option)
156 if test "x-$aros_unknown_warning_option" = "x-yes" ; then
157 aros_cflags_unknown_warning_option=-Wno-unknown-warning-option
160 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-but-set-variable])
161 CFLAGS=-Wunused-but-set-variable
162 AC_TRY_COMPILE(,, aros_unused_but_set_variable="yes", aros_unused_but_set_variable="no")
163 AC_MSG_RESULT($aros_unused_but_set_variable)
164 if test "x-$aros_unused_but_set_variable" = "x-yes" ; then
165 aros_cflags_unused_but_set_variable=-Wno-unused-but-set-variable
168 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-aliasing])
169 CFLAGS=-Wstrict-aliasing
170 AC_TRY_COMPILE(,, aros_strict_aliasing="yes", aros_strict_aliasing="no")
171 AC_MSG_RESULT($aros_strict_aliasing)
172 if test "x-$aros_strict_aliasing" = "x-yes" ; then
173 aros_cflags_strict_aliasing=-Wno-strict-aliasing
176 AC_MSG_CHECKING([whether ${CC} accepts -Warray-bounds])
177 CFLAGS=-Warray-bounds
178 AC_TRY_COMPILE(,, aros_array_bounds="yes", aros_array_bounds="no")
179 AC_MSG_RESULT($aros_array_bounds)
180 if test "x-$aros_array_bounds" = "x-yes" ; then
181 aros_cflags_array_bounds=-Wno-array-bounds
184 AC_MSG_CHECKING([whether ${CC} accepts -Wenum-compare])
185 CFLAGS=-Wenum-compare
186 AC_TRY_COMPILE(,, aros_enum_compare="yes", aros_enum_compare="no")
187 AC_MSG_RESULT($aros_enum_compare)
188 if test "x-$aros_enum_compare" = "x-yes" ; then
189 aros_cflags_enum_compare=-Wno-enum-compare
192 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-prototypes])
193 CFLAGS=-Wstrict-prototypes
194 AC_TRY_COMPILE(,, aros_strict_prototypes="yes", aros_strict_prototypes="no")
195 AC_MSG_RESULT($aros_strict_prototypes)
196 if test "x-$aros_strict_prototypes" = "x-yes" ; then
197 aros_cflags_strict_prototypes=-Wno-strict-prototypes
200 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-overflow])
201 CFLAGS=-Wstrict-overflow
202 AC_TRY_COMPILE(,, aros_strict_overflow="yes", aros_strict_overflow="no")
203 AC_MSG_RESULT($aros_strict_overflow)
204 if test "x-$aros_strict_overflow" = "x-yes" ; then
205 aros_cflags_strict_overflow=-Wno-strict-overflow
208 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-security])
209 CFLAGS=-Wformat-security
210 AC_TRY_COMPILE(,, aros_format_security="yes", aros_format_security="no")
211 AC_MSG_RESULT($aros_format_security)
212 if test "x-$aros_format_security" = "x-yes" ; then
213 aros_cflags_format_security=-Wno-format-security
216 AC_MSG_CHECKING([whether ${CC} accepts -Wmisleading-indentation])
217 CFLAGS=-Wmisleading-indentation
218 AC_TRY_COMPILE(,, aros_misleading_indentation="yes", aros_misleading_indentation="no")
219 AC_MSG_RESULT($aros_misleading_indentation)
220 if test "x-$aros_misleading_indentation" = "x-yes" ; then
221 aros_cflags_misleading_indentation=-Wno-misleading-indentation
224 AC_MSG_CHECKING([whether ${CC} accepts -Wnonnull-compare])
225 CFLAGS=-Wnonnull-compare
226 AC_TRY_COMPILE(,, aros_nonnull_compare="yes", aros_nonnull_compare="no")
227 AC_MSG_RESULT($aros_nonnull_compare)
228 if test "x-$aros_nonnull_compare" = "x-yes" ; then
229 aros_cflags_nonnull_compare=-Wno-nonnull-compare
232 AC_MSG_CHECKING([whether ${CC} accepts -Wunused])
234 AC_TRY_COMPILE(,, aros_unused="yes", aros_unused="no")
235 AC_MSG_RESULT($aros_unused)
236 if test "x-$aros_unused" = "x-yes" ; then
237 aros_cflags_unused=-Wno-unused
240 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-value])
241 CFLAGS=-Wunused-value
242 AC_TRY_COMPILE(,, aros_unused_value="yes", aros_unused_value="no")
243 AC_MSG_RESULT($aros_unused_value)
244 if test "x-$aros_unused_value" = "x-yes" ; then
245 aros_cflags_unused_value=-Wno-unused-value
248 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-variable])
249 CFLAGS=-Wunused-variable
250 AC_TRY_COMPILE(,, aros_unused_variable="yes", aros_unused_variable="no")
251 AC_MSG_RESULT($aros_unused_variable)
252 if test "x-$aros_unused_variable" = "x-yes" ; then
253 aros_cflags_unused_variable=-Wno-unused-variable
256 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-function])
257 CFLAGS=-Wunused-function
258 AC_TRY_COMPILE(,, aros_unused_function="yes", aros_unused_function="no")
259 AC_MSG_RESULT($aros_unused_function)
260 if test "x-$aros_unused_function" = "x-yes" ; then
261 aros_cflags_unused_function=-Wno-unused-function
264 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-parameter])
265 CFLAGS=-Wunused-parameter
266 AC_TRY_COMPILE(,, aros_unused_parameter="yes", aros_unused_parameter="no")
267 AC_MSG_RESULT($aros_unused_parameter)
268 if test "x-$aros_unused_parameter" = "x-yes" ; then
269 aros_cflags_unused_parameter=-Wno-unused-parameter
272 AC_MSG_CHECKING([whether ${CC} accepts -Wuninitialized])
273 CFLAGS=-Wuninitialized
274 AC_TRY_COMPILE(,, aros_uninitialized="yes", aros_uninitialized="no")
275 AC_MSG_RESULT($aros_uninitialized)
276 if test "x-$aros_uninitialized" = "x-yes" ; then
277 aros_cflags_uninitialized=-Wno-uninitialized
280 AC_MSG_CHECKING([whether ${CC} accepts -Wmaybe-uninitialized])
281 CFLAGS=-Wmaybe-uninitialized
282 AC_TRY_COMPILE(,, aros_maybe_uninitialized="yes", aros_maybe_uninitialized="no")
283 AC_MSG_RESULT($aros_maybe_uninitialized)
284 if test "x-$aros_maybe_uninitialized" = "x-yes" ; then
285 aros_cflags_maybe_uninitialized=-Wno-maybe-uninitialized
287 aros_cflags_maybe_uninitialized=$aros_cflags_uninitialized
290 AC_MSG_CHECKING([whether ${CC} accepts -Wimplicit-function-declaration])
291 CFLAGS=-Wimplicit-function-declaration
292 AC_TRY_COMPILE(,, aros_implicit_function_declaration="yes", aros_implicit_function_declaration="no")
293 AC_MSG_RESULT($aros_implicit_function_declaration)
294 if test "x-$aros_implicit_function_declaration" = "x-yes" ; then
295 aros_cflags_implicit_function_declaration=-Wno-implicit-function-declaration
298 AC_MSG_CHECKING([whether ${CC} accepts -Wformat])
300 AC_TRY_COMPILE(,, aros_format="yes", aros_format="no")
301 AC_MSG_RESULT($aros_format)
302 if test "x-$aros_format" = "x-yes" ; then
303 aros_cflags_format=-Wno-format
306 AC_MSG_CHECKING([whether ${CC} accepts -Wparentheses])
308 AC_TRY_COMPILE(,, aros_parentheses="yes", aros_parentheses="no")
309 AC_MSG_RESULT($aros_parentheses)
310 if test "x-$aros_parentheses" = "x-yes" ; then
311 aros_cflags_parentheses=-Wno-parentheses
314 AC_MSG_CHECKING([whether ${CC} accepts -Wchar-subscripts])
315 CFLAGS=-Wchar-subscripts
316 AC_TRY_COMPILE(,, aros_char_subscripts="yes", aros_char_subscripts="no")
317 AC_MSG_RESULT($aros_char_subscripts)
318 if test "x-$aros_char_subscripts" = "x-yes" ; then
319 aros_cflags_char_subscripts=-Wno-char-subscripts
322 AC_MSG_CHECKING([whether ${CC} accepts -Wendif-labels])
323 CFLAGS=-Wendif-labels
324 AC_TRY_COMPILE(,, aros_endif_labels="yes", aros_endif_labels="no")
325 AC_MSG_RESULT($aros_endif_labels)
326 if test "x-$aros_endif_labels" = "x-yes" ; then
327 aros_cflags_endif_labels=-Wno-endif-labels
330 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-contains-nul])
331 CFLAGS=-Wformat-contains-nul
332 AC_TRY_COMPILE(,, aros_format_contains_nul="yes", aros_format_contains_nul="no")
333 AC_MSG_RESULT($aros_format_contains_nul)
334 if test "x-$aros_format_contains_nul" = "x-yes" ; then
335 aros_cflags_format_contains_nul=-Wno-format-contains-nul
338 AC_MSG_CHECKING([whether ${CC} accepts -Wimplicit-int])
339 CFLAGS=-Wimplicit-int
340 AC_TRY_COMPILE(,, aros_implicit_int="yes", aros_implicit_int="no")
341 AC_MSG_RESULT($aros_implicit_int)
342 if test "x-$aros_implicit_int" = "x-yes" ; then
343 aros_cflags_implicit_int=-Wno-implicit-int
346 AC_MSG_CHECKING([whether ${CC} accepts -Waggressive-loop-optimizations])
347 CFLAGS=-Waggressive-loop-optimizations
348 AC_TRY_COMPILE(,, aros_aggressive_loop_optimizations="yes", aros_aggressive_loop_optimizations="no")
349 AC_MSG_RESULT($aros_aggressive_loop_optimizations)
350 if test "x-$aros_aggressive_loop_optimizations" = "x-yes" ; then
351 aros_cflags_aggressive_loop_optimizations=-Wno-aggressive-loop-optimizations
354 AC_MSG_CHECKING([whether ${CC} accepts -Wcpp])
356 AC_TRY_COMPILE(,, aros_cpp="yes", aros_cpp="no")
357 AC_MSG_RESULT($aros_cpp)
358 if test "x-$aros_cpp" = "x-yes" ; then
359 aros_cflags_cpp=-Wno-cpp
362 AC_MSG_CHECKING([whether ${CC} accepts -Wswitch])
364 AC_TRY_COMPILE(,, aros_switch="yes", aros_switch="no")
365 AC_MSG_RESULT($aros_switch)
366 if test "x-$aros_switch" = "x-yes" ; then
367 aros_cflags_switch=-Wno-switch
370 AC_MSG_CHECKING([whether ${CC} accepts -Wdiscarded-qualifiers])
371 CFLAGS=-Wdiscarded-qualifiers
372 AC_TRY_COMPILE(,, aros_discarded_qualifiers="yes", aros_discarded_qualifiers="no")
373 AC_MSG_RESULT($aros_discarded_qualifiers)
374 if test "x-$aros_discarded_qualifiers" = "x-yes" ; then
375 aros_cflags_discarded_qualifiers=-Wno-discarded-qualifiers
378 AC_MSG_CHECKING([whether ${CC} accepts -Wsequence-point])
379 CFLAGS=-Wsequence-point
380 AC_TRY_COMPILE(,, aros_sequence_point="yes", aros_sequence_point="no")
381 AC_MSG_RESULT($aros_sequence_point)
382 if test "x-$aros_sequence_point" = "x-yes" ; then
383 aros_cflags_sequence_point=-Wno-sequence-point
386 AC_MSG_CHECKING([whether ${CC} accepts -Wunknown-pragmas])
387 CFLAGS=-Wunknown-pragmas
388 AC_TRY_COMPILE(,, aros_unknown_pragmas="yes", aros_unknown_pragmas="no")
389 AC_MSG_RESULT($aros_unknown_pragmas)
390 if test "x-$aros_unknown_pragmas" = "x-yes" ; then
391 aros_cflags_unknown_pragmas=-Wno-unknown-pragmas
394 AC_MSG_CHECKING([whether ${CC} accepts -Wdiscarded-array-qualifiers])
395 CFLAGS=-Wdiscarded-array-qualifiers
396 AC_TRY_COMPILE(,, aros_discarded_array_qualifiers="yes", aros_discarded_array_qualifiers="no")
397 AC_MSG_RESULT($aros_discarded_array_qualifiers)
398 if test "x-$aros_discarded_array_qualifiers" = "x-yes" ; then
399 aros_cflags_discarded_array_qualifiers=-Wno-discarded-array-qualifiers
402 AC_MSG_CHECKING([whether ${CC} accepts -Wint-conversion])
403 CFLAGS=-Wint-conversion
404 AC_TRY_COMPILE(,, aros_int_conversion="yes", aros_int_conversion="no")
405 AC_MSG_RESULT($aros_int_conversion)
406 if test "x-$aros_int_conversion" = "x-yes" ; then
407 aros_cflags_int_conversion=-Wno-int-conversion
410 AC_MSG_CHECKING([whether ${CC} accepts -Wint-to-pointer-cast])
411 CFLAGS=-Wint-to-pointer-cast
412 AC_TRY_COMPILE(,, aros_int_to_pointer_cast="yes", aros_int_to_pointer_cast="no")
413 AC_MSG_RESULT($aros_int_to_pointer_cast)
414 if test "x-$aros_int_to_pointer_cast" = "x-yes" ; then
415 aros_cflags_int_to_pointer_cast=-Wno-int-to-pointer-cast
418 AC_MSG_CHECKING([whether ${CC} accepts -Wpointer-to-int-cast])
419 CFLAGS=-Wpointer-to-int-cast
420 AC_TRY_COMPILE(,, aros_pointer_to_int_cast="yes", aros_pointer_to_int_cast="no")
421 AC_MSG_RESULT($aros_pointer_to_int_cast)
422 if test "x-$aros_pointer_to_int_cast" = "x-yes" ; then
423 aros_cflags_pointer_to_int_cast=-Wno-pointer-to-int-cast
426 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-const-variable])
427 CFLAGS=-Wunused-const-variable
428 AC_TRY_COMPILE(,, aros_unused_const_variable="yes", aros_unused_const_variable="no")
429 AC_MSG_RESULT($aros_unused_const_variable)
430 if test "x-$aros_unused_const_variable" = "x-yes" ; then
431 aros_cflags_unused_const_variable=-Wno-unused-const-variable
434 AC_MSG_CHECKING([whether ${CC} accepts -Wwrite-strings])
435 CFLAGS=-Wwrite-strings
436 AC_TRY_COMPILE(,, aros_write_strings="yes", aros_write_strings="no")
437 AC_MSG_RESULT($aros_write_strings)
438 if test "x-$aros_write_strings" = "x-yes" ; then
439 aros_cflags_write_strings=-Wno-write-strings
442 AC_MSG_CHECKING([whether ${CC} accepts -Wcomment])
444 AC_TRY_COMPILE(,, aros_comment="yes", aros_comment="no")
445 AC_MSG_RESULT($aros_comment)
446 if test "x-$aros_comment" = "x-yes" ; then
447 aros_cflags_comment=-Wno-comment
450 AC_MSG_CHECKING([whether ${CC} accepts -Wincompatible-pointer-types])
451 CFLAGS=-Wincompatible-pointer-types
452 AC_TRY_COMPILE(,, aros_incompatible_pointer_types="yes", aros_incompatible_pointer_types="no")
453 AC_MSG_RESULT($aros_incompatible_pointer_types)
454 if test "x-$aros_incompatible_pointer_types" = "x-yes" ; then
455 aros_cflags_incompatible_pointer_types=-Wno-incompatible-pointer-types
458 AC_MSG_CHECKING([whether ${CC} accepts -Wbool-compare])
459 CFLAGS=-Wbool-compare
460 AC_TRY_COMPILE(,, aros_bool_compare="yes", aros_bool_compare="no")
461 AC_MSG_RESULT($aros_bool_compare)
462 if test "x-$aros_bool_compare" = "x-yes" ; then
463 aros_cflags_bool_compare=-Wno-bool-compare
466 AC_MSG_CHECKING([whether ${CC} accepts -Wlogical-not-parentheses])
467 CFLAGS=-Wlogical-not-parentheses
468 AC_TRY_COMPILE(,, aros_logical_not_parentheses="yes", aros_logical_not_parentheses="no")
469 AC_MSG_RESULT($aros_logical_not_parentheses)
470 if test "x-$aros_logical_not_parentheses" = "x-yes" ; then
471 aros_cflags_logical_not_parentheses=-Wno-logical-not-parentheses
474 AC_MSG_CHECKING([whether ${CC} accepts -Wpointer-sign])
475 CFLAGS=-Wpointer-sign
476 AC_TRY_COMPILE(,, aros_pointer_sign="yes", aros_pointer_sign="no")
477 AC_MSG_RESULT($aros_pointer_sign)
478 if test "x-$aros_pointer_sign" = "x-yes" ; then
479 aros_cflags_pointer_sign=-Wno-pointer-sign
482 AC_MSG_CHECKING([whether ${CC} accepts -Wshift-overflow])
483 CFLAGS=-Wshift-overflow
484 AC_TRY_COMPILE(,, aros_shift_overflow="yes", aros_shift_overflow="no")
485 AC_MSG_RESULT($aros_shift_overflow)
486 if test "x-$aros_shift_overflow" = "x-yes" ; then
487 aros_cflags_shift_overflow=-Wno-shift-overflow
490 AC_MSG_CHECKING([whether ${CC} accepts -Wframe-address])
491 CFLAGS=-Wframe-address
492 AC_TRY_COMPILE(,, aros_frame_address="yes", aros_frame_address="no")
493 AC_MSG_RESULT($aros_frame_address)
494 if test "x-$aros_frame_address" = "x-yes" ; then
495 aros_cflags_frame_address=-Wno-frame-address
498 AC_MSG_CHECKING([whether ${CC} accepts -Wdeprecated-declarations])
499 CFLAGS=-Wdeprecated-declarations
500 AC_TRY_COMPILE(,, aros_deprecated_declarations="yes", aros_deprecated_declarations="no")
501 AC_MSG_RESULT($aros_deprecated_declarations)
502 if test "x-$aros_deprecated_declarations" = "x-yes" ; then
503 aros_cflags_deprecated_declarations=-Wno-deprecated-declarations
506 AC_MSG_CHECKING([whether ${CC} accepts -Wsign-compare])
507 CFLAGS=-Wsign-compare
508 AC_TRY_COMPILE(,, aros_sign_compare="yes", aros_sign_compare="no")
509 AC_MSG_RESULT($aros_sign_compare)
510 if test "x-$aros_sign_compare" = "x-yes" ; then
511 aros_cflags_sign_compare=-Wno-sign-compare
514 AC_MSG_CHECKING([whether ${CC} accepts -Wattributes])
516 AC_TRY_COMPILE(,, aros_attributes="yes", aros_attributes="no")
517 AC_MSG_RESULT($aros_attributes)
518 if test "x-$aros_attributes" = "x-yes" ; then
519 aros_cflags_attributes=-Wno-attributes
522 AC_MSG_CHECKING([whether ${CC} accepts -Woverflow])
524 AC_TRY_COMPILE(,, aros_overflow="yes", aros_overflow="no")
525 AC_MSG_RESULT($aros_overflow)
526 if test "x-$aros_overflow" = "x-yes" ; then
527 aros_cflags_overflow=-Wno-overflow
530 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-local-typedefs])
531 CFLAGS=-Wunused-local-typedefs
532 AC_TRY_COMPILE(,, aros_unused_local_typedefs="yes", aros_unused_local_typedefs="no")
533 AC_MSG_RESULT($aros_unused_local_typedefs)
534 if test "x-$aros_unused_local_typedefs" = "x-yes" ; then
535 aros_cflags_unused_local_typedefs=-Wno-unused-local-typedefs
538 AC_MSG_CHECKING([whether ${CC} accepts -Wmissing-braces])
539 CFLAGS=-Wmissing-braces
540 AC_TRY_COMPILE(,, aros_missing_braces="yes", aros_missing_braces="no")
541 AC_MSG_RESULT($aros_missing_braces)
542 if test "x-$aros_missing_braces" = "x-yes" ; then
543 aros_cflags_missing_braces=-Wno-missing-braces
546 AC_MSG_CHECKING([whether ${CC} accepts -Wconversion-null])
547 CFLAGS=-Wconversion-null
548 AC_TRY_COMPILE(,, aros_conversion_null="yes", aros_conversion_null="no")
549 AC_MSG_RESULT($aros_conversion_null)
550 if test "x-$aros_conversion_null" = "x-yes" ; then
551 aros_cflags_conversion_null=-Wno-conversion-null
554 AC_MSG_CHECKING([whether ${CC} accepts -Wnarrowing])
556 AC_TRY_COMPILE(,, aros_narrowing="yes", aros_narrowing="no")
557 AC_MSG_RESULT($aros_narrowing)
558 if test "x-$aros_narrowing" = "x-yes" ; then
559 aros_cflags_narrowing=-Wno-narrowing
562 AC_MSG_CHECKING([whether ${CC} accepts -Wvolatile-register-var])
563 CFLAGS=-Wvolatile-register-var
564 AC_TRY_COMPILE(,, aros_volatile_register_var="yes", aros_volatile_register_var="no")
565 AC_MSG_RESULT($aros_volatile_register_var)
566 if test "x-$aros_volatile_register_var" = "x-yes" ; then
567 aros_cflags_volatile_register_var=-Wno-volatile-register-var
570 AC_MSG_CHECKING([whether ${CC} accepts -Wsizeof-pointer-memaccess])
571 CFLAGS=-Wsizeof-pointer-memaccess
572 AC_TRY_COMPILE(,, aros_sizeof_pointer_memaccess="yes", aros_sizeof_pointer_memaccess="no")
573 AC_MSG_RESULT($aros_sizeof_pointer_memaccess)
574 if test "x-$aros_sizeof_pointer_memaccess" = "x-yes" ; then
575 aros_cflags_sizeof_pointer_memaccess=-Wno-sizeof-pointer-memaccess
578 AC_SUBST(aros_cflags_lto)
579 AC_SUBST(aros_cflags_loop_block)
580 AC_SUBST(aros_cflags_loop_interchange)
581 AC_SUBST(aros_cflags_loop_strip_mine)
583 AC_SUBST(aros_cflags_iquote)
584 AC_SUBST(aros_cflags_iquote_end)
586 AC_SUBST(aros_cflags_unused_command_line_argument)
587 AC_SUBST(aros_cflags_unknown_warning_option)
588 AC_SUBST(aros_cflags_unused_but_set_variable)
589 AC_SUBST(aros_cflags_strict_aliasing)
590 AC_SUBST(aros_cflags_array_bounds)
591 AC_SUBST(aros_cflags_enum_compare)
592 AC_SUBST(aros_cflags_strict_prototypes)
593 AC_SUBST(aros_cflags_strict_overflow)
594 AC_SUBST(aros_cflags_format_security)
595 AC_SUBST(aros_cflags_misleading_indentation)
596 AC_SUBST(aros_cflags_nonnull_compare)
597 AC_SUBST(aros_cflags_unused)
598 AC_SUBST(aros_cflags_unused_value)
599 AC_SUBST(aros_cflags_unused_variable)
600 AC_SUBST(aros_cflags_unused_function)
601 AC_SUBST(aros_cflags_unused_parameter)
602 AC_SUBST(aros_cflags_uninitialized)
603 AC_SUBST(aros_cflags_maybe_uninitialized)
604 AC_SUBST(aros_cflags_implicit_function_declaration)
605 AC_SUBST(aros_cflags_format)
606 AC_SUBST(aros_cflags_parentheses)
607 AC_SUBST(aros_cflags_char_subscripts)
608 AC_SUBST(aros_cflags_endif_labels)
609 AC_SUBST(aros_cflags_format_contains_nul)
610 AC_SUBST(aros_cflags_implicit_int)
611 AC_SUBST(aros_cflags_aggressive_loop_optimizations)
612 AC_SUBST(aros_cflags_cpp)
613 AC_SUBST(aros_cflags_switch)
614 AC_SUBST(aros_cflags_discarded_qualifiers)
615 AC_SUBST(aros_cflags_sequence_point)
616 AC_SUBST(aros_cflags_unknown_pragmas)
617 AC_SUBST(aros_cflags_discarded_array_qualifiers)
618 AC_SUBST(aros_cflags_int_conversion)
619 AC_SUBST(aros_cflags_int_to_pointer_cast)
620 AC_SUBST(aros_cflags_pointer_to_int_cast)
621 AC_SUBST(aros_cflags_unused_const_variable)
622 AC_SUBST(aros_cflags_write_strings)
623 AC_SUBST(aros_cflags_comment)
624 AC_SUBST(aros_cflags_incompatible_pointer_types)
625 AC_SUBST(aros_cflags_bool_compare)
626 AC_SUBST(aros_cflags_logical_not_parentheses)
627 AC_SUBST(aros_cflags_pointer_sign)
628 AC_SUBST(aros_cflags_shift_overflow)
629 AC_SUBST(aros_cflags_frame_address)
630 AC_SUBST(aros_cflags_deprecated_declarations)
631 AC_SUBST(aros_cflags_sign_compare)
632 AC_SUBST(aros_cflags_attributes)
633 AC_SUBST(aros_cflags_overflow)
634 AC_SUBST(aros_cflags_unused_local_typedefs)
635 AC_SUBST(aros_cflags_missing_braces)
636 AC_SUBST(aros_cflags_conversion_null)
637 AC_SUBST(aros_cflags_narrowing)
638 AC_SUBST(aros_cflags_volatile_register_var)
639 AC_SUBST(aros_cflags_sizeof_pointer_memaccess)
642 ${aros_targetcfg_dir}/compiler.cfg:compiler.cfg.in