1
1

Adding test for MPI_Offset. Also introducing an if statement to check for the size of MPI_Fint only when f77 is present. Else MPI_Fint is defined to be an int.

This commit was SVN r470.
Этот коммит содержится в:
Prabhanjan Kambadur 2004-01-19 01:33:03 +00:00
родитель f0ce16ad10
Коммит 6bd87098ba

Просмотреть файл

@ -98,7 +98,6 @@ AC_CANONICAL_HOST
LAM_CONFIGURE_OPTIONS
############################################################################
# Libtool: part one
# (before C compiler setup)
@ -222,16 +221,14 @@ LAM_SETUP_CXX
LAM_SETUP_F77
if test -n "$F77"; then
LAM_F77_FIND_EXT_SYMBOL_CONVENTION($F77)
fi
# checking the sizeof fortran interger. This is needed to define
# MPI_Fint. This is needed for C bindings and hence there is no
# bearing of --enable-fortran flag on this test.
#
LAM_SIZEOF_FORTRAN_INT=0
LAM_GET_SIZEOF_FORTRAN_TYPE(INTEGER, LAM_SIZEOF_FORTRAN_INT)
#AC_DEFINE_UNQUOTED(LAM_SIZEOF_FORTRAN_INT, $LAM_SIZEOF_FORTRAN_INT,
# [Size of fortran INTEGER])
fi
LAM_SETUP_F90
@ -296,7 +293,11 @@ lam_show_title "System-specific tests"
# similary ac_cv_type_int64_t=yes. Similarly the values
# of ac_cv_sizeof_int will contain the size of int and later
# this will be #defined to SIZEOF_INT.
# NOTE:
# This test should be carried out ONLY if there is a f77 compiler
# available. Else we should default to MPI_Fint being an int.
#
if test -n "$F77"; then
MPI_FINT_TYPE="not found"
AC_MSG_CHECKING([checking for type of MPI_Fint])
if test "$LAM_SIZEOF_FORTRAN_INT" = 4 ; then
@ -311,7 +312,7 @@ elif test "$LAM_SIZEOF_FORTRAN_INT" = 8 ; then
elif test "$ac_cv_type_long_long" = "yes" -a "$ac_cv_sizeof_long_long" = 8; then
MPI_FINT_TYPE="long long"
elif test "$ac_cv_sizeof_long" = 8; then
MPI_FINT_TYPE="long long"
MPI_FINT_TYPE="long"
elif test "$ac_cv_sizeof_int" = 8 ; then
MPI_FINT_TYPE=int
fi
@ -322,6 +323,43 @@ if test "$MPI_FINT_TYPE" = "not found"; then
AC_MSG_ERROR([Cannot continue])
fi
AC_DEFINE_UNQUOTED(MPI_Fint, $MPI_FINT_TYPE, [Type of MPI_Fint])
else
AC_MSG_WARN([*** WARNING: Could not detect a f77 compiler. MPI_fint will be defined as an int])
MPI_FINT_TYPE=int
AC_DEFINE_UNQUOTED(MPI_Fint, $MPI_FINT_TYPE, [Type of MPI_Fint])
fi
#
# Test to determine type of MPI_Offset. This is searched in the following order
# int64_t, long long, long, int. If none of these are 8 bytes, then we should
# search for int32_t, long long, long, int.
#
MPI_OFFSET_TYPE="not found"
AC_MSG_CHECKING([checking for type of MPI_Offset])
if test "$ac_cv_type_int64_t" == "yes"; then
MPI_OFFSET_TYPE=int64_t
elif test "$ac_cv_type_long_long_t" == "yes" -a "$ac_cv_sizeof_long_long" = 8; then
MPI_OFFSET_TYPE="long long"
elif test "$ac_cv_type_long_t" == "yes" -a "$ac_cv_sizeof_long" = 8; then
MPI_OFFSET_TYPE="long"
elif test "ac_cv_sizeof_int" = 8; then
MPI_OFFSET_TYPE=int
elif test "$ac_cv_type_int32_t" == "yes"; then
MPI_OFFSET_TYPE=int32_t
elif test "$ac_cv_type_long_long_t" == "yes" -a "$ac_cv_sizeof_long_long" = 4; then
MPI_OFFSET_TYPE="long long"
elif test "$ac_cv_type_long_t" == "yes" -a "$ac_cv_sizeof_long" = 4; then
MPI_OFFSET_TYPE="long"
elif test "ac_cv_sizeof_int" = 4; then
MPI_OFFSET_TYPE=int
fi
AC_MSG_RESULT([$MPI_OFFSET_TYPE])
if test "$MPI_FINT_TYPE" = "not found"; then
AC_MSG_WARN([*** WARNING: Unable to find the right definition for MPI_Offset])
AC_MSG_ERROR([Cannot continue])
fi
AC_DEFINE_UNQUOTED(MPI_Offset, $MPI_OFFSET_TYPE, [Type of MPI_Offset])
# all: endian
@ -515,11 +553,6 @@ AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_LIBS, "$WRAPPER_EXTRA_LIBS",
[Additional LIBS to pass through the wrapper compilers])
AC_MSG_RESULT([$WRAPPER_EXTRA_LIBS])
#
# Delayed the substitution of CFLAGS and CXXFLAGS until now because
# they may have been modified throughout the course of this script.
#
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(CXXFLAGS)