# HG changeset patch # User Rik # Date 1417143262 28800 # Node ID 8d267cca249e7606e85160923d6dc0f3e04ede13 # Parent 7c31a83e25bc373ebfe751ba009670ff0bfa2042 build: Don't build with g77. * bootstrap.conf: Remove bootstrap_epilogue () section. * configure.ac: Check for gfortran ahead of other Fortran compilers. Issue error message and stop configure if g77 is the only compiler found. diff -r 7c31a83e25bc -r 8d267cca249e bootstrap.conf --- a/bootstrap.conf Tue Nov 25 12:45:36 2014 -0500 +++ b/bootstrap.conf Thu Nov 27 18:54:22 2014 -0800 @@ -188,19 +188,3 @@ (cd libinterp/dldfcn; ./config-module.sh) } -bootstrap_epilogue () -{ - ## G77 is obsolete, but it is still the first option in the autoconf - ## Fortran macros. We should avoid it, because mixing old versions of - ## g77 with modern gcc and g++ causes trouble. The following will - ## make it harder (but not impossible) for users to make this mistake. - ## - ## FIXME -- we should really work to fix autoconf so that it prefers - ## gfortran over g77 even when searching for a Fortran 77 compiler. - - echo "replacing all occurrences of g77 with gfortran in configure script..." - - sed 's/g77/gfortran/g' configure > configure.t - mv configure.t configure - chmod 755 configure -} diff -r 7c31a83e25bc -r 8d267cca249e configure.ac --- a/configure.ac Tue Nov 25 12:45:36 2014 -0500 +++ b/configure.ac Thu Nov 27 18:54:22 2014 -0800 @@ -613,8 +613,17 @@ FFLAGS="-O" fi -## the F77 variable, if set, overrides AC_PROG_F77 automatically -AC_PROG_F77 +## Prefer gfortran, but the user's F77 environment variable will override. +AC_PROG_F77([gfortran]) +if test -z "$F77"; then + ## No gfortran found, search for any other installed compiler. + AC_PROG_F77 +fi +if test "$F77" = g77; then + AC_MSG_ERROR([g77 is not a supported Fortran compiler. Select another compiler by setting the environment variable F77 and re-running configure.]) +fi + +## Determine calling conventions for Fortran compiler AC_F77_LIBRARY_LDFLAGS AC_F77_DUMMY_MAIN AC_F77_WRAPPERS