2 dnl This file contains details for non-natives builds.
5 AC_DEFUN([GLIBCXX_CROSSCONFIG],[
6 # Base decisions on target environment.
9 # This is a freestanding configuration; there is nothing to do here.
13 # Darwin versions vary, but the linker should work in a cross environment,
14 # so we just check for all the features here.
15 # Check for available headers.
16 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
17 machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h \
20 GLIBCXX_CHECK_COMPILER_FEATURES
21 # Don't call GLIBCXX_CHECK_LINKER_FEATURES, Darwin doesn't have a GNU ld
22 GLIBCXX_CHECK_MATH_SUPPORT
23 GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
24 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
25 GLIBCXX_CHECK_ICONV_SUPPORT
26 GLIBCXX_CHECK_STDLIB_SUPPORT
28 # For showmanyc_helper().
29 AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
31 GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
34 AC_CHECK_HEADERS(sys/uio.h)
37 AC_DEFINE(HAVE_LC_MESSAGES)
40 [#include <setjmp.h>],
42 while (! sigsetjmp (env, 1))
45 [AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available.])])
51 AC_CHECK_HEADERS([float.h ieeefp.h inttypes.h locale.h \
52 memory.h stdint.h stdlib.h strings.h string.h unistd.h \
53 wchar.h wctype.h machine/endian.h sys/ioctl.h sys/param.h \
54 sys/resource.h sys/stat.h sys/time.h sys/types.h sys/uio.h])
55 GLIBCXX_CHECK_COMPILER_FEATURES
56 GLIBCXX_CHECK_LINKER_FEATURES
57 GLIBCXX_CHECK_MATH_SUPPORT
58 GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
59 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
60 GLIBCXX_CHECK_ICONV_SUPPORT
61 GLIBCXX_CHECK_STDLIB_SUPPORT
62 GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
63 AC_DEFINE(HAVE_WRITEV)
67 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
68 machine/endian.h machine/param.h sys/machine.h sys/types.h \
69 fp.h locale.h float.h inttypes.h sys/resource.h sys/stat.h \
71 SECTION_FLAGS='-ffunction-sections -fdata-sections'
72 AC_SUBST(SECTION_FLAGS)
73 GLIBCXX_CHECK_LINKER_FEATURES
74 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
75 GLIBCXX_CHECK_ICONV_SUPPORT
76 AC_DEFINE(HAVE_LC_MESSAGES)
77 AC_DEFINE(HAVE_GETPAGESIZE)
78 AC_DEFINE(HAVE_SETENV)
79 AC_DEFINE(HAVE_SIGSETJMP)
80 AC_DEFINE(HAVE_COPYSIGN)
81 AC_DEFINE(HAVE_COPYSIGNF)
82 AC_DEFINE(HAVE_FINITEF)
83 AC_DEFINE(HAVE_FINITE)
84 AC_DEFINE(HAVE_FREXPF)
86 AC_DEFINE(HAVE_HYPOTF)
89 AC_DEFINE(HAVE_ISNANF)
94 AC_DEFINE(HAVE_ATAN2F)
97 AC_DEFINE(HAVE_COPYSIGN)
98 AC_DEFINE(HAVE_COPYSIGNF)
100 AC_DEFINE(HAVE_COSHF)
102 AC_DEFINE(HAVE_FABSF)
103 AC_DEFINE(HAVE_FLOORF)
104 AC_DEFINE(HAVE_FMODF)
105 AC_DEFINE(HAVE_FREXPF)
106 AC_DEFINE(HAVE_LDEXPF)
107 AC_DEFINE(HAVE_LOG10F)
109 AC_DEFINE(HAVE_MODFF)
112 AC_DEFINE(HAVE_SINHF)
113 AC_DEFINE(HAVE_SQRTF)
115 AC_DEFINE(HAVE_TANHF)
116 if test x"long_double_math_on_this_cpu" = x"yes"; then
117 AC_DEFINE(HAVE_FINITEL)
118 AC_DEFINE(HAVE_ISINFL)
119 AC_DEFINE(HAVE_ISNANL)
123 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
124 machine/endian.h machine/param.h sys/machine.h sys/types.h \
125 fp.h locale.h float.h inttypes.h])
126 SECTION_FLAGS='-ffunction-sections -fdata-sections'
127 AC_SUBST(SECTION_FLAGS)
128 GLIBCXX_CHECK_LINKER_FEATURES
129 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
130 GLIBCXX_CHECK_ICONV_SUPPORT
131 AC_DEFINE(HAVE_COPYSIGN)
132 AC_DEFINE(HAVE_COPYSIGNF)
133 AC_DEFINE(HAVE_FREXPF)
134 AC_DEFINE(HAVE_HYPOT)
137 AC_DEFINE(HAVE_FINITE)
138 AC_DEFINE(HAVE_FINITEF)
139 AC_DEFINE(HAVE_ISINF)
140 AC_DEFINE(HAVE_ISINFF)
141 AC_DEFINE(HAVE_ISNAN)
142 AC_DEFINE(HAVE_ISNANF)
146 *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
147 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
148 machine/endian.h machine/param.h sys/machine.h sys/types.h \
149 fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
150 SECTION_FLAGS='-ffunction-sections -fdata-sections'
151 AC_SUBST(SECTION_FLAGS)
152 GLIBCXX_CHECK_COMPILER_FEATURES
153 GLIBCXX_CHECK_LINKER_FEATURES
154 GLIBCXX_CHECK_MATH_SUPPORT
155 GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
156 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
157 GLIBCXX_CHECK_ICONV_SUPPORT
158 GLIBCXX_CHECK_STDLIB_SUPPORT
161 AC_DEFINE(HAVE_INT64_T)
164 # Don't enable LFS with uClibc
167 AC_DEFINE(_GLIBCXX_USE_LFS)
170 # For showmanyc_helper().
171 AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
173 GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
176 AC_CHECK_HEADERS(sys/uio.h)
180 AC_CHECK_HEADERS([sys/types.h locale.h float.h])
181 GLIBCXX_CHECK_LINKER_FEATURES
182 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
183 GLIBCXX_CHECK_ICONV_SUPPORT
186 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
187 machine/endian.h machine/param.h sys/machine.h sys/types.h \
188 fp.h locale.h float.h inttypes.h])
189 SECTION_FLAGS='-ffunction-sections -fdata-sections'
190 AC_SUBST(SECTION_FLAGS)
191 GLIBCXX_CHECK_LINKER_FEATURES
192 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
193 GLIBCXX_CHECK_ICONV_SUPPORT
194 AC_DEFINE(HAVE_COPYSIGN)
195 AC_DEFINE(HAVE_COPYSIGNF)
196 AC_DEFINE(HAVE_FINITEF)
197 AC_DEFINE(HAVE_FINITE)
198 AC_DEFINE(HAVE_FREXPF)
199 AC_DEFINE(HAVE_HYPOTF)
200 AC_DEFINE(HAVE_ISINF)
201 AC_DEFINE(HAVE_ISINFF)
202 AC_DEFINE(HAVE_ISNAN)
203 AC_DEFINE(HAVE_ISNANF)
204 if test x"long_double_math_on_this_cpu" = x"yes"; then
205 AC_DEFINE(HAVE_FINITEL)
206 AC_DEFINE(HAVE_ISINFL)
207 AC_DEFINE(HAVE_ISNANL)
211 AC_CHECK_HEADERS([nan.h ieeefp.h sys/isa_defs.h sys/machine.h \
212 sys/types.h locale.h float.h inttypes.h])
213 SECTION_FLAGS='-ffunction-sections -fdata-sections'
214 AC_SUBST(SECTION_FLAGS)
215 GLIBCXX_CHECK_LINKER_FEATURES
216 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
217 GLIBCXX_CHECK_ICONV_SUPPORT
218 AC_DEFINE(HAVE_HYPOT)
219 AC_DEFINE(HAVE_ISINF)
220 AC_DEFINE(HAVE_ISNAN)
222 # For showmanyc_helper().
223 AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
225 GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
228 AC_CHECK_HEADERS(sys/uio.h)
231 *-qnx6.1* | *-qnx6.2*)
232 SECTION_FLAGS='-ffunction-sections -fdata-sections'
233 AC_SUBST(SECTION_FLAGS)
234 GLIBCXX_CHECK_LINKER_FEATURES
235 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
236 GLIBCXX_CHECK_ICONV_SUPPORT
239 AC_DEFINE(HAVE_COSHF)
240 AC_DEFINE(HAVE_COSHL)
243 AC_DEFINE(HAVE_LOG10F)
244 AC_DEFINE(HAVE_LOG10L)
247 AC_DEFINE(HAVE_SINHF)
248 AC_DEFINE(HAVE_SINHL)
253 # os_include_dir="os/solaris/solaris2.5"
256 # os_include_dir="os/solaris/solaris2.6"
258 *-solaris2.7 | *-solaris2.8 | *-solaris2.9 | *-solaris2.10)
259 AC_DEFINE(HAVE_GETPAGESIZE)
260 AC_DEFINE(HAVE_SIGSETJMP)
261 AC_DEFINE(HAVE_MBSTATE_T)
263 AC_DEFINE(HAVE_S_ISREG)
264 AC_DEFINE(HAVE_LC_MESSAGES)
265 AC_DEFINE(HAVE_FINITE)
266 AC_DEFINE(HAVE_FPCLASS)
267 AC_DEFINE(HAVE_GETPAGESIZE)
268 AC_DEFINE(HAVE_NL_LANGINFO)
269 AC_DEFINE(HAVE_ICONV)
270 AC_DEFINE(HAVE_ICONV_CLOSE)
271 AC_DEFINE(HAVE_ICONV_OPEN)
272 # Look for the pieces required for wchar_t support in order to
273 # get all the right HAVE_* macros defined.
274 GLIBCXX_CHECK_ICONV_SUPPORT
275 # All of the dependencies for wide character support are here, so
276 # turn it on. This requires some syncronization with the
277 # GLIBCXX_CHECK_ICONV_SUPPORT in acinclude.m4
278 AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
279 # Are these tested for even when cross?
280 AC_DEFINE(HAVE_FLOAT_H)
281 AC_DEFINE(HAVE_IEEEFP_H)
282 AC_DEFINE(HAVE_INTTYPES_H)
283 AC_DEFINE(HAVE_LOCALE_H)
284 AC_DEFINE(HAVE_NAN_H)
285 AC_DEFINE(HAVE_SYS_FILIO_H)
286 AC_DEFINE(HAVE_SYS_IOCTL_H)
287 AC_DEFINE(HAVE_SYS_ISA_DEFS_H)
288 AC_DEFINE(HAVE_SYS_RESOURCE_H)
289 AC_DEFINE(HAVE_SYS_TIME_H)
290 AC_DEFINE(HAVE_SYS_TYPES_H)
291 AC_DEFINE(HAVE_UNISTD_H)
292 AC_DEFINE(HAVE_WCHAR_H)
293 AC_DEFINE(HAVE_WCTYPE_H)
298 sparc*-*-solaris2.8 | sparc*-*-solaris2.9 | sparc*-*-solaris2.10)
299 # I saw these on sparc-sun-solaris2.8, but not 2.6, and not on i386
300 AC_DEFINE(HAVE___BUILTIN_ABS)
301 AC_DEFINE(HAVE___BUILTIN_LABS)
302 AC_DEFINE(HAVE___BUILTIN_FABS)
303 AC_DEFINE(HAVE___BUILTIN_FABSF)
304 AC_DEFINE(HAVE___BUILTIN_FABSL)
305 AC_DEFINE(HAVE___BUILTIN_COS)
306 AC_DEFINE(HAVE___BUILTIN_COSF)
307 AC_DEFINE(HAVE___BUILTIN_SIN)
308 AC_DEFINE(HAVE___BUILTIN_SINF)
313 # These two C99 functions are present only in Solaris >= 10
314 AC_DEFINE(HAVE_STRTOF)
315 AC_DEFINE(HAVE_STRTOLD)
319 AC_DEFINE(HAVE_COPYSIGN)
320 AC_DEFINE(HAVE_ISNAN)
321 AC_DEFINE(HAVE_ISNANF)
322 AC_DEFINE(HAVE_MODFF)
323 AC_DEFINE(HAVE_HYPOT)
326 AC_CHECK_HEADERS([nan.h endian.h machine/endian.h \
327 sys/param.h sys/types.h locale.h float.h inttypes.h])
328 SECTION_FLAGS='-ffunction-sections -fdata-sections'
329 AC_SUBST(SECTION_FLAGS)
330 GLIBCXX_CHECK_LINKER_FEATURES
331 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
332 GLIBCXX_CHECK_ICONV_SUPPORT
333 AC_DEFINE(HAVE_COPYSIGN)
334 AC_DEFINE(HAVE_COPYSIGNF)
335 AC_DEFINE(HAVE_FINITE)
336 AC_DEFINE(HAVE_FINITEF)
337 AC_DEFINE(HAVE_FREXPF)
338 AC_DEFINE(HAVE_HYPOTF)
339 AC_DEFINE(HAVE_ISINF)
340 AC_DEFINE(HAVE_ISINFF)
341 AC_DEFINE(HAVE_ISNAN)
342 AC_DEFINE(HAVE_ISNANF)
343 AC_DEFINE(HAVE_SINCOS)
344 AC_DEFINE(HAVE_SINCOSF)
345 if test x"long_double_math_on_this_cpu" = x"yes"; then
346 AC_DEFINE(HAVE_FINITEL)
347 AC_DEFINE(HAVE_HYPOTL)
348 AC_DEFINE(HAVE_ISINFL)
349 AC_DEFINE(HAVE_ISNANL)
354 AC_DEFINE(HAVE_ACOSF)
355 AC_DEFINE(HAVE_ASINF)
356 AC_DEFINE(HAVE_ATAN2F)
357 AC_DEFINE(HAVE_ATANF)
358 AC_DEFINE(HAVE_CEILF)
360 AC_DEFINE(HAVE_COSHF)
362 AC_DEFINE(HAVE_FABSF)
363 AC_DEFINE(HAVE_FLOORF)
364 AC_DEFINE(HAVE_FMODF)
365 AC_DEFINE(HAVE_HYPOT)
366 AC_DEFINE(HAVE_LOG10F)
370 AC_DEFINE(HAVE_SINHF)
371 AC_DEFINE(HAVE_SQRTF)
373 AC_DEFINE(HAVE_TANHF)
376 AC_DEFINE(HAVE_ACOSF)
377 AC_DEFINE(HAVE_ACOSL)
378 AC_DEFINE(HAVE_ASINF)
379 AC_DEFINE(HAVE_ASINL)
380 AC_DEFINE(HAVE_ATAN2F)
381 AC_DEFINE(HAVE_ATAN2L)
382 AC_DEFINE(HAVE_ATANF)
383 AC_DEFINE(HAVE_ATANL)
384 AC_DEFINE(HAVE_CEILF)
385 AC_DEFINE(HAVE_CEILL)
386 AC_DEFINE(HAVE_COPYSIGN)
387 AC_DEFINE(HAVE_COPYSIGNF)
390 AC_DEFINE(HAVE_COSHF)
391 AC_DEFINE(HAVE_COSHL)
394 AC_DEFINE(HAVE_FABSF)
395 AC_DEFINE(HAVE_FABSL)
396 AC_DEFINE(HAVE_FLOORF)
397 AC_DEFINE(HAVE_FLOORL)
398 AC_DEFINE(HAVE_FMODF)
399 AC_DEFINE(HAVE_FMODL)
400 AC_DEFINE(HAVE_FREXPF)
401 AC_DEFINE(HAVE_FREXPL)
402 AC_DEFINE(HAVE_LDEXPF)
403 AC_DEFINE(HAVE_LDEXPL)
404 AC_DEFINE(HAVE_LOG10F)
405 AC_DEFINE(HAVE_LOG10L)
407 AC_DEFINE(HAVE_MODFF)
408 AC_DEFINE(HAVE_MODFL)
413 AC_DEFINE(HAVE_SINHF)
414 AC_DEFINE(HAVE_SINHL)
415 AC_DEFINE(HAVE_SQRTF)
416 AC_DEFINE(HAVE_SQRTL)
419 AC_DEFINE(HAVE_TANHF)
420 AC_DEFINE(HAVE_TANHL)
423 AC_MSG_ERROR([No support for this host/target combination.])