Branch: Tag:

2000-03-28

2000-03-28 19:34:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Improved test for rint().

Rev: src/configure.in:1.359

1: - AC_REVISION("$Id: configure.in,v 1.358 2000/03/28 08:10:53 hubbe Exp $") + AC_REVISION("$Id: configure.in,v 1.359 2000/03/28 19:34:47 grubba Exp $")   AC_INIT(interpret.c)   AC_CONFIG_HEADER(machine.h)   
2191:   }   ]);   ######################################################################## + MY_CHECK_FUNCTION(fpsetround, + [ + #include <math.h> + #ifdef HAVE_FLOATINGPOINT_H + #include <floatingpoint.h> + #endif    -  + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif +  + #ifndef FP_RN + #define FP_RN 0 + #endif /* FP_RN */ +  + int main() + { +  fpsetround(FP_RN); +  exit(0); + } + ]); + ######################################################################## +    MY_CHECK_FUNCTION(dlopen,   [   #include <dlfcn.h>
2222:   MY_CHECK_FUNCTION(rint,   [   #include <math.h> + #ifdef HAVE_FLOATINGPOINT_H + #include <floatingpoint.h> + #endif +  + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif /* HAVE_IEEEFP_H */   int main()   { -  + #ifdef HAVE_FPSETROUND +  /* Round to nearest */ + #ifndef FP_RN + #define FP_RN 0 + #endif /* FP_RN */ +  fpsetround(FP_RN); + #endif /* HAVE_FPSETROUND */    if(rint(0.1) != 0.0 ||    rint(0.6) != 1.0) exit(1);    exit(0);