* .hgignore: Removed tests/regression/junit/*.class, added
[cacao.git] / configure.ac
index a1febed28ac4937bb4c4e152a6abc5544bab7336..32b90969338e1189492e17bae12ce6aa843b05a8 100644 (file)
@@ -23,11 +23,11 @@ dnl 02110-1301, USA.
 dnl Process this file with autoconf to produce a configure script.
 
 
-AC_INIT(cacao, 0.99rc5, cacao@cacaojvm.org)
+AC_INIT(cacao, 0.99rc7, cacao@cacaojvm.org)
 AC_CONFIG_SRCDIR(src/cacao/cacao.c)
 AC_CANONICAL_HOST
 AC_PREREQ(2.59)
-AM_INIT_AUTOMAKE([1.9.0 dist-bzip2])
+AM_INIT_AUTOMAKE([1.9.0 dist-bzip2 tar-ustar])
 AM_MAINTAINER_MODE
 
 AM_CONFIG_HEADER([config.h])
@@ -37,7 +37,7 @@ AC_PREFIX_DEFAULT(/usr/local/cacao)
 
 dnl set optimization and debugging for all architectures and systems
 if test x"$CFLAGS" = "x"; then
-    OPT_CFLAGS="-O0 -g3"
+    OPT_CFLAGS="-O0 -g"
 else
     OPT_CFLAGS=$CFLAGS
 fi
@@ -129,19 +129,19 @@ 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"
+    ARCH_CFLAGS="$ARCH_CFLAGS -D__WINDOWS__ -D__CYGWIN__ -std=c99 -pedantic -Wall -Wno-long-long"
     ;;
 
 *darwin* )
     OS_DIR="darwin"
     INTRP_CFLAGS="$ARCH_CFLAGS -D__DARWIN__ -Wall -Wno-long-long"
-    ARCH_CFLAGS="$ARCH_CFLAGS -D__DARWIN__ -ansi -pedantic -Wall -Wno-long-long"
+    ARCH_CFLAGS="$ARCH_CFLAGS -D__DARWIN__ -std=c99 -pedantic -Wall -Wno-long-long"
     ;;
 
 *freebsd* )
     OS_DIR="freebsd"
     INTRP_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
-    ARCH_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -ansi -pedantic -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
+    ARCH_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -std=c99 -pedantic -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
     ;;
 
 *irix* )
@@ -152,35 +152,36 @@ case "$host_os" in
 
 *kfreebsd*-gnu)
     OS_DIR="freebsd"
-    INTRP_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
-    ARCH_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -ansi -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
+    INTRP_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
+    ARCH_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -std=c99 -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
     ;;
 
 dnl must be before *linux*
 *uclinux | *elf )
     OS_DIR="uclinux"
-    INTRP_CFLAGS="$ARCH_CFLAGS -D__LINUX__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
-    ARCH_CFLAGS="$ARCH_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"
+    INTRP_CFLAGS="$ARCH_CFLAGS -D__LINUX__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
+    ARCH_CFLAGS="$ARCH_CFLAGS -D__LINUX__ -std=c99 -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
     ;;
 
 *linux* | *Linux* )
     OS_DIR="linux"
-    INTRP_CFLAGS="$ARCH_CFLAGS -D__LINUX__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
-    ARCH_CFLAGS="$ARCH_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"
+    INTRP_CFLAGS="$ARCH_CFLAGS -D__LINUX__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
+    ARCH_CFLAGS="$ARCH_CFLAGS -D__LINUX__ -std=c99 -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
     ;;
 
 *netbsd* )
     OS_DIR="netbsd"
-    INTRP_CFLAGS="$ARCH_CFLAGS -D__NETBSD__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
-    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"
+    INTRP_CFLAGS="$ARCH_CFLAGS -D__NETBSD__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
+    ARCH_CFLAGS="$ARCH_CFLAGS -D__NETBSD__ -std=c99 -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -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"
+    dnl On solaris the architecture defines 'sparc', 'sun', 'unix' are
+    dnl not set when cpp is called with -std=c99, therefore we add them
+    dnl here.
+    INTRP_CFLAGS="$ARCH_CFLAGS -D__SOLARIS__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -D_BSD_SOURCE -Dsparc -Dsun -Dunix"
+    ARCH_CFLAGS="$ARCH_CFLAGS -D__SOLARIS__ -std=c99 -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -D_BSD_SOURCE -Dsparc -Dsun -Dunix"
     ;;
 
 * )
@@ -217,6 +218,10 @@ dnl Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_STDC
 
+dnl Crucial header files.
+AC_CHECK_HEADERS([stdbool.h],, [AC_MSG_ERROR(cannot find stdbool.h)])
+AC_CHECK_HEADERS([stdint.h],, [AC_MSG_ERROR(cannot find stdint.h)])
+
 dnl keep them alpha-sorted!
 AC_CHECK_HEADERS([assert.h])
 AC_CHECK_HEADERS([errno.h])
@@ -259,7 +264,6 @@ AC_STRUCT_TM
 
 dnl Checks for libraries (NOTE: Should be done before function checks,
 dnl as some functions may be in libraries we check for).
-AC_CHECK_LIB(dl, dlopen,,)
 
 dnl Checks for library functions.
 AC_PROG_GCC_TRADITIONAL
@@ -359,8 +363,7 @@ AC_DEFINE_UNQUOTED([CACAO_LIBDIR], "${CACAO_LIBDIR}", [library installation pref
 AC_SUBST(CACAO_LIBDIR)
 
 
-AC_CHECK_ENABLE_LTDL
-
+AC_CHECK_ENABLE_DL
 AC_CHECK_ENABLE_JAVA
 
 AC_CHECK_ENABLE_JIT
@@ -666,9 +669,13 @@ AC_ARG_ENABLE([ssa],
               [ENABLE_SSA=no])
 AC_MSG_RESULT(${ENABLE_SSA})
 AM_CONDITIONAL([ENABLE_SSA], test x"${ENABLE_SSA}" = "xyes")
+AM_CONDITIONAL([ENABLE_ESCAPE], test x"${ENABLE_SSA}" = "xyes")
+AM_CONDITIONAL([ENABLE_ESCAPE_CHECK], test x"${ENABLE_SSA}" = "xyes")
 
 if test x"${ENABLE_SSA}" = "xyes"; then
     AC_DEFINE([ENABLE_SSA], 1, [enable lsra with ssa])
+    AC_DEFINE([ENABLE_ESCAPE], 1, [enable escape analysis with ssa])
+    AC_DEFINE([ENABLE_ESCAPE_CHECK], 1, [enable generating code to validate escape analysis results])
     ENABLE_LSRA="no"
 fi
 
@@ -695,7 +702,6 @@ if test x"${ENABLE_LSRA}" = "xyes"; then
     AC_DEFINE([ENABLE_LSRA], 1, [enable lsra])
 fi
 
-
 dnl check if profiling should be supported
 AC_MSG_CHECKING(whether profiling should be supported)
 AC_ARG_ENABLE([profiling],
@@ -919,10 +925,10 @@ AC_CONFIG_FILES([Makefile]
                [src/vmcore/Makefile]
                [tests/Makefile]
                [tests/regression/Makefile]
-               [tests/regression/bugzilla/Makefile]
                [tests/regression/assertion/Makefile]
+               [tests/regression/base/Makefile]
+               [tests/regression/bugzilla/Makefile]
                [tests/regression/jasmin/Makefile]
-               [tests/regression/junit/Makefile]
                [tests/regression/native/Makefile]
                [tests/regression/resolving/Makefile]
                [tests/regression/resolving/classes1/Makefile]
@@ -934,6 +940,9 @@ AC_CONFIG_FILES([Makefile]
 dnl now configure subpackages with OPT_CFLAGS and ARCH_CFLAGS
 export OPT_CFLAGS
 export ARCH_CFLAGS
+dnl We only build the shared library objects but we use it as
+dnl noinst_LTLIBRARIES
+ac_configure_args="$ac_configure_args --disable-static"
 AC_CONFIG_SUBDIRS(src/mm/boehm-gc)