diff -ur fort77-1.18.old/fort77 fort77-1.18/fort77 --- fort77-1.18.old/fort77 1999-04-19 05:19:36.000000000 -0700 +++ fort77-1.18/fort77 2005-06-20 10:18:58.000000000 -0700 @@ -15,6 +15,11 @@ $debug = 0; $cc = $ENV{'CC'} || 'cc'; +# Programs which use GNU libtool 1.5 will set $ENV{CC} to "fort77" +# when invoking the Fortran compiler. We need to override this to +# avoid getting stuck in a loop. +$cc = "cc" if $cc =~ /fort77$/; + # Loop over all options; pull all options from @ARGV and put all # arguments into @argv. This is needed because, apparently, UNIX # compilers acceppt options anywhere on the command line. @@ -191,7 +196,8 @@ push(@fopts,$nnflag); push(@copts,'-ffast-math') if $optimize && $fast_math; -push(@cppopts,@includes); +push(@cppopts,@includes,"-I/include"); +push(@lopts,"-L/lib"); push(@fopts,@includes,"-I."); push(@fopts, @pfiles); @@ -253,7 +259,7 @@ if ($cpp || ($ffile =~ /\.F$/)) { # Backslashes at the end of comment lines confuse cpp... - $pipe = "| /lib/cpp -traditional " . + $pipe = '| /usr/bin/cpp | grep -v "#pragma" ' . join(' ',@cppopts) . " | f2c " . join(' ',@fopts) . $debugcmd . "2>$xtmperrout > $cfile "; print STDERR "$0: Running \"$pipe\"" if $verbose;