X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=inline;f=m4%2Fceill.m4;h=5f56df32125d2b7d7445762888ef7abb56a26bf7;hb=refs%2Ftags%2Fstable%2F20111211;hp=6b56820926e3a4366c7c485c05bff2d2a8e2751b;hpb=e73e42a61d1dbf1a80ba2fd95fef2aa98de6f48b;p=gnulib.git diff --git a/m4/ceill.m4 b/m4/ceill.m4 index 6b5682092..5f56df321 100644 --- a/m4/ceill.m4 +++ b/m4/ceill.m4 @@ -1,4 +1,4 @@ -# ceill.m4 serial 10 +# ceill.m4 serial 12 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, @@ -8,10 +8,13 @@ AC_DEFUN([gl_FUNC_CEILL], [ m4_divert_text([DEFAULTS], [gl_ceill_required=plain]) AC_REQUIRE([gl_MATH_H_DEFAULTS]) + AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) + dnl Persuade glibc to declare ceill(). AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + dnl Test whether ceill() is declared. - AC_CHECK_DECLS([ceill], , , [#include ]) + AC_CHECK_DECLS([ceill], , , [[#include ]]) if test "$ac_cv_have_decl_ceill" = yes; then dnl Test whether ceill() can be used without libm. gl_FUNC_CEILL_LIBS @@ -60,8 +63,13 @@ int main (int argc, char *argv[]) HAVE_DECL_CEILL=0 fi if test $HAVE_DECL_CEILL = 0 || test $REPLACE_CEILL = 1; then - 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 fi AC_SUBST([CEILL_LIBM]) ])