Reid Spencer | 53ecd51 | 2004-09-07 14:23:53 +0000 | [diff] [blame] | 1 | # |
| 2 | # This function determines if the isnan function is available on this |
| 3 | # platform. |
| 4 | # |
| 5 | AC_DEFUN([AC_FUNC_ISNAN],[ |
Reid Spencer | abec8f9 | 2004-10-27 23:03:44 +0000 | [diff] [blame] | 6 | AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_math_h], |
Reid Spencer | 53ecd51 | 2004-09-07 14:23:53 +0000 | [diff] [blame] | 7 | [isnan], [<math.h>], |
Reid Spencer | abec8f9 | 2004-10-27 23:03:44 +0000 | [diff] [blame] | 8 | [float f; isnan(f);]) |
| 9 | |
| 10 | if 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>]) |
| 12 | fi |
| 13 | |
| 14 | AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_cmath], |
Reid Spencer | 53ecd51 | 2004-09-07 14:23:53 +0000 | [diff] [blame] | 15 | [isnan], [<cmath>], |
Reid Spencer | abec8f9 | 2004-10-27 23:03:44 +0000 | [diff] [blame] | 16 | [float f; isnan(f);]) |
| 17 | if 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>]) |
| 19 | fi |
| 20 | |
| 21 | AC_SINGLE_CXX_CHECK([ac_cv_func_std_isnan_in_cmath], |
Reid Spencer | 53ecd51 | 2004-09-07 14:23:53 +0000 | [diff] [blame] | 22 | [std::isnan], [<cmath>], |
Reid Spencer | abec8f9 | 2004-10-27 23:03:44 +0000 | [diff] [blame] | 23 | [float f; std::isnan(f);]) |
| 24 | if 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>]) |
| 26 | fi |
Reid Spencer | 53ecd51 | 2004-09-07 14:23:53 +0000 | [diff] [blame] | 27 | ]) |