Add require_cc again

This commit is contained in:
Yamashita Yuu 2014-01-10 12:11:42 +09:00
parent efd9c1cd48
commit b025dbfdab

View file

@ -848,6 +848,20 @@ verify_gcc() {
echo "$gcc" echo "$gcc"
} }
require_cc() {
local cc=("$@")
while [ -n "${cc}" ]; do
{ if [ "${#cc[@]}" -le 1 ]; then
"require_${cc}" # display last error
else
"require_${cc}" 3>/dev/null
fi
} && return 0
cc=("${cc[@]:1}")
done
return 1
}
require_clang() { require_clang() {
local clang="$(command -v "$CC" || command -v "clang" || true)" local clang="$(command -v "$CC" || command -v "clang" || true)"