]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
isfinite-no-c++: Avoid unnecessary override of isfinite().
authorBruno Haible <bruno@clisp.org>
Tue, 3 Feb 2026 00:30:28 +0000 (01:30 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 3 Feb 2026 00:30:28 +0000 (01:30 +0100)
* m4/isfinite.m4 (gl_ISFINITEL_WORKS): Link the test program with -lm if
necessary.

ChangeLog
m4/isfinite.m4

index 6acf890d4daa461d54a020d8e3646eb31aabdacc..cb72d4f12e706ee93e16d68898cf7efe2b65f72c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-02-02  Bruno Haible  <bruno@clisp.org>
+
+       isfinite-no-c++: Avoid unnecessary override of isfinite().
+       * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Link the test program with -lm if
+       necessary.
+
 2026-01-29  Bruno Haible  <bruno@clisp.org>
 
        gettext: Partially update to gettext 1.0.
index 44d97aa3f09c9ca63485e64c9c66485257d9b64f..6515b648b699c6c04467506a6292618c7559abec 100644 (file)
@@ -1,5 +1,5 @@
 # isfinite.m4
-# serial 23
+# serial 24
 dnl Copyright (C) 2007-2026 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -53,6 +53,8 @@ AC_DEFUN([gl_ISFINITEL_WORKS],
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CACHE_CHECK([whether isfinite(long double) works], [gl_cv_func_isfinitel_works],
     [
+      saved_LIBS="$LIBS"
+      LIBS="$LIBS $ISFINITE_LIBM"
       AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <float.h>
 #include <limits.h>
@@ -176,5 +178,6 @@ int main ()
          *)                 gl_cv_func_isfinitel_works="guessing yes" ;;
        esac
       ])
+      LIBS="$saved_LIBS"
     ])
 ])