aboutsummaryrefslogtreecommitdiff
path: root/autoconf/m4/func_isinf.m4
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-10-27 23:03:44 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-10-27 23:03:44 +0000
commitabec8f96e3e35fbb306c957674809c4ace04a620 (patch)
tree73a294a25458cd5c975ea83c7ab1fe5cf8dea050 /autoconf/m4/func_isinf.m4
parent0b8d2f9706743418cf97ff3837465de77fa8d781 (diff)
Changes to support rand48 tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17284 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf/m4/func_isinf.m4')
-rw-r--r--autoconf/m4/func_isinf.m436
1 files changed, 24 insertions, 12 deletions
diff --git a/autoconf/m4/func_isinf.m4 b/autoconf/m4/func_isinf.m4
index dc0c22e925..c372dd8578 100644
--- a/autoconf/m4/func_isinf.m4
+++ b/autoconf/m4/func_isinf.m4
@@ -3,22 +3,34 @@
# platform.
#
AC_DEFUN([AC_FUNC_ISINF],[
-AC_SINGLE_CXX_CHECK([HAVE_ISINF_IN_MATH_H], [ac_cv_func_isinf_in_math_h],
+AC_SINGLE_CXX_CHECK([ac_cv_func_isinf_in_math_h],
[isinf], [<math.h>],
- [#include <math.h>
- int foo(float f) {return isinf(f);}])
-AC_SINGLE_CXX_CHECK([HAVE_ISINF_IN_CMATH], [ac_cv_func_isinf_in_cmath],
+ [float f; isinf(f);])
+if test "$ac_cv_func_isinf_in_math_h" = "yes" ; then
+ AC_DEFINE([HAVE_ISINF_IN_MATH_H],1,[Set to 1 if the isinf function is found in <math.h>])
+fi
+
+AC_SINGLE_CXX_CHECK([ac_cv_func_isinf_in_cmath],
[isinf], [<cmath>],
- [#include <cmath>
- int foo(float f) {return isinf(f);}])
-AC_SINGLE_CXX_CHECK([HAVE_STD_ISINF_IN_CMATH], [ac_cv_func_std_isinf_in_cmath],
+ [float f; isinf(f);])
+if test "$ac_cv_func_isinf_in_cmath" = "yes" ; then
+ AC_DEFINE([HAVE_ISINF_IN_CMATH],1,[Set to 1 if the isinf function is found in <cmath>])
+fi
+
+AC_SINGLE_CXX_CHECK([ac_cv_func_std_isinf_in_cmath],
[std::isinf], [<cmath>],
- [#include <cmath>
- using std::isinf; int foo(float f) {return isinf(f);}])
-AC_SINGLE_CXX_CHECK([HAVE_FINITE_IN_IEEEFP_H], [ac_cv_func_finite_in_ieeefp_h],
+ [float f; std::isinf(f)}])
+if test "$ac_cv_func_std_isinf_in_cmath" = "yes" ; then
+ AC_DEFINE([HAVE_STD_ISINF_IN_CMATH],1,[Set to 1 if the std::isinf function is found in <cmath>])
+fi
+
+AC_SINGLE_CXX_CHECK([ac_cv_func_finite_in_ieeefp_h],
[finite], [<ieeefp.h>],
- [#include <ieeefp.h>
- int foo(float f) {return finite(f);}])
+ [float f; finite(f);])
+if test "$ac_cv_func_finite_in_ieefp_h" = "yes" ; then
+ AC_DEFINE([HAVE_FINITE_IN_IEEFP_H],1,[Set to 1 if the finite function is found in <ieeefp.h>])
+fi
+
])