X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=configure.ac;h=b31143bd680c6f4a8a6c090cbc6ea52bd316a2ff;hb=205e45d916f794d5da70ade80823838ea6ab81cf;hp=1eed2156f767f1bdd827c2e16f7b2a647bf0369b;hpb=dafd5581450ca39b889766583cbe7c9adbf84a67;p=cacao.git diff --git a/configure.ac b/configure.ac index 1eed2156f..b31143bd6 100644 --- a/configure.ac +++ b/configure.ac @@ -21,8 +21,6 @@ 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. @@ -229,6 +227,7 @@ AC_HEADER_STDC dnl keep them alpha-sorted! AC_CHECK_HEADERS([fcntl.h]) +AC_CHECK_HEADERS([libgen.h]) AC_CHECK_HEADERS([netdb.h]) AC_CHECK_HEADERS([stdlib.h]) AC_CHECK_HEADERS([string.h]) @@ -275,23 +274,27 @@ AC_FUNC_MMAP dnl keep them alpha-sorted! AC_CHECK_FUNCS([accept]) +AC_CHECK_FUNCS([access]) 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([dirname]) AC_CHECK_FUNCS([fflush]) AC_CHECK_FUNCS([fopen]) AC_CHECK_FUNCS([fprintf]) AC_CHECK_FUNCS([free]) AC_CHECK_FUNCS([fstat]) +AC_CHECK_FUNCS([fsync]) 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([getsockopt]) AC_CHECK_FUNCS([gettimeofday]) AC_CHECK_FUNCS([htons]) AC_CHECK_FUNCS([ioctl]) @@ -304,6 +307,7 @@ AC_CHECK_FUNCS([malloc]) AC_CHECK_FUNCS([mmap]) AC_CHECK_FUNCS([mprotect]) AC_CHECK_FUNCS([open]) +AC_CHECK_FUNCS([readlink]) AC_CHECK_FUNCS([recv]) AC_CHECK_FUNCS([scandir]) AC_CHECK_FUNCS([select]) @@ -347,135 +351,24 @@ AC_DEFINE_UNQUOTED([CACAO_LIBDIR], "${CACAO_LIBDIR}", [library installation pref AC_SUBST(CACAO_LIBDIR) -dnl Features +AC_CHECK_ENABLE_LTDL 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 -AC_CHECK_SOFT_FLOAT_CMP -AC_CHECK_SOFT_DOUBLE_CMP - -dnl check for interpreter -AC_ARG_ENABLE([intrp], [AS_HELP_STRING(--enable-intrp,enable interpreter [[default=no]])]) - -AC_MSG_CHECKING(whether interpreter should be compiled) -if test x"$enable_intrp" = "xyes"; then - AC_MSG_RESULT(yes) - AC_DEFINE([ENABLE_INTRP], 1, [enable interpreter]) - AM_CONDITIONAL([ENABLE_INTRP], [true]) - ENABLE_INTRP=yes - - AC_ASM_SKIP16 - - dnl check for libffi - AC_ARG_WITH([ffi], - [AS_HELP_STRING(--with-ffi,use libffi to call native functions)], - [WITH_FFI=yes - AC_CHECK_HEADERS([ffi.h],, [AC_MSG_ERROR(cannot find ffi.h)]) - AC_CHECK_LIB(ffi, ffi_call,, [AC_MSG_ERROR(cannot find libffi)]) - AC_DEFINE([WITH_FFI], 1, [use libffi])], - [WITH_FFI=no]) - - dnl check for libffcall - AC_ARG_WITH([ffcall], - [AS_HELP_STRING(--with-ffcall,use libffcall to call native functions)], - [WITH_FFCALL=yes - AC_CHECK_HEADERS([avcall.h],, [AC_MSG_ERROR(cannot find avcall.h)]) - AC_CHECK_LIB(avcall, __builtin_avcall,, [AC_MSG_ERROR(cannot find libavcall (from libffcall))]) - AC_DEFINE([WITH_FFCALL], 1, [use libffcall])], - [WITH_FFCALL=no]) - - dnl check for libffi or libffcall - if test x"${WITH_FFI}" = "xyes" -a x"${WITH_FFCALL}" = "xyes"; then - AC_ERROR(Enable only libffi or libffcall.) - fi - if test x"${WITH_FFI}" = "xno" -a x"${WITH_FFCALL}" = "xno"; then - AC_ERROR(Enable one of libffi or libffcall.) - fi - -else - AC_MSG_RESULT(no) - AM_CONDITIONAL([ENABLE_INTRP], [false]) - ENABLE_INTRP="no" -fi +AC_CHECK_ENABLE_JIT +AC_CHECK_ENABLE_INTRP if test x"${ENABLE_JIT}" = "xno" -a x"${ENABLE_INTRP}" = "xno"; then AC_ERROR(You have to enable at least the JIT or the interpreter.) fi +AC_CHECK_SOFTFLOAT +AC_CHECK_SOFT_FLOAT_CMP +AC_CHECK_SOFT_DOUBLE_CMP -dnl check for garbage collector usage -AC_ARG_ENABLE([gc], [AS_HELP_STRING(--enable-gc,enable garbage collector support (none,boehm,cacao) [[default=boehm]])]) -AC_MSG_CHECKING(whether GC should be enabled) -enable_gc=${enable_gc:-boehm} -case "$enable_gc" in -no | none) - AC_DEFINE([DISABLE_GC], 1, [disable garbage collector]) - ENABLE_GC=none - AC_MSG_RESULT(no) - ;; - -boehm) - AC_DEFINE([ENABLE_GC_BOEHM], 1, [enable conservative boehm-gc]) - ENABLE_GC=boehm - AC_MSG_RESULT(yes, boehm-gc) - ;; - -cacao) - AC_DEFINE([ENABLE_GC_CACAO], 1, [enable exact cacao-gc]) - ENABLE_GC=cacao - AC_MSG_RESULT(yes, cacao-gc) - ;; - -*) - AC_MSG_ERROR($enable_gc is an unknown garbage collector package) - ;; -esac -AM_CONDITIONAL([DISABLE_GC], test x"${ENABLE_GC}" = "xnone") -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], - [AS_HELP_STRING(--disable-dump,disable dump memory (for debugging only!) [[default=yes]])], - [case "${enableval}" in - no) - DISABLE_DUMP=yes - AC_DEFINE([DISABLE_DUMP], 1, [disable dump memory]) - ;; - *) DISABLE_DUMP=no;; - esac], - [DISABLE_DUMP=no]) -AC_MSG_RESULT(${DISABLE_DUMP}) - - -dnl check for debug -AC_MSG_CHECKING(whether debug code generation should be enabled) -AC_ARG_ENABLE([debug], - [AS_HELP_STRING(--disable-debug,disable debug code generation [[default=yes]])], - [case "${enableval}" in - no) NDEBUG=yes - AC_DEFINE([NDEBUG], 1, [disable debug code]) - ;; - *) NDEBUG=no;; - esac], - [NDEBUG=no]) - -if test x"${NDEBUG}" = "xno"; then - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi -AM_CONDITIONAL([NDEBUG], test x"${NDEBUG}" = "xyes") +AC_CHECK_ENABLE_GC +AC_CHECK_ENABLE_DEBUG +AC_CHECK_ENABLE_DUMP dnl check for memcheck support @@ -495,6 +388,23 @@ if test x"${ENABLE_MEMCHECK}" = "xyes"; then fi +dnl check for handles (indirection cells) support +AC_MSG_CHECKING(whether handles (indirection cells) should be enabled) +AC_ARG_ENABLE([handles], + [AS_HELP_STRING(--enable-handles,enable handles (indirection cells) [[default=no]])], + [case "${enableval}" in + yes) ENABLE_HANDLES=yes;; + *) ENABLE_HANDLES=no;; + esac], + [ENABLE_HANDLES=no]) +AC_MSG_RESULT(${ENABLE_HANDLES}) +AM_CONDITIONAL([ENABLE_HANDLES], test x"${ENABLE_HANDLES}" = "xyes") + +if test x"${ENABLE_HANDLES}" = "xyes"; then + AC_DEFINE([ENABLE_HANDLES], 1, [enable handles (indirection cells)]) +fi + + dnl check for vmlog support AC_MSG_CHECKING(whether vmlog tracing should be enabled) AC_ARG_ENABLE([vmlog], @@ -829,22 +739,7 @@ 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], - [AS_HELP_STRING(--enable-staticvm,link CACAO statically [[default=no]])], - [case "${enableval}" in - yes) ENABLE_STATICVM=yes - AC_DEFINE([ENABLE_STATICVM], 1, [link CACAO statically]) - ;; - *) ENABLE_STATICVM=no;; - esac], - [ENABLE_STATICVM=no]) -AC_MSG_RESULT(${ENABLE_STATICVM}) -AM_CONDITIONAL([ENABLE_STATICVM], test x"${ENABLE_STATICVM}" = "xyes") -AC_SUBST(ENABLE_STATICVM) - - +AC_CHECK_ENABLE_STATICVM AC_CHECK_ENABLE_ANNOTATIONS @@ -859,48 +754,13 @@ AC_DEFINE_UNQUOTED([CACAO_VM_ZIP], "${CACAO_VM_ZIP}", [CACAO's vm.zip]) AC_SUBST(CACAO_VM_ZIP) +AC_CHECK_WITH_CACAOH 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 -AC_MSG_CHECKING(if we compile for a JRE-style directory layout) -AC_ARG_WITH([jre-layout], - [AS_HELP_STRING(--with-jre-layout,compile for JRE-style directory layout [[default=no]])], - [case "${enableval}" in - yes) WITH_JRE_LAYOUT=yes - AC_DEFINE([WITH_JRE_LAYOUT], 1, [with JRE layout]) - ;; - *) WITH_JRE_LAYOUT=no;; - esac], - [WITH_JRE_LAYOUT=no]) -AC_MSG_RESULT(${WITH_JRE_LAYOUT}) - - -dnl check if GNU Classpath should be linked statically into CACAO -AC_MSG_CHECKING(whether to link GNU Classpath native libraries statically into CACAO) -AC_ARG_WITH([static-classpath], - [AS_HELP_STRING(--with-static-classpath,link GNU classpath native libraries statically into CACAO [[default=no]])], - [case "${enableval}" in - yes) WITH_STATIC_CLASSPATH=yes;; - *) WITH_STATIC_CLASSPATH=no;; - esac], - [WITH_STATIC_CLASSPATH=no]) -AC_MSG_RESULT(${WITH_STATIC_CLASSPATH}) - -if test x"${WITH_STATIC_CLASSPATH}" = "xyes"; then - AC_DEFINE([WITH_STATIC_CLASSPATH], 1, [link GNU classpath native libraries statically into CACAO]) - - dnl check for some classpath related stuff when we link statically - AM_ICONV_LINK -else - AC_CHECK_ENABLE_LTDL -fi -AM_CONDITIONAL([WITH_STATIC_CLASSPATH], test x"${WITH_STATIC_CLASSPATH}" = "xyes") -AC_SUBST(WITH_STATIC_CLASSPATH) +AC_CHECK_WITH_JRE_LAYOUT dnl check for some programs we need @@ -958,7 +818,6 @@ AC_CONFIG_FILES([Makefile] [src/native/Makefile] [src/native/include/Makefile] [src/native/jvmti/Makefile] - [src/native/tools/Makefile] [src/native/vm/Makefile] [src/native/vm/cldc1.1/Makefile] [src/native/vm/gnu/Makefile]