X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=aclocal.m4;h=9d1e1cab9b0228665917e32a19228e3a63bd7ab7;hp=619d414fb947721a02384f759025047bc0ec90c4;hb=5802563c087b07be81b2e8b0130b5b2cf6c3297a;hpb=6153c763ec6d3dde482812eb871f485ec34a9f01 diff --git a/aclocal.m4 b/aclocal.m4 index 619d414..9d1e1ca 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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 ], + [#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)