On FreeBSD, passing extra options to `which` causes it to report a non-zero status:
```
$ which gfortran48 -m64
/usr/local/bin/gfortran48
$ echo $?
1
```
```
$ which gfortran48
/usr/local/bin/gfortran48
$ echo $?
0
```
$nofortran = 0;
$compiler = join(" ", @ARGV);
+$compiler_bin = shift(@ARGV);
# f77 is too ambiguous
$compiler = "" if $compiler eq "f77";
} else {
- $data = `which $compiler > /dev/null 2> /dev/null`;
+ $data = `which $compiler_bin > /dev/null 2> /dev/null`;
$vendor = "";
if (!$?) {
}
}
-$data = `which $compiler > /dev/null 2> /dev/null`;
+$data = `which $compiler_bin > /dev/null 2> /dev/null`;
if (!$?) {