w.i.p - only rebuild the toolchain if its dependencies change.
[AROS.git] / features.in
blob88aae2a68b10886a7cf040ae76692c22bfd0c5dd
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 #  -Wuninitialized
105 #  -Wmaybe-uninitialized
106 #  -Wimplicit-function-declaration
107 #  -Wformat
108 #  -Wparentheses
109 #  -Wchar-subscripts
110 #  -Wendif-labels
111 #  -Wformat-contains-nul
112 #  -Wimplicit-int
113 #  -Waggressive-loop-optimizations
114 #  -Wcpp
115 #  -Wswitch
116 #  -Wdiscarded-qualifiers
117 #  -Wsequence-point
118 #  -Wunknown-pragmas
119 #  -Wdiscarded-array-qualifiers
120 #  -Wint-conversion
121 #  -Wint-to-pointer-cast
122 #  -Wpointer-to-int-cast
123 #  -Wunused-const-variable
124 #  -Wwrite-strings 
125 #  -Wcomment
126 #  -Wincompatible-pointer-types
127 #  -Wbool-compare
128 #  -Wlogical-not-parentheses
129 #  -Wpointer-sign
130 #  -Wshift-overflow
131 #  -Wframe-address
132 #  -Wdeprecated-declarations
133 #  -Wsign-compare
134 #  -Wattributes
135 #  -Woverflow
136 #  -Wunused-local-typedefs
137 #  -Wmissing-braces
138 #  -Wconversion-null
139 #  -Wnarrowing
140 #  -Wvolatile-register-var
142 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-command-line-argument])
143 CFLAGS=-Wunused-command-line-argument
144 AC_TRY_COMPILE(,, aros_unused_command_line_argument="yes", aros_unused_command_line_argument="no")
145 AC_MSG_RESULT($aros_unused_command_line_argument)
146 if test "x-$aros_unused_command_line_argument" = "x-yes" ; then
147     aros_cflags_unused_command_line_argument=-Wno-unused-command-line-argument
150 AC_MSG_CHECKING([whether ${CC} accepts -Wunknown-warning-option])
151 CFLAGS=-Wunknown-warning-option
152 AC_TRY_COMPILE(,, aros_unknown_warning_option="yes", aros_unknown_warning_option="no")
153 AC_MSG_RESULT($aros_unknown_warning_option)
154 if test "x-$aros_unknown_warning_option" = "x-yes" ; then
155     aros_cflags_unknown_warning_option=-Wno-unknown-warning-option
158 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-but-set-variable])
159 CFLAGS=-Wunused-but-set-variable
160 AC_TRY_COMPILE(,, aros_unused_but_set_variable="yes", aros_unused_but_set_variable="no")
161 AC_MSG_RESULT($aros_unused_but_set_variable)
162 if test "x-$aros_unused_but_set_variable" = "x-yes" ; then
163     aros_cflags_unused_but_set_variable=-Wno-unused-but-set-variable
166 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-aliasing])
167 CFLAGS=-Wstrict-aliasing
168 AC_TRY_COMPILE(,, aros_strict_aliasing="yes", aros_strict_aliasing="no")
169 AC_MSG_RESULT($aros_strict_aliasing)
170 if test "x-$aros_strict_aliasing" = "x-yes" ; then
171     aros_cflags_strict_aliasing=-Wno-strict-aliasing
174 AC_MSG_CHECKING([whether ${CC} accepts -Warray-bounds])
175 CFLAGS=-Warray-bounds
176 AC_TRY_COMPILE(,, aros_array_bounds="yes", aros_array_bounds="no")
177 AC_MSG_RESULT($aros_array_bounds)
178 if test "x-$aros_array_bounds" = "x-yes" ; then
179     aros_cflags_array_bounds=-Wno-array-bounds
182 AC_MSG_CHECKING([whether ${CC} accepts -Wenum-compare])
183 CFLAGS=-Wenum-compare
184 AC_TRY_COMPILE(,, aros_enum_compare="yes", aros_enum_compare="no")
185 AC_MSG_RESULT($aros_enum_compare)
186 if test "x-$aros_enum_compare" = "x-yes" ; then
187     aros_cflags_enum_compare=-Wno-enum-compare
190 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-prototypes])
191 CFLAGS=-Wstrict-prototypes
192 AC_TRY_COMPILE(,, aros_strict_prototypes="yes", aros_strict_prototypes="no")
193 AC_MSG_RESULT($aros_strict_prototypes)
194 if test "x-$aros_strict_prototypes" = "x-yes" ; then
195     aros_cflags_strict_prototypes=-Wno-strict-prototypes
198 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-overflow])
199 CFLAGS=-Wstrict-overflow
200 AC_TRY_COMPILE(,, aros_strict_overflow="yes", aros_strict_overflow="no")
201 AC_MSG_RESULT($aros_strict_overflow)
202 if test "x-$aros_strict_overflow" = "x-yes" ; then
203     aros_cflags_strict_overflow=-Wno-strict-overflow
206 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-security])
207 CFLAGS=-Wformat-security
208 AC_TRY_COMPILE(,, aros_format_security="yes", aros_format_security="no")
209 AC_MSG_RESULT($aros_format_security)
210 if test "x-$aros_format_security" = "x-yes" ; then
211     aros_cflags_format_security=-Wno-format-security
214 AC_MSG_CHECKING([whether ${CC} accepts -Wmisleading-indentation])
215 CFLAGS=-Wmisleading-indentation
216 AC_TRY_COMPILE(,, aros_misleading_indentation="yes", aros_misleading_indentation="no")
217 AC_MSG_RESULT($aros_misleading_indentation)
218 if test "x-$aros_misleading_indentation" = "x-yes" ; then
219     aros_cflags_misleading_indentation=-Wno-misleading-indentation
222 AC_MSG_CHECKING([whether ${CC} accepts -Wnonnull-compare])
223 CFLAGS=-Wnonnull-compare
224 AC_TRY_COMPILE(,, aros_nonnull_compare="yes", aros_nonnull_compare="no")
225 AC_MSG_RESULT($aros_nonnull_compare)
226 if test "x-$aros_nonnull_compare" = "x-yes" ; then
227     aros_cflags_nonnull_compare=-Wno-nonnull-compare
230 AC_MSG_CHECKING([whether ${CC} accepts -Wunused])
231 CFLAGS=-Wunused
232 AC_TRY_COMPILE(,, aros_unused="yes", aros_unused="no")
233 AC_MSG_RESULT($aros_unused)
234 if test "x-$aros_unused" = "x-yes" ; then
235     aros_cflags_unused=-Wno-unused
238 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-value])
239 CFLAGS=-Wunused-value
240 AC_TRY_COMPILE(,, aros_unused_value="yes", aros_unused_value="no")
241 AC_MSG_RESULT($aros_unused_value)
242 if test "x-$aros_unused_value" = "x-yes" ; then
243     aros_cflags_unused_value=-Wno-unused-value
246 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-variable])
247 CFLAGS=-Wunused-variable
248 AC_TRY_COMPILE(,, aros_unused_variable="yes", aros_unused_variable="no")
249 AC_MSG_RESULT($aros_unused_variable)
250 if test "x-$aros_unused_variable" = "x-yes" ; then
251     aros_cflags_unused_variable=-Wno-unused-variable
254 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-function])
255 CFLAGS=-Wunused-function
256 AC_TRY_COMPILE(,, aros_unused_function="yes", aros_unused_function="no")
257 AC_MSG_RESULT($aros_unused_function)
258 if test "x-$aros_unused_function" = "x-yes" ; then
259     aros_cflags_unused_function=-Wno-unused-function
262 AC_MSG_CHECKING([whether ${CC} accepts -Wuninitialized])
263 CFLAGS=-Wuninitialized
264 AC_TRY_COMPILE(,, aros_uninitialized="yes", aros_uninitialized="no")
265 AC_MSG_RESULT($aros_uninitialized)
266 if test "x-$aros_uninitialized" = "x-yes" ; then
267     aros_cflags_uninitialized=-Wno-uninitialized
270 AC_MSG_CHECKING([whether ${CC} accepts -Wmaybe-uninitialized])
271 CFLAGS=-Wmaybe-uninitialized
272 AC_TRY_COMPILE(,, aros_maybe_uninitialized="yes", aros_maybe_uninitialized="no")
273 AC_MSG_RESULT($aros_maybe_uninitialized)
274 if test "x-$aros_maybe_uninitialized" = "x-yes" ; then
275     aros_cflags_maybe_uninitialized=-Wno-maybe-uninitialized
278 AC_MSG_CHECKING([whether ${CC} accepts -Wimplicit-function-declaration])
279 CFLAGS=-Wimplicit-function-declaration
280 AC_TRY_COMPILE(,, aros_implicit_function_declaration="yes", aros_implicit_function_declaration="no")
281 AC_MSG_RESULT($aros_implicit_function_declaration)
282 if test "x-$aros_implicit_function_declaration" = "x-yes" ; then
283     aros_cflags_implicit_function_declaration=-Wno-implicit-function-declaration
286 AC_MSG_CHECKING([whether ${CC} accepts -Wformat])
287 CFLAGS=-Wformat
288 AC_TRY_COMPILE(,, aros_format="yes", aros_format="no")
289 AC_MSG_RESULT($aros_format)
290 if test "x-$aros_format" = "x-yes" ; then
291     aros_cflags_format=-Wno-format
294 AC_MSG_CHECKING([whether ${CC} accepts -Wparentheses])
295 CFLAGS=-Wparentheses
296 AC_TRY_COMPILE(,, aros_parentheses="yes", aros_parentheses="no")
297 AC_MSG_RESULT($aros_parentheses)
298 if test "x-$aros_parentheses" = "x-yes" ; then
299     aros_cflags_parentheses=-Wno-parentheses
302 AC_MSG_CHECKING([whether ${CC} accepts -Wchar-subscripts])
303 CFLAGS=-Wchar-subscripts
304 AC_TRY_COMPILE(,, aros_char_subscripts="yes", aros_char_subscripts="no")
305 AC_MSG_RESULT($aros_char_subscripts)
306 if test "x-$aros_char_subscripts" = "x-yes" ; then
307     aros_cflags_char_subscripts=-Wno-char-subscripts
310 AC_MSG_CHECKING([whether ${CC} accepts -Wendif-labels])
311 CFLAGS=-Wendif-labels
312 AC_TRY_COMPILE(,, aros_endif_labels="yes", aros_endif_labels="no")
313 AC_MSG_RESULT($aros_endif_labels)
314 if test "x-$aros_endif_labels" = "x-yes" ; then
315     aros_cflags_endif_labels=-Wno-endif-labels
318 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-contains-nul])
319 CFLAGS=-Wformat-contains-nul
320 AC_TRY_COMPILE(,, aros_format_contains_nul="yes", aros_format_contains_nul="no")
321 AC_MSG_RESULT($aros_format_contains_nul)
322 if test "x-$aros_format_contains_nul" = "x-yes" ; then
323     aros_cflags_format_contains_nul=-Wno-format-contains-nul
326 AC_MSG_CHECKING([whether ${CC} accepts -Wimplicit-int])
327 CFLAGS=-Wimplicit-int
328 AC_TRY_COMPILE(,, aros_implicit_int="yes", aros_implicit_int="no")
329 AC_MSG_RESULT($aros_implicit_int)
330 if test "x-$aros_implicit_int" = "x-yes" ; then
331     aros_cflags_implicit_int=-Wno-implicit-int
334 AC_MSG_CHECKING([whether ${CC} accepts -Waggressive-loop-optimizations])
335 CFLAGS=-Waggressive-loop-optimizations
336 AC_TRY_COMPILE(,, aros_aggressive_loop_optimizations="yes", aros_aggressive_loop_optimizations="no")
337 AC_MSG_RESULT($aros_aggressive_loop_optimizations)
338 if test "x-$aros_aggressive_loop_optimizations" = "x-yes" ; then
339     aros_cflags_aggressive_loop_optimizations=-Wno-aggressive-loop-optimizations
342 AC_MSG_CHECKING([whether ${CC} accepts -Wcpp])
343 CFLAGS=-Wcpp
344 AC_TRY_COMPILE(,, aros_cpp="yes", aros_cpp="no")
345 AC_MSG_RESULT($aros_cpp)
346 if test "x-$aros_cpp" = "x-yes" ; then
347     aros_cflags_cpp=-Wno-cpp
350 AC_MSG_CHECKING([whether ${CC} accepts -Wswitch])
351 CFLAGS=-Wswitch
352 AC_TRY_COMPILE(,, aros_switch="yes", aros_switch="no")
353 AC_MSG_RESULT($aros_switch)
354 if test "x-$aros_switch" = "x-yes" ; then
355     aros_cflags_switch=-Wno-switch
358 AC_MSG_CHECKING([whether ${CC} accepts -Wdiscarded-qualifiers])
359 CFLAGS=-Wdiscarded-qualifiers
360 AC_TRY_COMPILE(,, aros_discarded_qualifiers="yes", aros_discarded_qualifiers="no")
361 AC_MSG_RESULT($aros_discarded_qualifiers)
362 if test "x-$aros_discarded_qualifiers" = "x-yes" ; then
363     aros_cflags_discarded_qualifiers=-Wno-discarded-qualifiers
366 AC_MSG_CHECKING([whether ${CC} accepts -Wsequence-point])
367 CFLAGS=-Wsequence-point
368 AC_TRY_COMPILE(,, aros_sequence_point="yes", aros_sequence_point="no")
369 AC_MSG_RESULT($aros_sequence_point)
370 if test "x-$aros_sequence_point" = "x-yes" ; then
371     aros_cflags_sequence_point=-Wno-sequence-point
374 AC_MSG_CHECKING([whether ${CC} accepts -Wunknown-pragmas])
375 CFLAGS=-Wunknown-pragmas
376 AC_TRY_COMPILE(,, aros_unknown_pragmas="yes", aros_unknown_pragmas="no")
377 AC_MSG_RESULT($aros_unknown_pragmas)
378 if test "x-$aros_unknown_pragmas" = "x-yes" ; then
379     aros_cflags_unknown_pragmas=-Wno-unknown-pragmas
382 AC_MSG_CHECKING([whether ${CC} accepts -Wdiscarded-array-qualifiers])
383 CFLAGS=-Wdiscarded-array-qualifiers
384 AC_TRY_COMPILE(,, aros_discarded_array_qualifiers="yes", aros_discarded_array_qualifiers="no")
385 AC_MSG_RESULT($aros_discarded_array_qualifiers)
386 if test "x-$aros_discarded_array_qualifiers" = "x-yes" ; then
387     aros_cflags_discarded_array_qualifiers=-Wno-discarded-array-qualifiers
390 AC_MSG_CHECKING([whether ${CC} accepts -Wint-conversion])
391 CFLAGS=-Wint-conversion
392 AC_TRY_COMPILE(,, aros_int_conversion="yes", aros_int_conversion="no")
393 AC_MSG_RESULT($aros_int_conversion)
394 if test "x-$aros_int_conversion" = "x-yes" ; then
395     aros_cflags_int_conversion=-Wno-int-conversion
398 AC_MSG_CHECKING([whether ${CC} accepts -Wint-to-pointer-cast])
399 CFLAGS=-Wint-to-pointer-cast
400 AC_TRY_COMPILE(,, aros_int_to_pointer_cast="yes", aros_int_to_pointer_cast="no")
401 AC_MSG_RESULT($aros_int_to_pointer_cast)
402 if test "x-$aros_int_to_pointer_cast" = "x-yes" ; then
403     aros_cflags_int_to_pointer_cast=-Wno-int-to-pointer-cast
406 AC_MSG_CHECKING([whether ${CC} accepts -Wpointer-to-int-cast])
407 CFLAGS=-Wpointer-to-int-cast
408 AC_TRY_COMPILE(,, aros_pointer_to_int_cast="yes", aros_pointer_to_int_cast="no")
409 AC_MSG_RESULT($aros_pointer_to_int_cast)
410 if test "x-$aros_pointer_to_int_cast" = "x-yes" ; then
411     aros_cflags_pointer_to_int_cast=-Wno-pointer-to-int-cast
414 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-const-variable])
415 CFLAGS=-Wunused-const-variable
416 AC_TRY_COMPILE(,, aros_unused_const_variable="yes", aros_unused_const_variable="no")
417 AC_MSG_RESULT($aros_unused_const_variable)
418 if test "x-$aros_unused_const_variable" = "x-yes" ; then
419     aros_cflags_unused_const_variable=-Wno-unused-const-variable
422 AC_MSG_CHECKING([whether ${CC} accepts -Wwrite-strings])
423 CFLAGS=-Wwrite-strings
424 AC_TRY_COMPILE(,, aros_write_strings="yes", aros_write_strings="no")
425 AC_MSG_RESULT($aros_write_strings)
426 if test "x-$aros_write_strings" = "x-yes" ; then
427     aros_cflags_write_strings=-Wno-write-strings
430 AC_MSG_CHECKING([whether ${CC} accepts -Wcomment])
431 CFLAGS=-Wcomment
432 AC_TRY_COMPILE(,, aros_comment="yes", aros_comment="no")
433 AC_MSG_RESULT($aros_comment)
434 if test "x-$aros_comment" = "x-yes" ; then
435     aros_cflags_comment=-Wno-comment
438 AC_MSG_CHECKING([whether ${CC} accepts -Wincompatible-pointer-types])
439 CFLAGS=-Wincompatible-pointer-types
440 AC_TRY_COMPILE(,, aros_incompatible_pointer_types="yes", aros_incompatible_pointer_types="no")
441 AC_MSG_RESULT($aros_incompatible_pointer_types)
442 if test "x-$aros_incompatible_pointer_types" = "x-yes" ; then
443     aros_cflags_incompatible_pointer_types=-Wno-incompatible-pointer-types
446 AC_MSG_CHECKING([whether ${CC} accepts -Wbool-compare])
447 CFLAGS=-Wbool-compare
448 AC_TRY_COMPILE(,, aros_bool_compare="yes", aros_bool_compare="no")
449 AC_MSG_RESULT($aros_bool_compare)
450 if test "x-$aros_bool_compare" = "x-yes" ; then
451     aros_cflags_bool_compare=-Wno-bool-compare
454 AC_MSG_CHECKING([whether ${CC} accepts -Wlogical-not-parentheses])
455 CFLAGS=-Wlogical-not-parentheses
456 AC_TRY_COMPILE(,, aros_logical_not_parentheses="yes", aros_logical_not_parentheses="no")
457 AC_MSG_RESULT($aros_logical_not_parentheses)
458 if test "x-$aros_logical_not_parentheses" = "x-yes" ; then
459     aros_cflags_logical_not_parentheses=-Wno-logical-not-parentheses
462 AC_MSG_CHECKING([whether ${CC} accepts -Wpointer-sign])
463 CFLAGS=-Wpointer-sign
464 AC_TRY_COMPILE(,, aros_pointer_sign="yes", aros_pointer_sign="no")
465 AC_MSG_RESULT($aros_pointer_sign)
466 if test "x-$aros_pointer_sign" = "x-yes" ; then
467     aros_cflags_pointer_sign=-Wno-pointer-sign
470 AC_MSG_CHECKING([whether ${CC} accepts -Wshift-overflow])
471 CFLAGS=-Wshift-overflow
472 AC_TRY_COMPILE(,, aros_shift_overflow="yes", aros_shift_overflow="no")
473 AC_MSG_RESULT($aros_shift_overflow)
474 if test "x-$aros_shift_overflow" = "x-yes" ; then
475     aros_cflags_shift_overflow=-Wno-shift-overflow
478 AC_MSG_CHECKING([whether ${CC} accepts -Wframe-address])
479 CFLAGS=-Wframe-address
480 AC_TRY_COMPILE(,, aros_frame_address="yes", aros_frame_address="no")
481 AC_MSG_RESULT($aros_frame_address)
482 if test "x-$aros_frame_address" = "x-yes" ; then
483     aros_cflags_frame_address=-Wno-frame-address
486 AC_MSG_CHECKING([whether ${CC} accepts -Wdeprecated-declarations])
487 CFLAGS=-Wdeprecated-declarations
488 AC_TRY_COMPILE(,, aros_deprecated_declarations="yes", aros_deprecated_declarations="no")
489 AC_MSG_RESULT($aros_deprecated_declarations)
490 if test "x-$aros_deprecated_declarations" = "x-yes" ; then
491     aros_cflags_deprecated_declarations=-Wno-deprecated-declarations
494 AC_MSG_CHECKING([whether ${CC} accepts -Wsign-compare])
495 CFLAGS=-Wsign-compare
496 AC_TRY_COMPILE(,, aros_sign_compare="yes", aros_sign_compare="no")
497 AC_MSG_RESULT($aros_sign_compare)
498 if test "x-$aros_sign_compare" = "x-yes" ; then
499     aros_cflags_sign_compare=-Wno-sign-compare
502 AC_MSG_CHECKING([whether ${CC} accepts -Wattributes])
503 CFLAGS=-Wattributes
504 AC_TRY_COMPILE(,, aros_attributes="yes", aros_attributes="no")
505 AC_MSG_RESULT($aros_attributes)
506 if test "x-$aros_attributes" = "x-yes" ; then
507     aros_cflags_attributes=-Wno-attributes
510 AC_MSG_CHECKING([whether ${CC} accepts -Woverflow])
511 CFLAGS=-Woverflow
512 AC_TRY_COMPILE(,, aros_overflow="yes", aros_overflow="no")
513 AC_MSG_RESULT($aros_overflow)
514 if test "x-$aros_overflow" = "x-yes" ; then
515     aros_cflags_overflow=-Wno-overflow
518 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-local-typedefs])
519 CFLAGS=-Wunused-local-typedefs
520 AC_TRY_COMPILE(,, aros_unused_local_typedefs="yes", aros_unused_local_typedefs="no")
521 AC_MSG_RESULT($aros_unused_local_typedefs)
522 if test "x-$aros_unused_local_typedefs" = "x-yes" ; then
523     aros_cflags_unused_local_typedefs=-Wno-unused-local-typedefs
526 AC_MSG_CHECKING([whether ${CC} accepts -Wmissing-braces])
527 CFLAGS=-Wmissing-braces
528 AC_TRY_COMPILE(,, aros_missing_braces="yes", aros_missing_braces="no")
529 AC_MSG_RESULT($aros_missing_braces)
530 if test "x-$aros_missing_braces" = "x-yes" ; then
531     aros_cflags_missing_braces=-Wno-missing-braces
534 AC_MSG_CHECKING([whether ${CC} accepts -Wconversion-null])
535 CFLAGS=-Wconversion-null
536 AC_TRY_COMPILE(,, aros_conversion_null="yes", aros_conversion_null="no")
537 AC_MSG_RESULT($aros_conversion_null)
538 if test "x-$aros_conversion_null" = "x-yes" ; then
539     aros_cflags_conversion_null=-Wno-conversion-null
542 AC_MSG_CHECKING([whether ${CC} accepts -Wnarrowing])
543 CFLAGS=-Wnarrowing
544 AC_TRY_COMPILE(,, aros_narrowing="yes", aros_narrowing="no")
545 AC_MSG_RESULT($aros_narrowing)
546 if test "x-$aros_narrowing" = "x-yes" ; then
547     aros_cflags_narrowing=-Wno-narrowing
550 AC_MSG_CHECKING([whether ${CC} accepts -Wvolatile-register-var])
551 CFLAGS=-Wvolatile-register-var
552 AC_TRY_COMPILE(,, aros_volatile_register_var="yes", aros_volatile_register_var="no")
553 AC_MSG_RESULT($aros_volatile_register_var)
554 if test "x-$aros_volatile_register_var" = "x-yes" ; then
555     aros_cflags_volatile_register_var=-Wno-volatile-register-var
558 AC_SUBST(aros_cflags_lto)
559 AC_SUBST(aros_cflags_loop_block)
560 AC_SUBST(aros_cflags_loop_interchange)
561 AC_SUBST(aros_cflags_loop_strip_mine)
563 AC_SUBST(aros_cflags_iquote)
564 AC_SUBST(aros_cflags_iquote_end)
566 AC_SUBST(aros_cflags_unused_command_line_argument)
567 AC_SUBST(aros_cflags_unknown_warning_option)
568 AC_SUBST(aros_cflags_unused_but_set_variable)
569 AC_SUBST(aros_cflags_strict_aliasing)
570 AC_SUBST(aros_cflags_array_bounds)
571 AC_SUBST(aros_cflags_enum_compare)
572 AC_SUBST(aros_cflags_strict_prototypes)
573 AC_SUBST(aros_cflags_strict_overflow)
574 AC_SUBST(aros_cflags_format_security)
575 AC_SUBST(aros_cflags_misleading_indentation)
576 AC_SUBST(aros_cflags_nonnull_compare)
577 AC_SUBST(aros_cflags_unused)
578 AC_SUBST(aros_cflags_unused_value)
579 AC_SUBST(aros_cflags_unused_variable)
580 AC_SUBST(aros_cflags_unused_function)
581 AC_SUBST(aros_cflags_uninitialized)
582 AC_SUBST(aros_cflags_maybe_uninitialized)
583 AC_SUBST(aros_cflags_implicit_function_declaration)
584 AC_SUBST(aros_cflags_format)
585 AC_SUBST(aros_cflags_parentheses)
586 AC_SUBST(aros_cflags_char_subscripts)
587 AC_SUBST(aros_cflags_endif_labels)
588 AC_SUBST(aros_cflags_format_contains_nul)
589 AC_SUBST(aros_cflags_implicit_int)
590 AC_SUBST(aros_cflags_aggressive_loop_optimizations)
591 AC_SUBST(aros_cflags_cpp)
592 AC_SUBST(aros_cflags_switch)
593 AC_SUBST(aros_cflags_discarded_qualifiers)
594 AC_SUBST(aros_cflags_sequence_point)
595 AC_SUBST(aros_cflags_unknown_pragmas)
596 AC_SUBST(aros_cflags_discarded_array_qualifiers)
597 AC_SUBST(aros_cflags_int_conversion)
598 AC_SUBST(aros_cflags_int_to_pointer_cast)
599 AC_SUBST(aros_cflags_pointer_to_int_cast)
600 AC_SUBST(aros_cflags_unused_const_variable)
601 AC_SUBST(aros_cflags_write_strings)
602 AC_SUBST(aros_cflags_comment)
603 AC_SUBST(aros_cflags_incompatible_pointer_types)
604 AC_SUBST(aros_cflags_bool_compare)
605 AC_SUBST(aros_cflags_logical_not_parentheses)
606 AC_SUBST(aros_cflags_pointer_sign)
607 AC_SUBST(aros_cflags_shift_overflow)
608 AC_SUBST(aros_cflags_frame_address)
609 AC_SUBST(aros_cflags_deprecated_declarations)
610 AC_SUBST(aros_cflags_sign_compare)
611 AC_SUBST(aros_cflags_attributes)
612 AC_SUBST(aros_cflags_overflow)
613 AC_SUBST(aros_cflags_unused_local_typedefs)
614 AC_SUBST(aros_cflags_missing_braces)
615 AC_SUBST(aros_cflags_conversion_null)
616 AC_SUBST(aros_cflags_narrowing)
617 AC_SUBST(aros_cflags_volatile_register_var)
619 AC_CONFIG_FILES(
620     ${aros_targetcfg_dir}/compiler.cfg:config/compiler.cfg.in
623 AC_OUTPUT