summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-03 17:49:22 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-03 17:49:22 +0000
commit03418c4e5f551ec6d899580c9a5e86bbc37c649d (patch)
tree424cc64d6aecc48b3c3efd84402c28d980ebb435 /configure.in
parentae51324199bf96cbb7439583900bd20bd51186b8 (diff)
* configure.in: set CXX variable to the C++ compiler that matches the
C compiler specified by CC variable (e.g. use g++-4.2 for gcc-4.2). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 01c2b99010..0236edb04e 100644
--- a/configure.in
+++ b/configure.in
@@ -87,6 +87,7 @@ if test "$MAJOR" = "1"; then
AC_DEFINE(CANONICALIZATION_FOR_MATHN)
fi
dnl checks for alternative programs
+AC_CANONICAL_BUILD
AC_ARG_WITH(gcc,
AS_HELP_STRING([--without-gcc], [never use gcc]),
[
@@ -100,6 +101,14 @@ then
AC_MSG_ERROR(cached CC is different -- throw away $cache_file
(it is also a good idea to do 'make clean' before compiling))
fi
+AS_CASE(["$build_os"],
+ [darwin11.*], [
+ 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++}],
+ [xclang|x/usr/bin/clang], [: ${CXX=clang++}])
+ ])
test -z "$CC" || ac_cv_prog_CC="$CC"
if test "$program_prefix" = NONE; then