Christian Weisgerber
2001-Mar-29 17:05 UTC
[vorbis-dev] libvorbis: NO_FLOAT_MATH_LIB patch
This is in response to NO_FLOAT_MATH_LIB not getting set on Solaris. The patchlet below - makes configure check for sqrtf(), - defines HAVE_SQRTF if sqrtf() has been found, - uses HAVE_SQRTF in lib/os.h. NO_FLOAT_MATH_LIB isn't used any longer. --- configure.in.orig Fri Mar 30 02:02:35 2001 +++ configure.in Fri Mar 30 02:10:16 2001 @@ -162,6 +162,7 @@ dnl ------------------------------------ AC_FUNC_ALLOCA AC_FUNC_MEMCMP +AC_CHECK_FUNCS(sqrtf) dnl -------------------------------------------------- dnl Do substitutions --- lib/os.h.orig Fri Mar 30 02:10:53 2001 +++ lib/os.h Fri Mar 30 02:13:07 2001 @@ -42,15 +42,7 @@ # define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b)) #endif -#ifndef __GNUC__ -# define NO_FLOAT_MATH_LIB -#endif - -#ifdef DARWIN -# define NO_FLOAT_MATH_LIB -#endif - -#ifndef NO_FLOAT_MATH_LIB +#ifdef HAVE_SQRTF # define sqrt sqrtf # define log logf # define exp expf -- Christian "naddy" Weisgerber naddy@mips.inka.de --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
> - makes configure check for sqrtf(), > - defines HAVE_SQRTF if sqrtf() has been found, > - uses HAVE_SQRTF in lib/os.h. > > NO_FLOAT_MATH_LIB isn't used any longer.This is no good. We really need the GNU semantics of the _f functions. And availability of sqrtf() is not enough to guarantee availability of all other _f functions... It seems no good, clean solution exists, safe from very longish configure testing with arcane test programs. Cheers, Segher --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Fri, Mar 30, 2001 at 01:05:22AM +0000, Christian Weisgerber wrote:> This is in response to NO_FLOAT_MATH_LIB not getting set on Solaris. > > The patchlet below > - makes configure check for sqrtf(), > - defines HAVE_SQRTF if sqrtf() has been found, > - uses HAVE_SQRTF in lib/os.h.Variant applied; some libcs have some but not all of the float versions of the libm functions. I check for each explicitly now. Monty --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.