I have several compilers with the same name but of different versions or location.
The ./configure script seems to stop at the first it finds in PATH. How can I tell Automake to choose one of them according to a custom rule ? I already have a macro which can check the compiler version.
I would like to avoid setting the path by hand (with the FC variable) as it can be cumbersome to type each time the whole path.
In my case, several MPI wrapper compilers are located in different directories with the same name (and added to the PATH by the user).
The idea would be to use something like ./configure --with-intel to find and select the IntelMPI compiler.
My solution : copy the search strategy of
configurein a macro, with a custom matching criterion. ParsingPATHis done by setting theIFSvariable (which is already defined in configure). In Bash, finding all the executables would be something like :Note: This is recommanded in the manual