bug-gnulib
[Top][All Lists]
Advanced

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

split mathl module (was: Add some #undef's to math.in.h, for AIX with xl


From: Bruno Haible
Subject: split mathl module (was: Add some #undef's to math.in.h, for AIX with xlc.)
Date: Mon, 18 Jan 2010 01:27:17 +0100
User-agent: KMail/1.9.9

Hi Paolo,

Ralf Wildenhues wrote:
> AIX 5.3 needs a number of #undef's in math.in.h, in order to compile,

I don't want to consider Ralf's patch, because the 'mathl' module is broken
in so many respects that first a cleanup is needed. The problems with the
'mathl' module are:

  1) It provides functions from sqrtl to atanl all at once, without the
     ability to pick one without the other.

  2) If libm exists, it adds -lm to LIBS, with the effect that *all* programs
     in the package are linked against -lm.

  3) The code has strange '#if HAVE_SINL' and similar, whose effect it is to
     avoid compiling the same code into different compilation units.

  4) math.in.h tests HAVE_DECL_ASINL etc. but these variables are always set
     to 1, never to 0. The patch from
       <http://lists.gnu.org/archive/html/bug-gnulib/2007-03/msg00099.html>
     was completed for floorl and ceill, but incomplete regarding the other
     functions.

  5) There is a '#undef cosl' etc. unconditionally. These have the effect that
     when an installed library includes the 'cosl', 'logl', or 'sinl' modules,
     the symbol renaming (cosl -> libfoo_cosl etc.) will not work. The patches
       <http://lists.gnu.org/archive/html/bug-gnulib/2009-07/msg00100.html>
       <http://lists.gnu.org/archive/html/bug-gnulib/2009-07/msg00113.html>
     were not right.

  6) And now also a problem on AIX.

Here's a proposed patch, which seeks to fix 1) to 5). Ralf will need to
re-test on AIX.


2010-01-17  Bruno Haible  <address@hidden>

        New modules acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
        * lib/math.in.h (acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl,
        tanl): Use the standard gnulib idiom.
        * lib/cosl.c: Don't include trigl.c and sincosl.c.
        * lib/sinl.c: Likewise.
        * lib/tanl.c: Don't include trigl.c.
        (kernel_tanl): Make static.
        * lib/sincosl.c: Include trig.h first.
        * lib/trigl.c: Likewise.
        * m4/acosl.m4: New file.
        * m4/asinl.m4: New file.
        * m4/atanl.m4: New file.
        * m4/cosl.m4: New file.
        * m4/expl.m4: New file.
        * m4/logl.m4: New file.
        * m4/sinl.m4: New file.
        * m4/sqrtl.m4: New file.
        * m4/tanl.m4: New file.
        * m4/mathl.m4: Remove file.
        * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_* and HAVE_*
        variables for acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
        Don't initialize GNULIB_MATHL.
        * modules/acosl: New file.
        * modules/asinl: New file.
        * modules/atanl: New file.
        * modules/cosl: New file.
        * modules/expl: New file.
        * modules/logl: New file.
        * modules/sinl: New file.
        * modules/sqrtl: New file.
        * modules/tanl: New file.
        * modules/math (Makefile.am): Substitute GNULIB_* and HAVE_* variables
        for acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl. Don't
        substitute GNULIB_MATHL.
        * modules/mathl: Rewritten.

--- lib/cosl.c.orig     Mon Jan 18 01:05:44 2010
+++ lib/cosl.c  Sun Jan 17 23:41:01 2010
@@ -50,10 +50,6 @@
  */
 
 #include "trigl.h"
-#ifdef HAVE_SINL
-#include "trigl.c"
-#include "sincosl.c"
-#endif
 
 long double cosl(long double x)
 {
--- lib/math.in.h.orig  Mon Jan 18 01:05:44 2010
+++ lib/math.in.h       Mon Jan 18 01:03:33 2010
@@ -118,10 +118,11 @@
 #endif
 
 
-#if @GNULIB_MATHL@ || address@hidden@
+#if @GNULIB_ACOSL@
+# if address@hidden@ || address@hidden@
 extern long double acosl (long double x);
-#endif
-#if address@hidden@ && defined GNULIB_POSIXCHECK
+# endif
+#elif defined GNULIB_POSIXCHECK
 # undef acosl
 # define acosl(x) \
     (GL_LINK_WARNING ("acosl is unportable - " \
@@ -130,10 +131,11 @@
 #endif
 
 
-#if @GNULIB_MATHL@ || address@hidden@
+#if @GNULIB_ASINL@
+# if address@hidden@ || address@hidden@
 extern long double asinl (long double x);
-#endif
-#if address@hidden@ && defined GNULIB_POSIXCHECK
+# endif
+#elif defined GNULIB_POSIXCHECK
 # undef asinl
 # define asinl(x) \
     (GL_LINK_WARNING ("asinl is unportable - " \
@@ -142,10 +144,11 @@
 #endif
 
 
-#if @GNULIB_MATHL@ || address@hidden@
+#if @GNULIB_ATANL@
+# if address@hidden@ || address@hidden@
 extern long double atanl (long double x);
-#endif
-#if address@hidden@ && defined GNULIB_POSIXCHECK
+# endif
+#elif defined GNULIB_POSIXCHECK
 # undef atanl
 # define atanl(x) \
     (GL_LINK_WARNING ("atanl is unportable - " \
@@ -181,11 +184,15 @@
 #endif
 
 
-#if @GNULIB_MATHL@ || (address@hidden@ && !defined cosl)
-# undef cosl
+#if @GNULIB_COSL@
+# if address@hidden@
+#  undef cosl
+#  define cosl rpl_cosl
+# endif
+# if address@hidden@ || address@hidden@
 extern long double cosl (long double x);
-#endif
-#if address@hidden@ && defined GNULIB_POSIXCHECK
+# endif
+#elif defined GNULIB_POSIXCHECK
 # undef cosl
 # define cosl(x) \
     (GL_LINK_WARNING ("cosl is unportable - " \
@@ -194,10 +201,11 @@
 #endif
 
 
-#if @GNULIB_MATHL@ || address@hidden@
+#if @GNULIB_EXPL@
+# if address@hidden@ || address@hidden@
 extern long double expl (long double x);
-#endif
-#if address@hidden@ && defined GNULIB_POSIXCHECK
+# endif
+#elif defined GNULIB_POSIXCHECK
 # undef expl
 # define expl(x) \
     (GL_LINK_WARNING ("expl is unportable - " \
@@ -271,11 +279,15 @@
 #endif
 
 
-#if @GNULIB_MATHL@ || (address@hidden@ && !defined logl)
-# undef logl
+#if @GNULIB_LOGL@
+# if address@hidden@
+#  undef logl
+#  define logl rpl_logl
+# endif
+# if address@hidden@ || address@hidden@
 extern long double logl (long double x);
-#endif
-#if address@hidden@ && defined GNULIB_POSIXCHECK
+# endif
+#elif defined GNULIB_POSIXCHECK
 # undef logl
 # define logl(x) \
     (GL_LINK_WARNING ("logl is unportable - " \
@@ -327,11 +339,15 @@
 #endif
 
 
-#if @GNULIB_MATHL@ || (address@hidden@ && !defined sinl)
-# undef sinl
+#if @GNULIB_SINL@
+# if address@hidden@
+#  undef sinl
+#  define sinl rpl_sinl
+# endif
+# if address@hidden@ || address@hidden@
 extern long double sinl (long double x);
-#endif
-#if address@hidden@ && defined GNULIB_POSIXCHECK
+# endif
+#elif defined GNULIB_POSIXCHECK
 # undef sinl
 # define sinl(x) \
     (GL_LINK_WARNING ("sinl is unportable - " \
@@ -340,10 +356,11 @@
 #endif
 
 
-#if @GNULIB_MATHL@ || address@hidden@
+#if @GNULIB_SQRTL@
+# if address@hidden@ || address@hidden@
 extern long double sqrtl (long double x);
-#endif
-#if address@hidden@ && defined GNULIB_POSIXCHECK
+# endif
+#elif defined GNULIB_POSIXCHECK
 # undef sqrtl
 # define sqrtl(x) \
     (GL_LINK_WARNING ("sqrtl is unportable - " \
@@ -352,10 +369,11 @@
 #endif
 
 
-#if @GNULIB_MATHL@ || address@hidden@
+#if @GNULIB_TANL@
+# if address@hidden@ || address@hidden@
 extern long double tanl (long double x);
-#endif
-#if address@hidden@ && defined GNULIB_POSIXCHECK
+# endif
+#elif defined GNULIB_POSIXCHECK
 # undef tanl
 # define tanl(x) \
     (GL_LINK_WARNING ("tanl is unportable - " \
--- lib/sincosl.c.orig  Mon Jan 18 01:05:44 2010
+++ lib/sincosl.c       Sun Jan 17 23:10:44 2010
@@ -1,5 +1,5 @@
 /* Quad-precision floating point trigonometric functions on <-pi/4,pi/4>.
-   Copyright (C) 1999, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2006, 2007, 2009-2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <address@hidden>
 
@@ -19,9 +19,10 @@
 #include <config.h>
 
 /* Specification.  */
-#include <math.h>
+#include "trig.h"
 
 #include <float.h>
+#include <math.h>
 
 static const long double sin_c[] = {
 #define ONE sin_c[0]
--- lib/sinl.c.orig     Mon Jan 18 01:05:44 2010
+++ lib/sinl.c  Sun Jan 17 23:41:02 2010
@@ -50,8 +50,6 @@
  */
 
 #include "trigl.h"
-#include "trigl.c"
-#include "sincosl.c"
 
 long double
 sinl (long double x)
--- lib/tanl.c.orig     Mon Jan 18 01:05:44 2010
+++ lib/tanl.c  Sun Jan 17 23:42:10 2010
@@ -50,11 +50,6 @@
  */
 
 #include "trigl.h"
-#ifdef HAVE_SINL
-#ifdef HAVE_COSL
-#include "trigl.c"
-#endif
-#endif
 
 /*
  * ====================================================
@@ -120,7 +115,7 @@
   /* 1.000000000000000000000000000000000000000E0 */
 
 
-long double
+static long double
 kernel_tanl (long double x, long double y, int iy)
 {
   long double z, r, v, w, s, u, u1;
--- lib/trigl.c.orig    Mon Jan 18 01:05:44 2010
+++ lib/trigl.c Sun Jan 17 23:43:38 2010
@@ -1,5 +1,5 @@
 /* Quad-precision floating point argument reduction.
-   Copyright (C) 1999, 2007, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2007, 2009-2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <address@hidden>
 
@@ -19,9 +19,10 @@
 #include <config.h>
 
 /* Specification.  */
-#include <math.h>
+#include "trigl.h"
 
 #include <float.h>
+#include <math.h>
 
 /* Table of constants for 2/pi, 5628 hexadecimal digits of 2/pi */
 static const int two_over_pi[] = {
Changing permissions from . to 100644
--- m4/acosl.m4.orig    Tue Apr 14 12:31:40 2009
+++ m4/acosl.m4 Mon Jan 18 00:44:26 2010
@@ -0,0 +1,57 @@
+# acosl.m4 serial 1
+dnl Copyright (C) 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ACOSL],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  dnl Persuade glibc <math.h> to declare acosl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  ACOSL_LIBM=
+  AC_CACHE_CHECK([whether acosl() can be used without linking with libm],
+    [gl_cv_func_acosl_no_libm],
+    [
+      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                   # define __NO_MATH_INLINES 1 /* for glibc */
+                   #endif
+                   #include <math.h>
+                   long double x;],
+                  [return acosl (x) > 1;],
+        [gl_cv_func_acosl_no_libm=yes],
+        [gl_cv_func_acosl_no_libm=no])
+    ])
+  if test $gl_cv_func_acosl_no_libm = no; then
+    AC_CACHE_CHECK([whether acosl() can be used with libm],
+      [gl_cv_func_acosl_in_libm],
+      [
+        save_LIBS="$LIBS"
+        LIBS="$LIBS -lm"
+        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                     # define __NO_MATH_INLINES 1 /* for glibc */
+                     #endif
+                     #include <math.h>
+                     long double x;],
+                    [return acosl (x) > 1;],
+          [gl_cv_func_acosl_in_libm=yes],
+          [gl_cv_func_acosl_in_libm=no])
+        LIBS="$save_LIBS"
+      ])
+    if test $gl_cv_func_acosl_in_libm = yes; then
+      ACOSL_LIBM=-lm
+    fi
+  fi
+  if test $gl_cv_func_acosl_no_libm = yes \
+     || test $gl_cv_func_acosl_in_libm = yes; then
+    dnl Also check whether it's declared.
+    dnl MacOS X 10.3 has acosl() in libc but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([acosl], , [HAVE_DECL_ACOSL=0], [#include <math.h>])
+  else
+    HAVE_DECL_ACOSL=0
+    HAVE_ACOSL=0
+    AC_LIBOBJ([acosl])
+  fi
+  AC_SUBST([ACOSL_LIBM])
+])
Changing permissions from . to 100644
--- m4/asinl.m4.orig    Tue Apr 14 12:31:40 2009
+++ m4/asinl.m4 Mon Jan 18 00:44:27 2010
@@ -0,0 +1,57 @@
+# asinl.m4 serial 1
+dnl Copyright (C) 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ASINL],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  dnl Persuade glibc <math.h> to declare asinl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  ASINL_LIBM=
+  AC_CACHE_CHECK([whether asinl() can be used without linking with libm],
+    [gl_cv_func_asinl_no_libm],
+    [
+      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                   # define __NO_MATH_INLINES 1 /* for glibc */
+                   #endif
+                   #include <math.h>
+                   long double x;],
+                  [return asinl (x) > 1;],
+        [gl_cv_func_asinl_no_libm=yes],
+        [gl_cv_func_asinl_no_libm=no])
+    ])
+  if test $gl_cv_func_asinl_no_libm = no; then
+    AC_CACHE_CHECK([whether asinl() can be used with libm],
+      [gl_cv_func_asinl_in_libm],
+      [
+        save_LIBS="$LIBS"
+        LIBS="$LIBS -lm"
+        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                     # define __NO_MATH_INLINES 1 /* for glibc */
+                     #endif
+                     #include <math.h>
+                     long double x;],
+                    [return asinl (x) > 1;],
+          [gl_cv_func_asinl_in_libm=yes],
+          [gl_cv_func_asinl_in_libm=no])
+        LIBS="$save_LIBS"
+      ])
+    if test $gl_cv_func_asinl_in_libm = yes; then
+      ASINL_LIBM=-lm
+    fi
+  fi
+  if test $gl_cv_func_asinl_no_libm = yes \
+     || test $gl_cv_func_asinl_in_libm = yes; then
+    dnl Also check whether it's declared.
+    dnl MacOS X 10.3 has asinl() in libc but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([asinl], , [HAVE_DECL_ASINL=0], [#include <math.h>])
+  else
+    HAVE_DECL_ASINL=0
+    HAVE_ASINL=0
+    AC_LIBOBJ([asinl])
+  fi
+  AC_SUBST([ASINL_LIBM])
+])
Changing permissions from . to 100644
--- m4/atanl.m4.orig    Tue Apr 14 12:31:40 2009
+++ m4/atanl.m4 Mon Jan 18 00:44:27 2010
@@ -0,0 +1,57 @@
+# atanl.m4 serial 1
+dnl Copyright (C) 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ATANL],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  dnl Persuade glibc <math.h> to declare atanl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  ATANL_LIBM=
+  AC_CACHE_CHECK([whether atanl() can be used without linking with libm],
+    [gl_cv_func_atanl_no_libm],
+    [
+      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                   # define __NO_MATH_INLINES 1 /* for glibc */
+                   #endif
+                   #include <math.h>
+                   long double x;],
+                  [return atanl (x) > 1;],
+        [gl_cv_func_atanl_no_libm=yes],
+        [gl_cv_func_atanl_no_libm=no])
+    ])
+  if test $gl_cv_func_atanl_no_libm = no; then
+    AC_CACHE_CHECK([whether atanl() can be used with libm],
+      [gl_cv_func_atanl_in_libm],
+      [
+        save_LIBS="$LIBS"
+        LIBS="$LIBS -lm"
+        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                     # define __NO_MATH_INLINES 1 /* for glibc */
+                     #endif
+                     #include <math.h>
+                     long double x;],
+                    [return atanl (x) > 1;],
+          [gl_cv_func_atanl_in_libm=yes],
+          [gl_cv_func_atanl_in_libm=no])
+        LIBS="$save_LIBS"
+      ])
+    if test $gl_cv_func_atanl_in_libm = yes; then
+      ATANL_LIBM=-lm
+    fi
+  fi
+  if test $gl_cv_func_atanl_no_libm = yes \
+     || test $gl_cv_func_atanl_in_libm = yes; then
+    dnl Also check whether it's declared.
+    dnl MacOS X 10.3 has atanl() in libc but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([atanl], , [HAVE_DECL_ATANL=0], [#include <math.h>])
+  else
+    HAVE_DECL_ATANL=0
+    HAVE_ATANL=0
+    AC_LIBOBJ([atanl])
+  fi
+  AC_SUBST([ATANL_LIBM])
+])
Changing permissions from . to 100644
--- m4/cosl.m4.orig     Tue Apr 14 12:31:40 2009
+++ m4/cosl.m4  Mon Jan 18 00:44:27 2010
@@ -0,0 +1,59 @@
+# cosl.m4 serial 1
+dnl Copyright (C) 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_COSL],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  dnl Persuade glibc <math.h> to declare cosl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  COSL_LIBM=
+  AC_CACHE_CHECK([whether cosl() can be used without linking with libm],
+    [gl_cv_func_cosl_no_libm],
+    [
+      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                   # define __NO_MATH_INLINES 1 /* for glibc */
+                   #endif
+                   #include <math.h>
+                   long double x;],
+                  [return cosl (x) > 0.4;],
+        [gl_cv_func_cosl_no_libm=yes],
+        [gl_cv_func_cosl_no_libm=no])
+    ])
+  if test $gl_cv_func_cosl_no_libm = no; then
+    AC_CACHE_CHECK([whether cosl() can be used with libm],
+      [gl_cv_func_cosl_in_libm],
+      [
+        save_LIBS="$LIBS"
+        LIBS="$LIBS -lm"
+        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                     # define __NO_MATH_INLINES 1 /* for glibc */
+                     #endif
+                     #include <math.h>
+                     long double x;],
+                    [return cosl (x) > 0.4;],
+          [gl_cv_func_cosl_in_libm=yes],
+          [gl_cv_func_cosl_in_libm=no])
+        LIBS="$save_LIBS"
+      ])
+    if test $gl_cv_func_cosl_in_libm = yes; then
+      COSL_LIBM=-lm
+    fi
+  fi
+  if test $gl_cv_func_cosl_no_libm = yes \
+     || test $gl_cv_func_cosl_in_libm = yes; then
+    dnl Also check whether it's declared.
+    dnl MacOS X 10.3 has cosl() in libc but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([cosl], , [HAVE_DECL_COSL=0], [#include <math.h>])
+  else
+    HAVE_DECL_COSL=0
+    HAVE_COSL=0
+    AC_LIBOBJ([cosl])
+    AC_LIBOBJ([sincosl])
+    AC_LIBOBJ([trigl])
+  fi
+  AC_SUBST([COSL_LIBM])
+])
Changing permissions from . to 100644
--- m4/expl.m4.orig     Tue Apr 14 12:31:40 2009
+++ m4/expl.m4  Mon Jan 18 00:44:27 2010
@@ -0,0 +1,57 @@
+# expl.m4 serial 1
+dnl Copyright (C) 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_EXPL],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  dnl Persuade glibc <math.h> to declare expl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  EXPL_LIBM=
+  AC_CACHE_CHECK([whether expl() can be used without linking with libm],
+    [gl_cv_func_expl_no_libm],
+    [
+      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                   # define __NO_MATH_INLINES 1 /* for glibc */
+                   #endif
+                   #include <math.h>
+                   long double x;],
+                  [return expl (x) > 1.5;],
+        [gl_cv_func_expl_no_libm=yes],
+        [gl_cv_func_expl_no_libm=no])
+    ])
+  if test $gl_cv_func_expl_no_libm = no; then
+    AC_CACHE_CHECK([whether expl() can be used with libm],
+      [gl_cv_func_expl_in_libm],
+      [
+        save_LIBS="$LIBS"
+        LIBS="$LIBS -lm"
+        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                     # define __NO_MATH_INLINES 1 /* for glibc */
+                     #endif
+                     #include <math.h>
+                     long double x;],
+                    [return expl (x) > 1.5;],
+          [gl_cv_func_expl_in_libm=yes],
+          [gl_cv_func_expl_in_libm=no])
+        LIBS="$save_LIBS"
+      ])
+    if test $gl_cv_func_expl_in_libm = yes; then
+      EXPL_LIBM=-lm
+    fi
+  fi
+  if test $gl_cv_func_expl_no_libm = yes \
+     || test $gl_cv_func_expl_in_libm = yes; then
+    dnl Also check whether it's declared.
+    dnl MacOS X 10.3 has expl() in libc but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([expl], , [HAVE_DECL_EXPL=0], [#include <math.h>])
+  else
+    HAVE_DECL_EXPL=0
+    HAVE_EXPL=0
+    AC_LIBOBJ([expl])
+  fi
+  AC_SUBST([EXPL_LIBM])
+])
Changing permissions from . to 100644
--- m4/logl.m4.orig     Tue Apr 14 12:31:40 2009
+++ m4/logl.m4  Mon Jan 18 00:44:27 2010
@@ -0,0 +1,57 @@
+# logl.m4 serial 1
+dnl Copyright (C) 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_LOGL],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  dnl Persuade glibc <math.h> to declare logl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  LOGL_LIBM=
+  AC_CACHE_CHECK([whether logl() can be used without linking with libm],
+    [gl_cv_func_logl_no_libm],
+    [
+      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                   # define __NO_MATH_INLINES 1 /* for glibc */
+                   #endif
+                   #include <math.h>
+                   long double x;],
+                  [return logl (x) > 1;],
+        [gl_cv_func_logl_no_libm=yes],
+        [gl_cv_func_logl_no_libm=no])
+    ])
+  if test $gl_cv_func_logl_no_libm = no; then
+    AC_CACHE_CHECK([whether logl() can be used with libm],
+      [gl_cv_func_logl_in_libm],
+      [
+        save_LIBS="$LIBS"
+        LIBS="$LIBS -lm"
+        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                     # define __NO_MATH_INLINES 1 /* for glibc */
+                     #endif
+                     #include <math.h>
+                     long double x;],
+                    [return logl (x) > 1;],
+          [gl_cv_func_logl_in_libm=yes],
+          [gl_cv_func_logl_in_libm=no])
+        LIBS="$save_LIBS"
+      ])
+    if test $gl_cv_func_logl_in_libm = yes; then
+      LOGL_LIBM=-lm
+    fi
+  fi
+  if test $gl_cv_func_logl_no_libm = yes \
+     || test $gl_cv_func_logl_in_libm = yes; then
+    dnl Also check whether it's declared.
+    dnl MacOS X 10.3 has logl() in libc but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([logl], , [HAVE_DECL_LOGL=0], [#include <math.h>])
+  else
+    HAVE_DECL_LOGL=0
+    HAVE_LOGL=0
+    AC_LIBOBJ([logl])
+  fi
+  AC_SUBST([LOGL_LIBM])
+])
--- m4/math_h.m4.orig   Mon Jan 18 01:05:45 2010
+++ m4/math_h.m4        Mon Jan 18 00:46:13 2010
@@ -1,4 +1,4 @@
-# math_h.m4 serial 15
+# math_h.m4 serial 16
 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -46,8 +46,13 @@
 
 AC_DEFUN([gl_MATH_H_DEFAULTS],
 [
+  GNULIB_ACOSL=0;    AC_SUBST([GNULIB_ACOSL])
+  GNULIB_ASINL=0;    AC_SUBST([GNULIB_ASINL])
+  GNULIB_ATANL=0;    AC_SUBST([GNULIB_ATANL])
   GNULIB_CEILF=0;    AC_SUBST([GNULIB_CEILF])
   GNULIB_CEILL=0;    AC_SUBST([GNULIB_CEILL])
+  GNULIB_COSL=0;     AC_SUBST([GNULIB_COSL])
+  GNULIB_EXPL=0;     AC_SUBST([GNULIB_EXPL])
   GNULIB_FLOORF=0;   AC_SUBST([GNULIB_FLOORF])
   GNULIB_FLOORL=0;   AC_SUBST([GNULIB_FLOORL])
   GNULIB_FREXP=0;    AC_SUBST([GNULIB_FREXP])
@@ -59,18 +64,30 @@
   GNULIB_ISNAND=0;   AC_SUBST([GNULIB_ISNAND])
   GNULIB_ISNANL=0;   AC_SUBST([GNULIB_ISNANL])
   GNULIB_LDEXPL=0;   AC_SUBST([GNULIB_LDEXPL])
-  GNULIB_MATHL=0;    AC_SUBST([GNULIB_MATHL])
+  GNULIB_LOGL=0;     AC_SUBST([GNULIB_LOGL])
   GNULIB_ROUND=0;    AC_SUBST([GNULIB_ROUND])
   GNULIB_ROUNDF=0;   AC_SUBST([GNULIB_ROUNDF])
   GNULIB_ROUNDL=0;   AC_SUBST([GNULIB_ROUNDL])
   GNULIB_SIGNBIT=0;  AC_SUBST([GNULIB_SIGNBIT])
+  GNULIB_SINL=0;     AC_SUBST([GNULIB_SINL])
+  GNULIB_SQRTL=0;    AC_SUBST([GNULIB_SQRTL])
+  GNULIB_TANL=0;     AC_SUBST([GNULIB_TANL])
   GNULIB_TRUNC=0;    AC_SUBST([GNULIB_TRUNC])
   GNULIB_TRUNCF=0;   AC_SUBST([GNULIB_TRUNCF])
   GNULIB_TRUNCL=0;   AC_SUBST([GNULIB_TRUNCL])
   dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_ACOSL=1;                AC_SUBST([HAVE_ACOSL])
+  HAVE_ASINL=1;                AC_SUBST([HAVE_ASINL])
+  HAVE_ATANL=1;                AC_SUBST([HAVE_ATANL])
+  HAVE_COSL=1;                 AC_SUBST([HAVE_COSL])
+  HAVE_EXPL=1;                 AC_SUBST([HAVE_EXPL])
   HAVE_ISNANF=1;               AC_SUBST([HAVE_ISNANF])
   HAVE_ISNAND=1;               AC_SUBST([HAVE_ISNAND])
   HAVE_ISNANL=1;               AC_SUBST([HAVE_ISNANL])
+  HAVE_LOGL=1;                 AC_SUBST([HAVE_LOGL])
+  HAVE_SINL=1;                 AC_SUBST([HAVE_SINL])
+  HAVE_SQRTL=1;                AC_SUBST([HAVE_SQRTL])
+  HAVE_TANL=1;                 AC_SUBST([HAVE_TANL])
   HAVE_DECL_ACOSL=1;           AC_SUBST([HAVE_DECL_ACOSL])
   HAVE_DECL_ASINL=1;           AC_SUBST([HAVE_DECL_ASINL])
   HAVE_DECL_ATANL=1;           AC_SUBST([HAVE_DECL_ATANL])
Changing permissions from 100644 to .
--- m4/mathl.m4.orig    Mon Jan 18 01:05:45 2010
+++ m4/mathl.m4 Tue Apr 14 12:31:40 2009
@@ -1,13 +0,0 @@
-# mathl.m4 serial 5
-dnl Copyright (c) 2003, 2007, 2009, 2010 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_FUNC_LONG_DOUBLE_MATH], [
-
-AC_CHECK_LIB([m], [atan])
-AC_REPLACE_FUNCS(floorl ceill sqrtl asinl acosl atanl \
-        logl expl tanl sinl cosl)
-
-])
Changing permissions from . to 100644
--- m4/sinl.m4.orig     Tue Apr 14 12:31:40 2009
+++ m4/sinl.m4  Mon Jan 18 00:44:28 2010
@@ -0,0 +1,59 @@
+# sinl.m4 serial 1
+dnl Copyright (C) 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_SINL],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  dnl Persuade glibc <math.h> to declare sinl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  SINL_LIBM=
+  AC_CACHE_CHECK([whether sinl() can be used without linking with libm],
+    [gl_cv_func_sinl_no_libm],
+    [
+      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                   # define __NO_MATH_INLINES 1 /* for glibc */
+                   #endif
+                   #include <math.h>
+                   long double x;],
+                  [return sinl (x) > 0.4;],
+        [gl_cv_func_sinl_no_libm=yes],
+        [gl_cv_func_sinl_no_libm=no])
+    ])
+  if test $gl_cv_func_sinl_no_libm = no; then
+    AC_CACHE_CHECK([whether sinl() can be used with libm],
+      [gl_cv_func_sinl_in_libm],
+      [
+        save_LIBS="$LIBS"
+        LIBS="$LIBS -lm"
+        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                     # define __NO_MATH_INLINES 1 /* for glibc */
+                     #endif
+                     #include <math.h>
+                     long double x;],
+                    [return sinl (x) > 0.4;],
+          [gl_cv_func_sinl_in_libm=yes],
+          [gl_cv_func_sinl_in_libm=no])
+        LIBS="$save_LIBS"
+      ])
+    if test $gl_cv_func_sinl_in_libm = yes; then
+      SINL_LIBM=-lm
+    fi
+  fi
+  if test $gl_cv_func_sinl_no_libm = yes \
+     || test $gl_cv_func_sinl_in_libm = yes; then
+    dnl Also check whether it's declared.
+    dnl MacOS X 10.3 has sinl() in libc but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([sinl], , [HAVE_DECL_SINL=0], [#include <math.h>])
+  else
+    HAVE_DECL_SINL=0
+    HAVE_SINL=0
+    AC_LIBOBJ([sinl])
+    AC_LIBOBJ([sincosl])
+    AC_LIBOBJ([trigl])
+  fi
+  AC_SUBST([SINL_LIBM])
+])
Changing permissions from . to 100644
--- m4/sqrtl.m4.orig    Tue Apr 14 12:31:40 2009
+++ m4/sqrtl.m4 Mon Jan 18 00:44:28 2010
@@ -0,0 +1,57 @@
+# sqrtl.m4 serial 1
+dnl Copyright (C) 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_SQRTL],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  dnl Persuade glibc <math.h> to declare sqrtl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  SQRTL_LIBM=
+  AC_CACHE_CHECK([whether sqrtl() can be used without linking with libm],
+    [gl_cv_func_sqrtl_no_libm],
+    [
+      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                   # define __NO_MATH_INLINES 1 /* for glibc */
+                   #endif
+                   #include <math.h>
+                   long double x;],
+                  [return sqrtl (x) > 0.4;],
+        [gl_cv_func_sqrtl_no_libm=yes],
+        [gl_cv_func_sqrtl_no_libm=no])
+    ])
+  if test $gl_cv_func_sqrtl_no_libm = no; then
+    AC_CACHE_CHECK([whether sqrtl() can be used with libm],
+      [gl_cv_func_sqrtl_in_libm],
+      [
+        save_LIBS="$LIBS"
+        LIBS="$LIBS -lm"
+        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                     # define __NO_MATH_INLINES 1 /* for glibc */
+                     #endif
+                     #include <math.h>
+                     long double x;],
+                    [return sqrtl (x) > 0.4;],
+          [gl_cv_func_sqrtl_in_libm=yes],
+          [gl_cv_func_sqrtl_in_libm=no])
+        LIBS="$save_LIBS"
+      ])
+    if test $gl_cv_func_sqrtl_in_libm = yes; then
+      SQRTL_LIBM=-lm
+    fi
+  fi
+  if test $gl_cv_func_sqrtl_no_libm = yes \
+     || test $gl_cv_func_sqrtl_in_libm = yes; then
+    dnl Also check whether it's declared.
+    dnl MacOS X 10.3 has sqrtl() in libc but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([sqrtl], , [HAVE_DECL_SQRTL=0], [#include <math.h>])
+  else
+    HAVE_DECL_SQRTL=0
+    HAVE_SQRTL=0
+    AC_LIBOBJ([sqrtl])
+  fi
+  AC_SUBST([SQRTL_LIBM])
+])
Changing permissions from . to 100644
--- m4/tanl.m4.orig     Tue Apr 14 12:31:40 2009
+++ m4/tanl.m4  Mon Jan 18 00:44:28 2010
@@ -0,0 +1,58 @@
+# tanl.m4 serial 1
+dnl Copyright (C) 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_TANL],
+[
+  AC_REQUIRE([gl_MATH_H_DEFAULTS])
+  dnl Persuade glibc <math.h> to declare tanl().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  TANL_LIBM=
+  AC_CACHE_CHECK([whether tanl() can be used without linking with libm],
+    [gl_cv_func_tanl_no_libm],
+    [
+      AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                   # define __NO_MATH_INLINES 1 /* for glibc */
+                   #endif
+                   #include <math.h>
+                   long double x;],
+                  [return tanl (x) > 0.4;],
+        [gl_cv_func_tanl_no_libm=yes],
+        [gl_cv_func_tanl_no_libm=no])
+    ])
+  if test $gl_cv_func_tanl_no_libm = no; then
+    AC_CACHE_CHECK([whether tanl() can be used with libm],
+      [gl_cv_func_tanl_in_libm],
+      [
+        save_LIBS="$LIBS"
+        LIBS="$LIBS -lm"
+        AC_TRY_LINK([#ifndef __NO_MATH_INLINES
+                     # define __NO_MATH_INLINES 1 /* for glibc */
+                     #endif
+                     #include <math.h>
+                     long double x;],
+                    [return tanl (x) > 0.4;],
+          [gl_cv_func_tanl_in_libm=yes],
+          [gl_cv_func_tanl_in_libm=no])
+        LIBS="$save_LIBS"
+      ])
+    if test $gl_cv_func_tanl_in_libm = yes; then
+      TANL_LIBM=-lm
+    fi
+  fi
+  if test $gl_cv_func_tanl_no_libm = yes \
+     || test $gl_cv_func_tanl_in_libm = yes; then
+    dnl Also check whether it's declared.
+    dnl MacOS X 10.3 has tanl() in libc but doesn't declare it in <math.h>.
+    AC_CHECK_DECL([tanl], , [HAVE_DECL_TANL=0], [#include <math.h>])
+  else
+    HAVE_DECL_TANL=0
+    HAVE_TANL=0
+    AC_LIBOBJ([tanl])
+    AC_LIBOBJ([trigl])
+  fi
+  AC_SUBST([TANL_LIBM])
+])
Changing permissions from . to 100644
--- modules/acosl.orig  Tue Apr 14 12:31:40 2009
+++ modules/acosl       Mon Jan 18 00:00:22 2010
@@ -0,0 +1,30 @@
+Description:
+acosl() function: inverse cosine function with long double argument.
+
+Files:
+lib/acosl.c
+m4/acosl.m4
+
+Depends-on:
+math
+extensions
+asinl
+sqrtl
+
+configure.ac:
+gl_FUNC_ACOSL
+gl_MATH_MODULE_INDICATOR([acosl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(ACOSL_LIBM)
+
+License:
+GPL
+
+Maintainer:
+Paolo Bonzini
Changing permissions from . to 100644
--- modules/asinl.orig  Tue Apr 14 12:31:40 2009
+++ modules/asinl       Mon Jan 18 00:00:22 2010
@@ -0,0 +1,29 @@
+Description:
+asinl() function: inverse sine function with long double argument.
+
+Files:
+lib/asinl.c
+m4/asinl.m4
+
+Depends-on:
+math
+extensions
+sqrtl
+
+configure.ac:
+gl_FUNC_ASINL
+gl_MATH_MODULE_INDICATOR([asinl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(ASINL_LIBM)
+
+License:
+GPL
+
+Maintainer:
+Paolo Bonzini
Changing permissions from . to 100644
--- modules/atanl.orig  Tue Apr 14 12:31:40 2009
+++ modules/atanl       Mon Jan 18 00:00:23 2010
@@ -0,0 +1,29 @@
+Description:
+atanl() function: inverse tangent function with long double argument.
+
+Files:
+lib/atanl.c
+m4/atanl.m4
+
+Depends-on:
+math
+extensions
+isnanl
+
+configure.ac:
+gl_FUNC_ATANL
+gl_MATH_MODULE_INDICATOR([atanl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(ATANL_LIBM)
+
+License:
+GPL
+
+Maintainer:
+Paolo Bonzini
Changing permissions from . to 100644
--- modules/cosl.orig   Tue Apr 14 12:31:40 2009
+++ modules/cosl        Mon Jan 18 00:00:23 2010
@@ -0,0 +1,33 @@
+Description:
+cosl() function: cosine function with long double argument.
+
+Files:
+lib/cosl.c
+lib/trigl.h
+lib/sincosl.c
+lib/trigl.c
+m4/cosl.m4
+
+Depends-on:
+math
+extensions
+float
+isnanl
+
+configure.ac:
+gl_FUNC_COSL
+gl_MATH_MODULE_INDICATOR([cosl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(ACOSL_LIBM)
+
+License:
+GPL
+
+Maintainer:
+Paolo Bonzini
Changing permissions from . to 100644
--- modules/expl.orig   Tue Apr 14 12:31:40 2009
+++ modules/expl        Mon Jan 18 00:00:23 2010
@@ -0,0 +1,30 @@
+Description:
+expl() function: exponential function with long double argument.
+
+Files:
+lib/expl.c
+m4/expl.m4
+
+Depends-on:
+math
+extensions
+float
+floorl
+
+configure.ac:
+gl_FUNC_EXPL
+gl_MATH_MODULE_INDICATOR([expl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(EXPL_LIBM)
+
+License:
+GPL
+
+Maintainer:
+Paolo Bonzini
Changing permissions from . to 100644
--- modules/logl.orig   Tue Apr 14 12:31:40 2009
+++ modules/logl        Mon Jan 18 00:00:23 2010
@@ -0,0 +1,31 @@
+Description:
+logl() function: logarithm with long double argument.
+
+Files:
+lib/logl.c
+m4/logl.m4
+
+Depends-on:
+math
+extensions
+frexpl
+isnanl
+floorl
+
+configure.ac:
+gl_FUNC_LOGL
+gl_MATH_MODULE_INDICATOR([logl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(LOGL_LIBM)
+
+License:
+GPL
+
+Maintainer:
+Paolo Bonzini
--- modules/math.orig   Mon Jan 18 01:05:45 2010
+++ modules/math        Mon Jan 18 00:47:13 2010
@@ -25,8 +25,13 @@
          sed -e 
's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 
's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \
+             -e 's|@''GNULIB_ACOSL''@|$(GNULIB_ACOSL)|g' \
+             -e 's|@''GNULIB_ASINL''@|$(GNULIB_ASINL)|g' \
+             -e 's|@''GNULIB_ATANL''@|$(GNULIB_ATANL)|g' \
              -e 's|@''GNULIB_CEILF''@|$(GNULIB_CEILF)|g' \
              -e 's|@''GNULIB_CEILL''@|$(GNULIB_CEILL)|g' \
+             -e 's|@''GNULIB_COSL''@|$(GNULIB_COSL)|g' \
+             -e 's|@''GNULIB_EXPL''@|$(GNULIB_EXPL)|g' \
              -e 's|@''GNULIB_FLOORF''@|$(GNULIB_FLOORF)|g' \
              -e 's|@''GNULIB_FLOORL''@|$(GNULIB_FLOORL)|g' \
              -e 's|@''GNULIB_FREXP''@|$(GNULIB_FREXP)|g' \
@@ -38,17 +43,29 @@
              -e 's|@''GNULIB_ISNAND''@|$(GNULIB_ISNAND)|g' \
              -e 's|@''GNULIB_ISNANL''@|$(GNULIB_ISNANL)|g' \
              -e 's|@''GNULIB_LDEXPL''@|$(GNULIB_LDEXPL)|g' \
-             -e 's|@''GNULIB_MATHL''@|$(GNULIB_MATHL)|g' \
+             -e 's|@''GNULIB_LOGL''@|$(GNULIB_LOGL)|g' \
              -e 's|@''GNULIB_ROUND''@|$(GNULIB_ROUND)|g' \
              -e 's|@''GNULIB_ROUNDF''@|$(GNULIB_ROUNDF)|g' \
              -e 's|@''GNULIB_ROUNDL''@|$(GNULIB_ROUNDL)|g' \
              -e 's|@''GNULIB_SIGNBIT''@|$(GNULIB_SIGNBIT)|g' \
+             -e 's|@''GNULIB_SINL''@|$(GNULIB_SINL)|g' \
+             -e 's|@''GNULIB_SQRTL''@|$(GNULIB_SQRTL)|g' \
+             -e 's|@''GNULIB_TANL''@|$(GNULIB_TANL)|g' \
              -e 's|@''GNULIB_TRUNC''@|$(GNULIB_TRUNC)|g' \
              -e 's|@''GNULIB_TRUNCF''@|$(GNULIB_TRUNCF)|g' \
              -e 's|@''GNULIB_TRUNCL''@|$(GNULIB_TRUNCL)|g' \
+             -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \
+             -e 's|@''HAVE_ASINL''@|$(HAVE_ASINL)|g' \
+             -e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \
+             -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \
+             -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \
              -e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \
              -e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \
              -e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \
+             -e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \
+             -e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \
+             -e 's|@''HAVE_SQRTL''@|$(HAVE_SQRTL)|g' \
+             -e 's|@''HAVE_TANL''@|$(HAVE_TANL)|g' \
              -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \
              -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \
              -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \
--- modules/mathl.orig  Mon Jan 18 01:05:45 2010
+++ modules/mathl       Mon Jan 18 00:07:00 2010
@@ -2,35 +2,35 @@
 C99 functions for transcendental functions with long double arguments.
 
 Files:
-lib/acosl.c
-lib/asinl.c
-lib/atanl.c
-lib/cosl.c
-lib/expl.c
-lib/logl.c
-lib/sincosl.c
-lib/sinl.c
-lib/sqrtl.c
-lib/tanl.c
-lib/trigl.c
-lib/trigl.h
-m4/mathl.m4
 
 Depends-on:
-float
-math
-frexpl
-isnanl
-ldexpl
 floorl
 ceill
+acosl
+asinl
+atanl
+cosl
+expl
+logl
+sinl
+sqrtl
+tanl
 
 configure.ac:
-gl_FUNC_LONG_DOUBLE_MATH
-gl_MATH_MODULE_INDICATOR([mathl])
+AC_REQUIRE([gl_FUNC_FLOORL])
+AC_REQUIRE([gl_FUNC_CEILL])
+AC_REQUIRE([gl_FUNC_ACOSL])
+AC_REQUIRE([gl_FUNC_ASINL])
+AC_REQUIRE([gl_FUNC_ATANL])
+AC_REQUIRE([gl_FUNC_COSL])
+AC_REQUIRE([gl_FUNC_EXPL])
+AC_REQUIRE([gl_FUNC_LOGL])
+AC_REQUIRE([gl_FUNC_SINL])
+AC_REQUIRE([gl_FUNC_SQRTL])
+AC_REQUIRE([gl_FUNC_TANL])
+LIBS="$LIBS $FLOORL_LIBM $CEILL_LIBM $ACOSL_LIBM $ASINL_LIBM $ATANL_LIBM 
$ACOSL_LIBM $EXPL_LIBM $LOGL_LIBM $SINL_LIBM $SQRTL_LIBM $TANL_LIBM"
 
 Makefile.am:
-noinst_HEADERS += trigl.h trigl.c sincosl.c
 
 Include:
 <math.h>
Changing permissions from . to 100644
--- modules/sinl.orig   Tue Apr 14 12:31:40 2009
+++ modules/sinl        Mon Jan 18 00:00:24 2010
@@ -0,0 +1,33 @@
+Description:
+sinl() function: sine function with long double argument.
+
+Files:
+lib/sinl.c
+lib/trigl.h
+lib/sincosl.c
+lib/trigl.c
+m4/sinl.m4
+
+Depends-on:
+math
+extensions
+float
+isnanl
+
+configure.ac:
+gl_FUNC_SINL
+gl_MATH_MODULE_INDICATOR([sinl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(SINL_LIBM)
+
+License:
+GPL
+
+Maintainer:
+Paolo Bonzini
Changing permissions from . to 100644
--- modules/sqrtl.orig  Tue Apr 14 12:31:40 2009
+++ modules/sqrtl       Mon Jan 18 00:00:24 2010
@@ -0,0 +1,32 @@
+Description:
+sqrtl() function: square root with long double argument.
+
+Files:
+lib/sqrtl.c
+m4/sqrtl.m4
+
+Depends-on:
+math
+extensions
+float
+isnanl
+frexpl
+ldexpl
+
+configure.ac:
+gl_FUNC_SQRTL
+gl_MATH_MODULE_INDICATOR([sqrtl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(SQRTL_LIBM)
+
+License:
+GPL
+
+Maintainer:
+Paolo Bonzini
Changing permissions from . to 100644
--- modules/tanl.orig   Tue Apr 14 12:31:40 2009
+++ modules/tanl        Mon Jan 18 00:00:24 2010
@@ -0,0 +1,32 @@
+Description:
+tanl() function: tangent function with long double argument.
+
+Files:
+lib/tanl.c
+lib/trigl.h
+lib/trigl.c
+m4/tanl.m4
+
+Depends-on:
+math
+extensions
+float
+isnanl
+
+configure.ac:
+gl_FUNC_TANL
+gl_MATH_MODULE_INDICATOR([tanl])
+
+Makefile.am:
+
+Include:
+<math.h>
+
+Link:
+$(TANL_LIBM)
+
+License:
+GPL
+
+Maintainer:
+Paolo Bonzini




reply via email to

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