2 dnl This file contains stuff.
5 # Base decisions on target environment.
8 # Darwin versions vary, but the linker should work in a cross environment,
9 # so we just check for all the features here.
10 # Check for available headers.
11 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
12 machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h \
15 GLIBCXX_CHECK_COMPILER_FEATURES
16 # Don't call GLIBCXX_CHECK_LINKER_FEATURES, Darwin doesn't have a GNU ld
17 GLIBCXX_CHECK_MATH_SUPPORT
18 GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
19 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
20 GLIBCXX_CHECK_WCHAR_T_SUPPORT
21 GLIBCXX_CHECK_STDLIB_SUPPORT
23 # For showmanyc_helper().
24 AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
26 GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
29 AC_CHECK_HEADERS(sys/uio.h)
32 AC_DEFINE(HAVE_LC_MESSAGES)
35 [#include <setjmp.h>],
37 while (! sigsetjmp (env, 1))
40 [AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available.])])
46 #os_include_dir="os/bsd/freebsd"
47 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
48 machine/endian.h machine/param.h sys/machine.h sys/types.h \
49 fp.h locale.h float.h inttypes.h sys/resource.h sys/stat.h \
51 SECTION_FLAGS='-ffunction-sections -fdata-sections'
52 AC_SUBST(SECTION_FLAGS)
53 GLIBCXX_CHECK_LINKER_FEATURES
54 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
55 GLIBCXX_CHECK_WCHAR_T_SUPPORT
56 AC_DEFINE(HAVE_LC_MESSAGES)
57 AC_DEFINE(HAVE_DRAND48)
58 AC_DEFINE(HAVE_GETPAGESIZE)
59 AC_DEFINE(HAVE_SETENV)
60 AC_DEFINE(HAVE_SIGSETJMP)
61 AC_DEFINE(HAVE_COPYSIGN)
62 AC_DEFINE(HAVE_COPYSIGNF)
63 AC_DEFINE(HAVE_FINITEF)
64 AC_DEFINE(HAVE_FINITE)
65 AC_DEFINE(HAVE_FREXPF)
67 AC_DEFINE(HAVE_HYPOTF)
70 AC_DEFINE(HAVE_ISNANF)
75 AC_DEFINE(HAVE_ATAN2F)
78 AC_DEFINE(HAVE_COPYSIGN)
79 AC_DEFINE(HAVE_COPYSIGNF)
84 AC_DEFINE(HAVE_FLOORF)
86 AC_DEFINE(HAVE_FREXPF)
87 AC_DEFINE(HAVE_LDEXPF)
88 AC_DEFINE(HAVE_LOG10F)
97 if test x"long_double_math_on_this_cpu" = x"yes"; then
98 AC_DEFINE(HAVE_FINITEL)
99 AC_DEFINE(HAVE_ISINFL)
100 AC_DEFINE(HAVE_ISNANL)
104 #os_include_dir="os/hpux"
105 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
106 machine/endian.h machine/param.h sys/machine.h sys/types.h \
107 fp.h locale.h float.h inttypes.h])
108 SECTION_FLAGS='-ffunction-sections -fdata-sections'
109 AC_SUBST(SECTION_FLAGS)
110 GLIBCXX_CHECK_LINKER_FEATURES
111 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
112 GLIBCXX_CHECK_WCHAR_T_SUPPORT
113 AC_DEFINE(HAVE_COPYSIGN)
114 AC_DEFINE(HAVE_COPYSIGNF)
115 AC_DEFINE(HAVE_FREXPF)
116 AC_DEFINE(HAVE_HYPOT)
119 AC_DEFINE(HAVE_FINITE)
120 AC_DEFINE(HAVE_FINITEF)
121 AC_DEFINE(HAVE_ISINF)
122 AC_DEFINE(HAVE_ISINFF)
123 AC_DEFINE(HAVE_ISNAN)
124 AC_DEFINE(HAVE_ISNANF)
129 #os_include_dir="os/gnu-linux"
130 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
131 machine/endian.h machine/param.h sys/machine.h sys/types.h \
132 fp.h locale.h float.h inttypes.h])
133 SECTION_FLAGS='-ffunction-sections -fdata-sections'
134 AC_SUBST(SECTION_FLAGS)
135 GLIBCXX_CHECK_LINKER_FEATURES
136 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
137 GLIBCXX_CHECK_WCHAR_T_SUPPORT
138 AC_DEFINE(HAVE_COPYSIGN)
139 AC_DEFINE(HAVE_COPYSIGNF)
140 AC_DEFINE(HAVE_FINITE)
141 AC_DEFINE(HAVE_FINITEF)
142 AC_DEFINE(HAVE_FREXPF)
143 AC_DEFINE(HAVE_HYPOTF)
144 AC_DEFINE(HAVE_ISINF)
145 AC_DEFINE(HAVE_ISINFF)
146 AC_DEFINE(HAVE_ISNAN)
147 AC_DEFINE(HAVE_ISNANF)
148 AC_DEFINE(HAVE_SINCOS)
149 AC_DEFINE(HAVE_SINCOSF)
150 if test x"long_double_math_on_this_cpu" = x"yes"; then
151 AC_DEFINE(HAVE_FINITEL)
152 AC_DEFINE(HAVE_HYPOTL)
153 AC_DEFINE(HAVE_ISINFL)
154 AC_DEFINE(HAVE_ISNANL)
158 #os_include_dir="os/mingw32"
159 AC_CHECK_HEADERS([sys/types.h locale.h float.h])
160 GLIBCXX_CHECK_LINKER_FEATURES
161 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
162 GLIBCXX_CHECK_WCHAR_T_SUPPORT
165 #os_include_dir="os/bsd/netbsd"
166 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
167 machine/endian.h machine/param.h sys/machine.h sys/types.h \
168 fp.h locale.h float.h inttypes.h])
169 SECTION_FLAGS='-ffunction-sections -fdata-sections'
170 AC_SUBST(SECTION_FLAGS)
171 GLIBCXX_CHECK_LINKER_FEATURES
172 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
173 GLIBCXX_CHECK_WCHAR_T_SUPPORT
174 AC_DEFINE(HAVE_COPYSIGN)
175 AC_DEFINE(HAVE_COPYSIGNF)
176 AC_DEFINE(HAVE_FINITEF)
177 AC_DEFINE(HAVE_FINITE)
178 AC_DEFINE(HAVE_FREXPF)
179 AC_DEFINE(HAVE_HYPOTF)
180 AC_DEFINE(HAVE_ISINF)
181 AC_DEFINE(HAVE_ISINFF)
182 AC_DEFINE(HAVE_ISNAN)
183 AC_DEFINE(HAVE_ISNANF)
184 if test x"long_double_math_on_this_cpu" = x"yes"; then
185 AC_DEFINE(HAVE_FINITEL)
186 AC_DEFINE(HAVE_ISINFL)
187 AC_DEFINE(HAVE_ISNANL)
190 *-qnx6.1* | *-qnx6.2*)
191 #os_include_dir="os/qnx/qnx6.1"
192 SECTION_FLAGS='-ffunction-sections -fdata-sections'
193 AC_SUBST(SECTION_FLAGS)
194 GLIBCXX_CHECK_LINKER_FEATURES
195 GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
196 GLIBCXX_CHECK_WCHAR_T_SUPPORT
199 AC_DEFINE(HAVE_COSHF)
200 AC_DEFINE(HAVE_COSHL)
203 AC_DEFINE(HAVE_LOG10F)
204 AC_DEFINE(HAVE_LOG10L)
207 AC_DEFINE(HAVE_SINHF)
208 AC_DEFINE(HAVE_SINHL)
213 # os_include_dir="os/solaris/solaris2.5"
216 # os_include_dir="os/solaris/solaris2.6"
218 # *-solaris2.7 | *-solaris2.8 | *-solaris2.9)
219 # os_include_dir="os/solaris/solaris2.7"
222 AC_DEFINE(HAVE_STRTOF)
223 AC_DEFINE(HAVE_STRTOLD)
225 AC_DEFINE(HAVE_COPYSIGN)
226 AC_DEFINE(HAVE_ISNAN)
227 AC_DEFINE(HAVE_ISNANF)
228 AC_DEFINE(HAVE_MODFF)
229 AC_DEFINE(HAVE_HYPOT)
232 #os_include_dir="os/windiss"
233 AC_DEFINE(HAVE_ACOSF)
234 AC_DEFINE(HAVE_ASINF)
235 AC_DEFINE(HAVE_ATAN2F)
236 AC_DEFINE(HAVE_ATANF)
237 AC_DEFINE(HAVE_CEILF)
238 AC_DEFINE(HAVE_COPYSIGN)
239 AC_DEFINE(HAVE_COPYSIGNF)
241 AC_DEFINE(HAVE_COSHF)
243 AC_DEFINE(HAVE_FABSF)
244 AC_DEFINE(HAVE_FLOORF)
245 AC_DEFINE(HAVE_FMODF)
246 AC_DEFINE(HAVE_FREXPF)
247 AC_DEFINE(HAVE_LDEXPF)
248 AC_DEFINE(HAVE_LOG10F)
250 AC_DEFINE(HAVE_MODFF)
253 AC_DEFINE(HAVE_SINHF)
254 AC_DEFINE(HAVE_SQRTF)
256 AC_DEFINE(HAVE_TANHF)
259 AC_MSG_ERROR([No support for this host/target combination.])