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__"
66 CFLAGS="$CFLAGS -mcpu=v9 -m64 -D__SPARC_64__"
70 AC_MSG_ERROR($host_cpu systems are not supported at this time)
78 INTRP_CFLAGS="$CFLAGS -D__DARWIN__ -Wall -Wno-long-long"
79 CFLAGS="$CFLAGS -D__DARWIN__ -ansi -pedantic -Wall -Wno-long-long"
84 INTRP_CFLAGS="$CFLAGS -D__FREEBSD__ -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
85 CFLAGS="$CFLAGS -D__FREEBSD__ -ansi -pedantic -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
90 INTRP_CFLAGS="$CFLAGS -D__IRIX__"
91 CFLAGS="$CFLAGS -D__IRIX__"
96 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"
97 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"
102 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"
103 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"
111 dnl define some stuff required for --fullversion
112 AC_DEFINE_UNQUOTED(VERSION_CONFIGURE_ARGS, "$ac_configure_args", [configure arguments])
113 AC_DEFINE_UNQUOTED(VERSION_CC, "$CC", [CC used])
114 AC_DEFINE_UNQUOTED(VERSION_CFLAGS, "$CFLAGS", [CFLAGS used])
117 dnl define and substitute some architecture specific variables
118 AC_DEFINE_UNQUOTED([ARCH_DIR], "${ARCH_DIR}", [architecture directory])
121 AC_SUBST(INTRP_CFLAGS)
122 AC_SUBST(USE_SCHEDULER)
125 dnl Checks for programs.
135 dnl Checks for header files.
138 AC_CHECK_HEADERS([fcntl.h])
139 AC_CHECK_HEADERS([sys/time.h])
140 AC_CHECK_HEADERS([unistd.h])
141 AC_CHECK_HEADERS([sys/ioctl.h])
143 dnl this is for fdlibm
144 AC_CHECK_HEADERS([stdint.h])
145 AC_CHECK_HEADERS([inttypes.h])
146 AC_CHECK_HEADERS([sys/config.h])
147 AC_CHECK_HEADERS([sys/types.h])
148 AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
149 AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
150 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]))
151 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]))
153 dnl Checks for typedefs, structures, and compiler characteristics.
162 dnl Checks for library functions.
163 AC_PROG_GCC_TRADITIONAL
166 AC_CHECK_FUNCS([calloc mprotect getpagesize free])
167 AC_CHECK_FUNCS([getcwd gettimeofday])
168 AC_CHECK_FUNCS([scandir])
169 AC_CHECK_FUNCS([mmap])
170 AC_CHECK_FUNCS([isnan])
172 dnl Checks for libraries.
174 dnl Checking sizeof void *
175 AC_CHECK_SIZEOF(void *)
179 dnl define install prefix
180 if test "x$prefix" = "xNONE"; then
181 CACAO_PREFIX=$ac_default_prefix
185 AC_DEFINE_UNQUOTED([CACAO_PREFIX], "${CACAO_PREFIX}", [installation prefix])
186 AC_SUBST(CACAO_PREFIX)
193 dnl check for JIT compiler
194 AC_MSG_CHECKING(whether JIT compiler should be compiled)
196 [AS_HELP_STRING(--disable-jit,disable JIT compiler [[default=yes]])],
197 [case "${enableval}" in
202 AC_MSG_RESULT(${ENABLE_JIT})
203 AM_CONDITIONAL([ENABLE_JIT], test x"${ENABLE_JIT}" = "xyes")
205 if test x"${ENABLE_JIT}" = "xyes"; then
206 AC_DEFINE([ENABLE_JIT], 1, [enable JIT compiler])
210 dnl check if softfloat should be used
211 AC_MSG_CHECKING(whether softfloat should be used)
212 AC_ARG_ENABLE([softfloat],
213 [AS_HELP_STRING(--enable-softfloat,use softfloat [[default=no]])],
214 [case "${enableval}" in
215 yes) ENABLE_SOFTFLOAT=yes;;
216 *) ENABLE_SOFTFLOAT=no;;
218 [ENABLE_SOFTFLOAT=no])
219 AC_MSG_RESULT(${ENABLE_SOFTFLOAT})
221 if test x"${ENABLE_SOFTFLOAT}" = "xyes"; then
222 AC_DEFINE([ENABLE_SOFTFLOAT], 1, [enable softfloat])
226 dnl check for interpreter
227 AC_ARG_ENABLE([intrp], [AS_HELP_STRING(--enable-intrp,enable interpreter [[default=no]])])
229 AC_MSG_CHECKING(whether interpreter should be compiled)
230 if test x"$enable_intrp" = "xyes"; then
232 AC_DEFINE([ENABLE_INTRP], 1, [enable interpreter])
233 AM_CONDITIONAL([ENABLE_INTRP], [true])
240 [AS_HELP_STRING(--with-ffi,use libffi to call native functions)],
242 AC_CHECK_HEADERS([ffi.h],, [AC_MSG_ERROR(cannot find ffi.h)])
243 AC_CHECK_LIB(ffi, ffi_call,, [AC_MSG_ERROR(cannot find libffi)])
244 AC_DEFINE([WITH_FFI], 1, [use libffi])],
247 dnl check for libffcall
248 AC_ARG_WITH([ffcall],
249 [AS_HELP_STRING(--with-ffcall,use libffcall to call native functions)],
251 AC_CHECK_HEADERS([avcall.h],, [AC_MSG_ERROR(cannot find avcall.h)])
252 AC_CHECK_LIB(avcall, __builtin_avcall,, [AC_MSG_ERROR(cannot find libavcall (from libffcall))])
253 AC_DEFINE([WITH_FFCALL], 1, [use libffcall])],
256 dnl check for libffi or libffcall
257 if test x"${WITH_FFI}" = "xyes" -a x"${WITH_FFCALL}" = "xyes"; then
258 AC_ERROR(Enable only libffi or libffcall.)
260 if test x"${WITH_FFI}" = "xno" -a x"${WITH_FFCALL}" = "xno"; then
261 AC_ERROR(Enable one of libffi or libffcall.)
266 AM_CONDITIONAL([ENABLE_INTRP], [false])
270 if test x"${ENABLE_JIT}" = "xno" -a x"${ENABLE_INTRP}" = "xno"; then
271 AC_ERROR(You have to enable at least the JIT or the interpreter.)
275 dnl check for garbage collector usage
276 AC_MSG_CHECKING(whether GC should be disabled)
278 [AS_HELP_STRING(--disable-gc,disable garbage collector (for debugging only!) [[default=yes]])],
279 [case "${enableval}" in
281 AC_DEFINE([DISABLE_GC], 1, [disable garbage collector])
286 AC_MSG_RESULT(${DISABLE_GC})
287 AM_CONDITIONAL([DISABLE_GC], test x"${DISABLE_GC}" = "xyes")
290 dnl check for dump memory usage
291 AC_MSG_CHECKING(whether dump memory should be disabled)
292 AC_ARG_ENABLE([dump],
293 [AS_HELP_STRING(--disable-dump,disable dump memory (for debugging only!) [[default=yes]])],
294 [case "${enableval}" in
297 AC_DEFINE([DISABLE_DUMP], 1, [disable dump memory])
302 AC_MSG_RESULT(${DISABLE_DUMP})
306 AC_MSG_CHECKING(whether debug code generation should be enabled)
307 AC_ARG_ENABLE([debug],
308 [AS_HELP_STRING(--disable-debug,disable debug code generation [[default=yes]])],
309 [case "${enableval}" in
311 AC_DEFINE([NDEBUG], 1, [disable debug code])
317 if test x"${NDEBUG}" = "xno"; then
322 AM_CONDITIONAL([NDEBUG], test x"${NDEBUG}" = "xyes")
325 dnl check for disassembler support
326 AC_MSG_CHECKING(whether disassembler should be enabled)
327 AC_ARG_ENABLE([disassembler],
328 [AS_HELP_STRING(--disable-disassembler,disable disassembler [[default=yes]])],
329 [case "${enableval}" in
330 no) ENABLE_DISASSEMBLER=no;;
331 *) ENABLE_DISASSEMBLER=yes;;
333 [ENABLE_DISASSEMBLER=yes])
334 AC_MSG_RESULT(${ENABLE_DISASSEMBLER})
335 AM_CONDITIONAL([ENABLE_DISASSEMBLER], test x"${ENABLE_DISASSEMBLER}" = "xyes")
337 if test x"${ENABLE_DISASSEMBLER}" = "xyes"; then
338 AC_DEFINE([ENABLE_DISASSEMBLER], 1, [enable disassembler])
340 dnl check for binutils headers and libraries on some architectures for the
342 case "${ARCH_DIR}" in
343 arm | i386 | powerpc | x86_64 | sparc64 )
344 AC_CHECK_HEADER([ansidecl.h],, [AC_MSG_ERROR(cannot find ansidecl.h)])
345 AC_CHECK_HEADER([symcat.h],, [AC_MSG_ERROR(cannot find symcat.h)])
346 AC_CHECK_HEADER([bfd.h],, [AC_MSG_ERROR(cannot find bfd.h)])
347 AC_CHECK_HEADER([dis-asm.h],, [AC_MSG_ERROR(cannot find dis-asm.h)])
350 cygwin | darwin | netbsd )
351 AC_CHECK_LIB(intl, dcgettext,, [AC_MSG_ERROR(cannot find libintl (from binutils))])
355 AC_CHECK_LIB(iberty, xstrerror,, [AC_MSG_ERROR(cannot find libiberty (from binutils))])
356 AC_CHECK_LIB(bfd, bfd_get_arch,, [AC_MSG_ERROR(cannot find libbfd (from binutils))])
357 AC_CHECK_LIB(opcodes, disassembler,, [AC_MSG_ERROR(cannot find libopcodes (from binutils))])
358 AC_DEFINE([WITH_BINUTILS_DISASSEMBLER], 1, [use binutils disassembler])
359 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [true])
362 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
366 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
370 dnl check for statistics
371 AC_MSG_CHECKING(whether statistics generation should be enabled)
372 AC_ARG_ENABLE([statistics],
373 [AS_HELP_STRING(--enable-statistics,enable statistics generation [[default=no]])],
374 [case "${enableval}" in
375 yes) ENABLE_STATISTICS=yes;;
376 *) ENABLE_STATISTICS=no;;
378 [ENABLE_STATISTICS=no])
379 AC_MSG_RESULT(${ENABLE_STATISTICS})
380 AM_CONDITIONAL([ENABLE_STATISTICS], test x"${ENABLE_STATISTICS}" = "xyes")
382 if test x"${ENABLE_STATISTICS}" = "xyes"; then
383 AC_DEFINE([ENABLE_STATISTICS], 1, [enable statistics])
387 dnl check for verifier
388 AC_MSG_CHECKING(whether classfile verification should be enabled)
389 AC_ARG_ENABLE([verifier],
390 [AS_HELP_STRING(--disable-verifier,disable classfile verification [[default=yes]])],
391 [case "${enableval}" in
392 no) ENABLE_VERIFIER=no;;
393 *) ENABLE_VERIFIER=yes;;
395 [ENABLE_VERIFIER=yes])
396 AC_MSG_RESULT(${ENABLE_VERIFIER})
397 AM_CONDITIONAL([ENABLE_VERIFIER], test x"${ENABLE_VERIFIER}" = "xyes")
399 if test x"${ENABLE_VERIFIER}" = "xyes"; then
400 AC_DEFINE([ENABLE_VERIFIER], 1, [enable classfile verification])
404 dnl check for compiler timing
405 AC_MSG_CHECKING(whether real-time timing should be enabled)
406 AC_ARG_ENABLE([rt-timing],
407 [AS_HELP_STRING(--enable-rt-timing,enable real-time timing [[default=no]])],
408 [case "${enableval}" in
409 yes) ENABLE_RT_TIMING=yes;;
410 *) ENABLE_RT_TIMING=no;;
412 [ENABLE_RT_TIMING=no])
413 AC_MSG_RESULT(${ENABLE_RT_TIMING})
414 AM_CONDITIONAL([ENABLE_RT_TIMING], test x"${ENABLE_RT_TIMING}" = "xyes")
416 if test x"${ENABLE_RT_TIMING}" = "xyes"; then
417 AC_DEFINE([ENABLE_RT_TIMING], 1, [enable real-time timing])
421 dnl check for cycle count statistics
422 AC_MSG_CHECKING(whether cycle count statistics should be enabled)
423 AC_ARG_ENABLE([cycles-stats],
424 [AS_HELP_STRING(--enable-cycles-stats,enable cycle count statistics [[default=no]])],
425 [case "${enableval}" in
426 yes) ENABLE_CYCLES_STATS=yes;;
427 *) ENABLE_CYCLES_STATS=no;;
429 [ENABLE_CYCLES_STATS=no])
430 AC_MSG_RESULT(${ENABLE_CYCLES_STATS})
431 AM_CONDITIONAL([ENABLE_CYCLES_STATS], test x"${ENABLE_CYCLES_STATS}" = "xyes")
433 if test x"${ENABLE_CYCLES_STATS}" = "xyes"; then
434 AC_DEFINE([ENABLE_CYCLES_STATS], 1, [enable cycle count statistics])
439 AC_MSG_CHECKING(whether to compile JVMTI support)
440 AC_ARG_ENABLE([jvmti],
441 [AS_HELP_STRING(--enable-jvmti,enable JVMTI [[default=no]])],
442 [case "${enableval}" in
443 yes) ENABLE_JVMTI=yes;;
447 AC_MSG_RESULT(${ENABLE_JVMTI})
448 AM_CONDITIONAL([ENABLE_JVMTI], test x"${ENABLE_JVMTI}" = "xyes")
450 if test x"${ENABLE_JVMTI}" = "xyes"; then
451 AC_DEFINE([ENABLE_JVMTI], 1, [use JVMTI])
456 AC_ARG_ENABLE([threads], [AS_HELP_STRING(--enable-threads,enable threads support (none,green,native) [[default=native]])])
457 AC_ARG_ENABLE([__thread], [AS_HELP_STRING(--enable-__thread,use TLS features)], [use__thread=$enableval], [use__thread=no])
459 AC_MSG_CHECKING(whether to include threads support)
460 enable_threads=${enable_threads:-native}
461 case "$enable_threads" in
464 dnl no threads for boehm
465 ac_configure_args="$ac_configure_args --disable-boehm-threads"
466 AM_CONDITIONAL([ENABLE_THREADS], [false])
469 native | posix | pthreads)
470 AC_DEFINE([ENABLE_THREADS], 1, [enable threads])
472 AM_CONDITIONAL([ENABLE_THREADS], [true])
474 AC_MSG_RESULT(yes, native)
475 AC_CHECK_LIB(pthread, main)
477 CFLAGS="$CFLAGS -D_REENTRANT"
479 dnl tell boehm to support threads as well
480 ac_configure_args="$ac_configure_args --enable-boehm-threads=posix"
484 AC_MSG_ERROR($enable_threads is an unknown thread package)
489 dnl Check whether the compiler supports the __thread keyword.
490 if test "x$use__thread" != xno; then
491 AC_CACHE_CHECK([for __thread], ac_cv_gcc___thread,
492 [cat > conftest.c <<\EOF
495 if AC_TRY_COMMAND([${CC-cc} $CFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD]); then
496 ac_cv_gcc___thread=yes
498 ac_cv_gcc___thread=no
501 if test "$ac_cv_gcc___thread" = yes; then
502 AC_DEFINE([HAVE___THREAD], 1, [have __thread])
505 ac_cv_gcc___thread=no
509 dnl check if if-conversion should be supported
510 AC_MSG_CHECKING(whether if-conversion should be supported)
511 AC_ARG_ENABLE([ifconv],
512 [AS_HELP_STRING(--disable-ifconv,disable if-conversion [[default=yes]])],
513 [case "${enableval}" in
514 no) ENABLE_IFCONV=no;;
515 *) ENABLE_IFCONV=yes;;
518 AC_MSG_RESULT(${ENABLE_IFCONV})
519 AM_CONDITIONAL([ENABLE_IFCONV], test x"${ENABLE_IFCONV}" = "xyes")
521 if test x"${ENABLE_IFCONV}" = "xyes"; then
522 AC_DEFINE([ENABLE_IFCONV], 1, [enable if-conversion])
526 dnl check for inlining
527 AC_MSG_CHECKING(whether method inlining should be supported)
528 AC_ARG_ENABLE([inlining],
529 [AS_HELP_STRING(--enable-inlining,enable method inlining [[default=no]])],
530 [case "${enableval}" in
531 yes) ENABLE_INLINING=yes;;
532 *) ENABLE_INLINING=no;;
534 [ENABLE_INLINING=no])
535 AC_MSG_RESULT(${ENABLE_INLINING})
536 AM_CONDITIONAL([ENABLE_INLINING], test x"${ENABLE_INLINING}" = "xyes")
538 if test x"${ENABLE_INLINING}" = "xyes"; then
539 AC_DEFINE([ENABLE_INLINING], 1, [use method inlining])
543 dnl check for loop optimization
544 AC_MSG_CHECKING(whether loop optimization should be supported)
545 AC_ARG_ENABLE([loop],
546 [AS_HELP_STRING(--enable-loop,enable loop optimization [[default=no]])],
547 [case "${enableval}" in
548 yes) ENABLE_LOOP=yes;;
552 AC_MSG_RESULT(${ENABLE_LOOP})
553 AM_CONDITIONAL([ENABLE_LOOP], test x"${ENABLE_LOOP}" = "xyes")
555 if test x"${ENABLE_LOOP}" = "xyes"; then
556 AC_DEFINE([ENABLE_LOOP], 1, [use loop optimization])
560 dnl check if linear scan register allocator(lsra) should be used
561 AC_MSG_CHECKING(whether lsra should be supported)
562 AC_ARG_ENABLE([lsra],
563 [AS_HELP_STRING(--enable-lsra,enable linear scan register allocator [[default=no]])],
564 [case "${enableval}" in
565 yes) ENABLE_LSRA=yes;;
569 AC_MSG_RESULT(${ENABLE_LSRA})
570 AM_CONDITIONAL([ENABLE_LSRA], test x"${ENABLE_LSRA}" = "xyes")
572 if test x"${ENABLE_LSRA}" = "xyes"; then
573 AC_DEFINE([ENABLE_LSRA], 1, [enable lsra])
577 dnl check if profiling should be supported
578 AC_MSG_CHECKING(whether profiling should be supported)
579 AC_ARG_ENABLE([profiling],
580 [AS_HELP_STRING(--enable-profiling,enable profiling [[default=no]])],
581 [case "${enableval}" in
582 yes) ENABLE_PROFILING=yes;;
583 *) ENABLE_PROFILING=no;;
585 [ENABLE_PROFILING=no])
586 AC_MSG_RESULT(${ENABLE_PROFILING})
587 AM_CONDITIONAL([ENABLE_PROFILING], test x"${ENABLE_PROFILING}" = "xyes")
589 if test x"${ENABLE_PROFILING}" = "xyes"; then
590 AC_DEFINE([ENABLE_PROFILING], 1, [enable profiling])
594 dnl check for instruction scheduler
595 AC_ARG_ENABLE([scheduler], [AS_HELP_STRING(--enable-scheduler,enable instruction scheduler [[default=no]])])
597 AC_MSG_CHECKING(whether instruction scheduler should be supported)
598 if test x"${USE_SCHEDULER}" = "x1" -o x"$enable_scheduler" = "xyes"; then
599 case "${ARCH_DIR}" in
603 AC_MSG_ERROR(instruction scheduler is not available for ${ARCH_DIR} code generator)
608 AC_DEFINE([USE_SCHEDULER], 1, [use scheduler])
609 AM_CONDITIONAL([USE_SCHEDULER], [true])
612 AM_CONDITIONAL([USE_SCHEDULER], [false])
616 dnl check if zlib should be used
617 AC_MSG_CHECKING(whether ZIP/JAR archives should be supported)
618 AC_ARG_ENABLE([zlib],
619 [AS_HELP_STRING(--disable-zlib,disable ZIP/JAR archive support (needs zlib) [[default=yes]])],
620 [case "${enableval}" in
625 AC_MSG_RESULT(${ENABLE_ZLIB})
627 if test x"${ENABLE_ZLIB}" = "xyes"; then
628 AC_CHECK_HEADERS([zconf.h],, [AC_MSG_ERROR(cannot find zconf.h)])
629 AC_CHECK_HEADERS([zlib.h],, [AC_MSG_ERROR(cannot find zlib.h)])
630 AC_CHECK_LIB(z, inflate,, [AC_MSG_ERROR(cannot find libz)])
631 AC_DEFINE([ENABLE_ZLIB], 1, [use zlib])
633 AM_CONDITIONAL([ENABLE_ZLIB], test x"${ENABLE_ZLIB}" = "xyes")
636 dnl check if a libjvm.so should be built
637 AC_MSG_CHECKING(whether to build a libjvm.so)
638 AC_ARG_ENABLE([libjvm],
639 [AS_HELP_STRING(--disable-libjvm,build a libjvm.so [[default=yes]])],
640 [case "${enableval}" in
641 no) ENABLE_LIBJVM=no;;
642 *) ENABLE_LIBJVM=yes;;
645 AC_MSG_RESULT(${ENABLE_LIBJVM})
646 AM_CONDITIONAL([ENABLE_LIBJVM], test x"${ENABLE_LIBJVM}" = "xyes")
647 AC_SUBST(ENABLE_LIBJVM)
649 if test x"${ENABLE_LIBJVM}" = "xyes"; then
650 AC_DEFINE([ENABLE_LIBJVM], 1, [enable libjvm.so])
652 dnl set AC_ENABLE_SHARED and AC_DISABLE_STATIC properly
665 dnl check if CACAO should be linked statically
666 AC_MSG_CHECKING(whether to link CACAO statically)
667 AC_ARG_ENABLE([staticvm],
668 [AS_HELP_STRING(--enable-staticvm,link CACAO statically [[default=no]])],
669 [case "${enableval}" in
670 yes) ENABLE_STATICVM=yes
671 AC_DEFINE([ENABLE_STATICVM], 1, [link CACAO statically])
673 *) ENABLE_STATICVM=no;;
675 [ENABLE_STATICVM=no])
676 AC_MSG_RESULT(${ENABLE_STATICVM})
677 AM_CONDITIONAL([ENABLE_STATICVM], test x"${ENABLE_STATICVM}" = "xyes")
678 AC_SUBST(ENABLE_STATICVM)
681 dnl where is CACAO's vm.zip
682 AC_MSG_CHECKING(where CACAO's vm.zip is installed)
683 AC_ARG_WITH([vm-zip],
684 [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]])],
685 [CACAO_VM_ZIP=${withval}],
686 [CACAO_VM_ZIP=${CACAO_PREFIX}/share/cacao/vm.zip])
687 AC_MSG_RESULT(${CACAO_VM_ZIP})
688 AC_DEFINE_UNQUOTED([CACAO_VM_ZIP], "${CACAO_VM_ZIP}", [CACAO's vm.zip])
689 AC_SUBST(CACAO_VM_ZIP)
692 dnl is GNU classpath installed somewhere different
693 AC_MSG_CHECKING(where GNU Classpath is installed)
694 AC_ARG_WITH([classpath-prefix],
695 [AS_HELP_STRING(--with-classpath-prefix=<dir>,installation directory of GNU Classpath [[default=/usr/local/classpath]])],
696 [CLASSPATH_PREFIX=${withval}],
697 [CLASSPATH_PREFIX=/usr/local/classpath])
698 AC_MSG_RESULT(${CLASSPATH_PREFIX})
699 AC_DEFINE_UNQUOTED([CLASSPATH_PREFIX], "${CLASSPATH_PREFIX}", [GNU Classpath installation directory])
700 AC_SUBST(CLASSPATH_PREFIX)
703 dnl where is GNU Classpath's glibj.zip
704 AC_MSG_CHECKING(where GNU Classpath's glibj.zip is installed)
705 AC_ARG_WITH([classpath-glibj-zip],
706 [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]])],
707 [CLASSPATH_GLIBJ_ZIP=${withval}],
708 [CLASSPATH_GLIBJ_ZIP=${CLASSPATH_PREFIX}/share/classpath/glibj.zip])
709 AC_MSG_RESULT(${CLASSPATH_GLIBJ_ZIP})
710 AC_DEFINE_UNQUOTED([CLASSPATH_GLIBJ_ZIP], "${CLASSPATH_GLIBJ_ZIP}", [GNU Classpath's glibj.zip])
711 AC_SUBST(CLASSPATH_GLIBJ_ZIP)
714 dnl where are the GNU Classpath libraries installed
715 AC_MSG_CHECKING(where GNU Classpath libraries are installed)
716 AC_ARG_WITH([classpath-libdir],
717 [AS_HELP_STRING(--with-classpath-libdir=<dir>,installation directory of GNU Classpath libraries [[default=/usr/local/classpath/lib]])],
718 [CLASSPATH_LIBDIR=${withval}],
719 [CLASSPATH_LIBDIR=${CLASSPATH_PREFIX}/lib])
720 AC_MSG_RESULT(${CLASSPATH_LIBDIR})
722 dnl expand CLASSPATH_LIBDIR to something that is usable in C code
723 AS_AC_EXPAND([CLASSPATH_LIBDIR], ${CLASSPATH_LIBDIR})
724 AC_DEFINE_UNQUOTED([CLASSPATH_LIBDIR], "${CLASSPATH_LIBDIR}", [GNU Classpath libraries installation directory])
725 AC_SUBST(CLASSPATH_LIBDIR)
728 dnl where are the GNU Classpath headers installed
729 AC_MSG_CHECKING(where GNU Classpath headers are installed)
730 AC_ARG_WITH([classpath-includedir],
731 [AS_HELP_STRING(--with-classpath-includedir=<dir>,installation directory of GNU Classpath headers [[default=/usr/local/classpath/include]])],
732 [CLASSPATH_INCLUDEDIR=${withval}],
733 [CLASSPATH_INCLUDEDIR=${CLASSPATH_PREFIX}/include])
734 AC_MSG_RESULT(${CLASSPATH_INCLUDEDIR})
736 AC_CHECK_HEADER([${CLASSPATH_INCLUDEDIR}/jni.h],
737 [AC_DEFINE_UNQUOTED([CLASSPATH_JNI_H], "${CLASSPATH_INCLUDEDIR}/jni.h", [GNU Classpath jni.h header])],
738 [AC_MSG_ERROR(cannot find jni.h)])
741 dnl check if GNU Classpath should be linked statically into CACAO
742 AC_MSG_CHECKING(whether to link GNU Classpath native libraries statically into CACAO)
743 AC_ARG_WITH([static-classpath],
744 [AS_HELP_STRING(--with-static-classpath,link GNU classpath native libraries statically into CACAO [[default=no]])],
745 [case "${enableval}" in
746 yes) WITH_STATIC_CLASSPATH=yes;;
747 *) WITH_STATIC_CLASSPATH=no;;
749 [WITH_STATIC_CLASSPATH=no])
750 AC_MSG_RESULT(${WITH_STATIC_CLASSPATH})
752 if test x"${WITH_STATIC_CLASSPATH}" = "xyes"; then
753 AC_DEFINE([WITH_STATIC_CLASSPATH], 1, [link GNU classpath native libraries statically into CACAO])
755 dnl check for some classpath related stuff when we link statically
758 AC_CHECK_HEADERS([ltdl.h],, [AC_MSG_ERROR(cannot find ltdl.h)])
759 AC_CHECK_LIB(ltdl, lt_dlopen,, [AC_MSG_ERROR(cannot find libltdl)])
761 AM_CONDITIONAL([WITH_STATIC_CLASSPATH], test x"${WITH_STATIC_CLASSPATH}" = "xyes")
762 AC_SUBST(WITH_STATIC_CLASSPATH)
765 dnl check for some programs we need
770 dnl now configure subpackages
771 dnl the export is not my favorite (is there another way?)
773 AC_CONFIG_SUBDIRS(src/boehm-gc)
776 AC_CONFIG_FILES([Makefile]
778 [contrib/setenvinstalled]
779 [contrib/setenvsource]
781 [doc/handbook/Makefile]
785 [src/cacaoh/Makefile]
786 [src/fdlibm/Makefile]
789 [src/native/Makefile]
790 [src/native/include/Makefile]
791 [src/native/jvmti/Makefile]
792 [src/native/tools/Makefile]
793 [src/native/vm/Makefile]
794 [src/scripts/Makefile]
795 [src/scripts/jarsigner]
797 [src/scripts/keytool]
799 [src/scripts/rmiregistry]
800 [src/threads/Makefile]
801 [src/threads/native/Makefile]
802 [src/toolbox/Makefile]
804 [src/vm/jit/Makefile]
805 [src/vm/jit/allocator/Makefile]
806 [src/vm/jit/alpha/Makefile]
807 [src/vm/jit/alpha/freebsd/Makefile]
808 [src/vm/jit/alpha/linux/Makefile]
809 [src/vm/jit/i386/Makefile]
810 [src/vm/jit/i386/freebsd/Makefile]
811 [src/vm/jit/i386/linux/Makefile]
812 [src/vm/jit/ifconv/Makefile]
813 [src/vm/jit/intrp/Makefile]
814 [src/vm/jit/inline/Makefile]
815 [src/vm/jit/loop/Makefile]
816 [src/vm/jit/mips/Makefile]
817 [src/vm/jit/mips/irix/Makefile]
818 [src/vm/jit/mips/linux/Makefile]
819 [src/vm/jit/powerpc/Makefile]
820 [src/vm/jit/powerpc/darwin/Makefile]
821 [src/vm/jit/powerpc/linux/Makefile]
822 [src/vm/jit/powerpc/netbsd/Makefile]
823 [src/vm/jit/profile/Makefile]
824 [src/vm/jit/schedule/Makefile]
825 [src/vm/jit/sparc64/Makefile]
826 [src/vm/jit/sparc64/linux/Makefile]
827 [src/vm/jit/tools/Makefile]
828 [src/vm/jit/verify/Makefile]
829 [src/vm/jit/x86_64/Makefile]
831 [tests/regression/Makefile]
832 [tests/regression/codepatching/Makefile]
833 [tests/regression/native/Makefile])
840 ## indent-tabs-mode: t
843 ## compile-command: "automake --add-missing"