If you have the compat-gcc-34-g77 package installed, octave's configure script picks g77 in preference to gfortran. Since that's gcc 3.4, it then fails to build because of gcc4-only parameters in $RPM_OPT_FLAGS. Putting --with-f77=gfortran ensures that it finds the proper compiler every time.
This has been added to 2.9.13 in the development branch.