diff modules/exp2l @ 16628:d19d163c1519

exp2l-ieee: Work around test failure on OpenBSD 4.9 and IRIX 6.5. * m4/exp2l-ieee.m4: New file. * m4/exp2l.m4 (gl_FUNC_EXP2L): If gl_FUNC_EXP2L_IEEE is present, test whether exp2l works with a NaN argument and with a negative infinity argument. Replace it if not. * lib/math.in.h (exp2l): Override if REPLACE_EXP2L is 1. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXP2L. * modules/math (Makefile.am): Substitute REPLACE_EXP2L. * modules/exp2l (configure.ac): Consider REPLACE_EXP2L. (Depends-on): Update conditions. * modules/exp2l-ieee (Files): Add m4/exp2l-ieee.m4. (configure.ac): Invoke gl_FUNC_EXP2L_IEEE. * doc/posix-functions/exp2l.texi: Mention the exp2l-ieee module.
author Bruno Haible <bruno@clisp.org>
date Fri, 09 Mar 2012 02:14:26 +0100 (2012-03-09)
parents 4a578c3945b8
children 1f14c6dd175d
line wrap: on
line diff
--- a/modules/exp2l
+++ b/modules/exp2l
@@ -9,15 +9,15 @@
 Depends-on:
 math
 extensions
-exp2            [test $HAVE_EXP2L = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
-float           [test $HAVE_EXP2L = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-isnanl          [test $HAVE_EXP2L = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-roundl          [test $HAVE_EXP2L = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-ldexpl          [test $HAVE_EXP2L = 0 && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+exp2            [{ test $HAVE_EXP2L = 0 || test $REPLACE_EXP2L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+float           [{ test $HAVE_EXP2L = 0 || test $REPLACE_EXP2L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+isnanl          [{ test $HAVE_EXP2L = 0 || test $REPLACE_EXP2L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+roundl          [{ test $HAVE_EXP2L = 0 || test $REPLACE_EXP2L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+ldexpl          [{ test $HAVE_EXP2L = 0 || test $REPLACE_EXP2L = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
 
 configure.ac:
 gl_FUNC_EXP2L
-if test $HAVE_EXP2L = 0; then
+if test $HAVE_EXP2L = 0 || test $REPLACE_EXP2L = 1; then
   AC_LIBOBJ([exp2l])
   AC_LIBOBJ([expl-table])
 fi