X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=configure.ac;h=1eed2156f767f1bdd827c2e16f7b2a647bf0369b;hb=8dfb84a6069b71dc667ffbbd8bfb5e985296123d;hp=55530680c90d9f9a90f121b7270b3d7cb340ba6b;hpb=4c0508d4c416f2ab3a114853c09da5dccea36565;p=cacao.git diff --git a/configure.ac b/configure.ac index 55530680c..1eed2156f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,10 +1,37 @@ +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 +dnl This file is part of CACAO. +dnl +dnl This program is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU General Public License as +dnl published by the Free Software Foundation; either version 2, or (at +dnl your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +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 8351 2007-08-19 17:56:23Z twisti $ + dnl Process this file with autoconf to produce a configure script. -AC_INIT(cacao, 0.97+svn, cacao@cacaojvm.org) + +AC_INIT(cacao, 0.98+svn, cacao@cacaojvm.org) AC_CONFIG_SRCDIR(src/cacao/cacao.c) AC_CANONICAL_HOST AC_PREREQ(2.59) -AM_INIT_AUTOMAKE([1.9.0]) +AM_INIT_AUTOMAKE([1.9.0 dist-bzip2]) AM_MAINTAINER_MODE AM_CONFIG_HEADER([config.h]) @@ -24,51 +51,69 @@ case "$host_cpu" in alpha | alphaev56 | alphapca56 ) ARCH_DIR="alpha" ARCH_CFLAGS="-mieee -D__ALPHA__" + JAVA_ARCH="alpha" ;; -arm | armv4tl | armv5b | armv5l ) +arm | armv4 | armv4tl | armv5b | armv5l ) ARCH_DIR="arm" ARCH_CFLAGS="-D__ARM__" + JAVA_ARCH="arm" ;; hppa2.0 ) ARCH_DIR="parisc" ARCH_CFLAGS="-D__PARISC__" + JAVA_ARCH="hppa" ;; i386 | i486 | i586 | i686 ) ARCH_DIR="i386" ARCH_CFLAGS="-D__I386__" + JAVA_ARCH="i386" ;; m68k ) ARCH_DIR="m68k" ARCH_CFLAGS="-D__M68K__" + JAVA_ARCH="m68k" ;; mips | mipsel ) ARCH_DIR="mips" ARCH_CFLAGS="-D__MIPS__" + dnl Is this correct for mipsel? + JAVA_ARCH="mips" ;; powerpc ) ARCH_DIR="powerpc" ARCH_CFLAGS="-D__POWERPC__" + JAVA_ARCH="ppc" ;; powerpc64 ) ARCH_DIR="powerpc64" ARCH_CFLAGS="-D__POWERPC64__" + JAVA_ARCH="ppc64" + ;; + +s390 ) + ARCH_DIR="s390" + ARCH_CFLAGS="-D__S390__" + JAVA_ARCH="s390" ;; -sparc64 ) +sparc | sparc64 ) ARCH_DIR="sparc64" ARCH_CFLAGS="-mcpu=v9 -m64 -D__SPARC_64__" + dnl Is this correct for 64-bits? + JAVA_ARCH="sparc" ;; x86_64 ) ARCH_DIR="x86_64" ARCH_CFLAGS="-D__X86_64__" + JAVA_ARCH="amd64" ;; xdspcore ) @@ -134,6 +179,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 @@ -154,6 +207,7 @@ 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]) AC_SUBST(ARCH_DIR) AC_SUBST(OS_DIR) AC_SUBST(USE_SCHEDULER) @@ -172,10 +226,23 @@ AM_PROG_MKDIR_P dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC + +dnl keep them alpha-sorted! AC_CHECK_HEADERS([fcntl.h]) -AC_CHECK_HEADERS([sys/time.h]) +AC_CHECK_HEADERS([netdb.h]) +AC_CHECK_HEADERS([stdlib.h]) +AC_CHECK_HEADERS([string.h]) +AC_CHECK_HEADERS([time.h]) +AC_CHECK_HEADERS([ucontext.h]) AC_CHECK_HEADERS([unistd.h]) AC_CHECK_HEADERS([sys/ioctl.h]) +AC_CHECK_HEADERS([sys/mman.h]) +AC_CHECK_HEADERS([sys/resource.h]) +AC_CHECK_HEADERS([sys/select.h]) +AC_CHECK_HEADERS([sys/socket.h]) +AC_CHECK_HEADERS([sys/stat.h]) +AC_CHECK_HEADERS([sys/time.h]) +AC_CHECK_HEADERS([sys/types.h]) dnl this is for fdlibm AC_CHECK_HEADERS([stdint.h]) @@ -196,15 +263,61 @@ AC_TYPE_SIZE_T AC_HEADER_TIME 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 AC_TYPE_SIGNAL AC_FUNC_MEMCMP AC_FUNC_MMAP -AC_CHECK_FUNCS([calloc mmap getpagesize free]) -AC_CHECK_FUNCS([getcwd gettimeofday]) -AC_CHECK_FUNCS([scandir]) + +dnl keep them alpha-sorted! +AC_CHECK_FUNCS([accept]) +AC_CHECK_FUNCS([atoi]) +AC_CHECK_FUNCS([atol]) +AC_CHECK_FUNCS([calloc]) +AC_CHECK_FUNCS([close]) +AC_CHECK_FUNCS([confstr]) +AC_CHECK_FUNCS([connect]) +AC_CHECK_FUNCS([fflush]) +AC_CHECK_FUNCS([fopen]) +AC_CHECK_FUNCS([fprintf]) +AC_CHECK_FUNCS([free]) +AC_CHECK_FUNCS([fstat]) +AC_CHECK_FUNCS([getcwd]) +AC_CHECK_FUNCS([gethostbyname]) +AC_CHECK_FUNCS([gethostname]) +AC_CHECK_FUNCS([getpagesize]) +AC_CHECK_FUNCS([getrusage]) +AC_CHECK_FUNCS([getsockname]) +AC_CHECK_FUNCS([gettimeofday]) +AC_CHECK_FUNCS([htons]) +AC_CHECK_FUNCS([ioctl]) AC_CHECK_FUNCS([isnan]) +AC_CHECK_FUNCS([listen]) +AC_CHECK_FUNCS([localtime]) +AC_CHECK_FUNCS([localtime_r]) +AC_CHECK_FUNCS([lseek]) +AC_CHECK_FUNCS([malloc]) +AC_CHECK_FUNCS([mmap]) +AC_CHECK_FUNCS([mprotect]) +AC_CHECK_FUNCS([open]) +AC_CHECK_FUNCS([recv]) +AC_CHECK_FUNCS([scandir]) +AC_CHECK_FUNCS([select]) +AC_CHECK_FUNCS([send]) +AC_CHECK_FUNCS([setsockopt]) +AC_CHECK_FUNCS([shutdown]) +AC_CHECK_FUNCS([socket]) +AC_CHECK_FUNCS([strchr]) +AC_CHECK_FUNCS([strdup]) +AC_CHECK_FUNCS([strerror]) +AC_CHECK_FUNCS([strncmp]) +AC_CHECK_FUNCS([strstr]) +AC_CHECK_FUNCS([time]) + dnl Checks for libraries. @@ -236,65 +349,16 @@ 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") - +AC_CHECK_ENABLE_JAVA +AC_CHECK_ENABLE_JIT -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 with-options +AC_CHECK_WITH_CACAOH - -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 @@ -378,6 +442,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], @@ -430,6 +495,23 @@ if test x"${ENABLE_MEMCHECK}" = "xyes"; then fi +dnl check for vmlog support +AC_MSG_CHECKING(whether vmlog tracing should be enabled) +AC_ARG_ENABLE([vmlog], + [AS_HELP_STRING(--enable-vmlog,enable vmlog tracing [[default=no]])], + [case "${enableval}" in + yes) ENABLE_VMLOG=yes;; + *) ENABLE_VMLOG=no;; + esac], + [ENABLE_VMLOG=no]) +AC_MSG_RESULT(${ENABLE_VMLOG}) +AM_CONDITIONAL([ENABLE_VMLOG], test x"${ENABLE_VMLOG}" = "xyes") + +if test x"${ENABLE_VMLOG}" = "xyes"; then + AC_DEFINE([ENABLE_VMLOG], 1, [enable vmlog tracing code]) +fi + + dnl check for disassembler support AC_MSG_CHECKING(whether disassembler should be enabled) AC_ARG_ENABLE([disassembler], @@ -448,18 +530,25 @@ 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) + 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 + case "${OS_DIR}" in + solaris) + AC_CHECK_LIB(rt, sem_init,, [AC_MSG_ERROR(cannot find librt)]) + ;; + esac + + 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))]) @@ -560,61 +649,7 @@ if test x"${ENABLE_JVMTI}" = "xyes"; then fi -dnl threads -AC_ARG_ENABLE([threads], [AS_HELP_STRING(--enable-threads,enable threads support (none,native) [[default=native]])]) -AC_ARG_ENABLE([__thread], [AS_HELP_STRING(--enable-__thread,use TLS features)], [use__thread=$enableval], [use__thread=no]) - -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([ENABLE_THREADS], [false]) - ;; - -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) - - ARCH_CFLAGS="$ARCH_CFLAGS -D_REENTRANT" - - dnl we changed ARCH_CFLAGS, set CFLAGS again - CFLAGS="$ARCH_CFLAGS $OPT_CFLAGS" - - 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) - ;; -esac - - -dnl Check whether the compiler supports the __thread keyword. -if test "x$use__thread" != xno; then - AC_CACHE_CHECK([for __thread], ac_cv_gcc___thread, - [cat > conftest.c <<\EOF -__thread int a = 42; -EOF - if AC_TRY_COMMAND([${CC-cc} $ARCH_CFLAGS $OPT_CFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD]); then - ac_cv_gcc___thread=yes - else - ac_cv_gcc___thread=no - fi - rm -f conftest*]) - if test "$ac_cv_gcc___thread" = yes; then - AC_DEFINE([HAVE___THREAD], 1, [have __thread]) - fi -else - ac_cv_gcc___thread=no -fi +AC_CHECK_ENABLE_THREADS dnl check if if-conversion should be supported @@ -651,6 +686,40 @@ 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], + [AS_HELP_STRING(--enable-replacement,enable on-stack replacement [[default=no]])], + [case "${enableval}" in + yes) ENABLE_REPLACEMENT=yes;; + *) ENABLE_REPLACEMENT=no;; + esac], + [ENABLE_REPLACEMENT=no]) +AC_MSG_RESULT(${ENABLE_REPLACEMENT}) +AM_CONDITIONAL([ENABLE_REPLACEMENT], test x"${ENABLE_REPLACEMENT}" = "xyes") + +if test x"${ENABLE_REPLACEMENT}" = "xyes"; then + AC_DEFINE([ENABLE_REPLACEMENT], 1, [use on-stack replacement]) +fi + + dnl check for loop optimization AC_MSG_CHECKING(whether loop optimization should be supported) AC_ARG_ENABLE([loop], @@ -748,55 +817,18 @@ else fi -dnl check if zlib should be used -AC_MSG_CHECKING(whether ZIP/JAR archives should be supported) -AC_ARG_ENABLE([zlib], - [AS_HELP_STRING(--disable-zlib,disable ZIP/JAR archive support (needs zlib) [[default=yes]])], - [case "${enableval}" in - no) ENABLE_ZLIB=no;; - *) ENABLE_ZLIB=yes;; - esac], - [ENABLE_ZLIB=yes]) -AC_MSG_RESULT(${ENABLE_ZLIB}) - -if test x"${ENABLE_ZLIB}" = "xyes"; then - AC_CHECK_HEADERS([zconf.h],, [AC_MSG_ERROR(cannot find zconf.h)]) - AC_CHECK_HEADERS([zlib.h],, [AC_MSG_ERROR(cannot find zlib.h)]) - AC_CHECK_LIB(z, inflate,, [AC_MSG_ERROR(cannot find libz)]) - AC_DEFINE([ENABLE_ZLIB], 1, [use zlib]) -fi -AM_CONDITIONAL([ENABLE_ZLIB], test x"${ENABLE_ZLIB}" = "xyes") - - -dnl check if a libjvm.so should be built -AC_MSG_CHECKING(whether to build a libjvm.so) -AC_ARG_ENABLE([libjvm], - [AS_HELP_STRING(--disable-libjvm,build a libjvm.so [[default=yes]])], - [case "${enableval}" in - no) ENABLE_LIBJVM=no;; - *) ENABLE_LIBJVM=yes;; - esac], - [ENABLE_LIBJVM=yes]) -AC_MSG_RESULT(${ENABLE_LIBJVM}) -AM_CONDITIONAL([ENABLE_LIBJVM], test x"${ENABLE_LIBJVM}" = "xyes") -AC_SUBST(ENABLE_LIBJVM) - -if test x"${ENABLE_LIBJVM}" = "xyes"; then - AC_DEFINE([ENABLE_LIBJVM], 1, [enable libjvm.so]) +AC_CHECK_ENABLE_ZLIB - dnl set AC_ENABLE_SHARED and AC_DISABLE_STATIC properly - enable_shared=yes - enable_static=no -else - enable_shared=no - enable_static=yes -fi +dnl check for stuff to be built +AC_CHECK_ENABLE_JNI +AC_CHECK_ENABLE_LIBJVM -dnl libtool stuff +dnl ATTENTION: These check must be after setting +dnl enable_shared/enable_static (happens in AC_CHECK_ENABLE_LIBJVM), +dnl because libtool uses them to build the correct libraries. AC_LIBTOOL_DLOPEN AC_PROG_LIBTOOL - dnl check if CACAO should be linked statically AC_MSG_CHECKING(whether to link CACAO statically) AC_ARG_ENABLE([staticvm], @@ -813,10 +845,13 @@ AM_CONDITIONAL([ENABLE_STATICVM], test x"${ENABLE_STATICVM}" = "xyes") AC_SUBST(ENABLE_STATICVM) +AC_CHECK_ENABLE_ANNOTATIONS + + dnl where is CACAO's vm.zip AC_MSG_CHECKING(where CACAO's vm.zip is installed) AC_ARG_WITH([vm-zip], - [AS_HELP_STRING(--with-vm-zip,path to CACAO's vm.zip (includes the name of the file and may be flat) [[default=/usr/local/cacao/share/cacao/vm.zip]])], + [AS_HELP_STRING(--with-vm-zip=,path to CACAO's vm.zip (includes the name of the file and may be flat) [[default=/usr/local/cacao/share/cacao/vm.zip]])], [CACAO_VM_ZIP=${withval}], [CACAO_VM_ZIP=${CACAO_PREFIX}/share/cacao/vm.zip]) AC_MSG_RESULT(${CACAO_VM_ZIP}) @@ -824,80 +859,11 @@ AC_DEFINE_UNQUOTED([CACAO_VM_ZIP], "${CACAO_VM_ZIP}", [CACAO's vm.zip]) AC_SUBST(CACAO_VM_ZIP) -dnl which classpath are we using? -AC_MSG_CHECKING(which classpath to use) -AC_ARG_WITH([classpath], - [AS_HELP_STRING(--with-classpath,specifies which type of classpath to use as Java core library (gnu) [[default=gnu]])], - [case "${withval}" in - cldc1.1) - WITH_CLASSPATH=cldc1.1 - AC_DEFINE([WITH_CLASSPATH_CLDC1_1], 1, [use Sun's CLDC1.1 classes]) - AC_SUBST(WITH_CLASSPATH_CLDC1_1) - ;; - gnu) - WITH_CLASSPATH=gnu - AC_DEFINE([WITH_CLASSPATH_GNU], 1, [use GNU Classpath]) - AC_SUBST(WITH_CLASSPATH_GNU) - ;; - *) - AC_MSG_ERROR(unknown classpath ${withval}) - ;; - esac], - [WITH_CLASSPATH=gnu - AC_DEFINE([WITH_CLASSPATH_GNU], 1, [use GNU Classpath]) - AC_SUBST(WITH_CLASSPATH_GNU)]) -AC_MSG_RESULT(${WITH_CLASSPATH}) -AM_CONDITIONAL([WITH_CLASSPATH_CLDC1_1], test x"${WITH_CLASSPATH}" = "xcldc1.1") -AM_CONDITIONAL([WITH_CLASSPATH_GNU], test x"${WITH_CLASSPATH}" = "xgnu") - - -dnl is GNU classpath installed somewhere different -AC_MSG_CHECKING(where GNU Classpath is installed) -AC_ARG_WITH([classpath-prefix], - [AS_HELP_STRING(--with-classpath-prefix=,installation directory of GNU Classpath [[default=/usr/local/classpath]])], - [CLASSPATH_PREFIX=${withval}], - [CLASSPATH_PREFIX=/usr/local/classpath]) -AC_MSG_RESULT(${CLASSPATH_PREFIX}) -AC_DEFINE_UNQUOTED([CLASSPATH_PREFIX], "${CLASSPATH_PREFIX}", [GNU Classpath installation directory]) -AC_SUBST(CLASSPATH_PREFIX) - - -dnl where is GNU Classpath's glibj.zip -AC_MSG_CHECKING(where GNU Classpath's glibj.zip is installed) -AC_ARG_WITH([classpath-glibj-zip], - [AS_HELP_STRING(--with-classpath-glibj-zip,path to GNU Classpath's glibj.zip (includes the name of the file and may be flat) [[default=/usr/local/classpath/share/classpath/glibj.zip]])], - [CLASSPATH_GLIBJ_ZIP=${withval}], - [CLASSPATH_GLIBJ_ZIP=${CLASSPATH_PREFIX}/share/classpath/glibj.zip]) -AC_MSG_RESULT(${CLASSPATH_GLIBJ_ZIP}) -AC_DEFINE_UNQUOTED([CLASSPATH_GLIBJ_ZIP], "${CLASSPATH_GLIBJ_ZIP}", [GNU Classpath's glibj.zip]) -AC_SUBST(CLASSPATH_GLIBJ_ZIP) - - -dnl where are the GNU Classpath libraries installed -AC_MSG_CHECKING(where GNU Classpath libraries are installed) -AC_ARG_WITH([classpath-libdir], - [AS_HELP_STRING(--with-classpath-libdir=,installation directory of GNU Classpath libraries [[default=/usr/local/classpath/lib]])], - [CLASSPATH_LIBDIR=${withval}], - [CLASSPATH_LIBDIR=${CLASSPATH_PREFIX}/lib]) -AC_MSG_RESULT(${CLASSPATH_LIBDIR}) - -dnl expand CLASSPATH_LIBDIR to something that is usable in C code -AS_AC_EXPAND([CLASSPATH_LIBDIR], ${CLASSPATH_LIBDIR}) -AC_DEFINE_UNQUOTED([CLASSPATH_LIBDIR], "${CLASSPATH_LIBDIR}", [GNU Classpath libraries installation directory]) -AC_SUBST(CLASSPATH_LIBDIR) - - -dnl where are the GNU Classpath headers installed -AC_MSG_CHECKING(where GNU Classpath headers are installed) -AC_ARG_WITH([classpath-includedir], - [AS_HELP_STRING(--with-classpath-includedir=,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)]) +AC_CHECK_WITH_CLASSPATH +AC_CHECK_WITH_CLASSPATH_PREFIX +AC_CHECK_WITH_CLASSPATH_CLASSES +AC_CHECK_WITH_CLASSPATH_LIBDIR +AC_CHECK_WITH_CLASSPATH_INCLUDEDIR dnl if we compile for a JRE-style directory layout @@ -931,17 +897,41 @@ if test x"${WITH_STATIC_CLASSPATH}" = "xyes"; then dnl check for some classpath related stuff when we link statically AM_ICONV_LINK else - AC_CHECK_HEADERS([ltdl.h],, [AC_MSG_ERROR(cannot find ltdl.h)]) - AC_CHECK_LIB(ltdl, lt_dlopen,, [AC_MSG_ERROR(cannot find libltdl)]) + AC_CHECK_ENABLE_LTDL fi AM_CONDITIONAL([WITH_STATIC_CLASSPATH], test x"${WITH_STATIC_CLASSPATH}" = "xyes") AC_SUBST(WITH_STATIC_CLASSPATH) dnl check for some programs we need -AC_PROG_JAVAC -AC_PROG_JAR +case "${WITH_CLASSPATH}" in + cldc1.1 | gnu) + AC_PROG_JAVAC + AC_PROG_JAR + ;; + sun) + ;; + *) + AC_MSG_ERROR(unknown classpath configuration ${WITH_CLASSPATH}) + ;; +esac + + +AC_CHECK_HEADERS( + [regex.h], + [ + dnl If debug build and regex.h available, enable debug filter + if test x"${NDEBUG}" = "xno"; then + AC_DEFINE(ENABLE_DEBUG_FILTER, 1, [debug filter]) + fi + dnl If vmlog enambled and regex.h available, enable vmlogfilter + AM_CONDITIONAL([ENABLE_VMLOGFILTER], [test x"${ENABLE_VMLOG}" = "xyes"]) + ], + [ + AM_CONDITIONAL([ENABLE_VMLOGFILTER], [false]) + ] +) dnl finally pass CFLAGS to Makefiles via AM_CFLAGS CFLAGS=$OPT_CFLAGS @@ -953,6 +943,8 @@ AC_CONFIG_FILES([Makefile] [contrib/Makefile] [contrib/setenvinstalled] [contrib/setenvsource] + [contrib/vmlog/Makefile] + [contrib/vmlog/t/Makefile] [doc/Makefile] [doc/handbook/Makefile] [man/Makefile] @@ -970,6 +962,7 @@ AC_CONFIG_FILES([Makefile] [src/native/vm/Makefile] [src/native/vm/cldc1.1/Makefile] [src/native/vm/gnu/Makefile] + [src/native/vm/sun/Makefile] [src/scripts/Makefile] [src/scripts/java] [src/threads/Makefile] @@ -982,6 +975,8 @@ AC_CONFIG_FILES([Makefile] [src/vm/jit/alpha/Makefile] [src/vm/jit/alpha/freebsd/Makefile] [src/vm/jit/alpha/linux/Makefile] + [src/vm/jit/arm/Makefile] + [src/vm/jit/arm/linux/Makefile] [src/vm/jit/i386/Makefile] [src/vm/jit/i386/cygwin/Makefile] [src/vm/jit/i386/darwin/Makefile] @@ -990,28 +985,41 @@ 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] - [src/vm/jit/optimizing/Makefile] + [src/vm/jit/mips/uclinux/Makefile] + [src/vm/jit/optimizing/Makefile] [src/vm/jit/parisc/Makefile] + [src/vm/jit/parisc/linux/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/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/tools/Makefile] + [src/vm/jit/sparc64/solaris/Makefile] [src/vm/jit/verify/Makefile] [src/vm/jit/x86_64/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