1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(cacao, 0.95+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 CFLAGS="$CFLAGS -D__DARWIN__ -ansi -pedantic -Wall -Wno-long-long"
78 CFLAGS="$CFLAGS -D__FREEBSD__ -ansi -pedantic -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
83 CFLAGS="$CFLAGS -D__IRIX__"
88 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"
93 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"
101 dnl define some stuff required for --fullversion
102 AC_DEFINE_UNQUOTED(VERSION_CONFIGURE_ARGS, "$ac_configure_args", [configure arguments])
103 AC_DEFINE_UNQUOTED(VERSION_CC, "$CC", [CC used])
104 AC_DEFINE_UNQUOTED(VERSION_CFLAGS, "$CFLAGS", [CFLAGS used])
107 dnl define and substitute some architecture specific variables
108 AC_DEFINE_UNQUOTED([ARCH_DIR], "${ARCH_DIR}", [architecture directory])
111 AC_SUBST(USE_SCHEDULER)
114 dnl Checks for programs.
124 dnl Checks for header files.
127 AC_CHECK_HEADERS([fcntl.h])
128 AC_CHECK_HEADERS([sys/time.h])
129 AC_CHECK_HEADERS([unistd.h])
130 AC_CHECK_HEADERS([sys/ioctl.h])
132 dnl this is for fdlibm
133 AC_CHECK_HEADERS([stdint.h])
134 AC_CHECK_HEADERS([inttypes.h])
135 AC_CHECK_HEADERS([sys/config.h])
136 AC_CHECK_HEADERS([sys/types.h])
137 AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
138 AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
139 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]))
140 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]))
142 dnl Checks for typedefs, structures, and compiler characteristics.
151 dnl Checks for library functions.
152 AC_PROG_GCC_TRADITIONAL
155 AC_CHECK_FUNCS([calloc mprotect getpagesize free])
156 AC_CHECK_FUNCS([getcwd gettimeofday])
157 AC_CHECK_FUNCS([scandir])
158 AC_CHECK_FUNCS([mmap])
159 AC_CHECK_FUNCS([isnan])
161 dnl Checks for libraries.
163 dnl Checking sizeof void *
164 AC_CHECK_SIZEOF(void *)
168 dnl define install prefix
169 if test "x$prefix" = "xNONE"; then
170 CACAO_PREFIX=$ac_default_prefix
174 AC_DEFINE_UNQUOTED([CACAO_PREFIX], "${CACAO_PREFIX}", [installation prefix])
175 AC_SUBST(CACAO_PREFIX)
182 dnl check for JIT compiler
183 AC_MSG_CHECKING(whether JIT compiler should be compiled)
185 [AS_HELP_STRING(--disable-jit,disable JIT compiler [[default=yes]])],
186 [case "${enableval}" in
191 AC_MSG_RESULT(${ENABLE_JIT})
192 AM_CONDITIONAL([ENABLE_JIT], test x"${ENABLE_JIT}" = "xyes")
194 if test x"${ENABLE_JIT}" = "xyes"; then
195 AC_DEFINE([ENABLE_JIT], 1, [enable JIT compiler])
199 dnl check if softfloat should be used
200 AC_MSG_CHECKING(whether softfloat should be used)
201 AC_ARG_ENABLE([softfloat],
202 [AS_HELP_STRING(--enable-softfloat,use softfloat [[default=no]])],
203 [case "${enableval}" in
204 yes) ENABLE_SOFTFLOAT=yes;;
205 *) ENABLE_SOFTFLOAT=no;;
207 [ENABLE_SOFTFLOAT=no])
208 AC_MSG_RESULT(${ENABLE_SOFTFLOAT})
210 if test x"${ENABLE_SOFTFLOAT}" = "xyes"; then
211 AC_DEFINE([ENABLE_SOFTFLOAT], 1, [enable softfloat])
215 dnl check for interpreter
216 AC_ARG_ENABLE([intrp], [AS_HELP_STRING(--enable-intrp,enable interpreter [[default=no]])])
218 AC_MSG_CHECKING(whether interpreter should be compiled)
219 if test x"$enable_intrp" = "xyes"; then
221 AC_DEFINE([ENABLE_INTRP], 1, [enable interpreter])
222 AM_CONDITIONAL([ENABLE_INTRP], [true])
229 [AS_HELP_STRING(--with-ffi,use libffi to call native functions)],
231 AC_CHECK_HEADERS([ffi.h],, [AC_MSG_ERROR(cannot find ffi.h)])
232 AC_CHECK_LIB(ffi, ffi_call,, [AC_MSG_ERROR(cannot find libffi)])
233 AC_DEFINE([WITH_FFI], 1, [use libffi])],
236 dnl check for libffcall
237 AC_ARG_WITH([ffcall],
238 [AS_HELP_STRING(--with-ffcall,use libffcall to call native functions)],
240 AC_CHECK_HEADERS([avcall.h],, [AC_MSG_ERROR(cannot find avcall.h)])
241 AC_CHECK_LIB(avcall, __builtin_avcall,, [AC_MSG_ERROR(cannot find libavcall (from libffcall))])
242 AC_DEFINE([WITH_FFCALL], 1, [use libffcall])],
245 dnl check for libffi or libffcall
246 if test x"${WITH_FFI}" = "xyes" -a x"${WITH_FFCALL}" = "xyes"; then
247 AC_ERROR(Enable only libffi or libffcall.)
249 if test x"${WITH_FFI}" = "xno" -a x"${WITH_FFCALL}" = "xno"; then
250 AC_ERROR(Enable one of libffi or libffcall.)
255 AM_CONDITIONAL([ENABLE_INTRP], [false])
259 if test x"${ENABLE_JIT}" = "xno" -a x"${ENABLE_INTRP}" = "xno"; then
260 AC_ERROR(You have to enable at least the JIT or the interpreter.)
264 dnl check for garbage collector usage
265 AC_MSG_CHECKING(whether GC should be disabled)
267 [AS_HELP_STRING(--disable-gc,disable garbage collector (for debugging only!) [[default=yes]])],
268 [case "${enableval}" in
270 AC_DEFINE([DISABLE_GC], 1, [disable garbage collector])
275 AC_MSG_RESULT(${DISABLE_GC})
276 AM_CONDITIONAL([DISABLE_GC], test x"${DISABLE_GC}" = "xyes")
279 dnl check for dump memory usage
280 AC_MSG_CHECKING(whether dump memory should be disabled)
281 AC_ARG_ENABLE([dump],
282 [AS_HELP_STRING(--disable-dump,disable dump memory (for debugging only!) [[default=yes]])],
283 [case "${enableval}" in
286 AC_DEFINE([DISABLE_DUMP], 1, [disable dump memory])
291 AC_MSG_RESULT(${DISABLE_DUMP})
295 AC_MSG_CHECKING(whether debug code generation should be enabled)
296 AC_ARG_ENABLE([debug],
297 [AS_HELP_STRING(--disable-debug,disable debug code generation [[default=yes]])],
298 [case "${enableval}" in
300 AC_DEFINE([NDEBUG], 1, [disable debug code])
306 if test x"${NDEBUG}" = "xno"; then
311 AM_CONDITIONAL([NDEBUG], test x"${NDEBUG}" = "xyes")
314 dnl check for disassembler support
315 AC_MSG_CHECKING(whether disassembler should be enabled)
316 AC_ARG_ENABLE([disassembler],
317 [AS_HELP_STRING(--disable-disassembler,disable disassembler [[default=yes]])],
318 [case "${enableval}" in
319 no) ENABLE_DISASSEMBLER=no;;
320 *) ENABLE_DISASSEMBLER=yes;;
322 [ENABLE_DISASSEMBLER=yes])
323 AC_MSG_RESULT(${ENABLE_DISASSEMBLER})
324 AM_CONDITIONAL([ENABLE_DISASSEMBLER], test x"${ENABLE_DISASSEMBLER}" = "xyes")
326 if test x"${ENABLE_DISASSEMBLER}" = "xyes"; then
327 AC_DEFINE([ENABLE_DISASSEMBLER], 1, [enable disassembler])
329 dnl check for binutils headers and libraries on some architectures for the
331 case "${ARCH_DIR}" in
332 arm | i386 | powerpc | x86_64 )
333 AC_CHECK_HEADER([ansidecl.h],, [AC_MSG_ERROR(cannot find ansidecl.h)])
334 AC_CHECK_HEADER([symcat.h],, [AC_MSG_ERROR(cannot find symcat.h)])
335 AC_CHECK_HEADER([bfd.h],, [AC_MSG_ERROR(cannot find bfd.h)])
336 AC_CHECK_HEADER([dis-asm.h],, [AC_MSG_ERROR(cannot find dis-asm.h)])
339 cygwin | darwin | netbsd )
340 AC_CHECK_LIB(intl, dcgettext,, [AC_MSG_ERROR(cannot find libintl (from binutils))])
344 AC_CHECK_LIB(iberty, xstrerror,, [AC_MSG_ERROR(cannot find libiberty (from binutils))])
345 AC_CHECK_LIB(bfd, bfd_get_arch,, [AC_MSG_ERROR(cannot find libbfd (from binutils))])
346 AC_CHECK_LIB(opcodes, disassembler,, [AC_MSG_ERROR(cannot find libopcodes (from binutils))])
347 AC_DEFINE([WITH_BINUTILS_DISASSEMBLER], 1, [use binutils disassembler])
348 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [true])
351 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
355 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
359 dnl check for statistics
360 AC_MSG_CHECKING(whether statistics generation should be enabled)
361 AC_ARG_ENABLE([statistics],
362 [AS_HELP_STRING(--enable-statistics,enable statistics generation [[default=no]])],
363 [case "${enableval}" in
364 yes) ENABLE_STATISTICS=yes;;
365 *) ENABLE_STATISTICS=no;;
367 [ENABLE_STATISTICS=no])
368 AC_MSG_RESULT(${ENABLE_STATISTICS})
369 AM_CONDITIONAL([ENABLE_STATISTICS], test x"${ENABLE_STATISTICS}" = "xyes")
371 if test x"${ENABLE_STATISTICS}" = "xyes"; then
372 AC_DEFINE([ENABLE_STATISTICS], 1, [enable statistics])
376 dnl check for verifier
377 AC_MSG_CHECKING(whether classfile verification should be enabled)
378 AC_ARG_ENABLE([verifier],
379 [AS_HELP_STRING(--disable-verifier,disable classfile verification [[default=yes]])],
380 [case "${enableval}" in
381 no) ENABLE_VERIFIER=no;;
382 *) ENABLE_VERIFIER=yes;;
384 [ENABLE_VERIFIER=yes])
385 AC_MSG_RESULT(${ENABLE_VERIFIER})
386 AM_CONDITIONAL([ENABLE_VERIFIER], test x"${ENABLE_VERIFIER}" = "xyes")
388 if test x"${ENABLE_VERIFIER}" = "xyes"; then
389 AC_DEFINE([ENABLE_VERIFIER], 1, [enable classfile verification])
393 dnl check for compiler timing
394 AC_MSG_CHECKING(whether real-time timing should be enabled)
395 AC_ARG_ENABLE([rt-timing],
396 [AS_HELP_STRING(--enable-rt-timing,enable real-time timing [[default=no]])],
397 [case "${enableval}" in
398 yes) ENABLE_RT_TIMING=yes;;
399 *) ENABLE_RT_TIMING=no;;
401 [ENABLE_RT_TIMING=no])
402 AC_MSG_RESULT(${ENABLE_RT_TIMING})
403 AM_CONDITIONAL([ENABLE_RT_TIMING], test x"${ENABLE_RT_TIMING}" = "xyes")
405 if test x"${ENABLE_RT_TIMING}" = "xyes"; then
406 AC_DEFINE([ENABLE_RT_TIMING], 1, [enable real-time timing])
410 dnl check for cycle count statistics
411 AC_MSG_CHECKING(whether cycle count statistics should be enabled)
412 AC_ARG_ENABLE([cycles-stats],
413 [AS_HELP_STRING(--enable-cycles-stats,enable cycle count statistics [[default=no]])],
414 [case "${enableval}" in
415 yes) ENABLE_CYCLES_STATS=yes;;
416 *) ENABLE_CYCLES_STATS=no;;
418 [ENABLE_CYCLES_STATS=no])
419 AC_MSG_RESULT(${ENABLE_CYCLES_STATS})
420 AM_CONDITIONAL([ENABLE_CYCLES_STATS], test x"${ENABLE_CYCLES_STATS}" = "xyes")
422 if test x"${ENABLE_CYCLES_STATS}" = "xyes"; then
423 AC_DEFINE([ENABLE_CYCLES_STATS], 1, [enable cycle count statistics])
428 AC_MSG_CHECKING(whether to compile JVMTI support)
429 AC_ARG_ENABLE([jvmti],
430 [AS_HELP_STRING(--enable-jvmti,enable JVMTI [[default=no]])],
431 [case "${enableval}" in
432 yes) ENABLE_JVMTI=yes;;
436 AC_MSG_RESULT(${ENABLE_JVMTI})
437 AM_CONDITIONAL([ENABLE_JVMTI], test x"${ENABLE_JVMTI}" = "xyes")
439 if test x"${ENABLE_JVMTI}" = "xyes"; then
440 AC_DEFINE([ENABLE_JVMTI], 1, [use JVMTI])
445 AC_ARG_ENABLE([threads], [AS_HELP_STRING(--enable-threads,enable threads support (none,green,native) [[default=native]])])
446 AC_ARG_ENABLE([__thread], [AS_HELP_STRING(--enable-__thread,use TLS features)], [use__thread=$enableval], [use__thread=no])
448 AC_MSG_CHECKING(whether to include threads support)
449 enable_threads=${enable_threads:-native}
450 case "$enable_threads" in
453 dnl no threads for boehm
454 ac_configure_args="$ac_configure_args --disable-boehm-threads"
455 AM_CONDITIONAL([ENABLE_THREADS], [false])
458 native | posix | pthreads)
459 AC_DEFINE([ENABLE_THREADS], 1, [enable threads])
461 AM_CONDITIONAL([ENABLE_THREADS], [true])
463 AC_MSG_RESULT(yes, native)
464 AC_CHECK_LIB(pthread, main)
466 CFLAGS="$CFLAGS -D_REENTRANT"
468 dnl tell boehm to support threads as well
469 ac_configure_args="$ac_configure_args --enable-boehm-threads=posix"
473 AC_MSG_ERROR($enable_threads is an unknown thread package)
478 dnl Check whether the compiler supports the __thread keyword.
479 if test "x$use__thread" != xno; then
480 AC_CACHE_CHECK([for __thread], ac_cv_gcc___thread,
481 [cat > conftest.c <<\EOF
484 if AC_TRY_COMMAND([${CC-cc} $CFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD]); then
485 ac_cv_gcc___thread=yes
487 ac_cv_gcc___thread=no
490 if test "$ac_cv_gcc___thread" = yes; then
491 AC_DEFINE([HAVE___THREAD], 1, [have __thread])
494 ac_cv_gcc___thread=no
498 dnl check if if-conversion should be supported
499 AC_MSG_CHECKING(whether if-conversion should be supported)
500 AC_ARG_ENABLE([ifconv],
501 [AS_HELP_STRING(--disable-ifconv,disable if-conversion [[default=yes]])],
502 [case "${enableval}" in
503 no) ENABLE_IFCONV=no;;
504 *) ENABLE_IFCONV=yes;;
507 AC_MSG_RESULT(${ENABLE_IFCONV})
508 AM_CONDITIONAL([ENABLE_IFCONV], test x"${ENABLE_IFCONV}" = "xyes")
510 if test x"${ENABLE_IFCONV}" = "xyes"; then
511 AC_DEFINE([ENABLE_IFCONV], 1, [enable if-conversion])
515 dnl check for inlining
516 AC_MSG_CHECKING(whether method inlining should be supported)
517 AC_ARG_ENABLE([inlining],
518 [AS_HELP_STRING(--disable-inlining,disable method inlining [[default=yes]])],
519 [case "${enableval}" in
520 no) ENABLE_INLINING=no;;
521 *) ENABLE_INLINING=yes;;
523 [ENABLE_INLINING=yes])
524 AC_MSG_RESULT(${ENABLE_INLINING})
525 AM_CONDITIONAL([ENABLE_INLINING], test x"${ENABLE_INLINING}" = "xyes")
527 if test x"${ENABLE_INLINING}" = "xyes"; then
528 AC_DEFINE([ENABLE_INLINING], 1, [use method inlining])
532 dnl check for loop optimization
533 AC_MSG_CHECKING(whether loop optimization should be supported)
534 AC_ARG_ENABLE([loop],
535 [AS_HELP_STRING(--enable-loop,enable loop optimization [[default=no]])],
536 [case "${enableval}" in
537 yes) ENABLE_LOOP=yes;;
541 AC_MSG_RESULT(${ENABLE_LOOP})
542 AM_CONDITIONAL([ENABLE_LOOP], test x"${ENABLE_LOOP}" = "xyes")
544 if test x"${ENABLE_LOOP}" = "xyes"; then
545 AC_DEFINE([ENABLE_LOOP], 1, [use loop optimization])
549 dnl check if linear scan register allocator(lsra) should be used
550 AC_MSG_CHECKING(whether lsra should be supported)
551 AC_ARG_ENABLE([lsra],
552 [AS_HELP_STRING(--disable-lsra,disable linear scan register allocator [[default=yes]])],
553 [case "${enableval}" in
558 AC_MSG_RESULT(${ENABLE_LSRA})
559 AM_CONDITIONAL([ENABLE_LSRA], test x"${ENABLE_LSRA}" = "xyes")
561 if test x"${ENABLE_LSRA}" = "xyes"; then
562 AC_DEFINE([ENABLE_LSRA], 1, [enable lsra])
566 dnl check if profiling should be supported
567 AC_MSG_CHECKING(whether profiling should be supported)
568 AC_ARG_ENABLE([profiling],
569 [AS_HELP_STRING(--disable-profiling,disable profiling [[default=yes]])],
570 [case "${enableval}" in
571 no) ENABLE_PROFILING=no;;
572 *) ENABLE_PROFILING=yes;;
574 [ENABLE_PROFILING=yes])
575 AC_MSG_RESULT(${ENABLE_PROFILING})
576 AM_CONDITIONAL([ENABLE_PROFILING], test x"${ENABLE_PROFILING}" = "xyes")
578 if test x"${ENABLE_PROFILING}" = "xyes"; then
579 AC_DEFINE([ENABLE_PROFILING], 1, [enable profiling])
583 dnl check for instruction scheduler
584 AC_ARG_ENABLE([scheduler], [AS_HELP_STRING(--enable-scheduler,enable instruction scheduler [[default=no]])])
586 AC_MSG_CHECKING(whether instruction scheduler should be supported)
587 if test x"${USE_SCHEDULER}" = "x1" -o x"$enable_scheduler" = "xyes"; then
588 case "${ARCH_DIR}" in
592 AC_MSG_ERROR(instruction scheduler is not available for ${ARCH_DIR} code generator)
597 AC_DEFINE([USE_SCHEDULER], 1, [use scheduler])
598 AM_CONDITIONAL([USE_SCHEDULER], [true])
601 AM_CONDITIONAL([USE_SCHEDULER], [false])
605 dnl check if zlib should be used
606 AC_MSG_CHECKING(whether ZIP/JAR archives should be supported)
607 AC_ARG_ENABLE([zlib],
608 [AS_HELP_STRING(--disable-zlib,disable ZIP/JAR archive support (needs zlib) [[default=yes]])],
609 [case "${enableval}" in
614 AC_MSG_RESULT(${ENABLE_ZLIB})
616 if test x"${ENABLE_ZLIB}" = "xyes"; then
617 AC_CHECK_HEADERS([zconf.h],, [AC_MSG_ERROR(cannot find zconf.h)])
618 AC_CHECK_HEADERS([zlib.h],, [AC_MSG_ERROR(cannot find zlib.h)])
619 AC_CHECK_LIB(z, inflate,, [AC_MSG_ERROR(cannot find libz)])
620 AC_DEFINE([ENABLE_ZLIB], 1, [use zlib])
623 VM_ZIP_STRING=classes/
625 AC_DEFINE_UNQUOTED(VM_ZIP_STRING, "${VM_ZIP_STRING}", [define to the string base name of the VM zip file])
626 AC_SUBST(VM_ZIP_STRING)
627 AM_CONDITIONAL([ENABLE_ZLIB], test x"${ENABLE_ZLIB}" = "xyes")
630 dnl check if a libjvm.so should be built
631 AC_MSG_CHECKING(whether to build a libjvm.so)
632 AC_ARG_ENABLE([libjvm],
633 [AS_HELP_STRING(--disable-libjvm,build a libjvm.so [[default=yes]])],
634 [case "${enableval}" in
635 no) ENABLE_LIBJVM=no;;
636 *) ENABLE_LIBJVM=yes;;
639 AC_MSG_RESULT(${ENABLE_LIBJVM})
640 AM_CONDITIONAL([ENABLE_LIBJVM], test x"${ENABLE_LIBJVM}" = "xyes")
641 AC_SUBST(ENABLE_LIBJVM)
643 if test x"${ENABLE_LIBJVM}" = "xyes"; then
644 AC_DEFINE([ENABLE_LIBJVM], 1, [enable libjvm.so])
646 dnl set AC_ENABLE_SHARED and AC_DISABLE_STATIC properly
659 dnl check if CACAO should be linked statically
660 AC_MSG_CHECKING(whether to link CACAO statically)
661 AC_ARG_ENABLE([staticvm],
662 [AS_HELP_STRING(--enable-staticvm,link CACAO statically [[default=no]])],
663 [case "${enableval}" in
664 yes) ENABLE_STATICVM=yes
665 AC_DEFINE([ENABLE_STATICVM], 1, [link CACAO statically])
667 *) ENABLE_STATICVM=no;;
669 [ENABLE_STATICVM=no])
670 AC_MSG_RESULT(${ENABLE_STATICVM})
671 AM_CONDITIONAL([ENABLE_STATICVM], test x"${ENABLE_STATICVM}" = "xyes")
672 AC_SUBST(ENABLE_STATICVM)
675 dnl is GNU classpath installed somewhere different
676 AC_MSG_CHECKING(where GNU Classpath is installed)
677 AC_ARG_WITH([classpath-prefix],
678 [AS_HELP_STRING(--with-classpath-prefix=<dir>,installation directory of GNU Classpath [[default=/usr/local/classpath]])],
679 [CLASSPATH_PREFIX=${withval}],
680 [CLASSPATH_PREFIX=/usr/local/classpath])
681 AC_MSG_RESULT(${CLASSPATH_PREFIX})
682 AC_DEFINE_UNQUOTED([CLASSPATH_PREFIX], "${CLASSPATH_PREFIX}", [GNU Classpath installation directory])
683 AC_SUBST(CLASSPATH_PREFIX)
685 AC_MSG_CHECKING(where GNU Classpath libraries are installed)
686 AC_ARG_WITH([classpath-libdir],
687 [AS_HELP_STRING(--with-classpath-libdir=<dir>,installation directory of GNU Classpath libraries [[default=/usr/local/classpath/lib]])],
688 [CLASSPATH_LIBDIR=${withval}],
689 [CLASSPATH_LIBDIR=${CLASSPATH_PREFIX}/lib])
690 AC_MSG_RESULT(${CLASSPATH_LIBDIR})
692 dnl expand CLASSPATH_LIBDIR to something that is usable in C code
693 AS_AC_EXPAND([CLASSPATH_LIBDIR], ${CLASSPATH_LIBDIR})
694 AC_DEFINE_UNQUOTED([CLASSPATH_LIBDIR], "${CLASSPATH_LIBDIR}", [GNU Classpath libraries installation directory])
695 AC_SUBST(CLASSPATH_LIBDIR)
697 AC_CHECK_HEADER([${CLASSPATH_PREFIX}/include/jni.h],
698 [AC_DEFINE_UNQUOTED([CLASSPATH_JNI_H], "${CLASSPATH_PREFIX}/include/jni.h", [GNU Classpath jni.h header])],
699 [AC_MSG_ERROR(cannot find jni.h)])
702 dnl check if GNU Classpath should be linked statically into CACAO
703 AC_MSG_CHECKING(whether to link GNU Classpath native libraries statically into CACAO)
704 AC_ARG_WITH([static-classpath],
705 [AS_HELP_STRING(--with-static-classpath,link GNU classpath native libraries statically into CACAO [[default=no]])],
706 [case "${enableval}" in
707 yes) WITH_STATIC_CLASSPATH=yes;;
708 *) WITH_STATIC_CLASSPATH=no;;
710 [WITH_STATIC_CLASSPATH=no])
711 AC_MSG_RESULT(${WITH_STATIC_CLASSPATH})
713 if test x"${WITH_STATIC_CLASSPATH}" = "xyes"; then
714 AC_DEFINE([WITH_STATIC_CLASSPATH], 1, [link GNU classpath native libraries statically into CACAO])
716 dnl check for some classpath related stuff when we link statically
719 AC_CHECK_HEADERS([ltdl.h],, [AC_MSG_ERROR(cannot find ltdl.h)])
720 AC_CHECK_LIB(ltdl, lt_dlopen,, [AC_MSG_ERROR(cannot find libltdl)])
722 AM_CONDITIONAL([WITH_STATIC_CLASSPATH], test x"${WITH_STATIC_CLASSPATH}" = "xyes")
723 AC_SUBST(WITH_STATIC_CLASSPATH)
726 dnl Maybe the user has Classpath installed 'flat'.
727 AC_ARG_WITH([flat-classpath],
728 [AS_HELP_STRING(--with-flat-classpath, GNU Classpath is not zipped in the install directory)])
730 if test x"$with_flat_classpath" = "x"; then
731 GLIBJ_ZIP_STRING=glibj.zip
735 AC_SUBST(GLIBJ_ZIP_STRING)
736 AC_DEFINE_UNQUOTED(GLIBJ_ZIP_STRING, "$GLIBJ_ZIP_STRING", [define to the string base name of the classpath zip file])
739 dnl check for some programs we need
744 dnl now configure subpackages
745 dnl the export is not my favorite (is there another way?)
747 AC_CONFIG_SUBDIRS(src/boehm-gc)
750 AC_CONFIG_FILES([Makefile]
752 [contrib/setenvinstalled]
753 [contrib/setenvsource]
755 [doc/handbook/Makefile]
759 [src/cacaoh/Makefile]
760 [src/fdlibm/Makefile]
763 [src/native/Makefile]
764 [src/native/include/Makefile]
765 [src/native/jvmti/Makefile]
766 [src/native/tools/Makefile]
767 [src/native/vm/Makefile]
768 [src/scripts/Makefile]
769 [src/scripts/jarsigner]
771 [src/scripts/keytool]
773 [src/scripts/rmiregistry]
774 [src/threads/Makefile]
775 [src/threads/native/Makefile]
776 [src/toolbox/Makefile]
778 [src/vm/jit/Makefile]
779 [src/vm/jit/allocator/Makefile]
780 [src/vm/jit/alpha/Makefile]
781 [src/vm/jit/alpha/freebsd/Makefile]
782 [src/vm/jit/alpha/linux/Makefile]
783 [src/vm/jit/i386/Makefile]
784 [src/vm/jit/i386/freebsd/Makefile]
785 [src/vm/jit/i386/linux/Makefile]
786 [src/vm/jit/ifconv/Makefile]
787 [src/vm/jit/intrp/Makefile]
788 [src/vm/jit/inline/Makefile]
789 [src/vm/jit/loop/Makefile]
790 [src/vm/jit/mips/Makefile]
791 [src/vm/jit/mips/irix/Makefile]
792 [src/vm/jit/mips/linux/Makefile]
793 [src/vm/jit/powerpc/Makefile]
794 [src/vm/jit/powerpc/darwin/Makefile]
795 [src/vm/jit/powerpc/linux/Makefile]
796 [src/vm/jit/powerpc/netbsd/Makefile]
797 [src/vm/jit/profile/Makefile]
798 [src/vm/jit/schedule/Makefile]
799 [src/vm/jit/tools/Makefile]
800 [src/vm/jit/verify/Makefile]
801 [src/vm/jit/x86_64/Makefile]
803 [tests/regression/Makefile]
804 [tests/regression/codepatching/Makefile]
805 [tests/regression/native/Makefile])
812 ## indent-tabs-mode: t
815 ## compile-command: "automake --add-missing"