Changeset 4584

Show
Ignore:
Timestamp:
05/16/09 17:45:35 (10 months ago)
Author:
gropp
Message:

Added tests to find a pointer-sized int to prepare for using this type instead of MPI_Aint

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • mpich2/trunk/test/mpi/configure.in

    r4576 r4584  
    962962    AC_DEFINE(HAVE_MPI_2DOUBLE_COMPLEX,1,[Define if MPI_2DOUBE_COMPLEX is available]) 
    963963fi 
     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. 
     969AC_CHECK_SIZEOF(void *,$CROSS_SIZEOF_VOID_P) 
     970AC_CHECK_SIZEOF(int,$CROSS_SIZEOF_INT) 
     971AC_CHECK_SIZEOF(long,$CROSS_SIZEOF_LONG) 
     972AC_CHECK_SIZEOF(long long,$CROSS_SIZEOF_LONG_LONG) 
     973AC_CHECK_SIZEOF(short,$CROSS_SIZEOF_SHORT) 
     974POINTERINT=MPI_Aint 
     975AC_MSG_CHECKING([for C integer type of address size]) 
     976for 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 
     982done 
     983AC_MSG_RESULT($POINTERINT) 
     984AC_DEFINE_UNQUOTED(POINTERINT_t,$POINTERINT,[POINTERINT_t is a pointer-sized integer]) 
    964985 
    965986# Find perl; used to create some of the tests from template and