* src/vm/jit/powerpc/codegen.c (codegen): Fixed ICMD_BALOAD, use
[cacao.git] / configure.ac
index d8367faf6a4c8f4111b2c56e117ffac800d956ac..217a4273c55dc892a67efbcddf68af5cec8f24e2 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 
-AC_INIT(cacao, 0.96+svn, cacao@cacaojvm.org)
+AC_INIT(cacao, 0.97+svn, cacao@cacaojvm.org)
 AC_CONFIG_SRCDIR(src/cacao/cacao.c)
 AC_CANONICAL_HOST
 AC_PREREQ(2.59)
@@ -31,12 +31,17 @@ arm | armv4tl | armv5b | armv5l )
     ARCH_CFLAGS="-D__ARM__"
     ;;
 
+hppa2.0 )
+    ARCH_DIR="parisc"
+    ARCH_CFLAGS="-D__PARISC__"
+    ;;
+
 i386 | i486 | i586 | i686 )
     ARCH_DIR="i386"
     ARCH_CFLAGS="-D__I386__"
     ;;
 
-mips )
+mips | mipsel )
     ARCH_DIR="mips"
     ARCH_CFLAGS="-D__MIPS__"
     ;;
@@ -75,6 +80,12 @@ esac
 
 dnl host type
 case "$host_os" in
+*cygwin* )
+    OS_DIR="cygwin"
+    INTRP_CFLAGS="$ARCH_CFLAGS -D__WINDOWS__ -D__CYGWIN__ -Wall -Wno-long-long"
+    ARCH_CFLAGS="$ARCH_CFLAGS -D__WINDOWS__ -D__CYGWIN__ -ansi -pedantic -Wall -Wno-long-long"
+    ;;
+
 *darwin* )
     OS_DIR="darwin"
     INTRP_CFLAGS="$ARCH_CFLAGS -D__DARWIN__ -Wall -Wno-long-long"
@@ -110,10 +121,12 @@ case "$host_os" in
 esac
 
 
-dnl temporary set the CFLAGS for configure tests
+dnl temporary set the CFLAGS for configure tests (e.g. inline keyword)
 dnl we set it properly at the end of this file
 CFLAGS="$ARCH_CFLAGS $OPT_CFLAGS"
 
+dnl set interpreter flags
+AC_SUBST(INTRP_CFLAGS)
 
 dnl define some stuff required for --fullversion
 AC_DEFINE_UNQUOTED(VERSION_CONFIGURE_ARGS, "$ac_configure_args", [configure arguments])
@@ -125,7 +138,6 @@ dnl define and substitute some architecture specific variables
 AC_DEFINE_UNQUOTED([ARCH_DIR], "${ARCH_DIR}", [architecture directory])
 AC_SUBST(ARCH_DIR)
 AC_SUBST(OS_DIR)
-AC_SUBST(INTRP_CFLAGS)
 AC_SUBST(USE_SCHEDULER)
 
 
@@ -291,18 +303,35 @@ fi
 
 
 dnl check for garbage collector usage
-AC_MSG_CHECKING(whether GC should be disabled)
-AC_ARG_ENABLE([gc],
-              [AS_HELP_STRING(--disable-gc,disable garbage collector (for debugging only!) [[default=yes]])],
-              [case "${enableval}" in
-                   no) DISABLE_GC=yes
-                       AC_DEFINE([DISABLE_GC], 1, [disable garbage collector])
-                       ;;
-                   *) DISABLE_GC=no;;
-               esac],
-              [DISABLE_GC=no])
-AC_MSG_RESULT(${DISABLE_GC})
-AM_CONDITIONAL([DISABLE_GC], test x"${DISABLE_GC}" = "xyes")
+AC_ARG_ENABLE([gc], [AS_HELP_STRING(--enable-gc,enable garbage collector support (none,boehm,cacao) [[default=boehm]])])
+AC_MSG_CHECKING(whether GC should be enabled)
+enable_gc=${enable_gc:-boehm}
+case "$enable_gc" in
+no | none)
+    AC_DEFINE([DISABLE_GC], 1, [disable garbage collector])
+    ENABLE_GC=none
+    AC_MSG_RESULT(no)
+    ;;
+
+boehm)
+    AC_DEFINE([ENABLE_GC_BOEHM], 1, [enable conservative boehm-gc])
+    ENABLE_GC=boehm
+    AC_MSG_RESULT(yes, boehm-gc)
+    ;;
+
+cacao)
+    AC_DEFINE([ENABLE_GC_CACAO], 1, [enable exact cacao-gc])
+    ENABLE_GC=cacao
+    AC_MSG_RESULT(yes, cacao-gc)
+    ;;
+
+*)
+    AC_MSG_ERROR($enable_gc is an unknown garbage collector package)
+    ;;
+esac
+AM_CONDITIONAL([DISABLE_GC], test x"${ENABLE_GC}" = "xnone")
+AM_CONDITIONAL([ENABLE_GC_BOEHM], test x"${ENABLE_GC}" = "xboehm")
+AM_CONDITIONAL([ENABLE_GC_CACAO], test x"${ENABLE_GC}" = "xcacao")
 
 
 dnl check for dump memory usage
@@ -340,6 +369,23 @@ fi
 AM_CONDITIONAL([NDEBUG], test x"${NDEBUG}" = "xyes")
 
 
+dnl check for memcheck support
+AC_MSG_CHECKING(whether debugging memory checks should be enabled)
+AC_ARG_ENABLE([memcheck],
+              [AS_HELP_STRING(--enable-memcheck,enable debugging memory checks [[default=no]])],
+              [case "${enableval}" in
+                   yes) ENABLE_MEMCHECK=yes;;
+                   *) ENABLE_MEMCHECK=no;;
+               esac],
+              [ENABLE_MEMCHECK=no])
+AC_MSG_RESULT(${ENABLE_MEMCHECK})
+AM_CONDITIONAL([ENABLE_MEMCHECK], test x"${ENABLE_MEMCHECK}" = "xyes")
+
+if test x"${ENABLE_MEMCHECK}" = "xyes"; then
+    AC_DEFINE([ENABLE_MEMCHECK], 1, [perform debugging memory checks])
+fi
+
+
 dnl check for disassembler support
 AC_MSG_CHECKING(whether disassembler should be enabled)
 AC_ARG_ENABLE([disassembler],
@@ -471,7 +517,7 @@ fi
 
 
 dnl threads
-AC_ARG_ENABLE([threads], [AS_HELP_STRING(--enable-threads,enable threads support (none,green,native) [[default=native]])])
+AC_ARG_ENABLE([threads], [AS_HELP_STRING(--enable-threads,enable threads support (none,native) [[default=native]])])
 AC_ARG_ENABLE([__thread], [AS_HELP_STRING(--enable-__thread,use TLS features)], [use__thread=$enableval], [use__thread=no])
 
 AC_MSG_CHECKING(whether to include threads support)
@@ -496,7 +542,7 @@ native | posix | pthreads)
 
     dnl we changed ARCH_CFLAGS, set CFLAGS again
     CFLAGS="$ARCH_CFLAGS $OPT_CFLAGS"
-    
+
     dnl tell boehm to support threads as well
     ac_configure_args="$ac_configure_args --enable-boehm-threads=posix"
     ;;
@@ -578,6 +624,24 @@ if test x"${ENABLE_LOOP}" = "xyes"; then
 fi
 
 
+dnl check if linear scan register allocator(lsra) with SSA should be used
+AC_MSG_CHECKING(whether lsra with ssa should be supported)
+AC_ARG_ENABLE([ssa],
+              [AS_HELP_STRING(--disable-ssa,disable ssa [[default=no]])],
+              [case "${enableval}" in
+                   no) ENABLE_SSA=no;;
+                   *) ENABLE_SSA=yes;;
+               esac],
+              [ENABLE_SSA=no])
+AC_MSG_RESULT(${ENABLE_SSA})
+AM_CONDITIONAL([ENABLE_SSA], test x"${ENABLE_SSA}" = "xyes")
+
+if test x"${ENABLE_SSA}" = "xyes"; then
+    AC_DEFINE([ENABLE_SSA], 1, [enable lsra with ssa])
+    ENABLE_LSRA="no"
+fi
+
+
 dnl check if linear scan register allocator(lsra) should be used
 AC_MSG_CHECKING(whether lsra should be supported)
 AC_ARG_ENABLE([lsra],
@@ -587,9 +651,15 @@ AC_ARG_ENABLE([lsra],
                    *) ENABLE_LSRA=no;;
                esac],
               [ENABLE_LSRA=no])
+   
+if test x"${ENABLE_LSRA}" = "xyes"; then
+    if test x"${ENABLE_SSA}" = "xyes"; then
+        ENABLE_LSRA="no"
+    fi
+fi
 AC_MSG_RESULT(${ENABLE_LSRA})
 AM_CONDITIONAL([ENABLE_LSRA], test x"${ENABLE_LSRA}" = "xyes")
-   
 if test x"${ENABLE_LSRA}" = "xyes"; then
     AC_DEFINE([ENABLE_LSRA], 1, [enable lsra])
 fi
@@ -759,6 +829,20 @@ AC_CHECK_HEADER([${CLASSPATH_INCLUDEDIR}/jni.h],
                 [AC_MSG_ERROR(cannot find jni.h)])
 
 
+dnl if we compile for a JRE-style directory layout
+AC_MSG_CHECKING(if we compile for a JRE-style directory layout)
+AC_ARG_WITH([jre-layout],
+            [AS_HELP_STRING(--with-jre-layout,compile for JRE-style directory layout [[default=no]])],
+            [case "${enableval}" in
+                yes) WITH_JRE_LAYOUT=yes
+                     AC_DEFINE([WITH_JRE_LAYOUT], 1, [with JRE layout])
+                     ;;
+                *) WITH_JRE_LAYOUT=no;;
+             esac],
+            [WITH_JRE_LAYOUT=no])
+AC_MSG_RESULT(${WITH_JRE_LAYOUT})
+
+
 dnl check if GNU Classpath should be linked statically into CACAO
 AC_MSG_CHECKING(whether to link GNU Classpath native libraries statically into CACAO)
 AC_ARG_WITH([static-classpath],
@@ -788,12 +872,6 @@ AC_PROG_JAVAC
 AC_PROG_JAR
 
 
-dnl now configure subpackages
-dnl the export is not my favorite (is there another way?)
-export CFLAGS
-AC_CONFIG_SUBDIRS(src/boehm-gc)
-
-
 dnl finally pass CFLAGS to Makefiles via AM_CFLAGS
 CFLAGS=$OPT_CFLAGS
 AM_CFLAGS=$ARCH_CFLAGS
@@ -813,6 +891,7 @@ AC_CONFIG_FILES([Makefile]
                [src/fdlibm/Makefile]
                [src/lib/Makefile]
                [src/mm/Makefile]
+               [src/mm/cacao-gc/Makefile]
                [src/native/Makefile]
                [src/native/include/Makefile]
                [src/native/jvmti/Makefile]
@@ -820,8 +899,6 @@ AC_CONFIG_FILES([Makefile]
                [src/native/vm/Makefile]
                [src/scripts/Makefile]
                [src/scripts/java]
-               [src/scripts/rmic]
-               [src/scripts/rmiregistry]
                [src/threads/Makefile]
                [src/threads/native/Makefile]
                [src/threads/none/Makefile]
@@ -833,22 +910,24 @@ AC_CONFIG_FILES([Makefile]
                [src/vm/jit/alpha/freebsd/Makefile]
                [src/vm/jit/alpha/linux/Makefile]
                [src/vm/jit/i386/Makefile]
+               [src/vm/jit/i386/cygwin/Makefile]
+               [src/vm/jit/i386/darwin/Makefile]
                [src/vm/jit/i386/freebsd/Makefile]
                [src/vm/jit/i386/linux/Makefile]
-               [src/vm/jit/ifconv/Makefile]
                [src/vm/jit/intrp/Makefile]
                [src/vm/jit/inline/Makefile]
                [src/vm/jit/loop/Makefile]
                [src/vm/jit/mips/Makefile]
                [src/vm/jit/mips/irix/Makefile]
                [src/vm/jit/mips/linux/Makefile]
+                [src/vm/jit/optimizing/Makefile]
+               [src/vm/jit/parisc/Makefile]
                [src/vm/jit/powerpc/Makefile]
                [src/vm/jit/powerpc/darwin/Makefile]
                [src/vm/jit/powerpc/linux/Makefile]
                [src/vm/jit/powerpc/netbsd/Makefile]
                [src/vm/jit/powerpc64/Makefile]
                [src/vm/jit/powerpc64/linux/Makefile]
-               [src/vm/jit/profile/Makefile]
                [src/vm/jit/schedule/Makefile]
                [src/vm/jit/sparc64/Makefile]
                [src/vm/jit/sparc64/linux/Makefile]
@@ -858,8 +937,16 @@ AC_CONFIG_FILES([Makefile]
                [tests/Makefile]
                [tests/regression/Makefile]
                [tests/regression/codepatching/Makefile]
+               [tests/regression/jasmin/Makefile]
                [tests/regression/native/Makefile])
 
+
+dnl now configure subpackages with OPT_CFLAGS and ARCH_CFLAGS
+export OPT_CFLAGS
+export ARCH_CFLAGS
+AC_CONFIG_SUBDIRS(src/mm/boehm-gc)
+
+
 AC_OUTPUT