From: Alan W. I. <ir...@be...> - 2006-05-08 23:51:49
|
On 2006-05-08 10:07+0200 Arjen Markus wrote: >> [Alan said] >> BTW, you may have noticed in one of my commit messages that I had to >> change >> the name of that example file from x01f.f95 to x01f.f. The autotools >> weren't properly understanding that f95 suffix despite documentation >> saying >> that they should. I think they are stuck part way through the fortran 77 >> to >> fortran 95 transition so funny things are going on that we have to work >> around (as in renaming the examples file with a ".f" suffix.) > > This is bad news: it means that most compilers will assume the files to be > in fixed-form. You can usually add an option to force them to read the > file as free-form, but that is not the solution I would prefer. OK, I took the hint, and tried harder, and we now have good news again. I was just making some dumb mistake with the suffix rule so once I figured that out I switched back to using x01f.f95 (and changed it to use free-form). When I made the appropriate adjustment to examples/f95/Makefile.am to use x01f.f95 rather than x01f.f, automake did the right thing and started using $FC to build and $FCFLAGS and $AM_FCFLAGS for the flags. Therefore, I decided to make a consistent change for *.f to *.f95 (using free form) in bindings/f95 as well. Despite these rather large changes everything (including make check now) seems to continue to work fine. Also, during this latest test, I cvs updated to get Andrew's bounding-box change, and that works fine on my system as well. Arjen, please be careful. All the f95-related fortran source files in bindings/f95 and examples/f95 now have the f95 suffix (and it should remain that way). So cvs update will remove any *.f form from those directories. So back those files up if you want to preserve your work before executing cvs update, and use the *.f95 form from now on for those particular directories. My previous conclusion that FC, FCFLAGS, and AM_FCFLAGS was unused was only correct for the *.f case. These flags are the ones used (and F77, FFLAGS, and AM_FFLAGS ignored) for the present case where bindings/f95 and examples/f95 only have *.f95 files. For the case of bindings/f77 and examples/f77 where all source files are in the *.f form (and should remain that way), the reverse is true. So autotools is doing exactly the right thing and using the correct set of variables when *.f files are encountered and similarly when *.f95 files are encountered. I now output FC and FCFLAGS in the configure summary since those flags are important in the .f95 suffix case. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |