check for -Wreturn-type
[AROS.git] / config / features.in
blobad9018a70230a9b3e7c50dd30b87c65cc0805887
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
142 #  -Wsizeof-pointer-memaccess
143 #  -Wreturn-type
145 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-command-line-argument])
146 CFLAGS=-Wunused-command-line-argument
147 AC_TRY_COMPILE(,, aros_unused_command_line_argument="yes", aros_unused_command_line_argument="no")
148 AC_MSG_RESULT($aros_unused_command_line_argument)
149 if test "x-$aros_unused_command_line_argument" = "x-yes" ; then
150     aros_cflags_unused_command_line_argument=-Wno-unused-command-line-argument
153 AC_MSG_CHECKING([whether ${CC} accepts -Wunknown-warning-option])
154 CFLAGS=-Wunknown-warning-option
155 AC_TRY_COMPILE(,, aros_unknown_warning_option="yes", aros_unknown_warning_option="no")
156 AC_MSG_RESULT($aros_unknown_warning_option)
157 if test "x-$aros_unknown_warning_option" = "x-yes" ; then
158     aros_cflags_unknown_warning_option=-Wno-unknown-warning-option
161 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-but-set-variable])
162 CFLAGS=-Wunused-but-set-variable
163 AC_TRY_COMPILE(,, aros_unused_but_set_variable="yes", aros_unused_but_set_variable="no")
164 AC_MSG_RESULT($aros_unused_but_set_variable)
165 if test "x-$aros_unused_but_set_variable" = "x-yes" ; then
166     aros_cflags_unused_but_set_variable=-Wno-unused-but-set-variable
169 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-aliasing])
170 CFLAGS=-Wstrict-aliasing
171 AC_TRY_COMPILE(,, aros_strict_aliasing="yes", aros_strict_aliasing="no")
172 AC_MSG_RESULT($aros_strict_aliasing)
173 if test "x-$aros_strict_aliasing" = "x-yes" ; then
174     aros_cflags_strict_aliasing=-Wno-strict-aliasing
177 AC_MSG_CHECKING([whether ${CC} accepts -Warray-bounds])
178 CFLAGS=-Warray-bounds
179 AC_TRY_COMPILE(,, aros_array_bounds="yes", aros_array_bounds="no")
180 AC_MSG_RESULT($aros_array_bounds)
181 if test "x-$aros_array_bounds" = "x-yes" ; then
182     aros_cflags_array_bounds=-Wno-array-bounds
185 AC_MSG_CHECKING([whether ${CC} accepts -Wenum-compare])
186 CFLAGS=-Wenum-compare
187 AC_TRY_COMPILE(,, aros_enum_compare="yes", aros_enum_compare="no")
188 AC_MSG_RESULT($aros_enum_compare)
189 if test "x-$aros_enum_compare" = "x-yes" ; then
190     aros_cflags_enum_compare=-Wno-enum-compare
193 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-prototypes])
194 CFLAGS=-Wstrict-prototypes
195 AC_TRY_COMPILE(,, aros_strict_prototypes="yes", aros_strict_prototypes="no")
196 AC_MSG_RESULT($aros_strict_prototypes)
197 if test "x-$aros_strict_prototypes" = "x-yes" ; then
198     aros_cflags_strict_prototypes=-Wno-strict-prototypes
201 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-overflow])
202 CFLAGS=-Wstrict-overflow
203 AC_TRY_COMPILE(,, aros_strict_overflow="yes", aros_strict_overflow="no")
204 AC_MSG_RESULT($aros_strict_overflow)
205 if test "x-$aros_strict_overflow" = "x-yes" ; then
206     aros_cflags_strict_overflow=-Wno-strict-overflow
209 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-security])
210 CFLAGS=-Wformat-security
211 AC_TRY_COMPILE(,, aros_format_security="yes", aros_format_security="no")
212 AC_MSG_RESULT($aros_format_security)
213 if test "x-$aros_format_security" = "x-yes" ; then
214     aros_cflags_format_security=-Wno-format-security
217 AC_MSG_CHECKING([whether ${CC} accepts -Wmisleading-indentation])
218 CFLAGS=-Wmisleading-indentation
219 AC_TRY_COMPILE(,, aros_misleading_indentation="yes", aros_misleading_indentation="no")
220 AC_MSG_RESULT($aros_misleading_indentation)
221 if test "x-$aros_misleading_indentation" = "x-yes" ; then
222     aros_cflags_misleading_indentation=-Wno-misleading-indentation
225 AC_MSG_CHECKING([whether ${CC} accepts -Wnonnull-compare])
226 CFLAGS=-Wnonnull-compare
227 AC_TRY_COMPILE(,, aros_nonnull_compare="yes", aros_nonnull_compare="no")
228 AC_MSG_RESULT($aros_nonnull_compare)
229 if test "x-$aros_nonnull_compare" = "x-yes" ; then
230     aros_cflags_nonnull_compare=-Wno-nonnull-compare
233 AC_MSG_CHECKING([whether ${CC} accepts -Wunused])
234 CFLAGS=-Wunused
235 AC_TRY_COMPILE(,, aros_unused="yes", aros_unused="no")
236 AC_MSG_RESULT($aros_unused)
237 if test "x-$aros_unused" = "x-yes" ; then
238     aros_cflags_unused=-Wno-unused
241 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-value])
242 CFLAGS=-Wunused-value
243 AC_TRY_COMPILE(,, aros_unused_value="yes", aros_unused_value="no")
244 AC_MSG_RESULT($aros_unused_value)
245 if test "x-$aros_unused_value" = "x-yes" ; then
246     aros_cflags_unused_value=-Wno-unused-value
249 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-variable])
250 CFLAGS=-Wunused-variable
251 AC_TRY_COMPILE(,, aros_unused_variable="yes", aros_unused_variable="no")
252 AC_MSG_RESULT($aros_unused_variable)
253 if test "x-$aros_unused_variable" = "x-yes" ; then
254     aros_cflags_unused_variable=-Wno-unused-variable
257 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-function])
258 CFLAGS=-Wunused-function
259 AC_TRY_COMPILE(,, aros_unused_function="yes", aros_unused_function="no")
260 AC_MSG_RESULT($aros_unused_function)
261 if test "x-$aros_unused_function" = "x-yes" ; then
262     aros_cflags_unused_function=-Wno-unused-function
265 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-parameter])
266 CFLAGS=-Wunused-parameter
267 AC_TRY_COMPILE(,, aros_unused_parameter="yes", aros_unused_parameter="no")
268 AC_MSG_RESULT($aros_unused_parameter)
269 if test "x-$aros_unused_parameter" = "x-yes" ; then
270     aros_cflags_unused_parameter=-Wno-unused-parameter
273 AC_MSG_CHECKING([whether ${CC} accepts -Wuninitialized])
274 CFLAGS=-Wuninitialized
275 AC_TRY_COMPILE(,, aros_uninitialized="yes", aros_uninitialized="no")
276 AC_MSG_RESULT($aros_uninitialized)
277 if test "x-$aros_uninitialized" = "x-yes" ; then
278     aros_cflags_uninitialized=-Wno-uninitialized
281 AC_MSG_CHECKING([whether ${CC} accepts -Wmaybe-uninitialized])
282 CFLAGS=-Wmaybe-uninitialized
283 AC_TRY_COMPILE(,, aros_maybe_uninitialized="yes", aros_maybe_uninitialized="no")
284 AC_MSG_RESULT($aros_maybe_uninitialized)
285 if test "x-$aros_maybe_uninitialized" = "x-yes" ; then
286     aros_cflags_maybe_uninitialized=-Wno-maybe-uninitialized
287 else
288     aros_cflags_maybe_uninitialized=$aros_cflags_uninitialized
291 AC_MSG_CHECKING([whether ${CC} accepts -Wimplicit-function-declaration])
292 CFLAGS=-Wimplicit-function-declaration
293 AC_TRY_COMPILE(,, aros_implicit_function_declaration="yes", aros_implicit_function_declaration="no")
294 AC_MSG_RESULT($aros_implicit_function_declaration)
295 if test "x-$aros_implicit_function_declaration" = "x-yes" ; then
296     aros_cflags_implicit_function_declaration=-Wno-implicit-function-declaration
299 AC_MSG_CHECKING([whether ${CC} accepts -Wformat])
300 CFLAGS=-Wformat
301 AC_TRY_COMPILE(,, aros_format="yes", aros_format="no")
302 AC_MSG_RESULT($aros_format)
303 if test "x-$aros_format" = "x-yes" ; then
304     aros_cflags_format=-Wno-format
307 AC_MSG_CHECKING([whether ${CC} accepts -Wparentheses])
308 CFLAGS=-Wparentheses
309 AC_TRY_COMPILE(,, aros_parentheses="yes", aros_parentheses="no")
310 AC_MSG_RESULT($aros_parentheses)
311 if test "x-$aros_parentheses" = "x-yes" ; then
312     aros_cflags_parentheses=-Wno-parentheses
315 AC_MSG_CHECKING([whether ${CC} accepts -Wchar-subscripts])
316 CFLAGS=-Wchar-subscripts
317 AC_TRY_COMPILE(,, aros_char_subscripts="yes", aros_char_subscripts="no")
318 AC_MSG_RESULT($aros_char_subscripts)
319 if test "x-$aros_char_subscripts" = "x-yes" ; then
320     aros_cflags_char_subscripts=-Wno-char-subscripts
323 AC_MSG_CHECKING([whether ${CC} accepts -Wendif-labels])
324 CFLAGS=-Wendif-labels
325 AC_TRY_COMPILE(,, aros_endif_labels="yes", aros_endif_labels="no")
326 AC_MSG_RESULT($aros_endif_labels)
327 if test "x-$aros_endif_labels" = "x-yes" ; then
328     aros_cflags_endif_labels=-Wno-endif-labels
331 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-contains-nul])
332 CFLAGS=-Wformat-contains-nul
333 AC_TRY_COMPILE(,, aros_format_contains_nul="yes", aros_format_contains_nul="no")
334 AC_MSG_RESULT($aros_format_contains_nul)
335 if test "x-$aros_format_contains_nul" = "x-yes" ; then
336     aros_cflags_format_contains_nul=-Wno-format-contains-nul
339 AC_MSG_CHECKING([whether ${CC} accepts -Wimplicit-int])
340 CFLAGS=-Wimplicit-int
341 AC_TRY_COMPILE(,, aros_implicit_int="yes", aros_implicit_int="no")
342 AC_MSG_RESULT($aros_implicit_int)
343 if test "x-$aros_implicit_int" = "x-yes" ; then
344     aros_cflags_implicit_int=-Wno-implicit-int
347 AC_MSG_CHECKING([whether ${CC} accepts -Waggressive-loop-optimizations])
348 CFLAGS=-Waggressive-loop-optimizations
349 AC_TRY_COMPILE(,, aros_aggressive_loop_optimizations="yes", aros_aggressive_loop_optimizations="no")
350 AC_MSG_RESULT($aros_aggressive_loop_optimizations)
351 if test "x-$aros_aggressive_loop_optimizations" = "x-yes" ; then
352     aros_cflags_aggressive_loop_optimizations=-Wno-aggressive-loop-optimizations
355 AC_MSG_CHECKING([whether ${CC} accepts -Wcpp])
356 CFLAGS=-Wcpp
357 AC_TRY_COMPILE(,, aros_cpp="yes", aros_cpp="no")
358 AC_MSG_RESULT($aros_cpp)
359 if test "x-$aros_cpp" = "x-yes" ; then
360     aros_cflags_cpp=-Wno-cpp
363 AC_MSG_CHECKING([whether ${CC} accepts -Wswitch])
364 CFLAGS=-Wswitch
365 AC_TRY_COMPILE(,, aros_switch="yes", aros_switch="no")
366 AC_MSG_RESULT($aros_switch)
367 if test "x-$aros_switch" = "x-yes" ; then
368     aros_cflags_switch=-Wno-switch
371 AC_MSG_CHECKING([whether ${CC} accepts -Wdiscarded-qualifiers])
372 CFLAGS=-Wdiscarded-qualifiers
373 AC_TRY_COMPILE(,, aros_discarded_qualifiers="yes", aros_discarded_qualifiers="no")
374 AC_MSG_RESULT($aros_discarded_qualifiers)
375 if test "x-$aros_discarded_qualifiers" = "x-yes" ; then
376     aros_cflags_discarded_qualifiers=-Wno-discarded-qualifiers
379 AC_MSG_CHECKING([whether ${CC} accepts -Wsequence-point])
380 CFLAGS=-Wsequence-point
381 AC_TRY_COMPILE(,, aros_sequence_point="yes", aros_sequence_point="no")
382 AC_MSG_RESULT($aros_sequence_point)
383 if test "x-$aros_sequence_point" = "x-yes" ; then
384     aros_cflags_sequence_point=-Wno-sequence-point
387 AC_MSG_CHECKING([whether ${CC} accepts -Wunknown-pragmas])
388 CFLAGS=-Wunknown-pragmas
389 AC_TRY_COMPILE(,, aros_unknown_pragmas="yes", aros_unknown_pragmas="no")
390 AC_MSG_RESULT($aros_unknown_pragmas)
391 if test "x-$aros_unknown_pragmas" = "x-yes" ; then
392     aros_cflags_unknown_pragmas=-Wno-unknown-pragmas
395 AC_MSG_CHECKING([whether ${CC} accepts -Wdiscarded-array-qualifiers])
396 CFLAGS=-Wdiscarded-array-qualifiers
397 AC_TRY_COMPILE(,, aros_discarded_array_qualifiers="yes", aros_discarded_array_qualifiers="no")
398 AC_MSG_RESULT($aros_discarded_array_qualifiers)
399 if test "x-$aros_discarded_array_qualifiers" = "x-yes" ; then
400     aros_cflags_discarded_array_qualifiers=-Wno-discarded-array-qualifiers
403 AC_MSG_CHECKING([whether ${CC} accepts -Wint-conversion])
404 CFLAGS=-Wint-conversion
405 AC_TRY_COMPILE(,, aros_int_conversion="yes", aros_int_conversion="no")
406 AC_MSG_RESULT($aros_int_conversion)
407 if test "x-$aros_int_conversion" = "x-yes" ; then
408     aros_cflags_int_conversion=-Wno-int-conversion
411 AC_MSG_CHECKING([whether ${CC} accepts -Wint-to-pointer-cast])
412 CFLAGS=-Wint-to-pointer-cast
413 AC_TRY_COMPILE(,, aros_int_to_pointer_cast="yes", aros_int_to_pointer_cast="no")
414 AC_MSG_RESULT($aros_int_to_pointer_cast)
415 if test "x-$aros_int_to_pointer_cast" = "x-yes" ; then
416     aros_cflags_int_to_pointer_cast=-Wno-int-to-pointer-cast
419 AC_MSG_CHECKING([whether ${CC} accepts -Wpointer-to-int-cast])
420 CFLAGS=-Wpointer-to-int-cast
421 AC_TRY_COMPILE(,, aros_pointer_to_int_cast="yes", aros_pointer_to_int_cast="no")
422 AC_MSG_RESULT($aros_pointer_to_int_cast)
423 if test "x-$aros_pointer_to_int_cast" = "x-yes" ; then
424     aros_cflags_pointer_to_int_cast=-Wno-pointer-to-int-cast
427 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-const-variable])
428 CFLAGS=-Wunused-const-variable
429 AC_TRY_COMPILE(,, aros_unused_const_variable="yes", aros_unused_const_variable="no")
430 AC_MSG_RESULT($aros_unused_const_variable)
431 if test "x-$aros_unused_const_variable" = "x-yes" ; then
432     aros_cflags_unused_const_variable=-Wno-unused-const-variable
435 AC_MSG_CHECKING([whether ${CC} accepts -Wwrite-strings])
436 CFLAGS=-Wwrite-strings
437 AC_TRY_COMPILE(,, aros_write_strings="yes", aros_write_strings="no")
438 AC_MSG_RESULT($aros_write_strings)
439 if test "x-$aros_write_strings" = "x-yes" ; then
440     aros_cflags_write_strings=-Wno-write-strings
443 AC_MSG_CHECKING([whether ${CC} accepts -Wcomment])
444 CFLAGS=-Wcomment
445 AC_TRY_COMPILE(,, aros_comment="yes", aros_comment="no")
446 AC_MSG_RESULT($aros_comment)
447 if test "x-$aros_comment" = "x-yes" ; then
448     aros_cflags_comment=-Wno-comment
451 AC_MSG_CHECKING([whether ${CC} accepts -Wincompatible-pointer-types])
452 CFLAGS=-Wincompatible-pointer-types
453 AC_TRY_COMPILE(,, aros_incompatible_pointer_types="yes", aros_incompatible_pointer_types="no")
454 AC_MSG_RESULT($aros_incompatible_pointer_types)
455 if test "x-$aros_incompatible_pointer_types" = "x-yes" ; then
456     aros_cflags_incompatible_pointer_types=-Wno-incompatible-pointer-types
459 AC_MSG_CHECKING([whether ${CC} accepts -Wbool-compare])
460 CFLAGS=-Wbool-compare
461 AC_TRY_COMPILE(,, aros_bool_compare="yes", aros_bool_compare="no")
462 AC_MSG_RESULT($aros_bool_compare)
463 if test "x-$aros_bool_compare" = "x-yes" ; then
464     aros_cflags_bool_compare=-Wno-bool-compare
467 AC_MSG_CHECKING([whether ${CC} accepts -Wlogical-not-parentheses])
468 CFLAGS=-Wlogical-not-parentheses
469 AC_TRY_COMPILE(,, aros_logical_not_parentheses="yes", aros_logical_not_parentheses="no")
470 AC_MSG_RESULT($aros_logical_not_parentheses)
471 if test "x-$aros_logical_not_parentheses" = "x-yes" ; then
472     aros_cflags_logical_not_parentheses=-Wno-logical-not-parentheses
475 AC_MSG_CHECKING([whether ${CC} accepts -Wpointer-sign])
476 CFLAGS=-Wpointer-sign
477 AC_TRY_COMPILE(,, aros_pointer_sign="yes", aros_pointer_sign="no")
478 AC_MSG_RESULT($aros_pointer_sign)
479 if test "x-$aros_pointer_sign" = "x-yes" ; then
480     aros_cflags_pointer_sign=-Wno-pointer-sign
483 AC_MSG_CHECKING([whether ${CC} accepts -Wshift-overflow])
484 CFLAGS=-Wshift-overflow
485 AC_TRY_COMPILE(,, aros_shift_overflow="yes", aros_shift_overflow="no")
486 AC_MSG_RESULT($aros_shift_overflow)
487 if test "x-$aros_shift_overflow" = "x-yes" ; then
488     aros_cflags_shift_overflow=-Wno-shift-overflow
491 AC_MSG_CHECKING([whether ${CC} accepts -Wframe-address])
492 CFLAGS=-Wframe-address
493 AC_TRY_COMPILE(,, aros_frame_address="yes", aros_frame_address="no")
494 AC_MSG_RESULT($aros_frame_address)
495 if test "x-$aros_frame_address" = "x-yes" ; then
496     aros_cflags_frame_address=-Wno-frame-address
499 AC_MSG_CHECKING([whether ${CC} accepts -Wdeprecated-declarations])
500 CFLAGS=-Wdeprecated-declarations
501 AC_TRY_COMPILE(,, aros_deprecated_declarations="yes", aros_deprecated_declarations="no")
502 AC_MSG_RESULT($aros_deprecated_declarations)
503 if test "x-$aros_deprecated_declarations" = "x-yes" ; then
504     aros_cflags_deprecated_declarations=-Wno-deprecated-declarations
507 AC_MSG_CHECKING([whether ${CC} accepts -Wsign-compare])
508 CFLAGS=-Wsign-compare
509 AC_TRY_COMPILE(,, aros_sign_compare="yes", aros_sign_compare="no")
510 AC_MSG_RESULT($aros_sign_compare)
511 if test "x-$aros_sign_compare" = "x-yes" ; then
512     aros_cflags_sign_compare=-Wno-sign-compare
515 AC_MSG_CHECKING([whether ${CC} accepts -Wattributes])
516 CFLAGS=-Wattributes
517 AC_TRY_COMPILE(,, aros_attributes="yes", aros_attributes="no")
518 AC_MSG_RESULT($aros_attributes)
519 if test "x-$aros_attributes" = "x-yes" ; then
520     aros_cflags_attributes=-Wno-attributes
523 AC_MSG_CHECKING([whether ${CC} accepts -Woverflow])
524 CFLAGS=-Woverflow
525 AC_TRY_COMPILE(,, aros_overflow="yes", aros_overflow="no")
526 AC_MSG_RESULT($aros_overflow)
527 if test "x-$aros_overflow" = "x-yes" ; then
528     aros_cflags_overflow=-Wno-overflow
531 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-local-typedefs])
532 CFLAGS=-Wunused-local-typedefs
533 AC_TRY_COMPILE(,, aros_unused_local_typedefs="yes", aros_unused_local_typedefs="no")
534 AC_MSG_RESULT($aros_unused_local_typedefs)
535 if test "x-$aros_unused_local_typedefs" = "x-yes" ; then
536     aros_cflags_unused_local_typedefs=-Wno-unused-local-typedefs
539 AC_MSG_CHECKING([whether ${CC} accepts -Wmissing-braces])
540 CFLAGS=-Wmissing-braces
541 AC_TRY_COMPILE(,, aros_missing_braces="yes", aros_missing_braces="no")
542 AC_MSG_RESULT($aros_missing_braces)
543 if test "x-$aros_missing_braces" = "x-yes" ; then
544     aros_cflags_missing_braces=-Wno-missing-braces
547 AC_MSG_CHECKING([whether ${CC} accepts -Wconversion-null])
548 CFLAGS=-Wconversion-null
549 AC_TRY_COMPILE(,, aros_conversion_null="yes", aros_conversion_null="no")
550 AC_MSG_RESULT($aros_conversion_null)
551 if test "x-$aros_conversion_null" = "x-yes" ; then
552     aros_cflags_conversion_null=-Wno-conversion-null
555 AC_MSG_CHECKING([whether ${CC} accepts -Wnarrowing])
556 CFLAGS=-Wnarrowing
557 AC_TRY_COMPILE(,, aros_narrowing="yes", aros_narrowing="no")
558 AC_MSG_RESULT($aros_narrowing)
559 if test "x-$aros_narrowing" = "x-yes" ; then
560     aros_cflags_narrowing=-Wno-narrowing
563 AC_MSG_CHECKING([whether ${CC} accepts -Wvolatile-register-var])
564 CFLAGS=-Wvolatile-register-var
565 AC_TRY_COMPILE(,, aros_volatile_register_var="yes", aros_volatile_register_var="no")
566 AC_MSG_RESULT($aros_volatile_register_var)
567 if test "x-$aros_volatile_register_var" = "x-yes" ; then
568     aros_cflags_volatile_register_var=-Wno-volatile-register-var
571 AC_MSG_CHECKING([whether ${CC} accepts -Wsizeof-pointer-memaccess])
572 CFLAGS=-Wsizeof-pointer-memaccess
573 AC_TRY_COMPILE(,, aros_sizeof_pointer_memaccess="yes", aros_sizeof_pointer_memaccess="no")
574 AC_MSG_RESULT($aros_sizeof_pointer_memaccess)
575 if test "x-$aros_sizeof_pointer_memaccess" = "x-yes" ; then
576     aros_cflags_sizeof_pointer_memaccess=-Wno-sizeof-pointer-memaccess
579 AC_MSG_CHECKING([whether ${CC} accepts -Wreturn-type])
580 CFLAGS=-Wreturn-type
581 AC_TRY_COMPILE(,, aros_return_type="yes", aros_return_type="no")
582 AC_MSG_RESULT($aros_return_type)
583 if test "x-$aros_return_type" = "x-yes" ; then
584     aros_cflags_return_type=-Wno-return-type
587 AC_SUBST(aros_cflags_lto)
588 AC_SUBST(aros_cflags_loop_block)
589 AC_SUBST(aros_cflags_loop_interchange)
590 AC_SUBST(aros_cflags_loop_strip_mine)
592 AC_SUBST(aros_cflags_iquote)
593 AC_SUBST(aros_cflags_iquote_end)
595 AC_SUBST(aros_cflags_unused_command_line_argument)
596 AC_SUBST(aros_cflags_unknown_warning_option)
597 AC_SUBST(aros_cflags_unused_but_set_variable)
598 AC_SUBST(aros_cflags_strict_aliasing)
599 AC_SUBST(aros_cflags_array_bounds)
600 AC_SUBST(aros_cflags_enum_compare)
601 AC_SUBST(aros_cflags_strict_prototypes)
602 AC_SUBST(aros_cflags_strict_overflow)
603 AC_SUBST(aros_cflags_format_security)
604 AC_SUBST(aros_cflags_misleading_indentation)
605 AC_SUBST(aros_cflags_nonnull_compare)
606 AC_SUBST(aros_cflags_unused)
607 AC_SUBST(aros_cflags_unused_value)
608 AC_SUBST(aros_cflags_unused_variable)
609 AC_SUBST(aros_cflags_unused_function)
610 AC_SUBST(aros_cflags_unused_parameter)
611 AC_SUBST(aros_cflags_uninitialized)
612 AC_SUBST(aros_cflags_maybe_uninitialized)
613 AC_SUBST(aros_cflags_implicit_function_declaration)
614 AC_SUBST(aros_cflags_format)
615 AC_SUBST(aros_cflags_parentheses)
616 AC_SUBST(aros_cflags_char_subscripts)
617 AC_SUBST(aros_cflags_endif_labels)
618 AC_SUBST(aros_cflags_format_contains_nul)
619 AC_SUBST(aros_cflags_implicit_int)
620 AC_SUBST(aros_cflags_aggressive_loop_optimizations)
621 AC_SUBST(aros_cflags_cpp)
622 AC_SUBST(aros_cflags_switch)
623 AC_SUBST(aros_cflags_discarded_qualifiers)
624 AC_SUBST(aros_cflags_sequence_point)
625 AC_SUBST(aros_cflags_unknown_pragmas)
626 AC_SUBST(aros_cflags_discarded_array_qualifiers)
627 AC_SUBST(aros_cflags_int_conversion)
628 AC_SUBST(aros_cflags_int_to_pointer_cast)
629 AC_SUBST(aros_cflags_pointer_to_int_cast)
630 AC_SUBST(aros_cflags_unused_const_variable)
631 AC_SUBST(aros_cflags_write_strings)
632 AC_SUBST(aros_cflags_comment)
633 AC_SUBST(aros_cflags_incompatible_pointer_types)
634 AC_SUBST(aros_cflags_bool_compare)
635 AC_SUBST(aros_cflags_logical_not_parentheses)
636 AC_SUBST(aros_cflags_pointer_sign)
637 AC_SUBST(aros_cflags_shift_overflow)
638 AC_SUBST(aros_cflags_frame_address)
639 AC_SUBST(aros_cflags_deprecated_declarations)
640 AC_SUBST(aros_cflags_sign_compare)
641 AC_SUBST(aros_cflags_attributes)
642 AC_SUBST(aros_cflags_overflow)
643 AC_SUBST(aros_cflags_unused_local_typedefs)
644 AC_SUBST(aros_cflags_missing_braces)
645 AC_SUBST(aros_cflags_conversion_null)
646 AC_SUBST(aros_cflags_narrowing)
647 AC_SUBST(aros_cflags_volatile_register_var)
648 AC_SUBST(aros_cflags_sizeof_pointer_memaccess)
649 AC_SUBST(aros_cflags_return_type)
651 AC_CONFIG_FILES(
652     ${aros_targetcfg_dir}/compiler.cfg:compiler.cfg.in
655 AC_OUTPUT