Fixed warnings.
[AROS.git] / features.in
blobc70420e962be03289f76900884ba61e672ee3d62
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
287 AC_MSG_CHECKING([whether ${CC} accepts -Wimplicit-function-declaration])
288 CFLAGS=-Wimplicit-function-declaration
289 AC_TRY_COMPILE(,, aros_implicit_function_declaration="yes", aros_implicit_function_declaration="no")
290 AC_MSG_RESULT($aros_implicit_function_declaration)
291 if test "x-$aros_implicit_function_declaration" = "x-yes" ; then
292     aros_cflags_implicit_function_declaration=-Wno-implicit-function-declaration
295 AC_MSG_CHECKING([whether ${CC} accepts -Wformat])
296 CFLAGS=-Wformat
297 AC_TRY_COMPILE(,, aros_format="yes", aros_format="no")
298 AC_MSG_RESULT($aros_format)
299 if test "x-$aros_format" = "x-yes" ; then
300     aros_cflags_format=-Wno-format
303 AC_MSG_CHECKING([whether ${CC} accepts -Wparentheses])
304 CFLAGS=-Wparentheses
305 AC_TRY_COMPILE(,, aros_parentheses="yes", aros_parentheses="no")
306 AC_MSG_RESULT($aros_parentheses)
307 if test "x-$aros_parentheses" = "x-yes" ; then
308     aros_cflags_parentheses=-Wno-parentheses
311 AC_MSG_CHECKING([whether ${CC} accepts -Wchar-subscripts])
312 CFLAGS=-Wchar-subscripts
313 AC_TRY_COMPILE(,, aros_char_subscripts="yes", aros_char_subscripts="no")
314 AC_MSG_RESULT($aros_char_subscripts)
315 if test "x-$aros_char_subscripts" = "x-yes" ; then
316     aros_cflags_char_subscripts=-Wno-char-subscripts
319 AC_MSG_CHECKING([whether ${CC} accepts -Wendif-labels])
320 CFLAGS=-Wendif-labels
321 AC_TRY_COMPILE(,, aros_endif_labels="yes", aros_endif_labels="no")
322 AC_MSG_RESULT($aros_endif_labels)
323 if test "x-$aros_endif_labels" = "x-yes" ; then
324     aros_cflags_endif_labels=-Wno-endif-labels
327 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-contains-nul])
328 CFLAGS=-Wformat-contains-nul
329 AC_TRY_COMPILE(,, aros_format_contains_nul="yes", aros_format_contains_nul="no")
330 AC_MSG_RESULT($aros_format_contains_nul)
331 if test "x-$aros_format_contains_nul" = "x-yes" ; then
332     aros_cflags_format_contains_nul=-Wno-format-contains-nul
335 AC_MSG_CHECKING([whether ${CC} accepts -Wimplicit-int])
336 CFLAGS=-Wimplicit-int
337 AC_TRY_COMPILE(,, aros_implicit_int="yes", aros_implicit_int="no")
338 AC_MSG_RESULT($aros_implicit_int)
339 if test "x-$aros_implicit_int" = "x-yes" ; then
340     aros_cflags_implicit_int=-Wno-implicit-int
343 AC_MSG_CHECKING([whether ${CC} accepts -Waggressive-loop-optimizations])
344 CFLAGS=-Waggressive-loop-optimizations
345 AC_TRY_COMPILE(,, aros_aggressive_loop_optimizations="yes", aros_aggressive_loop_optimizations="no")
346 AC_MSG_RESULT($aros_aggressive_loop_optimizations)
347 if test "x-$aros_aggressive_loop_optimizations" = "x-yes" ; then
348     aros_cflags_aggressive_loop_optimizations=-Wno-aggressive-loop-optimizations
351 AC_MSG_CHECKING([whether ${CC} accepts -Wcpp])
352 CFLAGS=-Wcpp
353 AC_TRY_COMPILE(,, aros_cpp="yes", aros_cpp="no")
354 AC_MSG_RESULT($aros_cpp)
355 if test "x-$aros_cpp" = "x-yes" ; then
356     aros_cflags_cpp=-Wno-cpp
359 AC_MSG_CHECKING([whether ${CC} accepts -Wswitch])
360 CFLAGS=-Wswitch
361 AC_TRY_COMPILE(,, aros_switch="yes", aros_switch="no")
362 AC_MSG_RESULT($aros_switch)
363 if test "x-$aros_switch" = "x-yes" ; then
364     aros_cflags_switch=-Wno-switch
367 AC_MSG_CHECKING([whether ${CC} accepts -Wdiscarded-qualifiers])
368 CFLAGS=-Wdiscarded-qualifiers
369 AC_TRY_COMPILE(,, aros_discarded_qualifiers="yes", aros_discarded_qualifiers="no")
370 AC_MSG_RESULT($aros_discarded_qualifiers)
371 if test "x-$aros_discarded_qualifiers" = "x-yes" ; then
372     aros_cflags_discarded_qualifiers=-Wno-discarded-qualifiers
375 AC_MSG_CHECKING([whether ${CC} accepts -Wsequence-point])
376 CFLAGS=-Wsequence-point
377 AC_TRY_COMPILE(,, aros_sequence_point="yes", aros_sequence_point="no")
378 AC_MSG_RESULT($aros_sequence_point)
379 if test "x-$aros_sequence_point" = "x-yes" ; then
380     aros_cflags_sequence_point=-Wno-sequence-point
383 AC_MSG_CHECKING([whether ${CC} accepts -Wunknown-pragmas])
384 CFLAGS=-Wunknown-pragmas
385 AC_TRY_COMPILE(,, aros_unknown_pragmas="yes", aros_unknown_pragmas="no")
386 AC_MSG_RESULT($aros_unknown_pragmas)
387 if test "x-$aros_unknown_pragmas" = "x-yes" ; then
388     aros_cflags_unknown_pragmas=-Wno-unknown-pragmas
391 AC_MSG_CHECKING([whether ${CC} accepts -Wdiscarded-array-qualifiers])
392 CFLAGS=-Wdiscarded-array-qualifiers
393 AC_TRY_COMPILE(,, aros_discarded_array_qualifiers="yes", aros_discarded_array_qualifiers="no")
394 AC_MSG_RESULT($aros_discarded_array_qualifiers)
395 if test "x-$aros_discarded_array_qualifiers" = "x-yes" ; then
396     aros_cflags_discarded_array_qualifiers=-Wno-discarded-array-qualifiers
399 AC_MSG_CHECKING([whether ${CC} accepts -Wint-conversion])
400 CFLAGS=-Wint-conversion
401 AC_TRY_COMPILE(,, aros_int_conversion="yes", aros_int_conversion="no")
402 AC_MSG_RESULT($aros_int_conversion)
403 if test "x-$aros_int_conversion" = "x-yes" ; then
404     aros_cflags_int_conversion=-Wno-int-conversion
407 AC_MSG_CHECKING([whether ${CC} accepts -Wint-to-pointer-cast])
408 CFLAGS=-Wint-to-pointer-cast
409 AC_TRY_COMPILE(,, aros_int_to_pointer_cast="yes", aros_int_to_pointer_cast="no")
410 AC_MSG_RESULT($aros_int_to_pointer_cast)
411 if test "x-$aros_int_to_pointer_cast" = "x-yes" ; then
412     aros_cflags_int_to_pointer_cast=-Wno-int-to-pointer-cast
415 AC_MSG_CHECKING([whether ${CC} accepts -Wpointer-to-int-cast])
416 CFLAGS=-Wpointer-to-int-cast
417 AC_TRY_COMPILE(,, aros_pointer_to_int_cast="yes", aros_pointer_to_int_cast="no")
418 AC_MSG_RESULT($aros_pointer_to_int_cast)
419 if test "x-$aros_pointer_to_int_cast" = "x-yes" ; then
420     aros_cflags_pointer_to_int_cast=-Wno-pointer-to-int-cast
423 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-const-variable])
424 CFLAGS=-Wunused-const-variable
425 AC_TRY_COMPILE(,, aros_unused_const_variable="yes", aros_unused_const_variable="no")
426 AC_MSG_RESULT($aros_unused_const_variable)
427 if test "x-$aros_unused_const_variable" = "x-yes" ; then
428     aros_cflags_unused_const_variable=-Wno-unused-const-variable
431 AC_MSG_CHECKING([whether ${CC} accepts -Wwrite-strings])
432 CFLAGS=-Wwrite-strings
433 AC_TRY_COMPILE(,, aros_write_strings="yes", aros_write_strings="no")
434 AC_MSG_RESULT($aros_write_strings)
435 if test "x-$aros_write_strings" = "x-yes" ; then
436     aros_cflags_write_strings=-Wno-write-strings
439 AC_MSG_CHECKING([whether ${CC} accepts -Wcomment])
440 CFLAGS=-Wcomment
441 AC_TRY_COMPILE(,, aros_comment="yes", aros_comment="no")
442 AC_MSG_RESULT($aros_comment)
443 if test "x-$aros_comment" = "x-yes" ; then
444     aros_cflags_comment=-Wno-comment
447 AC_MSG_CHECKING([whether ${CC} accepts -Wincompatible-pointer-types])
448 CFLAGS=-Wincompatible-pointer-types
449 AC_TRY_COMPILE(,, aros_incompatible_pointer_types="yes", aros_incompatible_pointer_types="no")
450 AC_MSG_RESULT($aros_incompatible_pointer_types)
451 if test "x-$aros_incompatible_pointer_types" = "x-yes" ; then
452     aros_cflags_incompatible_pointer_types=-Wno-incompatible-pointer-types
455 AC_MSG_CHECKING([whether ${CC} accepts -Wbool-compare])
456 CFLAGS=-Wbool-compare
457 AC_TRY_COMPILE(,, aros_bool_compare="yes", aros_bool_compare="no")
458 AC_MSG_RESULT($aros_bool_compare)
459 if test "x-$aros_bool_compare" = "x-yes" ; then
460     aros_cflags_bool_compare=-Wno-bool-compare
463 AC_MSG_CHECKING([whether ${CC} accepts -Wlogical-not-parentheses])
464 CFLAGS=-Wlogical-not-parentheses
465 AC_TRY_COMPILE(,, aros_logical_not_parentheses="yes", aros_logical_not_parentheses="no")
466 AC_MSG_RESULT($aros_logical_not_parentheses)
467 if test "x-$aros_logical_not_parentheses" = "x-yes" ; then
468     aros_cflags_logical_not_parentheses=-Wno-logical-not-parentheses
471 AC_MSG_CHECKING([whether ${CC} accepts -Wpointer-sign])
472 CFLAGS=-Wpointer-sign
473 AC_TRY_COMPILE(,, aros_pointer_sign="yes", aros_pointer_sign="no")
474 AC_MSG_RESULT($aros_pointer_sign)
475 if test "x-$aros_pointer_sign" = "x-yes" ; then
476     aros_cflags_pointer_sign=-Wno-pointer-sign
479 AC_MSG_CHECKING([whether ${CC} accepts -Wshift-overflow])
480 CFLAGS=-Wshift-overflow
481 AC_TRY_COMPILE(,, aros_shift_overflow="yes", aros_shift_overflow="no")
482 AC_MSG_RESULT($aros_shift_overflow)
483 if test "x-$aros_shift_overflow" = "x-yes" ; then
484     aros_cflags_shift_overflow=-Wno-shift-overflow
487 AC_MSG_CHECKING([whether ${CC} accepts -Wframe-address])
488 CFLAGS=-Wframe-address
489 AC_TRY_COMPILE(,, aros_frame_address="yes", aros_frame_address="no")
490 AC_MSG_RESULT($aros_frame_address)
491 if test "x-$aros_frame_address" = "x-yes" ; then
492     aros_cflags_frame_address=-Wno-frame-address
495 AC_MSG_CHECKING([whether ${CC} accepts -Wdeprecated-declarations])
496 CFLAGS=-Wdeprecated-declarations
497 AC_TRY_COMPILE(,, aros_deprecated_declarations="yes", aros_deprecated_declarations="no")
498 AC_MSG_RESULT($aros_deprecated_declarations)
499 if test "x-$aros_deprecated_declarations" = "x-yes" ; then
500     aros_cflags_deprecated_declarations=-Wno-deprecated-declarations
503 AC_MSG_CHECKING([whether ${CC} accepts -Wsign-compare])
504 CFLAGS=-Wsign-compare
505 AC_TRY_COMPILE(,, aros_sign_compare="yes", aros_sign_compare="no")
506 AC_MSG_RESULT($aros_sign_compare)
507 if test "x-$aros_sign_compare" = "x-yes" ; then
508     aros_cflags_sign_compare=-Wno-sign-compare
511 AC_MSG_CHECKING([whether ${CC} accepts -Wattributes])
512 CFLAGS=-Wattributes
513 AC_TRY_COMPILE(,, aros_attributes="yes", aros_attributes="no")
514 AC_MSG_RESULT($aros_attributes)
515 if test "x-$aros_attributes" = "x-yes" ; then
516     aros_cflags_attributes=-Wno-attributes
519 AC_MSG_CHECKING([whether ${CC} accepts -Woverflow])
520 CFLAGS=-Woverflow
521 AC_TRY_COMPILE(,, aros_overflow="yes", aros_overflow="no")
522 AC_MSG_RESULT($aros_overflow)
523 if test "x-$aros_overflow" = "x-yes" ; then
524     aros_cflags_overflow=-Wno-overflow
527 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-local-typedefs])
528 CFLAGS=-Wunused-local-typedefs
529 AC_TRY_COMPILE(,, aros_unused_local_typedefs="yes", aros_unused_local_typedefs="no")
530 AC_MSG_RESULT($aros_unused_local_typedefs)
531 if test "x-$aros_unused_local_typedefs" = "x-yes" ; then
532     aros_cflags_unused_local_typedefs=-Wno-unused-local-typedefs
535 AC_MSG_CHECKING([whether ${CC} accepts -Wmissing-braces])
536 CFLAGS=-Wmissing-braces
537 AC_TRY_COMPILE(,, aros_missing_braces="yes", aros_missing_braces="no")
538 AC_MSG_RESULT($aros_missing_braces)
539 if test "x-$aros_missing_braces" = "x-yes" ; then
540     aros_cflags_missing_braces=-Wno-missing-braces
543 AC_MSG_CHECKING([whether ${CC} accepts -Wconversion-null])
544 CFLAGS=-Wconversion-null
545 AC_TRY_COMPILE(,, aros_conversion_null="yes", aros_conversion_null="no")
546 AC_MSG_RESULT($aros_conversion_null)
547 if test "x-$aros_conversion_null" = "x-yes" ; then
548     aros_cflags_conversion_null=-Wno-conversion-null
551 AC_MSG_CHECKING([whether ${CC} accepts -Wnarrowing])
552 CFLAGS=-Wnarrowing
553 AC_TRY_COMPILE(,, aros_narrowing="yes", aros_narrowing="no")
554 AC_MSG_RESULT($aros_narrowing)
555 if test "x-$aros_narrowing" = "x-yes" ; then
556     aros_cflags_narrowing=-Wno-narrowing
559 AC_MSG_CHECKING([whether ${CC} accepts -Wvolatile-register-var])
560 CFLAGS=-Wvolatile-register-var
561 AC_TRY_COMPILE(,, aros_volatile_register_var="yes", aros_volatile_register_var="no")
562 AC_MSG_RESULT($aros_volatile_register_var)
563 if test "x-$aros_volatile_register_var" = "x-yes" ; then
564     aros_cflags_volatile_register_var=-Wno-volatile-register-var
567 AC_SUBST(aros_cflags_lto)
568 AC_SUBST(aros_cflags_loop_block)
569 AC_SUBST(aros_cflags_loop_interchange)
570 AC_SUBST(aros_cflags_loop_strip_mine)
572 AC_SUBST(aros_cflags_iquote)
573 AC_SUBST(aros_cflags_iquote_end)
575 AC_SUBST(aros_cflags_unused_command_line_argument)
576 AC_SUBST(aros_cflags_unknown_warning_option)
577 AC_SUBST(aros_cflags_unused_but_set_variable)
578 AC_SUBST(aros_cflags_strict_aliasing)
579 AC_SUBST(aros_cflags_array_bounds)
580 AC_SUBST(aros_cflags_enum_compare)
581 AC_SUBST(aros_cflags_strict_prototypes)
582 AC_SUBST(aros_cflags_strict_overflow)
583 AC_SUBST(aros_cflags_format_security)
584 AC_SUBST(aros_cflags_misleading_indentation)
585 AC_SUBST(aros_cflags_nonnull_compare)
586 AC_SUBST(aros_cflags_unused)
587 AC_SUBST(aros_cflags_unused_value)
588 AC_SUBST(aros_cflags_unused_variable)
589 AC_SUBST(aros_cflags_unused_function)
590 AC_SUBST(aros_cflags_unused_parameter)
591 AC_SUBST(aros_cflags_uninitialized)
592 AC_SUBST(aros_cflags_maybe_uninitialized)
593 AC_SUBST(aros_cflags_implicit_function_declaration)
594 AC_SUBST(aros_cflags_format)
595 AC_SUBST(aros_cflags_parentheses)
596 AC_SUBST(aros_cflags_char_subscripts)
597 AC_SUBST(aros_cflags_endif_labels)
598 AC_SUBST(aros_cflags_format_contains_nul)
599 AC_SUBST(aros_cflags_implicit_int)
600 AC_SUBST(aros_cflags_aggressive_loop_optimizations)
601 AC_SUBST(aros_cflags_cpp)
602 AC_SUBST(aros_cflags_switch)
603 AC_SUBST(aros_cflags_discarded_qualifiers)
604 AC_SUBST(aros_cflags_sequence_point)
605 AC_SUBST(aros_cflags_unknown_pragmas)
606 AC_SUBST(aros_cflags_discarded_array_qualifiers)
607 AC_SUBST(aros_cflags_int_conversion)
608 AC_SUBST(aros_cflags_int_to_pointer_cast)
609 AC_SUBST(aros_cflags_pointer_to_int_cast)
610 AC_SUBST(aros_cflags_unused_const_variable)
611 AC_SUBST(aros_cflags_write_strings)
612 AC_SUBST(aros_cflags_comment)
613 AC_SUBST(aros_cflags_incompatible_pointer_types)
614 AC_SUBST(aros_cflags_bool_compare)
615 AC_SUBST(aros_cflags_logical_not_parentheses)
616 AC_SUBST(aros_cflags_pointer_sign)
617 AC_SUBST(aros_cflags_shift_overflow)
618 AC_SUBST(aros_cflags_frame_address)
619 AC_SUBST(aros_cflags_deprecated_declarations)
620 AC_SUBST(aros_cflags_sign_compare)
621 AC_SUBST(aros_cflags_attributes)
622 AC_SUBST(aros_cflags_overflow)
623 AC_SUBST(aros_cflags_unused_local_typedefs)
624 AC_SUBST(aros_cflags_missing_braces)
625 AC_SUBST(aros_cflags_conversion_null)
626 AC_SUBST(aros_cflags_narrowing)
627 AC_SUBST(aros_cflags_volatile_register_var)
629 AC_CONFIG_FILES(
630     ${aros_targetcfg_dir}/compiler.cfg:config/compiler.cfg.in
633 AC_OUTPUT