Fixes PR52.
[cacao.git] / configure.ac
index e3d14074a25d8fc61de8d186c74c02f469f33041..0677557d83f715eac77c9cf689bb086d34ef73f2 100644 (file)
@@ -1,9 +1,7 @@
 dnl configure.ac
 dnl
-dnl Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
-dnl C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
-dnl E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
-dnl J. Wenninger, Institut f. Computersprachen - TU Wien
+dnl Copyright (C) 1996-2005, 2006, 2007, 2008
+dnl CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
 dnl 
 dnl This file is part of CACAO.
 dnl 
@@ -197,12 +195,6 @@ 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])
-AC_DEFINE_UNQUOTED(VERSION_CC, "$CC", [CC used])
-AC_DEFINE_UNQUOTED(VERSION_CFLAGS, "$OPT_CFLAGS $ARCH_CFLAGS", [CFLAGS used])
-
-
 dnl define and substitute some architecture specific variables
 AC_DEFINE_UNQUOTED([ARCH_DIR], "${ARCH_DIR}", [architecture directory])
 AC_DEFINE_UNQUOTED([JAVA_ARCH], "${JAVA_ARCH}", [Java architecture name])
@@ -275,6 +267,7 @@ AC_FUNC_MEMCMP
 AC_FUNC_MMAP
 
 dnl keep them alpha-sorted!
+AC_CHECK_FUNCS([abort])
 AC_CHECK_FUNCS([accept])
 AC_CHECK_FUNCS([access])
 AC_CHECK_FUNCS([atoi])
@@ -284,9 +277,11 @@ AC_CHECK_FUNCS([close])
 AC_CHECK_FUNCS([confstr])
 AC_CHECK_FUNCS([connect])
 AC_CHECK_FUNCS([dirname])
+AC_CHECK_FUNCS([fclose])
 AC_CHECK_FUNCS([fflush])
 AC_CHECK_FUNCS([fopen])
 AC_CHECK_FUNCS([fprintf])
+AC_CHECK_FUNCS([fread])
 AC_CHECK_FUNCS([free])
 AC_CHECK_FUNCS([fstat])
 AC_CHECK_FUNCS([fsync])
@@ -312,6 +307,7 @@ AC_CHECK_FUNCS([memset])
 AC_CHECK_FUNCS([mmap])
 AC_CHECK_FUNCS([mprotect])
 AC_CHECK_FUNCS([open])
+AC_CHECK_FUNCS([read])
 AC_CHECK_FUNCS([readlink])
 AC_CHECK_FUNCS([realloc])
 AC_CHECK_FUNCS([recv])
@@ -321,12 +317,15 @@ AC_CHECK_FUNCS([send])
 AC_CHECK_FUNCS([setsockopt])
 AC_CHECK_FUNCS([shutdown])
 AC_CHECK_FUNCS([socket])
+AC_CHECK_FUNCS([stat])
 AC_CHECK_FUNCS([strchr])
 AC_CHECK_FUNCS([strdup])
 AC_CHECK_FUNCS([strerror])
+AC_CHECK_FUNCS([strlen])
 AC_CHECK_FUNCS([strncmp])
 AC_CHECK_FUNCS([strstr])
 AC_CHECK_FUNCS([time])
+AC_CHECK_FUNCS([write])
 
 
 dnl Checks for libraries.
@@ -500,7 +499,7 @@ 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]])],
+              [AS_HELP_STRING(--disable-verifier,disable classfile verification [[default=enabled]])],
               [case "${enableval}" in
                    no) ENABLE_VERIFIER=no;;
                    *) ENABLE_VERIFIER=yes;;
@@ -571,7 +570,7 @@ AC_CHECK_ENABLE_THREADS
 dnl check if if-conversion should be supported
 AC_MSG_CHECKING(whether if-conversion should be supported)
 AC_ARG_ENABLE([ifconv],
-              [AS_HELP_STRING(--disable-ifconv,disable if-conversion [[default=yes]])],
+              [AS_HELP_STRING(--disable-ifconv,disable if-conversion [[default=enabled]])],
               [case "${enableval}" in
                    no) ENABLE_IFCONV=no;;
                    *) ENABLE_IFCONV=yes;;
@@ -656,7 +655,7 @@ 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]])],
+              [AS_HELP_STRING(--disable-ssa,disable ssa [[default=disabled]])],
               [case "${enableval}" in
                    no) ENABLE_SSA=no;;
                    *) ENABLE_SSA=yes;;
@@ -763,11 +762,21 @@ AC_SUBST(CACAO_VM_ZIP)
 
 AC_CHECK_WITH_CACAOH
 AC_CHECK_WITH_CLASSPATH
+
+dnl Now we check for jre-layout so we can skip some checks that are
+dnl not required.
+AC_CHECK_WITH_JRE_LAYOUT
+
 AC_CHECK_WITH_CLASSPATH_PREFIX
 AC_CHECK_WITH_CLASSPATH_CLASSES
-AC_CHECK_WITH_CLASSPATH_LIBDIR
-AC_CHECK_WITH_CLASSPATH_INCLUDEDIR
-AC_CHECK_WITH_JRE_LAYOUT
+
+if test x"${WITH_JRE_LAYOUT}" = "xno"; then
+   AC_CHECK_WITH_CLASSPATH_LIBDIR
+fi
+
+dnl The check for jni_md.h must be before jni.h.
+AC_CHECK_WITH_JNI_MD_H
+AC_CHECK_WITH_JNI_H
 
 
 dnl check for some programs we need
@@ -800,10 +809,28 @@ AC_CHECK_HEADERS(
        ]
 )
 
+dnl python
+
+AZ_PYTHON_DEFAULT
+AZ_PYTHON_ENABLE
+AZ_PYTHON_WITH
+AZ_PYTHON_VERSION_ENSURE( [2.4] )
+AZ_PYTHON_CSPEC
+AZ_PYTHON_LSPEC
+
+
+dnl define some stuff required for --fullversion
+AC_DEFINE_UNQUOTED(VERSION_CONFIGURE_ARGS, "$ac_configure_args", [configure arguments])
+AC_DEFINE_UNQUOTED(VERSION_CC, "$CC", [CC used])
+AC_DEFINE_UNQUOTED(VERSION_CFLAGS, "$OPT_CFLAGS $ARCH_CFLAGS $CPPFLAGS", [CFLAGS used])
+
+
 dnl finally pass CFLAGS to Makefiles via AM_CFLAGS
-CFLAGS=$OPT_CFLAGS
+CFLAGS="$OPT_CFLAGS"
 AM_CFLAGS=$ARCH_CFLAGS
+AM_CPPFLAGS="$CPPFLAGS"
 AC_SUBST(AM_CFLAGS)
+AC_SUBST(AM_CPPFLAGS)
 
 
 AC_CONFIG_FILES([Makefile]
@@ -818,8 +845,8 @@ AC_CONFIG_FILES([Makefile]
                [src/Makefile]
                [src/cacao/Makefile]
                [src/cacaoh/Makefile]
+               [src/classes/Makefile]
                [src/fdlibm/Makefile]
-               [src/lib/Makefile]
                [src/mm/Makefile]
                [src/mm/cacao-gc/Makefile]
                [src/native/Makefile]
@@ -850,6 +877,7 @@ AC_CONFIG_FILES([Makefile]
                [src/vm/jit/i386/linux/Makefile]
                [src/vm/jit/intrp/Makefile]
                [src/vm/jit/inline/Makefile]
+               [src/vm/jit/ir/Makefile]
                [src/vm/jit/loop/Makefile]
                [src/vm/jit/m68k/Makefile]
                [src/vm/jit/m68k/linux/Makefile]
@@ -878,7 +906,9 @@ AC_CONFIG_FILES([Makefile]
                [src/vmcore/Makefile]
                [tests/Makefile]
                [tests/regression/Makefile]
+               [tests/regression/bugzilla/Makefile]
                [tests/regression/codepatching/Makefile]
+               [tests/regression/assertion/Makefile]
                [tests/regression/jasmin/Makefile]
                [tests/regression/native/Makefile]
                [tests/regression/resolving/Makefile]