3 dnl Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
4 dnl C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5 dnl E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6 dnl J. Wenninger, Institut f. Computersprachen - TU Wien
8 dnl This file is part of CACAO.
10 dnl This program is free software; you can redistribute it and/or
11 dnl modify it under the terms of the GNU General Public License as
12 dnl published by the Free Software Foundation; either version 2, or (at
13 dnl your option) any later version.
15 dnl This program is distributed in the hope that it will be useful, but
16 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
17 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 dnl General Public License for more details.
20 dnl You should have received a copy of the GNU General Public License
21 dnl along with this program; if not, write to the Free Software
22 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 dnl Process this file with autoconf to produce a configure script.
28 AC_INIT(cacao, 0.98+svn, cacao@cacaojvm.org)
29 AC_CONFIG_SRCDIR(src/cacao/cacao.c)
32 AM_INIT_AUTOMAKE([1.9.0 dist-bzip2])
35 AM_CONFIG_HEADER([config.h])
37 AC_PREFIX_DEFAULT(/usr/local/cacao)
40 dnl set optimization and debugging for all architectures and systems
41 if test x"$CFLAGS" = "x"; then
49 alpha | alphaev56 | alphapca56 )
51 ARCH_CFLAGS="-mieee -D__ALPHA__"
55 arm | armv4 | armv4tl | armv5b | armv5l )
57 ARCH_CFLAGS="-D__ARM__"
63 ARCH_CFLAGS="-D__PARISC__"
67 i386 | i486 | i586 | i686 )
69 ARCH_CFLAGS="-D__I386__"
75 ARCH_CFLAGS="-D__M68K__"
81 ARCH_CFLAGS="-D__MIPS__"
82 dnl Is this correct for mipsel?
88 ARCH_CFLAGS="-D__POWERPC__"
94 ARCH_CFLAGS="-D__POWERPC64__"
100 ARCH_CFLAGS="-D__S390__"
106 ARCH_CFLAGS="-mcpu=v9 -m64 -D__SPARC_64__"
107 dnl Is this correct for 64-bits?
113 ARCH_CFLAGS="-D__X86_64__"
119 ENABLE_STATICVM="yes"
120 ARCH_CFLAGS="-D__XDSPCORE__"
125 AC_MSG_ERROR($host_cpu systems are not supported at this time)
133 INTRP_CFLAGS="$ARCH_CFLAGS -D__WINDOWS__ -D__CYGWIN__ -Wall -Wno-long-long"
134 ARCH_CFLAGS="$ARCH_CFLAGS -D__WINDOWS__ -D__CYGWIN__ -ansi -pedantic -Wall -Wno-long-long"
139 INTRP_CFLAGS="$ARCH_CFLAGS -D__DARWIN__ -Wall -Wno-long-long"
140 ARCH_CFLAGS="$ARCH_CFLAGS -D__DARWIN__ -ansi -pedantic -Wall -Wno-long-long"
145 INTRP_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
146 ARCH_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -ansi -pedantic -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
151 INTRP_CFLAGS="$ARCH_CFLAGS -D__IRIX__"
152 ARCH_CFLAGS="$ARCH_CFLAGS -D__IRIX__"
157 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"
158 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"
161 dnl must be before *linux*
164 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"
165 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"
170 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"
171 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"
176 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"
177 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"
182 dnl on solaris the architecture defines 'sparc','sun','unix' are not set when cpp is called with -ansi
183 dnl therefore we add them here
184 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"
185 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"
193 dnl temporary set the CFLAGS for configure tests (e.g. inline keyword)
194 dnl we set it properly at the end of this file
195 CFLAGS="$ARCH_CFLAGS $OPT_CFLAGS"
197 dnl set interpreter flags
198 AC_SUBST(INTRP_CFLAGS)
200 dnl define some stuff required for --fullversion
201 AC_DEFINE_UNQUOTED(VERSION_CONFIGURE_ARGS, "$ac_configure_args", [configure arguments])
202 AC_DEFINE_UNQUOTED(VERSION_CC, "$CC", [CC used])
203 AC_DEFINE_UNQUOTED(VERSION_CFLAGS, "$OPT_CFLAGS $ARCH_CFLAGS", [CFLAGS used])
206 dnl define and substitute some architecture specific variables
207 AC_DEFINE_UNQUOTED([ARCH_DIR], "${ARCH_DIR}", [architecture directory])
208 AC_DEFINE_UNQUOTED([JAVA_ARCH], "${JAVA_ARCH}", [Java architecture name])
211 AC_SUBST(USE_SCHEDULER)
214 dnl Checks for programs.
224 dnl Checks for header files.
228 dnl keep them alpha-sorted!
229 AC_CHECK_HEADERS([fcntl.h])
230 AC_CHECK_HEADERS([libgen.h])
231 AC_CHECK_HEADERS([netdb.h])
232 AC_CHECK_HEADERS([stdlib.h])
233 AC_CHECK_HEADERS([string.h])
234 AC_CHECK_HEADERS([time.h])
235 AC_CHECK_HEADERS([ucontext.h])
236 AC_CHECK_HEADERS([unistd.h])
237 AC_CHECK_HEADERS([sys/ioctl.h])
238 AC_CHECK_HEADERS([sys/mman.h])
239 AC_CHECK_HEADERS([sys/resource.h])
240 AC_CHECK_HEADERS([sys/select.h])
241 AC_CHECK_HEADERS([sys/socket.h])
242 AC_CHECK_HEADERS([sys/stat.h])
243 AC_CHECK_HEADERS([sys/time.h])
244 AC_CHECK_HEADERS([sys/types.h])
246 dnl this is for fdlibm
247 AC_CHECK_HEADERS([stdint.h])
248 AC_CHECK_HEADERS([inttypes.h])
249 AC_CHECK_HEADERS([sys/config.h])
250 AC_CHECK_HEADERS([sys/types.h])
251 AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
252 AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
253 AC_EGREP_HEADER(u_int32_t, sys/types.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, [Define to 1 if you have BSD u_int32_t]))
254 AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, [Define to 1 if you have BSD u_int32_t]))
256 dnl Checks for typedefs, structures, and compiler characteristics.
265 dnl Checks for libraries (NOTE: Should be done before function checks,
266 dnl as some functions may be in libraries we check for).
267 AC_CHECK_LIB(dl, dlopen,,)
269 dnl Checks for library functions.
270 AC_PROG_GCC_TRADITIONAL
275 dnl keep them alpha-sorted!
276 AC_CHECK_FUNCS([accept])
277 AC_CHECK_FUNCS([access])
278 AC_CHECK_FUNCS([atoi])
279 AC_CHECK_FUNCS([atol])
280 AC_CHECK_FUNCS([calloc])
281 AC_CHECK_FUNCS([close])
282 AC_CHECK_FUNCS([confstr])
283 AC_CHECK_FUNCS([connect])
284 AC_CHECK_FUNCS([dirname])
285 AC_CHECK_FUNCS([fflush])
286 AC_CHECK_FUNCS([fopen])
287 AC_CHECK_FUNCS([fprintf])
288 AC_CHECK_FUNCS([free])
289 AC_CHECK_FUNCS([fstat])
290 AC_CHECK_FUNCS([fsync])
291 AC_CHECK_FUNCS([getcwd])
292 AC_CHECK_FUNCS([gethostbyname])
293 AC_CHECK_FUNCS([gethostname])
294 AC_CHECK_FUNCS([getpagesize])
295 AC_CHECK_FUNCS([getrusage])
296 AC_CHECK_FUNCS([getsockname])
297 AC_CHECK_FUNCS([gettimeofday])
298 AC_CHECK_FUNCS([htons])
299 AC_CHECK_FUNCS([ioctl])
300 AC_CHECK_FUNCS([isnan])
301 AC_CHECK_FUNCS([listen])
302 AC_CHECK_FUNCS([localtime])
303 AC_CHECK_FUNCS([localtime_r])
304 AC_CHECK_FUNCS([lseek])
305 AC_CHECK_FUNCS([malloc])
306 AC_CHECK_FUNCS([mmap])
307 AC_CHECK_FUNCS([mprotect])
308 AC_CHECK_FUNCS([open])
309 AC_CHECK_FUNCS([readlink])
310 AC_CHECK_FUNCS([recv])
311 AC_CHECK_FUNCS([scandir])
312 AC_CHECK_FUNCS([select])
313 AC_CHECK_FUNCS([send])
314 AC_CHECK_FUNCS([setsockopt])
315 AC_CHECK_FUNCS([shutdown])
316 AC_CHECK_FUNCS([socket])
317 AC_CHECK_FUNCS([strchr])
318 AC_CHECK_FUNCS([strdup])
319 AC_CHECK_FUNCS([strerror])
320 AC_CHECK_FUNCS([strncmp])
321 AC_CHECK_FUNCS([strstr])
322 AC_CHECK_FUNCS([time])
325 dnl Checks for libraries.
327 dnl Checking sizeof void *
328 AC_CHECK_SIZEOF(void *)
332 dnl define install prefix
333 if test "x$prefix" = "xNONE"; then
334 CACAO_PREFIX=$ac_default_prefix
338 AC_DEFINE_UNQUOTED([CACAO_PREFIX], "${CACAO_PREFIX}", [installation prefix])
339 AC_SUBST(CACAO_PREFIX)
341 dnl define libdir prefix
342 if test "x$libdir" = "xNONE"; then
343 CACAO_LIBDIR=$ac_default_libdir
347 dnl expand CACAO_LIBDIR to something that is usable in C code
348 AS_AC_EXPAND([CACAO_LIBDIR], ${CACAO_LIBDIR})
349 AC_DEFINE_UNQUOTED([CACAO_LIBDIR], "${CACAO_LIBDIR}", [library installation prefix])
350 AC_SUBST(CACAO_LIBDIR)
358 AC_CHECK_ENABLE_INTRP
360 if test x"${ENABLE_JIT}" = "xno" -a x"${ENABLE_INTRP}" = "xno"; then
361 AC_ERROR(You have to enable at least the JIT or the interpreter.)
365 AC_CHECK_SOFT_FLOAT_CMP
366 AC_CHECK_SOFT_DOUBLE_CMP
369 AC_CHECK_ENABLE_DEBUG
373 dnl check for memcheck support
374 AC_MSG_CHECKING(whether debugging memory checks should be enabled)
375 AC_ARG_ENABLE([memcheck],
376 [AS_HELP_STRING(--enable-memcheck,enable debugging memory checks [[default=no]])],
377 [case "${enableval}" in
378 yes) ENABLE_MEMCHECK=yes;;
379 *) ENABLE_MEMCHECK=no;;
381 [ENABLE_MEMCHECK=no])
382 AC_MSG_RESULT(${ENABLE_MEMCHECK})
383 AM_CONDITIONAL([ENABLE_MEMCHECK], test x"${ENABLE_MEMCHECK}" = "xyes")
385 if test x"${ENABLE_MEMCHECK}" = "xyes"; then
386 AC_DEFINE([ENABLE_MEMCHECK], 1, [perform debugging memory checks])
390 dnl check for handles (indirection cells) support
391 AC_MSG_CHECKING(whether handles (indirection cells) should be enabled)
392 AC_ARG_ENABLE([handles],
393 [AS_HELP_STRING(--enable-handles,enable handles (indirection cells) [[default=no]])],
394 [case "${enableval}" in
395 yes) ENABLE_HANDLES=yes;;
396 *) ENABLE_HANDLES=no;;
399 AC_MSG_RESULT(${ENABLE_HANDLES})
400 AM_CONDITIONAL([ENABLE_HANDLES], test x"${ENABLE_HANDLES}" = "xyes")
402 if test x"${ENABLE_HANDLES}" = "xyes"; then
403 AC_DEFINE([ENABLE_HANDLES], 1, [enable handles (indirection cells)])
407 dnl check for vmlog support
408 AC_MSG_CHECKING(whether vmlog tracing should be enabled)
409 AC_ARG_ENABLE([vmlog],
410 [AS_HELP_STRING(--enable-vmlog,enable vmlog tracing [[default=no]])],
411 [case "${enableval}" in
412 yes) ENABLE_VMLOG=yes;;
416 AC_MSG_RESULT(${ENABLE_VMLOG})
417 AM_CONDITIONAL([ENABLE_VMLOG], test x"${ENABLE_VMLOG}" = "xyes")
419 if test x"${ENABLE_VMLOG}" = "xyes"; then
420 AC_DEFINE([ENABLE_VMLOG], 1, [enable vmlog tracing code])
424 dnl check for disassembler support
425 AC_MSG_CHECKING(whether disassembler should be enabled)
426 AC_ARG_ENABLE([disassembler],
427 [AS_HELP_STRING(--enable-disassembler,enable disassembler [[default=no]])],
428 [case "${enableval}" in
429 yes) ENABLE_DISASSEMBLER=yes;;
430 *) ENABLE_DISASSEMBLER=no;;
432 [ENABLE_DISASSEMBLER=no])
433 AC_MSG_RESULT(${ENABLE_DISASSEMBLER})
434 AM_CONDITIONAL([ENABLE_DISASSEMBLER], test x"${ENABLE_DISASSEMBLER}" = "xyes")
436 if test x"${ENABLE_DISASSEMBLER}" = "xyes"; then
437 AC_DEFINE([ENABLE_DISASSEMBLER], 1, [enable disassembler])
439 dnl check for binutils headers and libraries on some architectures for the
441 case "${ARCH_DIR}" in
442 arm | i386 | powerpc | x86_64 | sparc64 | powerpc64 | s390 | m68k)
443 AC_CHECK_HEADER([ansidecl.h],, [AC_MSG_ERROR(cannot find ansidecl.h)])
444 AC_CHECK_HEADER([symcat.h],, [AC_MSG_ERROR(cannot find symcat.h)])
445 AC_CHECK_HEADER([bfd.h],, [AC_MSG_ERROR(cannot find bfd.h)])
446 AC_CHECK_HEADER([dis-asm.h],, [AC_MSG_ERROR(cannot find dis-asm.h)])
449 cygwin | darwin | netbsd | solaris)
450 AC_CHECK_LIB(intl, dcgettext,, [AC_MSG_ERROR(cannot find libintl (from binutils))])
456 AC_CHECK_LIB(rt, sem_init,, [AC_MSG_ERROR(cannot find librt)])
461 AC_CHECK_LIB(iberty, xstrerror,, [AC_MSG_ERROR(cannot find libiberty (from binutils))])
462 AC_CHECK_LIB(bfd, bfd_get_arch,, [AC_MSG_ERROR(cannot find libbfd (from binutils))])
463 AC_CHECK_LIB(opcodes, disassembler,, [AC_MSG_ERROR(cannot find libopcodes (from binutils))])
464 AC_DEFINE([WITH_BINUTILS_DISASSEMBLER], 1, [use binutils disassembler])
465 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [true])
468 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
472 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
476 dnl check for statistics
477 AC_MSG_CHECKING(whether statistics generation should be enabled)
478 AC_ARG_ENABLE([statistics],
479 [AS_HELP_STRING(--enable-statistics,enable statistics generation [[default=no]])],
480 [case "${enableval}" in
481 yes) ENABLE_STATISTICS=yes;;
482 *) ENABLE_STATISTICS=no;;
484 [ENABLE_STATISTICS=no])
485 AC_MSG_RESULT(${ENABLE_STATISTICS})
486 AM_CONDITIONAL([ENABLE_STATISTICS], test x"${ENABLE_STATISTICS}" = "xyes")
488 if test x"${ENABLE_STATISTICS}" = "xyes"; then
489 AC_DEFINE([ENABLE_STATISTICS], 1, [enable statistics])
493 dnl check for verifier
494 AC_MSG_CHECKING(whether classfile verification should be enabled)
495 AC_ARG_ENABLE([verifier],
496 [AS_HELP_STRING(--disable-verifier,disable classfile verification [[default=yes]])],
497 [case "${enableval}" in
498 no) ENABLE_VERIFIER=no;;
499 *) ENABLE_VERIFIER=yes;;
501 [ENABLE_VERIFIER=yes])
502 AC_MSG_RESULT(${ENABLE_VERIFIER})
503 AM_CONDITIONAL([ENABLE_VERIFIER], test x"${ENABLE_VERIFIER}" = "xyes")
505 if test x"${ENABLE_VERIFIER}" = "xyes"; then
506 AC_DEFINE([ENABLE_VERIFIER], 1, [enable classfile verification])
510 dnl check for compiler timing
511 AC_MSG_CHECKING(whether real-time timing should be enabled)
512 AC_ARG_ENABLE([rt-timing],
513 [AS_HELP_STRING(--enable-rt-timing,enable real-time timing [[default=no]])],
514 [case "${enableval}" in
515 yes) ENABLE_RT_TIMING=yes;;
516 *) ENABLE_RT_TIMING=no;;
518 [ENABLE_RT_TIMING=no])
519 AC_MSG_RESULT(${ENABLE_RT_TIMING})
520 AM_CONDITIONAL([ENABLE_RT_TIMING], test x"${ENABLE_RT_TIMING}" = "xyes")
522 if test x"${ENABLE_RT_TIMING}" = "xyes"; then
523 AC_DEFINE([ENABLE_RT_TIMING], 1, [enable real-time timing])
527 dnl check for cycle count statistics
528 AC_MSG_CHECKING(whether cycle count statistics should be enabled)
529 AC_ARG_ENABLE([cycles-stats],
530 [AS_HELP_STRING(--enable-cycles-stats,enable cycle count statistics [[default=no]])],
531 [case "${enableval}" in
532 yes) ENABLE_CYCLES_STATS=yes;;
533 *) ENABLE_CYCLES_STATS=no;;
535 [ENABLE_CYCLES_STATS=no])
536 AC_MSG_RESULT(${ENABLE_CYCLES_STATS})
537 AM_CONDITIONAL([ENABLE_CYCLES_STATS], test x"${ENABLE_CYCLES_STATS}" = "xyes")
539 if test x"${ENABLE_CYCLES_STATS}" = "xyes"; then
540 AC_DEFINE([ENABLE_CYCLES_STATS], 1, [enable cycle count statistics])
545 AC_MSG_CHECKING(whether to compile JVMTI support)
546 AC_ARG_ENABLE([jvmti],
547 [AS_HELP_STRING(--enable-jvmti,enable JVMTI [[default=no]])],
548 [case "${enableval}" in
549 yes) ENABLE_JVMTI=yes;;
553 AC_MSG_RESULT(${ENABLE_JVMTI})
554 AM_CONDITIONAL([ENABLE_JVMTI], test x"${ENABLE_JVMTI}" = "xyes")
556 if test x"${ENABLE_JVMTI}" = "xyes"; then
557 AC_DEFINE([ENABLE_JVMTI], 1, [use JVMTI])
561 AC_CHECK_ENABLE_THREADS
564 dnl check if if-conversion should be supported
565 AC_MSG_CHECKING(whether if-conversion should be supported)
566 AC_ARG_ENABLE([ifconv],
567 [AS_HELP_STRING(--disable-ifconv,disable if-conversion [[default=yes]])],
568 [case "${enableval}" in
569 no) ENABLE_IFCONV=no;;
570 *) ENABLE_IFCONV=yes;;
573 AC_MSG_RESULT(${ENABLE_IFCONV})
574 AM_CONDITIONAL([ENABLE_IFCONV], test x"${ENABLE_IFCONV}" = "xyes")
576 if test x"${ENABLE_IFCONV}" = "xyes"; then
577 AC_DEFINE([ENABLE_IFCONV], 1, [enable if-conversion])
581 dnl check for inlining
582 AC_MSG_CHECKING(whether method inlining should be supported)
583 AC_ARG_ENABLE([inlining],
584 [AS_HELP_STRING(--enable-inlining,enable method inlining [[default=no]])],
585 [case "${enableval}" in
586 yes) ENABLE_INLINING=yes;;
587 *) ENABLE_INLINING=no;;
589 [ENABLE_INLINING=no])
590 AC_MSG_RESULT(${ENABLE_INLINING})
591 AM_CONDITIONAL([ENABLE_INLINING], test x"${ENABLE_INLINING}" = "xyes")
593 if test x"${ENABLE_INLINING}" = "xyes"; then
594 AC_DEFINE([ENABLE_INLINING], 1, [use method inlining])
598 dnl check for inlining debug options
599 AC_MSG_CHECKING(whether method inlining debug options should be enabled)
600 AC_ARG_ENABLE([inlining-debug],
601 [AS_HELP_STRING(--enable-inlining-debug,enable method inlining debug options [[default=no]])],
602 [case "${enableval}" in
603 yes) ENABLE_INLINING_DEBUG=yes;;
604 *) ENABLE_INLINING_DEBUG=no;;
606 [ENABLE_INLINING_DEBUG=no])
607 AC_MSG_RESULT(${ENABLE_INLINING_DEBUG})
608 AM_CONDITIONAL([ENABLE_INLINING_DEBUG], test x"${ENABLE_INLINING_DEBUG}" = "xyes")
610 if test x"${ENABLE_INLINING_DEBUG}" = "xyes"; then
611 AC_DEFINE([ENABLE_INLINING_DEBUG], 1, [enable method inlining debug options])
615 dnl check for replacement
616 AC_MSG_CHECKING(whether on-stack replacement should be supported)
617 AC_ARG_ENABLE([replacement],
618 [AS_HELP_STRING(--enable-replacement,enable on-stack replacement [[default=no]])],
619 [case "${enableval}" in
620 yes) ENABLE_REPLACEMENT=yes;;
621 *) ENABLE_REPLACEMENT=no;;
623 [ENABLE_REPLACEMENT=no])
624 AC_MSG_RESULT(${ENABLE_REPLACEMENT})
625 AM_CONDITIONAL([ENABLE_REPLACEMENT], test x"${ENABLE_REPLACEMENT}" = "xyes")
627 if test x"${ENABLE_REPLACEMENT}" = "xyes"; then
628 AC_DEFINE([ENABLE_REPLACEMENT], 1, [use on-stack replacement])
632 dnl check for loop optimization
633 AC_MSG_CHECKING(whether loop optimization should be supported)
634 AC_ARG_ENABLE([loop],
635 [AS_HELP_STRING(--enable-loop,enable loop optimization [[default=no]])],
636 [case "${enableval}" in
637 yes) ENABLE_LOOP=yes;;
641 AC_MSG_RESULT(${ENABLE_LOOP})
642 AM_CONDITIONAL([ENABLE_LOOP], test x"${ENABLE_LOOP}" = "xyes")
644 if test x"${ENABLE_LOOP}" = "xyes"; then
645 AC_DEFINE([ENABLE_LOOP], 1, [use loop optimization])
649 dnl check if linear scan register allocator(lsra) with SSA should be used
650 AC_MSG_CHECKING(whether lsra with ssa should be supported)
652 [AS_HELP_STRING(--disable-ssa,disable ssa [[default=no]])],
653 [case "${enableval}" in
658 AC_MSG_RESULT(${ENABLE_SSA})
659 AM_CONDITIONAL([ENABLE_SSA], test x"${ENABLE_SSA}" = "xyes")
661 if test x"${ENABLE_SSA}" = "xyes"; then
662 AC_DEFINE([ENABLE_SSA], 1, [enable lsra with ssa])
667 dnl check if linear scan register allocator(lsra) should be used
668 AC_MSG_CHECKING(whether lsra should be supported)
669 AC_ARG_ENABLE([lsra],
670 [AS_HELP_STRING(--enable-lsra,enable linear scan register allocator [[default=no]])],
671 [case "${enableval}" in
672 yes) ENABLE_LSRA=yes;;
677 if test x"${ENABLE_LSRA}" = "xyes"; then
678 if test x"${ENABLE_SSA}" = "xyes"; then
682 AC_MSG_RESULT(${ENABLE_LSRA})
683 AM_CONDITIONAL([ENABLE_LSRA], test x"${ENABLE_LSRA}" = "xyes")
685 if test x"${ENABLE_LSRA}" = "xyes"; then
686 AC_DEFINE([ENABLE_LSRA], 1, [enable lsra])
690 dnl check if profiling should be supported
691 AC_MSG_CHECKING(whether profiling should be supported)
692 AC_ARG_ENABLE([profiling],
693 [AS_HELP_STRING(--enable-profiling,enable profiling [[default=no]])],
694 [case "${enableval}" in
695 yes) ENABLE_PROFILING=yes;;
696 *) ENABLE_PROFILING=no;;
698 [ENABLE_PROFILING=no])
699 AC_MSG_RESULT(${ENABLE_PROFILING})
700 AM_CONDITIONAL([ENABLE_PROFILING], test x"${ENABLE_PROFILING}" = "xyes")
702 if test x"${ENABLE_PROFILING}" = "xyes"; then
703 AC_DEFINE([ENABLE_PROFILING], 1, [enable profiling])
707 dnl check for instruction scheduler
708 AC_ARG_ENABLE([scheduler], [AS_HELP_STRING(--enable-scheduler,enable instruction scheduler [[default=no]])])
710 AC_MSG_CHECKING(whether instruction scheduler should be supported)
711 if test x"${USE_SCHEDULER}" = "x1" -o x"$enable_scheduler" = "xyes"; then
712 case "${ARCH_DIR}" in
716 AC_MSG_ERROR(instruction scheduler is not available for ${ARCH_DIR} code generator)
721 AC_DEFINE([USE_SCHEDULER], 1, [use scheduler])
722 AM_CONDITIONAL([USE_SCHEDULER], [true])
725 AM_CONDITIONAL([USE_SCHEDULER], [false])
731 dnl check for stuff to be built
733 AC_CHECK_ENABLE_LIBJVM
735 dnl ATTENTION: These check must be after setting
736 dnl enable_shared/enable_static (happens in AC_CHECK_ENABLE_LIBJVM),
737 dnl because libtool uses them to build the correct libraries.
741 AC_CHECK_ENABLE_STATICVM
742 AC_CHECK_ENABLE_ANNOTATIONS
745 dnl where is CACAO's vm.zip
746 AC_MSG_CHECKING(where CACAO's vm.zip is installed)
747 AC_ARG_WITH([vm-zip],
748 [AS_HELP_STRING(--with-vm-zip=<path>,path to CACAO's vm.zip (includes the name of the file and may be flat) [[default=/usr/local/cacao/share/cacao/vm.zip]])],
749 [CACAO_VM_ZIP=${withval}],
750 [CACAO_VM_ZIP=${CACAO_PREFIX}/share/cacao/vm.zip])
751 AC_MSG_RESULT(${CACAO_VM_ZIP})
752 AC_DEFINE_UNQUOTED([CACAO_VM_ZIP], "${CACAO_VM_ZIP}", [CACAO's vm.zip])
753 AC_SUBST(CACAO_VM_ZIP)
757 AC_CHECK_WITH_CLASSPATH
758 AC_CHECK_WITH_CLASSPATH_PREFIX
759 AC_CHECK_WITH_CLASSPATH_CLASSES
760 AC_CHECK_WITH_CLASSPATH_LIBDIR
761 AC_CHECK_WITH_CLASSPATH_INCLUDEDIR
762 AC_CHECK_WITH_JRE_LAYOUT
765 dnl check for some programs we need
767 case "${WITH_CLASSPATH}" in
775 AC_MSG_ERROR(unknown classpath configuration ${WITH_CLASSPATH})
783 dnl If debug build and regex.h available, enable debug filter
784 if test x"${NDEBUG}" = "xno"; then
785 AC_DEFINE(ENABLE_DEBUG_FILTER, 1, [debug filter])
787 dnl If vmlog enambled and regex.h available, enable vmlogfilter
788 AM_CONDITIONAL([ENABLE_VMLOGFILTER], [test x"${ENABLE_VMLOG}" = "xyes"])
791 AM_CONDITIONAL([ENABLE_VMLOGFILTER], [false])
795 dnl finally pass CFLAGS to Makefiles via AM_CFLAGS
797 AM_CFLAGS=$ARCH_CFLAGS
801 AC_CONFIG_FILES([Makefile]
803 [contrib/setenvinstalled]
804 [contrib/setenvsource]
805 [contrib/vmlog/Makefile]
806 [contrib/vmlog/t/Makefile]
808 [doc/handbook/Makefile]
812 [src/cacaoh/Makefile]
813 [src/fdlibm/Makefile]
816 [src/mm/cacao-gc/Makefile]
817 [src/native/Makefile]
818 [src/native/include/Makefile]
819 [src/native/jvmti/Makefile]
820 [src/native/vm/Makefile]
821 [src/native/vm/cldc1.1/Makefile]
822 [src/native/vm/gnu/Makefile]
823 [src/native/vm/sun/Makefile]
824 [src/scripts/Makefile]
826 [src/threads/Makefile]
827 [src/threads/native/Makefile]
828 [src/threads/none/Makefile]
829 [src/toolbox/Makefile]
831 [src/vm/jit/Makefile]
832 [src/vm/jit/allocator/Makefile]
833 [src/vm/jit/alpha/Makefile]
834 [src/vm/jit/alpha/freebsd/Makefile]
835 [src/vm/jit/alpha/linux/Makefile]
836 [src/vm/jit/arm/Makefile]
837 [src/vm/jit/arm/linux/Makefile]
838 [src/vm/jit/i386/Makefile]
839 [src/vm/jit/i386/cygwin/Makefile]
840 [src/vm/jit/i386/darwin/Makefile]
841 [src/vm/jit/i386/freebsd/Makefile]
842 [src/vm/jit/i386/linux/Makefile]
843 [src/vm/jit/intrp/Makefile]
844 [src/vm/jit/inline/Makefile]
845 [src/vm/jit/loop/Makefile]
846 [src/vm/jit/m68k/Makefile]
847 [src/vm/jit/m68k/linux/Makefile]
848 [src/vm/jit/mips/Makefile]
849 [src/vm/jit/mips/irix/Makefile]
850 [src/vm/jit/mips/linux/Makefile]
851 [src/vm/jit/mips/uclinux/Makefile]
852 [src/vm/jit/optimizing/Makefile]
853 [src/vm/jit/parisc/Makefile]
854 [src/vm/jit/parisc/linux/Makefile]
855 [src/vm/jit/powerpc/Makefile]
856 [src/vm/jit/powerpc/darwin/Makefile]
857 [src/vm/jit/powerpc/linux/Makefile]
858 [src/vm/jit/powerpc/netbsd/Makefile]
859 [src/vm/jit/powerpc64/Makefile]
860 [src/vm/jit/powerpc64/linux/Makefile]
861 [src/vm/jit/s390/Makefile]
862 [src/vm/jit/schedule/Makefile]
863 [src/vm/jit/sparc64/Makefile]
864 [src/vm/jit/sparc64/linux/Makefile]
865 [src/vm/jit/sparc64/solaris/Makefile]
866 [src/vm/jit/verify/Makefile]
867 [src/vm/jit/x86_64/Makefile]
868 [src/vm/jit/x86_64/freebsd/Makefile]
869 [src/vm/jit/x86_64/linux/Makefile]
870 [src/vmcore/Makefile]
872 [tests/regression/Makefile]
873 [tests/regression/codepatching/Makefile]
874 [tests/regression/jasmin/Makefile]
875 [tests/regression/native/Makefile]
876 [tests/regression/resolving/Makefile]
877 [tests/regression/resolving/classes1/Makefile]
878 [tests/regression/resolving/classes2/Makefile]
879 [tests/regression/resolving/classes3/Makefile]
883 dnl now configure subpackages with OPT_CFLAGS and ARCH_CFLAGS
886 AC_CONFIG_SUBDIRS(src/mm/boehm-gc)
894 ## indent-tabs-mode: t
897 ## compile-command: "automake --add-missing"