X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fisnan.m4;h=d4729cdc376faba736a3f649876de30484d1fc7b;hb=f6183e64302b3af947cdd932049180b5a32f6443;hp=f065a5010aa3d29c249eafa8328a216a1ee323cf;hpb=4ad44dd748d5da39555cdf305568280d69a23354;p=gnulib.git diff --git a/m4/isnan.m4 b/m4/isnan.m4 index f065a5010..d4729cdc3 100644 --- a/m4/isnan.m4 +++ b/m4/isnan.m4 @@ -8,12 +8,18 @@ dnl Check how to get or define isnan() without linking with libm. AC_DEFUN([gl_FUNC_ISNAN_NO_LIBM], [ - AC_CHECK_FUNC([isnan], - [gl_cv_func_isnan_no_libm=yes], - [gl_cv_func_isnan_no_libm=no]) + AC_CACHE_CHECK([whether isnan(double) can be used without linking with libm], + [gl_cv_func_isnan_no_libm], + [ + AC_TRY_LINK([#include + double x;], + [return isnan (x);], + [gl_cv_func_isnan_no_libm=yes], + [gl_cv_func_isnan_no_libm=no]) + ]) if test $gl_cv_func_isnan_no_libm = yes; then AC_DEFINE([HAVE_ISNAN_IN_LIBC], 1, - [Define if the isnan() function is available in libc.]) + [Define if the isnan(double) function is available in libc.]) else AC_LIBOBJ([isnan]) gl_DOUBLE_EXPONENT_LOCATION @@ -92,14 +98,17 @@ int main () [gl_cv_cc_double_expbit0=`cat conftest.out`], [gl_cv_cc_double_expbit0="unknown"], [ - dnl On ARM, integer types are stored in little-endian byte order, - dnl but floats are stored in big-endian word order. + dnl On ARM, there are two 'double' floating-point formats, used by + dnl different sets of instructions: The older FPA instructions assume + dnl that they are stored in big-endian word order, while the words + dnl (like integer types) are stored in little-endian byte order. + dnl The newer VFP instructions assume little-endian order consistenly. AC_EGREP_CPP([mixed_endianness], [ #if defined arm || defined __arm || defined __arm__ mixed_endianness #endif ], - [gl_cv_cc_double_expbit0="word 0 bit 20"], + [gl_cv_cc_double_expbit0="unknown"], [ AC_C_BIGENDIAN( [gl_cv_cc_double_expbit0="word 0 bit 20"],