annotate m4/mathfunc.m4 @ 16037:82a1361734d0

Extend gl_MATHFUNC. * m4/mathfunc.m4 (gl_MATHFUNC): Accept an 4th parameter of INCLUDES. Support 'void' as argument type. * m4/rint.m4 (gl_FUNC_RINT): Update gl_MATHFUNC invocation.
author Bruno Haible <bruno@clisp.org>
date Sun, 06 Nov 2011 02:14:43 +0100
parents 44cd3e1918b0
children 8250f2777afc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16037
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
1 # mathfunc.m4 serial 10
14079
97fc9a21a8fb maint: update almost all copyright ranges to include 2011
Jim Meyering <meyering@redhat.com>
parents: 13519
diff changeset
2 dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
12750
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
16037
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
7 # gl_MATHFUNC(FUNC, RETTYPE, PARAMTYPES [, INCLUDES] [, EXTRA-CODE])
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
8 # ------------------------------------------------------------------
12777
8e7ed08a499b Fix tests for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12750
diff changeset
9 # tests whether the function FUNC is available in libc or libm.
8e7ed08a499b Fix tests for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12750
diff changeset
10 # RETTYPE is the return type. PARAMTYPES is a parameter list, with parentheses.
8e7ed08a499b Fix tests for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12750
diff changeset
11 # It sets FUNC_LIBM to empty or "-lm" accordingly.
12750
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 AC_DEFUN([gl_MATHFUNC],
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 [
12777
8e7ed08a499b Fix tests for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12750
diff changeset
15 dnl We need the RETTYPE and PARAMTYPES in order to force linking with the
15930
44cd3e1918b0 rint: Determine RINT_LIBM correctly on AIX 7.
Bruno Haible <bruno@clisp.org>
parents: 15929
diff changeset
16 dnl function.
44cd3e1918b0 rint: Determine RINT_LIBM correctly on AIX 7.
Bruno Haible <bruno@clisp.org>
parents: 15929
diff changeset
17 dnl 1) With gcc >= 4.3 on glibc/x86_64, calls to the 'fabs' function
44cd3e1918b0 rint: Determine RINT_LIBM correctly on AIX 7.
Bruno Haible <bruno@clisp.org>
parents: 15929
diff changeset
18 dnl are inlined by the compiler, therefore linking of these calls does
44cd3e1918b0 rint: Determine RINT_LIBM correctly on AIX 7.
Bruno Haible <bruno@clisp.org>
parents: 15929
diff changeset
19 dnl not require -lm, but taking the function pointer of 'fabs' does.
44cd3e1918b0 rint: Determine RINT_LIBM correctly on AIX 7.
Bruno Haible <bruno@clisp.org>
parents: 15929
diff changeset
20 dnl 2) On MSVC 9, many math functions exist only as macros with arguments,
44cd3e1918b0 rint: Determine RINT_LIBM correctly on AIX 7.
Bruno Haible <bruno@clisp.org>
parents: 15929
diff changeset
21 dnl whereas the function pointer is undefined.
44cd3e1918b0 rint: Determine RINT_LIBM correctly on AIX 7.
Bruno Haible <bruno@clisp.org>
parents: 15929
diff changeset
22 dnl On the other hand, taking just the function pointer is not enough.
44cd3e1918b0 rint: Determine RINT_LIBM correctly on AIX 7.
Bruno Haible <bruno@clisp.org>
parents: 15929
diff changeset
23 dnl 1) On AIX 7.1, when 'long double' is 128 bit large ("xlc -qldbl128" or
44cd3e1918b0 rint: Determine RINT_LIBM correctly on AIX 7.
Bruno Haible <bruno@clisp.org>
parents: 15929
diff changeset
24 dnl "xlc -qlongdouble" or "gcc -mlong-double-128") many math functions
44cd3e1918b0 rint: Determine RINT_LIBM correctly on AIX 7.
Bruno Haible <bruno@clisp.org>
parents: 15929
diff changeset
25 dnl exist as macros with arguments, that may reference libm or even
44cd3e1918b0 rint: Determine RINT_LIBM correctly on AIX 7.
Bruno Haible <bruno@clisp.org>
parents: 15929
diff changeset
26 dnl completely undefined functions such as __rint128.
44cd3e1918b0 rint: Determine RINT_LIBM correctly on AIX 7.
Bruno Haible <bruno@clisp.org>
parents: 15929
diff changeset
27 dnl 2) In AIX 7.1 with gcc 4.2, when optimization is turned on, calls to
44cd3e1918b0 rint: Determine RINT_LIBM correctly on AIX 7.
Bruno Haible <bruno@clisp.org>
parents: 15929
diff changeset
28 dnl rint() with simple arguments are turned into rintf() calls by the
44cd3e1918b0 rint: Determine RINT_LIBM correctly on AIX 7.
Bruno Haible <bruno@clisp.org>
parents: 15929
diff changeset
29 dnl compiler. But while rint() is resides in libc, rintf() is in libm.
12750
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 m4_pushdef([func], [$1])
13396
a6b472aaadaf Prefer documented low-level autoconf macro names.
Bruno Haible <bruno@clisp.org>
parents: 12841
diff changeset
31 m4_pushdef([FUNC], [m4_translit([$1],[abcdefghijklmnopqrstuvwxyz],
a6b472aaadaf Prefer documented low-level autoconf macro names.
Bruno Haible <bruno@clisp.org>
parents: 12841
diff changeset
32 [ABCDEFGHIJKLMNOPQRSTUVWXYZ])])
15929
7649c55d7d4c mathfunc.m4: Refactor.
Bruno Haible <bruno@clisp.org>
parents: 15843
diff changeset
33 m4_pushdef([ARGS], [m4_bpatsubst(
7649c55d7d4c mathfunc.m4: Refactor.
Bruno Haible <bruno@clisp.org>
parents: 15843
diff changeset
34 [m4_bpatsubst(
7649c55d7d4c mathfunc.m4: Refactor.
Bruno Haible <bruno@clisp.org>
parents: 15843
diff changeset
35 [m4_bpatsubst(
7649c55d7d4c mathfunc.m4: Refactor.
Bruno Haible <bruno@clisp.org>
parents: 15843
diff changeset
36 [m4_bpatsubst(
7649c55d7d4c mathfunc.m4: Refactor.
Bruno Haible <bruno@clisp.org>
parents: 15843
diff changeset
37 [m4_bpatsubst(
7649c55d7d4c mathfunc.m4: Refactor.
Bruno Haible <bruno@clisp.org>
parents: 15843
diff changeset
38 [m4_bpatsubst(
7649c55d7d4c mathfunc.m4: Refactor.
Bruno Haible <bruno@clisp.org>
parents: 15843
diff changeset
39 [m4_bpatsubst(
7649c55d7d4c mathfunc.m4: Refactor.
Bruno Haible <bruno@clisp.org>
parents: 15843
diff changeset
40 [m4_bpatsubst(
16037
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
41 [m4_bpatsubst(
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
42 [$3],
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
43 [int \*], [&i_ret])],
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
44 [float \*], [&f_ret])],
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
45 [double \*], [&d_ret])],
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
46 [long double \*], [&l_ret])],
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
47 [int], [2])],
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
48 [float], [1.618034f])],
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
49 [long double], [1.618033988749894848L])],
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
50 [double], [1.6180339887])],
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
51 [void], [])])
12750
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 FUNC[]_LIBM=
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 AC_CACHE_CHECK([whether func() can be used without linking with libm],
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 [gl_cv_func_]func[_no_libm],
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55 [
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56 AC_LINK_IFELSE(
13513
fb8c08347f76 Correctly determine whether pow is available in libc on AIX 7 with xlc.
Bruno Haible <bruno@clisp.org>
parents: 13510
diff changeset
57 [AC_LANG_PROGRAM(
fb8c08347f76 Correctly determine whether pow is available in libc on AIX 7 with xlc.
Bruno Haible <bruno@clisp.org>
parents: 13510
diff changeset
58 [[#ifndef __NO_MATH_INLINES
fb8c08347f76 Correctly determine whether pow is available in libc on AIX 7 with xlc.
Bruno Haible <bruno@clisp.org>
parents: 13510
diff changeset
59 # define __NO_MATH_INLINES 1 /* for glibc */
fb8c08347f76 Correctly determine whether pow is available in libc on AIX 7 with xlc.
Bruno Haible <bruno@clisp.org>
parents: 13510
diff changeset
60 #endif
fb8c08347f76 Correctly determine whether pow is available in libc on AIX 7 with xlc.
Bruno Haible <bruno@clisp.org>
parents: 13510
diff changeset
61 #include <math.h>
16037
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
62 $4
13519
da9dc9b63c04 Oops, fix last commit so that it also works with modf().
Bruno Haible <bruno@clisp.org>
parents: 13513
diff changeset
63 $2 (*funcptr) $3 = ]func[;
15843
bc22a56bfa43 frexpf: Drop assumption about library that defines frexpf.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
64 int i_ret;
bc22a56bfa43 frexpf: Drop assumption about library that defines frexpf.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
65 float f_ret;
bc22a56bfa43 frexpf: Drop assumption about library that defines frexpf.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
66 double d_ret;
bc22a56bfa43 frexpf: Drop assumption about library that defines frexpf.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
67 long double l_ret;]],
15930
44cd3e1918b0 rint: Determine RINT_LIBM correctly on AIX 7.
Bruno Haible <bruno@clisp.org>
parents: 15929
diff changeset
68 [[$2 y = funcptr ]ARGS[ + ]func[ ]ARGS[;
16037
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
69 $5
13513
fb8c08347f76 Correctly determine whether pow is available in libc on AIX 7 with xlc.
Bruno Haible <bruno@clisp.org>
parents: 13510
diff changeset
70 return y < 0.3 || y > 1.7;
fb8c08347f76 Correctly determine whether pow is available in libc on AIX 7 with xlc.
Bruno Haible <bruno@clisp.org>
parents: 13510
diff changeset
71 ]])],
12750
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72 [gl_cv_func_]func[_no_libm=yes],
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
73 [gl_cv_func_]func[_no_libm=no])
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
74 ])
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
75 if test $gl_cv_func_[]func[]_no_libm = no; then
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
76 AC_CACHE_CHECK([whether func() can be used with libm],
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
77 [gl_cv_func_]func[_in_libm],
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
78 [
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
79 save_LIBS="$LIBS"
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
80 LIBS="$LIBS -lm"
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
81 AC_LINK_IFELSE(
13513
fb8c08347f76 Correctly determine whether pow is available in libc on AIX 7 with xlc.
Bruno Haible <bruno@clisp.org>
parents: 13510
diff changeset
82 [AC_LANG_PROGRAM(
fb8c08347f76 Correctly determine whether pow is available in libc on AIX 7 with xlc.
Bruno Haible <bruno@clisp.org>
parents: 13510
diff changeset
83 [[#ifndef __NO_MATH_INLINES
fb8c08347f76 Correctly determine whether pow is available in libc on AIX 7 with xlc.
Bruno Haible <bruno@clisp.org>
parents: 13510
diff changeset
84 # define __NO_MATH_INLINES 1 /* for glibc */
fb8c08347f76 Correctly determine whether pow is available in libc on AIX 7 with xlc.
Bruno Haible <bruno@clisp.org>
parents: 13510
diff changeset
85 #endif
fb8c08347f76 Correctly determine whether pow is available in libc on AIX 7 with xlc.
Bruno Haible <bruno@clisp.org>
parents: 13510
diff changeset
86 #include <math.h>
16037
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
87 $4
13519
da9dc9b63c04 Oops, fix last commit so that it also works with modf().
Bruno Haible <bruno@clisp.org>
parents: 13513
diff changeset
88 $2 (*funcptr) $3 = ]func[;
15843
bc22a56bfa43 frexpf: Drop assumption about library that defines frexpf.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
89 int i_ret;
bc22a56bfa43 frexpf: Drop assumption about library that defines frexpf.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
90 float f_ret;
bc22a56bfa43 frexpf: Drop assumption about library that defines frexpf.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
91 double d_ret;
bc22a56bfa43 frexpf: Drop assumption about library that defines frexpf.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
92 long double l_ret;]],
15930
44cd3e1918b0 rint: Determine RINT_LIBM correctly on AIX 7.
Bruno Haible <bruno@clisp.org>
parents: 15929
diff changeset
93 [[$2 y = funcptr ]ARGS[ + ]func[ ]ARGS[;
16037
82a1361734d0 Extend gl_MATHFUNC.
Bruno Haible <bruno@clisp.org>
parents: 15930
diff changeset
94 $5
13513
fb8c08347f76 Correctly determine whether pow is available in libc on AIX 7 with xlc.
Bruno Haible <bruno@clisp.org>
parents: 13510
diff changeset
95 return y < 0.3 || y > 1.7;
fb8c08347f76 Correctly determine whether pow is available in libc on AIX 7 with xlc.
Bruno Haible <bruno@clisp.org>
parents: 13510
diff changeset
96 ]])],
12750
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
97 [gl_cv_func_]func[_in_libm=yes],
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
98 [gl_cv_func_]func[_in_libm=no])
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
99 LIBS="$save_LIBS"
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
100 ])
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
101 if test $gl_cv_func_[]func[]_in_libm = yes; then
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
102 FUNC[]_LIBM=-lm
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
103 fi
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
104 fi
12777
8e7ed08a499b Fix tests for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12750
diff changeset
105 AC_SUBST(FUNC[_LIBM])
15929
7649c55d7d4c mathfunc.m4: Refactor.
Bruno Haible <bruno@clisp.org>
parents: 15843
diff changeset
106 m4_popdef([ARGS])
12750
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
107 m4_popdef([FUNC])
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
108 m4_popdef([func])
6b4859a7c820 New modules for common <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
109 ])
12841
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
110
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
111 # gl_COMMON_DOUBLE_MATHFUNC(FUNC)
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
112 # -------------------------------
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
113 # tests whether the function FUNC is available in libc or libm.
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
114 # It sets FUNC_LIBM to empty or "-lm" accordingly.
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
115 # FUNC must be one of the following functions, that are present on all systems
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
116 # and provided by libm on all systems except MacOS X, BeOS, Haiku:
13510
f8e55a0771f7 copysign: Does not require -lm on glibc systems.
Bruno Haible <bruno@clisp.org>
parents: 13396
diff changeset
117 # acos asin atan atan2 cbrt cos cosh erf erfc exp fmod hypot j0 j1 jn lgamma
f8e55a0771f7 copysign: Does not require -lm on glibc systems.
Bruno Haible <bruno@clisp.org>
parents: 13396
diff changeset
118 # log log10 log1p pow remainder sin sinh sqrt tan tanh y0 y1 yn
12841
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
119
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
120 AC_DEFUN([gl_COMMON_DOUBLE_MATHFUNC],
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
121 [
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
122 AC_REQUIRE([gl_COMMON_DOUBLE_MATHFUNC_TEST])
13396
a6b472aaadaf Prefer documented low-level autoconf macro names.
Bruno Haible <bruno@clisp.org>
parents: 12841
diff changeset
123 m4_pushdef([FUNC], [m4_translit([$1],[abcdefghijklmnopqrstuvwxyz],
a6b472aaadaf Prefer documented low-level autoconf macro names.
Bruno Haible <bruno@clisp.org>
parents: 12841
diff changeset
124 [ABCDEFGHIJKLMNOPQRSTUVWXYZ])])
12841
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
125 FUNC[]_LIBM="$POW_LIBM"
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
126 AC_SUBST(FUNC[_LIBM])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
127 m4_popdef([FUNC])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
128 ])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
129
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
130 AC_DEFUN([gl_COMMON_DOUBLE_MATHFUNC_TEST],
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
131 [
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
132 dnl We could use any of the following:
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
133 dnl gl_MATHFUNC([acos], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
134 dnl gl_MATHFUNC([asin], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
135 dnl gl_MATHFUNC([atan], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
136 dnl gl_MATHFUNC([atan2], [double], [(double, double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
137 dnl gl_MATHFUNC([cbrt], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
138 dnl gl_MATHFUNC([cos], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
139 dnl gl_MATHFUNC([cosh], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
140 dnl gl_MATHFUNC([erf], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
141 dnl gl_MATHFUNC([erfc], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
142 dnl gl_MATHFUNC([exp], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
143 dnl gl_MATHFUNC([fmod], [double], [(double, double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
144 dnl gl_MATHFUNC([hypot], [double], [(double, double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
145 dnl gl_MATHFUNC([j0], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
146 dnl gl_MATHFUNC([j1], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
147 dnl gl_MATHFUNC([jn], [double], [(int, double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
148 dnl gl_MATHFUNC([lgamma], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
149 dnl gl_MATHFUNC([log], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
150 dnl gl_MATHFUNC([log10], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
151 dnl gl_MATHFUNC([log1p], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
152 dnl gl_MATHFUNC([pow], [double], [(double, double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
153 dnl gl_MATHFUNC([remainder], [double], [(double, double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
154 dnl gl_MATHFUNC([sin], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
155 dnl gl_MATHFUNC([sinh], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
156 dnl gl_MATHFUNC([sqrt], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
157 dnl gl_MATHFUNC([tan], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
158 dnl gl_MATHFUNC([tanh], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
159 dnl gl_MATHFUNC([y0], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
160 dnl gl_MATHFUNC([y1], [double], [(double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
161 dnl gl_MATHFUNC([yn], [double], [(int, double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
162 gl_MATHFUNC([pow], [double], [(double, double)])
6ff1b1c23f57 Perform the same test for many <math.h> functions.
Bruno Haible <bruno@clisp.org>
parents: 12777
diff changeset
163 ])