diff options
author | Bruno Haible <bruno@clisp.org> | 2012-02-26 00:42:25 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2012-02-26 00:42:25 +0100 |
commit | 57649867fd53a99f547e0d4ad6bb19b21330516c (patch) | |
tree | e4927c82692aad16874cf3ba5bb4757c78dc0bf4 /m4/log10l.m4 | |
parent | 0e1c6ff93f27c939ba9e0df945b16ef98eaaeef1 (diff) | |
download | gnulib-57649867fd53a99f547e0d4ad6bb19b21330516c.tar.gz |
New module 'log10l'.
* lib/math.in.h (log10l): New declaration.
* lib/log10l.c: New file.
* m4/log10l.m4: New file.
* modules/log10l: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether log10l is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10L, HAVE_LOG10L,
HAVE_DECL_LOG10L.
* modules/math (Makefile.am): Substitute GNULIB_LOG10L, HAVE_LOG10L,
HAVE_DECL_LOG10L.
* doc/posix-functions/log10l.texi: Mention the new module.
Diffstat (limited to 'm4/log10l.m4')
-rw-r--r-- | m4/log10l.m4 | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/m4/log10l.m4 b/m4/log10l.m4 new file mode 100644 index 0000000000..6d72b6a9dc --- /dev/null +++ b/m4/log10l.m4 @@ -0,0 +1,34 @@ +# log10l.m4 serial 1 +dnl Copyright (C) 2011-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. + +AC_DEFUN([gl_FUNC_LOG10L], +[ + AC_REQUIRE([gl_MATH_H_DEFAULTS]) + AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) + AC_REQUIRE([gl_FUNC_LOG10]) + + dnl Test whether log10l() is declared. On AIX 5.1 it is not declared. + AC_CHECK_DECL([log10l], , [HAVE_DECL_LOG10L=0], [[#include <math.h>]]) + + dnl Test whether log10l() exists. Assume that log10l(), if it exists, is + dnl defined in the same library as log10(). + save_LIBS="$LIBS" + LIBS="$LIBS $LOG10_LIBM" + AC_CHECK_FUNCS([log10l]) + LIBS="$save_LIBS" + if test $ac_cv_func_log10l = yes; then + LOG10L_LIBM="$LOG10_LIBM" + else + HAVE_LOG10L=0 + if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then + LOG10L_LIBM="$LOG10_LIBM" + else + AC_REQUIRE([gl_FUNC_LOGL]) + LOG10L_LIBM="$LOGL_LIBM" + fi + fi + AC_SUBST([LOG10L_LIBM]) +]) |