Creating a simple fortran Autotools based project

Hi Mary, welcome to Discourse!

The book 21st Century C by Ben Klemens has a section titled “Packaging Your Code with Autotools” (pg. 79) which offers a short introduction. The Autotools workflow is summarized by the following chart:

Another source of information could be looking at existing Fortran projects using Autotools. One I’m aware of is PSBLAS. A Google search has also led me to AstroBEAR, which offers some materials on the Use [of] GNU Autotools (PDF, 305 kB).

Generally speaking, the issue you encounter with GNU Autotools and Fortran is how to capture the module dependencies. We’ve had a few discussions on that topic already including

Several tools exist to automate generation of these dependencies in the makefile rule format, including compiler built-in ones, makedepf90 or fdep (Autotools specific), however YMMV. Since you say your are contributing to an (existing) big library, it is likely your project already has some mechanisms/conventions for capturing module dependencies (either automated or manually/explicitly).

3 Likes