mirror of
https://github.com/rbenv/rbenv.git
synced 2024-12-28 20:55:38 +01: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%/*}"
|
||||
|
||||
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
|
||||
echo "no compiler found: $CC" >&2
|
||||
if ! type -p "$CC" >/dev/null; then
|
||||
echo "aborted: compiler not found: $CC" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue