Bug 700175 - Port
Bug 697881 "XCode 4.2 no longer provides a gcc-4.2" to c-c. r=Callek, a=Standard8
--- a/configure.in
+++ b/configure.in
@@ -184,17 +184,17 @@ then
***
EOF
exit 1
break
fi
fi
MOZ_BUILD_ROOT=`pwd`
-dnl Default to MSVC for win32 and gcc-4.2 for darwin
+dnl Default to MSVC for win32 and gcc for darwin
dnl ==============================================================
if test -z "$CROSS_COMPILE"; then
case "$target" in
*-cygwin*|*-mingw*|*-msvc*|*-mks*)
if test -z "$CC"; then CC=cl; fi
if test -z "$CXX"; then CXX=cl; fi
if test -z "$CPP"; then CPP="cl -E -nologo"; fi
if test -z "$CXXCPP"; then CXXCPP="cl -TP -E -nologo"; ac_cv_prog_CXXCPP="$CXXCPP"; fi
@@ -207,18 +207,20 @@ case "$target" in
x86_64)
AS=ml64;
;;
esac
fi
if test -z "$MIDL"; then MIDL=midl; fi
;;
*-darwin*)
- if test -z "$CC"; then CC=gcc-4.2; fi
- if test -z "$CXX"; then CXX=g++-4.2; fi
+ # we prefer gcc-4.2 over gcc on older darwin, so
+ # use that specific version if it's available.
+ MOZ_PATH_PROGS(CC, $CC gcc-4.2 gcc)
+ MOZ_PATH_PROGS(CXX, $CXX g++-4.2 g++)
;;
esac
fi
COMPILE_ENVIRONMENT=1
MOZ_ARG_DISABLE_BOOL(compile-environment,
[ --disable-compile-environment
Disable compiler/library checks.],