summaryrefslogtreecommitdiff
path: root/m4/log1p-ieee.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2012-03-11 01:27:59 +0100
committerBruno Haible <bruno@clisp.org>2012-03-11 02:40:43 +0100
commit55b49420fc3ae8860ed66a85645b2b4d171646dc (patch)
treef066c0fe36e25d1b951f96dc20370b66cd9602da /m4/log1p-ieee.m4
parent5ba3e2240b3f1bba41db8a6f96363009f6d71fad (diff)
downloadgnulib-55b49420fc3ae8860ed66a85645b2b4d171646dc.tar.gz
log1p-ieee: Work around test failure on AIX 7.1 and HP-UX 11.
* m4/log1p-ieee.m4: New file. * m4/log1p.m4 (gl_FUNC_LOG1P): If gl_FUNC_LOG1P_IEEE is present, test whether log1p works with a minus zero argument. Replace it if not. * lib/math.in.h (log1p): Override if REPLACE_LOG1P is 1. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG1P. * modules/math (Makefile.am): Substitute REPLACE_LOG1P. * modules/log1p (configure.ac): Consider REPLACE_LOG1P. (Depends-on): Update conditions. * modules/log1p-ieee (Files): Add m4/log1p-ieee.m4, m4/minus-zero.m4, m4/signbit.m4. (configure.ac): Invoke gl_FUNC_LOG1P_IEEE. * doc/posix-functions/log1p.texi: Mention the log1p-ieee module.
Diffstat (limited to 'm4/log1p-ieee.m4')
-rw-r--r--m4/log1p-ieee.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/m4/log1p-ieee.m4 b/m4/log1p-ieee.m4
new file mode 100644
index 0000000000..2391af8f96
--- /dev/null
+++ b/m4/log1p-ieee.m4
@@ -0,0 +1,15 @@
+# log1p-ieee.m4 serial 1
+dnl Copyright (C) 2012 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.
+
+dnl This macro is in a separate file (not in remainder.m4 and not inlined in the
+dnl module description), so that gl_FUNC_LOG1P can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_LOG1P_IEEE],
+[
+ m4_divert_text([INIT_PREPARE], [gl_log1p_required=ieee])
+ AC_REQUIRE([gl_FUNC_LOG1P])
+])