src/vm/vm.c (vm_exit): only set JVMTI_PHASE_DEAD if a jvmti agent or a jvmti environm...
[cacao.git] / configure.ac
index 196c7bf740a6aa9e9b419683663562c8a2f83dc3..db2f33a4c8794c5a26143a9b458ba022c32927fb 100644 (file)
@@ -24,7 +24,7 @@ alpha | alphaev56 | alphapca56 )
     CFLAGS="$CFLAGS -mieee -D__ALPHA__"
     ;;
 
-arm | armv4tl | armv5b )
+arm | armv4tl | armv5b | armv5l )
     ARCH_DIR="arm"
     CFLAGS="$CFLAGS -D__ARM__"
     ;;
@@ -88,6 +88,11 @@ case "$host_os" in
     CFLAGS="$CFLAGS -D__LINUX__ -ansi -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
     ;;
 
+*netbsd* )
+    OS_DIR="netbsd"
+    CFLAGS="$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"
+    ;;
+
 * )
     ;;
 esac
@@ -331,14 +336,14 @@ if test x"${ENABLE_DISASSEMBLER}" = "xyes"; then
             AC_CHECK_HEADER([dis-asm.h],, [AC_MSG_ERROR(cannot find dis-asm.h)])
 
             case "${OS_DIR}" in
-                cygwin | darwin )
-                     AC_CHECK_LIB(intl, dcgettext,, [AC_MSG_ERROR(cannot find libintl (from bintuils))])
+                cygwin | darwin | netbsd )
+                     AC_CHECK_LIB(intl, dcgettext,, [AC_MSG_ERROR(cannot find libintl (from binutils))])
                      ;;
             esac
 
-            AC_CHECK_LIB(iberty, xstrerror,, [AC_MSG_ERROR(cannot find libiberty (from bintuils))])
-            AC_CHECK_LIB(bfd, bfd_get_arch,, [AC_MSG_ERROR(cannot find libbfd (from bintuils))])
-            AC_CHECK_LIB(opcodes, init_disassemble_info,, [AC_MSG_ERROR(cannot find libopcodes (from bintuils))])
+            AC_CHECK_LIB(iberty, xstrerror,, [AC_MSG_ERROR(cannot find libiberty (from binutils))])
+            AC_CHECK_LIB(bfd, bfd_get_arch,, [AC_MSG_ERROR(cannot find libbfd (from binutils))])
+            AC_CHECK_LIB(opcodes, disassembler,, [AC_MSG_ERROR(cannot find libopcodes (from binutils))])
             AC_DEFINE([WITH_BINUTILS_DISASSEMBLER], 1, [use binutils disassembler])
             AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [true])
             ;;
@@ -354,12 +359,12 @@ fi
 dnl check for statistics
 AC_MSG_CHECKING(whether statistics generation should be enabled)
 AC_ARG_ENABLE([statistics],
-              [AS_HELP_STRING(--disable-statistics,disable statistics generation [[default=yes]])],
+              [AS_HELP_STRING(--enable-statistics,enable statistics generation [[default=no]])],
               [case "${enableval}" in
-                   no) ENABLE_STATISTICS=no;;
-                   *) ENABLE_STATISTICS=yes;;
+                   yes) ENABLE_STATISTICS=yes;;
+                   *) ENABLE_STATISTICS=no;;
                esac],
-              [ENABLE_STATISTICS=yes])
+              [ENABLE_STATISTICS=no])
 AC_MSG_RESULT(${ENABLE_STATISTICS})
 AM_CONDITIONAL([ENABLE_STATISTICS], test x"${ENABLE_STATISTICS}" = "xyes")
 
@@ -368,6 +373,57 @@ if test x"${ENABLE_STATISTICS}" = "xyes"; then
 fi
 
 
+dnl check for verifier
+AC_MSG_CHECKING(whether classfile verification should be enabled)
+AC_ARG_ENABLE([verifier],
+              [AS_HELP_STRING(--disable-verifier,disable classfile verification [[default=yes]])],
+              [case "${enableval}" in
+                   no) ENABLE_VERIFIER=no;;
+                   *) ENABLE_VERIFIER=yes;;
+               esac],
+              [ENABLE_VERIFIER=yes])
+AC_MSG_RESULT(${ENABLE_VERIFIER})
+AM_CONDITIONAL([ENABLE_VERIFIER], test x"${ENABLE_VERIFIER}" = "xyes")
+
+if test x"${ENABLE_VERIFIER}" = "xyes"; then
+    AC_DEFINE([ENABLE_VERIFIER], 1, [enable classfile verification])
+fi
+
+
+dnl check for compiler timing
+AC_MSG_CHECKING(whether real-time timing should be enabled)
+AC_ARG_ENABLE([rt-timing],
+              [AS_HELP_STRING(--enable-rt-timing,enable real-time timing [[default=no]])],
+              [case "${enableval}" in
+                   yes) ENABLE_RT_TIMING=yes;;
+                   *) ENABLE_RT_TIMING=no;;
+               esac],
+              [ENABLE_RT_TIMING=no])
+AC_MSG_RESULT(${ENABLE_RT_TIMING})
+AM_CONDITIONAL([ENABLE_RT_TIMING], test x"${ENABLE_RT_TIMING}" = "xyes")
+
+if test x"${ENABLE_RT_TIMING}" = "xyes"; then
+    AC_DEFINE([ENABLE_RT_TIMING], 1, [enable real-time timing])
+fi
+
+
+dnl check for cycle count statistics
+AC_MSG_CHECKING(whether cycle count statistics should be enabled)
+AC_ARG_ENABLE([cycles-stats],
+              [AS_HELP_STRING(--enable-cycles-stats,enable cycle count statistics [[default=no]])],
+              [case "${enableval}" in
+                   yes) ENABLE_CYCLES_STATS=yes;;
+                   *) ENABLE_CYCLES_STATS=no;;
+               esac],
+              [ENABLE_CYCLES_STATS=no])
+AC_MSG_RESULT(${ENABLE_CYCLES_STATS})
+AM_CONDITIONAL([ENABLE_CYCLES_STATS], test x"${ENABLE_CYCLES_STATS}" = "xyes")
+
+if test x"${ENABLE_CYCLES_STATS}" = "xyes"; then
+    AC_DEFINE([ENABLE_CYCLES_STATS], 1, [enable cycle count statistics])
+fi
+
+
 dnl check for JVMTI
 AC_MSG_CHECKING(whether to compile JVMTI support)
 AC_ARG_ENABLE([jvmti],
@@ -393,37 +449,26 @@ AC_MSG_CHECKING(whether to include threads support)
 enable_threads=${enable_threads:-native}
 case "$enable_threads" in
 no | none | single)
-       AC_MSG_RESULT(no)
-       dnl no threads for boehm
-       ac_configure_args="$ac_configure_args --disable-boehm-threads"
-       AM_CONDITIONAL([USE_THREADS], [false])
-       AM_CONDITIONAL([NATIVE_THREADS], [false])
-       ;;
-
-green | native | posix | pthreads)
-       AC_DEFINE([USE_THREADS], 1, [use threads])
-
-       AM_CONDITIONAL([USE_THREADS], [true])
-
-       if test x"$enable_threads" != "xgreen"; then
-               AC_MSG_RESULT(yes, native)
-                AC_CHECK_LIB(pthread, main)
-               AC_DEFINE([NATIVE_THREADS], 1, [use pthreads])
-
-               CFLAGS="$CFLAGS -D_REENTRANT"
-
-               dnl tell boehm to support threads as well
-               ac_configure_args="$ac_configure_args --enable-boehm-threads=posix"
-               AM_CONDITIONAL([NATIVE_THREADS], [true])
-
-       else
-               AC_MSG_RESULT(yes, green)
+    AC_MSG_RESULT(no)
+    dnl no threads for boehm
+    ac_configure_args="$ac_configure_args --disable-boehm-threads"
+    AM_CONDITIONAL([ENABLE_THREADS], [false])
+    ;;
 
-               dnl no threads for boehm
-               ac_configure_args="$ac_configure_args --disable-boehm-threads"
-               AM_CONDITIONAL([NATIVE_THREADS], [false])
-       fi
+native | posix | pthreads)
+    AC_DEFINE([ENABLE_THREADS], 1, [enable threads])
+    
+    AM_CONDITIONAL([ENABLE_THREADS], [true])
+    
+    AC_MSG_RESULT(yes, native)
+    AC_CHECK_LIB(pthread, main)
+    
+    CFLAGS="$CFLAGS -D_REENTRANT"
+    
+    dnl tell boehm to support threads as well
+    ac_configure_args="$ac_configure_args --enable-boehm-threads=posix"
     ;;
+
 *)
     AC_MSG_ERROR($enable_threads is an unknown thread package)
     ;;
@@ -487,12 +532,12 @@ fi
 dnl check for loop optimization
 AC_MSG_CHECKING(whether loop optimization should be supported)
 AC_ARG_ENABLE([loop],
-              [AS_HELP_STRING(--disable-loop,disable loop optimization [[default=yes]])],
+              [AS_HELP_STRING(--enable-loop,enable loop optimization [[default=no]])],
               [case "${enableval}" in
-                   no) ENABLE_LOOP=no;;
-                   *) ENABLE_LOOP=yes;;
+                   yes) ENABLE_LOOP=yes;;
+                   *) ENABLE_LOOP=no;;
                esac],
-              [ENABLE_LOOP=yes])
+              [ENABLE_LOOP=no])
 AC_MSG_RESULT(${ENABLE_LOOP})
 AM_CONDITIONAL([ENABLE_LOOP], test x"${ENABLE_LOOP}" = "xyes")
 
@@ -649,8 +694,15 @@ AS_AC_EXPAND([CLASSPATH_LIBDIR], ${CLASSPATH_LIBDIR})
 AC_DEFINE_UNQUOTED([CLASSPATH_LIBDIR], "${CLASSPATH_LIBDIR}", [GNU Classpath libraries installation directory])
 AC_SUBST(CLASSPATH_LIBDIR)
 
-AC_CHECK_HEADER([${CLASSPATH_PREFIX}/include/jni.h],
-                [AC_DEFINE_UNQUOTED([CLASSPATH_JNI_H], "${CLASSPATH_PREFIX}/include/jni.h", [GNU Classpath jni.h header])],
+AC_MSG_CHECKING(where GNU Classpath headers are installed)
+AC_ARG_WITH([classpath-includedir],
+            [AS_HELP_STRING(--with-classpath-includedir=<dir>,installation directory of GNU Classpath headers [[default=/usr/local/classpath/include]])],
+            [CLASSPATH_INCLUDEDIR=${withval}],
+            [CLASSPATH_INCLUDEDIR=${CLASSPATH_PREFIX}/include])
+AC_MSG_RESULT(${CLASSPATH_INCLUDEDIR})
+
+AC_CHECK_HEADER([${CLASSPATH_INCLUDEDIR}/jni.h],
+                [AC_DEFINE_UNQUOTED([CLASSPATH_JNI_H], "${CLASSPATH_INCLUDEDIR}/jni.h", [GNU Classpath jni.h header])],
                 [AC_MSG_ERROR(cannot find jni.h)])
 
 
@@ -721,10 +773,12 @@ AC_CONFIG_FILES([Makefile]
                [src/native/tools/Makefile]
                [src/native/vm/Makefile]
                [src/scripts/Makefile]
+               [src/scripts/jarsigner]
                [src/scripts/java]
+               [src/scripts/keytool]
+               [src/scripts/rmic]
                [src/scripts/rmiregistry]
                [src/threads/Makefile]
-               [src/threads/green/Makefile]
                [src/threads/native/Makefile]
                [src/toolbox/Makefile]
                [src/vm/Makefile]
@@ -746,6 +800,7 @@ AC_CONFIG_FILES([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/profile/Makefile]
                [src/vm/jit/schedule/Makefile]
                [src/vm/jit/tools/Makefile]