summaryrefslogtreecommitdiff
path: root/m4/check-math-lib.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2012-03-08 01:26:03 +0100
committerBruno Haible <bruno@clisp.org>2012-03-08 01:52:49 +0100
commitc0ea2abaac8565cdf5331b43e1608df1f43f415f (patch)
tree4d04635797b805cc3529ae524712f9fcb5c08fc6 /m4/check-math-lib.m4
parent0d9ccdd3faa9b6f2e89ecaffe9f27aa88cc01258 (diff)
downloadgnulib-c0ea2abaac8565cdf5331b43e1608df1f43f415f.tar.gz
round: Don't override undeclared system function on IRIX 6.5.
* m4/check-math-lib.m4 (gl_CHECK_MATH_LIB): Accept an optional third argument. * m4/round.m4 (gl_FUNC_ROUND): Search for round() in the libraries also when it is not declared. Set HAVE_ROUND. For replacement code, test HAVE_ROUND, not HAVE_DECL_ROUND. * modules/round (configure.ac): For replacement code, test HAVE_ROUND, not HAVE_DECL_ROUND. (Depends-on): Update conditions. * modules/round-ieee (Depends-on): Update conditions. * doc/posix-functions/round.texi: Mention the IRIX problem.
Diffstat (limited to 'm4/check-math-lib.m4')
-rw-r--r--m4/check-math-lib.m45
1 files changed, 3 insertions, 2 deletions
diff --git a/m4/check-math-lib.m4 b/m4/check-math-lib.m4
index 0b77d8f6a0..4f370eb49f 100644
--- a/m4/check-math-lib.m4
+++ b/m4/check-math-lib.m4
@@ -1,10 +1,10 @@
-# check-math-lib.m4 serial 3
+# check-math-lib.m4 serial 4
dnl Copyright (C) 2007, 2009-2012 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 with or without modifications, as long as this notice is preserved.
dnl
-dnl gl_CHECK_MATH_LIB (VARIABLE, EXPRESSION)
+dnl gl_CHECK_MATH_LIB (VARIABLE, EXPRESSION [, EXTRA-CODE])
dnl
dnl Sets the shell VARIABLE according to the libraries needed by EXPRESSION
dnl to compile and link: to the empty string if no extra libraries are needed,
@@ -22,6 +22,7 @@ AC_DEFUN([gl_CHECK_MATH_LIB], [
# define __NO_MATH_INLINES 1 /* for glibc */
#endif
#include <math.h>
+ $3
double x;]],
[$2])],
[$1=$libm