From 5f70dcfc4f65198adbce63a01a17f18b1627beee Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 10 Mar 2012 19:54:08 +0100 Subject: log1p: Provide replacement for Minix and MSVC. * lib/math.in.h (log1p): New declaration. * lib/log1p.c: New file. * m4/log1p.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether log1p is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1P, HAVE_LOG1P. * modules/math (Makefile.am): Substitute GNULIB_LOG1P, HAVE_LOG1P. * modules/log1p (Files): Add lib/log1p.c, m4/log1p.m4. (Depends-on): Add math, isnand, log, round. (configure.ac): Invoke gl_FUNC_LOG1P. Arrange to compile replacement if HAVE_LOG1P is 0. * tests/test-math-c++.cc: Check the declaration of log1p. * doc/posix-functions/log1p.texi: Mention the replacement. --- modules/log1p | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'modules/log1p') diff --git a/modules/log1p b/modules/log1p index 3470e87302..e055026aac 100644 --- a/modules/log1p +++ b/modules/log1p @@ -2,13 +2,23 @@ Description: log1p() function: natural logarithm of 1 plus argument. Files: +lib/log1p.c +m4/log1p.m4 m4/mathfunc.m4 Depends-on: +math extensions +isnand [test $HAVE_LOG1P = 0] +log [test $HAVE_LOG1P = 0] +round [test $HAVE_LOG1P = 0] configure.ac: -gl_COMMON_DOUBLE_MATHFUNC([log1p]) +gl_FUNC_LOG1P +if test $HAVE_LOG1P = 0; then + AC_LIBOBJ([log1p]) +fi +gl_MATH_MODULE_INDICATOR([log1p]) Makefile.am: -- cgit v1.2.1