1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 03:30:27 +02:00
guile/m4/isnan.m4
Ludovic Courtès 2e65b52f8a Use Gnulib's isnan' and isinf' modules.
This updates Gnulib to v0.0-4219-g84cdd8b.

* m4/gnulib-cache.m4: Add `isinf' and `isnan'.

* configure.ac: Remove checks for `floatingpoint.h', `ieeefp.h', and
  `nan.h'.

* libguile/gen-scmconfig.c (main): Remove definitions of
  `SCM_HAVE_FLOATINGPOINT_H', `SCM_HAVE_IEEEFP_H', and
  `SCM_HAVE_NAN_H'.

* libguile/numbers.c (isnan)[SCO && !HAVE_ISNAN]: Remove.
  (isinf)[SCO && !HAVE_ISINF]: Remove.
  (xisinf, xisnan): Remove.  Change callers to use `isinf' and `isnan'.
  (guile_ieee_init): Remove the `defined HAVE_ISINF' and `define
  HAVE_ISNAN' conditions.

* libguile/numbers.h: Remove code conditional on
  `SCM_HAVE_FLOATINGPOINT_H', `SCM_HAVE_IEEEFP_H', or `SCM_HAVE_NAN_H'.
2010-09-08 00:34:27 +02:00

47 lines
1.5 KiB
Text

# isnan.m4 serial 3
dnl Copyright (C) 2007-2010 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.
AC_DEFUN([gl_ISNAN],
[
AC_REQUIRE([gl_MATH_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_ISNANF])
AC_REQUIRE([gl_FUNC_ISNAND])
AC_REQUIRE([gl_FUNC_ISNANL])
# If we replaced any of the underlying isnan* functions, replace
# the isnan macro; it undoubtedly suffers from the same flaws.
AC_MSG_CHECKING([whether isnan macro works])
if test $gl_func_isnanf = yes \
&& test $gl_func_isnand = yes \
&& test $gl_func_isnanl = yes; then
AC_MSG_RESULT([yes])
ISNAN_LIBM=
dnl Append $ISNANF_LIBM to ISNAN_LIBM, avoiding gratuitous duplicates.
case " $ISNAN_LIBM " in
*" $ISNANF_LIBM "*) ;;
*) ISNAN_LIBM="$ISNAN_LIBM $ISNANF_LIBM" ;;
esac
dnl Append $ISNAND_LIBM to ISNAN_LIBM, avoiding gratuitous duplicates.
case " $ISNAN_LIBM " in
*" $ISNAND_LIBM "*) ;;
*) ISNAN_LIBM="$ISNAN_LIBM $ISNAND_LIBM" ;;
esac
dnl Append $ISNANL_LIBM to ISNAN_LIBM, avoiding gratuitous duplicates.
case " $ISNAN_LIBM " in
*" $ISNANL_LIBM "*) ;;
*) ISNAN_LIBM="$ISNAN_LIBM $ISNANL_LIBM" ;;
esac
else
AC_MSG_RESULT([no])
REPLACE_ISNAN=1
# Make sure the rpl_isnan[fdl] functions get built.
gl_BUILD_ISNANF
gl_BUILD_ISNAND
gl_BUILD_ISNANL
ISNAN_LIBM=
fi
AC_SUBST([ISNAN_LIBM])
])