2 dnl Copyright (C) 2007, 2009, 2010 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_FLOOR],
9 dnl Test whether floor() can be used without libm.
11 if test "$FLOOR_LIBM" = "?"; then
14 AC_SUBST([FLOOR_LIBM])
17 # Determines the libraries needed to get the floor() function.
19 AC_DEFUN([gl_FUNC_FLOOR_LIBS],
21 gl_CACHE_VAL_SILENT([gl_cv_func_floor_libm], [
22 gl_cv_func_floor_libm=?
24 #ifndef __NO_MATH_INLINES
25 # define __NO_MATH_INLINES 1 /* for glibc */
30 [gl_cv_func_floor_libm=])
31 if test "$gl_cv_func_floor_libm" = "?"; then
35 #ifndef __NO_MATH_INLINES
36 # define __NO_MATH_INLINES 1 /* for glibc */
41 [gl_cv_func_floor_libm="-lm"])
45 FLOOR_LIBM="$gl_cv_func_floor_libm"