isnan.m4 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # isnan.m4 serial 5
  2. dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
  3. dnl This file is free software; the Free Software Foundation
  4. dnl gives unlimited permission to copy and/or distribute it,
  5. dnl with or without modifications, as long as this notice is preserved.
  6. AC_DEFUN([gl_ISNAN],
  7. [
  8. AC_REQUIRE([gl_MATH_H_DEFAULTS])
  9. AC_REQUIRE([gl_FUNC_ISNANF])
  10. AC_REQUIRE([gl_FUNC_ISNAND])
  11. AC_REQUIRE([gl_FUNC_ISNANL])
  12. # If we replaced any of the underlying isnan* functions, replace
  13. # the isnan macro; it undoubtedly suffers from the same flaws.
  14. AC_MSG_CHECKING([whether isnan macro works])
  15. if test $gl_func_isnanf = yes \
  16. && test $gl_func_isnand = yes \
  17. && test $gl_func_isnanl = yes; then
  18. AC_MSG_RESULT([yes])
  19. ISNAN_LIBM=
  20. dnl Append $ISNANF_LIBM to ISNAN_LIBM, avoiding gratuitous duplicates.
  21. case " $ISNAN_LIBM " in
  22. *" $ISNANF_LIBM "*) ;;
  23. *) ISNAN_LIBM="$ISNAN_LIBM $ISNANF_LIBM" ;;
  24. esac
  25. dnl Append $ISNAND_LIBM to ISNAN_LIBM, avoiding gratuitous duplicates.
  26. case " $ISNAN_LIBM " in
  27. *" $ISNAND_LIBM "*) ;;
  28. *) ISNAN_LIBM="$ISNAN_LIBM $ISNAND_LIBM" ;;
  29. esac
  30. dnl Append $ISNANL_LIBM to ISNAN_LIBM, avoiding gratuitous duplicates.
  31. case " $ISNAN_LIBM " in
  32. *" $ISNANL_LIBM "*) ;;
  33. *) ISNAN_LIBM="$ISNAN_LIBM $ISNANL_LIBM" ;;
  34. esac
  35. else
  36. AC_MSG_RESULT([no])
  37. dnl REPLACE_ISNAN=1 also makes sure the rpl_isnan[fdl] functions get built.
  38. REPLACE_ISNAN=1
  39. ISNAN_LIBM=
  40. fi
  41. AC_SUBST([ISNAN_LIBM])
  42. ])