*** empty log message ***
[cacao.git] / configure.in
index 6654c94fd9422f114545a77068d25fcfaf55d320..fd6dfbcf383418bdb564398c25d2f9d5a966e399 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,6 +11,7 @@ AC_PREFIX_DEFAULT(/usr/local/cacao)
 
 dnl system type
 
+ASMPART="asmpart.S"
 case "$host_cpu" in
 alpha* )
        SYSDEP_DIR="alpha" 
@@ -18,14 +19,25 @@ alpha* )
        COMPILER_SOURCES="compiler.h compiler.c" 
        COMPILER_OBJECTS="compiler.o"
        AC_DEFINE(OLD_COMPILER)
+       AC_DEFINE(TRACE_ARGS_NUM, 6)
+       AC_DEFINE(USE_CODEMMAP)
        ;;
 
 mips* )
        SYSDEP_DIR="mips" 
+       ASMPART="asmpart.s"
         CFLAGS="-64 -g -DMAP_ANONYMOUS=0 -woff 1048,1110,1164,1515"
-dnl    LIBS="-lelfutil" 
+       LIBS="-lelfutil" 
        COMPILER_SOURCES=""
        COMPILER_OBJECTS=""
+       AC_DEFINE(TRACE_ARGS_NUM, 8)
+       ;;
+
+i386* | i486* | i586* | i686* )
+       SYSDEP_DIR="i386" 
+       CFLAGS="-O0 -g3 -D__I386__"
+       COMPILER_SOURCES="compiler.h compiler.c" 
+       COMPILER_OBJECTS="compiler.o"
        ;;
 
 sparc* | powerpc* | ppc* | * )
@@ -35,6 +47,7 @@ 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 +55,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)
@@ -92,7 +106,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 +116,7 @@ dnl Features
 
 dnl check arguments
 AC_ARG_ENABLE(threads, [  --enable-threads        enable threads support])
-AC_ARG_ENABLE(gc2, [  --enable-gc2            enable new garbage collector])
+AC_ARG_WITH(gc, [  --with-gc[=ARG]         use garbage collector [gc2,gc1,boehm]])
 
 dnl threads
 AC_MSG_CHECKING(whether to include threads support)
@@ -123,15 +137,30 @@ fi
 
 dnl garbage collector version
 AC_MSG_CHECKING(which garbage collector to use)
-if test x"$enable_gc2" = "xno"; then
+case "$with_gc" in
+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
+       ;;
+gc1 )
        AC_MSG_RESULT(old garbage collector)
        GC_OBJ="mm/libmm_old.a"
-else
+       ;;
+gc2 | "" )
        AC_MSG_RESULT(new garbage collector)
        GC_OBJ="mm/libmm_new.a"
-fi
+       ;;
+* )
+       AC_MSG_ERROR(Invalid GC)
+       ;;
+esac
 AC_SUBST(GC_OBJ)
-
+AC_SUBST(BOEHM_LIB)
 
 AC_OUTPUT(Makefile \
          toolbox/Makefile \
@@ -140,5 +169,10 @@ AC_OUTPUT(Makefile \
          jit/Makefile \
           alpha/Makefile \
           mips/Makefile \
+          i386/Makefile \
           nat/Makefile \
-          comp/Makefile )
+          doc/Makefile \
+          comp/Makefile \
+         narray/Makefile \
+         tst/Makefile \
+         jvmtst/Makefile )