2 dnl Copyright (C) 2007 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_TRUNC],
9 AC_REQUIRE([gl_MATH_H_DEFAULTS])
10 dnl Test whether trunc() is declared.
11 AC_CHECK_DECLS([trunc], , , [#include <math.h>])
12 if test "$ac_cv_have_decl_trunc" = yes; then
13 dnl Test whether trunc() can be used without libm.
16 #ifndef __NO_MATH_INLINES
17 # define __NO_MATH_INLINES 1 /* for glibc */
23 if test "$TRUNC_LIBM" = "?"; then
27 #ifndef __NO_MATH_INLINES
28 # define __NO_MATH_INLINES 1 /* for glibc */
36 if test "$TRUNC_LIBM" = "?"; then
44 AC_SUBST([HAVE_DECL_TRUNC])
45 AC_SUBST([TRUNC_LIBM])