changeset 15393:25847230f20e

look if round function exist in math.h & define HAVE_ROUND. patch by Steven M. Schultz <sms@2BSD.COM>
author nplourde
date Tue, 10 May 2005 00:38:46 +0000
parents f4d7886224cd
children d701716bfbbc
files configure
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Tue May 10 00:28:15 2005 +0000
+++ b/configure	Tue May 10 00:38:46 2005 +0000
@@ -2410,6 +2410,19 @@
 fi
 echores "$_lrintf"
 
+echocheck "round"
+cat > $TMPC << EOF
+#include <math.h>
+int main(void) { (void) round(0.0); return 0; }
+EOF
+_round=no
+cc_check $_ld_lm && _round=yes
+if test "$_round" = yes ; then
+  _def_round="#define HAVE_ROUND 1"
+else
+  _def_round="#undef HAVE_ROUND"
+fi
+echores "$_round"
 
 echocheck "nanosleep"
 # also check for nanosleep
@@ -7406,6 +7419,9 @@
 /* C99 lrintf function available */
 $_def_lrintf
 
+/* round function is available */
+$_def_round
+
 /* yes, we have inttypes.h */
 #define HAVE_INTTYPES_H 1