configure: do not rely on pathsearch if full executable path provided.

This issue was pointed out by Mark Callaghan. Fixes #90.
ck_pring
Samy Al Bahra 8 years ago
parent 24d26965d1
commit f8d5022030

8
configure vendored

@ -561,9 +561,11 @@ else
fi fi
printf "Finding suitable compiler........" printf "Finding suitable compiler........"
CC=`pathsearch "${CC:-cc}"` if test ! -x "${CC}"; then
if test -z "$CC" -o ! -x "$CC"; then CC=`pathsearch "${CC:-cc}"`
if test -z "$CC" -o ! -x "$CC"; then
CC=`pathsearch "${CC:-gcc}"` CC=`pathsearch "${CC:-gcc}"`
fi
fi fi
assert "$CC" "not found" assert "$CC" "not found"
@ -596,7 +598,7 @@ int main(void) {
EOF EOF
$CC -o .1 .1.c $CC -o .1 .1.c
COMPILER=`./.1` COMPILER=`./.1 2> /dev/null`
r=$? r=$?
rm -f .1.c .1 rm -f .1.c .1

Loading…
Cancel
Save