diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.in | 9 |
2 files changed, 14 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Thu Aug 4 02:45:10 2011 Kenta Murata <mrkn@mrkn.jp> + + * 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). + Thu Aug 4 02:21:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org> * lib/mkmf.rb (link_command): use static library only for bundled 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 |