blob: eb5ca0daeb5ecaae82c0832890e8d47a81b25370 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001#
2# This function determines if the isnan function is available on this
3# platform.
4#
5AC_DEFUN([AC_FUNC_ISNAN],[
6AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_math_h],
7 [isnan], [<math.h>],
8 [float f; isnan(f);])
9
10if test "$ac_cv_func_isnan_in_math_h" = "yes" ; then
11 AC_DEFINE([HAVE_ISNAN_IN_MATH_H],1,[Set to 1 if the isnan function is found in <math.h>])
12fi
13
14AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_cmath],
15 [isnan], [<cmath>],
16 [float f; isnan(f);])
17if test "$ac_cv_func_isnan_in_cmath" = "yes" ; then
18 AC_DEFINE([HAVE_ISNAN_IN_CMATH],1,[Set to 1 if the isnan function is found in <cmath>])
19fi
20
21AC_SINGLE_CXX_CHECK([ac_cv_func_std_isnan_in_cmath],
22 [std::isnan], [<cmath>],
23 [float f; std::isnan(f);])
24if test "$ac_cv_func_std_isnan_in_cmath" = "yes" ; then
25 AC_DEFINE([HAVE_STD_ISNAN_IN_CMATH],1,[Set to 1 if the std::isnan function is found in <cmath>])
26fi
27])