diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-01-15 09:22:57 (GMT) |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-01-15 10:19:08 (GMT) |
commit | 71cdb52799220f8d9052643baf1d3e9836a9c755 (patch) | |
tree | 27aee97a35d9ab51f0d8f64a46690bd41a5f8c1b /gl/m4/math_h.m4 | |
parent | f7afa46586645e50498d8b2d0c67884f014dc3a4 (diff) | |
download | monitoring-plugins-71cdb52799220f8d9052643baf1d3e9836a9c755.tar.gz |
Sync with gnulib
Diffstat (limited to 'gl/m4/math_h.m4')
-rw-r--r-- | gl/m4/math_h.m4 | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/gl/m4/math_h.m4 b/gl/m4/math_h.m4 index dd99e7f..d941bc3 100644 --- a/gl/m4/math_h.m4 +++ b/gl/m4/math_h.m4 | |||
@@ -1,4 +1,4 @@ | |||
1 | # math_h.m4 serial 9 | 1 | # math_h.m4 serial 14 |
2 | dnl Copyright (C) 2007-2008 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2007-2008 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, |
@@ -8,6 +8,31 @@ 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_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works], | ||
12 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]], | ||
13 | [[/* Solaris 10 has a broken definition of NAN. Other platforms | ||
14 | fail to provide NAN, or provide it only in C99 mode; this | ||
15 | test only needs to fail when NAN is provided but wrong. */ | ||
16 | float f = 1.0f; | ||
17 | #ifdef NAN | ||
18 | f = NAN; | ||
19 | #endif | ||
20 | return f == 0;]])], | ||
21 | [gl_cv_header_math_nan_works=yes], | ||
22 | [gl_cv_header_math_nan_works=no])]) | ||
23 | if test $gl_cv_header_math_nan_works = no; then | ||
24 | REPLACE_NAN=1 | ||
25 | fi | ||
26 | AC_CACHE_CHECK([whether HUGE_VAL works], [gl_cv_header_math_huge_val_works], | ||
27 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]], | ||
28 | [[/* Solaris 10 has a broken definition of HUGE_VAL. */ | ||
29 | double d = HUGE_VAL; | ||
30 | return d == 0;]])], | ||
31 | [gl_cv_header_math_huge_val_works=yes], | ||
32 | [gl_cv_header_math_huge_val_works=no])]) | ||
33 | if test $gl_cv_header_math_huge_val_works = no; then | ||
34 | REPLACE_HUGE_VAL=1 | ||
35 | fi | ||
11 | ]) | 36 | ]) |
12 | 37 | ||
13 | AC_DEFUN([gl_MATH_MODULE_INDICATOR], | 38 | AC_DEFUN([gl_MATH_MODULE_INDICATOR], |
@@ -26,6 +51,11 @@ AC_DEFUN([gl_MATH_H_DEFAULTS], | |||
26 | GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP]) | 51 | GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP]) |
27 | GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL]) | 52 | GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL]) |
28 | GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE]) | 53 | GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE]) |
54 | GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF]) | ||
55 | GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN]) | ||
56 | GNULIB_ISNANF=0; AC_SUBST([GNULIB_ISNANF]) | ||
57 | GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND]) | ||
58 | GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL]) | ||
29 | GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL]) | 59 | GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL]) |
30 | GNULIB_MATHL=0; AC_SUBST([GNULIB_MATHL]) | 60 | GNULIB_MATHL=0; AC_SUBST([GNULIB_MATHL]) |
31 | GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND]) | 61 | GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND]) |
@@ -36,6 +66,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS], | |||
36 | GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF]) | 66 | GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF]) |
37 | GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL]) | 67 | GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL]) |
38 | dnl Assume proper GNU behavior unless another module says otherwise. | 68 | dnl Assume proper GNU behavior unless another module says otherwise. |
69 | HAVE_ISNANF=1; AC_SUBST([HAVE_ISNANF]) | ||
70 | HAVE_ISNAND=1; AC_SUBST([HAVE_ISNAND]) | ||
71 | HAVE_ISNANL=1; AC_SUBST([HAVE_ISNANL]) | ||
39 | HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL]) | 72 | HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL]) |
40 | HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL]) | 73 | HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL]) |
41 | HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL]) | 74 | HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL]) |
@@ -49,18 +82,22 @@ AC_DEFUN([gl_MATH_H_DEFAULTS], | |||
49 | HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL]) | 82 | HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL]) |
50 | HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC]) | 83 | HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC]) |
51 | HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF]) | 84 | HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF]) |
52 | HAVE_DECL_TRUNCL=1; AC_SUBST([HAVE_DECL_TRUNCL]) | ||
53 | REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF]) | 85 | REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF]) |
54 | REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL]) | 86 | REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL]) |
55 | REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF]) | 87 | REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF]) |
56 | REPLACE_FLOORL=0; AC_SUBST([REPLACE_FLOORL]) | 88 | REPLACE_FLOORL=0; AC_SUBST([REPLACE_FLOORL]) |
57 | REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP]) | 89 | REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP]) |
58 | REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL]) | 90 | REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL]) |
91 | REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL]) | ||
59 | REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE]) | 92 | REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE]) |
93 | REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF]) | ||
94 | REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN]) | ||
60 | REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL]) | 95 | REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL]) |
96 | REPLACE_NAN=0; AC_SUBST([REPLACE_NAN]) | ||
61 | REPLACE_ROUND=0; AC_SUBST([REPLACE_ROUND]) | 97 | REPLACE_ROUND=0; AC_SUBST([REPLACE_ROUND]) |
62 | REPLACE_ROUNDF=0; AC_SUBST([REPLACE_ROUNDF]) | 98 | REPLACE_ROUNDF=0; AC_SUBST([REPLACE_ROUNDF]) |
63 | REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL]) | 99 | REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL]) |
64 | REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT]) | 100 | REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT]) |
65 | REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC]) | 101 | REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC]) |
102 | REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL]) | ||
66 | ]) | 103 | ]) |