X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fmath_h.m4;h=4cf403ee1f07294a1fd2bbe97e901512f9f952ec;hb=062cad2d07081f9a60adbb90fc1184a435a1a93f;hp=00cbeb78eabe755bf1c26c34003e6aaa64ac3203;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/m4/math_h.m4 b/m4/math_h.m4 index 00cbeb78e..4cf403ee1 100644 --- a/m4/math_h.m4 +++ b/m4/math_h.m4 @@ -1,4 +1,4 @@ -# math_h.m4 serial 14 +# math_h.m4 serial 19 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, @@ -8,6 +8,8 @@ AC_DEFUN([gl_MATH_H], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([math.h]) + AC_REQUIRE([AC_C_INLINE]) + AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[/* Solaris 10 has a broken definition of NAN. Other platforms @@ -33,6 +35,12 @@ AC_DEFUN([gl_MATH_H], if test $gl_cv_header_math_huge_val_works = no; then REPLACE_HUGE_VAL=1 fi + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include + ]], [acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl + ldexpl logb logl round roundf roundl sinl sqrtl tanl trunc truncf truncl]) ]) AC_DEFUN([gl_MATH_MODULE_INDICATOR], @@ -40,12 +48,19 @@ AC_DEFUN([gl_MATH_MODULE_INDICATOR], dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_MATH_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR([$1]) ]) AC_DEFUN([gl_MATH_H_DEFAULTS], [ + GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL]) + GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL]) + GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL]) GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF]) GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL]) + GNULIB_COSL=0; AC_SUBST([GNULIB_COSL]) + GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL]) GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF]) GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL]) GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP]) @@ -57,18 +72,31 @@ AC_DEFUN([gl_MATH_H_DEFAULTS], GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND]) GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL]) GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL]) - GNULIB_MATHL=0; AC_SUBST([GNULIB_MATHL]) + GNULIB_LOGB=0; AC_SUBST([GNULIB_LOGB]) + GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL]) GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND]) GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF]) GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL]) GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT]) + GNULIB_SINL=0; AC_SUBST([GNULIB_SINL]) + GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL]) + GNULIB_TANL=0; AC_SUBST([GNULIB_TANL]) GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC]) GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF]) GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL]) dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_ACOSL=1; AC_SUBST([HAVE_ACOSL]) + HAVE_ASINL=1; AC_SUBST([HAVE_ASINL]) + HAVE_ATANL=1; AC_SUBST([HAVE_ATANL]) + HAVE_COSL=1; AC_SUBST([HAVE_COSL]) + HAVE_EXPL=1; AC_SUBST([HAVE_EXPL]) HAVE_ISNANF=1; AC_SUBST([HAVE_ISNANF]) HAVE_ISNAND=1; AC_SUBST([HAVE_ISNAND]) HAVE_ISNANL=1; AC_SUBST([HAVE_ISNANL]) + HAVE_LOGL=1; AC_SUBST([HAVE_LOGL]) + HAVE_SINL=1; AC_SUBST([HAVE_SINL]) + HAVE_SQRTL=1; AC_SUBST([HAVE_SQRTL]) + HAVE_TANL=1; AC_SUBST([HAVE_TANL]) HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL]) HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL]) HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL]) @@ -76,6 +104,7 @@ AC_DEFUN([gl_MATH_H_DEFAULTS], HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL]) HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL]) HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL]) + HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB]) HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL]) HAVE_DECL_SINL=1; AC_SUBST([HAVE_DECL_SINL]) HAVE_DECL_SQRTL=1; AC_SUBST([HAVE_DECL_SQRTL])