2 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
7 AC_DEFUN([gl_FUNC_LOG],
9 AC_REQUIRE([gl_MATH_H_DEFAULTS])
11 dnl Determine LOG_LIBM.
12 gl_COMMON_DOUBLE_MATHFUNC([log])
15 LIBS="$LIBS $LOG_LIBM"
18 case "$gl_cv_func_log_works" in
24 dnl Test whether log() works.
25 dnl On OSF/1 5.1, log(-0.0) is NaN.
26 AC_DEFUN([gl_FUNC_LOG_WORKS],
28 AC_REQUIRE([AC_PROG_CC])
29 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
30 AC_CACHE_CHECK([whether log works], [gl_cv_func_log_works],
46 [gl_cv_func_log_works=yes],
47 [gl_cv_func_log_works=no],
49 osf*) gl_cv_func_log_works="guessing no";;
50 *) gl_cv_func_log_works="guessing yes";;