USE_BOEHM removed.
[cacao.git] / configure.in
index 6654c94fd9422f114545a77068d25fcfaf55d320..e7e3cf926abfe9bd5d26bc7a59a27d2cbcc942f5 100644 (file)
@@ -1,7 +1,7 @@
 dnl autoconf; autoheader; automake
 
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(compiler.c)
+AC_INIT(jit.c)
 AC_CANONICAL_HOST
 
 AM_INIT_AUTOMAKE(cacao, 0.40)
@@ -11,30 +11,55 @@ AC_PREFIX_DEFAULT(/usr/local/cacao)
 
 dnl system type
 
+ASMPART="asmpart.S"
 case "$host_cpu" in
 alpha* )
-       SYSDEP_DIR="alpha" 
-       CFLAGS="-ieee -O2 -g3"
-       COMPILER_SOURCES="compiler.h compiler.c" 
-       COMPILER_OBJECTS="compiler.o"
-       AC_DEFINE(OLD_COMPILER)
+       SYSDEP_DIR="alpha"
+       CFLAGS="-mieee -O0 -g3 -D__ALPHA__"
+       COMPILER_OBJECTS=""
+       AC_DEFINE(TRACE_ARGS_NUM, 6)
+       AC_DEFINE(USE_CODEMMAP)
        ;;
 
 mips* )
-       SYSDEP_DIR="mips" 
-        CFLAGS="-64 -g -DMAP_ANONYMOUS=0 -woff 1048,1110,1164,1515"
-dnl    LIBS="-lelfutil" 
-       COMPILER_SOURCES=""
+       SYSDEP_DIR="mips"
+       ASMPART="asmpart.s"
+        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"
+       AC_DEFINE(TRACE_ARGS_NUM, 8)
+       AC_DEFINE(USE_CODEMMAP)
        ;;
 
-sparc* | powerpc* | ppc* | * )
-       AC_MSG_ERROR($host-cpu systems are not supported at this time) ;;
+x86_64* )
+       SYSDEP_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($host_cpu systems are not supported at this time)
+        ;;
 esac
 
-AC_SUBST(COMPILER_SOURCES)
 AC_SUBST(COMPILER_OBJECTS)
+AC_SUBST(ASMPART)
 
 AC_DEFINE_UNQUOTED(SYSDEP_DIR, "$SYSDEP_DIR")
 AC_SUBST(SYSDEP_DIR)
@@ -42,6 +67,7 @@ AC_SUBST(SYSDEP_DIR)
 dnl Checks for programs.
 AC_PROG_CC
 AC_PROG_RANLIB
+AC_PROG_MAKE_SET
 
 dnl Checks for libraries.
 AC_CHECK_LIB(m, sin)
@@ -49,7 +75,10 @@ AC_CHECK_LIB(m, sin)
 dnl Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h)
+AC_CHECK_HEADERS([fcntl.h])
+AC_CHECK_HEADERS([sys/time.h])
+AC_CHECK_HEADERS([unistd.h])
+AC_CHECK_HEADERS([sys/ioctl.h])
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -92,7 +121,7 @@ if test $ac_cv_func_mmap_fixed_mapped = yes; then
                AC_DEFINE(HAVE_MAP_FAILED) 
        fi
 
-       if test $ac_cv_map_failed = yes; then
+       if test $ac_cv_map_anonymous = yes; then
                AC_DEFINE(HAVE_MAP_ANONYMOUS) 
        fi
 fi
@@ -102,7 +131,6 @@ dnl Features
 
 dnl check arguments
 AC_ARG_ENABLE(threads, [  --enable-threads        enable threads support])
-AC_ARG_ENABLE(gc2, [  --enable-gc2            enable new garbage collector])
 
 dnl threads
 AC_MSG_CHECKING(whether to include threads support)
@@ -121,24 +149,22 @@ else
        AC_SUBST(THREAD_OBJ)
 fi
 
-dnl garbage collector version
-AC_MSG_CHECKING(which garbage collector to use)
-if test x"$enable_gc2" = "xno"; then
-       AC_MSG_RESULT(old garbage collector)
-       GC_OBJ="mm/libmm_old.a"
-else
-       AC_MSG_RESULT(new garbage collector)
-       GC_OBJ="mm/libmm_new.a"
-fi
-AC_SUBST(GC_OBJ)
-
+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 \
           nat/Makefile \
-          comp/Makefile )
+          doc/Makefile \
+         narray/Makefile \
+         tst/Makefile \
+         tst/kaffe/Makefile \
+         jvmtst/Makefile )