summaryrefslogtreecommitdiff
path: root/contrib/site-conf/m4
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@openmoko.org>2008-10-02 10:53:28 +0200
committerHolger Freyther <ich@tamarin.(none)>2008-10-15 18:53:36 +0200
commitb6c5a08721fab3e095377fa30e4eefceb078618c (patch)
treedd029d778cc4d41ca17b2e1230eda7b697c50879 /contrib/site-conf/m4
parentff30b7fe2e7a3d67ef28d30a0cf2c5442afdaa98 (diff)
[site-conf] Add the tests for the squeak vm
Diffstat (limited to 'contrib/site-conf/m4')
-rw-r--r--contrib/site-conf/m4/squeak.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/site-conf/m4/squeak.m4 b/contrib/site-conf/m4/squeak.m4
new file mode 100644
index 0000000000..9d16f468b4
--- /dev/null
+++ b/contrib/site-conf/m4/squeak.m4
@@ -0,0 +1,15 @@
+# Tests from squeak
+AC_DEFUN([AC_C_DOUBLE_ALIGNMENT],
+[AC_CACHE_CHECK([whether unaligned access to doubles is ok], ac_cv_double_align,
+ AC_TRY_RUN([f(int i){*(double *)i=*(double *)(i+4);}
+ int main(){char b[[12]];f(b);return 0;}],
+ ac_cv_double_align="yes", ac_cv_double_align="no"))
+test "$ac_cv_double_align" = "no" && AC_DEFINE(DOUBLE_WORD_ALIGNMENT)])
+
+AC_DEFUN([AC_C_DOUBLE_ORDER],
+[AC_CACHE_CHECK([whether doubles are stored in Squeak order], ac_cv_double_order,
+ AC_TRY_RUN([union { double d; int i[[2]]; } d;
+ int main(void) { d.d= 1.0; return d.i[[0]] == 0; }],
+ ac_cv_double_order="yes", ac_cv_double_order="no"))
+test "$ac_cv_double_order" = "no" && AC_DEFINE(DOUBLE_WORD_ORDER)])
+