diff m4/hypotl-ieee.m4 @ 16532:1fcd2cd248a9

hypotl-ieee: Work around test failure on OSF/1 and native Windows. * m4/hypotl-ieee.m4: New file. * m4/hypotl.m4 (gl_FUNC_HYPOTL): If gl_FUNC_HYPOTL_IEEE is present, test whether hypotl works with mixed NaN and Infinity arguments. Replace it if not. * lib/math.in.h (hypotl): Override if REPLACE_HYPOTL is 1. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_HYPOTL. * modules/math (Makefile.am): Substitute REPLACE_HYPOTL. * modules/hypotl (configure.ac): Consider REPLACE_HYPOTL. (Depends-on): Update conditions. * modules/hypotl-ieee (Files): Add m4/hypotl-ieee.m4. (Depends-on): Add hypot-ieee. (configure.ac): Invoke gl_FUNC_HYPOTL_IEEE. * doc/posix-functions/hypotl.texi: Mention the hypotl-ieee module.
author Bruno Haible <bruno@clisp.org>
date Wed, 29 Feb 2012 20:50:49 +0100
parents
children e542fd46ad6f
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/m4/hypotl-ieee.m4
@@ -0,0 +1,15 @@
+# hypotl-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 hypotl.m4 and not inlined in the
+dnl module description), so that gl_FUNC_HYPOTL can test whether 'aclocal' has
+dnl found uses of this macro.
+
+AC_DEFUN([gl_FUNC_HYPOTL_IEEE],
+[
+  m4_divert_text([INIT_PREPARE], [gl_hypotl_required=ieee])
+  AC_REQUIRE([gl_FUNC_HYPOTL])
+])