Fixed uninitialised FunBind fun_tick field
[ghc-hetmet.git] / aclocal.m4
index 619d414..86fdeaf 100644 (file)
@@ -4,6 +4,33 @@
 # ensure we don't clash with any pre-supplied autoconf ones.
 
 
+# FPTOOLS_FLOAT_WORD_ORDER_BIGENDIAN
+# ----------------------------------
+# Little endian Arm on Linux with some ABIs has big endian word order
+# in doubles. Define FLOAT_WORDS_BIGENDIAN if this is the case.
+AC_DEFUN([FPTOOLS_FLOAT_WORD_ORDER_BIGENDIAN],
+  [AC_CACHE_CHECK([whether float word order is big endian], [fptools_cv_float_word_order_bigendian],
+    [AC_COMPILE_IFELSE(
+      [AC_LANG_PROGRAM(
+        [#include <endian.h>],
+        [#if defined(__FLOAT_WORD_ORDER) && __FLOAT_WORD_ORDER == BIG_ENDIAN
+             return 0;
+         #else
+             not float word order big endian
+         #endif]
+      )],
+      [fptools_cv_float_word_order_bigendian=yes],
+      [fptools_cv_float_word_order_bigendian=no])
+    ])
+  case $fptools_cv_float_word_order_bigendian in
+      yes)
+          AC_DEFINE([FLOAT_WORDS_BIGENDIAN], 1,
+          [Define to 1 if your processor stores words of floats with
+           the most significant byte first]) ;;
+  esac
+])
+
+
 # FP_EVAL_STDERR(COMMAND)
 # -----------------------
 # Eval COMMAND, save its stderr (without lines resulting from shell tracing)
@@ -141,6 +168,10 @@ case $HostPlatform in
 alpha-dec-osf*) fptools_cv_leading_underscore=no;;
 *cygwin32) fptools_cv_leading_underscore=yes;;
 *mingw32) fptools_cv_leading_underscore=yes;;
+
+    # HACK: Apple doesn't seem to provide nlist in the 64-bit-libraries
+x86_64-apple-darwin*) fptools_cv_leading_underscore=yes;;
+
 *) AC_RUN_IFELSE([AC_LANG_SOURCE([[#ifdef HAVE_NLIST_H
 #include <nlist.h>
 struct nlist xYzzY1[] = {{"xYzzY1", 0},{0}};