ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/Unix/configure.ac
(Generate patch)

Comparing SheepShaver/src/Unix/configure.ac (file contents):
Revision 1.25 by gbeauche, 2005-06-14T06:35:00Z vs.
Revision 1.27 by gbeauche, 2005-06-22T15:37:25Z

# Line 347 | Line 347 | AC_CHECK_FUNCS(sigaction signal)
347   AC_CHECK_FUNCS(mmap mprotect munmap)
348   AC_CHECK_FUNCS(vm_allocate vm_deallocate vm_protect)
349   AC_CHECK_FUNCS(posix_memalign memalign valloc)
350 < AC_CHECK_FUNCS(exp2f log2f exp2 log2 trunc)
350 > AC_CHECK_FUNCS(exp2f log2f exp2 log2)
351 > AC_CHECK_FUNCS(floorf roundf ceilf truncf floor round ceil trunc)
352  
353   dnl Darwin seems to define mach_task_self() instead of task_self().
354   AC_CHECK_FUNCS(mach_task_self task_self)
# Line 999 | Line 1000 | EOF
1000   fi
1001   AC_MSG_RESULT($WANT_ADDRESSING_MODE)
1002  
1003 + dnl Utility macro used by next two tests.
1004 + dnl AC_EXAMINE_OBJECT(C source code,
1005 + dnl     commands examining object file,
1006 + dnl     [commands to run if compile failed]):
1007 + dnl
1008 + dnl Compile the source code to an object file; then convert it into a
1009 + dnl printable representation.  All unprintable characters and
1010 + dnl asterisks (*) are replaced by dots (.).  All white space is
1011 + dnl deleted.  Newlines (ASCII 0x10) in the input are preserved in the
1012 + dnl output, but runs of newlines are compressed to a single newline.
1013 + dnl Finally, line breaks are forcibly inserted so that no line is
1014 + dnl longer than 80 columns and the file ends with a newline.  The
1015 + dnl result of all this processing is in the file conftest.dmp, which
1016 + dnl may be examined by the commands in the second argument.
1017 + dnl
1018 + AC_DEFUN([gcc_AC_EXAMINE_OBJECT],
1019 + [AC_LANG_SAVE
1020 + AC_LANG_C
1021 + dnl Next bit cribbed from AC_TRY_COMPILE.
1022 + cat > conftest.$ac_ext <<EOF
1023 + [#line __oline__ "configure"
1024 + #include "confdefs.h"
1025 + $1
1026 + ]EOF
1027 + if AC_TRY_EVAL(ac_compile); then
1028 +  od -c conftest.o |
1029 +    sed ['s/^[0-7]*[    ]*/ /
1030 +          s/\*/./g
1031 +          s/ \\n/*/g
1032 +          s/ [0-9][0-9][0-9]/./g
1033 +          s/  \\[^ ]/./g'] |
1034 +    tr -d '
1035 + ' | tr -s '*' '
1036 + ' | fold | sed '$a\
1037 + ' > conftest.dmp
1038 +  $2
1039 + ifelse($3, , , else
1040 +  $3
1041 + )dnl
1042 + fi
1043 + rm -rf conftest*
1044 + AC_LANG_RESTORE])
1045 +
1046 + dnl Floating point format probe.
1047 + dnl The basic concept is the same as the above: grep the object
1048 + dnl file for an interesting string.  We have to watch out for
1049 + dnl rounding changing the values in the object, however; this is
1050 + dnl handled by ignoring the least significant byte of the float.
1051 + dnl
1052 + dnl Does not know about VAX G-float or C4x idiosyncratic format.
1053 + dnl It does know about PDP-10 idiosyncratic format, but this is
1054 + dnl not presently supported by GCC.  S/390 "binary floating point"
1055 + dnl is in fact IEEE (but maybe we should have that in EBCDIC as well
1056 + dnl as ASCII?)
1057 + dnl
1058 + AC_DEFUN([gcc_AC_C_FLOAT_FORMAT],
1059 + [AC_CACHE_CHECK(floating point format, ac_cv_c_float_format,
1060 + [gcc_AC_EXAMINE_OBJECT(
1061 + [/* This will not work unless sizeof(double) == 8.  */
1062 + extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
1063 +
1064 + /* This structure must have no internal padding.  */
1065 + struct possibility {
1066 +  char prefix[8];
1067 +  double candidate;
1068 +  char postfix[8];
1069 + };
1070 +
1071 + #define C(cand) { "\nformat:", cand, ":tamrof\n" }
1072 + struct possibility table [] =
1073 + {
1074 +  C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
1075 +  C( 3.53802595280598432000e+18), /* D__float - VAX */
1076 +  C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
1077 +  C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
1078 +  C(-5.22995989424860458374e+10)  /* IBMHEXFP - s/390 format, EBCDIC */
1079 + };],
1080 + [if   grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then
1081 +    ac_cv_c_float_format='IEEE (big-endian)'
1082 +  elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then
1083 +    ac_cv_c_float_format='IEEE (big-endian)'
1084 +  elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then
1085 +    ac_cv_c_float_format='IEEE (little-endian)'
1086 +  elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then
1087 +    ac_cv_c_float_format='IEEE (little-endian)'
1088 +  elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then
1089 +    ac_cv_c_float_format='VAX D-float'
1090 +  elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then
1091 +    ac_cv_c_float_format='PDP-10'
1092 +  elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then
1093 +    ac_cv_c_float_format='IBM 370 hex'
1094 +  else
1095 +    AC_MSG_ERROR(Unknown floating point format)
1096 +  fi],
1097 +  [AC_MSG_ERROR(compile failed)])
1098 + ])
1099 + # IEEE is the default format.  If the float endianness isn't the same
1100 + # as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN
1101 + # (which is a tristate: yes, no, default).  This is only an issue with
1102 + # IEEE; the other formats are only supported by a few machines each,
1103 + # all with the same endianness.
1104 + format=IEEE_FLOAT_FORMAT
1105 + fbigend=
1106 + case $ac_cv_c_float_format in
1107 +    'IEEE (big-endian)' )
1108 +        if test $ac_cv_c_bigendian = no; then
1109 +            fbigend=1
1110 +        fi
1111 +        ;;
1112 +    'IEEE (little-endian)' )
1113 +        if test $ac_cv_c_bigendian = yes; then
1114 +            fbigend=0
1115 +        fi
1116 +        ;;
1117 +    'VAX D-float' )
1118 +        format=VAX_FLOAT_FORMAT
1119 +        ;;
1120 +    'PDP-10' )
1121 +        format=PDP10_FLOAT_FORMAT
1122 +        ;;
1123 +    'IBM 370 hex' )
1124 +        format=IBM_FLOAT_FORMAT
1125 +        ;;
1126 + esac
1127 + AC_DEFINE_UNQUOTED(HOST_FLOAT_FORMAT, $format,
1128 +  [Define to the floating point format of the host machine.])
1129 + if test -n "$fbigend"; then
1130 +        AC_DEFINE_UNQUOTED(HOST_FLOAT_WORDS_BIG_ENDIAN, $fbigend,
1131 +  [Define to 1 if the host machine stores floating point numbers in
1132 +   memory with the word containing the sign bit at the lowest address,
1133 +   or to 0 if it does it the other way around.
1134 +
1135 +   This macro should not be defined if the ordering is the same as for
1136 +   multi-word integers.])
1137 + fi
1138 + ])
1139 +
1140 + dnl Check for host float format
1141 + gcc_AC_C_FLOAT_FORMAT
1142 +
1143   dnl Platform specific binary postprocessor
1144   AC_PATH_PROG(BLESS, "true")
1145   if [[ "x$ac_cv_pagezero_hack" = "xyes" ]]; then
# Line 1057 | Line 1198 | dnl CPU emulator sources
1198   if [[ "x$EMULATED_PPC" = "xyes" ]]; then
1199    CPUSRCS="\
1200      ../kpx_cpu/src/mathlib/ieeefp.cpp \
1201 +    ../kpx_cpu/src/mathlib/mathlib.cpp \
1202      ../kpx_cpu/src/cpu/ppc/ppc-cpu.cpp \
1203      ../kpx_cpu/src/cpu/ppc/ppc-decode.cpp \
1204      ../kpx_cpu/src/cpu/ppc/ppc-execute.cpp \
# Line 1097 | Line 1239 | if [[ "x$EMULATED_PPC" = "xyes" ]]; then
1239            done
1240          fi
1241        fi
1242 <      if [[ -z "$DYNGEN_CC" ]] || ! { echo '#include <limits>' | $DYNGEN_CC -xc++ -c -o /dev/null - >& /dev/null; }; then
1242 >      if [[ -z "$DYNGEN_CC" ]]; then
1243          ac_cv_use_dyngen=no
1244        fi
1245      ])

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines