diff options
Diffstat (limited to 'gl/m4/math_h.m4')
-rw-r--r-- | gl/m4/math_h.m4 | 287 |
1 files changed, 250 insertions, 37 deletions
diff --git a/gl/m4/math_h.m4 b/gl/m4/math_h.m4 index 2d89ca3f..bf0845fd 100644 --- a/gl/m4/math_h.m4 +++ b/gl/m4/math_h.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # math_h.m4 serial 21 | 1 | # math_h.m4 serial 114 |
2 | dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2007-2013 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
@@ -8,7 +8,6 @@ AC_DEFUN([gl_MATH_H], | |||
8 | [ | 8 | [ |
9 | AC_REQUIRE([gl_MATH_H_DEFAULTS]) | 9 | AC_REQUIRE([gl_MATH_H_DEFAULTS]) |
10 | gl_CHECK_NEXT_HEADERS([math.h]) | 10 | gl_CHECK_NEXT_HEADERS([math.h]) |
11 | AC_REQUIRE([AC_C_INLINE]) | ||
12 | 11 | ||
13 | AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works], | 12 | AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works], |
14 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]], | 13 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]], |
@@ -38,9 +37,20 @@ AC_DEFUN([gl_MATH_H], | |||
38 | 37 | ||
39 | dnl Check for declarations of anything we want to poison if the | 38 | dnl Check for declarations of anything we want to poison if the |
40 | dnl corresponding gnulib module is not in use. | 39 | dnl corresponding gnulib module is not in use. |
41 | gl_WARN_ON_USE_PREPARE([[#include <math.h> | 40 | gl_WARN_ON_USE_PREPARE([[#include <math.h>]], |
42 | ]], [acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl | 41 | [acosf acosl asinf asinl atanf atanl |
43 | ldexpl logb logl round roundf roundl sinl sqrtl tanl trunc truncf truncl]) | 42 | cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf |
43 | expf expl exp2 exp2f exp2l expm1 expm1f expm1l | ||
44 | fabsf fabsl floorf floorl fma fmaf fmal | ||
45 | fmod fmodf fmodl frexpf frexpl hypotf hypotl | ||
46 | ilogb ilogbf ilogbl | ||
47 | ldexpf ldexpl | ||
48 | log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l | ||
49 | logb logbf logbl | ||
50 | modf modff modfl powf | ||
51 | remainder remainderf remainderl | ||
52 | rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl | ||
53 | tanf tanl tanhf trunc truncf truncl]) | ||
44 | ]) | 54 | ]) |
45 | 55 | ||
46 | AC_DEFUN([gl_MATH_MODULE_INDICATOR], | 56 | AC_DEFUN([gl_MATH_MODULE_INDICATOR], |
@@ -54,62 +64,189 @@ AC_DEFUN([gl_MATH_MODULE_INDICATOR], | |||
54 | 64 | ||
55 | AC_DEFUN([gl_MATH_H_DEFAULTS], | 65 | AC_DEFUN([gl_MATH_H_DEFAULTS], |
56 | [ | 66 | [ |
57 | GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL]) | 67 | GNULIB_ACOSF=0; AC_SUBST([GNULIB_ACOSF]) |
58 | GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL]) | 68 | GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL]) |
59 | GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL]) | 69 | GNULIB_ASINF=0; AC_SUBST([GNULIB_ASINF]) |
60 | GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF]) | 70 | GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL]) |
61 | GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL]) | 71 | GNULIB_ATANF=0; AC_SUBST([GNULIB_ATANF]) |
62 | GNULIB_COSL=0; AC_SUBST([GNULIB_COSL]) | 72 | GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL]) |
63 | GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL]) | 73 | GNULIB_ATAN2F=0; AC_SUBST([GNULIB_ATAN2F]) |
64 | GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF]) | 74 | GNULIB_CBRT=0; AC_SUBST([GNULIB_CBRT]) |
65 | GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL]) | 75 | GNULIB_CBRTF=0; AC_SUBST([GNULIB_CBRTF]) |
66 | GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP]) | 76 | GNULIB_CBRTL=0; AC_SUBST([GNULIB_CBRTL]) |
67 | GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL]) | 77 | GNULIB_CEIL=0; AC_SUBST([GNULIB_CEIL]) |
68 | GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE]) | 78 | GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF]) |
69 | GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF]) | 79 | GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL]) |
70 | GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN]) | 80 | GNULIB_COPYSIGN=0; AC_SUBST([GNULIB_COPYSIGN]) |
71 | GNULIB_ISNANF=0; AC_SUBST([GNULIB_ISNANF]) | 81 | GNULIB_COPYSIGNF=0; AC_SUBST([GNULIB_COPYSIGNF]) |
72 | GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND]) | 82 | GNULIB_COPYSIGNL=0; AC_SUBST([GNULIB_COPYSIGNL]) |
73 | GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL]) | 83 | GNULIB_COSF=0; AC_SUBST([GNULIB_COSF]) |
74 | GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL]) | 84 | GNULIB_COSL=0; AC_SUBST([GNULIB_COSL]) |
75 | GNULIB_LOGB=0; AC_SUBST([GNULIB_LOGB]) | 85 | GNULIB_COSHF=0; AC_SUBST([GNULIB_COSHF]) |
76 | GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL]) | 86 | GNULIB_EXPF=0; AC_SUBST([GNULIB_EXPF]) |
77 | GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND]) | 87 | GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL]) |
78 | GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF]) | 88 | GNULIB_EXP2=0; AC_SUBST([GNULIB_EXP2]) |
79 | GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL]) | 89 | GNULIB_EXP2F=0; AC_SUBST([GNULIB_EXP2F]) |
80 | GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT]) | 90 | GNULIB_EXP2L=0; AC_SUBST([GNULIB_EXP2L]) |
81 | GNULIB_SINL=0; AC_SUBST([GNULIB_SINL]) | 91 | GNULIB_EXPM1=0; AC_SUBST([GNULIB_EXPM1]) |
82 | GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL]) | 92 | GNULIB_EXPM1F=0; AC_SUBST([GNULIB_EXPM1F]) |
83 | GNULIB_TANL=0; AC_SUBST([GNULIB_TANL]) | 93 | GNULIB_EXPM1L=0; AC_SUBST([GNULIB_EXPM1L]) |
84 | GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC]) | 94 | GNULIB_FABSF=0; AC_SUBST([GNULIB_FABSF]) |
85 | GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF]) | 95 | GNULIB_FABSL=0; AC_SUBST([GNULIB_FABSL]) |
86 | GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL]) | 96 | GNULIB_FLOOR=0; AC_SUBST([GNULIB_FLOOR]) |
97 | GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF]) | ||
98 | GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL]) | ||
99 | GNULIB_FMA=0; AC_SUBST([GNULIB_FMA]) | ||
100 | GNULIB_FMAF=0; AC_SUBST([GNULIB_FMAF]) | ||
101 | GNULIB_FMAL=0; AC_SUBST([GNULIB_FMAL]) | ||
102 | GNULIB_FMOD=0; AC_SUBST([GNULIB_FMOD]) | ||
103 | GNULIB_FMODF=0; AC_SUBST([GNULIB_FMODF]) | ||
104 | GNULIB_FMODL=0; AC_SUBST([GNULIB_FMODL]) | ||
105 | GNULIB_FREXPF=0; AC_SUBST([GNULIB_FREXPF]) | ||
106 | GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP]) | ||
107 | GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL]) | ||
108 | GNULIB_HYPOT=0; AC_SUBST([GNULIB_HYPOT]) | ||
109 | GNULIB_HYPOTF=0; AC_SUBST([GNULIB_HYPOTF]) | ||
110 | GNULIB_HYPOTL=0; AC_SUBST([GNULIB_HYPOTL]) | ||
111 | GNULIB_ILOGB=0; AC_SUBST([GNULIB_ILOGB]) | ||
112 | GNULIB_ILOGBF=0; AC_SUBST([GNULIB_ILOGBF]) | ||
113 | GNULIB_ILOGBL=0; AC_SUBST([GNULIB_ILOGBL]) | ||
114 | GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE]) | ||
115 | GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF]) | ||
116 | GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN]) | ||
117 | GNULIB_ISNANF=0; AC_SUBST([GNULIB_ISNANF]) | ||
118 | GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND]) | ||
119 | GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL]) | ||
120 | GNULIB_LDEXPF=0; AC_SUBST([GNULIB_LDEXPF]) | ||
121 | GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL]) | ||
122 | GNULIB_LOG=0; AC_SUBST([GNULIB_LOG]) | ||
123 | GNULIB_LOGF=0; AC_SUBST([GNULIB_LOGF]) | ||
124 | GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL]) | ||
125 | GNULIB_LOG10=0; AC_SUBST([GNULIB_LOG10]) | ||
126 | GNULIB_LOG10F=0; AC_SUBST([GNULIB_LOG10F]) | ||
127 | GNULIB_LOG10L=0; AC_SUBST([GNULIB_LOG10L]) | ||
128 | GNULIB_LOG1P=0; AC_SUBST([GNULIB_LOG1P]) | ||
129 | GNULIB_LOG1PF=0; AC_SUBST([GNULIB_LOG1PF]) | ||
130 | GNULIB_LOG1PL=0; AC_SUBST([GNULIB_LOG1PL]) | ||
131 | GNULIB_LOG2=0; AC_SUBST([GNULIB_LOG2]) | ||
132 | GNULIB_LOG2F=0; AC_SUBST([GNULIB_LOG2F]) | ||
133 | GNULIB_LOG2L=0; AC_SUBST([GNULIB_LOG2L]) | ||
134 | GNULIB_LOGB=0; AC_SUBST([GNULIB_LOGB]) | ||
135 | GNULIB_LOGBF=0; AC_SUBST([GNULIB_LOGBF]) | ||
136 | GNULIB_LOGBL=0; AC_SUBST([GNULIB_LOGBL]) | ||
137 | GNULIB_MODF=0; AC_SUBST([GNULIB_MODF]) | ||
138 | GNULIB_MODFF=0; AC_SUBST([GNULIB_MODFF]) | ||
139 | GNULIB_MODFL=0; AC_SUBST([GNULIB_MODFL]) | ||
140 | GNULIB_POWF=0; AC_SUBST([GNULIB_POWF]) | ||
141 | GNULIB_REMAINDER=0; AC_SUBST([GNULIB_REMAINDER]) | ||
142 | GNULIB_REMAINDERF=0; AC_SUBST([GNULIB_REMAINDERF]) | ||
143 | GNULIB_REMAINDERL=0; AC_SUBST([GNULIB_REMAINDERL]) | ||
144 | GNULIB_RINT=0; AC_SUBST([GNULIB_RINT]) | ||
145 | GNULIB_RINTF=0; AC_SUBST([GNULIB_RINTF]) | ||
146 | GNULIB_RINTL=0; AC_SUBST([GNULIB_RINTL]) | ||
147 | GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND]) | ||
148 | GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF]) | ||
149 | GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL]) | ||
150 | GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT]) | ||
151 | GNULIB_SINF=0; AC_SUBST([GNULIB_SINF]) | ||
152 | GNULIB_SINL=0; AC_SUBST([GNULIB_SINL]) | ||
153 | GNULIB_SINHF=0; AC_SUBST([GNULIB_SINHF]) | ||
154 | GNULIB_SQRTF=0; AC_SUBST([GNULIB_SQRTF]) | ||
155 | GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL]) | ||
156 | GNULIB_TANF=0; AC_SUBST([GNULIB_TANF]) | ||
157 | GNULIB_TANL=0; AC_SUBST([GNULIB_TANL]) | ||
158 | GNULIB_TANHF=0; AC_SUBST([GNULIB_TANHF]) | ||
159 | GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC]) | ||
160 | GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF]) | ||
161 | GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL]) | ||
87 | dnl Assume proper GNU behavior unless another module says otherwise. | 162 | dnl Assume proper GNU behavior unless another module says otherwise. |
163 | HAVE_ACOSF=1; AC_SUBST([HAVE_ACOSF]) | ||
88 | HAVE_ACOSL=1; AC_SUBST([HAVE_ACOSL]) | 164 | HAVE_ACOSL=1; AC_SUBST([HAVE_ACOSL]) |
165 | HAVE_ASINF=1; AC_SUBST([HAVE_ASINF]) | ||
89 | HAVE_ASINL=1; AC_SUBST([HAVE_ASINL]) | 166 | HAVE_ASINL=1; AC_SUBST([HAVE_ASINL]) |
167 | HAVE_ATANF=1; AC_SUBST([HAVE_ATANF]) | ||
90 | HAVE_ATANL=1; AC_SUBST([HAVE_ATANL]) | 168 | HAVE_ATANL=1; AC_SUBST([HAVE_ATANL]) |
169 | HAVE_ATAN2F=1; AC_SUBST([HAVE_ATAN2F]) | ||
170 | HAVE_CBRT=1; AC_SUBST([HAVE_CBRT]) | ||
171 | HAVE_CBRTF=1; AC_SUBST([HAVE_CBRTF]) | ||
172 | HAVE_CBRTL=1; AC_SUBST([HAVE_CBRTL]) | ||
173 | HAVE_COPYSIGN=1; AC_SUBST([HAVE_COPYSIGN]) | ||
174 | HAVE_COPYSIGNL=1; AC_SUBST([HAVE_COPYSIGNL]) | ||
175 | HAVE_COSF=1; AC_SUBST([HAVE_COSF]) | ||
91 | HAVE_COSL=1; AC_SUBST([HAVE_COSL]) | 176 | HAVE_COSL=1; AC_SUBST([HAVE_COSL]) |
177 | HAVE_COSHF=1; AC_SUBST([HAVE_COSHF]) | ||
178 | HAVE_EXPF=1; AC_SUBST([HAVE_EXPF]) | ||
92 | HAVE_EXPL=1; AC_SUBST([HAVE_EXPL]) | 179 | HAVE_EXPL=1; AC_SUBST([HAVE_EXPL]) |
180 | HAVE_EXPM1=1; AC_SUBST([HAVE_EXPM1]) | ||
181 | HAVE_EXPM1F=1; AC_SUBST([HAVE_EXPM1F]) | ||
182 | HAVE_FABSF=1; AC_SUBST([HAVE_FABSF]) | ||
183 | HAVE_FABSL=1; AC_SUBST([HAVE_FABSL]) | ||
184 | HAVE_FMA=1; AC_SUBST([HAVE_FMA]) | ||
185 | HAVE_FMAF=1; AC_SUBST([HAVE_FMAF]) | ||
186 | HAVE_FMAL=1; AC_SUBST([HAVE_FMAL]) | ||
187 | HAVE_FMODF=1; AC_SUBST([HAVE_FMODF]) | ||
188 | HAVE_FMODL=1; AC_SUBST([HAVE_FMODL]) | ||
189 | HAVE_FREXPF=1; AC_SUBST([HAVE_FREXPF]) | ||
190 | HAVE_HYPOTF=1; AC_SUBST([HAVE_HYPOTF]) | ||
191 | HAVE_HYPOTL=1; AC_SUBST([HAVE_HYPOTL]) | ||
192 | HAVE_ILOGB=1; AC_SUBST([HAVE_ILOGB]) | ||
193 | HAVE_ILOGBF=1; AC_SUBST([HAVE_ILOGBF]) | ||
194 | HAVE_ILOGBL=1; AC_SUBST([HAVE_ILOGBL]) | ||
93 | HAVE_ISNANF=1; AC_SUBST([HAVE_ISNANF]) | 195 | HAVE_ISNANF=1; AC_SUBST([HAVE_ISNANF]) |
94 | HAVE_ISNAND=1; AC_SUBST([HAVE_ISNAND]) | 196 | HAVE_ISNAND=1; AC_SUBST([HAVE_ISNAND]) |
95 | HAVE_ISNANL=1; AC_SUBST([HAVE_ISNANL]) | 197 | HAVE_ISNANL=1; AC_SUBST([HAVE_ISNANL]) |
198 | HAVE_LDEXPF=1; AC_SUBST([HAVE_LDEXPF]) | ||
199 | HAVE_LOGF=1; AC_SUBST([HAVE_LOGF]) | ||
96 | HAVE_LOGL=1; AC_SUBST([HAVE_LOGL]) | 200 | HAVE_LOGL=1; AC_SUBST([HAVE_LOGL]) |
201 | HAVE_LOG10F=1; AC_SUBST([HAVE_LOG10F]) | ||
202 | HAVE_LOG10L=1; AC_SUBST([HAVE_LOG10L]) | ||
203 | HAVE_LOG1P=1; AC_SUBST([HAVE_LOG1P]) | ||
204 | HAVE_LOG1PF=1; AC_SUBST([HAVE_LOG1PF]) | ||
205 | HAVE_LOG1PL=1; AC_SUBST([HAVE_LOG1PL]) | ||
206 | HAVE_LOGBF=1; AC_SUBST([HAVE_LOGBF]) | ||
207 | HAVE_LOGBL=1; AC_SUBST([HAVE_LOGBL]) | ||
208 | HAVE_MODFF=1; AC_SUBST([HAVE_MODFF]) | ||
209 | HAVE_MODFL=1; AC_SUBST([HAVE_MODFL]) | ||
210 | HAVE_POWF=1; AC_SUBST([HAVE_POWF]) | ||
211 | HAVE_REMAINDER=1; AC_SUBST([HAVE_REMAINDER]) | ||
212 | HAVE_REMAINDERF=1; AC_SUBST([HAVE_REMAINDERF]) | ||
213 | HAVE_RINT=1; AC_SUBST([HAVE_RINT]) | ||
214 | HAVE_RINTL=1; AC_SUBST([HAVE_RINTL]) | ||
215 | HAVE_SINF=1; AC_SUBST([HAVE_SINF]) | ||
97 | HAVE_SINL=1; AC_SUBST([HAVE_SINL]) | 216 | HAVE_SINL=1; AC_SUBST([HAVE_SINL]) |
217 | HAVE_SINHF=1; AC_SUBST([HAVE_SINHF]) | ||
218 | HAVE_SQRTF=1; AC_SUBST([HAVE_SQRTF]) | ||
98 | HAVE_SQRTL=1; AC_SUBST([HAVE_SQRTL]) | 219 | HAVE_SQRTL=1; AC_SUBST([HAVE_SQRTL]) |
220 | HAVE_TANF=1; AC_SUBST([HAVE_TANF]) | ||
99 | HAVE_TANL=1; AC_SUBST([HAVE_TANL]) | 221 | HAVE_TANL=1; AC_SUBST([HAVE_TANL]) |
222 | HAVE_TANHF=1; AC_SUBST([HAVE_TANHF]) | ||
100 | HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL]) | 223 | HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL]) |
101 | HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL]) | 224 | HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL]) |
102 | HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL]) | 225 | HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL]) |
226 | HAVE_DECL_CBRTF=1; AC_SUBST([HAVE_DECL_CBRTF]) | ||
227 | HAVE_DECL_CBRTL=1; AC_SUBST([HAVE_DECL_CBRTL]) | ||
103 | HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF]) | 228 | HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF]) |
104 | HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL]) | 229 | HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL]) |
230 | HAVE_DECL_COPYSIGNF=1; AC_SUBST([HAVE_DECL_COPYSIGNF]) | ||
105 | HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL]) | 231 | HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL]) |
106 | HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL]) | 232 | HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL]) |
233 | HAVE_DECL_EXP2=1; AC_SUBST([HAVE_DECL_EXP2]) | ||
234 | HAVE_DECL_EXP2F=1; AC_SUBST([HAVE_DECL_EXP2F]) | ||
235 | HAVE_DECL_EXP2L=1; AC_SUBST([HAVE_DECL_EXP2L]) | ||
236 | HAVE_DECL_EXPM1L=1; AC_SUBST([HAVE_DECL_EXPM1L]) | ||
107 | HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF]) | 237 | HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF]) |
108 | HAVE_DECL_FLOORL=1; AC_SUBST([HAVE_DECL_FLOORL]) | 238 | HAVE_DECL_FLOORL=1; AC_SUBST([HAVE_DECL_FLOORL]) |
109 | HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL]) | 239 | HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL]) |
110 | HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL]) | 240 | HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL]) |
111 | HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB]) | ||
112 | HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL]) | 241 | HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL]) |
242 | HAVE_DECL_LOG10L=1; AC_SUBST([HAVE_DECL_LOG10L]) | ||
243 | HAVE_DECL_LOG2=1; AC_SUBST([HAVE_DECL_LOG2]) | ||
244 | HAVE_DECL_LOG2F=1; AC_SUBST([HAVE_DECL_LOG2F]) | ||
245 | HAVE_DECL_LOG2L=1; AC_SUBST([HAVE_DECL_LOG2L]) | ||
246 | HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB]) | ||
247 | HAVE_DECL_REMAINDER=1; AC_SUBST([HAVE_DECL_REMAINDER]) | ||
248 | HAVE_DECL_REMAINDERL=1; AC_SUBST([HAVE_DECL_REMAINDERL]) | ||
249 | HAVE_DECL_RINTF=1; AC_SUBST([HAVE_DECL_RINTF]) | ||
113 | HAVE_DECL_ROUND=1; AC_SUBST([HAVE_DECL_ROUND]) | 250 | HAVE_DECL_ROUND=1; AC_SUBST([HAVE_DECL_ROUND]) |
114 | HAVE_DECL_ROUNDF=1; AC_SUBST([HAVE_DECL_ROUNDF]) | 251 | HAVE_DECL_ROUNDF=1; AC_SUBST([HAVE_DECL_ROUNDF]) |
115 | HAVE_DECL_ROUNDL=1; AC_SUBST([HAVE_DECL_ROUNDL]) | 252 | HAVE_DECL_ROUNDL=1; AC_SUBST([HAVE_DECL_ROUNDL]) |
@@ -119,22 +256,98 @@ AC_DEFUN([gl_MATH_H_DEFAULTS], | |||
119 | HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC]) | 256 | HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC]) |
120 | HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF]) | 257 | HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF]) |
121 | HAVE_DECL_TRUNCL=1; AC_SUBST([HAVE_DECL_TRUNCL]) | 258 | HAVE_DECL_TRUNCL=1; AC_SUBST([HAVE_DECL_TRUNCL]) |
259 | REPLACE_CBRTF=0; AC_SUBST([REPLACE_CBRTF]) | ||
260 | REPLACE_CBRTL=0; AC_SUBST([REPLACE_CBRTL]) | ||
261 | REPLACE_CEIL=0; AC_SUBST([REPLACE_CEIL]) | ||
122 | REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF]) | 262 | REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF]) |
123 | REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL]) | 263 | REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL]) |
264 | REPLACE_EXPM1=0; AC_SUBST([REPLACE_EXPM1]) | ||
265 | REPLACE_EXPM1F=0; AC_SUBST([REPLACE_EXPM1F]) | ||
266 | REPLACE_EXP2=0; AC_SUBST([REPLACE_EXP2]) | ||
267 | REPLACE_EXP2L=0; AC_SUBST([REPLACE_EXP2L]) | ||
268 | REPLACE_FABSL=0; AC_SUBST([REPLACE_FABSL]) | ||
269 | REPLACE_FLOOR=0; AC_SUBST([REPLACE_FLOOR]) | ||
124 | REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF]) | 270 | REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF]) |
125 | REPLACE_FLOORL=0; AC_SUBST([REPLACE_FLOORL]) | 271 | REPLACE_FLOORL=0; AC_SUBST([REPLACE_FLOORL]) |
272 | REPLACE_FMA=0; AC_SUBST([REPLACE_FMA]) | ||
273 | REPLACE_FMAF=0; AC_SUBST([REPLACE_FMAF]) | ||
274 | REPLACE_FMAL=0; AC_SUBST([REPLACE_FMAL]) | ||
275 | REPLACE_FMOD=0; AC_SUBST([REPLACE_FMOD]) | ||
276 | REPLACE_FMODF=0; AC_SUBST([REPLACE_FMODF]) | ||
277 | REPLACE_FMODL=0; AC_SUBST([REPLACE_FMODL]) | ||
278 | REPLACE_FREXPF=0; AC_SUBST([REPLACE_FREXPF]) | ||
126 | REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP]) | 279 | REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP]) |
127 | REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL]) | 280 | REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL]) |
128 | REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL]) | 281 | REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL]) |
282 | REPLACE_HYPOT=0; AC_SUBST([REPLACE_HYPOT]) | ||
283 | REPLACE_HYPOTF=0; AC_SUBST([REPLACE_HYPOTF]) | ||
284 | REPLACE_HYPOTL=0; AC_SUBST([REPLACE_HYPOTL]) | ||
285 | REPLACE_ILOGB=0; AC_SUBST([REPLACE_ILOGB]) | ||
286 | REPLACE_ILOGBF=0; AC_SUBST([REPLACE_ILOGBF]) | ||
129 | REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE]) | 287 | REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE]) |
130 | REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF]) | 288 | REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF]) |
131 | REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN]) | 289 | REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN]) |
132 | REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL]) | 290 | REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL]) |
291 | REPLACE_LOG=0; AC_SUBST([REPLACE_LOG]) | ||
292 | REPLACE_LOGF=0; AC_SUBST([REPLACE_LOGF]) | ||
293 | REPLACE_LOGL=0; AC_SUBST([REPLACE_LOGL]) | ||
294 | REPLACE_LOG10=0; AC_SUBST([REPLACE_LOG10]) | ||
295 | REPLACE_LOG10F=0; AC_SUBST([REPLACE_LOG10F]) | ||
296 | REPLACE_LOG10L=0; AC_SUBST([REPLACE_LOG10L]) | ||
297 | REPLACE_LOG1P=0; AC_SUBST([REPLACE_LOG1P]) | ||
298 | REPLACE_LOG1PF=0; AC_SUBST([REPLACE_LOG1PF]) | ||
299 | REPLACE_LOG1PL=0; AC_SUBST([REPLACE_LOG1PL]) | ||
300 | REPLACE_LOG2=0; AC_SUBST([REPLACE_LOG2]) | ||
301 | REPLACE_LOG2F=0; AC_SUBST([REPLACE_LOG2F]) | ||
302 | REPLACE_LOG2L=0; AC_SUBST([REPLACE_LOG2L]) | ||
303 | REPLACE_LOGB=0; AC_SUBST([REPLACE_LOGB]) | ||
304 | REPLACE_LOGBF=0; AC_SUBST([REPLACE_LOGBF]) | ||
305 | REPLACE_LOGBL=0; AC_SUBST([REPLACE_LOGBL]) | ||
306 | REPLACE_MODF=0; AC_SUBST([REPLACE_MODF]) | ||
307 | REPLACE_MODFF=0; AC_SUBST([REPLACE_MODFF]) | ||
308 | REPLACE_MODFL=0; AC_SUBST([REPLACE_MODFL]) | ||
133 | REPLACE_NAN=0; AC_SUBST([REPLACE_NAN]) | 309 | REPLACE_NAN=0; AC_SUBST([REPLACE_NAN]) |
310 | REPLACE_REMAINDER=0; AC_SUBST([REPLACE_REMAINDER]) | ||
311 | REPLACE_REMAINDERF=0; AC_SUBST([REPLACE_REMAINDERF]) | ||
312 | REPLACE_REMAINDERL=0; AC_SUBST([REPLACE_REMAINDERL]) | ||
134 | REPLACE_ROUND=0; AC_SUBST([REPLACE_ROUND]) | 313 | REPLACE_ROUND=0; AC_SUBST([REPLACE_ROUND]) |
135 | REPLACE_ROUNDF=0; AC_SUBST([REPLACE_ROUNDF]) | 314 | REPLACE_ROUNDF=0; AC_SUBST([REPLACE_ROUNDF]) |
136 | REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL]) | 315 | REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL]) |
137 | REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT]) | 316 | REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT]) |
138 | REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC]) | 317 | REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC]) |
318 | REPLACE_SQRTL=0; AC_SUBST([REPLACE_SQRTL]) | ||
319 | REPLACE_TRUNC=0; AC_SUBST([REPLACE_TRUNC]) | ||
320 | REPLACE_TRUNCF=0; AC_SUBST([REPLACE_TRUNCF]) | ||
139 | REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL]) | 321 | REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL]) |
140 | ]) | 322 | ]) |
323 | |||
324 | # gl_LONG_DOUBLE_VS_DOUBLE | ||
325 | # determines whether 'long double' and 'double' have the same representation. | ||
326 | # Sets variable HAVE_SAME_LONG_DOUBLE_AS_DOUBLE to 0 or 1, and defines | ||
327 | # HAVE_SAME_LONG_DOUBLE_AS_DOUBLE accordingly. | ||
328 | # The currently known platforms where this is the case are: | ||
329 | # Linux/HPPA, Minix 3.1.8, AIX 5, AIX 6 and 7 with xlc, MSVC 9. | ||
330 | AC_DEFUN([gl_LONG_DOUBLE_VS_DOUBLE], | ||
331 | [ | ||
332 | AC_CACHE_CHECK([whether long double and double are the same], | ||
333 | [gl_cv_long_double_equals_double], | ||
334 | [AC_COMPILE_IFELSE( | ||
335 | [AC_LANG_PROGRAM([[#include <float.h>]], | ||
336 | [[typedef int check[sizeof (long double) == sizeof (double) | ||
337 | && LDBL_MANT_DIG == DBL_MANT_DIG | ||
338 | && LDBL_MAX_EXP == DBL_MAX_EXP | ||
339 | && LDBL_MIN_EXP == DBL_MIN_EXP | ||
340 | ? 1 : -1]; | ||
341 | ]])], | ||
342 | [gl_cv_long_double_equals_double=yes], | ||
343 | [gl_cv_long_double_equals_double=no]) | ||
344 | ]) | ||
345 | if test $gl_cv_long_double_equals_double = yes; then | ||
346 | AC_DEFINE([HAVE_SAME_LONG_DOUBLE_AS_DOUBLE], [1], | ||
347 | [Define to 1 if 'long double' and 'double' have the same representation.]) | ||
348 | HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1 | ||
349 | else | ||
350 | HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0 | ||
351 | fi | ||
352 | AC_SUBST([HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]) | ||
353 | ]) | ||