summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authormikael <mikael@FreeBSD.org>2021-09-26 09:51:07 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-05-11 08:22:13 -0400
commit5b791ed3baf9875931c3bf3b67e8d83d0b3c94e2 (patch)
tree7c7a646dad29380f7d4d7cabf62ecc66e5f84024 /m4
parentfec3e7aa72bee69ef3a3f363709377990650a5d3 (diff)
downloadhaskell-5b791ed3baf9875931c3bf3b67e8d83d0b3c94e2.tar.gz
FIND_LLVM_PROG: Recognize llvm suffix used by FreeBSD, ie llc10.
Diffstat (limited to 'm4')
-rw-r--r--m4/find_llvm_prog.m44
1 files changed, 2 insertions, 2 deletions
diff --git a/m4/find_llvm_prog.m4 b/m4/find_llvm_prog.m4
index ea2031a9f6..8aaa6179c3 100644
--- a/m4/find_llvm_prog.m4
+++ b/m4/find_llvm_prog.m4
@@ -1,7 +1,7 @@
# FIND_LLVM_PROG()
# --------------------------------
# Find where the llvm tools are. We have a special function to handle when they
-# are installed with a version suffix (e.g., llc-7, llc-7.0) and without (e.g.
+# are installed with a version suffix (e.g., llc-7, llc-7.0, llc7) and without (e.g.
# llc).
#
# $1 = the variable to set
@@ -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"; done)
+ PROG_VERSION_CANDIDATES=$(for llvmVersion in `seq $4 -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}}}'`