mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Refined the appropriate C++ compiler in OS X selection
Allows CC to be prefixed another path or command, e.g., ccache.
This commit is contained in:
parent
b4dfac2c12
commit
5e10cb04e8
1 changed files with 14 additions and 9 deletions
21
configure.ac
21
configure.ac
|
@ -198,14 +198,19 @@ AS_CASE([$CC],
|
|||
[gcc_prefix= gcc_suffix=])
|
||||
|
||||
dnl Select the appropriate C++ compiler in OS X
|
||||
AS_CASE(["$build_os"],
|
||||
[darwin1*.*], [
|
||||
AS_CASE(["x$CC"],
|
||||
[xgcc-4.2|x/usr/bin/gcc-4.2], [: ${CXX=g++-4.2}],
|
||||
[xgcc|x/usr/bin/gcc], [: ${CXX=g++}],
|
||||
[xcc|x/usr/bin/cc], [: ${CXX=c++}],
|
||||
[xicc], [: ${CXX=icpc}],
|
||||
[xclang|x/usr/bin/clang], [: ${CXX=clang++}])
|
||||
AS_CASE(["$build_os:${CXX}"],
|
||||
[darwin1*.*:], [
|
||||
AC_MSG_CHECKING([CXX for $CC])
|
||||
AS_CASE(["/$CC "],
|
||||
[*" gcc-4.2 "*|*"/gcc-4.2 "*], [pat='gcc-4\.2' =g++-4.2],
|
||||
[*" gcc "*|*"/gcc "*], [pat=gcc CXX=g++],
|
||||
[*" cc "*|*"/cc "*], [pat=cc CXX=c++],
|
||||
[*" icc "*|*"/icc "*], [pat=icc CXX=icpc],
|
||||
[*" clang "*|*"/clang "*], [pat=clang CXX=clang++])
|
||||
AS_IF([test "${CXX}"], [
|
||||
CXX=`echo "/$CC " | sed ["s:\([ /]\)${pat}:\1$CXX:; s:^/::; s: *$::"]`
|
||||
])
|
||||
AC_MSG_RESULT([$CXX])
|
||||
])
|
||||
test -z "$CXX" || ac_cv_prog_CXX="$CXX"
|
||||
|
||||
|
|
Loading…
Reference in a new issue