--- gforth/configure.in 2010/05/17 09:01:11 1.277 +++ gforth/configure.in 2010/09/13 18:18:11 1.282 @@ -20,7 +20,7 @@ dnl Process this file with autoconf to p dnl We use some automake macros here, dnl but don't use automake for creating Makefile.in -AC_INIT([gforth],[0.7.0-20090215],[https://savannah.gnu.org/bugs/?func=addbug&group=gforth]) +AC_INIT([gforth],[0.7.0-20100807],[https://savannah.gnu.org/bugs/?func=addbug&group=gforth]) AC_PREREQ(2.54) #snapshots have numbers major.minor.release-YYYYMMDD #note that lexicographic ordering must be heeded. @@ -242,14 +242,20 @@ case "$host_cpu" in ;; i486) machine=386 - CFLAGS="$CFLAGS -fomit-frame-pointer -fforce-addr -m486" + CFLAGS="$CFLAGS -fomit-frame-pointer -fforce-addr" + CFLAGS_1="$CFLAGS" + CFLAGS="$CFLAGS -march=i486" + AC_TRY_COMPILE(,,,CFLAGS="$CFLAGS_1 -m486") + AC_TRY_COMPILE(,,,CFLAGS="$CFLAGS_1") ;; i*86) machine=386 CFLAGS="$CFLAGS -fomit-frame-pointer -fforce-addr" CFLAGS_1="$CFLAGS" - CFLAGS="$CFLAGS -march=pentium" + CFLAGS="$CFLAGS -march=pentium -mtune=generic" + AC_TRY_COMPILE(,,,CFLAGS="$CFLAGS_1 -march=pentium") AC_TRY_COMPILE(,,,CFLAGS="$CFLAGS_1 -m486") + AC_TRY_COMPILE(,,,CFLAGS="$CFLAGS_1") ;; x86_64) case $CC @@ -282,6 +288,7 @@ case "$host_cpu" in ;; mips*) machine=mips + AC_LIBOBJ(../arch/mips/check_prim) #dynamic native code has the following problems on MIPS: # #1) J/JAL seems relocatable, but is are only @@ -693,14 +700,16 @@ AC_MSG_RESULT($PREFORTH) dnl AC_CHECK_PROG(asm_fs,asm.fs,arch/$machine/asm.fs,,$srcdir/arch/$machine) if test x$EC_MODE = xfalse then - AC_CHECK_FILE($srcdir/arch/$machine/asm.fs,[asm_fs=arch/$machine/asm.fs],) + AS_IF([test -f $srcdir/arch/$machine/asm.fs], + [asm_fs=arch/$machine/asm.fs]) fi AC_SUBST(asm_fs) dnl AC_CHECK_PROG(disasm_fs,disasm.fs,arch/$machine/disasm.fs,,$srcdir/arch/$machine) if test x$EC_MODE = xfalse then - AC_CHECK_FILE($srcdir/arch/$machine/disasm.fs,[disasm_fs=arch/$machine/disasm.fs],) + AS_IF([test -f $srcdir/arch/$machine/disasm.fs], + [disasm_fs=arch/$machine/disasm.fs]) fi AC_SUBST(disasm_fs) @@ -805,7 +814,11 @@ fi #echo "CFLAGS=$CFLAGS" #echo "ac_link=$ac_link" AC_MSG_CHECKING([if and how we can waste code space]) -if test -z "$skipcode"; then +if test -z "$skipcode" && test x$cross_compiling = xyes; then + # we cannot perform the AC_TRY_RUN check when cross-compiling. + skipcode=no + AC_MSG_RESULT([$skipcode, can't run checks since cross-compiling]) +elif test -z "$skipcode"; then skipcode=no CFLAGS_1="$CFLAGS" CFLAGS="$CFLAGS $ENGINE_FLAGS" @@ -843,7 +856,7 @@ then no_dynamic_default=1 AC_MSG_WARN(Disabling default dynamic native code generation) fi - AC_DEFINE_UNQUOTED(SKIP16,((void)0),statement for skipping 16 bytes) + AC_DEFINE_UNQUOTED(SKIP16,asm(""),statement for skipping 16 bytes) else AC_DEFINE_UNQUOTED(SKIP16,asm("$skipcode"),statement for skipping 16 bytes) fi