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 dnl Determine LOG_LIBM.
10 gl_COMMON_DOUBLE_MATHFUNC([log])
13 LIBS="$LIBS $LOG_LIBM"
16 case "$gl_cv_func_log_works" in
22 dnl Test whether log() works.
23 dnl On OSF/1 5.1, log(-0.0) is NaN.
24 AC_DEFUN([gl_FUNC_LOG_WORKS],
26 AC_REQUIRE([AC_PROG_CC])
27 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
28 AC_CACHE_CHECK([whether log works], [gl_cv_func_log_works],
44 [gl_cv_func_log_works=yes],
45 [gl_cv_func_log_works=no],
47 osf*) gl_cv_func_log_works="guessing no";;
48 *) gl_cv_func_log_works="guessing yes";;