How does a package like ATLAS know which compilers I have installed on my system?
Like many unix applications, atlas has a
configure script that you run as first part of the build process. Atlas' configure script will try to find a fortran compiler by trying known variants. You can also give it a specific path (
-Ss f77lib /path/goes/here) or disable the use of fortran altogether (
Can't say about ATLAS specifically, but FORTRAN compilers have a few possible names, and it can just cycle through the possibilities. Taken to the limit, this is what the GNU autotools do.