version 1.176, 2007/03/18 21:46:01
|
version 1.183, 2007/04/15 20:33:46
|
Line 21 dnl Process this file with autoconf to p
|
Line 21 dnl Process this file with autoconf to p
|
|
|
dnl We use some automake macros here, |
dnl We use some automake macros here, |
dnl but don't use automake for creating Makefile.in |
dnl but don't use automake for creating Makefile.in |
AC_INIT([gforth],[0.6.2-20060527],[https://savannah.gnu.org/bugs/?func=addbug&group=gforth]) |
AC_INIT([gforth],[0.6.9-20070401],[https://savannah.gnu.org/bugs/?func=addbug&group=gforth]) |
AC_PREREQ(2.54) |
AC_PREREQ(2.54) |
#snapshots have numbers major.minor.release-YYYYMMDD |
#snapshots have numbers major.minor.release-YYYYMMDD |
#note that lexicographic ordering must be heeded. |
#note that lexicographic ordering must be heeded. |
Line 86 dnl --without-peephole disables peepho
|
Line 86 dnl --without-peephole disables peepho
|
dnl but slower images.], |
dnl but slower images.], |
dnl PEEPHOLE="$withval") |
dnl PEEPHOLE="$withval") |
|
|
AC_ARG_ENABLE(ec, |
AC_ARG_WITH(ec, |
AC_HELP_STRING([--enable-ec], |
AC_HELP_STRING([--with-ec=<arch>], |
[ Build gforth for systems without OS.]), |
[ Build gforth for systems without OS.]), |
,enable_ec=no) |
[if test "$withval" = "no"; then |
if test "$enable_ec" = "yes"; then |
|
echo "defining standalone system" |
|
AC_DEFINE(STANDALONE,,[Define if you want a Gforth without OS]) |
|
EC_MODE="true" |
|
else |
|
echo "defining hosted system" |
echo "defining hosted system" |
EC_MODE="false" |
EC_MODE="false" |
fi |
EC="" |
|
engine2="engine2.o" |
|
engine_fast2="engine-fast2.o" |
|
no_dynamic="" |
|
image_i="" |
|
signals_o="io.o signals.o" |
|
GCC_LD="\$(GCC)" |
|
else |
|
echo "defining standalone system (${withval})" |
|
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" |
|
if test "$withval" != "yes"; then |
|
signals_o="io-${withval}.o" |
|
else |
|
signals_o="io.o" |
|
fi |
|
GCC_PATH=$(which $CC) |
|
LIB_PATH=${GCC_PATH%/*/*} |
|
GCC_LD="\$(LD)" |
|
plattform=${withval} |
|
fi]) |
|
|
#variables mentioned in INSTALL |
#variables mentioned in INSTALL |
AC_ARG_VAR(CC, [The C compiler (must support GNU C 2.x); gcc-2.95 recommended.]) |
AC_ARG_VAR(CC, [The C compiler (must support GNU C 2.x); gcc-2.95 recommended.]) |
Line 106 AC_ARG_VAR(STACK_CACHE_DEFAULT_FAST, [nu
|
Line 126 AC_ARG_VAR(STACK_CACHE_DEFAULT_FAST, [nu
|
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(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_p, [sizeof(char *)]) |
|
AC_ARG_VAR(ac_cv_sizeof_void_p, [sizeof(void *)]) |
AC_ARG_VAR(ac_cv_sizeof_char, [sizeof(char)]) |
AC_ARG_VAR(ac_cv_sizeof_char, [sizeof(char)]) |
AC_ARG_VAR(ac_cv_sizeof_short, [sizeof(short)]) |
AC_ARG_VAR(ac_cv_sizeof_short, [sizeof(short)]) |
AC_ARG_VAR(ac_cv_sizeof_int, [sizeof(int)]) |
AC_ARG_VAR(ac_cv_sizeof_int, [sizeof(int)]) |
Line 144 AC_PROG_CC
|
Line 165 AC_PROG_CC
|
test "$GCC" = "yes" || AC_MSG_ERROR(Gforth uses GNU C extensions and requires GCC 2.0 or higher) |
test "$GCC" = "yes" || AC_MSG_ERROR(Gforth uses GNU C extensions and requires GCC 2.0 or higher) |
|
|
AC_SUBST(CC) |
AC_SUBST(CC) |
|
AC_SUBST(GCC_LD) |
AC_SUBST(DEBUGFLAG) |
AC_SUBST(DEBUGFLAG) |
|
AC_SUBST(EC) |
AC_SUBST(EC_MODE) |
AC_SUBST(EC_MODE) |
|
AC_SUBST(engine2) |
|
AC_SUBST(engine_fast2) |
|
AC_SUBST(no_dynamic) |
|
AC_SUBST(image_i) |
|
AC_SUBST(signals_o) |
|
|
#this is used to disable some (not generally essential) part of the |
#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 |
#Makefile that some makes don't grok. It would be better to test for |
Line 173 case "$host_cpu" in
|
Line 201 case "$host_cpu" in
|
arm*) |
arm*) |
machine=arm |
machine=arm |
CFLAGS="$CFLAGS -fomit-frame-pointer" |
CFLAGS="$CFLAGS -fomit-frame-pointer" |
|
if test x$plattform = xnxt; then |
|
CFLAGS="$CFLAGS -mthumb -mthumb-interwork" |
|
fi |
if test -z $arm_cacheflush; then |
if test -z $arm_cacheflush; then |
no_dynamic_default=1 |
no_dynamic_default=1 |
arm_cacheflush=arch/arm/cacheflush0 |
arm_cacheflush=arch/arm/cacheflush0 |
Line 180 case "$host_cpu" in
|
Line 211 case "$host_cpu" in
|
fi |
fi |
AC_LIBSOURCES([../arch/arm/cacheflush0, ../arch/arm/cacheflush1, ../arch/arm/cacheflush2]) |
AC_LIBSOURCES([../arch/arm/cacheflush0, ../arch/arm/cacheflush1, ../arch/arm/cacheflush2]) |
AC_LIBOBJ(../$arm_cacheflush) |
AC_LIBOBJ(../$arm_cacheflush) |
|
#longer skipcodes lead to problems on ARM, and it uses |
|
#only 4-byte alignment anyway |
|
test "$skipcode" || skipcode="nop" |
;; |
;; |
hppa*) |
hppa*) |
machine=hppa |
machine=hppa |
Line 272 case "$host_cpu" in
|
Line 306 case "$host_cpu" in
|
esac |
esac |
AC_SUBST(host) |
AC_SUBST(host) |
|
|
|
echo "Check for arch/$machine/$plattform/gforth.ld ($EC_MODE)" |
|
if test x$EC_MODE = xtrue |
|
then |
|
echo "Check for arch/$machine/$plattform/gforth.ld" |
|
if test -f arch/$machine/$plattform/gforth.ld |
|
then |
|
LDFLAGS="-T ../arch/$machine/$plattform/gforth.ld -Map \$@.map -cref --gc-sections $LDFLAGS" |
|
if test x$plattform = xnxt; then |
|
LIBS="$LIB_PATH/lib/gcc/arm-elf/$($CC --version | grep GCC | cut -d' ' -f3)/interwork/libgcc.a $LIB_PATH/arm-elf/lib/interwork/libc.a $LIBS" |
|
fi |
|
fi |
|
fi |
|
|
test x$STACK_CACHE_DEFAULT_FAST = x && STACK_CACHE_DEFAULT_FAST=1 |
test x$STACK_CACHE_DEFAULT_FAST = x && STACK_CACHE_DEFAULT_FAST=1 |
AC_DEFINE_UNQUOTED(STACK_CACHE_DEFAULT_FAST, $STACK_CACHE_DEFAULT_FAST, |
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]) |
[number of registers in the default stack cache state for gforth-fast and gforth-native]) |
Line 303 case "$ac_cv_sizeof_char_p" in
|
Line 350 case "$ac_cv_sizeof_char_p" in
|
;; |
;; |
esac |
esac |
|
|
|
AC_CHECK_SIZEOF(void *) |
|
case "$ac_cv_sizeof_void_p" in |
|
2) |
|
vwordsize=16 |
|
;; |
|
4) |
|
vwordsize=32 |
|
;; |
|
8) |
|
vwordsize=64 |
|
;; |
|
esac |
|
|
AC_CHECK_SIZEOF(char) |
AC_CHECK_SIZEOF(char) |
AC_CHECK_SIZEOF(short) |
AC_CHECK_SIZEOF(short) |
AC_CHECK_SIZEOF(int) |
AC_CHECK_SIZEOF(int) |
Line 715 test $ac_cv_func_fnmatch_works = yes ||
|
Line 775 test $ac_cv_func_fnmatch_works = yes ||
|
AC_CHECK_FUNCS(mmap sysconf getpagesize) |
AC_CHECK_FUNCS(mmap sysconf getpagesize) |
AM_PATH_LISPDIR |
AM_PATH_LISPDIR |
|
|
kernel_fi=kernl${wordsize}${bytesex}.fi |
kernel_fi=kernl${vwordsize}${bytesex}.fi |
|
include_fi=kernl${wordsize}${bytesex}${EC}.fi |
AC_SUBST(kernel_fi) |
AC_SUBST(kernel_fi) |
|
AC_SUBST(include_fi) |
|
|
#this breaks bindists |
#this breaks bindists |
#dnl replace srource directory by absolute value |
#dnl replace srource directory by absolute value |