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([getcwd])
291 AC_CHECK_FUNCS([gethostbyname])
292 AC_CHECK_FUNCS([gethostname])
293 AC_CHECK_FUNCS([getpagesize])
294 AC_CHECK_FUNCS([getrusage])
295 AC_CHECK_FUNCS([getsockname])
296 AC_CHECK_FUNCS([gettimeofday])
297 AC_CHECK_FUNCS([htons])
298 AC_CHECK_FUNCS([ioctl])
299 AC_CHECK_FUNCS([isnan])
300 AC_CHECK_FUNCS([listen])
301 AC_CHECK_FUNCS([localtime])
302 AC_CHECK_FUNCS([localtime_r])
303 AC_CHECK_FUNCS([lseek])
304 AC_CHECK_FUNCS([malloc])
305 AC_CHECK_FUNCS([mmap])
306 AC_CHECK_FUNCS([mprotect])
307 AC_CHECK_FUNCS([open])
308 AC_CHECK_FUNCS([readlink])
309 AC_CHECK_FUNCS([recv])
310 AC_CHECK_FUNCS([scandir])
311 AC_CHECK_FUNCS([select])
312 AC_CHECK_FUNCS([send])
313 AC_CHECK_FUNCS([setsockopt])
314 AC_CHECK_FUNCS([shutdown])
315 AC_CHECK_FUNCS([socket])
316 AC_CHECK_FUNCS([strchr])
317 AC_CHECK_FUNCS([strdup])
318 AC_CHECK_FUNCS([strerror])
319 AC_CHECK_FUNCS([strncmp])
320 AC_CHECK_FUNCS([strstr])
321 AC_CHECK_FUNCS([time])
324 dnl Checks for libraries.
326 dnl Checking sizeof void *
327 AC_CHECK_SIZEOF(void *)
331 dnl define install prefix
332 if test "x$prefix" = "xNONE"; then
333 CACAO_PREFIX=$ac_default_prefix
337 AC_DEFINE_UNQUOTED([CACAO_PREFIX], "${CACAO_PREFIX}", [installation prefix])
338 AC_SUBST(CACAO_PREFIX)
340 dnl define libdir prefix
341 if test "x$libdir" = "xNONE"; then
342 CACAO_LIBDIR=$ac_default_libdir
346 dnl expand CACAO_LIBDIR to something that is usable in C code
347 AS_AC_EXPAND([CACAO_LIBDIR], ${CACAO_LIBDIR})
348 AC_DEFINE_UNQUOTED([CACAO_LIBDIR], "${CACAO_LIBDIR}", [library installation prefix])
349 AC_SUBST(CACAO_LIBDIR)
357 AC_CHECK_ENABLE_INTRP
359 if test x"${ENABLE_JIT}" = "xno" -a x"${ENABLE_INTRP}" = "xno"; then
360 AC_ERROR(You have to enable at least the JIT or the interpreter.)
364 AC_CHECK_SOFT_FLOAT_CMP
365 AC_CHECK_SOFT_DOUBLE_CMP
368 AC_CHECK_ENABLE_DEBUG
372 dnl check for memcheck support
373 AC_MSG_CHECKING(whether debugging memory checks should be enabled)
374 AC_ARG_ENABLE([memcheck],
375 [AS_HELP_STRING(--enable-memcheck,enable debugging memory checks [[default=no]])],
376 [case "${enableval}" in
377 yes) ENABLE_MEMCHECK=yes;;
378 *) ENABLE_MEMCHECK=no;;
380 [ENABLE_MEMCHECK=no])
381 AC_MSG_RESULT(${ENABLE_MEMCHECK})
382 AM_CONDITIONAL([ENABLE_MEMCHECK], test x"${ENABLE_MEMCHECK}" = "xyes")
384 if test x"${ENABLE_MEMCHECK}" = "xyes"; then
385 AC_DEFINE([ENABLE_MEMCHECK], 1, [perform debugging memory checks])
389 dnl check for handles (indirection cells) support
390 AC_MSG_CHECKING(whether handles (indirection cells) should be enabled)
391 AC_ARG_ENABLE([handles],
392 [AS_HELP_STRING(--enable-handles,enable handles (indirection cells) [[default=no]])],
393 [case "${enableval}" in
394 yes) ENABLE_HANDLES=yes;;
395 *) ENABLE_HANDLES=no;;
398 AC_MSG_RESULT(${ENABLE_HANDLES})
399 AM_CONDITIONAL([ENABLE_HANDLES], test x"${ENABLE_HANDLES}" = "xyes")
401 if test x"${ENABLE_HANDLES}" = "xyes"; then
402 AC_DEFINE([ENABLE_HANDLES], 1, [enable handles (indirection cells)])
406 dnl check for vmlog support
407 AC_MSG_CHECKING(whether vmlog tracing should be enabled)
408 AC_ARG_ENABLE([vmlog],
409 [AS_HELP_STRING(--enable-vmlog,enable vmlog tracing [[default=no]])],
410 [case "${enableval}" in
411 yes) ENABLE_VMLOG=yes;;
415 AC_MSG_RESULT(${ENABLE_VMLOG})
416 AM_CONDITIONAL([ENABLE_VMLOG], test x"${ENABLE_VMLOG}" = "xyes")
418 if test x"${ENABLE_VMLOG}" = "xyes"; then
419 AC_DEFINE([ENABLE_VMLOG], 1, [enable vmlog tracing code])
423 dnl check for disassembler support
424 AC_MSG_CHECKING(whether disassembler should be enabled)
425 AC_ARG_ENABLE([disassembler],
426 [AS_HELP_STRING(--enable-disassembler,enable disassembler [[default=no]])],
427 [case "${enableval}" in
428 yes) ENABLE_DISASSEMBLER=yes;;
429 *) ENABLE_DISASSEMBLER=no;;
431 [ENABLE_DISASSEMBLER=no])
432 AC_MSG_RESULT(${ENABLE_DISASSEMBLER})
433 AM_CONDITIONAL([ENABLE_DISASSEMBLER], test x"${ENABLE_DISASSEMBLER}" = "xyes")
435 if test x"${ENABLE_DISASSEMBLER}" = "xyes"; then
436 AC_DEFINE([ENABLE_DISASSEMBLER], 1, [enable disassembler])
438 dnl check for binutils headers and libraries on some architectures for the
440 case "${ARCH_DIR}" in
441 arm | i386 | powerpc | x86_64 | sparc64 | powerpc64 | s390 | m68k)
442 AC_CHECK_HEADER([ansidecl.h],, [AC_MSG_ERROR(cannot find ansidecl.h)])
443 AC_CHECK_HEADER([symcat.h],, [AC_MSG_ERROR(cannot find symcat.h)])
444 AC_CHECK_HEADER([bfd.h],, [AC_MSG_ERROR(cannot find bfd.h)])
445 AC_CHECK_HEADER([dis-asm.h],, [AC_MSG_ERROR(cannot find dis-asm.h)])
448 cygwin | darwin | netbsd | solaris)
449 AC_CHECK_LIB(intl, dcgettext,, [AC_MSG_ERROR(cannot find libintl (from binutils))])
455 AC_CHECK_LIB(rt, sem_init,, [AC_MSG_ERROR(cannot find librt)])
460 AC_CHECK_LIB(iberty, xstrerror,, [AC_MSG_ERROR(cannot find libiberty (from binutils))])
461 AC_CHECK_LIB(bfd, bfd_get_arch,, [AC_MSG_ERROR(cannot find libbfd (from binutils))])
462 AC_CHECK_LIB(opcodes, disassembler,, [AC_MSG_ERROR(cannot find libopcodes (from binutils))])
463 AC_DEFINE([WITH_BINUTILS_DISASSEMBLER], 1, [use binutils disassembler])
464 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [true])
467 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
471 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
475 dnl check for statistics
476 AC_MSG_CHECKING(whether statistics generation should be enabled)
477 AC_ARG_ENABLE([statistics],
478 [AS_HELP_STRING(--enable-statistics,enable statistics generation [[default=no]])],
479 [case "${enableval}" in
480 yes) ENABLE_STATISTICS=yes;;
481 *) ENABLE_STATISTICS=no;;
483 [ENABLE_STATISTICS=no])
484 AC_MSG_RESULT(${ENABLE_STATISTICS})
485 AM_CONDITIONAL([ENABLE_STATISTICS], test x"${ENABLE_STATISTICS}" = "xyes")
487 if test x"${ENABLE_STATISTICS}" = "xyes"; then
488 AC_DEFINE([ENABLE_STATISTICS], 1, [enable statistics])
492 dnl check for verifier
493 AC_MSG_CHECKING(whether classfile verification should be enabled)
494 AC_ARG_ENABLE([verifier],
495 [AS_HELP_STRING(--disable-verifier,disable classfile verification [[default=yes]])],
496 [case "${enableval}" in
497 no) ENABLE_VERIFIER=no;;
498 *) ENABLE_VERIFIER=yes;;
500 [ENABLE_VERIFIER=yes])
501 AC_MSG_RESULT(${ENABLE_VERIFIER})
502 AM_CONDITIONAL([ENABLE_VERIFIER], test x"${ENABLE_VERIFIER}" = "xyes")
504 if test x"${ENABLE_VERIFIER}" = "xyes"; then
505 AC_DEFINE([ENABLE_VERIFIER], 1, [enable classfile verification])
509 dnl check for compiler timing
510 AC_MSG_CHECKING(whether real-time timing should be enabled)
511 AC_ARG_ENABLE([rt-timing],
512 [AS_HELP_STRING(--enable-rt-timing,enable real-time timing [[default=no]])],
513 [case "${enableval}" in
514 yes) ENABLE_RT_TIMING=yes;;
515 *) ENABLE_RT_TIMING=no;;
517 [ENABLE_RT_TIMING=no])
518 AC_MSG_RESULT(${ENABLE_RT_TIMING})
519 AM_CONDITIONAL([ENABLE_RT_TIMING], test x"${ENABLE_RT_TIMING}" = "xyes")
521 if test x"${ENABLE_RT_TIMING}" = "xyes"; then
522 AC_DEFINE([ENABLE_RT_TIMING], 1, [enable real-time timing])
526 dnl check for cycle count statistics
527 AC_MSG_CHECKING(whether cycle count statistics should be enabled)
528 AC_ARG_ENABLE([cycles-stats],
529 [AS_HELP_STRING(--enable-cycles-stats,enable cycle count statistics [[default=no]])],
530 [case "${enableval}" in
531 yes) ENABLE_CYCLES_STATS=yes;;
532 *) ENABLE_CYCLES_STATS=no;;
534 [ENABLE_CYCLES_STATS=no])
535 AC_MSG_RESULT(${ENABLE_CYCLES_STATS})
536 AM_CONDITIONAL([ENABLE_CYCLES_STATS], test x"${ENABLE_CYCLES_STATS}" = "xyes")
538 if test x"${ENABLE_CYCLES_STATS}" = "xyes"; then
539 AC_DEFINE([ENABLE_CYCLES_STATS], 1, [enable cycle count statistics])
544 AC_MSG_CHECKING(whether to compile JVMTI support)
545 AC_ARG_ENABLE([jvmti],
546 [AS_HELP_STRING(--enable-jvmti,enable JVMTI [[default=no]])],
547 [case "${enableval}" in
548 yes) ENABLE_JVMTI=yes;;
552 AC_MSG_RESULT(${ENABLE_JVMTI})
553 AM_CONDITIONAL([ENABLE_JVMTI], test x"${ENABLE_JVMTI}" = "xyes")
555 if test x"${ENABLE_JVMTI}" = "xyes"; then
556 AC_DEFINE([ENABLE_JVMTI], 1, [use JVMTI])
560 AC_CHECK_ENABLE_THREADS
563 dnl check if if-conversion should be supported
564 AC_MSG_CHECKING(whether if-conversion should be supported)
565 AC_ARG_ENABLE([ifconv],
566 [AS_HELP_STRING(--disable-ifconv,disable if-conversion [[default=yes]])],
567 [case "${enableval}" in
568 no) ENABLE_IFCONV=no;;
569 *) ENABLE_IFCONV=yes;;
572 AC_MSG_RESULT(${ENABLE_IFCONV})
573 AM_CONDITIONAL([ENABLE_IFCONV], test x"${ENABLE_IFCONV}" = "xyes")
575 if test x"${ENABLE_IFCONV}" = "xyes"; then
576 AC_DEFINE([ENABLE_IFCONV], 1, [enable if-conversion])
580 dnl check for inlining
581 AC_MSG_CHECKING(whether method inlining should be supported)
582 AC_ARG_ENABLE([inlining],
583 [AS_HELP_STRING(--enable-inlining,enable method inlining [[default=no]])],
584 [case "${enableval}" in
585 yes) ENABLE_INLINING=yes;;
586 *) ENABLE_INLINING=no;;
588 [ENABLE_INLINING=no])
589 AC_MSG_RESULT(${ENABLE_INLINING})
590 AM_CONDITIONAL([ENABLE_INLINING], test x"${ENABLE_INLINING}" = "xyes")
592 if test x"${ENABLE_INLINING}" = "xyes"; then
593 AC_DEFINE([ENABLE_INLINING], 1, [use method inlining])
597 dnl check for inlining debug options
598 AC_MSG_CHECKING(whether method inlining debug options should be enabled)
599 AC_ARG_ENABLE([inlining-debug],
600 [AS_HELP_STRING(--enable-inlining-debug,enable method inlining debug options [[default=no]])],
601 [case "${enableval}" in
602 yes) ENABLE_INLINING_DEBUG=yes;;
603 *) ENABLE_INLINING_DEBUG=no;;
605 [ENABLE_INLINING_DEBUG=no])
606 AC_MSG_RESULT(${ENABLE_INLINING_DEBUG})
607 AM_CONDITIONAL([ENABLE_INLINING_DEBUG], test x"${ENABLE_INLINING_DEBUG}" = "xyes")
609 if test x"${ENABLE_INLINING_DEBUG}" = "xyes"; then
610 AC_DEFINE([ENABLE_INLINING_DEBUG], 1, [enable method inlining debug options])
614 dnl check for replacement
615 AC_MSG_CHECKING(whether on-stack replacement should be supported)
616 AC_ARG_ENABLE([replacement],
617 [AS_HELP_STRING(--enable-replacement,enable on-stack replacement [[default=no]])],
618 [case "${enableval}" in
619 yes) ENABLE_REPLACEMENT=yes;;
620 *) ENABLE_REPLACEMENT=no;;
622 [ENABLE_REPLACEMENT=no])
623 AC_MSG_RESULT(${ENABLE_REPLACEMENT})
624 AM_CONDITIONAL([ENABLE_REPLACEMENT], test x"${ENABLE_REPLACEMENT}" = "xyes")
626 if test x"${ENABLE_REPLACEMENT}" = "xyes"; then
627 AC_DEFINE([ENABLE_REPLACEMENT], 1, [use on-stack replacement])
631 dnl check for loop optimization
632 AC_MSG_CHECKING(whether loop optimization should be supported)
633 AC_ARG_ENABLE([loop],
634 [AS_HELP_STRING(--enable-loop,enable loop optimization [[default=no]])],
635 [case "${enableval}" in
636 yes) ENABLE_LOOP=yes;;
640 AC_MSG_RESULT(${ENABLE_LOOP})
641 AM_CONDITIONAL([ENABLE_LOOP], test x"${ENABLE_LOOP}" = "xyes")
643 if test x"${ENABLE_LOOP}" = "xyes"; then
644 AC_DEFINE([ENABLE_LOOP], 1, [use loop optimization])
648 dnl check if linear scan register allocator(lsra) with SSA should be used
649 AC_MSG_CHECKING(whether lsra with ssa should be supported)
651 [AS_HELP_STRING(--disable-ssa,disable ssa [[default=no]])],
652 [case "${enableval}" in
657 AC_MSG_RESULT(${ENABLE_SSA})
658 AM_CONDITIONAL([ENABLE_SSA], test x"${ENABLE_SSA}" = "xyes")
660 if test x"${ENABLE_SSA}" = "xyes"; then
661 AC_DEFINE([ENABLE_SSA], 1, [enable lsra with ssa])
666 dnl check if linear scan register allocator(lsra) should be used
667 AC_MSG_CHECKING(whether lsra should be supported)
668 AC_ARG_ENABLE([lsra],
669 [AS_HELP_STRING(--enable-lsra,enable linear scan register allocator [[default=no]])],
670 [case "${enableval}" in
671 yes) ENABLE_LSRA=yes;;
676 if test x"${ENABLE_LSRA}" = "xyes"; then
677 if test x"${ENABLE_SSA}" = "xyes"; then
681 AC_MSG_RESULT(${ENABLE_LSRA})
682 AM_CONDITIONAL([ENABLE_LSRA], test x"${ENABLE_LSRA}" = "xyes")
684 if test x"${ENABLE_LSRA}" = "xyes"; then
685 AC_DEFINE([ENABLE_LSRA], 1, [enable lsra])
689 dnl check if profiling should be supported
690 AC_MSG_CHECKING(whether profiling should be supported)
691 AC_ARG_ENABLE([profiling],
692 [AS_HELP_STRING(--enable-profiling,enable profiling [[default=no]])],
693 [case "${enableval}" in
694 yes) ENABLE_PROFILING=yes;;
695 *) ENABLE_PROFILING=no;;
697 [ENABLE_PROFILING=no])
698 AC_MSG_RESULT(${ENABLE_PROFILING})
699 AM_CONDITIONAL([ENABLE_PROFILING], test x"${ENABLE_PROFILING}" = "xyes")
701 if test x"${ENABLE_PROFILING}" = "xyes"; then
702 AC_DEFINE([ENABLE_PROFILING], 1, [enable profiling])
706 dnl check for instruction scheduler
707 AC_ARG_ENABLE([scheduler], [AS_HELP_STRING(--enable-scheduler,enable instruction scheduler [[default=no]])])
709 AC_MSG_CHECKING(whether instruction scheduler should be supported)
710 if test x"${USE_SCHEDULER}" = "x1" -o x"$enable_scheduler" = "xyes"; then
711 case "${ARCH_DIR}" in
715 AC_MSG_ERROR(instruction scheduler is not available for ${ARCH_DIR} code generator)
720 AC_DEFINE([USE_SCHEDULER], 1, [use scheduler])
721 AM_CONDITIONAL([USE_SCHEDULER], [true])
724 AM_CONDITIONAL([USE_SCHEDULER], [false])
730 dnl check for stuff to be built
732 AC_CHECK_ENABLE_LIBJVM
734 dnl ATTENTION: These check must be after setting
735 dnl enable_shared/enable_static (happens in AC_CHECK_ENABLE_LIBJVM),
736 dnl because libtool uses them to build the correct libraries.
740 AC_CHECK_ENABLE_STATICVM
741 AC_CHECK_ENABLE_ANNOTATIONS
744 dnl where is CACAO's vm.zip
745 AC_MSG_CHECKING(where CACAO's vm.zip is installed)
746 AC_ARG_WITH([vm-zip],
747 [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]])],
748 [CACAO_VM_ZIP=${withval}],
749 [CACAO_VM_ZIP=${CACAO_PREFIX}/share/cacao/vm.zip])
750 AC_MSG_RESULT(${CACAO_VM_ZIP})
751 AC_DEFINE_UNQUOTED([CACAO_VM_ZIP], "${CACAO_VM_ZIP}", [CACAO's vm.zip])
752 AC_SUBST(CACAO_VM_ZIP)
756 AC_CHECK_WITH_CLASSPATH
757 AC_CHECK_WITH_CLASSPATH_PREFIX
758 AC_CHECK_WITH_CLASSPATH_CLASSES
759 AC_CHECK_WITH_CLASSPATH_LIBDIR
760 AC_CHECK_WITH_CLASSPATH_INCLUDEDIR
761 AC_CHECK_WITH_JRE_LAYOUT
764 dnl check for some programs we need
766 case "${WITH_CLASSPATH}" in
774 AC_MSG_ERROR(unknown classpath configuration ${WITH_CLASSPATH})
782 dnl If debug build and regex.h available, enable debug filter
783 if test x"${NDEBUG}" = "xno"; then
784 AC_DEFINE(ENABLE_DEBUG_FILTER, 1, [debug filter])
786 dnl If vmlog enambled and regex.h available, enable vmlogfilter
787 AM_CONDITIONAL([ENABLE_VMLOGFILTER], [test x"${ENABLE_VMLOG}" = "xyes"])
790 AM_CONDITIONAL([ENABLE_VMLOGFILTER], [false])
794 dnl finally pass CFLAGS to Makefiles via AM_CFLAGS
796 AM_CFLAGS=$ARCH_CFLAGS
800 AC_CONFIG_FILES([Makefile]
802 [contrib/setenvinstalled]
803 [contrib/setenvsource]
804 [contrib/vmlog/Makefile]
805 [contrib/vmlog/t/Makefile]
807 [doc/handbook/Makefile]
811 [src/cacaoh/Makefile]
812 [src/fdlibm/Makefile]
815 [src/mm/cacao-gc/Makefile]
816 [src/native/Makefile]
817 [src/native/include/Makefile]
818 [src/native/jvmti/Makefile]
819 [src/native/vm/Makefile]
820 [src/native/vm/cldc1.1/Makefile]
821 [src/native/vm/gnu/Makefile]
822 [src/native/vm/sun/Makefile]
823 [src/scripts/Makefile]
825 [src/threads/Makefile]
826 [src/threads/native/Makefile]
827 [src/threads/none/Makefile]
828 [src/toolbox/Makefile]
830 [src/vm/jit/Makefile]
831 [src/vm/jit/allocator/Makefile]
832 [src/vm/jit/alpha/Makefile]
833 [src/vm/jit/alpha/freebsd/Makefile]
834 [src/vm/jit/alpha/linux/Makefile]
835 [src/vm/jit/arm/Makefile]
836 [src/vm/jit/arm/linux/Makefile]
837 [src/vm/jit/i386/Makefile]
838 [src/vm/jit/i386/cygwin/Makefile]
839 [src/vm/jit/i386/darwin/Makefile]
840 [src/vm/jit/i386/freebsd/Makefile]
841 [src/vm/jit/i386/linux/Makefile]
842 [src/vm/jit/intrp/Makefile]
843 [src/vm/jit/inline/Makefile]
844 [src/vm/jit/loop/Makefile]
845 [src/vm/jit/m68k/Makefile]
846 [src/vm/jit/m68k/linux/Makefile]
847 [src/vm/jit/mips/Makefile]
848 [src/vm/jit/mips/irix/Makefile]
849 [src/vm/jit/mips/linux/Makefile]
850 [src/vm/jit/mips/uclinux/Makefile]
851 [src/vm/jit/optimizing/Makefile]
852 [src/vm/jit/parisc/Makefile]
853 [src/vm/jit/parisc/linux/Makefile]
854 [src/vm/jit/powerpc/Makefile]
855 [src/vm/jit/powerpc/darwin/Makefile]
856 [src/vm/jit/powerpc/linux/Makefile]
857 [src/vm/jit/powerpc/netbsd/Makefile]
858 [src/vm/jit/powerpc64/Makefile]
859 [src/vm/jit/powerpc64/linux/Makefile]
860 [src/vm/jit/s390/Makefile]
861 [src/vm/jit/schedule/Makefile]
862 [src/vm/jit/sparc64/Makefile]
863 [src/vm/jit/sparc64/linux/Makefile]
864 [src/vm/jit/sparc64/solaris/Makefile]
865 [src/vm/jit/verify/Makefile]
866 [src/vm/jit/x86_64/Makefile]
867 [src/vm/jit/x86_64/freebsd/Makefile]
868 [src/vm/jit/x86_64/linux/Makefile]
869 [src/vmcore/Makefile]
871 [tests/regression/Makefile]
872 [tests/regression/codepatching/Makefile]
873 [tests/regression/jasmin/Makefile]
874 [tests/regression/native/Makefile]
875 [tests/regression/resolving/Makefile]
876 [tests/regression/resolving/classes1/Makefile]
877 [tests/regression/resolving/classes2/Makefile]
878 [tests/regression/resolving/classes3/Makefile]
882 dnl now configure subpackages with OPT_CFLAGS and ARCH_CFLAGS
885 AC_CONFIG_SUBDIRS(src/mm/boehm-gc)
893 ## indent-tabs-mode: t
896 ## compile-command: "automake --add-missing"