summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2010-04-04 19:59:32 +0200
committerBruno Haible <bruno@clisp.org>2010-04-04 20:00:22 +0200
commitde6abddc83cd9af7a0cc73d93acbc015432612f2 (patch)
tree618595dc0cd5762e6fc3b18c7d074fcfa3f1676a /m4
parentc3af7659f41a6b12580f225c660b8c2484e83033 (diff)
downloadgnulib-de6abddc83cd9af7a0cc73d93acbc015432612f2.tar.gz
math: Fix some C++ test errors on Cygwin.
Diffstat (limited to 'm4')
-rw-r--r--m4/ceilf.m46
-rw-r--r--m4/ceill.m46
-rw-r--r--m4/floorf.m46
-rw-r--r--m4/floorl.m46
-rw-r--r--m4/math_h.m410
-rw-r--r--m4/round.m450
-rw-r--r--m4/roundf.m450
-rw-r--r--m4/roundl.m410
-rw-r--r--m4/truncl.m46
9 files changed, 85 insertions, 65 deletions
diff --git a/m4/ceilf.m4 b/m4/ceilf.m4
index 72a9da4797..b48fedb686 100644
--- a/m4/ceilf.m4
+++ b/m4/ceilf.m4
@@ -1,4 +1,4 @@
-# ceilf.m4 serial 5
+# ceilf.m4 serial 6
dnl Copyright (C) 2007, 2009-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,
@@ -20,9 +20,9 @@ AC_DEFUN([gl_FUNC_CEILF],
REPLACE_CEILF=1
fi
else
- REPLACE_CEILF=1
+ HAVE_DECL_CEILF=0
fi
- if test $REPLACE_CEILF = 1; then
+ if test $HAVE_DECL_CEILF = 0 || test $REPLACE_CEILF = 1; then
AC_LIBOBJ([ceilf])
CEILF_LIBM=
fi
diff --git a/m4/ceill.m4 b/m4/ceill.m4
index 02527799cf..3d4612ae58 100644
--- a/m4/ceill.m4
+++ b/m4/ceill.m4
@@ -1,4 +1,4 @@
-# ceill.m4 serial 5
+# ceill.m4 serial 6
dnl Copyright (C) 2007, 2009-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,
@@ -20,9 +20,9 @@ AC_DEFUN([gl_FUNC_CEILL],
REPLACE_CEILL=1
fi
else
- REPLACE_CEILL=1
+ HAVE_DECL_CEILL=0
fi
- if test $REPLACE_CEILL = 1; then
+ if test $HAVE_DECL_CEILL = 0 || test $REPLACE_CEILL = 1; then
AC_LIBOBJ([ceill])
CEILL_LIBM=
fi
diff --git a/m4/floorf.m4 b/m4/floorf.m4
index c64382ff69..fb17a5ea1a 100644
--- a/m4/floorf.m4
+++ b/m4/floorf.m4
@@ -1,4 +1,4 @@
-# floorf.m4 serial 5
+# floorf.m4 serial 6
dnl Copyright (C) 2007, 2009-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,
@@ -20,9 +20,9 @@ AC_DEFUN([gl_FUNC_FLOORF],
REPLACE_FLOORF=1
fi
else
- REPLACE_FLOORF=1
+ HAVE_DECL_FLOORF=0
fi
- if test $REPLACE_FLOORF = 1; then
+ if test $HAVE_DECL_FLOORF = 0 || test $REPLACE_FLOORF = 1; then
AC_LIBOBJ([floorf])
FLOORF_LIBM=
fi
diff --git a/m4/floorl.m4 b/m4/floorl.m4
index 53a30f9d52..9790b96816 100644
--- a/m4/floorl.m4
+++ b/m4/floorl.m4
@@ -1,4 +1,4 @@
-# floorl.m4 serial 5
+# floorl.m4 serial 6
dnl Copyright (C) 2007, 2009-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,
@@ -20,9 +20,9 @@ AC_DEFUN([gl_FUNC_FLOORL],
REPLACE_FLOORL=1
fi
else
- REPLACE_FLOORL=1
+ HAVE_DECL_FLOORL=0
fi
- if test $REPLACE_FLOORL = 1; then
+ if test $HAVE_DECL_FLOORL = 0 || test $REPLACE_FLOORL = 1; then
AC_LIBOBJ([floorl])
FLOORL_LIBM=
fi
diff --git a/m4/math_h.m4 b/m4/math_h.m4
index cced740273..2d89ca3f3a 100644
--- a/m4/math_h.m4
+++ b/m4/math_h.m4
@@ -1,4 +1,4 @@
-# math_h.m4 serial 20
+# math_h.m4 serial 21
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,
@@ -100,17 +100,25 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
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])
+ HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF])
+ HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL])
HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL])
HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL])
+ HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF])
+ HAVE_DECL_FLOORL=1; AC_SUBST([HAVE_DECL_FLOORL])
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_ROUND=1; AC_SUBST([HAVE_DECL_ROUND])
+ HAVE_DECL_ROUNDF=1; AC_SUBST([HAVE_DECL_ROUNDF])
+ HAVE_DECL_ROUNDL=1; AC_SUBST([HAVE_DECL_ROUNDL])
HAVE_DECL_SINL=1; AC_SUBST([HAVE_DECL_SINL])
HAVE_DECL_SQRTL=1; AC_SUBST([HAVE_DECL_SQRTL])
HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL])
HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC])
HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF])
+ HAVE_DECL_TRUNCL=1; AC_SUBST([HAVE_DECL_TRUNCL])
REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF])
REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL])
REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF])
diff --git a/m4/round.m4 b/m4/round.m4
index 8860e0151b..e11f518305 100644
--- a/m4/round.m4
+++ b/m4/round.m4
@@ -1,4 +1,4 @@
-# round.m4 serial 7
+# round.m4 serial 8
dnl Copyright (C) 2007, 2009-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,
@@ -12,17 +12,16 @@ AC_DEFUN([gl_FUNC_ROUND],
AC_CHECK_DECLS([round], , , [#include <math.h>])
if test "$ac_cv_have_decl_round" = yes; then
gl_CHECK_MATH_LIB([ROUND_LIBM], [x = round (x);])
- fi
- if test "$ac_cv_have_decl_round" = yes && test "$ROUND_LIBM" != missing; then
- dnl Test whether round() produces correct results. On NetBSD 3.0, for
- dnl x = 1/2 - 2^-54, the system's round() returns a wrong result.
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_CACHE_CHECK([whether round works], [gl_cv_func_round_works],
- [
- save_LIBS="$LIBS"
- LIBS="$LIBS $ROUND_LIBM"
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ if test "$ROUND_LIBM" != missing; then
+ dnl Test whether round() produces correct results. On NetBSD 3.0, for
+ dnl x = 1/2 - 2^-54, the system's round() returns a wrong result.
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether round works], [gl_cv_func_round_works],
+ [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $ROUND_LIBM"
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <float.h>
#include <math.h>
int main()
@@ -40,19 +39,24 @@ int main()
volatile double x = 0.5 - 0.5 / TWO_MANT_DIG;
exit (x < 0.5 && round (x) != 0.0);
}]])], [gl_cv_func_round_works=yes], [gl_cv_func_round_works=no],
- [case "$host_os" in
- netbsd*) gl_cv_func_round_works="guessing no";;
- *) gl_cv_func_round_works="guessing yes";;
- esac
+ [case "$host_os" in
+ netbsd*) gl_cv_func_round_works="guessing no";;
+ *) gl_cv_func_round_works="guessing yes";;
+ esac
+ ])
+ LIBS="$save_LIBS"
])
- LIBS="$save_LIBS"
- ])
- case "$gl_cv_func_round_works" in
- *no) ROUND_LIBM=missing ;;
- esac
+ case "$gl_cv_func_round_works" in
+ *no) ROUND_LIBM=missing ;;
+ esac
+ fi
+ if test "$ROUND_LIBM" = missing; then
+ REPLACE_ROUND=1
+ fi
+ else
+ HAVE_DECL_ROUND=0
fi
- if test "$ac_cv_have_decl_round" != yes || test "$ROUND_LIBM" = missing; then
- REPLACE_ROUND=1
+ if test $HAVE_DECL_ROUND = 0 || test $REPLACE_ROUND = 1; then
AC_LIBOBJ([round])
gl_FUNC_FLOOR_LIBS
gl_FUNC_CEIL_LIBS
diff --git a/m4/roundf.m4 b/m4/roundf.m4
index b246d0432d..a105760d2b 100644
--- a/m4/roundf.m4
+++ b/m4/roundf.m4
@@ -1,4 +1,4 @@
-# roundf.m4 serial 8
+# roundf.m4 serial 9
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,
@@ -12,17 +12,16 @@ AC_DEFUN([gl_FUNC_ROUNDF],
AC_CHECK_DECLS([roundf], , , [#include <math.h>])
if test "$ac_cv_have_decl_roundf" = yes; then
gl_CHECK_MATH_LIB([ROUNDF_LIBM], [x = roundf (x);])
- fi
- if test "$ac_cv_have_decl_roundf" = yes && test "$ROUNDF_LIBM" != missing; then
- dnl Test whether roundf() produces correct results. On mingw, for
- dnl x = 1/2 - 2^-25, the system's roundf() returns a wrong result.
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_CACHE_CHECK([whether roundf works], [gl_cv_func_roundf_works],
- [
- save_LIBS="$LIBS"
- LIBS="$LIBS $ROUNDF_LIBM"
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ if test "$ROUNDF_LIBM" != missing; then
+ dnl Test whether roundf() produces correct results. On mingw, for
+ dnl x = 1/2 - 2^-25, the system's roundf() returns a wrong result.
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether roundf works], [gl_cv_func_roundf_works],
+ [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $ROUNDF_LIBM"
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <float.h>
#include <math.h>
int main()
@@ -37,19 +36,24 @@ int main()
volatile float x = 0.5f - 0.5f / TWO_MANT_DIG;
exit (x < 0.5f && roundf (x) != 0.0f);
}]])], [gl_cv_func_roundf_works=yes], [gl_cv_func_roundf_works=no],
- [case "$host_os" in
- mingw*) gl_cv_func_roundf_works="guessing no";;
- *) gl_cv_func_roundf_works="guessing yes";;
- esac
+ [case "$host_os" in
+ mingw*) gl_cv_func_roundf_works="guessing no";;
+ *) gl_cv_func_roundf_works="guessing yes";;
+ esac
+ ])
+ LIBS="$save_LIBS"
])
- LIBS="$save_LIBS"
- ])
- case "$gl_cv_func_roundf_works" in
- *no) ROUNDF_LIBM=missing ;;
- esac
+ case "$gl_cv_func_roundf_works" in
+ *no) ROUNDF_LIBM=missing ;;
+ esac
+ fi
+ if test "$ROUNDF_LIBM" = missing; then
+ REPLACE_ROUNDF=1
+ fi
+ else
+ HAVE_DECL_ROUNDF=0
fi
- if test "$ac_cv_have_decl_roundf" != yes || test "$ROUNDF_LIBM" = missing; then
- REPLACE_ROUNDF=1
+ if test $HAVE_DECL_ROUNDF = 0 || test $REPLACE_ROUNDF = 1; then
AC_LIBOBJ([roundf])
AC_CHECK_DECLS([ceilf, floorf], , , [#include <math.h>])
if test "$ac_cv_have_decl_floorf" = yes \
diff --git a/m4/roundl.m4 b/m4/roundl.m4
index 3011c37846..f7fe0e8b88 100644
--- a/m4/roundl.m4
+++ b/m4/roundl.m4
@@ -1,4 +1,4 @@
-# roundl.m4 serial 6
+# roundl.m4 serial 7
dnl Copyright (C) 2007, 2009-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,
@@ -12,9 +12,13 @@ AC_DEFUN([gl_FUNC_ROUNDL],
AC_CHECK_DECLS([roundl], , , [#include <math.h>])
if test "$ac_cv_have_decl_roundl" = yes; then
gl_CHECK_MATH_LIB([ROUNDL_LIBM], [x = roundl (x);])
+ if test "$ROUNDL_LIBM" = missing; then
+ REPLACE_ROUNDL=1
+ fi
+ else
+ HAVE_DECL_ROUNDL=0
fi
- if test "$ac_cv_have_decl_roundl" != yes || test "$ROUNDL_LIBM" = missing; then
- REPLACE_ROUNDL=1
+ if test $HAVE_DECL_ROUNDL = 0 || test $REPLACE_ROUNDL = 1; then
AC_LIBOBJ([roundl])
AC_CHECK_DECLS([ceill, floorl], , , [#include <math.h>])
if test "$ac_cv_have_decl_floorl" = yes \
diff --git a/m4/truncl.m4 b/m4/truncl.m4
index 3eab513a37..0498585b20 100644
--- a/m4/truncl.m4
+++ b/m4/truncl.m4
@@ -1,4 +1,4 @@
-# truncl.m4 serial 3
+# truncl.m4 serial 4
dnl Copyright (C) 2007-2008, 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,
@@ -61,9 +61,9 @@ int main()
*) REPLACE_TRUNCL=1 ;;
esac
else
- REPLACE_TRUNCL=1
+ HAVE_DECL_TRUNCL=0
fi
- if test $REPLACE_TRUNCL = 1; then
+ if test $HAVE_DECL_TRUNCL = 0 || test $REPLACE_TRUNCL = 1; then
AC_LIBOBJ([truncl])
TRUNCL_LIBM=
fi