Fix overriding CXX setting

If user specifies CXX, use it as-is, since that's the user's choice.

Closes #292
This commit is contained in:
Dan Church 2018-02-04 15:40:31 -06:00 committed by Stephen Anthony
parent 3ab2ddb870
commit 77479cc0dd
1 changed files with 18 additions and 14 deletions

32
configure vendored
View File

@ -348,22 +348,26 @@ esac
# Determine the C++ compiler
#
echo_n "Looking for C++ compiler... "
if test -n "$_host"; then
compilers="$CXX $_host_prefix-g++ $_host_prefix-c++ $_host_cpu-$_host_os-g++ $_host_cpu-$_host_os-c++"
if test -n "$CXX"; then
echo $CXX
else
compilers="$CXX g++ c++"
fi
for compiler in $compilers; do
if test_compiler "$compiler -std=c++14"; then
CXX=$compiler
echo $CXX
break
if test -n "$_host"; then
compilers="$_host_prefix-g++ $_host_prefix-c++ $_host_cpu-$_host_os-g++ $_host_cpu-$_host_os-c++"
else
compilers="g++ c++"
fi
for compiler in $compilers; do
if test_compiler "$compiler -std=c++14"; then
CXX=$compiler
echo $CXX
break
fi
done
if test -z "$CXX"; then
echo "none found!"
exit 1
fi
done
if test -z $CXX; then
echo "none found!"
exit 1
fi
#