[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnulib-bug
Subject:    Re: [patch 1/4] Rename isnand.h to isnand-nolibm.h,
From:       Bruno Haible <bruno () clisp ! org>
Date:       2008-07-12 23:08:09
Message-ID: 200807130108.09363.bruno () clisp ! org
[Download RAW message or body]

> With those changes, I pushed this to the repository.

At a second glance, I could see a small improvement: When, say, the system's
isnsn(double) works and is in libc, but isnan(long double) does not work and
thus needs the replacement, the gnulib isnan will use entirely replaced and
therefore does not need libm. I'm applying this:


2008-07-12  Bruno Haible  <bruno@clisp.org>

	* m4/isnan.m4 (gl_ISNAN): When the replacement is used, set ISNAN_LIBM
	to empty.

--- m4/isnan.m4.orig	2008-07-13 01:03:57.000000000 +0200
+++ m4/isnan.m4	2008-07-13 01:01:34.000000000 +0200
@@ -1,4 +1,4 @@
-# isnan.m4 serial 1
+# isnan.m4 serial 2
 dnl Copyright (C) 2007-2008 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,9 +11,6 @@
   AC_REQUIRE([gl_FUNC_ISNAND])
   AC_REQUIRE([gl_FUNC_ISNANL])
 
-  ISNAN_LIBM="$ISNANF_LIBM $ISNAND_LIBM $ISNANL_LIBM"
-  AC_SUBST([ISNAN_LIBM])
-
   # If we replaced any of the underlying isnan* functions, replace
   # the isnan macro; it undoubtedly suffers from the same flaws.
   AC_MSG_CHECKING([whether isnan macro works])
@@ -21,12 +18,15 @@
      && test $gl_func_isnand = yes \
      && test $gl_func_isnanl = yes; then
     AC_MSG_RESULT([yes])
+    ISNAN_LIBM="$ISNANF_LIBM $ISNAND_LIBM $ISNANL_LIBM"
   else
+    AC_MSG_RESULT([no])
+    REPLACE_ISNAN=1
     # Make sure the rpl_isnan[fdl] functions get built.
     gl_BUILD_ISNANF
     gl_BUILD_ISNAND
     gl_BUILD_ISNANL
-    REPLACE_ISNAN=1
-    AC_MSG_RESULT([no])
+    ISNAN_LIBM=
   fi
+  AC_SUBST([ISNAN_LIBM])
 ])
--- m4/isnand.m4.orig	2008-07-13 01:03:57.000000000 +0200
+++ m4/isnand.m4	2008-07-13 00:59:53.000000000 +0200
@@ -41,7 +41,7 @@
   fi
 ])
 
-dnl Pull in replacement isnand definition.
+dnl Pull in replacement isnand definition. It does not need -lm.
 AC_DEFUN([gl_BUILD_ISNAND],
 [
   AC_LIBOBJ([isnand])
--- m4/isnanf.m4.orig	2008-07-13 01:03:57.000000000 +0200
+++ m4/isnanf.m4	2008-07-13 00:59:15.000000000 +0200
@@ -59,7 +59,7 @@
   fi
 ])
 
-dnl Pull in replacement isnanf definition.
+dnl Pull in replacement isnanf definition. It does not need -lm.
 AC_DEFUN([gl_BUILD_ISNANF],
 [
   AC_LIBOBJ([isnanf])
--- m4/isnanl.m4.orig	2008-07-13 01:03:57.000000000 +0200
+++ m4/isnanl.m4	2008-07-13 00:59:25.000000000 +0200
@@ -55,7 +55,7 @@
   fi
 ])
 
-dnl Pull in replacement isnanl definition.
+dnl Pull in replacement isnanl definition. It does not need -lm.
 AC_DEFUN([gl_BUILD_ISNANL],
 [
   AC_LIBOBJ([isnanl])




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic