dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
[
m4_divert_text([DEFAULTS], [gl_ceill_required=plain])
AC_REQUIRE([gl_MATH_H_DEFAULTS])
[
m4_divert_text([DEFAULTS], [gl_ceill_required=plain])
AC_REQUIRE([gl_MATH_H_DEFAULTS])
- AC_CHECK_DECLS([ceill], , , [#include <math.h>])
+ AC_CHECK_DECLS([ceill], , , [[#include <math.h>]])
- dnl No libraries are needed to link lib/ceill.c.
- CEILL_LIBM=
+ dnl Find libraries needed to link lib/ceill.c.
+ if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+ AC_REQUIRE([gl_FUNC_CEIL])
+ CEILL_LIBM="$CEIL_LIBM"
+ else
+ CEILL_LIBM=
+ fi