Fix compiler detection if CXX is preset to a working compiler but contains a space
svn-id: r39634
This commit is contained in:
parent
3b5a14916d
commit
082c1f782d
1 changed files with 18 additions and 12 deletions
22
configure
vendored
22
configure
vendored
|
@ -874,21 +874,27 @@ EOF
|
|||
}
|
||||
|
||||
# Prepare a list of candidates for the C++ compiler
|
||||
if test -n "$_host"; then
|
||||
compilers="$CXX $_host_alias-g++ $_host_alias-c++ $_host-g++ $_host-c++"
|
||||
if test -n "$CXX" && test_compiler "$CXX"; then
|
||||
# Use the compiler specified in CXX
|
||||
echo $CXX
|
||||
else
|
||||
compilers="$CXX g++ c++"
|
||||
fi
|
||||
if test -n "$_host"; then
|
||||
compilers="$_host_alias-g++ $_host_alias-c++ $_host-g++ $_host-c++"
|
||||
else
|
||||
compilers="g++ c++"
|
||||
fi
|
||||
|
||||
# Iterate over all candidates, pick the first working one
|
||||
CXX=
|
||||
for compiler in $compilers; do
|
||||
# Iterate over all candidates, pick the first working one
|
||||
CXX=
|
||||
for compiler in $compilers; do
|
||||
if test_compiler $compiler; then
|
||||
CXX=$compiler
|
||||
echo $CXX
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
if test -z "$CXX"; then
|
||||
echo "none found!"
|
||||
exit 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue