[Top][All Lists]

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

Avoiding g77

From: Rik
Subject: Avoiding g77
Date: Tue, 25 Nov 2014 23:08:41 -0800



I think the best solution may be an explicit check for g77 and issuing an
error message if it is selected.

I was concerned about the brittleness of the sed solution, and accidentally
found that it is not robust.  The prologue which replaces g77 with gfortran
is run at the end of the bootstrap sequence.  However, if the time stamp on
configure.ac is modified, then the existing Makefiles take care of
re-running aclocal, automake, and autoconf.  They do not run any bootstrap
epilogue so the effect is to re-instate the default AC_PROG_F77 macro from
autoconf which has g77 listed first.  If you are a developer, adjusting the
time stamp can happen whenever you do an 'hg update' where there has been a
change in configure.ac.  This is important because 'make dist' packages up
the configure script that it finds into the tarball.  If one isn't aware of
this oddity then the wrong configure script can be exported to everyone.  I
checked the tarballs for versions 3.8.2, 3.8.1, 3.8.0, and 3.6.4 and they,
at least, are clean.

To test:
sudo ln -s /usr/bin/gfortran /usr/bin/g77     # Fake having g77
make maintainer-clean
cp configure configure.first   #  In case you want to see how the original
differs from the new one
./configure --options |& tee first.config.log
touch configure.ac
make |& tee make.log    # Use Ctrl+C after autoconf has finished running so
you don't need to wait for all of Octave to build
open configure with your favorite text editor and search for AC_PROG_F77

----- Results ------
## the F77 variable, if set, overrides AC_PROG_F77 automatically
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS
if test -n "$ac_tool_prefix"; then
  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90
pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran
pgf95 lf95 ftn
g77 is listed first again.


reply via email to

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