mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Fall back to cc
as default compiler when gcc
is not available
This commit is contained in:
parent
a6e0785b84
commit
294cff3fd4
1 changed files with 10 additions and 3 deletions
13
src/configure
vendored
13
src/configure
vendored
|
@ -3,10 +3,17 @@ set -e
|
||||||
|
|
||||||
src_dir="${0%/*}"
|
src_dir="${0%/*}"
|
||||||
|
|
||||||
CC="${CC:-gcc}"
|
if [ -z "$CC" ]; then
|
||||||
|
if type -p gcc >/dev/null; then
|
||||||
|
CC=gcc
|
||||||
|
else
|
||||||
|
echo "warning: gcc not found; using CC=cc" >&2
|
||||||
|
CC=cc
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if ! which "$CC" &>/dev/null; then
|
if ! type -p "$CC" >/dev/null; then
|
||||||
echo "no compiler found: $CC" >&2
|
echo "aborted: compiler not found: $CC" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue