Commit 355002c4 authored by dterei's avatar dterei

Better handling of find llvm tools. Use IFS as opposed to more hacky tr

approach. This way can handle spaces in paths.
parent f469eff8
......@@ -1963,9 +1963,16 @@ AC_DEFUN([XCODE_VERSION],[
#
AC_DEFUN([FIND_LLVM_PROG],[
FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL([$1], [$2], [$3])
if test "$$1" == ""; then
GOOD_PATH=`echo $PATH | tr ':,;' ' '`
$1=`${FindCmd} ${GOOD_PATH} -type f -perm +111 -maxdepth 1 -regex '.*/$3-[[0-9]]\.[[0-9]]' -or -type l -perm +111 -maxdepth 1 -regex '.*/$3-[[0-9]]\.[[0-9]]' | ${SortCmd} -n | tail -1`
if test "$$1" != ""; then
save_IFS=$IFS
IFS=":;"
for p in ${PATH}; do
$1=`${FindCmd} ${p} -type f -perm +111 -maxdepth 1 -regex '.*/$3-[[0-9]]\.[[0-9]]' -or -type l -perm +111 -maxdepth 1 -regex '.*/$3-[[0-9]]\.[[0-9]]' | ${SortCmd} -n | tail -1`
if test -n "${LLC}"; then
break
fi
done
IFS=$save_IFS
fi
])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment