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, 1.1.0pre, 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"
141 dnl Must be BEFORE *freebsd*.
144 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"
145 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"
150 INTRP_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
151 ARCH_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -std=c99 -pedantic -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
156 INTRP_CFLAGS="$ARCH_CFLAGS -D__IRIX__"
157 ARCH_CFLAGS="$ARCH_CFLAGS -D__IRIX__"
160 dnl Must be BEFORE *linux*.
163 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"
164 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"
169 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"
170 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"
175 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"
176 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"
181 dnl On solaris the architecture defines 'sparc', 'sun', 'unix' are
182 dnl not set when cpp is called with -std=c99, therefore we add them
184 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"
185 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"
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 and substitute some architecture specific variables
201 AC_DEFINE_UNQUOTED([ARCH_DIR], "${ARCH_DIR}", [architecture directory])
202 AC_DEFINE_UNQUOTED([JAVA_ARCH], "${JAVA_ARCH}", [Java architecture name])
206 AC_SUBST(USE_SCHEDULER)
209 dnl Checks for programs.
218 dnl Checks for header files.
222 dnl Crucial header files.
223 AC_CHECK_HEADERS([stdbool.h],, [AC_MSG_ERROR(cannot find stdbool.h)])
224 AC_CHECK_HEADERS([stdint.h],, [AC_MSG_ERROR(cannot find stdint.h)])
226 dnl keep them alpha-sorted!
227 AC_CHECK_HEADERS([assert.h])
228 AC_CHECK_HEADERS([errno.h])
229 AC_CHECK_HEADERS([fcntl.h])
230 AC_CHECK_HEADERS([libgen.h])
231 AC_CHECK_HEADERS([netdb.h])
232 AC_CHECK_HEADERS([stdint.h])
233 AC_CHECK_HEADERS([stdio.h])
234 AC_CHECK_HEADERS([stdlib.h])
235 AC_CHECK_HEADERS([string.h])
236 AC_CHECK_HEADERS([time.h])
237 AC_CHECK_HEADERS([ucontext.h])
238 AC_CHECK_HEADERS([unistd.h])
239 AC_CHECK_HEADERS([sys/ioctl.h])
240 AC_CHECK_HEADERS([sys/mman.h])
241 AC_CHECK_HEADERS([sys/resource.h])
242 AC_CHECK_HEADERS([sys/select.h])
243 AC_CHECK_HEADERS([sys/socket.h])
244 AC_CHECK_HEADERS([sys/stat.h])
245 AC_CHECK_HEADERS([sys/time.h])
246 AC_CHECK_HEADERS([sys/types.h])
248 dnl Checks for typedefs, structures, and compiler characteristics.
257 dnl Checks for libraries (NOTE: Should be done before function checks,
258 dnl as some functions may be in libraries we check for).
260 dnl Checks for library functions.
261 AC_PROG_GCC_TRADITIONAL
266 dnl keep them alpha-sorted!
267 AC_CHECK_FUNCS([abort])
268 AC_CHECK_FUNCS([accept])
269 AC_CHECK_FUNCS([access])
270 AC_CHECK_FUNCS([atoi])
271 AC_CHECK_FUNCS([atol])
272 AC_CHECK_FUNCS([calloc])
273 AC_CHECK_FUNCS([close])
274 AC_CHECK_FUNCS([confstr])
275 AC_CHECK_FUNCS([connect])
276 AC_CHECK_FUNCS([dirname])
277 AC_CHECK_FUNCS([fclose])
278 AC_CHECK_FUNCS([fflush])
279 AC_CHECK_FUNCS([fopen])
280 AC_CHECK_FUNCS([fprintf])
281 AC_CHECK_FUNCS([fread])
282 AC_CHECK_FUNCS([free])
283 AC_CHECK_FUNCS([fstat])
284 AC_CHECK_FUNCS([fsync])
285 AC_CHECK_FUNCS([ftruncate])
286 AC_CHECK_FUNCS([getcwd])
287 AC_CHECK_FUNCS([gethostbyname])
288 AC_CHECK_FUNCS([gethostname])
289 AC_CHECK_FUNCS([getpagesize])
290 AC_CHECK_FUNCS([getrusage])
291 AC_CHECK_FUNCS([getsockname])
292 AC_CHECK_FUNCS([getsockopt])
293 AC_CHECK_FUNCS([gettimeofday])
294 AC_CHECK_FUNCS([htons])
295 AC_CHECK_FUNCS([ioctl])
296 AC_CHECK_FUNCS([isnan])
297 AC_CHECK_FUNCS([listen])
298 AC_CHECK_FUNCS([localtime])
299 AC_CHECK_FUNCS([localtime_r])
300 AC_CHECK_FUNCS([lseek])
301 AC_CHECK_FUNCS([malloc])
302 AC_CHECK_FUNCS([memcpy])
303 AC_CHECK_FUNCS([memset])
304 AC_CHECK_FUNCS([mmap])
305 AC_CHECK_FUNCS([mprotect])
306 AC_CHECK_FUNCS([open])
307 AC_CHECK_FUNCS([read])
308 AC_CHECK_FUNCS([readlink])
309 AC_CHECK_FUNCS([realloc])
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([stat])
318 AC_CHECK_FUNCS([strcat])
319 AC_CHECK_FUNCS([strchr])
320 AC_CHECK_FUNCS([strcpy])
321 AC_CHECK_FUNCS([strdup])
322 AC_CHECK_FUNCS([strerror])
323 AC_CHECK_FUNCS([strlen])
324 AC_CHECK_FUNCS([strncmp])
325 AC_CHECK_FUNCS([strstr])
326 AC_CHECK_FUNCS([time])
327 AC_CHECK_FUNCS([write])
330 dnl Checks for libraries.
332 dnl Checking sizeof void *
333 AC_CHECK_SIZEOF(void *)
337 dnl define install prefix
338 if test "x$prefix" = "xNONE"; then
339 CACAO_PREFIX=$ac_default_prefix
343 AC_DEFINE_UNQUOTED([CACAO_PREFIX], "${CACAO_PREFIX}", [installation prefix])
344 AC_SUBST(CACAO_PREFIX)
346 dnl define libdir prefix
347 if test "x$libdir" = "xNONE"; then
348 CACAO_LIBDIR=$ac_default_libdir
352 dnl expand CACAO_LIBDIR to something that is usable in C code
353 AS_AC_EXPAND([CACAO_LIBDIR], ${CACAO_LIBDIR})
354 AC_DEFINE_UNQUOTED([CACAO_LIBDIR], "${CACAO_LIBDIR}", [library installation prefix])
355 AC_SUBST(CACAO_LIBDIR)
362 AC_CHECK_ENABLE_INTRP
364 if test x"${ENABLE_JIT}" = "xno" -a x"${ENABLE_INTRP}" = "xno"; then
365 AC_ERROR(You have to enable at least the JIT or the interpreter.)
369 AC_CHECK_SOFT_FLOAT_CMP
370 AC_CHECK_SOFT_DOUBLE_CMP
373 AC_CHECK_ENABLE_DEBUG
377 dnl check for memcheck support
378 AC_MSG_CHECKING(whether debugging memory checks should be enabled)
379 AC_ARG_ENABLE([memcheck],
380 [AS_HELP_STRING(--enable-memcheck,enable debugging memory checks [[default=no]])],
381 [case "${enableval}" in
382 yes) ENABLE_MEMCHECK=yes;;
383 *) ENABLE_MEMCHECK=no;;
385 [ENABLE_MEMCHECK=no])
386 AC_MSG_RESULT(${ENABLE_MEMCHECK})
387 AM_CONDITIONAL([ENABLE_MEMCHECK], test x"${ENABLE_MEMCHECK}" = "xyes")
389 if test x"${ENABLE_MEMCHECK}" = "xyes"; then
390 AC_DEFINE([ENABLE_MEMCHECK], 1, [perform debugging memory checks])
394 dnl check for handles (indirection cells) support
395 AC_MSG_CHECKING(whether handles (indirection cells) should be enabled)
396 AC_ARG_ENABLE([handles],
397 [AS_HELP_STRING(--enable-handles,enable handles (indirection cells) [[default=no]])],
398 [case "${enableval}" in
399 yes) ENABLE_HANDLES=yes;;
400 *) ENABLE_HANDLES=no;;
403 AC_MSG_RESULT(${ENABLE_HANDLES})
404 AM_CONDITIONAL([ENABLE_HANDLES], test x"${ENABLE_HANDLES}" = "xyes")
406 if test x"${ENABLE_HANDLES}" = "xyes"; then
407 AC_DEFINE([ENABLE_HANDLES], 1, [enable handles (indirection cells)])
411 dnl check for vmlog support
412 AC_MSG_CHECKING(whether vmlog tracing should be enabled)
413 AC_ARG_ENABLE([vmlog],
414 [AS_HELP_STRING(--enable-vmlog,enable vmlog tracing [[default=no]])],
415 [case "${enableval}" in
416 yes) ENABLE_VMLOG=yes;;
420 AC_MSG_RESULT(${ENABLE_VMLOG})
421 AM_CONDITIONAL([ENABLE_VMLOG], test x"${ENABLE_VMLOG}" = "xyes")
423 if test x"${ENABLE_VMLOG}" = "xyes"; then
424 AC_DEFINE([ENABLE_VMLOG], 1, [enable vmlog tracing code])
428 dnl check for disassembler support
429 AC_MSG_CHECKING(whether disassembler should be enabled)
430 AC_ARG_ENABLE([disassembler],
431 [AS_HELP_STRING(--enable-disassembler,enable disassembler [[default=no]])],
432 [case "${enableval}" in
433 yes) ENABLE_DISASSEMBLER=yes;;
434 *) ENABLE_DISASSEMBLER=no;;
436 [ENABLE_DISASSEMBLER=no])
437 AC_MSG_RESULT(${ENABLE_DISASSEMBLER})
438 AM_CONDITIONAL([ENABLE_DISASSEMBLER], test x"${ENABLE_DISASSEMBLER}" = "xyes")
440 if test x"${ENABLE_DISASSEMBLER}" = "xyes"; then
441 AC_DEFINE([ENABLE_DISASSEMBLER], 1, [enable disassembler])
443 dnl check for binutils headers and libraries on some architectures for the
445 case "${ARCH_DIR}" in
446 arm | i386 | powerpc | x86_64 | sparc64 | powerpc64 | s390 | m68k)
447 AC_CHECK_HEADER([ansidecl.h],, [AC_MSG_ERROR(cannot find ansidecl.h)])
448 AC_CHECK_HEADER([symcat.h],, [AC_MSG_ERROR(cannot find symcat.h)])
449 AC_CHECK_HEADER([bfd.h],, [AC_MSG_ERROR(cannot find bfd.h)])
450 AC_CHECK_HEADER([dis-asm.h],, [AC_MSG_ERROR(cannot find dis-asm.h)])
453 cygwin | darwin | netbsd | solaris)
454 AC_CHECK_LIB(intl, dcgettext,, [AC_MSG_ERROR(cannot find libintl (from binutils))])
460 AC_CHECK_LIB(rt, sem_init,, [AC_MSG_ERROR(cannot find librt)])
465 AC_CHECK_LIB(iberty, xstrerror,, [AC_MSG_ERROR(cannot find libiberty (from binutils))])
466 AC_CHECK_LIB(bfd, bfd_get_arch,, [AC_MSG_ERROR(cannot find libbfd (from binutils))])
467 AC_CHECK_LIB(opcodes, disassembler,, [AC_MSG_ERROR(cannot find libopcodes (from binutils))])
468 AC_DEFINE([WITH_BINUTILS_DISASSEMBLER], 1, [use binutils disassembler])
469 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [true])
472 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
476 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
480 dnl check for statistics
481 AC_MSG_CHECKING(whether statistics generation should be enabled)
482 AC_ARG_ENABLE([statistics],
483 [AS_HELP_STRING(--enable-statistics,enable statistics generation [[default=no]])],
484 [case "${enableval}" in
485 yes) ENABLE_STATISTICS=yes;;
486 *) ENABLE_STATISTICS=no;;
488 [ENABLE_STATISTICS=no])
489 AC_MSG_RESULT(${ENABLE_STATISTICS})
490 AM_CONDITIONAL([ENABLE_STATISTICS], test x"${ENABLE_STATISTICS}" = "xyes")
492 if test x"${ENABLE_STATISTICS}" = "xyes"; then
493 AC_DEFINE([ENABLE_STATISTICS], 1, [enable statistics])
497 dnl check for verifier
498 AC_MSG_CHECKING(whether classfile verification should be enabled)
499 AC_ARG_ENABLE([verifier],
500 [AS_HELP_STRING(--disable-verifier,disable classfile verification [[default=enabled]])],
501 [case "${enableval}" in
502 no) ENABLE_VERIFIER=no;;
503 *) ENABLE_VERIFIER=yes;;
505 [ENABLE_VERIFIER=yes])
506 AC_MSG_RESULT(${ENABLE_VERIFIER})
507 AM_CONDITIONAL([ENABLE_VERIFIER], test x"${ENABLE_VERIFIER}" = "xyes")
509 if test x"${ENABLE_VERIFIER}" = "xyes"; then
510 AC_DEFINE([ENABLE_VERIFIER], 1, [enable classfile verification])
514 dnl check for compiler timing
515 AC_MSG_CHECKING(whether real-time timing should be enabled)
516 AC_ARG_ENABLE([rt-timing],
517 [AS_HELP_STRING(--enable-rt-timing,enable real-time timing [[default=no]])],
518 [case "${enableval}" in
519 yes) ENABLE_RT_TIMING=yes;;
520 *) ENABLE_RT_TIMING=no;;
522 [ENABLE_RT_TIMING=no])
523 AC_MSG_RESULT(${ENABLE_RT_TIMING})
524 AM_CONDITIONAL([ENABLE_RT_TIMING], test x"${ENABLE_RT_TIMING}" = "xyes")
526 if test x"${ENABLE_RT_TIMING}" = "xyes"; then
527 AC_DEFINE([ENABLE_RT_TIMING], 1, [enable real-time timing])
531 dnl check for cycle count statistics
532 AC_MSG_CHECKING(whether cycle count statistics should be enabled)
533 AC_ARG_ENABLE([cycles-stats],
534 [AS_HELP_STRING(--enable-cycles-stats,enable cycle count statistics [[default=no]])],
535 [case "${enableval}" in
536 yes) ENABLE_CYCLES_STATS=yes;;
537 *) ENABLE_CYCLES_STATS=no;;
539 [ENABLE_CYCLES_STATS=no])
540 AC_MSG_RESULT(${ENABLE_CYCLES_STATS})
541 AM_CONDITIONAL([ENABLE_CYCLES_STATS], test x"${ENABLE_CYCLES_STATS}" = "xyes")
543 if test x"${ENABLE_CYCLES_STATS}" = "xyes"; then
544 AC_DEFINE([ENABLE_CYCLES_STATS], 1, [enable cycle count statistics])
549 AC_MSG_CHECKING(whether to compile JVMTI support)
550 AC_ARG_ENABLE([jvmti],
551 [AS_HELP_STRING(--enable-jvmti,enable JVMTI [[default=no]])],
552 [case "${enableval}" in
553 yes) ENABLE_JVMTI=yes;;
557 AC_MSG_RESULT(${ENABLE_JVMTI})
558 AM_CONDITIONAL([ENABLE_JVMTI], test x"${ENABLE_JVMTI}" = "xyes")
560 if test x"${ENABLE_JVMTI}" = "xyes"; then
561 AC_DEFINE([ENABLE_JVMTI], 1, [use JVMTI])
565 AC_CHECK_ENABLE_THREADS
568 dnl check if if-conversion should be supported
569 AC_MSG_CHECKING(whether if-conversion should be supported)
570 AC_ARG_ENABLE([ifconv],
571 [AS_HELP_STRING(--disable-ifconv,disable if-conversion [[default=enabled]])],
572 [case "${enableval}" in
573 no) ENABLE_IFCONV=no;;
574 *) ENABLE_IFCONV=yes;;
577 AC_MSG_RESULT(${ENABLE_IFCONV})
578 AM_CONDITIONAL([ENABLE_IFCONV], test x"${ENABLE_IFCONV}" = "xyes")
580 if test x"${ENABLE_IFCONV}" = "xyes"; then
581 AC_DEFINE([ENABLE_IFCONV], 1, [enable if-conversion])
585 dnl check for inlining
586 AC_MSG_CHECKING(whether method inlining should be supported)
587 AC_ARG_ENABLE([inlining],
588 [AS_HELP_STRING(--enable-inlining,enable method inlining [[default=no]])],
589 [case "${enableval}" in
590 yes) ENABLE_INLINING=yes;;
591 *) ENABLE_INLINING=no;;
593 [ENABLE_INLINING=no])
594 AC_MSG_RESULT(${ENABLE_INLINING})
595 AM_CONDITIONAL([ENABLE_INLINING], test x"${ENABLE_INLINING}" = "xyes")
597 if test x"${ENABLE_INLINING}" = "xyes"; then
598 AC_DEFINE([ENABLE_INLINING], 1, [use method inlining])
602 dnl check for inlining debug options
603 AC_MSG_CHECKING(whether method inlining debug options should be enabled)
604 AC_ARG_ENABLE([inlining-debug],
605 [AS_HELP_STRING(--enable-inlining-debug,enable method inlining debug options [[default=no]])],
606 [case "${enableval}" in
607 yes) ENABLE_INLINING_DEBUG=yes;;
608 *) ENABLE_INLINING_DEBUG=no;;
610 [ENABLE_INLINING_DEBUG=no])
611 AC_MSG_RESULT(${ENABLE_INLINING_DEBUG})
612 AM_CONDITIONAL([ENABLE_INLINING_DEBUG], test x"${ENABLE_INLINING_DEBUG}" = "xyes")
614 if test x"${ENABLE_INLINING_DEBUG}" = "xyes"; then
615 AC_DEFINE([ENABLE_INLINING_DEBUG], 1, [enable method inlining debug options])
619 dnl check for replacement
620 AC_MSG_CHECKING(whether on-stack replacement should be supported)
621 AC_ARG_ENABLE([replacement],
622 [AS_HELP_STRING(--enable-replacement,enable on-stack replacement [[default=no]])],
623 [case "${enableval}" in
624 yes) ENABLE_REPLACEMENT=yes;;
625 *) ENABLE_REPLACEMENT=no;;
627 [ENABLE_REPLACEMENT=no])
628 AC_MSG_RESULT(${ENABLE_REPLACEMENT})
629 AM_CONDITIONAL([ENABLE_REPLACEMENT], test x"${ENABLE_REPLACEMENT}" = "xyes")
631 if test x"${ENABLE_REPLACEMENT}" = "xyes"; then
632 AC_DEFINE([ENABLE_REPLACEMENT], 1, [use on-stack replacement])
636 dnl check for loop optimization
637 AC_MSG_CHECKING(whether loop optimization should be supported)
638 AC_ARG_ENABLE([loop],
639 [AS_HELP_STRING(--enable-loop,enable loop optimization [[default=no]])],
640 [case "${enableval}" in
641 yes) ENABLE_LOOP=yes;;
645 AC_MSG_RESULT(${ENABLE_LOOP})
646 AM_CONDITIONAL([ENABLE_LOOP], test x"${ENABLE_LOOP}" = "xyes")
648 if test x"${ENABLE_LOOP}" = "xyes"; then
649 AC_DEFINE([ENABLE_LOOP], 1, [use loop optimization])
653 dnl check if linear scan register allocator(lsra) with SSA should be used
654 AC_MSG_CHECKING(whether lsra with ssa should be supported)
656 [AS_HELP_STRING(--disable-ssa,disable ssa [[default=disabled]])],
657 [case "${enableval}" in
662 AC_MSG_RESULT(${ENABLE_SSA})
663 AM_CONDITIONAL([ENABLE_SSA], test x"${ENABLE_SSA}" = "xyes")
664 AM_CONDITIONAL([ENABLE_ESCAPE], test x"${ENABLE_SSA}" = "xyes")
665 AM_CONDITIONAL([ENABLE_ESCAPE_CHECK], test x"${ENABLE_SSA}" = "xyes")
667 if test x"${ENABLE_SSA}" = "xyes"; then
668 AC_DEFINE([ENABLE_SSA], 1, [enable lsra with ssa])
669 AC_DEFINE([ENABLE_ESCAPE], 1, [enable escape analysis with ssa])
670 AC_DEFINE([ENABLE_ESCAPE_CHECK], 1, [enable generating code to validate escape analysis results])
675 dnl check if linear scan register allocator(lsra) should be used
676 AC_MSG_CHECKING(whether lsra should be supported)
677 AC_ARG_ENABLE([lsra],
678 [AS_HELP_STRING(--enable-lsra,enable linear scan register allocator [[default=no]])],
679 [case "${enableval}" in
680 yes) ENABLE_LSRA=yes;;
685 if test x"${ENABLE_LSRA}" = "xyes"; then
686 if test x"${ENABLE_SSA}" = "xyes"; then
690 AC_MSG_RESULT(${ENABLE_LSRA})
691 AM_CONDITIONAL([ENABLE_LSRA], test x"${ENABLE_LSRA}" = "xyes")
693 if test x"${ENABLE_LSRA}" = "xyes"; then
694 AC_DEFINE([ENABLE_LSRA], 1, [enable lsra])
697 dnl check if profiling should be supported
698 AC_MSG_CHECKING(whether profiling should be supported)
699 AC_ARG_ENABLE([profiling],
700 [AS_HELP_STRING(--enable-profiling,enable profiling [[default=no]])],
701 [case "${enableval}" in
702 yes) ENABLE_PROFILING=yes;;
703 *) ENABLE_PROFILING=no;;
705 [ENABLE_PROFILING=no])
706 AC_MSG_RESULT(${ENABLE_PROFILING})
707 AM_CONDITIONAL([ENABLE_PROFILING], test x"${ENABLE_PROFILING}" = "xyes")
709 if test x"${ENABLE_PROFILING}" = "xyes"; then
710 AC_DEFINE([ENABLE_PROFILING], 1, [enable profiling])
714 dnl check for instruction scheduler
715 AC_ARG_ENABLE([scheduler], [AS_HELP_STRING(--enable-scheduler,enable instruction scheduler [[default=no]])])
717 AC_MSG_CHECKING(whether instruction scheduler should be supported)
718 if test x"${USE_SCHEDULER}" = "x1" -o x"$enable_scheduler" = "xyes"; then
719 case "${ARCH_DIR}" in
723 AC_MSG_ERROR(instruction scheduler is not available for ${ARCH_DIR} code generator)
728 AC_DEFINE([USE_SCHEDULER], 1, [use scheduler])
729 AM_CONDITIONAL([USE_SCHEDULER], [true])
732 AM_CONDITIONAL([USE_SCHEDULER], [false])
738 dnl check for stuff to be built
740 AC_CHECK_ENABLE_LIBJVM
742 dnl ATTENTION: These check must be after setting
743 dnl enable_shared/enable_static (happens in AC_CHECK_ENABLE_LIBJVM),
744 dnl because libtool uses them to build the correct libraries.
748 AC_CHECK_ENABLE_STATICVM
749 AC_CHECK_ENABLE_ANNOTATIONS
750 AC_CHECK_ENABLE_ASSERTION
753 dnl where is CACAO's vm.zip
754 AC_MSG_CHECKING(where CACAO's vm.zip is installed)
755 AC_ARG_WITH([vm-zip],
756 [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]])],
757 [CACAO_VM_ZIP=${withval}],
758 [CACAO_VM_ZIP=${CACAO_PREFIX}/share/cacao/vm.zip])
759 AC_MSG_RESULT(${CACAO_VM_ZIP})
760 AC_DEFINE_UNQUOTED([CACAO_VM_ZIP], "${CACAO_VM_ZIP}", [CACAO's vm.zip])
761 AC_SUBST(CACAO_VM_ZIP)
765 AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY
767 dnl Now we check for jre-layout so we can skip some checks that are
769 AC_CHECK_ENABLE_JRE_LAYOUT
771 AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_PREFIX
772 AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_CLASSES
774 if test x"${ENABLE_JRE_LAYOUT}" = "xno"; then
775 AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_LIBDIR
778 dnl The check for jni_md.h must be before jni.h.
779 AC_CHECK_WITH_JNI_MD_H
782 dnl HPI is only required for OpenJDK
783 case "${WITH_JAVA_RUNTIME_LIBRARY}" in
785 AC_CHECK_WITH_HPI_MD_H
792 dnl check for some programs we need
794 case "${WITH_JAVA_RUNTIME_LIBRARY}" in
795 cldc1.1 | gnuclasspath)
802 AC_MSG_ERROR(unknown classpath configuration ${WITH_JAVA_RUNTIME_LIBRARY})
806 AC_CHECK_WITH_JASMIN_JAR
807 AC_CHECK_WITH_JUNIT_JAR
812 dnl If debug build and regex.h available, enable debug filter
813 if test x"${NDEBUG}" = "xno"; then
814 AC_DEFINE(ENABLE_DEBUG_FILTER, 1, [debug filter])
816 dnl If vmlog enambled and regex.h available, enable vmlogfilter
817 AM_CONDITIONAL([ENABLE_VMLOGFILTER], [test x"${ENABLE_VMLOG}" = "xyes"])
820 AM_CONDITIONAL([ENABLE_VMLOGFILTER], [false])
829 AZ_PYTHON_VERSION_ENSURE( [2.4] )
834 dnl define some stuff required for --fullversion
835 AC_DEFINE_UNQUOTED(VERSION_CONFIGURE_ARGS, "$ac_configure_args", [configure arguments])
836 AC_DEFINE_UNQUOTED(VERSION_CC, "$CC", [CC used])
837 AC_DEFINE_UNQUOTED(VERSION_CFLAGS, "$OPT_CFLAGS $ARCH_CFLAGS $CPPFLAGS", [CFLAGS used])
840 dnl finally pass CFLAGS to Makefiles via AM_CFLAGS
842 AM_CFLAGS=$ARCH_CFLAGS
843 AM_CPPFLAGS="$CPPFLAGS"
845 AC_SUBST(AM_CPPFLAGS)
848 AC_CONFIG_FILES([Makefile]
850 [contrib/setenvinstalled]
851 [contrib/setenvsource]
852 [contrib/vmlog/Makefile]
853 [contrib/vmlog/t/Makefile]
855 [doc/doxygen/Makefile]
856 [doc/handbook/Makefile]
860 [src/cacaoh/Makefile]
861 [src/classes/Makefile]
862 [src/fdlibm/Makefile]
864 [src/mm/cacao-gc/Makefile]
865 [src/native/Makefile]
866 [src/native/include/Makefile]
867 [src/native/jvmti/Makefile]
868 [src/native/vm/Makefile]
869 [src/native/vm/cldc1.1/Makefile]
870 [src/native/vm/gnuclasspath/Makefile]
871 [src/native/vm/openjdk/Makefile]
872 [src/scripts/Makefile]
874 [src/threads/Makefile]
875 [src/threads/none/Makefile]
876 [src/threads/posix/Makefile]
877 [src/toolbox/Makefile]
879 [src/vm/jit/Makefile]
880 [src/vm/jit/allocator/Makefile]
881 [src/vm/jit/alpha/Makefile]
882 [src/vm/jit/alpha/freebsd/Makefile]
883 [src/vm/jit/alpha/linux/Makefile]
884 [src/vm/jit/arm/Makefile]
885 [src/vm/jit/arm/linux/Makefile]
886 [src/vm/jit/i386/Makefile]
887 [src/vm/jit/i386/cygwin/Makefile]
888 [src/vm/jit/i386/darwin/Makefile]
889 [src/vm/jit/i386/freebsd/Makefile]
890 [src/vm/jit/i386/linux/Makefile]
891 [src/vm/jit/intrp/Makefile]
892 [src/vm/jit/inline/Makefile]
893 [src/vm/jit/ir/Makefile]
894 [src/vm/jit/loop/Makefile]
895 [src/vm/jit/m68k/Makefile]
896 [src/vm/jit/m68k/linux/Makefile]
897 [src/vm/jit/mips/Makefile]
898 [src/vm/jit/mips/irix/Makefile]
899 [src/vm/jit/mips/linux/Makefile]
900 [src/vm/jit/mips/uclinux/Makefile]
901 [src/vm/jit/optimizing/Makefile]
902 [src/vm/jit/parisc/Makefile]
903 [src/vm/jit/parisc/linux/Makefile]
904 [src/vm/jit/powerpc/Makefile]
905 [src/vm/jit/powerpc/darwin/Makefile]
906 [src/vm/jit/powerpc/linux/Makefile]
907 [src/vm/jit/powerpc/netbsd/Makefile]
908 [src/vm/jit/powerpc64/Makefile]
909 [src/vm/jit/powerpc64/linux/Makefile]
910 [src/vm/jit/s390/Makefile]
911 [src/vm/jit/schedule/Makefile]
912 [src/vm/jit/sparc64/Makefile]
913 [src/vm/jit/sparc64/linux/Makefile]
914 [src/vm/jit/sparc64/solaris/Makefile]
915 [src/vm/jit/verify/Makefile]
916 [src/vm/jit/x86_64/Makefile]
917 [src/vm/jit/x86_64/freebsd/Makefile]
918 [src/vm/jit/x86_64/linux/Makefile]
919 [src/vmcore/Makefile]
921 [tests/regression/Makefile]
922 [tests/regression/assertion/Makefile]
923 [tests/regression/base/Makefile]
924 [tests/regression/bugzilla/Makefile]
925 [tests/regression/jasmin/Makefile]
926 [tests/regression/native/Makefile]
927 [tests/regression/resolving/Makefile]
928 [tests/regression/resolving/classes1/Makefile]
929 [tests/regression/resolving/classes2/Makefile]
930 [tests/regression/resolving/classes3/Makefile]
934 dnl now configure subpackages with OPT_CFLAGS and ARCH_CFLAGS
937 dnl We only build the shared library objects but we use it as
938 dnl noinst_LTLIBRARIES
939 ac_configure_args="$ac_configure_args --disable-static"
940 AC_CONFIG_SUBDIRS(src/mm/boehm-gc)
948 ## indent-tabs-mode: t
951 ## compile-command: "automake --add-missing"