summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-02-25 05:09:34 -0800
committerKaz Kylheku <kaz@kylheku.com>2017-02-25 05:09:34 -0800
commit1aff5cbf9c7c79c1deb58d6b985f2bd03c51a4ba (patch)
tree9d542f46972db880d33217b508d0e24d34c1c8f4 /configure
parentcf555eb22101b02bca5c0818ca4864a5b823acbc (diff)
downloadtxr-1aff5cbf9c7c79c1deb58d6b985f2bd03c51a4ba.tar.gz
txr-1aff5cbf9c7c79c1deb58d6b985f2bd03c51a4ba.tar.bz2
txr-1aff5cbf9c7c79c1deb58d6b985f2bd03c51a4ba.zip
Adding round function.
* arith.c (round1): New static function. (roundiv): New function. * configure: New test for C99 round function. * eval.c (eval_init): Register round intrinsic. * txr.1: Documented.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure b/configure
index fe9aa954..7f7686df 100755
--- a/configure
+++ b/configure
@@ -2128,6 +2128,25 @@ else
printf "no\n"
fi
+printf "Checking for round ... "
+cat > conftest.c <<!
+#include <math.h>
+
+int main(void)
+{
+ double x = round(0.5);
+ return 0;
+}
+!
+if conftest ; then
+ printf "yes\n"
+ printf "#define HAVE_ROUND 1\n" >> $config_h
+else
+ printf "no\n"
+fi
+
+
+
printf "Checking for glob ... "
cat > conftest.c <<!