--- gforth/configure.in 2007/03/17 19:14:57 1.174 +++ gforth/configure.in 2007/03/25 21:30:59 1.178 @@ -94,9 +94,19 @@ if test "$enable_ec" = "yes"; then echo "defining standalone system" AC_DEFINE(STANDALONE,,[Define if you want a Gforth without OS]) EC_MODE="true" + EC="-ec" + engine2="" + engine_fast2="" + no_dynamic="-DNO_DYNAMIC" + image_i="image.i" else echo "defining hosted system" EC_MODE="false" + EC="" + engine2="engine2.o" + engine_fast2="engine-fast2.o" + no_dynamic="" + image_i="" fi #variables mentioned in INSTALL @@ -118,6 +128,7 @@ AC_ARG_VAR(ac_cv_c_bigendian, [Is the ta AC_ARG_VAR(no_dynamic_default, [run gforth with --dynamic (0) or --no-dynamic (1) by default]) AC_ARG_VAR(skipcode, [assembly code for skipping 16 bytes of code]) AC_ARG_VAR(asmcomment, [assembler comment start string]) +AC_ARG_VAR(arm_cacheflush, [file containing ARM cacheflush function (without .c)]) #set up feature test macros, so the tests get them right: # turn on all POSIX, SUSv3, and GNU features if available @@ -144,7 +155,12 @@ test "$GCC" = "yes" || AC_MSG_ERROR(Gfor AC_SUBST(CC) AC_SUBST(DEBUGFLAG) +AC_SUBST(EC) AC_SUBST(EC_MODE) +AC_SUBST(engine2) +AC_SUBST(engine_fast2) +AC_SUBST(no_dynamic) +AC_SUBST(image_i) #this is used to disable some (not generally essential) part of the #Makefile that some makes don't grok. It would be better to test for @@ -172,10 +188,16 @@ case "$host_cpu" in arm*) machine=arm CFLAGS="$CFLAGS -fomit-frame-pointer" - if test -z $no_dynamic_default; then + if test -z $arm_cacheflush; then no_dynamic_default=1 + arm_cacheflush=arch/arm/cacheflush0 AC_MSG_WARN([No I-cache flush code known, disabling dynamic native code generation]) fi + AC_LIBSOURCES([../arch/arm/cacheflush0, ../arch/arm/cacheflush1, ../arch/arm/cacheflush2]) + AC_LIBOBJ(../$arm_cacheflush) + #longer skipcodes lead to problems on ARM, and it uses + #only 4-byte alignment anyway + test "$skipcode" || skipcode="nop" ;; hppa*) machine=hppa @@ -643,7 +665,7 @@ if test -z "$asmcomment"; then asmcomment=no CFLAGS_1="$CFLAGS" CFLAGS="$CFLAGS $ENGINE_FLAGS" - for i in '"# "' '"! "'; do + for i in '"# "' '"! "' '"; "'; do AC_TRY_COMPILE(,[asm($i"fluffystunk");],asmcomment=$i; break,) done CFLAGS=$CFLAGS_1 @@ -712,7 +734,9 @@ AC_CHECK_FUNCS(mmap sysconf getpagesize) AM_PATH_LISPDIR kernel_fi=kernl${wordsize}${bytesex}.fi +include_fi=kernl${wordsize}${bytesex}${EC}.fi AC_SUBST(kernel_fi) +AC_SUBST(include_fi) #this breaks bindists #dnl replace srource directory by absolute value