2 dnl Copyright (C) 2010-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_LOGB],
9 AC_REQUIRE([gl_MATH_H_DEFAULTS])
11 dnl Persuade glibc <math.h> to declare logb().
12 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
14 dnl Test whether logb() is declared.
15 AC_CHECK_DECLS([logb], , , [[#include <math.h>]])
16 if test "$ac_cv_have_decl_logb" != yes; then
19 dnl Test whether logb() can be used without libm.
23 [[#ifndef __NO_MATH_INLINES
24 # define __NO_MATH_INLINES 1 /* for glibc */
31 double logb (double x);
35 if test "$LOGB_LIBM" = "?"; then
40 [[#ifndef __NO_MATH_INLINES
41 # define __NO_MATH_INLINES 1 /* for glibc */
48 double logb (double x);
54 if test "$LOGB_LIBM" = "?"; then