summaryrefslogtreecommitdiff
path: root/m4/round.m4
diff options
context:
space:
mode:
authorBen Pfaff <blp@cs.stanford.edu>2007-10-27 21:05:58 -0700
committerBen Pfaff <blp@cs.stanford.edu>2007-10-27 21:05:58 -0700
commitca45caaa07c9e69f791a8e93199aeafa181e7572 (patch)
tree03a3df5b7fd22fde518f57724d2e10179ac5eda8 /m4/round.m4
parent0e88f121165602cfc0885b41f03717e4eaf5910f (diff)
downloadgnulib-ca45caaa07c9e69f791a8e93199aeafa181e7572.tar.gz
Check whether round* exist in libraries, not just whether they are declared.
Diffstat (limited to 'm4/round.m4')
-rw-r--r--m4/round.m45
1 files changed, 3 insertions, 2 deletions
diff --git a/m4/round.m4 b/m4/round.m4
index 6e7e739d18..772fba3a5b 100644
--- a/m4/round.m4
+++ b/m4/round.m4
@@ -1,4 +1,4 @@
-# round.m4 serial 2
+# round.m4 serial 3
dnl Copyright (C) 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -12,7 +12,8 @@ AC_DEFUN([gl_FUNC_ROUND],
AC_CHECK_DECLS([round], , , [#include <math.h>])
if test "$ac_cv_have_decl_round" = yes; then
gl_CHECK_MATH_LIB([ROUND_LIBM], [x = round (x);])
- else
+ fi
+ if test "$ac_cv_have_decl_round" != yes || test "$ROUND_LIBM" = missing; then
gl_CHECK_MATH_LIB([ROUND_LIBM], [x = floor (x) + ceil (x);])
HAVE_DECL_ROUND=0
AC_LIBOBJ([round])