summaryrefslogtreecommitdiff
path: root/autoconf/m4/func_isnan.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_isnan.m4
parent0b8d2f9706743418cf97ff3837465de77fa8d781 (diff)
downloadllvm-abec8f96e3e35fbb306c957674809c4ace04a620.tar.gz
llvm-abec8f96e3e35fbb306c957674809c4ace04a620.tar.bz2
llvm-abec8f96e3e35fbb306c957674809c4ace04a620.tar.xz
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_isnan.m4')
-rw-r--r--autoconf/m4/func_isnan.m427
1 files changed, 18 insertions, 9 deletions
diff --git a/autoconf/m4/func_isnan.m4 b/autoconf/m4/func_isnan.m4
index 8e626fe15b..eb5ca0daeb 100644
--- a/autoconf/m4/func_isnan.m4
+++ b/autoconf/m4/func_isnan.m4
@@ -3,16 +3,25 @@
# platform.
#
AC_DEFUN([AC_FUNC_ISNAN],[
-AC_SINGLE_CXX_CHECK([HAVE_ISNAN_IN_MATH_H], [ac_cv_func_isnan_in_math_h],
+AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_math_h],
[isnan], [<math.h>],
- [#include <math.h>
- int foo(float f) {return isnan(f);}])
-AC_SINGLE_CXX_CHECK([HAVE_ISNAN_IN_CMATH], [ac_cv_func_isnan_in_cmath],
+ [float f; isnan(f);])
+
+if test "$ac_cv_func_isnan_in_math_h" = "yes" ; then
+ AC_DEFINE([HAVE_ISNAN_IN_MATH_H],1,[Set to 1 if the isnan function is found in <math.h>])
+fi
+
+AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_cmath],
[isnan], [<cmath>],
- [#include <cmath>
- int foo(float f) {return isnan(f);}])
-AC_SINGLE_CXX_CHECK([HAVE_STD_ISNAN_IN_CMATH], [ac_cv_func_std_isnan_in_cmath],
+ [float f; isnan(f);])
+if test "$ac_cv_func_isnan_in_cmath" = "yes" ; then
+ AC_DEFINE([HAVE_ISNAN_IN_CMATH],1,[Set to 1 if the isnan function is found in <cmath>])
+fi
+
+AC_SINGLE_CXX_CHECK([ac_cv_func_std_isnan_in_cmath],
[std::isnan], [<cmath>],
- [#include <cmath>
- using std::isnan; int foo(float f) {return isnan(f);}])
+ [float f; std::isnan(f);])
+if test "$ac_cv_func_std_isnan_in_cmath" = "yes" ; then
+ AC_DEFINE([HAVE_STD_ISNAN_IN_CMATH],1,[Set to 1 if the std::isnan function is found in <cmath>])
+fi
])