--- gforth/configure.in 2007/01/21 17:29:53 1.167 +++ gforth/configure.in 2007/02/26 19:07:05 1.173 @@ -53,17 +53,6 @@ AC_ARG_ENABLE(force-ll, test "$enable_force_ll" = "no"|| AC_DEFINE(FORCE_LL,,[Define if you want to use explicit long long declarations for better performance (does not work with all GCC versions on all machines)]) -AC_ARG_ENABLE(gcc-pr15242-workaround, - AC_HELP_STRING([--disable-gcc-pr15242-workaround],[Disables - dynamic code generation on some versions of gcc - (slowdown~2 on Athlon) and causes slower building - of gforth (but gforth speedups) on others. - (default enabled)]), - ,enable_gcc_pr15242_workaround=yes) -test "$enable_gcc_pr15242_workaround" = "no"|| -AC_DEFINE(GCC_PR15242_WORKAROUND,,[Define if you want to get dynamic code -generation on gccs affected by PR15242]) - AC_ARG_ENABLE(force-cdiv, AC_HELP_STRING([--enable-force-cdiv], [ Use the native C division - symmetric - instead of @@ -99,12 +88,14 @@ dnl PEEPHOLE="$withval") AC_ARG_ENABLE(ec, AC_HELP_STRING([--enable-ec], - [ Build gforth for systems without OS.]), + [ Build gforth for systems without OS.]), ,enable_ec=no) if test "$enable_ec" = "yes"; then - AC_DEFINE(HAVE_EC,,[Define if you want a Gforth without OS]) + echo "defining standalone system" + AC_DEFINE(STANDALONE,,[Define if you want a Gforth without OS]) EC_MODE="true" else + echo "defining hosted system" EC_MODE="false" fi @@ -112,6 +103,8 @@ fi AC_ARG_VAR(CC, [The C compiler (must support GNU C 2.x); gcc-2.95 recommended.]) AC_ARG_VAR(FORTHSIZES, [Gforth command line options for the default stack and dictionary sizes (see INSTALL).]) AC_ARG_VAR(STACK_CACHE_DEFAULT_FAST, [number of registers in the default stack cache state for gforth-fast and gforth-native (default 1).]) +AC_ARG_VAR(GCC_PR15242_WORKAROUND, [Force the enabling (1) or disabling (0) of a workaround for a gcc-3.x performance bug (default unset: use workaround for gcc-3.x)]) + AC_ARG_VAR(ac_cv_sizeof_char_p, [sizeof(char *)]) AC_ARG_VAR(ac_cv_sizeof_char, [sizeof(char)]) AC_ARG_VAR(ac_cv_sizeof_short, [sizeof(short)]) @@ -150,7 +143,6 @@ test "$GCC" = "yes" || AC_MSG_ERROR(Gfor AC_SUBST(CC) AC_SUBST(DEBUGFLAG) -AC_SUBST(HAVE_EC) AC_SUBST(EC_MODE) AC_MSG_CHECKING(make type) @@ -279,6 +271,14 @@ test x$STACK_CACHE_DEFAULT_FAST = x && S AC_DEFINE_UNQUOTED(STACK_CACHE_DEFAULT_FAST, $STACK_CACHE_DEFAULT_FAST, [number of registers in the default stack cache state for gforth-fast and gforth-native]) +test x$GCC_PR15242_WORKAROUND = x || +AC_DEFINE_UNQUOTED(GCC_PR15242_WORKAROUND, $GCC_PR15242_WORKAROUND, + [force (1) or forbid (0) use of a workaround for a gcc performance bug]) + +dnl AC_DEFINE(GCC_PR15242_WORKAROUND,,[Define if you want to get dynamic code +dnl generation on gccs affected by PR15242]) + + if test "${enable_force_ll+set}" = set; then ac_includes_default="$ac_includes_default #include \"arch/generic/128bit.h\"" @@ -539,6 +539,10 @@ AC_DEFINE_UNQUOTED(PATHSEP,'$PATHSEP',[a AC_SUBST(DEFAULTSYSTEMPREFIX) AC_DEFINE_UNQUOTED(DEFAULTSYSTEMPREFIX,"$DEFAULTSYSTEMPREFIX",[default for environment variable GFORTHSYSTEMPREFIX]) +#work around SELinux brain damage (from Andrew Haley <12t8f3jakb74g2c@news.supernews.com>) +#This magic incantation seems to be completely undocumented. +AC_CHECK_PROG([MASSAGE_EXE],[chcon],[chcon -t unconfined_execmem_exec_t],[true]) + dnl Now a little support for DOS/DJGCC AC_SUBST(GFORTH_EXE) GFORTH_EXE="" @@ -585,8 +589,8 @@ else fi #check how to do asm(".skip 16") -echo "CFLAGS=$CFLAGS" -echo "ac_link=$ac_link" +#echo "CFLAGS=$CFLAGS" +#echo "ac_link=$ac_link" AC_MSG_CHECKING([if and how we can waste code space]) if test -z "$skipcode"; then skipcode=no