-# isnan.m4 serial 1
+# isnan.m4 serial 2
dnl Copyright (C) 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_DEFUN([gl_FUNC_ISNAN_NO_LIBM],
[
- AC_CHECK_FUNC([isnan],
- [gl_cv_func_isnan_no_libm=yes],
- [gl_cv_func_isnan_no_libm=no])
+ AC_CACHE_CHECK([whether isnan(double) can be used without linking with libm],
+ [gl_cv_func_isnan_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ double x;],
+ [return isnan (x);],
+ [gl_cv_func_isnan_no_libm=yes],
+ [gl_cv_func_isnan_no_libm=no])
+ ])
if test $gl_cv_func_isnan_no_libm = yes; then
AC_DEFINE([HAVE_ISNAN_IN_LIBC], 1,
- [Define if the isnan() function is available in libc.])
+ [Define if the isnan(double) function is available in libc.])
else
AC_LIBOBJ([isnan])
gl_DOUBLE_EXPONENT_LOCATION
],
[gl_cv_cc_double_expbit0="unknown"],
[
+ pushdef([AC_MSG_CHECKING],[:])dnl
+ pushdef([AC_MSG_RESULT],[:])dnl
+ pushdef([AC_MSG_RESULT_UNQUOTED],[:])dnl
AC_C_BIGENDIAN(
[gl_cv_cc_double_expbit0="word 0 bit 20"],
[gl_cv_cc_double_expbit0="word 1 bit 20"],
[gl_cv_cc_double_expbit0="unknown"])
+ popdef([AC_MSG_RESULT_UNQUOTED])dnl
+ popdef([AC_MSG_RESULT])dnl
+ popdef([AC_MSG_CHECKING])dnl
])
])
rm -f conftest.out