if the compiler supports it, don't warn about unused command line options by default
[AROS.git] / features.in
blobe31ef5bff2ab2169f8ff22429659bd0b1f60a779
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:
38 AC_MSG_CHECKING([whether ${CC} accepts -iquote])
39 CFLAGS="-iquote."
40 AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no")
41 AC_MSG_RESULT($has_iquote)
42 if test "x-$has_iquote" = "x-yes" ; then
43     aros_cflags_iquote=-iquote
44     aros_cflags_iquote_end=
45 else
46     aros_cflags_iquote=-I
47     aros_cflags_iquote_end=-I-
50 #-----------------------------------------------------------------------------
52 # Check if the target compiler supports some options used for de-linting:
53 #  -Wunused-command-line-argument
54 #  -Wunknown-warning-option
55 #  -Wunused-but-set-variable
56 #  -Wstrict-aliasing
57 #  -Warray-bounds
58 #  -Wenum-compare
59 #  -Wstrict-prototypes
60 #  -Wstrict-overflow
61 #  -Wformat-security
62 #  -Wmisleading-indentation
63 #  -Wnonnull-compare
64 #  -Wunused
65 #  -Wunused-value
66 #  -Wunused-variable
67 #  -Wunused-function
68 #  -Wuninitialized
69 #  -Wmaybe-uninitialized
70 #  -Wimplicit-function-declaration
71 #  -Wformat
72 #  -Wparentheses
73 #  -Wchar-subscripts
74 #  -Wendif-labels
75 #  -Wformat-contains-nul
76 #  -Wimplicit-int
77 #  -Waggressive-loop-optimizations
78 #  -Wcpp
79 #  -Wswitch
80 #  -Wdiscarded-qualifiers
81 #  -Wsequence-point
82 #  -Wunknown-pragmas
83 #  -Wdiscarded-array-qualifiers
84 #  -Wint-conversion
85 #  -Wint-to-pointer-cast
86 #  -Wpointer-to-int-cast
87 #  -Wunused-const-variable
88 #  -Wwrite-strings 
89 #  -Wcomment
90 #  -Wincompatible-pointer-types
91 #  -Wbool-compare
92 #  -Wlogical-not-parentheses
93 #  -Wpointer-sign
94 #  -Wshift-overflow
95 #  -Wframe-address
96 #  -Wdeprecated-declarations
97 #  -Wsign-compare
98 #  -Wattributes
99 #  -Woverflow
100 #  -Wunused-local-typedefs
101 #  -Wmissing-braces
102 #  -Wconversion-null
103 #  -Wnarrowing
104 #  -Wvolatile-register-var
106 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-command-line-argument])
107 CFLAGS=-Wunused-command-line-argument
108 AC_TRY_COMPILE(,, aros_unused_command_line_argument="yes", aros_unused_command_line_argument="no")
109 AC_MSG_RESULT($aros_unused_command_line_argument)
110 if test "x-$aros_unused_command_line_argument" = "x-yes" ; then
111     aros_cflags_unused_command_line_argument=-Wno-unused-command-line-argument
114 AC_MSG_CHECKING([whether ${CC} accepts -Wunknown-warning-option])
115 CFLAGS=-Wunknown-warning-option
116 AC_TRY_COMPILE(,, aros_unknown_warning_option="yes", aros_unknown_warning_option="no")
117 AC_MSG_RESULT($aros_unknown_warning_option)
118 if test "x-$aros_unknown_warning_option" = "x-yes" ; then
119     aros_cflags_unknown_warning_option=-Wno-unknown-warning-option
122 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-but-set-variable])
123 CFLAGS=-Wunused-but-set-variable
124 AC_TRY_COMPILE(,, aros_unused_but_set_variable="yes", aros_unused_but_set_variable="no")
125 AC_MSG_RESULT($aros_unused_but_set_variable)
126 if test "x-$aros_unused_but_set_variable" = "x-yes" ; then
127     aros_cflags_unused_but_set_variable=-Wno-unused-but-set-variable
130 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-aliasing])
131 CFLAGS=-Wstrict-aliasing
132 AC_TRY_COMPILE(,, aros_strict_aliasing="yes", aros_strict_aliasing="no")
133 AC_MSG_RESULT($aros_strict_aliasing)
134 if test "x-$aros_strict_aliasing" = "x-yes" ; then
135     aros_cflags_strict_aliasing=-Wno-strict-aliasing
138 AC_MSG_CHECKING([whether ${CC} accepts -Warray-bounds])
139 CFLAGS=-Warray-bounds
140 AC_TRY_COMPILE(,, aros_array_bounds="yes", aros_array_bounds="no")
141 AC_MSG_RESULT($aros_array_bounds)
142 if test "x-$aros_array_bounds" = "x-yes" ; then
143     aros_cflags_array_bounds=-Wno-array-bounds
146 AC_MSG_CHECKING([whether ${CC} accepts -Wenum-compare])
147 CFLAGS=-Wenum-compare
148 AC_TRY_COMPILE(,, aros_enum_compare="yes", aros_enum_compare="no")
149 AC_MSG_RESULT($aros_enum_compare)
150 if test "x-$aros_enum_compare" = "x-yes" ; then
151     aros_cflags_enum_compare=-Wno-enum-compare
154 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-prototypes])
155 CFLAGS=-Wstrict-prototypes
156 AC_TRY_COMPILE(,, aros_strict_prototypes="yes", aros_strict_prototypes="no")
157 AC_MSG_RESULT($aros_strict_prototypes)
158 if test "x-$aros_strict_prototypes" = "x-yes" ; then
159     aros_cflags_strict_prototypes=-Wno-strict-prototypes
162 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-overflow])
163 CFLAGS=-Wstrict-overflow
164 AC_TRY_COMPILE(,, aros_strict_overflow="yes", aros_strict_overflow="no")
165 AC_MSG_RESULT($aros_strict_overflow)
166 if test "x-$aros_strict_overflow" = "x-yes" ; then
167     aros_cflags_strict_overflow=-Wno-strict-overflow
170 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-security])
171 CFLAGS=-Wformat-security
172 AC_TRY_COMPILE(,, aros_format_security="yes", aros_format_security="no")
173 AC_MSG_RESULT($aros_format_security)
174 if test "x-$aros_format_security" = "x-yes" ; then
175     aros_cflags_format_security=-Wno-format-security
178 AC_MSG_CHECKING([whether ${CC} accepts -Wmisleading-indentation])
179 CFLAGS=-Wmisleading-indentation
180 AC_TRY_COMPILE(,, aros_misleading_indentation="yes", aros_misleading_indentation="no")
181 AC_MSG_RESULT($aros_misleading_indentation)
182 if test "x-$aros_misleading_indentation" = "x-yes" ; then
183     aros_cflags_misleading_indentation=-Wno-misleading-indentation
186 AC_MSG_CHECKING([whether ${CC} accepts -Wnonnull-compare])
187 CFLAGS=-Wnonnull-compare
188 AC_TRY_COMPILE(,, aros_nonnull_compare="yes", aros_nonnull_compare="no")
189 AC_MSG_RESULT($aros_nonnull_compare)
190 if test "x-$aros_nonnull_compare" = "x-yes" ; then
191     aros_cflags_nonnull_compare=-Wno-nonnull-compare
194 AC_MSG_CHECKING([whether ${CC} accepts -Wunused])
195 CFLAGS=-Wunused
196 AC_TRY_COMPILE(,, aros_unused="yes", aros_unused="no")
197 AC_MSG_RESULT($aros_unused)
198 if test "x-$aros_unused" = "x-yes" ; then
199     aros_cflags_unused=-Wno-unused
202 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-value])
203 CFLAGS=-Wunused-value
204 AC_TRY_COMPILE(,, aros_unused_value="yes", aros_unused_value="no")
205 AC_MSG_RESULT($aros_unused_value)
206 if test "x-$aros_unused_value" = "x-yes" ; then
207     aros_cflags_unused_value=-Wno-unused-value
210 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-variable])
211 CFLAGS=-Wunused-variable
212 AC_TRY_COMPILE(,, aros_unused_variable="yes", aros_unused_variable="no")
213 AC_MSG_RESULT($aros_unused_variable)
214 if test "x-$aros_unused_variable" = "x-yes" ; then
215     aros_cflags_unused_variable=-Wno-unused-variable
218 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-function])
219 CFLAGS=-Wunused-function
220 AC_TRY_COMPILE(,, aros_unused_function="yes", aros_unused_function="no")
221 AC_MSG_RESULT($aros_unused_function)
222 if test "x-$aros_unused_function" = "x-yes" ; then
223     aros_cflags_unused_function=-Wno-unused-function
226 AC_MSG_CHECKING([whether ${CC} accepts -Wuninitialized])
227 CFLAGS=-Wuninitialized
228 AC_TRY_COMPILE(,, aros_uninitialized="yes", aros_uninitialized="no")
229 AC_MSG_RESULT($aros_uninitialized)
230 if test "x-$aros_uninitialized" = "x-yes" ; then
231     aros_cflags_uninitialized=-Wno-uninitialized
234 AC_MSG_CHECKING([whether ${CC} accepts -Wmaybe-uninitialized])
235 CFLAGS=-Wmaybe-uninitialized
236 AC_TRY_COMPILE(,, aros_maybe_uninitialized="yes", aros_maybe_uninitialized="no")
237 AC_MSG_RESULT($aros_maybe_uninitialized)
238 if test "x-$aros_maybe_uninitialized" = "x-yes" ; then
239     aros_cflags_maybe_uninitialized=-Wno-maybe-uninitialized
242 AC_MSG_CHECKING([whether ${CC} accepts -Wimplicit-function-declaration])
243 CFLAGS=-Wimplicit-function-declaration
244 AC_TRY_COMPILE(,, aros_implicit_function_declaration="yes", aros_implicit_function_declaration="no")
245 AC_MSG_RESULT($aros_implicit_function_declaration)
246 if test "x-$aros_implicit_function_declaration" = "x-yes" ; then
247     aros_cflags_implicit_function_declaration=-Wno-implicit-function-declaration
250 AC_MSG_CHECKING([whether ${CC} accepts -Wformat])
251 CFLAGS=-Wformat
252 AC_TRY_COMPILE(,, aros_format="yes", aros_format="no")
253 AC_MSG_RESULT($aros_format)
254 if test "x-$aros_format" = "x-yes" ; then
255     aros_cflags_format=-Wno-format
258 AC_MSG_CHECKING([whether ${CC} accepts -Wparentheses])
259 CFLAGS=-Wparentheses
260 AC_TRY_COMPILE(,, aros_parentheses="yes", aros_parentheses="no")
261 AC_MSG_RESULT($aros_parentheses)
262 if test "x-$aros_parentheses" = "x-yes" ; then
263     aros_cflags_parentheses=-Wno-parentheses
266 AC_MSG_CHECKING([whether ${CC} accepts -Wchar-subscripts])
267 CFLAGS=-Wchar-subscripts
268 AC_TRY_COMPILE(,, aros_char_subscripts="yes", aros_char_subscripts="no")
269 AC_MSG_RESULT($aros_char_subscripts)
270 if test "x-$aros_char_subscripts" = "x-yes" ; then
271     aros_cflags_char_subscripts=-Wno-char-subscripts
274 AC_MSG_CHECKING([whether ${CC} accepts -Wendif-labels])
275 CFLAGS=-Wendif-labels
276 AC_TRY_COMPILE(,, aros_endif_labels="yes", aros_endif_labels="no")
277 AC_MSG_RESULT($aros_endif_labels)
278 if test "x-$aros_endif_labels" = "x-yes" ; then
279     aros_cflags_endif_labels=-Wno-endif-labels
282 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-contains-nul])
283 CFLAGS=-Wformat-contains-nul
284 AC_TRY_COMPILE(,, aros_format_contains_nul="yes", aros_format_contains_nul="no")
285 AC_MSG_RESULT($aros_format_contains_nul)
286 if test "x-$aros_format_contains_nul" = "x-yes" ; then
287     aros_cflags_format_contains_nul=-Wno-format-contains-nul
290 AC_MSG_CHECKING([whether ${CC} accepts -Wimplicit-int])
291 CFLAGS=-Wimplicit-int
292 AC_TRY_COMPILE(,, aros_implicit_int="yes", aros_implicit_int="no")
293 AC_MSG_RESULT($aros_implicit_int)
294 if test "x-$aros_implicit_int" = "x-yes" ; then
295     aros_cflags_implicit_int=-Wno-implicit-int
298 AC_MSG_CHECKING([whether ${CC} accepts -Waggressive-loop-optimizations])
299 CFLAGS=-Waggressive-loop-optimizations
300 AC_TRY_COMPILE(,, aros_aggressive_loop_optimizations="yes", aros_aggressive_loop_optimizations="no")
301 AC_MSG_RESULT($aros_aggressive_loop_optimizations)
302 if test "x-$aros_aggressive_loop_optimizations" = "x-yes" ; then
303     aros_cflags_aggressive_loop_optimizations=-Wno-aggressive-loop-optimizations
306 AC_MSG_CHECKING([whether ${CC} accepts -Wcpp])
307 CFLAGS=-Wcpp
308 AC_TRY_COMPILE(,, aros_cpp="yes", aros_cpp="no")
309 AC_MSG_RESULT($aros_cpp)
310 if test "x-$aros_cpp" = "x-yes" ; then
311     aros_cflags_cpp=-Wno-cpp
314 AC_MSG_CHECKING([whether ${CC} accepts -Wswitch])
315 CFLAGS=-Wswitch
316 AC_TRY_COMPILE(,, aros_switch="yes", aros_switch="no")
317 AC_MSG_RESULT($aros_switch)
318 if test "x-$aros_switch" = "x-yes" ; then
319     aros_cflags_switch=-Wno-switch
322 AC_MSG_CHECKING([whether ${CC} accepts -Wdiscarded-qualifiers])
323 CFLAGS=-Wdiscarded-qualifiers
324 AC_TRY_COMPILE(,, aros_discarded_qualifiers="yes", aros_discarded_qualifiers="no")
325 AC_MSG_RESULT($aros_discarded_qualifiers)
326 if test "x-$aros_discarded_qualifiers" = "x-yes" ; then
327     aros_cflags_discarded_qualifiers=-Wno-discarded-qualifiers
330 AC_MSG_CHECKING([whether ${CC} accepts -Wsequence-point])
331 CFLAGS=-Wsequence-point
332 AC_TRY_COMPILE(,, aros_sequence_point="yes", aros_sequence_point="no")
333 AC_MSG_RESULT($aros_sequence_point)
334 if test "x-$aros_sequence_point" = "x-yes" ; then
335     aros_cflags_sequence_point=-Wno-sequence-point
338 AC_MSG_CHECKING([whether ${CC} accepts -Wunknown-pragmas])
339 CFLAGS=-Wunknown-pragmas
340 AC_TRY_COMPILE(,, aros_unknown_pragmas="yes", aros_unknown_pragmas="no")
341 AC_MSG_RESULT($aros_unknown_pragmas)
342 if test "x-$aros_unknown_pragmas" = "x-yes" ; then
343     aros_cflags_unknown_pragmas=-Wno-unknown-pragmas
346 AC_MSG_CHECKING([whether ${CC} accepts -Wdiscarded-array-qualifiers])
347 CFLAGS=-Wdiscarded-array-qualifiers
348 AC_TRY_COMPILE(,, aros_discarded_array_qualifiers="yes", aros_discarded_array_qualifiers="no")
349 AC_MSG_RESULT($aros_discarded_array_qualifiers)
350 if test "x-$aros_discarded_array_qualifiers" = "x-yes" ; then
351     aros_cflags_discarded_array_qualifiers=-Wno-discarded-array-qualifiers
354 AC_MSG_CHECKING([whether ${CC} accepts -Wint-conversion])
355 CFLAGS=-Wint-conversion
356 AC_TRY_COMPILE(,, aros_int_conversion="yes", aros_int_conversion="no")
357 AC_MSG_RESULT($aros_int_conversion)
358 if test "x-$aros_int_conversion" = "x-yes" ; then
359     aros_cflags_int_conversion=-Wno-int-conversion
362 AC_MSG_CHECKING([whether ${CC} accepts -Wint-to-pointer-cast])
363 CFLAGS=-Wint-to-pointer-cast
364 AC_TRY_COMPILE(,, aros_int_to_pointer_cast="yes", aros_int_to_pointer_cast="no")
365 AC_MSG_RESULT($aros_int_to_pointer_cast)
366 if test "x-$aros_int_to_pointer_cast" = "x-yes" ; then
367     aros_cflags_int_to_pointer_cast=-Wno-int-to-pointer-cast
370 AC_MSG_CHECKING([whether ${CC} accepts -Wpointer-to-int-cast])
371 CFLAGS=-Wpointer-to-int-cast
372 AC_TRY_COMPILE(,, aros_pointer_to_int_cast="yes", aros_pointer_to_int_cast="no")
373 AC_MSG_RESULT($aros_pointer_to_int_cast)
374 if test "x-$aros_pointer_to_int_cast" = "x-yes" ; then
375     aros_cflags_pointer_to_int_cast=-Wno-pointer-to-int-cast
378 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-const-variable])
379 CFLAGS=-Wunused-const-variable
380 AC_TRY_COMPILE(,, aros_unused_const_variable="yes", aros_unused_const_variable="no")
381 AC_MSG_RESULT($aros_unused_const_variable)
382 if test "x-$aros_unused_const_variable" = "x-yes" ; then
383     aros_cflags_unused_const_variable=-Wno-unused-const-variable
386 AC_MSG_CHECKING([whether ${CC} accepts -Wwrite-strings])
387 CFLAGS=-Wwrite-strings
388 AC_TRY_COMPILE(,, aros_write_strings="yes", aros_write_strings="no")
389 AC_MSG_RESULT($aros_write_strings)
390 if test "x-$aros_write_strings" = "x-yes" ; then
391     aros_cflags_write_strings=-Wno-write-strings
394 AC_MSG_CHECKING([whether ${CC} accepts -Wcomment])
395 CFLAGS=-Wcomment
396 AC_TRY_COMPILE(,, aros_comment="yes", aros_comment="no")
397 AC_MSG_RESULT($aros_comment)
398 if test "x-$aros_comment" = "x-yes" ; then
399     aros_cflags_comment=-Wno-comment
402 AC_MSG_CHECKING([whether ${CC} accepts -Wincompatible-pointer-types])
403 CFLAGS=-Wincompatible-pointer-types
404 AC_TRY_COMPILE(,, aros_incompatible_pointer_types="yes", aros_incompatible_pointer_types="no")
405 AC_MSG_RESULT($aros_incompatible_pointer_types)
406 if test "x-$aros_incompatible_pointer_types" = "x-yes" ; then
407     aros_cflags_incompatible_pointer_types=-Wno-incompatible-pointer-types
410 AC_MSG_CHECKING([whether ${CC} accepts -Wbool-compare])
411 CFLAGS=-Wbool-compare
412 AC_TRY_COMPILE(,, aros_bool_compare="yes", aros_bool_compare="no")
413 AC_MSG_RESULT($aros_bool_compare)
414 if test "x-$aros_bool_compare" = "x-yes" ; then
415     aros_cflags_bool_compare=-Wno-bool-compare
418 AC_MSG_CHECKING([whether ${CC} accepts -Wlogical-not-parentheses])
419 CFLAGS=-Wlogical-not-parentheses
420 AC_TRY_COMPILE(,, aros_logical_not_parentheses="yes", aros_logical_not_parentheses="no")
421 AC_MSG_RESULT($aros_logical_not_parentheses)
422 if test "x-$aros_logical_not_parentheses" = "x-yes" ; then
423     aros_cflags_logical_not_parentheses=-Wno-logical-not-parentheses
426 AC_MSG_CHECKING([whether ${CC} accepts -Wpointer-sign])
427 CFLAGS=-Wpointer-sign
428 AC_TRY_COMPILE(,, aros_pointer_sign="yes", aros_pointer_sign="no")
429 AC_MSG_RESULT($aros_pointer_sign)
430 if test "x-$aros_pointer_sign" = "x-yes" ; then
431     aros_cflags_pointer_sign=-Wno-pointer-sign
434 AC_MSG_CHECKING([whether ${CC} accepts -Wshift-overflow])
435 CFLAGS=-Wshift-overflow
436 AC_TRY_COMPILE(,, aros_shift_overflow="yes", aros_shift_overflow="no")
437 AC_MSG_RESULT($aros_shift_overflow)
438 if test "x-$aros_shift_overflow" = "x-yes" ; then
439     aros_cflags_shift_overflow=-Wno-shift-overflow
442 AC_MSG_CHECKING([whether ${CC} accepts -Wframe-address])
443 CFLAGS=-Wframe-address
444 AC_TRY_COMPILE(,, aros_frame_address="yes", aros_frame_address="no")
445 AC_MSG_RESULT($aros_frame_address)
446 if test "x-$aros_frame_address" = "x-yes" ; then
447     aros_cflags_frame_address=-Wno-frame-address
450 AC_MSG_CHECKING([whether ${CC} accepts -Wdeprecated-declarations])
451 CFLAGS=-Wdeprecated-declarations
452 AC_TRY_COMPILE(,, aros_deprecated_declarations="yes", aros_deprecated_declarations="no")
453 AC_MSG_RESULT($aros_deprecated_declarations)
454 if test "x-$aros_deprecated_declarations" = "x-yes" ; then
455     aros_cflags_deprecated_declarations=-Wno-deprecated-declarations
458 AC_MSG_CHECKING([whether ${CC} accepts -Wsign-compare])
459 CFLAGS=-Wsign-compare
460 AC_TRY_COMPILE(,, aros_sign_compare="yes", aros_sign_compare="no")
461 AC_MSG_RESULT($aros_sign_compare)
462 if test "x-$aros_sign_compare" = "x-yes" ; then
463     aros_cflags_sign_compare=-Wno-sign-compare
466 AC_MSG_CHECKING([whether ${CC} accepts -Wattributes])
467 CFLAGS=-Wattributes
468 AC_TRY_COMPILE(,, aros_attributes="yes", aros_attributes="no")
469 AC_MSG_RESULT($aros_attributes)
470 if test "x-$aros_attributes" = "x-yes" ; then
471     aros_cflags_attributes=-Wno-attributes
474 AC_MSG_CHECKING([whether ${CC} accepts -Woverflow])
475 CFLAGS=-Woverflow
476 AC_TRY_COMPILE(,, aros_overflow="yes", aros_overflow="no")
477 AC_MSG_RESULT($aros_overflow)
478 if test "x-$aros_overflow" = "x-yes" ; then
479     aros_cflags_overflow=-Wno-overflow
482 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-local-typedefs])
483 CFLAGS=-Wunused-local-typedefs
484 AC_TRY_COMPILE(,, aros_unused_local_typedefs="yes", aros_unused_local_typedefs="no")
485 AC_MSG_RESULT($aros_unused_local_typedefs)
486 if test "x-$aros_unused_local_typedefs" = "x-yes" ; then
487     aros_cflags_unused_local_typedefs=-Wno-unused-local-typedefs
490 AC_MSG_CHECKING([whether ${CC} accepts -Wmissing-braces])
491 CFLAGS=-Wmissing-braces
492 AC_TRY_COMPILE(,, aros_missing_braces="yes", aros_missing_braces="no")
493 AC_MSG_RESULT($aros_missing_braces)
494 if test "x-$aros_missing_braces" = "x-yes" ; then
495     aros_cflags_missing_braces=-Wno-missing-braces
498 AC_MSG_CHECKING([whether ${CC} accepts -Wconversion-null])
499 CFLAGS=-Wconversion-null
500 AC_TRY_COMPILE(,, aros_conversion_null="yes", aros_conversion_null="no")
501 AC_MSG_RESULT($aros_conversion_null)
502 if test "x-$aros_conversion_null" = "x-yes" ; then
503     aros_cflags_conversion_null=-Wno-conversion-null
506 AC_MSG_CHECKING([whether ${CC} accepts -Wnarrowing])
507 CFLAGS=-Wnarrowing
508 AC_TRY_COMPILE(,, aros_narrowing="yes", aros_narrowing="no")
509 AC_MSG_RESULT($aros_narrowing)
510 if test "x-$aros_narrowing" = "x-yes" ; then
511     aros_cflags_narrowing=-Wno-narrowing
514 AC_MSG_CHECKING([whether ${CC} accepts -Wvolatile-register-var])
515 CFLAGS=-Wvolatile-register-var
516 AC_TRY_COMPILE(,, aros_volatile_register_var="yes", aros_volatile_register_var="no")
517 AC_MSG_RESULT($aros_volatile_register_var)
518 if test "x-$aros_volatile_register_var" = "x-yes" ; then
519     aros_cflags_volatile_register_var=-Wno-volatile-register-var
522 AC_SUBST(aros_cflags_iquote)
523 AC_SUBST(aros_cflags_iquote_end)
525 AC_SUBST(aros_cflags_unused_command_line_argument)
526 AC_SUBST(aros_cflags_unknown_warning_option)
527 AC_SUBST(aros_cflags_unused_but_set_variable)
528 AC_SUBST(aros_cflags_strict_aliasing)
529 AC_SUBST(aros_cflags_array_bounds)
530 AC_SUBST(aros_cflags_enum_compare)
531 AC_SUBST(aros_cflags_strict_prototypes)
532 AC_SUBST(aros_cflags_strict_overflow)
533 AC_SUBST(aros_cflags_format_security)
534 AC_SUBST(aros_cflags_misleading_indentation)
535 AC_SUBST(aros_cflags_nonnull_compare)
536 AC_SUBST(aros_cflags_unused)
537 AC_SUBST(aros_cflags_unused_value)
538 AC_SUBST(aros_cflags_unused_variable)
539 AC_SUBST(aros_cflags_unused_function)
540 AC_SUBST(aros_cflags_uninitialized)
541 AC_SUBST(aros_cflags_maybe_uninitialized)
542 AC_SUBST(aros_cflags_implicit_function_declaration)
543 AC_SUBST(aros_cflags_format)
544 AC_SUBST(aros_cflags_parentheses)
545 AC_SUBST(aros_cflags_char_subscripts)
546 AC_SUBST(aros_cflags_endif_labels)
547 AC_SUBST(aros_cflags_format_contains_nul)
548 AC_SUBST(aros_cflags_implicit_int)
549 AC_SUBST(aros_cflags_aggressive_loop_optimizations)
550 AC_SUBST(aros_cflags_cpp)
551 AC_SUBST(aros_cflags_switch)
552 AC_SUBST(aros_cflags_discarded_qualifiers)
553 AC_SUBST(aros_cflags_sequence_point)
554 AC_SUBST(aros_cflags_unknown_pragmas)
555 AC_SUBST(aros_cflags_discarded_array_qualifiers)
556 AC_SUBST(aros_cflags_int_conversion)
557 AC_SUBST(aros_cflags_int_to_pointer_cast)
558 AC_SUBST(aros_cflags_pointer_to_int_cast)
559 AC_SUBST(aros_cflags_unused_const_variable)
560 AC_SUBST(aros_cflags_write_strings)
561 AC_SUBST(aros_cflags_comment)
562 AC_SUBST(aros_cflags_incompatible_pointer_types)
563 AC_SUBST(aros_cflags_bool_compare)
564 AC_SUBST(aros_cflags_logical_not_parentheses)
565 AC_SUBST(aros_cflags_pointer_sign)
566 AC_SUBST(aros_cflags_shift_overflow)
567 AC_SUBST(aros_cflags_frame_address)
568 AC_SUBST(aros_cflags_deprecated_declarations)
569 AC_SUBST(aros_cflags_sign_compare)
570 AC_SUBST(aros_cflags_attributes)
571 AC_SUBST(aros_cflags_overflow)
572 AC_SUBST(aros_cflags_unused_local_typedefs)
573 AC_SUBST(aros_cflags_missing_braces)
574 AC_SUBST(aros_cflags_conversion_null)
575 AC_SUBST(aros_cflags_narrowing)
576 AC_SUBST(aros_cflags_volatile_register_var)
578 AC_CONFIG_FILES(
579     ${aros_targetcfg_dir}/compiler.cfg:config/compiler.cfg.in
582 AC_OUTPUT