|
|
|
@ -65,33 +65,25 @@ dnl
|
|
|
|
|
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
|
|
|
|
dnl
|
|
|
|
|
AC_DEFUN([PAC_FORTRAN_HAVE_MOVE_ALLOC],
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[AC_MSG_CHECKING([for Fortran MOVE_ALLOC intrinsic])
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
program test_move_alloc
|
|
|
|
|
integer, allocatable :: a(:), b(:)
|
|
|
|
|
allocate(a(3))
|
|
|
|
|
call move_alloc(a, b)
|
|
|
|
|
print *, allocated(a), allocated(b)
|
|
|
|
|
print *, b
|
|
|
|
|
end program test_move_alloc
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [rm -rf conftest*
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ rm -rf conftest*
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
rm -f conftest*])
|
|
|
|
|
[AC_MSG_CHECKING([support for Fortran MOVE_ALLOC intrinsic])
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_ext='f90';
|
|
|
|
|
AC_COMPILE_IFELSE([ program test_move_alloc
|
|
|
|
|
integer, allocatable :: a(:), b(:)
|
|
|
|
|
allocate(a(3))
|
|
|
|
|
call move_alloc(a, b)
|
|
|
|
|
print *, allocated(a), allocated(b)
|
|
|
|
|
print *, b
|
|
|
|
|
end program test_move_alloc],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -107,32 +99,29 @@ dnl
|
|
|
|
|
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
|
|
|
|
dnl
|
|
|
|
|
AC_DEFUN(PAC_CHECK_HAVE_CRAYFTN,
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='F'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
[AC_MSG_CHECKING([for Cray Fortran])
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='F90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
program main
|
|
|
|
|
#ifdef _CRAYFTN
|
|
|
|
|
print *, "Cray FTN!"
|
|
|
|
|
#else
|
|
|
|
|
this program will fail
|
|
|
|
|
#endif
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
ifelse([$1], , :, [rm -rf conftest*
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ rm -rf conftest*
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
rm -f conftest*])
|
|
|
|
|
end],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -148,34 +137,28 @@ dnl
|
|
|
|
|
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
|
|
|
|
dnl
|
|
|
|
|
AC_DEFUN(PAC_CHECK_HAVE_GFORTRAN,
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='F'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
[AC_MSG_CHECKING([for GNU Fortran])
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='F90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
program main
|
|
|
|
|
#ifdef __GNUC__
|
|
|
|
|
print *, "GCC!"
|
|
|
|
|
#else
|
|
|
|
|
this program will fail
|
|
|
|
|
#endif
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
ifelse([$1], , :, [rm -rf conftest*
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ rm -rf conftest*
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
rm -f conftest*])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl @synopsis PAC_HAVE_MODERN_GFORTRAN( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
dnl
|
|
|
|
@ -187,35 +170,28 @@ dnl
|
|
|
|
|
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
|
|
|
|
dnl
|
|
|
|
|
AC_DEFUN(PAC_HAVE_MODERN_GFORTRAN,
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='F'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[AC_MSG_CHECKING([GNU Fortran version at least 4.6])
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
[AC_MSG_CHECKING([for recent GNU Fortran])
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='F90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
program main
|
|
|
|
|
#if ( __GNUC__ >= 4 && __GNUC_MINOR__ >= 6 ) || ( __GNUC__ > 4 )
|
|
|
|
|
print *, "ok"
|
|
|
|
|
#else
|
|
|
|
|
this program will fail
|
|
|
|
|
#endif
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
AC_MSG_RESULT([ yes.])
|
|
|
|
|
ifelse([$1], , :, [rm -rf conftest*
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT([ no.])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ rm -rf conftest*
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
rm -f conftest*])
|
|
|
|
|
|
|
|
|
|
end],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl @synopsis PAC_FORTRAN_CHECK_HAVE_MPI_MOD( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
dnl
|
|
|
|
@ -228,30 +204,24 @@ dnl @author Michele Martone <michele.martone@uniroma2.it>
|
|
|
|
|
dnl Modified Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
|
|
|
|
dnl
|
|
|
|
|
AC_DEFUN(PAC_FORTRAN_CHECK_HAVE_MPI_MOD,
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[AC_MSG_CHECKING([MPI Fortran interface])
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
[AC_MSG_CHECKING([for Fortran MPI mod])
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='F90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
program test
|
|
|
|
|
use mpi
|
|
|
|
|
end program test
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
AC_MSG_RESULT([ use mpi ])
|
|
|
|
|
ifelse([$1], , :, [rm -rf conftest*
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
AC_MSG_RESULT([ include mpif.h ])
|
|
|
|
|
ifelse([$2], , , [ rm -rf conftest*
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
rm -f conftest*])
|
|
|
|
|
|
|
|
|
|
end program test],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl @synopsis PAC_FORTRAN_CHECK_HAVE_MPI_MOD_F08( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
|
|
@ -264,31 +234,27 @@ dnl @author Michele Martone <michele.martone@uniroma2.it>
|
|
|
|
|
dnl Modified Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
|
|
|
|
dnl
|
|
|
|
|
AC_DEFUN(PAC_FORTRAN_CHECK_HAVE_MPI_MOD_F08,
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[AC_MSG_CHECKING([MPI Fortran 2008 interface])
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='F90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
program test
|
|
|
|
|
use mpi_f08
|
|
|
|
|
end program test
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
pac_cv_mpi_f08="yes";
|
|
|
|
|
AC_MSG_RESULT([ use mpi_f08. ])
|
|
|
|
|
ifelse([$1], , :, [rm -rf conftest*
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
pac_cv_mpi_f08="no";
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
AC_MSG_RESULT([ no. ])
|
|
|
|
|
ifelse([$2], , , [ rm -rf conftest*
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
rm -f conftest*])
|
|
|
|
|
end program test],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
pac_cv_mpi_f08="yes";
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
pac_cv_mpi_f08="no";
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -377,8 +343,7 @@ dnl
|
|
|
|
|
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
|
|
|
|
dnl
|
|
|
|
|
AC_DEFUN([PAC_ARG_SERIAL_MPI],
|
|
|
|
|
[
|
|
|
|
|
AC_MSG_CHECKING([whether we want serial mpi stubs])
|
|
|
|
|
[AC_MSG_CHECKING([whether we want serial mpi stubs])
|
|
|
|
|
AC_ARG_ENABLE(serial,
|
|
|
|
|
AC_HELP_STRING([--enable-serial],
|
|
|
|
|
[Specify whether to enable a fake mpi library to run in serial mode. ]),
|
|
|
|
@ -476,18 +441,13 @@ dnl
|
|
|
|
|
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
|
|
|
|
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
|
|
|
|
AC_DEFUN(PAC_FORTRAN_TEST_TR15581,
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[AC_MSG_CHECKING([support for Fortran allocatables TR15581])
|
|
|
|
|
i=0
|
|
|
|
|
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
|
|
|
|
i=`expr $i + 1`
|
|
|
|
|
done
|
|
|
|
|
mkdir tmpdir_$i
|
|
|
|
|
cd tmpdir_$i
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='F90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
module conftest
|
|
|
|
|
type outer
|
|
|
|
|
integer, allocatable :: v(:)
|
|
|
|
@ -536,22 +496,15 @@ program testtr15581
|
|
|
|
|
write(*,*) b
|
|
|
|
|
write(*,*) db%v
|
|
|
|
|
|
|
|
|
|
end program testtr15581
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
cd ..
|
|
|
|
|
rm -fr tmpdir_$i])
|
|
|
|
|
end program testtr15581],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl @synopsis PAC_FORTRAN_TEST_VOLATILE( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
dnl
|
|
|
|
@ -568,36 +521,25 @@ dnl
|
|
|
|
|
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
|
|
|
|
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
|
|
|
|
AC_DEFUN(PAC_FORTRAN_TEST_VOLATILE,
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[AC_MSG_CHECKING([support for Fortran VOLATILE])
|
|
|
|
|
i=0
|
|
|
|
|
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
|
|
|
|
i=`expr $i + 1`
|
|
|
|
|
done
|
|
|
|
|
mkdir tmpdir_$i
|
|
|
|
|
cd tmpdir_$i
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='F90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
program conftest
|
|
|
|
|
integer, volatile :: i, j
|
|
|
|
|
end program conftest
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
cd ..
|
|
|
|
|
rm -fr tmpdir_$i])
|
|
|
|
|
end program conftest],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl @synopsis PAC_FORTRAN_TEST_GENERICS( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
|
|
@ -615,18 +557,14 @@ dnl
|
|
|
|
|
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
|
|
|
|
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
|
|
|
|
AC_DEFUN(PAC_FORTRAN_TEST_GENERICS,
|
|
|
|
|
ac_objext='.o'
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
ac_compile='${MPIFC-$FC} -c -o conftest${ac_objext} $FCFLAGS conftest.$ac_ext 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[AC_MSG_CHECKING([test GENERIC interfaces])
|
|
|
|
|
i=0
|
|
|
|
|
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
|
|
|
|
i=`expr $i + 1`
|
|
|
|
|
done
|
|
|
|
|
mkdir tmpdir_$i
|
|
|
|
|
cd tmpdir_$i
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='F90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
module iface
|
|
|
|
|
|
|
|
|
|
interface foo
|
|
|
|
@ -639,23 +577,15 @@ module iface
|
|
|
|
|
procedure i_sub_foo
|
|
|
|
|
end interface bar
|
|
|
|
|
|
|
|
|
|
end module iface
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_compile) && test -s conftest${ac_objext}; then
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
cd ..
|
|
|
|
|
rm -fr tmpdir_$i])
|
|
|
|
|
|
|
|
|
|
end module iface],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl @synopsis PAC_FORTRAN_TEST_EXTENDS( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
|
|
@ -677,13 +607,12 @@ ac_ext='f90'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[AC_MSG_CHECKING([support for Fortran EXTENDS])
|
|
|
|
|
i=0
|
|
|
|
|
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
|
|
|
|
i=`expr $i + 1`
|
|
|
|
|
done
|
|
|
|
|
mkdir tmpdir_$i
|
|
|
|
|
cd tmpdir_$i
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='F90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
program conftest
|
|
|
|
|
type foo
|
|
|
|
|
integer :: i
|
|
|
|
@ -692,22 +621,15 @@ program conftest
|
|
|
|
|
integer j
|
|
|
|
|
end type bar
|
|
|
|
|
type(bar) :: barvar
|
|
|
|
|
end program conftest
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
cd ..
|
|
|
|
|
rm -fr tmpdir_$i])
|
|
|
|
|
end program conftest],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl @synopsis PAC_FORTRAN_TEST_CLASS_TBP( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
dnl
|
|
|
|
@ -723,18 +645,14 @@ dnl in the present directory, or in another, or with another name. So be warned!
|
|
|
|
|
dnl
|
|
|
|
|
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
|
|
|
|
AC_DEFUN(PAC_FORTRAN_TEST_CLASS_TBP,
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[AC_MSG_CHECKING([support for Fortran CLASS TBP])
|
|
|
|
|
i=0
|
|
|
|
|
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
|
|
|
|
i=`expr $i + 1`
|
|
|
|
|
done
|
|
|
|
|
mkdir tmpdir_$i
|
|
|
|
|
cd tmpdir_$i
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='F90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
module foo_mod
|
|
|
|
|
type foo
|
|
|
|
|
integer :: i
|
|
|
|
@ -762,23 +680,15 @@ end module foo_mod
|
|
|
|
|
program conftest
|
|
|
|
|
use foo_mod
|
|
|
|
|
type(foo) :: foovar
|
|
|
|
|
end program conftest
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
cd ..
|
|
|
|
|
rm -fr tmpdir_$i])
|
|
|
|
|
|
|
|
|
|
end program conftest],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl @synopsis PAC_FORTRAN_TEST_FINAL( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
dnl
|
|
|
|
@ -794,18 +704,14 @@ dnl in the present directory, or in another, or with another name. So be warned!
|
|
|
|
|
dnl
|
|
|
|
|
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
|
|
|
|
AC_DEFUN(PAC_FORTRAN_TEST_FINAL,
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[AC_MSG_CHECKING([support for Fortran FINAL])
|
|
|
|
|
i=0
|
|
|
|
|
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
|
|
|
|
i=`expr $i + 1`
|
|
|
|
|
done
|
|
|
|
|
mkdir tmpdir_$i
|
|
|
|
|
cd tmpdir_$i
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
module foo_mod
|
|
|
|
|
type foo
|
|
|
|
|
integer :: i
|
|
|
|
@ -823,22 +729,15 @@ end module foo_mod
|
|
|
|
|
program conftest
|
|
|
|
|
use foo_mod
|
|
|
|
|
type(foo) :: foovar
|
|
|
|
|
end program conftest
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
cd ..
|
|
|
|
|
rm -fr tmpdir_$i])
|
|
|
|
|
end program conftest],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl @synopsis PAC_FORTRAN_TEST_SAME_TYPE( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
dnl
|
|
|
|
@ -854,18 +753,14 @@ dnl in the present directory, or in another, or with another name. So be warned!
|
|
|
|
|
dnl
|
|
|
|
|
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
|
|
|
|
AC_DEFUN(PAC_FORTRAN_TEST_SAME_TYPE,
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[AC_MSG_CHECKING([support for Fortran SAME_TYPE_AS])
|
|
|
|
|
i=0
|
|
|
|
|
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
|
|
|
|
i=`expr $i + 1`
|
|
|
|
|
done
|
|
|
|
|
mkdir tmpdir_$i
|
|
|
|
|
cd tmpdir_$i
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
program stt
|
|
|
|
|
type foo
|
|
|
|
|
integer :: i
|
|
|
|
@ -879,22 +774,15 @@ program stt
|
|
|
|
|
|
|
|
|
|
write(*,*) 'foov == nfv1? ', same_type_as(foov,nfv1)
|
|
|
|
|
write(*,*) 'nfv2 == nfv1? ', same_type_as(nfv2,nfv1)
|
|
|
|
|
end program stt
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
cd ..
|
|
|
|
|
rm -fr tmpdir_$i])
|
|
|
|
|
end program stt],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl @synopsis PAC_FORTRAN_TEST_EXTENDS_TYPE( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
dnl
|
|
|
|
@ -910,18 +798,14 @@ dnl in the present directory, or in another, or with another name. So be warned!
|
|
|
|
|
dnl
|
|
|
|
|
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
|
|
|
|
AC_DEFUN(PAC_FORTRAN_TEST_EXTENDS_TYPE,
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[AC_MSG_CHECKING([support for Fortran EXTENDS_TYPE_OF])
|
|
|
|
|
i=0
|
|
|
|
|
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
|
|
|
|
i=`expr $i + 1`
|
|
|
|
|
done
|
|
|
|
|
mkdir tmpdir_$i
|
|
|
|
|
cd tmpdir_$i
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
program xtt
|
|
|
|
|
type foo
|
|
|
|
|
integer :: i
|
|
|
|
@ -933,23 +817,15 @@ program xtt
|
|
|
|
|
type(new_foo) :: nfv1, nfv2
|
|
|
|
|
|
|
|
|
|
write(*,*) 'nfv1 extends foov? ', extends_type_of(nfv1,foov)
|
|
|
|
|
end program xtt
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
cd ..
|
|
|
|
|
rm -fr tmpdir_$i])
|
|
|
|
|
|
|
|
|
|
end program xtt],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl @synopsis PAC_CHECK_BLACS
|
|
|
|
|
dnl
|
|
|
|
@ -1457,40 +1333,29 @@ dnl
|
|
|
|
|
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
|
|
|
|
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
|
|
|
|
AC_DEFUN(PAC_FORTRAN_TEST_FLUSH,
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[AC_MSG_CHECKING([support for Fortran FLUSH statement])
|
|
|
|
|
i=0
|
|
|
|
|
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
|
|
|
|
i=`expr $i + 1`
|
|
|
|
|
done
|
|
|
|
|
mkdir tmpdir_$i
|
|
|
|
|
cd tmpdir_$i
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
program conftest
|
|
|
|
|
integer :: iunit=10
|
|
|
|
|
open(10)
|
|
|
|
|
write(10,*) 'Test '
|
|
|
|
|
flush(10)
|
|
|
|
|
close(10)
|
|
|
|
|
end program conftest
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
cd ..
|
|
|
|
|
rm -fr tmpdir_$i])
|
|
|
|
|
end program conftest],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl @synopsis PAC_FORTRAN_TEST_ISO_FORTRAN_ENV( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
dnl
|
|
|
|
@ -1501,29 +1366,24 @@ dnl
|
|
|
|
|
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
|
|
|
|
dnl
|
|
|
|
|
AC_DEFUN(PAC_FORTRAN_TEST_ISO_FORTRAN_ENV,
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[AC_MSG_CHECKING([support for ISO_FORTRAN_ENV])
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
program test
|
|
|
|
|
use iso_fortran_env
|
|
|
|
|
end program test
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [rm -rf conftest*
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
ifelse([$2], , , [ rm -rf conftest*
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
rm -f conftest*])
|
|
|
|
|
end program test],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl @synopsis PAC_FORTRAN_TEST_ISO_C_BIND( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
dnl
|
|
|
|
@ -1540,37 +1400,24 @@ dnl
|
|
|
|
|
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
|
|
|
|
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
|
|
|
|
AC_DEFUN(PAC_FORTRAN_TEST_ISO_C_BIND,
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[AC_MSG_CHECKING([support for Fortran ISO_C_BINDING module])
|
|
|
|
|
i=0
|
|
|
|
|
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
|
|
|
|
i=`expr $i + 1`
|
|
|
|
|
done
|
|
|
|
|
mkdir tmpdir_$i
|
|
|
|
|
cd tmpdir_$i
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
program conftest
|
|
|
|
|
use iso_c_binding
|
|
|
|
|
end program conftest
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
cd ..
|
|
|
|
|
rm -fr tmpdir_$i])
|
|
|
|
|
|
|
|
|
|
end program conftest],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl @synopsis PAC_FORTRAN_TEST_MOLD( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
dnl
|
|
|
|
@ -1586,18 +1433,13 @@ dnl in the present directory, or in another, or with another name. So be warned!
|
|
|
|
|
dnl
|
|
|
|
|
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
|
|
|
|
AC_DEFUN(PAC_FORTRAN_TEST_MOLD,
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[AC_MSG_CHECKING([support for Fortran MOLD= allocation])
|
|
|
|
|
i=0
|
|
|
|
|
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
|
|
|
|
i=`expr $i + 1`
|
|
|
|
|
done
|
|
|
|
|
mkdir tmpdir_$i
|
|
|
|
|
cd tmpdir_$i
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
program xtt
|
|
|
|
|
type foo
|
|
|
|
|
integer :: i
|
|
|
|
@ -1611,22 +1453,15 @@ program xtt
|
|
|
|
|
|
|
|
|
|
allocate(fooab, mold=nfv, stat=info)
|
|
|
|
|
|
|
|
|
|
end program xtt
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
cd ..
|
|
|
|
|
rm -fr tmpdir_$i])
|
|
|
|
|
end program xtt],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl @synopsis PAC_FORTRAN_TEST_SOURCE( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
|
|
@ -1643,18 +1478,13 @@ dnl in the present directory, or in another, or with another name. So be warned!
|
|
|
|
|
dnl
|
|
|
|
|
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
|
|
|
|
AC_DEFUN(PAC_FORTRAN_TEST_SOURCE,
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
dnl Warning : square brackets are EVIL!
|
|
|
|
|
[AC_MSG_CHECKING([support for Fortran SOURCE= allocation])
|
|
|
|
|
i=0
|
|
|
|
|
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
|
|
|
|
i=`expr $i + 1`
|
|
|
|
|
done
|
|
|
|
|
mkdir tmpdir_$i
|
|
|
|
|
cd tmpdir_$i
|
|
|
|
|
cat > conftest.$ac_ext <<EOF
|
|
|
|
|
AC_LANG_PUSH([Fortran])
|
|
|
|
|
ac_exeext=''
|
|
|
|
|
ac_ext='f90'
|
|
|
|
|
dnl ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
|
|
|
ac_fc=${MPIFC-$FC};
|
|
|
|
|
AC_COMPILE_IFELSE([
|
|
|
|
|
program xtt
|
|
|
|
|
type foo
|
|
|
|
|
integer :: i
|
|
|
|
@ -1668,23 +1498,15 @@ program xtt
|
|
|
|
|
|
|
|
|
|
allocate(fooab, source=nfv, stat=info)
|
|
|
|
|
|
|
|
|
|
end program xtt
|
|
|
|
|
EOF
|
|
|
|
|
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [
|
|
|
|
|
$1])
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [
|
|
|
|
|
$2
|
|
|
|
|
])dnl
|
|
|
|
|
fi
|
|
|
|
|
cd ..
|
|
|
|
|
rm -fr tmpdir_$i])
|
|
|
|
|
|
|
|
|
|
end program xtt],
|
|
|
|
|
[ AC_MSG_RESULT([yes])
|
|
|
|
|
ifelse([$1], , :, [ $1])],
|
|
|
|
|
[ AC_MSG_RESULT([no])
|
|
|
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
|
|
|
cat conftest.$ac_ext >&AC_FD_CC
|
|
|
|
|
ifelse([$2], , , [ $2])])
|
|
|
|
|
AC_LANG_POP([Fortran])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl @synopsis PAC_CHECK_AMD
|
|
|
|
|
dnl
|
|
|
|
|