Browse Source

Fall back to `cc` as default compiler when `gcc` is not available

pull/360/head^2
Mislav Marohnić 10 years ago
parent
commit
294cff3fd4
1 changed files with 10 additions and 3 deletions
  1. +10
    -3
      src/configure

+ 10
- 3
src/configure View File

@ -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
echo "no compiler found: $CC" >&2
if ! type -p "$CC" >/dev/null; then
echo "aborted: compiler not found: $CC" >&2
exit 1 exit 1
fi fi

Loading…
Cancel
Save