File gfortran.patch of Package mpich
--- mpe/aclocal_f77.m4.orig 2006-01-24 13:09:59.000000000 +0100
+++ mpe/aclocal_f77.m4 2006-01-24 14:08:55.000000000 +0100
@@ -348,10 +348,10 @@
dnl will catch most systems and will speed up the tests.
dnl
dnl Next, the libraries are only added if they are needed to complete a
-dnl link; they aren't added just because they exist.
+dnl link; they aren''t added just because they exist.
dnl
dnl f77argdef
-dnlD*/
+dnl D*/
dnl
dnl Random notes
dnl You can export the command line arguments from C to the g77 compiler
@@ -396,9 +396,10 @@
if test -z "$ac_fcompilelink" ; then
ac_fcompilelink="${F77-f77} -o conftest $FFLAGS $flags conftest.f $LDFLAGS $LIBS 1>&AC_FD_CC"
fi
- AC_MSG_CHECKING([if ${F77-f77} $flags $libs works with GETARG and IARGC])
+ AC_MSG_CHECKING([whether ${F77-f77} $flags $libs works with GETARG and IARGC])
if AC_TRY_EVAL(ac_fcompilelink) && test -x conftest ; then
- if test "$ac_cv_prog_f77_cross" = "no" ; then
+ # Check that cross != yes so that this works with autoconf 2.52
+ if test "$ac_cv_prog_f77_cross" != "yes" ; then
if ./conftest >/dev/null 2>&1 ; then
found_answer="yes"
FXX_MODULE="$fxx_module"
@@ -492,7 +493,7 @@
+U77"
fi
# Discard options that are not available:
- save_IFS="$IFS"
+ # (IFS already saved above)
IFS="
"
save_trial_FLAGS="$trial_FLAGS"
@@ -518,7 +519,7 @@
end
EOF
if test -n "$fflag" ; then flagval="with $fflag" ; else flagval="" ; fi
- AC_MSG_CHECKING([that Fortran 77 routine names are case-insensitive $flagval])
+ AC_MSG_CHECKING([whether Fortran 77 routine names are case-insensitive $flagval])
dnl we can use double quotes here because all is already
dnl evaluated
ac_fcompilelink_test="${F77-f77} -o conftest $fflag $FFLAGS conftest.f $LDFLAGS $LIBS 1>&AC_FD_CC"
@@ -594,6 +595,13 @@
continue
fi
;;
+ 7) # gfortran won't find getarg if it is marked as external
+ FXX_MODULE=""
+ F77_GETARGDECL="intrinsic GETARG"
+ F77_GETARG="call GETARG(i,s)"
+ F77_IARGC="IARGC()"
+ MSG="intrinsic GETARG and IARGC"
+ ;;
*) # exit from while loop
FXX_MODULE=""
F77_GETARGDECL=""
@@ -631,13 +639,13 @@
if test "$libs" = " " -o "$libs" = "0" ; then libs="" ; fi
for flags in $trial_FLAGS ; do
if test "$flags" = " " -o "$flags" = "000"; then flags="" ; fi
- AC_MSG_CHECKING([if ${F77-f77} $flags $libs works with $MSG])
+ AC_MSG_CHECKING([whether ${F77-f77} $flags $libs works with $MSG])
IFS="$save_IFS"
dnl We need this here because we've fiddled with IFS
ac_fcompilelink_test="${F77-f77} -o conftest $FFLAGS $flags conftest.f $LDFLAGS $libs $LIBS 1>&AC_FD_CC"
found_answer="no"
if AC_TRY_EVAL(ac_fcompilelink_test) && test -x conftest ; then
- if test "$ac_cv_prog_f77_cross" = "no" ; then
+ if test "$ac_cv_prog_f77_cross" != "yes" ; then
if ./conftest >/dev/null 2>&1 ; then
found_answer="yes"
fi