X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fisnan.m4;h=eb61d5667876a5c0b6620f82d27651e99207d101;hb=b4349b948ba2c352187158e241334abda6e473e9;hp=f146601cd63b00f4721c92e34a411429cb870040;hpb=7080851f5a8270aee50e8545d28c48c6c75decc1;p=gnulib.git diff --git a/m4/isnan.m4 b/m4/isnan.m4 index f146601cd..eb61d5667 100644 --- a/m4/isnan.m4 +++ b/m4/isnan.m4 @@ -1,5 +1,5 @@ -# isnan.m4 serial 1 -dnl Copyright (C) 2007-2008 Free Software Foundation, Inc. +# 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. @@ -11,9 +11,6 @@ AC_DEFUN([gl_ISNAN], AC_REQUIRE([gl_FUNC_ISNAND]) AC_REQUIRE([gl_FUNC_ISNANL]) - ISNAN_LIBM="$ISNANF_LIBM $ISNAND_LIBM $ISNANL_LIBM" - AC_SUBST([ISNAN_LIBM]) - # 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]) @@ -21,12 +18,30 @@ AC_DEFUN([gl_ISNAN], && 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 - REPLACE_ISNAN=1 - AC_MSG_RESULT([no]) + ISNAN_LIBM= fi + AC_SUBST([ISNAN_LIBM]) ])