Fix Fortran compiler detection

- Test with '-x' operator to ensure file is executable.
- 'break' is not a valid Perl keyword.
This commit is contained in:
Zaheer Chothia 2012-05-20 18:11:34 +02:00
parent 14c3511e92
commit 44124d3055
1 changed files with 3 additions and 2 deletions

View File

@ -32,11 +32,12 @@ if ($compiler eq "") {
"pgf95", "pgf90", "pgf77",
"ifort");
OUTER:
foreach $lists (@lists) {
foreach $path (@path) {
if (-f $path . "/" . $lists) {
if (-x $path . "/" . $lists) {
$compiler = $lists;
break;
last OUTER;
}
}
}