aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Bryant <russellbryant@users.sourceforge.net>2008-01-10 03:30:27 +0000
committerRussell Bryant <russellbryant@users.sourceforge.net>2008-01-10 03:30:27 +0000
commit6adc1e3908b6a30dc4e25ecfc21e93782d63230a (patch)
tree12ad490f54b5afbb14460260dce6c2eecf7a3c7c
parent0589fa10763adc6e984f0b79bb7e6d087123063f (diff)
This commit adds configure script checking for a number of functions in
libm: - sinf, cosf, atanf, atan2f, ... Previously, in x_arithmetic.c, these functions were redefined for MSW / Apple. Now, they will only be redefined if the configure script does not find them. The results of the checks for these functions are placed in the config.h header file. The config.h.in file was generated using autoheader. (Note that this patch requires the inclusion of acinclude.m4. You must run aclocal before running autoconf to generate the configure script.) svn path=/trunk/; revision=9144
-rw-r--r--packages/patches/libm_configure_checks-0.41.0-test10.patch319
1 files changed, 319 insertions, 0 deletions
diff --git a/packages/patches/libm_configure_checks-0.41.0-test10.patch b/packages/patches/libm_configure_checks-0.41.0-test10.patch
new file mode 100644
index 00000000..6934e52c
--- /dev/null
+++ b/packages/patches/libm_configure_checks-0.41.0-test10.patch
@@ -0,0 +1,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
+