--- mozilla/configure.in~ 2009-07-29 22:40:48.000000000 +0300 +++ mozilla/configure.in 2009-07-29 22:41:17.255773820 +0300 @@ -250,98 +250,8 @@ esac if test -n "$CROSS_COMPILE" && test "$target" != "$host"; then - echo "cross compiling from $host to $target" - cross_compiling=yes - - _SAVE_CC="$CC" - _SAVE_CFLAGS="$CFLAGS" - _SAVE_LDFLAGS="$LDFLAGS" - - AC_MSG_CHECKING([for host c compiler]) - AC_CHECK_PROGS(HOST_CC, $HOST_CC gcc cc /usr/ucb/cc cl icc, "") - if test -z "$HOST_CC"; then - AC_MSG_ERROR([no acceptable c compiler found in \$PATH]) - fi - AC_MSG_RESULT([$HOST_CC]) - AC_MSG_CHECKING([for host c++ compiler]) - AC_CHECK_PROGS(HOST_CXX, $HOST_CXX $CCC c++ g++ gcc CC cxx cc++ cl icc, "") - if test -z "$HOST_CXX"; then - AC_MSG_ERROR([no acceptable c++ compiler found in \$PATH]) - fi - AC_MSG_RESULT([$HOST_CXX]) - - if test -z "$HOST_CFLAGS"; then - HOST_CFLAGS="$CFLAGS" - fi - if test -z "$HOST_CXXFLAGS"; then - HOST_CXXFLAGS="$CXXFLAGS" - fi - if test -z "$HOST_LDFLAGS"; then - HOST_LDFLAGS="$LDFLAGS" - fi - AC_CHECK_PROGS(HOST_RANLIB, $HOST_RANLIB ranlib, ranlib, :) - AC_CHECK_PROGS(HOST_AR, $HOST_AR ar, ar, :) - CC="$HOST_CC" - CFLAGS="$HOST_CFLAGS" - LDFLAGS="$HOST_LDFLAGS" - - AC_MSG_CHECKING([whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works]) - AC_TRY_COMPILE([], [return(0);], - [ac_cv_prog_hostcc_works=1 - AC_MSG_RESULT([yes])], - AC_MSG_ERROR([installation or configuration problem: host compiler $HOST_CC cannot create executables.]) ) - - CC="$HOST_CXX" - CFLAGS="$HOST_CXXFLAGS" - - AC_MSG_CHECKING([whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works]) - AC_TRY_COMPILE([], [return(0);], - [ac_cv_prog_hostcxx_works=1 - AC_MSG_RESULT([yes])], - AC_MSG_ERROR([installation or configuration problem: host compiler $HOST_CXX cannot create executables.]) ) - - CC=$_SAVE_CC - CFLAGS=$_SAVE_CFLAGS - LDFLAGS=$_SAVE_LDFLAGS - - case "$build:$target" in - powerpc-apple-darwin8*:i?86-apple-darwin*) - dnl The Darwin cross compiler doesn't necessarily point itself at a - dnl root that has libraries for the proper architecture, it defaults - dnl to the system root. The libraries in the system root on current - dnl versions of PPC OS X 10.4 aren't fat, so these target compiler - dnl checks will fail. Fake a working SDK in that case. - _SAVE_CFLAGS=$CFLAGS - _SAVE_CXXFLAGS=$CXXLAGS - CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS" - CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CXXFLAGS" - ;; - esac - - AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", :) - unset ac_cv_prog_CC - AC_PROG_CC - AC_CHECK_PROGS(CXX, $CXX "${target_alias}-g++" "${target}-g++", :) - unset ac_cv_prog_CXX - AC_PROG_CXX - - case "$build:$target" in - powerpc-apple-darwin8*:i?86-apple-darwin*) - dnl Revert the changes made above. From this point on, the target - dnl compiler will never be used without applying the SDK to CFLAGS - dnl (see --with-macos-sdk below). - CFLAGS=$_SAVE_CFLAGS - CXXFLAGS=$_SAVE_CXXFLAGS - ;; - esac - - AC_CHECK_PROGS(RANLIB, $RANLIB "${target_alias}-ranlib" "${target}-ranlib", :) - AC_CHECK_PROGS(AR, $AR "${target_alias}-ar" "${target}-ar", :) - AC_PATH_PROGS(AS, $AS "${target_alias}-as" "${target}-as", :) - AC_CHECK_PROGS(LD, $LD "${target_alias}-ld" "${target}-ld", :) - AC_CHECK_PROGS(STRIP, $STRIP "${target_alias}-strip" "${target}-strip", :) - AC_CHECK_PROGS(WINDRES, $WINDRES "${target_alias}-windres" "${target}-windres", :) - AC_DEFINE(CROSS_COMPILE) + echo >&2 Cross compile block breaks whole configure script + exit 1 else AC_PROG_CC AC_PROG_CXX