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