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