| | 964 | |
| | 965 | # MPI_Aint was intended as an address-sized int. However, MPI didn't |
| | 966 | # specify this - MPI_Aint must be large enough to hold an address-sized |
| | 967 | # integer, but it can be larger. To get clean compilation in some places, |
| | 968 | # we need a pointer-sized integer. The following code looks for one. |
| | 969 | AC_CHECK_SIZEOF(void *,$CROSS_SIZEOF_VOID_P) |
| | 970 | AC_CHECK_SIZEOF(int,$CROSS_SIZEOF_INT) |
| | 971 | AC_CHECK_SIZEOF(long,$CROSS_SIZEOF_LONG) |
| | 972 | AC_CHECK_SIZEOF(long long,$CROSS_SIZEOF_LONG_LONG) |
| | 973 | AC_CHECK_SIZEOF(short,$CROSS_SIZEOF_SHORT) |
| | 974 | POINTERINT=MPI_Aint |
| | 975 | AC_MSG_CHECKING([for C integer type of address size]) |
| | 976 | for type in int long long_long short ; do |
| | 977 | eval len=\$ac_cv_sizeof_$type |
| | 978 | if test "$len" = "$ac_cv_sizeof_void_p" ; then |
| | 979 | POINTERINT=`echo $type | sed -e 's/_/ /'` |
| | 980 | break |
| | 981 | fi |
| | 982 | done |
| | 983 | AC_MSG_RESULT($POINTERINT) |
| | 984 | AC_DEFINE_UNQUOTED(POINTERINT_t,$POINTERINT,[POINTERINT_t is a pointer-sized integer]) |