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([getsockopt])
298 AC_CHECK_FUNCS([gettimeofday])
299 AC_CHECK_FUNCS([htons])
300 AC_CHECK_FUNCS([ioctl])
301 AC_CHECK_FUNCS([isnan])
302 AC_CHECK_FUNCS([listen])
303 AC_CHECK_FUNCS([localtime])
304 AC_CHECK_FUNCS([localtime_r])
305 AC_CHECK_FUNCS([lseek])
306 AC_CHECK_FUNCS([malloc])
307 AC_CHECK_FUNCS([mmap])
308 AC_CHECK_FUNCS([mprotect])
309 AC_CHECK_FUNCS([open])
310 AC_CHECK_FUNCS([readlink])
311 AC_CHECK_FUNCS([recv])
312 AC_CHECK_FUNCS([scandir])
313 AC_CHECK_FUNCS([select])
314 AC_CHECK_FUNCS([send])
315 AC_CHECK_FUNCS([setsockopt])
316 AC_CHECK_FUNCS([shutdown])
317 AC_CHECK_FUNCS([socket])
318 AC_CHECK_FUNCS([strchr])
319 AC_CHECK_FUNCS([strdup])
320 AC_CHECK_FUNCS([strerror])
321 AC_CHECK_FUNCS([strncmp])
322 AC_CHECK_FUNCS([strstr])
323 AC_CHECK_FUNCS([time])
326 dnl Checks for libraries.
328 dnl Checking sizeof void *
329 AC_CHECK_SIZEOF(void *)
333 dnl define install prefix
334 if test "x$prefix" = "xNONE"; then
335 CACAO_PREFIX=$ac_default_prefix
339 AC_DEFINE_UNQUOTED([CACAO_PREFIX], "${CACAO_PREFIX}", [installation prefix])
340 AC_SUBST(CACAO_PREFIX)
342 dnl define libdir prefix
343 if test "x$libdir" = "xNONE"; then
344 CACAO_LIBDIR=$ac_default_libdir
348 dnl expand CACAO_LIBDIR to something that is usable in C code
349 AS_AC_EXPAND([CACAO_LIBDIR], ${CACAO_LIBDIR})
350 AC_DEFINE_UNQUOTED([CACAO_LIBDIR], "${CACAO_LIBDIR}", [library installation prefix])
351 AC_SUBST(CACAO_LIBDIR)
359 AC_CHECK_ENABLE_INTRP
361 if test x"${ENABLE_JIT}" = "xno" -a x"${ENABLE_INTRP}" = "xno"; then
362 AC_ERROR(You have to enable at least the JIT or the interpreter.)
366 AC_CHECK_SOFT_FLOAT_CMP
367 AC_CHECK_SOFT_DOUBLE_CMP
370 AC_CHECK_ENABLE_DEBUG
374 dnl check for memcheck support
375 AC_MSG_CHECKING(whether debugging memory checks should be enabled)
376 AC_ARG_ENABLE([memcheck],
377 [AS_HELP_STRING(--enable-memcheck,enable debugging memory checks [[default=no]])],
378 [case "${enableval}" in
379 yes) ENABLE_MEMCHECK=yes;;
380 *) ENABLE_MEMCHECK=no;;
382 [ENABLE_MEMCHECK=no])
383 AC_MSG_RESULT(${ENABLE_MEMCHECK})
384 AM_CONDITIONAL([ENABLE_MEMCHECK], test x"${ENABLE_MEMCHECK}" = "xyes")
386 if test x"${ENABLE_MEMCHECK}" = "xyes"; then
387 AC_DEFINE([ENABLE_MEMCHECK], 1, [perform debugging memory checks])
391 dnl check for handles (indirection cells) support
392 AC_MSG_CHECKING(whether handles (indirection cells) should be enabled)
393 AC_ARG_ENABLE([handles],
394 [AS_HELP_STRING(--enable-handles,enable handles (indirection cells) [[default=no]])],
395 [case "${enableval}" in
396 yes) ENABLE_HANDLES=yes;;
397 *) ENABLE_HANDLES=no;;
400 AC_MSG_RESULT(${ENABLE_HANDLES})
401 AM_CONDITIONAL([ENABLE_HANDLES], test x"${ENABLE_HANDLES}" = "xyes")
403 if test x"${ENABLE_HANDLES}" = "xyes"; then
404 AC_DEFINE([ENABLE_HANDLES], 1, [enable handles (indirection cells)])
408 dnl check for vmlog support
409 AC_MSG_CHECKING(whether vmlog tracing should be enabled)
410 AC_ARG_ENABLE([vmlog],
411 [AS_HELP_STRING(--enable-vmlog,enable vmlog tracing [[default=no]])],
412 [case "${enableval}" in
413 yes) ENABLE_VMLOG=yes;;
417 AC_MSG_RESULT(${ENABLE_VMLOG})
418 AM_CONDITIONAL([ENABLE_VMLOG], test x"${ENABLE_VMLOG}" = "xyes")
420 if test x"${ENABLE_VMLOG}" = "xyes"; then
421 AC_DEFINE([ENABLE_VMLOG], 1, [enable vmlog tracing code])
425 dnl check for disassembler support
426 AC_MSG_CHECKING(whether disassembler should be enabled)
427 AC_ARG_ENABLE([disassembler],
428 [AS_HELP_STRING(--enable-disassembler,enable disassembler [[default=no]])],
429 [case "${enableval}" in
430 yes) ENABLE_DISASSEMBLER=yes;;
431 *) ENABLE_DISASSEMBLER=no;;
433 [ENABLE_DISASSEMBLER=no])
434 AC_MSG_RESULT(${ENABLE_DISASSEMBLER})
435 AM_CONDITIONAL([ENABLE_DISASSEMBLER], test x"${ENABLE_DISASSEMBLER}" = "xyes")
437 if test x"${ENABLE_DISASSEMBLER}" = "xyes"; then
438 AC_DEFINE([ENABLE_DISASSEMBLER], 1, [enable disassembler])
440 dnl check for binutils headers and libraries on some architectures for the
442 case "${ARCH_DIR}" in
443 arm | i386 | powerpc | x86_64 | sparc64 | powerpc64 | s390 | m68k)
444 AC_CHECK_HEADER([ansidecl.h],, [AC_MSG_ERROR(cannot find ansidecl.h)])
445 AC_CHECK_HEADER([symcat.h],, [AC_MSG_ERROR(cannot find symcat.h)])
446 AC_CHECK_HEADER([bfd.h],, [AC_MSG_ERROR(cannot find bfd.h)])
447 AC_CHECK_HEADER([dis-asm.h],, [AC_MSG_ERROR(cannot find dis-asm.h)])
450 cygwin | darwin | netbsd | solaris)
451 AC_CHECK_LIB(intl, dcgettext,, [AC_MSG_ERROR(cannot find libintl (from binutils))])
457 AC_CHECK_LIB(rt, sem_init,, [AC_MSG_ERROR(cannot find librt)])
462 AC_CHECK_LIB(iberty, xstrerror,, [AC_MSG_ERROR(cannot find libiberty (from binutils))])
463 AC_CHECK_LIB(bfd, bfd_get_arch,, [AC_MSG_ERROR(cannot find libbfd (from binutils))])
464 AC_CHECK_LIB(opcodes, disassembler,, [AC_MSG_ERROR(cannot find libopcodes (from binutils))])
465 AC_DEFINE([WITH_BINUTILS_DISASSEMBLER], 1, [use binutils disassembler])
466 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [true])
469 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
473 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
477 dnl check for statistics
478 AC_MSG_CHECKING(whether statistics generation should be enabled)
479 AC_ARG_ENABLE([statistics],
480 [AS_HELP_STRING(--enable-statistics,enable statistics generation [[default=no]])],
481 [case "${enableval}" in
482 yes) ENABLE_STATISTICS=yes;;
483 *) ENABLE_STATISTICS=no;;
485 [ENABLE_STATISTICS=no])
486 AC_MSG_RESULT(${ENABLE_STATISTICS})
487 AM_CONDITIONAL([ENABLE_STATISTICS], test x"${ENABLE_STATISTICS}" = "xyes")
489 if test x"${ENABLE_STATISTICS}" = "xyes"; then
490 AC_DEFINE([ENABLE_STATISTICS], 1, [enable statistics])
494 dnl check for verifier
495 AC_MSG_CHECKING(whether classfile verification should be enabled)
496 AC_ARG_ENABLE([verifier],
497 [AS_HELP_STRING(--disable-verifier,disable classfile verification [[default=yes]])],
498 [case "${enableval}" in
499 no) ENABLE_VERIFIER=no;;
500 *) ENABLE_VERIFIER=yes;;
502 [ENABLE_VERIFIER=yes])
503 AC_MSG_RESULT(${ENABLE_VERIFIER})
504 AM_CONDITIONAL([ENABLE_VERIFIER], test x"${ENABLE_VERIFIER}" = "xyes")
506 if test x"${ENABLE_VERIFIER}" = "xyes"; then
507 AC_DEFINE([ENABLE_VERIFIER], 1, [enable classfile verification])
511 dnl check for compiler timing
512 AC_MSG_CHECKING(whether real-time timing should be enabled)
513 AC_ARG_ENABLE([rt-timing],
514 [AS_HELP_STRING(--enable-rt-timing,enable real-time timing [[default=no]])],
515 [case "${enableval}" in
516 yes) ENABLE_RT_TIMING=yes;;
517 *) ENABLE_RT_TIMING=no;;
519 [ENABLE_RT_TIMING=no])
520 AC_MSG_RESULT(${ENABLE_RT_TIMING})
521 AM_CONDITIONAL([ENABLE_RT_TIMING], test x"${ENABLE_RT_TIMING}" = "xyes")
523 if test x"${ENABLE_RT_TIMING}" = "xyes"; then
524 AC_DEFINE([ENABLE_RT_TIMING], 1, [enable real-time timing])
528 dnl check for cycle count statistics
529 AC_MSG_CHECKING(whether cycle count statistics should be enabled)
530 AC_ARG_ENABLE([cycles-stats],
531 [AS_HELP_STRING(--enable-cycles-stats,enable cycle count statistics [[default=no]])],
532 [case "${enableval}" in
533 yes) ENABLE_CYCLES_STATS=yes;;
534 *) ENABLE_CYCLES_STATS=no;;
536 [ENABLE_CYCLES_STATS=no])
537 AC_MSG_RESULT(${ENABLE_CYCLES_STATS})
538 AM_CONDITIONAL([ENABLE_CYCLES_STATS], test x"${ENABLE_CYCLES_STATS}" = "xyes")
540 if test x"${ENABLE_CYCLES_STATS}" = "xyes"; then
541 AC_DEFINE([ENABLE_CYCLES_STATS], 1, [enable cycle count statistics])
546 AC_MSG_CHECKING(whether to compile JVMTI support)
547 AC_ARG_ENABLE([jvmti],
548 [AS_HELP_STRING(--enable-jvmti,enable JVMTI [[default=no]])],
549 [case "${enableval}" in
550 yes) ENABLE_JVMTI=yes;;
554 AC_MSG_RESULT(${ENABLE_JVMTI})
555 AM_CONDITIONAL([ENABLE_JVMTI], test x"${ENABLE_JVMTI}" = "xyes")
557 if test x"${ENABLE_JVMTI}" = "xyes"; then
558 AC_DEFINE([ENABLE_JVMTI], 1, [use JVMTI])
562 AC_CHECK_ENABLE_THREADS
565 dnl check if if-conversion should be supported
566 AC_MSG_CHECKING(whether if-conversion should be supported)
567 AC_ARG_ENABLE([ifconv],
568 [AS_HELP_STRING(--disable-ifconv,disable if-conversion [[default=yes]])],
569 [case "${enableval}" in
570 no) ENABLE_IFCONV=no;;
571 *) ENABLE_IFCONV=yes;;
574 AC_MSG_RESULT(${ENABLE_IFCONV})
575 AM_CONDITIONAL([ENABLE_IFCONV], test x"${ENABLE_IFCONV}" = "xyes")
577 if test x"${ENABLE_IFCONV}" = "xyes"; then
578 AC_DEFINE([ENABLE_IFCONV], 1, [enable if-conversion])
582 dnl check for inlining
583 AC_MSG_CHECKING(whether method inlining should be supported)
584 AC_ARG_ENABLE([inlining],
585 [AS_HELP_STRING(--enable-inlining,enable method inlining [[default=no]])],
586 [case "${enableval}" in
587 yes) ENABLE_INLINING=yes;;
588 *) ENABLE_INLINING=no;;
590 [ENABLE_INLINING=no])
591 AC_MSG_RESULT(${ENABLE_INLINING})
592 AM_CONDITIONAL([ENABLE_INLINING], test x"${ENABLE_INLINING}" = "xyes")
594 if test x"${ENABLE_INLINING}" = "xyes"; then
595 AC_DEFINE([ENABLE_INLINING], 1, [use method inlining])
599 dnl check for inlining debug options
600 AC_MSG_CHECKING(whether method inlining debug options should be enabled)
601 AC_ARG_ENABLE([inlining-debug],
602 [AS_HELP_STRING(--enable-inlining-debug,enable method inlining debug options [[default=no]])],
603 [case "${enableval}" in
604 yes) ENABLE_INLINING_DEBUG=yes;;
605 *) ENABLE_INLINING_DEBUG=no;;
607 [ENABLE_INLINING_DEBUG=no])
608 AC_MSG_RESULT(${ENABLE_INLINING_DEBUG})
609 AM_CONDITIONAL([ENABLE_INLINING_DEBUG], test x"${ENABLE_INLINING_DEBUG}" = "xyes")
611 if test x"${ENABLE_INLINING_DEBUG}" = "xyes"; then
612 AC_DEFINE([ENABLE_INLINING_DEBUG], 1, [enable method inlining debug options])
616 dnl check for replacement
617 AC_MSG_CHECKING(whether on-stack replacement should be supported)
618 AC_ARG_ENABLE([replacement],
619 [AS_HELP_STRING(--enable-replacement,enable on-stack replacement [[default=no]])],
620 [case "${enableval}" in
621 yes) ENABLE_REPLACEMENT=yes;;
622 *) ENABLE_REPLACEMENT=no;;
624 [ENABLE_REPLACEMENT=no])
625 AC_MSG_RESULT(${ENABLE_REPLACEMENT})
626 AM_CONDITIONAL([ENABLE_REPLACEMENT], test x"${ENABLE_REPLACEMENT}" = "xyes")
628 if test x"${ENABLE_REPLACEMENT}" = "xyes"; then
629 AC_DEFINE([ENABLE_REPLACEMENT], 1, [use on-stack replacement])
633 dnl check for loop optimization
634 AC_MSG_CHECKING(whether loop optimization should be supported)
635 AC_ARG_ENABLE([loop],
636 [AS_HELP_STRING(--enable-loop,enable loop optimization [[default=no]])],
637 [case "${enableval}" in
638 yes) ENABLE_LOOP=yes;;
642 AC_MSG_RESULT(${ENABLE_LOOP})
643 AM_CONDITIONAL([ENABLE_LOOP], test x"${ENABLE_LOOP}" = "xyes")
645 if test x"${ENABLE_LOOP}" = "xyes"; then
646 AC_DEFINE([ENABLE_LOOP], 1, [use loop optimization])
650 dnl check if linear scan register allocator(lsra) with SSA should be used
651 AC_MSG_CHECKING(whether lsra with ssa should be supported)
653 [AS_HELP_STRING(--disable-ssa,disable ssa [[default=no]])],
654 [case "${enableval}" in
659 AC_MSG_RESULT(${ENABLE_SSA})
660 AM_CONDITIONAL([ENABLE_SSA], test x"${ENABLE_SSA}" = "xyes")
662 if test x"${ENABLE_SSA}" = "xyes"; then
663 AC_DEFINE([ENABLE_SSA], 1, [enable lsra with ssa])
668 dnl check if linear scan register allocator(lsra) should be used
669 AC_MSG_CHECKING(whether lsra should be supported)
670 AC_ARG_ENABLE([lsra],
671 [AS_HELP_STRING(--enable-lsra,enable linear scan register allocator [[default=no]])],
672 [case "${enableval}" in
673 yes) ENABLE_LSRA=yes;;
678 if test x"${ENABLE_LSRA}" = "xyes"; then
679 if test x"${ENABLE_SSA}" = "xyes"; then
683 AC_MSG_RESULT(${ENABLE_LSRA})
684 AM_CONDITIONAL([ENABLE_LSRA], test x"${ENABLE_LSRA}" = "xyes")
686 if test x"${ENABLE_LSRA}" = "xyes"; then
687 AC_DEFINE([ENABLE_LSRA], 1, [enable lsra])
691 dnl check if profiling should be supported
692 AC_MSG_CHECKING(whether profiling should be supported)
693 AC_ARG_ENABLE([profiling],
694 [AS_HELP_STRING(--enable-profiling,enable profiling [[default=no]])],
695 [case "${enableval}" in
696 yes) ENABLE_PROFILING=yes;;
697 *) ENABLE_PROFILING=no;;
699 [ENABLE_PROFILING=no])
700 AC_MSG_RESULT(${ENABLE_PROFILING})
701 AM_CONDITIONAL([ENABLE_PROFILING], test x"${ENABLE_PROFILING}" = "xyes")
703 if test x"${ENABLE_PROFILING}" = "xyes"; then
704 AC_DEFINE([ENABLE_PROFILING], 1, [enable profiling])
708 dnl check for instruction scheduler
709 AC_ARG_ENABLE([scheduler], [AS_HELP_STRING(--enable-scheduler,enable instruction scheduler [[default=no]])])
711 AC_MSG_CHECKING(whether instruction scheduler should be supported)
712 if test x"${USE_SCHEDULER}" = "x1" -o x"$enable_scheduler" = "xyes"; then
713 case "${ARCH_DIR}" in
717 AC_MSG_ERROR(instruction scheduler is not available for ${ARCH_DIR} code generator)
722 AC_DEFINE([USE_SCHEDULER], 1, [use scheduler])
723 AM_CONDITIONAL([USE_SCHEDULER], [true])
726 AM_CONDITIONAL([USE_SCHEDULER], [false])
732 dnl check for stuff to be built
734 AC_CHECK_ENABLE_LIBJVM
736 dnl ATTENTION: These check must be after setting
737 dnl enable_shared/enable_static (happens in AC_CHECK_ENABLE_LIBJVM),
738 dnl because libtool uses them to build the correct libraries.
742 AC_CHECK_ENABLE_STATICVM
743 AC_CHECK_ENABLE_ANNOTATIONS
746 dnl where is CACAO's vm.zip
747 AC_MSG_CHECKING(where CACAO's vm.zip is installed)
748 AC_ARG_WITH([vm-zip],
749 [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]])],
750 [CACAO_VM_ZIP=${withval}],
751 [CACAO_VM_ZIP=${CACAO_PREFIX}/share/cacao/vm.zip])
752 AC_MSG_RESULT(${CACAO_VM_ZIP})
753 AC_DEFINE_UNQUOTED([CACAO_VM_ZIP], "${CACAO_VM_ZIP}", [CACAO's vm.zip])
754 AC_SUBST(CACAO_VM_ZIP)
758 AC_CHECK_WITH_CLASSPATH
759 AC_CHECK_WITH_CLASSPATH_PREFIX
760 AC_CHECK_WITH_CLASSPATH_CLASSES
761 AC_CHECK_WITH_CLASSPATH_LIBDIR
762 AC_CHECK_WITH_CLASSPATH_INCLUDEDIR
763 AC_CHECK_WITH_JRE_LAYOUT
766 dnl check for some programs we need
768 case "${WITH_CLASSPATH}" in
776 AC_MSG_ERROR(unknown classpath configuration ${WITH_CLASSPATH})
784 dnl If debug build and regex.h available, enable debug filter
785 if test x"${NDEBUG}" = "xno"; then
786 AC_DEFINE(ENABLE_DEBUG_FILTER, 1, [debug filter])
788 dnl If vmlog enambled and regex.h available, enable vmlogfilter
789 AM_CONDITIONAL([ENABLE_VMLOGFILTER], [test x"${ENABLE_VMLOG}" = "xyes"])
792 AM_CONDITIONAL([ENABLE_VMLOGFILTER], [false])
796 dnl finally pass CFLAGS to Makefiles via AM_CFLAGS
798 AM_CFLAGS=$ARCH_CFLAGS
802 AC_CONFIG_FILES([Makefile]
804 [contrib/setenvinstalled]
805 [contrib/setenvsource]
806 [contrib/vmlog/Makefile]
807 [contrib/vmlog/t/Makefile]
809 [doc/handbook/Makefile]
813 [src/cacaoh/Makefile]
814 [src/fdlibm/Makefile]
817 [src/mm/cacao-gc/Makefile]
818 [src/native/Makefile]
819 [src/native/include/Makefile]
820 [src/native/jvmti/Makefile]
821 [src/native/vm/Makefile]
822 [src/native/vm/cldc1.1/Makefile]
823 [src/native/vm/gnu/Makefile]
824 [src/native/vm/sun/Makefile]
825 [src/scripts/Makefile]
827 [src/threads/Makefile]
828 [src/threads/native/Makefile]
829 [src/threads/none/Makefile]
830 [src/toolbox/Makefile]
832 [src/vm/jit/Makefile]
833 [src/vm/jit/allocator/Makefile]
834 [src/vm/jit/alpha/Makefile]
835 [src/vm/jit/alpha/freebsd/Makefile]
836 [src/vm/jit/alpha/linux/Makefile]
837 [src/vm/jit/arm/Makefile]
838 [src/vm/jit/arm/linux/Makefile]
839 [src/vm/jit/i386/Makefile]
840 [src/vm/jit/i386/cygwin/Makefile]
841 [src/vm/jit/i386/darwin/Makefile]
842 [src/vm/jit/i386/freebsd/Makefile]
843 [src/vm/jit/i386/linux/Makefile]
844 [src/vm/jit/intrp/Makefile]
845 [src/vm/jit/inline/Makefile]
846 [src/vm/jit/loop/Makefile]
847 [src/vm/jit/m68k/Makefile]
848 [src/vm/jit/m68k/linux/Makefile]
849 [src/vm/jit/mips/Makefile]
850 [src/vm/jit/mips/irix/Makefile]
851 [src/vm/jit/mips/linux/Makefile]
852 [src/vm/jit/mips/uclinux/Makefile]
853 [src/vm/jit/optimizing/Makefile]
854 [src/vm/jit/parisc/Makefile]
855 [src/vm/jit/parisc/linux/Makefile]
856 [src/vm/jit/powerpc/Makefile]
857 [src/vm/jit/powerpc/darwin/Makefile]
858 [src/vm/jit/powerpc/linux/Makefile]
859 [src/vm/jit/powerpc/netbsd/Makefile]
860 [src/vm/jit/powerpc64/Makefile]
861 [src/vm/jit/powerpc64/linux/Makefile]
862 [src/vm/jit/s390/Makefile]
863 [src/vm/jit/schedule/Makefile]
864 [src/vm/jit/sparc64/Makefile]
865 [src/vm/jit/sparc64/linux/Makefile]
866 [src/vm/jit/sparc64/solaris/Makefile]
867 [src/vm/jit/verify/Makefile]
868 [src/vm/jit/x86_64/Makefile]
869 [src/vm/jit/x86_64/freebsd/Makefile]
870 [src/vm/jit/x86_64/linux/Makefile]
871 [src/vmcore/Makefile]
873 [tests/regression/Makefile]
874 [tests/regression/codepatching/Makefile]
875 [tests/regression/jasmin/Makefile]
876 [tests/regression/native/Makefile]
877 [tests/regression/resolving/Makefile]
878 [tests/regression/resolving/classes1/Makefile]
879 [tests/regression/resolving/classes2/Makefile]
880 [tests/regression/resolving/classes3/Makefile]
884 dnl now configure subpackages with OPT_CFLAGS and ARCH_CFLAGS
887 AC_CONFIG_SUBDIRS(src/mm/boehm-gc)
895 ## indent-tabs-mode: t
898 ## compile-command: "automake --add-missing"