diff autogen.sh @ 14185:d584f90d2c47 stable

configure: search for gfortran first instead of g77 * autogen.sh: Avoid g77 by editing generated configure script and substituting gfortran for g77.
author John W. Eaton <jwe@octave.org>
date Tue, 10 Jan 2012 14:00:24 -0500
parents b67c2d580a25
children 5bb929d8b4f9
line wrap: on
line diff
--- a/autogen.sh	Mon Jan 09 20:32:27 2012 -0500
+++ b/autogen.sh	Tue Jan 10 14:00:24 2012 -0500
@@ -37,3 +37,15 @@
 echo "bootstrapping..."
 
 build-aux/bootstrap "$@"
+
+## 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