jamvm

view configure.ac @ 401:3ca4c2fbbd7f

Handle difference between StackTraceElement constructors.

2008-08-04 Andrew John Hughes <gnu_andrew@member.fsf.org>

* configure.ac: Credit CACAO for
--with-java-runtime-library macro.
* src/excep.c,
* src/symbol.h:
Handle differing signature of StackTraceElement
constructor.
author andrew
date Tue Aug 05 05:16:11 2008 +0100 (2008-08-05)
parents 5baaa2bcac6b
children 24373fc1d951
line source
1 ##
2 ## Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
3 ## Robert Lougher <rob@lougher.org.uk>.
4 ##
5 ## This file is part of JamVM.
6 ##
7 ## This program is free software; you can redistribute it and/or
8 ## modify it under the terms of the GNU General Public License
9 ## as published by the Free Software Foundation; either version 2,
10 ## or (at your option) any later version.
11 ##
12 ## This program is distributed in the hope that it will be useful,
13 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ## GNU General Public License for more details.
16 ##
17 ## You should have received a copy of the GNU General Public License
18 ## along with this program; if not, write to the Free Software
19 ## Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 ##
22 dnl Process this file with autoconf to produce a configure script.
24 AC_INIT(src/jam.c)
25 AM_INIT_AUTOMAKE(jamvm, 1.5.1)
26 AC_CONFIG_HEADERS([src/config.h])
27 AC_PREFIX_DEFAULT(/usr/local/jamvm)
29 AC_CANONICAL_HOST
31 case "$host" in
32 i[[3456]]86-*-linux*) host_cpu=i386 host_os=linux ;;
33 i[[3456]]86-*-kfreebsd*) host_cpu=i386 host_os=linux ;;
34 i[[3456]]86-*-darwin*) host_cpu=i386 host_os=darwin ;;
35 arm*-*-darwin*) host_cpu=arm host_os=darwin libdl_needed=no ;;
36 i386-*-openbsd*) host_os=bsd libdl_needed=no ;;
37 i386-*-freebsd*) host_os=bsd libdl_needed=no ;;
38 x86_64-*-linux*) host_os=linux ;;
39 hppa*-*-linux*) host_cpu=parisc host_os=linux ;;
40 mipsel-*-linux*) host_cpu=mips host_os=linux ;;
41 amd64-*-openbsd*) host_os=bsd libdl_needed=no ;;
42 amd64-*-freebsd*) host_os=bsd libdl_needed=no ;;
43 arm*-*-linux*) host_cpu=arm host_os=linux ;;
44 arm*-*-openbsd*) host_cpu=arm host_os=bsd libdl_needed=no ;;
45 arm*-*-freebsd*) host_cpu=arm host_os=bsd libdl_needed=no ;;
46 powerpc*-*-linux*) host_cpu=powerpc host_os=linux ;;
47 powerpc*-*-openbsd*) host_cpu=powerpc host_os=bsd libdl_needed=no ;;
48 powerpc*-*-freebsd*) host_cpu=powerpc host_os=bsd libdl_needed=no ;;
49 powerpc-*-darwin*) host_os=darwin ;;
50 *) AC_MSG_ERROR($host not supported) ;;
51 esac
53 arch=$host_cpu
54 os=$host_os
55 AC_SUBST(arch)
56 AC_SUBST(os)
58 AC_ARG_ENABLE(tracegc,
59 [AS_HELP_STRING(--enable-tracegc,add gc tracing (for debugging))],
60 [if test "$enableval" != no; then
61 AC_DEFINE([TRACEGC],1,[defined if gc tracing enabled for debugging])
62 fi],)
64 AC_ARG_ENABLE(tracealloc,
65 [AS_HELP_STRING(--enable-tracealloc,add object allocation tracing (for debugging))],
66 [if test "$enableval" != no; then
67 AC_DEFINE([TRACEALLOC],1,[defined if object allocation tracing enabled for debugging])
68 fi],)
70 AC_ARG_ENABLE(tracefnlz,
71 [AS_HELP_STRING(--enable-tracefnlz,add object finalisation tracing (for debugging))],
72 [if test "$enableval" != no; then
73 AC_DEFINE([TRACEFNLZ],1,[defined if object finalisation tracing enabled for debugging])
74 fi],)
76 AC_ARG_ENABLE(tracedll,
77 [AS_HELP_STRING(--enable-tracedll,add library loading/lookup tracing (for debugging))],
78 [if test "$enableval" != no; then
79 AC_DEFINE([TRACEDLL],1,[defined if library loading/unloading tracing enabled for debugging])
80 fi],)
82 AC_ARG_ENABLE(tracelock,
83 [AS_HELP_STRING(--enable-tracelock,add object locking tracing (for debugging))],
84 [if test "$enableval" != no; then
85 AC_DEFINE([TRACELOCK],1,[defined if object locking tracing enabled for debugging])
86 fi],)
88 AC_ARG_ENABLE(tracethread,
89 [AS_HELP_STRING(--enable-tracethread,add thread creation tracing (for debugging))],
90 [if test "$enableval" != no; then
91 AC_DEFINE([TRACETHREAD],1,[defined if thread creation tracing enabled for debugging])
92 fi],)
94 AC_ARG_ENABLE(tracecompact,
95 [AS_HELP_STRING(--enable-tracecompact,add GC compaction phase tracing (for debugging))],
96 [if test "$enableval" != no; then
97 AC_DEFINE([TRACECOMPACT],1,[defined if GC compaction phase tracing enabled for debugging])
98 fi],)
100 AC_ARG_ENABLE(tracedirect,
101 [AS_HELP_STRING(--enable-tracedirect,add interpreter direct-mode tracing (for debugging))],
102 [if test "$enableval" != no; then
103 AC_DEFINE([TRACEDIRECT],1,[defined if interpreter direct-mode tracing enabled for debugging])
104 fi],)
106 AC_ARG_ENABLE(traceinlining,
107 [AS_HELP_STRING(--enable-traceinlining,add interpreter inlining tracing (for debugging))],
108 [if test "$enableval" != no; then
109 AC_DEFINE([TRACEINLINING],1,[defined if interpreter inlining tracing enabled for debugging])
110 fi],)
112 AC_ARG_ENABLE(trace,
113 [AS_HELP_STRING(--enable-trace,add all tracing (for debugging))],
114 [if test "$enableval" != no; then
115 AC_DEFINE([TRACEGC],1,[defined if gc tracing enabled for debugging])
116 AC_DEFINE([TRACEALLOC],1,[defined if object allocation tracing enabled for debugging])
117 AC_DEFINE([TRACEFNLZ],1,[defined if object finalisation tracing enabled for debugging])
118 AC_DEFINE([TRACEDLL],1,[defined if library loading/unloading tracing enabled for debugging])
119 AC_DEFINE([TRACELOCK],1,[defined if object locking tracing enabled for debugging])
120 AC_DEFINE([TRACETHREAD],1,[defined if thread creation tracing enabled for debugging])
121 AC_DEFINE([TRACECOMPACT],1,[defined if GC compaction phase tracing enabled for debugging])
122 AC_DEFINE([TRACEDIRECT],1,[defined if interpreter direct-mode tracing enabled for debugging])
123 AC_DEFINE([TRACEINLINING],1,[defined if interpreter inlining tracing enabled for debugging])
124 fi],)
126 AC_ARG_ENABLE(int-threading,
127 [AS_HELP_STRING(--enable-int-threading,enable threaded version of the interpreter (default enabled))],,)
129 AC_ARG_ENABLE(int-direct,
130 [AS_HELP_STRING(--enable-int-direct,enable direct threaded version of the interpreter (default enabled))],,)
132 AC_ARG_ENABLE(int-caching,
133 [AS_HELP_STRING(--enable-int-caching,enable stack-caching version of the interpreter
134 (disabled by default on x86-64, enabled otherwise))],,
135 [if test "$host_cpu" = x86_64; then
136 enable_int_caching=no
137 fi])
139 AC_ARG_ENABLE(int-prefetch,
140 [AS_HELP_STRING(--enable-int-prefetch,enable prefetching version of the interpreter
141 (by default enabled on powerpc, disabled otherwise))],,
142 [if test "$host_cpu" != powerpc; then
143 enable_int_prefetch=no
144 fi])
146 AC_ARG_ENABLE(runtime-reloc-checks,
147 [AS_HELP_STRING(--enable-runtime-reloc-checks,compute relocatability at runtime (inlining interpreter))],,
148 enable_runtime_reloc_checks=no)
150 AC_ARG_ENABLE(int-inlining,
151 [AS_HELP_STRING(--enable-int-inlining,enable inline threaded version of the interpreter
152 (by default enabled on x86_64, i386 and powerpc, disabled otherwise))],,
153 [if test "$host_cpu" = x86_64 -o "$host_cpu" = i386 -o "$host_cpu" = powerpc && \
154 test "$cross_compiling" = no -o "$enable_runtime_reloc_checks" != no; then
155 enable_int_inlining=yes
156 else
157 enable_int_inlining=no
158 fi])
160 if test "$enable_int_threading" != no; then
161 AC_DEFINE([THREADED],1,[interpreter threaded])
163 if test "$enable_int_caching" != no; then
164 AC_DEFINE([USE_CACHE],1,[interpreter uses caching])
165 fi
167 if test "$enable_int_direct" != no; then
168 AC_DEFINE([DIRECT],1,[interpreter direct])
170 if test "$enable_int_prefetch" != no; then
171 AC_DEFINE([PREFETCH],1,[interpreter uses prefetching])
172 fi
174 if test "$enable_int_inlining" != no; then
175 AC_DEFINE([INLINING],1,[interpreter inlining])
176 interp_cflags=-fno-reorder-blocks
178 if test "$enable_runtime_reloc_checks" != no; then
179 AC_DEFINE([RUNTIME_RELOC_CHECKS],1,[compute relocatability at runtime])
180 else
181 compile_time_reloc_checks=yes
182 fi
183 fi
184 fi
185 fi
187 AC_SUBST(interp_cflags)
188 AM_CONDITIONAL(COMPILE_TIME_RELOC_CHECKS, test "$compile_time_reloc_checks" = yes)
190 AC_ARG_ENABLE(ffi,
191 [AS_HELP_STRING(--enable-ffi,use libffi to call native methods)],,
192 [if test "$host_cpu" != parisc; then
193 enable_ffi=no
194 fi])
196 dnl Based on the AC_CHECK_WITH_JAVA_RUNTIME_LIBRARY function
197 dnl found in CACAO's m4/java-runtime-library.m4.
198 AC_MSG_CHECKING(which Java runtime library to use)
199 AC_ARG_WITH([java-runtime-library],
200 [AS_HELP_STRING(--with-java-runtime-library=<type>,specifies which type of classpath to use as Java runtime library (classpath,openjdk) [[default=classpath]])],
201 [case "${withval}" in
202 gnuclasspath)
203 WITH_JAVA_RUNTIME_LIBRARY=classpath
204 AC_DEFINE([WITH_JAVA_RUNTIME_LIBRARY_CLASSPATH], 1, [use GNU Classpath])
205 AC_SUBST(WITH_JAVA_RUNTIME_LIBRARY_CLASSPATH)
206 ;;
207 openjdk)
208 WITH_JAVA_RUNTIME_LIBRARY=openjdk
209 AC_DEFINE([WITH_JAVA_RUNTIME_LIBRARY_OPENJDK], 1, [use OpenJDK's Java SE classes])
210 AC_SUBST(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
211 ;;
212 *)
213 AC_MSG_ERROR(unknown classpath ${withval})
214 ;;
215 esac],
216 [WITH_JAVA_RUNTIME_LIBRARY=classpath
217 AC_DEFINE([WITH_JAVA_RUNTIME_LIBRARY_CLASSPATH], 1, [use GNU Classpath])
218 AC_SUBST(WITH_JAVA_RUNTIME_LIBRARY_CLASSPATH)])
219 AC_MSG_RESULT(${WITH_JAVA_RUNTIME_LIBRARY})
220 AM_CONDITIONAL([WITH_JAVA_RUNTIME_LIBRARY_CLASSPATH], test x"${WITH_JAVA_RUNTIME_LIBRARY}" = "xclasspath")
221 AM_CONDITIONAL([WITH_JAVA_RUNTIME_LIBRARY_OPENJDK], test x"${WITH_JAVA_RUNTIME_LIBRARY}" = "xopenjdk")
223 AC_ARG_WITH(java-runtime-library-install-dir,
224 [AS_HELP_STRING(--with-java-runtime-library-install-dir=<dir>,installation directory of Java runtime library
225 (default /usr/local/classpath))],,
226 [with_runtime_install_dir=/usr/local/classpath])
228 AC_DEFINE_UNQUOTED(RUNTIME_INSTALL_DIR, "$with_runtime_install_dir",
229 [Java runtime library installation directory (prefix)])
231 AC_SUBST(with_runtime_install_dir)
233 if test "$prefix" = "NONE"; then
234 install_dir=$ac_default_prefix
235 else
236 install_dir=$prefix
237 fi
238 AC_DEFINE_UNQUOTED(INSTALL_DIR, "$install_dir", [Installation directory (prefix)])
240 AC_ARG_ENABLE(zip,
241 [AS_HELP_STRING(--disable-zip,turn-off zip support in the bootstrap loader)],,)
243 dnl Initialise libtool
244 AC_DISABLE_STATIC
245 AC_PROG_LIBTOOL
247 dnl Checks for programs.
248 AC_PROG_CC
249 AM_PROG_AS
251 AC_CHECK_PROGS(JAVAC, ecj jikes "gcj -C" javac)
253 dnl Checks for libraries.
255 AC_CHECK_LIB(pthread,pthread_self,,AC_MSG_ERROR(libpthread is missing))
256 AC_CHECK_LIB(m,fmod,,AC_MSG_ERROR(libm is missing))
258 if test "$libdl_needed" != no; then
259 AC_CHECK_LIB(dl,dlopen,,AC_MSG_ERROR(libdl is missing))
260 fi
262 if test "$enable_zip" != no; then
263 AC_CHECK_LIB(z,inflate,,AC_MSG_ERROR(zlib is missing))
264 fi
266 if test "$enable_ffi" != no; then
267 AC_CHECK_LIB(ffi,ffi_call,,AC_MSG_ERROR(libffi is missing))
268 fi
270 dnl Checks for header files.
271 AC_HEADER_STDC
272 AC_CHECK_HEADERS(sys/time.h unistd.h endian.h sys/param.h locale.h)
274 if test "$enable_zip" != no; then
275 AC_CHECK_HEADER(zlib.h,,AC_MSG_ERROR(zlib.h is missing))
276 fi
278 if test "$enable_ffi" != no; then
279 AC_CHECK_HEADER(ffi.h,,AC_MSG_ERROR(ffi.h is missing))
280 fi
282 if test "$enable_zip" != no; then
283 AC_DEFINE([USE_ZIP],1,[use zip])
284 use_zip_yes=
285 use_zip_no='#'
286 else
287 use_zip_yes='#'
288 use_zip_no=
289 fi
291 AC_SUBST(use_zip_yes)
292 AC_SUBST(use_zip_no)
294 if test "$enable_ffi" != no; then
295 AC_DEFINE([USE_FFI],1,[use FFI])
296 fi
298 dnl Checks for typedefs, structures, and compiler characteristics.
299 AC_C_CONST
300 AC_HEADER_TIME
302 dnl Checks for library functions.
303 AC_FUNC_ALLOCA
304 AC_FUNC_MMAP
305 AC_CHECK_FUNCS(gettimeofday strtol setlocale)
306 AM_LC_MESSAGES
308 AM_MAINTAINER_MODE
310 AC_CONFIG_LINKS(src/arch.h:src/arch/$arch.h)
312 AC_CONFIG_FILES(
313 Makefile \
314 src/Makefile \
315 src/interp/Makefile \
316 src/interp/engine/Makefile \
317 src/arch/Makefile \
318 src/os/Makefile \
319 src/os/linux/Makefile \
320 src/os/darwin/Makefile \
321 src/os/bsd/Makefile \
322 src/os/linux/powerpc/Makefile \
323 src/os/linux/arm/Makefile \
324 src/os/linux/i386/Makefile \
325 src/os/linux/x86_64/Makefile \
326 src/os/linux/parisc/Makefile \
327 src/os/linux/mips/Makefile \
328 src/os/darwin/i386/Makefile \
329 src/os/darwin/arm/Makefile \
330 src/os/darwin/powerpc/Makefile \
331 src/os/bsd/powerpc/Makefile \
332 src/os/bsd/arm/Makefile \
333 src/os/bsd/i386/Makefile \
334 src/os/bsd/x86_64/Makefile \
335 lib/Makefile \
336 lib/java/Makefile \
337 lib/java/lang/Makefile \
338 lib/jamvm/Makefile \
339 lib/jamvm/java/Makefile \
340 lib/jamvm/java/lang/Makefile \
341 lib/java/lang/reflect/Makefile \
342 lib/java/security/Makefile \
343 lib/gnu/Makefile \
344 lib/sun/reflect/annotation/Makefile \
345 lib/sun/reflect/Makefile \
346 lib/sun/Makefile \
347 lib/gnu/classpath/Makefile)
349 AC_OUTPUT