blob: eb5ca0daeb5ecaae82c0832890e8d47a81b25370 [file] [log] [blame]
Reid Spencer53ecd512004-09-07 14:23:53 +00001#
2# This function determines if the isnan function is available on this
3# platform.
4#
5AC_DEFUN([AC_FUNC_ISNAN],[
Reid Spencerabec8f92004-10-27 23:03:44 +00006AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_math_h],
Reid Spencer53ecd512004-09-07 14:23:53 +00007 [isnan], [<math.h>],
Reid Spencerabec8f92004-10-27 23:03:44 +00008 [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],
Reid Spencer53ecd512004-09-07 14:23:53 +000015 [isnan], [<cmath>],
Reid Spencerabec8f92004-10-27 23:03:44 +000016 [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],
Reid Spencer53ecd512004-09-07 14:23:53 +000022 [std::isnan], [<cmath>],
Reid Spencerabec8f92004-10-27 23:03:44 +000023 [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
Reid Spencer53ecd512004-09-07 14:23:53 +000027])