From c8228c7d1f864908fd64cd47eefb418e419da549 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 18 Jun 2011 20:26:19 +0200 Subject: [PATCH] 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. --- ChangeLog | 7 +++++++ m4/isfinite.m4 | 5 +++-- m4/isinf.m4 | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 42588b4f7..9c9da3125 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2011-06-18 Bruno Haible + 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 + getloadavg: Don't clobber LIBS. Regression from previous commit. * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Move tests that use AC_CHECK_LIB from here... diff --git a/m4/isfinite.m4 b/m4/isfinite.m4 index cc65da133..72dbcc645 100644 --- a/m4/isfinite.m4 +++ b/m4/isfinite.m4 @@ -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 ]) 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 diff --git a/m4/isinf.m4 b/m4/isinf.m4 index f6056e610..145e37e66 100644 --- a/m4/isinf.m4 +++ b/m4/isinf.m4 @@ -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 ]) 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 -- 2.11.0