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.99rc6, cacao@cacaojvm.org)
27 AC_CONFIG_SRCDIR(src/cacao/cacao.c)
30 AM_INIT_AUTOMAKE([1.9.0 dist-bzip2])
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__ -ansi -pedantic -Wall -Wno-long-long"
137 INTRP_CFLAGS="$ARCH_CFLAGS -D__DARWIN__ -Wall -Wno-long-long"
138 ARCH_CFLAGS="$ARCH_CFLAGS -D__DARWIN__ -ansi -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__ -ansi -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=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
156 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"
159 dnl must be before *linux*
162 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"
163 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"
168 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"
169 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"
174 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"
175 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"
180 dnl on solaris the architecture defines 'sparc','sun','unix' are not set when cpp is called with -ansi
181 dnl therefore we add them here
182 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"
183 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"
191 dnl temporary set the CFLAGS for configure tests (e.g. inline keyword)
192 dnl we set it properly at the end of this file
193 CFLAGS="$ARCH_CFLAGS $OPT_CFLAGS"
195 dnl set interpreter flags
196 AC_SUBST(INTRP_CFLAGS)
198 dnl define and substitute some architecture specific variables
199 AC_DEFINE_UNQUOTED([ARCH_DIR], "${ARCH_DIR}", [architecture directory])
200 AC_DEFINE_UNQUOTED([JAVA_ARCH], "${JAVA_ARCH}", [Java architecture name])
203 AC_SUBST(USE_SCHEDULER)
206 dnl Checks for programs.
216 dnl Checks for header files.
220 dnl keep them alpha-sorted!
221 AC_CHECK_HEADERS([assert.h])
222 AC_CHECK_HEADERS([errno.h])
223 AC_CHECK_HEADERS([fcntl.h])
224 AC_CHECK_HEADERS([libgen.h])
225 AC_CHECK_HEADERS([netdb.h])
226 AC_CHECK_HEADERS([stdint.h])
227 AC_CHECK_HEADERS([stdio.h])
228 AC_CHECK_HEADERS([stdlib.h])
229 AC_CHECK_HEADERS([string.h])
230 AC_CHECK_HEADERS([time.h])
231 AC_CHECK_HEADERS([ucontext.h])
232 AC_CHECK_HEADERS([unistd.h])
233 AC_CHECK_HEADERS([sys/ioctl.h])
234 AC_CHECK_HEADERS([sys/mman.h])
235 AC_CHECK_HEADERS([sys/resource.h])
236 AC_CHECK_HEADERS([sys/select.h])
237 AC_CHECK_HEADERS([sys/socket.h])
238 AC_CHECK_HEADERS([sys/stat.h])
239 AC_CHECK_HEADERS([sys/time.h])
240 AC_CHECK_HEADERS([sys/types.h])
242 dnl this is for fdlibm
243 AC_CHECK_HEADERS([inttypes.h])
244 AC_CHECK_HEADERS([sys/config.h])
245 AC_CHECK_HEADERS([sys/types.h])
246 AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
247 AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
248 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]))
249 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]))
251 dnl Checks for typedefs, structures, and compiler characteristics.
260 dnl Checks for libraries (NOTE: Should be done before function checks,
261 dnl as some functions may be in libraries we check for).
263 dnl Checks for library functions.
264 AC_PROG_GCC_TRADITIONAL
269 dnl keep them alpha-sorted!
270 AC_CHECK_FUNCS([abort])
271 AC_CHECK_FUNCS([accept])
272 AC_CHECK_FUNCS([access])
273 AC_CHECK_FUNCS([atoi])
274 AC_CHECK_FUNCS([atol])
275 AC_CHECK_FUNCS([calloc])
276 AC_CHECK_FUNCS([close])
277 AC_CHECK_FUNCS([confstr])
278 AC_CHECK_FUNCS([connect])
279 AC_CHECK_FUNCS([dirname])
280 AC_CHECK_FUNCS([fclose])
281 AC_CHECK_FUNCS([fflush])
282 AC_CHECK_FUNCS([fopen])
283 AC_CHECK_FUNCS([fprintf])
284 AC_CHECK_FUNCS([fread])
285 AC_CHECK_FUNCS([free])
286 AC_CHECK_FUNCS([fstat])
287 AC_CHECK_FUNCS([fsync])
288 AC_CHECK_FUNCS([ftruncate])
289 AC_CHECK_FUNCS([getcwd])
290 AC_CHECK_FUNCS([gethostbyname])
291 AC_CHECK_FUNCS([gethostname])
292 AC_CHECK_FUNCS([getpagesize])
293 AC_CHECK_FUNCS([getrusage])
294 AC_CHECK_FUNCS([getsockname])
295 AC_CHECK_FUNCS([getsockopt])
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([memcpy])
306 AC_CHECK_FUNCS([memset])
307 AC_CHECK_FUNCS([mmap])
308 AC_CHECK_FUNCS([mprotect])
309 AC_CHECK_FUNCS([open])
310 AC_CHECK_FUNCS([read])
311 AC_CHECK_FUNCS([readlink])
312 AC_CHECK_FUNCS([realloc])
313 AC_CHECK_FUNCS([recv])
314 AC_CHECK_FUNCS([scandir])
315 AC_CHECK_FUNCS([select])
316 AC_CHECK_FUNCS([send])
317 AC_CHECK_FUNCS([setsockopt])
318 AC_CHECK_FUNCS([shutdown])
319 AC_CHECK_FUNCS([socket])
320 AC_CHECK_FUNCS([stat])
321 AC_CHECK_FUNCS([strcat])
322 AC_CHECK_FUNCS([strchr])
323 AC_CHECK_FUNCS([strcpy])
324 AC_CHECK_FUNCS([strdup])
325 AC_CHECK_FUNCS([strerror])
326 AC_CHECK_FUNCS([strlen])
327 AC_CHECK_FUNCS([strncmp])
328 AC_CHECK_FUNCS([strstr])
329 AC_CHECK_FUNCS([time])
330 AC_CHECK_FUNCS([write])
333 dnl Checks for libraries.
335 dnl Checking sizeof void *
336 AC_CHECK_SIZEOF(void *)
340 dnl define install prefix
341 if test "x$prefix" = "xNONE"; then
342 CACAO_PREFIX=$ac_default_prefix
346 AC_DEFINE_UNQUOTED([CACAO_PREFIX], "${CACAO_PREFIX}", [installation prefix])
347 AC_SUBST(CACAO_PREFIX)
349 dnl define libdir prefix
350 if test "x$libdir" = "xNONE"; then
351 CACAO_LIBDIR=$ac_default_libdir
355 dnl expand CACAO_LIBDIR to something that is usable in C code
356 AS_AC_EXPAND([CACAO_LIBDIR], ${CACAO_LIBDIR})
357 AC_DEFINE_UNQUOTED([CACAO_LIBDIR], "${CACAO_LIBDIR}", [library installation prefix])
358 AC_SUBST(CACAO_LIBDIR)
365 AC_CHECK_ENABLE_INTRP
367 if test x"${ENABLE_JIT}" = "xno" -a x"${ENABLE_INTRP}" = "xno"; then
368 AC_ERROR(You have to enable at least the JIT or the interpreter.)
372 AC_CHECK_SOFT_FLOAT_CMP
373 AC_CHECK_SOFT_DOUBLE_CMP
376 AC_CHECK_ENABLE_DEBUG
380 dnl check for memcheck support
381 AC_MSG_CHECKING(whether debugging memory checks should be enabled)
382 AC_ARG_ENABLE([memcheck],
383 [AS_HELP_STRING(--enable-memcheck,enable debugging memory checks [[default=no]])],
384 [case "${enableval}" in
385 yes) ENABLE_MEMCHECK=yes;;
386 *) ENABLE_MEMCHECK=no;;
388 [ENABLE_MEMCHECK=no])
389 AC_MSG_RESULT(${ENABLE_MEMCHECK})
390 AM_CONDITIONAL([ENABLE_MEMCHECK], test x"${ENABLE_MEMCHECK}" = "xyes")
392 if test x"${ENABLE_MEMCHECK}" = "xyes"; then
393 AC_DEFINE([ENABLE_MEMCHECK], 1, [perform debugging memory checks])
397 dnl check for handles (indirection cells) support
398 AC_MSG_CHECKING(whether handles (indirection cells) should be enabled)
399 AC_ARG_ENABLE([handles],
400 [AS_HELP_STRING(--enable-handles,enable handles (indirection cells) [[default=no]])],
401 [case "${enableval}" in
402 yes) ENABLE_HANDLES=yes;;
403 *) ENABLE_HANDLES=no;;
406 AC_MSG_RESULT(${ENABLE_HANDLES})
407 AM_CONDITIONAL([ENABLE_HANDLES], test x"${ENABLE_HANDLES}" = "xyes")
409 if test x"${ENABLE_HANDLES}" = "xyes"; then
410 AC_DEFINE([ENABLE_HANDLES], 1, [enable handles (indirection cells)])
414 dnl check for vmlog support
415 AC_MSG_CHECKING(whether vmlog tracing should be enabled)
416 AC_ARG_ENABLE([vmlog],
417 [AS_HELP_STRING(--enable-vmlog,enable vmlog tracing [[default=no]])],
418 [case "${enableval}" in
419 yes) ENABLE_VMLOG=yes;;
423 AC_MSG_RESULT(${ENABLE_VMLOG})
424 AM_CONDITIONAL([ENABLE_VMLOG], test x"${ENABLE_VMLOG}" = "xyes")
426 if test x"${ENABLE_VMLOG}" = "xyes"; then
427 AC_DEFINE([ENABLE_VMLOG], 1, [enable vmlog tracing code])
431 dnl check for disassembler support
432 AC_MSG_CHECKING(whether disassembler should be enabled)
433 AC_ARG_ENABLE([disassembler],
434 [AS_HELP_STRING(--enable-disassembler,enable disassembler [[default=no]])],
435 [case "${enableval}" in
436 yes) ENABLE_DISASSEMBLER=yes;;
437 *) ENABLE_DISASSEMBLER=no;;
439 [ENABLE_DISASSEMBLER=no])
440 AC_MSG_RESULT(${ENABLE_DISASSEMBLER})
441 AM_CONDITIONAL([ENABLE_DISASSEMBLER], test x"${ENABLE_DISASSEMBLER}" = "xyes")
443 if test x"${ENABLE_DISASSEMBLER}" = "xyes"; then
444 AC_DEFINE([ENABLE_DISASSEMBLER], 1, [enable disassembler])
446 dnl check for binutils headers and libraries on some architectures for the
448 case "${ARCH_DIR}" in
449 arm | i386 | powerpc | x86_64 | sparc64 | powerpc64 | s390 | m68k)
450 AC_CHECK_HEADER([ansidecl.h],, [AC_MSG_ERROR(cannot find ansidecl.h)])
451 AC_CHECK_HEADER([symcat.h],, [AC_MSG_ERROR(cannot find symcat.h)])
452 AC_CHECK_HEADER([bfd.h],, [AC_MSG_ERROR(cannot find bfd.h)])
453 AC_CHECK_HEADER([dis-asm.h],, [AC_MSG_ERROR(cannot find dis-asm.h)])
456 cygwin | darwin | netbsd | solaris)
457 AC_CHECK_LIB(intl, dcgettext,, [AC_MSG_ERROR(cannot find libintl (from binutils))])
463 AC_CHECK_LIB(rt, sem_init,, [AC_MSG_ERROR(cannot find librt)])
468 AC_CHECK_LIB(iberty, xstrerror,, [AC_MSG_ERROR(cannot find libiberty (from binutils))])
469 AC_CHECK_LIB(bfd, bfd_get_arch,, [AC_MSG_ERROR(cannot find libbfd (from binutils))])
470 AC_CHECK_LIB(opcodes, disassembler,, [AC_MSG_ERROR(cannot find libopcodes (from binutils))])
471 AC_DEFINE([WITH_BINUTILS_DISASSEMBLER], 1, [use binutils disassembler])
472 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [true])
475 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
479 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
483 dnl check for statistics
484 AC_MSG_CHECKING(whether statistics generation should be enabled)
485 AC_ARG_ENABLE([statistics],
486 [AS_HELP_STRING(--enable-statistics,enable statistics generation [[default=no]])],
487 [case "${enableval}" in
488 yes) ENABLE_STATISTICS=yes;;
489 *) ENABLE_STATISTICS=no;;
491 [ENABLE_STATISTICS=no])
492 AC_MSG_RESULT(${ENABLE_STATISTICS})
493 AM_CONDITIONAL([ENABLE_STATISTICS], test x"${ENABLE_STATISTICS}" = "xyes")
495 if test x"${ENABLE_STATISTICS}" = "xyes"; then
496 AC_DEFINE([ENABLE_STATISTICS], 1, [enable statistics])
500 dnl check for verifier
501 AC_MSG_CHECKING(whether classfile verification should be enabled)
502 AC_ARG_ENABLE([verifier],
503 [AS_HELP_STRING(--disable-verifier,disable classfile verification [[default=enabled]])],
504 [case "${enableval}" in
505 no) ENABLE_VERIFIER=no;;
506 *) ENABLE_VERIFIER=yes;;
508 [ENABLE_VERIFIER=yes])
509 AC_MSG_RESULT(${ENABLE_VERIFIER})
510 AM_CONDITIONAL([ENABLE_VERIFIER], test x"${ENABLE_VERIFIER}" = "xyes")
512 if test x"${ENABLE_VERIFIER}" = "xyes"; then
513 AC_DEFINE([ENABLE_VERIFIER], 1, [enable classfile verification])
517 dnl check for compiler timing
518 AC_MSG_CHECKING(whether real-time timing should be enabled)
519 AC_ARG_ENABLE([rt-timing],
520 [AS_HELP_STRING(--enable-rt-timing,enable real-time timing [[default=no]])],
521 [case "${enableval}" in
522 yes) ENABLE_RT_TIMING=yes;;
523 *) ENABLE_RT_TIMING=no;;
525 [ENABLE_RT_TIMING=no])
526 AC_MSG_RESULT(${ENABLE_RT_TIMING})
527 AM_CONDITIONAL([ENABLE_RT_TIMING], test x"${ENABLE_RT_TIMING}" = "xyes")
529 if test x"${ENABLE_RT_TIMING}" = "xyes"; then
530 AC_DEFINE([ENABLE_RT_TIMING], 1, [enable real-time timing])
534 dnl check for cycle count statistics
535 AC_MSG_CHECKING(whether cycle count statistics should be enabled)
536 AC_ARG_ENABLE([cycles-stats],
537 [AS_HELP_STRING(--enable-cycles-stats,enable cycle count statistics [[default=no]])],
538 [case "${enableval}" in
539 yes) ENABLE_CYCLES_STATS=yes;;
540 *) ENABLE_CYCLES_STATS=no;;
542 [ENABLE_CYCLES_STATS=no])
543 AC_MSG_RESULT(${ENABLE_CYCLES_STATS})
544 AM_CONDITIONAL([ENABLE_CYCLES_STATS], test x"${ENABLE_CYCLES_STATS}" = "xyes")
546 if test x"${ENABLE_CYCLES_STATS}" = "xyes"; then
547 AC_DEFINE([ENABLE_CYCLES_STATS], 1, [enable cycle count statistics])
552 AC_MSG_CHECKING(whether to compile JVMTI support)
553 AC_ARG_ENABLE([jvmti],
554 [AS_HELP_STRING(--enable-jvmti,enable JVMTI [[default=no]])],
555 [case "${enableval}" in
556 yes) ENABLE_JVMTI=yes;;
560 AC_MSG_RESULT(${ENABLE_JVMTI})
561 AM_CONDITIONAL([ENABLE_JVMTI], test x"${ENABLE_JVMTI}" = "xyes")
563 if test x"${ENABLE_JVMTI}" = "xyes"; then
564 AC_DEFINE([ENABLE_JVMTI], 1, [use JVMTI])
568 AC_CHECK_ENABLE_THREADS
571 dnl check if if-conversion should be supported
572 AC_MSG_CHECKING(whether if-conversion should be supported)
573 AC_ARG_ENABLE([ifconv],
574 [AS_HELP_STRING(--disable-ifconv,disable if-conversion [[default=enabled]])],
575 [case "${enableval}" in
576 no) ENABLE_IFCONV=no;;
577 *) ENABLE_IFCONV=yes;;
580 AC_MSG_RESULT(${ENABLE_IFCONV})
581 AM_CONDITIONAL([ENABLE_IFCONV], test x"${ENABLE_IFCONV}" = "xyes")
583 if test x"${ENABLE_IFCONV}" = "xyes"; then
584 AC_DEFINE([ENABLE_IFCONV], 1, [enable if-conversion])
588 dnl check for inlining
589 AC_MSG_CHECKING(whether method inlining should be supported)
590 AC_ARG_ENABLE([inlining],
591 [AS_HELP_STRING(--enable-inlining,enable method inlining [[default=no]])],
592 [case "${enableval}" in
593 yes) ENABLE_INLINING=yes;;
594 *) ENABLE_INLINING=no;;
596 [ENABLE_INLINING=no])
597 AC_MSG_RESULT(${ENABLE_INLINING})
598 AM_CONDITIONAL([ENABLE_INLINING], test x"${ENABLE_INLINING}" = "xyes")
600 if test x"${ENABLE_INLINING}" = "xyes"; then
601 AC_DEFINE([ENABLE_INLINING], 1, [use method inlining])
605 dnl check for inlining debug options
606 AC_MSG_CHECKING(whether method inlining debug options should be enabled)
607 AC_ARG_ENABLE([inlining-debug],
608 [AS_HELP_STRING(--enable-inlining-debug,enable method inlining debug options [[default=no]])],
609 [case "${enableval}" in
610 yes) ENABLE_INLINING_DEBUG=yes;;
611 *) ENABLE_INLINING_DEBUG=no;;
613 [ENABLE_INLINING_DEBUG=no])
614 AC_MSG_RESULT(${ENABLE_INLINING_DEBUG})
615 AM_CONDITIONAL([ENABLE_INLINING_DEBUG], test x"${ENABLE_INLINING_DEBUG}" = "xyes")
617 if test x"${ENABLE_INLINING_DEBUG}" = "xyes"; then
618 AC_DEFINE([ENABLE_INLINING_DEBUG], 1, [enable method inlining debug options])
622 dnl check for replacement
623 AC_MSG_CHECKING(whether on-stack replacement should be supported)
624 AC_ARG_ENABLE([replacement],
625 [AS_HELP_STRING(--enable-replacement,enable on-stack replacement [[default=no]])],
626 [case "${enableval}" in
627 yes) ENABLE_REPLACEMENT=yes;;
628 *) ENABLE_REPLACEMENT=no;;
630 [ENABLE_REPLACEMENT=no])
631 AC_MSG_RESULT(${ENABLE_REPLACEMENT})
632 AM_CONDITIONAL([ENABLE_REPLACEMENT], test x"${ENABLE_REPLACEMENT}" = "xyes")
634 if test x"${ENABLE_REPLACEMENT}" = "xyes"; then
635 AC_DEFINE([ENABLE_REPLACEMENT], 1, [use on-stack replacement])
639 dnl check for loop optimization
640 AC_MSG_CHECKING(whether loop optimization should be supported)
641 AC_ARG_ENABLE([loop],
642 [AS_HELP_STRING(--enable-loop,enable loop optimization [[default=no]])],
643 [case "${enableval}" in
644 yes) ENABLE_LOOP=yes;;
648 AC_MSG_RESULT(${ENABLE_LOOP})
649 AM_CONDITIONAL([ENABLE_LOOP], test x"${ENABLE_LOOP}" = "xyes")
651 if test x"${ENABLE_LOOP}" = "xyes"; then
652 AC_DEFINE([ENABLE_LOOP], 1, [use loop optimization])
656 dnl check if linear scan register allocator(lsra) with SSA should be used
657 AC_MSG_CHECKING(whether lsra with ssa should be supported)
659 [AS_HELP_STRING(--disable-ssa,disable ssa [[default=disabled]])],
660 [case "${enableval}" in
665 AC_MSG_RESULT(${ENABLE_SSA})
666 AM_CONDITIONAL([ENABLE_SSA], test x"${ENABLE_SSA}" = "xyes")
667 AM_CONDITIONAL([ENABLE_ESCAPE], test x"${ENABLE_SSA}" = "xyes")
668 AM_CONDITIONAL([ENABLE_ESCAPE_CHECK], test x"${ENABLE_SSA}" = "xyes")
670 if test x"${ENABLE_SSA}" = "xyes"; then
671 AC_DEFINE([ENABLE_SSA], 1, [enable lsra with ssa])
672 AC_DEFINE([ENABLE_ESCAPE], 1, [enable escape analysis with ssa])
673 AC_DEFINE([ENABLE_ESCAPE_CHECK], 1, [enable generating code to validate escape analysis results])
678 dnl check if linear scan register allocator(lsra) should be used
679 AC_MSG_CHECKING(whether lsra should be supported)
680 AC_ARG_ENABLE([lsra],
681 [AS_HELP_STRING(--enable-lsra,enable linear scan register allocator [[default=no]])],
682 [case "${enableval}" in
683 yes) ENABLE_LSRA=yes;;
688 if test x"${ENABLE_LSRA}" = "xyes"; then
689 if test x"${ENABLE_SSA}" = "xyes"; then
693 AC_MSG_RESULT(${ENABLE_LSRA})
694 AM_CONDITIONAL([ENABLE_LSRA], test x"${ENABLE_LSRA}" = "xyes")
696 if test x"${ENABLE_LSRA}" = "xyes"; then
697 AC_DEFINE([ENABLE_LSRA], 1, [enable lsra])
700 dnl check if profiling should be supported
701 AC_MSG_CHECKING(whether profiling should be supported)
702 AC_ARG_ENABLE([profiling],
703 [AS_HELP_STRING(--enable-profiling,enable profiling [[default=no]])],
704 [case "${enableval}" in
705 yes) ENABLE_PROFILING=yes;;
706 *) ENABLE_PROFILING=no;;
708 [ENABLE_PROFILING=no])
709 AC_MSG_RESULT(${ENABLE_PROFILING})
710 AM_CONDITIONAL([ENABLE_PROFILING], test x"${ENABLE_PROFILING}" = "xyes")
712 if test x"${ENABLE_PROFILING}" = "xyes"; then
713 AC_DEFINE([ENABLE_PROFILING], 1, [enable profiling])
717 dnl check for instruction scheduler
718 AC_ARG_ENABLE([scheduler], [AS_HELP_STRING(--enable-scheduler,enable instruction scheduler [[default=no]])])
720 AC_MSG_CHECKING(whether instruction scheduler should be supported)
721 if test x"${USE_SCHEDULER}" = "x1" -o x"$enable_scheduler" = "xyes"; then
722 case "${ARCH_DIR}" in
726 AC_MSG_ERROR(instruction scheduler is not available for ${ARCH_DIR} code generator)
731 AC_DEFINE([USE_SCHEDULER], 1, [use scheduler])
732 AM_CONDITIONAL([USE_SCHEDULER], [true])
735 AM_CONDITIONAL([USE_SCHEDULER], [false])
741 dnl check for stuff to be built
743 AC_CHECK_ENABLE_LIBJVM
745 dnl ATTENTION: These check must be after setting
746 dnl enable_shared/enable_static (happens in AC_CHECK_ENABLE_LIBJVM),
747 dnl because libtool uses them to build the correct libraries.
751 AC_CHECK_ENABLE_STATICVM
752 AC_CHECK_ENABLE_ANNOTATIONS
753 AC_CHECK_ENABLE_ASSERTION
756 dnl where is CACAO's vm.zip
757 AC_MSG_CHECKING(where CACAO's vm.zip is installed)
758 AC_ARG_WITH([vm-zip],
759 [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]])],
760 [CACAO_VM_ZIP=${withval}],
761 [CACAO_VM_ZIP=${CACAO_PREFIX}/share/cacao/vm.zip])
762 AC_MSG_RESULT(${CACAO_VM_ZIP})
763 AC_DEFINE_UNQUOTED([CACAO_VM_ZIP], "${CACAO_VM_ZIP}", [CACAO's vm.zip])
764 AC_SUBST(CACAO_VM_ZIP)
768 AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY
770 dnl Now we check for jre-layout so we can skip some checks that are
772 AC_CHECK_ENABLE_JRE_LAYOUT
774 AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_PREFIX
775 AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_CLASSES
777 if test x"${ENABLE_JRE_LAYOUT}" = "xno"; then
778 AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY_LIBDIR
781 dnl The check for jni_md.h must be before jni.h.
782 AC_CHECK_WITH_JNI_MD_H
785 dnl HPI is only required for OpenJDK
786 case "${WITH_JAVA_RUNTIME_LIBRARY}" in
788 AC_CHECK_WITH_HPI_MD_H
795 dnl check for some programs we need
797 case "${WITH_JAVA_RUNTIME_LIBRARY}" in
798 cldc1.1 | gnuclasspath)
805 AC_MSG_ERROR(unknown classpath configuration ${WITH_JAVA_RUNTIME_LIBRARY})
813 dnl If debug build and regex.h available, enable debug filter
814 if test x"${NDEBUG}" = "xno"; then
815 AC_DEFINE(ENABLE_DEBUG_FILTER, 1, [debug filter])
817 dnl If vmlog enambled and regex.h available, enable vmlogfilter
818 AM_CONDITIONAL([ENABLE_VMLOGFILTER], [test x"${ENABLE_VMLOG}" = "xyes"])
821 AM_CONDITIONAL([ENABLE_VMLOGFILTER], [false])
830 AZ_PYTHON_VERSION_ENSURE( [2.4] )
835 dnl define some stuff required for --fullversion
836 AC_DEFINE_UNQUOTED(VERSION_CONFIGURE_ARGS, "$ac_configure_args", [configure arguments])
837 AC_DEFINE_UNQUOTED(VERSION_CC, "$CC", [CC used])
838 AC_DEFINE_UNQUOTED(VERSION_CFLAGS, "$OPT_CFLAGS $ARCH_CFLAGS $CPPFLAGS", [CFLAGS used])
841 dnl finally pass CFLAGS to Makefiles via AM_CFLAGS
843 AM_CFLAGS=$ARCH_CFLAGS
844 AM_CPPFLAGS="$CPPFLAGS"
846 AC_SUBST(AM_CPPFLAGS)
849 AC_CONFIG_FILES([Makefile]
851 [contrib/setenvinstalled]
852 [contrib/setenvsource]
853 [contrib/vmlog/Makefile]
854 [contrib/vmlog/t/Makefile]
856 [doc/doxygen/Makefile]
857 [doc/handbook/Makefile]
861 [src/cacaoh/Makefile]
862 [src/classes/Makefile]
863 [src/fdlibm/Makefile]
865 [src/mm/cacao-gc/Makefile]
866 [src/native/Makefile]
867 [src/native/include/Makefile]
868 [src/native/jvmti/Makefile]
869 [src/native/vm/Makefile]
870 [src/native/vm/cldc1.1/Makefile]
871 [src/native/vm/gnuclasspath/Makefile]
872 [src/native/vm/openjdk/Makefile]
873 [src/scripts/Makefile]
875 [src/threads/Makefile]
876 [src/threads/none/Makefile]
877 [src/threads/posix/Makefile]
878 [src/toolbox/Makefile]
880 [src/vm/jit/Makefile]
881 [src/vm/jit/allocator/Makefile]
882 [src/vm/jit/alpha/Makefile]
883 [src/vm/jit/alpha/freebsd/Makefile]
884 [src/vm/jit/alpha/linux/Makefile]
885 [src/vm/jit/arm/Makefile]
886 [src/vm/jit/arm/linux/Makefile]
887 [src/vm/jit/i386/Makefile]
888 [src/vm/jit/i386/cygwin/Makefile]
889 [src/vm/jit/i386/darwin/Makefile]
890 [src/vm/jit/i386/freebsd/Makefile]
891 [src/vm/jit/i386/linux/Makefile]
892 [src/vm/jit/intrp/Makefile]
893 [src/vm/jit/inline/Makefile]
894 [src/vm/jit/ir/Makefile]
895 [src/vm/jit/loop/Makefile]
896 [src/vm/jit/m68k/Makefile]
897 [src/vm/jit/m68k/linux/Makefile]
898 [src/vm/jit/mips/Makefile]
899 [src/vm/jit/mips/irix/Makefile]
900 [src/vm/jit/mips/linux/Makefile]
901 [src/vm/jit/mips/uclinux/Makefile]
902 [src/vm/jit/optimizing/Makefile]
903 [src/vm/jit/parisc/Makefile]
904 [src/vm/jit/parisc/linux/Makefile]
905 [src/vm/jit/powerpc/Makefile]
906 [src/vm/jit/powerpc/darwin/Makefile]
907 [src/vm/jit/powerpc/linux/Makefile]
908 [src/vm/jit/powerpc/netbsd/Makefile]
909 [src/vm/jit/powerpc64/Makefile]
910 [src/vm/jit/powerpc64/linux/Makefile]
911 [src/vm/jit/s390/Makefile]
912 [src/vm/jit/schedule/Makefile]
913 [src/vm/jit/sparc64/Makefile]
914 [src/vm/jit/sparc64/linux/Makefile]
915 [src/vm/jit/sparc64/solaris/Makefile]
916 [src/vm/jit/verify/Makefile]
917 [src/vm/jit/x86_64/Makefile]
918 [src/vm/jit/x86_64/freebsd/Makefile]
919 [src/vm/jit/x86_64/linux/Makefile]
920 [src/vmcore/Makefile]
922 [tests/regression/Makefile]
923 [tests/regression/bugzilla/Makefile]
924 [tests/regression/assertion/Makefile]
925 [tests/regression/jasmin/Makefile]
926 [tests/regression/junit/Makefile]
927 [tests/regression/native/Makefile]
928 [tests/regression/resolving/Makefile]
929 [tests/regression/resolving/classes1/Makefile]
930 [tests/regression/resolving/classes2/Makefile]
931 [tests/regression/resolving/classes3/Makefile]
935 dnl now configure subpackages with OPT_CFLAGS and ARCH_CFLAGS
938 dnl We only build the shared library objects but we use it as
939 dnl noinst_LTLIBRARIES
940 ac_configure_args="$ac_configure_args --disable-static"
941 AC_CONFIG_SUBDIRS(src/mm/boehm-gc)
949 ## indent-tabs-mode: t
952 ## compile-command: "automake --add-missing"