diff options
author | Stephen Paul Weber <singpolyma@singpolyma.net> | 2013-01-07 16:50:34 -0500 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2013-01-16 13:50:13 +0000 |
commit | 171f6386a630c66bba5bd3f8d7d62302c9e2d3e2 (patch) | |
tree | 6d3341212af90d47fb3ce6fd71aeec8016704db1 /libraries/base/aclocal.m4 | |
parent | 6c0743c4a6a5b6816e288a9bdeddf68a3dceca11 (diff) | |
download | haskell-171f6386a630c66bba5bd3f8d7d62302c9e2d3e2.tar.gz |
Possible fix for detecting Float/Double
Diffstat (limited to 'libraries/base/aclocal.m4')
-rw-r--r-- | libraries/base/aclocal.m4 | 74 |
1 files changed, 36 insertions, 38 deletions
diff --git a/libraries/base/aclocal.m4 b/libraries/base/aclocal.m4 index 6e9801fbc8..a038de84e2 100644 --- a/libraries/base/aclocal.m4 +++ b/libraries/base/aclocal.m4 @@ -126,49 +126,47 @@ AC_DEFUN([FPTOOLS_CHECK_HTYPE_ELSE],[ AC_CACHE_VAL(AC_CV_NAME,[ AC_CV_NAME_supported=yes FP_COMPUTE_INT([HTYPE_IS_INTEGRAL], - [(($1)((int)(($1)1.4))) == (($1)1.4)], - [FPTOOLS_HTYPE_INCLUDES],[AC_CV_NAME_supported=no]) - if test "$AC_CV_NAME_supported" = "yes" + [($1)1.4], + [FPTOOLS_HTYPE_INCLUDES],[HTYPE_IS_INTEGRAL=0]) + + if test "$HTYPE_IS_INTEGRAL" -eq 0 then - if test "$HTYPE_IS_INTEGRAL" -eq 0 + FP_COMPUTE_INT([HTYPE_IS_FLOAT],[sizeof($1) == sizeof(float)], + [FPTOOLS_HTYPE_INCLUDES], + [AC_CV_NAME_supported=no]) + FP_COMPUTE_INT([HTYPE_IS_DOUBLE],[sizeof($1) == sizeof(double)], + [FPTOOLS_HTYPE_INCLUDES], + [AC_CV_NAME_supported=no]) + FP_COMPUTE_INT([HTYPE_IS_LDOUBLE],[sizeof($1) == sizeof(long double)], + [FPTOOLS_HTYPE_INCLUDES], + [AC_CV_NAME_supported=no]) + if test "$HTYPE_IS_FLOAT" -eq 1 + then + AC_CV_NAME=Float + elif test "$HTYPE_IS_DOUBLE" -eq 1 then - FP_COMPUTE_INT([HTYPE_IS_FLOAT],[sizeof($1) == sizeof(float)], - [FPTOOLS_HTYPE_INCLUDES], - [AC_CV_NAME_supported=no]) - FP_COMPUTE_INT([HTYPE_IS_DOUBLE],[sizeof($1) == sizeof(double)], - [FPTOOLS_HTYPE_INCLUDES], - [AC_CV_NAME_supported=no]) - FP_COMPUTE_INT([HTYPE_IS_LDOUBLE],[sizeof($1) == sizeof(long double)], - [FPTOOLS_HTYPE_INCLUDES], - [AC_CV_NAME_supported=no]) - if test "$HTYPE_IS_FLOAT" -eq 1 - then - AC_CV_NAME=Float - elif test "$HTYPE_IS_DOUBLE" -eq 1 - then - AC_CV_NAME=Double - elif test "$HTYPE_IS_LDOUBLE" -eq 1 - then - AC_CV_NAME=LDouble - else - AC_CV_NAME_supported=no - fi + AC_CV_NAME=Double + elif test "$HTYPE_IS_LDOUBLE" -eq 1 + then + AC_CV_NAME=LDouble else - FP_COMPUTE_INT([HTYPE_IS_SIGNED],[(($1)(-1)) < (($1)0)], - [FPTOOLS_HTYPE_INCLUDES], - [AC_CV_NAME_supported=no]) - FP_COMPUTE_INT([HTYPE_SIZE],[sizeof($1) * 8], - [FPTOOLS_HTYPE_INCLUDES], - [AC_CV_NAME_supported=no]) - if test "$HTYPE_IS_SIGNED" -eq 0 - then - AC_CV_NAME="Word$HTYPE_SIZE" - else - AC_CV_NAME="Int$HTYPE_SIZE" - fi + AC_CV_NAME_supported=no + fi + else + FP_COMPUTE_INT([HTYPE_IS_SIGNED],[(($1)(-1)) < (($1)0)], + [FPTOOLS_HTYPE_INCLUDES], + [AC_CV_NAME_supported=no]) + FP_COMPUTE_INT([HTYPE_SIZE],[sizeof($1) * 8], + [FPTOOLS_HTYPE_INCLUDES], + [AC_CV_NAME_supported=no]) + if test "$HTYPE_IS_SIGNED" -eq 0 + then + AC_CV_NAME="Word$HTYPE_SIZE" + else + AC_CV_NAME="Int$HTYPE_SIZE" fi fi - ]) + ]) if test "$AC_CV_NAME_supported" = no then $2 |