1 |
721 |
jeremybenn |
# Copyright (c) 1999, 2000, 2001, 2002, 2003, 2006, 2010, 2011 by Red Hat, Inc.
|
2 |
|
|
# All rights reserved.
|
3 |
|
|
# Copyright 2004 Nathanael Nerode
|
4 |
|
|
#
|
5 |
|
|
# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
|
6 |
|
|
# OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
|
7 |
|
|
#
|
8 |
|
|
# Permission is hereby granted to use or copy this program
|
9 |
|
|
# for any purpose, provided the above notices are retained on all copies.
|
10 |
|
|
# Permission to modify the code and to distribute modified code is granted,
|
11 |
|
|
# provided the above notices are retained, and a notice that the code was
|
12 |
|
|
# modified is included with the above copyright notice.
|
13 |
|
|
#
|
14 |
|
|
# Original author: Tom Tromey
|
15 |
|
|
# Modified by Nathanael Nerode
|
16 |
|
|
|
17 |
|
|
dnl Process this file with autoconf to produce configure.
|
18 |
|
|
|
19 |
|
|
AC_PREREQ(2.64)
|
20 |
|
|
AC_INIT
|
21 |
|
|
AC_CONFIG_SRCDIR(gcj_mlc.c)
|
22 |
|
|
# This works around the fact that libtool configuration may change LD
|
23 |
|
|
# for this particular configuration, but some shells, instead of
|
24 |
|
|
# keeping the changes in LD private, export them just because LD is
|
25 |
|
|
# exported.
|
26 |
|
|
ORIGINAL_LD_FOR_MULTILIBS=$LD
|
27 |
|
|
|
28 |
|
|
AM_ENABLE_MULTILIB(, ..)
|
29 |
|
|
|
30 |
|
|
AC_CANONICAL_HOST
|
31 |
|
|
AC_CANONICAL_TARGET
|
32 |
|
|
|
33 |
|
|
# Get the 'noncanonical' system names.
|
34 |
|
|
ACX_NONCANONICAL_TARGET
|
35 |
|
|
|
36 |
|
|
# This works around an automake problem.
|
37 |
|
|
mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs"
|
38 |
|
|
AC_SUBST(mkinstalldirs)
|
39 |
|
|
|
40 |
|
|
AM_INIT_AUTOMAKE(gc, 6.6, no-define)
|
41 |
|
|
|
42 |
|
|
# The autoconf 2.5x version of the no-executables hack.
|
43 |
|
|
GCC_NO_EXECUTABLES
|
44 |
|
|
|
45 |
|
|
# Yak. We must force CC and CXX to /not/ be precious variables; otherwise
|
46 |
|
|
# the wrong, non-multilib-adjusted value will be used in multilibs.
|
47 |
|
|
# As a side effect, we have to subst CFLAGS and CXXFLAGS ourselves.
|
48 |
|
|
|
49 |
|
|
m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
|
50 |
|
|
m4_define([_AC_ARG_VAR_PRECIOUS],[])
|
51 |
|
|
AC_PROG_CC
|
52 |
|
|
AC_PROG_CXX
|
53 |
|
|
m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
|
54 |
|
|
|
55 |
|
|
AM_PROG_CC_C_O
|
56 |
|
|
|
57 |
|
|
AC_SUBST(CFLAGS)
|
58 |
|
|
AC_SUBST(CXXFLAGS)
|
59 |
|
|
|
60 |
|
|
# Newer automakes demand CCAS and CCASFLAGS.
|
61 |
|
|
: ${CCAS='$(CC)'}
|
62 |
|
|
: ${CCASFLAGS='$(CFLAGS)'}
|
63 |
|
|
AC_SUBST(CCAS)
|
64 |
|
|
AC_SUBST(CCASFLAGS)
|
65 |
|
|
|
66 |
|
|
AC_CHECK_TOOL(AS, as)
|
67 |
|
|
AC_CHECK_TOOL(AR, ar)
|
68 |
|
|
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
69 |
|
|
|
70 |
|
|
AC_PROG_INSTALL
|
71 |
|
|
|
72 |
|
|
AM_MAINTAINER_MODE
|
73 |
|
|
|
74 |
|
|
. ${srcdir}/configure.host
|
75 |
|
|
|
76 |
|
|
case ${gc_basedir} in
|
77 |
|
|
/* | [A-Za-z]:[/\\]*) gc_flagbasedir=${gc_basedir} ;;
|
78 |
|
|
*) gc_flagbasedir='$(top_builddir)/'${gc_basedir} ;;
|
79 |
|
|
esac
|
80 |
|
|
|
81 |
|
|
gc_cflags="${gc_cflags} -Iinclude -I"'$(top_builddir)'"/./targ-include -I${gc_flagbasedir}/libc/include"
|
82 |
|
|
case "${host}" in
|
83 |
|
|
*-*-cygwin32*)
|
84 |
|
|
gc_cflags="${gc_cflags} -I${gc_flagbasedir}/../winsup/include"
|
85 |
|
|
;;
|
86 |
|
|
esac
|
87 |
|
|
|
88 |
|
|
dnl Add for mingw targets GC_BUILD option
|
89 |
|
|
case "${host}" in
|
90 |
|
|
*-*-mingw*)
|
91 |
|
|
gc_cflags="${gc_cflags} -DGC_BUILD=1"
|
92 |
|
|
;;
|
93 |
|
|
esac
|
94 |
|
|
|
95 |
|
|
dnl gc_cflags="${gc_cflags} -fno-builtin"
|
96 |
|
|
|
97 |
|
|
GC_CFLAGS=${gc_cflags}
|
98 |
|
|
AC_SUBST(GC_CFLAGS)
|
99 |
|
|
|
100 |
|
|
AC_PROG_LIBTOOL
|
101 |
|
|
|
102 |
|
|
dnl We use these options to decide which functions to include.
|
103 |
|
|
AC_ARG_WITH(target-subdir,
|
104 |
|
|
[ --with-target-subdir=SUBDIR
|
105 |
|
|
configuring with a cross compiler])
|
106 |
|
|
AC_ARG_WITH(cross-host,
|
107 |
|
|
[ --with-cross-host=HOST configuring with a cross compiler])
|
108 |
|
|
|
109 |
|
|
AC_MSG_CHECKING([for thread model used by GCC])
|
110 |
|
|
THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
|
111 |
|
|
if test -z "$THREADS"; then
|
112 |
|
|
THREADS=no
|
113 |
|
|
fi
|
114 |
|
|
AC_MSG_RESULT([$THREADS])
|
115 |
|
|
|
116 |
|
|
AC_ARG_ENABLE(parallel-mark,
|
117 |
|
|
[ --enable-parallel-mark parallelize marking and free list construction],
|
118 |
|
|
[case "$THREADS" in
|
119 |
|
|
no | none | single)
|
120 |
|
|
AC_MSG_ERROR([Parallel mark requires --enable-threads=x spec])
|
121 |
|
|
;;
|
122 |
|
|
esac]
|
123 |
|
|
)
|
124 |
|
|
|
125 |
|
|
AM_CPPFLAGS="-I`cd $srcdir && ${PWDCMD-pwd}`/include"
|
126 |
|
|
THREADCFLAGS=
|
127 |
|
|
THREADLIBS=
|
128 |
|
|
case "$THREADS" in
|
129 |
|
|
no | none | single)
|
130 |
|
|
THREADS=none
|
131 |
|
|
;;
|
132 |
|
|
posix | pthreads)
|
133 |
|
|
THREADS=posix
|
134 |
|
|
THREADLIBS=-lpthread
|
135 |
|
|
case "$host" in
|
136 |
|
|
x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha-*-linux*)
|
137 |
|
|
AC_DEFINE(GC_LINUX_THREADS,1,[support for Xavier Leroy's Linux threads])
|
138 |
|
|
AC_DEFINE(_REENTRANT,1,[Use reentrant code])
|
139 |
|
|
if test "${enable_parallel_mark}" = yes; then
|
140 |
|
|
AC_DEFINE(PARALLEL_MARK,1,[allow the marker to run in multiple threads])
|
141 |
|
|
fi
|
142 |
|
|
AC_DEFINE(THREAD_LOCAL_ALLOC,1,[define GC_local_malloc() & GC_local_malloc_atomic()])
|
143 |
|
|
;;
|
144 |
|
|
*-*-linux*)
|
145 |
|
|
AC_DEFINE(GC_LINUX_THREADS,1)
|
146 |
|
|
AC_DEFINE(_REENTRANT,1)
|
147 |
|
|
;;
|
148 |
|
|
*-*-aix*)
|
149 |
|
|
AC_DEFINE(GC_AIX_THREADS,1,[support AIX threads])
|
150 |
|
|
AC_DEFINE(_REENTRANT,1)
|
151 |
|
|
;;
|
152 |
|
|
*-*-hpux11*)
|
153 |
|
|
AC_MSG_WARN("Only HP-UX 11 POSIX threads are supported.")
|
154 |
|
|
AC_DEFINE(GC_HPUX_THREADS,1,[enables support for HP/UX 11 pthreads])
|
155 |
|
|
AC_DEFINE(_POSIX_C_SOURCE,199506L,[POSIX version of C Source])
|
156 |
|
|
if test "${enable_parallel_mark}" = yes; then
|
157 |
|
|
AC_DEFINE(PARALLEL_MARK,1)
|
158 |
|
|
fi
|
159 |
|
|
AC_DEFINE(THREAD_LOCAL_ALLOC,1)
|
160 |
|
|
THREADLIBS="-lpthread -lrt"
|
161 |
|
|
# HPUX needs REENTRANT for the _r calls.
|
162 |
|
|
AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads])
|
163 |
|
|
;;
|
164 |
|
|
*-*-hpux10*)
|
165 |
|
|
AC_MSG_WARN("Only HP-UX 11 POSIX threads are supported.")
|
166 |
|
|
;;
|
167 |
|
|
*-*-kfreebsd*-gnu)
|
168 |
|
|
AC_DEFINE(GC_FREEBSD_THREADS)
|
169 |
|
|
THREADCFLAGS=-pthread
|
170 |
|
|
THREADLIBS=-pthread
|
171 |
|
|
AC_DEFINE(_REENTRANT)
|
172 |
|
|
if test "${enable_parallel_mark}" = yes; then
|
173 |
|
|
AC_DEFINE(PARALLEL_MARK)
|
174 |
|
|
fi
|
175 |
|
|
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
176 |
|
|
AC_DEFINE(USE_COMPILER_TLS, 1,[use tls for boehm])
|
177 |
|
|
;;
|
178 |
|
|
*-*-freebsd*)
|
179 |
|
|
AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
|
180 |
|
|
AC_DEFINE(GC_FREEBSD_THREADS,1,[support FreeBSD threads])
|
181 |
|
|
THREADCFLAGS=-pthread
|
182 |
|
|
THREADLIBS=-pthread
|
183 |
|
|
;;
|
184 |
|
|
*-*-solaris2.8*)
|
185 |
|
|
AC_DEFINE(GC_SOLARIS_PTHREADS,1,[support for Solaris pthreads])
|
186 |
|
|
# Need to use alternate thread library, otherwise gctest hangs
|
187 |
|
|
# on Solaris 8.
|
188 |
|
|
multi_os_directory=`$CC -print-multi-os-directory`
|
189 |
|
|
THREADLIBS="-L/usr/lib/lwp/$multi_os_directory \
|
190 |
|
|
-R/usr/lib/lwp/$multi_os_directory -lpthread -lthread -lrt"
|
191 |
|
|
;;
|
192 |
|
|
*-*-solaris2*)
|
193 |
|
|
AC_DEFINE(GC_SOLARIS_PTHREADS,1,[support for Solaris pthreads])
|
194 |
|
|
# The alternate thread library was only introduced in Solaris 8 and
|
195 |
|
|
# became the default in Solaris 9, so no need for the special code
|
196 |
|
|
# above otherwise.
|
197 |
|
|
# nanosleep, sched_yield, and sem_* only live in librt before
|
198 |
|
|
# Solaris 11.
|
199 |
|
|
THREADLIBS="-lpthread -lrt"
|
200 |
|
|
;;
|
201 |
|
|
*-*-irix*)
|
202 |
|
|
AC_DEFINE(GC_IRIX_THREADS,1,[support for Irix pthreads])
|
203 |
|
|
;;
|
204 |
|
|
*-*-cygwin*)
|
205 |
|
|
AC_DEFINE(GC_WIN32_THREADS,1,[support for win32 threads])
|
206 |
|
|
;;
|
207 |
|
|
*-*-darwin*)
|
208 |
|
|
AC_DEFINE(GC_DARWIN_THREADS,1,[support for Mac OS X pthreads])
|
209 |
|
|
AC_DEFINE(THREAD_LOCAL_ALLOC,1)
|
210 |
|
|
if test "${enable_parallel_mark}" = yes; then
|
211 |
|
|
AC_DEFINE(PARALLEL_MARK,1)
|
212 |
|
|
fi
|
213 |
|
|
;;
|
214 |
|
|
*-*-osf*)
|
215 |
|
|
AC_DEFINE(GC_OSF1_THREADS,1,[support for Tru64 pthreads])
|
216 |
|
|
if test "${enable_parallel_mark}" = yes; then
|
217 |
|
|
AC_DEFINE(PARALLEL_MARK,1)
|
218 |
|
|
AC_DEFINE(THREAD_LOCAL_ALLOC,1)
|
219 |
|
|
# May want to enable it in other cases, too.
|
220 |
|
|
# Measurements havent yet been done.
|
221 |
|
|
fi
|
222 |
|
|
THREADCFLAGS=-pthread
|
223 |
|
|
THREADLIBS="-lpthread -lrt"
|
224 |
|
|
;;
|
225 |
|
|
esac
|
226 |
|
|
;;
|
227 |
|
|
win32)
|
228 |
|
|
AC_DEFINE(GC_WIN32_THREADS,1)
|
229 |
|
|
dnl Old wine getenv may not return NULL for missing entry.
|
230 |
|
|
dnl Define EMPTY_GETENV_RESULTS here to work around the bug.
|
231 |
|
|
;;
|
232 |
|
|
aix)
|
233 |
|
|
THREADS=posix
|
234 |
|
|
THREADLIBS=-lpthread
|
235 |
|
|
AC_DEFINE(GC_AIX_THREADS,1)
|
236 |
|
|
AC_DEFINE(_REENTRANT,1)
|
237 |
|
|
;;
|
238 |
|
|
dce | vxworks)
|
239 |
|
|
AC_MSG_ERROR(thread package $THREADS not yet supported)
|
240 |
|
|
;;
|
241 |
|
|
*)
|
242 |
|
|
AC_MSG_ERROR($THREADS is an unknown thread package)
|
243 |
|
|
;;
|
244 |
|
|
esac
|
245 |
|
|
AC_SUBST(THREADCFLAGS)
|
246 |
|
|
AC_SUBST(THREADLIBS)
|
247 |
|
|
|
248 |
|
|
case "$host" in
|
249 |
|
|
powerpc-*-darwin*)
|
250 |
|
|
powerpc_darwin=true
|
251 |
|
|
;;
|
252 |
|
|
esac
|
253 |
|
|
AM_CONDITIONAL(POWERPC_DARWIN,test x$powerpc_darwin = xtrue)
|
254 |
|
|
|
255 |
|
|
# Darwin needs a few extra special tests to deal with variation in the
|
256 |
|
|
# system headers.
|
257 |
|
|
case "$host" in
|
258 |
|
|
powerpc*-*-darwin*)
|
259 |
|
|
AC_CHECK_MEMBER(ppc_thread_state_t.r0,
|
260 |
|
|
AC_DEFINE(HAS_PPC_THREAD_STATE_R0,1,
|
261 |
|
|
[ppc_thread_state_t has field r0]),,
|
262 |
|
|
[#include ])
|
263 |
|
|
AC_CHECK_MEMBER(ppc_thread_state_t.__r0,
|
264 |
|
|
AC_DEFINE(HAS_PPC_THREAD_STATE___R0,1,dnl
|
265 |
|
|
[ppc_thread_state_t has field __r0]),,
|
266 |
|
|
[#include ])
|
267 |
|
|
AC_CHECK_MEMBER(ppc_thread_state64_t.r0,
|
268 |
|
|
AC_DEFINE(HAS_PPC_THREAD_STATE64_R0,1,dnl
|
269 |
|
|
[ppc_thread_state64_t has field r0]),,
|
270 |
|
|
[#include ])
|
271 |
|
|
AC_CHECK_MEMBER(ppc_thread_state64_t.__r0,
|
272 |
|
|
AC_DEFINE(HAS_PPC_THREAD_STATE64___R0,1,dnl
|
273 |
|
|
[ppc_thread_state64_t has field __r0]),,
|
274 |
|
|
[#include ])
|
275 |
|
|
;;
|
276 |
|
|
i?86*-*-darwin*)
|
277 |
|
|
AC_CHECK_MEMBER(x86_thread_state32_t.eax,
|
278 |
|
|
AC_DEFINE(HAS_X86_THREAD_STATE32_EAX,1,dnl
|
279 |
|
|
[x86_thread_state32_t has field eax]),,
|
280 |
|
|
[#include
|
281 |
|
|
#include ])
|
282 |
|
|
AC_CHECK_MEMBER(x86_thread_state32_t.__eax,
|
283 |
|
|
AC_DEFINE(HAS_X86_THREAD_STATE32___EAX,1,dnl
|
284 |
|
|
[x86_thread_state32_t has field __eax]),,
|
285 |
|
|
[#include
|
286 |
|
|
#include ])
|
287 |
|
|
;;
|
288 |
|
|
x86_64-*-darwin*)
|
289 |
|
|
AC_CHECK_MEMBER(x86_thread_state64_t.rax,
|
290 |
|
|
AC_DEFINE(HAS_X86_THREAD_STATE64_RAX,1,dnl
|
291 |
|
|
[x86_thread_state64_t has field rax]),,
|
292 |
|
|
[#include
|
293 |
|
|
#include ])
|
294 |
|
|
AC_CHECK_MEMBER(x86_thread_state64_t.__rax,
|
295 |
|
|
AC_DEFINE(HAS_X86_THREAD_STATE64___RAX,1,dnl
|
296 |
|
|
[x86_thread_state64_t has field __rax]),,
|
297 |
|
|
[#include
|
298 |
|
|
#include ])
|
299 |
|
|
;;
|
300 |
|
|
*) ;;
|
301 |
|
|
esac
|
302 |
|
|
|
303 |
|
|
case "$host" in
|
304 |
|
|
# While IRIX 6 has libdl for the O32 and N32 ABIs, it's missing for N64
|
305 |
|
|
# and unnecessary everywhere.
|
306 |
|
|
mips-sgi-irix6*) ;;
|
307 |
|
|
# We never want libdl on darwin. It is a fake libdl that just ends up making
|
308 |
|
|
# dyld calls anyway
|
309 |
|
|
*-*-darwin*) ;;
|
310 |
|
|
*)
|
311 |
|
|
AC_CHECK_LIB(dl, dlopen, EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl")
|
312 |
|
|
;;
|
313 |
|
|
esac
|
314 |
|
|
|
315 |
|
|
# extra LD Flags which are required for targets
|
316 |
|
|
case "${host}" in
|
317 |
|
|
*-*-darwin*)
|
318 |
|
|
extra_ldflags_libgc=-Wl,-single_module
|
319 |
|
|
;;
|
320 |
|
|
esac
|
321 |
|
|
AC_SUBST(extra_ldflags_libgc)
|
322 |
|
|
|
323 |
|
|
AC_SUBST(EXTRA_TEST_LIBS)
|
324 |
|
|
|
325 |
|
|
target_all=libgcjgc.la
|
326 |
|
|
AC_SUBST(target_all)
|
327 |
|
|
|
328 |
|
|
dnl If the target is an eCos system, use the appropriate eCos
|
329 |
|
|
dnl I/O routines.
|
330 |
|
|
dnl FIXME: this should not be a local option but a global target
|
331 |
|
|
dnl system; at present there is no eCos target.
|
332 |
|
|
TARGET_ECOS="no"
|
333 |
|
|
AC_ARG_WITH(ecos,
|
334 |
|
|
[ --with-ecos enable runtime eCos target support],
|
335 |
|
|
TARGET_ECOS="$with_ecos"
|
336 |
|
|
)
|
337 |
|
|
|
338 |
|
|
addobjs=
|
339 |
|
|
addlibs=
|
340 |
|
|
addincludes=
|
341 |
|
|
addtests=
|
342 |
|
|
case "$TARGET_ECOS" in
|
343 |
|
|
no)
|
344 |
|
|
;;
|
345 |
|
|
*)
|
346 |
|
|
AC_DEFINE(ECOS,1,[Target is ECOS])
|
347 |
|
|
AM_CPPFLAGS="${AM_CPPFLAGS} -I${TARGET_ECOS}/include"
|
348 |
|
|
addobjs="$addobjs ecos.lo"
|
349 |
|
|
;;
|
350 |
|
|
esac
|
351 |
|
|
|
352 |
|
|
if test "${enable_cplusplus}" = yes; then
|
353 |
|
|
addincludes="$addincludes include/gc_cpp.h include/gc_allocator.h"
|
354 |
|
|
addtests="$addtests test_cpp"
|
355 |
|
|
fi
|
356 |
|
|
|
357 |
|
|
AM_CONDITIONAL(CPLUSPLUS, test "${enable_cplusplus}" = yes)
|
358 |
|
|
|
359 |
|
|
AC_SUBST(CXX)
|
360 |
|
|
|
361 |
|
|
AC_SUBST(AM_CPPFLAGS)
|
362 |
|
|
|
363 |
|
|
# Configuration of shared libraries
|
364 |
|
|
#
|
365 |
|
|
AC_MSG_CHECKING(whether to build shared libraries)
|
366 |
|
|
AC_ENABLE_SHARED
|
367 |
|
|
|
368 |
|
|
case "$host" in
|
369 |
|
|
alpha-*-openbsd*)
|
370 |
|
|
enable_shared=no
|
371 |
|
|
AC_MSG_RESULT(no)
|
372 |
|
|
;;
|
373 |
|
|
*)
|
374 |
|
|
AC_MSG_RESULT(yes)
|
375 |
|
|
;;
|
376 |
|
|
esac
|
377 |
|
|
|
378 |
|
|
# Checks for pthreads functions
|
379 |
|
|
#
|
380 |
|
|
oldLIBS="$LIBS"
|
381 |
|
|
LIBS="$LIBS $THREADLIBS"
|
382 |
|
|
AC_CHECK_FUNCS([pthread_getattr_np])
|
383 |
|
|
AC_CHECK_FUNCS([pthread_get_stackaddr_np])
|
384 |
|
|
LIBS="$oldLIBS"
|
385 |
|
|
|
386 |
|
|
# Configuration of machine-dependent code
|
387 |
|
|
#
|
388 |
|
|
# Set NO_EXECUTE_PERMISSION by default because gcj already uses
|
389 |
|
|
# ffi_closure_{alloc,free} which takes care of allocating trampolines
|
390 |
|
|
# in executable memory.
|
391 |
|
|
#
|
392 |
|
|
AC_MSG_CHECKING(which machine-dependent code should be used)
|
393 |
|
|
machdep=
|
394 |
|
|
case "$host" in
|
395 |
|
|
alpha*-*-openbsd*)
|
396 |
|
|
machdep="alpha_mach_dep.lo"
|
397 |
|
|
if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then
|
398 |
|
|
AC_MSG_WARN(OpenBSD/Alpha without dlopen(). Shared library support is disabled)
|
399 |
|
|
fi
|
400 |
|
|
;;
|
401 |
|
|
alpha*-*-linux*)
|
402 |
|
|
machdep="alpha_mach_dep.lo"
|
403 |
|
|
;;
|
404 |
|
|
i?86-*-solaris2.[[89]] | i?86-*-solaris2.1? | x86_64-*-solaris2.1?)
|
405 |
|
|
AC_DEFINE(SOLARIS25_PROC_VDB_BUG_FIXED,1,[PROC_VDB in Solaris 2.5 gives wrong values for dirty bits])
|
406 |
|
|
;;
|
407 |
|
|
mipstx39-*-elf*)
|
408 |
|
|
machdep="mips_ultrix_mach_dep.lo"
|
409 |
|
|
AC_DEFINE(STACKBASE, __stackbase,[No description])
|
410 |
|
|
AC_DEFINE(DATASTART_IS_ETEXT,1,[No description])
|
411 |
|
|
;;
|
412 |
|
|
mips-dec-ultrix*)
|
413 |
|
|
machdep="mips_ultrix_mach-dep.lo"
|
414 |
|
|
;;
|
415 |
|
|
mips-nec-sysv*|mips-unknown-sysv*)
|
416 |
|
|
;;
|
417 |
|
|
mips*-*-linux*)
|
418 |
|
|
;;
|
419 |
|
|
mips-*-*)
|
420 |
|
|
machdep="mips_sgi_mach_dep.lo"
|
421 |
|
|
;;
|
422 |
|
|
sparc-*-netbsd*)
|
423 |
|
|
machdep="sparc_netbsd_mach_dep.lo"
|
424 |
|
|
;;
|
425 |
|
|
sparc-sun-solaris2.3)
|
426 |
|
|
machdep="sparc_mach_dep.lo"
|
427 |
|
|
AC_DEFINE(SUNOS53_SHARED_LIB,1,[Avoid Solaris 5.3 dynamic library bug])
|
428 |
|
|
;;
|
429 |
|
|
sparc*-sun-solaris2.*)
|
430 |
|
|
machdep="sparc_mach_dep.lo"
|
431 |
|
|
;;
|
432 |
|
|
ia64-*-*)
|
433 |
|
|
machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
|
434 |
|
|
;;
|
435 |
|
|
esac
|
436 |
|
|
AC_DEFINE(NO_EXECUTE_PERMISSION,1,[cause some or all of the heap to not have execute permission])
|
437 |
|
|
if test x"$machdep" = x; then
|
438 |
|
|
AC_MSG_RESULT($machdep)
|
439 |
|
|
machdep="mach_dep.lo"
|
440 |
|
|
fi
|
441 |
|
|
addobjs="$addobjs $machdep"
|
442 |
|
|
AC_SUBST(addobjs)
|
443 |
|
|
AC_SUBST(addincludes)
|
444 |
|
|
AC_SUBST(addlibs)
|
445 |
|
|
AC_SUBST(addtests)
|
446 |
|
|
|
447 |
|
|
dnl As of 4.13a2, the collector will not properly work on Solaris when
|
448 |
|
|
dnl built with gcc and -O. So we remove -O in the appropriate case.
|
449 |
|
|
dnl Not needed anymore on Solaris.
|
450 |
|
|
AC_MSG_CHECKING([whether GCC optimization should be disabled])
|
451 |
|
|
O0_CFLAGS=
|
452 |
|
|
case "$host" in
|
453 |
|
|
*aix*) test "$GCC" = yes && O0_CFLAGS=-O0 ;;
|
454 |
|
|
*) ;;
|
455 |
|
|
esac
|
456 |
|
|
if test x"$O0_CFLAGS" != x; then
|
457 |
|
|
AC_MSG_RESULT(yes)
|
458 |
|
|
else
|
459 |
|
|
AC_MSG_RESULT(no)
|
460 |
|
|
fi
|
461 |
|
|
AC_SUBST([O0_CFLAGS])
|
462 |
|
|
|
463 |
|
|
dnl Include defines that have become de facto standard.
|
464 |
|
|
dnl ALL_INTERIOR_POINTERS can be overridden in startup code.
|
465 |
|
|
AC_DEFINE(SILENT,1,[disables statistics printing])
|
466 |
|
|
AC_DEFINE(NO_SIGNALS,1,[does not disable signals])
|
467 |
|
|
AC_DEFINE(ALL_INTERIOR_POINTERS,1,[allows all pointers to the interior of objects to be recognized])
|
468 |
|
|
|
469 |
|
|
dnl By default, make the library as general as possible.
|
470 |
|
|
AC_DEFINE(JAVA_FINALIZATION,1,[make it somewhat safer to finalize objects out of order])
|
471 |
|
|
AC_DEFINE(GC_GCJ_SUPPORT,1,[include support for gcj])
|
472 |
|
|
AC_DEFINE(ATOMIC_UNCOLLECTABLE,1,[include code for GC_malloc_atomic_uncollectable])
|
473 |
|
|
|
474 |
|
|
AC_ARG_ENABLE(gc-debug,
|
475 |
|
|
[ --enable-gc-debug include full support for pointer backtracing etc.],
|
476 |
|
|
[ if test "$enable_gc_debug" = "yes"; then
|
477 |
|
|
AC_MSG_WARN("Must define GC_DEBUG and use debug alloc. in clients.")
|
478 |
|
|
AC_DEFINE(KEEP_BACK_PTRS,1,[Add code to save back pointers])
|
479 |
|
|
AC_DEFINE(DBG_HDRS_ALL,1,[Make sure that all objects have debug headers])
|
480 |
|
|
case $host in
|
481 |
|
|
ia64-*-linux* )
|
482 |
|
|
AC_DEFINE(MAKE_BACK_GRAPH,1,[Enable GC_PRINT_BACK_HEIGHT environment variable])
|
483 |
|
|
;;
|
484 |
|
|
x86-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
|
485 |
|
|
AC_DEFINE(MAKE_BACK_GRAPH,1)
|
486 |
|
|
AC_MSG_WARN("Client must not use -fomit-frame-pointer.")
|
487 |
|
|
AC_DEFINE(SAVE_CALL_COUNT, 8, [number of call frames saved with objects allocated through the debugging interface])
|
488 |
|
|
;;
|
489 |
|
|
esac
|
490 |
|
|
fi])
|
491 |
|
|
|
492 |
|
|
if test "${gc_use_mmap}" = "yes"; then
|
493 |
|
|
AC_DEFINE(USE_MMAP, 1, [use MMAP instead of sbrk to get new memory])
|
494 |
|
|
fi
|
495 |
|
|
|
496 |
|
|
if test -n "$with_cross_host" &&
|
497 |
|
|
test x"$with_cross_host" != x"no"; then
|
498 |
|
|
toolexecdir='$(exec_prefix)/$(target_noncanonical)'
|
499 |
|
|
toolexeclibdir='$(toolexecdir)/lib'
|
500 |
|
|
else
|
501 |
|
|
toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)'
|
502 |
|
|
toolexeclibdir='$(libdir)'
|
503 |
|
|
fi
|
504 |
|
|
multi_os_directory=`$CC -print-multi-os-directory`
|
505 |
|
|
case $multi_os_directory in
|
506 |
|
|
.) ;; # Avoid trailing /.
|
507 |
|
|
*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
|
508 |
|
|
esac
|
509 |
|
|
AC_SUBST(toolexecdir)
|
510 |
|
|
AC_SUBST(toolexeclibdir)
|
511 |
|
|
|
512 |
|
|
if test "${multilib}" = "yes"; then
|
513 |
|
|
multilib_arg="--enable-multilib"
|
514 |
|
|
else
|
515 |
|
|
multilib_arg=
|
516 |
|
|
fi
|
517 |
|
|
|
518 |
|
|
AC_CONFIG_HEADERS([include/gc_config.h include/gc_ext_config.h])
|
519 |
|
|
|
520 |
|
|
AC_CONFIG_FILES(Makefile include/Makefile testsuite/Makefile threads.mk)
|
521 |
|
|
AC_OUTPUT
|