dnl autoconf; autoheader; automake
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(jit.c)
+AC_INIT(main.c)
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE(cacao, 0.40)
dnl system type
-ASMPART="asmpart.S"
case "$host_cpu" in
alpha* )
- SYSDEP_DIR="alpha"
+ ARCH_DIR="alpha"
CFLAGS="-mieee -O0 -g3 -D__ALPHA__"
- COMPILER_OBJECTS=""
AC_DEFINE(TRACE_ARGS_NUM, 6)
AC_DEFINE(USE_CODEMMAP)
;;
+i386* | i486* | i586* | i686* )
+ ARCH_DIR="i386"
+ CFLAGS="-Wall -O0 -g3 -D__I386__"
+ AC_DEFINE(TRACE_ARGS_NUM, 8)
+ AC_DEFINE(USE_CODEMMAP)
+ ;;
+
mips* )
- SYSDEP_DIR="mips"
- ASMPART="asmpart.s"
+ ARCH_DIR="mips"
CFLAGS="-64 -O2 -OPT:Olimit=0 -g -DMAP_ANONYMOUS=0 -woff 1110,1164,1515 -D__MIPS__"
LIBS="-lelfutil"
- COMPILER_OBJECTS=""
AC_DEFINE(TRACE_ARGS_NUM, 8)
;;
-i386* | i486* | i586* | i686* )
- SYSDEP_DIR="i386"
- CFLAGS="-O0 -g3 -D__I386__"
- COMPILER_OBJECTS="i386/libdisass.a"
+powerpc* | ppc* )
+ ARCH_DIR="powerpc"
+ CFLAGS="-O2 -g -DMAP_ANONYMOUS=0 -no-cpp-precomp"
AC_DEFINE(TRACE_ARGS_NUM, 8)
- AC_DEFINE(USE_CODEMMAP)
;;
x86_64* )
- SYSDEP_DIR="x86_64"
+ ARCH_DIR="x86_64"
CFLAGS="-O0 -g3 -D__X86_64__"
- COMPILER_OBJECTS="x86_64/libdisass.a"
AC_DEFINE(TRACE_ARGS_NUM, 6)
AC_DEFINE(USE_CODEMMAP)
;;
-powerpc* | ppc* )
- SYSDEP_DIR="powerpc"
- CFLAGS="-O2 -g -DMAP_ANONYMOUS=0 -no-cpp-precomp"
- COMPILER_OBJECTS="powerpc/libdisass.a"
- AC_DEFINE(TRACE_ARGS_NUM, 8)
- ;;
-
sparc* | * )
- AC_MSG_ERROR($target systems are not supported at this time)
+ AC_MSG_ERROR($host_cpu systems are not supported at this time)
;;
esac
AC_SUBST(COMPILER_OBJECTS)
-AC_SUBST(ASMPART)
-AC_DEFINE_UNQUOTED(SYSDEP_DIR, "$SYSDEP_DIR")
-AC_SUBST(SYSDEP_DIR)
+AC_DEFINE_UNQUOTED(ARCH_DIR, "$ARCH_DIR")
+AC_SUBST(ARCH_DIR)
dnl Checks for programs.
AC_PROG_CC
dnl check arguments
AC_ARG_ENABLE(threads, [ --enable-threads enable threads support])
-AC_ARG_WITH(gc, [ --with-gc[=ARG] use garbage collector [gc2,gc1,boehm]])
dnl threads
AC_MSG_CHECKING(whether to include threads support)
AC_SUBST(THREAD_OBJ)
fi
-dnl garbage collector version
-AC_MSG_CHECKING(which garbage collector to use)
-case "$with_gc" in
-gc1 )
- AC_MSG_RESULT(old garbage collector)
- GC_OBJ="mm/libmm_old.a"
- ;;
-gc2 )
- AC_MSG_RESULT(new garbage collector)
- GC_OBJ="mm/libmm_new.a"
- ;;
-boehm | "" )
- AC_MSG_RESULT(Boehm garbage collector)
- GC_OBJ="mm/libboehm.a libgc.a"
- if test ! -e libgc.a; then
- AC_MSG_ERROR([libgc.a not found, see README.boehm])
- fi
- AC_DEFINE(USE_BOEHM)
- BOEHM_LIB="libboehm.a"
- ;;
-* )
- AC_MSG_ERROR(Invalid GC)
- ;;
-esac
-AC_SUBST(GC_OBJ)
-AC_SUBST(BOEHM_LIB)
+dnl now configure boehm gc
+AC_CONFIG_SUBDIRS(mm/boehm-gc)
AC_OUTPUT(Makefile \
- toolbox/Makefile \
mm/Makefile \
+ toolbox/Makefile \
threads/Makefile \
jit/Makefile \
- alpha/Makefile \
- mips/Makefile \
- i386/Makefile \
- x86_64/Makefile \
- powerpc/Makefile \
+ jit/loop/Makefile \
+ jit/alpha/Makefile \
+ jit/i386/Makefile \
+ jit/mips/Makefile \
+ jit/powerpc/Makefile \
+ jit/x86_64/Makefile \
nat/Makefile \
doc/Makefile \
- narray/Makefile \
tst/Makefile \
tst/kaffe/Makefile \
jvmtst/Makefile )