make.tmpl: add missing compiler attribute to build_progs
[AROS.git] / features.in
blobb08cdd85fefd49ad3276ccbc0cba70a22a12f091
1 dnl Copyright © 1997-2016, The AROS Development Team. All rights reserved.
2 dnl $Id$
3 dnl
4 dnl Desc: Autoconf source for target compiler feature detection
5 dnl Lang: english 
7 # Note: After file changes, generate features anew and commit _both_ files.
8 -------------------------
10 AC_INIT(mmakefile)
11 AC_PREREQ(2.61)
12 AC_CONFIG_AUX_DIR(scripts/autoconf)
14 AROS_BUILDDIR=`${PWDCMD-pwd}`
15 AROS_BUILDDIR_UNIX=${PWD}
17 srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
18 SRCDIR=${srcpwd}
20 NOLINKFLAGS="-nostdlib -nostartfiles"
21  LDFLAGS=$NOLINKFLAGS
22 # The first step is to find the binaries.
23 AC_PROG_CC
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!])
29 else
30     aros_targetcfg_dir="$targetcfg_dir"
32 AC_MSG_RESULT($aros_targetcfg_dir)
34 #-----------------------------------------------------------------------------
36 # Check if the target compiler supports some features:
37 #  -flto
38 #  -floop-block
39 #  -floop-interchange
40 #  -floop-strip-mine
42 AC_MSG_CHECKING([whether ${CC} accepts -flto])
43 CFLAGS=-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
47     aros_cflags_lto=-flto
50 AC_MSG_CHECKING([whether ${CC} accepts -floop-block])
51 CFLAGS=-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])
75 CFLAGS="-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=
81 else
82     aros_cflags_iquote=-I
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
92 #  -Wstrict-aliasing
93 #  -Warray-bounds
94 #  -Wenum-compare
95 #  -Wstrict-prototypes
96 #  -Wstrict-overflow
97 #  -Wformat-security
98 #  -Wmisleading-indentation
99 #  -Wnonnull-compare
100 #  -Wunused
101 #  -Wunused-value
102 #  -Wunused-variable
103 #  -Wunused-function
104 #  -Wunused-parameter
105 #  -Wuninitialized
106 #  -Wmaybe-uninitialized
107 #  -Wimplicit-function-declaration
108 #  -Wformat
109 #  -Wparentheses
110 #  -Wchar-subscripts
111 #  -Wendif-labels
112 #  -Wformat-contains-nul
113 #  -Wimplicit-int
114 #  -Waggressive-loop-optimizations
115 #  -Wcpp
116 #  -Wswitch
117 #  -Wdiscarded-qualifiers
118 #  -Wsequence-point
119 #  -Wunknown-pragmas
120 #  -Wdiscarded-array-qualifiers
121 #  -Wint-conversion
122 #  -Wint-to-pointer-cast
123 #  -Wpointer-to-int-cast
124 #  -Wunused-const-variable
125 #  -Wwrite-strings 
126 #  -Wcomment
127 #  -Wincompatible-pointer-types
128 #  -Wbool-compare
129 #  -Wlogical-not-parentheses
130 #  -Wpointer-sign
131 #  -Wshift-overflow
132 #  -Wframe-address
133 #  -Wdeprecated-declarations
134 #  -Wsign-compare
135 #  -Wattributes
136 #  -Woverflow
137 #  -Wunused-local-typedefs
138 #  -Wmissing-braces
139 #  -Wconversion-null
140 #  -Wnarrowing
141 #  -Wvolatile-register-var
143 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-command-line-argument])
144 CFLAGS=-Wunused-command-line-argument
145 AC_TRY_COMPILE(,, aros_unused_command_line_argument="yes", aros_unused_command_line_argument="no")
146 AC_MSG_RESULT($aros_unused_command_line_argument)
147 if test "x-$aros_unused_command_line_argument" = "x-yes" ; then
148     aros_cflags_unused_command_line_argument=-Wno-unused-command-line-argument
151 AC_MSG_CHECKING([whether ${CC} accepts -Wunknown-warning-option])
152 CFLAGS=-Wunknown-warning-option
153 AC_TRY_COMPILE(,, aros_unknown_warning_option="yes", aros_unknown_warning_option="no")
154 AC_MSG_RESULT($aros_unknown_warning_option)
155 if test "x-$aros_unknown_warning_option" = "x-yes" ; then
156     aros_cflags_unknown_warning_option=-Wno-unknown-warning-option
159 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-but-set-variable])
160 CFLAGS=-Wunused-but-set-variable
161 AC_TRY_COMPILE(,, aros_unused_but_set_variable="yes", aros_unused_but_set_variable="no")
162 AC_MSG_RESULT($aros_unused_but_set_variable)
163 if test "x-$aros_unused_but_set_variable" = "x-yes" ; then
164     aros_cflags_unused_but_set_variable=-Wno-unused-but-set-variable
167 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-aliasing])
168 CFLAGS=-Wstrict-aliasing
169 AC_TRY_COMPILE(,, aros_strict_aliasing="yes", aros_strict_aliasing="no")
170 AC_MSG_RESULT($aros_strict_aliasing)
171 if test "x-$aros_strict_aliasing" = "x-yes" ; then
172     aros_cflags_strict_aliasing=-Wno-strict-aliasing
175 AC_MSG_CHECKING([whether ${CC} accepts -Warray-bounds])
176 CFLAGS=-Warray-bounds
177 AC_TRY_COMPILE(,, aros_array_bounds="yes", aros_array_bounds="no")
178 AC_MSG_RESULT($aros_array_bounds)
179 if test "x-$aros_array_bounds" = "x-yes" ; then
180     aros_cflags_array_bounds=-Wno-array-bounds
183 AC_MSG_CHECKING([whether ${CC} accepts -Wenum-compare])
184 CFLAGS=-Wenum-compare
185 AC_TRY_COMPILE(,, aros_enum_compare="yes", aros_enum_compare="no")
186 AC_MSG_RESULT($aros_enum_compare)
187 if test "x-$aros_enum_compare" = "x-yes" ; then
188     aros_cflags_enum_compare=-Wno-enum-compare
191 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-prototypes])
192 CFLAGS=-Wstrict-prototypes
193 AC_TRY_COMPILE(,, aros_strict_prototypes="yes", aros_strict_prototypes="no")
194 AC_MSG_RESULT($aros_strict_prototypes)
195 if test "x-$aros_strict_prototypes" = "x-yes" ; then
196     aros_cflags_strict_prototypes=-Wno-strict-prototypes
199 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-overflow])
200 CFLAGS=-Wstrict-overflow
201 AC_TRY_COMPILE(,, aros_strict_overflow="yes", aros_strict_overflow="no")
202 AC_MSG_RESULT($aros_strict_overflow)
203 if test "x-$aros_strict_overflow" = "x-yes" ; then
204     aros_cflags_strict_overflow=-Wno-strict-overflow
207 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-security])
208 CFLAGS=-Wformat-security
209 AC_TRY_COMPILE(,, aros_format_security="yes", aros_format_security="no")
210 AC_MSG_RESULT($aros_format_security)
211 if test "x-$aros_format_security" = "x-yes" ; then
212     aros_cflags_format_security=-Wno-format-security
215 AC_MSG_CHECKING([whether ${CC} accepts -Wmisleading-indentation])
216 CFLAGS=-Wmisleading-indentation
217 AC_TRY_COMPILE(,, aros_misleading_indentation="yes", aros_misleading_indentation="no")
218 AC_MSG_RESULT($aros_misleading_indentation)
219 if test "x-$aros_misleading_indentation" = "x-yes" ; then
220     aros_cflags_misleading_indentation=-Wno-misleading-indentation
223 AC_MSG_CHECKING([whether ${CC} accepts -Wnonnull-compare])
224 CFLAGS=-Wnonnull-compare
225 AC_TRY_COMPILE(,, aros_nonnull_compare="yes", aros_nonnull_compare="no")
226 AC_MSG_RESULT($aros_nonnull_compare)
227 if test "x-$aros_nonnull_compare" = "x-yes" ; then
228     aros_cflags_nonnull_compare=-Wno-nonnull-compare
231 AC_MSG_CHECKING([whether ${CC} accepts -Wunused])
232 CFLAGS=-Wunused
233 AC_TRY_COMPILE(,, aros_unused="yes", aros_unused="no")
234 AC_MSG_RESULT($aros_unused)
235 if test "x-$aros_unused" = "x-yes" ; then
236     aros_cflags_unused=-Wno-unused
239 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-value])
240 CFLAGS=-Wunused-value
241 AC_TRY_COMPILE(,, aros_unused_value="yes", aros_unused_value="no")
242 AC_MSG_RESULT($aros_unused_value)
243 if test "x-$aros_unused_value" = "x-yes" ; then
244     aros_cflags_unused_value=-Wno-unused-value
247 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-variable])
248 CFLAGS=-Wunused-variable
249 AC_TRY_COMPILE(,, aros_unused_variable="yes", aros_unused_variable="no")
250 AC_MSG_RESULT($aros_unused_variable)
251 if test "x-$aros_unused_variable" = "x-yes" ; then
252     aros_cflags_unused_variable=-Wno-unused-variable
255 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-function])
256 CFLAGS=-Wunused-function
257 AC_TRY_COMPILE(,, aros_unused_function="yes", aros_unused_function="no")
258 AC_MSG_RESULT($aros_unused_function)
259 if test "x-$aros_unused_function" = "x-yes" ; then
260     aros_cflags_unused_function=-Wno-unused-function
263 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-parameter])
264 CFLAGS=-Wunused-parameter
265 AC_TRY_COMPILE(,, aros_unused_parameter="yes", aros_unused_parameter="no")
266 AC_MSG_RESULT($aros_unused_parameter)
267 if test "x-$aros_unused_parameter" = "x-yes" ; then
268     aros_cflags_unused_parameter=-Wno-unused-parameter
271 AC_MSG_CHECKING([whether ${CC} accepts -Wuninitialized])
272 CFLAGS=-Wuninitialized
273 AC_TRY_COMPILE(,, aros_uninitialized="yes", aros_uninitialized="no")
274 AC_MSG_RESULT($aros_uninitialized)
275 if test "x-$aros_uninitialized" = "x-yes" ; then
276     aros_cflags_uninitialized=-Wno-uninitialized
279 AC_MSG_CHECKING([whether ${CC} accepts -Wmaybe-uninitialized])
280 CFLAGS=-Wmaybe-uninitialized
281 AC_TRY_COMPILE(,, aros_maybe_uninitialized="yes", aros_maybe_uninitialized="no")
282 AC_MSG_RESULT($aros_maybe_uninitialized)
283 if test "x-$aros_maybe_uninitialized" = "x-yes" ; then
284     aros_cflags_maybe_uninitialized=-Wno-maybe-uninitialized
285 else
286     aros_cflags_maybe_uninitialized=$aros_cflags_uninitialized
289 AC_MSG_CHECKING([whether ${CC} accepts -Wimplicit-function-declaration])
290 CFLAGS=-Wimplicit-function-declaration
291 AC_TRY_COMPILE(,, aros_implicit_function_declaration="yes", aros_implicit_function_declaration="no")
292 AC_MSG_RESULT($aros_implicit_function_declaration)
293 if test "x-$aros_implicit_function_declaration" = "x-yes" ; then
294     aros_cflags_implicit_function_declaration=-Wno-implicit-function-declaration
297 AC_MSG_CHECKING([whether ${CC} accepts -Wformat])
298 CFLAGS=-Wformat
299 AC_TRY_COMPILE(,, aros_format="yes", aros_format="no")
300 AC_MSG_RESULT($aros_format)
301 if test "x-$aros_format" = "x-yes" ; then
302     aros_cflags_format=-Wno-format
305 AC_MSG_CHECKING([whether ${CC} accepts -Wparentheses])
306 CFLAGS=-Wparentheses
307 AC_TRY_COMPILE(,, aros_parentheses="yes", aros_parentheses="no")
308 AC_MSG_RESULT($aros_parentheses)
309 if test "x-$aros_parentheses" = "x-yes" ; then
310     aros_cflags_parentheses=-Wno-parentheses
313 AC_MSG_CHECKING([whether ${CC} accepts -Wchar-subscripts])
314 CFLAGS=-Wchar-subscripts
315 AC_TRY_COMPILE(,, aros_char_subscripts="yes", aros_char_subscripts="no")
316 AC_MSG_RESULT($aros_char_subscripts)
317 if test "x-$aros_char_subscripts" = "x-yes" ; then
318     aros_cflags_char_subscripts=-Wno-char-subscripts
321 AC_MSG_CHECKING([whether ${CC} accepts -Wendif-labels])
322 CFLAGS=-Wendif-labels
323 AC_TRY_COMPILE(,, aros_endif_labels="yes", aros_endif_labels="no")
324 AC_MSG_RESULT($aros_endif_labels)
325 if test "x-$aros_endif_labels" = "x-yes" ; then
326     aros_cflags_endif_labels=-Wno-endif-labels
329 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-contains-nul])
330 CFLAGS=-Wformat-contains-nul
331 AC_TRY_COMPILE(,, aros_format_contains_nul="yes", aros_format_contains_nul="no")
332 AC_MSG_RESULT($aros_format_contains_nul)
333 if test "x-$aros_format_contains_nul" = "x-yes" ; then
334     aros_cflags_format_contains_nul=-Wno-format-contains-nul
337 AC_MSG_CHECKING([whether ${CC} accepts -Wimplicit-int])
338 CFLAGS=-Wimplicit-int
339 AC_TRY_COMPILE(,, aros_implicit_int="yes", aros_implicit_int="no")
340 AC_MSG_RESULT($aros_implicit_int)
341 if test "x-$aros_implicit_int" = "x-yes" ; then
342     aros_cflags_implicit_int=-Wno-implicit-int
345 AC_MSG_CHECKING([whether ${CC} accepts -Waggressive-loop-optimizations])
346 CFLAGS=-Waggressive-loop-optimizations
347 AC_TRY_COMPILE(,, aros_aggressive_loop_optimizations="yes", aros_aggressive_loop_optimizations="no")
348 AC_MSG_RESULT($aros_aggressive_loop_optimizations)
349 if test "x-$aros_aggressive_loop_optimizations" = "x-yes" ; then
350     aros_cflags_aggressive_loop_optimizations=-Wno-aggressive-loop-optimizations
353 AC_MSG_CHECKING([whether ${CC} accepts -Wcpp])
354 CFLAGS=-Wcpp
355 AC_TRY_COMPILE(,, aros_cpp="yes", aros_cpp="no")
356 AC_MSG_RESULT($aros_cpp)
357 if test "x-$aros_cpp" = "x-yes" ; then
358     aros_cflags_cpp=-Wno-cpp
361 AC_MSG_CHECKING([whether ${CC} accepts -Wswitch])
362 CFLAGS=-Wswitch
363 AC_TRY_COMPILE(,, aros_switch="yes", aros_switch="no")
364 AC_MSG_RESULT($aros_switch)
365 if test "x-$aros_switch" = "x-yes" ; then
366     aros_cflags_switch=-Wno-switch
369 AC_MSG_CHECKING([whether ${CC} accepts -Wdiscarded-qualifiers])
370 CFLAGS=-Wdiscarded-qualifiers
371 AC_TRY_COMPILE(,, aros_discarded_qualifiers="yes", aros_discarded_qualifiers="no")
372 AC_MSG_RESULT($aros_discarded_qualifiers)
373 if test "x-$aros_discarded_qualifiers" = "x-yes" ; then
374     aros_cflags_discarded_qualifiers=-Wno-discarded-qualifiers
377 AC_MSG_CHECKING([whether ${CC} accepts -Wsequence-point])
378 CFLAGS=-Wsequence-point
379 AC_TRY_COMPILE(,, aros_sequence_point="yes", aros_sequence_point="no")
380 AC_MSG_RESULT($aros_sequence_point)
381 if test "x-$aros_sequence_point" = "x-yes" ; then
382     aros_cflags_sequence_point=-Wno-sequence-point
385 AC_MSG_CHECKING([whether ${CC} accepts -Wunknown-pragmas])
386 CFLAGS=-Wunknown-pragmas
387 AC_TRY_COMPILE(,, aros_unknown_pragmas="yes", aros_unknown_pragmas="no")
388 AC_MSG_RESULT($aros_unknown_pragmas)
389 if test "x-$aros_unknown_pragmas" = "x-yes" ; then
390     aros_cflags_unknown_pragmas=-Wno-unknown-pragmas
393 AC_MSG_CHECKING([whether ${CC} accepts -Wdiscarded-array-qualifiers])
394 CFLAGS=-Wdiscarded-array-qualifiers
395 AC_TRY_COMPILE(,, aros_discarded_array_qualifiers="yes", aros_discarded_array_qualifiers="no")
396 AC_MSG_RESULT($aros_discarded_array_qualifiers)
397 if test "x-$aros_discarded_array_qualifiers" = "x-yes" ; then
398     aros_cflags_discarded_array_qualifiers=-Wno-discarded-array-qualifiers
401 AC_MSG_CHECKING([whether ${CC} accepts -Wint-conversion])
402 CFLAGS=-Wint-conversion
403 AC_TRY_COMPILE(,, aros_int_conversion="yes", aros_int_conversion="no")
404 AC_MSG_RESULT($aros_int_conversion)
405 if test "x-$aros_int_conversion" = "x-yes" ; then
406     aros_cflags_int_conversion=-Wno-int-conversion
409 AC_MSG_CHECKING([whether ${CC} accepts -Wint-to-pointer-cast])
410 CFLAGS=-Wint-to-pointer-cast
411 AC_TRY_COMPILE(,, aros_int_to_pointer_cast="yes", aros_int_to_pointer_cast="no")
412 AC_MSG_RESULT($aros_int_to_pointer_cast)
413 if test "x-$aros_int_to_pointer_cast" = "x-yes" ; then
414     aros_cflags_int_to_pointer_cast=-Wno-int-to-pointer-cast
417 AC_MSG_CHECKING([whether ${CC} accepts -Wpointer-to-int-cast])
418 CFLAGS=-Wpointer-to-int-cast
419 AC_TRY_COMPILE(,, aros_pointer_to_int_cast="yes", aros_pointer_to_int_cast="no")
420 AC_MSG_RESULT($aros_pointer_to_int_cast)
421 if test "x-$aros_pointer_to_int_cast" = "x-yes" ; then
422     aros_cflags_pointer_to_int_cast=-Wno-pointer-to-int-cast
425 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-const-variable])
426 CFLAGS=-Wunused-const-variable
427 AC_TRY_COMPILE(,, aros_unused_const_variable="yes", aros_unused_const_variable="no")
428 AC_MSG_RESULT($aros_unused_const_variable)
429 if test "x-$aros_unused_const_variable" = "x-yes" ; then
430     aros_cflags_unused_const_variable=-Wno-unused-const-variable
433 AC_MSG_CHECKING([whether ${CC} accepts -Wwrite-strings])
434 CFLAGS=-Wwrite-strings
435 AC_TRY_COMPILE(,, aros_write_strings="yes", aros_write_strings="no")
436 AC_MSG_RESULT($aros_write_strings)
437 if test "x-$aros_write_strings" = "x-yes" ; then
438     aros_cflags_write_strings=-Wno-write-strings
441 AC_MSG_CHECKING([whether ${CC} accepts -Wcomment])
442 CFLAGS=-Wcomment
443 AC_TRY_COMPILE(,, aros_comment="yes", aros_comment="no")
444 AC_MSG_RESULT($aros_comment)
445 if test "x-$aros_comment" = "x-yes" ; then
446     aros_cflags_comment=-Wno-comment
449 AC_MSG_CHECKING([whether ${CC} accepts -Wincompatible-pointer-types])
450 CFLAGS=-Wincompatible-pointer-types
451 AC_TRY_COMPILE(,, aros_incompatible_pointer_types="yes", aros_incompatible_pointer_types="no")
452 AC_MSG_RESULT($aros_incompatible_pointer_types)
453 if test "x-$aros_incompatible_pointer_types" = "x-yes" ; then
454     aros_cflags_incompatible_pointer_types=-Wno-incompatible-pointer-types
457 AC_MSG_CHECKING([whether ${CC} accepts -Wbool-compare])
458 CFLAGS=-Wbool-compare
459 AC_TRY_COMPILE(,, aros_bool_compare="yes", aros_bool_compare="no")
460 AC_MSG_RESULT($aros_bool_compare)
461 if test "x-$aros_bool_compare" = "x-yes" ; then
462     aros_cflags_bool_compare=-Wno-bool-compare
465 AC_MSG_CHECKING([whether ${CC} accepts -Wlogical-not-parentheses])
466 CFLAGS=-Wlogical-not-parentheses
467 AC_TRY_COMPILE(,, aros_logical_not_parentheses="yes", aros_logical_not_parentheses="no")
468 AC_MSG_RESULT($aros_logical_not_parentheses)
469 if test "x-$aros_logical_not_parentheses" = "x-yes" ; then
470     aros_cflags_logical_not_parentheses=-Wno-logical-not-parentheses
473 AC_MSG_CHECKING([whether ${CC} accepts -Wpointer-sign])
474 CFLAGS=-Wpointer-sign
475 AC_TRY_COMPILE(,, aros_pointer_sign="yes", aros_pointer_sign="no")
476 AC_MSG_RESULT($aros_pointer_sign)
477 if test "x-$aros_pointer_sign" = "x-yes" ; then
478     aros_cflags_pointer_sign=-Wno-pointer-sign
481 AC_MSG_CHECKING([whether ${CC} accepts -Wshift-overflow])
482 CFLAGS=-Wshift-overflow
483 AC_TRY_COMPILE(,, aros_shift_overflow="yes", aros_shift_overflow="no")
484 AC_MSG_RESULT($aros_shift_overflow)
485 if test "x-$aros_shift_overflow" = "x-yes" ; then
486     aros_cflags_shift_overflow=-Wno-shift-overflow
489 AC_MSG_CHECKING([whether ${CC} accepts -Wframe-address])
490 CFLAGS=-Wframe-address
491 AC_TRY_COMPILE(,, aros_frame_address="yes", aros_frame_address="no")
492 AC_MSG_RESULT($aros_frame_address)
493 if test "x-$aros_frame_address" = "x-yes" ; then
494     aros_cflags_frame_address=-Wno-frame-address
497 AC_MSG_CHECKING([whether ${CC} accepts -Wdeprecated-declarations])
498 CFLAGS=-Wdeprecated-declarations
499 AC_TRY_COMPILE(,, aros_deprecated_declarations="yes", aros_deprecated_declarations="no")
500 AC_MSG_RESULT($aros_deprecated_declarations)
501 if test "x-$aros_deprecated_declarations" = "x-yes" ; then
502     aros_cflags_deprecated_declarations=-Wno-deprecated-declarations
505 AC_MSG_CHECKING([whether ${CC} accepts -Wsign-compare])
506 CFLAGS=-Wsign-compare
507 AC_TRY_COMPILE(,, aros_sign_compare="yes", aros_sign_compare="no")
508 AC_MSG_RESULT($aros_sign_compare)
509 if test "x-$aros_sign_compare" = "x-yes" ; then
510     aros_cflags_sign_compare=-Wno-sign-compare
513 AC_MSG_CHECKING([whether ${CC} accepts -Wattributes])
514 CFLAGS=-Wattributes
515 AC_TRY_COMPILE(,, aros_attributes="yes", aros_attributes="no")
516 AC_MSG_RESULT($aros_attributes)
517 if test "x-$aros_attributes" = "x-yes" ; then
518     aros_cflags_attributes=-Wno-attributes
521 AC_MSG_CHECKING([whether ${CC} accepts -Woverflow])
522 CFLAGS=-Woverflow
523 AC_TRY_COMPILE(,, aros_overflow="yes", aros_overflow="no")
524 AC_MSG_RESULT($aros_overflow)
525 if test "x-$aros_overflow" = "x-yes" ; then
526     aros_cflags_overflow=-Wno-overflow
529 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-local-typedefs])
530 CFLAGS=-Wunused-local-typedefs
531 AC_TRY_COMPILE(,, aros_unused_local_typedefs="yes", aros_unused_local_typedefs="no")
532 AC_MSG_RESULT($aros_unused_local_typedefs)
533 if test "x-$aros_unused_local_typedefs" = "x-yes" ; then
534     aros_cflags_unused_local_typedefs=-Wno-unused-local-typedefs
537 AC_MSG_CHECKING([whether ${CC} accepts -Wmissing-braces])
538 CFLAGS=-Wmissing-braces
539 AC_TRY_COMPILE(,, aros_missing_braces="yes", aros_missing_braces="no")
540 AC_MSG_RESULT($aros_missing_braces)
541 if test "x-$aros_missing_braces" = "x-yes" ; then
542     aros_cflags_missing_braces=-Wno-missing-braces
545 AC_MSG_CHECKING([whether ${CC} accepts -Wconversion-null])
546 CFLAGS=-Wconversion-null
547 AC_TRY_COMPILE(,, aros_conversion_null="yes", aros_conversion_null="no")
548 AC_MSG_RESULT($aros_conversion_null)
549 if test "x-$aros_conversion_null" = "x-yes" ; then
550     aros_cflags_conversion_null=-Wno-conversion-null
553 AC_MSG_CHECKING([whether ${CC} accepts -Wnarrowing])
554 CFLAGS=-Wnarrowing
555 AC_TRY_COMPILE(,, aros_narrowing="yes", aros_narrowing="no")
556 AC_MSG_RESULT($aros_narrowing)
557 if test "x-$aros_narrowing" = "x-yes" ; then
558     aros_cflags_narrowing=-Wno-narrowing
561 AC_MSG_CHECKING([whether ${CC} accepts -Wvolatile-register-var])
562 CFLAGS=-Wvolatile-register-var
563 AC_TRY_COMPILE(,, aros_volatile_register_var="yes", aros_volatile_register_var="no")
564 AC_MSG_RESULT($aros_volatile_register_var)
565 if test "x-$aros_volatile_register_var" = "x-yes" ; then
566     aros_cflags_volatile_register_var=-Wno-volatile-register-var
569 AC_SUBST(aros_cflags_lto)
570 AC_SUBST(aros_cflags_loop_block)
571 AC_SUBST(aros_cflags_loop_interchange)
572 AC_SUBST(aros_cflags_loop_strip_mine)
574 AC_SUBST(aros_cflags_iquote)
575 AC_SUBST(aros_cflags_iquote_end)
577 AC_SUBST(aros_cflags_unused_command_line_argument)
578 AC_SUBST(aros_cflags_unknown_warning_option)
579 AC_SUBST(aros_cflags_unused_but_set_variable)
580 AC_SUBST(aros_cflags_strict_aliasing)
581 AC_SUBST(aros_cflags_array_bounds)
582 AC_SUBST(aros_cflags_enum_compare)
583 AC_SUBST(aros_cflags_strict_prototypes)
584 AC_SUBST(aros_cflags_strict_overflow)
585 AC_SUBST(aros_cflags_format_security)
586 AC_SUBST(aros_cflags_misleading_indentation)
587 AC_SUBST(aros_cflags_nonnull_compare)
588 AC_SUBST(aros_cflags_unused)
589 AC_SUBST(aros_cflags_unused_value)
590 AC_SUBST(aros_cflags_unused_variable)
591 AC_SUBST(aros_cflags_unused_function)
592 AC_SUBST(aros_cflags_unused_parameter)
593 AC_SUBST(aros_cflags_uninitialized)
594 AC_SUBST(aros_cflags_maybe_uninitialized)
595 AC_SUBST(aros_cflags_implicit_function_declaration)
596 AC_SUBST(aros_cflags_format)
597 AC_SUBST(aros_cflags_parentheses)
598 AC_SUBST(aros_cflags_char_subscripts)
599 AC_SUBST(aros_cflags_endif_labels)
600 AC_SUBST(aros_cflags_format_contains_nul)
601 AC_SUBST(aros_cflags_implicit_int)
602 AC_SUBST(aros_cflags_aggressive_loop_optimizations)
603 AC_SUBST(aros_cflags_cpp)
604 AC_SUBST(aros_cflags_switch)
605 AC_SUBST(aros_cflags_discarded_qualifiers)
606 AC_SUBST(aros_cflags_sequence_point)
607 AC_SUBST(aros_cflags_unknown_pragmas)
608 AC_SUBST(aros_cflags_discarded_array_qualifiers)
609 AC_SUBST(aros_cflags_int_conversion)
610 AC_SUBST(aros_cflags_int_to_pointer_cast)
611 AC_SUBST(aros_cflags_pointer_to_int_cast)
612 AC_SUBST(aros_cflags_unused_const_variable)
613 AC_SUBST(aros_cflags_write_strings)
614 AC_SUBST(aros_cflags_comment)
615 AC_SUBST(aros_cflags_incompatible_pointer_types)
616 AC_SUBST(aros_cflags_bool_compare)
617 AC_SUBST(aros_cflags_logical_not_parentheses)
618 AC_SUBST(aros_cflags_pointer_sign)
619 AC_SUBST(aros_cflags_shift_overflow)
620 AC_SUBST(aros_cflags_frame_address)
621 AC_SUBST(aros_cflags_deprecated_declarations)
622 AC_SUBST(aros_cflags_sign_compare)
623 AC_SUBST(aros_cflags_attributes)
624 AC_SUBST(aros_cflags_overflow)
625 AC_SUBST(aros_cflags_unused_local_typedefs)
626 AC_SUBST(aros_cflags_missing_braces)
627 AC_SUBST(aros_cflags_conversion_null)
628 AC_SUBST(aros_cflags_narrowing)
629 AC_SUBST(aros_cflags_volatile_register_var)
631 AC_CONFIG_FILES(
632     ${aros_targetcfg_dir}/compiler.cfg:config/compiler.cfg.in
635 AC_OUTPUT