-# isnanf.m4 serial 3
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# isnanf.m4 serial 5
+dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
gl_ISNANF_WORKS
fi
if test $gl_cv_func_isnanf_no_libm = yes \
- && test "$gl_cv_func_isnanf_works" = yes; then
+ && { case "$gl_cv_func_isnanf_works" in
+ *yes) true;;
+ *) false;;
+ esac
+ }; then
AC_DEFINE([HAVE_ISNANF_IN_LIBC], 1,
[Define if the isnan(float) function is available in libc.])
else
[gl_cv_func_isnanf_no_libm],
[
AC_TRY_LINK([#include <math.h>
- #ifdef isnan
+ #if __GNUC__ >= 4
+ # undef isnanf
+ # define isnanf(x) __builtin_isnanf ((float)(x))
+ #elif defined isnan
# undef isnanf
# define isnanf(x) isnan ((float)(x))
#endif
[
AC_TRY_RUN([
#include <math.h>
-#ifdef isnan
+#if __GNUC__ >= 4
+# undef isnanf
+# define isnanf(x) __builtin_isnanf ((float)(x))
+#elif defined isnan
# undef isnanf
# define isnanf(x) isnan ((float)(x))
#endif
],
[gl_cv_cc_float_expbit0=`cat conftest.out`],
[gl_cv_cc_float_expbit0="unknown"],
- [gl_cv_cc_double_expbit0="word 0 bit 23"])
+ [gl_cv_cc_float_expbit0="word 0 bit 23"])
rm -f conftest.out
])
case "$gl_cv_cc_float_expbit0" in