mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-20 12:52:14 +00:00
This commit is contained in:
@@ -600,6 +600,63 @@ cd ..
|
||||
rm -fr tmpdir_$i])
|
||||
|
||||
|
||||
dnl @synopsis PAC_FORTRAN_TEST_GENERICS( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl
|
||||
dnl Will try to compile a program checking the GENERIC Fortran support.
|
||||
dnl
|
||||
dnl Will use MPIFC, otherwise '$FC'.
|
||||
dnl
|
||||
dnl If the test passes, will execute ACTION-IF-FOUND. Otherwise, ACTION-IF-NOT-FOUND.
|
||||
dnl Note : This file will be likely to induce the compiler to create a module file
|
||||
dnl (for a module called conftest).
|
||||
dnl Depending on the compiler flags, this could cause a conftest.mod file to appear
|
||||
dnl in the present directory, or in another, or with another name. So be warned!
|
||||
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
|
||||
module iface
|
||||
|
||||
interface foo
|
||||
subroutine i_sub_foo(v)
|
||||
integer, intent(inout) :: v(:)
|
||||
end subroutine i_sub_foo
|
||||
end interface foo
|
||||
|
||||
interface bar
|
||||
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])
|
||||
|
||||
|
||||
|
||||
dnl @synopsis PAC_FORTRAN_TEST_EXTENDS( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl
|
||||
|
||||
@@ -651,6 +651,7 @@ FINCLUDES
|
||||
CINCLUDES
|
||||
METIS_LIBS
|
||||
AMD_LIBS
|
||||
INSTALL_SAMPLESDIR
|
||||
INSTALL_DOCSDIR
|
||||
INSTALL_INCLUDEDIR
|
||||
INSTALL_LIBDIR
|
||||
@@ -2141,8 +2142,12 @@ case $docsdir in
|
||||
\/* ) eval "INSTALL_DOCSDIR=$docsdir";;
|
||||
* ) eval "INSTALL_DOCSDIR=$INSTALL_DIR/docs";;
|
||||
esac
|
||||
{ $as_echo "$as_me:$LINENO: result: $INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR $INSTALL_DOCSDIR" >&5
|
||||
$as_echo "$INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR $INSTALL_DOCSDIR" >&6; }
|
||||
case $samplesdir in
|
||||
\/* ) eval "INSTALL_SAMPLESDIR=$samplesdir";;
|
||||
* ) eval "INSTALL_SAMPLESDIR=$INSTALL_DIR/samples";;
|
||||
esac
|
||||
{ $as_echo "$as_me:$LINENO: result: $INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR $INSTALL_DOCSDIR $INSTALL_SAMPLESDIR" >&5
|
||||
$as_echo "$INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR $INSTALL_DOCSDIR $INSTALL_SAMPLESDIR" >&6; }
|
||||
|
||||
# Note that the following line won't save from troubles.
|
||||
ac_ext=${ac_fc_srcext-f}
|
||||
@@ -7839,6 +7844,52 @@ fi
|
||||
cd ..
|
||||
rm -fr tmpdir_$i
|
||||
|
||||
ac_objext='.o'
|
||||
ac_ext='f90'
|
||||
ac_compile='${MPIFC-$FC} -c -o conftest${ac_objext} $FCFLAGS conftest.$ac_ext 1>&5'
|
||||
{ $as_echo "$as_me:$LINENO: checking test GENERIC interfaces" >&5
|
||||
$as_echo_n "checking test GENERIC interfaces... " >&6; }
|
||||
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
|
||||
module iface
|
||||
|
||||
interface foo
|
||||
subroutine i_sub_foo(v)
|
||||
integer, intent(inout) :: v(:)
|
||||
end subroutine i_sub_foo
|
||||
end interface foo
|
||||
|
||||
interface bar
|
||||
procedure i_sub_foo
|
||||
end interface bar
|
||||
|
||||
end module iface
|
||||
EOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && test -s conftest${ac_objext}; then
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
:
|
||||
else
|
||||
{ $as_echo "$as_me:$LINENO: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
|
||||
FDEFINES="$psblas_cv_define_prepend-DBAD_GENERICS $FDEFINES"
|
||||
|
||||
fi
|
||||
cd ..
|
||||
rm -fr tmpdir_$i
|
||||
|
||||
ac_exeext=''
|
||||
ac_ext='f90'
|
||||
ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
@@ -10929,6 +10980,7 @@ UTILLIBNAME=libpsb_util.a
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PSBLASRULES='
|
||||
|
||||
@@ -582,6 +582,11 @@ PAC_FORTRAN_TEST_VOLATILE(
|
||||
[FDEFINES="$psblas_cv_define_prepend-DHAVE_VOLATILE $FDEFINES"],
|
||||
)
|
||||
|
||||
PAC_FORTRAN_TEST_GENERICS(
|
||||
[],
|
||||
[FDEFINES="$psblas_cv_define_prepend-DBAD_GENERICS $FDEFINES"]
|
||||
)
|
||||
|
||||
PAC_FORTRAN_TEST_FLUSH(
|
||||
[FDEFINES="$psblas_cv_define_prepend-DHAVE_FLUSH_STMT $FDEFINES"],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user