From 44124d3055fe09449ca591fad2db22a20a01d252 Mon Sep 17 00:00:00 2001 From: Zaheer Chothia Date: Sun, 20 May 2012 18:11:34 +0200 Subject: [PATCH] Fix Fortran compiler detection - Test with '-x' operator to ensure file is executable. - 'break' is not a valid Perl keyword. --- f_check | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/f_check b/f_check index 93c39ec88..8e3855b10 100644 --- a/f_check +++ b/f_check @@ -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; } } }