summaryrefslogtreecommitdiff
path: root/mcon/U/i_math.U
diff options
context:
space:
mode:
authorrmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d>2010-11-27 11:55:39 +0000
committerrmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d>2010-11-27 11:55:39 +0000
commit13158f86e3904284dce3dad36b64f07414459551 (patch)
tree12cc7b8d1b808c8c3505bb44cf067bd9ab98b1e6 /mcon/U/i_math.U
parent194d1db97053d853d5f81c362c461d71c05ea80e (diff)
Applied mega patch from Christian Biere to greatly improve feature detection
and make a huge step towards better support for cross-compiling. git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@34 2592e710-e01b-42a5-8df0-11608a6cc53d
Diffstat (limited to 'mcon/U/i_math.U')
-rw-r--r--mcon/U/i_math.U20
1 files changed, 19 insertions, 1 deletions
diff --git a/mcon/U/i_math.U b/mcon/U/i_math.U
index c3cd1d5..b2c15af 100644
--- a/mcon/U/i_math.U
+++ b/mcon/U/i_math.U
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:21:59 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:i_math: Inhdr
+?MAKE:i_math: Inhdr Trylink cat
?MAKE: -pick add $@ %<
?X: Are there really systems that *DON'T* have math.h?
?S:i_math:
@@ -32,3 +32,21 @@
set math.h i_math
eval $inhdr
+: see whether we need libm
+$cat >try.c <<EOC
+#$i_math I_MATH
+#ifdef I_MATH
+#include <math.h>
+#endif
+int main(void)
+{
+ static double ret;
+
+ ret += 1.2 * pow(1.2, 1.2);
+ ret += 1.2 * sqrt(ret);
+ return 0 != ret;
+}
+EOC
+set val '-lm'
+eval $trylink
+