From d59efdf95f548eb0b788ab8531f380cce48144b9 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Fri, 16 Oct 2015 14:17:56 +0000 Subject: [PATCH] psblas-3.3-maint: config/pac.m4 configure Refactored various configure macros. --- config/pac.m4 | 787 ++++++++------------ configure | 1907 ++++++++++++++++++++++++++++++++++--------------- 2 files changed, 1632 insertions(+), 1062 deletions(-) diff --git a/config/pac.m4 b/config/pac.m4 index 9cebf602..046eac6a 100644 --- a/config/pac.m4 +++ b/config/pac.m4 @@ -65,33 +65,25 @@ dnl dnl @author Michele Martone 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 <&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 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 <&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 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 <&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 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 <= 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 dnl Modified Salvatore Filippone 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 <&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 dnl Modified Salvatore Filippone 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 <&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 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 dnl @author Salvatore Filippone 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 <&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 dnl @author Salvatore Filippone 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 <&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 dnl @author Salvatore Filippone 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 <&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 <&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 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 <&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 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 <&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 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 <&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 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 <&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 @@ -1209,6 +1085,19 @@ if test $pac_blas_ok = no; then [], [-lf77blas -latlas])], [], [-latlas])]) +fi +if test $pac_blas_ok = no; then + AC_LANG([C]) + AC_CHECK_LIB(atlas, ATL_xerbla, + [AC_LANG([Fortran]) + AC_CHECK_LIB(satlas, sgemm, + [AC_LANG([C]) + AC_CHECK_LIB(satlas, cblas_dgemm, + [pac_blas_ok=yes + BLAS_LIBS="-lsatlas"], + [], [-lsatlas])], + [], [-lsatlas])]) + fi # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) @@ -1444,40 +1333,29 @@ dnl dnl @author Michele Martone dnl @author Salvatore Filippone 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 <&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 @@ -1488,29 +1366,24 @@ dnl dnl @author Salvatore Filippone 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 <&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 @@ -1527,37 +1400,24 @@ dnl dnl @author Michele Martone dnl @author Salvatore Filippone 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 <&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 @@ -1573,18 +1433,13 @@ dnl in the present directory, or in another, or with another name. So be warned! dnl dnl @author Salvatore Filippone 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 <&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]]) @@ -1630,18 +1478,13 @@ dnl in the present directory, or in another, or with another name. So be warned! dnl dnl @author Salvatore Filippone 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 <&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 @@ -1831,7 +1666,7 @@ if test "x$psblas_cv_metislibdir" != "x"; then fi AC_MSG_NOTICE([metis dir $psblas_cv_metisdir]) -AC_CHECK_HEADER([metis.h], +AC_CHECK_HEADERS([limits.h metis.h], [pac_metis_header_ok=yes], [pac_metis_header_ok=no; METIS_INCLUDES=""]) if test "x$pac_metis_header_ok" == "xno" ; then @@ -1841,7 +1676,7 @@ dnl Maybe Include or include subdirs? CPPFLAGS="$METIS_INCLUDES $SAVE_CPPFLAGS" AC_MSG_CHECKING([for metis_h in $METIS_INCLUDES]) - AC_CHECK_HEADER([metis.h], + AC_CHECK_HEADERS([limits.h metis.h], [pac_metis_header_ok=yes], [pac_metis_header_ok=no; METIS_INCLUDES=""]) fi @@ -1850,7 +1685,7 @@ dnl Maybe new structure with METIS UFconfig METIS? unset ac_cv_header_metis_h METIS_INCLUDES="-I$psblas_cv_metisdir/UFconfig -I$psblas_cv_metisdir/METIS/Include -I$psblas_cv_metisdir/METIS/Include" CPPFLAGS="$METIS_INCLUDES $SAVE_CPPFLAGS" - AC_CHECK_HEADER([metis.h], + AC_CHECK_HEADERS([limits.h metis.h], [pac_metis_header_ok=yes], [pac_metis_header_ok=no; METIS_INCLUDES=""]) fi diff --git a/configure b/configure index eebb497d..d013aea7 100755 --- a/configure +++ b/configure @@ -3419,7 +3419,6 @@ fi # Note: Someday we will contemplate a fake MPI - configured version of PSBLAS ############################################################################### # First check whether the user required our serial (fake) mpi. - { $as_echo "$as_me:$LINENO: checking whether we want serial mpi stubs" >&5 $as_echo_n "checking whether we want serial mpi stubs... " >&6; } # Check whether --enable-serial was given. @@ -5606,11 +5605,18 @@ fi psblas_cv_fc="" -ac_exeext='' -ac_ext='F' -ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +{ $as_echo "$as_me:$LINENO: checking for GNU Fortran" >&5 +$as_echo_n "checking for GNU Fortran... " >&6; } + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + ac_exeext='' + ac_ext='F90' + ac_fc=${MPIFC-$FC}; + cat >conftest.$ac_ext <<_ACEOF -cat > conftest.$ac_ext < conftest.$ac_ext <&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - rm -rf conftest* - psblas_cv_fc="gcc" + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + psblas_cv_fc="gcc" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi -rm -f conftest* -ac_exeext='' -ac_ext='F' -ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +{ $as_echo "$as_me:$LINENO: checking for Cray Fortran" >&5 +$as_echo_n "checking for Cray Fortran... " >&6; } + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + ac_exeext='' + ac_ext='F90' + ac_fc=${MPIFC-$FC}; + cat >conftest.$ac_ext <<_ACEOF -cat > conftest.$ac_ext < conftest.$ac_ext <&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - rm -rf conftest* - psblas_cv_fc="cray" + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + psblas_cv_fc="cray" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi -rm -f conftest* + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + if test x"$psblas_cv_fc" == "x" ; then if eval "$MPIFC -qversion 2>&1 | grep XL 2>/dev/null" ; then @@ -5697,12 +5764,18 @@ $as_echo "$as_me: Unknown Fortran compiler, proceeding with fingers crossed !" > fi fi if test "X$psblas_cv_fc" == "Xgcc" ; then -ac_exeext='' -ac_ext='F' -ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -{ $as_echo "$as_me:$LINENO: checking GNU Fortran version at least 4.6" >&5 -$as_echo_n "checking GNU Fortran version at least 4.6... " >&6; } -cat > conftest.$ac_ext <&5 +$as_echo_n "checking for recent GNU Fortran... " >&6; } + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + ac_exeext='' + ac_ext='F90' + ac_fc=${MPIFC-$FC}; + cat >conftest.$ac_ext <<_ACEOF + program main #if ( __GNUC__ >= 4 && __GNUC_MINOR__ >= 6 ) || ( __GNUC__ > 4 ) print *, "ok" @@ -5710,28 +5783,50 @@ cat > conftest.$ac_ext <&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - { $as_echo "$as_me:$LINENO: result: yes." >&5 -$as_echo " yes." >&6; } - : + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && 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 - rm -rf conftest* - { { $as_echo "$as_me:$LINENO: error: Sorry, we require GNU Fortran 4.6 or later." >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + { { $as_echo "$as_me:$LINENO: error: Sorry, we require GNU Fortran 4.6 or later." >&5 $as_echo "$as_me: error: Sorry, we require GNU Fortran 4.6 or later." >&2;} { (exit 1); exit 1; }; } fi -rm -f conftest* + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + fi # TODO : SEE _AC_PROG_FC_V # TODO : AC_MSG_ERROR(see "$ac_cv_prog_FC_fc") @@ -7385,64 +7480,123 @@ fi if test x"$pac_cv_serial_mpi" == x"yes" ; then FDEFINES="$psblas_cv_define_prepend-DSERIAL_MPI $psblas_cv_define_prepend-DMPI_MOD $FDEFINES"; else - ac_exeext='' -ac_ext='f90' -ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -{ $as_echo "$as_me:$LINENO: checking MPI Fortran 2008 interface" >&5 + { $as_echo "$as_me:$LINENO: checking MPI Fortran 2008 interface" >&5 $as_echo_n "checking MPI Fortran 2008 interface... " >&6; } -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF + program test use mpi_f08 end program test -EOF -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - pac_cv_mpi_f08="yes"; - { $as_echo "$as_me:$LINENO: result: use mpi_f08. " >&5 -$as_echo " use mpi_f08. " >&6; } - : + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + pac_cv_mpi_f08="yes"; + : else - pac_cv_mpi_f08="no"; - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no. " >&5 -$as_echo " no. " >&6; } + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + pac_cv_mpi_f08="no"; + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi -rm -f conftest* + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + if test x"$pac_cv_mpi_f08" == x"yes" ; then FDEFINES="$psblas_cv_define_prepend-DMPI_MOD $FDEFINES"; else - ac_exeext='' -ac_ext='f90' -ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -{ $as_echo "$as_me:$LINENO: checking MPI Fortran interface" >&5 -$as_echo_n "checking MPI Fortran interface... " >&6; } -cat > conftest.$ac_ext <&5 +$as_echo_n "checking for Fortran MPI mod... " >&6; } + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + ac_exeext='' + ac_ext='F90' + ac_fc=${MPIFC-$FC}; + cat >conftest.$ac_ext <<_ACEOF + program test use mpi end program test -EOF -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - { $as_echo "$as_me:$LINENO: result: use mpi " >&5 -$as_echo " use mpi " >&6; } - rm -rf conftest* - FDEFINES="$psblas_cv_define_prepend-DMPI_MOD $FDEFINES" + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + FDEFINES="$psblas_cv_define_prepend-DMPI_MOD $FDEFINES" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: include mpif.h " >&5 -$as_echo " include mpif.h " >&6; } - rm -rf conftest* - FDEFINES="$psblas_cv_define_prepend-DMPI_H $FDEFINES" + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $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-DMPI_H $FDEFINES" fi -rm -f conftest* + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + fi fi @@ -7479,18 +7633,18 @@ fi # # Critical features # -ac_exeext='' -ac_ext='f90' -ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' { $as_echo "$as_me:$LINENO: checking support for Fortran allocatables TR15581" >&5 $as_echo_n "checking support for Fortran allocatables TR15581... " >&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 <conftest.$ac_ext <<_ACEOF + module conftest type outer integer, allocatable :: v(:) @@ -7540,43 +7694,68 @@ program testtr15581 write(*,*) db%v end program testtr15581 -EOF -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && 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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for TR15581. + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for TR15581. Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6." >&5 $as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for TR15581. Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6." >&2;} { (exit 1); exit 1; }; } fi -cd .. -rm -fr tmpdir_$i + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ac_exeext='' ac_ext='f90' ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' { $as_echo "$as_me:$LINENO: checking support for Fortran EXTENDS" >&5 $as_echo_n "checking support for Fortran EXTENDS... " >&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 <conftest.$ac_ext <<_ACEOF + program conftest type foo integer :: i @@ -7586,43 +7765,65 @@ program conftest end type bar type(bar) :: barvar end program conftest -EOF -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && 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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for EXTENDS. + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for EXTENDS. Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6." >&5 $as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for EXTENDS. Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6." >&2;} { (exit 1); exit 1; }; } 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' +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + { $as_echo "$as_me:$LINENO: checking support for Fortran CLASS TBP" >&5 $as_echo_n "checking support for Fortran CLASS TBP... " >&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 <conftest.$ac_ext <<_ACEOF + module foo_mod type foo integer :: i @@ -7651,43 +7852,65 @@ program conftest use foo_mod type(foo) :: foovar end program conftest -EOF -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && 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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for CLASS and type bound procedures. + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for CLASS and type bound procedures. Please get a Fortran compiler that supports them, e.g. GNU Fortran 4.6." >&5 $as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for CLASS and type bound procedures. Please get a Fortran compiler that supports them, e.g. GNU Fortran 4.6." >&2;} { (exit 1); exit 1; }; } 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' +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + { $as_echo "$as_me:$LINENO: checking support for Fortran SOURCE= allocation" >&5 $as_echo_n "checking support for Fortran SOURCE= allocation... " >&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 <conftest.$ac_ext <<_ACEOF + program xtt type foo integer :: i @@ -7702,160 +7925,251 @@ program xtt allocate(fooab, source=nfv, stat=info) end program xtt -EOF -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && 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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for SOURCE= allocation. + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for SOURCE= allocation. Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6." >&5 $as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for SOURCE= allocation. Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6." >&2;} { (exit 1); exit 1; }; } fi -cd .. -rm -fr tmpdir_$i -ac_exeext='' -ac_ext='f' -ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -{ $as_echo "$as_me:$LINENO: checking for Fortran MOVE_ALLOC intrinsic" >&5 -$as_echo_n "checking for Fortran MOVE_ALLOC intrinsic... " >&6; } -cat > conftest.$ac_ext <&5 - (eval $ac_link) 2>&5 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +{ $as_echo "$as_me:$LINENO: checking support for Fortran MOVE_ALLOC intrinsic" >&5 +$as_echo_n "checking support for Fortran MOVE_ALLOC intrinsic... " >&6; } + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + ac_ext='f90'; + cat >conftest.$ac_ext <<_ACEOF + 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 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - rm -rf conftest* - FDEFINES="$psblas_cv_define_prepend-DHAVE_MOVE_ALLOC $FDEFINES" + FDEFINES="$psblas_cv_define_prepend-DHAVE_MOVE_ALLOC $FDEFINES" else - { $as_echo "$as_me:$LINENO: result: no" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for MOVE_ALLOC. + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for MOVE_ALLOC. Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6." >&5 $as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for MOVE_ALLOC. Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6." >&2;} { (exit 1); exit 1; }; } fi -rm -f conftest* -ac_exeext='' -ac_ext='f90' -ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + { $as_echo "$as_me:$LINENO: checking support for Fortran ISO_C_BINDING module" >&5 $as_echo_n "checking support for Fortran ISO_C_BINDING module... " >&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 <conftest.$ac_ext <<_ACEOF + +program conftest use iso_c_binding end program conftest -EOF -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - - FDEFINES="$psblas_cv_define_prepend-DHAVE_ISO_C_BINDING $FDEFINES" + FDEFINES="$psblas_cv_define_prepend-DHAVE_ISO_C_BINDING $FDEFINES" else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for ISO_C_BINDING. + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for ISO_C_BINDING. Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6." >&5 $as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for ISO_C_BINDING. Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6." >&2;} { (exit 1); exit 1; }; } fi -cd .. -rm -fr tmpdir_$i + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # # Optional features # -ac_exeext='' -ac_ext='f90' -ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' { $as_echo "$as_me:$LINENO: checking support for Fortran VOLATILE" >&5 $as_echo_n "checking support for Fortran VOLATILE... " >&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 <conftest.$ac_ext <<_ACEOF + program conftest integer, volatile :: i, j end program conftest -EOF -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - - FDEFINES="$psblas_cv_define_prepend-DHAVE_VOLATILE $FDEFINES" + FDEFINES="$psblas_cv_define_prepend-DHAVE_VOLATILE $FDEFINES" else - { $as_echo "$as_me:$LINENO: result: no" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + 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' +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + { $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 <conftest.$ac_ext <<_ACEOF + module iface interface foo @@ -7869,39 +8183,61 @@ module iface end interface bar end module iface -EOF -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $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 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && 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 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - FDEFINES="$psblas_cv_define_prepend-DHAVE_BUGGY_GENERICS $FDEFINES" + { $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-DHAVE_BUGGY_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' +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + { $as_echo "$as_me:$LINENO: checking support for Fortran FLUSH statement" >&5 $as_echo_n "checking support for Fortran FLUSH statement... " >&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 <conftest.$ac_ext <<_ACEOF + program conftest integer :: iunit=10 open(10) @@ -7909,64 +8245,117 @@ program conftest flush(10) close(10) end program conftest -EOF -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - - FDEFINES="$psblas_cv_define_prepend-DHAVE_FLUSH_STMT $FDEFINES" + FDEFINES="$psblas_cv_define_prepend-DHAVE_FLUSH_STMT $FDEFINES" else - { $as_echo "$as_me:$LINENO: result: no" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi -cd .. -rm -fr tmpdir_$i -ac_exeext='' -ac_ext='f90' -ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + { $as_echo "$as_me:$LINENO: checking support for ISO_FORTRAN_ENV" >&5 $as_echo_n "checking support for ISO_FORTRAN_ENV... " >&6; } -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF + program test use iso_fortran_env end program test -EOF -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - rm -rf conftest* - FDEFINES="$psblas_cv_define_prepend-DHAVE_ISO_FORTRAN_ENV $FDEFINES" + FDEFINES="$psblas_cv_define_prepend-DHAVE_ISO_FORTRAN_ENV $FDEFINES" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi -rm -f conftest* -ac_exeext='' -ac_ext='f90' -ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -{ $as_echo "$as_me:$LINENO: checking support for Fortran FINAL" >&5 -$as_echo_n "checking support for Fortran FINAL... " >&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 <&5 +$as_echo_n "checking support for Fortran FINAL... " >&6; } + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + ac_exeext='' + ac_ext='f90' + ac_fc=${MPIFC-$FC}; + cat >conftest.$ac_ext <<_ACEOF + module foo_mod type foo integer :: i @@ -7985,37 +8374,60 @@ program conftest use foo_mod type(foo) :: foovar end program conftest -EOF -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - - FDEFINES="$psblas_cv_define_prepend-DHAVE_FINAL $FDEFINES" + FDEFINES="$psblas_cv_define_prepend-DHAVE_FINAL $FDEFINES" else - { $as_echo "$as_me:$LINENO: result: no" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + 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' +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + { $as_echo "$as_me:$LINENO: checking support for Fortran SAME_TYPE_AS" >&5 $as_echo_n "checking support for Fortran SAME_TYPE_AS... " >&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 <conftest.$ac_ext <<_ACEOF + program stt type foo integer :: i @@ -8030,37 +8442,60 @@ program stt write(*,*) 'foov == nfv1? ', same_type_as(foov,nfv1) write(*,*) 'nfv2 == nfv1? ', same_type_as(nfv2,nfv1) end program stt -EOF -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - - FDEFINES="$psblas_cv_define_prepend-DHAVE_SAME_TYPE_AS $FDEFINES" + FDEFINES="$psblas_cv_define_prepend-DHAVE_SAME_TYPE_AS $FDEFINES" else - { $as_echo "$as_me:$LINENO: result: no" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + 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' +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + { $as_echo "$as_me:$LINENO: checking support for Fortran EXTENDS_TYPE_OF" >&5 $as_echo_n "checking support for Fortran EXTENDS_TYPE_OF... " >&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 <conftest.$ac_ext <<_ACEOF + program xtt type foo integer :: i @@ -8073,37 +8508,60 @@ program xtt write(*,*) 'nfv1 extends foov? ', extends_type_of(nfv1,foov) end program xtt -EOF -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - - FDEFINES="$psblas_cv_define_prepend-DHAVE_EXTENDS_TYPE_OF $FDEFINES" + FDEFINES="$psblas_cv_define_prepend-DHAVE_EXTENDS_TYPE_OF $FDEFINES" else - { $as_echo "$as_me:$LINENO: result: no" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + 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' +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + { $as_echo "$as_me:$LINENO: checking support for Fortran MOLD= allocation" >&5 $as_echo_n "checking support for Fortran MOLD= allocation... " >&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 <conftest.$ac_ext <<_ACEOF + program xtt type foo integer :: i @@ -8118,24 +8576,47 @@ program xtt allocate(fooab, mold=nfv, stat=info) end program xtt -EOF -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - - FDEFINES="$psblas_cv_define_prepend-DHAVE_MOLD $FDEFINES" + FDEFINES="$psblas_cv_define_prepend-DHAVE_MOLD $FDEFINES" else - { $as_echo "$as_me:$LINENO: result: no" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi -cd .. -rm -fr tmpdir_$i + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ############################################################################### # Additional pathname stuff (yes, it is redundant and confusing...) @@ -8165,61 +8646,191 @@ if test "X$AR" == "X" ; then AR="ar" fi -if test "X$RANLIB" == "X" ; then - RANLIB="ranlib" +if test "X$RANLIB" == "X" ; then + RANLIB="ranlib" +fi + +# This should be portable +AR="${AR} -cur" + + +############################################################################### +# BLAS library presence checks +############################################################################### + +# Note : The libmkl.a (Intel Math Kernel Library) library could be used, too. +# It is sufficient to specify it as -lmkl in the CLIBS or FLIBS or LIBS +# and specify its path adjusting -L/path in CFLAGS. + +# Right now it is a matter of user's taste when linking custom applications. +# But PSBLAS examples could take advantage of these libraries, too. + + + +pac_blas_ok=no + + +# Check whether --with-blas was given. +if test "${with_blas+set}" = set; then + withval=$with_blas; +fi + +case $with_blas in + yes | "") ;; + no) pac_blas_ok=disable ;; + -* | */* | *.a | *.so | *.so.* | *.o) BLAS_LIBS="$with_blas" ;; + *) BLAS_LIBS="-l$with_blas" ;; +esac + +# Get fortran linker names of BLAS functions to check for. +#AC_FC_FUNC(sgemm) +#AC_FC_FUNC(dgemm) + +pac_blas_save_LIBS="$LIBS" +#LIBS="$LIBS $FLIBS" +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + +# First, check BLAS_LIBS environment variable +if test $pac_blas_ok = no; then +if test "x$BLAS_LIBS" != x; then + save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" + { $as_echo "$as_me:$LINENO: checking for sgemm in $BLAS_LIBS" >&5 +$as_echo_n "checking for sgemm in $BLAS_LIBS... " >&6; } + cat >conftest.$ac_ext <<_ACEOF + program main + call sgemm + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + pac_blas_ok=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + BLAS_LIBS="" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: $pac_blas_ok" >&5 +$as_echo "$pac_blas_ok" >&6; } + LIBS="$save_LIBS" +fi +fi + + +# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) +if test $pac_blas_ok = no; then + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + { $as_echo "$as_me:$LINENO: checking for ATL_xerbla in -latlas" >&5 +$as_echo_n "checking for ATL_xerbla in -latlas... " >&6; } +if test "${ac_cv_lib_atlas_ATL_xerbla+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-latlas $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ATL_xerbla (); +int +main () +{ +return ATL_xerbla (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_atlas_ATL_xerbla=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_atlas_ATL_xerbla=no fi -# This should be portable -AR="${AR} -cur" - - -############################################################################### -# BLAS library presence checks -############################################################################### - -# Note : The libmkl.a (Intel Math Kernel Library) library could be used, too. -# It is sufficient to specify it as -lmkl in the CLIBS or FLIBS or LIBS -# and specify its path adjusting -L/path in CFLAGS. - -# Right now it is a matter of user's taste when linking custom applications. -# But PSBLAS examples could take advantage of these libraries, too. - - - -pac_blas_ok=no - - -# Check whether --with-blas was given. -if test "${with_blas+set}" = set; then - withval=$with_blas; +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi - -case $with_blas in - yes | "") ;; - no) pac_blas_ok=disable ;; - -* | */* | *.a | *.so | *.so.* | *.o) BLAS_LIBS="$with_blas" ;; - *) BLAS_LIBS="-l$with_blas" ;; -esac - -# Get fortran linker names of BLAS functions to check for. -#AC_FC_FUNC(sgemm) -#AC_FC_FUNC(dgemm) - -pac_blas_save_LIBS="$LIBS" -#LIBS="$LIBS $FLIBS" -ac_ext=${ac_fc_srcext-f} +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 +$as_echo "$ac_cv_lib_atlas_ATL_xerbla" >&6; } +if test "x$ac_cv_lib_atlas_ATL_xerbla" = x""yes; then + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - -# First, check BLAS_LIBS environment variable -if test $pac_blas_ok = no; then -if test "x$BLAS_LIBS" != x; then - save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - { $as_echo "$as_me:$LINENO: checking for sgemm in $BLAS_LIBS" >&5 -$as_echo_n "checking for sgemm in $BLAS_LIBS... " >&6; } - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking for sgemm in -lf77blas" >&5 +$as_echo_n "checking for sgemm in -lf77blas... " >&6; } +if test "${ac_cv_lib_f77blas_sgemm+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lf77blas -latlas $LIBS" +cat >conftest.$ac_ext <<_ACEOF program main call sgemm end @@ -8245,25 +8856,104 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - pac_blas_ok=yes + ac_cv_lib_f77blas_sgemm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - BLAS_LIBS="" + ac_cv_lib_f77blas_sgemm=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $pac_blas_ok" >&5 -$as_echo "$pac_blas_ok" >&6; } - LIBS="$save_LIBS" +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_f77blas_sgemm" >&5 +$as_echo "$ac_cv_lib_f77blas_sgemm" >&6; } +if test "x$ac_cv_lib_f77blas_sgemm" = x""yes; then + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + { $as_echo "$as_me:$LINENO: checking for cblas_dgemm in -lcblas" >&5 +$as_echo_n "checking for cblas_dgemm in -lcblas... " >&6; } +if test "${ac_cv_lib_cblas_cblas_dgemm+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcblas -lf77blas -latlas $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char cblas_dgemm (); +int +main () +{ +return cblas_dgemm (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_cblas_cblas_dgemm=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_cblas_cblas_dgemm=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cblas_cblas_dgemm" >&5 +$as_echo "$ac_cv_lib_cblas_cblas_dgemm" >&6; } +if test "x$ac_cv_lib_cblas_cblas_dgemm" = x""yes; then + pac_blas_ok=yes + BLAS_LIBS="-lcblas -lf77blas -latlas" fi +fi -# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) +fi + + +fi if test $pac_blas_ok = no; then ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8342,13 +9032,13 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - { $as_echo "$as_me:$LINENO: checking for sgemm in -lf77blas" >&5 -$as_echo_n "checking for sgemm in -lf77blas... " >&6; } -if test "${ac_cv_lib_f77blas_sgemm+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sgemm in -lsatlas" >&5 +$as_echo_n "checking for sgemm in -lsatlas... " >&6; } +if test "${ac_cv_lib_satlas_sgemm+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lf77blas -latlas $LIBS" +LIBS="-lsatlas -lsatlas $LIBS" cat >conftest.$ac_ext <<_ACEOF program main call sgemm @@ -8375,12 +9065,12 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - ac_cv_lib_f77blas_sgemm=yes + ac_cv_lib_satlas_sgemm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_f77blas_sgemm=no + ac_cv_lib_satlas_sgemm=no fi rm -rf conftest.dSYM @@ -8388,22 +9078,22 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_f77blas_sgemm" >&5 -$as_echo "$ac_cv_lib_f77blas_sgemm" >&6; } -if test "x$ac_cv_lib_f77blas_sgemm" = x""yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_satlas_sgemm" >&5 +$as_echo "$ac_cv_lib_satlas_sgemm" >&6; } +if test "x$ac_cv_lib_satlas_sgemm" = x""yes; then ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - { $as_echo "$as_me:$LINENO: checking for cblas_dgemm in -lcblas" >&5 -$as_echo_n "checking for cblas_dgemm in -lcblas... " >&6; } -if test "${ac_cv_lib_cblas_cblas_dgemm+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for cblas_dgemm in -lsatlas" >&5 +$as_echo_n "checking for cblas_dgemm in -lsatlas... " >&6; } +if test "${ac_cv_lib_satlas_cblas_dgemm+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lcblas -lf77blas -latlas $LIBS" +LIBS="-lsatlas -lsatlas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8447,12 +9137,12 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - ac_cv_lib_cblas_cblas_dgemm=yes + ac_cv_lib_satlas_cblas_dgemm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_cblas_cblas_dgemm=no + ac_cv_lib_satlas_cblas_dgemm=no fi rm -rf conftest.dSYM @@ -8460,11 +9150,11 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cblas_cblas_dgemm" >&5 -$as_echo "$ac_cv_lib_cblas_cblas_dgemm" >&6; } -if test "x$ac_cv_lib_cblas_cblas_dgemm" = x""yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_satlas_cblas_dgemm" >&5 +$as_echo "$ac_cv_lib_satlas_cblas_dgemm" >&6; } +if test "x$ac_cv_lib_satlas_cblas_dgemm" = x""yes; then pac_blas_ok=yes - BLAS_LIBS="-lcblas -lf77blas -latlas" + BLAS_LIBS="-lsatlas" fi fi @@ -9538,18 +10228,25 @@ fi { $as_echo "$as_me:$LINENO: metis dir $psblas_cv_metisdir" >&5 $as_echo "$as_me: metis dir $psblas_cv_metisdir" >&6;} -if test "${ac_cv_header_metis_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for metis.h" >&5 -$as_echo_n "checking for metis.h... " >&6; } -if test "${ac_cv_header_metis_h+set}" = set; then + + +for ac_header in limits.h metis.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_metis_h" >&5 -$as_echo "$ac_cv_header_metis_h" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking metis.h usability" >&5 -$as_echo_n "checking metis.h usability... " >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9557,7 +10254,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -9590,15 +10287,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext $as_echo "$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking metis.h presence" >&5 -$as_echo_n "checking metis.h presence... " >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -9632,25 +10329,25 @@ $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: metis.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: metis.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: metis.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: metis.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: metis.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: metis.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: metis.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: metis.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: metis.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: metis.h: in the future, the compiler will take precedence" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------------------- ## ## Report this to salvatore.filippone@uniroma2.it ## @@ -9659,23 +10356,31 @@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for metis.h" >&5 -$as_echo_n "checking for metis.h... " >&6; } -if test "${ac_cv_header_metis_h+set}" = set; then +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else - ac_cv_header_metis_h=$ac_header_preproc + eval "$as_ac_Header=\$ac_header_preproc" fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_metis_h" >&5 -$as_echo "$ac_cv_header_metis_h" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test "x$ac_cv_header_metis_h" = x""yes; then - pac_metis_header_ok=yes +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + pac_metis_header_ok=yes else pac_metis_header_ok=no; METIS_INCLUDES="" fi +done if test "x$pac_metis_header_ok" == "xno" ; then unset ac_cv_header_metis_h @@ -9684,18 +10389,25 @@ if test "x$pac_metis_header_ok" == "xno" ; then { $as_echo "$as_me:$LINENO: checking for metis_h in $METIS_INCLUDES" >&5 $as_echo_n "checking for metis_h in $METIS_INCLUDES... " >&6; } - if test "${ac_cv_header_metis_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for metis.h" >&5 -$as_echo_n "checking for metis.h... " >&6; } -if test "${ac_cv_header_metis_h+set}" = set; then + + +for ac_header in limits.h metis.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_metis_h" >&5 -$as_echo "$ac_cv_header_metis_h" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking metis.h usability" >&5 -$as_echo_n "checking metis.h usability... " >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9703,7 +10415,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -9736,15 +10448,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext $as_echo "$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking metis.h presence" >&5 -$as_echo_n "checking metis.h presence... " >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -9778,25 +10490,25 @@ $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: metis.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: metis.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: metis.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: metis.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: metis.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: metis.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: metis.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: metis.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: metis.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: metis.h: in the future, the compiler will take precedence" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------------------- ## ## Report this to salvatore.filippone@uniroma2.it ## @@ -9805,41 +10517,56 @@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for metis.h" >&5 -$as_echo_n "checking for metis.h... " >&6; } -if test "${ac_cv_header_metis_h+set}" = set; then +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else - ac_cv_header_metis_h=$ac_header_preproc + eval "$as_ac_Header=\$ac_header_preproc" fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_metis_h" >&5 -$as_echo "$ac_cv_header_metis_h" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test "x$ac_cv_header_metis_h" = x""yes; then - pac_metis_header_ok=yes +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + pac_metis_header_ok=yes else pac_metis_header_ok=no; METIS_INCLUDES="" fi +done fi if test "x$pac_metis_header_ok" == "xno" ; then unset ac_cv_header_metis_h METIS_INCLUDES="-I$psblas_cv_metisdir/UFconfig -I$psblas_cv_metisdir/METIS/Include -I$psblas_cv_metisdir/METIS/Include" CPPFLAGS="$METIS_INCLUDES $SAVE_CPPFLAGS" - if test "${ac_cv_header_metis_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for metis.h" >&5 -$as_echo_n "checking for metis.h... " >&6; } -if test "${ac_cv_header_metis_h+set}" = set; then + + +for ac_header in limits.h metis.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_metis_h" >&5 -$as_echo "$ac_cv_header_metis_h" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking metis.h usability" >&5 -$as_echo_n "checking metis.h usability... " >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9847,7 +10574,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -9880,15 +10607,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext $as_echo "$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking metis.h presence" >&5 -$as_echo_n "checking metis.h presence... " >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -9922,25 +10649,25 @@ $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: metis.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: metis.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: metis.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: metis.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: metis.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: metis.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: metis.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: metis.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: metis.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: metis.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: metis.h: in the future, the compiler will take precedence" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------------------- ## ## Report this to salvatore.filippone@uniroma2.it ## @@ -9949,23 +10676,31 @@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ $as_echo "$as_me:$LINENO: checking for metis.h" >&5 -$as_echo_n "checking for metis.h... " >&6; } -if test "${ac_cv_header_metis_h+set}" = set; then +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else - ac_cv_header_metis_h=$ac_header_preproc + eval "$as_ac_Header=\$ac_header_preproc" fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_metis_h" >&5 -$as_echo "$ac_cv_header_metis_h" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test "x$ac_cv_header_metis_h" = x""yes; then - pac_metis_header_ok=yes +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + pac_metis_header_ok=yes else pac_metis_header_ok=no; METIS_INCLUDES="" fi +done fi