wip fixes for hidden layers. add some debug, and adjust rendering correctly.
[AROS.git] / config / features.in
blob73638a4458702d217214d6ec61cfc1072894d6f4
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 #  -fpermissive
38 #  -ffast-math
39 #  -fno-builtin-floor
40 #  -flto
41 #  -fwhole-program
42 #  -floop-block
43 #  -floop-interchange
44 #  -floop-strip-mine
45 #  -fpeel-loops
46 #  -fstrict-aliasing
47 #  -funroll-loops
49 AC_MSG_CHECKING([whether ${CC} accepts -fpermissive])
50 CFLAGS=-fpermissive
51 AC_TRY_COMPILE(,, aros_permissive="yes", aros_permissive="no")
52 AC_MSG_RESULT($aros_permissive)
53 if test "x-$aros_permissive" = "x-yes" ; then
54     aros_cflags_permissive=-fpermissive
57 AC_MSG_CHECKING([whether ${CC} accepts -ffast-math])
58 CFLAGS=-ffast-math
59 AC_TRY_COMPILE(,, aros_fast_math="yes", aros_fast_math="no")
60 AC_MSG_RESULT($aros_fast_math)
61 if test "x-$aros_fast_math" = "x-yes" ; then
62     aros_cflags_fast_math=-ffast-math
65 AC_MSG_CHECKING([whether ${CC} accepts -fno-builtin-floor])
66 CFLAGS=-fno-builtin-floor
67 AC_TRY_COMPILE(,, aros_no_builtin_floor="yes", aros_no_builtin_floor="no")
68 AC_MSG_RESULT($aros_no_builtin_floor)
69 if test "x-$aros_no_builtin_floor" = "x-yes" ; then
70     aros_cflags_no_builtin_floor=-fno-builtin-floor
73 AC_MSG_CHECKING([whether ${CC} accepts -flto])
74 CFLAGS=-flto
75 AC_TRY_COMPILE(,, aros_lto="yes", aros_lto="no")
76 AC_MSG_RESULT($aros_lto)
77 if test "x-$aros_lto" = "x-yes" ; then
78     aros_cflags_lto=-flto
79     aros_cflags_nolto=-fno-lto
80     
81     AC_MSG_CHECKING([whether ${CC} accepts -fwhole-program])
82     CFLAGS=-fwhole-program
83     AC_TRY_COMPILE(,, aros_whole_program="yes", aros_whole_program="no")
84     AC_MSG_RESULT($aros_whole_program)
85     if test "x-$aros_whole_program" = "x-yes" ; then
86         aros_cflags_whole_program=-fwhole-program
87     fi
88     
89     AC_MSG_CHECKING([whether ${CC} accepts -floop-block])
90     CFLAGS=-floop-block
91     AC_TRY_COMPILE(,, aros_loop_block="yes", aros_loop_block="no")
92     AC_MSG_RESULT($aros_loop_block)
93     if test "x-$aros_loop_block" = "x-yes" ; then
94         aros_cflags_loop_block=-floop-block
95     fi
96     
97     AC_MSG_CHECKING([whether ${CC} accepts -floop-interchange])
98     CFLAGS=-floop-interchange
99     AC_TRY_COMPILE(,, aros_loop_interchange="yes", aros_loop_interchange="no")
100     AC_MSG_RESULT($aros_loop_interchange)
101     if test "x-$aros_loop_interchange" = "x-yes" ; then
102         aros_cflags_loop_interchange=-floop-interchange
103     fi
104     
105     AC_MSG_CHECKING([whether ${CC} accepts -floop-strip-mine])
106     CFLAGS=-floop-strip-mine
107     AC_TRY_COMPILE(,, aros_loop_strip_mine="yes", aros_loop_strip_mine="no")
108     AC_MSG_RESULT($aros_loop_strip_mine)
109     if test "x-$aros_loop_strip_mine" = "x-yes" ; then
110         aros_cflags_loop_strip_mine=-floop-strip-mine
111     fi
114 AC_MSG_CHECKING([whether ${CC} accepts -fpeel-loops])
115 CFLAGS=-fpeel-loops
116 AC_TRY_COMPILE(,, aros_peel_loops="yes", aros_peel_loops="no")
117 AC_MSG_RESULT($aros_peel_loops)
118 if test "x-$aros_peel_loops" = "x-yes" ; then
119     aros_cflags_peel_loops=-fpeel-loops
122 AC_MSG_CHECKING([whether ${CC} accepts -funroll-loops])
123 CFLAGS=-funroll-loops
124 AC_TRY_COMPILE(,, aros_unroll_loops="yes", aros_unroll_loops="no")
125 AC_MSG_RESULT($aros_unroll_loops)
126 if test "x-$aros_unroll_loops" = "x-yes" ; then
127     aros_cflags_unroll_loops=-funroll-loops
130 AC_MSG_CHECKING([whether ${CC} accepts -fstrict-aliasing])
131 CFLAGS=-fstrict-aliasing
132 AC_TRY_COMPILE(,, aros_strict_aliasing="yes", aros_strict_aliasing="no")
133 AC_MSG_RESULT($aros_strict_aliasing)
134 if test "x-$aros_strict_aliasing" = "x-yes" ; then
135     aros_cflags_strictaliasing=-fstrict-aliasing
136     aros_cflags_nostrictaliasing=-fno-strict-aliasing
139 AC_MSG_CHECKING([whether ${CC} accepts -iquote])
140 CFLAGS="-iquote."
141 AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no")
142 AC_MSG_RESULT($has_iquote)
143 if test "x-$has_iquote" = "x-yes" ; then
144     aros_cflags_iquote=-iquote
145     aros_cflags_iquote_end=
146 else
147     aros_cflags_iquote=-I
148     aros_cflags_iquote_end=-I-
151 #-----------------------------------------------------------------------------
153 # Check if the target compiler supports some options:
154 #  -mno-red-zone
156 AC_MSG_CHECKING([whether ${CC} accepts -mno-red-zone])
157 CFLAGS=-mno-red-zone
158 AC_TRY_COMPILE(,, aros_no_red_zone="yes", aros_no_red_zone="no")
159 AC_MSG_RESULT($aros_no_red_zone)
160 if test "x-$aros_no_red_zone" = "x-yes" ; then
161     aros_cflags_no_red_zone=-mno-red-zone
164 #-----------------------------------------------------------------------------
166 # Check if the target compiler supports some options used for de-linting:
167 #  -Wunused-command-line-argument
168 #  -Wunknown-warning-option
169 #  -Wunused-but-set-variable
170 #  -Wstrict-aliasing
171 #  -Warray-bounds
172 #  -Wenum-compare
173 #  -Wstrict-prototypes
174 #  -Wstrict-overflow
175 #  -Wformat-security
176 #  -Wmisleading-indentation
177 #  -Wnonnull-compare
178 #  -Wunused
179 #  -Wunused-value
180 #  -Wunused-variable
181 #  -Wunused-function
182 #  -Wunused-parameter
183 #  -Wuninitialized
184 #  -Wmaybe-uninitialized
185 #  -Wimplicit-function-declaration
186 #  -Wformat
187 #  -Wparentheses
188 #  -Wchar-subscripts
189 #  -Wendif-labels
190 #  -Wformat-contains-nul
191 #  -Wimplicit-int
192 #  -Waggressive-loop-optimizations
193 #  -Wcpp
194 #  -Wswitch
195 #  -Wdiscarded-qualifiers
196 #  -Wsequence-point
197 #  -Wunknown-pragmas
198 #  -Wdiscarded-array-qualifiers
199 #  -Wint-conversion
200 #  -Wint-to-pointer-cast
201 #  -Wpointer-to-int-cast
202 #  -Wunused-const-variable
203 #  -Wwrite-strings 
204 #  -Wcomment
205 #  -Wincompatible-pointer-types
206 #  -Wbool-compare
207 #  -Wlogical-not-parentheses
208 #  -Wpointer-sign
209 #  -Wshift-overflow
210 #  -Wframe-address
211 #  -Wdeprecated-declarations
212 #  -Wsign-compare
213 #  -Wattributes
214 #  -Woverflow
215 #  -Wunused-local-typedefs
216 #  -Wmissing-braces
217 #  -Wconversion-null
218 #  -Wnarrowing
219 #  -Wvolatile-register-var
220 #  -Wsizeof-pointer-memaccess
221 #  -Wreturn-type
222 #  -Wformat-zero-length
223 #  -Wlto-type-mismatch
225 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-command-line-argument])
226 CFLAGS=-Wunused-command-line-argument
227 AC_TRY_COMPILE(,, aros_unused_command_line_argument="yes", aros_unused_command_line_argument="no")
228 AC_MSG_RESULT($aros_unused_command_line_argument)
229 if test "x-$aros_unused_command_line_argument" = "x-yes" ; then
230     aros_warnflags_unused_command_line_argument=-Wunused-command-line-argument
231     aros_nowarnflags_unused_command_line_argument=-Wno-unused-command-line-argument
234 AC_MSG_CHECKING([whether ${CC} accepts -Wunknown-warning-option])
235 CFLAGS=-Wunknown-warning-option
236 AC_TRY_COMPILE(,, aros_unknown_warning_option="yes", aros_unknown_warning_option="no")
237 AC_MSG_RESULT($aros_unknown_warning_option)
238 if test "x-$aros_unknown_warning_option" = "x-yes" ; then
239     aros_warnflags_unknown_warning_option=-Wunknown-warning-option
240     aros_nowarnflags_unknown_warning_option=-Wno-unknown-warning-option
243 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-but-set-variable])
244 CFLAGS=-Wunused-but-set-variable
245 AC_TRY_COMPILE(,, aros_unused_but_set_variable="yes", aros_unused_but_set_variable="no")
246 AC_MSG_RESULT($aros_unused_but_set_variable)
247 if test "x-$aros_unused_but_set_variable" = "x-yes" ; then
248     aros_warnflags_unused_but_set_variable=-Wunused-but-set-variable
249     aros_nowarnflags_unused_but_set_variable=-Wno-unused-but-set-variable
252 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-aliasing])
253 CFLAGS=-Wstrict-aliasing
254 AC_TRY_COMPILE(,, aros_strict_aliasing="yes", aros_strict_aliasing="no")
255 AC_MSG_RESULT($aros_strict_aliasing)
256 if test "x-$aros_strict_aliasing" = "x-yes" ; then
257     aros_warnflags_strict_aliasing=-Wstrict-aliasing
258     aros_nowarnflags_strict_aliasing=-Wno-strict-aliasing
261 AC_MSG_CHECKING([whether ${CC} accepts -Warray-bounds])
262 CFLAGS=-Warray-bounds
263 AC_TRY_COMPILE(,, aros_array_bounds="yes", aros_array_bounds="no")
264 AC_MSG_RESULT($aros_array_bounds)
265 if test "x-$aros_array_bounds" = "x-yes" ; then
266     aros_warnflags_array_bounds=-Warray-bounds
267     aros_nowarnflags_array_bounds=-Wno-array-bounds
270 AC_MSG_CHECKING([whether ${CC} accepts -Wenum-compare])
271 CFLAGS=-Wenum-compare
272 AC_TRY_COMPILE(,, aros_enum_compare="yes", aros_enum_compare="no")
273 AC_MSG_RESULT($aros_enum_compare)
274 if test "x-$aros_enum_compare" = "x-yes" ; then
275     aros_warnflags_enum_compare=-Wenum-compare
276     aros_nowarnflags_enum_compare=-Wno-enum-compare
279 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-prototypes])
280 CFLAGS=-Wstrict-prototypes
281 AC_TRY_COMPILE(,, aros_strict_prototypes="yes", aros_strict_prototypes="no")
282 AC_MSG_RESULT($aros_strict_prototypes)
283 if test "x-$aros_strict_prototypes" = "x-yes" ; then
284     aros_warnflags_strict_prototypes=-Wstrict-prototypes
285     aros_nowarnflags_strict_prototypes=-Wno-strict-prototypes
288 AC_MSG_CHECKING([whether ${CC} accepts -Wstrict-overflow])
289 CFLAGS=-Wstrict-overflow
290 AC_TRY_COMPILE(,, aros_strict_overflow="yes", aros_strict_overflow="no")
291 AC_MSG_RESULT($aros_strict_overflow)
292 if test "x-$aros_strict_overflow" = "x-yes" ; then
293     aros_warnflags_strict_overflow=-Wstrict-overflow
294     aros_nowarnflags_strict_overflow=-Wno-strict-overflow
297 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-security])
298 CFLAGS=-Wformat-security
299 AC_TRY_COMPILE(,, aros_format_security="yes", aros_format_security="no")
300 AC_MSG_RESULT($aros_format_security)
301 if test "x-$aros_format_security" = "x-yes" ; then
302     aros_warnflags_format_security=-Wformat-security
303     aros_nowarnflags_format_security=-Wno-format-security
306 AC_MSG_CHECKING([whether ${CC} accepts -Wmisleading-indentation])
307 CFLAGS=-Wmisleading-indentation
308 AC_TRY_COMPILE(,, aros_misleading_indentation="yes", aros_misleading_indentation="no")
309 AC_MSG_RESULT($aros_misleading_indentation)
310 if test "x-$aros_misleading_indentation" = "x-yes" ; then
311     aros_warnflags_misleading_indentation=-Wmisleading-indentation
312     aros_nowarnflags_misleading_indentation=-Wno-misleading-indentation
315 AC_MSG_CHECKING([whether ${CC} accepts -Wnonnull-compare])
316 CFLAGS=-Wnonnull-compare
317 AC_TRY_COMPILE(,, aros_nonnull_compare="yes", aros_nonnull_compare="no")
318 AC_MSG_RESULT($aros_nonnull_compare)
319 if test "x-$aros_nonnull_compare" = "x-yes" ; then
320     aros_warnflags_nonnull_compare=-Wnonnull-compare
321     aros_nowarnflags_nonnull_compare=-Wno-nonnull-compare
324 AC_MSG_CHECKING([whether ${CC} accepts -Wunused])
325 CFLAGS=-Wunused
326 AC_TRY_COMPILE(,, aros_unused="yes", aros_unused="no")
327 AC_MSG_RESULT($aros_unused)
328 if test "x-$aros_unused" = "x-yes" ; then
329     aros_warnflags_unused=-Wunused
330     aros_nowarnflags_unused=-Wno-unused
333 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-value])
334 CFLAGS=-Wunused-value
335 AC_TRY_COMPILE(,, aros_unused_value="yes", aros_unused_value="no")
336 AC_MSG_RESULT($aros_unused_value)
337 if test "x-$aros_unused_value" = "x-yes" ; then
338     aros_warnflags_unused_value=-Wunused-value
339     aros_nowarnflags_unused_value=-Wno-unused-value
342 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-variable])
343 CFLAGS=-Wunused-variable
344 AC_TRY_COMPILE(,, aros_unused_variable="yes", aros_unused_variable="no")
345 AC_MSG_RESULT($aros_unused_variable)
346 if test "x-$aros_unused_variable" = "x-yes" ; then
347     aros_warnflags_unused_variable=-Wunused-variable
348     aros_nowarnflags_unused_variable=-Wno-unused-variable
351 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-function])
352 CFLAGS=-Wunused-function
353 AC_TRY_COMPILE(,, aros_unused_function="yes", aros_unused_function="no")
354 AC_MSG_RESULT($aros_unused_function)
355 if test "x-$aros_unused_function" = "x-yes" ; then
356     aros_warnflags_unused_function=-Wunused-function
357     aros_nowarnflags_unused_function=-Wno-unused-function
360 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-parameter])
361 CFLAGS=-Wunused-parameter
362 AC_TRY_COMPILE(,, aros_unused_parameter="yes", aros_unused_parameter="no")
363 AC_MSG_RESULT($aros_unused_parameter)
364 if test "x-$aros_unused_parameter" = "x-yes" ; then
365     aros_warnflags_unused_parameter=-Wunused-parameter
366     aros_nowarnflags_unused_parameter=-Wno-unused-parameter
369 AC_MSG_CHECKING([whether ${CC} accepts -Wuninitialized])
370 CFLAGS=-Wuninitialized
371 AC_TRY_COMPILE(,, aros_uninitialized="yes", aros_uninitialized="no")
372 AC_MSG_RESULT($aros_uninitialized)
373 if test "x-$aros_uninitialized" = "x-yes" ; then
374     aros_warnflags_uninitialized=-Wuninitialized
375     aros_nowarnflags_uninitialized=-Wno-uninitialized
378 AC_MSG_CHECKING([whether ${CC} accepts -Wmaybe-uninitialized])
379 CFLAGS=-Wmaybe-uninitialized
380 AC_TRY_COMPILE(,, aros_maybe_uninitialized="yes", aros_maybe_uninitialized="no")
381 AC_MSG_RESULT($aros_maybe_uninitialized)
382 if test "x-$aros_maybe_uninitialized" = "x-yes" ; then
383     aros_warnflags_maybe_uninitialized=-Wmaybe-uninitialized
384     aros_nowarnflags_maybe_uninitialized=-Wno-maybe-uninitialized
385 else
386     aros_warnflags_maybe_uninitialized=$aros_warnflags_uninitialized
387     aros_nowarnflags_maybe_uninitialized=$aros_nowarnflags_uninitialized
390 AC_MSG_CHECKING([whether ${CC} accepts -Wimplicit-function-declaration])
391 CFLAGS=-Wimplicit-function-declaration
392 AC_TRY_COMPILE(,, aros_implicit_function_declaration="yes", aros_implicit_function_declaration="no")
393 AC_MSG_RESULT($aros_implicit_function_declaration)
394 if test "x-$aros_implicit_function_declaration" = "x-yes" ; then
395     aros_warnflags_implicit_function_declaration=-Wimplicit-function-declaration
396     aros_nowarnflags_implicit_function_declaration=-Wno-implicit-function-declaration
399 AC_MSG_CHECKING([whether ${CC} accepts -Wformat])
400 CFLAGS=-Wformat
401 AC_TRY_COMPILE(,, aros_format="yes", aros_format="no")
402 AC_MSG_RESULT($aros_format)
403 if test "x-$aros_format" = "x-yes" ; then
404     aros_warnflags_format=-Wformat
405     aros_nowarnflags_format=-Wno-format
408 AC_MSG_CHECKING([whether ${CC} accepts -Wparentheses])
409 CFLAGS=-Wparentheses
410 AC_TRY_COMPILE(,, aros_parentheses="yes", aros_parentheses="no")
411 AC_MSG_RESULT($aros_parentheses)
412 if test "x-$aros_parentheses" = "x-yes" ; then
413     aros_warnflags_parentheses=-Wparentheses
414     aros_nowarnflags_parentheses=-Wno-parentheses
417 AC_MSG_CHECKING([whether ${CC} accepts -Wchar-subscripts])
418 CFLAGS=-Wchar-subscripts
419 AC_TRY_COMPILE(,, aros_char_subscripts="yes", aros_char_subscripts="no")
420 AC_MSG_RESULT($aros_char_subscripts)
421 if test "x-$aros_char_subscripts" = "x-yes" ; then
422     aros_warnflags_char_subscripts=-Wchar-subscripts
423     aros_nowarnflags_char_subscripts=-Wno-char-subscripts
426 AC_MSG_CHECKING([whether ${CC} accepts -Wendif-labels])
427 CFLAGS=-Wendif-labels
428 AC_TRY_COMPILE(,, aros_endif_labels="yes", aros_endif_labels="no")
429 AC_MSG_RESULT($aros_endif_labels)
430 if test "x-$aros_endif_labels" = "x-yes" ; then
431     aros_warnflags_endif_labels=-Wendif-labels
432     aros_nowarnflags_endif_labels=-Wno-endif-labels
435 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-contains-nul])
436 CFLAGS=-Wformat-contains-nul
437 AC_TRY_COMPILE(,, aros_format_contains_nul="yes", aros_format_contains_nul="no")
438 AC_MSG_RESULT($aros_format_contains_nul)
439 if test "x-$aros_format_contains_nul" = "x-yes" ; then
440     aros_warnflags_format_contains_nul=-Wformat-contains-nul
441     aros_nowarnflags_format_contains_nul=-Wno-format-contains-nul
444 AC_MSG_CHECKING([whether ${CC} accepts -Wimplicit-int])
445 CFLAGS=-Wimplicit-int
446 AC_TRY_COMPILE(,, aros_implicit_int="yes", aros_implicit_int="no")
447 AC_MSG_RESULT($aros_implicit_int)
448 if test "x-$aros_implicit_int" = "x-yes" ; then
449     aros_warnflags_implicit_int=-Wimplicit-int
450     aros_nowarnflags_implicit_int=-Wno-implicit-int
453 AC_MSG_CHECKING([whether ${CC} accepts -Waggressive-loop-optimizations])
454 CFLAGS=-Waggressive-loop-optimizations
455 AC_TRY_COMPILE(,, aros_aggressive_loop_optimizations="yes", aros_aggressive_loop_optimizations="no")
456 AC_MSG_RESULT($aros_aggressive_loop_optimizations)
457 if test "x-$aros_aggressive_loop_optimizations" = "x-yes" ; then
458     aros_warnflags_aggressive_loop_optimizations=-Waggressive-loop-optimizations
459     aros_nowarnflags_aggressive_loop_optimizations=-Wno-aggressive-loop-optimizations
462 AC_MSG_CHECKING([whether ${CC} accepts -Wcpp])
463 CFLAGS=-Wcpp
464 AC_TRY_COMPILE(,, aros_cpp="yes", aros_cpp="no")
465 AC_MSG_RESULT($aros_cpp)
466 if test "x-$aros_cpp" = "x-yes" ; then
467     aros_warnflags_cpp=-Wcpp
468     aros_nowarnflags_cpp=-Wno-cpp
471 AC_MSG_CHECKING([whether ${CC} accepts -Wswitch])
472 CFLAGS=-Wswitch
473 AC_TRY_COMPILE(,, aros_switch="yes", aros_switch="no")
474 AC_MSG_RESULT($aros_switch)
475 if test "x-$aros_switch" = "x-yes" ; then
476     aros_warnflags_switch=-Wswitch
477     aros_nowarnflags_switch=-Wno-switch
480 AC_MSG_CHECKING([whether ${CC} accepts -Wdiscarded-qualifiers])
481 CFLAGS=-Wdiscarded-qualifiers
482 AC_TRY_COMPILE(,, aros_discarded_qualifiers="yes", aros_discarded_qualifiers="no")
483 AC_MSG_RESULT($aros_discarded_qualifiers)
484 if test "x-$aros_discarded_qualifiers" = "x-yes" ; then
485     aros_warnflags_discarded_qualifiers=-Wdiscarded-qualifiers
486     aros_nowarnflags_discarded_qualifiers=-Wno-discarded-qualifiers
489 AC_MSG_CHECKING([whether ${CC} accepts -Wsequence-point])
490 CFLAGS=-Wsequence-point
491 AC_TRY_COMPILE(,, aros_sequence_point="yes", aros_sequence_point="no")
492 AC_MSG_RESULT($aros_sequence_point)
493 if test "x-$aros_sequence_point" = "x-yes" ; then
494     aros_warnflags_sequence_point=-Wsequence-point
495     aros_nowarnflags_sequence_point=-Wno-sequence-point
498 AC_MSG_CHECKING([whether ${CC} accepts -Wunknown-pragmas])
499 CFLAGS=-Wunknown-pragmas
500 AC_TRY_COMPILE(,, aros_unknown_pragmas="yes", aros_unknown_pragmas="no")
501 AC_MSG_RESULT($aros_unknown_pragmas)
502 if test "x-$aros_unknown_pragmas" = "x-yes" ; then
503     aros_warnflags_unknown_pragmas=-Wunknown-pragmas
504     aros_nowarnflags_unknown_pragmas=-Wno-unknown-pragmas
507 AC_MSG_CHECKING([whether ${CC} accepts -Wdiscarded-array-qualifiers])
508 CFLAGS=-Wdiscarded-array-qualifiers
509 AC_TRY_COMPILE(,, aros_discarded_array_qualifiers="yes", aros_discarded_array_qualifiers="no")
510 AC_MSG_RESULT($aros_discarded_array_qualifiers)
511 if test "x-$aros_discarded_array_qualifiers" = "x-yes" ; then
512     aros_warnflags_discarded_array_qualifiers=-Wdiscarded-array-qualifiers
513     aros_nowarnflags_discarded_array_qualifiers=-Wno-discarded-array-qualifiers
516 AC_MSG_CHECKING([whether ${CC} accepts -Wint-conversion])
517 CFLAGS=-Wint-conversion
518 AC_TRY_COMPILE(,, aros_int_conversion="yes", aros_int_conversion="no")
519 AC_MSG_RESULT($aros_int_conversion)
520 if test "x-$aros_int_conversion" = "x-yes" ; then
521     aros_warnflags_int_conversion=-Wint-conversion
522     aros_nowarnflags_int_conversion=-Wno-int-conversion
525 AC_MSG_CHECKING([whether ${CC} accepts -Wint-to-pointer-cast])
526 CFLAGS=-Wint-to-pointer-cast
527 AC_TRY_COMPILE(,, aros_int_to_pointer_cast="yes", aros_int_to_pointer_cast="no")
528 AC_MSG_RESULT($aros_int_to_pointer_cast)
529 if test "x-$aros_int_to_pointer_cast" = "x-yes" ; then
530     aros_warnflags_int_to_pointer_cast=-Wint-to-pointer-cast
531     aros_nowarnflags_int_to_pointer_cast=-Wno-int-to-pointer-cast
534 AC_MSG_CHECKING([whether ${CC} accepts -Wpointer-to-int-cast])
535 CFLAGS=-Wpointer-to-int-cast
536 AC_TRY_COMPILE(,, aros_pointer_to_int_cast="yes", aros_pointer_to_int_cast="no")
537 AC_MSG_RESULT($aros_pointer_to_int_cast)
538 if test "x-$aros_pointer_to_int_cast" = "x-yes" ; then
539     aros_warnflags_pointer_to_int_cast=-Wpointer-to-int-cast
540     aros_nowarnflags_pointer_to_int_cast=-Wno-pointer-to-int-cast
543 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-const-variable])
544 CFLAGS=-Wunused-const-variable
545 AC_TRY_COMPILE(,, aros_unused_const_variable="yes", aros_unused_const_variable="no")
546 AC_MSG_RESULT($aros_unused_const_variable)
547 if test "x-$aros_unused_const_variable" = "x-yes" ; then
548     aros_warnflags_unused_const_variable=-Wunused-const-variable
549     aros_nowarnflags_unused_const_variable=-Wno-unused-const-variable
552 AC_MSG_CHECKING([whether ${CC} accepts -Wwrite-strings])
553 CFLAGS=-Wwrite-strings
554 AC_TRY_COMPILE(,, aros_write_strings="yes", aros_write_strings="no")
555 AC_MSG_RESULT($aros_write_strings)
556 if test "x-$aros_write_strings" = "x-yes" ; then
557     aros_warnflags_write_strings=-Wwrite-strings
558     aros_nowarnflags_write_strings=-Wno-write-strings
561 AC_MSG_CHECKING([whether ${CC} accepts -Wcomment])
562 CFLAGS=-Wcomment
563 AC_TRY_COMPILE(,, aros_comment="yes", aros_comment="no")
564 AC_MSG_RESULT($aros_comment)
565 if test "x-$aros_comment" = "x-yes" ; then
566     aros_warnflags_comment=-Wcomment
567     aros_nowarnflags_comment=-Wno-comment
570 AC_MSG_CHECKING([whether ${CC} accepts -Wincompatible-pointer-types])
571 CFLAGS=-Wincompatible-pointer-types
572 AC_TRY_COMPILE(,, aros_incompatible_pointer_types="yes", aros_incompatible_pointer_types="no")
573 AC_MSG_RESULT($aros_incompatible_pointer_types)
574 if test "x-$aros_incompatible_pointer_types" = "x-yes" ; then
575     aros_warnflags_incompatible_pointer_types=-Wincompatible-pointer-types
576     aros_nowarnflags_incompatible_pointer_types=-Wno-incompatible-pointer-types
579 AC_MSG_CHECKING([whether ${CC} accepts -Wbool-compare])
580 CFLAGS=-Wbool-compare
581 AC_TRY_COMPILE(,, aros_bool_compare="yes", aros_bool_compare="no")
582 AC_MSG_RESULT($aros_bool_compare)
583 if test "x-$aros_bool_compare" = "x-yes" ; then
584     aros_warnflags_bool_compare=-Wbool-compare
585     aros_nowarnflags_bool_compare=-Wno-bool-compare
588 AC_MSG_CHECKING([whether ${CC} accepts -Wlogical-not-parentheses])
589 CFLAGS=-Wlogical-not-parentheses
590 AC_TRY_COMPILE(,, aros_logical_not_parentheses="yes", aros_logical_not_parentheses="no")
591 AC_MSG_RESULT($aros_logical_not_parentheses)
592 if test "x-$aros_logical_not_parentheses" = "x-yes" ; then
593     aros_warnflags_logical_not_parentheses=-Wlogical-not-parentheses
594     aros_nowarnflags_logical_not_parentheses=-Wno-logical-not-parentheses
597 AC_MSG_CHECKING([whether ${CC} accepts -Wpointer-sign])
598 CFLAGS=-Wpointer-sign
599 AC_TRY_COMPILE(,, aros_pointer_sign="yes", aros_pointer_sign="no")
600 AC_MSG_RESULT($aros_pointer_sign)
601 if test "x-$aros_pointer_sign" = "x-yes" ; then
602     aros_warnflags_pointer_sign=-Wpointer-sign
603     aros_nowarnflags_pointer_sign=-Wno-pointer-sign
606 AC_MSG_CHECKING([whether ${CC} accepts -Wshift-overflow])
607 CFLAGS=-Wshift-overflow
608 AC_TRY_COMPILE(,, aros_shift_overflow="yes", aros_shift_overflow="no")
609 AC_MSG_RESULT($aros_shift_overflow)
610 if test "x-$aros_shift_overflow" = "x-yes" ; then
611     aros_warnflags_shift_overflow=-Wshift-overflow
612     aros_nowarnflags_shift_overflow=-Wno-shift-overflow
615 AC_MSG_CHECKING([whether ${CC} accepts -Wframe-address])
616 CFLAGS=-Wframe-address
617 AC_TRY_COMPILE(,, aros_frame_address="yes", aros_frame_address="no")
618 AC_MSG_RESULT($aros_frame_address)
619 if test "x-$aros_frame_address" = "x-yes" ; then
620     aros_warnflags_frame_address=-Wframe-address
621     aros_nowarnflags_frame_address=-Wno-frame-address
624 AC_MSG_CHECKING([whether ${CC} accepts -Wdeprecated-declarations])
625 CFLAGS=-Wdeprecated-declarations
626 AC_TRY_COMPILE(,, aros_deprecated_declarations="yes", aros_deprecated_declarations="no")
627 AC_MSG_RESULT($aros_deprecated_declarations)
628 if test "x-$aros_deprecated_declarations" = "x-yes" ; then
629     aros_warnflags_deprecated_declarations=-Wdeprecated-declarations
630     aros_nowarnflags_deprecated_declarations=-Wno-deprecated-declarations
633 AC_MSG_CHECKING([whether ${CC} accepts -Wsign-compare])
634 CFLAGS=-Wsign-compare
635 AC_TRY_COMPILE(,, aros_sign_compare="yes", aros_sign_compare="no")
636 AC_MSG_RESULT($aros_sign_compare)
637 if test "x-$aros_sign_compare" = "x-yes" ; then
638     aros_warnflags_sign_compare=-Wsign-compare
639     aros_nowarnflags_sign_compare=-Wno-sign-compare
642 AC_MSG_CHECKING([whether ${CC} accepts -Wattributes])
643 CFLAGS=-Wattributes
644 AC_TRY_COMPILE(,, aros_attributes="yes", aros_attributes="no")
645 AC_MSG_RESULT($aros_attributes)
646 if test "x-$aros_attributes" = "x-yes" ; then
647     aros_warnflags_attributes=-Wattributes
648     aros_nowarnflags_attributes=-Wno-attributes
651 AC_MSG_CHECKING([whether ${CC} accepts -Woverflow])
652 CFLAGS=-Woverflow
653 AC_TRY_COMPILE(,, aros_overflow="yes", aros_overflow="no")
654 AC_MSG_RESULT($aros_overflow)
655 if test "x-$aros_overflow" = "x-yes" ; then
656     aros_warnflags_overflow=-Woverflow
657     aros_nowarnflags_overflow=-Wno-overflow
660 AC_MSG_CHECKING([whether ${CC} accepts -Wunused-local-typedefs])
661 CFLAGS=-Wunused-local-typedefs
662 AC_TRY_COMPILE(,, aros_unused_local_typedefs="yes", aros_unused_local_typedefs="no")
663 AC_MSG_RESULT($aros_unused_local_typedefs)
664 if test "x-$aros_unused_local_typedefs" = "x-yes" ; then
665     aros_warnflags_unused_local_typedefs=-Wunused-local-typedefs
666     aros_nowarnflags_unused_local_typedefs=-Wno-unused-local-typedefs
669 AC_MSG_CHECKING([whether ${CC} accepts -Wmissing-braces])
670 CFLAGS=-Wmissing-braces
671 AC_TRY_COMPILE(,, aros_missing_braces="yes", aros_missing_braces="no")
672 AC_MSG_RESULT($aros_missing_braces)
673 if test "x-$aros_missing_braces" = "x-yes" ; then
674     aros_warnflags_missing_braces=-Wmissing-braces
675     aros_nowarnflags_missing_braces=-Wno-missing-braces
678 AC_MSG_CHECKING([whether ${CC} accepts -Wconversion-null])
679 CFLAGS=-Wconversion-null
680 AC_TRY_COMPILE(,, aros_conversion_null="yes", aros_conversion_null="no")
681 AC_MSG_RESULT($aros_conversion_null)
682 if test "x-$aros_conversion_null" = "x-yes" ; then
683     aros_warnflags_conversion_null=-Wconversion-null
684     aros_nowarnflags_conversion_null=-Wno-conversion-null
687 AC_MSG_CHECKING([whether ${CC} accepts -Wnarrowing])
688 CFLAGS=-Wnarrowing
689 AC_TRY_COMPILE(,, aros_narrowing="yes", aros_narrowing="no")
690 AC_MSG_RESULT($aros_narrowing)
691 if test "x-$aros_narrowing" = "x-yes" ; then
692     aros_warnflags_narrowing=-Wnarrowing
693     aros_nowarnflags_narrowing=-Wno-narrowing
696 AC_MSG_CHECKING([whether ${CC} accepts -Wvolatile-register-var])
697 CFLAGS=-Wvolatile-register-var
698 AC_TRY_COMPILE(,, aros_volatile_register_var="yes", aros_volatile_register_var="no")
699 AC_MSG_RESULT($aros_volatile_register_var)
700 if test "x-$aros_volatile_register_var" = "x-yes" ; then
701     aros_warnflags_volatile_register_var=-Wvolatile-register-var
702     aros_nowarnflags_volatile_register_var=-Wno-volatile-register-var
705 AC_MSG_CHECKING([whether ${CC} accepts -Wsizeof-pointer-memaccess])
706 CFLAGS=-Wsizeof-pointer-memaccess
707 AC_TRY_COMPILE(,, aros_sizeof_pointer_memaccess="yes", aros_sizeof_pointer_memaccess="no")
708 AC_MSG_RESULT($aros_sizeof_pointer_memaccess)
709 if test "x-$aros_sizeof_pointer_memaccess" = "x-yes" ; then
710     aros_warnflags_sizeof_pointer_memaccess=-Wsizeof-pointer-memaccess
711     aros_nowarnflags_sizeof_pointer_memaccess=-Wno-sizeof-pointer-memaccess
714 AC_MSG_CHECKING([whether ${CC} accepts -Wreturn-type])
715 CFLAGS=-Wreturn-type
716 AC_TRY_COMPILE(,, aros_return_type="yes", aros_return_type="no")
717 AC_MSG_RESULT($aros_return_type)
718 if test "x-$aros_return_type" = "x-yes" ; then
719     aros_warnflags_return_type=-Wreturn-type
720     aros_nowarnflags_return_type=-Wno-return-type
723 AC_MSG_CHECKING([whether ${CC} accepts -Wformat-zero-length])
724 CFLAGS=-Wformat-zero-length
725 AC_TRY_COMPILE(,, aros_format_zero_length="yes", aros_format_zero_length="no")
726 AC_MSG_RESULT($aros_format_zero_length)
727 if test "x-$aros_format_zero_length" = "x-yes" ; then
728     aros_warnflags_format_zero_length=-Wformat-zero-length
729     aros_nowarnflags_format_zero_length=-Wno-format-zero-length
732 AC_MSG_CHECKING([whether ${CC} accepts -Wlto-type-mismatch])
733 CFLAGS=-Wlto-type-mismatch
734 AC_TRY_COMPILE(,, aros_lto_type_mismatch="yes", aros_lto_type_mismatch="no")
735 AC_MSG_RESULT($aros_lto_type_mismatch)
736 if test "x-$aros_lto_type_mismatch" = "x-yes" ; then
737     aros_warnflags_lto_type_mismatch=-Wlto-type-mismatch
738     aros_nowarnflags_lto_type_mismatch=-Wno-lto-type-mismatch
742 # export the feature flags...
744 AC_SUBST(aros_cflags_permissive)
745 AC_SUBST(aros_cflags_fast_math)
746 AC_SUBST(aros_cflags_no_builtin_floor)
747 AC_SUBST(aros_cflags_lto)
748 AC_SUBST(aros_cflags_nolto)
749 AC_SUBST(aros_cflags_whole_program)
750 AC_SUBST(aros_cflags_loop_block)
751 AC_SUBST(aros_cflags_loop_interchange)
752 AC_SUBST(aros_cflags_loop_strip_mine)
753 AC_SUBST(aros_cflags_peel_loops)
754 AC_SUBST(aros_cflags_unroll_loops)
756 AC_SUBST(aros_cflags_strictaliasing)
757 AC_SUBST(aros_cflags_nostrictaliasing)
759 AC_SUBST(aros_cflags_iquote)
760 AC_SUBST(aros_cflags_iquote_end)
763 # export the feature options...
765 AC_SUBST(aros_cflags_no_red_zone)
768 # ...and warning flags...
770 AC_SUBST(aros_warnflags_unused_command_line_argument)
771 AC_SUBST(aros_nowarnflags_unused_command_line_argument)
772 AC_SUBST(aros_warnflags_unknown_warning_option)
773 AC_SUBST(aros_nowarnflags_unknown_warning_option)
774 AC_SUBST(aros_warnflags_unused_but_set_variable)
775 AC_SUBST(aros_nowarnflags_unused_but_set_variable)
776 AC_SUBST(aros_warnflags_strict_aliasing)
777 AC_SUBST(aros_nowarnflags_strict_aliasing)
778 AC_SUBST(aros_warnflags_array_bounds)
779 AC_SUBST(aros_nowarnflags_array_bounds)
780 AC_SUBST(aros_warnflags_enum_compare)
781 AC_SUBST(aros_nowarnflags_enum_compare)
782 AC_SUBST(aros_warnflags_strict_prototypes)
783 AC_SUBST(aros_nowarnflags_strict_prototypes)
784 AC_SUBST(aros_warnflags_strict_overflow)
785 AC_SUBST(aros_nowarnflags_strict_overflow)
786 AC_SUBST(aros_warnflags_format_security)
787 AC_SUBST(aros_nowarnflags_format_security)
788 AC_SUBST(aros_warnflags_misleading_indentation)
789 AC_SUBST(aros_nowarnflags_misleading_indentation)
790 AC_SUBST(aros_warnflags_nonnull_compare)
791 AC_SUBST(aros_nowarnflags_nonnull_compare)
792 AC_SUBST(aros_warnflags_unused)
793 AC_SUBST(aros_nowarnflags_unused)
794 AC_SUBST(aros_warnflags_unused_value)
795 AC_SUBST(aros_nowarnflags_unused_value)
796 AC_SUBST(aros_warnflags_unused_variable)
797 AC_SUBST(aros_nowarnflags_unused_variable)
798 AC_SUBST(aros_warnflags_unused_function)
799 AC_SUBST(aros_nowarnflags_unused_function)
800 AC_SUBST(aros_warnflags_unused_parameter)
801 AC_SUBST(aros_nowarnflags_unused_parameter)
802 AC_SUBST(aros_warnflags_uninitialized)
803 AC_SUBST(aros_nowarnflags_uninitialized)
804 AC_SUBST(aros_warnflags_maybe_uninitialized)
805 AC_SUBST(aros_nowarnflags_maybe_uninitialized)
806 AC_SUBST(aros_warnflags_implicit_function_declaration)
807 AC_SUBST(aros_nowarnflags_implicit_function_declaration)
808 AC_SUBST(aros_warnflags_format)
809 AC_SUBST(aros_nowarnflags_format)
810 AC_SUBST(aros_warnflags_parentheses)
811 AC_SUBST(aros_nowarnflags_parentheses)
812 AC_SUBST(aros_warnflags_char_subscripts)
813 AC_SUBST(aros_nowarnflags_char_subscripts)
814 AC_SUBST(aros_warnflags_endif_labels)
815 AC_SUBST(aros_nowarnflags_endif_labels)
816 AC_SUBST(aros_warnflags_format_contains_nul)
817 AC_SUBST(aros_nowarnflags_format_contains_nul)
818 AC_SUBST(aros_warnflags_implicit_int)
819 AC_SUBST(aros_nowarnflags_implicit_int)
820 AC_SUBST(aros_warnflags_aggressive_loop_optimizations)
821 AC_SUBST(aros_nowarnflags_aggressive_loop_optimizations)
822 AC_SUBST(aros_warnflags_cpp)
823 AC_SUBST(aros_nowarnflags_cpp)
824 AC_SUBST(aros_warnflags_switch)
825 AC_SUBST(aros_nowarnflags_switch)
826 AC_SUBST(aros_warnflags_discarded_qualifiers)
827 AC_SUBST(aros_nowarnflags_discarded_qualifiers)
828 AC_SUBST(aros_warnflags_sequence_point)
829 AC_SUBST(aros_nowarnflags_sequence_point)
830 AC_SUBST(aros_warnflags_unknown_pragmas)
831 AC_SUBST(aros_nowarnflags_unknown_pragmas)
832 AC_SUBST(aros_warnflags_discarded_array_qualifiers)
833 AC_SUBST(aros_nowarnflags_discarded_array_qualifiers)
834 AC_SUBST(aros_warnflags_int_conversion)
835 AC_SUBST(aros_nowarnflags_int_conversion)
836 AC_SUBST(aros_warnflags_int_to_pointer_cast)
837 AC_SUBST(aros_nowarnflags_int_to_pointer_cast)
838 AC_SUBST(aros_warnflags_pointer_to_int_cast)
839 AC_SUBST(aros_nowarnflags_pointer_to_int_cast)
840 AC_SUBST(aros_warnflags_unused_const_variable)
841 AC_SUBST(aros_nowarnflags_unused_const_variable)
842 AC_SUBST(aros_warnflags_write_strings)
843 AC_SUBST(aros_nowarnflags_write_strings)
844 AC_SUBST(aros_warnflags_comment)
845 AC_SUBST(aros_nowarnflags_comment)
846 AC_SUBST(aros_warnflags_incompatible_pointer_types)
847 AC_SUBST(aros_nowarnflags_incompatible_pointer_types)
848 AC_SUBST(aros_warnflags_bool_compare)
849 AC_SUBST(aros_nowarnflags_bool_compare)
850 AC_SUBST(aros_warnflags_logical_not_parentheses)
851 AC_SUBST(aros_nowarnflags_logical_not_parentheses)
852 AC_SUBST(aros_warnflags_pointer_sign)
853 AC_SUBST(aros_nowarnflags_pointer_sign)
854 AC_SUBST(aros_warnflags_shift_overflow)
855 AC_SUBST(aros_nowarnflags_shift_overflow)
856 AC_SUBST(aros_warnflags_frame_address)
857 AC_SUBST(aros_nowarnflags_frame_address)
858 AC_SUBST(aros_warnflags_deprecated_declarations)
859 AC_SUBST(aros_nowarnflags_deprecated_declarations)
860 AC_SUBST(aros_warnflags_sign_compare)
861 AC_SUBST(aros_nowarnflags_sign_compare)
862 AC_SUBST(aros_warnflags_attributes)
863 AC_SUBST(aros_nowarnflags_attributes)
864 AC_SUBST(aros_warnflags_overflow)
865 AC_SUBST(aros_nowarnflags_overflow)
866 AC_SUBST(aros_warnflags_unused_local_typedefs)
867 AC_SUBST(aros_nowarnflags_unused_local_typedefs)
868 AC_SUBST(aros_warnflags_missing_braces)
869 AC_SUBST(aros_nowarnflags_missing_braces)
870 AC_SUBST(aros_warnflags_conversion_null)
871 AC_SUBST(aros_nowarnflags_conversion_null)
872 AC_SUBST(aros_warnflags_narrowing)
873 AC_SUBST(aros_nowarnflags_narrowing)
874 AC_SUBST(aros_warnflags_volatile_register_var)
875 AC_SUBST(aros_nowarnflags_volatile_register_var)
876 AC_SUBST(aros_warnflags_sizeof_pointer_memaccess)
877 AC_SUBST(aros_nowarnflags_sizeof_pointer_memaccess)
878 AC_SUBST(aros_warnflags_return_type)
879 AC_SUBST(aros_nowarnflags_return_type)
880 AC_SUBST(aros_warnflags_format_zero_length)
881 AC_SUBST(aros_nowarnflags_format_zero_length)
882 AC_SUBST(aros_warnflags_lto_type_mismatch)
883 AC_SUBST(aros_nowarnflags_lto_type_mismatch)
884     
885 AC_CONFIG_FILES(
886     ${aros_targetcfg_dir}/compiler.cfg:compiler.cfg.in
889 AC_OUTPUT