single_cxx_check.m4 revision 491f6812ef173989612d987fa8706fd38e2e673f
1dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandlerdnl AC_SINGLE_CXX_CHECK(DEFINEVAR, CACHEVAR, FUNCTION, HEADER, PROGRAM) 2dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandlerdnl $1, $2, $3, $4, $5 3dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandlerdnl 4dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel SandlerAC_DEFUN([AC_SINGLE_CXX_CHECK], 5dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler[AC_CACHE_CHECK([for $3 in $4], [$2], 6dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler [AC_LANG_PUSH(C++) 7Y�� AC_COMPILE_IFELSE(AC_LANG_SOURCE([$5]),[$2=yes],[$2=no]) 8dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler AC_LANG_POP(C++)]) 9Y��Xp��cY@�,`Y Mx@� � � if test "$$2" = "yes" 10dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler then 11dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler AC_DEFINE($1, 1, [Define to 1 if your compiler defines $3 in the $4 12dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler header file.]) 13dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler fi]) 14dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler 15dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel SandlerAC_DEFUN([AC_FUNC_ISNAN],[ 16dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel SandlerAC_SINGLE_CXX_CHECK([HAVE_ISNAN_IN_MATH_H], [ac_cv_func_isnan_in_math_h], 17dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler [isnan], [<math.h>], 18dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler [#include <math.h> 19dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler int foo(float f) {return isnan(f);}]) 20dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel SandlerAC_SINGLE_CXX_CHECK([HAVE_ISNAN_IN_CMATH], [ac_cv_func_isnan_in_cmath], 21JpP [isnan], [<cmath>], 22dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler [#include <cmath> 23dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler int foo(float f) {return isnan(f);}]) 24dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel SandlerAC_SINGLE_CXX_CHECK([HAVE_STD_ISNAN_IN_CMATH], [ac_cv_func_std_isnan_in_cmath], 25dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler [std::isnan], [<cmath>], 26dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler [#include <cmath> 27TB\pPZz using std::isnan; int foo(float f) {return isnan(f);}]) 28kM�O���]) 29dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler 30c:��yAC_DEFUN([AC_FUNC_ISINF],[ 31dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel SandlerAC_SINGLE_CXX_CHECK([HAVE_ISINF_IN_MATH_H], [ac_cv_func_isinf_in_math_h], 32y���PJ�]Q� �mm���`�(� $hh������R��f� [isinf], [<math.h>], 33dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler [#include <math.h> 34dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler int foo(float f) {return isinf(f);}]) 35m9���:Ln�Ԩ�AC_SINGLE_CXX_CHECK([HAVE_ISINF_IN_CMATH], [ac_cv_func_isinf_in_cmath], 36dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler [isinf], [<cmath>], 37dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler [#include <cmath> 38dcbdd3b420254ce39d9793c6fde6dd05436704ffDaniel Sandler int foo(float f) {return isinf(f);}]) 39AC_SINGLE_CXX_CHECK([HAVE_STD_ISINF_IN_CMATH], [ac_cv_func_std_isinf_in_cmath], 40 [std::isinf], [<cmath>], 41 [#include <cmath> 42 using std::isinf; int foo(float f) {return isinf(f);}]) 43AC_SINGLE_CXX_CHECK([HAVE_FINITE_IN_IEEEFP_H], [ac_cv_func_finite_in_ieeefp_h], 44 [finite], [<ieeefp.h>], 45 [#include <ieeefp.h> 46 int foo(float f) {return finite(f);}]) 47]) 48 49