Skip to content
Snippets Groups Projects
Commit 77ce65a5 authored by Matthew Pickering's avatar Matthew Pickering Committed by Marge Bot
Browse files

Expand LLVM version matching regex for compability with bsd systems

sed on BSD systems (such as darwin) does not support the + operation.

Therefore we take the simple minded approach of manually expanding
group+ to groupgroup*.

Fixes #24999
parent b0944623
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ AC_DEFUN([FIND_LLVM_PROG],[ ...@@ -14,7 +14,7 @@ AC_DEFUN([FIND_LLVM_PROG],[
PROG_VERSION_CANDIDATES=$(for llvmVersion in `seq $(($4-1)) -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], []) AC_CHECK_TOOLS([$1], [$PROG_VERSION_CANDIDATES $2], [])
AS_IF([test x"$$1" != x],[ AS_IF([test x"$$1" != x],[
PROG_VERSION=`$$1 --version | sed -n -e 's/.*version \(\([[0-9]]\+\.\)\+[[0-9]]\+\).*/\1/gp'` PROG_VERSION=`$$1 --version | sed -n -e 's/.*version \(\([[0-9]][[0-9]]*\.\)\([[0-9]][[0-9]]*\.\)*[[0-9]][[0-9]]*\).*/\1/gp'`
AS_IF([test x"$PROG_VERSION" = x], AS_IF([test x"$PROG_VERSION" = x],
[AC_MSG_RESULT(no) [AC_MSG_RESULT(no)
$1="" $1=""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment