* src/native/Makefile.am (nativetable.inc): Pass classpath on
[cacao.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_INIT(cacao, 0.94+cvs, cacao@cacaojvm.org)
4 AC_CONFIG_SRCDIR(src/cacao/cacao.c)
5 AC_CANONICAL_HOST
6 AC_PREREQ(2.59)
7 AM_INIT_AUTOMAKE([1.9.0])
8 AM_MAINTAINER_MODE
9
10 AM_CONFIG_HEADER([config.h])
11
12 AC_PREFIX_DEFAULT(/usr/local/cacao)
13
14
15 dnl set optimization and debugging for all architectures and systems
16 if test x"$CFLAGS" = "x"; then
17         CFLAGS="-O0 -g3"
18 fi
19
20 dnl system type
21 case "$host_cpu" in
22 alpha | alphaev56 | alphapca56 )
23         ARCH_DIR="alpha"
24         CFLAGS="$CFLAGS -mieee -D__ALPHA__"
25         ;;
26
27 arm | armv4tl | armv5b )
28         ARCH_DIR="arm"
29         CFLAGS="$CFLAGS -D__ARM__"
30         ;;
31
32 i386 | i486 | i586 | i686 )
33         ARCH_DIR="i386"
34         CFLAGS="$CFLAGS -D__I386__"
35         ;;
36
37 mips )
38         ARCH_DIR="mips"
39         CFLAGS="$CFLAGS -D__MIPS__"
40         ;;
41
42 powerpc )
43         ARCH_DIR="powerpc"
44         CFLAGS="$CFLAGS -D__POWERPC__"
45         ;;
46
47 powerpc64 )
48         ARCH_DIR="powerpc64"
49         CFLAGS="$CFLAGS -D__POWERPC64__"
50         ;;
51
52 x86_64 )
53         ARCH_DIR="x86_64"
54         CFLAGS="$CFLAGS -D__X86_64__"
55         ;;
56
57 xdspcore )
58         ARCH_DIR="xdspcore"
59         ENABLE_STATICVM="yes"
60         CFLAGS="$CFLAGS -D__XDSPCORE__"
61         USE_SCHEDULER="1"
62         ;;
63 * )
64         AC_MSG_ERROR($host_cpu systems are not supported at this time)
65         ;;
66 esac
67
68 dnl host type
69 case "$host_os" in
70 *linux* | *Linux* )
71         OS_DIR="linux"
72         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"
73         ;;
74 *darwin* )
75         OS_DIR="darwin"
76         CFLAGS="$CFLAGS -D__DARWIN__ -ansi -pedantic -Wall -Wno-long-long"
77         ;;
78 *freebsd* )
79         OS_DIR="freebsd"
80         CFLAGS="$CFLAGS -D__FREEBSD__ -ansi -pedantic -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
81         ;;
82 *irix* )
83         OS_DIR="irix"
84         CFLAGS="$CFLAGS -D__IRIX__"
85         ;;
86 * )
87         ;;
88 esac
89
90
91 dnl define and substitute some architecture specific variables
92 AC_DEFINE_UNQUOTED([ARCH_DIR], "${ARCH_DIR}", [architecture directory])
93 AC_SUBST(ARCH_DIR)
94 AC_SUBST(OS_DIR)
95 AC_SUBST(USE_SCHEDULER)
96
97
98 dnl Checks for programs.
99 AC_PROG_CC
100 AM_PROG_AS
101 AC_PROG_LD
102 AC_PROG_LD_GNU
103 AC_PROG_RANLIB
104 AC_DISABLE_SHARED
105 AC_PROG_LN_S
106 AC_PROG_MAKE_SET
107 AM_PROG_MKDIR_P
108
109 dnl libtool stuff
110 AC_LIBTOOL_DLOPEN
111 AC_PROG_LIBTOOL
112
113 dnl Checks for header files.
114 AC_HEADER_DIRENT
115 AC_HEADER_STDC
116 AC_CHECK_HEADERS([fcntl.h])
117 AC_CHECK_HEADERS([sys/time.h])
118 AC_CHECK_HEADERS([unistd.h])
119 AC_CHECK_HEADERS([sys/ioctl.h])
120
121 dnl this is for fdlibm
122 AC_CHECK_HEADERS([stdint.h])
123 AC_CHECK_HEADERS([inttypes.h])
124 AC_CHECK_HEADERS([sys/config.h])
125 AC_CHECK_HEADERS([sys/types.h])
126 AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
127 AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
128 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]))
129 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]))
130
131 dnl Checks for typedefs, structures, and compiler characteristics.
132 AC_C_CONST
133 AC_C_INLINE
134 AC_C_ATTRIBUTE
135 AC_TYPE_OFF_T
136 AC_TYPE_SIZE_T
137 AC_HEADER_TIME
138 AC_STRUCT_TM
139
140 dnl Checks for library functions.
141 AC_PROG_GCC_TRADITIONAL
142 AC_TYPE_SIGNAL
143 AC_FUNC_MEMCMP
144 AC_CHECK_FUNCS([calloc mprotect getpagesize free])
145 AC_CHECK_FUNCS([getcwd gettimeofday])
146 AC_CHECK_FUNCS([scandir])
147 AC_CHECK_FUNCS([mmap])
148 AC_CHECK_FUNCS([isnan])
149
150 dnl Checks for libraries.
151
152 dnl Checking sizeof void *
153 AC_CHECK_SIZEOF(void *)
154 AC_C_BIGENDIAN
155
156
157 dnl check which ld flags are required to export symbols
158 if test x"$with_gnu_ld" = "xyes"; then
159     EXPORT_SYMBOLS_FLAGS="-Wl,--export-dynamic"
160 else
161     EXPORT_SYMBOLS_FLAGS=""
162 fi
163 AC_SUBST(EXPORT_SYMBOLS_FLAGS)
164
165
166 dnl define install prefix
167 if test "x$prefix" = "xNONE"; then
168     CACAO_PREFIX=$ac_default_prefix
169 else
170     CACAO_PREFIX=$prefix
171 fi
172 AC_DEFINE_UNQUOTED([CACAO_PREFIX], "${CACAO_PREFIX}", [installation prefix])
173 AC_SUBST(CACAO_PREFIX)
174
175
176 dnl Features
177
178 dnl check arguments
179
180 dnl check for JIT compiler
181 AC_MSG_CHECKING(whether JIT compiler should be compiled)
182 AC_ARG_ENABLE([jit],
183               [AS_HELP_STRING(--disable-jit,disable JIT compiler [[default=yes]])],
184               [case "${enableval}" in
185                    no) ENABLE_JIT=no;;
186                    *) ENABLE_JIT=yes;;
187                esac],
188               [ENABLE_JIT=yes])
189 AC_MSG_RESULT(${ENABLE_JIT})
190 AM_CONDITIONAL([ENABLE_JIT], test x"${ENABLE_JIT}" = "xyes")
191
192 if test x"${ENABLE_JIT}" = "xyes"; then
193     AC_DEFINE([ENABLE_JIT], 1, [enable JIT compiler])
194 fi
195
196
197 dnl check if softfloat should be used
198 AC_MSG_CHECKING(whether softfloat should be used)
199 AC_ARG_ENABLE([softfloat],
200               [AS_HELP_STRING(--enable-softfloat,use softfloat [[default=no]])],
201               [case "${enableval}" in
202                   yes) ENABLE_SOFTFLOAT=yes;;
203                   *) ENABLE_SOFTFLOAT=no;;
204                esac],
205               [ENABLE_SOFTFLOAT=no])
206 AC_MSG_RESULT(${ENABLE_SOFTFLOAT})
207
208 if test x"${ENABLE_SOFTFLOAT}" = "xyes"; then
209     AC_DEFINE([ENABLE_SOFTFLOAT], 1, [enable softfloat])
210 fi
211
212
213 dnl check for interpreter
214 AC_ARG_ENABLE([intrp], [AS_HELP_STRING(--enable-intrp,enable interpreter [[default=no]])])
215
216 AC_MSG_CHECKING(whether interpreter should be compiled)
217 if test x"$enable_intrp" = "xyes"; then
218     AC_MSG_RESULT(yes)
219     AC_DEFINE([ENABLE_INTRP], 1, [enable interpreter])
220     AM_CONDITIONAL([ENABLE_INTRP], [true])
221     ENABLE_INTRP=yes
222
223     AC_ASM_SKIP16
224
225     dnl check for libffi
226     AC_ARG_WITH([ffi],
227                 [AS_HELP_STRING(--with-ffi,use libffi to call native functions)],
228                 [WITH_FFI=yes
229                  AC_CHECK_HEADERS([ffi.h],, [AC_MSG_ERROR(cannot find ffi.h)])
230                  AC_CHECK_LIB(ffi, ffi_call,, [AC_MSG_ERROR(cannot find libffi)])
231                  AC_DEFINE([WITH_FFI], 1, [use libffi])],
232                 [WITH_FFI=no])
233
234     dnl check for libffcall
235     AC_ARG_WITH([ffcall],
236                 [AS_HELP_STRING(--with-ffcall,use libffcall to call native functions)],
237                 [WITH_FFCALL=yes
238                  AC_CHECK_HEADERS([avcall.h],, [AC_MSG_ERROR(cannot find avcall.h)])
239                  AC_CHECK_LIB(avcall, __builtin_avcall,, [AC_MSG_ERROR(cannot find libavcall (from libffcall))])
240                  AC_DEFINE([WITH_FFCALL], 1, [use libffcall])],
241                 [WITH_FFCALL=no])
242
243     dnl check for libffi or libffcall
244     if test x"${WITH_FFI}" = "xyes" -a x"${WITH_FFCALL}" = "xyes"; then
245         AC_ERROR(Enable only libffi or libffcall.)
246     fi
247     if test x"${WITH_FFI}" = "xno" -a x"${WITH_FFCALL}" = "xno"; then
248         AC_ERROR(Enable one of libffi or libffcall.)
249     fi
250
251 else
252     AC_MSG_RESULT(no)
253     AM_CONDITIONAL([ENABLE_INTRP], [false])
254     ENABLE_INTRP="no"
255 fi
256
257 if test x"${ENABLE_JIT}" = "xno" -a x"${ENABLE_INTRP}" = "xno"; then
258     AC_ERROR(You have to enable at least the JIT or the interpreter.)
259 fi
260
261
262 dnl check for garbage collector usage
263 AC_MSG_CHECKING(whether GC should be disabled)
264 AC_ARG_ENABLE([gc],
265               [AS_HELP_STRING(--disable-gc,disable garbage collector (for debugging only!) [[default=yes]])],
266               [case "${enableval}" in
267                    no) DISABLE_GC=yes
268                        AC_DEFINE([DISABLE_GC], 1, [disable garbage collector])
269                        ;;
270                    *) DISABLE_GC=no;;
271                esac],
272               [DISABLE_GC=no])
273 AC_MSG_RESULT(${DISABLE_GC})
274 AM_CONDITIONAL([DISABLE_GC], test x"${DISABLE_GC}" = "xyes")
275
276
277 dnl check for dump memory usage
278 AC_MSG_CHECKING(whether dump memory should be disabled)
279 AC_ARG_ENABLE([dump],
280               [AS_HELP_STRING(--disable-dump,disable dump memory (for debugging only!) [[default=yes]])],
281               [case "${enableval}" in
282                    no)
283                        DISABLE_DUMP=yes
284                        AC_DEFINE([DISABLE_DUMP], 1, [disable dump memory])
285                        ;;
286                    *) DISABLE_DUMP=no;;
287                esac],
288                [DISABLE_DUMP=no])
289 AC_MSG_RESULT(${DISABLE_DUMP})
290
291
292 dnl check for debug
293 AC_MSG_CHECKING(whether debug code generation should be enabled)
294 AC_ARG_ENABLE([debug],
295               [AS_HELP_STRING(--disable-debug,disable debug code generation [[default=yes]])],
296               [case "${enableval}" in
297                    no) NDEBUG=yes
298                        AC_DEFINE([NDEBUG], 1, [disable debug code])
299                        ;;
300                    *) NDEBUG=no;;
301                esac],
302               [NDEBUG=no])
303
304 if test x"${NDEBUG}" = "xno"; then
305     AC_MSG_RESULT(yes)
306
307     dnl check for binutils headers and libraries on some architectures for the
308     dnl disassembler
309     case "${ARCH_DIR}" in
310         arm | i386 | powerpc | x86_64 )
311             AC_CHECK_HEADER([ansidecl.h],, [AC_MSG_ERROR(cannot find ansidecl.h)])
312             AC_CHECK_HEADER([symcat.h],, [AC_MSG_ERROR(cannot find symcat.h)])
313             AC_CHECK_HEADER([bfd.h],, [AC_MSG_ERROR(cannot find bfd.h)])
314             AC_CHECK_HEADER([dis-asm.h],, [AC_MSG_ERROR(cannot find dis-asm.h)])
315
316             case "${OS_DIR}" in
317                 cygwin | darwin )
318                      AC_CHECK_LIB(intl, dcgettext,, [AC_MSG_ERROR(cannot find libintl (from bintuils))])
319                      ;;
320             esac
321
322             AC_CHECK_LIB(iberty, xstrerror,, [AC_MSG_ERROR(cannot find libiberty (from bintuils))])
323             AC_CHECK_LIB(bfd, bfd_get_arch,, [AC_MSG_ERROR(cannot find libbfd (from bintuils))])
324             AC_CHECK_LIB(opcodes, init_disassemble_info,, [AC_MSG_ERROR(cannot find libopcodes (from bintuils))])
325             AC_DEFINE([WITH_BINUTILS_DISASSEMBLER], 1, [use binutils disassembler])
326             AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [true])
327             ;;
328         * )
329             AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
330             ;;
331     esac
332
333 else
334     AC_MSG_RESULT(no)
335     AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
336 fi
337 AM_CONDITIONAL([NDEBUG], test x"${NDEBUG}" = "xyes")
338
339
340 dnl check for statistics
341 AC_MSG_CHECKING(whether statistics generation should be enabled)
342 AC_ARG_ENABLE([statistics],
343               [AS_HELP_STRING(--disable-statistics,disable statistics generation [[default=yes]])],
344               [case "${enableval}" in
345                    no) ENABLE_STATISTICS=no;;
346                    *) ENABLE_STATISTICS=yes;;
347                esac],
348               [ENABLE_STATISTICS=yes])
349 AC_MSG_RESULT(${ENABLE_STATISTICS})
350 AM_CONDITIONAL([ENABLE_STATISTICS], test x"${ENABLE_STATISTICS}" = "xyes")
351
352 if test x"${ENABLE_STATISTICS}" = "xyes"; then
353     AC_DEFINE([ENABLE_STATISTICS], 1, [enable statistics])
354 fi
355
356
357 dnl check for JVMTI
358 AC_MSG_CHECKING(whether to compile JVMTI support)
359 AC_ARG_ENABLE([jvmti],
360               [AS_HELP_STRING(--enable-jvmti,enable JVMTI [[default=no]])],
361               [case "${enableval}" in
362                    yes) ENABLE_JVMTI=yes;;
363                    *) ENABLE_JVMTI=no;;
364                esac],
365               [ENABLE_JVMTI=no])
366 AC_MSG_RESULT(${ENABLE_JVMTI})
367 AM_CONDITIONAL([ENABLE_JVMTI], test x"${ENABLE_JVMTI}" = "xyes")
368
369 if test x"${ENABLE_JVMTI}" = "xyes"; then
370     AC_DEFINE([ENABLE_JVMTI], 1, [use JVMTI])
371 fi
372
373
374 dnl threads
375 AC_ARG_ENABLE([threads], [AS_HELP_STRING(--enable-threads,enable threads support (none,green,native) [[default=native]])])
376 AC_ARG_ENABLE([__thread], [AS_HELP_STRING(--enable-__thread,use TLS features)], [use__thread=$enableval], [use__thread=no])
377
378 AC_MSG_CHECKING(whether to include threads support)
379 enable_threads=${enable_threads:-native}
380 case "$enable_threads" in
381 no | none | single)
382         AC_MSG_RESULT(no)
383         dnl no threads for boehm
384         ac_configure_args="$ac_configure_args --disable-boehm-threads"
385         AM_CONDITIONAL([USE_THREADS], [false])
386         AM_CONDITIONAL([NATIVE_THREADS], [false])
387         ;;
388
389 green | native | posix | pthreads)
390         AC_DEFINE([USE_THREADS], 1, [use threads])
391
392         AM_CONDITIONAL([USE_THREADS], [true])
393
394         if test x"$enable_threads" != "xgreen"; then
395                 AC_MSG_RESULT(yes, native)
396                 AC_CHECK_LIB(pthread, main)
397                 AC_DEFINE([NATIVE_THREADS], 1, [use pthreads])
398
399                 CFLAGS="$CFLAGS -D_REENTRANT"
400
401                 dnl tell boehm to support threads as well
402                 ac_configure_args="$ac_configure_args --enable-boehm-threads=posix"
403                 AM_CONDITIONAL([NATIVE_THREADS], [true])
404
405         else
406                 AC_MSG_RESULT(yes, green)
407
408                 dnl no threads for boehm
409                 ac_configure_args="$ac_configure_args --disable-boehm-threads"
410                 AM_CONDITIONAL([NATIVE_THREADS], [false])
411         fi
412     ;;
413 *)
414     AC_MSG_ERROR($enable_threads is an unknown thread package)
415     ;;
416 esac
417
418
419 dnl Check whether the compiler supports the __thread keyword.
420 if test "x$use__thread" != xno; then
421   AC_CACHE_CHECK([for __thread], ac_cv_gcc___thread,
422   [cat > conftest.c <<\EOF
423 __thread int a = 42;
424 EOF
425   if AC_TRY_COMMAND([${CC-cc} $CFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD]); then
426     ac_cv_gcc___thread=yes 
427   else
428     ac_cv_gcc___thread=no
429   fi
430   rm -f conftest*])
431   if test "$ac_cv_gcc___thread" = yes; then
432     AC_DEFINE([HAVE___THREAD], 1, [have __thread])
433   fi
434 else
435   ac_cv_gcc___thread=no
436 fi
437
438
439 dnl check if linear scan register allocator(lsra) should be used
440 AC_MSG_CHECKING(whether lsra should be supported)
441 AC_ARG_ENABLE([lsra],
442               [AS_HELP_STRING(--enable-lsra,enable linear scan register allocator [[default=yes]])],
443               [case "${enableval}" in
444                    no) ENABLE_LSRA=no;;
445                    *) ENABLE_LSRA=yes;;
446                esac],
447               [ENABLE_LSRA=yes])
448 AC_MSG_RESULT(${ENABLE_LSRA})
449 AM_CONDITIONAL([ENABLE_LSRA], test x"${ENABLE_LSRA}" = "xyes")
450    
451 if test x"${ENABLE_LSRA}" = "xyes"; then
452     AC_DEFINE([ENABLE_LSRA], 1, [enable lsra])
453 fi
454
455
456 dnl check for inlining
457 dnl AC_ARG_ENABLE([inlining], [AS_HELP_STRING(--disable-inlining,disable method inlining [[default=yes]])])
458
459 dnl AC_MSG_CHECKING(whether method inlining should be disabled)
460 dnl if test x"$enable_inlining" = "xno"; then
461 dnl     AC_MSG_RESULT(yes)
462 dnl     AM_CONDITIONAL([USE_INLINING], [false])
463 dnl else
464 dnl     AC_MSG_RESULT(no)
465         AC_DEFINE([USE_INLINING], 1, [use method inlining])
466         AM_CONDITIONAL([USE_INLINING], [true])
467 dnl fi
468
469
470 dnl check for instruction scheduler
471 AC_ARG_ENABLE([scheduler], [AS_HELP_STRING(--enable-scheduler,enable instruction scheduler [[default=no]])])
472
473 AC_MSG_CHECKING(whether instruction scheduler should be supported)
474 if test x"${USE_SCHEDULER}" = "x1" -o x"$enable_scheduler" = "xyes"; then
475         case "${ARCH_DIR}" in
476                 xdspcore )
477                         ;;
478                 * )
479                         AC_MSG_ERROR(instruction scheduler is not available for ${ARCH_DIR} code generator)
480                         ;;
481         esac
482
483         AC_MSG_RESULT(yes)
484         AC_DEFINE([USE_SCHEDULER], 1, [use scheduler])
485         AM_CONDITIONAL([USE_SCHEDULER], [true])
486 else
487         AC_MSG_RESULT(no)
488         AM_CONDITIONAL([USE_SCHEDULER], [false])
489 fi
490
491
492 dnl check if zlib should be used
493 AC_MSG_CHECKING(whether ZIP/JAR archives should be supported)
494 AC_ARG_ENABLE([zlib],
495               [AS_HELP_STRING(--disable-zlib,disable ZIP/JAR archive support (needs zlib) [[default=yes]])],
496               [case "${enableval}" in
497                   no) ENABLE_ZLIB=no;;
498                   *) ENABLE_ZLIB=yes;;
499                esac],
500               [ENABLE_ZLIB=yes])
501 AC_MSG_RESULT(${ENABLE_ZLIB})
502
503 if test x"${ENABLE_ZLIB}" = "xyes"; then
504     AC_CHECK_HEADERS([zconf.h],, [AC_MSG_ERROR(cannot find zconf.h)])
505     AC_CHECK_HEADERS([zlib.h],, [AC_MSG_ERROR(cannot find zlib.h)])
506     AC_CHECK_LIB(z, inflate,, [AC_MSG_ERROR(cannot find libz)])
507     AC_DEFINE([ENABLE_ZLIB], 1, [use zlib])
508 fi
509 AM_CONDITIONAL([ENABLE_ZLIB], test x"${ENABLE_ZLIB}" = "xyes")
510
511
512 dnl check if CACAO should be linked statically
513 AC_MSG_CHECKING(whether to link GNU classpath native libraries statically into CACAO)
514 AC_ARG_ENABLE([staticvm],
515               [AS_HELP_STRING(--enable-staticvm, link GNU classpath native libraries statically into CACAO [[default=no]])],
516               [case "${enableval}" in
517                   yes) ENABLE_STATICVM=yes;;
518                   *) ENABLE_STATICVM=no;;
519                esac],
520               [ENABLE_STATICVM=no])
521 AC_MSG_RESULT(${ENABLE_STATICVM})
522
523 if test x"${ENABLE_STATICVM}" = "xyes"; then
524     AC_DEFINE([ENABLE_STATICVM], 1, [link CACAO statically])
525
526     dnl check for some classpath related stuff when we link statically
527     AM_ICONV_LINK
528 else
529     AC_CHECK_HEADERS([ltdl.h],, [AC_MSG_ERROR(cannot find ltdl.h)])
530     AC_CHECK_LIB(ltdl, lt_dlopen,, [AC_MSG_ERROR(cannot find libltdl)])
531 fi
532 AM_CONDITIONAL([ENABLE_STATICVM], test x"${ENABLE_STATICVM}" = "xyes")
533 AC_SUBST(ENABLE_STATICVM)
534
535
536 dnl is GNU classpath installed somewhere different
537 AC_MSG_CHECKING(where GNU Classpath is installed)
538 AC_ARG_WITH([classpath-prefix],
539             [AS_HELP_STRING(--with-classpath-prefix=<dir>,installation directory of GNU Classpath [[default=/usr/local/classpath]])],
540             [CLASSPATH_PREFIX=${withval}],
541             [CLASSPATH_PREFIX=/usr/local/classpath])
542 AC_MSG_RESULT(${CLASSPATH_PREFIX})
543 AC_DEFINE_UNQUOTED([CLASSPATH_PREFIX], "${CLASSPATH_PREFIX}", [GNU Classpath installation directory])
544 AC_SUBST(CLASSPATH_PREFIX)
545
546 AC_MSG_CHECKING(where GNU Classpath libraries are installed)
547 AC_ARG_WITH([classpath-libdir],
548             [AS_HELP_STRING(--with-classpath-libdir=<dir>,installation directory of GNU Classpath libraries [[default=/usr/local/classpath/lib]])],
549             [CLASSPATH_LIBDIR=${withval}],
550             [CLASSPATH_LIBDIR=${CLASSPATH_PREFIX}/lib])
551 AC_MSG_RESULT(${CLASSPATH_LIBDIR})
552
553 dnl expand CLASSPATH_LIBDIR to something that is usable in C code
554 AS_AC_EXPAND([CLASSPATH_LIBDIR], ${CLASSPATH_LIBDIR})
555 AC_DEFINE_UNQUOTED([CLASSPATH_LIBDIR], "${CLASSPATH_LIBDIR}", [GNU Classpath libraries installation directory])
556
557 AC_SUBST(CLASSPATH_LIBDIR)
558
559
560
561 dnl Maybe the user has Classpath installed 'flat'.
562 AC_ARG_WITH([flat-classpath], [AS_HELP_STRING(--with-flat-classpath, GNU Classpath is not zipped in the install directory)])
563 if test x"$with_flat_classpath" = "x"; then
564         GLIBJZ=glibj.zip
565 else
566         GLIBJZ=
567 fi
568 AC_SUBST(GLIBJZ)
569 AC_DEFINE_UNQUOTED(GLIBJZ_STRING, "$GLIBJZ", [define to the string base name of the classpath zip file])
570
571
572 dnl check for some programs we need
573 AC_PROG_JAVAC
574 AC_PROG_JAR
575
576
577 dnl now configure subpackages
578 dnl the export is not my favorite (is there another way?)
579 export CFLAGS
580 AC_CONFIG_SUBDIRS(src/boehm-gc)
581
582 AC_CONFIG_FILES([Makefile]
583                 [contrib/Makefile]
584                 [contrib/setenvinstalled]
585                 [contrib/setenvsource]
586                 [doc/Makefile]
587                 [doc/handbook/Makefile]
588                 [man/Makefile]
589                 [src/Makefile]
590                 [src/cacao/Makefile]
591                 [src/cacaoh/Makefile]
592                 [src/fdlibm/Makefile]
593                 [src/lib/Makefile]
594                 [src/mm/Makefile]
595                 [src/native/Makefile]
596                 [src/native/include/Makefile]
597                 [src/native/jvmti/Makefile]
598                 [src/native/tools/Makefile]
599                 [src/native/vm/Makefile]
600                 [src/scripts/Makefile]
601                 [src/scripts/java]
602                 [src/scripts/rmiregistry]
603                 [src/threads/Makefile]
604                 [src/threads/green/Makefile]
605                 [src/threads/native/Makefile]
606                 [src/toolbox/Makefile]
607                 [src/vm/Makefile]
608                 [src/vm/jit/Makefile]
609                 [src/vm/jit/allocator/Makefile]
610                 [src/vm/jit/alpha/Makefile]
611                 [src/vm/jit/alpha/freebsd/Makefile]
612                 [src/vm/jit/alpha/linux/Makefile]
613                 [src/vm/jit/i386/Makefile]
614                 [src/vm/jit/i386/freebsd/Makefile]
615                 [src/vm/jit/i386/linux/Makefile]
616                 [src/vm/jit/intrp/Makefile]
617                 [src/vm/jit/inline/Makefile]
618                 [src/vm/jit/loop/Makefile]
619                 [src/vm/jit/mips/Makefile]
620                 [src/vm/jit/mips/irix/Makefile]
621                 [src/vm/jit/mips/linux/Makefile]
622                 [src/vm/jit/powerpc/Makefile]
623                 [src/vm/jit/powerpc/darwin/Makefile]
624                 [src/vm/jit/powerpc/linux/Makefile]
625                 [src/vm/jit/schedule/Makefile]
626                 [src/vm/jit/tools/Makefile]
627                 [src/vm/jit/verify/Makefile]
628                 [src/vm/jit/x86_64/Makefile]
629                 [tests/Makefile]
630                 [tests/regression/Makefile]
631                 [tests/regression/codepatching/Makefile]
632                 [tests/regression/native/Makefile])
633
634 AC_OUTPUT
635
636
637 ## Local variables:
638 ## mode: m4
639 ## indent-tabs-mode: t
640 ## c-basic-offset: 4
641 ## tab-width: 8
642 ## compile-command: "automake --add-missing"
643 ## End: