3 dnl Copyright (C) 1996-2005, 2006, 2007, 2008
4 dnl CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
6 dnl This file is part of CACAO.
8 dnl This program is free software; you can redistribute it and/or
9 dnl modify it under the terms of the GNU General Public License as
10 dnl published by the Free Software Foundation; either version 2, or (at
11 dnl your option) any later version.
13 dnl This program is distributed in the hope that it will be useful, but
14 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
15 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 dnl General Public License for more details.
18 dnl You should have received a copy of the GNU General Public License
19 dnl along with this program; if not, write to the Free Software
20 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 dnl Process this file with autoconf to produce a configure script.
26 AC_INIT(cacao, 0.99rc7, cacao@cacaojvm.org)
27 AC_CONFIG_SRCDIR(src/cacao/cacao.c)
30 AM_INIT_AUTOMAKE([1.9.0 dist-bzip2 tar-ustar])
33 AM_CONFIG_HEADER([config.h])
35 AC_PREFIX_DEFAULT(/usr/local/cacao)
38 dnl set optimization and debugging for all architectures and systems
39 if test x"$CFLAGS" = "x"; then
47 alpha | alphaev56 | alphapca56 )
49 ARCH_CFLAGS="-mieee -D__ALPHA__"
53 arm | armv4 | armv4tl | armv5b | armv5l )
55 ARCH_CFLAGS="-D__ARM__"
61 ARCH_CFLAGS="-D__PARISC__"
65 i386 | i486 | i586 | i686 )
67 ARCH_CFLAGS="-D__I386__"
73 ARCH_CFLAGS="-D__M68K__"
79 ARCH_CFLAGS="-D__MIPS__"
80 dnl Is this correct for mipsel?
86 ARCH_CFLAGS="-D__POWERPC__"
92 ARCH_CFLAGS="-D__POWERPC64__"
98 ARCH_CFLAGS="-D__S390__"
104 ARCH_CFLAGS="-mcpu=v9 -m64 -D__SPARC_64__"
105 dnl Is this correct for 64-bits?
111 ARCH_CFLAGS="-D__X86_64__"
117 ENABLE_STATICVM="yes"
118 ARCH_CFLAGS="-D__XDSPCORE__"
123 AC_MSG_ERROR($host_cpu systems are not supported at this time)
131 INTRP_CFLAGS="$ARCH_CFLAGS -D__WINDOWS__ -D__CYGWIN__ -Wall -Wno-long-long"
132 ARCH_CFLAGS="$ARCH_CFLAGS -D__WINDOWS__ -D__CYGWIN__ -std=c99 -pedantic -Wall -Wno-long-long"
137 INTRP_CFLAGS="$ARCH_CFLAGS -D__DARWIN__ -Wall -Wno-long-long"
138 ARCH_CFLAGS="$ARCH_CFLAGS -D__DARWIN__ -std=c99 -pedantic -Wall -Wno-long-long"
143 INTRP_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
144 ARCH_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -std=c99 -pedantic -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
149 INTRP_CFLAGS="$ARCH_CFLAGS -D__IRIX__"
150 ARCH_CFLAGS="$ARCH_CFLAGS -D__IRIX__"
155 INTRP_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
156 ARCH_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -std=c99 -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
159 dnl must be before *linux*
162 INTRP_CFLAGS="$ARCH_CFLAGS -D__LINUX__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
163 ARCH_CFLAGS="$ARCH_CFLAGS -D__LINUX__ -std=c99 -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
168 INTRP_CFLAGS="$ARCH_CFLAGS -D__LINUX__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
169 ARCH_CFLAGS="$ARCH_CFLAGS -D__LINUX__ -std=c99 -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
174 INTRP_CFLAGS="$ARCH_CFLAGS -D__NETBSD__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
175 ARCH_CFLAGS="$ARCH_CFLAGS -D__NETBSD__ -std=c99 -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
180 dnl On solaris the architecture defines 'sparc', 'sun', 'unix' are
181 dnl not set when cpp is called with -std=c99, therefore we add them
183 INTRP_CFLAGS="$ARCH_CFLAGS -D__SOLARIS__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -D_BSD_SOURCE -Dsparc -Dsun -Dunix"
184 ARCH_CFLAGS="$ARCH_CFLAGS -D__SOLARIS__ -std=c99 -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -D_BSD_SOURCE -Dsparc -Dsun -Dunix"
192 dnl temporary set the CFLAGS for configure tests (e.g. inline keyword)
193 dnl we set it properly at the end of this file
194 CFLAGS="$ARCH_CFLAGS $OPT_CFLAGS"
196 dnl set interpreter flags
197 AC_SUBST(INTRP_CFLAGS)
199 dnl define and substitute some architecture specific variables
200 AC_DEFINE_UNQUOTED([ARCH_DIR], "${ARCH_DIR}", [architecture directory])
201 AC_DEFINE_UNQUOTED([JAVA_ARCH], "${JAVA_ARCH}", [Java architecture name])
204 AC_SUBST(USE_SCHEDULER)
207 dnl Checks for programs.
217 dnl Checks for header files.
221 dnl Crucial header files.
222 AC_CHECK_HEADERS([stdbool.h],, [AC_MSG_ERROR(cannot find stdbool.h)])
223 AC_CHECK_HEADERS([stdint.h],, [AC_MSG_ERROR(cannot find stdint.h)])
225 dnl keep them alpha-sorted!
226 AC_CHECK_HEADERS([assert.h])
227 AC_CHECK_HEADERS([errno.h])
228 AC_CHECK_HEADERS([fcntl.h])
229 AC_CHECK_HEADERS([libgen.h])
230 AC_CHECK_HEADERS([netdb.h])
231 AC_CHECK_HEADERS([stdint.h])
232 AC_CHECK_HEADERS([stdio.h])
233 AC_CHECK_HEADERS([stdlib.h])
234 AC_CHECK_HEADERS([string.h])
235 AC_CHECK_HEADERS([time.h])
236 AC_CHECK_HEADERS([ucontext.h])
237 AC_CHECK_HEADERS([unistd.h])
238 AC_CHECK_HEADERS([sys/ioctl.h])
239 AC_CHECK_HEADERS([sys/mman.h])
240 AC_CHECK_HEADERS([sys/resource.h])
241 AC_CHECK_HEADERS([sys/select.h])
242 AC_CHECK_HEADERS([sys/socket.h])
243 AC_CHECK_HEADERS([sys/stat.h])
244 AC_CHECK_HEADERS([sys/time.h])
245 AC_CHECK_HEADERS([sys/types.h])
247 dnl this is for fdlibm
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).
268 dnl Checks for library functions.
269 AC_PROG_GCC_TRADITIONAL
274 dnl keep them alpha-sorted!
275 AC_CHECK_FUNCS([abort])
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([fclose])
286 AC_CHECK_FUNCS([fflush])
287 AC_CHECK_FUNCS([fopen])
288 AC_CHECK_FUNCS([fprintf])
289 AC_CHECK_FUNCS([fread])
290 AC_CHECK_FUNCS([free])
291 AC_CHECK_FUNCS([fstat])
292 AC_CHECK_FUNCS([fsync])
293 AC_CHECK_FUNCS([ftruncate])
294 AC_CHECK_FUNCS([getcwd])
295 AC_CHECK_FUNCS([gethostbyname])
296 AC_CHECK_FUNCS([gethostname])
297 AC_CHECK_FUNCS([getpagesize])
298 AC_CHECK_FUNCS([getrusage])
299 AC_CHECK_FUNCS([getsockname])
300 AC_CHECK_FUNCS([getsockopt])
301 AC_CHECK_FUNCS([gettimeofday])
302 AC_CHECK_FUNCS([htons])
303 AC_CHECK_FUNCS([ioctl])
304 AC_CHECK_FUNCS([isnan])
305 AC_CHECK_FUNCS([listen])
306 AC_CHECK_FUNCS([localtime])
307 AC_CHECK_FUNCS([localtime_r])
308 AC_CHECK_FUNCS([lseek])
309 AC_CHECK_FUNCS([malloc])
310 AC_CHECK_FUNCS([memcpy])
311 AC_CHECK_FUNCS([memset])
312 AC_CHECK_FUNCS([mmap])
313 AC_CHECK_FUNCS([mprotect])
314 AC_CHECK_FUNCS([open])
315 AC_CHECK_FUNCS([read])
316 AC_CHECK_FUNCS([readlink])
317 AC_CHECK_FUNCS([realloc])
318 AC_CHECK_FUNCS([recv])
319 AC_CHECK_FUNCS([scandir])
320 AC_CHECK_FUNCS([select])
321 AC_CHECK_FUNCS([send])
322 AC_CHECK_FUNCS([setsockopt])
323 AC_CHECK_FUNCS([shutdown])
324 AC_CHECK_FUNCS([socket])
325 AC_CHECK_FUNCS([stat])
326 AC_CHECK_FUNCS([strcat])
327 AC_CHECK_FUNCS([strchr])
328 AC_CHECK_FUNCS([strcpy])
329 AC_CHECK_FUNCS([strdup])
330 AC_CHECK_FUNCS([strerror])
331 AC_CHECK_FUNCS([strlen])
332 AC_CHECK_FUNCS([strncmp])
333 AC_CHECK_FUNCS([strstr])
334 AC_CHECK_FUNCS([time])
335 AC_CHECK_FUNCS([write])
338 dnl Checks for libraries.
340 dnl Checking sizeof void *
341 AC_CHECK_SIZEOF(void *)
345 dnl define install prefix
346 if test "x$prefix" = "xNONE"; then
347 CACAO_PREFIX=$ac_default_prefix
351 AC_DEFINE_UNQUOTED([CACAO_PREFIX], "${CACAO_PREFIX}", [installation prefix])
352 AC_SUBST(CACAO_PREFIX)
354 dnl define libdir prefix
355 if test "x$libdir" = "xNONE"; then
356 CACAO_LIBDIR=$ac_default_libdir
360 dnl expand CACAO_LIBDIR to something that is usable in C code
361 AS_AC_EXPAND([CACAO_LIBDIR], ${CACAO_LIBDIR})
362 AC_DEFINE_UNQUOTED([CACAO_LIBDIR], "${CACAO_LIBDIR}", [library installation prefix])
363 AC_SUBST(CACAO_LIBDIR)
370 AC_CHECK_ENABLE_INTRP
372 if test x"${ENABLE_JIT}" = "xno" -a x"${ENABLE_INTRP}" = "xno"; then
373 AC_ERROR(You have to enable at least the JIT or the interpreter.)
377 AC_CHECK_SOFT_FLOAT_CMP
378 AC_CHECK_SOFT_DOUBLE_CMP
381 AC_CHECK_ENABLE_DEBUG
385 dnl check for memcheck support
386 AC_MSG_CHECKING(whether debugging memory checks should be enabled)
387 AC_ARG_ENABLE([memcheck],
388 [AS_HELP_STRING(--enable-memcheck,enable debugging memory checks [[default=no]])],
389 [case "${enableval}" in
390 yes) ENABLE_MEMCHECK=yes;;
391 *) ENABLE_MEMCHECK=no;;
393 [ENABLE_MEMCHECK=no])
394 AC_MSG_RESULT(${ENABLE_MEMCHECK})
395 AM_CONDITIONAL([ENABLE_MEMCHECK], test x"${ENABLE_MEMCHECK}" = "xyes")
397 if test x"${ENABLE_MEMCHECK}" = "xyes"; then
398 AC_DEFINE([ENABLE_MEMCHECK], 1, [perform debugging memory checks])
402 dnl check for handles (indirection cells) support
403 AC_MSG_CHECKING(whether handles (indirection cells) should be enabled)
404 AC_ARG_ENABLE([handles],
405 [AS_HELP_STRING(--enable-handles,enable handles (indirection cells) [[default=no]])],
406 [case "${enableval}" in
407 yes) ENABLE_HANDLES=yes;;
408 *) ENABLE_HANDLES=no;;
411 AC_MSG_RESULT(${ENABLE_HANDLES})
412 AM_CONDITIONAL([ENABLE_HANDLES], test x"${ENABLE_HANDLES}" = "xyes")
414 if test x"${ENABLE_HANDLES}" = "xyes"; then
415 AC_DEFINE([ENABLE_HANDLES], 1, [enable handles (indirection cells)])
419 dnl check for vmlog support
420 AC_MSG_CHECKING(whether vmlog tracing should be enabled)
421 AC_ARG_ENABLE([vmlog],
422 [AS_HELP_STRING(--enable-vmlog,enable vmlog tracing [[default=no]])],
423 [case "${enableval}" in
424 yes) ENABLE_VMLOG=yes;;
428 AC_MSG_RESULT(${ENABLE_VMLOG})
429 AM_CONDITIONAL([ENABLE_VMLOG], test x"${ENABLE_VMLOG}" = "xyes")
431 if test x"${ENABLE_VMLOG}" = "xyes"; then
432 AC_DEFINE([ENABLE_VMLOG], 1, [enable vmlog tracing code])
436 dnl check for disassembler support
437 AC_MSG_CHECKING(whether disassembler should be enabled)
438 AC_ARG_ENABLE([disassembler],
439 [AS_HELP_STRING(--enable-disassembler,enable disassembler [[default=no]])],
440 [case "${enableval}" in
441 yes) ENABLE_DISASSEMBLER=yes;;
442 *) ENABLE_DISASSEMBLER=no;;
444 [ENABLE_DISASSEMBLER=no])
445 AC_MSG_RESULT(${ENABLE_DISASSEMBLER})
446 AM_CONDITIONAL([ENABLE_DISASSEMBLER], test x"${ENABLE_DISASSEMBLER}" = "xyes")
448 if test x"${ENABLE_DISASSEMBLER}" = "xyes"; then
449 AC_DEFINE([ENABLE_DISASSEMBLER], 1, [enable disassembler])
451 dnl check for binutils headers and libraries on some architectures for the
453 case "${ARCH_DIR}" in
454 arm | i386 | powerpc | x86_64 | sparc64 | powerpc64 | s390 | m68k)
455 AC_CHECK_HEADER([ansidecl.h],, [AC_MSG_ERROR(cannot find ansidecl.h)])
456 AC_CHECK_HEADER([symcat.h],, [AC_MSG_ERROR(cannot find symcat.h)])
457 AC_CHECK_HEADER([bfd.h],, [AC_MSG_ERROR(cannot find bfd.h)])
458 AC_CHECK_HEADER([dis-asm.h],, [AC_MSG_ERROR(cannot find dis-asm.h)])
461 cygwin | darwin | netbsd | solaris)
462 AC_CHECK_LIB(intl, dcgettext,, [AC_MSG_ERROR(cannot find libintl (from binutils))])
468 AC_CHECK_LIB(rt, sem_init,, [AC_MSG_ERROR(cannot find librt)])
473 AC_CHECK_LIB(iberty, xstrerror,, [AC_MSG_ERROR(cannot find libiberty (from binutils))])
474 AC_CHECK_LIB(bfd, bfd_get_arch,, [AC_MSG_ERROR(cannot find libbfd (from binutils))])
475 AC_CHECK_LIB(opcodes, disassembler,, [AC_MSG_ERROR(cannot find libopcodes (from binutils))])
476 AC_DEFINE([WITH_BINUTILS_DISASSEMBLER], 1, [use binutils disassembler])
477 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [true])
480 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
484 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
488 dnl check for statistics
489 AC_MSG_CHECKING(whether statistics generation should be enabled)
490 AC_ARG_ENABLE([statistics],
491 [AS_HELP_STRING(--enable-statistics,enable statistics generation [[default=no]])],
492 [case "${enableval}" in
493 yes) ENABLE_STATISTICS=yes;;
494 *) ENABLE_STATISTICS=no;;
496 [ENABLE_STATISTICS=no])
497 AC_MSG_RESULT(${ENABLE_STATISTICS})
498 AM_CONDITIONAL([ENABLE_STATISTICS], test x"${ENABLE_STATISTICS}" = "xyes")
500 if test x"${ENABLE_STATISTICS}" = "xyes"; then
501 AC_DEFINE([ENABLE_STATISTICS], 1, [enable statistics])
505 dnl check for verifier
506 AC_MSG_CHECKING(whether classfile verification should be enabled)
507 AC_ARG_ENABLE([verifier],
508 [AS_HELP_STRING(--disable-verifier,disable classfile verification [[default=enabled]])],
509 [case "${enableval}" in
510 no) ENABLE_VERIFIER=no;;
511 *) ENABLE_VERIFIER=yes;;
513 [ENABLE_VERIFIER=yes])
514 AC_MSG_RESULT(${ENABLE_VERIFIER})
515 AM_CONDITIONAL([ENABLE_VERIFIER], test x"${ENABLE_VERIFIER}" = "xyes")
517 if test x"${ENABLE_VERIFIER}" = "xyes"; then
518 AC_DEFINE([ENABLE_VERIFIER], 1, [enable classfile verification])
522 dnl check for compiler timing
523 AC_MSG_CHECKING(whether real-time timing should be enabled)
524 AC_ARG_ENABLE([rt-timing],
525 [AS_HELP_STRING(--enable-rt-timing,enable real-time timing [[default=no]])],
526 [case "${enableval}" in
527 yes) ENABLE_RT_TIMING=yes;;
528 *) ENABLE_RT_TIMING=no;;
530 [ENABLE_RT_TIMING=no])
531 AC_MSG_RESULT(${ENABLE_RT_TIMING})
532 AM_CONDITIONAL([ENABLE_RT_TIMING], test x"${ENABLE_RT_TIMING}" = "xyes")
534 if test x"${ENABLE_RT_TIMING}" = "xyes"; then
535 AC_DEFINE([ENABLE_RT_TIMING], 1, [enable real-time timing])
539 dnl check for cycle count statistics
540 AC_MSG_CHECKING(whether cycle count statistics should be enabled)
541 AC_ARG_ENABLE([cycles-stats],
542 [AS_HELP_STRING(--enable-cycles-stats,enable cycle count statistics [[default=no]])],
543 [case "${enableval}" in
544 yes) ENABLE_CYCLES_STATS=yes;;
545 *) ENABLE_CYCLES_STATS=no;;
547 [ENABLE_CYCLES_STATS=no])
548 AC_MSG_RESULT(${ENABLE_CYCLES_STATS})
549 AM_CONDITIONAL([ENABLE_CYCLES_STATS], test x"${ENABLE_CYCLES_STATS}" = "xyes")
551 if test x"${ENABLE_CYCLES_STATS}" = "xyes"; then
552 AC_DEFINE([ENABLE_CYCLES_STATS], 1, [enable cycle count statistics])
557 AC_MSG_CHECKING(whether to compile JVMTI support)
558 AC_ARG_ENABLE([jvmti],
559 [AS_HELP_STRING(--enable-jvmti,enable JVMTI [[default=no]])],
560 [case "${enableval}" in
561 yes) ENABLE_JVMTI=yes;;
565 AC_MSG_RESULT(${ENABLE_JVMTI})
566 AM_CONDITIONAL([ENABLE_JVMTI], test x"${ENABLE_JVMTI}" = "xyes")
568 if test x"${ENABLE_JVMTI}" = "xyes"; then
569 AC_DEFINE([ENABLE_JVMTI], 1, [use JVMTI])
573 AC_CHECK_ENABLE_THREADS
576 dnl check if if-conversion should be supported
577 AC_MSG_CHECKING(whether if-conversion should be supported)
578 AC_ARG_ENABLE([ifconv],
579 [AS_HELP_STRING(--disable-ifconv,disable if-conversion [[default=enabled]])],
580 [case "${enableval}" in
581 no) ENABLE_IFCONV=no;;
582 *) ENABLE_IFCONV=yes;;
585 AC_MSG_RESULT(${ENABLE_IFCONV})
586 AM_CONDITIONAL([ENABLE_IFCONV], test x"${ENABLE_IFCONV}" = "xyes")
588 if test x"${ENABLE_IFCONV}" = "xyes"; then
589 AC_DEFINE([ENABLE_IFCONV], 1, [enable if-conversion])
593 dnl check for inlining
594 AC_MSG_CHECKING(whether method inlining should be supported)
595 AC_ARG_ENABLE([inlining],
596 [AS_HELP_STRING(--enable-inlining,enable method inlining [[default=no]])],
597 [case "${enableval}" in
598 yes) ENABLE_INLINING=yes;;
599 *) ENABLE_INLINING=no;;
601 [ENABLE_INLINING=no])
602 AC_MSG_RESULT(${ENABLE_INLINING})
603 AM_CONDITIONAL([ENABLE_INLINING], test x"${ENABLE_INLINING}" = "xyes")
605 if test x"${ENABLE_INLINING}" = "xyes"; then
606 AC_DEFINE([ENABLE_INLINING], 1, [use method inlining])
610 dnl check for inlining debug options
611 AC_MSG_CHECKING(whether method inlining debug options should be enabled)
612 AC_ARG_ENABLE([inlining-debug],
613 [AS_HELP_STRING(--enable-inlining-debug,enable method inlining debug options [[default=no]])],
614 [case "${enableval}" in
615 yes) ENABLE_INLINING_DEBUG=yes;;
616 *) ENABLE_INLINING_DEBUG=no;;
618 [ENABLE_INLINING_DEBUG=no])
619 AC_MSG_RESULT(${ENABLE_INLINING_DEBUG})
620 AM_CONDITIONAL([ENABLE_INLINING_DEBUG], test x"${ENABLE_INLINING_DEBUG}" = "xyes")
622 if test x"${ENABLE_INLINING_DEBUG}" = "xyes"; then
623 AC_DEFINE([ENABLE_INLINING_DEBUG], 1, [enable method inlining debug options])
627 dnl check for replacement
628 AC_MSG_CHECKING(whether on-stack replacement should be supported)
629 AC_ARG_ENABLE([replacement],
630 [AS_HELP_STRING(--enable-replacement,enable on-stack replacement [[default=no]])],
631 [case "${enableval}" in
632 yes) ENABLE_REPLACEMENT=yes;;
633 *) ENABLE_REPLACEMENT=no;;
635 [ENABLE_REPLACEMENT=no])
636 AC_MSG_RESULT(${ENABLE_REPLACEMENT})
637 AM_CONDITIONAL([ENABLE_REPLACEMENT], test x"${ENABLE_REPLACEMENT}" = "xyes")
639 if test x"${ENABLE_REPLACEMENT}" = "xyes"; then
640 AC_DEFINE([ENABLE_REPLACEMENT], 1, [use on-stack replacement])
644 dnl check for loop optimization
645 AC_MSG_CHECKING(whether loop optimization should be supported)
646 AC_ARG_ENABLE([loop],
647 [AS_HELP_STRING(--enable-loop,enable loop optimization [[default=no]])],
648 [case "${enableval}" in
649 yes) ENABLE_LOOP=yes;;
653 AC_MSG_RESULT(${ENABLE_LOOP})
654 AM_CONDITIONAL([ENABLE_LOOP], test x"${ENABLE_LOOP}" = "xyes")
656 if test x"${ENABLE_LOOP}" = "xyes"; then
657 AC_DEFINE([ENABLE_LOOP], 1, [use loop optimization])
661 dnl check if linear scan register allocator(lsra) with SSA should be used
662 AC_MSG_CHECKING(whether lsra with ssa should be supported)
664 [AS_HELP_STRING(--disable-ssa,disable ssa [[default=disabled]])],
665 [case "${enableval}" in
670 AC_MSG_RESULT(${ENABLE_SSA})
671 AM_CONDITIONAL([ENABLE_SSA], test x"${ENABLE_SSA}" = "xyes")
672 AM_CONDITIONAL([ENABLE_ESCAPE], test x"${ENABLE_SSA}" = "xyes")
673 AM_CONDITIONAL([ENABLE_ESCAPE_CHECK], test x"${ENABLE_SSA}" = "xyes")
675 if test x"${ENABLE_SSA}" = "xyes"; then
676 AC_DEFINE([ENABLE_SSA], 1, [enable lsra with ssa])
677 AC_DEFINE([ENABLE_ESCAPE], 1, [enable escape analysis with ssa])
678 AC_DEFINE([ENABLE_ESCAPE_CHECK], 1, [enable generating code to validate escape analysis results])
683 dnl check if linear scan register allocator(lsra) should be used
684 AC_MSG_CHECKING(whether lsra should be supported)
685 AC_ARG_ENABLE([lsra],
686 [AS_HELP_STRING(--enable-lsra,enable linear scan register allocator [[default=no]])],
687 [case "${enableval}" in
688 yes) ENABLE_LSRA=yes;;
693 if test x"${ENABLE_LSRA}" = "xyes"; then
694 if test x"${ENABLE_SSA}" = "xyes"; then
698 AC_MSG_RESULT(${ENABLE_LSRA})
699 AM_CONDITIONAL([ENABLE_LSRA], test x"${ENABLE_LSRA}" = "xyes")
701 if test x"${ENABLE_LSRA}" = "xyes"; then
702 AC_DEFINE([ENABLE_LSRA], 1, [enable lsra])
705 dnl check if profiling should be supported
706 AC_MSG_CHECKING(whether profiling should be supported)
707 AC_ARG_ENABLE([profiling],
708 [AS_HELP_STRING(--enable-profiling,enable profiling [[default=no]])],
709 [case "${enableval}" in
710 yes) ENABLE_PROFILING=yes;;
711 *) ENABLE_PROFILING=no;;
713 [ENABLE_PROFILING=no])
714 AC_MSG_RESULT(${ENABLE_PROFILING})
715 AM_CONDITIONAL([ENABLE_PROFILING], test x"${ENABLE_PROFILING}" = "xyes")
717 if test x"${ENABLE_PROFILING}" = "xyes"; then
718 AC_DEFINE([ENABLE_PROFILING], 1, [enable profiling])
722 dnl check for instruction scheduler
723 AC_ARG_ENABLE([scheduler], [AS_HELP_STRING(--enable-scheduler,enable instruction scheduler [[default=no]])])
725 AC_MSG_CHECKING(whether instruction scheduler should be supported)
726 if test x"${USE_SCHEDULER}" = "x1" -o x"$enable_scheduler" = "xyes"; then
727 case "${ARCH_DIR}" in
731 AC_MSG_ERROR(instruction scheduler is not available for ${ARCH_DIR} code generator)
736 AC_DEFINE([USE_SCHEDULER], 1, [use scheduler])
737 AM_CONDITIONAL([USE_SCHEDULER], [true])
740 AM_CONDITIONAL([USE_SCHEDULER], [false])
746 dnl check for stuff to be built
748 AC_CHECK_ENABLE_LIBJVM
750 dnl ATTENTION: These check must be after setting
751 dnl enable_shared/enable_static (happens in AC_CHECK_ENABLE_LIBJVM),
752 dnl because libtool uses them to build the correct libraries.
756 AC_CHECK_ENABLE_STATICVM
757 AC_CHECK_ENABLE_ANNOTATIONS
758 AC_CHECK_ENABLE_ASSERTION
761 dnl where is CACAO's vm.zip
762 AC_MSG_CHECKING(where CACAO's vm.zip is installed)
763 AC_ARG_WITH([vm-zip],
764 [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]])],
765 [CACAO_VM_ZIP=${withval}],
766 [CACAO_VM_ZIP=${CACAO_PREFIX}/share/cacao/vm.zip])
767 AC_MSG_RESULT(${CACAO_VM_ZIP})
768 AC_DEFINE_UNQUOTED([CACAO_VM_ZIP], "${CACAO_VM_ZIP}", [CACAO's vm.zip])
769 AC_SUBST(CACAO_VM_ZIP)
773 AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY
775 dnl Now we check for jre-layout so we can skip some checks that are
777 AC_CHECK_ENABLE_JRE_LAYOUT
779 AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_PREFIX
780 AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_CLASSES
782 if test x"${ENABLE_JRE_LAYOUT}" = "xno"; then
783 AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_LIBDIR
786 dnl The check for jni_md.h must be before jni.h.
787 AC_CHECK_WITH_JNI_MD_H
790 dnl HPI is only required for OpenJDK
791 case "${WITH_JAVA_RUNTIME_LIBRARY}" in
793 AC_CHECK_WITH_HPI_MD_H
800 dnl check for some programs we need
802 case "${WITH_JAVA_RUNTIME_LIBRARY}" in
803 cldc1.1 | gnuclasspath)
810 AC_MSG_ERROR(unknown classpath configuration ${WITH_JAVA_RUNTIME_LIBRARY})
818 dnl If debug build and regex.h available, enable debug filter
819 if test x"${NDEBUG}" = "xno"; then
820 AC_DEFINE(ENABLE_DEBUG_FILTER, 1, [debug filter])
822 dnl If vmlog enambled and regex.h available, enable vmlogfilter
823 AM_CONDITIONAL([ENABLE_VMLOGFILTER], [test x"${ENABLE_VMLOG}" = "xyes"])
826 AM_CONDITIONAL([ENABLE_VMLOGFILTER], [false])
835 AZ_PYTHON_VERSION_ENSURE( [2.4] )
840 dnl define some stuff required for --fullversion
841 AC_DEFINE_UNQUOTED(VERSION_CONFIGURE_ARGS, "$ac_configure_args", [configure arguments])
842 AC_DEFINE_UNQUOTED(VERSION_CC, "$CC", [CC used])
843 AC_DEFINE_UNQUOTED(VERSION_CFLAGS, "$OPT_CFLAGS $ARCH_CFLAGS $CPPFLAGS", [CFLAGS used])
846 dnl finally pass CFLAGS to Makefiles via AM_CFLAGS
848 AM_CFLAGS=$ARCH_CFLAGS
849 AM_CPPFLAGS="$CPPFLAGS"
851 AC_SUBST(AM_CPPFLAGS)
854 AC_CONFIG_FILES([Makefile]
856 [contrib/setenvinstalled]
857 [contrib/setenvsource]
858 [contrib/vmlog/Makefile]
859 [contrib/vmlog/t/Makefile]
861 [doc/doxygen/Makefile]
862 [doc/handbook/Makefile]
866 [src/cacaoh/Makefile]
867 [src/classes/Makefile]
868 [src/fdlibm/Makefile]
870 [src/mm/cacao-gc/Makefile]
871 [src/native/Makefile]
872 [src/native/include/Makefile]
873 [src/native/jvmti/Makefile]
874 [src/native/vm/Makefile]
875 [src/native/vm/cldc1.1/Makefile]
876 [src/native/vm/gnuclasspath/Makefile]
877 [src/native/vm/openjdk/Makefile]
878 [src/scripts/Makefile]
880 [src/threads/Makefile]
881 [src/threads/none/Makefile]
882 [src/threads/posix/Makefile]
883 [src/toolbox/Makefile]
885 [src/vm/jit/Makefile]
886 [src/vm/jit/allocator/Makefile]
887 [src/vm/jit/alpha/Makefile]
888 [src/vm/jit/alpha/freebsd/Makefile]
889 [src/vm/jit/alpha/linux/Makefile]
890 [src/vm/jit/arm/Makefile]
891 [src/vm/jit/arm/linux/Makefile]
892 [src/vm/jit/i386/Makefile]
893 [src/vm/jit/i386/cygwin/Makefile]
894 [src/vm/jit/i386/darwin/Makefile]
895 [src/vm/jit/i386/freebsd/Makefile]
896 [src/vm/jit/i386/linux/Makefile]
897 [src/vm/jit/intrp/Makefile]
898 [src/vm/jit/inline/Makefile]
899 [src/vm/jit/ir/Makefile]
900 [src/vm/jit/loop/Makefile]
901 [src/vm/jit/m68k/Makefile]
902 [src/vm/jit/m68k/linux/Makefile]
903 [src/vm/jit/mips/Makefile]
904 [src/vm/jit/mips/irix/Makefile]
905 [src/vm/jit/mips/linux/Makefile]
906 [src/vm/jit/mips/uclinux/Makefile]
907 [src/vm/jit/optimizing/Makefile]
908 [src/vm/jit/parisc/Makefile]
909 [src/vm/jit/parisc/linux/Makefile]
910 [src/vm/jit/powerpc/Makefile]
911 [src/vm/jit/powerpc/darwin/Makefile]
912 [src/vm/jit/powerpc/linux/Makefile]
913 [src/vm/jit/powerpc/netbsd/Makefile]
914 [src/vm/jit/powerpc64/Makefile]
915 [src/vm/jit/powerpc64/linux/Makefile]
916 [src/vm/jit/s390/Makefile]
917 [src/vm/jit/schedule/Makefile]
918 [src/vm/jit/sparc64/Makefile]
919 [src/vm/jit/sparc64/linux/Makefile]
920 [src/vm/jit/sparc64/solaris/Makefile]
921 [src/vm/jit/verify/Makefile]
922 [src/vm/jit/x86_64/Makefile]
923 [src/vm/jit/x86_64/freebsd/Makefile]
924 [src/vm/jit/x86_64/linux/Makefile]
925 [src/vmcore/Makefile]
927 [tests/regression/Makefile]
928 [tests/regression/bugzilla/Makefile]
929 [tests/regression/assertion/Makefile]
930 [tests/regression/jasmin/Makefile]
931 [tests/regression/junit/Makefile]
932 [tests/regression/native/Makefile]
933 [tests/regression/resolving/Makefile]
934 [tests/regression/resolving/classes1/Makefile]
935 [tests/regression/resolving/classes2/Makefile]
936 [tests/regression/resolving/classes3/Makefile]
940 dnl now configure subpackages with OPT_CFLAGS and ARCH_CFLAGS
943 dnl We only build the shared library objects but we use it as
944 dnl noinst_LTLIBRARIES
945 ac_configure_args="$ac_configure_args --disable-static"
946 AC_CONFIG_SUBDIRS(src/mm/boehm-gc)
954 ## indent-tabs-mode: t
957 ## compile-command: "automake --add-missing"