* Merged in twisti-branch.
[cacao.git] / configure.ac
index 6de3d7a35aadb7ab2d1f723872fc8509f8b39349..57f25442f5fbdd4793b7529b5efca23c475ebf0b 100644 (file)
@@ -22,7 +22,7 @@ dnl along with this program; if not, write to the Free Software
 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 dnl 02110-1301, USA.
 dnl 
-dnl $Id: configure.ac 7219 2007-01-16 22:18:57Z pm $
+dnl $Id: configure.ac 7596 2007-03-28 21:05:53Z twisti $
 
 dnl Process this file with autoconf to produce a configure script.
 
@@ -88,7 +88,7 @@ powerpc64 )
     ARCH_CFLAGS="-D__POWERPC64__"
     ;;
 
-sparc64 )
+sparc | sparc64 )
     ARCH_DIR="sparc64"
     ARCH_CFLAGS="-mcpu=v9 -m64 -D__SPARC_64__"
     ;;
@@ -167,6 +167,14 @@ dnl must be before *linux*
     ARCH_CFLAGS="$ARCH_CFLAGS -D__NETBSD__ -ansi -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
     ;;
 
+*solaris* )
+    OS_DIR="solaris"
+       dnl on solaris the architecture defines 'sparc','sun','unix' are not set when cpp is called with -ansi
+       dnl therefore we add them here
+    INTRP_CFLAGS="$ARCH_CFLAGS -D__SOLARIS__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -D_BSD_SOURCE -Dsparc -Dsun -Dunix"
+    ARCH_CFLAGS="$ARCH_CFLAGS -D__SOLARIS__ -ansi -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -D_BSD_SOURCE -Dsparc -Dsun -Dunix"
+    ;;
+
 * )
     ;;
 esac
@@ -269,65 +277,16 @@ AC_SUBST(CACAO_LIBDIR)
 
 dnl Features
 
-dnl check arguments
+AC_CHECK_ENABLE_JAVA
+AC_CHECK_ENABLE_JIT
 
-dnl check which Java configuration to use
-AC_MSG_CHECKING(which Java configuration to use)
-AC_ARG_ENABLE([java],
-              [AS_HELP_STRING(--enable-java,enable specific Java configuration (cldc1.1,javase) [[default=javase]])],
-              [case "${enableval}" in
-                   cldc1.1)
-                       ENABLE_JAVAME_CLDC1_1=yes
-                       AC_DEFINE([ENABLE_JAVAME_CLDC1_1], 1, [compile for Java ME CLDC1.1])
-                       AC_MSG_RESULT(cldc1.1)
-                       ;;
-                   javase)
-                       ENABLE_JAVASE=yes
-                       AC_DEFINE([ENABLE_JAVASE], 1, [compile for Java SE])
-                       AC_MSG_RESULT(javase)
-                       ;;
-                   *)
-                       AC_MSG_ERROR(${enableval} is an unknown configuration)
-                       ;;
-               esac],
-               [ENABLE_JAVASE=yes
-                AC_DEFINE([ENABLE_JAVASE], 1, [compile for Java SE])
-                AC_MSG_RESULT(j2se)])
-AM_CONDITIONAL([ENABLE_JAVAME_CLDC1_1], test x"${ENABLE_JAVAME_CLDC1_1}" = "xyes")
-AM_CONDITIONAL([ENABLE_JAVASE], test x"${ENABLE_JAVASE}" = "xyes")
+dnl with-options
+AC_CHECK_WITH_CACAOH
 
-
-dnl check for JIT compiler
-AC_MSG_CHECKING(whether JIT compiler should be compiled)
-AC_ARG_ENABLE([jit],
-              [AS_HELP_STRING(--disable-jit,disable JIT compiler [[default=yes]])],
-              [case "${enableval}" in
-                   no) ENABLE_JIT=no;;
-                   *) ENABLE_JIT=yes;;
-               esac],
-              [ENABLE_JIT=yes])
-AC_MSG_RESULT(${ENABLE_JIT})
-AM_CONDITIONAL([ENABLE_JIT], test x"${ENABLE_JIT}" = "xyes")
-
-if test x"${ENABLE_JIT}" = "xyes"; then
-    AC_DEFINE([ENABLE_JIT], 1, [enable JIT compiler])
-fi
-
-
-dnl check if softfloat should be used
-AC_MSG_CHECKING(whether softfloat should be used)
-AC_ARG_ENABLE([softfloat],
-              [AS_HELP_STRING(--enable-softfloat,use softfloat [[default=no]])],
-              [case "${enableval}" in
-                  yes) ENABLE_SOFTFLOAT=yes;;
-                  *) ENABLE_SOFTFLOAT=no;;
-               esac],
-              [ENABLE_SOFTFLOAT=no])
-AC_MSG_RESULT(${ENABLE_SOFTFLOAT})
-
-if test x"${ENABLE_SOFTFLOAT}" = "xyes"; then
-    AC_DEFINE([ENABLE_SOFTFLOAT], 1, [enable softfloat])
-fi
+dnl check for stuff that should be done in software
+AC_CHECK_SOFTFLOAT
+AC_CHECK_SOFT_FLOAT_CMP
+AC_CHECK_SOFT_DOUBLE_CMP
 
 
 dnl check for interpreter
@@ -411,6 +370,7 @@ 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
 AC_MSG_CHECKING(whether dump memory should be disabled)
 AC_ARG_ENABLE([dump],
@@ -481,14 +441,14 @@ if test x"${ENABLE_DISASSEMBLER}" = "xyes"; then
     dnl check for binutils headers and libraries on some architectures for the
     dnl disassembler
     case "${ARCH_DIR}" in
-        arm | i386 | powerpc | x86_64 | sparc64 | powerpc64 | s390)
+        arm | i386 | powerpc | x86_64 | sparc64 | powerpc64 | s390 | m68k)
             AC_CHECK_HEADER([ansidecl.h],, [AC_MSG_ERROR(cannot find ansidecl.h)])
             AC_CHECK_HEADER([symcat.h],, [AC_MSG_ERROR(cannot find symcat.h)])
             AC_CHECK_HEADER([bfd.h],, [AC_MSG_ERROR(cannot find bfd.h)])
             AC_CHECK_HEADER([dis-asm.h],, [AC_MSG_ERROR(cannot find dis-asm.h)])
 
             case "${OS_DIR}" in
-                cygwin | darwin | netbsd )
+                cygwin | darwin | netbsd | solaris)
                      AC_CHECK_LIB(intl, dcgettext,, [AC_MSG_ERROR(cannot find libintl (from binutils))])
                      ;;
             esac
@@ -684,6 +644,23 @@ if test x"${ENABLE_INLINING}" = "xyes"; then
 fi
 
 
+dnl check for inlining debug options
+AC_MSG_CHECKING(whether method inlining debug options should be enabled)
+AC_ARG_ENABLE([inlining-debug],
+              [AS_HELP_STRING(--enable-inlining-debug,enable method inlining debug options [[default=no]])],
+              [case "${enableval}" in
+                   yes) ENABLE_INLINING_DEBUG=yes;;
+                   *) ENABLE_INLINING_DEBUG=no;;
+               esac],
+              [ENABLE_INLINING_DEBUG=no])
+AC_MSG_RESULT(${ENABLE_INLINING_DEBUG})
+AM_CONDITIONAL([ENABLE_INLINING_DEBUG], test x"${ENABLE_INLINING_DEBUG}" = "xyes")
+
+if test x"${ENABLE_INLINING_DEBUG}" = "xyes"; then
+    AC_DEFINE([ENABLE_INLINING_DEBUG], 1, [enable method inlining debug options])
+fi
+
+
 dnl check for replacement
 AC_MSG_CHECKING(whether on-stack replacement should be supported)
 AC_ARG_ENABLE([replacement],
@@ -818,6 +795,10 @@ fi
 AM_CONDITIONAL([ENABLE_ZLIB], test x"${ENABLE_ZLIB}" = "xyes")
 
 
+dnl check for stuff to be built
+AC_CHECK_ENABLE_JNI
+
+
 dnl check if a libjvm.so should be built
 AC_MSG_CHECKING(whether to build a libjvm.so)
 AC_ARG_ENABLE([libjvm],
@@ -1047,6 +1028,8 @@ AC_CONFIG_FILES([Makefile]
                [src/vm/jit/intrp/Makefile]
                [src/vm/jit/inline/Makefile]
                [src/vm/jit/loop/Makefile]
+               [src/vm/jit/m68k/Makefile]
+               [src/vm/jit/m68k/linux/Makefile]
                [src/vm/jit/mips/Makefile]
                [src/vm/jit/mips/irix/Makefile]
                [src/vm/jit/mips/linux/Makefile]
@@ -1059,18 +1042,27 @@ AC_CONFIG_FILES([Makefile]
                [src/vm/jit/powerpc/netbsd/Makefile]
                [src/vm/jit/powerpc64/Makefile]
                [src/vm/jit/powerpc64/linux/Makefile]
+               [src/vm/jit/s390/Makefile]
                [src/vm/jit/schedule/Makefile]
                [src/vm/jit/sparc64/Makefile]
                [src/vm/jit/sparc64/linux/Makefile]
+               [src/vm/jit/sparc64/solaris/Makefile]
                [src/vm/jit/tools/Makefile]
                [src/vm/jit/verify/Makefile]
                [src/vm/jit/x86_64/Makefile]
-               [src/vm/jit/s390/Makefile]
+               [src/vm/jit/x86_64/freebsd/Makefile]
+               [src/vm/jit/x86_64/linux/Makefile]
+               [src/vmcore/Makefile]
                [tests/Makefile]
                [tests/regression/Makefile]
                [tests/regression/codepatching/Makefile]
                [tests/regression/jasmin/Makefile]
-               [tests/regression/native/Makefile])
+               [tests/regression/native/Makefile]
+               [tests/regression/resolving/Makefile]
+               [tests/regression/resolving/classes1/Makefile]
+               [tests/regression/resolving/classes2/Makefile]
+               [tests/regression/resolving/classes3/Makefile]
+               )
 
 
 dnl now configure subpackages with OPT_CFLAGS and ARCH_CFLAGS