Hash :
70cefefe
Author :
Date :
2011-10-08T23:07:36
New module 'cosf'. * lib/math.in.h (cosf): New declaration. * lib/cosf.c: New file. * m4/cosf.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether cosf is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_COSF, HAVE_COSF. * modules/math (Makefile.am): Substitute GNULIB_COSF, HAVE_COSF. * modules/cosf: New file. * tests/test-math-c++.cc: Check the declaration of cosf. * doc/posix-functions/cosf.texi: Mention the new module.
# cosf.m4 serial 1
dnl Copyright (C) 2011 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_COSF],
[
AC_REQUIRE([gl_MATH_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_COS])
dnl Test whether cosf() exists. Assume that cosf(), if it exists, is
dnl defined in the same library as cos().
save_LIBS="$LIBS"
LIBS="$LIBS $COS_LIBM"
AC_CHECK_FUNCS([cosf])
LIBS="$save_LIBS"
if test $ac_cv_func_cosf = yes; then
COSF_LIBM="$COS_LIBM"
else
HAVE_COSF=0
COSF_LIBM="$COS_LIBM"
fi
AC_SUBST([COSF_LIBM])
])