From b7c8c5c190a43b863ef1eaeda63669a6eba297bc Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 30 Sep 2025 21:29:24 +0200 Subject: [PATCH] Fix autodetection in the presence of compiler arguments --- f_check | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/f_check b/f_check index 244f6bcae3..4b9f95b06e 100755 --- a/f_check +++ b/f_check @@ -30,9 +30,11 @@ nofortran=0 shift 2 compiler="$*" compiler_bin="$1" +shift +compiler_args="$*" # f77 is too ambiguous -[ "$compiler" = "f77" ] && compiler='' +[ "$compiler_bin" = "f77" ] && compiler='' path=`split "$PATH" ':'` @@ -50,7 +52,7 @@ if [ -z "$compiler" ]; then for list in $lists; do for p in $path; do if [ -x "$p/$list" ]; then - compiler=$list + compiler="$list $compiler_args" compiler_bin=$list break 2 fi