1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
? acinclude_m4_macros.patch1.txt
? libm_configure_checks.patch1.txt
Index: src/config.h.in
===================================================================
RCS file: /cvsroot/pure-data/pd/src/config.h.in,v
retrieving revision 1.1
diff -u -r1.1 config.h.in
--- src/config.h.in 31 Dec 2005 00:59:49 -0000 1.1
+++ src/config.h.in 10 Jan 2008 03:04:02 -0000
@@ -1,5 +1,222 @@
+/* config.h.in. Generated from configure.in by autoheader. */
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+#undef CRAY_STACKSEG_END
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
#undef HAVE_ALLOCA_H
+/* Define this to indicate the ${ATAN2F_DESCRIP} library */
+#undef HAVE_ATAN2F
+
+/* Define to indicate the ${ATAN2F_DESCRIP} library version */
+#undef HAVE_ATAN2F_VERSION
+
+/* Define this to indicate the ${ATANF_DESCRIP} library */
+#undef HAVE_ATANF
+
+/* Define to indicate the ${ATANF_DESCRIP} library version */
+#undef HAVE_ATANF_VERSION
+
+/* Define to 1 if you have the <bstring.h> header file. */
+#undef HAVE_BSTRING_H
+
+/* Define this to indicate the ${COSF_DESCRIP} library */
+#undef HAVE_COSF
+
+/* Define to indicate the ${COSF_DESCRIP} library version */
+#undef HAVE_COSF_VERSION
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+#undef HAVE_DOPRNT
+
+/* Define this to indicate the ${EXPF_DESCRIP} library */
+#undef HAVE_EXPF
+
+/* Define to indicate the ${EXPF_DESCRIP} library version */
+#undef HAVE_EXPF_VERSION
+
+/* Define this to indicate the ${FABSF_DESCRIP} library */
+#undef HAVE_FABSF
+
+/* Define to indicate the ${FABSF_DESCRIP} library version */
+#undef HAVE_FABSF_VERSION
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `tcl84' library (-ltcl84). */
+#undef HAVE_LIBTCL84
+
+/* Define to 1 if you have the `tcl85' library (-ltcl85). */
+#undef HAVE_LIBTCL85
+
+/* Define to 1 if you have the `tcl8.0' library (-ltcl8.0). */
+#undef HAVE_LIBTCL8_0
+
+/* Define to 1 if you have the `tcl8.2' library (-ltcl8.2). */
+#undef HAVE_LIBTCL8_2
+
+/* Define to 1 if you have the `tcl8.3' library (-ltcl8.3). */
+#undef HAVE_LIBTCL8_3
+
+/* Define to 1 if you have the `tcl8.4' library (-ltcl8.4). */
+#undef HAVE_LIBTCL8_4
+
+/* Define to 1 if you have the `tcl8.5' library (-ltcl8.5). */
+#undef HAVE_LIBTCL8_5
+
+/* Define to 1 if you have the `tk84' library (-ltk84). */
+#undef HAVE_LIBTK84
+
+/* Define to 1 if you have the `tk85' library (-ltk85). */
+#undef HAVE_LIBTK85
+
+/* Define to 1 if you have the `tk8.0' library (-ltk8.0). */
+#undef HAVE_LIBTK8_0
+
+/* Define to 1 if you have the `tk8.2' library (-ltk8.2). */
+#undef HAVE_LIBTK8_2
+
+/* Define to 1 if you have the `tk8.3' library (-ltk8.3). */
+#undef HAVE_LIBTK8_3
+
+/* Define to 1 if you have the `tk8.4' library (-ltk8.4). */
+#undef HAVE_LIBTK8_4
+
+/* Define to 1 if you have the `tk8.5' library (-ltk8.5). */
+#undef HAVE_LIBTK8_5
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define this to indicate the ${LOGF_DESCRIP} library */
+#undef HAVE_LOGF
+
+/* Define to indicate the ${LOGF_DESCRIP} library version */
+#undef HAVE_LOGF_VERSION
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define this to indicate the ${POWF_DESCRIP} library */
+#undef HAVE_POWF
+
+/* Define to indicate the ${POWF_DESCRIP} library version */
+#undef HAVE_POWF_VERSION
+
+/* Define to 1 if you have the `select' function. */
+#undef HAVE_SELECT
+
+/* Define this to indicate the ${SINF_DESCRIP} library */
+#undef HAVE_SINF
+
+/* Define to indicate the ${SINF_DESCRIP} library version */
+#undef HAVE_SINF_VERSION
+
+/* Define to 1 if you have the `socket' function. */
+#undef HAVE_SOCKET
+
+/* Define this to indicate the ${SQRTF_DESCRIP} library */
+#undef HAVE_SQRTF
+
+/* Define to indicate the ${SQRTF_DESCRIP} library version */
+#undef HAVE_SQRTF_VERSION
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `vprintf' function. */
+#undef HAVE_VPRINTF
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#undef RETSIGTYPE
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at runtime.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
Index: src/configure.in
===================================================================
RCS file: /cvsroot/pure-data/pd/src/configure.in,v
retrieving revision 1.26
diff -u -r1.26 configure.in
--- src/configure.in 28 Dec 2007 03:43:02 -0000 1.26
+++ src/configure.in 10 Jan 2008 03:04:03 -0000
@@ -1,6 +1,8 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(d_arithmetic.c)
+AC_CONFIG_HEADER(config.h)
+
AC_SUBST(alsa, yes)
AC_SUBST(jack, no)
AC_SUBST(portaudio, no)
@@ -448,5 +450,15 @@
else mkdir ../bin
fi
+AST_EXT_LIB_CHECK([SINF], [m], [sinf])
+AST_EXT_LIB_CHECK([COSF], [m], [cosf])
+AST_EXT_LIB_CHECK([ATANF], [m], [atanf])
+AST_EXT_LIB_CHECK([ATAN2F], [m], [atan2f])
+AST_EXT_LIB_CHECK([SQRTF], [m], [sqrtf])
+AST_EXT_LIB_CHECK([LOGF], [m], [logf])
+AST_EXT_LIB_CHECK([EXPF], [m], [expf])
+AST_EXT_LIB_CHECK([FABSF], [m], [fabsf])
+AST_EXT_LIB_CHECK([POWF], [m], [powf])
+
AC_OUTPUT(makefile)
Index: src/x_arithmetic.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/x_arithmetic.c,v
retrieving revision 1.6
diff -u -r1.6 x_arithmetic.c
--- src/x_arithmetic.c 28 Dec 2007 03:43:06 -0000 1.6
+++ src/x_arithmetic.c 10 Jan 2008 03:04:03 -0000
@@ -6,20 +6,44 @@
done on floats; the logical and bitwise binops convert their
inputs to int and their outputs back to float. */
+#include "config.h"
+
#include "m_pd.h"
#include <math.h>
-
-/* MSW and OSX don't appear to have single-precision ANSI math */
-#if defined(MSW) || defined(__APPLE__)
+#if !defined(HAVE_SINF)
#define sinf sin
+#endif
+
+#if !defined(HAVE_COSF)
#define cosf cos
+#endif
+
+#if !defined(HAVE_ATANF)
#define atanf atan
+#endif
+
+#if !defined(HAVE_ATAN2F)
#define atan2f atan2
+#endif
+
+#if !defined(HAVE_SQRTF)
#define sqrtf sqrt
+#endif
+
+#if !defined(HAVE_LOGF)
#define logf log
+#endif
+
+#if !defined(HAVE_EXPF)
#define expf exp
+#endif
+
+#if !defined(HAVE_FABSF)
#define fabsf fabs
+#endif
+
+#if !defined(HAVE_POWF)
#define powf pow
#endif
|