Mercurial > hg > octave-jordi > gnulib-hg
annotate m4/math_h.m4 @ 16201:8250f2777afc
maint: update all copyright year number ranges
Run "make update-copyright".
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Sun, 01 Jan 2012 10:04:58 +0100 |
parents | 40ce19578aff |
children | e393287b3d95 |
rev | line source |
---|---|
16042 | 1 # math_h.m4 serial 56 |
16201
8250f2777afc
maint: update all copyright year number ranges
Jim Meyering <meyering@redhat.com>
parents:
16042
diff
changeset
|
2 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. |
8186
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
3 dnl This file is free software; the Free Software Foundation |
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
4 dnl gives unlimited permission to copy and/or distribute it, |
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
5 dnl with or without modifications, as long as this notice is preserved. |
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 |
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 AC_DEFUN([gl_MATH_H], |
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 [ |
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
9 AC_REQUIRE([gl_MATH_H_DEFAULTS]) |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
8652
diff
changeset
|
10 gl_CHECK_NEXT_HEADERS([math.h]) |
12726
d6da6e5f2f62
math: add portability warnings for classification macros
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
11 AC_REQUIRE([AC_C_INLINE]) |
d6da6e5f2f62
math: add portability warnings for classification macros
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
12 |
9898
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
13 AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works], |
9921
01cfd65cc7e0
Fix underquoting of AC_LANG_PROGRAM arguments.
Bruno Haible <bruno@clisp.org>
parents:
9913
diff
changeset
|
14 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]], |
9898
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
15 [[/* Solaris 10 has a broken definition of NAN. Other platforms |
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
16 fail to provide NAN, or provide it only in C99 mode; this |
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
17 test only needs to fail when NAN is provided but wrong. */ |
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
18 float f = 1.0f; |
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
19 #ifdef NAN |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10667
diff
changeset
|
20 f = NAN; |
9898
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
21 #endif |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10667
diff
changeset
|
22 return f == 0;]])], |
9898
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
23 [gl_cv_header_math_nan_works=yes], |
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
24 [gl_cv_header_math_nan_works=no])]) |
9900
5f47b9c9cc45
* m4/math_h.m4 (gl_MATH_H): Fix typos.
Jim Meyering <meyering@redhat.com>
parents:
9898
diff
changeset
|
25 if test $gl_cv_header_math_nan_works = no; then |
9898
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
26 REPLACE_NAN=1 |
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
27 fi |
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
28 AC_CACHE_CHECK([whether HUGE_VAL works], [gl_cv_header_math_huge_val_works], |
9921
01cfd65cc7e0
Fix underquoting of AC_LANG_PROGRAM arguments.
Bruno Haible <bruno@clisp.org>
parents:
9913
diff
changeset
|
29 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]], |
9898
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
30 [[/* Solaris 10 has a broken definition of HUGE_VAL. */ |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10667
diff
changeset
|
31 double d = HUGE_VAL; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10667
diff
changeset
|
32 return d == 0;]])], |
9898
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
33 [gl_cv_header_math_huge_val_works=yes], |
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
34 [gl_cv_header_math_huge_val_works=no])]) |
9900
5f47b9c9cc45
* m4/math_h.m4 (gl_MATH_H): Fix typos.
Jim Meyering <meyering@redhat.com>
parents:
9898
diff
changeset
|
35 if test $gl_cv_header_math_huge_val_works = no; then |
9898
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
36 REPLACE_HUGE_VAL=1 |
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
37 fi |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12752
diff
changeset
|
38 |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12752
diff
changeset
|
39 dnl Check for declarations of anything we want to poison if the |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12752
diff
changeset
|
40 dnl corresponding gnulib module is not in use. |
15830 | 41 gl_WARN_ON_USE_PREPARE([[#include <math.h>]], |
15911 | 42 [acosf acosl asinf asinl atanf atanl |
15913 | 43 ceilf ceill copysign copysignf copysignl cosf cosl coshf |
16042 | 44 expf expl fabsf floorf floorl fma fmaf fmal fmodf frexpf frexpl |
15869 | 45 ldexpf ldexpl logb logf logl log10f modff powf |
15920 | 46 rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl |
15899 | 47 tanf tanl tanhf trunc truncf truncl]) |
8186
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
48 ]) |
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
49 |
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
50 AC_DEFUN([gl_MATH_MODULE_INDICATOR], |
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
51 [ |
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
52 dnl Use AC_REQUIRE here, so that the default settings are expanded once only. |
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
53 AC_REQUIRE([gl_MATH_H_DEFAULTS]) |
13066
fc8c984b0733
Factorize common .m4 code.
Bruno Haible <bruno@clisp.org>
parents:
12960
diff
changeset
|
54 gl_MODULE_INDICATOR_SET_VARIABLE([$1]) |
12960
1583e59dfb92
Tests of module 'math' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12927
diff
changeset
|
55 dnl Define it also as a C macro, for the benefit of the unit tests. |
13071
b2385e7b332e
Distinguish two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents:
13066
diff
changeset
|
56 gl_MODULE_INDICATOR_FOR_TESTS([$1]) |
8186
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
57 ]) |
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
58 |
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
59 AC_DEFUN([gl_MATH_H_DEFAULTS], |
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
60 [ |
15911 | 61 GNULIB_ACOSF=0; AC_SUBST([GNULIB_ACOSF]) |
62 GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL]) | |
63 GNULIB_ASINF=0; AC_SUBST([GNULIB_ASINF]) | |
64 GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL]) | |
65 GNULIB_ATANF=0; AC_SUBST([GNULIB_ATANF]) | |
66 GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL]) | |
67 GNULIB_ATAN2F=0; AC_SUBST([GNULIB_ATAN2F]) | |
68 GNULIB_CEIL=0; AC_SUBST([GNULIB_CEIL]) | |
69 GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF]) | |
70 GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL]) | |
71 GNULIB_COPYSIGN=0; AC_SUBST([GNULIB_COPYSIGN]) | |
72 GNULIB_COPYSIGNF=0; AC_SUBST([GNULIB_COPYSIGNF]) | |
15913 | 73 GNULIB_COPYSIGNL=0; AC_SUBST([GNULIB_COPYSIGNL]) |
15911 | 74 GNULIB_COSF=0; AC_SUBST([GNULIB_COSF]) |
75 GNULIB_COSL=0; AC_SUBST([GNULIB_COSL]) | |
76 GNULIB_COSHF=0; AC_SUBST([GNULIB_COSHF]) | |
77 GNULIB_EXPF=0; AC_SUBST([GNULIB_EXPF]) | |
78 GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL]) | |
79 GNULIB_FABSF=0; AC_SUBST([GNULIB_FABSF]) | |
80 GNULIB_FLOOR=0; AC_SUBST([GNULIB_FLOOR]) | |
81 GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF]) | |
82 GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL]) | |
16038 | 83 GNULIB_FMA=0; AC_SUBST([GNULIB_FMA]) |
16040 | 84 GNULIB_FMAF=0; AC_SUBST([GNULIB_FMAF]) |
16042 | 85 GNULIB_FMAL=0; AC_SUBST([GNULIB_FMAL]) |
15911 | 86 GNULIB_FMODF=0; AC_SUBST([GNULIB_FMODF]) |
87 GNULIB_FREXPF=0; AC_SUBST([GNULIB_FREXPF]) | |
88 GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP]) | |
89 GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL]) | |
90 GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE]) | |
91 GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF]) | |
92 GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN]) | |
93 GNULIB_ISNANF=0; AC_SUBST([GNULIB_ISNANF]) | |
94 GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND]) | |
95 GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL]) | |
96 GNULIB_LDEXPF=0; AC_SUBST([GNULIB_LDEXPF]) | |
97 GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL]) | |
98 GNULIB_LOGB=0; AC_SUBST([GNULIB_LOGB]) | |
99 GNULIB_LOGF=0; AC_SUBST([GNULIB_LOGF]) | |
100 GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL]) | |
101 GNULIB_LOG10F=0; AC_SUBST([GNULIB_LOG10F]) | |
102 GNULIB_MODFF=0; AC_SUBST([GNULIB_MODFF]) | |
103 GNULIB_POWF=0; AC_SUBST([GNULIB_POWF]) | |
15917 | 104 GNULIB_RINT=0; AC_SUBST([GNULIB_RINT]) |
15918 | 105 GNULIB_RINTF=0; AC_SUBST([GNULIB_RINTF]) |
15920 | 106 GNULIB_RINTL=0; AC_SUBST([GNULIB_RINTL]) |
15911 | 107 GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND]) |
108 GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF]) | |
109 GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL]) | |
110 GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT]) | |
111 GNULIB_SINF=0; AC_SUBST([GNULIB_SINF]) | |
112 GNULIB_SINL=0; AC_SUBST([GNULIB_SINL]) | |
113 GNULIB_SINHF=0; AC_SUBST([GNULIB_SINHF]) | |
114 GNULIB_SQRTF=0; AC_SUBST([GNULIB_SQRTF]) | |
115 GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL]) | |
116 GNULIB_TANF=0; AC_SUBST([GNULIB_TANF]) | |
117 GNULIB_TANL=0; AC_SUBST([GNULIB_TANL]) | |
118 GNULIB_TANHF=0; AC_SUBST([GNULIB_TANHF]) | |
119 GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC]) | |
120 GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF]) | |
121 GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL]) | |
8359
d8d194025f40
Provide the option to declare the mathl functions also when the 'mathl'
Bruno Haible <bruno@clisp.org>
parents:
8186
diff
changeset
|
122 dnl Assume proper GNU behavior unless another module says otherwise. |
15884 | 123 HAVE_ACOSF=1; AC_SUBST([HAVE_ACOSF]) |
12752
73d9dd27dc41
New modules acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
Bruno Haible <bruno@clisp.org>
parents:
12726
diff
changeset
|
124 HAVE_ACOSL=1; AC_SUBST([HAVE_ACOSL]) |
15881 | 125 HAVE_ASINF=1; AC_SUBST([HAVE_ASINF]) |
12752
73d9dd27dc41
New modules acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
Bruno Haible <bruno@clisp.org>
parents:
12726
diff
changeset
|
126 HAVE_ASINL=1; AC_SUBST([HAVE_ASINL]) |
15887 | 127 HAVE_ATANF=1; AC_SUBST([HAVE_ATANF]) |
12752
73d9dd27dc41
New modules acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
Bruno Haible <bruno@clisp.org>
parents:
12726
diff
changeset
|
128 HAVE_ATANL=1; AC_SUBST([HAVE_ATANL]) |
15890 | 129 HAVE_ATAN2F=1; AC_SUBST([HAVE_ATAN2F]) |
15908
2f40da163bc2
copysign: Provide replacement.
Bruno Haible <bruno@clisp.org>
parents:
15901
diff
changeset
|
130 HAVE_COPYSIGN=1; AC_SUBST([HAVE_COPYSIGN]) |
15911 | 131 HAVE_COPYSIGNF=1; AC_SUBST([HAVE_COPYSIGNF]) |
15913 | 132 HAVE_COPYSIGNL=1; AC_SUBST([HAVE_COPYSIGNL]) |
15875 | 133 HAVE_COSF=1; AC_SUBST([HAVE_COSF]) |
12752
73d9dd27dc41
New modules acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
Bruno Haible <bruno@clisp.org>
parents:
12726
diff
changeset
|
134 HAVE_COSL=1; AC_SUBST([HAVE_COSL]) |
15896 | 135 HAVE_COSHF=1; AC_SUBST([HAVE_COSHF]) |
15860 | 136 HAVE_EXPF=1; AC_SUBST([HAVE_EXPF]) |
12752
73d9dd27dc41
New modules acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
Bruno Haible <bruno@clisp.org>
parents:
12726
diff
changeset
|
137 HAVE_EXPL=1; AC_SUBST([HAVE_EXPL]) |
15828 | 138 HAVE_FABSF=1; AC_SUBST([HAVE_FABSF]) |
16038 | 139 HAVE_FMA=1; AC_SUBST([HAVE_FMA]) |
16040 | 140 HAVE_FMAF=1; AC_SUBST([HAVE_FMAF]) |
16042 | 141 HAVE_FMAL=1; AC_SUBST([HAVE_FMAL]) |
15832 | 142 HAVE_FMODF=1; AC_SUBST([HAVE_FMODF]) |
15841 | 143 HAVE_FREXPF=1; AC_SUBST([HAVE_FREXPF]) |
10667
678640901735
Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents:
10287
diff
changeset
|
144 HAVE_ISNANF=1; AC_SUBST([HAVE_ISNANF]) |
678640901735
Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents:
10287
diff
changeset
|
145 HAVE_ISNAND=1; AC_SUBST([HAVE_ISNAND]) |
678640901735
Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents:
10287
diff
changeset
|
146 HAVE_ISNANL=1; AC_SUBST([HAVE_ISNANL]) |
15847 | 147 HAVE_LDEXPF=1; AC_SUBST([HAVE_LDEXPF]) |
15863 | 148 HAVE_LOGF=1; AC_SUBST([HAVE_LOGF]) |
12752
73d9dd27dc41
New modules acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
Bruno Haible <bruno@clisp.org>
parents:
12726
diff
changeset
|
149 HAVE_LOGL=1; AC_SUBST([HAVE_LOGL]) |
15866 | 150 HAVE_LOG10F=1; AC_SUBST([HAVE_LOG10F]) |
15838 | 151 HAVE_MODFF=1; AC_SUBST([HAVE_MODFF]) |
15869 | 152 HAVE_POWF=1; AC_SUBST([HAVE_POWF]) |
15917 | 153 HAVE_RINT=1; AC_SUBST([HAVE_RINT]) |
15918 | 154 HAVE_RINTF=1; AC_SUBST([HAVE_RINTF]) |
15920 | 155 HAVE_RINTL=1; AC_SUBST([HAVE_RINTL]) |
15872 | 156 HAVE_SINF=1; AC_SUBST([HAVE_SINF]) |
12752
73d9dd27dc41
New modules acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
Bruno Haible <bruno@clisp.org>
parents:
12726
diff
changeset
|
157 HAVE_SINL=1; AC_SUBST([HAVE_SINL]) |
15893 | 158 HAVE_SINHF=1; AC_SUBST([HAVE_SINHF]) |
15857 | 159 HAVE_SQRTF=1; AC_SUBST([HAVE_SQRTF]) |
12752
73d9dd27dc41
New modules acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
Bruno Haible <bruno@clisp.org>
parents:
12726
diff
changeset
|
160 HAVE_SQRTL=1; AC_SUBST([HAVE_SQRTL]) |
15878 | 161 HAVE_TANF=1; AC_SUBST([HAVE_TANF]) |
12752
73d9dd27dc41
New modules acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
Bruno Haible <bruno@clisp.org>
parents:
12726
diff
changeset
|
162 HAVE_TANL=1; AC_SUBST([HAVE_TANL]) |
15899 | 163 HAVE_TANHF=1; AC_SUBST([HAVE_TANHF]) |
9645
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
164 HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL]) |
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
165 HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL]) |
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
166 HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL]) |
13142
6b79b839590c
math: Fix some C++ test errors on Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
13071
diff
changeset
|
167 HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF]) |
6b79b839590c
math: Fix some C++ test errors on Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
13071
diff
changeset
|
168 HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL]) |
9645
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
169 HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL]) |
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
170 HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL]) |
13142
6b79b839590c
math: Fix some C++ test errors on Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
13071
diff
changeset
|
171 HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF]) |
6b79b839590c
math: Fix some C++ test errors on Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
13071
diff
changeset
|
172 HAVE_DECL_FLOORL=1; AC_SUBST([HAVE_DECL_FLOORL]) |
9645
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
173 HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL]) |
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
174 HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL]) |
12927
d3ea0f2aacfc
logb: Provide missing declaration for Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
175 HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB]) |
9645
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
176 HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL]) |
13142
6b79b839590c
math: Fix some C++ test errors on Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
13071
diff
changeset
|
177 HAVE_DECL_ROUND=1; AC_SUBST([HAVE_DECL_ROUND]) |
6b79b839590c
math: Fix some C++ test errors on Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
13071
diff
changeset
|
178 HAVE_DECL_ROUNDF=1; AC_SUBST([HAVE_DECL_ROUNDF]) |
6b79b839590c
math: Fix some C++ test errors on Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
13071
diff
changeset
|
179 HAVE_DECL_ROUNDL=1; AC_SUBST([HAVE_DECL_ROUNDL]) |
9645
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
180 HAVE_DECL_SINL=1; AC_SUBST([HAVE_DECL_SINL]) |
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
181 HAVE_DECL_SQRTL=1; AC_SUBST([HAVE_DECL_SQRTL]) |
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
182 HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL]) |
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
183 HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC]) |
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
184 HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF]) |
13142
6b79b839590c
math: Fix some C++ test errors on Cygwin.
Bruno Haible <bruno@clisp.org>
parents:
13071
diff
changeset
|
185 HAVE_DECL_TRUNCL=1; AC_SUBST([HAVE_DECL_TRUNCL]) |
13982 | 186 REPLACE_CEIL=0; AC_SUBST([REPLACE_CEIL]) |
9645
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
187 REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF]) |
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
188 REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL]) |
13981 | 189 REPLACE_FLOOR=0; AC_SUBST([REPLACE_FLOOR]) |
9645
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
190 REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF]) |
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
191 REPLACE_FLOORL=0; AC_SUBST([REPLACE_FLOORL]) |
16038 | 192 REPLACE_FMA=0; AC_SUBST([REPLACE_FMA]) |
16040 | 193 REPLACE_FMAF=0; AC_SUBST([REPLACE_FMAF]) |
16042 | 194 REPLACE_FMAL=0; AC_SUBST([REPLACE_FMAL]) |
15845
622d3734ca5a
frexpf: Work around problems on IRIX and mingw.
Bruno Haible <bruno@clisp.org>
parents:
15841
diff
changeset
|
195 REPLACE_FREXPF=0; AC_SUBST([REPLACE_FREXPF]) |
9645
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
196 REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP]) |
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
197 REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL]) |
9898
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
198 REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL]) |
9645
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
199 REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE]) |
10287 | 200 REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF]) |
10267 | 201 REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN]) |
9645
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
202 REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL]) |
9898
02bfc9acab82
Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents:
9645
diff
changeset
|
203 REPLACE_NAN=0; AC_SUBST([REPLACE_NAN]) |
9645
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
204 REPLACE_ROUND=0; AC_SUBST([REPLACE_ROUND]) |
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
205 REPLACE_ROUNDF=0; AC_SUBST([REPLACE_ROUNDF]) |
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
206 REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL]) |
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
207 REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT]) |
c8174371956e
Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents:
9465
diff
changeset
|
208 REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC]) |
13983 | 209 REPLACE_TRUNC=0; AC_SUBST([REPLACE_TRUNC]) |
13979 | 210 REPLACE_TRUNCF=0; AC_SUBST([REPLACE_TRUNCF]) |
9913
d3f5a70dc1ba
Make truncl work on OSF/1 4.0.
Bruno Haible <bruno@clisp.org>
parents:
9900
diff
changeset
|
211 REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL]) |
8186
c115624bf99a
New module 'math'. <math.h> replaces mathl.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
212 ]) |
15901
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
213 |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
214 # gl_LONG_DOUBLE_VS_DOUBLE |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
215 # determines whether 'long double' and 'double' have the same representation. |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
216 # Sets variable HAVE_SAME_LONG_DOUBLE_AS_DOUBLE to 0 or 1, and defines |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
217 # HAVE_SAME_LONG_DOUBLE_AS_DOUBLE accordingly. |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
218 # The currently known platforms where this is the case are: |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
219 # Linux/HPPA, Minix 3.1.8, AIX 5, AIX 6 and 7 with xlc, MSVC 9. |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
220 AC_DEFUN([gl_LONG_DOUBLE_VS_DOUBLE], |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
221 [ |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
222 AC_CACHE_CHECK([whether long double and double are the same], |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
223 [gl_cv_long_double_equals_double], |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
224 [AC_COMPILE_IFELSE( |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
225 [AC_LANG_PROGRAM([[#include <float.h>]], |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
226 [[typedef int check[sizeof (long double) == sizeof (double) |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
227 && LDBL_MANT_DIG == DBL_MANT_DIG |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
228 && LDBL_MAX_EXP == DBL_MAX_EXP |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
229 && LDBL_MIN_EXP == DBL_MIN_EXP |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
230 ? 1 : -1]; |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
231 ]])], |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
232 [gl_cv_long_double_equals_double=yes], |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
233 [gl_cv_long_double_equals_double=no]) |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
234 ]) |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
235 if test $gl_cv_long_double_equals_double = yes; then |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
236 AC_DEFINE([HAVE_SAME_LONG_DOUBLE_AS_DOUBLE], [1], |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
237 [Define to 1 if 'long double' and 'double' have the same representation.]) |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
238 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1 |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
239 else |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
240 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0 |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
241 fi |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
242 AC_SUBST([HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]) |
5711969eba55
isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents:
15899
diff
changeset
|
243 ]) |