isfinite, isinf: Fix link error on AIX 6 and 7.
authorBruno Haible <bruno@clisp.org>
Sat, 18 Jun 2011 18:26:19 +0000 (20:26 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 18 Jun 2011 18:26:19 +0000 (20:26 +0200)
* m4/isfinite.m4 (gl_ISFINITE): When determining whether libm is
needed, also test the macro with a 'float' argument.
* m4/isinf.m4 (gl_ISINF): Likewise.

ChangeLog
m4/isfinite.m4
m4/isinf.m4

index 42588b4..9c9da31 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2011-06-18  Bruno Haible  <bruno@clisp.org>
 
+       isfinite, isinf: Fix link error on AIX 6 and 7.
+       * m4/isfinite.m4 (gl_ISFINITE): When determining whether libm is
+       needed, also test the macro with a 'float' argument.
+       * m4/isinf.m4 (gl_ISINF): Likewise.
+
+2011-06-18  Bruno Haible  <bruno@clisp.org>
+
        getloadavg: Don't clobber LIBS. Regression from previous commit.
        * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Move tests that use
        AC_CHECK_LIB from here...
index cc65da1..72dbcc6 100644 (file)
@@ -1,4 +1,4 @@
-# isfinite.m4 serial 9
+# isfinite.m4 serial 10
 dnl Copyright (C) 2007-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,
@@ -11,7 +11,8 @@ AC_DEFUN([gl_ISFINITE],
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   AC_CHECK_DECLS([isfinite], , , [#include <math.h>])
   if test "$ac_cv_have_decl_isfinite" = yes; then
-    gl_CHECK_MATH_LIB([ISFINITE_LIBM], [x = isfinite (x);])
+    gl_CHECK_MATH_LIB([ISFINITE_LIBM],
+     [x = isfinite (x) + isfinite ((float) x);])
     if test "$ISFINITE_LIBM" != missing; then
       dnl Test whether isfinite() on 'long double' works.
       gl_ISFINITEL_WORKS
index f6056e6..145e37e 100644 (file)
@@ -1,4 +1,4 @@
-# isinf.m4 serial 4
+# isinf.m4 serial 5
 dnl Copyright (C) 2007-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,
@@ -11,7 +11,7 @@ AC_DEFUN([gl_ISINF],
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   AC_CHECK_DECLS([isinf], , , [#include <math.h>])
   if test "$ac_cv_have_decl_isinf" = yes; then
-    gl_CHECK_MATH_LIB([ISINF_LIBM], [x = isinf (x);])
+    gl_CHECK_MATH_LIB([ISINF_LIBM], [x = isinf (x) + isinf ((float) x);])
     if test "$ISINF_LIBM" != missing; then
       dnl Test whether isinf() on 'long double' works.
       gl_ISINFL_WORKS