summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/find_llvm_prog.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/m4/find_llvm_prog.m4 b/m4/find_llvm_prog.m4
index 353765a0fd..ece1fafee0 100644
--- a/m4/find_llvm_prog.m4
+++ b/m4/find_llvm_prog.m4
@@ -11,7 +11,7 @@
#
AC_DEFUN([FIND_LLVM_PROG],[
# Test for program with and without version name.
- PROG_VERSION_CANDIDATES=$(for llvmVersion in `seq $4 -1 $3`; do echo "$2-$llvmVersion $2-$llvmVersion.0 $2$llvmVersion"; done)
+ PROG_VERSION_CANDIDATES=$(for llvmVersion in `seq $(($4-1)) -1 $3`; do echo "$2-$llvmVersion $2-$llvmVersion.0 $2$llvmVersion"; done)
AC_CHECK_TOOLS([$1], [$PROG_VERSION_CANDIDATES $2], [])
AS_IF([test x"$$1" != x],[
PROG_VERSION=`$$1 --version | awk '/.*version [[0-9\.]]+/{for(i=1;i<=NF;i++){ if(\$i ~ /^[[0-9\.]]+$/){print \$i}}}'`