remove trailing blanks.
[AROS.git] / config / features.in
blobfd26d04dba96709c53d94a1484389f436a8f2ae0
1 dnl Copyright © 1997-2019, 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 #  -fexceptions
38 #  -fpermissive
39 #  -frtti
40 #  -ffast-math
41 #  -flto
42 #  -fwhole-program
43 #  -floop-block
44 #  -floop-interchange
45 #  -floop-strip-mine
46 #  -fpeel-loops
47 #  -fstrict-aliasing
48 #  -finline-small-functions
49 #  -fipa-cp
50 #  -funroll-loops
51 #  -fomit-frame-pointer
52 #  -fprofile-arcs
53 #  -ftest-coverage
54 #  -faligned-new
56 #  -fno-builtin
57 #  -fno-builtin-floor
58 #  -fno-builtin-vsnprintf
60 AC_MSG_CHECKING([whether ${CC} accepts -fexceptions])
61 CFLAGS=-fexceptions
62 AC_TRY_COMPILE(,, aros_exceptions="yes", aros_exceptions="no")
63 AC_MSG_RESULT($aros_exceptions)
64 if test "x-$aros_exceptions" = "x-yes" ; then
65     aros_cflags_exceptions=-fexceptions
66     aros_cflags_noexceptions=-fno-exceptions
69 AC_MSG_CHECKING([whether ${CC} accepts -fpermissive])
70 CFLAGS=-fpermissive
71 AC_TRY_COMPILE(,, aros_permissive="yes", aros_permissive="no")
72 AC_MSG_RESULT($aros_permissive)
73 if test "x-$aros_permissive" = "x-yes" ; then
74     aros_cflags_permissive=-fpermissive
75     aros_cflags_nopermissive=-fno-permissive
78 AC_MSG_CHECKING([whether ${CC} accepts -frtti])
79 CFLAGS=-frtti
80 AC_TRY_COMPILE(,, aros_rtti="yes", aros_rtti="no")
81 AC_MSG_RESULT($aros_rtti)
82 if test "x-$aros_rtti" = "x-yes" ; then
83     aros_cflags_rtti=-frtti
84     aros_cflags_nortti=-fno-rtti
87 AC_MSG_CHECKING([whether ${CC} accepts -ffast-math])
88 CFLAGS=-ffast-math
89 AC_TRY_COMPILE(,, aros_fast_math="yes", aros_fast_math="no")
90 AC_MSG_RESULT($aros_fast_math)
91 if test "x-$aros_fast_math" = "x-yes" ; then
92     aros_cflags_fast_math=-ffast-math
95 AC_MSG_CHECKING([whether ${CC} accepts -flto])
96 CFLAGS=-flto
97 AC_TRY_COMPILE(,, aros_lto="yes", aros_lto="no")
98 AC_MSG_RESULT($aros_lto)
99 if test "x-$aros_lto" = "x-yes" ; then
100     aros_cflags_lto=-flto
101     aros_cflags_nolto=-fno-lto
102     
103     AC_MSG_CHECKING([whether ${CC} accepts -fwhole-program])
104     CFLAGS=-fwhole-program
105     AC_TRY_COMPILE(,, aros_whole_program="yes", aros_whole_program="no")
106     AC_MSG_RESULT($aros_whole_program)
107     if test "x-$aros_whole_program" = "x-yes" ; then
108         aros_cflags_whole_program=-fwhole-program
109     fi
110     
111     AC_MSG_CHECKING([whether ${CC} accepts -floop-block])
112     CFLAGS=-floop-block
113     AC_TRY_COMPILE(,, aros_loop_block="yes", aros_loop_block="no")
114     AC_MSG_RESULT($aros_loop_block)
115     if test "x-$aros_loop_block" = "x-yes" ; then
116         aros_cflags_loop_block=-floop-block
117     fi
118     
119     AC_MSG_CHECKING([whether ${CC} accepts -floop-interchange])
120     CFLAGS=-floop-interchange
121     AC_TRY_COMPILE(,, aros_loop_interchange="yes", aros_loop_interchange="no")
122     AC_MSG_RESULT($aros_loop_interchange)
123     if test "x-$aros_loop_interchange" = "x-yes" ; then
124         aros_cflags_loop_interchange=-floop-interchange
125     fi
126     
127     AC_MSG_CHECKING([whether ${CC} accepts -floop-strip-mine])
128     CFLAGS=-floop-strip-mine
129     AC_TRY_COMPILE(,, aros_loop_strip_mine="yes", aros_loop_strip_mine="no")
130     AC_MSG_RESULT($aros_loop_strip_mine)
131     if test "x-$aros_loop_strip_mine" = "x-yes" ; then
132         aros_cflags_loop_strip_mine=-floop-strip-mine
133     fi
136 AC_MSG_CHECKING([whether ${CC} accepts -fpeel-loops])
137 CFLAGS=-fpeel-loops
138 AC_TRY_COMPILE(,, aros_peel_loops="yes", aros_peel_loops="no")
139 AC_MSG_RESULT($aros_peel_loops)
140 if test "x-$aros_peel_loops" = "x-yes" ; then
141     aros_cflags_peel_loops=-fpeel-loops
144 AC_MSG_CHECKING([whether ${CC} accepts -funroll-loops])
145 CFLAGS=-funroll-loops
146 AC_TRY_COMPILE(,, aros_unroll_loops="yes", aros_unroll_loops="no")
147 AC_MSG_RESULT($aros_unroll_loops)
148 if test "x-$aros_unroll_loops" = "x-yes" ; then
149     aros_cflags_unroll_loops=-funroll-loops
152 AC_MSG_CHECKING([whether ${CC} accepts -fstrict-aliasing])
153 CFLAGS=-fstrict-aliasing
154 AC_TRY_COMPILE(,, aros_strict_aliasing="yes", aros_strict_aliasing="no")
155 AC_MSG_RESULT($aros_strict_aliasing)
156 if test "x-$aros_strict_aliasing" = "x-yes" ; then
157     aros_cflags_strictaliasing=-fstrict-aliasing
158     aros_cflags_nostrictaliasing=-fno-strict-aliasing
161 AC_MSG_CHECKING([whether ${CC} accepts -finline-small-functions])
162 CFLAGS=-finline-small-functions
163 AC_TRY_COMPILE(,, aros_inline_small_functions="yes", aros_inline_small_functions="no")
164 AC_MSG_RESULT($aros_inline_small_functions)
165 if test "x-$aros_inline_small_functions" = "x-yes" ; then
166     aros_cflags_inlinesmallfunctions=-finline-small-functions
167     aros_cflags_noinlinesmallfunctions=-fno-inline-small-functions
170 AC_MSG_CHECKING([whether ${CC} accepts -fipa-cp])
171 CFLAGS=-fipa-cp
172 AC_TRY_COMPILE(,, aros_ipa_cp="yes", aros_ipa_cp="no")
173 AC_MSG_RESULT($aros_ipa_cp)
174 if test "x-$aros_ipa_cp" = "x-yes" ; then
175     aros_cflags_ipacp=-fipa-cp
176     aros_cflags_noipacp=-fno-ipa-cp
179 AC_MSG_CHECKING([whether ${CC} accepts -fomit-frame-pointer])
180 CFLAGS=-fomit-frame-pointer
181 AC_TRY_COMPILE(,, aros_omit_frame_pointer="yes", aros_omit_frame_pointer="no")
182 AC_MSG_RESULT($aros_omit_frame_pointer)
183 if test "x-$aros_omit_frame_pointer" = "x-yes" ; then
184     aros_cflags_omitfp=-fomit-frame-pointer
185     aros_cflags_noomitfp=-fno-omit-frame-pointer
188 AC_MSG_CHECKING([whether ${CC} accepts -fprofile-arcs])
189 CFLAGS=-fprofile-arcs
190 AC_TRY_COMPILE(,, aros_profile_arcs="yes", aros_profile_arcs="no")
191 AC_MSG_RESULT($aros_profile_arcs)
192 if test "x-$aros_profile_arcs" = "x-yes" ; then
193     aros_cflags_profilearcs=-fprofile-arcs
194     aros_cflags_noprofilearcs=-fno-profile-arcs
197 AC_MSG_CHECKING([whether ${CC} accepts -ftest-coverage])
198 CFLAGS=-ftest-coverage
199 AC_TRY_COMPILE(,, aros_test_coverage="yes", aros_test_coverage="no")
200 AC_MSG_RESULT($aros_test_coverage)
201 if test "x-$aros_test_coverage" = "x-yes" ; then
202     aros_cflags_testcoverage=-ftest-coverage
203     aros_cflags_notestcoverage=-fno-test-coverage
206 AC_MSG_CHECKING([whether ${CC} accepts -faligned-new])
207 CFLAGS=-faligned-new
208 AC_TRY_COMPILE(,, aros_aligned_new="yes", aros_aligned_new="no")
209 AC_MSG_RESULT($aros_aligned_new)
210 if test "x-$aros_aligned_new" = "x-yes" ; then
211     aros_cflags_alignednew=-faligned-new
212     aros_cflags_noalignednew=-fno-aligned-new
215 AC_MSG_CHECKING([whether ${CC} accepts -fno-builtin])
216 CFLAGS=-fno-builtin
217 AC_TRY_COMPILE(,, aros_no_builtin="yes", aros_no_builtin="no")
218 AC_MSG_RESULT($aros_no_builtin)
219 if test "x-$aros_no_builtin" = "x-yes" ; then
220     aros_cflags_no_builtin=-fno-builtin
223 AC_MSG_CHECKING([whether ${CC} accepts -fno-builtin-floor])
224 CFLAGS=-fno-builtin-floor
225 AC_TRY_COMPILE(,, aros_no_builtin_floor="yes", aros_no_builtin_floor="no")
226 AC_MSG_RESULT($aros_no_builtin_floor)
227 if test "x-$aros_no_builtin_floor" = "x-yes" ; then
228     aros_cflags_no_builtin_floor=-fno-builtin-floor
231 AC_MSG_CHECKING([whether ${CC} accepts -fno-builtin-vsnprintf])
232 CFLAGS=-fno-builtin-vsnprintf
233 AC_TRY_COMPILE(,, aros_no_builtin_vsnprintf="yes", aros_no_builtin_vsnprintf="no")
234 AC_MSG_RESULT($aros_no_builtin_vsnprintf)
235 if test "x-$aros_no_builtin_vsnprintf" = "x-yes" ; then
236     aros_cflags_no_builtin_vsnprintf=-fno-builtin-vsnprintf
239 #-----------------------------------------------------------------------------
241 # Check if the target compiler supports some include directory options:
243 AC_MSG_CHECKING([whether ${CC} accepts -iquote])
244 CFLAGS="-iquote."
245 AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no")
246 AC_MSG_RESULT($has_iquote)
247 if test "x-$has_iquote" = "x-yes" ; then
248     aros_cflags_iquote=-iquote
249     aros_cflags_iquote_end=
250 else
251     aros_cflags_iquote=-I
252     aros_cflags_iquote_end=-I-
255 AC_MSG_CHECKING([whether ${CC} accepts -isystem])
256 CFLAGS="-isystem."
257 AC_TRY_COMPILE(,, has_isystem="yes", has_isystem="no")
258 AC_MSG_RESULT($has_isystem)
259 if test "x-$has_isystem" = "x-yes" ; then
260     aros_cflags_isystem=-isystem
261     aros_cflags_isystem_end=
262 else
263     aros_cflags_isystem=-I
264     aros_cflags_isystem_end=
267 #-----------------------------------------------------------------------------
269 # Check if the target compiler supports some ISA options:
270 #  -mno-red-zone
272 AC_MSG_CHECKING([whether ${CC} accepts -mno-red-zone])
273 CFLAGS=-mno-red-zone
274 AC_TRY_COMPILE(,, aros_no_red_zone="yes", aros_no_red_zone="no")
275 AC_MSG_RESULT($aros_no_red_zone)
276 if test "x-$aros_no_red_zone" = "x-yes" ; then
277     aros_cflags_no_red_zone=-mno-red-zone
280 #-----------------------------------------------------------------------------
282 # Check if the target compiler supports some options used for de-linting:
283 #  -Werror
284 #  -Wall
285 #  -Wrestrict
286 #  -Wunused-command-line-argument
287 #  -Wunknown-warning-option
288 #  -Wunused-but-set-variable
289 #  -Wstrict-aliasing
290 #  -Warray-bounds
291 #  -Wenum-compare
292 #  -Wstrict-prototypes
293 #  -Wstrict-overflow
294 #  -Wformat-security
295 #  -Wmisleading-indentation
296 #  -Wnonnull-compare
297 #  -Wunused
298 #  -Wunused-label
299 #  -Wunused-value
300 #  -Wunused-variable
301 #  -Wunused-function
302 #  -Wunused-parameter
303 #  -Wuninitialized
304 #  -Wmaybe-uninitialized
305 #  -Wimplicit-function-declaration
306 #  -Wformat
307 #  -Wparentheses
308 #  -Wchar-subscripts
309 #  -Wendif-labels
310 #  -Wformat-contains-nul
311 #  -Wimplicit-int
312 #  -Waggressive-loop-optimizations
313 #  -Wcpp
314 #  -Wswitch
315 #  -Wdiscarded-qualifiers
316 #  -Wsequence-point
317 #  -Wunknown-pragmas
318 #  -Wdiscarded-array-qualifiers
319 #  -Wint-conversion
320 #  -Wint-to-pointer-cast
321 #  -Wpointer-to-int-cast
322 #  -Wunused-const-variable
323 #  -Wwrite-strings 
324 #  -Wcomment
325 #  -Wincompatible-pointer-types
326 #  -Wbool-compare
327 #  -Wlogical-not-parentheses
328 #  -Wpointer-sign
329 #  -Wshift-overflow
330 #  -Wframe-address
331 #  -Wdeprecated-declarations
332 #  -Wsign-compare
333 #  -Wattributes
334 #  -Woverflow
335 #  -Wunused-local-typedefs
336 #  -Wmissing-braces
337 #  -Wconversion-null
338 #  -Wnarrowing
339 #  -Wvolatile-register-var
340 #  -Wsizeof-pointer-memaccess
341 #  -Wreturn-type
342 #  -Wformat-zero-length
343 #  -Wlto-type-mismatch
344 #  -Wtautological-compare
345 #  -Wempty-body
346 #  -Wformat-overflow
347 #  -Wstringop-overflow
348 #  -Wformat-truncation
349 #  -Wstringop-truncation
350 #  -Wshift-negative-value
351 #  -Wmissing-field-initializers
352 #  -Wimplicit-fallthrough
353 #  -Wmissing-prototypes
354 #  -Wclass-memaccess
355 #  -Wint-in-bool-context
357 AC_MSG_CHECKING([whether ${CC} accepts -Werror])
358 CFLAGS=-Werror
359 AC_TRY_COMPILE(,, aros_error="yes", aros_error="no")
360 AC_MSG_RESULT($aros_error)
361 if test "x-$aros_error" = "x-yes" ; then
362     aros_warnflags_error=-Werror
363     aros_nowarnflags_error=-Wno-error
366 AC_MSG_CHECKING([whether ${CC} accepts -Wall])
367 CFLAGS=-Wall
368 AC_TRY_COMPILE(,, aros_all="yes", aros_all="no")
369 AC_MSG_RESULT($aros_all)
370 if test "x-$aros_all" = "x-yes" ; then
371     aros_warnflags_all=-Wall
374 AC_MSG_CHECKING([whether ${CC} accepts -Wrestrict])
375 CFLAGS=-Wrestrict
376 AC_TRY_COMPILE(,, aros_restrict="yes", aros_restrict="no")
377 AC_MSG_RESULT($aros_restrict)
378 if test "x-$aros_restrict" = "x-yes" ; then
379     aros_warnflags_restrict=-Wrestrict
380     aros_nowarnflags_restrict=-Wno-restrict
383 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-command-line-argument])
384 CFLAGS=-Wunused-command-line-argument
385 AC_TRY_COMPILE(,, aros_unused_command_line_argument="yes", aros_unused_command_line_argument="no")
386 AC_MSG_RESULT($aros_unused_command_line_argument)
387 if test "x-$aros_unused_command_line_argument" = "x-yes" ; then
388     aros_warnflags_unused_command_line_argument=-Wunused-command-line-argument
389     aros_nowarnflags_unused_command_line_argument=-Wno-unused-command-line-argument
392 AC_MSG_CHECKING([whether ${CC} accepts -Wunknown-warning-option])
393 CFLAGS=-Wunknown-warning-option
394 AC_TRY_COMPILE(,, aros_unknown_warning_option="yes", aros_unknown_warning_option="no")
395 AC_MSG_RESULT($aros_unknown_warning_option)
396 if test "x-$aros_unknown_warning_option" = "x-yes" ; then
397     aros_warnflags_unknown_warning_option=-Wunknown-warning-option
398     aros_nowarnflags_unknown_warning_option=-Wno-unknown-warning-option
401 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-but-set-variable])
402 CFLAGS=-Wunused-but-set-variable
403 AC_TRY_COMPILE(,, aros_unused_but_set_variable="yes", aros_unused_but_set_variable="no")
404 AC_MSG_RESULT($aros_unused_but_set_variable)
405 if test "x-$aros_unused_but_set_variable" = "x-yes" ; then
406     aros_warnflags_unused_but_set_variable=-Wunused-but-set-variable
407     aros_nowarnflags_unused_but_set_variable=-Wno-unused-but-set-variable
410 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-aliasing])
411 CFLAGS=-Wstrict-aliasing
412 AC_TRY_COMPILE(,, aros_strict_aliasing="yes", aros_strict_aliasing="no")
413 AC_MSG_RESULT($aros_strict_aliasing)
414 if test "x-$aros_strict_aliasing" = "x-yes" ; then
415     aros_warnflags_strict_aliasing=-Wstrict-aliasing
416     aros_nowarnflags_strict_aliasing=-Wno-strict-aliasing
419 AC_MSG_CHECKING([whether ${CC} accepts -Warray-bounds])
420 CFLAGS=-Warray-bounds
421 AC_TRY_COMPILE(,, aros_array_bounds="yes", aros_array_bounds="no")
422 AC_MSG_RESULT($aros_array_bounds)
423 if test "x-$aros_array_bounds" = "x-yes" ; then
424     aros_warnflags_array_bounds=-Warray-bounds
425     aros_nowarnflags_array_bounds=-Wno-array-bounds
428 AC_MSG_CHECKING([whether ${CC} accepts -Wenum-compare])
429 CFLAGS=-Wenum-compare
430 AC_TRY_COMPILE(,, aros_enum_compare="yes", aros_enum_compare="no")
431 AC_MSG_RESULT($aros_enum_compare)
432 if test "x-$aros_enum_compare" = "x-yes" ; then
433     aros_warnflags_enum_compare=-Wenum-compare
434     aros_nowarnflags_enum_compare=-Wno-enum-compare
437 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-prototypes])
438 CFLAGS=-Wstrict-prototypes
439 AC_TRY_COMPILE(,, aros_strict_prototypes="yes", aros_strict_prototypes="no")
440 AC_MSG_RESULT($aros_strict_prototypes)
441 if test "x-$aros_strict_prototypes" = "x-yes" ; then
442     aros_warnflags_strict_prototypes=-Wstrict-prototypes
443     aros_nowarnflags_strict_prototypes=-Wno-strict-prototypes
446 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-overflow])
447 CFLAGS=-Wstrict-overflow
448 AC_TRY_COMPILE(,, aros_strict_overflow="yes", aros_strict_overflow="no")
449 AC_MSG_RESULT($aros_strict_overflow)
450 if test "x-$aros_strict_overflow" = "x-yes" ; then
451     aros_warnflags_strict_overflow=-Wstrict-overflow
452     aros_nowarnflags_strict_overflow=-Wno-strict-overflow
455 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-security])
456 CFLAGS=-Wformat-security
457 AC_TRY_COMPILE(,, aros_format_security="yes", aros_format_security="no")
458 AC_MSG_RESULT($aros_format_security)
459 if test "x-$aros_format_security" = "x-yes" ; then
460     aros_warnflags_format_security=-Wformat-security
461     aros_nowarnflags_format_security=-Wno-format-security
464 AC_MSG_CHECKING([whether ${CC} accepts -Wmisleading-indentation])
465 CFLAGS=-Wmisleading-indentation
466 AC_TRY_COMPILE(,, aros_misleading_indentation="yes", aros_misleading_indentation="no")
467 AC_MSG_RESULT($aros_misleading_indentation)
468 if test "x-$aros_misleading_indentation" = "x-yes" ; then
469     aros_warnflags_misleading_indentation=-Wmisleading-indentation
470     aros_nowarnflags_misleading_indentation=-Wno-misleading-indentation
473 AC_MSG_CHECKING([whether ${CC} accepts -Wnonnull-compare])
474 CFLAGS=-Wnonnull-compare
475 AC_TRY_COMPILE(,, aros_nonnull_compare="yes", aros_nonnull_compare="no")
476 AC_MSG_RESULT($aros_nonnull_compare)
477 if test "x-$aros_nonnull_compare" = "x-yes" ; then
478     aros_warnflags_nonnull_compare=-Wnonnull-compare
479     aros_nowarnflags_nonnull_compare=-Wno-nonnull-compare
482 AC_MSG_CHECKING([whether ${CC} accepts -Wunused])
483 CFLAGS=-Wunused
484 AC_TRY_COMPILE(,, aros_unused="yes", aros_unused="no")
485 AC_MSG_RESULT($aros_unused)
486 if test "x-$aros_unused" = "x-yes" ; then
487     aros_warnflags_unused=-Wunused
488     aros_nowarnflags_unused=-Wno-unused
491 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-label])
492 CFLAGS=-Wunused-label
493 AC_TRY_COMPILE(,, aros_unused_label="yes", aros_unused_label="no")
494 AC_MSG_RESULT($aros_unused_label)
495 if test "x-$aros_unused_label" = "x-yes" ; then
496     aros_warnflags_unused_label=-Wunused-label
497     aros_nowarnflags_unused_label=-Wno-unused-label
500 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-value])
501 CFLAGS=-Wunused-value
502 AC_TRY_COMPILE(,, aros_unused_value="yes", aros_unused_value="no")
503 AC_MSG_RESULT($aros_unused_value)
504 if test "x-$aros_unused_value" = "x-yes" ; then
505     aros_warnflags_unused_value=-Wunused-value
506     aros_nowarnflags_unused_value=-Wno-unused-value
509 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-variable])
510 CFLAGS=-Wunused-variable
511 AC_TRY_COMPILE(,, aros_unused_variable="yes", aros_unused_variable="no")
512 AC_MSG_RESULT($aros_unused_variable)
513 if test "x-$aros_unused_variable" = "x-yes" ; then
514     aros_warnflags_unused_variable=-Wunused-variable
515     aros_nowarnflags_unused_variable=-Wno-unused-variable
518 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-function])
519 CFLAGS=-Wunused-function
520 AC_TRY_COMPILE(,, aros_unused_function="yes", aros_unused_function="no")
521 AC_MSG_RESULT($aros_unused_function)
522 if test "x-$aros_unused_function" = "x-yes" ; then
523     aros_warnflags_unused_function=-Wunused-function
524     aros_nowarnflags_unused_function=-Wno-unused-function
527 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-parameter])
528 CFLAGS=-Wunused-parameter
529 AC_TRY_COMPILE(,, aros_unused_parameter="yes", aros_unused_parameter="no")
530 AC_MSG_RESULT($aros_unused_parameter)
531 if test "x-$aros_unused_parameter" = "x-yes" ; then
532     aros_warnflags_unused_parameter=-Wunused-parameter
533     aros_nowarnflags_unused_parameter=-Wno-unused-parameter
536 AC_MSG_CHECKING([whether ${CC} accepts -Wuninitialized])
537 CFLAGS=-Wuninitialized
538 AC_TRY_COMPILE(,, aros_uninitialized="yes", aros_uninitialized="no")
539 AC_MSG_RESULT($aros_uninitialized)
540 if test "x-$aros_uninitialized" = "x-yes" ; then
541     aros_warnflags_uninitialized=-Wuninitialized
542     aros_nowarnflags_uninitialized=-Wno-uninitialized
545 AC_MSG_CHECKING([whether ${CC} accepts -Wmaybe-uninitialized])
546 CFLAGS=-Wmaybe-uninitialized
547 AC_TRY_COMPILE(,, aros_maybe_uninitialized="yes", aros_maybe_uninitialized="no")
548 AC_MSG_RESULT($aros_maybe_uninitialized)
549 if test "x-$aros_maybe_uninitialized" = "x-yes" ; then
550     aros_warnflags_maybe_uninitialized=-Wmaybe-uninitialized
551     aros_nowarnflags_maybe_uninitialized=-Wno-maybe-uninitialized
552 else
553     aros_warnflags_maybe_uninitialized=$aros_warnflags_uninitialized
554     aros_nowarnflags_maybe_uninitialized=$aros_nowarnflags_uninitialized
557 AC_MSG_CHECKING([whether ${CC} accepts -Wimplicit-function-declaration])
558 CFLAGS=-Wimplicit-function-declaration
559 AC_TRY_COMPILE(,, aros_implicit_function_declaration="yes", aros_implicit_function_declaration="no")
560 AC_MSG_RESULT($aros_implicit_function_declaration)
561 if test "x-$aros_implicit_function_declaration" = "x-yes" ; then
562     aros_warnflags_implicit_function_declaration=-Wimplicit-function-declaration
563     aros_nowarnflags_implicit_function_declaration=-Wno-implicit-function-declaration
566 AC_MSG_CHECKING([whether ${CC} accepts -Wformat])
567 CFLAGS=-Wformat
568 AC_TRY_COMPILE(,, aros_format="yes", aros_format="no")
569 AC_MSG_RESULT($aros_format)
570 if test "x-$aros_format" = "x-yes" ; then
571     aros_warnflags_format=-Wformat
572     aros_nowarnflags_format=-Wno-format
575 AC_MSG_CHECKING([whether ${CC} accepts -Wparentheses])
576 CFLAGS=-Wparentheses
577 AC_TRY_COMPILE(,, aros_parentheses="yes", aros_parentheses="no")
578 AC_MSG_RESULT($aros_parentheses)
579 if test "x-$aros_parentheses" = "x-yes" ; then
580     aros_warnflags_parentheses=-Wparentheses
581     aros_nowarnflags_parentheses=-Wno-parentheses
584 AC_MSG_CHECKING([whether ${CC} accepts -Wchar-subscripts])
585 CFLAGS=-Wchar-subscripts
586 AC_TRY_COMPILE(,, aros_char_subscripts="yes", aros_char_subscripts="no")
587 AC_MSG_RESULT($aros_char_subscripts)
588 if test "x-$aros_char_subscripts" = "x-yes" ; then
589     aros_warnflags_char_subscripts=-Wchar-subscripts
590     aros_nowarnflags_char_subscripts=-Wno-char-subscripts
593 AC_MSG_CHECKING([whether ${CC} accepts -Wendif-labels])
594 CFLAGS=-Wendif-labels
595 AC_TRY_COMPILE(,, aros_endif_labels="yes", aros_endif_labels="no")
596 AC_MSG_RESULT($aros_endif_labels)
597 if test "x-$aros_endif_labels" = "x-yes" ; then
598     aros_warnflags_endif_labels=-Wendif-labels
599     aros_nowarnflags_endif_labels=-Wno-endif-labels
602 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-contains-nul])
603 CFLAGS=-Wformat-contains-nul
604 AC_TRY_COMPILE(,, aros_format_contains_nul="yes", aros_format_contains_nul="no")
605 AC_MSG_RESULT($aros_format_contains_nul)
606 if test "x-$aros_format_contains_nul" = "x-yes" ; then
607     aros_warnflags_format_contains_nul=-Wformat-contains-nul
608     aros_nowarnflags_format_contains_nul=-Wno-format-contains-nul
611 AC_MSG_CHECKING([whether ${CC} accepts -Wimplicit-int])
612 CFLAGS=-Wimplicit-int
613 AC_TRY_COMPILE(,, aros_implicit_int="yes", aros_implicit_int="no")
614 AC_MSG_RESULT($aros_implicit_int)
615 if test "x-$aros_implicit_int" = "x-yes" ; then
616     aros_warnflags_implicit_int=-Wimplicit-int
617     aros_nowarnflags_implicit_int=-Wno-implicit-int
620 AC_MSG_CHECKING([whether ${CC} accepts -Waggressive-loop-optimizations])
621 CFLAGS=-Waggressive-loop-optimizations
622 AC_TRY_COMPILE(,, aros_aggressive_loop_optimizations="yes", aros_aggressive_loop_optimizations="no")
623 AC_MSG_RESULT($aros_aggressive_loop_optimizations)
624 if test "x-$aros_aggressive_loop_optimizations" = "x-yes" ; then
625     aros_warnflags_aggressive_loop_optimizations=-Waggressive-loop-optimizations
626     aros_nowarnflags_aggressive_loop_optimizations=-Wno-aggressive-loop-optimizations
629 AC_MSG_CHECKING([whether ${CC} accepts -Wcpp])
630 CFLAGS=-Wcpp
631 AC_TRY_COMPILE(,, aros_cpp="yes", aros_cpp="no")
632 AC_MSG_RESULT($aros_cpp)
633 if test "x-$aros_cpp" = "x-yes" ; then
634     aros_warnflags_cpp=-Wcpp
635     aros_nowarnflags_cpp=-Wno-cpp
638 AC_MSG_CHECKING([whether ${CC} accepts -Wswitch])
639 CFLAGS=-Wswitch
640 AC_TRY_COMPILE(,, aros_switch="yes", aros_switch="no")
641 AC_MSG_RESULT($aros_switch)
642 if test "x-$aros_switch" = "x-yes" ; then
643     aros_warnflags_switch=-Wswitch
644     aros_nowarnflags_switch=-Wno-switch
647 AC_MSG_CHECKING([whether ${CC} accepts -Wdiscarded-qualifiers])
648 CFLAGS=-Wdiscarded-qualifiers
649 AC_TRY_COMPILE(,, aros_discarded_qualifiers="yes", aros_discarded_qualifiers="no")
650 AC_MSG_RESULT($aros_discarded_qualifiers)
651 if test "x-$aros_discarded_qualifiers" = "x-yes" ; then
652     aros_warnflags_discarded_qualifiers=-Wdiscarded-qualifiers
653     aros_nowarnflags_discarded_qualifiers=-Wno-discarded-qualifiers
656 AC_MSG_CHECKING([whether ${CC} accepts -Wsequence-point])
657 CFLAGS=-Wsequence-point
658 AC_TRY_COMPILE(,, aros_sequence_point="yes", aros_sequence_point="no")
659 AC_MSG_RESULT($aros_sequence_point)
660 if test "x-$aros_sequence_point" = "x-yes" ; then
661     aros_warnflags_sequence_point=-Wsequence-point
662     aros_nowarnflags_sequence_point=-Wno-sequence-point
665 AC_MSG_CHECKING([whether ${CC} accepts -Wunknown-pragmas])
666 CFLAGS=-Wunknown-pragmas
667 AC_TRY_COMPILE(,, aros_unknown_pragmas="yes", aros_unknown_pragmas="no")
668 AC_MSG_RESULT($aros_unknown_pragmas)
669 if test "x-$aros_unknown_pragmas" = "x-yes" ; then
670     aros_warnflags_unknown_pragmas=-Wunknown-pragmas
671     aros_nowarnflags_unknown_pragmas=-Wno-unknown-pragmas
674 AC_MSG_CHECKING([whether ${CC} accepts -Wdiscarded-array-qualifiers])
675 CFLAGS=-Wdiscarded-array-qualifiers
676 AC_TRY_COMPILE(,, aros_discarded_array_qualifiers="yes", aros_discarded_array_qualifiers="no")
677 AC_MSG_RESULT($aros_discarded_array_qualifiers)
678 if test "x-$aros_discarded_array_qualifiers" = "x-yes" ; then
679     aros_warnflags_discarded_array_qualifiers=-Wdiscarded-array-qualifiers
680     aros_nowarnflags_discarded_array_qualifiers=-Wno-discarded-array-qualifiers
683 AC_MSG_CHECKING([whether ${CC} accepts -Wint-conversion])
684 CFLAGS=-Wint-conversion
685 AC_TRY_COMPILE(,, aros_int_conversion="yes", aros_int_conversion="no")
686 AC_MSG_RESULT($aros_int_conversion)
687 if test "x-$aros_int_conversion" = "x-yes" ; then
688     aros_warnflags_int_conversion=-Wint-conversion
689     aros_nowarnflags_int_conversion=-Wno-int-conversion
692 AC_MSG_CHECKING([whether ${CC} accepts -Wint-to-pointer-cast])
693 CFLAGS=-Wint-to-pointer-cast
694 AC_TRY_COMPILE(,, aros_int_to_pointer_cast="yes", aros_int_to_pointer_cast="no")
695 AC_MSG_RESULT($aros_int_to_pointer_cast)
696 if test "x-$aros_int_to_pointer_cast" = "x-yes" ; then
697     aros_warnflags_int_to_pointer_cast=-Wint-to-pointer-cast
698     aros_nowarnflags_int_to_pointer_cast=-Wno-int-to-pointer-cast
701 AC_MSG_CHECKING([whether ${CC} accepts -Wpointer-to-int-cast])
702 CFLAGS=-Wpointer-to-int-cast
703 AC_TRY_COMPILE(,, aros_pointer_to_int_cast="yes", aros_pointer_to_int_cast="no")
704 AC_MSG_RESULT($aros_pointer_to_int_cast)
705 if test "x-$aros_pointer_to_int_cast" = "x-yes" ; then
706     aros_warnflags_pointer_to_int_cast=-Wpointer-to-int-cast
707     aros_nowarnflags_pointer_to_int_cast=-Wno-pointer-to-int-cast
710 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-const-variable])
711 CFLAGS=-Wunused-const-variable
712 AC_TRY_COMPILE(,, aros_unused_const_variable="yes", aros_unused_const_variable="no")
713 AC_MSG_RESULT($aros_unused_const_variable)
714 if test "x-$aros_unused_const_variable" = "x-yes" ; then
715     aros_warnflags_unused_const_variable=-Wunused-const-variable
716     aros_nowarnflags_unused_const_variable=-Wno-unused-const-variable
719 AC_MSG_CHECKING([whether ${CC} accepts -Wwrite-strings])
720 CFLAGS=-Wwrite-strings
721 AC_TRY_COMPILE(,, aros_write_strings="yes", aros_write_strings="no")
722 AC_MSG_RESULT($aros_write_strings)
723 if test "x-$aros_write_strings" = "x-yes" ; then
724     aros_warnflags_write_strings=-Wwrite-strings
725     aros_nowarnflags_write_strings=-Wno-write-strings
728 AC_MSG_CHECKING([whether ${CC} accepts -Wcomment])
729 CFLAGS=-Wcomment
730 AC_TRY_COMPILE(,, aros_comment="yes", aros_comment="no")
731 AC_MSG_RESULT($aros_comment)
732 if test "x-$aros_comment" = "x-yes" ; then
733     aros_warnflags_comment=-Wcomment
734     aros_nowarnflags_comment=-Wno-comment
737 AC_MSG_CHECKING([whether ${CC} accepts -Wincompatible-pointer-types])
738 CFLAGS=-Wincompatible-pointer-types
739 AC_TRY_COMPILE(,, aros_incompatible_pointer_types="yes", aros_incompatible_pointer_types="no")
740 AC_MSG_RESULT($aros_incompatible_pointer_types)
741 if test "x-$aros_incompatible_pointer_types" = "x-yes" ; then
742     aros_warnflags_incompatible_pointer_types=-Wincompatible-pointer-types
743     aros_nowarnflags_incompatible_pointer_types=-Wno-incompatible-pointer-types
746 AC_MSG_CHECKING([whether ${CC} accepts -Wbool-compare])
747 CFLAGS=-Wbool-compare
748 AC_TRY_COMPILE(,, aros_bool_compare="yes", aros_bool_compare="no")
749 AC_MSG_RESULT($aros_bool_compare)
750 if test "x-$aros_bool_compare" = "x-yes" ; then
751     aros_warnflags_bool_compare=-Wbool-compare
752     aros_nowarnflags_bool_compare=-Wno-bool-compare
755 AC_MSG_CHECKING([whether ${CC} accepts -Wlogical-not-parentheses])
756 CFLAGS=-Wlogical-not-parentheses
757 AC_TRY_COMPILE(,, aros_logical_not_parentheses="yes", aros_logical_not_parentheses="no")
758 AC_MSG_RESULT($aros_logical_not_parentheses)
759 if test "x-$aros_logical_not_parentheses" = "x-yes" ; then
760     aros_warnflags_logical_not_parentheses=-Wlogical-not-parentheses
761     aros_nowarnflags_logical_not_parentheses=-Wno-logical-not-parentheses
764 AC_MSG_CHECKING([whether ${CC} accepts -Wpointer-sign])
765 CFLAGS=-Wpointer-sign
766 AC_TRY_COMPILE(,, aros_pointer_sign="yes", aros_pointer_sign="no")
767 AC_MSG_RESULT($aros_pointer_sign)
768 if test "x-$aros_pointer_sign" = "x-yes" ; then
769     aros_warnflags_pointer_sign=-Wpointer-sign
770     aros_nowarnflags_pointer_sign=-Wno-pointer-sign
773 AC_MSG_CHECKING([whether ${CC} accepts -Wshift-overflow])
774 CFLAGS=-Wshift-overflow
775 AC_TRY_COMPILE(,, aros_shift_overflow="yes", aros_shift_overflow="no")
776 AC_MSG_RESULT($aros_shift_overflow)
777 if test "x-$aros_shift_overflow" = "x-yes" ; then
778     aros_warnflags_shift_overflow=-Wshift-overflow
779     aros_nowarnflags_shift_overflow=-Wno-shift-overflow
782 AC_MSG_CHECKING([whether ${CC} accepts -Wframe-address])
783 CFLAGS=-Wframe-address
784 AC_TRY_COMPILE(,, aros_frame_address="yes", aros_frame_address="no")
785 AC_MSG_RESULT($aros_frame_address)
786 if test "x-$aros_frame_address" = "x-yes" ; then
787     aros_warnflags_frame_address=-Wframe-address
788     aros_nowarnflags_frame_address=-Wno-frame-address
791 AC_MSG_CHECKING([whether ${CC} accepts -Wdeprecated-declarations])
792 CFLAGS=-Wdeprecated-declarations
793 AC_TRY_COMPILE(,, aros_deprecated_declarations="yes", aros_deprecated_declarations="no")
794 AC_MSG_RESULT($aros_deprecated_declarations)
795 if test "x-$aros_deprecated_declarations" = "x-yes" ; then
796     aros_warnflags_deprecated_declarations=-Wdeprecated-declarations
797     aros_nowarnflags_deprecated_declarations=-Wno-deprecated-declarations
800 AC_MSG_CHECKING([whether ${CC} accepts -Wsign-compare])
801 CFLAGS=-Wsign-compare
802 AC_TRY_COMPILE(,, aros_sign_compare="yes", aros_sign_compare="no")
803 AC_MSG_RESULT($aros_sign_compare)
804 if test "x-$aros_sign_compare" = "x-yes" ; then
805     aros_warnflags_sign_compare=-Wsign-compare
806     aros_nowarnflags_sign_compare=-Wno-sign-compare
809 AC_MSG_CHECKING([whether ${CC} accepts -Wattributes])
810 CFLAGS=-Wattributes
811 AC_TRY_COMPILE(,, aros_attributes="yes", aros_attributes="no")
812 AC_MSG_RESULT($aros_attributes)
813 if test "x-$aros_attributes" = "x-yes" ; then
814     aros_warnflags_attributes=-Wattributes
815     aros_nowarnflags_attributes=-Wno-attributes
818 AC_MSG_CHECKING([whether ${CC} accepts -Woverflow])
819 CFLAGS=-Woverflow
820 AC_TRY_COMPILE(,, aros_overflow="yes", aros_overflow="no")
821 AC_MSG_RESULT($aros_overflow)
822 if test "x-$aros_overflow" = "x-yes" ; then
823     aros_warnflags_overflow=-Woverflow
824     aros_nowarnflags_overflow=-Wno-overflow
827 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-local-typedefs])
828 CFLAGS=-Wunused-local-typedefs
829 AC_TRY_COMPILE(,, aros_unused_local_typedefs="yes", aros_unused_local_typedefs="no")
830 AC_MSG_RESULT($aros_unused_local_typedefs)
831 if test "x-$aros_unused_local_typedefs" = "x-yes" ; then
832     aros_warnflags_unused_local_typedefs=-Wunused-local-typedefs
833     aros_nowarnflags_unused_local_typedefs=-Wno-unused-local-typedefs
836 AC_MSG_CHECKING([whether ${CC} accepts -Wmissing-braces])
837 CFLAGS=-Wmissing-braces
838 AC_TRY_COMPILE(,, aros_missing_braces="yes", aros_missing_braces="no")
839 AC_MSG_RESULT($aros_missing_braces)
840 if test "x-$aros_missing_braces" = "x-yes" ; then
841     aros_warnflags_missing_braces=-Wmissing-braces
842     aros_nowarnflags_missing_braces=-Wno-missing-braces
845 AC_MSG_CHECKING([whether ${CC} accepts -Wconversion-null])
846 CFLAGS=-Wconversion-null
847 AC_TRY_COMPILE(,, aros_conversion_null="yes", aros_conversion_null="no")
848 AC_MSG_RESULT($aros_conversion_null)
849 if test "x-$aros_conversion_null" = "x-yes" ; then
850     aros_warnflags_conversion_null=-Wconversion-null
851     aros_nowarnflags_conversion_null=-Wno-conversion-null
854 AC_MSG_CHECKING([whether ${CC} accepts -Wnarrowing])
855 CFLAGS=-Wnarrowing
856 AC_TRY_COMPILE(,, aros_narrowing="yes", aros_narrowing="no")
857 AC_MSG_RESULT($aros_narrowing)
858 if test "x-$aros_narrowing" = "x-yes" ; then
859     aros_warnflags_narrowing=-Wnarrowing
860     aros_nowarnflags_narrowing=-Wno-narrowing
863 AC_MSG_CHECKING([whether ${CC} accepts -Wvolatile-register-var])
864 CFLAGS=-Wvolatile-register-var
865 AC_TRY_COMPILE(,, aros_volatile_register_var="yes", aros_volatile_register_var="no")
866 AC_MSG_RESULT($aros_volatile_register_var)
867 if test "x-$aros_volatile_register_var" = "x-yes" ; then
868     aros_warnflags_volatile_register_var=-Wvolatile-register-var
869     aros_nowarnflags_volatile_register_var=-Wno-volatile-register-var
872 AC_MSG_CHECKING([whether ${CC} accepts -Wsizeof-pointer-memaccess])
873 CFLAGS=-Wsizeof-pointer-memaccess
874 AC_TRY_COMPILE(,, aros_sizeof_pointer_memaccess="yes", aros_sizeof_pointer_memaccess="no")
875 AC_MSG_RESULT($aros_sizeof_pointer_memaccess)
876 if test "x-$aros_sizeof_pointer_memaccess" = "x-yes" ; then
877     aros_warnflags_sizeof_pointer_memaccess=-Wsizeof-pointer-memaccess
878     aros_nowarnflags_sizeof_pointer_memaccess=-Wno-sizeof-pointer-memaccess
881 AC_MSG_CHECKING([whether ${CC} accepts -Wreturn-type])
882 CFLAGS=-Wreturn-type
883 AC_TRY_COMPILE(,, aros_return_type="yes", aros_return_type="no")
884 AC_MSG_RESULT($aros_return_type)
885 if test "x-$aros_return_type" = "x-yes" ; then
886     aros_warnflags_return_type=-Wreturn-type
887     aros_nowarnflags_return_type=-Wno-return-type
890 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-zero-length])
891 CFLAGS=-Wformat-zero-length
892 AC_TRY_COMPILE(,, aros_format_zero_length="yes", aros_format_zero_length="no")
893 AC_MSG_RESULT($aros_format_zero_length)
894 if test "x-$aros_format_zero_length" = "x-yes" ; then
895     aros_warnflags_format_zero_length=-Wformat-zero-length
896     aros_nowarnflags_format_zero_length=-Wno-format-zero-length
899 AC_MSG_CHECKING([whether ${CC} accepts -Wlto-type-mismatch])
900 CFLAGS=-Wlto-type-mismatch
901 AC_TRY_COMPILE(,, aros_lto_type_mismatch="yes", aros_lto_type_mismatch="no")
902 AC_MSG_RESULT($aros_lto_type_mismatch)
903 if test "x-$aros_lto_type_mismatch" = "x-yes" ; then
904     aros_warnflags_lto_type_mismatch=-Wlto-type-mismatch
905     aros_nowarnflags_lto_type_mismatch=-Wno-lto-type-mismatch
908 AC_MSG_CHECKING([whether ${CC} accepts -Wtautological-compare])
909 CFLAGS=-Wtautological-compare
910 AC_TRY_COMPILE(,, aros_tautological_compare="yes", aros_tautological_compare="no")
911 AC_MSG_RESULT($aros_tautological_compare)
912 if test "x-$aros_tautological_compare" = "x-yes" ; then
913     aros_warnflags_tautological_compare=-Wtautological-compare
914     aros_nowarnflags_tautological_compare=-Wno-tautological-compare
917 AC_MSG_CHECKING([whether ${CC} accepts -Wempty-body])
918 CFLAGS=-Wempty-body
919 AC_TRY_COMPILE(,, aros_empty_body="yes", aros_empty_body="no")
920 AC_MSG_RESULT($aros_empty_body)
921 if test "x-$aros_empty_body" = "x-yes" ; then
922     aros_warnflags_empty_body=-Wempty-body
923     aros_nowarnflags_empty_body=-Wno-empty-body
926 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-overflow])
927 CFLAGS=-Wformat-overflow
928 AC_TRY_COMPILE(,, aros_format_overflow="yes", aros_format_overflow="no")
929 AC_MSG_RESULT($aros_format_overflow)
930 if test "x-$aros_format_overflow" = "x-yes" ; then
931     aros_warnflags_format_overflow=-Wformat-overflow
932     aros_nowarnflags_format_overflow=-Wno-format-overflow
935 AC_MSG_CHECKING([whether ${CC} accepts -Wstringop-overflow])
936 CFLAGS=-Wstringop-overflow
937 AC_TRY_COMPILE(,, aros_stringop_overflow="yes", aros_stringop_overflow="no")
938 AC_MSG_RESULT($aros_stringop_overflow)
939 if test "x-$aros_stringop_overflow" = "x-yes" ; then
940     aros_warnflags_stringop_overflow=-Wstringop-overflow
941     aros_nowarnflags_stringop_overflow=-Wno-stringop-overflow
944 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-truncation])
945 CFLAGS=-Wformat-truncation
946 AC_TRY_COMPILE(,, aros_format_truncation="yes", aros_format_truncation="no")
947 AC_MSG_RESULT($aros_format_truncation)
948 if test "x-$aros_format_truncation" = "x-yes" ; then
949     aros_warnflags_format_truncation=-Wformat-truncation
950     aros_nowarnflags_format_truncation=-Wno-format-truncation
953 AC_MSG_CHECKING([whether ${CC} accepts -Wstringop-truncation])
954 CFLAGS=-Wstringop-truncation
955 AC_TRY_COMPILE(,, aros_stringop_truncation="yes", aros_stringop_truncation="no")
956 AC_MSG_RESULT($aros_stringop_truncation)
957 if test "x-$aros_stringop_truncation" = "x-yes" ; then
958     aros_warnflags_stringop_truncation=-Wstringop-truncation
959     aros_nowarnflags_stringop_truncation=-Wno-stringop-truncation
962 AC_MSG_CHECKING([whether ${CC} accepts -Wshift-negative-value])
963 CFLAGS=-Wshift-negative-value
964 AC_TRY_COMPILE(,, aros_shift_negative_value="yes", aros_shift_negative_value="no")
965 AC_MSG_RESULT($aros_shift_negative_value)
966 if test "x-$aros_shift_negative_value" = "x-yes" ; then
967     aros_warnflags_shift_negative_value=-Wshift-negative-value
968     aros_nowarnflags_shift_negative_value=-Wno-shift-negative-value
971 AC_MSG_CHECKING([whether ${CC} accepts -Wmissing-field-initializers])
972 CFLAGS=-Wmissing-field-initializers
973 AC_TRY_COMPILE(,, aros_missing_field_initializers="yes", aros_missing_field_initializers="no")
974 AC_MSG_RESULT($aros_missing_field_initializers)
975 if test "x-$aros_missing_field_initializers" = "x-yes" ; then
976     aros_warnflags_missing_field_initializers=-Wmissing-field-initializers
977     aros_nowarnflags_missing_field_initializers=-Wno-missing-field-initializers
980 AC_MSG_CHECKING([whether ${CC} accepts -Wimplicit-fallthrough])
981 CFLAGS=-Wimplicit-fallthrough
982 AC_TRY_COMPILE(,, aros_implicit_fallthrough="yes", aros_implicit_fallthrough="no")
983 AC_MSG_RESULT($aros_implicit_fallthrough)
984 if test "x-$aros_implicit_fallthrough" = "x-yes" ; then
985     aros_warnflags_implicit_fallthrough=-Wimplicit-fallthrough
986     aros_nowarnflags_implicit_fallthrough=-Wno-implicit-fallthrough
989 AC_MSG_CHECKING([whether ${CC} accepts -Wmissing-prototypes])
990 CFLAGS=-Wmissing-prototypes
991 AC_TRY_COMPILE(,, aros_missing_prototypes="yes", aros_missing_prototypes="no")
992 AC_MSG_RESULT($aros_missing_prototypes)
993 if test "x-$aros_missing_prototypes" = "x-yes" ; then
994     aros_warnflags_missing_prototypes=-Wmissing-prototypes
995     aros_nowarnflags_missing_prototypes=-Wno-missing-prototypes
998 AC_MSG_CHECKING([whether ${CC} accepts -Wclass-memaccess])
999 CFLAGS=-Wclass-memaccess
1000 AC_TRY_COMPILE(,, aros_class_memaccess="yes", aros_class_memaccess="no")
1001 AC_MSG_RESULT($aros_class_memaccess)
1002 if test "x-$aros_class_memaccess" = "x-yes" ; then
1003     aros_warnflags_class_memaccess=-Wclass-memaccess
1004     aros_nowarnflags_class_memaccess=-Wno-class-memaccess
1007 AC_MSG_CHECKING([whether ${CC} accepts -Wint-in-bool-context])
1008 CFLAGS=-Wint-in-bool-context
1009 AC_TRY_COMPILE(,, aros_int_in_bool_context="yes", aros_int_in_bool_context="no")
1010 AC_MSG_RESULT($aros_int_in_bool_context)
1011 if test "x-$aros_int_in_bool_context" = "x-yes" ; then
1012     aros_warnflags_int_in_bool_context=-Wint-in-bool-context
1013     aros_nowarnflags_int_in_bool_context=-Wno-int-in-bool-context
1017 # export the feature flags...
1019 AC_SUBST(aros_cflags_exceptions)
1020 AC_SUBST(aros_cflags_noexceptions)
1021 AC_SUBST(aros_cflags_permissive)
1022 AC_SUBST(aros_cflags_nopermissive)
1023 AC_SUBST(aros_cflags_rtti)
1024 AC_SUBST(aros_cflags_nortti)
1025 AC_SUBST(aros_cflags_fast_math)
1026 AC_SUBST(aros_cflags_lto)
1027 AC_SUBST(aros_cflags_nolto)
1028 AC_SUBST(aros_cflags_whole_program)
1029 AC_SUBST(aros_cflags_loop_block)
1030 AC_SUBST(aros_cflags_loop_interchange)
1031 AC_SUBST(aros_cflags_loop_strip_mine)
1032 AC_SUBST(aros_cflags_peel_loops)
1033 AC_SUBST(aros_cflags_unroll_loops)
1035 AC_SUBST(aros_cflags_strictaliasing)
1036 AC_SUBST(aros_cflags_nostrictaliasing)
1038 AC_SUBST(aros_cflags_inlinesmallfunctions)
1039 AC_SUBST(aros_cflags_noinlinesmallfunctions)
1041 AC_SUBST(aros_cflags_ipacp)
1042 AC_SUBST(aros_cflags_noipacp)
1044 AC_SUBST(aros_cflags_omitfp)
1045 AC_SUBST(aros_cflags_noomitfp)
1047 AC_SUBST(aros_cflags_profilearcs)
1048 AC_SUBST(aros_cflags_noprofilearcs)
1050 AC_SUBST(aros_cflags_testcoverage)
1051 AC_SUBST(aros_cflags_notestcoverage)
1053 AC_SUBST(aros_cflags_alignednew)
1054 AC_SUBST(aros_cflags_noalignednew)
1055     
1056 AC_SUBST(aros_cflags_no_builtin)
1057 AC_SUBST(aros_cflags_no_builtin_floor)
1058 AC_SUBST(aros_cflags_no_builtin_vsnprintf)
1061 AC_SUBST(aros_cflags_isystem)
1062 AC_SUBST(aros_cflags_isystem_end)
1063 AC_SUBST(aros_cflags_iquote)
1064 AC_SUBST(aros_cflags_iquote_end)
1067 # export the feature options...
1069 AC_SUBST(aros_cflags_no_red_zone)
1072 # ...and warning flags...
1074 AC_SUBST(aros_warnflags_error)
1075 AC_SUBST(aros_nowarnflags_error)
1076 AC_SUBST(aros_warnflags_all)
1077 AC_SUBST(aros_warnflags_restrict)
1078 AC_SUBST(aros_nowarnflags_restrict)
1079 AC_SUBST(aros_warnflags_unused_command_line_argument)
1080 AC_SUBST(aros_nowarnflags_unused_command_line_argument)
1081 AC_SUBST(aros_warnflags_unknown_warning_option)
1082 AC_SUBST(aros_nowarnflags_unknown_warning_option)
1083 AC_SUBST(aros_warnflags_unused_but_set_variable)
1084 AC_SUBST(aros_nowarnflags_unused_but_set_variable)
1085 AC_SUBST(aros_warnflags_strict_aliasing)
1086 AC_SUBST(aros_nowarnflags_strict_aliasing)
1087 AC_SUBST(aros_warnflags_array_bounds)
1088 AC_SUBST(aros_nowarnflags_array_bounds)
1089 AC_SUBST(aros_warnflags_enum_compare)
1090 AC_SUBST(aros_nowarnflags_enum_compare)
1091 AC_SUBST(aros_warnflags_strict_prototypes)
1092 AC_SUBST(aros_nowarnflags_strict_prototypes)
1093 AC_SUBST(aros_warnflags_strict_overflow)
1094 AC_SUBST(aros_nowarnflags_strict_overflow)
1095 AC_SUBST(aros_warnflags_format_security)
1096 AC_SUBST(aros_nowarnflags_format_security)
1097 AC_SUBST(aros_warnflags_misleading_indentation)
1098 AC_SUBST(aros_nowarnflags_misleading_indentation)
1099 AC_SUBST(aros_warnflags_nonnull_compare)
1100 AC_SUBST(aros_nowarnflags_nonnull_compare)
1101 AC_SUBST(aros_warnflags_unused)
1102 AC_SUBST(aros_nowarnflags_unused)
1103 AC_SUBST(aros_warnflags_unused_label)
1104 AC_SUBST(aros_nowarnflags_unused_label)
1105 AC_SUBST(aros_warnflags_unused_value)
1106 AC_SUBST(aros_nowarnflags_unused_value)
1107 AC_SUBST(aros_warnflags_unused_variable)
1108 AC_SUBST(aros_nowarnflags_unused_variable)
1109 AC_SUBST(aros_warnflags_unused_function)
1110 AC_SUBST(aros_nowarnflags_unused_function)
1111 AC_SUBST(aros_warnflags_unused_parameter)
1112 AC_SUBST(aros_nowarnflags_unused_parameter)
1113 AC_SUBST(aros_warnflags_uninitialized)
1114 AC_SUBST(aros_nowarnflags_uninitialized)
1115 AC_SUBST(aros_warnflags_maybe_uninitialized)
1116 AC_SUBST(aros_nowarnflags_maybe_uninitialized)
1117 AC_SUBST(aros_warnflags_implicit_function_declaration)
1118 AC_SUBST(aros_nowarnflags_implicit_function_declaration)
1119 AC_SUBST(aros_warnflags_format)
1120 AC_SUBST(aros_nowarnflags_format)
1121 AC_SUBST(aros_warnflags_parentheses)
1122 AC_SUBST(aros_nowarnflags_parentheses)
1123 AC_SUBST(aros_warnflags_char_subscripts)
1124 AC_SUBST(aros_nowarnflags_char_subscripts)
1125 AC_SUBST(aros_warnflags_endif_labels)
1126 AC_SUBST(aros_nowarnflags_endif_labels)
1127 AC_SUBST(aros_warnflags_format_contains_nul)
1128 AC_SUBST(aros_nowarnflags_format_contains_nul)
1129 AC_SUBST(aros_warnflags_implicit_int)
1130 AC_SUBST(aros_nowarnflags_implicit_int)
1131 AC_SUBST(aros_warnflags_aggressive_loop_optimizations)
1132 AC_SUBST(aros_nowarnflags_aggressive_loop_optimizations)
1133 AC_SUBST(aros_warnflags_cpp)
1134 AC_SUBST(aros_nowarnflags_cpp)
1135 AC_SUBST(aros_warnflags_switch)
1136 AC_SUBST(aros_nowarnflags_switch)
1137 AC_SUBST(aros_warnflags_discarded_qualifiers)
1138 AC_SUBST(aros_nowarnflags_discarded_qualifiers)
1139 AC_SUBST(aros_warnflags_sequence_point)
1140 AC_SUBST(aros_nowarnflags_sequence_point)
1141 AC_SUBST(aros_warnflags_unknown_pragmas)
1142 AC_SUBST(aros_nowarnflags_unknown_pragmas)
1143 AC_SUBST(aros_warnflags_discarded_array_qualifiers)
1144 AC_SUBST(aros_nowarnflags_discarded_array_qualifiers)
1145 AC_SUBST(aros_warnflags_int_conversion)
1146 AC_SUBST(aros_nowarnflags_int_conversion)
1147 AC_SUBST(aros_warnflags_int_to_pointer_cast)
1148 AC_SUBST(aros_nowarnflags_int_to_pointer_cast)
1149 AC_SUBST(aros_warnflags_pointer_to_int_cast)
1150 AC_SUBST(aros_nowarnflags_pointer_to_int_cast)
1151 AC_SUBST(aros_warnflags_unused_const_variable)
1152 AC_SUBST(aros_nowarnflags_unused_const_variable)
1153 AC_SUBST(aros_warnflags_write_strings)
1154 AC_SUBST(aros_nowarnflags_write_strings)
1155 AC_SUBST(aros_warnflags_comment)
1156 AC_SUBST(aros_nowarnflags_comment)
1157 AC_SUBST(aros_warnflags_incompatible_pointer_types)
1158 AC_SUBST(aros_nowarnflags_incompatible_pointer_types)
1159 AC_SUBST(aros_warnflags_bool_compare)
1160 AC_SUBST(aros_nowarnflags_bool_compare)
1161 AC_SUBST(aros_warnflags_logical_not_parentheses)
1162 AC_SUBST(aros_nowarnflags_logical_not_parentheses)
1163 AC_SUBST(aros_warnflags_pointer_sign)
1164 AC_SUBST(aros_nowarnflags_pointer_sign)
1165 AC_SUBST(aros_warnflags_shift_overflow)
1166 AC_SUBST(aros_nowarnflags_shift_overflow)
1167 AC_SUBST(aros_warnflags_frame_address)
1168 AC_SUBST(aros_nowarnflags_frame_address)
1169 AC_SUBST(aros_warnflags_deprecated_declarations)
1170 AC_SUBST(aros_nowarnflags_deprecated_declarations)
1171 AC_SUBST(aros_warnflags_sign_compare)
1172 AC_SUBST(aros_nowarnflags_sign_compare)
1173 AC_SUBST(aros_warnflags_attributes)
1174 AC_SUBST(aros_nowarnflags_attributes)
1175 AC_SUBST(aros_warnflags_overflow)
1176 AC_SUBST(aros_nowarnflags_overflow)
1177 AC_SUBST(aros_warnflags_unused_local_typedefs)
1178 AC_SUBST(aros_nowarnflags_unused_local_typedefs)
1179 AC_SUBST(aros_warnflags_missing_braces)
1180 AC_SUBST(aros_nowarnflags_missing_braces)
1181 AC_SUBST(aros_warnflags_conversion_null)
1182 AC_SUBST(aros_nowarnflags_conversion_null)
1183 AC_SUBST(aros_warnflags_narrowing)
1184 AC_SUBST(aros_nowarnflags_narrowing)
1185 AC_SUBST(aros_warnflags_volatile_register_var)
1186 AC_SUBST(aros_nowarnflags_volatile_register_var)
1187 AC_SUBST(aros_warnflags_sizeof_pointer_memaccess)
1188 AC_SUBST(aros_nowarnflags_sizeof_pointer_memaccess)
1189 AC_SUBST(aros_warnflags_return_type)
1190 AC_SUBST(aros_nowarnflags_return_type)
1191 AC_SUBST(aros_warnflags_format_zero_length)
1192 AC_SUBST(aros_nowarnflags_format_zero_length)
1193 AC_SUBST(aros_warnflags_lto_type_mismatch)
1194 AC_SUBST(aros_nowarnflags_lto_type_mismatch)
1195 AC_SUBST(aros_warnflags_tautological_compare)
1196 AC_SUBST(aros_nowarnflags_tautological_compare)
1197 AC_SUBST(aros_warnflags_empty_body)
1198 AC_SUBST(aros_nowarnflags_empty_body)
1199 AC_SUBST(aros_warnflags_format_overflow)
1200 AC_SUBST(aros_nowarnflags_format_overflow)
1201 AC_SUBST(aros_warnflags_stringop_overflow)
1202 AC_SUBST(aros_nowarnflags_stringop_overflow)
1203 AC_SUBST(aros_warnflags_format_truncation)
1204 AC_SUBST(aros_nowarnflags_format_truncation)
1205 AC_SUBST(aros_warnflags_stringop_truncation)
1206 AC_SUBST(aros_nowarnflags_stringop_truncation)
1207 AC_SUBST(aros_warnflags_shift_negative_value)
1208 AC_SUBST(aros_nowarnflags_shift_negative_value)
1209 AC_SUBST(aros_warnflags_missing_field_initializers)
1210 AC_SUBST(aros_nowarnflags_missing_field_initializers)
1211 AC_SUBST(aros_warnflags_implicit_fallthrough)
1212 AC_SUBST(aros_nowarnflags_implicit_fallthrough)
1213 AC_SUBST(aros_warnflags_missing_prototypes)
1214 AC_SUBST(aros_nowarnflags_missing_prototypes)
1215 AC_SUBST(aros_warnflags_class_memaccess)
1216 AC_SUBST(aros_nowarnflags_class_memaccess)
1217 AC_SUBST(aros_warnflags_int_in_bool_context)
1218 AC_SUBST(aros_nowarnflags_int_in_bool_context)
1220 AC_CONFIG_FILES(
1221     ${aros_targetcfg_dir}/compiler.cfg:compiler.cfg.in
1224 AC_OUTPUT