bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'round' modules takes 3


From: Bruno Haible
Subject: Re: 'round' modules takes 3
Date: Sun, 11 Nov 2007 14:16:47 +0100
User-agent: KMail/1.5.4

> >   2. use the gl_FUNC_FLOOR*_LIBS, gl_FUNC_CEIL*_LIBS macros introduced
> >      earlier today.

This implements this part.

2007-11-11  Bruno Haible  <address@hidden>

        * m4/roundf.m4 (gl_FUNC_ROUNDF): Use gl_FUNC_FLOORF_LIBS and
        gl_FUNC_CEILF_LIBS.
        * m4/round.m4 (gl_FUNC_ROUND): Use gl_FUNC_FLOOR_LIBS and
        gl_FUNC_CEIL_LIBS.
        * m4/roundl.m4 (gl_FUNC_ROUNDL): Use gl_FUNC_FLOORL_LIBS and
        gl_FUNC_CEILL_LIBS.
        * modules/roundf (Files): Add m4/floorf.m4, m4/ceilf.m4.
        * modules/round (Files): Add m4/floor.m4, m4/ceil.m4.
        * modules/roundl (Files): Add m4/floorl.m4, m4/ceill.m4.

--- m4/round.m4.orig    2007-11-11 14:13:51.000000000 +0100
+++ m4/round.m4 2007-11-11 14:10:17.000000000 +0100
@@ -16,6 +16,8 @@
   if test "$ac_cv_have_decl_round" != yes || test "$ROUND_LIBM" = missing; then
     REPLACE_ROUND=1
     AC_LIBOBJ([round])
-    gl_CHECK_MATH_LIB([ROUND_LIBM], [x = floor (x) + ceil (x);])
+    gl_FUNC_FLOOR_LIBS
+    gl_FUNC_CEIL_LIBS
+    ROUND_LIBM="$FLOOR_LIBM $CEIL_LIBM"
   fi
   AC_SUBST([ROUND_LIBM])])
--- m4/roundf.m4.orig   2007-11-11 14:13:51.000000000 +0100
+++ m4/roundf.m4        2007-11-11 14:11:05.000000000 +0100
@@ -19,10 +19,12 @@
     AC_CHECK_DECLS([ceilf, floorf], , , [#include <math.h>])
     if test "$ac_cv_have_decl_floorf" = yes \
        && test "$ac_cv_have_decl_ceilf" = yes; then
-      gl_CHECK_MATH_LIB([ROUNDF_LIBM], [x = floorf (x) + ceilf (x);])
-      if test "$ROUNDF_LIBM" != missing; then
+      gl_FUNC_FLOORF_LIBS
+      gl_FUNC_CEILF_LIBS
+      if test "$FLOORF_LIBM" != '?' && test "$CEILF_LIBM" != '?'; then
         AC_DEFINE([HAVE_FLOORF_AND_CEILF], 1,
           [Define if the both the floorf() and ceilf() functions exist.])
+        ROUNDF_LIBM="$FLOORF_LIBM $CEILF_LIBM"
       else
         ROUNDF_LIBM=
       fi
--- m4/roundl.m4.orig   2007-11-11 14:13:51.000000000 +0100
+++ m4/roundl.m4        2007-11-11 14:11:42.000000000 +0100
@@ -19,10 +19,12 @@
     AC_CHECK_DECLS([ceill, floorl], , , [#include <math.h>])
     if test "$ac_cv_have_decl_floorl" = yes \
        && test "$ac_cv_have_decl_ceill" = yes; then
-      gl_CHECK_MATH_LIB([ROUNDL_LIBM], [x = floorl (x) + ceill (x);])
-      if test "$ROUNDL_LIBM" != missing; then
+      gl_FUNC_FLOORL_LIBS
+      gl_FUNC_CEILL_LIBS
+      if test "$FLOORL_LIBM" != '?' && test "$CEILL_LIBM" != '?'; then
         AC_DEFINE([HAVE_FLOORL_AND_CEILL], 1,
           [Define if the both the floorl() and ceill() functions exist.])
+        ROUNDL_LIBM="$FLOORL_LIBM $CEILL_LIBM"
       else
         ROUNDL_LIBM=
       fi
--- modules/round.orig  2007-11-11 14:13:51.000000000 +0100
+++ modules/round       2007-11-11 14:13:32.000000000 +0100
@@ -5,6 +5,8 @@
 lib/round.c
 m4/check-math-lib.m4
 m4/round.m4
+m4/floor.m4
+m4/ceil.m4
 
 Depends-on:
 float
--- modules/roundf.orig 2007-11-11 14:13:51.000000000 +0100
+++ modules/roundf      2007-11-11 14:13:32.000000000 +0100
@@ -6,6 +6,8 @@
 lib/roundf.c
 m4/check-math-lib.m4
 m4/roundf.m4
+m4/floorf.m4
+m4/ceilf.m4
 
 Depends-on:
 float
--- modules/roundl.orig 2007-11-11 14:13:51.000000000 +0100
+++ modules/roundl      2007-11-11 14:13:33.000000000 +0100
@@ -6,6 +6,8 @@
 lib/roundl.c
 m4/check-math-lib.m4
 m4/roundl.m4
+m4/floorl.m4
+m4/ceill.m4
 
 Depends-on:
 float





reply via email to

[Prev in Thread] Current Thread [Next in Thread]