[mpich2-commits] r7831 - in mpich2/trunk: confdb test/mpi
chan at mcs.anl.gov
chan at mcs.anl.gov
Tue Jan 25 22:28:44 CST 2011
Author: chan
Date: 2011-01-25 22:28:43 -0600 (Tue, 25 Jan 2011)
New Revision: 7831
Modified:
mpich2/trunk/confdb/aclocal_f77.m4
mpich2/trunk/confdb/aclocal_f77new.m4
mpich2/trunk/confdb/aclocal_fc.m4
mpich2/trunk/test/mpi/configure.in
Log:
patched PAC_PROG_F*_HAS_POINTER to check for extra cray-pointer flag so allocmenf* tests can be carried if compiler support is there. This resolves req#1079.
Modified: mpich2/trunk/confdb/aclocal_f77.m4
===================================================================
--- mpich2/trunk/confdb/aclocal_f77.m4 2011-01-25 19:45:58 UTC (rev 7830)
+++ mpich2/trunk/confdb/aclocal_f77.m4 2011-01-26 04:28:43 UTC (rev 7831)
@@ -1158,34 +1158,6 @@
])
-dnl /*D
-dnl PAC_PROG_F77_HAS_POINTER - Determine if Fortran allows pointer type
-dnl
-dnl Synopsis:
-dnl PAC_PROG_F77_HAS_POINTER(action-if-true,action-if-false)
-dnl D*/
-AC_DEFUN([PAC_PROG_F77_HAS_POINTER],[
-AC_CACHE_CHECK([whether Fortran has pointer declaration],
-pac_cv_prog_f77_has_pointer,[
-AC_LANG_SAVE
-AC_LANG_FORTRAN77
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
- integer M
- pointer (MPTR,M)
- data MPTR/0/
-])],
- pac_cv_prog_f77_has_pointer="yes",
- pac_cv_prog_f77_has_pointer="no")
-AC_LANG_RESTORE
-])
-if test "$pac_cv_prog_f77_has_pointer" = "yes" ; then
- ifelse([$1],,:,[$1])
-else
- ifelse([$2],,:,[$2])
-fi
-])
-
-
dnl pac_prog_f77_run_proc_from_c( c main program, fortran routine,
dnl action-if-works, action-if-fails,
dnl cross-action )
Modified: mpich2/trunk/confdb/aclocal_f77new.m4
===================================================================
--- mpich2/trunk/confdb/aclocal_f77new.m4 2011-01-25 19:45:58 UTC (rev 7830)
+++ mpich2/trunk/confdb/aclocal_f77new.m4 2011-01-26 04:28:43 UTC (rev 7831)
@@ -52,3 +52,39 @@
AC_LANG_POP([Fortran 77])
AC_MSG_RESULT([$pac_cv_f77_accepts_F])
])
+
+
+dnl /*D
+dnl PAC_PROG_F77_HAS_POINTER - Determine if Fortran allows pointer type
+dnl
+dnl Synopsis:
+dnl PAC_PROG_F77_HAS_POINTER(action-if-true,action-if-false)
+dnl D*/
+AC_DEFUN([PAC_PROG_F77_HAS_POINTER],[
+AC_CACHE_CHECK([whether Fortran 77 supports Cray-style pointer],
+pac_cv_prog_f77_has_pointer,[
+AC_LANG_PUSH([Fortran 77])
+AC_LANG_CONFTEST([
+ AC_LANG_PROGRAM([],[
+ integer M
+ pointer (MPTR,M)
+ data MPTR/0/
+ ])
+])
+saved_FFLAGS="$FFLAGS"
+pac_cv_prog_f77_has_pointer=""
+for ptrflag in '' '-fcray-pointer' ; do
+ FFLAGS="$saved_FFLAGS $ptrflag"
+ AC_COMPILE_IFELSE([], [pac_cv_prog_f77_has_pointer="yes";break], [])
+done
+if test "$pac_cv_prog_f77_has_pointer" = "yes" -a "X$ptrflag" != "X" ; then
+ pac_cv_prog_f77_has_pointer="with $ptrflag"
+fi
+AC_LANG_POP([Fortran 77])
+])
+if test "X$pac_cv_prog_f77_has_pointer" != "X" ; then
+ ifelse([$1],,:,[$1])
+else
+ ifelse([$2],,:,[$2])
+fi
+])
Modified: mpich2/trunk/confdb/aclocal_fc.m4
===================================================================
--- mpich2/trunk/confdb/aclocal_fc.m4 2011-01-25 19:45:58 UTC (rev 7830)
+++ mpich2/trunk/confdb/aclocal_fc.m4 2011-01-26 04:28:43 UTC (rev 7831)
@@ -419,23 +419,28 @@
dnl PAC_PROG_FC_HAS_POINTER(action-if-true,action-if-false)
dnl D*/
AC_DEFUN([PAC_PROG_FC_HAS_POINTER],[
-AC_CACHE_CHECK([whether Fortran 90 has Cray-style pointer declaration],
+AC_CACHE_CHECK([whether Fortran 90 supports Cray-style pointer],
pac_cv_prog_fc_has_pointer,[
AC_LANG_PUSH(Fortran)
-AC_COMPILE_IFELSE([
+AC_LANG_CONFTEST([
AC_LANG_PROGRAM([],[
integer M
pointer (MPTR,M)
data MPTR/0/
])
-],[
- pac_cv_prog_fc_has_pointer="yes"
-],[
- pac_cv_prog_fc_has_pointer="no"
-]) dnl Endof AC_COMPILE_IFELSE
+])
+saved_FCFLAGS="$FCFLAGS"
+pac_cv_prog_fc_has_pointer=""
+for ptrflag in '' '-fcray-pointer' ; do
+ FCFLAGS="$saved_FCFLAGS $ptrflag"
+ AC_COMPILE_IFELSE([], [pac_cv_prog_fc_has_pointer="yes";break], [])
+done
+if test "$pac_cv_prog_fc_has_pointer" = "yes" -a "X$ptrflag" != "X" ; then
+ pac_cv_prog_fc_has_pointer="with $ptrflag"
+fi
AC_LANG_POP(Fortran)
])
-if test "$pac_cv_prog_fc_has_pointer" = "yes" ; then
+if test "X$pac_cv_prog_fc_has_pointer" != "X" ; then
ifelse([$1],,:,[$1])
else
ifelse([$2],,:,[$2])
Modified: mpich2/trunk/test/mpi/configure.in
===================================================================
--- mpich2/trunk/test/mpi/configure.in 2011-01-25 19:45:58 UTC (rev 7830)
+++ mpich2/trunk/test/mpi/configure.in 2011-01-26 04:28:43 UTC (rev 7831)
@@ -976,12 +976,6 @@
if test "$FROM_MPICH2" = yes ; then
# Set compilers/flags to be substituted in output files, e.g. Makefiles.
LDFLAGS="$saveLDFLAGS"
- # As part of MPICH2 configure, set all xFLAGS to null
- # as mpiXX already contains xFLAGS.
- CFLAGS=""
- CXXFLAGS=""
- FFLAGS=""
- FCFLAGS=""
# note that the default definition of bindir is
# '${exec_prefix}/bin'
# so even if prefix is set, exec prefix is not until
More information about the mpich2-commits
mailing list