autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autoconf-2.57f: make check: 2 Errors related to fort77 (fink package


From: Akim Demaille
Subject: Re: autoconf-2.57f: make check: 2 Errors related to fort77 (fink package) on Mac OS X
Date: Mon, 27 Oct 2003 17:43:56 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

 > On Fri, 3 Oct 2003, Sander Niemeijer wrote:
 >> However, IMHO producing an error when a fortran 77 compiler does not 
 >> allow freeform code might not be desirable. It will prevent using 
 >> autoconf for perfectly valid f77 code. But maybe you have some good 
 >> reasons  to not support non-freeform compilers that I am not aware of.

 > It won't prevent anyone from using autoconf.  There is only an error if
 > the user specifically calls AC_FC_FREEFORM, i.e. if they specifically
 > request freeform support and it fails.  (Also, the caller can override the
 > error failure if they have a fallback.)  Presumably, a user of plain f77
 > code will not request freeform support.

 > The test suite is a different matter.  With most compilers, the test suite
 > just gives a warning if Fortran doesn't accept free-form source, but it is
 > currently set to give an error if it fails for g77.  Unfortunately,
 > as you point out, the g77 detection is somewhat flakey.

 > Actually, Akim, using 'if test "$G77" = yes; then' in tests/fortran.at
 > with AC_FC_FREEFORM is currently wrong anyway, because G77 is only set by
 > AC_PROG_F77, not by AC_PROG_FC.

But fortran.at tests Fortran 77, not Fortran.  I don't know how I am
expected to solve this issue.  Please, help me!

## --------------------- ##
## Fortran 77 Compiler.  ##
## --------------------- ##


AT_CHECK_MACRO([GNU Fortran 77],
[[AC_LANG(Fortran 77)
AC_LANG_COMPILER

if AC_TRY_COMMAND([$F77 --version | grep GNU >&2]); then
  # Be sure to remove files which might be created by compilers that
  # don't support --version.
  rm -f a.exe a.out
  # Has GNU in --version.
  test "$G77" != yes &&
    AC_MSG_ERROR([failed to recognize GNU Fortran 77 compiler])
else
  # Be sure to remove files which might be created by compilers that
  # don't support --version.
  rm -f a.exe a.out
  # Has not.
  test "$G77" = yes &&
    AC_MSG_ERROR([incorrectly recognized a GNU Fortran 77 compiler])
fi

# No Fortran compiler is known not to support "*.f".
AC_FC_SRCEXT([f])

# GNU Fortran is known to support freeform.
AC_FC_FREEFORM([],
               [AC_MSG_WARN([Fortran does not accept free-form source])])
if test "$G77" = yes; then
  case $FCFLAGS in
   *-ffree-form*) ;;
   *) AC_MSG_ERROR([failed to recognize G77's -ffree-form option.]);;
  esac
fi
]])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]