1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(cacao, 0.96+svn, cacao@cacaojvm.org)
4 AC_CONFIG_SRCDIR(src/cacao/cacao.c)
7 AM_INIT_AUTOMAKE([1.9.0])
10 AM_CONFIG_HEADER([config.h])
12 AC_PREFIX_DEFAULT(/usr/local/cacao)
15 dnl set optimization and debugging for all architectures and systems
16 if test x"$CFLAGS" = "x"; then
22 alpha | alphaev56 | alphapca56 )
24 CFLAGS="$CFLAGS -mieee -D__ALPHA__"
27 arm | armv4tl | armv5b | armv5l )
29 CFLAGS="$CFLAGS -D__ARM__"
32 i386 | i486 | i586 | i686 )
34 CFLAGS="$CFLAGS -D__I386__"
39 CFLAGS="$CFLAGS -D__MIPS__"
44 CFLAGS="$CFLAGS -D__POWERPC__"
49 CFLAGS="$CFLAGS -D__POWERPC64__"
54 CFLAGS="$CFLAGS -D__X86_64__"
60 CFLAGS="$CFLAGS -D__XDSPCORE__"
65 AC_MSG_ERROR($host_cpu systems are not supported at this time)
73 INTRP_CFLAGS="$CFLAGS -D__DARWIN__ -Wall -Wno-long-long"
74 CFLAGS="$CFLAGS -D__DARWIN__ -ansi -pedantic -Wall -Wno-long-long"
79 INTRP_CFLAGS="$CFLAGS -D__FREEBSD__ -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
80 CFLAGS="$CFLAGS -D__FREEBSD__ -ansi -pedantic -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
85 INTRP_CFLAGS="$CFLAGS -D__IRIX__"
86 CFLAGS="$CFLAGS -D__IRIX__"
91 INTRP_CFLAGS="$CFLAGS -D__LINUX__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
92 CFLAGS="$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"
97 INTRP_CFLAGS="$CFLAGS -D__NETBSD__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
98 CFLAGS="$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"
106 dnl define some stuff required for --fullversion
107 AC_DEFINE_UNQUOTED(VERSION_CONFIGURE_ARGS, "$ac_configure_args", [configure arguments])
108 AC_DEFINE_UNQUOTED(VERSION_CC, "$CC", [CC used])
109 AC_DEFINE_UNQUOTED(VERSION_CFLAGS, "$CFLAGS", [CFLAGS used])
112 dnl define and substitute some architecture specific variables
113 AC_DEFINE_UNQUOTED([ARCH_DIR], "${ARCH_DIR}", [architecture directory])
116 AC_SUBST(INTRP_CFLAGS)
117 AC_SUBST(USE_SCHEDULER)
120 dnl Checks for programs.
130 dnl Checks for header files.
133 AC_CHECK_HEADERS([fcntl.h])
134 AC_CHECK_HEADERS([sys/time.h])
135 AC_CHECK_HEADERS([unistd.h])
136 AC_CHECK_HEADERS([sys/ioctl.h])
138 dnl this is for fdlibm
139 AC_CHECK_HEADERS([stdint.h])
140 AC_CHECK_HEADERS([inttypes.h])
141 AC_CHECK_HEADERS([sys/config.h])
142 AC_CHECK_HEADERS([sys/types.h])
143 AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
144 AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
145 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]))
146 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]))
148 dnl Checks for typedefs, structures, and compiler characteristics.
157 dnl Checks for library functions.
158 AC_PROG_GCC_TRADITIONAL
161 AC_CHECK_FUNCS([calloc mprotect getpagesize free])
162 AC_CHECK_FUNCS([getcwd gettimeofday])
163 AC_CHECK_FUNCS([scandir])
164 AC_CHECK_FUNCS([mmap])
165 AC_CHECK_FUNCS([isnan])
167 dnl Checks for libraries.
169 dnl Checking sizeof void *
170 AC_CHECK_SIZEOF(void *)
174 dnl define install prefix
175 if test "x$prefix" = "xNONE"; then
176 CACAO_PREFIX=$ac_default_prefix
180 AC_DEFINE_UNQUOTED([CACAO_PREFIX], "${CACAO_PREFIX}", [installation prefix])
181 AC_SUBST(CACAO_PREFIX)
188 dnl check for JIT compiler
189 AC_MSG_CHECKING(whether JIT compiler should be compiled)
191 [AS_HELP_STRING(--disable-jit,disable JIT compiler [[default=yes]])],
192 [case "${enableval}" in
197 AC_MSG_RESULT(${ENABLE_JIT})
198 AM_CONDITIONAL([ENABLE_JIT], test x"${ENABLE_JIT}" = "xyes")
200 if test x"${ENABLE_JIT}" = "xyes"; then
201 AC_DEFINE([ENABLE_JIT], 1, [enable JIT compiler])
205 dnl check if softfloat should be used
206 AC_MSG_CHECKING(whether softfloat should be used)
207 AC_ARG_ENABLE([softfloat],
208 [AS_HELP_STRING(--enable-softfloat,use softfloat [[default=no]])],
209 [case "${enableval}" in
210 yes) ENABLE_SOFTFLOAT=yes;;
211 *) ENABLE_SOFTFLOAT=no;;
213 [ENABLE_SOFTFLOAT=no])
214 AC_MSG_RESULT(${ENABLE_SOFTFLOAT})
216 if test x"${ENABLE_SOFTFLOAT}" = "xyes"; then
217 AC_DEFINE([ENABLE_SOFTFLOAT], 1, [enable softfloat])
221 dnl check for interpreter
222 AC_ARG_ENABLE([intrp], [AS_HELP_STRING(--enable-intrp,enable interpreter [[default=no]])])
224 AC_MSG_CHECKING(whether interpreter should be compiled)
225 if test x"$enable_intrp" = "xyes"; then
227 AC_DEFINE([ENABLE_INTRP], 1, [enable interpreter])
228 AM_CONDITIONAL([ENABLE_INTRP], [true])
235 [AS_HELP_STRING(--with-ffi,use libffi to call native functions)],
237 AC_CHECK_HEADERS([ffi.h],, [AC_MSG_ERROR(cannot find ffi.h)])
238 AC_CHECK_LIB(ffi, ffi_call,, [AC_MSG_ERROR(cannot find libffi)])
239 AC_DEFINE([WITH_FFI], 1, [use libffi])],
242 dnl check for libffcall
243 AC_ARG_WITH([ffcall],
244 [AS_HELP_STRING(--with-ffcall,use libffcall to call native functions)],
246 AC_CHECK_HEADERS([avcall.h],, [AC_MSG_ERROR(cannot find avcall.h)])
247 AC_CHECK_LIB(avcall, __builtin_avcall,, [AC_MSG_ERROR(cannot find libavcall (from libffcall))])
248 AC_DEFINE([WITH_FFCALL], 1, [use libffcall])],
251 dnl check for libffi or libffcall
252 if test x"${WITH_FFI}" = "xyes" -a x"${WITH_FFCALL}" = "xyes"; then
253 AC_ERROR(Enable only libffi or libffcall.)
255 if test x"${WITH_FFI}" = "xno" -a x"${WITH_FFCALL}" = "xno"; then
256 AC_ERROR(Enable one of libffi or libffcall.)
261 AM_CONDITIONAL([ENABLE_INTRP], [false])
265 if test x"${ENABLE_JIT}" = "xno" -a x"${ENABLE_INTRP}" = "xno"; then
266 AC_ERROR(You have to enable at least the JIT or the interpreter.)
270 dnl check for garbage collector usage
271 AC_MSG_CHECKING(whether GC should be disabled)
273 [AS_HELP_STRING(--disable-gc,disable garbage collector (for debugging only!) [[default=yes]])],
274 [case "${enableval}" in
276 AC_DEFINE([DISABLE_GC], 1, [disable garbage collector])
281 AC_MSG_RESULT(${DISABLE_GC})
282 AM_CONDITIONAL([DISABLE_GC], test x"${DISABLE_GC}" = "xyes")
285 dnl check for dump memory usage
286 AC_MSG_CHECKING(whether dump memory should be disabled)
287 AC_ARG_ENABLE([dump],
288 [AS_HELP_STRING(--disable-dump,disable dump memory (for debugging only!) [[default=yes]])],
289 [case "${enableval}" in
292 AC_DEFINE([DISABLE_DUMP], 1, [disable dump memory])
297 AC_MSG_RESULT(${DISABLE_DUMP})
301 AC_MSG_CHECKING(whether debug code generation should be enabled)
302 AC_ARG_ENABLE([debug],
303 [AS_HELP_STRING(--disable-debug,disable debug code generation [[default=yes]])],
304 [case "${enableval}" in
306 AC_DEFINE([NDEBUG], 1, [disable debug code])
312 if test x"${NDEBUG}" = "xno"; then
317 AM_CONDITIONAL([NDEBUG], test x"${NDEBUG}" = "xyes")
320 dnl check for disassembler support
321 AC_MSG_CHECKING(whether disassembler should be enabled)
322 AC_ARG_ENABLE([disassembler],
323 [AS_HELP_STRING(--disable-disassembler,disable disassembler [[default=yes]])],
324 [case "${enableval}" in
325 no) ENABLE_DISASSEMBLER=no;;
326 *) ENABLE_DISASSEMBLER=yes;;
328 [ENABLE_DISASSEMBLER=yes])
329 AC_MSG_RESULT(${ENABLE_DISASSEMBLER})
330 AM_CONDITIONAL([ENABLE_DISASSEMBLER], test x"${ENABLE_DISASSEMBLER}" = "xyes")
332 if test x"${ENABLE_DISASSEMBLER}" = "xyes"; then
333 AC_DEFINE([ENABLE_DISASSEMBLER], 1, [enable disassembler])
335 dnl check for binutils headers and libraries on some architectures for the
337 case "${ARCH_DIR}" in
338 arm | i386 | powerpc | x86_64 )
339 AC_CHECK_HEADER([ansidecl.h],, [AC_MSG_ERROR(cannot find ansidecl.h)])
340 AC_CHECK_HEADER([symcat.h],, [AC_MSG_ERROR(cannot find symcat.h)])
341 AC_CHECK_HEADER([bfd.h],, [AC_MSG_ERROR(cannot find bfd.h)])
342 AC_CHECK_HEADER([dis-asm.h],, [AC_MSG_ERROR(cannot find dis-asm.h)])
345 cygwin | darwin | netbsd )
346 AC_CHECK_LIB(intl, dcgettext,, [AC_MSG_ERROR(cannot find libintl (from binutils))])
350 AC_CHECK_LIB(iberty, xstrerror,, [AC_MSG_ERROR(cannot find libiberty (from binutils))])
351 AC_CHECK_LIB(bfd, bfd_get_arch,, [AC_MSG_ERROR(cannot find libbfd (from binutils))])
352 AC_CHECK_LIB(opcodes, disassembler,, [AC_MSG_ERROR(cannot find libopcodes (from binutils))])
353 AC_DEFINE([WITH_BINUTILS_DISASSEMBLER], 1, [use binutils disassembler])
354 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [true])
357 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
361 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
365 dnl check for statistics
366 AC_MSG_CHECKING(whether statistics generation should be enabled)
367 AC_ARG_ENABLE([statistics],
368 [AS_HELP_STRING(--enable-statistics,enable statistics generation [[default=no]])],
369 [case "${enableval}" in
370 yes) ENABLE_STATISTICS=yes;;
371 *) ENABLE_STATISTICS=no;;
373 [ENABLE_STATISTICS=no])
374 AC_MSG_RESULT(${ENABLE_STATISTICS})
375 AM_CONDITIONAL([ENABLE_STATISTICS], test x"${ENABLE_STATISTICS}" = "xyes")
377 if test x"${ENABLE_STATISTICS}" = "xyes"; then
378 AC_DEFINE([ENABLE_STATISTICS], 1, [enable statistics])
382 dnl check for verifier
383 AC_MSG_CHECKING(whether classfile verification should be enabled)
384 AC_ARG_ENABLE([verifier],
385 [AS_HELP_STRING(--disable-verifier,disable classfile verification [[default=yes]])],
386 [case "${enableval}" in
387 no) ENABLE_VERIFIER=no;;
388 *) ENABLE_VERIFIER=yes;;
390 [ENABLE_VERIFIER=yes])
391 AC_MSG_RESULT(${ENABLE_VERIFIER})
392 AM_CONDITIONAL([ENABLE_VERIFIER], test x"${ENABLE_VERIFIER}" = "xyes")
394 if test x"${ENABLE_VERIFIER}" = "xyes"; then
395 AC_DEFINE([ENABLE_VERIFIER], 1, [enable classfile verification])
399 dnl check for compiler timing
400 AC_MSG_CHECKING(whether real-time timing should be enabled)
401 AC_ARG_ENABLE([rt-timing],
402 [AS_HELP_STRING(--enable-rt-timing,enable real-time timing [[default=no]])],
403 [case "${enableval}" in
404 yes) ENABLE_RT_TIMING=yes;;
405 *) ENABLE_RT_TIMING=no;;
407 [ENABLE_RT_TIMING=no])
408 AC_MSG_RESULT(${ENABLE_RT_TIMING})
409 AM_CONDITIONAL([ENABLE_RT_TIMING], test x"${ENABLE_RT_TIMING}" = "xyes")
411 if test x"${ENABLE_RT_TIMING}" = "xyes"; then
412 AC_DEFINE([ENABLE_RT_TIMING], 1, [enable real-time timing])
416 dnl check for cycle count statistics
417 AC_MSG_CHECKING(whether cycle count statistics should be enabled)
418 AC_ARG_ENABLE([cycles-stats],
419 [AS_HELP_STRING(--enable-cycles-stats,enable cycle count statistics [[default=no]])],
420 [case "${enableval}" in
421 yes) ENABLE_CYCLES_STATS=yes;;
422 *) ENABLE_CYCLES_STATS=no;;
424 [ENABLE_CYCLES_STATS=no])
425 AC_MSG_RESULT(${ENABLE_CYCLES_STATS})
426 AM_CONDITIONAL([ENABLE_CYCLES_STATS], test x"${ENABLE_CYCLES_STATS}" = "xyes")
428 if test x"${ENABLE_CYCLES_STATS}" = "xyes"; then
429 AC_DEFINE([ENABLE_CYCLES_STATS], 1, [enable cycle count statistics])
434 AC_MSG_CHECKING(whether to compile JVMTI support)
435 AC_ARG_ENABLE([jvmti],
436 [AS_HELP_STRING(--enable-jvmti,enable JVMTI [[default=no]])],
437 [case "${enableval}" in
438 yes) ENABLE_JVMTI=yes;;
442 AC_MSG_RESULT(${ENABLE_JVMTI})
443 AM_CONDITIONAL([ENABLE_JVMTI], test x"${ENABLE_JVMTI}" = "xyes")
445 if test x"${ENABLE_JVMTI}" = "xyes"; then
446 AC_DEFINE([ENABLE_JVMTI], 1, [use JVMTI])
451 AC_ARG_ENABLE([threads], [AS_HELP_STRING(--enable-threads,enable threads support (none,green,native) [[default=native]])])
452 AC_ARG_ENABLE([__thread], [AS_HELP_STRING(--enable-__thread,use TLS features)], [use__thread=$enableval], [use__thread=no])
454 AC_MSG_CHECKING(whether to include threads support)
455 enable_threads=${enable_threads:-native}
456 case "$enable_threads" in
459 dnl no threads for boehm
460 ac_configure_args="$ac_configure_args --disable-boehm-threads"
461 AM_CONDITIONAL([ENABLE_THREADS], [false])
464 native | posix | pthreads)
465 AC_DEFINE([ENABLE_THREADS], 1, [enable threads])
467 AM_CONDITIONAL([ENABLE_THREADS], [true])
469 AC_MSG_RESULT(yes, native)
470 AC_CHECK_LIB(pthread, main)
472 CFLAGS="$CFLAGS -D_REENTRANT"
474 dnl tell boehm to support threads as well
475 ac_configure_args="$ac_configure_args --enable-boehm-threads=posix"
479 AC_MSG_ERROR($enable_threads is an unknown thread package)
484 dnl Check whether the compiler supports the __thread keyword.
485 if test "x$use__thread" != xno; then
486 AC_CACHE_CHECK([for __thread], ac_cv_gcc___thread,
487 [cat > conftest.c <<\EOF
490 if AC_TRY_COMMAND([${CC-cc} $CFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD]); then
491 ac_cv_gcc___thread=yes
493 ac_cv_gcc___thread=no
496 if test "$ac_cv_gcc___thread" = yes; then
497 AC_DEFINE([HAVE___THREAD], 1, [have __thread])
500 ac_cv_gcc___thread=no
504 dnl check if if-conversion should be supported
505 AC_MSG_CHECKING(whether if-conversion should be supported)
506 AC_ARG_ENABLE([ifconv],
507 [AS_HELP_STRING(--disable-ifconv,disable if-conversion [[default=yes]])],
508 [case "${enableval}" in
509 no) ENABLE_IFCONV=no;;
510 *) ENABLE_IFCONV=yes;;
513 AC_MSG_RESULT(${ENABLE_IFCONV})
514 AM_CONDITIONAL([ENABLE_IFCONV], test x"${ENABLE_IFCONV}" = "xyes")
516 if test x"${ENABLE_IFCONV}" = "xyes"; then
517 AC_DEFINE([ENABLE_IFCONV], 1, [enable if-conversion])
521 dnl check for inlining
522 AC_MSG_CHECKING(whether method inlining should be supported)
523 AC_ARG_ENABLE([inlining],
524 [AS_HELP_STRING(--enable-inlining,enable method inlining [[default=no]])],
525 [case "${enableval}" in
526 yes) ENABLE_INLINING=yes;;
527 *) ENABLE_INLINING=no;;
529 [ENABLE_INLINING=no])
530 AC_MSG_RESULT(${ENABLE_INLINING})
531 AM_CONDITIONAL([ENABLE_INLINING], test x"${ENABLE_INLINING}" = "xyes")
533 if test x"${ENABLE_INLINING}" = "xyes"; then
534 AC_DEFINE([ENABLE_INLINING], 1, [use method inlining])
538 dnl check for loop optimization
539 AC_MSG_CHECKING(whether loop optimization should be supported)
540 AC_ARG_ENABLE([loop],
541 [AS_HELP_STRING(--enable-loop,enable loop optimization [[default=no]])],
542 [case "${enableval}" in
543 yes) ENABLE_LOOP=yes;;
547 AC_MSG_RESULT(${ENABLE_LOOP})
548 AM_CONDITIONAL([ENABLE_LOOP], test x"${ENABLE_LOOP}" = "xyes")
550 if test x"${ENABLE_LOOP}" = "xyes"; then
551 AC_DEFINE([ENABLE_LOOP], 1, [use loop optimization])
555 dnl check if linear scan register allocator(lsra) should be used
556 AC_MSG_CHECKING(whether lsra should be supported)
557 AC_ARG_ENABLE([lsra],
558 [AS_HELP_STRING(--enable-lsra,enable linear scan register allocator [[default=no]])],
559 [case "${enableval}" in
560 yes) ENABLE_LSRA=yes;;
564 AC_MSG_RESULT(${ENABLE_LSRA})
565 AM_CONDITIONAL([ENABLE_LSRA], test x"${ENABLE_LSRA}" = "xyes")
567 if test x"${ENABLE_LSRA}" = "xyes"; then
568 AC_DEFINE([ENABLE_LSRA], 1, [enable lsra])
572 dnl check if profiling should be supported
573 AC_MSG_CHECKING(whether profiling should be supported)
574 AC_ARG_ENABLE([profiling],
575 [AS_HELP_STRING(--disable-profiling,disable profiling [[default=yes]])],
576 [case "${enableval}" in
577 no) ENABLE_PROFILING=no;;
578 *) ENABLE_PROFILING=yes;;
580 [ENABLE_PROFILING=yes])
581 AC_MSG_RESULT(${ENABLE_PROFILING})
582 AM_CONDITIONAL([ENABLE_PROFILING], test x"${ENABLE_PROFILING}" = "xyes")
584 if test x"${ENABLE_PROFILING}" = "xyes"; then
585 AC_DEFINE([ENABLE_PROFILING], 1, [enable profiling])
589 dnl check for instruction scheduler
590 AC_ARG_ENABLE([scheduler], [AS_HELP_STRING(--enable-scheduler,enable instruction scheduler [[default=no]])])
592 AC_MSG_CHECKING(whether instruction scheduler should be supported)
593 if test x"${USE_SCHEDULER}" = "x1" -o x"$enable_scheduler" = "xyes"; then
594 case "${ARCH_DIR}" in
598 AC_MSG_ERROR(instruction scheduler is not available for ${ARCH_DIR} code generator)
603 AC_DEFINE([USE_SCHEDULER], 1, [use scheduler])
604 AM_CONDITIONAL([USE_SCHEDULER], [true])
607 AM_CONDITIONAL([USE_SCHEDULER], [false])
611 dnl check if zlib should be used
612 AC_MSG_CHECKING(whether ZIP/JAR archives should be supported)
613 AC_ARG_ENABLE([zlib],
614 [AS_HELP_STRING(--disable-zlib,disable ZIP/JAR archive support (needs zlib) [[default=yes]])],
615 [case "${enableval}" in
620 AC_MSG_RESULT(${ENABLE_ZLIB})
622 if test x"${ENABLE_ZLIB}" = "xyes"; then
623 AC_CHECK_HEADERS([zconf.h],, [AC_MSG_ERROR(cannot find zconf.h)])
624 AC_CHECK_HEADERS([zlib.h],, [AC_MSG_ERROR(cannot find zlib.h)])
625 AC_CHECK_LIB(z, inflate,, [AC_MSG_ERROR(cannot find libz)])
626 AC_DEFINE([ENABLE_ZLIB], 1, [use zlib])
628 AM_CONDITIONAL([ENABLE_ZLIB], test x"${ENABLE_ZLIB}" = "xyes")
631 dnl check if a libjvm.so should be built
632 AC_MSG_CHECKING(whether to build a libjvm.so)
633 AC_ARG_ENABLE([libjvm],
634 [AS_HELP_STRING(--disable-libjvm,build a libjvm.so [[default=yes]])],
635 [case "${enableval}" in
636 no) ENABLE_LIBJVM=no;;
637 *) ENABLE_LIBJVM=yes;;
640 AC_MSG_RESULT(${ENABLE_LIBJVM})
641 AM_CONDITIONAL([ENABLE_LIBJVM], test x"${ENABLE_LIBJVM}" = "xyes")
642 AC_SUBST(ENABLE_LIBJVM)
644 if test x"${ENABLE_LIBJVM}" = "xyes"; then
645 AC_DEFINE([ENABLE_LIBJVM], 1, [enable libjvm.so])
647 dnl set AC_ENABLE_SHARED and AC_DISABLE_STATIC properly
660 dnl check if CACAO should be linked statically
661 AC_MSG_CHECKING(whether to link CACAO statically)
662 AC_ARG_ENABLE([staticvm],
663 [AS_HELP_STRING(--enable-staticvm,link CACAO statically [[default=no]])],
664 [case "${enableval}" in
665 yes) ENABLE_STATICVM=yes
666 AC_DEFINE([ENABLE_STATICVM], 1, [link CACAO statically])
668 *) ENABLE_STATICVM=no;;
670 [ENABLE_STATICVM=no])
671 AC_MSG_RESULT(${ENABLE_STATICVM})
672 AM_CONDITIONAL([ENABLE_STATICVM], test x"${ENABLE_STATICVM}" = "xyes")
673 AC_SUBST(ENABLE_STATICVM)
676 dnl where is CACAO's vm.zip
677 AC_MSG_CHECKING(where CACAO's vm.zip is installed)
678 AC_ARG_WITH([vm-zip],
679 [AS_HELP_STRING(--with-vm-zip,path to CACAO's vm.zip (includes the name of the file and may be flat) [[default=/usr/local/cacao/share/cacao/vm.zip]])],
680 [CACAO_VM_ZIP=${withval}],
681 [CACAO_VM_ZIP=${CACAO_PREFIX}/share/cacao/vm.zip])
682 AC_MSG_RESULT(${CACAO_VM_ZIP})
683 AC_DEFINE_UNQUOTED([CACAO_VM_ZIP], "${CACAO_VM_ZIP}", [CACAO's vm.zip])
684 AC_SUBST(CACAO_VM_ZIP)
687 dnl is GNU classpath installed somewhere different
688 AC_MSG_CHECKING(where GNU Classpath is installed)
689 AC_ARG_WITH([classpath-prefix],
690 [AS_HELP_STRING(--with-classpath-prefix=<dir>,installation directory of GNU Classpath [[default=/usr/local/classpath]])],
691 [CLASSPATH_PREFIX=${withval}],
692 [CLASSPATH_PREFIX=/usr/local/classpath])
693 AC_MSG_RESULT(${CLASSPATH_PREFIX})
694 AC_DEFINE_UNQUOTED([CLASSPATH_PREFIX], "${CLASSPATH_PREFIX}", [GNU Classpath installation directory])
695 AC_SUBST(CLASSPATH_PREFIX)
698 dnl where is GNU Classpath's glibj.zip
699 AC_MSG_CHECKING(where GNU Classpath's glibj.zip is installed)
700 AC_ARG_WITH([classpath-glibj-zip],
701 [AS_HELP_STRING(--with-classpath-glibj-zip,path to GNU Classpath's glibj.zip (includes the name of the file and may be flat) [[default=/usr/local/classpath/share/classpath/glibj.zip]])],
702 [CLASSPATH_GLIBJ_ZIP=${withval}],
703 [CLASSPATH_GLIBJ_ZIP=${CLASSPATH_PREFIX}/share/classpath/glibj.zip])
704 AC_MSG_RESULT(${CLASSPATH_GLIBJ_ZIP})
705 AC_DEFINE_UNQUOTED([CLASSPATH_GLIBJ_ZIP], "${CLASSPATH_GLIBJ_ZIP}", [GNU Classpath's glibj.zip])
706 AC_SUBST(CLASSPATH_GLIBJ_ZIP)
709 dnl where are the GNU Classpath libraries installed
710 AC_MSG_CHECKING(where GNU Classpath libraries are installed)
711 AC_ARG_WITH([classpath-libdir],
712 [AS_HELP_STRING(--with-classpath-libdir=<dir>,installation directory of GNU Classpath libraries [[default=/usr/local/classpath/lib]])],
713 [CLASSPATH_LIBDIR=${withval}],
714 [CLASSPATH_LIBDIR=${CLASSPATH_PREFIX}/lib])
715 AC_MSG_RESULT(${CLASSPATH_LIBDIR})
717 dnl expand CLASSPATH_LIBDIR to something that is usable in C code
718 AS_AC_EXPAND([CLASSPATH_LIBDIR], ${CLASSPATH_LIBDIR})
719 AC_DEFINE_UNQUOTED([CLASSPATH_LIBDIR], "${CLASSPATH_LIBDIR}", [GNU Classpath libraries installation directory])
720 AC_SUBST(CLASSPATH_LIBDIR)
723 dnl where are the GNU Classpath headers installed
724 AC_MSG_CHECKING(where GNU Classpath headers are installed)
725 AC_ARG_WITH([classpath-includedir],
726 [AS_HELP_STRING(--with-classpath-includedir=<dir>,installation directory of GNU Classpath headers [[default=/usr/local/classpath/include]])],
727 [CLASSPATH_INCLUDEDIR=${withval}],
728 [CLASSPATH_INCLUDEDIR=${CLASSPATH_PREFIX}/include])
729 AC_MSG_RESULT(${CLASSPATH_INCLUDEDIR})
731 AC_CHECK_HEADER([${CLASSPATH_INCLUDEDIR}/jni.h],
732 [AC_DEFINE_UNQUOTED([CLASSPATH_JNI_H], "${CLASSPATH_INCLUDEDIR}/jni.h", [GNU Classpath jni.h header])],
733 [AC_MSG_ERROR(cannot find jni.h)])
736 dnl check if GNU Classpath should be linked statically into CACAO
737 AC_MSG_CHECKING(whether to link GNU Classpath native libraries statically into CACAO)
738 AC_ARG_WITH([static-classpath],
739 [AS_HELP_STRING(--with-static-classpath,link GNU classpath native libraries statically into CACAO [[default=no]])],
740 [case "${enableval}" in
741 yes) WITH_STATIC_CLASSPATH=yes;;
742 *) WITH_STATIC_CLASSPATH=no;;
744 [WITH_STATIC_CLASSPATH=no])
745 AC_MSG_RESULT(${WITH_STATIC_CLASSPATH})
747 if test x"${WITH_STATIC_CLASSPATH}" = "xyes"; then
748 AC_DEFINE([WITH_STATIC_CLASSPATH], 1, [link GNU classpath native libraries statically into CACAO])
750 dnl check for some classpath related stuff when we link statically
753 AC_CHECK_HEADERS([ltdl.h],, [AC_MSG_ERROR(cannot find ltdl.h)])
754 AC_CHECK_LIB(ltdl, lt_dlopen,, [AC_MSG_ERROR(cannot find libltdl)])
756 AM_CONDITIONAL([WITH_STATIC_CLASSPATH], test x"${WITH_STATIC_CLASSPATH}" = "xyes")
757 AC_SUBST(WITH_STATIC_CLASSPATH)
760 dnl check for some programs we need
765 dnl now configure subpackages
766 dnl the export is not my favorite (is there another way?)
768 AC_CONFIG_SUBDIRS(src/boehm-gc)
771 AC_CONFIG_FILES([Makefile]
773 [contrib/setenvinstalled]
774 [contrib/setenvsource]
776 [doc/handbook/Makefile]
780 [src/cacaoh/Makefile]
781 [src/fdlibm/Makefile]
784 [src/native/Makefile]
785 [src/native/include/Makefile]
786 [src/native/jvmti/Makefile]
787 [src/native/tools/Makefile]
788 [src/native/vm/Makefile]
789 [src/scripts/Makefile]
790 [src/scripts/jarsigner]
792 [src/scripts/keytool]
794 [src/scripts/rmiregistry]
795 [src/threads/Makefile]
796 [src/threads/native/Makefile]
797 [src/toolbox/Makefile]
799 [src/vm/jit/Makefile]
800 [src/vm/jit/allocator/Makefile]
801 [src/vm/jit/alpha/Makefile]
802 [src/vm/jit/alpha/freebsd/Makefile]
803 [src/vm/jit/alpha/linux/Makefile]
804 [src/vm/jit/i386/Makefile]
805 [src/vm/jit/i386/freebsd/Makefile]
806 [src/vm/jit/i386/linux/Makefile]
807 [src/vm/jit/ifconv/Makefile]
808 [src/vm/jit/intrp/Makefile]
809 [src/vm/jit/inline/Makefile]
810 [src/vm/jit/loop/Makefile]
811 [src/vm/jit/mips/Makefile]
812 [src/vm/jit/mips/irix/Makefile]
813 [src/vm/jit/mips/linux/Makefile]
814 [src/vm/jit/powerpc/Makefile]
815 [src/vm/jit/powerpc/darwin/Makefile]
816 [src/vm/jit/powerpc/linux/Makefile]
817 [src/vm/jit/powerpc/netbsd/Makefile]
818 [src/vm/jit/profile/Makefile]
819 [src/vm/jit/schedule/Makefile]
820 [src/vm/jit/tools/Makefile]
821 [src/vm/jit/verify/Makefile]
822 [src/vm/jit/x86_64/Makefile]
824 [tests/regression/Makefile]
825 [tests/regression/codepatching/Makefile]
826 [tests/regression/native/Makefile])
833 ## indent-tabs-mode: t
836 ## compile-command: "automake --add-missing"