2 dnl This file contains details for non-native 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 # Don't call GLIBCXX_CHECK_LINKER_FEATURES, Darwin doesn't have a GNU ld
21 GLIBCXX_CHECK_MATH_SUPPORT
22 GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
23 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
24 GLIBCXX_CHECK_ICONV_SUPPORT
25 GLIBCXX_CHECK_STDLIB_SUPPORT
27 # For showmanyc_helper().
28 AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
30 GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
33 AC_CHECK_HEADERS(sys/uio.h)
36 AC_DEFINE(HAVE_LC_MESSAGES)
39 [#include <setjmp.h>],
41 while (! sigsetjmp (env, 1))
44 [AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available.])])
50 AC_CHECK_HEADERS([float.h ieeefp.h inttypes.h locale.h \
51 memory.h stdint.h stdlib.h strings.h string.h unistd.h \
52 wchar.h wctype.h machine/endian.h sys/ioctl.h sys/param.h \
53 sys/resource.h sys/stat.h sys/time.h sys/types.h sys/uio.h])
54 GLIBCXX_CHECK_LINKER_FEATURES
55 GLIBCXX_CHECK_MATH_SUPPORT
56 GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
57 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
58 GLIBCXX_CHECK_ICONV_SUPPORT
59 GLIBCXX_CHECK_STDLIB_SUPPORT
60 GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
61 AC_DEFINE(HAVE_WRITEV)
65 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
66 machine/endian.h machine/param.h sys/machine.h sys/types.h \
67 fp.h locale.h float.h inttypes.h sys/resource.h sys/stat.h \
69 SECTION_FLAGS='-ffunction-sections -fdata-sections'
70 AC_SUBST(SECTION_FLAGS)
71 GLIBCXX_CHECK_LINKER_FEATURES
72 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
73 GLIBCXX_CHECK_ICONV_SUPPORT
74 AC_DEFINE(HAVE_LC_MESSAGES)
75 AC_DEFINE(HAVE_GETPAGESIZE)
76 AC_DEFINE(HAVE_SETENV)
77 AC_DEFINE(HAVE_SIGSETJMP)
78 AC_DEFINE(HAVE_COPYSIGN)
79 AC_DEFINE(HAVE_COPYSIGNF)
80 AC_DEFINE(HAVE_FINITEF)
81 AC_DEFINE(HAVE_FINITE)
82 AC_DEFINE(HAVE_FREXPF)
84 AC_DEFINE(HAVE_HYPOTF)
87 AC_DEFINE(HAVE_ISNANF)
92 AC_DEFINE(HAVE_ATAN2F)
95 AC_DEFINE(HAVE_COPYSIGN)
96 AC_DEFINE(HAVE_COPYSIGNF)
100 AC_DEFINE(HAVE_FABSF)
101 AC_DEFINE(HAVE_FLOORF)
102 AC_DEFINE(HAVE_FMODF)
103 AC_DEFINE(HAVE_FREXPF)
104 AC_DEFINE(HAVE_LDEXPF)
105 AC_DEFINE(HAVE_LOG10F)
107 AC_DEFINE(HAVE_MODFF)
110 AC_DEFINE(HAVE_SINHF)
111 AC_DEFINE(HAVE_SQRTF)
113 AC_DEFINE(HAVE_TANHF)
114 if test x"long_double_math_on_this_cpu" = x"yes"; then
115 AC_DEFINE(HAVE_FINITEL)
116 AC_DEFINE(HAVE_ISINFL)
117 AC_DEFINE(HAVE_ISNANL)
121 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
122 machine/endian.h machine/param.h sys/machine.h sys/types.h \
123 fp.h locale.h float.h inttypes.h])
124 SECTION_FLAGS='-ffunction-sections -fdata-sections'
125 AC_SUBST(SECTION_FLAGS)
126 GLIBCXX_CHECK_LINKER_FEATURES
127 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
128 GLIBCXX_CHECK_ICONV_SUPPORT
129 AC_DEFINE(HAVE_COPYSIGN)
130 AC_DEFINE(HAVE_COPYSIGNF)
131 AC_DEFINE(HAVE_FREXPF)
132 AC_DEFINE(HAVE_HYPOT)
135 AC_DEFINE(HAVE_FINITE)
136 AC_DEFINE(HAVE_FINITEF)
137 AC_DEFINE(HAVE_ISINF)
138 AC_DEFINE(HAVE_ISINFF)
139 AC_DEFINE(HAVE_ISNAN)
140 AC_DEFINE(HAVE_ISNANF)
144 *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
145 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
146 machine/endian.h machine/param.h sys/machine.h sys/types.h \
147 fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
148 SECTION_FLAGS='-ffunction-sections -fdata-sections'
149 AC_SUBST(SECTION_FLAGS)
150 GLIBCXX_CHECK_COMPILER_FEATURES
151 GLIBCXX_CHECK_LINKER_FEATURES
152 GLIBCXX_CHECK_MATH_SUPPORT
153 GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
154 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
155 GLIBCXX_CHECK_ICONV_SUPPORT
156 GLIBCXX_CHECK_STDLIB_SUPPORT
159 AC_DEFINE(HAVE_INT64_T)
162 # Don't enable LFS with uClibc
165 AC_DEFINE(_GLIBCXX_USE_LFS)
168 # For showmanyc_helper().
169 AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
171 GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
174 AC_CHECK_HEADERS(sys/uio.h)
178 AC_CHECK_HEADERS([sys/types.h locale.h float.h])
179 GLIBCXX_CHECK_LINKER_FEATURES
180 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
181 GLIBCXX_CHECK_ICONV_SUPPORT
184 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
185 machine/endian.h machine/param.h sys/machine.h sys/types.h \
186 fp.h locale.h float.h inttypes.h])
187 SECTION_FLAGS='-ffunction-sections -fdata-sections'
188 AC_SUBST(SECTION_FLAGS)
189 GLIBCXX_CHECK_LINKER_FEATURES
190 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
191 GLIBCXX_CHECK_ICONV_SUPPORT
192 AC_DEFINE(HAVE_COPYSIGN)
193 AC_DEFINE(HAVE_COPYSIGNF)
194 AC_DEFINE(HAVE_FINITEF)
195 AC_DEFINE(HAVE_FINITE)
196 AC_DEFINE(HAVE_FREXPF)
197 AC_DEFINE(HAVE_HYPOTF)
198 AC_DEFINE(HAVE_ISINF)
199 AC_DEFINE(HAVE_ISINFF)
200 AC_DEFINE(HAVE_ISNAN)
201 AC_DEFINE(HAVE_ISNANF)
202 if test x"long_double_math_on_this_cpu" = x"yes"; then
203 AC_DEFINE(HAVE_FINITEL)
204 AC_DEFINE(HAVE_ISINFL)
205 AC_DEFINE(HAVE_ISNANL)
209 AC_CHECK_HEADERS([nan.h ieeefp.h sys/isa_defs.h sys/machine.h \
210 sys/types.h locale.h float.h inttypes.h])
211 SECTION_FLAGS='-ffunction-sections -fdata-sections'
212 AC_SUBST(SECTION_FLAGS)
213 GLIBCXX_CHECK_LINKER_FEATURES
214 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
215 GLIBCXX_CHECK_ICONV_SUPPORT
216 AC_DEFINE(HAVE_HYPOT)
217 AC_DEFINE(HAVE_ISINF)
218 AC_DEFINE(HAVE_ISNAN)
220 # For showmanyc_helper().
221 AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
223 GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
226 AC_CHECK_HEADERS(sys/uio.h)
229 *-qnx6.1* | *-qnx6.2*)
230 SECTION_FLAGS='-ffunction-sections -fdata-sections'
231 AC_SUBST(SECTION_FLAGS)
232 GLIBCXX_CHECK_LINKER_FEATURES
233 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
234 GLIBCXX_CHECK_ICONV_SUPPORT
237 AC_DEFINE(HAVE_COSHF)
238 AC_DEFINE(HAVE_COSHL)
241 AC_DEFINE(HAVE_LOG10F)
242 AC_DEFINE(HAVE_LOG10L)
245 AC_DEFINE(HAVE_SINHF)
246 AC_DEFINE(HAVE_SINHL)
251 # os_include_dir="os/solaris/solaris2.5"
254 # os_include_dir="os/solaris/solaris2.6"
256 *-solaris2.7 | *-solaris2.8 | *-solaris2.9 | *-solaris2.10)
257 AC_DEFINE(HAVE_GETPAGESIZE)
258 AC_DEFINE(HAVE_SIGSETJMP)
259 AC_DEFINE(HAVE_MBSTATE_T)
261 AC_DEFINE(HAVE_S_ISREG)
262 AC_DEFINE(HAVE_LC_MESSAGES)
263 AC_DEFINE(HAVE_FINITE)
264 AC_DEFINE(HAVE_FPCLASS)
265 AC_DEFINE(HAVE_GETPAGESIZE)
266 AC_DEFINE(HAVE_NL_LANGINFO)
267 AC_DEFINE(HAVE_ICONV)
268 AC_DEFINE(HAVE_ICONV_CLOSE)
269 AC_DEFINE(HAVE_ICONV_OPEN)
270 # Look for the pieces required for wchar_t support in order to
271 # get all the right HAVE_* macros defined.
272 GLIBCXX_CHECK_ICONV_SUPPORT
273 # All of the dependencies for wide character support are here, so
274 # turn it on. This requires some syncronization with the
275 # GLIBCXX_CHECK_ICONV_SUPPORT in acinclude.m4
276 AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
277 # Are these tested for even when cross?
278 AC_DEFINE(HAVE_FLOAT_H)
279 AC_DEFINE(HAVE_IEEEFP_H)
280 AC_DEFINE(HAVE_INTTYPES_H)
281 AC_DEFINE(HAVE_LOCALE_H)
282 AC_DEFINE(HAVE_NAN_H)
283 AC_DEFINE(HAVE_SYS_FILIO_H)
284 AC_DEFINE(HAVE_SYS_IOCTL_H)
285 AC_DEFINE(HAVE_SYS_ISA_DEFS_H)
286 AC_DEFINE(HAVE_SYS_RESOURCE_H)
287 AC_DEFINE(HAVE_SYS_TIME_H)
288 AC_DEFINE(HAVE_SYS_TYPES_H)
289 AC_DEFINE(HAVE_UNISTD_H)
290 AC_DEFINE(HAVE_WCHAR_H)
291 AC_DEFINE(HAVE_WCTYPE_H)
296 sparc*-*-solaris2.8 | sparc*-*-solaris2.9 | sparc*-*-solaris2.10)
297 # I saw these on sparc-sun-solaris2.8, but not 2.6, and not on i386
298 AC_DEFINE(HAVE___BUILTIN_ABS)
299 AC_DEFINE(HAVE___BUILTIN_LABS)
300 AC_DEFINE(HAVE___BUILTIN_FABS)
301 AC_DEFINE(HAVE___BUILTIN_FABSF)
302 AC_DEFINE(HAVE___BUILTIN_FABSL)
303 AC_DEFINE(HAVE___BUILTIN_COS)
304 AC_DEFINE(HAVE___BUILTIN_COSF)
305 AC_DEFINE(HAVE___BUILTIN_SIN)
306 AC_DEFINE(HAVE___BUILTIN_SINF)
311 # These two C99 functions are present only in Solaris >= 10
312 AC_DEFINE(HAVE_STRTOF)
313 AC_DEFINE(HAVE_STRTOLD)
317 AC_DEFINE(HAVE_COPYSIGN)
318 AC_DEFINE(HAVE_ISNAN)
319 AC_DEFINE(HAVE_ISNANF)
320 AC_DEFINE(HAVE_MODFF)
321 AC_DEFINE(HAVE_HYPOT)
324 AC_CHECK_HEADERS([nan.h endian.h machine/endian.h \
325 sys/param.h sys/types.h locale.h float.h inttypes.h])
326 SECTION_FLAGS='-ffunction-sections -fdata-sections'
327 AC_SUBST(SECTION_FLAGS)
328 GLIBCXX_CHECK_LINKER_FEATURES
329 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
330 GLIBCXX_CHECK_ICONV_SUPPORT
331 AC_DEFINE(HAVE_COPYSIGN)
332 AC_DEFINE(HAVE_COPYSIGNF)
333 AC_DEFINE(HAVE_FINITE)
334 AC_DEFINE(HAVE_FINITEF)
335 AC_DEFINE(HAVE_FREXPF)
336 AC_DEFINE(HAVE_HYPOTF)
337 AC_DEFINE(HAVE_ISINF)
338 AC_DEFINE(HAVE_ISINFF)
339 AC_DEFINE(HAVE_ISNAN)
340 AC_DEFINE(HAVE_ISNANF)
341 AC_DEFINE(HAVE_SINCOS)
342 AC_DEFINE(HAVE_SINCOSF)
343 if test x"long_double_math_on_this_cpu" = x"yes"; then
344 AC_DEFINE(HAVE_FINITEL)
345 AC_DEFINE(HAVE_HYPOTL)
346 AC_DEFINE(HAVE_ISINFL)
347 AC_DEFINE(HAVE_ISNANL)
352 AC_DEFINE(HAVE_ACOSF)
353 AC_DEFINE(HAVE_ASINF)
354 AC_DEFINE(HAVE_ATAN2F)
355 AC_DEFINE(HAVE_ATANF)
356 AC_DEFINE(HAVE_CEILF)
358 AC_DEFINE(HAVE_COSHF)
360 AC_DEFINE(HAVE_FABSF)
361 AC_DEFINE(HAVE_FLOORF)
362 AC_DEFINE(HAVE_FMODF)
363 AC_DEFINE(HAVE_HYPOT)
364 AC_DEFINE(HAVE_LOG10F)
368 AC_DEFINE(HAVE_SINHF)
369 AC_DEFINE(HAVE_SQRTF)
371 AC_DEFINE(HAVE_TANHF)
374 AC_DEFINE(HAVE_ACOSF)
375 AC_DEFINE(HAVE_ACOSL)
376 AC_DEFINE(HAVE_ASINF)
377 AC_DEFINE(HAVE_ASINL)
378 AC_DEFINE(HAVE_ATAN2F)
379 AC_DEFINE(HAVE_ATAN2L)
380 AC_DEFINE(HAVE_ATANF)
381 AC_DEFINE(HAVE_ATANL)
382 AC_DEFINE(HAVE_CEILF)
383 AC_DEFINE(HAVE_CEILL)
384 AC_DEFINE(HAVE_COPYSIGN)
385 AC_DEFINE(HAVE_COPYSIGNF)
388 AC_DEFINE(HAVE_COSHF)
389 AC_DEFINE(HAVE_COSHL)
392 AC_DEFINE(HAVE_FABSF)
393 AC_DEFINE(HAVE_FABSL)
394 AC_DEFINE(HAVE_FLOORF)
395 AC_DEFINE(HAVE_FLOORL)
396 AC_DEFINE(HAVE_FMODF)
397 AC_DEFINE(HAVE_FMODL)
398 AC_DEFINE(HAVE_FREXPF)
399 AC_DEFINE(HAVE_FREXPL)
400 AC_DEFINE(HAVE_LDEXPF)
401 AC_DEFINE(HAVE_LDEXPL)
402 AC_DEFINE(HAVE_LOG10F)
403 AC_DEFINE(HAVE_LOG10L)
405 AC_DEFINE(HAVE_MODFF)
406 AC_DEFINE(HAVE_MODFL)
411 AC_DEFINE(HAVE_SINHF)
412 AC_DEFINE(HAVE_SINHL)
413 AC_DEFINE(HAVE_SQRTF)
414 AC_DEFINE(HAVE_SQRTL)
417 AC_DEFINE(HAVE_TANHF)
418 AC_DEFINE(HAVE_TANHL)
421 AC_MSG_ERROR([No support for this host/target combination.])