1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-10 04:23:47 -05:00

Use cc as $CC if require_cc has called (#148)

This commit is contained in:
Yamashita Yuu
2014-03-28 22:00:09 +09:00
parent cac8fd7f60
commit f5fded3b9d
55 changed files with 68 additions and 65 deletions

View File

@@ -969,17 +969,20 @@ verify_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
local cc="$(command -v "$CC" || command -v "cc" || true)"
if [ -z "$cc" ]; then
{ echo
colorize 1 "ERROR"
echo ": This package must be compiled with cc, but python-build couldn't"
echo "find a suitable \`cc\` executable on your system. Please install cc"
echo "and try again."
echo
} >&3
return 1
fi
export CC
}
require_clang() {