* Merged in twisti-branch.
[cacao.git] / configure.ac
index 7aec26063d9618bc088e8b3733ade33482aa1153..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 7285 2007-02-05 01:06:24Z twisti $
+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,50 +277,11 @@ AC_SUBST(CACAO_LIBDIR)
 
 dnl Features
 
-dnl check arguments
-
-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 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
+AC_CHECK_ENABLE_JAVA
+AC_CHECK_ENABLE_JIT
 
+dnl with-options
+AC_CHECK_WITH_CACAOH
 
 dnl check for stuff that should be done in software
 AC_CHECK_SOFTFLOAT
@@ -401,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],
@@ -471,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
@@ -825,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],
@@ -1054,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]
@@ -1070,6 +1046,7 @@ AC_CONFIG_FILES([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]
@@ -1080,7 +1057,12 @@ AC_CONFIG_FILES([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