--- gforth/configure.in 2011/04/19 16:19:32 1.289 +++ gforth/configure.in 2011/11/15 12:56:28 1.291 @@ -71,6 +71,7 @@ if test "$withval" = "yes"; then DEBUGFL GCC_LD="\$(GCC)" EC_MODE="false" NO_EC="" +NO_CROSS="" EC="" engine2='engine2$(OPT).o' engine_fast2='engine-fast2$(OPT).o' @@ -90,6 +91,7 @@ else EC_MODE="true" EC="-ec" NO_EC="#" + NO_CROSS="#" engine2="" engine_fast2="" no_dynamic="-DNO_DYNAMIC" @@ -108,6 +110,23 @@ else platform=${withval} fi]) +AC_ARG_WITH(cross, + AC_HELP_STRING([--with-cross=], + [ Build gforth using a cross compiler.]), +[if test "$withval" = "no"; then + echo "defining hosted system" +else + echo "defining cross compiled system (${withval})" + if test -f "arch/$host_cpu/${withval}/config.sh"; then + source "arch/$host_cpu/${withval}/config.sh" + fi + GCC_PATH=$(which $CC) + LIB_PATH=${GCC_PATH%/*/*} + platform=${withval} + NO_EC="" + NO_CROSS="#" +fi]) + #variables mentioned in INSTALL AC_ARG_VAR(CC, [The C compiler (must support GNU C 2.x).]) AC_ARG_VAR(FORTHSIZES, [Gforth command line options for the default stack and dictionary sizes (see INSTALL).]) @@ -172,6 +191,7 @@ AC_SUBST(GCC_LD) AC_SUBST(DEBUGFLAG) AC_SUBST(EC) AC_SUBST(NO_EC) +AC_SUBST(NO_CROSS) AC_SUBST(EC_MODE) AC_SUBST(engine2) AC_SUBST(engine_fast2)