e1d6e672c8f2ae85734cd36c2281850605b004ae
[org.ibex.core.git] / upstream / gcc-3.3 / patches / darwin-gc.patch
1 diff -buNr boehm-gc/ChangeLog boehm-gc/ChangeLog
2 --- boehm-gc/ChangeLog  Tue May 13 17:08:56 2003
3 +++ boehm-gc/ChangeLog  Sat Sep 13 01:32:41 2003
4 @@ -1,69 +1,3 @@
5 -2003-05-13  Release Manager
6 -
7 -       * GCC 3.3 Released.
8 -
9 -2003-05-13  Release Manager
10 -
11 -       * GCC 3.3 Released.
12 -
13 -2003-05-13  Release Manager
14 -
15 -       * GCC 3.3 Released.
16 -
17 -2003-05-13  Release Manager
18 -
19 -       * GCC 3.3 Released.
20 -
21 -2003-04-28  Mohan Embar  <gnustuff@thisiscool.com>
22 -
23 -       * configure.in: define GC_DLL under mingw if --enable-shared
24 -       * configure: rebuilt
25 -       * win32_threads.c: add #ifdef GC_DLL around DllMain
26 -
27 -2003-04-09  Tom Tromey  <tromey@redhat.com>
28 -
29 -       * include/private/gcconfig.h (LINUX_STACKBOTTOM): Define for
30 -       POWERPC.
31 -       (STACK_GRAN, HEURISTIC1): Don't define for POWERPC.
32 -
33 -2003-03-04  Hans Boehm <Hans.Boehm@hp.com>
34 -       * include/private/gcconfig.h (GC_data_start): declare when needed.
35 -       * include/private/gc_priv.h: Include gcconfig.h after ptr_t
36 -       declaration.
37 -
38 -2003-03-03  Hans Boehm  <Hans.Boehm@hp.com>
39 -       * mark_rts.c (GC_cond_register_dynamic_libraries): add.
40 -       (GC_push_roots): explicitly mark free list headers, register
41 -       dynamic libraries only if !REGISTER_LIBRARIES_EARLY.
42 -       * alloc.c (GC_stopped_mark): Conditionally call
43 -       GC_cond_register_dynamic_libraries().
44 -       (GC_collect_a_little_inner, GC_try_to_collect_inner): Check GC_dont_gc.
45 -       * dyn_load.c (GC_register_main_static_data): define.
46 -       (GC_register_dyn_libraries (Linux /proc, Linux ELF versions)):
47 -       no longer skip main data. Register main data for static executable.
48 -       * misc.c (GC_REGISTER_MAIN_STATIC_DATA): define.
49 -       (GC_init_inner): Make main data registration conditional.
50 -       * include/private/gc_priv.h (GC_register_main_static_data): declare.
51 -       * include/private/gcconfig.h (REGISTER_LIBRARIES_EARLY): define
52 -       for LINUX.
53 -
54 -2003-02-20  Alexandre Oliva  <aoliva@redhat.com>
55 -
56 -       * configure.in: Propagate ORIGINAL_LD_FOR_MULTILIBS to
57 -       config.status.
58 -       * configure: Rebuilt.
59 -
60 -2003-02-11  Andreas Tobler  <a.tobler@schweiz.ch>
61 -
62 -       * include/private/gcconfig.h: undefine MPROTECT_VDB for MACOSX
63 -
64 -2003-01-27  Alexandre Oliva  <aoliva@redhat.com>
65 -
66 -       * configure.in (toolexecdir, toolexeclibdir): Set and AC_SUBST.
67 -       Remove USE_LIBDIR conditional.
68 -       * Makefile.am (toolexecdir, toolexeclibdir): Don't override.
69 -       * Makefile.in, configure: Rebuilt.
70 -
71  2002-12-31  Tom Tromey  <tromey@redhat.com>
72  
73         For PR libgcj/8933:
74 diff -buNr boehm-gc/Makefile.am boehm-gc/Makefile.am
75 --- boehm-gc/Makefile.am        Mon Jan 27 17:44:52 2003
76 +++ boehm-gc/Makefile.am        Sat Sep 13 01:32:41 2003
77 @@ -16,22 +16,38 @@
78  MULTIDO = true
79  MULTICLEAN = true
80  
81 +## Install a library built with a cross compiler in tooldir, not
82 +## libdir.
83 +if USE_LIBDIR
84 +toolexeclibdir = $(libdir)$(MULTISUBDIR)
85 +else
86 +toolexecdir = $(exec_prefix)/$(target_alias)
87 +toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
88 +endif
89 +
90  noinst_LTLIBRARIES = libgcjgc.la libgcjgc_convenience.la
91  
92  GC_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
93  dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c irix_threads.c \
94 -linux_threads.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
95 +malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
96  obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
97  solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \
98 -backgraph.c win32_threads.c
99 +backgraph.c win32_threads.c \
100 +pthread_support.c pthread_stop_world.c darwin_stop_world.c
101  
102 -EXTRA_GC_SOURCES = alpha_mach_dep.s \
103 -mips_sgi_mach_dep.S mips_ultrix_mach_dep.s powerpc_macosx_mach_dep.s \
104 -rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
105 -sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
106 +EXTRA_GC_SOURCES = alpha_mach_dep.S \
107 +    mips_sgi_mach_dep.S mips_ultrix_mach_dep.s powerpc_darwin_mach_dep.s \
108 +    rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
109 +    sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
110 +
111 +if POWERPC_DARWIN
112 +asm_libgc_sources = powerpc_darwin_mach_dep.s
113 +else
114 +asm_libgc_sources = 
115 +endif
116  
117 -libgcjgc_la_SOURCES = $(GC_SOURCES)
118 -libgcjgc_convenience_la_SOURCES = $(GC_SOURCES)
119 +libgcjgc_la_SOURCES = $(GC_SOURCES) $(asm_libgc_sources)
120 +libgcjgc_convenience_la_SOURCES = $(GC_SOURCES) $(asm_libgc_sources)
121  EXTRA_libgcjgc_la_SOURCES = $(EXTRA_GC_SOURCES)
122  EXTRA_libgcjgc_convenience_la_SOURCES = $(EXTRA_GC_SOURCES)
123  
124 @@ -77,8 +93,6 @@
125         $(AM_CPPFLAGS) $(CPPFLAGS) \
126         $(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS) 
127  LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
128 -
129 -AM_CFLAGS = @GC_CFLAGS@
130  
131  # Work around what appears to be a GNU make bug handling MAKEFLAGS
132  # values defined in terms of make variables, as is the case for CC and
133 diff -buNr boehm-gc/Makefile.am~ boehm-gc/Makefile.am~
134 --- boehm-gc/Makefile.am~       Wed Dec 31 16:00:00 1969
135 +++ boehm-gc/Makefile.am~       Sat Sep 13 01:32:41 2003
136 @@ -0,0 +1,159 @@
137 +## Process this file with automake to produce Makefile.in.
138 +
139 +## FIXME: `make dist' in this directory will not currently work.  Many
140 +## files that should be in the distribution are not mentioned in this
141 +## Makefile.am.
142 +
143 +AUTOMAKE_OPTIONS = cygnus
144 +
145 +SUBDIRS = include
146 +
147 +# Multilib support variables.
148 +MULTISRCTOP =
149 +MULTIBUILDTOP =
150 +MULTIDIRS =
151 +MULTISUBDIR =
152 +MULTIDO = true
153 +MULTICLEAN = true
154 +
155 +## Install a library built with a cross compiler in tooldir, not
156 +## libdir.
157 +if USE_LIBDIR
158 +toolexeclibdir = $(libdir)$(MULTISUBDIR)
159 +else
160 +toolexecdir = $(exec_prefix)/$(target_alias)
161 +toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
162 +endif
163 +
164 +noinst_LTLIBRARIES = libgcjgc.la libgcjgc_convenience.la
165 +
166 +GC_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
167 +dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c irix_threads.c \
168 +linux_threads.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
169 +obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
170 +solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \
171 +backgraph.c win32_threads.c
172 +
173 +EXTRA_GC_SOURCES = alpha_mach_dep.s \
174 +mips_sgi_mach_dep.S mips_ultrix_mach_dep.s powerpc_macosx_mach_dep.s \
175 +rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
176 +sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
177 +
178 +libgcjgc_la_SOURCES = $(GC_SOURCES)
179 +libgcjgc_convenience_la_SOURCES = $(GC_SOURCES)
180 +EXTRA_libgcjgc_la_SOURCES = $(EXTRA_GC_SOURCES)
181 +EXTRA_libgcjgc_convenience_la_SOURCES = $(EXTRA_GC_SOURCES)
182 +
183 +# Include THREADLIBS here to ensure that the correct versions of
184 +# linuxthread semaphore functions get linked:
185 +libgcjgc_la_LIBADD = @addobjs@ $(THREADLIBS)
186 +libgcjgc_la_DEPENDENCIES = @addobjs@
187 +libgcjgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir)
188 +
189 +libgcjgc_convenience_la_LIBADD = @addobjs@
190 +libgcjgc_convenience_la_DEPENDENCIES = @addobjs@
191 +
192 +AM_CXXFLAGS = @GC_CFLAGS@
193 +AM_CFLAGS = @GC_CFLAGS@
194 +
195 +check_PROGRAMS = gctest
196 +# The following hack produces a warning from automake, but we need it in order 
197 +# to build a file from a subdirectory. FIXME.
198 +test.o:        tests/test.c
199 +       $(COMPILE) -c $(srcdir)/tests/test.c
200 +#      Using $< in the above seems to fail with the HP/UX on Itanium make.
201 +
202 +gctest_OBJECTS = test.o
203 +gctest_LDADD = ./libgcjgc.la $(THREADLIBS) $(EXTRA_TEST_LIBS)
204 +gctest_LDFLAGS = -shared-libgcc
205 +TESTS_ENVIRONMENT = LD_LIBRARY_PATH=../../$(MULTIBUILDTOP)gcc
206 +TESTS = gctest
207 +
208 +## FIXME: relies on internal code generated by automake.
209 +all_objs = @addobjs@ $(libgcjgc_la_OBJECTS)
210 +$(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
211 +include/private/gc_hdrs.h include/gc.h include/gc_gcj.h include/gc_mark.h
212 +
213 +## FIXME: we shouldn't have to do this, but automake forces us to.
214 +.s.lo:
215 +## We use -Wp,-P to strip #line directives.  Irix `as' chokes on
216 +## these.
217 +       $(LTCOMPILE) -Wp,-P -x assembler-with-cpp -c $<
218 +
219 +## We have our own definition of LTCOMPILE because we want to use our
220 +## CFLAGS, not those passed in from the top level make.
221 +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) \
222 +       $(AM_CPPFLAGS) $(CPPFLAGS) \
223 +       $(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS) 
224 +LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
225 +
226 +AM_CFLAGS = @GC_CFLAGS@
227 +
228 +# Work around what appears to be a GNU make bug handling MAKEFLAGS
229 +# values defined in terms of make variables, as is the case for CC and
230 +# friends when we are called from the top level Makefile.
231 +AM_MAKEFLAGS = \
232 +       "AR_FLAGS=$(AR_FLAGS)" \
233 +       "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
234 +       "CFLAGS=$(CFLAGS)" \
235 +       "CXXFLAGS=$(CXXFLAGS)" \
236 +       "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
237 +       "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
238 +       "INSTALL=$(INSTALL)" \
239 +       "INSTALL_DATA=$(INSTALL_DATA)" \
240 +       "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
241 +       "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
242 +       "LDFLAGS=$(LDFLAGS)" \
243 +       "LIBCFLAGS=$(LIBCFLAGS)" \
244 +       "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
245 +       "MAKE=$(MAKE)" \
246 +       "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
247 +       "PICFLAG=$(PICFLAG)" \
248 +       "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
249 +       "SHELL=$(SHELL)" \
250 +       "EXPECT=$(EXPECT)" \
251 +       "RUNTEST=$(RUNTEST)" \
252 +       "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
253 +       "exec_prefix=$(exec_prefix)" \
254 +       "infodir=$(infodir)" \
255 +       "libdir=$(libdir)" \
256 +       "prefix=$(prefix)" \
257 +       "tooldir=$(tooldir)" \
258 +       "AR=$(AR)" \
259 +       "AS=$(AS)" \
260 +       "CC=$(CC)" \
261 +       "CXX=$(CXX)" \
262 +       "LD=$(LD)" \
263 +       "LIBCFLAGS=$(LIBCFLAGS)" \
264 +       "NM=$(NM)" \
265 +       "PICFLAG=$(PICFLAG)" \
266 +       "RANLIB=$(RANLIB)" \
267 +       "DESTDIR=$(DESTDIR)"
268 +
269 +CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
270 +
271 +# Multilib support.
272 +.PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
273 +       maintainer-clean-multi
274 +
275 +all-am: all-multi
276 +install-am: install-multi
277 +mostlyclean-am: mostlyclean-multi
278 +clean-am: clean-multi
279 +distclean-am: distclean-multi
280 +maintainer-clean-am: maintainer-clean-multi
281 +
282 +all-multi:
283 +       : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
284 +install-multi:
285 +       $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
286 +mostlyclean-multi:
287 +       $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
288 +clean-multi:
289 +       $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
290 +distclean-multi:
291 +       $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
292 +maintainer-clean-multi:
293 +       $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
294 +
295 +MAKEOVERRIDES=
296 diff -buNr boehm-gc/Makefile.in boehm-gc/Makefile.in
297 --- boehm-gc/Makefile.in        Tue May 13 17:18:14 2003
298 +++ boehm-gc/Makefile.in        Sat Sep 13 01:32:41 2003
299 @@ -1,6 +1,8 @@
300 -# Makefile.in generated automatically by automake 1.4 from Makefile.am
301 +# Makefile.in generated by automake 1.6.3 from Makefile.am.
302 +# @configure_input@
303  
304 -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
305 +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
306 +# Free Software Foundation, Inc.
307  # This Makefile.in is free software; the Free Software Foundation
308  # gives unlimited permission to copy and/or distribute it,
309  # with or without modifications, as long as this notice is preserved.
310 @@ -10,7 +12,7 @@
311  # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
312  # PARTICULAR PURPOSE.
313  
314 -
315 +@SET_MAKE@
316  SHELL = @SHELL@
317  
318  srcdir = @srcdir@
319 @@ -31,13 +33,9 @@
320  mandir = @mandir@
321  includedir = @includedir@
322  oldincludedir = /usr/include
323 -
324 -DESTDIR =
325 -
326  pkgdatadir = $(datadir)/@PACKAGE@
327  pkglibdir = $(libdir)/@PACKAGE@
328  pkgincludedir = $(includedir)/@PACKAGE@
329 -
330  top_builddir = .
331  
332  ACLOCAL = @ACLOCAL@
333 @@ -45,12 +43,16 @@
334  AUTOMAKE = @AUTOMAKE@
335  AUTOHEADER = @AUTOHEADER@
336  
337 +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
338  INSTALL = @INSTALL@
339 -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
340 +INSTALL_PROGRAM = @INSTALL_PROGRAM@
341  INSTALL_DATA = @INSTALL_DATA@
342 +install_sh_DATA = $(install_sh) -c -m 644
343 +install_sh_PROGRAM = $(install_sh) -c
344 +install_sh_SCRIPT = $(install_sh) -c
345  INSTALL_SCRIPT = @INSTALL_SCRIPT@
346 +INSTALL_HEADER = $(INSTALL_DATA)
347  transform = @program_transform_name@
348 -
349  NORMAL_INSTALL = :
350  PRE_INSTALL = :
351  POST_INSTALL = :
352 @@ -63,38 +65,48 @@
353  host_triplet = @host@
354  target_alias = @target_alias@
355  target_triplet = @target@
356 +
357 +EXEEXT = @EXEEXT@
358 +OBJEXT = @OBJEXT@
359 +PATH_SEPARATOR = @PATH_SEPARATOR@
360 +AMTAR = @AMTAR@
361  AR = @AR@
362  AS = @AS@
363 +AWK = @AWK@
364  CC = @CC@
365  CPP = @CPP@
366  CXX = @CXX@
367  CXXCPP = @CXXCPP@
368  CXXINCLUDES = @CXXINCLUDES@
369 +DEPDIR = @DEPDIR@
370  DLLTOOL = @DLLTOOL@
371 -EXEEXT = @EXEEXT@
372 +ECHO = @ECHO@
373 +EGREP = @EGREP@
374  EXTRA_TEST_LIBS = @EXTRA_TEST_LIBS@
375 +F77 = @F77@
376  GCJ = @GCJ@
377  GCJFLAGS = @GCJFLAGS@
378  GC_CFLAGS = @GC_CFLAGS@
379  INCLUDES = @INCLUDES@
380 +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
381  LIBTOOL = @LIBTOOL@
382  LN_S = @LN_S@
383  MAINT = @MAINT@
384 -MAKEINFO = @MAKEINFO@
385  MY_CFLAGS = @MY_CFLAGS@
386  OBJDUMP = @OBJDUMP@
387 -OBJEXT = @OBJEXT@
388  PACKAGE = @PACKAGE@
389  RANLIB = @RANLIB@
390 +RC = @RC@
391  STRIP = @STRIP@
392  THREADLIBS = @THREADLIBS@
393  VERSION = @VERSION@
394  addobjs = @addobjs@
395 +am__include = @am__include@
396 +am__quote = @am__quote@
397  gc_basedir = @gc_basedir@
398 +install_sh = @install_sh@
399  mkinstalldirs = @mkinstalldirs@
400  target_all = @target_all@
401 -toolexecdir = @toolexecdir@
402 -toolexeclibdir = @toolexeclibdir@
403  
404  AUTOMAKE_OPTIONS = cygnus
405  
406 @@ -108,24 +120,32 @@
407  MULTIDO = true
408  MULTICLEAN = true
409  
410 +@USE_LIBDIR_TRUE@toolexeclibdir = $(libdir)$(MULTISUBDIR)
411 +@USE_LIBDIR_FALSE@toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
412 +@USE_LIBDIR_FALSE@toolexecdir = $(exec_prefix)/$(target_alias)
413 +
414  noinst_LTLIBRARIES = libgcjgc.la libgcjgc_convenience.la
415  
416  GC_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
417  dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c irix_threads.c \
418 -linux_threads.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
419 +malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
420  obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
421  solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \
422 -backgraph.c win32_threads.c
423 +backgraph.c win32_threads.c \
424 +pthread_support.c pthread_stop_world.c darwin_stop_world.c
425 +
426  
427 +EXTRA_GC_SOURCES = alpha_mach_dep.S \
428 +    mips_sgi_mach_dep.S mips_ultrix_mach_dep.s powerpc_darwin_mach_dep.s \
429 +    rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
430 +    sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
431  
432 -EXTRA_GC_SOURCES = alpha_mach_dep.s \
433 -mips_sgi_mach_dep.S mips_ultrix_mach_dep.s powerpc_macosx_mach_dep.s \
434 -rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
435 -sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
436  
437 +@POWERPC_DARWIN_TRUE@asm_libgc_sources = powerpc_darwin_mach_dep.s
438 +@POWERPC_DARWIN_FALSE@asm_libgc_sources = 
439  
440 -libgcjgc_la_SOURCES = $(GC_SOURCES)
441 -libgcjgc_convenience_la_SOURCES = $(GC_SOURCES)
442 +libgcjgc_la_SOURCES = $(GC_SOURCES) $(asm_libgc_sources)
443 +libgcjgc_convenience_la_SOURCES = $(GC_SOURCES) $(asm_libgc_sources)
444  EXTRA_libgcjgc_la_SOURCES = $(EXTRA_GC_SOURCES)
445  EXTRA_libgcjgc_convenience_la_SOURCES = $(EXTRA_GC_SOURCES)
446  
447 @@ -139,12 +159,11 @@
448  libgcjgc_convenience_la_DEPENDENCIES = @addobjs@
449  
450  AM_CXXFLAGS = @GC_CFLAGS@
451 -
452  AM_CFLAGS = @GC_CFLAGS@
453  
454  check_PROGRAMS = gctest
455 -#      Using $< in the above seems to fail with the HP/UX on Itanium make.
456  
457 +#      Using $< in the above seems to fail with the HP/UX on Itanium make.
458  gctest_OBJECTS = test.o
459  gctest_LDADD = ./libgcjgc.la $(THREADLIBS) $(EXTRA_TEST_LIBS)
460  gctest_LDFLAGS = -shared-libgcc
461 @@ -204,104 +223,127 @@
462  CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
463  
464  MAKEOVERRIDES = 
465 +subdir = .
466  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
467  CONFIG_CLEAN_FILES = 
468  LTLIBRARIES =  $(noinst_LTLIBRARIES)
469  
470 +am__objects_1 = allchblk.lo alloc.lo blacklst.lo checksums.lo dbg_mlc.lo \
471 +       dyn_load.lo finalize.lo gc_dlopen.lo gcj_mlc.lo headers.lo \
472 +       irix_threads.lo malloc.lo mallocx.lo mark.lo mark_rts.lo \
473 +       misc.lo new_hblk.lo obj_map.lo os_dep.lo pcr_interface.lo \
474 +       ptr_chck.lo real_malloc.lo reclaim.lo solaris_pthreads.lo \
475 +       solaris_threads.lo specific.lo stubborn.lo typd_mlc.lo \
476 +       backgraph.lo win32_threads.lo pthread_support.lo \
477 +       pthread_stop_world.lo darwin_stop_world.lo
478 +@POWERPC_DARWIN_TRUE@am__objects_2 = powerpc_darwin_mach_dep.lo
479 +@POWERPC_DARWIN_FALSE@am__objects_2 =
480 +am_libgcjgc_la_OBJECTS = $(am__objects_1) $(am__objects_2)
481 +libgcjgc_la_OBJECTS = $(am_libgcjgc_la_OBJECTS)
482 +libgcjgc_convenience_la_LDFLAGS =
483 +am_libgcjgc_convenience_la_OBJECTS = $(am__objects_1) $(am__objects_2)
484 +libgcjgc_convenience_la_OBJECTS = $(am_libgcjgc_convenience_la_OBJECTS)
485 +check_PROGRAMS = gctest$(EXEEXT)
486 +gctest_DEPENDENCIES = ./libgcjgc.la
487  
488 -DEFS = @DEFS@ -I. -I$(srcdir) 
489 +DEFS = @DEFS@
490 +DEFAULT_INCLUDES =  -I. -I$(srcdir)
491  CPPFLAGS = @CPPFLAGS@
492  LDFLAGS = @LDFLAGS@
493  LIBS = @LIBS@
494 -libgcjgc_la_OBJECTS =  allchblk.lo alloc.lo blacklst.lo checksums.lo \
495 -dbg_mlc.lo dyn_load.lo finalize.lo gc_dlopen.lo gcj_mlc.lo headers.lo \
496 -irix_threads.lo linux_threads.lo malloc.lo mallocx.lo mark.lo \
497 -mark_rts.lo misc.lo new_hblk.lo obj_map.lo os_dep.lo pcr_interface.lo \
498 -ptr_chck.lo real_malloc.lo reclaim.lo solaris_pthreads.lo \
499 -solaris_threads.lo specific.lo stubborn.lo typd_mlc.lo backgraph.lo \
500 -win32_threads.lo
501 -libgcjgc_convenience_la_LDFLAGS = 
502 -libgcjgc_convenience_la_OBJECTS =  allchblk.lo alloc.lo blacklst.lo \
503 -checksums.lo dbg_mlc.lo dyn_load.lo finalize.lo gc_dlopen.lo gcj_mlc.lo \
504 -headers.lo irix_threads.lo linux_threads.lo malloc.lo mallocx.lo \
505 -mark.lo mark_rts.lo misc.lo new_hblk.lo obj_map.lo os_dep.lo \
506 -pcr_interface.lo ptr_chck.lo real_malloc.lo reclaim.lo \
507 -solaris_pthreads.lo solaris_threads.lo specific.lo stubborn.lo \
508 -typd_mlc.lo backgraph.lo win32_threads.lo
509 -check_PROGRAMS =  gctest$(EXEEXT)
510 -gctest_DEPENDENCIES =  ./libgcjgc.la
511 -CFLAGS = @CFLAGS@
512 -COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
513 +depcomp =
514 +am__depfiles_maybe =
515 +CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
516 +LTCCASCOMPILE = $(LIBTOOL) --mode=compile $(CCAS) $(AM_CCASFLAGS) \
517 +       $(CCASFLAGS)
518 +CCASFLAGS = @CCASFLAGS@
519 +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
520 +       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
521  CCLD = $(CC)
522 -DIST_COMMON =  ChangeLog Makefile.am Makefile.in acinclude.m4 aclocal.m4 \
523 -config.guess config.sub configure configure.in install-sh ltconfig \
524 -ltmain.sh mkinstalldirs
525 -
526 -
527 -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
528 -
529 -TAR = gtar
530 -GZIP_ENV = --best
531 +CFLAGS = @CFLAGS@
532 +DIST_SOURCES = $(libgcjgc_la_SOURCES) $(EXTRA_libgcjgc_la_SOURCES) \
533 +       $(libgcjgc_convenience_la_SOURCES) \
534 +       $(EXTRA_libgcjgc_convenience_la_SOURCES)
535 +
536 +RECURSIVE_TARGETS = info-recursive dvi-recursive \
537 +       uninstall-info-recursive all-recursive install-data-recursive \
538 +       install-exec-recursive installdirs-recursive install-recursive \
539 +       uninstall-recursive check-recursive installcheck-recursive
540  SOURCES = $(libgcjgc_la_SOURCES) $(EXTRA_libgcjgc_la_SOURCES) $(libgcjgc_convenience_la_SOURCES) $(EXTRA_libgcjgc_convenience_la_SOURCES)
541 -OBJECTS = $(libgcjgc_la_OBJECTS) $(libgcjgc_convenience_la_OBJECTS)
542  
543 -all: all-redirect
544 +all: all-recursive
545 +
546  .SUFFIXES:
547  .SUFFIXES: .S .c .lo .o .obj .s
548 -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
549 -       cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
550  
551 -Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
552 -       cd $(top_builddir) \
553 -         && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
554 -
555 -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in  acinclude.m4
556 -       cd $(srcdir) && $(ACLOCAL)
557 +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
558 + configure.lineno
559 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
560 +       cd $(top_srcdir) && \
561 +         $(AUTOMAKE) --cygnus  Makefile
562 +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
563 +       cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
564  
565 -config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
566 +$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
567         $(SHELL) ./config.status --recheck
568 -$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
569 +$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
570         cd $(srcdir) && $(AUTOCONF)
571  
572 -mostlyclean-noinstLTLIBRARIES:
573 +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
574 +       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
575  
576  clean-noinstLTLIBRARIES:
577         -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
578 +       @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
579 +         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
580 +         test -z "$dir" && dir=.; \
581 +         echo "rm -f \"$${dir}/so_locations\""; \
582 +         rm -f "$${dir}/so_locations"; \
583 +       done
584 +libgcjgc.la: $(libgcjgc_la_OBJECTS) $(libgcjgc_la_DEPENDENCIES) 
585 +       $(LINK)  $(libgcjgc_la_LDFLAGS) $(libgcjgc_la_OBJECTS) $(libgcjgc_la_LIBADD) $(LIBS)
586 +libgcjgc_convenience.la: $(libgcjgc_convenience_la_OBJECTS) $(libgcjgc_convenience_la_DEPENDENCIES) 
587 +       $(LINK)  $(libgcjgc_convenience_la_LDFLAGS) $(libgcjgc_convenience_la_OBJECTS) $(libgcjgc_convenience_la_LIBADD) $(LIBS)
588  
589 -distclean-noinstLTLIBRARIES:
590 -
591 -maintainer-clean-noinstLTLIBRARIES:
592 -
593 -.c.o:
594 -       $(COMPILE) -c $<
595 +clean-checkPROGRAMS:
596 +       @list='$(check_PROGRAMS)'; for p in $$list; do \
597 +         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
598 +         echo " rm -f $$p $$f"; \
599 +         rm -f $$p $$f ; \
600 +       done
601 +gctest$(EXEEXT): $(gctest_OBJECTS) $(gctest_DEPENDENCIES) 
602 +       @rm -f gctest$(EXEEXT)
603 +       $(LINK) $(gctest_LDFLAGS) $(gctest_OBJECTS) $(gctest_LDADD) $(LIBS)
604  
605 -# FIXME: We should only use cygpath when building on Windows,
606 -# and only if it is available.
607 -.c.obj:
608 -       $(COMPILE) -c `cygpath -w $<`
609 +mostlyclean-compile:
610 +       -rm -f *.$(OBJEXT) core *.core
611  
612 -.s.o:
613 -       $(COMPILE) -c $<
614 +distclean-compile:
615 +       -rm -f *.tab.c
616  
617  .S.o:
618 -       $(COMPILE) -c $<
619 +       $(CCASCOMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
620  
621 -mostlyclean-compile:
622 -       -rm -f *.o core *.core
623 -       -rm -f *.$(OBJEXT)
624 +.S.obj:
625 +       $(CCASCOMPILE) -c `cygpath -w $<`
626  
627 -clean-compile:
628 +.S.lo:
629 +       $(LTCCASCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
630  
631 -distclean-compile:
632 -       -rm -f *.tab.c
633 +.c.o:
634 +       $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
635  
636 -maintainer-clean-compile:
637 +.c.obj:
638 +       $(COMPILE) -c `cygpath -w $<`
639  
640  .c.lo:
641 -       $(LIBTOOL) --mode=compile $(COMPILE) -c $<
642 +       $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
643  
644 -.S.lo:
645 -       $(LIBTOOL) --mode=compile $(COMPILE) -c $<
646 +.s.o:
647 +       $(CCASCOMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
648 +
649 +.s.obj:
650 +       $(CCASCOMPILE) -c `cygpath -w $<`
651  
652  mostlyclean-libtool:
653         -rm -f *.lo
654 @@ -310,27 +352,8 @@
655         -rm -rf .libs _libs
656  
657  distclean-libtool:
658 -
659 -maintainer-clean-libtool:
660 -
661 -libgcjgc.la: $(libgcjgc_la_OBJECTS) $(libgcjgc_la_DEPENDENCIES)
662 -       $(LINK)  $(libgcjgc_la_LDFLAGS) $(libgcjgc_la_OBJECTS) $(libgcjgc_la_LIBADD) $(LIBS)
663 -
664 -libgcjgc_convenience.la: $(libgcjgc_convenience_la_OBJECTS) $(libgcjgc_convenience_la_DEPENDENCIES)
665 -       $(LINK)  $(libgcjgc_convenience_la_LDFLAGS) $(libgcjgc_convenience_la_OBJECTS) $(libgcjgc_convenience_la_LIBADD) $(LIBS)
666 -
667 -mostlyclean-checkPROGRAMS:
668 -
669 -clean-checkPROGRAMS:
670 -       -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
671 -
672 -distclean-checkPROGRAMS:
673 -
674 -maintainer-clean-checkPROGRAMS:
675 -
676 -gctest$(EXEEXT): $(gctest_OBJECTS) $(gctest_DEPENDENCIES)
677 -       @rm -f gctest$(EXEEXT)
678 -       $(LINK) $(gctest_LDFLAGS) $(gctest_OBJECTS) $(gctest_LDADD) $(LIBS)
679 +       -rm -f libtool
680 +uninstall-info-am:
681  
682  # This directory's subdirectories are mostly independent; you can cd
683  # into them and run `make' without going through this Makefile.
684 @@ -338,13 +361,8 @@
685  # (1) if the variable is set in `config.status', edit `config.status'
686  #     (which will cause the Makefiles to be regenerated when you run `make');
687  # (2) otherwise, pass the desired values on the `make' command line.
688 -
689 -@SET_MAKE@
690 -
691 -all-recursive install-data-recursive install-exec-recursive \
692 -installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
693 -check-recursive installcheck-recursive info-recursive dvi-recursive:
694 -       @set fnord $(MAKEFLAGS); amf=$$2; \
695 +$(RECURSIVE_TARGETS):
696 +       @set fnord $$MAKEFLAGS; amf=$$2; \
697         dot_seen=no; \
698         target=`echo $@ | sed s/-recursive//`; \
699         list='$(SUBDIRS)'; for subdir in $$list; do \
700 @@ -364,13 +382,18 @@
701  
702  mostlyclean-recursive clean-recursive distclean-recursive \
703  maintainer-clean-recursive:
704 -       @set fnord $(MAKEFLAGS); amf=$$2; \
705 +       @set fnord $$MAKEFLAGS; amf=$$2; \
706         dot_seen=no; \
707 -       rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
708 +       case "$@" in \
709 +         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
710 +         *) list='$(SUBDIRS)' ;; \
711 +       esac; \
712 +       rev=''; for subdir in $$list; do \
713 +         if test "$$subdir" = "."; then :; else \
714           rev="$$subdir $$rev"; \
715 -         test "$$subdir" = "." && dot_seen=yes; \
716 +         fi; \
717         done; \
718 -       test "$$dot_seen" = "no" && rev=". $$rev"; \
719 +       rev="$$rev ."; \
720         target=`echo $@ | sed s/-recursive//`; \
721         for subdir in $$rev; do \
722           echo "Making $$target in $$subdir"; \
723 @@ -387,17 +410,22 @@
724           test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
725         done
726  
727 +ETAGS = etags
728 +ETAGSFLAGS =
729 +
730  tags: TAGS
731  
732 -ID: $(HEADERS) $(SOURCES) $(LISP)
733 -       list='$(SOURCES) $(HEADERS)'; \
734 -       unique=`for i in $$list; do echo $$i; done | \
735 -         awk '    { files[$$0] = 1; } \
736 +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
737 +       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
738 +       unique=`for i in $$list; do \
739 +           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
740 +         done | \
741 +         $(AWK) '    { files[$$0] = 1; } \
742                END { for (i in files) print i; }'`; \
743 -       here=`pwd` && cd $(srcdir) \
744 -         && mkid -f$$here/ID $$unique $(LISP)
745 +       mkid -fID $$unique
746  
747 -TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
748 +TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
749 +               $(TAGS_FILES) $(LISP)
750         tags=; \
751         here=`pwd`; \
752         list='$(SUBDIRS)'; for subdir in $$list; do \
753 @@ -405,193 +433,163 @@
754             test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
755     fi; \
756         done; \
757 -       list='$(SOURCES) $(HEADERS)'; \
758 -       unique=`for i in $$list; do echo $$i; done | \
759 -         awk '    { files[$$0] = 1; } \
760 +       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
761 +       unique=`for i in $$list; do \
762 +           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
763 +         done | \
764 +         $(AWK) '    { files[$$0] = 1; } \
765                END { for (i in files) print i; }'`; \
766 -       test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
767 -         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
768 -
769 -mostlyclean-tags:
770 -
771 -clean-tags:
772 +       test -z "$(ETAGS_ARGS)$$tags$$unique" \
773 +         || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
774 +            $$tags $$unique
775 +
776 +GTAGS:
777 +       here=`$(am__cd) $(top_builddir) && pwd` \
778 +         && cd $(top_srcdir) \
779 +         && gtags -i $(GTAGS_ARGS) $$here
780  
781  distclean-tags:
782 -       -rm -f TAGS ID
783 +       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
784  
785 -maintainer-clean-tags:
786 -
787 -distdir = $(PACKAGE)-$(VERSION)
788 -top_distdir = $(distdir)
789 -
790 -# This target untars the dist file and tries a VPATH configuration.  Then
791 -# it guarantees that the distribution is self-contained by making another
792 -# tarfile.
793 -distcheck: dist
794 -       -rm -rf $(distdir)
795 -       GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
796 -       mkdir $(distdir)/=build
797 -       mkdir $(distdir)/=inst
798 -       dc_install_base=`cd $(distdir)/=inst && pwd`; \
799 -       cd $(distdir)/=build \
800 -         && ../configure --srcdir=.. --prefix=$$dc_install_base \
801 -         && $(MAKE) $(AM_MAKEFLAGS) \
802 -         && $(MAKE) $(AM_MAKEFLAGS) dvi \
803 -         && $(MAKE) $(AM_MAKEFLAGS) check \
804 -         && $(MAKE) $(AM_MAKEFLAGS) install \
805 -         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
806 -         && $(MAKE) $(AM_MAKEFLAGS) dist
807 -       -rm -rf $(distdir)
808 -       @banner="$(distdir).tar.gz is ready for distribution"; \
809 -       dashes=`echo "$$banner" | sed s/./=/g`; \
810 -       echo "$$dashes"; \
811 -       echo "$$banner"; \
812 -       echo "$$dashes"
813 -dist: distdir
814 -       -chmod -R a+r $(distdir)
815 -       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
816 -       -rm -rf $(distdir)
817 -dist-all: distdir
818 -       -chmod -R a+r $(distdir)
819 -       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
820 -       -rm -rf $(distdir)
821 -distdir: $(DISTFILES)
822 -       -rm -rf $(distdir)
823 -       mkdir $(distdir)
824 -       -chmod 777 $(distdir)
825 -       @for file in $(DISTFILES); do \
826 -         if test -f $$file; then d=.; else d=$(srcdir); fi; \
827 -         if test -d $$d/$$file; then \
828 -           cp -pr $$d/$$file $(distdir)/$$file; \
829 -         else \
830 -           test -f $(distdir)/$$file \
831 -           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
832 -           || cp -p $$d/$$file $(distdir)/$$file || :; \
833 -         fi; \
834 -       done
835 -       for subdir in $(SUBDIRS); do \
836 -         if test "$$subdir" = .; then :; else \
837 -           test -d $(distdir)/$$subdir \
838 -           || mkdir $(distdir)/$$subdir \
839 -           || exit 1; \
840 -           chmod 777 $(distdir)/$$subdir; \
841 -           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
842 -             || exit 1; \
843 -         fi; \
844 -       done
845  check-TESTS: $(TESTS)
846 -       @failed=0; all=0; \
847 +       @failed=0; all=0; xfail=0; xpass=0; \
848         srcdir=$(srcdir); export srcdir; \
849 -       for tst in $(TESTS); do \
850 -         if test -f $$tst; then dir=.; \
851 -         else dir="$(srcdir)"; fi; \
852 -         if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \
853 +       list='$(TESTS)'; \
854 +       if test -n "$$list"; then \
855 +         for tst in $$list; do \
856 +           if test -f ./$$tst; then dir=./; \
857 +           elif test -f $$tst; then dir=; \
858 +           else dir="$(srcdir)/"; fi; \
859 +           if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
860             all=`expr $$all + 1`; \
861 +             case " $(XFAIL_TESTS) " in \
862 +             *" $$tst "*) \
863 +               xpass=`expr $$xpass + 1`; \
864 +               failed=`expr $$failed + 1`; \
865 +               echo "XPASS: $$tst"; \
866 +             ;; \
867 +             *) \
868             echo "PASS: $$tst"; \
869 +             ;; \
870 +             esac; \
871           elif test $$? -ne 77; then \
872             all=`expr $$all + 1`; \
873 +             case " $(XFAIL_TESTS) " in \
874 +             *" $$tst "*) \
875 +               xfail=`expr $$xfail + 1`; \
876 +               echo "XFAIL: $$tst"; \
877 +             ;; \
878 +             *) \
879             failed=`expr $$failed + 1`; \
880             echo "FAIL: $$tst"; \
881 +             ;; \
882 +             esac; \
883           fi; \
884         done; \
885         if test "$$failed" -eq 0; then \
886 +           if test "$$xfail" -eq 0; then \
887           banner="All $$all tests passed"; \
888         else \
889 +             banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
890 +           fi; \
891 +         else \
892 +           if test "$$xpass" -eq 0; then \
893           banner="$$failed of $$all tests failed"; \
894 +           else \
895 +             banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
896 +           fi; \
897         fi; \
898         dashes=`echo "$$banner" | sed s/./=/g`; \
899         echo "$$dashes"; \
900         echo "$$banner"; \
901         echo "$$dashes"; \
902 -       test "$$failed" -eq 0
903 -info-am:
904 -info: info-recursive
905 -dvi-am:
906 -dvi: dvi-recursive
907 +         test "$$failed" -eq 0; \
908 +       else :; fi
909  check-am: $(check_PROGRAMS)
910         $(MAKE) $(AM_MAKEFLAGS) check-TESTS
911  check: check-recursive
912 -installcheck-am:
913 -installcheck: installcheck-recursive
914 -install-info-am: 
915 -install-info: install-info-recursive
916 -install-exec-am:
917 -install-exec: install-exec-recursive
918 -
919 -install-data-am:
920 -install-data: install-data-recursive
921 -
922 -install-am: all-am
923 -       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
924 -install: install-recursive
925 -uninstall-am:
926 -uninstall: uninstall-recursive
927  all-am: Makefile $(LTLIBRARIES)
928 -all-redirect: all-recursive
929 -install-strip:
930 -       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
931  installdirs: installdirs-recursive
932  installdirs-am:
933  
934 +install: install-recursive
935 +install-exec: install-exec-recursive
936 +install-data: install-data-recursive
937 +uninstall: uninstall-recursive
938  
939 +installcheck: installcheck-recursive
940 +install-strip:
941 +       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
942 +         INSTALL_STRIP_FLAG=-s \
943 +         `test -z '$(STRIP)' || \
944 +           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
945  mostlyclean-generic:
946  
947  clean-generic:
948  
949  distclean-generic:
950         -rm -f Makefile $(CONFIG_CLEAN_FILES)
951 -       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
952  
953  maintainer-clean-generic:
954 -mostlyclean-am:  mostlyclean-noinstLTLIBRARIES mostlyclean-compile \
955 -               mostlyclean-libtool mostlyclean-checkPROGRAMS \
956 -               mostlyclean-tags mostlyclean-generic
957 +       @echo "This command is intended for maintainers to use"
958 +       @echo "it deletes files that may require special tools to rebuild."
959 +clean: clean-recursive
960  
961 -mostlyclean: mostlyclean-recursive
962 +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
963 +       clean-noinstLTLIBRARIES mostlyclean-am
964  
965 -clean-am:  clean-noinstLTLIBRARIES clean-compile clean-libtool \
966 -               clean-checkPROGRAMS clean-tags clean-generic \
967 -               mostlyclean-am
968 +distclean: distclean-recursive
969 +       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
970 +distclean-am: clean-am distclean-compile distclean-generic \
971 +       distclean-libtool distclean-tags
972  
973 -clean: clean-recursive
974 +dvi: dvi-recursive
975  
976 -distclean-am:  distclean-noinstLTLIBRARIES distclean-compile \
977 -               distclean-libtool distclean-checkPROGRAMS \
978 -               distclean-tags distclean-generic clean-am
979 -       -rm -f libtool
980 +dvi-am:
981  
982 -distclean: distclean-recursive
983 -       -rm -f config.status
984 +info: info-recursive
985  
986 -maintainer-clean-am:  maintainer-clean-noinstLTLIBRARIES \
987 -               maintainer-clean-compile maintainer-clean-libtool \
988 -               maintainer-clean-checkPROGRAMS maintainer-clean-tags \
989 -               maintainer-clean-generic distclean-am
990 -       @echo "This command is intended for maintainers to use;"
991 -       @echo "it deletes files that may require special tools to rebuild."
992 +info-am:
993 +
994 +install-data-am:
995 +
996 +install-exec-am:
997 +
998 +install-info:
999 +
1000 +install-man:
1001 +
1002 +installcheck-am:
1003  
1004  maintainer-clean: maintainer-clean-recursive
1005 -       -rm -f config.status
1006 +       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
1007 +       -rm -rf autom4te.cache
1008 +maintainer-clean-am: distclean-am maintainer-clean-generic
1009  
1010 -.PHONY: mostlyclean-noinstLTLIBRARIES distclean-noinstLTLIBRARIES \
1011 -clean-noinstLTLIBRARIES maintainer-clean-noinstLTLIBRARIES \
1012 -mostlyclean-compile distclean-compile clean-compile \
1013 -maintainer-clean-compile mostlyclean-libtool distclean-libtool \
1014 -clean-libtool maintainer-clean-libtool mostlyclean-checkPROGRAMS \
1015 -distclean-checkPROGRAMS clean-checkPROGRAMS \
1016 -maintainer-clean-checkPROGRAMS install-data-recursive \
1017 -uninstall-data-recursive install-exec-recursive \
1018 -uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
1019 -all-recursive check-recursive installcheck-recursive info-recursive \
1020 -dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
1021 -maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
1022 -distclean-tags clean-tags maintainer-clean-tags distdir check-TESTS \
1023 -info-am info dvi-am dvi check check-am installcheck-am installcheck \
1024 -install-info-am install-info install-exec-am install-exec \
1025 -install-data-am install-data install-am install uninstall-am uninstall \
1026 -all-redirect all-am all installdirs-am installdirs mostlyclean-generic \
1027 -distclean-generic clean-generic maintainer-clean-generic clean \
1028 -mostlyclean distclean maintainer-clean
1029 +mostlyclean: mostlyclean-recursive
1030 +
1031 +mostlyclean-am: mostlyclean-compile mostlyclean-generic \
1032 +       mostlyclean-libtool
1033 +
1034 +uninstall-am:
1035 +
1036 +uninstall-info: uninstall-info-recursive
1037 +
1038 +.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-TESTS check-am \
1039 +       clean clean-checkPROGRAMS clean-generic clean-libtool \
1040 +       clean-noinstLTLIBRARIES clean-recursive distclean \
1041 +       distclean-compile distclean-generic distclean-libtool \
1042 +       distclean-recursive distclean-tags dvi dvi-am dvi-recursive \
1043 +       info info-am info-recursive install install-am install-data \
1044 +       install-data-am install-data-recursive install-exec \
1045 +       install-exec-am install-exec-recursive install-info \
1046 +       install-info-am install-man install-recursive install-strip \
1047 +       installcheck installcheck-am installdirs installdirs-am \
1048 +       installdirs-recursive maintainer-clean maintainer-clean-generic \
1049 +       maintainer-clean-recursive mostlyclean mostlyclean-compile \
1050 +       mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
1051 +       tags tags-recursive uninstall uninstall-am uninstall-info-am \
1052 +       uninstall-info-recursive uninstall-recursive
1053  
1054  # The following hack produces a warning from automake, but we need it in order 
1055  # to build a file from a subdirectory. FIXME.
1056 @@ -626,7 +624,6 @@
1057         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
1058  maintainer-clean-multi:
1059         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
1060 -
1061  # Tell versions [3.59,3.63) of GNU make to not export all variables.
1062  # Otherwise a system limit (for SysV at least) may be exceeded.
1063  .NOEXPORT:
1064 diff -buNr boehm-gc/allchblk.c boehm-gc/allchblk.c
1065 --- boehm-gc/allchblk.c Mon Apr  8 17:39:15 2002
1066 +++ boehm-gc/allchblk.c Sat Sep 13 01:32:42 2003
1067 @@ -47,12 +47,16 @@
1068  struct hblk * GC_hblkfreelist[N_HBLK_FLS+1] = { 0 };
1069  
1070  #ifndef USE_MUNMAP
1071 +
1072    word GC_free_bytes[N_HBLK_FLS+1] = { 0 };
1073         /* Number of free bytes on each list.   */
1074  
1075    /* Is bytes + the number of free bytes on lists n .. N_HBLK_FLS      */
1076    /* > GC_max_large_allocd_bytes?                                      */
1077 -  GC_bool GC_enough_large_bytes_left(bytes,n)
1078 +# ifdef __GNUC__
1079 +  __inline__
1080 +# endif
1081 +  static GC_bool GC_enough_large_bytes_left(bytes,n)
1082    word bytes;
1083    int n;
1084    {
1085 @@ -583,11 +587,11 @@
1086             if (!GC_use_entire_heap
1087                 && size_avail != size_needed
1088                 && USED_HEAP_SIZE >= GC_requested_heapsize
1089 -               && !GC_incremental && GC_should_collect()) {
1090 +               && !TRUE_INCREMENTAL && GC_should_collect()) {
1091  #              ifdef USE_MUNMAP
1092                     continue;
1093  #              else
1094 -                   /* If we enough large blocks left to cover any      */
1095 +                   /* If we have enough large blocks left to cover any */
1096                     /* previous request for large blocks, we go ahead   */
1097                     /* and split.  Assuming a steady state, that should */
1098                     /* be safe.  It means that we can use the full      */
1099 @@ -595,6 +599,12 @@
1100                     if (!GC_enough_large_bytes_left(GC_large_allocd_bytes, n)) {
1101                       continue;
1102                     } 
1103 +                   /* If we are deallocating lots of memory from       */
1104 +                   /* finalizers, fail and collect sooner rather       */
1105 +                   /* than later.                                      */
1106 +                   if (GC_finalizer_mem_freed > (GC_heapsize >> 4))  {
1107 +                     continue;
1108 +                   }
1109  #              endif /* !USE_MUNMAP */
1110             }
1111             /* If the next heap block is obviously better, go on.       */
1112 diff -buNr boehm-gc/alloc.c boehm-gc/alloc.c
1113 --- boehm-gc/alloc.c    Mon Mar  3 22:38:30 2003
1114 +++ boehm-gc/alloc.c    Sat Sep 13 01:32:42 2003
1115 @@ -72,6 +72,13 @@
1116  GC_bool GC_need_full_gc = FALSE;
1117                            /* Need full GC do to heap growth.   */
1118  
1119 +#ifdef THREADS
1120 +  GC_bool GC_world_stopped = FALSE;
1121 +# define IF_THREADS(x) x
1122 +#else
1123 +# define IF_THREADS(x)
1124 +#endif
1125 +
1126  word GC_used_heap_size_after_full = 0;
1127  
1128  char * GC_copyright[] =
1129 @@ -119,7 +126,6 @@
1130      unsigned long time_diff;
1131      
1132      if ((count++ & 3) != 0) return(0);
1133 -#ifndef NO_CLOCK
1134      GET_TIME(current_time);
1135      time_diff = MS_TIME_DIFF(current_time,GC_start_time);
1136      if (time_diff >= GC_time_limit) {
1137 @@ -132,7 +138,6 @@
1138  #      endif
1139         return(1);
1140      }
1141 -#endif
1142      return(0);
1143    }
1144  #endif /* !SMALL_CONFIG */
1145 @@ -160,7 +165,7 @@
1146                                + (GC_large_free_bytes >> 2)
1147                                    /* use a bit more of large empty heap */
1148                                + total_root_size);
1149 -    if (GC_incremental) {
1150 +    if (TRUE_INCREMENTAL) {
1151          return scan_size / (2 * GC_free_space_divisor);
1152      } else {
1153          return scan_size / GC_free_space_divisor;
1154 @@ -182,7 +187,8 @@
1155      /* managed object should not alter result, assuming the client     */
1156      /* is playing by the rules.                                                */
1157      result = (signed_word)GC_words_allocd
1158 -            - (signed_word)GC_mem_freed - expl_managed;
1159 +            - (signed_word)GC_mem_freed 
1160 +            + (signed_word)GC_finalizer_mem_freed - expl_managed;
1161      if (result > (signed_word)GC_words_allocd) {
1162          result = GC_words_allocd;
1163         /* probably client bug or unfortunate scheduling */
1164 @@ -250,7 +256,6 @@
1165  
1166      if (GC_should_collect()) {
1167          if (!GC_incremental) {
1168 -           GC_notify_full_gc();
1169              GC_gcollect_inner();
1170              n_partial_gcs = 0;
1171              return;
1172 @@ -302,10 +307,14 @@
1173  /*
1174   * Stop the world garbage collection.  Assumes lock held, signals disabled.
1175   * If stop_func is not GC_never_stop_func, then abort if stop_func returns TRUE.
1176 + * Return TRUE if we successfully completed the collection.
1177   */
1178  GC_bool GC_try_to_collect_inner(stop_func)
1179  GC_stop_func stop_func;
1180  {
1181 +#   ifdef CONDPRINT
1182 +        CLOCK_TYPE start_time, current_time;
1183 +#   endif
1184      if (GC_dont_gc) return FALSE;
1185      if (GC_incremental && GC_collection_in_progress()) {
1186  #   ifdef CONDPRINT
1187 @@ -320,8 +329,10 @@
1188             GC_collect_a_little_inner(1);
1189         }
1190      }
1191 +    if (stop_func == GC_never_stop_func) GC_notify_full_gc();
1192  #   ifdef CONDPRINT
1193        if (GC_print_stats) {
1194 +        if (GC_print_stats) GET_TIME(start_time);
1195         GC_printf2(
1196            "Initiating full world-stop collection %lu after %ld allocd bytes\n",
1197            (unsigned long) GC_gc_no+1,
1198 @@ -360,6 +371,13 @@
1199        return(FALSE);
1200      }
1201      GC_finish_collection();
1202 +#   if defined(CONDPRINT)
1203 +      if (GC_print_stats) {
1204 +        GET_TIME(current_time);
1205 +        GC_printf1("Complete collection took %lu msecs\n",
1206 +                   MS_TIME_DIFF(current_time,start_time));
1207 +      }
1208 +#   endif
1209      return(TRUE);
1210  }
1211  
1212 @@ -430,6 +448,7 @@
1213      result = (int)GC_collection_in_progress();
1214      UNLOCK();
1215      ENABLE_SIGNALS();
1216 +    if (!result && GC_debugging_started) GC_print_all_smashed();
1217      return(result);
1218  }
1219  
1220 @@ -448,16 +467,17 @@
1221         CLOCK_TYPE start_time, current_time;
1222  #   endif
1223         
1224 -#   if defined(REGISTER_LIBRARIES_EARLY)
1225 -        GC_cond_register_dynamic_libraries();
1226 -#   endif
1227 -    STOP_WORLD();
1228  #   ifdef PRINTTIMES
1229         GET_TIME(start_time);
1230  #   endif
1231  #   if defined(CONDPRINT) && !defined(PRINTTIMES)
1232         if (GC_print_stats) GET_TIME(start_time);
1233  #   endif
1234 +#   if defined(REGISTER_LIBRARIES_EARLY)
1235 +        GC_cond_register_dynamic_libraries();
1236 +#   endif
1237 +    STOP_WORLD();
1238 +    IF_THREADS(GC_world_stopped = TRUE);
1239  #   ifdef CONDPRINT
1240        if (GC_print_stats) {
1241         GC_printf1("--> Marking for collection %lu ",
1242 @@ -488,6 +508,7 @@
1243                       }
1244  #                  endif
1245                     GC_deficit = i; /* Give the mutator a chance. */
1246 +                    IF_THREADS(GC_world_stopped = FALSE);
1247                     START_WORLD();
1248                     return(FALSE);
1249             }
1250 @@ -521,6 +542,8 @@
1251              (*GC_check_heap)();
1252          }
1253      
1254 +    IF_THREADS(GC_world_stopped = FALSE);
1255 +    START_WORLD();
1256  #   ifdef PRINTTIMES
1257         GET_TIME(current_time);
1258         GC_printf1("World-stopped marking took %lu msecs\n",
1259 @@ -534,7 +557,6 @@
1260         }
1261  #     endif
1262  #   endif
1263 -    START_WORLD();
1264      return(TRUE);
1265  }
1266  
1267 @@ -611,6 +633,7 @@
1268           GC_print_address_map();
1269         }
1270  #   endif
1271 +    COND_DUMP;
1272      if (GC_find_leak) {
1273        /* Mark all objects on the free list.  All objects should be */
1274        /* marked when we're done.                                  */
1275 @@ -707,6 +730,7 @@
1276        GC_words_allocd = 0;
1277        GC_words_wasted = 0;
1278        GC_mem_freed = 0;
1279 +      GC_finalizer_mem_freed = 0;
1280        
1281  #   ifdef USE_MUNMAP
1282        GC_unmap_old();
1283 @@ -730,6 +754,7 @@
1284      int result;
1285      DCL_LOCK_STATE;
1286      
1287 +    if (GC_debugging_started) GC_print_all_smashed();
1288      GC_INVOKE_FINALIZERS();
1289      DISABLE_SIGNALS();
1290      LOCK();
1291 @@ -741,14 +766,17 @@
1292      EXIT_GC();
1293      UNLOCK();
1294      ENABLE_SIGNALS();
1295 -    if(result) GC_INVOKE_FINALIZERS();
1296 +    if(result) {
1297 +        if (GC_debugging_started) GC_print_all_smashed();
1298 +        GC_INVOKE_FINALIZERS();
1299 +    }
1300      return(result);
1301  }
1302  
1303  void GC_gcollect GC_PROTO(())
1304  {
1305 -    GC_notify_full_gc();
1306      (void)GC_try_to_collect(GC_never_stop_func);
1307 +    if (GC_have_errors) GC_print_all_errors();
1308  }
1309  
1310  word GC_n_heap_sects = 0;      /* Number of sections currently in heap. */
1311 @@ -950,7 +978,6 @@
1312  {
1313      if (!GC_incremental && !GC_dont_gc &&
1314         (GC_dont_expand && GC_words_allocd > 0 || GC_should_collect())) {
1315 -      GC_notify_full_gc();
1316        GC_gcollect_inner();
1317      } else {
1318        word blocks_to_get = GC_heapsize/(HBLKSIZE*GC_free_space_divisor)
1319 @@ -975,7 +1002,6 @@
1320          && !GC_expand_hp_inner(needed_blocks)) {
1321         if (GC_fail_count++ < GC_max_retries) {
1322             WARN("Out of Memory!  Trying to continue ...\n", 0);
1323 -           GC_notify_full_gc();
1324             GC_gcollect_inner();
1325         } else {
1326  #          if !defined(AMIGA) || !defined(GC_AMIGA_FASTALLOC)
1327 @@ -1005,14 +1031,15 @@
1328  word sz;
1329  int kind;
1330  {
1331 -    register ptr_t * flh = &(GC_obj_kinds[kind].ok_freelist[sz]);
1332 +    ptr_t * flh = &(GC_obj_kinds[kind].ok_freelist[sz]);
1333 +    GC_bool tried_minor = FALSE;
1334      
1335      if (sz == 0) return(0);
1336  
1337      while (*flh == 0) {
1338        ENTER_GC();
1339        /* Do our share of marking work */
1340 -        if(GC_incremental && !GC_dont_gc) GC_collect_a_little_inner(1);
1341 +        if(TRUE_INCREMENTAL) GC_collect_a_little_inner(1);
1342        /* Sweep blocks for objects of this size */
1343            GC_continue_reclaim(sz, kind);
1344        EXIT_GC();
1345 @@ -1021,13 +1048,21 @@
1346        }
1347        if (*flh == 0) {
1348          ENTER_GC();
1349 +       if (GC_incremental && GC_time_limit == GC_TIME_UNLIMITED
1350 +           && ! tried_minor ) {
1351 +           GC_collect_a_little_inner(1);
1352 +           tried_minor = TRUE;
1353 +       } else {
1354          if (!GC_collect_or_expand((word)1,FALSE)) {
1355             EXIT_GC();
1356             return(0);
1357         }
1358 +       }
1359         EXIT_GC();
1360        }
1361      }
1362 +    /* Successful allocation; reset failure count.     */
1363 +    GC_fail_count = 0;
1364      
1365      return(*flh);
1366  }
1367 diff -buNr boehm-gc/alpha_mach_dep.s boehm-gc/alpha_mach_dep.s
1368 --- boehm-gc/alpha_mach_dep.s   Fri Aug 17 11:30:45 2001
1369 +++ boehm-gc/alpha_mach_dep.s   Sat Sep 13 01:32:42 2003
1370 @@ -1,3 +1,4 @@
1371 + # $Id: darwin-gc.patch,v 1.2 2003/09/13 09:03:17 megacz Exp $
1372         .arch ev6
1373  
1374          .text
1375 diff -buNr boehm-gc/autom4te.cache/output.0 boehm-gc/autom4te.cache/output.0
1376 --- boehm-gc/autom4te.cache/output.0    Wed Dec 31 16:00:00 1969
1377 +++ boehm-gc/autom4te.cache/output.0    Sat Sep 13 01:32:42 2003
1378 @@ -0,0 +1,5049 @@
1379 +@%:@! /bin/sh
1380 +@%:@ Guess values for system-dependent variables and create Makefiles.
1381 +@%:@ Generated by GNU Autoconf 2.57.
1382 +@%:@ 
1383 +@%:@ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
1384 +@%:@ Free Software Foundation, Inc.
1385 +@%:@ This configure script is free software; the Free Software Foundation
1386 +@%:@ gives unlimited permission to copy, distribute and modify it.
1387 +## --------------------- ##
1388 +## M4sh Initialization.  ##
1389 +## --------------------- ##
1390 +
1391 +# Be Bourne compatible
1392 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
1393 +  emulate sh
1394 +  NULLCMD=:
1395 +  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
1396 +  # is contrary to our usage.  Disable this feature.
1397 +  alias -g '${1+"$@"}'='"$@"'
1398 +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
1399 +  set -o posix
1400 +fi
1401 +
1402 +# Support unset when possible.
1403 +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
1404 +  as_unset=unset
1405 +else
1406 +  as_unset=false
1407 +fi
1408 +
1409 +
1410 +# Work around bugs in pre-3.0 UWIN ksh.
1411 +$as_unset ENV MAIL MAILPATH
1412 +PS1='$ '
1413 +PS2='> '
1414 +PS4='+ '
1415 +
1416 +# NLS nuisances.
1417 +for as_var in \
1418 +  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
1419 +  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
1420 +  LC_TELEPHONE LC_TIME
1421 +do
1422 +  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
1423 +    eval $as_var=C; export $as_var
1424 +  else
1425 +    $as_unset $as_var
1426 +  fi
1427 +done
1428 +
1429 +# Required to use basename.
1430 +if expr a : '\(a\)' >/dev/null 2>&1; then
1431 +  as_expr=expr
1432 +else
1433 +  as_expr=false
1434 +fi
1435 +
1436 +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
1437 +  as_basename=basename
1438 +else
1439 +  as_basename=false
1440 +fi
1441 +
1442 +
1443 +# Name of the executable.
1444 +as_me=`$as_basename "$0" ||
1445 +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
1446 +        X"$0" : 'X\(//\)$' \| \
1447 +        X"$0" : 'X\(/\)$' \| \
1448 +        .     : '\(.\)' 2>/dev/null ||
1449 +echo X/"$0" |
1450 +    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
1451 +         /^X\/\(\/\/\)$/{ s//\1/; q; }
1452 +         /^X\/\(\/\).*/{ s//\1/; q; }
1453 +         s/.*/./; q'`
1454 +
1455 +
1456 +# PATH needs CR, and LINENO needs CR and PATH.
1457 +# Avoid depending upon Character Ranges.
1458 +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
1459 +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
1460 +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
1461 +as_cr_digits='0123456789'
1462 +as_cr_alnum=$as_cr_Letters$as_cr_digits
1463 +
1464 +# The user is always right.
1465 +if test "${PATH_SEPARATOR+set}" != set; then
1466 +  echo "#! /bin/sh" >conf$$.sh
1467 +  echo  "exit 0"   >>conf$$.sh
1468 +  chmod +x conf$$.sh
1469 +  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1470 +    PATH_SEPARATOR=';'
1471 +  else
1472 +    PATH_SEPARATOR=:
1473 +  fi
1474 +  rm -f conf$$.sh
1475 +fi
1476 +
1477 +
1478 +  as_lineno_1=$LINENO
1479 +  as_lineno_2=$LINENO
1480 +  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
1481 +  test "x$as_lineno_1" != "x$as_lineno_2" &&
1482 +  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
1483 +  # Find who we are.  Look in the path if we contain no path at all
1484 +  # relative or not.
1485 +  case $0 in
1486 +    *[\\/]* ) as_myself=$0 ;;
1487 +    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1488 +for as_dir in $PATH
1489 +do
1490 +  IFS=$as_save_IFS
1491 +  test -z "$as_dir" && as_dir=.
1492 +  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
1493 +done
1494 +
1495 +       ;;
1496 +  esac
1497 +  # We did not find ourselves, most probably we were run as `sh COMMAND'
1498 +  # in which case we are not to be found in the path.
1499 +  if test "x$as_myself" = x; then
1500 +    as_myself=$0
1501 +  fi
1502 +  if test ! -f "$as_myself"; then
1503 +    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
1504 +   { (exit 1); exit 1; }; }
1505 +  fi
1506 +  case $CONFIG_SHELL in
1507 +  '')
1508 +    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1509 +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
1510 +do
1511 +  IFS=$as_save_IFS
1512 +  test -z "$as_dir" && as_dir=.
1513 +  for as_base in sh bash ksh sh5; do
1514 +        case $as_dir in
1515 +        /*)
1516 +          if ("$as_dir/$as_base" -c '
1517 +  as_lineno_1=$LINENO
1518 +  as_lineno_2=$LINENO
1519 +  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
1520 +  test "x$as_lineno_1" != "x$as_lineno_2" &&
1521 +  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
1522 +            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
1523 +            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
1524 +            CONFIG_SHELL=$as_dir/$as_base
1525 +            export CONFIG_SHELL
1526 +            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
1527 +          fi;;
1528 +        esac
1529 +       done
1530 +done
1531 +;;
1532 +  esac
1533 +
1534 +  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
1535 +  # uniformly replaced by the line number.  The first 'sed' inserts a
1536 +  # line-number line before each line; the second 'sed' does the real
1537 +  # work.  The second script uses 'N' to pair each line-number line
1538 +  # with the numbered line, and appends trailing '-' during
1539 +  # substitution so that $LINENO is not a special case at line end.
1540 +  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
1541 +  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
1542 +  sed '=' <$as_myself |
1543 +    sed '
1544 +      N
1545 +      s,$,-,
1546 +      : loop
1547 +      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
1548 +      t loop
1549 +      s,-$,,
1550 +      s,^['$as_cr_digits']*\n,,
1551 +    ' >$as_me.lineno &&
1552 +  chmod +x $as_me.lineno ||
1553 +    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
1554 +   { (exit 1); exit 1; }; }
1555 +
1556 +  # Don't try to exec as it changes $[0], causing all sort of problems
1557 +  # (the dirname of $[0] is not the place where we might find the
1558 +  # original and so on.  Autoconf is especially sensible to this).
1559 +  . ./$as_me.lineno
1560 +  # Exit status is that of the last command.
1561 +  exit
1562 +}
1563 +
1564 +
1565 +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1566 +  *c*,-n*) ECHO_N= ECHO_C='
1567 +' ECHO_T='     ' ;;
1568 +  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1569 +  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
1570 +esac
1571 +
1572 +if expr a : '\(a\)' >/dev/null 2>&1; then
1573 +  as_expr=expr
1574 +else
1575 +  as_expr=false
1576 +fi
1577 +
1578 +rm -f conf$$ conf$$.exe conf$$.file
1579 +echo >conf$$.file
1580 +if ln -s conf$$.file conf$$ 2>/dev/null; then
1581 +  # We could just check for DJGPP; but this test a) works b) is more generic
1582 +  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
1583 +  if test -f conf$$.exe; then
1584 +    # Don't use ln at all; we don't have any links
1585 +    as_ln_s='cp -p'
1586 +  else
1587 +    as_ln_s='ln -s'
1588 +  fi
1589 +elif ln conf$$.file conf$$ 2>/dev/null; then
1590 +  as_ln_s=ln
1591 +else
1592 +  as_ln_s='cp -p'
1593 +fi
1594 +rm -f conf$$ conf$$.exe conf$$.file
1595 +
1596 +if mkdir -p . 2>/dev/null; then
1597 +  as_mkdir_p=:
1598 +else
1599 +  as_mkdir_p=false
1600 +fi
1601 +
1602 +as_executable_p="test -f"
1603 +
1604 +# Sed expression to map a string onto a valid CPP name.
1605 +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
1606 +
1607 +# Sed expression to map a string onto a valid variable name.
1608 +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
1609 +
1610 +
1611 +# IFS
1612 +# We need space, tab and new line, in precisely that order.
1613 +as_nl='
1614 +'
1615 +IFS="  $as_nl"
1616 +
1617 +# CDPATH.
1618 +$as_unset CDPATH
1619 +
1620 +
1621 +# Name of the host.
1622 +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
1623 +# so uname gets run too.
1624 +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
1625 +
1626 +exec 6>&1
1627 +
1628 +#
1629 +# Initializations.
1630 +#
1631 +ac_default_prefix=/usr/local
1632 +ac_config_libobj_dir=.
1633 +cross_compiling=no
1634 +subdirs=
1635 +MFLAGS=
1636 +MAKEFLAGS=
1637 +SHELL=${CONFIG_SHELL-/bin/sh}
1638 +
1639 +# Maximum number of lines to put in a shell here document.
1640 +# This variable seems obsolete.  It should probably be removed, and
1641 +# only ac_max_sed_lines should be used.
1642 +: ${ac_max_here_lines=38}
1643 +
1644 +# Identity of this package.
1645 +PACKAGE_NAME=
1646 +PACKAGE_TARNAME=
1647 +PACKAGE_VERSION=
1648 +PACKAGE_STRING=
1649 +PACKAGE_BUGREPORT=
1650 +
1651 +ac_unique_file="gcj_mlc.c"
1652 +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS gc_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os mkinstalldirs INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO SET_MAKE CC CXX AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GC_CFLAGS LN_S STRIP ac_ct_STRIP LIBTOOL CXXCPP CPPFLAGS THREADLIBS POWERPC_DARWIN_TRUE POWERPC_DARWIN_FALSE EXTRA_TEST_LIBS target_all INCLUDES CXXINCLUDES addobjs MY_CFLAGS USE_LIBDIR_TRUE USE_LIBDIR_FALSE LIB@&t@OBJS LTLIBOBJS'
1653 +ac_subst_files=''
1654 +
1655 +# Initialize some variables set by options.
1656 +ac_init_help=
1657 +ac_init_version=false
1658 +# The variables have the same names as the options, with
1659 +# dashes changed to underlines.
1660 +cache_file=/dev/null
1661 +exec_prefix=NONE
1662 +no_create=
1663 +no_recursion=
1664 +prefix=NONE
1665 +program_prefix=NONE
1666 +program_suffix=NONE
1667 +program_transform_name=s,x,x,
1668 +silent=
1669 +site=
1670 +srcdir=
1671 +verbose=
1672 +x_includes=NONE
1673 +x_libraries=NONE
1674 +
1675 +# Installation directory options.
1676 +# These are left unexpanded so users can "make install exec_prefix=/foo"
1677 +# and all the variables that are supposed to be based on exec_prefix
1678 +# by default will actually change.
1679 +# Use braces instead of parens because sh, perl, etc. also accept them.
1680 +bindir='${exec_prefix}/bin'
1681 +sbindir='${exec_prefix}/sbin'
1682 +libexecdir='${exec_prefix}/libexec'
1683 +datadir='${prefix}/share'
1684 +sysconfdir='${prefix}/etc'
1685 +sharedstatedir='${prefix}/com'
1686 +localstatedir='${prefix}/var'
1687 +libdir='${exec_prefix}/lib'
1688 +includedir='${prefix}/include'
1689 +oldincludedir='/usr/include'
1690 +infodir='${prefix}/info'
1691 +mandir='${prefix}/man'
1692 +
1693 +ac_prev=
1694 +for ac_option
1695 +do
1696 +  # If the previous option needs an argument, assign it.
1697 +  if test -n "$ac_prev"; then
1698 +    eval "$ac_prev=\$ac_option"
1699 +    ac_prev=
1700 +    continue
1701 +  fi
1702 +
1703 +  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
1704 +
1705 +  # Accept the important Cygnus configure options, so we can diagnose typos.
1706 +
1707 +  case $ac_option in
1708 +
1709 +  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1710 +    ac_prev=bindir ;;
1711 +  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1712 +    bindir=$ac_optarg ;;
1713 +
1714 +  -build | --build | --buil | --bui | --bu)
1715 +    ac_prev=build_alias ;;
1716 +  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1717 +    build_alias=$ac_optarg ;;
1718 +
1719 +  -cache-file | --cache-file | --cache-fil | --cache-fi \
1720 +  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1721 +    ac_prev=cache_file ;;
1722 +  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1723 +  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1724 +    cache_file=$ac_optarg ;;
1725 +
1726 +  --config-cache | -C)
1727 +    cache_file=config.cache ;;
1728 +
1729 +  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
1730 +    ac_prev=datadir ;;
1731 +  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
1732 +  | --da=*)
1733 +    datadir=$ac_optarg ;;
1734 +
1735 +  -disable-* | --disable-*)
1736 +    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1737 +    # Reject names that are not valid shell variable names.
1738 +    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1739 +      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
1740 +   { (exit 1); exit 1; }; }
1741 +    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
1742 +    eval "enable_$ac_feature=no" ;;
1743 +
1744 +  -enable-* | --enable-*)
1745 +    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1746 +    # Reject names that are not valid shell variable names.
1747 +    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1748 +      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
1749 +   { (exit 1); exit 1; }; }
1750 +    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
1751 +    case $ac_option in
1752 +      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
1753 +      *) ac_optarg=yes ;;
1754 +    esac
1755 +    eval "enable_$ac_feature='$ac_optarg'" ;;
1756 +
1757 +  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1758 +  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1759 +  | --exec | --exe | --ex)
1760 +    ac_prev=exec_prefix ;;
1761 +  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1762 +  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1763 +  | --exec=* | --exe=* | --ex=*)
1764 +    exec_prefix=$ac_optarg ;;
1765 +
1766 +  -gas | --gas | --ga | --g)
1767 +    # Obsolete; use --with-gas.
1768 +    with_gas=yes ;;
1769 +
1770 +  -help | --help | --hel | --he | -h)
1771 +    ac_init_help=long ;;
1772 +  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1773 +    ac_init_help=recursive ;;
1774 +  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1775 +    ac_init_help=short ;;
1776 +
1777 +  -host | --host | --hos | --ho)
1778 +    ac_prev=host_alias ;;
1779 +  -host=* | --host=* | --hos=* | --ho=*)
1780 +    host_alias=$ac_optarg ;;
1781 +
1782 +  -includedir | --includedir | --includedi | --included | --include \
1783 +  | --includ | --inclu | --incl | --inc)
1784 +    ac_prev=includedir ;;
1785 +  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1786 +  | --includ=* | --inclu=* | --incl=* | --inc=*)
1787 +    includedir=$ac_optarg ;;
1788 +
1789 +  -infodir | --infodir | --infodi | --infod | --info | --inf)
1790 +    ac_prev=infodir ;;
1791 +  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1792 +    infodir=$ac_optarg ;;
1793 +
1794 +  -libdir | --libdir | --libdi | --libd)
1795 +    ac_prev=libdir ;;
1796 +  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1797 +    libdir=$ac_optarg ;;
1798 +
1799 +  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1800 +  | --libexe | --libex | --libe)
1801 +    ac_prev=libexecdir ;;
1802 +  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1803 +  | --libexe=* | --libex=* | --libe=*)
1804 +    libexecdir=$ac_optarg ;;
1805 +
1806 +  -localstatedir | --localstatedir | --localstatedi | --localstated \
1807 +  | --localstate | --localstat | --localsta | --localst \
1808 +  | --locals | --local | --loca | --loc | --lo)
1809 +    ac_prev=localstatedir ;;
1810 +  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1811 +  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
1812 +  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
1813 +    localstatedir=$ac_optarg ;;
1814 +
1815 +  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1816 +    ac_prev=mandir ;;
1817 +  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1818 +    mandir=$ac_optarg ;;
1819 +
1820 +  -nfp | --nfp | --nf)
1821 +    # Obsolete; use --without-fp.
1822 +    with_fp=no ;;
1823 +
1824 +  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1825 +  | --no-cr | --no-c | -n)
1826 +    no_create=yes ;;
1827 +
1828 +  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1829 +  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1830 +    no_recursion=yes ;;
1831 +
1832 +  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1833 +  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1834 +  | --oldin | --oldi | --old | --ol | --o)
1835 +    ac_prev=oldincludedir ;;
1836 +  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1837 +  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1838 +  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1839 +    oldincludedir=$ac_optarg ;;
1840 +
1841 +  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1842 +    ac_prev=prefix ;;
1843 +  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1844 +    prefix=$ac_optarg ;;
1845 +
1846 +  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1847 +  | --program-pre | --program-pr | --program-p)
1848 +    ac_prev=program_prefix ;;
1849 +  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1850 +  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1851 +    program_prefix=$ac_optarg ;;
1852 +
1853 +  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1854 +  | --program-suf | --program-su | --program-s)
1855 +    ac_prev=program_suffix ;;
1856 +  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1857 +  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1858 +    program_suffix=$ac_optarg ;;
1859 +
1860 +  -program-transform-name | --program-transform-name \
1861 +  | --program-transform-nam | --program-transform-na \
1862 +  | --program-transform-n | --program-transform- \
1863 +  | --program-transform | --program-transfor \
1864 +  | --program-transfo | --program-transf \
1865 +  | --program-trans | --program-tran \
1866 +  | --progr-tra | --program-tr | --program-t)
1867 +    ac_prev=program_transform_name ;;
1868 +  -program-transform-name=* | --program-transform-name=* \
1869 +  | --program-transform-nam=* | --program-transform-na=* \
1870 +  | --program-transform-n=* | --program-transform-=* \
1871 +  | --program-transform=* | --program-transfor=* \
1872 +  | --program-transfo=* | --program-transf=* \
1873 +  | --program-trans=* | --program-tran=* \
1874 +  | --progr-tra=* | --program-tr=* | --program-t=*)
1875 +    program_transform_name=$ac_optarg ;;
1876 +
1877 +  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1878 +  | -silent | --silent | --silen | --sile | --sil)
1879 +    silent=yes ;;
1880 +
1881 +  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1882 +    ac_prev=sbindir ;;
1883 +  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1884 +  | --sbi=* | --sb=*)
1885 +    sbindir=$ac_optarg ;;
1886 +
1887 +  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1888 +  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1889 +  | --sharedst | --shareds | --shared | --share | --shar \
1890 +  | --sha | --sh)
1891 +    ac_prev=sharedstatedir ;;
1892 +  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1893 +  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1894 +  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1895 +  | --sha=* | --sh=*)
1896 +    sharedstatedir=$ac_optarg ;;
1897 +
1898 +  -site | --site | --sit)
1899 +    ac_prev=site ;;
1900 +  -site=* | --site=* | --sit=*)
1901 +    site=$ac_optarg ;;
1902 +
1903 +  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1904 +    ac_prev=srcdir ;;
1905 +  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1906 +    srcdir=$ac_optarg ;;
1907 +
1908 +  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1909 +  | --syscon | --sysco | --sysc | --sys | --sy)
1910 +    ac_prev=sysconfdir ;;
1911 +  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1912 +  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1913 +    sysconfdir=$ac_optarg ;;
1914 +
1915 +  -target | --target | --targe | --targ | --tar | --ta | --t)
1916 +    ac_prev=target_alias ;;
1917 +  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1918 +    target_alias=$ac_optarg ;;
1919 +
1920 +  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1921 +    verbose=yes ;;
1922 +
1923 +  -version | --version | --versio | --versi | --vers | -V)
1924 +    ac_init_version=: ;;
1925 +
1926 +  -with-* | --with-*)
1927 +    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1928 +    # Reject names that are not valid shell variable names.
1929 +    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1930 +      { echo "$as_me: error: invalid package name: $ac_package" >&2
1931 +   { (exit 1); exit 1; }; }
1932 +    ac_package=`echo $ac_package| sed 's/-/_/g'`
1933 +    case $ac_option in
1934 +      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
1935 +      *) ac_optarg=yes ;;
1936 +    esac
1937 +    eval "with_$ac_package='$ac_optarg'" ;;
1938 +
1939 +  -without-* | --without-*)
1940 +    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1941 +    # Reject names that are not valid shell variable names.
1942 +    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1943 +      { echo "$as_me: error: invalid package name: $ac_package" >&2
1944 +   { (exit 1); exit 1; }; }
1945 +    ac_package=`echo $ac_package | sed 's/-/_/g'`
1946 +    eval "with_$ac_package=no" ;;
1947 +
1948 +  --x)
1949 +    # Obsolete; use --with-x.
1950 +    with_x=yes ;;
1951 +
1952 +  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1953 +  | --x-incl | --x-inc | --x-in | --x-i)
1954 +    ac_prev=x_includes ;;
1955 +  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1956 +  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1957 +    x_includes=$ac_optarg ;;
1958 +
1959 +  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1960 +  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1961 +    ac_prev=x_libraries ;;
1962 +  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1963 +  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1964 +    x_libraries=$ac_optarg ;;
1965 +
1966 +  -*) { echo "$as_me: error: unrecognized option: $ac_option
1967 +Try \`$0 --help' for more information." >&2
1968 +   { (exit 1); exit 1; }; }
1969 +    ;;
1970 +
1971 +  *=*)
1972 +    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1973 +    # Reject names that are not valid shell variable names.
1974 +    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1975 +      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1976 +   { (exit 1); exit 1; }; }
1977 +    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
1978 +    eval "$ac_envvar='$ac_optarg'"
1979 +    export $ac_envvar ;;
1980 +
1981 +  *)
1982 +    # FIXME: should be removed in autoconf 3.0.
1983 +    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1984 +    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1985 +      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1986 +    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1987 +    ;;
1988 +
1989 +  esac
1990 +done
1991 +
1992 +if test -n "$ac_prev"; then
1993 +  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1994 +  { echo "$as_me: error: missing argument to $ac_option" >&2
1995 +   { (exit 1); exit 1; }; }
1996 +fi
1997 +
1998 +# Be sure to have absolute paths.
1999 +for ac_var in exec_prefix prefix
2000 +do
2001 +  eval ac_val=$`echo $ac_var`
2002 +  case $ac_val in
2003 +    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
2004 +    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
2005 +   { (exit 1); exit 1; }; };;
2006 +  esac
2007 +done
2008 +
2009 +# Be sure to have absolute paths.
2010 +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
2011 +              localstatedir libdir includedir oldincludedir infodir mandir
2012 +do
2013 +  eval ac_val=$`echo $ac_var`
2014 +  case $ac_val in
2015 +    [\\/$]* | ?:[\\/]* ) ;;
2016 +    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
2017 +   { (exit 1); exit 1; }; };;
2018 +  esac
2019 +done
2020 +
2021 +# There might be people who depend on the old broken behavior: `$host'
2022 +# used to hold the argument of --host etc.
2023 +# FIXME: To remove some day.
2024 +build=$build_alias
2025 +host=$host_alias
2026 +target=$target_alias
2027 +
2028 +# FIXME: To remove some day.
2029 +if test "x$host_alias" != x; then
2030 +  if test "x$build_alias" = x; then
2031 +    cross_compiling=maybe
2032 +    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2033 +    If a cross compiler is detected then cross compile mode will be used." >&2
2034 +  elif test "x$build_alias" != "x$host_alias"; then
2035 +    cross_compiling=yes
2036 +  fi
2037 +fi
2038 +
2039 +ac_tool_prefix=
2040 +test -n "$host_alias" && ac_tool_prefix=$host_alias-
2041 +
2042 +test "$silent" = yes && exec 6>/dev/null
2043 +
2044 +
2045 +# Find the source files, if location was not specified.
2046 +if test -z "$srcdir"; then
2047 +  ac_srcdir_defaulted=yes
2048 +  # Try the directory containing this script, then its parent.
2049 +  ac_confdir=`(dirname "$0") 2>/dev/null ||
2050 +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2051 +         X"$0" : 'X\(//\)[^/]' \| \
2052 +         X"$0" : 'X\(//\)$' \| \
2053 +         X"$0" : 'X\(/\)' \| \
2054 +         .     : '\(.\)' 2>/dev/null ||
2055 +echo X"$0" |
2056 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
2057 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
2058 +         /^X\(\/\/\)$/{ s//\1/; q; }
2059 +         /^X\(\/\).*/{ s//\1/; q; }
2060 +         s/.*/./; q'`
2061 +  srcdir=$ac_confdir
2062 +  if test ! -r $srcdir/$ac_unique_file; then
2063 +    srcdir=..
2064 +  fi
2065 +else
2066 +  ac_srcdir_defaulted=no
2067 +fi
2068 +if test ! -r $srcdir/$ac_unique_file; then
2069 +  if test "$ac_srcdir_defaulted" = yes; then
2070 +    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
2071 +   { (exit 1); exit 1; }; }
2072 +  else
2073 +    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
2074 +   { (exit 1); exit 1; }; }
2075 +  fi
2076 +fi
2077 +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
2078 +  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
2079 +   { (exit 1); exit 1; }; }
2080 +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
2081 +ac_env_build_alias_set=${build_alias+set}
2082 +ac_env_build_alias_value=$build_alias
2083 +ac_cv_env_build_alias_set=${build_alias+set}
2084 +ac_cv_env_build_alias_value=$build_alias
2085 +ac_env_host_alias_set=${host_alias+set}
2086 +ac_env_host_alias_value=$host_alias
2087 +ac_cv_env_host_alias_set=${host_alias+set}
2088 +ac_cv_env_host_alias_value=$host_alias
2089 +ac_env_target_alias_set=${target_alias+set}
2090 +ac_env_target_alias_value=$target_alias
2091 +ac_cv_env_target_alias_set=${target_alias+set}
2092 +ac_cv_env_target_alias_value=$target_alias
2093 +ac_env_CXXCPP_set=${CXXCPP+set}
2094 +ac_env_CXXCPP_value=$CXXCPP
2095 +ac_cv_env_CXXCPP_set=${CXXCPP+set}
2096 +ac_cv_env_CXXCPP_value=$CXXCPP
2097 +ac_env_CPPFLAGS_set=${CPPFLAGS+set}
2098 +ac_env_CPPFLAGS_value=$CPPFLAGS
2099 +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
2100 +ac_cv_env_CPPFLAGS_value=$CPPFLAGS
2101 +
2102 +#
2103 +# Report the --help message.
2104 +#
2105 +if test "$ac_init_help" = "long"; then
2106 +  # Omit some internal or obsolete options to make the list less imposing.
2107 +  # This message is too long to be a string in the A/UX 3.1 sh.
2108 +  cat <<_ACEOF
2109 +\`configure' configures this package to adapt to many kinds of systems.
2110 +
2111 +Usage: $0 [OPTION]... [VAR=VALUE]...
2112 +
2113 +To assign environment variables (e.g., CC, CFLAGS...), specify them as
2114 +VAR=VALUE.  See below for descriptions of some of the useful variables.
2115 +
2116 +Defaults for the options are specified in brackets.
2117 +
2118 +Configuration:
2119 +  -h, --help              display this help and exit
2120 +      --help=short        display options specific to this package
2121 +      --help=recursive    display the short help of all the included packages
2122 +  -V, --version           display version information and exit
2123 +  -q, --quiet, --silent   do not print \`checking...' messages
2124 +      --cache-file=FILE   cache test results in FILE [disabled]
2125 +  -C, --config-cache      alias for \`--cache-file=config.cache'
2126 +  -n, --no-create         do not create output files
2127 +      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2128 +
2129 +_ACEOF
2130 +
2131 +  cat <<_ACEOF
2132 +Installation directories:
2133 +  --prefix=PREFIX         install architecture-independent files in PREFIX
2134 +                          [$ac_default_prefix]
2135 +  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2136 +                          [PREFIX]
2137 +
2138 +By default, \`make install' will install all the files in
2139 +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2140 +an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2141 +for instance \`--prefix=\$HOME'.
2142 +
2143 +For better control, use the options below.
2144 +
2145 +Fine tuning of the installation directories:
2146 +  --bindir=DIR           user executables [EPREFIX/bin]
2147 +  --sbindir=DIR          system admin executables [EPREFIX/sbin]
2148 +  --libexecdir=DIR       program executables [EPREFIX/libexec]
2149 +  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
2150 +  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
2151 +  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
2152 +  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
2153 +  --libdir=DIR           object code libraries [EPREFIX/lib]
2154 +  --includedir=DIR       C header files [PREFIX/include]
2155 +  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
2156 +  --infodir=DIR          info documentation [PREFIX/info]
2157 +  --mandir=DIR           man documentation [PREFIX/man]
2158 +_ACEOF
2159 +
2160 +  cat <<\_ACEOF
2161 +
2162 +Program names:
2163 +  --program-prefix=PREFIX            prepend PREFIX to installed program names
2164 +  --program-suffix=SUFFIX            append SUFFIX to installed program names
2165 +  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2166 +
2167 +System types:
2168 +  --build=BUILD     configure for building on BUILD [guessed]
2169 +  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2170 +  --target=TARGET   configure for building compilers for TARGET [HOST]
2171 +_ACEOF
2172 +fi
2173 +
2174 +if test -n "$ac_init_help"; then
2175 +
2176 +  cat <<\_ACEOF
2177 +
2178 +Optional Features:
2179 +  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2180 +  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2181 +  --enable-multilib       build many library versions (default)
2182 +  --enable-maintainer-mode enable make rules and dependencies not useful
2183 +                          (and sometimes confusing) to the casual installer
2184 +  --enable-shared=PKGS  build shared libraries default=yes
2185 +  --enable-static=PKGS  build static libraries default=yes
2186 +  --enable-fast-install=PKGS  optimize for fast installation default=yes
2187 +  --disable-libtool-lock  avoid locking (might break parallel builds)
2188 +  --enable-parallel-mark       parallelize marking and free list construction
2189 +  --enable-shared=PKGS  build shared libraries default=no
2190 +  --enable-full-debug  include full support for pointer backtracing etc.
2191 +
2192 +Optional Packages:
2193 +  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2194 +  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2195 +  --with-gnu-ld           assume the C compiler uses GNU ld default=no
2196 +  --with-pic              try to use only PIC/non-PIC objects default=use both
2197 +  --with-target-subdir=SUBDIR
2198 +                          configuring with a cross compiler
2199 +  --with-cross-host=HOST  configuring with a cross compiler
2200 +  --with-ecos             enable runtime eCos target support
2201 +
2202 +Some influential environment variables:
2203 +  CXXCPP      C++ preprocessor
2204 +  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
2205 +              headers in a nonstandard directory <include dir>
2206 +
2207 +Use these variables to override the choices made by `configure' or to help
2208 +it to find libraries and programs with nonstandard names/locations.
2209 +
2210 +_ACEOF
2211 +fi
2212 +
2213 +if test "$ac_init_help" = "recursive"; then
2214 +  # If there are subdirs, report their specific --help.
2215 +  ac_popdir=`pwd`
2216 +  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2217 +    test -d $ac_dir || continue
2218 +    ac_builddir=.
2219 +
2220 +if test "$ac_dir" != .; then
2221 +  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
2222 +  # A "../" for each directory in $ac_dir_suffix.
2223 +  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
2224 +else
2225 +  ac_dir_suffix= ac_top_builddir=
2226 +fi
2227 +
2228 +case $srcdir in
2229 +  .)  # No --srcdir option.  We are building in place.
2230 +    ac_srcdir=.
2231 +    if test -z "$ac_top_builddir"; then
2232 +       ac_top_srcdir=.
2233 +    else
2234 +       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
2235 +    fi ;;
2236 +  [\\/]* | ?:[\\/]* )  # Absolute path.
2237 +    ac_srcdir=$srcdir$ac_dir_suffix;
2238 +    ac_top_srcdir=$srcdir ;;
2239 +  *) # Relative path.
2240 +    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
2241 +    ac_top_srcdir=$ac_top_builddir$srcdir ;;
2242 +esac
2243 +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
2244 +# absolute.
2245 +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
2246 +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
2247 +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
2248 +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
2249 +
2250 +    cd $ac_dir
2251 +    # Check for guested configure; otherwise get Cygnus style configure.
2252 +    if test -f $ac_srcdir/configure.gnu; then
2253 +      echo
2254 +      $SHELL $ac_srcdir/configure.gnu  --help=recursive
2255 +    elif test -f $ac_srcdir/configure; then
2256 +      echo
2257 +      $SHELL $ac_srcdir/configure  --help=recursive
2258 +    elif test -f $ac_srcdir/configure.ac ||
2259 +           test -f $ac_srcdir/configure.in; then
2260 +      echo
2261 +      $ac_configure --help
2262 +    else
2263 +      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2264 +    fi
2265 +    cd $ac_popdir
2266 +  done
2267 +fi
2268 +
2269 +test -n "$ac_init_help" && exit 0
2270 +if $ac_init_version; then
2271 +  cat <<\_ACEOF
2272 +
2273 +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
2274 +Free Software Foundation, Inc.
2275 +This configure script is free software; the Free Software Foundation
2276 +gives unlimited permission to copy, distribute and modify it.
2277 +_ACEOF
2278 +  exit 0
2279 +fi
2280 +exec 5>config.log
2281 +cat >&5 <<_ACEOF
2282 +This file contains any messages produced by compilers while
2283 +running configure, to aid debugging if configure makes a mistake.
2284 +
2285 +It was created by $as_me, which was
2286 +generated by GNU Autoconf 2.57.  Invocation command line was
2287 +
2288 +  $ $0 $@
2289 +
2290 +_ACEOF
2291 +{
2292 +cat <<_ASUNAME
2293 +@%:@@%:@ --------- @%:@@%:@
2294 +@%:@@%:@ Platform. @%:@@%:@
2295 +@%:@@%:@ --------- @%:@@%:@
2296 +
2297 +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2298 +uname -m = `(uname -m) 2>/dev/null || echo unknown`
2299 +uname -r = `(uname -r) 2>/dev/null || echo unknown`
2300 +uname -s = `(uname -s) 2>/dev/null || echo unknown`
2301 +uname -v = `(uname -v) 2>/dev/null || echo unknown`
2302 +
2303 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2304 +/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2305 +
2306 +/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2307 +/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2308 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2309 +hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
2310 +/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2311 +/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2312 +/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2313 +
2314 +_ASUNAME
2315 +
2316 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2317 +for as_dir in $PATH
2318 +do
2319 +  IFS=$as_save_IFS
2320 +  test -z "$as_dir" && as_dir=.
2321 +  echo "PATH: $as_dir"
2322 +done
2323 +
2324 +} >&5
2325 +
2326 +cat >&5 <<_ACEOF
2327 +
2328 +
2329 +@%:@@%:@ ----------- @%:@@%:@
2330 +@%:@@%:@ Core tests. @%:@@%:@
2331 +@%:@@%:@ ----------- @%:@@%:@
2332 +
2333 +_ACEOF
2334 +
2335 +
2336 +# Keep a trace of the command line.
2337 +# Strip out --no-create and --no-recursion so they do not pile up.
2338 +# Strip out --silent because we don't want to record it for future runs.
2339 +# Also quote any args containing shell meta-characters.
2340 +# Make two passes to allow for proper duplicate-argument suppression.
2341 +ac_configure_args=
2342 +ac_configure_args0=
2343 +ac_configure_args1=
2344 +ac_sep=
2345 +ac_must_keep_next=false
2346 +for ac_pass in 1 2
2347 +do
2348 +  for ac_arg
2349 +  do
2350 +    case $ac_arg in
2351 +    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2352 +    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2353 +    | -silent | --silent | --silen | --sile | --sil)
2354 +      continue ;;
2355 +    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
2356 +      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2357 +    esac
2358 +    case $ac_pass in
2359 +    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
2360 +    2)
2361 +      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
2362 +      if test $ac_must_keep_next = true; then
2363 +        ac_must_keep_next=false # Got value, back to normal.
2364 +      else
2365 +        case $ac_arg in
2366 +          *=* | --config-cache | -C | -disable-* | --disable-* \
2367 +          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2368 +          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2369 +          | -with-* | --with-* | -without-* | --without-* | --x)
2370 +            case "$ac_configure_args0 " in
2371 +              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2372 +            esac
2373 +            ;;
2374 +          -* ) ac_must_keep_next=true ;;
2375 +        esac
2376 +      fi
2377 +      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
2378 +      # Get rid of the leading space.
2379 +      ac_sep=" "
2380 +      ;;
2381 +    esac
2382 +  done
2383 +done
2384 +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
2385 +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
2386 +
2387 +# When interrupted or exit'd, cleanup temporary files, and complete
2388 +# config.log.  We remove comments because anyway the quotes in there
2389 +# would cause problems or look ugly.
2390 +# WARNING: Be sure not to use single quotes in there, as some shells,
2391 +# such as our DU 5.0 friend, will then `close' the trap.
2392 +trap 'exit_status=$?
2393 +  # Save into config.log some information that might help in debugging.
2394 +  {
2395 +    echo
2396 +
2397 +    cat <<\_ASBOX
2398 +@%:@@%:@ ---------------- @%:@@%:@
2399 +@%:@@%:@ Cache variables. @%:@@%:@
2400 +@%:@@%:@ ---------------- @%:@@%:@
2401 +_ASBOX
2402 +    echo
2403 +    # The following way of writing the cache mishandles newlines in values,
2404 +{
2405 +  (set) 2>&1 |
2406 +    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
2407 +    *ac_space=\ *)
2408 +      sed -n \
2409 +        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
2410 +         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
2411 +      ;;
2412 +    *)
2413 +      sed -n \
2414 +        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
2415 +      ;;
2416 +    esac;
2417 +}
2418 +    echo
2419 +
2420 +    cat <<\_ASBOX
2421 +@%:@@%:@ ----------------- @%:@@%:@
2422 +@%:@@%:@ Output variables. @%:@@%:@
2423 +@%:@@%:@ ----------------- @%:@@%:@
2424 +_ASBOX
2425 +    echo
2426 +    for ac_var in $ac_subst_vars
2427 +    do
2428 +      eval ac_val=$`echo $ac_var`
2429 +      echo "$ac_var='"'"'$ac_val'"'"'"
2430 +    done | sort
2431 +    echo
2432 +
2433 +    if test -n "$ac_subst_files"; then
2434 +      cat <<\_ASBOX
2435 +@%:@@%:@ ------------- @%:@@%:@
2436 +@%:@@%:@ Output files. @%:@@%:@
2437 +@%:@@%:@ ------------- @%:@@%:@
2438 +_ASBOX
2439 +      echo
2440 +      for ac_var in $ac_subst_files
2441 +      do
2442 +       eval ac_val=$`echo $ac_var`
2443 +        echo "$ac_var='"'"'$ac_val'"'"'"
2444 +      done | sort
2445 +      echo
2446 +    fi
2447 +
2448 +    if test -s confdefs.h; then
2449 +      cat <<\_ASBOX
2450 +@%:@@%:@ ----------- @%:@@%:@
2451 +@%:@@%:@ confdefs.h. @%:@@%:@
2452 +@%:@@%:@ ----------- @%:@@%:@
2453 +_ASBOX
2454 +      echo
2455 +      sed "/^$/d" confdefs.h | sort
2456 +      echo
2457 +    fi
2458 +    test "$ac_signal" != 0 &&
2459 +      echo "$as_me: caught signal $ac_signal"
2460 +    echo "$as_me: exit $exit_status"
2461 +  } >&5
2462 +  rm -f core core.* *.core &&
2463 +  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
2464 +    exit $exit_status
2465 +     ' 0
2466 +for ac_signal in 1 2 13 15; do
2467 +  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
2468 +done
2469 +ac_signal=0
2470 +
2471 +# confdefs.h avoids OS command line length limits that DEFS can exceed.
2472 +rm -rf conftest* confdefs.h
2473 +# AIX cpp loses on an empty file, so make sure it contains at least a newline.
2474 +echo >confdefs.h
2475 +
2476 +# Predefined preprocessor variables.
2477 +
2478 +cat >>confdefs.h <<_ACEOF
2479 +@%:@define PACKAGE_NAME "$PACKAGE_NAME"
2480 +_ACEOF
2481 +
2482 +
2483 +cat >>confdefs.h <<_ACEOF
2484 +@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2485 +_ACEOF
2486 +
2487 +
2488 +cat >>confdefs.h <<_ACEOF
2489 +@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
2490 +_ACEOF
2491 +
2492 +
2493 +cat >>confdefs.h <<_ACEOF
2494 +@%:@define PACKAGE_STRING "$PACKAGE_STRING"
2495 +_ACEOF
2496 +
2497 +
2498 +cat >>confdefs.h <<_ACEOF
2499 +@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2500 +_ACEOF
2501 +
2502 +
2503 +# Let the site file select an alternate cache file if it wants to.
2504 +# Prefer explicitly selected file to automatically selected ones.
2505 +if test -z "$CONFIG_SITE"; then
2506 +  if test "x$prefix" != xNONE; then
2507 +    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
2508 +  else
2509 +    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2510 +  fi
2511 +fi
2512 +for ac_site_file in $CONFIG_SITE; do
2513 +  if test -r "$ac_site_file"; then
2514 +    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
2515 +echo "$as_me: loading site script $ac_site_file" >&6;}
2516 +    sed 's/^/| /' "$ac_site_file" >&5
2517 +    . "$ac_site_file"
2518 +  fi
2519 +done
2520 +
2521 +if test -r "$cache_file"; then
2522 +  # Some versions of bash will fail to source /dev/null (special
2523 +  # files actually), so we avoid doing that.
2524 +  if test -f "$cache_file"; then
2525 +    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
2526 +echo "$as_me: loading cache $cache_file" >&6;}
2527 +    case $cache_file in
2528 +      [\\/]* | ?:[\\/]* ) . $cache_file;;
2529 +      *)                      . ./$cache_file;;
2530 +    esac
2531 +  fi
2532 +else
2533 +  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
2534 +echo "$as_me: creating cache $cache_file" >&6;}
2535 +  >$cache_file
2536 +fi
2537 +
2538 +# Check that the precious variables saved in the cache have kept the same
2539 +# value.
2540 +ac_cache_corrupted=false
2541 +for ac_var in `(set) 2>&1 |
2542 +               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
2543 +  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2544 +  eval ac_new_set=\$ac_env_${ac_var}_set
2545 +  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
2546 +  eval ac_new_val="\$ac_env_${ac_var}_value"
2547 +  case $ac_old_set,$ac_new_set in
2548 +    set,)
2549 +      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2550 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2551 +      ac_cache_corrupted=: ;;
2552 +    ,set)
2553 +      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
2554 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2555 +      ac_cache_corrupted=: ;;
2556 +    ,);;
2557 +    *)
2558 +      if test "x$ac_old_val" != "x$ac_new_val"; then
2559 +        { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
2560 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2561 +        { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
2562 +echo "$as_me:   former value:  $ac_old_val" >&2;}
2563 +        { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
2564 +echo "$as_me:   current value: $ac_new_val" >&2;}
2565 +        ac_cache_corrupted=:
2566 +      fi;;
2567 +  esac
2568 +  # Pass precious variables to config.status.
2569 +  if test "$ac_new_set" = set; then
2570 +    case $ac_new_val in
2571 +    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
2572 +      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2573 +    *) ac_arg=$ac_var=$ac_new_val ;;
2574 +    esac
2575 +    case " $ac_configure_args " in
2576 +      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2577 +      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
2578 +    esac
2579 +  fi
2580 +done
2581 +if $ac_cache_corrupted; then
2582 +  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
2583 +echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2584 +  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
2585 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
2586 +   { (exit 1); exit 1; }; }
2587 +fi
2588 +
2589 +ac_ext=c
2590 +ac_cpp='$CPP $CPPFLAGS'
2591 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2592 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2593 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
2594 +
2595 +
2596 +
2597 +
2598 +
2599 +
2600 +
2601 +
2602 +
2603 +
2604 +
2605 +
2606 +
2607 +
2608 +
2609 +
2610 +
2611 +
2612 +
2613 +
2614 +# This works around the fact that libtool configuration may change LD
2615 +# for this particular configuration, but some shells, instead of
2616 +# keeping the changes in LD private, export them just because LD is
2617 +# exported.
2618 +ORIGINAL_LD_FOR_MULTILIBS=$LD
2619 +
2620 +ac_aux_dir=
2621 +for ac_dir in . $srcdir/.; do
2622 +  if test -f $ac_dir/install-sh; then
2623 +    ac_aux_dir=$ac_dir
2624 +    ac_install_sh="$ac_aux_dir/install-sh -c"
2625 +    break
2626 +  elif test -f $ac_dir/install.sh; then
2627 +    ac_aux_dir=$ac_dir
2628 +    ac_install_sh="$ac_aux_dir/install.sh -c"
2629 +    break
2630 +  elif test -f $ac_dir/shtool; then
2631 +    ac_aux_dir=$ac_dir
2632 +    ac_install_sh="$ac_aux_dir/shtool install -c"
2633 +    break
2634 +  fi
2635 +done
2636 +if test -z "$ac_aux_dir"; then
2637 +  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in . $srcdir/." >&5
2638 +echo "$as_me: error: cannot find install-sh or install.sh in . $srcdir/." >&2;}
2639 +   { (exit 1); exit 1; }; }
2640 +fi
2641 +ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2642 +ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2643 +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2644 +
2645 +
2646 +# Make sure we can run config.sub.
2647 +$ac_config_sub sun4 >/dev/null 2>&1 ||
2648 +  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
2649 +echo "$as_me: error: cannot run $ac_config_sub" >&2;}
2650 +   { (exit 1); exit 1; }; }
2651 +
2652 +echo "$as_me:$LINENO: checking build system type" >&5
2653 +echo $ECHO_N "checking build system type... $ECHO_C" >&6
2654 +if test "${ac_cv_build+set}" = set; then
2655 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2656 +else
2657 +  ac_cv_build_alias=$build_alias
2658 +test -z "$ac_cv_build_alias" &&
2659 +  ac_cv_build_alias=`$ac_config_guess`
2660 +test -z "$ac_cv_build_alias" &&
2661 +  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2662 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2663 +   { (exit 1); exit 1; }; }
2664 +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
2665 +  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
2666 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
2667 +   { (exit 1); exit 1; }; }
2668 +
2669 +fi
2670 +echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2671 +echo "${ECHO_T}$ac_cv_build" >&6
2672 +build=$ac_cv_build
2673 +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2674 +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2675 +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2676 +
2677 +
2678 +echo "$as_me:$LINENO: checking host system type" >&5
2679 +echo $ECHO_N "checking host system type... $ECHO_C" >&6
2680 +if test "${ac_cv_host+set}" = set; then
2681 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2682 +else
2683 +  ac_cv_host_alias=$host_alias
2684 +test -z "$ac_cv_host_alias" &&
2685 +  ac_cv_host_alias=$ac_cv_build_alias
2686 +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
2687 +  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
2688 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
2689 +   { (exit 1); exit 1; }; }
2690 +
2691 +fi
2692 +echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2693 +echo "${ECHO_T}$ac_cv_host" >&6
2694 +host=$ac_cv_host
2695 +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2696 +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2697 +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2698 +
2699 +
2700 +# Find a good install program.  We prefer a C program (faster),
2701 +# so one script is as good as another.  But avoid the broken or
2702 +# incompatible versions:
2703 +# SysV /etc/install, /usr/sbin/install
2704 +# SunOS /usr/etc/install
2705 +# IRIX /sbin/install
2706 +# AIX /bin/install
2707 +# AmigaOS /C/install, which installs bootblocks on floppy discs
2708 +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2709 +# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2710 +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2711 +# ./install, which can be erroneously created by make from ./install.sh.
2712 +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2713 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2714 +if test -z "$INSTALL"; then
2715 +if test "${ac_cv_path_install+set}" = set; then
2716 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2717 +else
2718 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2719 +for as_dir in $PATH
2720 +do
2721 +  IFS=$as_save_IFS
2722 +  test -z "$as_dir" && as_dir=.
2723 +  # Account for people who put trailing slashes in PATH elements.
2724 +case $as_dir/ in
2725 +  ./ | .// | /cC/* | \
2726 +  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2727 +  /usr/ucb/* ) ;;
2728 +  *)
2729 +    # OSF1 and SCO ODT 3.0 have their own names for install.
2730 +    # Don't use installbsd from OSF since it installs stuff as root
2731 +    # by default.
2732 +    for ac_prog in ginstall scoinst install; do
2733 +      for ac_exec_ext in '' $ac_executable_extensions; do
2734 +        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2735 +          if test $ac_prog = install &&
2736 +            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2737 +            # AIX install.  It has an incompatible calling convention.
2738 +            :
2739 +          elif test $ac_prog = install &&
2740 +            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2741 +            # program-specific install script used by HP pwplus--don't use.
2742 +            :
2743 +          else
2744 +            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2745 +            break 3
2746 +          fi
2747 +        fi
2748 +      done
2749 +    done
2750 +    ;;
2751 +esac
2752 +done
2753 +
2754 +
2755 +fi
2756 +  if test "${ac_cv_path_install+set}" = set; then
2757 +    INSTALL=$ac_cv_path_install
2758 +  else
2759 +    # As a last resort, use the slow shell script.  We don't cache a
2760 +    # path for INSTALL within a source directory, because that will
2761 +    # break other packages using the cache if that directory is
2762 +    # removed, or if the path is relative.
2763 +    INSTALL=$ac_install_sh
2764 +  fi
2765 +fi
2766 +echo "$as_me:$LINENO: result: $INSTALL" >&5
2767 +echo "${ECHO_T}$INSTALL" >&6
2768 +
2769 +# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2770 +# It thinks the first close brace ends the variable substitution.
2771 +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2772 +
2773 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2774 +
2775 +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2776 +
2777 +echo "$as_me:$LINENO: checking whether build environment is sane" >&5
2778 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
2779 +# Just in case
2780 +sleep 1
2781 +echo timestamp > conftestfile
2782 +# Do `set' in a subshell so we don't clobber the current shell's
2783 +# arguments.  Must try -L first in case configure is actually a
2784 +# symlink; some systems play weird games with the mod time of symlinks
2785 +# (eg FreeBSD returns the mod time of the symlink's containing
2786 +# directory).
2787 +if (
2788 +   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
2789 +   if test "$*" = "X"; then
2790 +      # -L didn't work.
2791 +      set X `ls -t $srcdir/configure conftestfile`
2792 +   fi
2793 +   if test "$*" != "X $srcdir/configure conftestfile" \
2794 +      && test "$*" != "X conftestfile $srcdir/configure"; then
2795 +
2796 +      # If neither matched, then we have a broken ls.  This can happen
2797 +      # if, for instance, CONFIG_SHELL is bash and it inherits a
2798 +      # broken ls alias from the environment.  This has actually
2799 +      # happened.  Such a system could not be considered "sane".
2800 +      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
2801 +alias in your environment" >&5
2802 +echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
2803 +alias in your environment" >&2;}
2804 +   { (exit 1); exit 1; }; }
2805 +   fi
2806 +
2807 +   test "$2" = conftestfile
2808 +   )
2809 +then
2810 +   # Ok.
2811 +   :
2812 +else
2813 +   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
2814 +Check your system clock" >&5
2815 +echo "$as_me: error: newly created file is older than distributed files!
2816 +Check your system clock" >&2;}
2817 +   { (exit 1); exit 1; }; }
2818 +fi
2819 +rm -f conftest*
2820 +echo "$as_me:$LINENO: result: yes" >&5
2821 +echo "${ECHO_T}yes" >&6
2822 +test "$program_prefix" != NONE &&
2823 +  program_transform_name="s,^,$program_prefix,;$program_transform_name"
2824 +# Use a double $ so make ignores it.
2825 +test "$program_suffix" != NONE &&
2826 +  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2827 +# Double any \ or $.  echo might interpret backslashes.
2828 +# By default was `s,x,x', remove it if useless.
2829 +cat <<\_ACEOF >conftest.sed
2830 +s/[\\$]/&&/g;s/;s,x,x,$//
2831 +_ACEOF
2832 +program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2833 +rm conftest.sed
2834 +
2835 +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2836 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
2837 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2838 +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2839 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2840 +else
2841 +  cat >conftest.make <<\_ACEOF
2842 +all:
2843 +       @echo 'ac_maketemp="$(MAKE)"'
2844 +_ACEOF
2845 +# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2846 +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2847 +if test -n "$ac_maketemp"; then
2848 +  eval ac_cv_prog_make_${ac_make}_set=yes
2849 +else
2850 +  eval ac_cv_prog_make_${ac_make}_set=no
2851 +fi
2852 +rm -f conftest.make
2853 +fi
2854 +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2855 +  echo "$as_me:$LINENO: result: yes" >&5
2856 +echo "${ECHO_T}yes" >&6
2857 +  SET_MAKE=
2858 +else
2859 +  echo "$as_me:$LINENO: result: no" >&5
2860 +echo "${ECHO_T}no" >&6
2861 +  SET_MAKE="MAKE=${MAKE-make}"
2862 +fi
2863 +
2864 +
2865 +# Check whether --enable-multilib or --disable-multilib was given.
2866 +if test "${enable_multilib+set}" = set; then
2867 +  enableval="$enable_multilib"
2868 +  case "${enableval}" in
2869 +  yes) multilib=yes ;;
2870 +  no)  multilib=no ;;
2871 +  *)   { { echo "$as_me:$LINENO: error: bad value ${enableval} for multilib option" >&5
2872 +echo "$as_me: error: bad value ${enableval} for multilib option" >&2;}
2873 +   { (exit 1); exit 1; }; } ;;
2874 + esac
2875 +else
2876 +  multilib=yes
2877 +fi; 
2878 +
2879 +if test "${srcdir}" = "."; then
2880 +  if test "${with_target_subdir}" != "." -a -n "${with_target_subdir}"; then
2881 +    gc_basedir="${srcdir}/${with_multisrctop}../."
2882 +  else
2883 +    gc_basedir="${srcdir}/${with_multisrctop}."
2884 +  fi
2885 +else
2886 +  gc_basedir="${srcdir}/."
2887 +fi
2888 +
2889 +ac_aux_dir=
2890 +for ac_dir in $gc_basedir/.. $srcdir/$gc_basedir/..; do
2891 +  if test -f $ac_dir/install-sh; then
2892 +    ac_aux_dir=$ac_dir
2893 +    ac_install_sh="$ac_aux_dir/install-sh -c"
2894 +    break
2895 +  elif test -f $ac_dir/install.sh; then
2896 +    ac_aux_dir=$ac_dir
2897 +    ac_install_sh="$ac_aux_dir/install.sh -c"
2898 +    break
2899 +  elif test -f $ac_dir/shtool; then
2900 +    ac_aux_dir=$ac_dir
2901 +    ac_install_sh="$ac_aux_dir/shtool install -c"
2902 +    break
2903 +  fi
2904 +done
2905 +if test -z "$ac_aux_dir"; then
2906 +  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $gc_basedir/.. $srcdir/$gc_basedir/.." >&5
2907 +echo "$as_me: error: cannot find install-sh or install.sh in $gc_basedir/.. $srcdir/$gc_basedir/.." >&2;}
2908 +   { (exit 1); exit 1; }; }
2909 +fi
2910 +ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2911 +ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2912 +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2913 +
2914 +if :; then :; else
2915 +  # This overrides the previous occurrence for automake, but not for
2916 +  # autoconf, which is exactly what we want.
2917 +  ac_aux_dir=
2918 +for ac_dir in .. $srcdir/..; do
2919 +  if test -f $ac_dir/install-sh; then
2920 +    ac_aux_dir=$ac_dir
2921 +    ac_install_sh="$ac_aux_dir/install-sh -c"
2922 +    break
2923 +  elif test -f $ac_dir/install.sh; then
2924 +    ac_aux_dir=$ac_dir
2925 +    ac_install_sh="$ac_aux_dir/install.sh -c"
2926 +    break
2927 +  elif test -f $ac_dir/shtool; then
2928 +    ac_aux_dir=$ac_dir
2929 +    ac_install_sh="$ac_aux_dir/shtool install -c"
2930 +    break
2931 +  fi
2932 +done
2933 +if test -z "$ac_aux_dir"; then
2934 +  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in .. $srcdir/.." >&5
2935 +echo "$as_me: error: cannot find install-sh or install.sh in .. $srcdir/.." >&2;}
2936 +   { (exit 1); exit 1; }; }
2937 +fi
2938 +ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2939 +ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2940 +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2941 +
2942 +fi
2943 +
2944 +echo "$as_me:$LINENO: checking target system type" >&5
2945 +echo $ECHO_N "checking target system type... $ECHO_C" >&6
2946 +if test "${ac_cv_target+set}" = set; then
2947 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2948 +else
2949 +  ac_cv_target_alias=$target_alias
2950 +test "x$ac_cv_target_alias" = "x" &&
2951 +  ac_cv_target_alias=$ac_cv_host_alias
2952 +ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
2953 +  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
2954 +echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
2955 +   { (exit 1); exit 1; }; }
2956 +
2957 +fi
2958 +echo "$as_me:$LINENO: result: $ac_cv_target" >&5
2959 +echo "${ECHO_T}$ac_cv_target" >&6
2960 +target=$ac_cv_target
2961 +target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2962 +target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2963 +target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2964 +
2965 +
2966 +# The aliases save the names the user supplied, while $host etc.
2967 +# will get canonicalized.
2968 +test -n "$target_alias" &&
2969 +  test "$program_prefix$program_suffix$program_transform_name" = \
2970 +    NONENONEs,x,x, &&
2971 +  program_prefix=${target_alias}-
2972 +
2973 +# This works around an automake problem.
2974 +mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs"
2975 +
2976 +
2977 +
2978 +PACKAGE=gc
2979 +
2980 +VERSION=6.0
2981 +
2982 +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
2983 +  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
2984 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
2985 +   { (exit 1); exit 1; }; }
2986 +fi
2987 +
2988 +
2989 +
2990 +missing_dir=`cd $ac_aux_dir && pwd`
2991 +echo "$as_me:$LINENO: checking for working aclocal" >&5
2992 +echo $ECHO_N "checking for working aclocal... $ECHO_C" >&6
2993 +# Run test in a subshell; some versions of sh will print an error if
2994 +# an executable is not found, even if stderr is redirected.
2995 +# Redirect stdin to placate older versions of autoconf.  Sigh.
2996 +if (aclocal --version) < /dev/null > /dev/null 2>&1; then
2997 +   ACLOCAL=aclocal
2998 +   echo "$as_me:$LINENO: result: found" >&5
2999 +echo "${ECHO_T}found" >&6
3000 +else
3001 +   ACLOCAL="$missing_dir/missing aclocal"
3002 +   echo "$as_me:$LINENO: result: missing" >&5
3003 +echo "${ECHO_T}missing" >&6
3004 +fi
3005 +
3006 +echo "$as_me:$LINENO: checking for working autoconf" >&5
3007 +echo $ECHO_N "checking for working autoconf... $ECHO_C" >&6
3008 +# Run test in a subshell; some versions of sh will print an error if
3009 +# an executable is not found, even if stderr is redirected.
3010 +# Redirect stdin to placate older versions of autoconf.  Sigh.
3011 +if (autoconf --version) < /dev/null > /dev/null 2>&1; then
3012 +   AUTOCONF=autoconf
3013 +   echo "$as_me:$LINENO: result: found" >&5
3014 +echo "${ECHO_T}found" >&6
3015 +else
3016 +   AUTOCONF="$missing_dir/missing autoconf"
3017 +   echo "$as_me:$LINENO: result: missing" >&5
3018 +echo "${ECHO_T}missing" >&6
3019 +fi
3020 +
3021 +echo "$as_me:$LINENO: checking for working automake" >&5
3022 +echo $ECHO_N "checking for working automake... $ECHO_C" >&6
3023 +# Run test in a subshell; some versions of sh will print an error if
3024 +# an executable is not found, even if stderr is redirected.
3025 +# Redirect stdin to placate older versions of autoconf.  Sigh.
3026 +if (automake --version) < /dev/null > /dev/null 2>&1; then
3027 +   AUTOMAKE=automake
3028 +   echo "$as_me:$LINENO: result: found" >&5
3029 +echo "${ECHO_T}found" >&6
3030 +else
3031 +   AUTOMAKE="$missing_dir/missing automake"
3032 +   echo "$as_me:$LINENO: result: missing" >&5
3033 +echo "${ECHO_T}missing" >&6
3034 +fi
3035 +
3036 +echo "$as_me:$LINENO: checking for working autoheader" >&5
3037 +echo $ECHO_N "checking for working autoheader... $ECHO_C" >&6
3038 +# Run test in a subshell; some versions of sh will print an error if
3039 +# an executable is not found, even if stderr is redirected.
3040 +# Redirect stdin to placate older versions of autoconf.  Sigh.
3041 +if (autoheader --version) < /dev/null > /dev/null 2>&1; then
3042 +   AUTOHEADER=autoheader
3043 +   echo "$as_me:$LINENO: result: found" >&5
3044 +echo "${ECHO_T}found" >&6
3045 +else
3046 +   AUTOHEADER="$missing_dir/missing autoheader"
3047 +   echo "$as_me:$LINENO: result: missing" >&5
3048 +echo "${ECHO_T}missing" >&6
3049 +fi
3050 +
3051 +echo "$as_me:$LINENO: checking for working makeinfo" >&5
3052 +echo $ECHO_N "checking for working makeinfo... $ECHO_C" >&6
3053 +# Run test in a subshell; some versions of sh will print an error if
3054 +# an executable is not found, even if stderr is redirected.
3055 +# Redirect stdin to placate older versions of autoconf.  Sigh.
3056 +if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
3057 +   MAKEINFO=makeinfo
3058 +   echo "$as_me:$LINENO: result: found" >&5
3059 +echo "${ECHO_T}found" >&6
3060 +else
3061 +   MAKEINFO="$missing_dir/missing makeinfo"
3062 +   echo "$as_me:$LINENO: result: missing" >&5
3063 +echo "${ECHO_T}missing" >&6
3064 +fi
3065 +
3066 +
3067 +
3068 +# FIXME: We temporarily define our own version of AC_PROG_CC.  This is
3069 +# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
3070 +# are probably using a cross compiler, which will not be able to fully
3071 +# link an executable.  This should really be fixed in autoconf
3072 +# itself.
3073 +
3074 +
3075 +
3076 +
3077 +# Extract the first word of "gcc", so it can be a program name with args.
3078 +set dummy gcc; ac_word=$2
3079 +echo "$as_me:$LINENO: checking for $ac_word" >&5
3080 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3081 +if test "${ac_cv_prog_CC+set}" = set; then
3082 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3083 +else
3084 +  if test -n "$CC"; then
3085 +  ac_cv_prog_CC="$CC" # Let the user override the test.
3086 +else
3087 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3088 +for as_dir in $PATH
3089 +do
3090 +  IFS=$as_save_IFS
3091 +  test -z "$as_dir" && as_dir=.
3092 +  for ac_exec_ext in '' $ac_executable_extensions; do
3093 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3094 +    ac_cv_prog_CC="gcc"
3095 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3096 +    break 2
3097 +  fi
3098 +done
3099 +done
3100 +
3101 +fi
3102 +fi
3103 +CC=$ac_cv_prog_CC
3104 +if test -n "$CC"; then
3105 +  echo "$as_me:$LINENO: result: $CC" >&5
3106 +echo "${ECHO_T}$CC" >&6
3107 +else
3108 +  echo "$as_me:$LINENO: result: no" >&5
3109 +echo "${ECHO_T}no" >&6
3110 +fi
3111 +
3112 +if test -z "$CC"; then
3113 +  # Extract the first word of "cc", so it can be a program name with args.
3114 +set dummy cc; ac_word=$2
3115 +echo "$as_me:$LINENO: checking for $ac_word" >&5
3116 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3117 +if test "${ac_cv_prog_CC+set}" = set; then
3118 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3119 +else
3120 +  if test -n "$CC"; then
3121 +  ac_cv_prog_CC="$CC" # Let the user override the test.
3122 +else
3123 +  ac_prog_rejected=no
3124 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3125 +for as_dir in $PATH
3126 +do
3127 +  IFS=$as_save_IFS
3128 +  test -z "$as_dir" && as_dir=.
3129 +  for ac_exec_ext in '' $ac_executable_extensions; do
3130 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3131 +    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3132 +       ac_prog_rejected=yes
3133 +       continue
3134 +     fi
3135 +    ac_cv_prog_CC="cc"
3136 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3137 +    break 2
3138 +  fi
3139 +done
3140 +done
3141 +
3142 +if test $ac_prog_rejected = yes; then
3143 +  # We found a bogon in the path, so make sure we never use it.
3144 +  set dummy $ac_cv_prog_CC
3145 +  shift
3146 +  if test $@%:@ != 0; then
3147 +    # We chose a different compiler from the bogus one.
3148 +    # However, it has the same basename, so the bogon will be chosen
3149 +    # first if we set CC to just the basename; use the full file name.
3150 +    shift
3151 +    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3152 +  fi
3153 +fi
3154 +fi
3155 +fi
3156 +CC=$ac_cv_prog_CC
3157 +if test -n "$CC"; then
3158 +  echo "$as_me:$LINENO: result: $CC" >&5
3159 +echo "${ECHO_T}$CC" >&6
3160 +else
3161 +  echo "$as_me:$LINENO: result: no" >&5
3162 +echo "${ECHO_T}no" >&6
3163 +fi
3164 +
3165 +  test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
3166 +echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
3167 +   { (exit 1); exit 1; }; }
3168 +fi
3169 +
3170 +AC_PROG_CC_GNU
3171 +
3172 +if test $ac_cv_c_compiler_gnu = yes; then
3173 +  GCC=yes
3174 +  ac_test_CFLAGS="${CFLAGS+set}"
3175 +  ac_save_CFLAGS="$CFLAGS"
3176 +  CFLAGS=
3177 +  AC_PROG_CC_G
3178 +  if test "$ac_test_CFLAGS" = set; then
3179 +    CFLAGS="$ac_save_CFLAGS"
3180 +  elif test $ac_cv_prog_cc_g = yes; then
3181 +    CFLAGS="-g -O2"
3182 +  else
3183 +    CFLAGS="-O2"
3184 +  fi
3185 +else
3186 +  GCC=
3187 +  test "${CFLAGS+set}" = set || CFLAGS="-g"
3188 +fi
3189 +
3190 +
3191 +# Likewise for AC_PROG_CXX.
3192 +
3193 +
3194 +
3195 +for ac_prog in $CCC c++ g++ gcc CC cxx cc++
3196 +do
3197 +  # Extract the first word of "$ac_prog", so it can be a program name with args.
3198 +set dummy $ac_prog; ac_word=$2
3199 +echo "$as_me:$LINENO: checking for $ac_word" >&5
3200 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3201 +if test "${ac_cv_prog_CXX+set}" = set; then
3202 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3203 +else
3204 +  if test -n "$CXX"; then
3205 +  ac_cv_prog_CXX="$CXX" # Let the user override the test.
3206 +else
3207 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3208 +for as_dir in $PATH
3209 +do
3210 +  IFS=$as_save_IFS
3211 +  test -z "$as_dir" && as_dir=.
3212 +  for ac_exec_ext in '' $ac_executable_extensions; do
3213 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3214 +    ac_cv_prog_CXX="$ac_prog"
3215 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3216 +    break 2
3217 +  fi
3218 +done
3219 +done
3220 +
3221 +fi
3222 +fi
3223 +CXX=$ac_cv_prog_CXX
3224 +if test -n "$CXX"; then
3225 +  echo "$as_me:$LINENO: result: $CXX" >&5
3226 +echo "${ECHO_T}$CXX" >&6
3227 +else
3228 +  echo "$as_me:$LINENO: result: no" >&5
3229 +echo "${ECHO_T}no" >&6
3230 +fi
3231 +
3232 +  test -n "$CXX" && break
3233 +done
3234 +test -n "$CXX" || CXX="gcc"
3235 +
3236 +test -z "$CXX" && { { echo "$as_me:$LINENO: error: no acceptable c++ found in \$PATH" >&5
3237 +echo "$as_me: error: no acceptable c++ found in \$PATH" >&2;}
3238 +   { (exit 1); exit 1; }; }
3239 +
3240 +AC_PROG_CXX_GNU
3241 +
3242 +if test $ac_cv_cxx_compiler_gnu = yes; then
3243 +  GXX=yes
3244 +  ac_test_CXXFLAGS="${CXXFLAGS+set}"
3245 +  ac_save_CXXFLAGS="$CXXFLAGS"
3246 +  CXXFLAGS=
3247 +  AC_PROG_CXX_G
3248 +  if test "$ac_test_CXXFLAGS" = set; then
3249 +    CXXFLAGS="$ac_save_CXXFLAGS"
3250 +  elif test $ac_cv_prog_cxx_g = yes; then
3251 +    CXXFLAGS="-g -O2"
3252 +  else
3253 +    CXXFLAGS="-O2"
3254 +  fi
3255 +else
3256 +  GXX=
3257 +  test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
3258 +fi
3259 +
3260 +
3261 +# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD).  If we don't
3262 +# run it explicitly here, it will be run implicitly before
3263 +# NEWLIB_CONFIGURE, which doesn't work because that means that it will
3264 +# be run before AC_CANONICAL_HOST.
3265 +
3266 +
3267 +if test -n "$ac_tool_prefix"; then
3268 +  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3269 +set dummy ${ac_tool_prefix}as; ac_word=$2
3270 +echo "$as_me:$LINENO: checking for $ac_word" >&5
3271 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3272 +if test "${ac_cv_prog_AS+set}" = set; then
3273 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3274 +else
3275 +  if test -n "$AS"; then
3276 +  ac_cv_prog_AS="$AS" # Let the user override the test.
3277 +else
3278 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3279 +for as_dir in $PATH
3280 +do
3281 +  IFS=$as_save_IFS
3282 +  test -z "$as_dir" && as_dir=.
3283 +  for ac_exec_ext in '' $ac_executable_extensions; do
3284 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3285 +    ac_cv_prog_AS="${ac_tool_prefix}as"
3286 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3287 +    break 2
3288 +  fi
3289 +done
3290 +done
3291 +
3292 +fi
3293 +fi
3294 +AS=$ac_cv_prog_AS
3295 +if test -n "$AS"; then
3296 +  echo "$as_me:$LINENO: result: $AS" >&5
3297 +echo "${ECHO_T}$AS" >&6
3298 +else
3299 +  echo "$as_me:$LINENO: result: no" >&5
3300 +echo "${ECHO_T}no" >&6
3301 +fi
3302 +
3303 +fi
3304 +if test -z "$ac_cv_prog_AS"; then
3305 +  ac_ct_AS=$AS
3306 +  # Extract the first word of "as", so it can be a program name with args.
3307 +set dummy as; ac_word=$2
3308 +echo "$as_me:$LINENO: checking for $ac_word" >&5
3309 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3310 +if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
3311 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3312 +else
3313 +  if test -n "$ac_ct_AS"; then
3314 +  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
3315 +else
3316 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3317 +for as_dir in $PATH
3318 +do
3319 +  IFS=$as_save_IFS
3320 +  test -z "$as_dir" && as_dir=.
3321 +  for ac_exec_ext in '' $ac_executable_extensions; do
3322 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3323 +    ac_cv_prog_ac_ct_AS="as"
3324 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3325 +    break 2
3326 +  fi
3327 +done
3328 +done
3329 +
3330 +fi
3331 +fi
3332 +ac_ct_AS=$ac_cv_prog_ac_ct_AS
3333 +if test -n "$ac_ct_AS"; then
3334 +  echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
3335 +echo "${ECHO_T}$ac_ct_AS" >&6
3336 +else
3337 +  echo "$as_me:$LINENO: result: no" >&5
3338 +echo "${ECHO_T}no" >&6
3339 +fi
3340 +
3341 +  AS=$ac_ct_AS
3342 +else
3343 +  AS="$ac_cv_prog_AS"
3344 +fi
3345 +
3346 +if test -n "$ac_tool_prefix"; then
3347 +  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3348 +set dummy ${ac_tool_prefix}ar; ac_word=$2
3349 +echo "$as_me:$LINENO: checking for $ac_word" >&5
3350 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3351 +if test "${ac_cv_prog_AR+set}" = set; then
3352 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3353 +else
3354 +  if test -n "$AR"; then
3355 +  ac_cv_prog_AR="$AR" # Let the user override the test.
3356 +else
3357 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3358 +for as_dir in $PATH
3359 +do
3360 +  IFS=$as_save_IFS
3361 +  test -z "$as_dir" && as_dir=.
3362 +  for ac_exec_ext in '' $ac_executable_extensions; do
3363 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3364 +    ac_cv_prog_AR="${ac_tool_prefix}ar"
3365 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3366 +    break 2
3367 +  fi
3368 +done
3369 +done
3370 +
3371 +fi
3372 +fi
3373 +AR=$ac_cv_prog_AR
3374 +if test -n "$AR"; then
3375 +  echo "$as_me:$LINENO: result: $AR" >&5
3376 +echo "${ECHO_T}$AR" >&6
3377 +else
3378 +  echo "$as_me:$LINENO: result: no" >&5
3379 +echo "${ECHO_T}no" >&6
3380 +fi
3381 +
3382 +fi
3383 +if test -z "$ac_cv_prog_AR"; then
3384 +  ac_ct_AR=$AR
3385 +  # Extract the first word of "ar", so it can be a program name with args.
3386 +set dummy ar; ac_word=$2
3387 +echo "$as_me:$LINENO: checking for $ac_word" >&5
3388 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3389 +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3390 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3391 +else
3392 +  if test -n "$ac_ct_AR"; then
3393 +  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3394 +else
3395 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3396 +for as_dir in $PATH
3397 +do
3398 +  IFS=$as_save_IFS
3399 +  test -z "$as_dir" && as_dir=.
3400 +  for ac_exec_ext in '' $ac_executable_extensions; do
3401 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3402 +    ac_cv_prog_ac_ct_AR="ar"
3403 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3404 +    break 2
3405 +  fi
3406 +done
3407 +done
3408 +
3409 +fi
3410 +fi
3411 +ac_ct_AR=$ac_cv_prog_ac_ct_AR
3412 +if test -n "$ac_ct_AR"; then
3413 +  echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
3414 +echo "${ECHO_T}$ac_ct_AR" >&6
3415 +else
3416 +  echo "$as_me:$LINENO: result: no" >&5
3417 +echo "${ECHO_T}no" >&6
3418 +fi
3419 +
3420 +  AR=$ac_ct_AR
3421 +else
3422 +  AR="$ac_cv_prog_AR"
3423 +fi
3424 +
3425 +if test -n "$ac_tool_prefix"; then
3426 +  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3427 +set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3428 +echo "$as_me:$LINENO: checking for $ac_word" >&5
3429 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3430 +if test "${ac_cv_prog_RANLIB+set}" = set; then
3431 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3432 +else
3433 +  if test -n "$RANLIB"; then
3434 +  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3435 +else
3436 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3437 +for as_dir in $PATH
3438 +do
3439 +  IFS=$as_save_IFS
3440 +  test -z "$as_dir" && as_dir=.
3441 +  for ac_exec_ext in '' $ac_executable_extensions; do
3442 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3443 +    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3444 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3445 +    break 2
3446 +  fi
3447 +done
3448 +done
3449 +
3450 +fi
3451 +fi
3452 +RANLIB=$ac_cv_prog_RANLIB
3453 +if test -n "$RANLIB"; then
3454 +  echo "$as_me:$LINENO: result: $RANLIB" >&5
3455 +echo "${ECHO_T}$RANLIB" >&6
3456 +else
3457 +  echo "$as_me:$LINENO: result: no" >&5
3458 +echo "${ECHO_T}no" >&6
3459 +fi
3460 +
3461 +fi
3462 +if test -z "$ac_cv_prog_RANLIB"; then
3463 +  ac_ct_RANLIB=$RANLIB
3464 +  # Extract the first word of "ranlib", so it can be a program name with args.
3465 +set dummy ranlib; ac_word=$2
3466 +echo "$as_me:$LINENO: checking for $ac_word" >&5
3467 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3468 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3469 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3470 +else
3471 +  if test -n "$ac_ct_RANLIB"; then
3472 +  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3473 +else
3474 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3475 +for as_dir in $PATH
3476 +do
3477 +  IFS=$as_save_IFS
3478 +  test -z "$as_dir" && as_dir=.
3479 +  for ac_exec_ext in '' $ac_executable_extensions; do
3480 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3481 +    ac_cv_prog_ac_ct_RANLIB="ranlib"
3482 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3483 +    break 2
3484 +  fi
3485 +done
3486 +done
3487 +
3488 +  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3489 +fi
3490 +fi
3491 +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3492 +if test -n "$ac_ct_RANLIB"; then
3493 +  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3494 +echo "${ECHO_T}$ac_ct_RANLIB" >&6
3495 +else
3496 +  echo "$as_me:$LINENO: result: no" >&5
3497 +echo "${ECHO_T}no" >&6
3498 +fi
3499 +
3500 +  RANLIB=$ac_ct_RANLIB
3501 +else
3502 +  RANLIB="$ac_cv_prog_RANLIB"
3503 +fi
3504 +
3505 +
3506 +# Find a good install program.  We prefer a C program (faster),
3507 +# so one script is as good as another.  But avoid the broken or
3508 +# incompatible versions:
3509 +# SysV /etc/install, /usr/sbin/install
3510 +# SunOS /usr/etc/install
3511 +# IRIX /sbin/install
3512 +# AIX /bin/install
3513 +# AmigaOS /C/install, which installs bootblocks on floppy discs
3514 +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3515 +# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3516 +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3517 +# ./install, which can be erroneously created by make from ./install.sh.
3518 +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3519 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
3520 +if test -z "$INSTALL"; then
3521 +if test "${ac_cv_path_install+set}" = set; then
3522 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3523 +else
3524 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3525 +for as_dir in $PATH
3526 +do
3527 +  IFS=$as_save_IFS
3528 +  test -z "$as_dir" && as_dir=.
3529 +  # Account for people who put trailing slashes in PATH elements.
3530 +case $as_dir/ in
3531 +  ./ | .// | /cC/* | \
3532 +  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3533 +  /usr/ucb/* ) ;;
3534 +  *)
3535 +    # OSF1 and SCO ODT 3.0 have their own names for install.
3536 +    # Don't use installbsd from OSF since it installs stuff as root
3537 +    # by default.
3538 +    for ac_prog in ginstall scoinst install; do
3539 +      for ac_exec_ext in '' $ac_executable_extensions; do
3540 +        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3541 +          if test $ac_prog = install &&
3542 +            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3543 +            # AIX install.  It has an incompatible calling convention.
3544 +            :
3545 +          elif test $ac_prog = install &&
3546 +            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3547 +            # program-specific install script used by HP pwplus--don't use.
3548 +            :
3549 +          else
3550 +            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3551 +            break 3
3552 +          fi
3553 +        fi
3554 +      done
3555 +    done
3556 +    ;;
3557 +esac
3558 +done
3559 +
3560 +
3561 +fi
3562 +  if test "${ac_cv_path_install+set}" = set; then
3563 +    INSTALL=$ac_cv_path_install
3564 +  else
3565 +    # As a last resort, use the slow shell script.  We don't cache a
3566 +    # path for INSTALL within a source directory, because that will
3567 +    # break other packages using the cache if that directory is
3568 +    # removed, or if the path is relative.
3569 +    INSTALL=$ac_install_sh
3570 +  fi
3571 +fi
3572 +echo "$as_me:$LINENO: result: $INSTALL" >&5
3573 +echo "${ECHO_T}$INSTALL" >&6
3574 +
3575 +# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3576 +# It thinks the first close brace ends the variable substitution.
3577 +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3578 +
3579 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3580 +
3581 +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3582 +
3583 +
3584 +echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
3585 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
3586 +    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
3587 +if test "${enable_maintainer_mode+set}" = set; then
3588 +  enableval="$enable_maintainer_mode"
3589 +  USE_MAINTAINER_MODE=$enableval
3590 +else
3591 +  USE_MAINTAINER_MODE=no
3592 +fi; 
3593 +  echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
3594 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
3595 +  
3596 +
3597 +if test $USE_MAINTAINER_MODE = yes; then
3598 +  MAINTAINER_MODE_TRUE=
3599 +  MAINTAINER_MODE_FALSE='#'
3600 +else
3601 +  MAINTAINER_MODE_TRUE='#'
3602 +  MAINTAINER_MODE_FALSE=
3603 +fi
3604 +  MAINT=$MAINTAINER_MODE_TRUE
3605 +  
3606 +
3607 +
3608 +# We need AC_EXEEXT to keep automake happy in cygnus mode.  However,
3609 +# at least currently, we never actually build a program, so we never
3610 +# need to use $(EXEEXT).  Moreover, the test for EXEEXT normally
3611 +# fails, because we are probably configuring with a cross compiler
3612 +# which can't create executables.  So we include AC_EXEEXT to keep
3613 +# automake happy, but we don't execute it, since we don't care about
3614 +# the result.
3615 +if false; then
3616 +  # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
3617 +  # to nothing, so nothing would remain between `then' and `fi' if it
3618 +  # were not for the `:' below.
3619 +  :
3620 +  
3621 +fi
3622 +
3623 +. ${srcdir}/configure.host
3624 +
3625 +case ${gc_basedir} in
3626 +/* | A-Za-z:/\\*) gc_flagbasedir=${gc_basedir} ;;
3627 +*) gc_flagbasedir='$(top_builddir)/'${gc_basedir} ;;
3628 +esac
3629 +
3630 +gc_cflags="${gc_cflags} -I"'$(top_builddir)'"/./targ-include -I${gc_flagbasedir}/libc/include"
3631 +case "${host}" in
3632 +  *-*-cygwin32*)
3633 +    gc_cflags="${gc_cflags} -I${gc_flagbasedir}/../winsup/include"
3634 +    ;;
3635 +esac
3636 +
3637 +
3638 +GC_CFLAGS=${gc_cflags}
3639 +
3640 +
3641 +
3642 +# Check whether --enable-shared or --disable-shared was given.
3643 +if test "${enable_shared+set}" = set; then
3644 +  enableval="$enable_shared"
3645 +  p=${PACKAGE-default}
3646 +case $enableval in
3647 +yes) enable_shared=yes ;;
3648 +no) enable_shared=no ;;
3649 +*)
3650 +  enable_shared=no
3651 +  # Look at the argument we got.  We use all the common list separators.
3652 +  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3653 +  for pkg in $enableval; do
3654 +    if test "X$pkg" = "X$p"; then
3655 +      enable_shared=yes
3656 +    fi
3657 +  done
3658 +  IFS="$ac_save_ifs"
3659 +  ;;
3660 +esac
3661 +else
3662 +  enable_shared=yes
3663 +fi; 
3664 +# Check whether --enable-static or --disable-static was given.
3665 +if test "${enable_static+set}" = set; then
3666 +  enableval="$enable_static"
3667 +  p=${PACKAGE-default}
3668 +case $enableval in
3669 +yes) enable_static=yes ;;
3670 +no) enable_static=no ;;
3671 +*)
3672 +  enable_static=no
3673 +  # Look at the argument we got.  We use all the common list separators.
3674 +  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3675 +  for pkg in $enableval; do
3676 +    if test "X$pkg" = "X$p"; then
3677 +      enable_static=yes
3678 +    fi
3679 +  done
3680 +  IFS="$ac_save_ifs"
3681 +  ;;
3682 +esac
3683 +else
3684 +  enable_static=yes
3685 +fi; 
3686 +# Check whether --enable-fast-install or --disable-fast-install was given.
3687 +if test "${enable_fast_install+set}" = set; then
3688 +  enableval="$enable_fast_install"
3689 +  p=${PACKAGE-default}
3690 +case $enableval in
3691 +yes) enable_fast_install=yes ;;
3692 +no) enable_fast_install=no ;;
3693 +*)
3694 +  enable_fast_install=no
3695 +  # Look at the argument we got.  We use all the common list separators.
3696 +  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3697 +  for pkg in $enableval; do
3698 +    if test "X$pkg" = "X$p"; then
3699 +      enable_fast_install=yes
3700 +    fi
3701 +  done
3702 +  IFS="$ac_save_ifs"
3703 +  ;;
3704 +esac
3705 +else
3706 +  enable_fast_install=yes
3707 +fi; 
3708 +
3709 +# Check whether --with-gnu-ld or --without-gnu-ld was given.
3710 +if test "${with_gnu_ld+set}" = set; then
3711 +  withval="$with_gnu_ld"
3712 +  test "$withval" = no || with_gnu_ld=yes
3713 +else
3714 +  with_gnu_ld=no
3715 +fi; 
3716 +ac_prog=ld
3717 +if test "$GCC" = yes; then
3718 +  # Check if gcc -print-prog-name=ld gives a path.
3719 +  echo "$as_me:$LINENO: checking for ld used by GCC" >&5
3720 +echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
3721 +  case $host in
3722 +  *-*-mingw*)
3723 +    # gcc leaves a trailing carriage return which upsets mingw
3724 +    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3725 +  *)
3726 +    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3727 +  esac
3728 +  case $ac_prog in
3729 +    # Accept absolute paths.
3730 +    [\\/]* | [A-Za-z]:[\\/]*)
3731 +      re_direlt='/[^/][^/]*/\.\./'
3732 +      # Canonicalize the path of ld
3733 +      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3734 +      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3735 +       ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3736 +      done
3737 +      test -z "$LD" && LD="$ac_prog"
3738 +      ;;
3739 +  "")
3740 +    # If it fails, then pretend we aren't using GCC.
3741 +    ac_prog=ld
3742 +    ;;
3743 +  *)
3744 +    # If it is relative, then search for the first ld in PATH.
3745 +    with_gnu_ld=unknown
3746 +    ;;
3747 +  esac
3748 +elif test "$with_gnu_ld" = yes; then
3749 +  echo "$as_me:$LINENO: checking for GNU ld" >&5
3750 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
3751 +else
3752 +  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
3753 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
3754 +fi
3755 +if test "${lt_cv_path_LD+set}" = set; then
3756 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3757 +else
3758 +  if test -z "$LD"; then
3759 +  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3760 +  for ac_dir in $PATH; do
3761 +    test -z "$ac_dir" && ac_dir=.
3762 +    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3763 +      lt_cv_path_LD="$ac_dir/$ac_prog"
3764 +      # Check to see if the program is GNU ld.  I'd rather use --version,
3765 +      # but apparently some GNU ld's only accept -v.
3766 +      # Break only if it was the GNU/non-GNU ld that we prefer.
3767 +      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3768 +       test "$with_gnu_ld" != no && break
3769 +      else
3770 +       test "$with_gnu_ld" != yes && break
3771 +      fi
3772 +    fi
3773 +  done
3774 +  IFS="$ac_save_ifs"
3775 +else
3776 +  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3777 +fi
3778 +fi
3779 +
3780 +LD="$lt_cv_path_LD"
3781 +if test -n "$LD"; then
3782 +  echo "$as_me:$LINENO: result: $LD" >&5
3783 +echo "${ECHO_T}$LD" >&6
3784 +else
3785 +  echo "$as_me:$LINENO: result: no" >&5
3786 +echo "${ECHO_T}no" >&6
3787 +fi
3788 +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
3789 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
3790 +   { (exit 1); exit 1; }; }
3791 +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
3792 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
3793 +if test "${lt_cv_prog_gnu_ld+set}" = set; then
3794 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3795 +else
3796 +  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3797 +if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3798 +  lt_cv_prog_gnu_ld=yes
3799 +else
3800 +  lt_cv_prog_gnu_ld=no
3801 +fi
3802 +fi
3803 +echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
3804 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
3805 +with_gnu_ld=$lt_cv_prog_gnu_ld
3806 +
3807 +
3808 +echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
3809 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
3810 +if test "${lt_cv_ld_reload_flag+set}" = set; then
3811 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3812 +else
3813 +  lt_cv_ld_reload_flag='-r'
3814 +fi
3815 +echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
3816 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
3817 +reload_flag=$lt_cv_ld_reload_flag
3818 +test -n "$reload_flag" && reload_flag=" $reload_flag"
3819 +
3820 +echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
3821 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
3822 +if test "${lt_cv_path_NM+set}" = set; then
3823 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3824 +else
3825 +  if test -n "$NM"; then
3826 +  # Let the user override the test.
3827 +  lt_cv_path_NM="$NM"
3828 +else
3829 +  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3830 +  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3831 +    test -z "$ac_dir" && ac_dir=.
3832 +    tmp_nm=$ac_dir/${ac_tool_prefix}nm
3833 +    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3834 +      # Check to see if the nm accepts a BSD-compat flag.
3835 +      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3836 +      #   nm: unknown option "B" ignored
3837 +      # Tru64's nm complains that /dev/null is an invalid object file
3838 +      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3839 +       lt_cv_path_NM="$tmp_nm -B"
3840 +       break
3841 +      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3842 +       lt_cv_path_NM="$tmp_nm -p"
3843 +       break
3844 +      else
3845 +       lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3846 +       continue # so that we can try to find one that supports BSD flags
3847 +      fi
3848 +    fi
3849 +  done
3850 +  IFS="$ac_save_ifs"
3851 +  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3852 +fi
3853 +fi
3854 +
3855 +NM="$lt_cv_path_NM"
3856 +echo "$as_me:$LINENO: result: $NM" >&5
3857 +echo "${ECHO_T}$NM" >&6
3858 +
3859 +echo "$as_me:$LINENO: checking whether ln -s works" >&5
3860 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3861 +LN_S=$as_ln_s
3862 +if test "$LN_S" = "ln -s"; then
3863 +  echo "$as_me:$LINENO: result: yes" >&5
3864 +echo "${ECHO_T}yes" >&6
3865 +else
3866 +  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
3867 +echo "${ECHO_T}no, using $LN_S" >&6
3868 +fi
3869 +
3870 +echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
3871 +echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
3872 +if test "${lt_cv_deplibs_check_method+set}" = set; then
3873 +  echo $ECHO_N "(cached) $ECHO_C" >&6
3874 +else
3875 +  lt_cv_file_magic_cmd='$MAGIC_CMD'
3876 +lt_cv_file_magic_test_file=
3877 +lt_cv_deplibs_check_method='unknown'
3878 +# Need to set the preceding variable on all platforms that support
3879 +# interlibrary dependencies.
3880 +# 'none' -- dependencies not supported.
3881 +# `unknown' -- same as none, but documents that we really don't know.
3882 +# 'pass_all' -- all dependencies passed with no checks.
3883 +# 'test_compile' -- check by making test program.
3884 +# 'file_magic [regex]' -- check by looking for files in library path
3885 +# which responds to the $file_magic_cmd with a given egrep regex.
3886 +# If you have `file' or equivalent on your system and you're not sure
3887 +# whether `pass_all' will *always* work, you probably want this one.
3888 +
3889 +case $host_os in
3890 +aix*)
3891 +  lt_cv_deplibs_check_method=pass_all
3892 +  ;;
3893 +
3894 +beos*)
3895 +  lt_cv_deplibs_check_method=pass_all
3896 +  ;;
3897 +
3898 +bsdi4*)
3899 +  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3900 +  lt_cv_file_magic_cmd='/usr/bin/file -L'
3901 +  lt_cv_file_magic_test_file=/shlib/libc.so
3902 +  ;;
3903 +
3904 +cygwin* | mingw* |pw32*)
3905 +  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3906 +  lt_cv_file_magic_cmd='$OBJDUMP -f'
3907 +  ;;
3908 +
3909 +darwin* | rhapsody*)
3910 +  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3911 +  lt_cv_file_magic_cmd='/usr/bin/file -L'
3912 +  case "$host_os" in
3913 +  rhapsody* | darwin1.012)
3914 +    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
3915 +    ;;
3916 +  *) # Darwin 1.3 on
3917 +    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3918 +    ;;
3919 +  esac
3920 +  ;;
3921 +
3922 +freebsd* )
3923 +  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3924 +    case $host_cpu in
3925 +    i*86 )
3926 +      # Not sure whether the presence of OpenBSD here was a mistake.
3927 +      # Let's accept both of them until this is cleared up.
3928 +      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3929 +      lt_cv_file_magic_cmd=/usr/bin/file
3930 +      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3931 +      ;;
3932 +    esac
3933 +  else
3934 +    lt_cv_deplibs_check_method=pass_all
3935 +  fi
3936 +  ;;
3937 +
3938 +gnu*)
3939 +  lt_cv_deplibs_check_method=pass_all
3940 +  ;;
3941 +
3942 +hpux10.20*|hpux11*)
3943 +  case $host_cpu in
3944 +  hppa*)
3945 +    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3946 +    lt_cv_file_magic_cmd=/usr/bin/file
3947 +    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3948 +    ;;
3949 +  ia64*)
3950 +    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
3951 +    lt_cv_file_magic_cmd=/usr/bin/file
3952 +    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3953 +    ;;
3954 +  esac
3955 +  ;;
3956 +
3957 +irix5* | irix6*)
3958 +  case $host_os in
3959 +  irix5*)
3960 +    # this will be overridden with pass_all, but let us keep it just in case
3961 +    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3962 +    ;;
3963 +  *)
3964 +    case $LD in
3965 +    *-32|*"-32 ") libmagic=32-bit;;
3966 +    *-n32|*"-n32 ") libmagic=N32;;
3967 +    *-64|*"-64 ") libmagic=64-bit;;
3968 +    *) libmagic=never-match;;
3969 +    esac
3970 +    # this will be overridden with pass_all, but let us keep it just in case
3971 +    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3972 +    ;;
3973 +  esac
3974 +  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3975 +  lt_cv_deplibs_check_method=pass_all
3976 +  ;;
3977 +
3978 +# This must be Linux ELF.
3979 +linux-gnu*)
3980 +  case $host_cpu in
3981 +  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3982 +    lt_cv_deplibs_check_method=pass_all ;;
3983 +  *)
3984 +    # glibc up to 2.1.1 does not perform some relocations on ARM
3985 +    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3986 +  esac
3987 +  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3988 +  ;;
3989 +
3990 +netbsd*)
3991 +  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3992 +    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3993 +  else
3994 +    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3995 +  fi
3996 +  ;;
3997 +
3998 +newsos6)
3999 +  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
4000 +  lt_cv_file_magic_cmd=/usr/bin/file
4001 +  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4002 +  ;;
4003 +
4004 +osf3* | osf4* | osf5*)
4005 +  # this will be overridden with pass_all, but let us keep it just in case
4006 +  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4007 +  lt_cv_file_magic_test_file=/shlib/libc.so
4008 +  lt_cv_deplibs_check_method=pass_all
4009 +  ;;
4010 +
4011 +sco3.2v5*)
4012 +  lt_cv_deplibs_check_method=pass_all
4013 +  ;;
4014 +
4015 +solaris*)
4016 +  lt_cv_deplibs_check_method=pass_all
4017 +  lt_cv_file_magic_test_file=/lib/libc.so
4018 +  ;;
4019 +
4020 +sysv5uw[78]* | sysv4*uw2*)
4021 +  lt_cv_deplibs_check_method=pass_all
4022 +  ;;
4023 +
4024 +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4025 +  case $host_vendor in
4026 +  ncr)
4027 +    lt_cv_deplibs_check_method=pass_all
4028 +    ;;
4029 +  motorola)
4030 +    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
4031 +    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4032 +    ;;
4033 +  esac
4034 +  ;;
4035 +esac
4036 +
4037 +fi
4038 +echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
4039 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
4040 +file_magic_cmd=$lt_cv_file_magic_cmd
4041 +deplibs_check_method=$lt_cv_deplibs_check_method
4042 +
4043 +
4044 +
4045 +
4046 +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
4047 +
4048 +# Only perform the check for file, if the check method requires it
4049 +case $deplibs_check_method in
4050 +file_magic*)
4051 +  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4052 +    echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
4053 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
4054 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
4055 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4056 +else
4057 +  case $MAGIC_CMD in
4058 +  /*)
4059 +  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4060 +  ;;
4061 +  ?:/*)
4062 +  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4063 +  ;;
4064 +  *)
4065 +  ac_save_MAGIC_CMD="$MAGIC_CMD"
4066 +  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4067 +  ac_dummy="/usr/bin:$PATH"
4068 +  for ac_dir in $ac_dummy; do
4069 +    test -z "$ac_dir" && ac_dir=.
4070 +    if test -f $ac_dir/${ac_tool_prefix}file; then
4071 +      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4072 +      if test -n "$file_magic_test_file"; then
4073 +       case $deplibs_check_method in
4074 +       "file_magic "*)
4075 +         file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4076 +         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4077 +         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4078 +           egrep "$file_magic_regex" > /dev/null; then
4079 +           :
4080 +         else
4081 +           cat <<EOF 1>&2
4082 +
4083 +*** Warning: the command libtool uses to detect shared libraries,
4084 +*** $file_magic_cmd, produces output that libtool cannot recognize.
4085 +*** The result is that libtool may fail to recognize shared libraries
4086 +*** as such.  This will affect the creation of libtool libraries that
4087 +*** depend on shared libraries, but programs linked with such libtool
4088 +*** libraries will work regardless of this problem.  Nevertheless, you
4089 +*** may want to report the problem to your system manager and/or to
4090 +*** bug-libtool@gnu.org
4091 +
4092 +EOF
4093 +         fi ;;
4094 +       esac
4095 +      fi
4096 +      break
4097 +    fi
4098 +  done
4099 +  IFS="$ac_save_ifs"
4100 +  MAGIC_CMD="$ac_save_MAGIC_CMD"
4101 +  ;;
4102 +esac
4103 +fi
4104 +
4105 +MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4106 +if test -n "$MAGIC_CMD"; then
4107 +  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
4108 +echo "${ECHO_T}$MAGIC_CMD" >&6
4109 +else
4110 +  echo "$as_me:$LINENO: result: no" >&5
4111 +echo "${ECHO_T}no" >&6
4112 +fi
4113 +
4114 +if test -z "$lt_cv_path_MAGIC_CMD"; then
4115 +  if test -n "$ac_tool_prefix"; then
4116 +    echo "$as_me:$LINENO: checking for file" >&5
4117 +echo $ECHO_N "checking for file... $ECHO_C" >&6
4118 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
4119 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4120 +else
4121 +  case $MAGIC_CMD in
4122 +  /*)
4123 +  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4124 +  ;;
4125 +  ?:/*)
4126 +  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4127 +  ;;
4128 +  *)
4129 +  ac_save_MAGIC_CMD="$MAGIC_CMD"
4130 +  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4131 +  ac_dummy="/usr/bin:$PATH"
4132 +  for ac_dir in $ac_dummy; do
4133 +    test -z "$ac_dir" && ac_dir=.
4134 +    if test -f $ac_dir/file; then
4135 +      lt_cv_path_MAGIC_CMD="$ac_dir/file"
4136 +      if test -n "$file_magic_test_file"; then
4137 +       case $deplibs_check_method in
4138 +       "file_magic "*)
4139 +         file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4140 +         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4141 +         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4142 +           egrep "$file_magic_regex" > /dev/null; then
4143 +           :
4144 +         else
4145 +           cat <<EOF 1>&2
4146 +
4147 +*** Warning: the command libtool uses to detect shared libraries,
4148 +*** $file_magic_cmd, produces output that libtool cannot recognize.
4149 +*** The result is that libtool may fail to recognize shared libraries
4150 +*** as such.  This will affect the creation of libtool libraries that
4151 +*** depend on shared libraries, but programs linked with such libtool
4152 +*** libraries will work regardless of this problem.  Nevertheless, you
4153 +*** may want to report the problem to your system manager and/or to
4154 +*** bug-libtool@gnu.org
4155 +
4156 +EOF
4157 +         fi ;;
4158 +       esac
4159 +      fi
4160 +      break
4161 +    fi
4162 +  done
4163 +  IFS="$ac_save_ifs"
4164 +  MAGIC_CMD="$ac_save_MAGIC_CMD"
4165 +  ;;
4166 +esac
4167 +fi
4168 +
4169 +MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4170 +if test -n "$MAGIC_CMD"; then
4171 +  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
4172 +echo "${ECHO_T}$MAGIC_CMD" >&6
4173 +else
4174 +  echo "$as_me:$LINENO: result: no" >&5
4175 +echo "${ECHO_T}no" >&6
4176 +fi
4177 +
4178 +  else
4179 +    MAGIC_CMD=:
4180 +  fi
4181 +fi
4182 +
4183 +  fi
4184 +  ;;
4185 +esac
4186 +
4187 +if test -n "$ac_tool_prefix"; then
4188 +  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4189 +set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4190 +echo "$as_me:$LINENO: checking for $ac_word" >&5
4191 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4192 +if test "${ac_cv_prog_RANLIB+set}" = set; then
4193 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4194 +else
4195 +  if test -n "$RANLIB"; then
4196 +  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4197 +else
4198 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4199 +for as_dir in $PATH
4200 +do
4201 +  IFS=$as_save_IFS
4202 +  test -z "$as_dir" && as_dir=.
4203 +  for ac_exec_ext in '' $ac_executable_extensions; do
4204 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4205 +    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4206 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4207 +    break 2
4208 +  fi
4209 +done
4210 +done
4211 +
4212 +fi
4213 +fi
4214 +RANLIB=$ac_cv_prog_RANLIB
4215 +if test -n "$RANLIB"; then
4216 +  echo "$as_me:$LINENO: result: $RANLIB" >&5
4217 +echo "${ECHO_T}$RANLIB" >&6
4218 +else
4219 +  echo "$as_me:$LINENO: result: no" >&5
4220 +echo "${ECHO_T}no" >&6
4221 +fi
4222 +
4223 +fi
4224 +if test -z "$ac_cv_prog_RANLIB"; then
4225 +  ac_ct_RANLIB=$RANLIB
4226 +  # Extract the first word of "ranlib", so it can be a program name with args.
4227 +set dummy ranlib; ac_word=$2
4228 +echo "$as_me:$LINENO: checking for $ac_word" >&5
4229 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4230 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4231 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4232 +else
4233 +  if test -n "$ac_ct_RANLIB"; then
4234 +  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4235 +else
4236 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4237 +for as_dir in $PATH
4238 +do
4239 +  IFS=$as_save_IFS
4240 +  test -z "$as_dir" && as_dir=.
4241 +  for ac_exec_ext in '' $ac_executable_extensions; do
4242 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4243 +    ac_cv_prog_ac_ct_RANLIB="ranlib"
4244 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4245 +    break 2
4246 +  fi
4247 +done
4248 +done
4249 +
4250 +  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4251 +fi
4252 +fi
4253 +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4254 +if test -n "$ac_ct_RANLIB"; then
4255 +  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4256 +echo "${ECHO_T}$ac_ct_RANLIB" >&6
4257 +else
4258 +  echo "$as_me:$LINENO: result: no" >&5
4259 +echo "${ECHO_T}no" >&6
4260 +fi
4261 +
4262 +  RANLIB=$ac_ct_RANLIB
4263 +else
4264 +  RANLIB="$ac_cv_prog_RANLIB"
4265 +fi
4266 +
4267 +if test -n "$ac_tool_prefix"; then
4268 +  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4269 +set dummy ${ac_tool_prefix}strip; ac_word=$2
4270 +echo "$as_me:$LINENO: checking for $ac_word" >&5
4271 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4272 +if test "${ac_cv_prog_STRIP+set}" = set; then
4273 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4274 +else
4275 +  if test -n "$STRIP"; then
4276 +  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4277 +else
4278 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4279 +for as_dir in $PATH
4280 +do
4281 +  IFS=$as_save_IFS
4282 +  test -z "$as_dir" && as_dir=.
4283 +  for ac_exec_ext in '' $ac_executable_extensions; do
4284 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4285 +    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4286 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4287 +    break 2
4288 +  fi
4289 +done
4290 +done
4291 +
4292 +fi
4293 +fi
4294 +STRIP=$ac_cv_prog_STRIP
4295 +if test -n "$STRIP"; then
4296 +  echo "$as_me:$LINENO: result: $STRIP" >&5
4297 +echo "${ECHO_T}$STRIP" >&6
4298 +else
4299 +  echo "$as_me:$LINENO: result: no" >&5
4300 +echo "${ECHO_T}no" >&6
4301 +fi
4302 +
4303 +fi
4304 +if test -z "$ac_cv_prog_STRIP"; then
4305 +  ac_ct_STRIP=$STRIP
4306 +  # Extract the first word of "strip", so it can be a program name with args.
4307 +set dummy strip; ac_word=$2
4308 +echo "$as_me:$LINENO: checking for $ac_word" >&5
4309 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4310 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4311 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4312 +else
4313 +  if test -n "$ac_ct_STRIP"; then
4314 +  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4315 +else
4316 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4317 +for as_dir in $PATH
4318 +do
4319 +  IFS=$as_save_IFS
4320 +  test -z "$as_dir" && as_dir=.
4321 +  for ac_exec_ext in '' $ac_executable_extensions; do
4322 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4323 +    ac_cv_prog_ac_ct_STRIP="strip"
4324 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4325 +    break 2
4326 +  fi
4327 +done
4328 +done
4329 +
4330 +  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4331 +fi
4332 +fi
4333 +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4334 +if test -n "$ac_ct_STRIP"; then
4335 +  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4336 +echo "${ECHO_T}$ac_ct_STRIP" >&6
4337 +else
4338 +  echo "$as_me:$LINENO: result: no" >&5
4339 +echo "${ECHO_T}no" >&6
4340 +fi
4341 +
4342 +  STRIP=$ac_ct_STRIP
4343 +else
4344 +  STRIP="$ac_cv_prog_STRIP"
4345 +fi
4346 +
4347 +
4348 +# Check for any special flags to pass to ltconfig.
4349 +libtool_flags="--cache-file=$cache_file"
4350 +test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
4351 +test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
4352 +test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
4353 +test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
4354 +test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
4355 +
4356 +
4357 +# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4358 +if test "${enable_libtool_lock+set}" = set; then
4359 +  enableval="$enable_libtool_lock"
4360 +  
4361 +fi; 
4362 +test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
4363 +test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
4364 +
4365 +
4366 +# Check whether --with-pic or --without-pic was given.
4367 +if test "${with_pic+set}" = set; then
4368 +  withval="$with_pic"
4369 +  pic_mode="$withval"
4370 +else
4371 +  pic_mode=default
4372 +fi; 
4373 +test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
4374 +test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
4375 +
4376 +# Some flags need to be propagated to the compiler or linker for good
4377 +# libtool support.
4378 +case $host in
4379 +*-*-irix6*)
4380 +  # Find out which ABI we are using.
4381 +  echo '#line __oline__ "configure"' > conftest.$ac_ext
4382 +  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4383 +  (eval $ac_compile) 2>&5
4384 +  ac_status=$?
4385 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4386 +  (exit $ac_status); }; then
4387 +    case `/usr/bin/file conftest.$ac_objext` in
4388 +    *32-bit*)
4389 +      LD="${LD-ld} -32"
4390 +      ;;
4391 +    *N32*)
4392 +      LD="${LD-ld} -n32"
4393 +      ;;
4394 +    *64-bit*)
4395 +      LD="${LD-ld} -64"
4396 +      ;;
4397 +    esac
4398 +  fi
4399 +  rm -rf conftest*
4400 +  ;;
4401 +
4402 +ia64-*-hpux*)
4403 +  # Find out which ABI we are using.
4404 +  echo 'int i;' > conftest.$ac_ext
4405 +  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4406 +  (eval $ac_compile) 2>&5
4407 +  ac_status=$?
4408 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4409 +  (exit $ac_status); }; then
4410 +    case "`/usr/bin/file conftest.o`" in
4411 +    *ELF-32*)
4412 +      HPUX_IA64_MODE="32"
4413 +      ;;
4414 +    *ELF-64*)
4415 +      HPUX_IA64_MODE="64"
4416 +      ;;
4417 +    esac
4418 +  fi
4419 +  rm -rf conftest*
4420 +  ;;
4421 +
4422 +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
4423 +  # Find out which ABI we are using.
4424 +  echo 'int i;' > conftest.$ac_ext
4425 +  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4426 +  (eval $ac_compile) 2>&5
4427 +  ac_status=$?
4428 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4429 +  (exit $ac_status); }; then
4430 +    case "`/usr/bin/file conftest.o`" in
4431 +    *32-bit*)
4432 +      case $host in
4433 +        x86_64-*linux*)
4434 +          LD="${LD-ld} -m elf_i386"
4435 +          ;;
4436 +        ppc64-*linux*)
4437 +          LD="${LD-ld} -m elf32ppclinux"
4438 +          ;;
4439 +        s390x-*linux*)
4440 +          LD="${LD-ld} -m elf_s390"
4441 +          ;;
4442 +        sparc64-*linux*)
4443 +          LD="${LD-ld} -m elf32_sparc"
4444 +          ;;
4445 +      esac
4446 +      ;;
4447 +    *64-bit*)
4448 +      case $host in
4449 +        x86_64-*linux*)
4450 +          LD="${LD-ld} -m elf_x86_64"
4451 +          ;;
4452 +        ppc*-*linux*|powerpc*-*linux*)
4453 +          LD="${LD-ld} -m elf64ppc"
4454 +          ;;
4455 +        s390*-*linux*)
4456 +          LD="${LD-ld} -m elf64_s390"
4457 +          ;;
4458 +        sparc*-*linux*)
4459 +          LD="${LD-ld} -m elf64_sparc"
4460 +          ;;
4461 +      esac
4462 +      ;;
4463 +    esac
4464 +  fi
4465 +  rm -rf conftest*
4466 +  ;;
4467 +
4468 +*-*-sco3.2v5*)
4469 +  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4470 +  SAVE_CFLAGS="$CFLAGS"
4471 +  CFLAGS="$CFLAGS -belf"
4472 +  echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
4473 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
4474 +if test "${lt_cv_cc_needs_belf+set}" = set; then
4475 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4476 +else
4477 +  
4478 +
4479 +     ac_ext=c
4480 +ac_cpp='$CPP $CPPFLAGS'
4481 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4482 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4483 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
4484 +
4485 +     cat >conftest.$ac_ext <<_ACEOF
4486 +#line $LINENO "configure"
4487 +/* confdefs.h.  */
4488 +_ACEOF
4489 +cat confdefs.h >>conftest.$ac_ext
4490 +cat >>conftest.$ac_ext <<_ACEOF
4491 +/* end confdefs.h.  */
4492 +
4493 +int
4494 +main ()
4495 +{
4496 +
4497 +  ;
4498 +  return 0;
4499 +}
4500 +_ACEOF
4501 +rm -f conftest.$ac_objext conftest$ac_exeext
4502 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4503 +  (eval $ac_link) 2>&5
4504 +  ac_status=$?
4505 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4506 +  (exit $ac_status); } &&
4507 +         { ac_try='test -s conftest$ac_exeext'
4508 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4509 +  (eval $ac_try) 2>&5
4510 +  ac_status=$?
4511 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4512 +  (exit $ac_status); }; }; then
4513 +  lt_cv_cc_needs_belf=yes
4514 +else
4515 +  echo "$as_me: failed program was:" >&5
4516 +sed 's/^/| /' conftest.$ac_ext >&5
4517 +
4518 +lt_cv_cc_needs_belf=no
4519 +fi
4520 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4521 +     ac_ext=c
4522 +ac_cpp='$CPP $CPPFLAGS'
4523 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4524 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4525 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
4526 +
4527 +fi
4528 +echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
4529 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
4530 +  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4531 +    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4532 +    CFLAGS="$SAVE_CFLAGS"
4533 +  fi
4534 +  ;;
4535 +
4536 +
4537 +esac
4538 +
4539 +
4540 +# Save cache, so that ltconfig can load it
4541 +cat >confcache <<\_ACEOF
4542 +# This file is a shell script that caches the results of configure
4543 +# tests run on this system so they can be shared between configure
4544 +# scripts and configure runs, see configure's option --config-cache.
4545 +# It is not useful on other systems.  If it contains results you don't
4546 +# want to keep, you may remove or edit it.
4547 +#
4548 +# config.status only pays attention to the cache file if you give it
4549 +# the --recheck option to rerun configure.
4550 +#
4551 +# `ac_cv_env_foo' variables (set or unset) will be overridden when
4552 +# loading this file, other *unset* `ac_cv_foo' will be assigned the
4553 +# following values.
4554 +
4555 +_ACEOF
4556 +
4557 +# The following way of writing the cache mishandles newlines in values,
4558 +# but we know of no workaround that is simple, portable, and efficient.
4559 +# So, don't put newlines in cache variables' values.
4560 +# Ultrix sh set writes to stderr and can't be redirected directly,
4561 +# and sets the high bit in the cache file unless we assign to the vars.
4562 +{
4563 +  (set) 2>&1 |
4564 +    case `(ac_space=' '; set | grep ac_space) 2>&1` in
4565 +    *ac_space=\ *)
4566 +      # `set' does not quote correctly, so add quotes (double-quote
4567 +      # substitution turns \\\\ into \\, and sed turns \\ into \).
4568 +      sed -n \
4569 +        "s/'/'\\\\''/g;
4570 +         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
4571 +      ;;
4572 +    *)
4573 +      # `set' quotes correctly as required by POSIX, so do not add quotes.
4574 +      sed -n \
4575 +        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
4576 +      ;;
4577 +    esac;
4578 +} |
4579 +  sed '
4580 +     t clear
4581 +     : clear
4582 +     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
4583 +     t end
4584 +     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
4585 +     : end' >>confcache
4586 +if diff $cache_file confcache >/dev/null 2>&1; then :; else
4587 +  if test -w $cache_file; then
4588 +    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
4589 +    cat confcache >$cache_file
4590 +  else
4591 +    echo "not updating unwritable cache $cache_file"
4592 +  fi
4593 +fi
4594 +rm -f confcache
4595 +
4596 +# Actually configure libtool.  ac_aux_dir is where install-sh is found.
4597 +AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
4598 +MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
4599 +LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
4600 +AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
4601 +objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
4602 +deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
4603 +${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
4604 +$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
4605 +|| { { echo "$as_me:$LINENO: error: libtool configure failed" >&5
4606 +echo "$as_me: error: libtool configure failed" >&2;}
4607 +   { (exit 1); exit 1; }; }
4608 +
4609 +# Reload cache, that may have been modified by ltconfig
4610 +if test -r "$cache_file"; then
4611 +  # Some versions of bash will fail to source /dev/null (special
4612 +  # files actually), so we avoid doing that.
4613 +  if test -f "$cache_file"; then
4614 +    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
4615 +echo "$as_me: loading cache $cache_file" >&6;}
4616 +    case $cache_file in
4617 +      [\\/]* | ?:[\\/]* ) . $cache_file;;
4618 +      *)                      . ./$cache_file;;
4619 +    esac
4620 +  fi
4621 +else
4622 +  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
4623 +echo "$as_me: creating cache $cache_file" >&6;}
4624 +  >$cache_file
4625 +fi
4626 +
4627 +
4628 +# This can be used to rebuild libtool when needed
4629 +LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
4630 +
4631 +# Always use our own libtool.
4632 +LIBTOOL='$(SHELL) $(top_builddir)/libtool'
4633 +
4634 +# Redirect the config.log output again, so that the ltconfig log is not
4635 +# clobbered by the next message.
4636 +exec 5>>./config.log
4637 +
4638 +ac_ext=cc
4639 +ac_cpp='$CXXCPP $CPPFLAGS'
4640 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4641 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4642 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4643 +echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
4644 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
4645 +if test -z "$CXXCPP"; then
4646 +  if test "${ac_cv_prog_CXXCPP+set}" = set; then
4647 +  echo $ECHO_N "(cached) $ECHO_C" >&6
4648 +else
4649 +      # Double quotes because CXXCPP needs to be expanded
4650 +    for CXXCPP in "$CXX -E" "/lib/cpp"
4651 +    do
4652 +      ac_preproc_ok=false
4653 +for ac_cxx_preproc_warn_flag in '' yes
4654 +do
4655 +  # Use a header file that comes with gcc, so configuring glibc
4656 +  # with a fresh cross-compiler works.
4657 +  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4658 +  # <limits.h> exists even on freestanding compilers.
4659 +  # On the NeXT, cc -E runs the code through the compiler's parser,
4660 +  # not just through cpp. "Syntax error" is here to catch this case.
4661 +  cat >conftest.$ac_ext <<_ACEOF
4662 +#line $LINENO "configure"
4663 +/* confdefs.h.  */
4664 +_ACEOF
4665 +cat confdefs.h >>conftest.$ac_ext
4666 +cat >>conftest.$ac_ext <<_ACEOF
4667 +/* end confdefs.h.  */
4668 +@%:@ifdef __STDC__
4669 +@%:@ include <limits.h>
4670 +@%:@else
4671 +@%:@ include <assert.h>
4672 +@%:@endif
4673 +                     Syntax error
4674 +_ACEOF
4675 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4676 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4677 +  ac_status=$?
4678 +  grep -v '^ *+' conftest.er1 >conftest.err
4679 +  rm -f conftest.er1
4680 +  cat conftest.err >&5
4681 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4682 +  (exit $ac_status); } >/dev/null; then
4683 +  if test -s conftest.err; then
4684 +    ac_cpp_err=$ac_cxx_preproc_warn_flag
4685 +  else
4686 +    ac_cpp_err=
4687 +  fi
4688 +else
4689 +  ac_cpp_err=yes
4690 +fi
4691 +if test -z "$ac_cpp_err"; then
4692 +  :
4693 +else
4694 +  echo "$as_me: failed program was:" >&5
4695 +sed 's/^/| /' conftest.$ac_ext >&5
4696 +
4697 +  # Broken: fails on valid input.
4698 +continue
4699 +fi
4700 +rm -f conftest.err conftest.$ac_ext
4701 +
4702 +  # OK, works on sane cases.  Now check whether non-existent headers
4703 +  # can be detected and how.
4704 +  cat >conftest.$ac_ext <<_ACEOF
4705 +#line $LINENO "configure"
4706 +/* confdefs.h.  */
4707 +_ACEOF
4708 +cat confdefs.h >>conftest.$ac_ext
4709 +cat >>conftest.$ac_ext <<_ACEOF
4710 +/* end confdefs.h.  */
4711 +@%:@include <ac_nonexistent.h>
4712 +_ACEOF
4713 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4714 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4715 +  ac_status=$?
4716 +  grep -v '^ *+' conftest.er1 >conftest.err
4717 +  rm -f conftest.er1
4718 +  cat conftest.err >&5
4719 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4720 +  (exit $ac_status); } >/dev/null; then
4721 +  if test -s conftest.err; then
4722 +    ac_cpp_err=$ac_cxx_preproc_warn_flag
4723 +  else
4724 +    ac_cpp_err=
4725 +  fi
4726 +else
4727 +  ac_cpp_err=yes
4728 +fi
4729 +if test -z "$ac_cpp_err"; then
4730 +  # Broken: success on invalid input.
4731 +continue
4732 +else
4733 +  echo "$as_me: failed program was:" >&5
4734 +sed 's/^/| /' conftest.$ac_ext >&5
4735 +
4736 +  # Passes both tests.
4737 +ac_preproc_ok=:
4738 +break
4739 +fi
4740 +rm -f conftest.err conftest.$ac_ext
4741 +
4742 +done
4743 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4744 +rm -f conftest.err conftest.$ac_ext
4745 +if $ac_preproc_ok; then
4746 +  break
4747 +fi
4748 +
4749 +    done
4750 +    ac_cv_prog_CXXCPP=$CXXCPP
4751 +  
4752 +fi
4753 +  CXXCPP=$ac_cv_prog_CXXCPP
4754 +else
4755 +  ac_cv_prog_CXXCPP=$CXXCPP
4756 +fi
4757 +echo "$as_me:$LINENO: result: $CXXCPP" >&5
4758 +echo "${ECHO_T}$CXXCPP" >&6
4759 +ac_preproc_ok=false
4760 +for ac_cxx_preproc_warn_flag in '' yes
4761 +do
4762 +  # Use a header file that comes with gcc, so configuring glibc
4763 +  # with a fresh cross-compiler works.
4764 +  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4765 +  # <limits.h> exists even on freestanding compilers.
4766 +  # On the NeXT, cc -E runs the code through the compiler's parser,
4767 +  # not just through cpp. "Syntax error" is here to catch this case.
4768 +  cat >conftest.$ac_ext <<_ACEOF
4769 +#line $LINENO "configure"
4770 +/* confdefs.h.  */
4771 +_ACEOF
4772 +cat confdefs.h >>conftest.$ac_ext
4773 +cat >>conftest.$ac_ext <<_ACEOF
4774 +/* end confdefs.h.  */
4775 +@%:@ifdef __STDC__
4776 +@%:@ include <limits.h>
4777 +@%:@else
4778 +@%:@ include <assert.h>
4779 +@%:@endif
4780 +                     Syntax error
4781 +_ACEOF
4782 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4783 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4784 +  ac_status=$?
4785 +  grep -v '^ *+' conftest.er1 >conftest.err
4786 +  rm -f conftest.er1
4787 +  cat conftest.err >&5
4788 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4789 +  (exit $ac_status); } >/dev/null; then
4790 +  if test -s conftest.err; then
4791 +    ac_cpp_err=$ac_cxx_preproc_warn_flag
4792 +  else
4793 +    ac_cpp_err=
4794 +  fi
4795 +else
4796 +  ac_cpp_err=yes
4797 +fi
4798 +if test -z "$ac_cpp_err"; then
4799 +  :
4800 +else
4801 +  echo "$as_me: failed program was:" >&5
4802 +sed 's/^/| /' conftest.$ac_ext >&5
4803 +
4804 +  # Broken: fails on valid input.
4805 +continue
4806 +fi
4807 +rm -f conftest.err conftest.$ac_ext
4808 +
4809 +  # OK, works on sane cases.  Now check whether non-existent headers
4810 +  # can be detected and how.
4811 +  cat >conftest.$ac_ext <<_ACEOF
4812 +#line $LINENO "configure"
4813 +/* confdefs.h.  */
4814 +_ACEOF
4815 +cat confdefs.h >>conftest.$ac_ext
4816 +cat >>conftest.$ac_ext <<_ACEOF
4817 +/* end confdefs.h.  */
4818 +@%:@include <ac_nonexistent.h>
4819 +_ACEOF
4820 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4821 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4822 +  ac_status=$?
4823 +  grep -v '^ *+' conftest.er1 >conftest.err
4824 +  rm -f conftest.er1
4825 +  cat conftest.err >&5
4826 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4827 +  (exit $ac_status); } >/dev/null; then
4828 +  if test -s conftest.err; then
4829 +    ac_cpp_err=$ac_cxx_preproc_warn_flag
4830 +  else
4831 +    ac_cpp_err=
4832 +  fi
4833 +else
4834 +  ac_cpp_err=yes
4835 +fi
4836 +if test -z "$ac_cpp_err"; then
4837 +  # Broken: success on invalid input.
4838 +continue
4839 +else
4840 +  echo "$as_me: failed program was:" >&5
4841 +sed 's/^/| /' conftest.$ac_ext >&5
4842 +
4843 +  # Passes both tests.
4844 +ac_preproc_ok=:
4845 +break
4846 +fi
4847 +rm -f conftest.err conftest.$ac_ext
4848 +
4849 +done
4850 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4851 +rm -f conftest.err conftest.$ac_ext
4852 +if $ac_preproc_ok; then
4853 +  :
4854 +else
4855 +  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
4856 +See \`config.log' for more details." >&5
4857 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
4858 +See \`config.log' for more details." >&2;}
4859 +   { (exit 1); exit 1; }; }
4860 +fi
4861 +
4862 +ac_ext=c
4863 +ac_cpp='$CPP $CPPFLAGS'
4864 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4865 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4866 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
4867 +
4868 +
4869 +
4870 +LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
4871 +lt_save_CC="$CC"
4872 +lt_save_CFLAGS="$CFLAGS"
4873 +AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
4874 +MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
4875 +LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
4876 +AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
4877 +objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
4878 +deplibs_check_method="$deplibs_check_method" \
4879 +file_magic_cmd="$file_magic_cmd" \
4880 +${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
4881 +--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
4882 +|| { { echo "$as_me:$LINENO: error: libtool tag configuration failed" >&5
4883 +echo "$as_me: error: libtool tag configuration failed" >&2;}
4884 +   { (exit 1); exit 1; }; }
4885 +CC="$lt_save_CC"
4886 +CFLAGS="$lt_save_CFLAGS"
4887 +
4888 +# Redirect the config.log output again, so that the ltconfig log is not
4889 +# clobbered by the next message.
4890 +exec 5>>./config.log
4891 +
4892 +  
4893 +
4894 +  
4895 +        
4896 +        
4897 +
4898 +
4899 +# Check whether --with-target-subdir or --without-target-subdir was given.
4900 +if test "${with_target_subdir+set}" = set; then
4901 +  withval="$with_target_subdir"
4902 +  
4903 +fi; 
4904 +
4905 +# Check whether --with-cross-host or --without-cross-host was given.
4906 +if test "${with_cross_host+set}" = set; then
4907 +  withval="$with_cross_host"
4908 +  
4909 +fi; 
4910 +
4911 +echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
4912 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
4913 +    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
4914 +if test "${enable_maintainer_mode+set}" = set; then
4915 +  enableval="$enable_maintainer_mode"
4916 +  USE_MAINTAINER_MODE=$enableval
4917 +else
4918 +  USE_MAINTAINER_MODE=no
4919 +fi; 
4920 +  echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
4921 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
4922 +  
4923 +
4924 +if test $USE_MAINTAINER_MODE = yes; then
4925 +  MAINTAINER_MODE_TRUE=
4926 +  MAINTAINER_MODE_FALSE='#'
4927 +else
4928 +  MAINTAINER_MODE_TRUE='#'
4929 +  MAINTAINER_MODE_FALSE=
4930 +fi
4931 +  MAINT=$MAINTAINER_MODE_TRUE
4932 +  
4933 +
4934 +# automake wants to see AC_EXEEXT.  But we don't need it.  And having
4935 +# it is actually a problem, because the compiler we're passed can't
4936 +# necessarily do a full link.  So we fool automake here.
4937 +if false; then
4938 +  # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
4939 +  # to nothing, so nothing would remain between `then' and `fi' if it
4940 +  # were not for the `:' below.
4941 +  :
4942 +  
4943 +fi
4944 +
4945 +echo "$as_me:$LINENO: checking for thread model used by GCC" >&5
4946 +echo $ECHO_N "checking for thread model used by GCC... $ECHO_C" >&6
4947 +THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
4948 +if test -z "$THREADS"; then
4949 +   THREADS=no
4950 +fi
4951 +echo "$as_me:$LINENO: result: $THREADS" >&5
4952 +echo "${ECHO_T}$THREADS" >&6
4953 +
4954 +# Check whether --enable-parallel-mark or --disable-parallel-mark was given.
4955 +if test "${enable_parallel_mark+set}" = set; then
4956 +  enableval="$enable_parallel_mark"
4957 +  case "$THREADS" in
4958 +      no | none | single)
4959 +       { { echo "$as_me:$LINENO: error: Parallel mark requires --enable-threads=x spec" >&5
4960 +echo "$as_me: error: Parallel mark requires --enable-threads=x spec" >&2;}
4961 +   { (exit 1); exit 1; }; }
4962 +       ;;
4963 +    esac
4964 +
4965 +fi; 
4966 +
4967 +INCLUDES=-I${srcdir}/include
4968 +THREADLIBS=
4969 +case "$THREADS" in
4970 + no | none | single)
4971 +    THREADS=none
4972 +    ;;
4973 + posix | pthreads)
4974 +    THREADS=posix
4975 +    THREADLIBS=-lpthread
4976 +    case "$host" in
4977 +     x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
4978 +       cat >>confdefs.h <<\_ACEOF
4979 +@%:@define GC_LINUX_THREADS 1
4980 +_ACEOF
4981 +
4982 +       cat >>confdefs.h <<\_ACEOF
4983 +@%:@define _REENTRANT 1
4984 +_ACEOF
4985 +
4986 +        if test "${enable_parallel_mark}"; then
4987 +         cat >>confdefs.h <<\_ACEOF
4988 +@%:@define PARALLEL_MARK 1
4989 +_ACEOF
4990 +
4991 +       fi
4992 +       cat >>confdefs.h <<\_ACEOF
4993 +@%:@define THREAD_LOCAL_ALLOC 1
4994 +_ACEOF
4995 +
4996 +       ;;
4997 +     *-*-linux*)
4998 +       cat >>confdefs.h <<\_ACEOF
4999 +@%:@define GC_LINUX_THREADS 1
5000 +_ACEOF
5001 +
5002 +       cat >>confdefs.h <<\_ACEOF
5003 +@%:@define _REENTRANT 1
5004 +_ACEOF
5005 +
5006 +       ;;
5007 +     *-*-hpux*)
5008 +       { echo "$as_me:$LINENO: WARNING: \"Only HP/UX 11 threads are supported.\"" >&5
5009 +echo "$as_me: WARNING: \"Only HP/UX 11 threads are supported.\"" >&2;}
5010 +       cat >>confdefs.h <<\_ACEOF
5011 +@%:@define GC_HPUX_THREADS 1
5012 +_ACEOF
5013 +
5014 +       cat >>confdefs.h <<\_ACEOF
5015 +@%:@define _POSIX_C_SOURCE 199506L
5016 +_ACEOF
5017 +
5018 +       if test "${enable_parallel_mark}" = yes; then
5019 +         cat >>confdefs.h <<\_ACEOF
5020 +@%:@define PARALLEL_MARK 1
5021 +_ACEOF
5022 +
5023 +       fi
5024 +       cat >>confdefs.h <<\_ACEOF
5025 +@%:@define THREAD_LOCAL_ALLOC 1
5026 +_ACEOF
5027 +
5028 +       THREADLIBS="-lpthread -lrt"
5029 +       ;;
5030 +     *-*-freebsd*)
5031 +       { echo "$as_me:$LINENO: WARNING: \"FreeBSD does not yet fully support threads with Boehm GC.\"" >&5
5032 +echo "$as_me: WARNING: \"FreeBSD does not yet fully support threads with Boehm GC.\"" >&2;}
5033 +       cat >>confdefs.h <<\_ACEOF
5034 +@%:@define GC_FREEBSD_THREADS 1
5035 +_ACEOF
5036 +
5037 +       INCLUDES="$INCLUDES -pthread"
5038 +       THREADLIBS=-pthread
5039 +       ;;
5040 +     *-*-solaris*)
5041 +       cat >>confdefs.h <<\_ACEOF
5042 +@%:@define GC_SOLARIS_THREADS 1
5043 +_ACEOF
5044 +
5045 +       cat >>confdefs.h <<\_ACEOF
5046 +@%:@define GC_SOLARIS_PTHREADS 1
5047 +_ACEOF
5048 +
5049 +       ;;
5050 +     *-*-irix*)
5051 +       cat >>confdefs.h <<\_ACEOF
5052 +@%:@define GC_IRIX_THREADS 1
5053 +_ACEOF
5054 +
5055 +       ;;
5056 +     *-*-cygwin*)
5057 +       THREADLIBS=
5058 +       ;;
5059 +    esac
5060 +    ;;
5061 +     *-*-darwin*)
5062 +       cat >>confdefs.h <<\_ACEOF
5063 +@%:@define GC_DARWIN_THREADS 1
5064 +_ACEOF
5065 +
5066 +       cat >>confdefs.h <<\_ACEOF
5067 +@%:@define THREAD_LOCAL_ALLOC 1
5068 +_ACEOF
5069 +
5070 +       if test "${enable_parallel_mark}" = yes; then
5071 +         cat >>confdefs.h <<\_ACEOF
5072 +@%:@define PARALLEL_MARK 1
5073 +_ACEOF
5074 +
5075 +       fi
5076 +       ;;
5077 + win32)
5078 +    cat >>confdefs.h <<\_ACEOF
5079 +@%:@define GC_WIN32_THREADS 1
5080 +_ACEOF
5081 +
5082 +    cat >>confdefs.h <<\_ACEOF
5083 +@%:@define NO_GETENV 1
5084 +_ACEOF
5085 +
5086 +    ;;
5087 + decosf1 | irix | mach | os2 | solaris | dce | vxworks)
5088 +    { { echo "$as_me:$LINENO: error: thread package $THREADS not yet supported" >&5
5089 +echo "$as_me: error: thread package $THREADS not yet supported" >&2;}
5090 +   { (exit 1); exit 1; }; }
5091 +    ;;
5092 + *)
5093 +    { { echo "$as_me:$LINENO: error: $THREADS is an unknown thread package" >&5
5094 +echo "$as_me: error: $THREADS is an unknown thread package" >&2;}
5095 +   { (exit 1); exit 1; }; }
5096 +    ;;
5097 +esac
5098 +
5099 +
5100 +case "$host" in 
5101 +   powerpc-*-darwin*)
5102 +      powerpc_darwin=true
5103 +      ;;
5104 +esac
5105 +
5106 +
5107 +if test x$powerpc_darwin = xtrue; then
5108 +  POWERPC_DARWIN_TRUE=
5109 +  POWERPC_DARWIN_FALSE='#'
5110 +else
5111 +  POWERPC_DARWIN_TRUE='#'
5112 +  POWERPC_DARWIN_FALSE=
5113 +fi
5114 +
5115 +# We never want libdl on darwin. It is a fake libdl that just ends up making
5116 +# dyld calls anyway
5117 +case "$host" in
5118 +  *-*-darwin*) ;;
5119 +  *) 
5120 +    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
5121 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
5122 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then
5123 +  echo $ECHO_N "(cached) $ECHO_C" >&6
5124 +else
5125 +  ac_check_lib_save_LIBS=$LIBS
5126 +LIBS="-ldl  $LIBS"
5127 +cat >conftest.$ac_ext <<_ACEOF
5128 +#line $LINENO "configure"
5129 +/* confdefs.h.  */
5130 +_ACEOF
5131 +cat confdefs.h >>conftest.$ac_ext
5132 +cat >>conftest.$ac_ext <<_ACEOF
5133 +/* end confdefs.h.  */
5134 +
5135 +/* Override any gcc2 internal prototype to avoid an error.  */
5136 +#ifdef __cplusplus
5137 +extern "C"
5138 +#endif
5139 +/* We use char because int might match the return type of a gcc2
5140 +   builtin and then its argument prototype would still apply.  */
5141 +char dlopen ();
5142 +int
5143 +main ()
5144 +{
5145 +dlopen ();
5146 +  ;
5147 +  return 0;
5148 +}
5149 +_ACEOF
5150 +rm -f conftest.$ac_objext conftest$ac_exeext
5151 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5152 +  (eval $ac_link) 2>&5
5153 +  ac_status=$?
5154 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5155 +  (exit $ac_status); } &&
5156 +         { ac_try='test -s conftest$ac_exeext'
5157 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5158 +  (eval $ac_try) 2>&5
5159 +  ac_status=$?
5160 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5161 +  (exit $ac_status); }; }; then
5162 +  ac_cv_lib_dl_dlopen=yes
5163 +else
5164 +  echo "$as_me: failed program was:" >&5
5165 +sed 's/^/| /' conftest.$ac_ext >&5
5166 +
5167 +ac_cv_lib_dl_dlopen=no
5168 +fi
5169 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5170 +LIBS=$ac_check_lib_save_LIBS
5171 +fi
5172 +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
5173 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
5174 +if test $ac_cv_lib_dl_dlopen = yes; then
5175 +  EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl"
5176 +fi
5177 +
5178 +    ;;
5179 +esac
5180 +
5181 +
5182 +
5183 +target_all=libgcjgc.la
5184 +
5185 +
5186 +
5187 +TARGET_ECOS="no"
5188 +
5189 +# Check whether --with-ecos or --without-ecos was given.
5190 +if test "${with_ecos+set}" = set; then
5191 +  withval="$with_ecos"
5192 +  TARGET_ECOS="$with_ecos"
5193 +
5194 +fi; 
5195 +
5196 +addobjs=
5197 +CXXINCLUDES=
5198 +case "$TARGET_ECOS" in
5199 +   no)
5200 +      ;;
5201 +   *)
5202 +      cat >>confdefs.h <<\_ACEOF
5203 +@%:@define ECOS 1
5204 +_ACEOF
5205 +
5206 +      CXXINCLUDES="-I${TARGET_ECOS}/include"
5207 +      addobjs="$addobjs ecos.lo"
5208 +      ;;
5209 +esac
5210 +
5211 +
5212 +
5213 +
5214 +
5215 +machdep=
5216 +case "$host" in
5217 + alpha*-*-openbsd*)
5218 +    machdep="alpha_mach_dep.lo"
5219 +    if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then
5220 +       { echo "$as_me:$LINENO: WARNING: OpenBSD/Alpha without dlopen(). Shared library support is disabled" >&5
5221 +echo "$as_me: WARNING: OpenBSD/Alpha without dlopen(). Shared library support is disabled" >&2;}
5222 +       # Check whether --enable-shared or --disable-shared was given.
5223 +if test "${enable_shared+set}" = set; then
5224 +  enableval="$enable_shared"
5225 +  p=${PACKAGE-default}
5226 +case $enableval in
5227 +yes) enable_shared=yes ;;
5228 +no) enable_shared=no ;;
5229 +*)
5230 +  enable_shared=no
5231 +  # Look at the argument we got.  We use all the common list separators.
5232 +  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
5233 +  for pkg in $enableval; do
5234 +    if test "X$pkg" = "X$p"; then
5235 +      enable_shared=yes
5236 +    fi
5237 +  done
5238 +  IFS="$ac_save_ifs"
5239 +  ;;
5240 +esac
5241 +else
5242 +  enable_shared=no
5243 +fi; 
5244 +    fi
5245 +    ;;
5246 + alpha*-*-*)
5247 +    machdep="alpha_mach_dep.lo"
5248 +    ;;
5249 + i?86-*-solaris2.[89]*)
5250 +    cat >>confdefs.h <<\_ACEOF
5251 +@%:@define SOLARIS25_PROC_VDB_BUG_FIXED 1
5252 +_ACEOF
5253 +
5254 +    ;;
5255 + mipstx39-*-elf*)
5256 +    machdep="mips_ultrix_mach_dep.lo"
5257 +    cat >>confdefs.h <<\_ACEOF
5258 +@%:@define STACKBASE __stackbase
5259 +_ACEOF
5260 +
5261 +    cat >>confdefs.h <<\_ACEOF
5262 +@%:@define DATASTART_IS_ETEXT 1
5263 +_ACEOF
5264 +
5265 +    ;;
5266 + mips-dec-ultrix*)
5267 +    machdep="mips_ultrix_mach-dep.lo"
5268 +    ;;
5269 + mips*-*-linux*)
5270 +    ;;
5271 + mips-*-*)
5272 +    machdep="mips_sgi_mach_dep.lo"
5273 +    cat >>confdefs.h <<\_ACEOF
5274 +@%:@define NO_EXECUTE_PERMISSION 1
5275 +_ACEOF
5276 +
5277 +    ;;
5278 + sparc-sun-solaris2.3*)
5279 +    machdep="sparc_mach_dep.lo"
5280 +    cat >>confdefs.h <<\_ACEOF
5281 +@%:@define SUNOS53_SHARED_LIB 1
5282 +_ACEOF
5283 +
5284 +    ;;
5285 + sparc-sun-solaris2.*)
5286 +    machdep="sparc_mach_dep.lo"
5287 +    ;;
5288 + ia64-*-*)
5289 +    machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
5290 +    ;;
5291 +esac
5292 +if test x"$machdep" = x; then
5293 +   machdep="mach_dep.lo"
5294 +fi
5295 +addobjs="$addobjs $machdep"
5296 +
5297 +
5298 +case "$host" in
5299 + sparc-sun-solaris2*)
5300 +    if test "$GCC" = yes; then
5301 +       new_CFLAGS=
5302 +       for i in $CFLAGS; do
5303 +         case "$i" in
5304 +          -O*)
5305 +             ;;
5306 +          *)
5307 +             new_CFLAGS="$new_CFLAGS $i"
5308 +             ;;
5309 +         esac
5310 +       done
5311 +       CFLAGS="$new_CFLAGS"
5312 +    fi
5313 +    ;;
5314 +esac
5315 +
5316 +MY_CFLAGS="$CFLAGS"
5317 +
5318 +
5319 +cat >>confdefs.h <<\_ACEOF
5320 +@%:@define SILENT 1
5321 +_ACEOF
5322 +
5323 +cat >>confdefs.h <<\_ACEOF
5324 +@%:@define NO_SIGNALS 1
5325 +_ACEOF
5326 +
5327 +cat >>confdefs.h <<\_ACEOF
5328 +@%:@define NO_EXECUTE_PERMISSION 1
5329 +_ACEOF
5330 +
5331 +cat >>confdefs.h <<\_ACEOF
5332 +@%:@define ALL_INTERIOR_POINTERS 1
5333 +_ACEOF
5334 +
5335 +
5336 +cat >>confdefs.h <<\_ACEOF
5337 +@%:@define JAVA_FINALIZATION 1
5338 +_ACEOF
5339 +
5340 +cat >>confdefs.h <<\_ACEOF
5341 +@%:@define GC_GCJ_SUPPORT 1
5342 +_ACEOF
5343 +
5344 +cat >>confdefs.h <<\_ACEOF
5345 +@%:@define ATOMIC_UNCOLLECTABLE 1
5346 +_ACEOF
5347 +
5348 +
5349 +if test -n "${with_cross_host}"; then
5350 +   cat >>confdefs.h <<\_ACEOF
5351 +@%:@define NO_SIGSET 1
5352 +_ACEOF
5353 +
5354 +   cat >>confdefs.h <<\_ACEOF
5355 +@%:@define NO_DEBUGGING 1
5356 +_ACEOF
5357 +
5358 +fi
5359 +
5360 +# Check whether --enable-full-debug or --disable-full-debug was given.
5361 +if test "${enable_full_debug+set}" = set; then
5362 +  enableval="$enable_full_debug"
5363 +   if test "$enable_full_debug" = "yes"; then
5364 +    { echo "$as_me:$LINENO: WARNING: \"Must define GC_DEBUG and use debug alloc. in clients.\"" >&5
5365 +echo "$as_me: WARNING: \"Must define GC_DEBUG and use debug alloc. in clients.\"" >&2;}
5366 +    cat >>confdefs.h <<\_ACEOF
5367 +@%:@define KEEP_BACK_PTRS 1
5368 +_ACEOF
5369 +
5370 +    cat >>confdefs.h <<\_ACEOF
5371 +@%:@define DBG_HDRS_ALL 1
5372 +_ACEOF
5373 +
5374 +    case $host in
5375 +      ia64-*-linux* )
5376 +       cat >>confdefs.h <<\_ACEOF
5377 +@%:@define MAKE_BACK_GRAPH 1
5378 +_ACEOF
5379 +
5380 +      ;;
5381 +      x86-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
5382 +       cat >>confdefs.h <<\_ACEOF
5383 +@%:@define MAKE_BACK_GRAPH 1
5384 +_ACEOF
5385 +
5386 +       { echo "$as_me:$LINENO: WARNING: \"Client must not use -fomit-frame-pointer.\"" >&5
5387 +echo "$as_me: WARNING: \"Client must not use -fomit-frame-pointer.\"" >&2;}
5388 +       cat >>confdefs.h <<\_ACEOF
5389 +@%:@define SAVE_CALL_COUNT 8
5390 +_ACEOF
5391 +
5392 +      ;;
5393 +    esac 
5394 +  fi
5395 +fi; 
5396 +
5397 +
5398 +
5399 +if test -z "$with_cross_host"; then
5400 +  USE_LIBDIR_TRUE=
5401 +  USE_LIBDIR_FALSE='#'
5402 +else
5403 +  USE_LIBDIR_TRUE='#'
5404 +  USE_LIBDIR_FALSE=
5405 +fi
5406 +
5407 +if test "${multilib}" = "yes"; then
5408 +  multilib_arg="--enable-multilib"
5409 +else
5410 +  multilib_arg=
5411 +fi
5412 +
5413 +                    ac_config_files="$ac_config_files Makefile include/Makefile"
5414 +          ac_config_commands="$ac_config_commands default"
5415 +cat >confcache <<\_ACEOF
5416 +# This file is a shell script that caches the results of configure
5417 +# tests run on this system so they can be shared between configure
5418 +# scripts and configure runs, see configure's option --config-cache.
5419 +# It is not useful on other systems.  If it contains results you don't
5420 +# want to keep, you may remove or edit it.
5421 +#
5422 +# config.status only pays attention to the cache file if you give it
5423 +# the --recheck option to rerun configure.
5424 +#
5425 +# `ac_cv_env_foo' variables (set or unset) will be overridden when
5426 +# loading this file, other *unset* `ac_cv_foo' will be assigned the
5427 +# following values.
5428 +
5429 +_ACEOF
5430 +
5431 +# The following way of writing the cache mishandles newlines in values,
5432 +# but we know of no workaround that is simple, portable, and efficient.
5433 +# So, don't put newlines in cache variables' values.
5434 +# Ultrix sh set writes to stderr and can't be redirected directly,
5435 +# and sets the high bit in the cache file unless we assign to the vars.
5436 +{
5437 +  (set) 2>&1 |
5438 +    case `(ac_space=' '; set | grep ac_space) 2>&1` in
5439 +    *ac_space=\ *)
5440 +      # `set' does not quote correctly, so add quotes (double-quote
5441 +      # substitution turns \\\\ into \\, and sed turns \\ into \).
5442 +      sed -n \
5443 +        "s/'/'\\\\''/g;
5444 +         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
5445 +      ;;
5446 +    *)
5447 +      # `set' quotes correctly as required by POSIX, so do not add quotes.
5448 +      sed -n \
5449 +        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
5450 +      ;;
5451 +    esac;
5452 +} |
5453 +  sed '
5454 +     t clear
5455 +     : clear
5456 +     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
5457 +     t end
5458 +     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
5459 +     : end' >>confcache
5460 +if diff $cache_file confcache >/dev/null 2>&1; then :; else
5461 +  if test -w $cache_file; then
5462 +    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
5463 +    cat confcache >$cache_file
5464 +  else
5465 +    echo "not updating unwritable cache $cache_file"
5466 +  fi
5467 +fi
5468 +rm -f confcache
5469 +
5470 +test "x$prefix" = xNONE && prefix=$ac_default_prefix
5471 +# Let make expand exec_prefix.
5472 +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5473 +
5474 +# VPATH may cause trouble with some makes, so we remove $(srcdir),
5475 +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
5476 +# trailing colons and then remove the whole line if VPATH becomes empty
5477 +# (actually we leave an empty line to preserve line numbers).
5478 +if test "x$srcdir" = x.; then
5479 +  ac_vpsub='/^[        ]*VPATH[        ]*=/{
5480 +s/:*\$(srcdir):*/:/;
5481 +s/:*\${srcdir}:*/:/;
5482 +s/:*@srcdir@:*/:/;
5483 +s/^\([^=]*=[   ]*\):*/\1/;
5484 +s/:*$//;
5485 +s/^[^=]*=[     ]*$//;
5486 +}'
5487 +fi
5488 +
5489 +# Transform confdefs.h into DEFS.
5490 +# Protect against shell expansion while executing Makefile rules.
5491 +# Protect against Makefile macro expansion.
5492 +#
5493 +# If the first sed substitution is executed (which looks for macros that
5494 +# take arguments), then we branch to the quote section.  Otherwise,
5495 +# look for a macro that doesn't take arguments.
5496 +cat >confdef2opt.sed <<\_ACEOF
5497 +t clear
5498 +: clear
5499 +s,^[   ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\),-D\1=\2,g
5500 +t quote
5501 +s,^[   ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\),-D\1=\2,g
5502 +t quote
5503 +d
5504 +: quote
5505 +s,[    `~#$^&*(){}\\|;'"<>?],\\&,g
5506 +s,\[,\\&,g
5507 +s,\],\\&,g
5508 +s,\$,$$,g
5509 +p
5510 +_ACEOF
5511 +# We use echo to avoid assuming a particular line-breaking character.
5512 +# The extra dot is to prevent the shell from consuming trailing
5513 +# line-breaks from the sub-command output.  A line-break within
5514 +# single-quotes doesn't work because, if this script is created in a
5515 +# platform that uses two characters for line-breaks (e.g., DOS), tr
5516 +# would break.
5517 +ac_LF_and_DOT=`echo; echo .`
5518 +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
5519 +rm -f confdef2opt.sed
5520 +
5521 +
5522 +ac_libobjs=
5523 +ac_ltlibobjs=
5524 +for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
5525 +  # 1. Remove the extension, and $U if already installed.
5526 +  ac_i=`echo "$ac_i" |
5527 +         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
5528 +  # 2. Add them.
5529 +  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
5530 +  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
5531 +done
5532 +LIB@&t@OBJS=$ac_libobjs
5533 +
5534 +LTLIBOBJS=$ac_ltlibobjs
5535 +
5536 +
5537 +
5538 +: ${CONFIG_STATUS=./config.status}
5539 +ac_clean_files_save=$ac_clean_files
5540 +ac_clean_files="$ac_clean_files $CONFIG_STATUS"
5541 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
5542 +echo "$as_me: creating $CONFIG_STATUS" >&6;}
5543 +cat >$CONFIG_STATUS <<_ACEOF
5544 +#! $SHELL
5545 +# Generated by $as_me.
5546 +# Run this file to recreate the current configuration.
5547 +# Compiler output produced by configure, useful for debugging
5548 +# configure, is in config.log if it exists.
5549 +
5550 +debug=false
5551 +ac_cs_recheck=false
5552 +ac_cs_silent=false
5553 +SHELL=\${CONFIG_SHELL-$SHELL}
5554 +_ACEOF
5555 +
5556 +cat >>$CONFIG_STATUS <<\_ACEOF
5557 +## --------------------- ##
5558 +## M4sh Initialization.  ##
5559 +## --------------------- ##
5560 +
5561 +# Be Bourne compatible
5562 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
5563 +  emulate sh
5564 +  NULLCMD=:
5565 +  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
5566 +  # is contrary to our usage.  Disable this feature.
5567 +  alias -g '${1+"$@"}'='"$@"'
5568 +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
5569 +  set -o posix
5570 +fi
5571 +
5572 +# Support unset when possible.
5573 +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
5574 +  as_unset=unset
5575 +else
5576 +  as_unset=false
5577 +fi
5578 +
5579 +
5580 +# Work around bugs in pre-3.0 UWIN ksh.
5581 +$as_unset ENV MAIL MAILPATH
5582 +PS1='$ '
5583 +PS2='> '
5584 +PS4='+ '
5585 +
5586 +# NLS nuisances.
5587 +for as_var in \
5588 +  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
5589 +  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
5590 +  LC_TELEPHONE LC_TIME
5591 +do
5592 +  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
5593 +    eval $as_var=C; export $as_var
5594 +  else
5595 +    $as_unset $as_var
5596 +  fi
5597 +done
5598 +
5599 +# Required to use basename.
5600 +if expr a : '\(a\)' >/dev/null 2>&1; then
5601 +  as_expr=expr
5602 +else
5603 +  as_expr=false
5604 +fi
5605 +
5606 +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
5607 +  as_basename=basename
5608 +else
5609 +  as_basename=false
5610 +fi
5611 +
5612 +
5613 +# Name of the executable.
5614 +as_me=`$as_basename "$0" ||
5615 +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
5616 +        X"$0" : 'X\(//\)$' \| \
5617 +        X"$0" : 'X\(/\)$' \| \
5618 +        .     : '\(.\)' 2>/dev/null ||
5619 +echo X/"$0" |
5620 +    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
5621 +         /^X\/\(\/\/\)$/{ s//\1/; q; }
5622 +         /^X\/\(\/\).*/{ s//\1/; q; }
5623 +         s/.*/./; q'`
5624 +
5625 +
5626 +# PATH needs CR, and LINENO needs CR and PATH.
5627 +# Avoid depending upon Character Ranges.
5628 +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
5629 +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
5630 +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
5631 +as_cr_digits='0123456789'
5632 +as_cr_alnum=$as_cr_Letters$as_cr_digits
5633 +
5634 +# The user is always right.
5635 +if test "${PATH_SEPARATOR+set}" != set; then
5636 +  echo "#! /bin/sh" >conf$$.sh
5637 +  echo  "exit 0"   >>conf$$.sh
5638 +  chmod +x conf$$.sh
5639 +  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
5640 +    PATH_SEPARATOR=';'
5641 +  else
5642 +    PATH_SEPARATOR=:
5643 +  fi
5644 +  rm -f conf$$.sh
5645 +fi
5646 +
5647 +
5648 +  as_lineno_1=$LINENO
5649 +  as_lineno_2=$LINENO
5650 +  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
5651 +  test "x$as_lineno_1" != "x$as_lineno_2" &&
5652 +  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
5653 +  # Find who we are.  Look in the path if we contain no path at all
5654 +  # relative or not.
5655 +  case $0 in
5656 +    *[\\/]* ) as_myself=$0 ;;
5657 +    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5658 +for as_dir in $PATH
5659 +do
5660 +  IFS=$as_save_IFS
5661 +  test -z "$as_dir" && as_dir=.
5662 +  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
5663 +done
5664 +
5665 +       ;;
5666 +  esac
5667 +  # We did not find ourselves, most probably we were run as `sh COMMAND'
5668 +  # in which case we are not to be found in the path.
5669 +  if test "x$as_myself" = x; then
5670 +    as_myself=$0
5671 +  fi
5672 +  if test ! -f "$as_myself"; then
5673 +    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
5674 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
5675 +   { (exit 1); exit 1; }; }
5676 +  fi
5677 +  case $CONFIG_SHELL in
5678 +  '')
5679 +    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5680 +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
5681 +do
5682 +  IFS=$as_save_IFS
5683 +  test -z "$as_dir" && as_dir=.
5684 +  for as_base in sh bash ksh sh5; do
5685 +        case $as_dir in
5686 +        /*)
5687 +          if ("$as_dir/$as_base" -c '
5688 +  as_lineno_1=$LINENO
5689 +  as_lineno_2=$LINENO
5690 +  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
5691 +  test "x$as_lineno_1" != "x$as_lineno_2" &&
5692 +  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
5693 +            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
5694 +            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
5695 +            CONFIG_SHELL=$as_dir/$as_base
5696 +            export CONFIG_SHELL
5697 +            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
5698 +          fi;;
5699 +        esac
5700 +       done
5701 +done
5702 +;;
5703 +  esac
5704 +
5705 +  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
5706 +  # uniformly replaced by the line number.  The first 'sed' inserts a
5707 +  # line-number line before each line; the second 'sed' does the real
5708 +  # work.  The second script uses 'N' to pair each line-number line
5709 +  # with the numbered line, and appends trailing '-' during
5710 +  # substitution so that $LINENO is not a special case at line end.
5711 +  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
5712 +  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
5713 +  sed '=' <$as_myself |
5714 +    sed '
5715 +      N
5716 +      s,$,-,
5717 +      : loop
5718 +      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
5719 +      t loop
5720 +      s,-$,,
5721 +      s,^['$as_cr_digits']*\n,,
5722 +    ' >$as_me.lineno &&
5723 +  chmod +x $as_me.lineno ||
5724 +    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
5725 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
5726 +   { (exit 1); exit 1; }; }
5727 +
5728 +  # Don't try to exec as it changes $[0], causing all sort of problems
5729 +  # (the dirname of $[0] is not the place where we might find the
5730 +  # original and so on.  Autoconf is especially sensible to this).
5731 +  . ./$as_me.lineno
5732 +  # Exit status is that of the last command.
5733 +  exit
5734 +}
5735 +
5736 +
5737 +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
5738 +  *c*,-n*) ECHO_N= ECHO_C='
5739 +' ECHO_T='     ' ;;
5740 +  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
5741 +  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
5742 +esac
5743 +
5744 +if expr a : '\(a\)' >/dev/null 2>&1; then
5745 +  as_expr=expr
5746 +else
5747 +  as_expr=false
5748 +fi
5749 +
5750 +rm -f conf$$ conf$$.exe conf$$.file
5751 +echo >conf$$.file
5752 +if ln -s conf$$.file conf$$ 2>/dev/null; then
5753 +  # We could just check for DJGPP; but this test a) works b) is more generic
5754 +  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
5755 +  if test -f conf$$.exe; then
5756 +    # Don't use ln at all; we don't have any links
5757 +    as_ln_s='cp -p'
5758 +  else
5759 +    as_ln_s='ln -s'
5760 +  fi
5761 +elif ln conf$$.file conf$$ 2>/dev/null; then
5762 +  as_ln_s=ln
5763 +else
5764 +  as_ln_s='cp -p'
5765 +fi
5766 +rm -f conf$$ conf$$.exe conf$$.file
5767 +
5768 +if mkdir -p . 2>/dev/null; then
5769 +  as_mkdir_p=:
5770 +else
5771 +  as_mkdir_p=false
5772 +fi
5773 +
5774 +as_executable_p="test -f"
5775 +
5776 +# Sed expression to map a string onto a valid CPP name.
5777 +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
5778 +
5779 +# Sed expression to map a string onto a valid variable name.
5780 +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
5781 +
5782 +
5783 +# IFS
5784 +# We need space, tab and new line, in precisely that order.
5785 +as_nl='
5786 +'
5787 +IFS="  $as_nl"
5788 +
5789 +# CDPATH.
5790 +$as_unset CDPATH
5791 +
5792 +exec 6>&1
5793 +
5794 +# Open the log real soon, to keep \$[0] and so on meaningful, and to
5795 +# report actual input values of CONFIG_FILES etc. instead of their
5796 +# values after options handling.  Logging --version etc. is OK.
5797 +exec 5>>config.log
5798 +{
5799 +  echo
5800 +  sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
5801 +@%:@@%:@ Running $as_me. @%:@@%:@
5802 +_ASBOX
5803 +} >&5
5804 +cat >&5 <<_CSEOF
5805 +
5806 +This file was extended by $as_me, which was
5807 +generated by GNU Autoconf 2.57.  Invocation command line was
5808 +
5809 +  CONFIG_FILES    = $CONFIG_FILES
5810 +  CONFIG_HEADERS  = $CONFIG_HEADERS
5811 +  CONFIG_LINKS    = $CONFIG_LINKS
5812 +  CONFIG_COMMANDS = $CONFIG_COMMANDS
5813 +  $ $0 $@
5814 +
5815 +_CSEOF
5816 +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
5817 +echo >&5
5818 +_ACEOF
5819 +
5820 +# Files that config.status was made for.
5821 +if test -n "$ac_config_files"; then
5822 +  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
5823 +fi
5824 +
5825 +if test -n "$ac_config_headers"; then
5826 +  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
5827 +fi
5828 +
5829 +if test -n "$ac_config_links"; then
5830 +  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
5831 +fi
5832 +
5833 +if test -n "$ac_config_commands"; then
5834 +  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
5835 +fi
5836 +
5837 +cat >>$CONFIG_STATUS <<\_ACEOF
5838 +
5839 +ac_cs_usage="\
5840 +\`$as_me' instantiates files from templates according to the
5841 +current configuration.
5842 +
5843 +Usage: $0 [OPTIONS] [FILE]...
5844 +
5845 +  -h, --help       print this help, then exit
5846 +  -V, --version    print version number, then exit
5847 +  -q, --quiet      do not print progress messages
5848 +  -d, --debug      don't remove temporary files
5849 +      --recheck    update $as_me by reconfiguring in the same conditions
5850 +  --file=FILE[:TEMPLATE]
5851 +                   instantiate the configuration file FILE
5852 +
5853 +Configuration files:
5854 +$config_files
5855 +
5856 +Configuration commands:
5857 +$config_commands
5858 +
5859 +Report bugs to <bug-autoconf@gnu.org>."
5860 +_ACEOF
5861 +
5862 +cat >>$CONFIG_STATUS <<_ACEOF
5863 +ac_cs_version="\\
5864 +config.status
5865 +configured by $0, generated by GNU Autoconf 2.57,
5866 +  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
5867 +
5868 +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
5869 +Free Software Foundation, Inc.
5870 +This config.status script is free software; the Free Software Foundation
5871 +gives unlimited permission to copy, distribute and modify it."
5872 +srcdir=$srcdir
5873 +INSTALL="$INSTALL"
5874 +_ACEOF
5875 +
5876 +cat >>$CONFIG_STATUS <<\_ACEOF
5877 +# If no file are specified by the user, then we need to provide default
5878 +# value.  By we need to know if files were specified by the user.
5879 +ac_need_defaults=:
5880 +while test $# != 0
5881 +do
5882 +  case $1 in
5883 +  --*=*)
5884 +    ac_option=`expr "x$1" : 'x\([^=]*\)='`
5885 +    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
5886 +    ac_shift=:
5887 +    ;;
5888 +  -*)
5889 +    ac_option=$1
5890 +    ac_optarg=$2
5891 +    ac_shift=shift
5892 +    ;;
5893 +  *) # This is not an option, so the user has probably given explicit
5894 +     # arguments.
5895 +     ac_option=$1
5896 +     ac_need_defaults=false;;
5897 +  esac
5898 +
5899 +  case $ac_option in
5900 +  # Handling of the options.
5901 +_ACEOF
5902 +cat >>$CONFIG_STATUS <<\_ACEOF
5903 +  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5904 +    ac_cs_recheck=: ;;
5905 +  --version | --vers* | -V )
5906 +    echo "$ac_cs_version"; exit 0 ;;
5907 +  --he | --h)
5908 +    # Conflict between --help and --header
5909 +    { { echo "$as_me:$LINENO: error: ambiguous option: $1
5910 +Try \`$0 --help' for more information." >&5
5911 +echo "$as_me: error: ambiguous option: $1
5912 +Try \`$0 --help' for more information." >&2;}
5913 +   { (exit 1); exit 1; }; };;
5914 +  --help | --hel | -h )
5915 +    echo "$ac_cs_usage"; exit 0 ;;
5916 +  --debug | --d* | -d )
5917 +    debug=: ;;
5918 +  --file | --fil | --fi | --f )
5919 +    $ac_shift
5920 +    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
5921 +    ac_need_defaults=false;;
5922 +  --header | --heade | --head | --hea )
5923 +    $ac_shift
5924 +    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
5925 +    ac_need_defaults=false;;
5926 +  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
5927 +  | -silent | --silent | --silen | --sile | --sil | --si | --s)
5928 +    ac_cs_silent=: ;;
5929 +
5930 +  # This is an error.
5931 +  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
5932 +Try \`$0 --help' for more information." >&5
5933 +echo "$as_me: error: unrecognized option: $1
5934 +Try \`$0 --help' for more information." >&2;}
5935 +   { (exit 1); exit 1; }; } ;;
5936 +
5937 +  *) ac_config_targets="$ac_config_targets $1" ;;
5938 +
5939 +  esac
5940 +  shift
5941 +done
5942 +
5943 +ac_configure_extra_args=
5944 +
5945 +if $ac_cs_silent; then
5946 +  exec 6>/dev/null
5947 +  ac_configure_extra_args="$ac_configure_extra_args --silent"
5948 +fi
5949 +
5950 +_ACEOF
5951 +cat >>$CONFIG_STATUS <<_ACEOF
5952 +if \$ac_cs_recheck; then
5953 +  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
5954 +  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
5955 +fi
5956 +
5957 +_ACEOF
5958 +
5959 +cat >>$CONFIG_STATUS <<_ACEOF
5960 +#
5961 +# INIT-COMMANDS section.
5962 +#
5963 +
5964 +srcdir=${srcdir}
5965 +host=${host}
5966 +target=${target}
5967 +with_multisubdir=${with_multisubdir}
5968 +ac_configure_args="${multilib_arg} ${ac_configure_args}"
5969 +CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
5970 +gc_basedir=${gc_basedir}
5971 +CC="${CC}"
5972 +DEFS="$DEFS"
5973 +
5974 +
5975 +_ACEOF
5976 +
5977 +
5978 +
5979 +cat >>$CONFIG_STATUS <<\_ACEOF
5980 +for ac_config_target in $ac_config_targets
5981 +do
5982 +  case "$ac_config_target" in
5983 +  # Handling of arguments.
5984 +  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
5985 +  "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
5986 +  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
5987 +  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
5988 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
5989 +   { (exit 1); exit 1; }; };;
5990 +  esac
5991 +done
5992 +
5993 +# If the user did not use the arguments to specify the items to instantiate,
5994 +# then the envvar interface is used.  Set only those that are not.
5995 +# We use the long form for the default assignment because of an extremely
5996 +# bizarre bug on SunOS 4.1.3.
5997 +if $ac_need_defaults; then
5998 +  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
5999 +  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
6000 +fi
6001 +
6002 +# Have a temporary directory for convenience.  Make it in the build tree
6003 +# simply because there is no reason to put it here, and in addition,
6004 +# creating and moving files from /tmp can sometimes cause problems.
6005 +# Create a temporary directory, and hook for its removal unless debugging.
6006 +$debug ||
6007 +{
6008 +  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
6009 +  trap '{ (exit 1); exit 1; }' 1 2 13 15
6010 +}
6011 +
6012 +# Create a (secure) tmp directory for tmp files.
6013 +
6014 +{
6015 +  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
6016 +  test -n "$tmp" && test -d "$tmp"
6017 +}  ||
6018 +{
6019 +  tmp=./confstat$$-$RANDOM
6020 +  (umask 077 && mkdir $tmp)
6021 +} ||
6022 +{
6023 +   echo "$me: cannot create a temporary directory in ." >&2
6024 +   { (exit 1); exit 1; }
6025 +}
6026 +
6027 +_ACEOF
6028 +
6029 +cat >>$CONFIG_STATUS <<_ACEOF
6030 +
6031 +#
6032 +# CONFIG_FILES section.
6033 +#
6034 +
6035 +# No need to generate the scripts if there are no CONFIG_FILES.
6036 +# This happens for instance when ./config.status config.h
6037 +if test -n "\$CONFIG_FILES"; then
6038 +  # Protect against being on the right side of a sed subst in config.status.
6039 +  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
6040 +   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
6041 +s,@SHELL@,$SHELL,;t t
6042 +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
6043 +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
6044 +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
6045 +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
6046 +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
6047 +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
6048 +s,@exec_prefix@,$exec_prefix,;t t
6049 +s,@prefix@,$prefix,;t t
6050 +s,@program_transform_name@,$program_transform_name,;t t
6051 +s,@bindir@,$bindir,;t t
6052 +s,@sbindir@,$sbindir,;t t
6053 +s,@libexecdir@,$libexecdir,;t t
6054 +s,@datadir@,$datadir,;t t
6055 +s,@sysconfdir@,$sysconfdir,;t t
6056 +s,@sharedstatedir@,$sharedstatedir,;t t
6057 +s,@localstatedir@,$localstatedir,;t t
6058 +s,@libdir@,$libdir,;t t
6059 +s,@includedir@,$includedir,;t t
6060 +s,@oldincludedir@,$oldincludedir,;t t
6061 +s,@infodir@,$infodir,;t t
6062 +s,@mandir@,$mandir,;t t
6063 +s,@build_alias@,$build_alias,;t t
6064 +s,@host_alias@,$host_alias,;t t
6065 +s,@target_alias@,$target_alias,;t t
6066 +s,@DEFS@,$DEFS,;t t
6067 +s,@ECHO_C@,$ECHO_C,;t t
6068 +s,@ECHO_N@,$ECHO_N,;t t
6069 +s,@ECHO_T@,$ECHO_T,;t t
6070 +s,@LIBS@,$LIBS,;t t
6071 +s,@gc_basedir@,$gc_basedir,;t t
6072 +s,@build@,$build,;t t
6073 +s,@build_cpu@,$build_cpu,;t t
6074 +s,@build_vendor@,$build_vendor,;t t
6075 +s,@build_os@,$build_os,;t t
6076 +s,@host@,$host,;t t
6077 +s,@host_cpu@,$host_cpu,;t t
6078 +s,@host_vendor@,$host_vendor,;t t
6079 +s,@host_os@,$host_os,;t t
6080 +s,@target@,$target,;t t
6081 +s,@target_cpu@,$target_cpu,;t t
6082 +s,@target_vendor@,$target_vendor,;t t
6083 +s,@target_os@,$target_os,;t t
6084 +s,@mkinstalldirs@,$mkinstalldirs,;t t
6085 +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
6086 +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
6087 +s,@INSTALL_DATA@,$INSTALL_DATA,;t t
6088 +s,@PACKAGE@,$PACKAGE,;t t
6089 +s,@VERSION@,$VERSION,;t t
6090 +s,@ACLOCAL@,$ACLOCAL,;t t
6091 +s,@AUTOCONF@,$AUTOCONF,;t t
6092 +s,@AUTOMAKE@,$AUTOMAKE,;t t
6093 +s,@AUTOHEADER@,$AUTOHEADER,;t t
6094 +s,@MAKEINFO@,$MAKEINFO,;t t
6095 +s,@SET_MAKE@,$SET_MAKE,;t t
6096 +s,@CC@,$CC,;t t
6097 +s,@CXX@,$CXX,;t t
6098 +s,@AS@,$AS,;t t
6099 +s,@ac_ct_AS@,$ac_ct_AS,;t t
6100 +s,@AR@,$AR,;t t
6101 +s,@ac_ct_AR@,$ac_ct_AR,;t t
6102 +s,@RANLIB@,$RANLIB,;t t
6103 +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
6104 +s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
6105 +s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
6106 +s,@MAINT@,$MAINT,;t t
6107 +s,@GC_CFLAGS@,$GC_CFLAGS,;t t
6108 +s,@LN_S@,$LN_S,;t t
6109 +s,@STRIP@,$STRIP,;t t
6110 +s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
6111 +s,@LIBTOOL@,$LIBTOOL,;t t
6112 +s,@CXXCPP@,$CXXCPP,;t t
6113 +s,@CPPFLAGS@,$CPPFLAGS,;t t
6114 +s,@THREADLIBS@,$THREADLIBS,;t t
6115 +s,@POWERPC_DARWIN_TRUE@,$POWERPC_DARWIN_TRUE,;t t
6116 +s,@POWERPC_DARWIN_FALSE@,$POWERPC_DARWIN_FALSE,;t t
6117 +s,@EXTRA_TEST_LIBS@,$EXTRA_TEST_LIBS,;t t
6118 +s,@target_all@,$target_all,;t t
6119 +s,@INCLUDES@,$INCLUDES,;t t
6120 +s,@CXXINCLUDES@,$CXXINCLUDES,;t t
6121 +s,@addobjs@,$addobjs,;t t
6122 +s,@MY_CFLAGS@,$MY_CFLAGS,;t t
6123 +s,@USE_LIBDIR_TRUE@,$USE_LIBDIR_TRUE,;t t
6124 +s,@USE_LIBDIR_FALSE@,$USE_LIBDIR_FALSE,;t t
6125 +s,@LIB@&t@OBJS@,$LIB@&t@OBJS,;t t
6126 +s,@LTLIBOBJS@,$LTLIBOBJS,;t t
6127 +CEOF
6128 +
6129 +_ACEOF
6130 +
6131 +  cat >>$CONFIG_STATUS <<\_ACEOF
6132 +  # Split the substitutions into bite-sized pieces for seds with
6133 +  # small command number limits, like on Digital OSF/1 and HP-UX.
6134 +  ac_max_sed_lines=48
6135 +  ac_sed_frag=1 # Number of current file.
6136 +  ac_beg=1 # First line for current file.
6137 +  ac_end=$ac_max_sed_lines # Line after last line for current file.
6138 +  ac_more_lines=:
6139 +  ac_sed_cmds=
6140 +  while $ac_more_lines; do
6141 +    if test $ac_beg -gt 1; then
6142 +      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
6143 +    else
6144 +      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
6145 +    fi
6146 +    if test ! -s $tmp/subs.frag; then
6147 +      ac_more_lines=false
6148 +    else
6149 +      # The purpose of the label and of the branching condition is to
6150 +      # speed up the sed processing (if there are no `@' at all, there
6151 +      # is no need to browse any of the substitutions).
6152 +      # These are the two extra sed commands mentioned above.
6153 +      (echo ':t
6154 +  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
6155 +      if test -z "$ac_sed_cmds"; then
6156 +       ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
6157 +      else
6158 +       ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
6159 +      fi
6160 +      ac_sed_frag=`expr $ac_sed_frag + 1`
6161 +      ac_beg=$ac_end
6162 +      ac_end=`expr $ac_end + $ac_max_sed_lines`
6163 +    fi
6164 +  done
6165 +  if test -z "$ac_sed_cmds"; then
6166 +    ac_sed_cmds=cat
6167 +  fi
6168 +fi # test -n "$CONFIG_FILES"
6169 +
6170 +_ACEOF
6171 +cat >>$CONFIG_STATUS <<\_ACEOF
6172 +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
6173 +  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6174 +  case $ac_file in
6175 +  - | *:- | *:-:* ) # input from stdin
6176 +        cat >$tmp/stdin
6177 +        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
6178 +        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
6179 +  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
6180 +        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
6181 +  * )   ac_file_in=$ac_file.in ;;
6182 +  esac
6183 +
6184 +  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
6185 +  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
6186 +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6187 +         X"$ac_file" : 'X\(//\)[^/]' \| \
6188 +         X"$ac_file" : 'X\(//\)$' \| \
6189 +         X"$ac_file" : 'X\(/\)' \| \
6190 +         .     : '\(.\)' 2>/dev/null ||
6191 +echo X"$ac_file" |
6192 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
6193 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
6194 +         /^X\(\/\/\)$/{ s//\1/; q; }
6195 +         /^X\(\/\).*/{ s//\1/; q; }
6196 +         s/.*/./; q'`
6197 +  { if $as_mkdir_p; then
6198 +    mkdir -p "$ac_dir"
6199 +  else
6200 +    as_dir="$ac_dir"
6201 +    as_dirs=
6202 +    while test ! -d "$as_dir"; do
6203 +      as_dirs="$as_dir $as_dirs"
6204 +      as_dir=`(dirname "$as_dir") 2>/dev/null ||
6205 +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6206 +         X"$as_dir" : 'X\(//\)[^/]' \| \
6207 +         X"$as_dir" : 'X\(//\)$' \| \
6208 +         X"$as_dir" : 'X\(/\)' \| \
6209 +         .     : '\(.\)' 2>/dev/null ||
6210 +echo X"$as_dir" |
6211 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
6212 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
6213 +         /^X\(\/\/\)$/{ s//\1/; q; }
6214 +         /^X\(\/\).*/{ s//\1/; q; }
6215 +         s/.*/./; q'`
6216 +    done
6217 +    test ! -n "$as_dirs" || mkdir $as_dirs
6218 +  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
6219 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
6220 +   { (exit 1); exit 1; }; }; }
6221 +
6222 +  ac_builddir=.
6223 +
6224 +if test "$ac_dir" != .; then
6225 +  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
6226 +  # A "../" for each directory in $ac_dir_suffix.
6227 +  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
6228 +else
6229 +  ac_dir_suffix= ac_top_builddir=
6230 +fi
6231 +
6232 +case $srcdir in
6233 +  .)  # No --srcdir option.  We are building in place.
6234 +    ac_srcdir=.
6235 +    if test -z "$ac_top_builddir"; then
6236 +       ac_top_srcdir=.
6237 +    else
6238 +       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
6239 +    fi ;;
6240 +  [\\/]* | ?:[\\/]* )  # Absolute path.
6241 +    ac_srcdir=$srcdir$ac_dir_suffix;
6242 +    ac_top_srcdir=$srcdir ;;
6243 +  *) # Relative path.
6244 +    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
6245 +    ac_top_srcdir=$ac_top_builddir$srcdir ;;
6246 +esac
6247 +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
6248 +# absolute.
6249 +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6250 +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
6251 +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
6252 +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
6253 +
6254 +
6255 +  case $INSTALL in
6256 +  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
6257 +  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
6258 +  esac
6259 +
6260 +  if test x"$ac_file" != x-; then
6261 +    { echo "$as_me:$LINENO: creating $ac_file" >&5
6262 +echo "$as_me: creating $ac_file" >&6;}
6263 +    rm -f "$ac_file"
6264 +  fi
6265 +  # Let's still pretend it is `configure' which instantiates (i.e., don't
6266 +  # use $as_me), people would be surprised to read:
6267 +  #    /* config.h.  Generated by config.status.  */
6268 +  if test x"$ac_file" = x-; then
6269 +    configure_input=
6270 +  else
6271 +    configure_input="$ac_file.  "
6272 +  fi
6273 +  configure_input=$configure_input"Generated from `echo $ac_file_in |
6274 +                                     sed 's,.*/,,'` by configure."
6275 +
6276 +  # First look for the input files in the build tree, otherwise in the
6277 +  # src tree.
6278 +  ac_file_inputs=`IFS=:
6279 +    for f in $ac_file_in; do
6280 +      case $f in
6281 +      -) echo $tmp/stdin ;;
6282 +      [\\/$]*)
6283 +         # Absolute (can't be DOS-style, as IFS=:)
6284 +         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
6285 +echo "$as_me: error: cannot find input file: $f" >&2;}
6286 +   { (exit 1); exit 1; }; }
6287 +         echo $f;;
6288 +      *) # Relative
6289 +         if test -f "$f"; then
6290 +           # Build tree
6291 +           echo $f
6292 +         elif test -f "$srcdir/$f"; then
6293 +           # Source tree
6294 +           echo $srcdir/$f
6295 +         else
6296 +           # /dev/null tree
6297 +           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
6298 +echo "$as_me: error: cannot find input file: $f" >&2;}
6299 +   { (exit 1); exit 1; }; }
6300 +         fi;;
6301 +      esac
6302 +    done` || { (exit 1); exit 1; }
6303 +_ACEOF
6304 +cat >>$CONFIG_STATUS <<_ACEOF
6305 +  sed "$ac_vpsub
6306 +$extrasub
6307 +_ACEOF
6308 +cat >>$CONFIG_STATUS <<\_ACEOF
6309 +:t
6310 +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
6311 +s,@configure_input@,$configure_input,;t t
6312 +s,@srcdir@,$ac_srcdir,;t t
6313 +s,@abs_srcdir@,$ac_abs_srcdir,;t t
6314 +s,@top_srcdir@,$ac_top_srcdir,;t t
6315 +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
6316 +s,@builddir@,$ac_builddir,;t t
6317 +s,@abs_builddir@,$ac_abs_builddir,;t t
6318 +s,@top_builddir@,$ac_top_builddir,;t t
6319 +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
6320 +s,@INSTALL@,$ac_INSTALL,;t t
6321 +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
6322 +  rm -f $tmp/stdin
6323 +  if test x"$ac_file" != x-; then
6324 +    mv $tmp/out $ac_file
6325 +  else
6326 +    cat $tmp/out
6327 +    rm -f $tmp/out
6328 +  fi
6329 +
6330 +done
6331 +_ACEOF
6332 +cat >>$CONFIG_STATUS <<\_ACEOF
6333 +
6334 +#
6335 +# CONFIG_COMMANDS section.
6336 +#
6337 +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
6338 +  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
6339 +  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
6340 +  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
6341 +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6342 +         X"$ac_dest" : 'X\(//\)[^/]' \| \
6343 +         X"$ac_dest" : 'X\(//\)$' \| \
6344 +         X"$ac_dest" : 'X\(/\)' \| \
6345 +         .     : '\(.\)' 2>/dev/null ||
6346 +echo X"$ac_dest" |
6347 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
6348 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
6349 +         /^X\(\/\/\)$/{ s//\1/; q; }
6350 +         /^X\(\/\).*/{ s//\1/; q; }
6351 +         s/.*/./; q'`
6352 +  ac_builddir=.
6353 +
6354 +if test "$ac_dir" != .; then
6355 +  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
6356 +  # A "../" for each directory in $ac_dir_suffix.
6357 +  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
6358 +else
6359 +  ac_dir_suffix= ac_top_builddir=
6360 +fi
6361 +
6362 +case $srcdir in
6363 +  .)  # No --srcdir option.  We are building in place.
6364 +    ac_srcdir=.
6365 +    if test -z "$ac_top_builddir"; then
6366 +       ac_top_srcdir=.
6367 +    else
6368 +       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
6369 +    fi ;;
6370 +  [\\/]* | ?:[\\/]* )  # Absolute path.
6371 +    ac_srcdir=$srcdir$ac_dir_suffix;
6372 +    ac_top_srcdir=$srcdir ;;
6373 +  *) # Relative path.
6374 +    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
6375 +    ac_top_srcdir=$ac_top_builddir$srcdir ;;
6376 +esac
6377 +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
6378 +# absolute.
6379 +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6380 +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
6381 +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
6382 +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
6383 +
6384 +
6385 +  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
6386 +echo "$as_me: executing $ac_dest commands" >&6;}
6387 +  case $ac_dest in
6388 +    default ) 
6389 +echo "$DEFS" > boehm-cflags
6390 +
6391 +if test -n "$CONFIG_FILES"; then
6392 +  LD="${ORIGINAL_LD_FOR_MULTILIBS}"
6393 +  ac_file=Makefile . ${gc_basedir}/../config-ml.in
6394 +fi ;;
6395 +  esac
6396 +done
6397 +_ACEOF
6398 +
6399 +cat >>$CONFIG_STATUS <<\_ACEOF
6400 +
6401 +{ (exit 0); exit 0; }
6402 +_ACEOF
6403 +chmod +x $CONFIG_STATUS
6404 +ac_clean_files=$ac_clean_files_save
6405 +
6406 +
6407 +# configure is writing to config.log, and then calls config.status.
6408 +# config.status does its own redirection, appending to config.log.
6409 +# Unfortunately, on DOS this fails, as config.log is still kept open
6410 +# by configure, so config.status won't be able to write to it; its
6411 +# output is simply discarded.  So we exec the FD to /dev/null,
6412 +# effectively closing config.log, so it can be properly (re)opened and
6413 +# appended to by config.status.  When coming back to configure, we
6414 +# need to make the FD available again.
6415 +if test "$no_create" != yes; then
6416 +  ac_cs_success=:
6417 +  ac_config_status_args=
6418 +  test "$silent" = yes &&
6419 +    ac_config_status_args="$ac_config_status_args --quiet"
6420 +  exec 5>/dev/null
6421 +  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
6422 +  exec 5>>config.log
6423 +  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
6424 +  # would make configure fail if this is the last instruction.
6425 +  $ac_cs_success || { (exit 1); exit 1; }
6426 +fi
6427 +
6428 diff -buNr boehm-gc/autom4te.cache/output.1 boehm-gc/autom4te.cache/output.1
6429 --- boehm-gc/autom4te.cache/output.1    Wed Dec 31 16:00:00 1969
6430 +++ boehm-gc/autom4te.cache/output.1    Sat Sep 13 01:32:42 2003
6431 @@ -0,0 +1,9496 @@
6432 +@%:@! /bin/sh
6433 +@%:@ Guess values for system-dependent variables and create Makefiles.
6434 +@%:@ Generated by GNU Autoconf 2.54.
6435 +@%:@ 
6436 +@%:@ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
6437 +@%:@ Free Software Foundation, Inc.
6438 +@%:@ This configure script is free software; the Free Software Foundation
6439 +@%:@ gives unlimited permission to copy, distribute and modify it.
6440 +## --------------------- ##
6441 +## M4sh Initialization.  ##
6442 +## --------------------- ##
6443 +
6444 +# Be Bourne compatible
6445 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
6446 +  emulate sh
6447 +  NULLCMD=:
6448 +  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
6449 +  # is contrary to our usage.  Disable this feature.
6450 +  alias -g '${1+"$@"}'='"$@"'
6451 +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
6452 +  set -o posix
6453 +fi
6454 +
6455 +# Support unset when possible.
6456 +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
6457 +  as_unset=unset
6458 +else
6459 +  as_unset=false
6460 +fi
6461 +
6462 +
6463 +# Work around bugs in pre-3.0 UWIN ksh.
6464 +$as_unset ENV MAIL MAILPATH
6465 +PS1='$ '
6466 +PS2='> '
6467 +PS4='+ '
6468 +
6469 +# NLS nuisances.
6470 +for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME
6471 +do
6472 +  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
6473 +    eval $as_var=C; export $as_var
6474 +  else
6475 +    $as_unset $as_var
6476 +  fi
6477 +done
6478 +
6479 +# Required to use basename.
6480 +if expr a : '\(a\)' >/dev/null 2>&1; then
6481 +  as_expr=expr
6482 +else
6483 +  as_expr=false
6484 +fi
6485 +
6486 +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
6487 +  as_basename=basename
6488 +else
6489 +  as_basename=false
6490 +fi
6491 +
6492 +
6493 +# Name of the executable.
6494 +as_me=`$as_basename "$0" ||
6495 +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
6496 +        X"$0" : 'X\(//\)$' \| \
6497 +        X"$0" : 'X\(/\)$' \| \
6498 +        .     : '\(.\)' 2>/dev/null ||
6499 +echo X/"$0" |
6500 +    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
6501 +         /^X\/\(\/\/\)$/{ s//\1/; q; }
6502 +         /^X\/\(\/\).*/{ s//\1/; q; }
6503 +         s/.*/./; q'`
6504 +
6505 +
6506 +# PATH needs CR, and LINENO needs CR and PATH.
6507 +# Avoid depending upon Character Ranges.
6508 +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
6509 +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
6510 +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
6511 +as_cr_digits='0123456789'
6512 +as_cr_alnum=$as_cr_Letters$as_cr_digits
6513 +
6514 +# The user is always right.
6515 +if test "${PATH_SEPARATOR+set}" != set; then
6516 +  echo "#! /bin/sh" >conftest.sh
6517 +  echo  "exit 0"   >>conftest.sh
6518 +  chmod +x conftest.sh
6519 +  if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then
6520 +    PATH_SEPARATOR=';'
6521 +  else
6522 +    PATH_SEPARATOR=:
6523 +  fi
6524 +  rm -f conftest.sh
6525 +fi
6526 +
6527 +
6528 +  as_lineno_1=$LINENO
6529 +  as_lineno_2=$LINENO
6530 +  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
6531 +  test "x$as_lineno_1" != "x$as_lineno_2" &&
6532 +  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
6533 +  # Find who we are.  Look in the path if we contain no path at all
6534 +  # relative or not.
6535 +  case $0 in
6536 +    *[\\/]* ) as_myself=$0 ;;
6537 +    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6538 +for as_dir in $PATH
6539 +do
6540 +  IFS=$as_save_IFS
6541 +  test -z "$as_dir" && as_dir=.
6542 +  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
6543 +done
6544 +
6545 +       ;;
6546 +  esac
6547 +  # We did not find ourselves, most probably we were run as `sh COMMAND'
6548 +  # in which case we are not to be found in the path.
6549 +  if test "x$as_myself" = x; then
6550 +    as_myself=$0
6551 +  fi
6552 +  if test ! -f "$as_myself"; then
6553 +    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
6554 +   { (exit 1); exit 1; }; }
6555 +  fi
6556 +  case $CONFIG_SHELL in
6557 +  '')
6558 +    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6559 +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
6560 +do
6561 +  IFS=$as_save_IFS
6562 +  test -z "$as_dir" && as_dir=.
6563 +  for as_base in sh bash ksh sh5; do
6564 +        case $as_dir in
6565 +        /*)
6566 +          if ("$as_dir/$as_base" -c '
6567 +  as_lineno_1=$LINENO
6568 +  as_lineno_2=$LINENO
6569 +  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
6570 +  test "x$as_lineno_1" != "x$as_lineno_2" &&
6571 +  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
6572 +            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
6573 +            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
6574 +            CONFIG_SHELL=$as_dir/$as_base
6575 +            export CONFIG_SHELL
6576 +            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
6577 +          fi;;
6578 +        esac
6579 +       done
6580 +done
6581 +;;
6582 +  esac
6583 +
6584 +  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
6585 +  # uniformly replaced by the line number.  The first 'sed' inserts a
6586 +  # line-number line before each line; the second 'sed' does the real
6587 +  # work.  The second script uses 'N' to pair each line-number line
6588 +  # with the numbered line, and appends trailing '-' during
6589 +  # substitution so that $LINENO is not a special case at line end.
6590 +  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
6591 +  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
6592 +  sed '=' <$as_myself |
6593 +    sed '
6594 +      N
6595 +      s,$,-,
6596 +      : loop
6597 +      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
6598 +      t loop
6599 +      s,-$,,
6600 +      s,^['$as_cr_digits']*\n,,
6601 +    ' >$as_me.lineno &&
6602 +  chmod +x $as_me.lineno ||
6603 +    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
6604 +   { (exit 1); exit 1; }; }
6605 +
6606 +  # Don't try to exec as it changes $[0], causing all sort of problems
6607 +  # (the dirname of $[0] is not the place where we might find the
6608 +  # original and so on.  Autoconf is especially sensible to this).
6609 +  . ./$as_me.lineno
6610 +  # Exit status is that of the last command.
6611 +  exit
6612 +}
6613 +
6614 +
6615 +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
6616 +  *c*,-n*) ECHO_N= ECHO_C='
6617 +' ECHO_T='     ' ;;
6618 +  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
6619 +  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
6620 +esac
6621 +
6622 +if expr a : '\(a\)' >/dev/null 2>&1; then
6623 +  as_expr=expr
6624 +else
6625 +  as_expr=false
6626 +fi
6627 +
6628 +rm -f conf$$ conf$$.exe conf$$.file
6629 +echo >conf$$.file
6630 +if ln -s conf$$.file conf$$ 2>/dev/null; then
6631 +  # We could just check for DJGPP; but this test a) works b) is more generic
6632 +  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
6633 +  if test -f conf$$.exe; then
6634 +    # Don't use ln at all; we don't have any links
6635 +    as_ln_s='cp -p'
6636 +  else
6637 +    as_ln_s='ln -s'
6638 +  fi
6639 +elif ln conf$$.file conf$$ 2>/dev/null; then
6640 +  as_ln_s=ln
6641 +else
6642 +  as_ln_s='cp -p'
6643 +fi
6644 +rm -f conf$$ conf$$.exe conf$$.file
6645 +
6646 +if mkdir -p . 2>/dev/null; then
6647 +  as_mkdir_p=:
6648 +else
6649 +  as_mkdir_p=false
6650 +fi
6651 +
6652 +as_executable_p="test -f"
6653 +
6654 +# Sed expression to map a string onto a valid CPP name.
6655 +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
6656 +
6657 +# Sed expression to map a string onto a valid variable name.
6658 +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
6659 +
6660 +
6661 +# IFS
6662 +# We need space, tab and new line, in precisely that order.
6663 +as_nl='
6664 +'
6665 +IFS="  $as_nl"
6666 +
6667 +# CDPATH.
6668 +$as_unset CDPATH
6669 +
6670 +
6671 +# Find the correct PATH separator.  Usually this is `:', but
6672 +# DJGPP uses `;' like DOS.
6673 +if test "X${PATH_SEPARATOR+set}" != Xset; then
6674 +  UNAME=${UNAME-`uname 2>/dev/null`}
6675 +  case X$UNAME in
6676 +    *-DOS) lt_cv_sys_path_separator=';' ;;
6677 +    *)     lt_cv_sys_path_separator=':' ;;
6678 +  esac
6679 +  PATH_SEPARATOR=$lt_cv_sys_path_separator
6680 +fi
6681 +
6682 +
6683 +# Check that we are running under the correct shell.
6684 +SHELL=${CONFIG_SHELL-/bin/sh}
6685 +
6686 +case X$ECHO in
6687 +X*--fallback-echo)
6688 +  # Remove one level of quotation (which was required for Make).
6689 +  ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
6690 +  ;;
6691 +esac
6692 +
6693 +echo=${ECHO-echo}
6694 +if test "X$1" = X--no-reexec; then
6695 +  # Discard the --no-reexec flag, and continue.
6696 +  shift
6697 +elif test "X$1" = X--fallback-echo; then
6698 +  # Avoid inline document here, it may be left over
6699 +  :
6700 +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
6701 +  # Yippee, $echo works!
6702 +  :
6703 +else
6704 +  # Restart under the correct shell.
6705 +  exec $SHELL "$0" --no-reexec ${1+"$@"}
6706 +fi
6707 +
6708 +if test "X$1" = X--fallback-echo; then
6709 +  # used as fallback echo
6710 +  shift
6711 +  cat <<EOF
6712 +
6713 +EOF
6714 +  exit 0
6715 +fi
6716 +
6717 +# The HP-UX ksh and POSIX shell print the target directory to stdout
6718 +# if CDPATH is set.
6719 +if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6720 +
6721 +if test -z "$ECHO"; then
6722 +if test "X${echo_test_string+set}" != Xset; then
6723 +# find a string as large as possible, as long as the shell can cope with it
6724 +  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
6725 +    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
6726 +    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
6727 +       echo_test_string="`eval $cmd`" &&
6728 +       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
6729 +    then
6730 +      break
6731 +    fi
6732 +  done
6733 +fi
6734 +
6735 +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6736 +   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6737 +   test "X$echo_testing_string" = "X$echo_test_string"; then
6738 +  :
6739 +else
6740 +  # The Solaris, AIX, and Digital Unix default echo programs unquote
6741 +  # backslashes.  This makes it impossible to quote backslashes using
6742 +  #   echo "$something" | sed 's/\\/\\\\/g'
6743 +  #
6744 +  # So, first we look for a working echo in the user's PATH.
6745 +
6746 +  IFS="${IFS=  }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6747 +  for dir in $PATH /usr/ucb; do
6748 +    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
6749 +       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
6750 +       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
6751 +       test "X$echo_testing_string" = "X$echo_test_string"; then
6752 +      echo="$dir/echo"
6753 +      break
6754 +    fi
6755 +  done
6756 +  IFS="$save_ifs"
6757 +
6758 +  if test "X$echo" = Xecho; then
6759 +    # We didn't find a better echo, so look for alternatives.
6760 +    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
6761 +       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
6762 +       test "X$echo_testing_string" = "X$echo_test_string"; then
6763 +      # This shell has a builtin print -r that does the trick.
6764 +      echo='print -r'
6765 +    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
6766 +        test "X$CONFIG_SHELL" != X/bin/ksh; then
6767 +      # If we have ksh, try running configure again with it.
6768 +      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
6769 +      export ORIGINAL_CONFIG_SHELL
6770 +      CONFIG_SHELL=/bin/ksh
6771 +      export CONFIG_SHELL
6772 +      exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
6773 +    else
6774 +      # Try using printf.
6775 +      echo='printf %s\n'
6776 +      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6777 +        echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6778 +        test "X$echo_testing_string" = "X$echo_test_string"; then
6779 +       # Cool, printf works
6780 +       :
6781 +      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
6782 +          test "X$echo_testing_string" = 'X\t' &&
6783 +          echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6784 +          test "X$echo_testing_string" = "X$echo_test_string"; then
6785 +       CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
6786 +       export CONFIG_SHELL
6787 +       SHELL="$CONFIG_SHELL"
6788 +       export SHELL
6789 +       echo="$CONFIG_SHELL $0 --fallback-echo"
6790 +      elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
6791 +          test "X$echo_testing_string" = 'X\t' &&
6792 +          echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6793 +          test "X$echo_testing_string" = "X$echo_test_string"; then
6794 +       echo="$CONFIG_SHELL $0 --fallback-echo"
6795 +      else
6796 +       # maybe with a smaller string...
6797 +       prev=:
6798 +
6799 +       for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
6800 +         if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
6801 +         then
6802 +           break
6803 +         fi
6804 +         prev="$cmd"
6805 +       done
6806 +
6807 +       if test "$prev" != 'sed 50q "$0"'; then
6808 +         echo_test_string=`eval $prev`
6809 +         export echo_test_string
6810 +         exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
6811 +       else
6812 +         # Oops.  We lost completely, so just stick with echo.
6813 +         echo=echo
6814 +       fi
6815 +      fi
6816 +    fi
6817 +  fi
6818 +fi
6819 +fi
6820 +
6821 +# Copy echo and quote the copy suitably for passing to libtool from
6822 +# the Makefile, instead of quoting the original, which is used later.
6823 +ECHO=$echo
6824 +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
6825 +   ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
6826 +fi
6827 +
6828 +
6829 +
6830 +# Name of the host.
6831 +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
6832 +# so uname gets run too.
6833 +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
6834 +
6835 +exec 6>&1
6836 +
6837 +#
6838 +# Initializations.
6839 +#
6840 +ac_default_prefix=/usr/local
6841 +ac_config_libobj_dir=.
6842 +cross_compiling=no
6843 +subdirs=
6844 +MFLAGS=
6845 +MAKEFLAGS=
6846 +SHELL=${CONFIG_SHELL-/bin/sh}
6847 +
6848 +# Maximum number of lines to put in a shell here document.
6849 +# This variable seems obsolete.  It should probably be removed, and
6850 +# only ac_max_sed_lines should be used.
6851 +: ${ac_max_here_lines=38}
6852 +
6853 +# Identity of this package.
6854 +PACKAGE_NAME=
6855 +PACKAGE_TARNAME=
6856 +PACKAGE_VERSION=
6857 +PACKAGE_STRING=
6858 +PACKAGE_BUGREPORT=
6859 +
6860 +ac_unique_file="gcj_mlc.c"
6861 +# Factoring default headers for most tests.
6862 +ac_includes_default="\
6863 +#include <stdio.h>
6864 +#if HAVE_SYS_TYPES_H
6865 +# include <sys/types.h>
6866 +#endif
6867 +#if HAVE_SYS_STAT_H
6868 +# include <sys/stat.h>
6869 +#endif
6870 +#if STDC_HEADERS
6871 +# include <stdlib.h>
6872 +# include <stddef.h>
6873 +#else
6874 +# if HAVE_STDLIB_H
6875 +#  include <stdlib.h>
6876 +# endif
6877 +#endif
6878 +#if HAVE_STRING_H
6879 +# if !STDC_HEADERS && HAVE_MEMORY_H
6880 +#  include <memory.h>
6881 +# endif
6882 +# include <string.h>
6883 +#endif
6884 +#if HAVE_STRINGS_H
6885 +# include <strings.h>
6886 +#endif
6887 +#if HAVE_INTTYPES_H
6888 +# include <inttypes.h>
6889 +#else
6890 +# if HAVE_STDINT_H
6891 +#  include <stdint.h>
6892 +# endif
6893 +#endif
6894 +#if HAVE_UNISTD_H
6895 +# include <unistd.h>
6896 +#endif"
6897 +
6898 +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS gc_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os mkinstalldirs INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GC_CFLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE LN_S ECHO CPP EGREP LIBTOOL THREADLIBS POWERPC_DARWIN_TRUE POWERPC_DARWIN_FALSE EXTRA_TEST_LIBS target_all CXX INCLUDES CXXINCLUDES addobjs MY_CFLAGS USE_LIBDIR_TRUE USE_LIBDIR_FALSE LIB@&t@OBJS LTLIBOBJS'
6899 +ac_subst_files=''
6900 +
6901 +# Initialize some variables set by options.
6902 +ac_init_help=
6903 +ac_init_version=false
6904 +# The variables have the same names as the options, with
6905 +# dashes changed to underlines.
6906 +cache_file=/dev/null
6907 +exec_prefix=NONE
6908 +no_create=
6909 +no_recursion=
6910 +prefix=NONE
6911 +program_prefix=NONE
6912 +program_suffix=NONE
6913 +program_transform_name=s,x,x,
6914 +silent=
6915 +site=
6916 +srcdir=
6917 +verbose=
6918 +x_includes=NONE
6919 +x_libraries=NONE
6920 +
6921 +# Installation directory options.
6922 +# These are left unexpanded so users can "make install exec_prefix=/foo"
6923 +# and all the variables that are supposed to be based on exec_prefix
6924 +# by default will actually change.
6925 +# Use braces instead of parens because sh, perl, etc. also accept them.
6926 +bindir='${exec_prefix}/bin'
6927 +sbindir='${exec_prefix}/sbin'
6928 +libexecdir='${exec_prefix}/libexec'
6929 +datadir='${prefix}/share'
6930 +sysconfdir='${prefix}/etc'
6931 +sharedstatedir='${prefix}/com'
6932 +localstatedir='${prefix}/var'
6933 +libdir='${exec_prefix}/lib'
6934 +includedir='${prefix}/include'
6935 +oldincludedir='/usr/include'
6936 +infodir='${prefix}/info'
6937 +mandir='${prefix}/man'
6938 +
6939 +ac_prev=
6940 +for ac_option
6941 +do
6942 +  # If the previous option needs an argument, assign it.
6943 +  if test -n "$ac_prev"; then
6944 +    eval "$ac_prev=\$ac_option"
6945 +    ac_prev=
6946 +    continue
6947 +  fi
6948 +
6949 +  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
6950 +
6951 +  # Accept the important Cygnus configure options, so we can diagnose typos.
6952 +
6953 +  case $ac_option in
6954 +
6955 +  -bindir | --bindir | --bindi | --bind | --bin | --bi)
6956 +    ac_prev=bindir ;;
6957 +  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
6958 +    bindir=$ac_optarg ;;
6959 +
6960 +  -build | --build | --buil | --bui | --bu)
6961 +    ac_prev=build_alias ;;
6962 +  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
6963 +    build_alias=$ac_optarg ;;
6964 +
6965 +  -cache-file | --cache-file | --cache-fil | --cache-fi \
6966 +  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6967 +    ac_prev=cache_file ;;
6968 +  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6969 +  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
6970 +    cache_file=$ac_optarg ;;
6971 +
6972 +  --config-cache | -C)
6973 +    cache_file=config.cache ;;
6974 +
6975 +  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
6976 +    ac_prev=datadir ;;
6977 +  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
6978 +  | --da=*)
6979 +    datadir=$ac_optarg ;;
6980 +
6981 +  -disable-* | --disable-*)
6982 +    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
6983 +    # Reject names that are not valid shell variable names.
6984 +    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
6985 +      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
6986 +   { (exit 1); exit 1; }; }
6987 +    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
6988 +    eval "enable_$ac_feature=no" ;;
6989 +
6990 +  -enable-* | --enable-*)
6991 +    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
6992 +    # Reject names that are not valid shell variable names.
6993 +    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
6994 +      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
6995 +   { (exit 1); exit 1; }; }
6996 +    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
6997 +    case $ac_option in
6998 +      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
6999 +      *) ac_optarg=yes ;;
7000 +    esac
7001 +    eval "enable_$ac_feature='$ac_optarg'" ;;
7002 +
7003 +  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
7004 +  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
7005 +  | --exec | --exe | --ex)
7006 +    ac_prev=exec_prefix ;;
7007 +  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
7008 +  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
7009 +  | --exec=* | --exe=* | --ex=*)
7010 +    exec_prefix=$ac_optarg ;;
7011 +
7012 +  -gas | --gas | --ga | --g)
7013 +    # Obsolete; use --with-gas.
7014 +    with_gas=yes ;;
7015 +
7016 +  -help | --help | --hel | --he | -h)
7017 +    ac_init_help=long ;;
7018 +  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
7019 +    ac_init_help=recursive ;;
7020 +  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
7021 +    ac_init_help=short ;;
7022 +
7023 +  -host | --host | --hos | --ho)
7024 +    ac_prev=host_alias ;;
7025 +  -host=* | --host=* | --hos=* | --ho=*)
7026 +    host_alias=$ac_optarg ;;
7027 +
7028 +  -includedir | --includedir | --includedi | --included | --include \
7029 +  | --includ | --inclu | --incl | --inc)
7030 +    ac_prev=includedir ;;
7031 +  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
7032 +  | --includ=* | --inclu=* | --incl=* | --inc=*)
7033 +    includedir=$ac_optarg ;;
7034 +
7035 +  -infodir | --infodir | --infodi | --infod | --info | --inf)
7036 +    ac_prev=infodir ;;
7037 +  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
7038 +    infodir=$ac_optarg ;;
7039 +
7040 +  -libdir | --libdir | --libdi | --libd)
7041 +    ac_prev=libdir ;;
7042 +  -libdir=* | --libdir=* | --libdi=* | --libd=*)
7043 +    libdir=$ac_optarg ;;
7044 +
7045 +  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
7046 +  | --libexe | --libex | --libe)
7047 +    ac_prev=libexecdir ;;
7048 +  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
7049 +  | --libexe=* | --libex=* | --libe=*)
7050 +    libexecdir=$ac_optarg ;;
7051 +
7052 +  -localstatedir | --localstatedir | --localstatedi | --localstated \
7053 +  | --localstate | --localstat | --localsta | --localst \
7054 +  | --locals | --local | --loca | --loc | --lo)
7055 +    ac_prev=localstatedir ;;
7056 +  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
7057 +  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
7058 +  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
7059 +    localstatedir=$ac_optarg ;;
7060 +
7061 +  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
7062 +    ac_prev=mandir ;;
7063 +  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
7064 +    mandir=$ac_optarg ;;
7065 +
7066 +  -nfp | --nfp | --nf)
7067 +    # Obsolete; use --without-fp.
7068 +    with_fp=no ;;
7069 +
7070 +  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
7071 +  | --no-cr | --no-c | -n)
7072 +    no_create=yes ;;
7073 +
7074 +  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
7075 +  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
7076 +    no_recursion=yes ;;
7077 +
7078 +  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
7079 +  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
7080 +  | --oldin | --oldi | --old | --ol | --o)
7081 +    ac_prev=oldincludedir ;;
7082 +  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
7083 +  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
7084 +  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
7085 +    oldincludedir=$ac_optarg ;;
7086 +
7087 +  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
7088 +    ac_prev=prefix ;;
7089 +  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
7090 +    prefix=$ac_optarg ;;
7091 +
7092 +  -program-prefix | --program-prefix | --program-prefi | --program-pref \
7093 +  | --program-pre | --program-pr | --program-p)
7094 +    ac_prev=program_prefix ;;
7095 +  -program-prefix=* | --program-prefix=* | --program-prefi=* \
7096 +  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
7097 +    program_prefix=$ac_optarg ;;
7098 +
7099 +  -program-suffix | --program-suffix | --program-suffi | --program-suff \
7100 +  | --program-suf | --program-su | --program-s)
7101 +    ac_prev=program_suffix ;;
7102 +  -program-suffix=* | --program-suffix=* | --program-suffi=* \
7103 +  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
7104 +    program_suffix=$ac_optarg ;;
7105 +
7106 +  -program-transform-name | --program-transform-name \
7107 +  | --program-transform-nam | --program-transform-na \
7108 +  | --program-transform-n | --program-transform- \
7109 +  | --program-transform | --program-transfor \
7110 +  | --program-transfo | --program-transf \
7111 +  | --program-trans | --program-tran \
7112 +  | --progr-tra | --program-tr | --program-t)
7113 +    ac_prev=program_transform_name ;;
7114 +  -program-transform-name=* | --program-transform-name=* \
7115 +  | --program-transform-nam=* | --program-transform-na=* \
7116 +  | --program-transform-n=* | --program-transform-=* \
7117 +  | --program-transform=* | --program-transfor=* \
7118 +  | --program-transfo=* | --program-transf=* \
7119 +  | --program-trans=* | --program-tran=* \
7120 +  | --progr-tra=* | --program-tr=* | --program-t=*)
7121 +    program_transform_name=$ac_optarg ;;
7122 +
7123 +  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
7124 +  | -silent | --silent | --silen | --sile | --sil)
7125 +    silent=yes ;;
7126 +
7127 +  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
7128 +    ac_prev=sbindir ;;
7129 +  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
7130 +  | --sbi=* | --sb=*)
7131 +    sbindir=$ac_optarg ;;
7132 +
7133 +  -sharedstatedir | --sharedstatedir | --sharedstatedi \
7134 +  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
7135 +  | --sharedst | --shareds | --shared | --share | --shar \
7136 +  | --sha | --sh)
7137 +    ac_prev=sharedstatedir ;;
7138 +  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
7139 +  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
7140 +  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
7141 +  | --sha=* | --sh=*)
7142 +    sharedstatedir=$ac_optarg ;;
7143 +
7144 +  -site | --site | --sit)
7145 +    ac_prev=site ;;
7146 +  -site=* | --site=* | --sit=*)
7147 +    site=$ac_optarg ;;
7148 +
7149 +  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
7150 +    ac_prev=srcdir ;;
7151 +  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
7152 +    srcdir=$ac_optarg ;;
7153 +
7154 +  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
7155 +  | --syscon | --sysco | --sysc | --sys | --sy)
7156 +    ac_prev=sysconfdir ;;
7157 +  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
7158 +  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
7159 +    sysconfdir=$ac_optarg ;;
7160 +
7161 +  -target | --target | --targe | --targ | --tar | --ta | --t)
7162 +    ac_prev=target_alias ;;
7163 +  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
7164 +    target_alias=$ac_optarg ;;
7165 +
7166 +  -v | -verbose | --verbose | --verbos | --verbo | --verb)
7167 +    verbose=yes ;;
7168 +
7169 +  -version | --version | --versio | --versi | --vers | -V)
7170 +    ac_init_version=: ;;
7171 +
7172 +  -with-* | --with-*)
7173 +    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
7174 +    # Reject names that are not valid shell variable names.
7175 +    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
7176 +      { echo "$as_me: error: invalid package name: $ac_package" >&2
7177 +   { (exit 1); exit 1; }; }
7178 +    ac_package=`echo $ac_package| sed 's/-/_/g'`
7179 +    case $ac_option in
7180 +      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
7181 +      *) ac_optarg=yes ;;
7182 +    esac
7183 +    eval "with_$ac_package='$ac_optarg'" ;;
7184 +
7185 +  -without-* | --without-*)
7186 +    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
7187 +    # Reject names that are not valid shell variable names.
7188 +    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
7189 +      { echo "$as_me: error: invalid package name: $ac_package" >&2
7190 +   { (exit 1); exit 1; }; }
7191 +    ac_package=`echo $ac_package | sed 's/-/_/g'`
7192 +    eval "with_$ac_package=no" ;;
7193 +
7194 +  --x)
7195 +    # Obsolete; use --with-x.
7196 +    with_x=yes ;;
7197 +
7198 +  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
7199 +  | --x-incl | --x-inc | --x-in | --x-i)
7200 +    ac_prev=x_includes ;;
7201 +  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
7202 +  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
7203 +    x_includes=$ac_optarg ;;
7204 +
7205 +  -x-libraries | --x-libraries | --x-librarie | --x-librari \
7206 +  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
7207 +    ac_prev=x_libraries ;;
7208 +  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
7209 +  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
7210 +    x_libraries=$ac_optarg ;;
7211 +
7212 +  -*) { echo "$as_me: error: unrecognized option: $ac_option
7213 +Try \`$0 --help' for more information." >&2
7214 +   { (exit 1); exit 1; }; }
7215 +    ;;
7216 +
7217 +  *=*)
7218 +    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
7219 +    # Reject names that are not valid shell variable names.
7220 +    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
7221 +      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
7222 +   { (exit 1); exit 1; }; }
7223 +    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
7224 +    eval "$ac_envvar='$ac_optarg'"
7225 +    export $ac_envvar ;;
7226 +
7227 +  *)
7228 +    # FIXME: should be removed in autoconf 3.0.
7229 +    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
7230 +    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
7231 +      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
7232 +    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
7233 +    ;;
7234 +
7235 +  esac
7236 +done
7237 +
7238 +if test -n "$ac_prev"; then
7239 +  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
7240 +  { echo "$as_me: error: missing argument to $ac_option" >&2
7241 +   { (exit 1); exit 1; }; }
7242 +fi
7243 +
7244 +# Be sure to have absolute paths.
7245 +for ac_var in exec_prefix prefix
7246 +do
7247 +  eval ac_val=$`echo $ac_var`
7248 +  case $ac_val in
7249 +    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
7250 +    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
7251 +   { (exit 1); exit 1; }; };;
7252 +  esac
7253 +done
7254 +
7255 +# Be sure to have absolute paths.
7256 +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
7257 +              localstatedir libdir includedir oldincludedir infodir mandir
7258 +do
7259 +  eval ac_val=$`echo $ac_var`
7260 +  case $ac_val in
7261 +    [\\/$]* | ?:[\\/]* ) ;;
7262 +    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
7263 +   { (exit 1); exit 1; }; };;
7264 +  esac
7265 +done
7266 +
7267 +# There might be people who depend on the old broken behavior: `$host'
7268 +# used to hold the argument of --host etc.
7269 +# FIXME: To remove some day.
7270 +build=$build_alias
7271 +host=$host_alias
7272 +target=$target_alias
7273 +
7274 +# FIXME: To remove some day.
7275 +if test "x$host_alias" != x; then
7276 +  if test "x$build_alias" = x; then
7277 +    cross_compiling=maybe
7278 +    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
7279 +    If a cross compiler is detected then cross compile mode will be used." >&2
7280 +  elif test "x$build_alias" != "x$host_alias"; then
7281 +    cross_compiling=yes
7282 +  fi
7283 +fi
7284 +
7285 +ac_tool_prefix=
7286 +test -n "$host_alias" && ac_tool_prefix=$host_alias-
7287 +
7288 +test "$silent" = yes && exec 6>/dev/null
7289 +
7290 +
7291 +# Find the source files, if location was not specified.
7292 +if test -z "$srcdir"; then
7293 +  ac_srcdir_defaulted=yes
7294 +  # Try the directory containing this script, then its parent.
7295 +  ac_confdir=`(dirname "$0") 2>/dev/null ||
7296 +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7297 +         X"$0" : 'X\(//\)[^/]' \| \
7298 +         X"$0" : 'X\(//\)$' \| \
7299 +         X"$0" : 'X\(/\)' \| \
7300 +         .     : '\(.\)' 2>/dev/null ||
7301 +echo X"$0" |
7302 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
7303 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
7304 +         /^X\(\/\/\)$/{ s//\1/; q; }
7305 +         /^X\(\/\).*/{ s//\1/; q; }
7306 +         s/.*/./; q'`
7307 +  srcdir=$ac_confdir
7308 +  if test ! -r $srcdir/$ac_unique_file; then
7309 +    srcdir=..
7310 +  fi
7311 +else
7312 +  ac_srcdir_defaulted=no
7313 +fi
7314 +if test ! -r $srcdir/$ac_unique_file; then
7315 +  if test "$ac_srcdir_defaulted" = yes; then
7316 +    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
7317 +   { (exit 1); exit 1; }; }
7318 +  else
7319 +    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
7320 +   { (exit 1); exit 1; }; }
7321 +  fi
7322 +fi
7323 +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
7324 +  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
7325 +   { (exit 1); exit 1; }; }
7326 +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
7327 +ac_env_build_alias_set=${build_alias+set}
7328 +ac_env_build_alias_value=$build_alias
7329 +ac_cv_env_build_alias_set=${build_alias+set}
7330 +ac_cv_env_build_alias_value=$build_alias
7331 +ac_env_host_alias_set=${host_alias+set}
7332 +ac_env_host_alias_value=$host_alias
7333 +ac_cv_env_host_alias_set=${host_alias+set}
7334 +ac_cv_env_host_alias_value=$host_alias
7335 +ac_env_target_alias_set=${target_alias+set}
7336 +ac_env_target_alias_value=$target_alias
7337 +ac_cv_env_target_alias_set=${target_alias+set}
7338 +ac_cv_env_target_alias_value=$target_alias
7339 +ac_env_CC_set=${CC+set}
7340 +ac_env_CC_value=$CC
7341 +ac_cv_env_CC_set=${CC+set}
7342 +ac_cv_env_CC_value=$CC
7343 +ac_env_CFLAGS_set=${CFLAGS+set}
7344 +ac_env_CFLAGS_value=$CFLAGS
7345 +ac_cv_env_CFLAGS_set=${CFLAGS+set}
7346 +ac_cv_env_CFLAGS_value=$CFLAGS
7347 +ac_env_LDFLAGS_set=${LDFLAGS+set}
7348 +ac_env_LDFLAGS_value=$LDFLAGS
7349 +ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
7350 +ac_cv_env_LDFLAGS_value=$LDFLAGS
7351 +ac_env_CPPFLAGS_set=${CPPFLAGS+set}
7352 +ac_env_CPPFLAGS_value=$CPPFLAGS
7353 +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
7354 +ac_cv_env_CPPFLAGS_value=$CPPFLAGS
7355 +ac_env_CPP_set=${CPP+set}
7356 +ac_env_CPP_value=$CPP
7357 +ac_cv_env_CPP_set=${CPP+set}
7358 +ac_cv_env_CPP_value=$CPP
7359 +
7360 +#
7361 +# Report the --help message.
7362 +#
7363 +if test "$ac_init_help" = "long"; then
7364 +  # Omit some internal or obsolete options to make the list less imposing.
7365 +  # This message is too long to be a string in the A/UX 3.1 sh.
7366 +  cat <<_ACEOF
7367 +\`configure' configures this package to adapt to many kinds of systems.
7368 +
7369 +Usage: $0 [OPTION]... [VAR=VALUE]...
7370 +
7371 +To assign environment variables (e.g., CC, CFLAGS...), specify them as
7372 +VAR=VALUE.  See below for descriptions of some of the useful variables.
7373 +
7374 +Defaults for the options are specified in brackets.
7375 +
7376 +Configuration:
7377 +  -h, --help              display this help and exit
7378 +      --help=short        display options specific to this package
7379 +      --help=recursive    display the short help of all the included packages
7380 +  -V, --version           display version information and exit
7381 +  -q, --quiet, --silent   do not print \`checking...' messages
7382 +      --cache-file=FILE   cache test results in FILE [disabled]
7383 +  -C, --config-cache      alias for \`--cache-file=config.cache'
7384 +  -n, --no-create         do not create output files
7385 +      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
7386 +
7387 +_ACEOF
7388 +
7389 +  cat <<_ACEOF
7390 +Installation directories:
7391 +  --prefix=PREFIX         install architecture-independent files in PREFIX
7392 +                          [$ac_default_prefix]
7393 +  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
7394 +                          [PREFIX]
7395 +
7396 +By default, \`make install' will install all the files in
7397 +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
7398 +an installation prefix other than \`$ac_default_prefix' using \`--prefix',
7399 +for instance \`--prefix=\$HOME'.
7400 +
7401 +For better control, use the options below.
7402 +
7403 +Fine tuning of the installation directories:
7404 +  --bindir=DIR           user executables [EPREFIX/bin]
7405 +  --sbindir=DIR          system admin executables [EPREFIX/sbin]
7406 +  --libexecdir=DIR       program executables [EPREFIX/libexec]
7407 +  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
7408 +  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
7409 +  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
7410 +  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
7411 +  --libdir=DIR           object code libraries [EPREFIX/lib]
7412 +  --includedir=DIR       C header files [PREFIX/include]
7413 +  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
7414 +  --infodir=DIR          info documentation [PREFIX/info]
7415 +  --mandir=DIR           man documentation [PREFIX/man]
7416 +_ACEOF
7417 +
7418 +  cat <<\_ACEOF
7419 +
7420 +Program names:
7421 +  --program-prefix=PREFIX            prepend PREFIX to installed program names
7422 +  --program-suffix=SUFFIX            append SUFFIX to installed program names
7423 +  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
7424 +
7425 +System types:
7426 +  --build=BUILD     configure for building on BUILD [guessed]
7427 +  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
7428 +  --target=TARGET   configure for building compilers for TARGET [HOST]
7429 +_ACEOF
7430 +fi
7431 +
7432 +if test -n "$ac_init_help"; then
7433 +
7434 +  cat <<\_ACEOF
7435 +
7436 +Optional Features:
7437 +  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
7438 +  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
7439 +  --enable-multilib       build many library versions (default)
7440 +  --enable-maintainer-mode enable make rules and dependencies not useful
7441 +                          (and sometimes confusing) to the casual installer
7442 +  --enable-shared=PKGS  build shared libraries default=yes
7443 +  --enable-static=PKGS  build static libraries default=yes
7444 +  --enable-fast-install=PKGS  optimize for fast installation default=yes
7445 +  --disable-dependency-tracking Speeds up one-time builds
7446 +  --enable-dependency-tracking  Do not reject slow dependency extractors
7447 +  --disable-libtool-lock  avoid locking (might break parallel builds)
7448 +  --enable-parallel-mark       parallelize marking and free list construction
7449 +  --enable-shared=PKGS  build shared libraries default=no
7450 +  --enable-full-debug  include full support for pointer backtracing etc.
7451 +
7452 +Optional Packages:
7453 +  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
7454 +  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
7455 +  --with-gnu-ld           assume the C compiler uses GNU ld default=no
7456 +  --with-pic              try to use only PIC/non-PIC objects default=use both
7457 +  --with-target-subdir=SUBDIR
7458 +                          configuring with a cross compiler
7459 +  --with-cross-host=HOST  configuring with a cross compiler
7460 +  --with-ecos             enable runtime eCos target support
7461 +
7462 +Some influential environment variables:
7463 +  CC          C compiler command
7464 +  CFLAGS      C compiler flags
7465 +  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
7466 +              nonstandard directory <lib dir>
7467 +  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
7468 +              headers in a nonstandard directory <include dir>
7469 +  CPP         C preprocessor
7470 +
7471 +Use these variables to override the choices made by `configure' or to help
7472 +it to find libraries and programs with nonstandard names/locations.
7473 +
7474 +_ACEOF
7475 +fi
7476 +
7477 +if test "$ac_init_help" = "recursive"; then
7478 +  # If there are subdirs, report their specific --help.
7479 +  ac_popdir=`pwd`
7480 +  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
7481 +    test -d $ac_dir || continue
7482 +    ac_builddir=.
7483 +
7484 +if test "$ac_dir" != .; then
7485 +  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
7486 +  # A "../" for each directory in $ac_dir_suffix.
7487 +  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
7488 +else
7489 +  ac_dir_suffix= ac_top_builddir=
7490 +fi
7491 +
7492 +case $srcdir in
7493 +  .)  # No --srcdir option.  We are building in place.
7494 +    ac_srcdir=.
7495 +    if test -z "$ac_top_builddir"; then
7496 +       ac_top_srcdir=.
7497 +    else
7498 +       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
7499 +    fi ;;
7500 +  [\\/]* | ?:[\\/]* )  # Absolute path.
7501 +    ac_srcdir=$srcdir$ac_dir_suffix;
7502 +    ac_top_srcdir=$srcdir ;;
7503 +  *) # Relative path.
7504 +    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
7505 +    ac_top_srcdir=$ac_top_builddir$srcdir ;;
7506 +esac
7507 +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
7508 +# absolute.
7509 +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
7510 +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
7511 +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
7512 +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
7513 +
7514 +    cd $ac_dir
7515 +    # Check for guested configure; otherwise get Cygnus style configure.
7516 +    if test -f $ac_srcdir/configure.gnu; then
7517 +      echo
7518 +      $SHELL $ac_srcdir/configure.gnu  --help=recursive
7519 +    elif test -f $ac_srcdir/configure; then
7520 +      echo
7521 +      $SHELL $ac_srcdir/configure  --help=recursive
7522 +    elif test -f $ac_srcdir/configure.ac ||
7523 +           test -f $ac_srcdir/configure.in; then
7524 +      echo
7525 +      $ac_configure --help
7526 +    else
7527 +      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
7528 +    fi
7529 +    cd $ac_popdir
7530 +  done
7531 +fi
7532 +
7533 +test -n "$ac_init_help" && exit 0
7534 +if $ac_init_version; then
7535 +  cat <<\_ACEOF
7536 +
7537 +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7538 +Free Software Foundation, Inc.
7539 +This configure script is free software; the Free Software Foundation
7540 +gives unlimited permission to copy, distribute and modify it.
7541 +_ACEOF
7542 +  exit 0
7543 +fi
7544 +exec 5>config.log
7545 +cat >&5 <<_ACEOF
7546 +This file contains any messages produced by compilers while
7547 +running configure, to aid debugging if configure makes a mistake.
7548 +
7549 +It was created by $as_me, which was
7550 +generated by GNU Autoconf 2.54.  Invocation command line was
7551 +
7552 +  $ $0 $@
7553 +
7554 +_ACEOF
7555 +{
7556 +cat <<_ASUNAME
7557 +@%:@@%:@ --------- @%:@@%:@
7558 +@%:@@%:@ Platform. @%:@@%:@
7559 +@%:@@%:@ --------- @%:@@%:@
7560 +
7561 +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
7562 +uname -m = `(uname -m) 2>/dev/null || echo unknown`
7563 +uname -r = `(uname -r) 2>/dev/null || echo unknown`
7564 +uname -s = `(uname -s) 2>/dev/null || echo unknown`
7565 +uname -v = `(uname -v) 2>/dev/null || echo unknown`
7566 +
7567 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
7568 +/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
7569 +
7570 +/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
7571 +/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
7572 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
7573 +hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
7574 +/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
7575 +/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
7576 +/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
7577 +
7578 +_ASUNAME
7579 +
7580 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7581 +for as_dir in $PATH
7582 +do
7583 +  IFS=$as_save_IFS
7584 +  test -z "$as_dir" && as_dir=.
7585 +  echo "PATH: $as_dir"
7586 +done
7587 +
7588 +} >&5
7589 +
7590 +cat >&5 <<_ACEOF
7591 +
7592 +
7593 +@%:@@%:@ ----------- @%:@@%:@
7594 +@%:@@%:@ Core tests. @%:@@%:@
7595 +@%:@@%:@ ----------- @%:@@%:@
7596 +
7597 +_ACEOF
7598 +
7599 +
7600 +# Keep a trace of the command line.
7601 +# Strip out --no-create and --no-recursion so they do not pile up.
7602 +# Also quote any args containing shell meta-characters.
7603 +ac_configure_args=
7604 +ac_sep=
7605 +for ac_arg
7606 +do
7607 +  case $ac_arg in
7608 +  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
7609 +  | --no-cr | --no-c | -n ) continue ;;
7610 +  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
7611 +  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
7612 +    continue ;;
7613 +  *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
7614 +    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
7615 +  esac
7616 +  ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
7617 +  # Get rid of the leading space.
7618 +  ac_sep=" "
7619 +done
7620 +
7621 +# When interrupted or exit'd, cleanup temporary files, and complete
7622 +# config.log.  We remove comments because anyway the quotes in there
7623 +# would cause problems or look ugly.
7624 +# WARNING: Be sure not to use single quotes in there, as some shells,
7625 +# such as our DU 5.0 friend, will then `close' the trap.
7626 +trap 'exit_status=$?
7627 +  # Save into config.log some information that might help in debugging.
7628 +  {
7629 +    echo
7630 +
7631 +    cat <<\_ASBOX
7632 +@%:@@%:@ ---------------- @%:@@%:@
7633 +@%:@@%:@ Cache variables. @%:@@%:@
7634 +@%:@@%:@ ---------------- @%:@@%:@
7635 +_ASBOX
7636 +    echo
7637 +    # The following way of writing the cache mishandles newlines in values,
7638 +{
7639 +  (set) 2>&1 |
7640 +    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
7641 +    *ac_space=\ *)
7642 +      sed -n \
7643 +        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
7644 +         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
7645 +      ;;
7646 +    *)
7647 +      sed -n \
7648 +        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
7649 +      ;;
7650 +    esac;
7651 +}
7652 +    echo
7653 +
7654 +    cat <<\_ASBOX
7655 +@%:@@%:@ ----------------- @%:@@%:@
7656 +@%:@@%:@ Output variables. @%:@@%:@
7657 +@%:@@%:@ ----------------- @%:@@%:@
7658 +_ASBOX
7659 +    echo
7660 +    for ac_var in $ac_subst_vars
7661 +    do
7662 +      eval ac_val=$`echo $ac_var`
7663 +      echo "$ac_var='"'"'$ac_val'"'"'"
7664 +    done | sort
7665 +    echo
7666 +
7667 +    if test -n "$ac_subst_files"; then
7668 +      cat <<\_ASBOX
7669 +@%:@@%:@ ------------- @%:@@%:@
7670 +@%:@@%:@ Output files. @%:@@%:@
7671 +@%:@@%:@ ------------- @%:@@%:@
7672 +_ASBOX
7673 +      echo
7674 +      for ac_var in $ac_subst_files
7675 +      do
7676 +       eval ac_val=$`echo $ac_var`
7677 +        echo "$ac_var='"'"'$ac_val'"'"'"
7678 +      done | sort
7679 +      echo
7680 +    fi
7681 +
7682 +    if test -s confdefs.h; then
7683 +      cat <<\_ASBOX
7684 +@%:@@%:@ ----------- @%:@@%:@
7685 +@%:@@%:@ confdefs.h. @%:@@%:@
7686 +@%:@@%:@ ----------- @%:@@%:@
7687 +_ASBOX
7688 +      echo
7689 +      sed "/^$/d" confdefs.h | sort
7690 +      echo
7691 +    fi
7692 +    test "$ac_signal" != 0 &&
7693 +      echo "$as_me: caught signal $ac_signal"
7694 +    echo "$as_me: exit $exit_status"
7695 +  } >&5
7696 +  rm -f core core.* *.core &&
7697 +  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
7698 +    exit $exit_status
7699 +     ' 0
7700 +for ac_signal in 1 2 13 15; do
7701 +  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
7702 +done
7703 +ac_signal=0
7704 +
7705 +# confdefs.h avoids OS command line length limits that DEFS can exceed.
7706 +rm -rf conftest* confdefs.h
7707 +# AIX cpp loses on an empty file, so make sure it contains at least a newline.
7708 +echo >confdefs.h
7709 +
7710 +# Predefined preprocessor variables.
7711 +
7712 +cat >>confdefs.h <<_ACEOF
7713 +@%:@define PACKAGE_NAME "$PACKAGE_NAME"
7714 +_ACEOF
7715 +
7716 +
7717 +cat >>confdefs.h <<_ACEOF
7718 +@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
7719 +_ACEOF
7720 +
7721 +
7722 +cat >>confdefs.h <<_ACEOF
7723 +@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
7724 +_ACEOF
7725 +
7726 +
7727 +cat >>confdefs.h <<_ACEOF
7728 +@%:@define PACKAGE_STRING "$PACKAGE_STRING"
7729 +_ACEOF
7730 +
7731 +
7732 +cat >>confdefs.h <<_ACEOF
7733 +@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
7734 +_ACEOF
7735 +
7736 +
7737 +# Let the site file select an alternate cache file if it wants to.
7738 +# Prefer explicitly selected file to automatically selected ones.
7739 +if test -z "$CONFIG_SITE"; then
7740 +  if test "x$prefix" != xNONE; then
7741 +    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
7742 +  else
7743 +    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
7744 +  fi
7745 +fi
7746 +for ac_site_file in $CONFIG_SITE; do
7747 +  if test -r "$ac_site_file"; then
7748 +    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
7749 +echo "$as_me: loading site script $ac_site_file" >&6;}
7750 +    sed 's/^/| /' "$ac_site_file" >&5
7751 +    . "$ac_site_file"
7752 +  fi
7753 +done
7754 +
7755 +if test -r "$cache_file"; then
7756 +  # Some versions of bash will fail to source /dev/null (special
7757 +  # files actually), so we avoid doing that.
7758 +  if test -f "$cache_file"; then
7759 +    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
7760 +echo "$as_me: loading cache $cache_file" >&6;}
7761 +    case $cache_file in
7762 +      [\\/]* | ?:[\\/]* ) . $cache_file;;
7763 +      *)                      . ./$cache_file;;
7764 +    esac
7765 +  fi
7766 +else
7767 +  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
7768 +echo "$as_me: creating cache $cache_file" >&6;}
7769 +  >$cache_file
7770 +fi
7771 +
7772 +# Check that the precious variables saved in the cache have kept the same
7773 +# value.
7774 +ac_cache_corrupted=false
7775 +for ac_var in `(set) 2>&1 |
7776 +               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
7777 +  eval ac_old_set=\$ac_cv_env_${ac_var}_set
7778 +  eval ac_new_set=\$ac_env_${ac_var}_set
7779 +  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
7780 +  eval ac_new_val="\$ac_env_${ac_var}_value"
7781 +  case $ac_old_set,$ac_new_set in
7782 +    set,)
7783 +      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
7784 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
7785 +      ac_cache_corrupted=: ;;
7786 +    ,set)
7787 +      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
7788 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
7789 +      ac_cache_corrupted=: ;;
7790 +    ,);;
7791 +    *)
7792 +      if test "x$ac_old_val" != "x$ac_new_val"; then
7793 +        { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
7794 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
7795 +        { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
7796 +echo "$as_me:   former value:  $ac_old_val" >&2;}
7797 +        { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
7798 +echo "$as_me:   current value: $ac_new_val" >&2;}
7799 +        ac_cache_corrupted=:
7800 +      fi;;
7801 +  esac
7802 +  # Pass precious variables to config.status.
7803 +  if test "$ac_new_set" = set; then
7804 +    case $ac_new_val in
7805 +    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
7806 +      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
7807 +    *) ac_arg=$ac_var=$ac_new_val ;;
7808 +    esac
7809 +    case " $ac_configure_args " in
7810 +      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
7811 +      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
7812 +    esac
7813 +  fi
7814 +done
7815 +if $ac_cache_corrupted; then
7816 +  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
7817 +echo "$as_me: error: changes in the environment can compromise the build" >&2;}
7818 +  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
7819 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
7820 +   { (exit 1); exit 1; }; }
7821 +fi
7822 +
7823 +ac_ext=c
7824 +ac_cpp='$CPP $CPPFLAGS'
7825 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7826 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7827 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
7828 +
7829 +
7830 +
7831 +
7832 +
7833 +
7834 +
7835 +
7836 +
7837 +
7838 +
7839 +
7840 +
7841 +
7842 +
7843 +
7844 +
7845 +
7846 +
7847 +
7848 +# This works around the fact that libtool configuration may change LD
7849 +# for this particular configuration, but some shells, instead of
7850 +# keeping the changes in LD private, export them just because LD is
7851 +# exported.
7852 +ORIGINAL_LD_FOR_MULTILIBS=$LD
7853 +
7854 +ac_aux_dir=
7855 +for ac_dir in . $srcdir/.; do
7856 +  if test -f $ac_dir/install-sh; then
7857 +    ac_aux_dir=$ac_dir
7858 +    ac_install_sh="$ac_aux_dir/install-sh -c"
7859 +    break
7860 +  elif test -f $ac_dir/install.sh; then
7861 +    ac_aux_dir=$ac_dir
7862 +    ac_install_sh="$ac_aux_dir/install.sh -c"
7863 +    break
7864 +  elif test -f $ac_dir/shtool; then
7865 +    ac_aux_dir=$ac_dir
7866 +    ac_install_sh="$ac_aux_dir/shtool install -c"
7867 +    break
7868 +  fi
7869 +done
7870 +if test -z "$ac_aux_dir"; then
7871 +  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in . $srcdir/." >&5
7872 +echo "$as_me: error: cannot find install-sh or install.sh in . $srcdir/." >&2;}
7873 +   { (exit 1); exit 1; }; }
7874 +fi
7875 +ac_config_guess="$SHELL $ac_aux_dir/config.guess"
7876 +ac_config_sub="$SHELL $ac_aux_dir/config.sub"
7877 +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
7878 +
7879 +
7880 +# Make sure we can run config.sub.
7881 +$ac_config_sub sun4 >/dev/null 2>&1 ||
7882 +  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
7883 +echo "$as_me: error: cannot run $ac_config_sub" >&2;}
7884 +   { (exit 1); exit 1; }; }
7885 +
7886 +echo "$as_me:$LINENO: checking build system type" >&5
7887 +echo $ECHO_N "checking build system type... $ECHO_C" >&6
7888 +if test "${ac_cv_build+set}" = set; then
7889 +  echo $ECHO_N "(cached) $ECHO_C" >&6
7890 +else
7891 +  ac_cv_build_alias=$build_alias
7892 +test -z "$ac_cv_build_alias" &&
7893 +  ac_cv_build_alias=`$ac_config_guess`
7894 +test -z "$ac_cv_build_alias" &&
7895 +  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
7896 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
7897 +   { (exit 1); exit 1; }; }
7898 +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
7899 +  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
7900 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
7901 +   { (exit 1); exit 1; }; }
7902 +
7903 +fi
7904 +echo "$as_me:$LINENO: result: $ac_cv_build" >&5
7905 +echo "${ECHO_T}$ac_cv_build" >&6
7906 +build=$ac_cv_build
7907 +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
7908 +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
7909 +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
7910 +
7911 +
7912 +echo "$as_me:$LINENO: checking host system type" >&5
7913 +echo $ECHO_N "checking host system type... $ECHO_C" >&6
7914 +if test "${ac_cv_host+set}" = set; then
7915 +  echo $ECHO_N "(cached) $ECHO_C" >&6
7916 +else
7917 +  ac_cv_host_alias=$host_alias
7918 +test -z "$ac_cv_host_alias" &&
7919 +  ac_cv_host_alias=$ac_cv_build_alias
7920 +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
7921 +  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
7922 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
7923 +   { (exit 1); exit 1; }; }
7924 +
7925 +fi
7926 +echo "$as_me:$LINENO: result: $ac_cv_host" >&5
7927 +echo "${ECHO_T}$ac_cv_host" >&6
7928 +host=$ac_cv_host
7929 +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
7930 +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
7931 +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
7932 +
7933 +
7934 +am__api_version="1.6"
7935 +# Find a good install program.  We prefer a C program (faster),
7936 +# so one script is as good as another.  But avoid the broken or
7937 +# incompatible versions:
7938 +# SysV /etc/install, /usr/sbin/install
7939 +# SunOS /usr/etc/install
7940 +# IRIX /sbin/install
7941 +# AIX /bin/install
7942 +# AmigaOS /C/install, which installs bootblocks on floppy discs
7943 +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7944 +# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7945 +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7946 +# ./install, which can be erroneously created by make from ./install.sh.
7947 +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
7948 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
7949 +if test -z "$INSTALL"; then
7950 +if test "${ac_cv_path_install+set}" = set; then
7951 +  echo $ECHO_N "(cached) $ECHO_C" >&6
7952 +else
7953 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7954 +for as_dir in $PATH
7955 +do
7956 +  IFS=$as_save_IFS
7957 +  test -z "$as_dir" && as_dir=.
7958 +  # Account for people who put trailing slashes in PATH elements.
7959 +case $as_dir/ in
7960 +  ./ | .// | /cC/* | \
7961 +  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7962 +  /usr/ucb/* ) ;;
7963 +  *)
7964 +    # OSF1 and SCO ODT 3.0 have their own names for install.
7965 +    # Don't use installbsd from OSF since it installs stuff as root
7966 +    # by default.
7967 +    for ac_prog in ginstall scoinst install; do
7968 +      for ac_exec_ext in '' $ac_executable_extensions; do
7969 +        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7970 +          if test $ac_prog = install &&
7971 +            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7972 +            # AIX install.  It has an incompatible calling convention.
7973 +            :
7974 +          elif test $ac_prog = install &&
7975 +            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7976 +            # program-specific install script used by HP pwplus--don't use.
7977 +            :
7978 +          else
7979 +            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7980 +            break 3
7981 +          fi
7982 +        fi
7983 +      done
7984 +    done
7985 +    ;;
7986 +esac
7987 +done
7988 +
7989 +
7990 +fi
7991 +  if test "${ac_cv_path_install+set}" = set; then
7992 +    INSTALL=$ac_cv_path_install
7993 +  else
7994 +    # As a last resort, use the slow shell script.  We don't cache a
7995 +    # path for INSTALL within a source directory, because that will
7996 +    # break other packages using the cache if that directory is
7997 +    # removed, or if the path is relative.
7998 +    INSTALL=$ac_install_sh
7999 +  fi
8000 +fi
8001 +echo "$as_me:$LINENO: result: $INSTALL" >&5
8002 +echo "${ECHO_T}$INSTALL" >&6
8003 +
8004 +# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8005 +# It thinks the first close brace ends the variable substitution.
8006 +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8007 +
8008 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
8009 +
8010 +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8011 +
8012 +echo "$as_me:$LINENO: checking whether build environment is sane" >&5
8013 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
8014 +# Just in case
8015 +sleep 1
8016 +echo timestamp > conftest.file
8017 +# Do `set' in a subshell so we don't clobber the current shell's
8018 +# arguments.  Must try -L first in case configure is actually a
8019 +# symlink; some systems play weird games with the mod time of symlinks
8020 +# (eg FreeBSD returns the mod time of the symlink's containing
8021 +# directory).
8022 +if (
8023 +   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
8024 +   if test "$*" = "X"; then
8025 +      # -L didn't work.
8026 +      set X `ls -t $srcdir/configure conftest.file`
8027 +   fi
8028 +   rm -f conftest.file
8029 +   if test "$*" != "X $srcdir/configure conftest.file" \
8030 +      && test "$*" != "X conftest.file $srcdir/configure"; then
8031 +
8032 +      # If neither matched, then we have a broken ls.  This can happen
8033 +      # if, for instance, CONFIG_SHELL is bash and it inherits a
8034 +      # broken ls alias from the environment.  This has actually
8035 +      # happened.  Such a system could not be considered "sane".
8036 +      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
8037 +alias in your environment" >&5
8038 +echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
8039 +alias in your environment" >&2;}
8040 +   { (exit 1); exit 1; }; }
8041 +   fi
8042 +
8043 +   test "$2" = conftest.file
8044 +   )
8045 +then
8046 +   # Ok.
8047 +   :
8048 +else
8049 +   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
8050 +Check your system clock" >&5
8051 +echo "$as_me: error: newly created file is older than distributed files!
8052 +Check your system clock" >&2;}
8053 +   { (exit 1); exit 1; }; }
8054 +fi
8055 +echo "$as_me:$LINENO: result: yes" >&5
8056 +echo "${ECHO_T}yes" >&6
8057 +test "$program_prefix" != NONE &&
8058 +  program_transform_name="s,^,$program_prefix,;$program_transform_name"
8059 +# Use a double $ so make ignores it.
8060 +test "$program_suffix" != NONE &&
8061 +  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
8062 +# Double any \ or $.  echo might interpret backslashes.
8063 +# By default was `s,x,x', remove it if useless.
8064 +cat <<\_ACEOF >conftest.sed
8065 +s/[\\$]/&&/g;s/;s,x,x,$//
8066 +_ACEOF
8067 +program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
8068 +rm conftest.sed
8069 +
8070 +
8071 +# expand $ac_aux_dir to an absolute path
8072 +am_aux_dir=`cd $ac_aux_dir && pwd`
8073 +
8074 +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
8075 +# Use eval to expand $SHELL
8076 +if eval "$MISSING --run true"; then
8077 +  am_missing_run="$MISSING --run "
8078 +else
8079 +  am_missing_run=
8080 +  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
8081 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
8082 +fi
8083 +
8084 +for ac_prog in gawk mawk nawk awk
8085 +do
8086 +  # Extract the first word of "$ac_prog", so it can be a program name with args.
8087 +set dummy $ac_prog; ac_word=$2
8088 +echo "$as_me:$LINENO: checking for $ac_word" >&5
8089 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8090 +if test "${ac_cv_prog_AWK+set}" = set; then
8091 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8092 +else
8093 +  if test -n "$AWK"; then
8094 +  ac_cv_prog_AWK="$AWK" # Let the user override the test.
8095 +else
8096 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8097 +for as_dir in $PATH
8098 +do
8099 +  IFS=$as_save_IFS
8100 +  test -z "$as_dir" && as_dir=.
8101 +  for ac_exec_ext in '' $ac_executable_extensions; do
8102 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8103 +    ac_cv_prog_AWK="$ac_prog"
8104 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8105 +    break 2
8106 +  fi
8107 +done
8108 +done
8109 +
8110 +fi
8111 +fi
8112 +AWK=$ac_cv_prog_AWK
8113 +if test -n "$AWK"; then
8114 +  echo "$as_me:$LINENO: result: $AWK" >&5
8115 +echo "${ECHO_T}$AWK" >&6
8116 +else
8117 +  echo "$as_me:$LINENO: result: no" >&5
8118 +echo "${ECHO_T}no" >&6
8119 +fi
8120 +
8121 +  test -n "$AWK" && break
8122 +done
8123 +
8124 +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5
8125 +echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
8126 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
8127 +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
8128 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8129 +else
8130 +  cat >conftest.make <<\_ACEOF
8131 +all:
8132 +       @echo 'ac_maketemp="${MAKE}"'
8133 +_ACEOF
8134 +# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8135 +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
8136 +if test -n "$ac_maketemp"; then
8137 +  eval ac_cv_prog_make_${ac_make}_set=yes
8138 +else
8139 +  eval ac_cv_prog_make_${ac_make}_set=no
8140 +fi
8141 +rm -f conftest.make
8142 +fi
8143 +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
8144 +  echo "$as_me:$LINENO: result: yes" >&5
8145 +echo "${ECHO_T}yes" >&6
8146 +  SET_MAKE=
8147 +else
8148 +  echo "$as_me:$LINENO: result: no" >&5
8149 +echo "${ECHO_T}no" >&6
8150 +  SET_MAKE="MAKE=${MAKE-make}"
8151 +fi
8152 +
8153 +
8154 +# Check whether --enable-multilib or --disable-multilib was given.
8155 +if test "${enable_multilib+set}" = set; then
8156 +  enableval="$enable_multilib"
8157 +  case "${enableval}" in
8158 +  yes) multilib=yes ;;
8159 +  no)  multilib=no ;;
8160 +  *)   { { echo "$as_me:$LINENO: error: bad value ${enableval} for multilib option" >&5
8161 +echo "$as_me: error: bad value ${enableval} for multilib option" >&2;}
8162 +   { (exit 1); exit 1; }; } ;;
8163 + esac
8164 +else
8165 +  multilib=yes
8166 +fi; 
8167 +
8168 +if test "${srcdir}" = "."; then
8169 +  if test "${with_target_subdir}" != "." -a -n "${with_target_subdir}"; then
8170 +    gc_basedir="${srcdir}/${with_multisrctop}../."
8171 +  else
8172 +    gc_basedir="${srcdir}/${with_multisrctop}."
8173 +  fi
8174 +else
8175 +  gc_basedir="${srcdir}/."
8176 +fi
8177 +
8178 +ac_aux_dir=
8179 +for ac_dir in $gc_basedir/.. $srcdir/$gc_basedir/..; do
8180 +  if test -f $ac_dir/install-sh; then
8181 +    ac_aux_dir=$ac_dir
8182 +    ac_install_sh="$ac_aux_dir/install-sh -c"
8183 +    break
8184 +  elif test -f $ac_dir/install.sh; then
8185 +    ac_aux_dir=$ac_dir
8186 +    ac_install_sh="$ac_aux_dir/install.sh -c"
8187 +    break
8188 +  elif test -f $ac_dir/shtool; then
8189 +    ac_aux_dir=$ac_dir
8190 +    ac_install_sh="$ac_aux_dir/shtool install -c"
8191 +    break
8192 +  fi
8193 +done
8194 +if test -z "$ac_aux_dir"; then
8195 +  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $gc_basedir/.. $srcdir/$gc_basedir/.." >&5
8196 +echo "$as_me: error: cannot find install-sh or install.sh in $gc_basedir/.. $srcdir/$gc_basedir/.." >&2;}
8197 +   { (exit 1); exit 1; }; }
8198 +fi
8199 +ac_config_guess="$SHELL $ac_aux_dir/config.guess"
8200 +ac_config_sub="$SHELL $ac_aux_dir/config.sub"
8201 +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
8202 +
8203 +if :; then :; else
8204 +  # This overrides the previous occurrence for automake, but not for
8205 +  # autoconf, which is exactly what we want.
8206 +  ac_aux_dir=
8207 +for ac_dir in .. $srcdir/..; do
8208 +  if test -f $ac_dir/install-sh; then
8209 +    ac_aux_dir=$ac_dir
8210 +    ac_install_sh="$ac_aux_dir/install-sh -c"
8211 +    break
8212 +  elif test -f $ac_dir/install.sh; then
8213 +    ac_aux_dir=$ac_dir
8214 +    ac_install_sh="$ac_aux_dir/install.sh -c"
8215 +    break
8216 +  elif test -f $ac_dir/shtool; then
8217 +    ac_aux_dir=$ac_dir
8218 +    ac_install_sh="$ac_aux_dir/shtool install -c"
8219 +    break
8220 +  fi
8221 +done
8222 +if test -z "$ac_aux_dir"; then
8223 +  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in .. $srcdir/.." >&5
8224 +echo "$as_me: error: cannot find install-sh or install.sh in .. $srcdir/.." >&2;}
8225 +   { (exit 1); exit 1; }; }
8226 +fi
8227 +ac_config_guess="$SHELL $ac_aux_dir/config.guess"
8228 +ac_config_sub="$SHELL $ac_aux_dir/config.sub"
8229 +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
8230 +
8231 +fi
8232 +
8233 +echo "$as_me:$LINENO: checking target system type" >&5
8234 +echo $ECHO_N "checking target system type... $ECHO_C" >&6
8235 +if test "${ac_cv_target+set}" = set; then
8236 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8237 +else
8238 +  ac_cv_target_alias=$target_alias
8239 +test "x$ac_cv_target_alias" = "x" &&
8240 +  ac_cv_target_alias=$ac_cv_host_alias
8241 +ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
8242 +  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
8243 +echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
8244 +   { (exit 1); exit 1; }; }
8245 +
8246 +fi
8247 +echo "$as_me:$LINENO: result: $ac_cv_target" >&5
8248 +echo "${ECHO_T}$ac_cv_target" >&6
8249 +target=$ac_cv_target
8250 +target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
8251 +target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
8252 +target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
8253 +
8254 +
8255 +# The aliases save the names the user supplied, while $host etc.
8256 +# will get canonicalized.
8257 +test -n "$target_alias" &&
8258 +  test "$program_prefix$program_suffix$program_transform_name" = \
8259 +    NONENONEs,x,x, &&
8260 +  program_prefix=${target_alias}-
8261 +
8262 +# This works around an automake problem.
8263 +mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs"
8264 +
8265 +
8266 + # test to see if srcdir already configured
8267 +if test "`cd $srcdir && pwd`" != "`pwd`" &&
8268 +   test -f $srcdir/config.status; then
8269 +  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
8270 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
8271 +   { (exit 1); exit 1; }; }
8272 +fi
8273 +
8274 +# Define the identity of the package.
8275 + PACKAGE=gc
8276 + VERSION=6.1a1
8277 +
8278 +
8279 +# Some tools Automake needs.
8280 +
8281 +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
8282 +
8283 +
8284 +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
8285 +
8286 +
8287 +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
8288 +
8289 +
8290 +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
8291 +
8292 +
8293 +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
8294 +
8295 +
8296 +AMTAR=${AMTAR-"${am_missing_run}tar"}
8297 +
8298 +install_sh=${install_sh-"$am_aux_dir/install-sh"}
8299 +
8300 +# Installed binaries are usually stripped using `strip' when the user
8301 +# run `make install-strip'.  However `strip' might not be the right
8302 +# tool to use in cross-compilation environments, therefore Automake
8303 +# will honor the `STRIP' environment variable to overrule this program.
8304 +if test "$cross_compiling" != no; then
8305 +  if test -n "$ac_tool_prefix"; then
8306 +  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8307 +set dummy ${ac_tool_prefix}strip; ac_word=$2
8308 +echo "$as_me:$LINENO: checking for $ac_word" >&5
8309 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8310 +if test "${ac_cv_prog_STRIP+set}" = set; then
8311 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8312 +else
8313 +  if test -n "$STRIP"; then
8314 +  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8315 +else
8316 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8317 +for as_dir in $PATH
8318 +do
8319 +  IFS=$as_save_IFS
8320 +  test -z "$as_dir" && as_dir=.
8321 +  for ac_exec_ext in '' $ac_executable_extensions; do
8322 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8323 +    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8324 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8325 +    break 2
8326 +  fi
8327 +done
8328 +done
8329 +
8330 +fi
8331 +fi
8332 +STRIP=$ac_cv_prog_STRIP
8333 +if test -n "$STRIP"; then
8334 +  echo "$as_me:$LINENO: result: $STRIP" >&5
8335 +echo "${ECHO_T}$STRIP" >&6
8336 +else
8337 +  echo "$as_me:$LINENO: result: no" >&5
8338 +echo "${ECHO_T}no" >&6
8339 +fi
8340 +
8341 +fi
8342 +if test -z "$ac_cv_prog_STRIP"; then
8343 +  ac_ct_STRIP=$STRIP
8344 +  # Extract the first word of "strip", so it can be a program name with args.
8345 +set dummy strip; ac_word=$2
8346 +echo "$as_me:$LINENO: checking for $ac_word" >&5
8347 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8348 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
8349 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8350 +else
8351 +  if test -n "$ac_ct_STRIP"; then
8352 +  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8353 +else
8354 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8355 +for as_dir in $PATH
8356 +do
8357 +  IFS=$as_save_IFS
8358 +  test -z "$as_dir" && as_dir=.
8359 +  for ac_exec_ext in '' $ac_executable_extensions; do
8360 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8361 +    ac_cv_prog_ac_ct_STRIP="strip"
8362 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8363 +    break 2
8364 +  fi
8365 +done
8366 +done
8367 +
8368 +  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
8369 +fi
8370 +fi
8371 +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8372 +if test -n "$ac_ct_STRIP"; then
8373 +  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
8374 +echo "${ECHO_T}$ac_ct_STRIP" >&6
8375 +else
8376 +  echo "$as_me:$LINENO: result: no" >&5
8377 +echo "${ECHO_T}no" >&6
8378 +fi
8379 +
8380 +  STRIP=$ac_ct_STRIP
8381 +else
8382 +  STRIP="$ac_cv_prog_STRIP"
8383 +fi
8384 +
8385 +fi
8386 +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
8387 +
8388 +# We need awk for the "check" target.  The system "awk" is bad on
8389 +# some platforms.
8390 +
8391 +
8392 +
8393 +
8394 +# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD).  If we don't
8395 +# run it explicitly here, it will be run implicitly before
8396 +# NEWLIB_CONFIGURE, which doesn't work because that means that it will
8397 +# be run before AC_CANONICAL_HOST.
8398 +
8399 +
8400 +if test -n "$ac_tool_prefix"; then
8401 +  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
8402 +set dummy ${ac_tool_prefix}as; ac_word=$2
8403 +echo "$as_me:$LINENO: checking for $ac_word" >&5
8404 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8405 +if test "${ac_cv_prog_AS+set}" = set; then
8406 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8407 +else
8408 +  if test -n "$AS"; then
8409 +  ac_cv_prog_AS="$AS" # Let the user override the test.
8410 +else
8411 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8412 +for as_dir in $PATH
8413 +do
8414 +  IFS=$as_save_IFS
8415 +  test -z "$as_dir" && as_dir=.
8416 +  for ac_exec_ext in '' $ac_executable_extensions; do
8417 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8418 +    ac_cv_prog_AS="${ac_tool_prefix}as"
8419 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8420 +    break 2
8421 +  fi
8422 +done
8423 +done
8424 +
8425 +fi
8426 +fi
8427 +AS=$ac_cv_prog_AS
8428 +if test -n "$AS"; then
8429 +  echo "$as_me:$LINENO: result: $AS" >&5
8430 +echo "${ECHO_T}$AS" >&6
8431 +else
8432 +  echo "$as_me:$LINENO: result: no" >&5
8433 +echo "${ECHO_T}no" >&6
8434 +fi
8435 +
8436 +fi
8437 +if test -z "$ac_cv_prog_AS"; then
8438 +  ac_ct_AS=$AS
8439 +  # Extract the first word of "as", so it can be a program name with args.
8440 +set dummy as; ac_word=$2
8441 +echo "$as_me:$LINENO: checking for $ac_word" >&5
8442 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8443 +if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
8444 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8445 +else
8446 +  if test -n "$ac_ct_AS"; then
8447 +  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
8448 +else
8449 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8450 +for as_dir in $PATH
8451 +do
8452 +  IFS=$as_save_IFS
8453 +  test -z "$as_dir" && as_dir=.
8454 +  for ac_exec_ext in '' $ac_executable_extensions; do
8455 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8456 +    ac_cv_prog_ac_ct_AS="as"
8457 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8458 +    break 2
8459 +  fi
8460 +done
8461 +done
8462 +
8463 +fi
8464 +fi
8465 +ac_ct_AS=$ac_cv_prog_ac_ct_AS
8466 +if test -n "$ac_ct_AS"; then
8467 +  echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
8468 +echo "${ECHO_T}$ac_ct_AS" >&6
8469 +else
8470 +  echo "$as_me:$LINENO: result: no" >&5
8471 +echo "${ECHO_T}no" >&6
8472 +fi
8473 +
8474 +  AS=$ac_ct_AS
8475 +else
8476 +  AS="$ac_cv_prog_AS"
8477 +fi
8478 +
8479 +if test -n "$ac_tool_prefix"; then
8480 +  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8481 +set dummy ${ac_tool_prefix}ar; ac_word=$2
8482 +echo "$as_me:$LINENO: checking for $ac_word" >&5
8483 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8484 +if test "${ac_cv_prog_AR+set}" = set; then
8485 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8486 +else
8487 +  if test -n "$AR"; then
8488 +  ac_cv_prog_AR="$AR" # Let the user override the test.
8489 +else
8490 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8491 +for as_dir in $PATH
8492 +do
8493 +  IFS=$as_save_IFS
8494 +  test -z "$as_dir" && as_dir=.
8495 +  for ac_exec_ext in '' $ac_executable_extensions; do
8496 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8497 +    ac_cv_prog_AR="${ac_tool_prefix}ar"
8498 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8499 +    break 2
8500 +  fi
8501 +done
8502 +done
8503 +
8504 +fi
8505 +fi
8506 +AR=$ac_cv_prog_AR
8507 +if test -n "$AR"; then
8508 +  echo "$as_me:$LINENO: result: $AR" >&5
8509 +echo "${ECHO_T}$AR" >&6
8510 +else
8511 +  echo "$as_me:$LINENO: result: no" >&5
8512 +echo "${ECHO_T}no" >&6
8513 +fi
8514 +
8515 +fi
8516 +if test -z "$ac_cv_prog_AR"; then
8517 +  ac_ct_AR=$AR
8518 +  # Extract the first word of "ar", so it can be a program name with args.
8519 +set dummy ar; ac_word=$2
8520 +echo "$as_me:$LINENO: checking for $ac_word" >&5
8521 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8522 +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
8523 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8524 +else
8525 +  if test -n "$ac_ct_AR"; then
8526 +  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8527 +else
8528 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8529 +for as_dir in $PATH
8530 +do
8531 +  IFS=$as_save_IFS
8532 +  test -z "$as_dir" && as_dir=.
8533 +  for ac_exec_ext in '' $ac_executable_extensions; do
8534 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8535 +    ac_cv_prog_ac_ct_AR="ar"
8536 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8537 +    break 2
8538 +  fi
8539 +done
8540 +done
8541 +
8542 +fi
8543 +fi
8544 +ac_ct_AR=$ac_cv_prog_ac_ct_AR
8545 +if test -n "$ac_ct_AR"; then
8546 +  echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
8547 +echo "${ECHO_T}$ac_ct_AR" >&6
8548 +else
8549 +  echo "$as_me:$LINENO: result: no" >&5
8550 +echo "${ECHO_T}no" >&6
8551 +fi
8552 +
8553 +  AR=$ac_ct_AR
8554 +else
8555 +  AR="$ac_cv_prog_AR"
8556 +fi
8557 +
8558 +if test -n "$ac_tool_prefix"; then
8559 +  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8560 +set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8561 +echo "$as_me:$LINENO: checking for $ac_word" >&5
8562 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8563 +if test "${ac_cv_prog_RANLIB+set}" = set; then
8564 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8565 +else
8566 +  if test -n "$RANLIB"; then
8567 +  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8568 +else
8569 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8570 +for as_dir in $PATH
8571 +do
8572 +  IFS=$as_save_IFS
8573 +  test -z "$as_dir" && as_dir=.
8574 +  for ac_exec_ext in '' $ac_executable_extensions; do
8575 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8576 +    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8577 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8578 +    break 2
8579 +  fi
8580 +done
8581 +done
8582 +
8583 +fi
8584 +fi
8585 +RANLIB=$ac_cv_prog_RANLIB
8586 +if test -n "$RANLIB"; then
8587 +  echo "$as_me:$LINENO: result: $RANLIB" >&5
8588 +echo "${ECHO_T}$RANLIB" >&6
8589 +else
8590 +  echo "$as_me:$LINENO: result: no" >&5
8591 +echo "${ECHO_T}no" >&6
8592 +fi
8593 +
8594 +fi
8595 +if test -z "$ac_cv_prog_RANLIB"; then
8596 +  ac_ct_RANLIB=$RANLIB
8597 +  # Extract the first word of "ranlib", so it can be a program name with args.
8598 +set dummy ranlib; ac_word=$2
8599 +echo "$as_me:$LINENO: checking for $ac_word" >&5
8600 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8601 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8602 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8603 +else
8604 +  if test -n "$ac_ct_RANLIB"; then
8605 +  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8606 +else
8607 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8608 +for as_dir in $PATH
8609 +do
8610 +  IFS=$as_save_IFS
8611 +  test -z "$as_dir" && as_dir=.
8612 +  for ac_exec_ext in '' $ac_executable_extensions; do
8613 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8614 +    ac_cv_prog_ac_ct_RANLIB="ranlib"
8615 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8616 +    break 2
8617 +  fi
8618 +done
8619 +done
8620 +
8621 +  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
8622 +fi
8623 +fi
8624 +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8625 +if test -n "$ac_ct_RANLIB"; then
8626 +  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8627 +echo "${ECHO_T}$ac_ct_RANLIB" >&6
8628 +else
8629 +  echo "$as_me:$LINENO: result: no" >&5
8630 +echo "${ECHO_T}no" >&6
8631 +fi
8632 +
8633 +  RANLIB=$ac_ct_RANLIB
8634 +else
8635 +  RANLIB="$ac_cv_prog_RANLIB"
8636 +fi
8637 +
8638 +
8639 +# Find a good install program.  We prefer a C program (faster),
8640 +# so one script is as good as another.  But avoid the broken or
8641 +# incompatible versions:
8642 +# SysV /etc/install, /usr/sbin/install
8643 +# SunOS /usr/etc/install
8644 +# IRIX /sbin/install
8645 +# AIX /bin/install
8646 +# AmigaOS /C/install, which installs bootblocks on floppy discs
8647 +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8648 +# AFS /usr/afsws/bin/install, which mishandles nonexistent args
8649 +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8650 +# ./install, which can be erroneously created by make from ./install.sh.
8651 +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
8652 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
8653 +if test -z "$INSTALL"; then
8654 +if test "${ac_cv_path_install+set}" = set; then
8655 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8656 +else
8657 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8658 +for as_dir in $PATH
8659 +do
8660 +  IFS=$as_save_IFS
8661 +  test -z "$as_dir" && as_dir=.
8662 +  # Account for people who put trailing slashes in PATH elements.
8663 +case $as_dir/ in
8664 +  ./ | .// | /cC/* | \
8665 +  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
8666 +  /usr/ucb/* ) ;;
8667 +  *)
8668 +    # OSF1 and SCO ODT 3.0 have their own names for install.
8669 +    # Don't use installbsd from OSF since it installs stuff as root
8670 +    # by default.
8671 +    for ac_prog in ginstall scoinst install; do
8672 +      for ac_exec_ext in '' $ac_executable_extensions; do
8673 +        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
8674 +          if test $ac_prog = install &&
8675 +            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8676 +            # AIX install.  It has an incompatible calling convention.
8677 +            :
8678 +          elif test $ac_prog = install &&
8679 +            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8680 +            # program-specific install script used by HP pwplus--don't use.
8681 +            :
8682 +          else
8683 +            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
8684 +            break 3
8685 +          fi
8686 +        fi
8687 +      done
8688 +    done
8689 +    ;;
8690 +esac
8691 +done
8692 +
8693 +
8694 +fi
8695 +  if test "${ac_cv_path_install+set}" = set; then
8696 +    INSTALL=$ac_cv_path_install
8697 +  else
8698 +    # As a last resort, use the slow shell script.  We don't cache a
8699 +    # path for INSTALL within a source directory, because that will
8700 +    # break other packages using the cache if that directory is
8701 +    # removed, or if the path is relative.
8702 +    INSTALL=$ac_install_sh
8703 +  fi
8704 +fi
8705 +echo "$as_me:$LINENO: result: $INSTALL" >&5
8706 +echo "${ECHO_T}$INSTALL" >&6
8707 +
8708 +# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8709 +# It thinks the first close brace ends the variable substitution.
8710 +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8711 +
8712 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
8713 +
8714 +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8715 +
8716 +
8717 +echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
8718 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
8719 +    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
8720 +if test "${enable_maintainer_mode+set}" = set; then
8721 +  enableval="$enable_maintainer_mode"
8722 +  USE_MAINTAINER_MODE=$enableval
8723 +else
8724 +  USE_MAINTAINER_MODE=no
8725 +fi; 
8726 +  echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
8727 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
8728 +  
8729 +
8730 +if test $USE_MAINTAINER_MODE = yes; then
8731 +  MAINTAINER_MODE_TRUE=
8732 +  MAINTAINER_MODE_FALSE='#'
8733 +else
8734 +  MAINTAINER_MODE_TRUE='#'
8735 +  MAINTAINER_MODE_FALSE=
8736 +fi
8737 +
8738 +  MAINT=$MAINTAINER_MODE_TRUE
8739 +  
8740 +
8741 +
8742 +# We need AC_EXEEXT to keep automake happy in cygnus mode.  However,
8743 +# at least currently, we never actually build a program, so we never
8744 +# need to use $(EXEEXT).  Moreover, the test for EXEEXT normally
8745 +# fails, because we are probably configuring with a cross compiler
8746 +# which can't create executables.  So we include AC_EXEEXT to keep
8747 +# automake happy, but we don't execute it, since we don't care about
8748 +# the result.
8749 +if false; then
8750 +  # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
8751 +  # to nothing, so nothing would remain between `then' and `fi' if it
8752 +  # were not for the `:' below.
8753 +  :
8754 +  
8755 +fi
8756 +
8757 +. ${srcdir}/configure.host
8758 +
8759 +case ${gc_basedir} in
8760 +/* | A-Za-z:/\\*) gc_flagbasedir=${gc_basedir} ;;
8761 +*) gc_flagbasedir='$(top_builddir)/'${gc_basedir} ;;
8762 +esac
8763 +
8764 +gc_cflags="${gc_cflags} -I"'$(top_builddir)'"/./targ-include -I${gc_flagbasedir}/libc/include"
8765 +case "${host}" in
8766 +  *-*-cygwin32*)
8767 +    gc_cflags="${gc_cflags} -I${gc_flagbasedir}/../winsup/include"
8768 +    ;;
8769 +esac
8770 +
8771 +
8772 +GC_CFLAGS=${gc_cflags}
8773 +
8774 +
8775 +
8776 +# Check whether --enable-shared or --disable-shared was given.
8777 +if test "${enable_shared+set}" = set; then
8778 +  enableval="$enable_shared"
8779 +  p=${PACKAGE-default}
8780 +case $enableval in
8781 +yes) enable_shared=yes ;;
8782 +no) enable_shared=no ;;
8783 +*)
8784 +  enable_shared=no
8785 +  # Look at the argument we got.  We use all the common list separators.
8786 +  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
8787 +  for pkg in $enableval; do
8788 +    if test "X$pkg" = "X$p"; then
8789 +      enable_shared=yes
8790 +    fi
8791 +  done
8792 +  IFS="$ac_save_ifs"
8793 +  ;;
8794 +esac
8795 +else
8796 +  enable_shared=yes
8797 +fi; 
8798 +# Check whether --enable-static or --disable-static was given.
8799 +if test "${enable_static+set}" = set; then
8800 +  enableval="$enable_static"
8801 +  p=${PACKAGE-default}
8802 +case $enableval in
8803 +yes) enable_static=yes ;;
8804 +no) enable_static=no ;;
8805 +*)
8806 +  enable_static=no
8807 +  # Look at the argument we got.  We use all the common list separators.
8808 +  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
8809 +  for pkg in $enableval; do
8810 +    if test "X$pkg" = "X$p"; then
8811 +      enable_static=yes
8812 +    fi
8813 +  done
8814 +  IFS="$ac_save_ifs"
8815 +  ;;
8816 +esac
8817 +else
8818 +  enable_static=yes
8819 +fi; 
8820 +# Check whether --enable-fast-install or --disable-fast-install was given.
8821 +if test "${enable_fast_install+set}" = set; then
8822 +  enableval="$enable_fast_install"
8823 +  p=${PACKAGE-default}
8824 +case $enableval in
8825 +yes) enable_fast_install=yes ;;
8826 +no) enable_fast_install=no ;;
8827 +*)
8828 +  enable_fast_install=no
8829 +  # Look at the argument we got.  We use all the common list separators.
8830 +  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
8831 +  for pkg in $enableval; do
8832 +    if test "X$pkg" = "X$p"; then
8833 +      enable_fast_install=yes
8834 +    fi
8835 +  done
8836 +  IFS="$ac_save_ifs"
8837 +  ;;
8838 +esac
8839 +else
8840 +  enable_fast_install=yes
8841 +fi; 
8842 +rm -f .deps 2>/dev/null
8843 +mkdir .deps 2>/dev/null
8844 +if test -d .deps; then
8845 +  DEPDIR=.deps
8846 +else
8847 +  # MS-DOS does not allow filenames that begin with a dot.
8848 +  DEPDIR=_deps
8849 +fi
8850 +rmdir .deps 2>/dev/null
8851 +
8852 +
8853 +          ac_config_commands="$ac_config_commands depfiles"
8854 +
8855 +
8856 +am_make=${MAKE-make}
8857 +cat > confinc << 'END'
8858 +doit:
8859 +       @echo done
8860 +END
8861 +# If we don't find an include directive, just comment out the code.
8862 +echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
8863 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
8864 +am__include="#"
8865 +am__quote=
8866 +_am_result=none
8867 +# First try GNU make style include.
8868 +echo "include confinc" > confmf
8869 +# We grep out `Entering directory' and `Leaving directory'
8870 +# messages which can occur if `w' ends up in MAKEFLAGS.
8871 +# In particular we don't look at `^make:' because GNU make might
8872 +# be invoked under some other name (usually "gmake"), in which
8873 +# case it prints its new name instead of `make'.
8874 +if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
8875 +   am__include=include
8876 +   am__quote=
8877 +   _am_result=GNU
8878 +fi
8879 +# Now try BSD make style include.
8880 +if test "$am__include" = "#"; then
8881 +   echo '.include "confinc"' > confmf
8882 +   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
8883 +      am__include=.include
8884 +      am__quote="\""
8885 +      _am_result=BSD
8886 +   fi
8887 +fi
8888 +
8889 +
8890 +echo "$as_me:$LINENO: result: $_am_result" >&5
8891 +echo "${ECHO_T}$_am_result" >&6
8892 +rm -f confinc confmf
8893 +
8894 +# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
8895 +if test "${enable_dependency_tracking+set}" = set; then
8896 +  enableval="$enable_dependency_tracking"
8897 +  
8898 +fi; 
8899 +if test "x$enable_dependency_tracking" != xno; then
8900 +  am_depcomp="$ac_aux_dir/depcomp"
8901 +  AMDEPBACKSLASH='\'
8902 +fi
8903 +
8904 +
8905 +if test "x$enable_dependency_tracking" != xno; then
8906 +  AMDEP_TRUE=
8907 +  AMDEP_FALSE='#'
8908 +else
8909 +  AMDEP_TRUE='#'
8910 +  AMDEP_FALSE=
8911 +fi
8912 +
8913 +
8914 +
8915 +ac_ext=c
8916 +ac_cpp='$CPP $CPPFLAGS'
8917 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8918 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8919 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
8920 +if test -n "$ac_tool_prefix"; then
8921 +  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
8922 +set dummy ${ac_tool_prefix}gcc; ac_word=$2
8923 +echo "$as_me:$LINENO: checking for $ac_word" >&5
8924 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8925 +if test "${ac_cv_prog_CC+set}" = set; then
8926 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8927 +else
8928 +  if test -n "$CC"; then
8929 +  ac_cv_prog_CC="$CC" # Let the user override the test.
8930 +else
8931 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8932 +for as_dir in $PATH
8933 +do
8934 +  IFS=$as_save_IFS
8935 +  test -z "$as_dir" && as_dir=.
8936 +  for ac_exec_ext in '' $ac_executable_extensions; do
8937 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8938 +    ac_cv_prog_CC="${ac_tool_prefix}gcc"
8939 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8940 +    break 2
8941 +  fi
8942 +done
8943 +done
8944 +
8945 +fi
8946 +fi
8947 +CC=$ac_cv_prog_CC
8948 +if test -n "$CC"; then
8949 +  echo "$as_me:$LINENO: result: $CC" >&5
8950 +echo "${ECHO_T}$CC" >&6
8951 +else
8952 +  echo "$as_me:$LINENO: result: no" >&5
8953 +echo "${ECHO_T}no" >&6
8954 +fi
8955 +
8956 +fi
8957 +if test -z "$ac_cv_prog_CC"; then
8958 +  ac_ct_CC=$CC
8959 +  # Extract the first word of "gcc", so it can be a program name with args.
8960 +set dummy gcc; ac_word=$2
8961 +echo "$as_me:$LINENO: checking for $ac_word" >&5
8962 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8963 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
8964 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8965 +else
8966 +  if test -n "$ac_ct_CC"; then
8967 +  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
8968 +else
8969 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8970 +for as_dir in $PATH
8971 +do
8972 +  IFS=$as_save_IFS
8973 +  test -z "$as_dir" && as_dir=.
8974 +  for ac_exec_ext in '' $ac_executable_extensions; do
8975 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8976 +    ac_cv_prog_ac_ct_CC="gcc"
8977 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8978 +    break 2
8979 +  fi
8980 +done
8981 +done
8982 +
8983 +fi
8984 +fi
8985 +ac_ct_CC=$ac_cv_prog_ac_ct_CC
8986 +if test -n "$ac_ct_CC"; then
8987 +  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
8988 +echo "${ECHO_T}$ac_ct_CC" >&6
8989 +else
8990 +  echo "$as_me:$LINENO: result: no" >&5
8991 +echo "${ECHO_T}no" >&6
8992 +fi
8993 +
8994 +  CC=$ac_ct_CC
8995 +else
8996 +  CC="$ac_cv_prog_CC"
8997 +fi
8998 +
8999 +if test -z "$CC"; then
9000 +  if test -n "$ac_tool_prefix"; then
9001 +  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
9002 +set dummy ${ac_tool_prefix}cc; ac_word=$2
9003 +echo "$as_me:$LINENO: checking for $ac_word" >&5
9004 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9005 +if test "${ac_cv_prog_CC+set}" = set; then
9006 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9007 +else
9008 +  if test -n "$CC"; then
9009 +  ac_cv_prog_CC="$CC" # Let the user override the test.
9010 +else
9011 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9012 +for as_dir in $PATH
9013 +do
9014 +  IFS=$as_save_IFS
9015 +  test -z "$as_dir" && as_dir=.
9016 +  for ac_exec_ext in '' $ac_executable_extensions; do
9017 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9018 +    ac_cv_prog_CC="${ac_tool_prefix}cc"
9019 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9020 +    break 2
9021 +  fi
9022 +done
9023 +done
9024 +
9025 +fi
9026 +fi
9027 +CC=$ac_cv_prog_CC
9028 +if test -n "$CC"; then
9029 +  echo "$as_me:$LINENO: result: $CC" >&5
9030 +echo "${ECHO_T}$CC" >&6
9031 +else
9032 +  echo "$as_me:$LINENO: result: no" >&5
9033 +echo "${ECHO_T}no" >&6
9034 +fi
9035 +
9036 +fi
9037 +if test -z "$ac_cv_prog_CC"; then
9038 +  ac_ct_CC=$CC
9039 +  # Extract the first word of "cc", so it can be a program name with args.
9040 +set dummy cc; ac_word=$2
9041 +echo "$as_me:$LINENO: checking for $ac_word" >&5
9042 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9043 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
9044 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9045 +else
9046 +  if test -n "$ac_ct_CC"; then
9047 +  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
9048 +else
9049 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9050 +for as_dir in $PATH
9051 +do
9052 +  IFS=$as_save_IFS
9053 +  test -z "$as_dir" && as_dir=.
9054 +  for ac_exec_ext in '' $ac_executable_extensions; do
9055 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9056 +    ac_cv_prog_ac_ct_CC="cc"
9057 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9058 +    break 2
9059 +  fi
9060 +done
9061 +done
9062 +
9063 +fi
9064 +fi
9065 +ac_ct_CC=$ac_cv_prog_ac_ct_CC
9066 +if test -n "$ac_ct_CC"; then
9067 +  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
9068 +echo "${ECHO_T}$ac_ct_CC" >&6
9069 +else
9070 +  echo "$as_me:$LINENO: result: no" >&5
9071 +echo "${ECHO_T}no" >&6
9072 +fi
9073 +
9074 +  CC=$ac_ct_CC
9075 +else
9076 +  CC="$ac_cv_prog_CC"
9077 +fi
9078 +
9079 +fi
9080 +if test -z "$CC"; then
9081 +  # Extract the first word of "cc", so it can be a program name with args.
9082 +set dummy cc; ac_word=$2
9083 +echo "$as_me:$LINENO: checking for $ac_word" >&5
9084 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9085 +if test "${ac_cv_prog_CC+set}" = set; then
9086 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9087 +else
9088 +  if test -n "$CC"; then
9089 +  ac_cv_prog_CC="$CC" # Let the user override the test.
9090 +else
9091 +  ac_prog_rejected=no
9092 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9093 +for as_dir in $PATH
9094 +do
9095 +  IFS=$as_save_IFS
9096 +  test -z "$as_dir" && as_dir=.
9097 +  for ac_exec_ext in '' $ac_executable_extensions; do
9098 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9099 +    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
9100 +       ac_prog_rejected=yes
9101 +       continue
9102 +     fi
9103 +    ac_cv_prog_CC="cc"
9104 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9105 +    break 2
9106 +  fi
9107 +done
9108 +done
9109 +
9110 +if test $ac_prog_rejected = yes; then
9111 +  # We found a bogon in the path, so make sure we never use it.
9112 +  set dummy $ac_cv_prog_CC
9113 +  shift
9114 +  if test $@%:@ != 0; then
9115 +    # We chose a different compiler from the bogus one.
9116 +    # However, it has the same basename, so the bogon will be chosen
9117 +    # first if we set CC to just the basename; use the full file name.
9118 +    shift
9119 +    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
9120 +  fi
9121 +fi
9122 +fi
9123 +fi
9124 +CC=$ac_cv_prog_CC
9125 +if test -n "$CC"; then
9126 +  echo "$as_me:$LINENO: result: $CC" >&5
9127 +echo "${ECHO_T}$CC" >&6
9128 +else
9129 +  echo "$as_me:$LINENO: result: no" >&5
9130 +echo "${ECHO_T}no" >&6
9131 +fi
9132 +
9133 +fi
9134 +if test -z "$CC"; then
9135 +  if test -n "$ac_tool_prefix"; then
9136 +  for ac_prog in cl
9137 +  do
9138 +    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9139 +set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9140 +echo "$as_me:$LINENO: checking for $ac_word" >&5
9141 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9142 +if test "${ac_cv_prog_CC+set}" = set; then
9143 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9144 +else
9145 +  if test -n "$CC"; then
9146 +  ac_cv_prog_CC="$CC" # Let the user override the test.
9147 +else
9148 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9149 +for as_dir in $PATH
9150 +do
9151 +  IFS=$as_save_IFS
9152 +  test -z "$as_dir" && as_dir=.
9153 +  for ac_exec_ext in '' $ac_executable_extensions; do
9154 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9155 +    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
9156 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9157 +    break 2
9158 +  fi
9159 +done
9160 +done
9161 +
9162 +fi
9163 +fi
9164 +CC=$ac_cv_prog_CC
9165 +if test -n "$CC"; then
9166 +  echo "$as_me:$LINENO: result: $CC" >&5
9167 +echo "${ECHO_T}$CC" >&6
9168 +else
9169 +  echo "$as_me:$LINENO: result: no" >&5
9170 +echo "${ECHO_T}no" >&6
9171 +fi
9172 +
9173 +    test -n "$CC" && break
9174 +  done
9175 +fi
9176 +if test -z "$CC"; then
9177 +  ac_ct_CC=$CC
9178 +  for ac_prog in cl
9179 +do
9180 +  # Extract the first word of "$ac_prog", so it can be a program name with args.
9181 +set dummy $ac_prog; ac_word=$2
9182 +echo "$as_me:$LINENO: checking for $ac_word" >&5
9183 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9184 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
9185 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9186 +else
9187 +  if test -n "$ac_ct_CC"; then
9188 +  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
9189 +else
9190 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9191 +for as_dir in $PATH
9192 +do
9193 +  IFS=$as_save_IFS
9194 +  test -z "$as_dir" && as_dir=.
9195 +  for ac_exec_ext in '' $ac_executable_extensions; do
9196 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9197 +    ac_cv_prog_ac_ct_CC="$ac_prog"
9198 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9199 +    break 2
9200 +  fi
9201 +done
9202 +done
9203 +
9204 +fi
9205 +fi
9206 +ac_ct_CC=$ac_cv_prog_ac_ct_CC
9207 +if test -n "$ac_ct_CC"; then
9208 +  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
9209 +echo "${ECHO_T}$ac_ct_CC" >&6
9210 +else
9211 +  echo "$as_me:$LINENO: result: no" >&5
9212 +echo "${ECHO_T}no" >&6
9213 +fi
9214 +
9215 +  test -n "$ac_ct_CC" && break
9216 +done
9217 +
9218 +  CC=$ac_ct_CC
9219 +fi
9220 +
9221 +fi
9222 +
9223 +
9224 +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
9225 +echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
9226 +   { (exit 1); exit 1; }; }
9227 +
9228 +# Provide some information about the compiler.
9229 +echo "$as_me:$LINENO:" \
9230 +     "checking for C compiler version" >&5
9231 +ac_compiler=`set X $ac_compile; echo $2`
9232 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
9233 +  (eval $ac_compiler --version </dev/null >&5) 2>&5
9234 +  ac_status=$?
9235 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9236 +  (exit $ac_status); }
9237 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
9238 +  (eval $ac_compiler -v </dev/null >&5) 2>&5
9239 +  ac_status=$?
9240 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9241 +  (exit $ac_status); }
9242 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
9243 +  (eval $ac_compiler -V </dev/null >&5) 2>&5
9244 +  ac_status=$?
9245 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9246 +  (exit $ac_status); }
9247 +
9248 +cat >conftest.$ac_ext <<_ACEOF
9249 +#line $LINENO "configure"
9250 +#include "confdefs.h"
9251 +
9252 +int
9253 +main ()
9254 +{
9255 +
9256 +  ;
9257 +  return 0;
9258 +}
9259 +_ACEOF
9260 +ac_clean_files_save=$ac_clean_files
9261 +ac_clean_files="$ac_clean_files a.out a.exe"
9262 +# Try to create an executable without -o first, disregard a.out.
9263 +# It will help us diagnose broken compilers, and finding out an intuition
9264 +# of exeext.
9265 +echo "$as_me:$LINENO: checking for C compiler default output" >&5
9266 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
9267 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
9268 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
9269 +  (eval $ac_link_default) 2>&5
9270 +  ac_status=$?
9271 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9272 +  (exit $ac_status); }; then
9273 +  # Find the output, starting from the most likely.  This scheme is
9274 +# not robust to junk in `.', hence go to wildcards (a.*) only as a last
9275 +# resort.
9276 +
9277 +# Be careful to initialize this variable, since it used to be cached.
9278 +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
9279 +ac_cv_exeext=
9280 +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.*; do
9281 +  test -f "$ac_file" || continue
9282 +  case $ac_file in
9283 +    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
9284 +    a.out ) # We found the default executable, but exeext='' is most
9285 +            # certainly right.
9286 +            break;;
9287 +    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
9288 +          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
9289 +          export ac_cv_exeext
9290 +          break;;
9291 +    * ) break;;
9292 +  esac
9293 +done
9294 +else
9295 +  echo "$as_me: failed program was:" >&5
9296 +cat conftest.$ac_ext >&5
9297 +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
9298 +check \`config.log' for details." >&5
9299 +echo "$as_me: error: C compiler cannot create executables
9300 +check \`config.log' for details." >&2;}
9301 +   { (exit 77); exit 77; }; }
9302 +fi
9303 +
9304 +ac_exeext=$ac_cv_exeext
9305 +echo "$as_me:$LINENO: result: $ac_file" >&5
9306 +echo "${ECHO_T}$ac_file" >&6
9307 +
9308 +# Check the compiler produces executables we can run.  If not, either
9309 +# the compiler is broken, or we cross compile.
9310 +echo "$as_me:$LINENO: checking whether the C compiler works" >&5
9311 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
9312 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
9313 +# If not cross compiling, check that we can run a simple program.
9314 +if test "$cross_compiling" != yes; then
9315 +  if { ac_try='./$ac_file'
9316 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9317 +  (eval $ac_try) 2>&5
9318 +  ac_status=$?
9319 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9320 +  (exit $ac_status); }; }; then
9321 +    cross_compiling=no
9322 +  else
9323 +    if test "$cross_compiling" = maybe; then
9324 +       cross_compiling=yes
9325 +    else
9326 +       { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
9327 +If you meant to cross compile, use \`--host'." >&5
9328 +echo "$as_me: error: cannot run C compiled programs.
9329 +If you meant to cross compile, use \`--host'." >&2;}
9330 +   { (exit 1); exit 1; }; }
9331 +    fi
9332 +  fi
9333 +fi
9334 +echo "$as_me:$LINENO: result: yes" >&5
9335 +echo "${ECHO_T}yes" >&6
9336 +
9337 +rm -f a.out a.exe conftest$ac_cv_exeext
9338 +ac_clean_files=$ac_clean_files_save
9339 +# Check the compiler produces executables we can run.  If not, either
9340 +# the compiler is broken, or we cross compile.
9341 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
9342 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
9343 +echo "$as_me:$LINENO: result: $cross_compiling" >&5
9344 +echo "${ECHO_T}$cross_compiling" >&6
9345 +
9346 +echo "$as_me:$LINENO: checking for suffix of executables" >&5
9347 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
9348 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9349 +  (eval $ac_link) 2>&5
9350 +  ac_status=$?
9351 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9352 +  (exit $ac_status); }; then
9353 +  # If both `conftest.exe' and `conftest' are `present' (well, observable)
9354 +# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
9355 +# work properly (i.e., refer to `conftest.exe'), while it won't with
9356 +# `rm'.
9357 +for ac_file in conftest.exe conftest conftest.*; do
9358 +  test -f "$ac_file" || continue
9359 +  case $ac_file in
9360 +    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
9361 +    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
9362 +          export ac_cv_exeext
9363 +          break;;
9364 +    * ) break;;
9365 +  esac
9366 +done
9367 +else
9368 +  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
9369 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
9370 +   { (exit 1); exit 1; }; }
9371 +fi
9372 +
9373 +rm -f conftest$ac_cv_exeext
9374 +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
9375 +echo "${ECHO_T}$ac_cv_exeext" >&6
9376 +
9377 +rm -f conftest.$ac_ext
9378 +EXEEXT=$ac_cv_exeext
9379 +ac_exeext=$EXEEXT
9380 +echo "$as_me:$LINENO: checking for suffix of object files" >&5
9381 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
9382 +if test "${ac_cv_objext+set}" = set; then
9383 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9384 +else
9385 +  cat >conftest.$ac_ext <<_ACEOF
9386 +#line $LINENO "configure"
9387 +#include "confdefs.h"
9388 +
9389 +int
9390 +main ()
9391 +{
9392 +
9393 +  ;
9394 +  return 0;
9395 +}
9396 +_ACEOF
9397 +rm -f conftest.o conftest.obj
9398 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9399 +  (eval $ac_compile) 2>&5
9400 +  ac_status=$?
9401 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9402 +  (exit $ac_status); }; then
9403 +  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
9404 +  case $ac_file in
9405 +    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
9406 +    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
9407 +       break;;
9408 +  esac
9409 +done
9410 +else
9411 +  echo "$as_me: failed program was:" >&5
9412 +cat conftest.$ac_ext >&5
9413 +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
9414 +echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
9415 +   { (exit 1); exit 1; }; }
9416 +fi
9417 +
9418 +rm -f conftest.$ac_cv_objext conftest.$ac_ext
9419 +fi
9420 +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
9421 +echo "${ECHO_T}$ac_cv_objext" >&6
9422 +OBJEXT=$ac_cv_objext
9423 +ac_objext=$OBJEXT
9424 +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
9425 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
9426 +if test "${ac_cv_c_compiler_gnu+set}" = set; then
9427 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9428 +else
9429 +  cat >conftest.$ac_ext <<_ACEOF
9430 +#line $LINENO "configure"
9431 +#include "confdefs.h"
9432 +
9433 +int
9434 +main ()
9435 +{
9436 +#ifndef __GNUC__
9437 +       choke me
9438 +#endif
9439 +
9440 +  ;
9441 +  return 0;
9442 +}
9443 +_ACEOF
9444 +rm -f conftest.$ac_objext
9445 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9446 +  (eval $ac_compile) 2>&5
9447 +  ac_status=$?
9448 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9449 +  (exit $ac_status); } &&
9450 +         { ac_try='test -s conftest.$ac_objext'
9451 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9452 +  (eval $ac_try) 2>&5
9453 +  ac_status=$?
9454 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9455 +  (exit $ac_status); }; }; then
9456 +  ac_compiler_gnu=yes
9457 +else
9458 +  echo "$as_me: failed program was:" >&5
9459 +cat conftest.$ac_ext >&5
9460 +ac_compiler_gnu=no
9461 +fi
9462 +rm -f conftest.$ac_objext conftest.$ac_ext
9463 +ac_cv_c_compiler_gnu=$ac_compiler_gnu
9464 +
9465 +fi
9466 +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
9467 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
9468 +GCC=`test $ac_compiler_gnu = yes && echo yes`
9469 +ac_test_CFLAGS=${CFLAGS+set}
9470 +ac_save_CFLAGS=$CFLAGS
9471 +CFLAGS="-g"
9472 +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
9473 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
9474 +if test "${ac_cv_prog_cc_g+set}" = set; then
9475 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9476 +else
9477 +  cat >conftest.$ac_ext <<_ACEOF
9478 +#line $LINENO "configure"
9479 +#include "confdefs.h"
9480 +
9481 +int
9482 +main ()
9483 +{
9484 +
9485 +  ;
9486 +  return 0;
9487 +}
9488 +_ACEOF
9489 +rm -f conftest.$ac_objext
9490 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9491 +  (eval $ac_compile) 2>&5
9492 +  ac_status=$?
9493 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9494 +  (exit $ac_status); } &&
9495 +         { ac_try='test -s conftest.$ac_objext'
9496 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9497 +  (eval $ac_try) 2>&5
9498 +  ac_status=$?
9499 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9500 +  (exit $ac_status); }; }; then
9501 +  ac_cv_prog_cc_g=yes
9502 +else
9503 +  echo "$as_me: failed program was:" >&5
9504 +cat conftest.$ac_ext >&5
9505 +ac_cv_prog_cc_g=no
9506 +fi
9507 +rm -f conftest.$ac_objext conftest.$ac_ext
9508 +fi
9509 +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
9510 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
9511 +if test "$ac_test_CFLAGS" = set; then
9512 +  CFLAGS=$ac_save_CFLAGS
9513 +elif test $ac_cv_prog_cc_g = yes; then
9514 +  if test "$GCC" = yes; then
9515 +    CFLAGS="-g -O2"
9516 +  else
9517 +    CFLAGS="-g"
9518 +  fi
9519 +else
9520 +  if test "$GCC" = yes; then
9521 +    CFLAGS="-O2"
9522 +  else
9523 +    CFLAGS=
9524 +  fi
9525 +fi
9526 +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
9527 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
9528 +if test "${ac_cv_prog_cc_stdc+set}" = set; then
9529 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9530 +else
9531 +  ac_cv_prog_cc_stdc=no
9532 +ac_save_CC=$CC
9533 +cat >conftest.$ac_ext <<_ACEOF
9534 +#line $LINENO "configure"
9535 +#include "confdefs.h"
9536 +#include <stdarg.h>
9537 +#include <stdio.h>
9538 +#include <sys/types.h>
9539 +#include <sys/stat.h>
9540 +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
9541 +struct buf { int x; };
9542 +FILE * (*rcsopen) (struct buf *, struct stat *, int);
9543 +static char *e (p, i)
9544 +     char **p;
9545 +     int i;
9546 +{
9547 +  return p[i];
9548 +}
9549 +static char *f (char * (*g) (char **, int), char **p, ...)
9550 +{
9551 +  char *s;
9552 +  va_list v;
9553 +  va_start (v,p);
9554 +  s = g (p, va_arg (v,int));
9555 +  va_end (v);
9556 +  return s;
9557 +}
9558 +int test (int i, double x);
9559 +struct s1 {int (*f) (int a);};
9560 +struct s2 {int (*f) (double a);};
9561 +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
9562 +int argc;
9563 +char **argv;
9564 +int
9565 +main ()
9566 +{
9567 +return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
9568 +  ;
9569 +  return 0;
9570 +}
9571 +_ACEOF
9572 +# Don't try gcc -ansi; that turns off useful extensions and
9573 +# breaks some systems' header files.
9574 +# AIX                  -qlanglvl=ansi
9575 +# Ultrix and OSF/1     -std1
9576 +# HP-UX 10.20 and later        -Ae
9577 +# HP-UX older versions -Aa -D_HPUX_SOURCE
9578 +# SVR4                 -Xc -D__EXTENSIONS__
9579 +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
9580 +do
9581 +  CC="$ac_save_CC $ac_arg"
9582 +  rm -f conftest.$ac_objext
9583 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9584 +  (eval $ac_compile) 2>&5
9585 +  ac_status=$?
9586 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9587 +  (exit $ac_status); } &&
9588 +         { ac_try='test -s conftest.$ac_objext'
9589 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9590 +  (eval $ac_try) 2>&5
9591 +  ac_status=$?
9592 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9593 +  (exit $ac_status); }; }; then
9594 +  ac_cv_prog_cc_stdc=$ac_arg
9595 +break
9596 +else
9597 +  echo "$as_me: failed program was:" >&5
9598 +cat conftest.$ac_ext >&5
9599 +fi
9600 +rm -f conftest.$ac_objext 
9601 +done
9602 +rm -f conftest.$ac_ext conftest.$ac_objext
9603 +CC=$ac_save_CC
9604 +
9605 +fi
9606 +
9607 +case "x$ac_cv_prog_cc_stdc" in
9608 +  x|xno)
9609 +    echo "$as_me:$LINENO: result: none needed" >&5
9610 +echo "${ECHO_T}none needed" >&6 ;;
9611 +  *)
9612 +    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
9613 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
9614 +    CC="$CC $ac_cv_prog_cc_stdc" ;;
9615 +esac
9616 +
9617 +# Some people use a C++ compiler to compile C.  Since we use `exit',
9618 +# in C++ we need to declare it.  In case someone uses the same compiler
9619 +# for both compiling C and C++ we need to have the C++ compiler decide
9620 +# the declaration of exit, since it's the most demanding environment.
9621 +cat >conftest.$ac_ext <<_ACEOF
9622 +@%:@ifndef __cplusplus
9623 +  choke me
9624 +@%:@endif
9625 +_ACEOF
9626 +rm -f conftest.$ac_objext
9627 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9628 +  (eval $ac_compile) 2>&5
9629 +  ac_status=$?
9630 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9631 +  (exit $ac_status); } &&
9632 +         { ac_try='test -s conftest.$ac_objext'
9633 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9634 +  (eval $ac_try) 2>&5
9635 +  ac_status=$?
9636 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9637 +  (exit $ac_status); }; }; then
9638 +  for ac_declaration in \
9639 +   ''\
9640 +   '#include <stdlib.h>' \
9641 +   'extern "C" void std::exit (int) throw (); using std::exit;' \
9642 +   'extern "C" void std::exit (int); using std::exit;' \
9643 +   'extern "C" void exit (int) throw ();' \
9644 +   'extern "C" void exit (int);' \
9645 +   'void exit (int);'
9646 +do
9647 +  cat >conftest.$ac_ext <<_ACEOF
9648 +#line $LINENO "configure"
9649 +#include "confdefs.h"
9650 +@%:@include <stdlib.h>
9651 +$ac_declaration
9652 +int
9653 +main ()
9654 +{
9655 +exit (42);
9656 +  ;
9657 +  return 0;
9658 +}
9659 +_ACEOF
9660 +rm -f conftest.$ac_objext
9661 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9662 +  (eval $ac_compile) 2>&5
9663 +  ac_status=$?
9664 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9665 +  (exit $ac_status); } &&
9666 +         { ac_try='test -s conftest.$ac_objext'
9667 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9668 +  (eval $ac_try) 2>&5
9669 +  ac_status=$?
9670 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9671 +  (exit $ac_status); }; }; then
9672 +  :
9673 +else
9674 +  echo "$as_me: failed program was:" >&5
9675 +cat conftest.$ac_ext >&5
9676 +continue
9677 +fi
9678 +rm -f conftest.$ac_objext conftest.$ac_ext
9679 +  cat >conftest.$ac_ext <<_ACEOF
9680 +#line $LINENO "configure"
9681 +#include "confdefs.h"
9682 +$ac_declaration
9683 +int
9684 +main ()
9685 +{
9686 +exit (42);
9687 +  ;
9688 +  return 0;
9689 +}
9690 +_ACEOF
9691 +rm -f conftest.$ac_objext
9692 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9693 +  (eval $ac_compile) 2>&5
9694 +  ac_status=$?
9695 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9696 +  (exit $ac_status); } &&
9697 +         { ac_try='test -s conftest.$ac_objext'
9698 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9699 +  (eval $ac_try) 2>&5
9700 +  ac_status=$?
9701 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9702 +  (exit $ac_status); }; }; then
9703 +  break
9704 +else
9705 +  echo "$as_me: failed program was:" >&5
9706 +cat conftest.$ac_ext >&5
9707 +fi
9708 +rm -f conftest.$ac_objext conftest.$ac_ext
9709 +done
9710 +rm -f conftest*
9711 +if test -n "$ac_declaration"; then
9712 +  echo '#ifdef __cplusplus' >>confdefs.h
9713 +  echo $ac_declaration      >>confdefs.h
9714 +  echo '#endif'             >>confdefs.h
9715 +fi
9716 +
9717 +else
9718 +  echo "$as_me: failed program was:" >&5
9719 +cat conftest.$ac_ext >&5
9720 +fi
9721 +rm -f conftest.$ac_objext conftest.$ac_ext
9722 +ac_ext=c
9723 +ac_cpp='$CPP $CPPFLAGS'
9724 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9725 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9726 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
9727 +
9728 +depcc="$CC"   am_compiler_list=
9729 +
9730 +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
9731 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
9732 +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
9733 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9734 +else
9735 +  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9736 +  # We make a subdir and do the tests there.  Otherwise we can end up
9737 +  # making bogus files that we don't know about and never remove.  For
9738 +  # instance it was reported that on HP-UX the gcc test will end up
9739 +  # making a dummy file named `D' -- because `-MD' means `put the output
9740 +  # in D'.
9741 +  mkdir conftest.dir
9742 +  # Copy depcomp to subdir because otherwise we won't find it if we're
9743 +  # using a relative directory.
9744 +  cp "$am_depcomp" conftest.dir
9745 +  cd conftest.dir
9746 +
9747 +  am_cv_CC_dependencies_compiler_type=none
9748 +  if test "$am_compiler_list" = ""; then
9749 +     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
9750 +  fi
9751 +  for depmode in $am_compiler_list; do
9752 +    # We need to recreate these files for each test, as the compiler may
9753 +    # overwrite some of them when testing with obscure command lines.
9754 +    # This happens at least with the AIX C compiler.
9755 +    echo '#include "conftest.h"' > conftest.c
9756 +    echo 'int i;' > conftest.h
9757 +    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
9758 +
9759 +    case $depmode in
9760 +    nosideeffect)
9761 +      # after this tag, mechanisms are not by side-effect, so they'll
9762 +      # only be used when explicitly requested
9763 +      if test "x$enable_dependency_tracking" = xyes; then
9764 +       continue
9765 +      else
9766 +       break
9767 +      fi
9768 +      ;;
9769 +    none) break ;;
9770 +    esac
9771 +    # We check with `-c' and `-o' for the sake of the "dashmstdout"
9772 +    # mode.  It turns out that the SunPro C++ compiler does not properly
9773 +    # handle `-M -o', and we need to detect this.
9774 +    if depmode=$depmode \
9775 +       source=conftest.c object=conftest.o \
9776 +       depfile=conftest.Po tmpdepfile=conftest.TPo \
9777 +       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
9778 +       grep conftest.h conftest.Po > /dev/null 2>&1 &&
9779 +       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9780 +      am_cv_CC_dependencies_compiler_type=$depmode
9781 +      break
9782 +    fi
9783 +  done
9784 +
9785 +  cd ..
9786 +  rm -rf conftest.dir
9787 +else
9788 +  am_cv_CC_dependencies_compiler_type=none
9789 +fi
9790 +
9791 +fi
9792 +echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
9793 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
9794 +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
9795 +
9796 +
9797 +# Find the correct PATH separator.  Usually this is `:', but
9798 +# DJGPP uses `;' like DOS.
9799 +if test "X${PATH_SEPARATOR+set}" != Xset; then
9800 +  UNAME=${UNAME-`uname 2>/dev/null`}
9801 +  case X$UNAME in
9802 +    *-DOS) lt_cv_sys_path_separator=';' ;;
9803 +    *)     lt_cv_sys_path_separator=':' ;;
9804 +  esac
9805 +  PATH_SEPARATOR=$lt_cv_sys_path_separator
9806 +fi
9807 +
9808 +
9809 +# Check whether --with-gnu-ld or --without-gnu-ld was given.
9810 +if test "${with_gnu_ld+set}" = set; then
9811 +  withval="$with_gnu_ld"
9812 +  test "$withval" = no || with_gnu_ld=yes
9813 +else
9814 +  with_gnu_ld=no
9815 +fi; 
9816 +ac_prog=ld
9817 +if test "$GCC" = yes; then
9818 +  # Check if gcc -print-prog-name=ld gives a path.
9819 +  echo "$as_me:$LINENO: checking for ld used by GCC" >&5
9820 +echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
9821 +  case $host in
9822 +  *-*-mingw*)
9823 +    # gcc leaves a trailing carriage return which upsets mingw
9824 +    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9825 +  *)
9826 +    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
9827 +  esac
9828 +  case $ac_prog in
9829 +    # Accept absolute paths.
9830 +    [\\/]* | [A-Za-z]:[\\/]*)
9831 +      re_direlt='/[^/][^/]*/\.\./'
9832 +      # Canonicalize the path of ld
9833 +      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
9834 +      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
9835 +       ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
9836 +      done
9837 +      test -z "$LD" && LD="$ac_prog"
9838 +      ;;
9839 +  "")
9840 +    # If it fails, then pretend we aren't using GCC.
9841 +    ac_prog=ld
9842 +    ;;
9843 +  *)
9844 +    # If it is relative, then search for the first ld in PATH.
9845 +    with_gnu_ld=unknown
9846 +    ;;
9847 +  esac
9848 +elif test "$with_gnu_ld" = yes; then
9849 +  echo "$as_me:$LINENO: checking for GNU ld" >&5
9850 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
9851 +else
9852 +  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
9853 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
9854 +fi
9855 +if test "${lt_cv_path_LD+set}" = set; then
9856 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9857 +else
9858 +  if test -z "$LD"; then
9859 +  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
9860 +  for ac_dir in $PATH; do
9861 +    test -z "$ac_dir" && ac_dir=.
9862 +    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9863 +      lt_cv_path_LD="$ac_dir/$ac_prog"
9864 +      # Check to see if the program is GNU ld.  I'd rather use --version,
9865 +      # but apparently some GNU ld's only accept -v.
9866 +      # Break only if it was the GNU/non-GNU ld that we prefer.
9867 +      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
9868 +       test "$with_gnu_ld" != no && break
9869 +      else
9870 +       test "$with_gnu_ld" != yes && break
9871 +      fi
9872 +    fi
9873 +  done
9874 +  IFS="$ac_save_ifs"
9875 +else
9876 +  lt_cv_path_LD="$LD" # Let the user override the test with a path.
9877 +fi
9878 +fi
9879 +
9880 +LD="$lt_cv_path_LD"
9881 +if test -n "$LD"; then
9882 +  echo "$as_me:$LINENO: result: $LD" >&5
9883 +echo "${ECHO_T}$LD" >&6
9884 +else
9885 +  echo "$as_me:$LINENO: result: no" >&5
9886 +echo "${ECHO_T}no" >&6
9887 +fi
9888 +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
9889 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
9890 +   { (exit 1); exit 1; }; }
9891 +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
9892 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
9893 +if test "${lt_cv_prog_gnu_ld+set}" = set; then
9894 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9895 +else
9896 +  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
9897 +if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
9898 +  lt_cv_prog_gnu_ld=yes
9899 +else
9900 +  lt_cv_prog_gnu_ld=no
9901 +fi
9902 +fi
9903 +echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
9904 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
9905 +with_gnu_ld=$lt_cv_prog_gnu_ld
9906 +
9907 +
9908 +echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
9909 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
9910 +if test "${lt_cv_ld_reload_flag+set}" = set; then
9911 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9912 +else
9913 +  lt_cv_ld_reload_flag='-r'
9914 +fi
9915 +echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
9916 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
9917 +reload_flag=$lt_cv_ld_reload_flag
9918 +test -n "$reload_flag" && reload_flag=" $reload_flag"
9919 +
9920 +echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
9921 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
9922 +if test "${lt_cv_path_NM+set}" = set; then
9923 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9924 +else
9925 +  if test -n "$NM"; then
9926 +  # Let the user override the test.
9927 +  lt_cv_path_NM="$NM"
9928 +else
9929 +  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
9930 +  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
9931 +    test -z "$ac_dir" && ac_dir=.
9932 +    tmp_nm=$ac_dir/${ac_tool_prefix}nm
9933 +    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
9934 +      # Check to see if the nm accepts a BSD-compat flag.
9935 +      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
9936 +      #   nm: unknown option "B" ignored
9937 +      # Tru64's nm complains that /dev/null is an invalid object file
9938 +      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
9939 +       lt_cv_path_NM="$tmp_nm -B"
9940 +       break
9941 +      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
9942 +       lt_cv_path_NM="$tmp_nm -p"
9943 +       break
9944 +      else
9945 +       lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
9946 +       continue # so that we can try to find one that supports BSD flags
9947 +      fi
9948 +    fi
9949 +  done
9950 +  IFS="$ac_save_ifs"
9951 +  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
9952 +fi
9953 +fi
9954 +
9955 +NM="$lt_cv_path_NM"
9956 +echo "$as_me:$LINENO: result: $NM" >&5
9957 +echo "${ECHO_T}$NM" >&6
9958 +
9959 +echo "$as_me:$LINENO: checking whether ln -s works" >&5
9960 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
9961 +LN_S=$as_ln_s
9962 +if test "$LN_S" = "ln -s"; then
9963 +  echo "$as_me:$LINENO: result: yes" >&5
9964 +echo "${ECHO_T}yes" >&6
9965 +else
9966 +  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
9967 +echo "${ECHO_T}no, using $LN_S" >&6
9968 +fi
9969 +
9970 +echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
9971 +echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
9972 +if test "${lt_cv_deplibs_check_method+set}" = set; then
9973 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9974 +else
9975 +  lt_cv_file_magic_cmd='$MAGIC_CMD'
9976 +lt_cv_file_magic_test_file=
9977 +lt_cv_deplibs_check_method='unknown'
9978 +# Need to set the preceding variable on all platforms that support
9979 +# interlibrary dependencies.
9980 +# 'none' -- dependencies not supported.
9981 +# `unknown' -- same as none, but documents that we really don't know.
9982 +# 'pass_all' -- all dependencies passed with no checks.
9983 +# 'test_compile' -- check by making test program.
9984 +# 'file_magic [[regex]]' -- check by looking for files in library path
9985 +# which responds to the $file_magic_cmd with a given egrep regex.
9986 +# If you have `file' or equivalent on your system and you're not sure
9987 +# whether `pass_all' will *always* work, you probably want this one.
9988 +
9989 +case $host_os in
9990 +aix4* | aix5*)
9991 +  lt_cv_deplibs_check_method=pass_all
9992 +  ;;
9993 +
9994 +beos*)
9995 +  lt_cv_deplibs_check_method=pass_all
9996 +  ;;
9997 +
9998 +bsdi4*)
9999 +  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
10000 +  lt_cv_file_magic_cmd='/usr/bin/file -L'
10001 +  lt_cv_file_magic_test_file=/shlib/libc.so
10002 +  ;;
10003 +
10004 +cygwin* | mingw* | pw32*)
10005 +  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
10006 +  lt_cv_file_magic_cmd='$OBJDUMP -f'
10007 +  ;;
10008 +
10009 +darwin* | rhapsody*)
10010 +  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
10011 +  lt_cv_file_magic_cmd='/usr/bin/file -L'
10012 +  case "$host_os" in
10013 +  rhapsody* | darwin1.[012])
10014 +    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
10015 +    ;;
10016 +  *) # Darwin 1.3 on
10017 +    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
10018 +    ;;
10019 +  esac
10020 +  ;;
10021 +
10022 +freebsd*)
10023 +  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
10024 +    case $host_cpu in
10025 +    i*86 )
10026 +      # Not sure whether the presence of OpenBSD here was a mistake.
10027 +      # Let's accept both of them until this is cleared up.
10028 +      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
10029 +      lt_cv_file_magic_cmd=/usr/bin/file
10030 +      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
10031 +      ;;
10032 +    esac
10033 +  else
10034 +    lt_cv_deplibs_check_method=pass_all
10035 +  fi
10036 +  ;;
10037 +
10038 +gnu*)
10039 +  lt_cv_deplibs_check_method=pass_all
10040 +  ;;
10041 +
10042 +hpux10.20*|hpux11*)
10043 +  lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
10044 +  lt_cv_file_magic_cmd=/usr/bin/file
10045 +  lt_cv_file_magic_test_file=/usr/lib/libc.sl
10046 +  ;;
10047 +
10048 +irix5* | irix6*)
10049 +  case $host_os in
10050 +  irix5*)
10051 +    # this will be overridden with pass_all, but let us keep it just in case
10052 +    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
10053 +    ;;
10054 +  *)
10055 +    case $LD in
10056 +    *-32|*"-32 ") libmagic=32-bit;;
10057 +    *-n32|*"-n32 ") libmagic=N32;;
10058 +    *-64|*"-64 ") libmagic=64-bit;;
10059 +    *) libmagic=never-match;;
10060 +    esac
10061 +    # this will be overridden with pass_all, but let us keep it just in case
10062 +    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
10063 +    ;;
10064 +  esac
10065 +  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
10066 +  lt_cv_deplibs_check_method=pass_all
10067 +  ;;
10068 +
10069 +# This must be Linux ELF.
10070 +linux-gnu*)
10071 +  case $host_cpu in
10072 +  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
10073 +    lt_cv_deplibs_check_method=pass_all ;;
10074 +  *)
10075 +    # glibc up to 2.1.1 does not perform some relocations on ARM
10076 +    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
10077 +  esac
10078 +  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
10079 +  ;;
10080 +
10081 +netbsd*)
10082 +  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
10083 +    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
10084 +  else
10085 +    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
10086 +  fi
10087 +  ;;
10088 +
10089 +newos6*)
10090 +  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
10091 +  lt_cv_file_magic_cmd=/usr/bin/file
10092 +  lt_cv_file_magic_test_file=/usr/lib/libnls.so
10093 +  ;;
10094 +
10095 +openbsd*)
10096 +  lt_cv_file_magic_cmd=/usr/bin/file
10097 +  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
10098 +  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10099 +    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
10100 +  else
10101 +    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
10102 +  fi
10103 +  ;;
10104 +
10105 +osf3* | osf4* | osf5*)
10106 +  # this will be overridden with pass_all, but let us keep it just in case
10107 +  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
10108 +  lt_cv_file_magic_test_file=/shlib/libc.so
10109 +  lt_cv_deplibs_check_method=pass_all
10110 +  ;;
10111 +
10112 +sco3.2v5*)
10113 +  lt_cv_deplibs_check_method=pass_all
10114 +  ;;
10115 +
10116 +solaris*)
10117 +  lt_cv_deplibs_check_method=pass_all
10118 +  lt_cv_file_magic_test_file=/lib/libc.so
10119 +  ;;
10120 +
10121 +sysv5uw[78]* | sysv4*uw2*)
10122 +  lt_cv_deplibs_check_method=pass_all
10123 +  ;;
10124 +
10125 +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10126 +  case $host_vendor in
10127 +  motorola)
10128 +    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
10129 +    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
10130 +    ;;
10131 +  ncr)
10132 +    lt_cv_deplibs_check_method=pass_all
10133 +    ;;
10134 +  sequent)
10135 +    lt_cv_file_magic_cmd='/bin/file'
10136 +    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
10137 +    ;;
10138 +  sni)
10139 +    lt_cv_file_magic_cmd='/bin/file'
10140 +    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
10141 +    lt_cv_file_magic_test_file=/lib/libc.so
10142 +    ;;
10143 +  esac
10144 +  ;;
10145 +esac
10146 +
10147 +fi
10148 +echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
10149 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
10150 +file_magic_cmd=$lt_cv_file_magic_cmd
10151 +deplibs_check_method=$lt_cv_deplibs_check_method
10152 +
10153 +
10154 +
10155 +
10156 +
10157 +
10158 +
10159 +# Check for command to grab the raw symbol name followed by C symbol from nm.
10160 +echo "$as_me:$LINENO: checking command to parse $NM output" >&5
10161 +echo $ECHO_N "checking command to parse $NM output... $ECHO_C" >&6
10162 +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
10163 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10164 +else
10165 +  
10166 +# These are sane defaults that work on at least a few old systems.
10167 +# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
10168 +
10169 +# Character class describing NM global symbol codes.
10170 +symcode='[BCDEGRST]'
10171 +
10172 +# Regexp to match symbols that can be accessed directly from C.
10173 +sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
10174 +
10175 +# Transform the above into a raw symbol and a C symbol.
10176 +symxfrm='\1 \2\3 \3'
10177 +
10178 +# Transform an extracted symbol line into a proper C declaration
10179 +lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
10180 +
10181 +# Transform an extracted symbol line into symbol name and symbol address
10182 +lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
10183 +
10184 +# Define system-specific variables.
10185 +case $host_os in
10186 +aix*)
10187 +  symcode='[BCDT]'
10188 +  ;;
10189 +cygwin* | mingw* | pw32*)
10190 +  symcode='[ABCDGISTW]'
10191 +  ;;
10192 +hpux*) # Its linker distinguishes data from code symbols
10193 +  lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
10194 +  lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
10195 +  ;;
10196 +irix*)
10197 +  symcode='[BCDEGRST]'
10198 +  ;;
10199 +solaris* | sysv5*)
10200 +  symcode='[BDT]'
10201 +  ;;
10202 +sysv4)
10203 +  symcode='[DFNSTU]'
10204 +  ;;
10205 +esac
10206 +
10207 +# Handle CRLF in mingw tool chain
10208 +opt_cr=
10209 +case $host_os in
10210 +mingw*)
10211 +  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
10212 +  ;;
10213 +esac
10214 +
10215 +# If we're using GNU nm, then use its standard symbol codes.
10216 +if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
10217 +  symcode='[ABCDGISTW]'
10218 +fi
10219 +
10220 +# Try without a prefix undercore, then with it.
10221 +for ac_symprfx in "" "_"; do
10222 +
10223 +  # Write the raw and C identifiers.
10224 +lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[        ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
10225 +
10226 +  # Check to see that the pipe works correctly.
10227 +  pipe_works=no
10228 +  rm -f conftest*
10229 +  cat > conftest.$ac_ext <<EOF
10230 +#ifdef __cplusplus
10231 +extern "C" {
10232 +#endif
10233 +char nm_test_var;
10234 +void nm_test_func(){}
10235 +#ifdef __cplusplus
10236 +}
10237 +#endif
10238 +int main(){nm_test_var='a';nm_test_func();return(0);}
10239 +EOF
10240 +
10241 +  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10242 +  (eval $ac_compile) 2>&5
10243 +  ac_status=$?
10244 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10245 +  (exit $ac_status); }; then
10246 +    # Now try to grab the symbols.
10247 +    nlist=conftest.nm
10248 +    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
10249 +  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
10250 +  ac_status=$?
10251 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10252 +  (exit $ac_status); } && test -s "$nlist"; then
10253 +      # Try sorting and uniquifying the output.
10254 +      if sort "$nlist" | uniq > "$nlist"T; then
10255 +       mv -f "$nlist"T "$nlist"
10256 +      else
10257 +       rm -f "$nlist"T
10258 +      fi
10259 +
10260 +      # Make sure that we snagged all the symbols we need.
10261 +      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
10262 +       if egrep ' nm_test_func$' "$nlist" >/dev/null; then
10263 +         cat <<EOF > conftest.$ac_ext
10264 +#ifdef __cplusplus
10265 +extern "C" {
10266 +#endif
10267 +
10268 +EOF
10269 +         # Now generate the symbol file.
10270 +         eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
10271 +
10272 +         cat <<EOF >> conftest.$ac_ext
10273 +#if defined (__STDC__) && __STDC__
10274 +# define lt_ptr void *
10275 +#else
10276 +# define lt_ptr char *
10277 +# define const
10278 +#endif
10279 +
10280 +/* The mapping between symbol names and symbols. */
10281 +const struct {
10282 +  const char *name;
10283 +  lt_ptr address;
10284 +}
10285 +lt_preloaded_symbols[] =
10286 +{
10287 +EOF
10288 +         sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
10289 +         cat <<\EOF >> conftest.$ac_ext
10290 +  {0, (lt_ptr) 0}
10291 +};
10292 +
10293 +#ifdef __cplusplus
10294 +}
10295 +#endif
10296 +EOF
10297 +         # Now try linking the two files.
10298 +         mv conftest.$ac_objext conftstm.$ac_objext
10299 +         save_LIBS="$LIBS"
10300 +         save_CFLAGS="$CFLAGS"
10301 +         LIBS="conftstm.$ac_objext"
10302 +         CFLAGS="$CFLAGS$no_builtin_flag"
10303 +         if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10304 +  (eval $ac_link) 2>&5
10305 +  ac_status=$?
10306 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10307 +  (exit $ac_status); } && test -s conftest; then
10308 +           pipe_works=yes
10309 +         fi
10310 +         LIBS="$save_LIBS"
10311 +         CFLAGS="$save_CFLAGS"
10312 +       else
10313 +         echo "cannot find nm_test_func in $nlist" >&5
10314 +       fi
10315 +      else
10316 +       echo "cannot find nm_test_var in $nlist" >&5
10317 +      fi
10318 +    else
10319 +      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
10320 +    fi
10321 +  else
10322 +    echo "$progname: failed program was:" >&5
10323 +    cat conftest.$ac_ext >&5
10324 +  fi
10325 +  rm -f conftest* conftst*
10326 +
10327 +  # Do not use the global_symbol_pipe unless it works.
10328 +  if test "$pipe_works" = yes; then
10329 +    break
10330 +  else
10331 +    lt_cv_sys_global_symbol_pipe=
10332 +  fi
10333 +done
10334 +
10335 +fi
10336 +
10337 +global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
10338 +if test -z "$lt_cv_sys_global_symbol_pipe"; then
10339 +  global_symbol_to_cdecl=
10340 +  global_symbol_to_c_name_address=
10341 +else
10342 +  global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
10343 +  global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
10344 +fi
10345 +if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
10346 +then
10347 +  echo "$as_me:$LINENO: result: failed" >&5
10348 +echo "${ECHO_T}failed" >&6
10349 +else
10350 +  echo "$as_me:$LINENO: result: ok" >&5
10351 +echo "${ECHO_T}ok" >&6
10352 +fi
10353 +
10354 +ac_ext=c
10355 +ac_cpp='$CPP $CPPFLAGS'
10356 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10357 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10358 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
10359 +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
10360 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
10361 +# On Suns, sometimes $CPP names a directory.
10362 +if test -n "$CPP" && test -d "$CPP"; then
10363 +  CPP=
10364 +fi
10365 +if test -z "$CPP"; then
10366 +  if test "${ac_cv_prog_CPP+set}" = set; then
10367 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10368 +else
10369 +      # Double quotes because CPP needs to be expanded
10370 +    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
10371 +    do
10372 +      ac_preproc_ok=false
10373 +for ac_c_preproc_warn_flag in '' yes
10374 +do
10375 +  # Use a header file that comes with gcc, so configuring glibc
10376 +  # with a fresh cross-compiler works.
10377 +  # On the NeXT, cc -E runs the code through the compiler's parser,
10378 +  # not just through cpp. "Syntax error" is here to catch this case.
10379 +  cat >conftest.$ac_ext <<_ACEOF
10380 +#line $LINENO "configure"
10381 +#include "confdefs.h"
10382 +@%:@include <assert.h>
10383 +                     Syntax error
10384 +_ACEOF
10385 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10386 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10387 +  ac_status=$?
10388 +  grep -v '^ *+' conftest.er1 >conftest.err
10389 +  rm -f conftest.er1
10390 +  cat conftest.err >&5
10391 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10392 +  (exit $ac_status); } >/dev/null; then
10393 +  if test -s conftest.err; then
10394 +    ac_cpp_err=$ac_c_preproc_warn_flag
10395 +  else
10396 +    ac_cpp_err=
10397 +  fi
10398 +else
10399 +  ac_cpp_err=yes
10400 +fi
10401 +if test -z "$ac_cpp_err"; then
10402 +  :
10403 +else
10404 +  echo "$as_me: failed program was:" >&5
10405 +  cat conftest.$ac_ext >&5
10406 +  # Broken: fails on valid input.
10407 +continue
10408 +fi
10409 +rm -f conftest.err conftest.$ac_ext
10410 +
10411 +  # OK, works on sane cases.  Now check whether non-existent headers
10412 +  # can be detected and how.
10413 +  cat >conftest.$ac_ext <<_ACEOF
10414 +#line $LINENO "configure"
10415 +#include "confdefs.h"
10416 +@%:@include <ac_nonexistent.h>
10417 +_ACEOF
10418 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10419 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10420 +  ac_status=$?
10421 +  grep -v '^ *+' conftest.er1 >conftest.err
10422 +  rm -f conftest.er1
10423 +  cat conftest.err >&5
10424 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10425 +  (exit $ac_status); } >/dev/null; then
10426 +  if test -s conftest.err; then
10427 +    ac_cpp_err=$ac_c_preproc_warn_flag
10428 +  else
10429 +    ac_cpp_err=
10430 +  fi
10431 +else
10432 +  ac_cpp_err=yes
10433 +fi
10434 +if test -z "$ac_cpp_err"; then
10435 +  # Broken: success on invalid input.
10436 +continue
10437 +else
10438 +  echo "$as_me: failed program was:" >&5
10439 +  cat conftest.$ac_ext >&5
10440 +  # Passes both tests.
10441 +ac_preproc_ok=:
10442 +break
10443 +fi
10444 +rm -f conftest.err conftest.$ac_ext
10445 +
10446 +done
10447 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
10448 +rm -f conftest.err conftest.$ac_ext
10449 +if $ac_preproc_ok; then
10450 +  break
10451 +fi
10452 +
10453 +    done
10454 +    ac_cv_prog_CPP=$CPP
10455 +  
10456 +fi
10457 +  CPP=$ac_cv_prog_CPP
10458 +else
10459 +  ac_cv_prog_CPP=$CPP
10460 +fi
10461 +echo "$as_me:$LINENO: result: $CPP" >&5
10462 +echo "${ECHO_T}$CPP" >&6
10463 +ac_preproc_ok=false
10464 +for ac_c_preproc_warn_flag in '' yes
10465 +do
10466 +  # Use a header file that comes with gcc, so configuring glibc
10467 +  # with a fresh cross-compiler works.
10468 +  # On the NeXT, cc -E runs the code through the compiler's parser,
10469 +  # not just through cpp. "Syntax error" is here to catch this case.
10470 +  cat >conftest.$ac_ext <<_ACEOF
10471 +#line $LINENO "configure"
10472 +#include "confdefs.h"
10473 +@%:@include <assert.h>
10474 +                     Syntax error
10475 +_ACEOF
10476 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10477 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10478 +  ac_status=$?
10479 +  grep -v '^ *+' conftest.er1 >conftest.err
10480 +  rm -f conftest.er1
10481 +  cat conftest.err >&5
10482 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10483 +  (exit $ac_status); } >/dev/null; then
10484 +  if test -s conftest.err; then
10485 +    ac_cpp_err=$ac_c_preproc_warn_flag
10486 +  else
10487 +    ac_cpp_err=
10488 +  fi
10489 +else
10490 +  ac_cpp_err=yes
10491 +fi
10492 +if test -z "$ac_cpp_err"; then
10493 +  :
10494 +else
10495 +  echo "$as_me: failed program was:" >&5
10496 +  cat conftest.$ac_ext >&5
10497 +  # Broken: fails on valid input.
10498 +continue
10499 +fi
10500 +rm -f conftest.err conftest.$ac_ext
10501 +
10502 +  # OK, works on sane cases.  Now check whether non-existent headers
10503 +  # can be detected and how.
10504 +  cat >conftest.$ac_ext <<_ACEOF
10505 +#line $LINENO "configure"
10506 +#include "confdefs.h"
10507 +@%:@include <ac_nonexistent.h>
10508 +_ACEOF
10509 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10510 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10511 +  ac_status=$?
10512 +  grep -v '^ *+' conftest.er1 >conftest.err
10513 +  rm -f conftest.er1
10514 +  cat conftest.err >&5
10515 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10516 +  (exit $ac_status); } >/dev/null; then
10517 +  if test -s conftest.err; then
10518 +    ac_cpp_err=$ac_c_preproc_warn_flag
10519 +  else
10520 +    ac_cpp_err=
10521 +  fi
10522 +else
10523 +  ac_cpp_err=yes
10524 +fi
10525 +if test -z "$ac_cpp_err"; then
10526 +  # Broken: success on invalid input.
10527 +continue
10528 +else
10529 +  echo "$as_me: failed program was:" >&5
10530 +  cat conftest.$ac_ext >&5
10531 +  # Passes both tests.
10532 +ac_preproc_ok=:
10533 +break
10534 +fi
10535 +rm -f conftest.err conftest.$ac_ext
10536 +
10537 +done
10538 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
10539 +rm -f conftest.err conftest.$ac_ext
10540 +if $ac_preproc_ok; then
10541 +  :
10542 +else
10543 +  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
10544 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
10545 +   { (exit 1); exit 1; }; }
10546 +fi
10547 +
10548 +ac_ext=c
10549 +ac_cpp='$CPP $CPPFLAGS'
10550 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10551 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10552 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
10553 +
10554 +
10555 +echo "$as_me:$LINENO: checking for egrep" >&5
10556 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6
10557 +if test "${ac_cv_prog_egrep+set}" = set; then
10558 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10559 +else
10560 +  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
10561 +    then ac_cv_prog_egrep='grep -E'
10562 +    else ac_cv_prog_egrep='egrep'
10563 +    fi
10564 +fi
10565 +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
10566 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6
10567 + EGREP=$ac_cv_prog_egrep
10568
10569 +
10570 +echo "$as_me:$LINENO: checking for ANSI C header files" >&5
10571 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10572 +if test "${ac_cv_header_stdc+set}" = set; then
10573 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10574 +else
10575 +  cat >conftest.$ac_ext <<_ACEOF
10576 +#line $LINENO "configure"
10577 +#include "confdefs.h"
10578 +#include <stdlib.h>
10579 +#include <stdarg.h>
10580 +#include <string.h>
10581 +#include <float.h>
10582 +
10583 +_ACEOF
10584 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10585 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10586 +  ac_status=$?
10587 +  grep -v '^ *+' conftest.er1 >conftest.err
10588 +  rm -f conftest.er1
10589 +  cat conftest.err >&5
10590 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10591 +  (exit $ac_status); } >/dev/null; then
10592 +  if test -s conftest.err; then
10593 +    ac_cpp_err=$ac_c_preproc_warn_flag
10594 +  else
10595 +    ac_cpp_err=
10596 +  fi
10597 +else
10598 +  ac_cpp_err=yes
10599 +fi
10600 +if test -z "$ac_cpp_err"; then
10601 +  ac_cv_header_stdc=yes
10602 +else
10603 +  echo "$as_me: failed program was:" >&5
10604 +  cat conftest.$ac_ext >&5
10605 +  ac_cv_header_stdc=no
10606 +fi
10607 +rm -f conftest.err conftest.$ac_ext
10608 +
10609 +if test $ac_cv_header_stdc = yes; then
10610 +  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10611 +  cat >conftest.$ac_ext <<_ACEOF
10612 +#line $LINENO "configure"
10613 +#include "confdefs.h"
10614 +#include <string.h>
10615 +
10616 +_ACEOF
10617 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10618 +  $EGREP "memchr" >/dev/null 2>&1; then
10619 +  :
10620 +else
10621 +  ac_cv_header_stdc=no
10622 +fi
10623 +rm -f conftest*
10624 +
10625 +fi
10626 +
10627 +if test $ac_cv_header_stdc = yes; then
10628 +  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10629 +  cat >conftest.$ac_ext <<_ACEOF
10630 +#line $LINENO "configure"
10631 +#include "confdefs.h"
10632 +#include <stdlib.h>
10633 +
10634 +_ACEOF
10635 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10636 +  $EGREP "free" >/dev/null 2>&1; then
10637 +  :
10638 +else
10639 +  ac_cv_header_stdc=no
10640 +fi
10641 +rm -f conftest*
10642 +
10643 +fi
10644 +
10645 +if test $ac_cv_header_stdc = yes; then
10646 +  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10647 +  if test "$cross_compiling" = yes; then
10648 +  :
10649 +else
10650 +  cat >conftest.$ac_ext <<_ACEOF
10651 +#line $LINENO "configure"
10652 +#include "confdefs.h"
10653 +#include <ctype.h>
10654 +#if ((' ' & 0x0FF) == 0x020)
10655 +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10656 +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10657 +#else
10658 +# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10659 +                     || ('j' <= (c) && (c) <= 'r') \
10660 +                     || ('s' <= (c) && (c) <= 'z'))
10661 +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10662 +#endif
10663 +
10664 +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10665 +int
10666 +main ()
10667 +{
10668 +  int i;
10669 +  for (i = 0; i < 256; i++)
10670 +    if (XOR (islower (i), ISLOWER (i))
10671 +        || toupper (i) != TOUPPER (i))
10672 +      exit(2);
10673 +  exit (0);
10674 +}
10675 +_ACEOF
10676 +rm -f conftest$ac_exeext
10677 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10678 +  (eval $ac_link) 2>&5
10679 +  ac_status=$?
10680 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10681 +  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10682 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10683 +  (eval $ac_try) 2>&5
10684 +  ac_status=$?
10685 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10686 +  (exit $ac_status); }; }; then
10687 +  :
10688 +else
10689 +  echo "$as_me: program exited with status $ac_status" >&5
10690 +echo "$as_me: failed program was:" >&5
10691 +cat conftest.$ac_ext >&5
10692 +( exit $ac_status )
10693 +ac_cv_header_stdc=no
10694 +fi
10695 +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10696 +fi
10697 +fi
10698 +fi
10699 +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
10700 +echo "${ECHO_T}$ac_cv_header_stdc" >&6
10701 +if test $ac_cv_header_stdc = yes; then
10702 +  
10703 +cat >>confdefs.h <<\_ACEOF
10704 +@%:@define STDC_HEADERS 1
10705 +_ACEOF
10706 +
10707 +fi
10708 +
10709 +# On IRIX 5.3, sys/types and inttypes.h are conflicting.
10710 +
10711 +
10712 +
10713 +
10714 +
10715 +
10716 +
10717 +
10718 +
10719 +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10720 +                  inttypes.h stdint.h unistd.h
10721 +do
10722 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10723 +echo "$as_me:$LINENO: checking for $ac_header" >&5
10724 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10725 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
10726 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10727 +else
10728 +  cat >conftest.$ac_ext <<_ACEOF
10729 +#line $LINENO "configure"
10730 +#include "confdefs.h"
10731 +$ac_includes_default
10732 +
10733 +@%:@include <$ac_header>
10734 +_ACEOF
10735 +rm -f conftest.$ac_objext
10736 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10737 +  (eval $ac_compile) 2>&5
10738 +  ac_status=$?
10739 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10740 +  (exit $ac_status); } &&
10741 +         { ac_try='test -s conftest.$ac_objext'
10742 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10743 +  (eval $ac_try) 2>&5
10744 +  ac_status=$?
10745 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10746 +  (exit $ac_status); }; }; then
10747 +  eval "$as_ac_Header=yes"
10748 +else
10749 +  echo "$as_me: failed program was:" >&5
10750 +cat conftest.$ac_ext >&5
10751 +eval "$as_ac_Header=no"
10752 +fi
10753 +rm -f conftest.$ac_objext conftest.$ac_ext
10754 +fi
10755 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10756 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10757 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
10758 +  cat >>confdefs.h <<_ACEOF
10759 +@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10760 +_ACEOF
10761
10762 +fi
10763 +
10764 +done
10765 +
10766 +
10767 +
10768 +for ac_header in dlfcn.h
10769 +do
10770 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10771 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
10772 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
10773 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10774 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
10775 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10776 +fi
10777 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10778 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10779 +else
10780 +  # Is the header compilable?
10781 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
10782 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10783 +cat >conftest.$ac_ext <<_ACEOF
10784 +#line $LINENO "configure"
10785 +#include "confdefs.h"
10786 +$ac_includes_default
10787 +@%:@include <$ac_header>
10788 +_ACEOF
10789 +rm -f conftest.$ac_objext
10790 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10791 +  (eval $ac_compile) 2>&5
10792 +  ac_status=$?
10793 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10794 +  (exit $ac_status); } &&
10795 +         { ac_try='test -s conftest.$ac_objext'
10796 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10797 +  (eval $ac_try) 2>&5
10798 +  ac_status=$?
10799 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10800 +  (exit $ac_status); }; }; then
10801 +  ac_header_compiler=yes
10802 +else
10803 +  echo "$as_me: failed program was:" >&5
10804 +cat conftest.$ac_ext >&5
10805 +ac_header_compiler=no
10806 +fi
10807 +rm -f conftest.$ac_objext conftest.$ac_ext
10808 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10809 +echo "${ECHO_T}$ac_header_compiler" >&6
10810 +
10811 +# Is the header present?
10812 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
10813 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10814 +cat >conftest.$ac_ext <<_ACEOF
10815 +#line $LINENO "configure"
10816 +#include "confdefs.h"
10817 +@%:@include <$ac_header>
10818 +_ACEOF
10819 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10820 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10821 +  ac_status=$?
10822 +  grep -v '^ *+' conftest.er1 >conftest.err
10823 +  rm -f conftest.er1
10824 +  cat conftest.err >&5
10825 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10826 +  (exit $ac_status); } >/dev/null; then
10827 +  if test -s conftest.err; then
10828 +    ac_cpp_err=$ac_c_preproc_warn_flag
10829 +  else
10830 +    ac_cpp_err=
10831 +  fi
10832 +else
10833 +  ac_cpp_err=yes
10834 +fi
10835 +if test -z "$ac_cpp_err"; then
10836 +  ac_header_preproc=yes
10837 +else
10838 +  echo "$as_me: failed program was:" >&5
10839 +  cat conftest.$ac_ext >&5
10840 +  ac_header_preproc=no
10841 +fi
10842 +rm -f conftest.err conftest.$ac_ext
10843 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10844 +echo "${ECHO_T}$ac_header_preproc" >&6
10845 +
10846 +# So?  What about this header?
10847 +case $ac_header_compiler:$ac_header_preproc in
10848 +  yes:no )
10849 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10850 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10851 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10852 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
10853 +  no:yes )
10854 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10855 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10856 +    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10857 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10858 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10859 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
10860 +esac
10861 +echo "$as_me:$LINENO: checking for $ac_header" >&5
10862 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10863 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
10864 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10865 +else
10866 +  eval "$as_ac_Header=$ac_header_preproc"
10867 +fi
10868 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10869 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10870 +
10871 +fi
10872 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
10873 +  cat >>confdefs.h <<_ACEOF
10874 +@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10875 +_ACEOF
10876
10877 +fi
10878 +
10879 +done
10880 +
10881 +
10882 +
10883 +
10884 +
10885 +# Only perform the check for file, if the check method requires it
10886 +case $deplibs_check_method in
10887 +file_magic*)
10888 +  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10889 +    echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
10890 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
10891 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
10892 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10893 +else
10894 +  case $MAGIC_CMD in
10895 +  /*)
10896 +  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
10897 +  ;;
10898 +  ?:/*)
10899 +  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
10900 +  ;;
10901 +  *)
10902 +  ac_save_MAGIC_CMD="$MAGIC_CMD"
10903 +  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
10904 +  ac_dummy="/usr/bin:$PATH"
10905 +  for ac_dir in $ac_dummy; do
10906 +    test -z "$ac_dir" && ac_dir=.
10907 +    if test -f $ac_dir/${ac_tool_prefix}file; then
10908 +      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
10909 +      if test -n "$file_magic_test_file"; then
10910 +       case $deplibs_check_method in
10911 +       "file_magic "*)
10912 +         file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
10913 +         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
10914 +         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10915 +           egrep "$file_magic_regex" > /dev/null; then
10916 +           :
10917 +         else
10918 +           cat <<EOF 1>&2
10919 +
10920 +*** Warning: the command libtool uses to detect shared libraries,
10921 +*** $file_magic_cmd, produces output that libtool cannot recognize.
10922 +*** The result is that libtool may fail to recognize shared libraries
10923 +*** as such.  This will affect the creation of libtool libraries that
10924 +*** depend on shared libraries, but programs linked with such libtool
10925 +*** libraries will work regardless of this problem.  Nevertheless, you
10926 +*** may want to report the problem to your system manager and/or to
10927 +*** bug-libtool@gnu.org
10928 +
10929 +EOF
10930 +         fi ;;
10931 +       esac
10932 +      fi
10933 +      break
10934 +    fi
10935 +  done
10936 +  IFS="$ac_save_ifs"
10937 +  MAGIC_CMD="$ac_save_MAGIC_CMD"
10938 +  ;;
10939 +esac
10940 +fi
10941 +
10942 +MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
10943 +if test -n "$MAGIC_CMD"; then
10944 +  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
10945 +echo "${ECHO_T}$MAGIC_CMD" >&6
10946 +else
10947 +  echo "$as_me:$LINENO: result: no" >&5
10948 +echo "${ECHO_T}no" >&6
10949 +fi
10950 +
10951 +if test -z "$lt_cv_path_MAGIC_CMD"; then
10952 +  if test -n "$ac_tool_prefix"; then
10953 +    echo "$as_me:$LINENO: checking for file" >&5
10954 +echo $ECHO_N "checking for file... $ECHO_C" >&6
10955 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
10956 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10957 +else
10958 +  case $MAGIC_CMD in
10959 +  /*)
10960 +  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
10961 +  ;;
10962 +  ?:/*)
10963 +  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
10964 +  ;;
10965 +  *)
10966 +  ac_save_MAGIC_CMD="$MAGIC_CMD"
10967 +  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
10968 +  ac_dummy="/usr/bin:$PATH"
10969 +  for ac_dir in $ac_dummy; do
10970 +    test -z "$ac_dir" && ac_dir=.
10971 +    if test -f $ac_dir/file; then
10972 +      lt_cv_path_MAGIC_CMD="$ac_dir/file"
10973 +      if test -n "$file_magic_test_file"; then
10974 +       case $deplibs_check_method in
10975 +       "file_magic "*)
10976 +         file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
10977 +         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
10978 +         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10979 +           egrep "$file_magic_regex" > /dev/null; then
10980 +           :
10981 +         else
10982 +           cat <<EOF 1>&2
10983 +
10984 +*** Warning: the command libtool uses to detect shared libraries,
10985 +*** $file_magic_cmd, produces output that libtool cannot recognize.
10986 +*** The result is that libtool may fail to recognize shared libraries
10987 +*** as such.  This will affect the creation of libtool libraries that
10988 +*** depend on shared libraries, but programs linked with such libtool
10989 +*** libraries will work regardless of this problem.  Nevertheless, you
10990 +*** may want to report the problem to your system manager and/or to
10991 +*** bug-libtool@gnu.org
10992 +
10993 +EOF
10994 +         fi ;;
10995 +       esac
10996 +      fi
10997 +      break
10998 +    fi
10999 +  done
11000 +  IFS="$ac_save_ifs"
11001 +  MAGIC_CMD="$ac_save_MAGIC_CMD"
11002 +  ;;
11003 +esac
11004 +fi
11005 +
11006 +MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
11007 +if test -n "$MAGIC_CMD"; then
11008 +  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
11009 +echo "${ECHO_T}$MAGIC_CMD" >&6
11010 +else
11011 +  echo "$as_me:$LINENO: result: no" >&5
11012 +echo "${ECHO_T}no" >&6
11013 +fi
11014 +
11015 +  else
11016 +    MAGIC_CMD=:
11017 +  fi
11018 +fi
11019 +
11020 +  fi
11021 +  ;;
11022 +esac
11023 +
11024 +if test -n "$ac_tool_prefix"; then
11025 +  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
11026 +set dummy ${ac_tool_prefix}ranlib; ac_word=$2
11027 +echo "$as_me:$LINENO: checking for $ac_word" >&5
11028 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11029 +if test "${ac_cv_prog_RANLIB+set}" = set; then
11030 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11031 +else
11032 +  if test -n "$RANLIB"; then
11033 +  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
11034 +else
11035 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11036 +for as_dir in $PATH
11037 +do
11038 +  IFS=$as_save_IFS
11039 +  test -z "$as_dir" && as_dir=.
11040 +  for ac_exec_ext in '' $ac_executable_extensions; do
11041 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11042 +    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
11043 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11044 +    break 2
11045 +  fi
11046 +done
11047 +done
11048 +
11049 +fi
11050 +fi
11051 +RANLIB=$ac_cv_prog_RANLIB
11052 +if test -n "$RANLIB"; then
11053 +  echo "$as_me:$LINENO: result: $RANLIB" >&5
11054 +echo "${ECHO_T}$RANLIB" >&6
11055 +else
11056 +  echo "$as_me:$LINENO: result: no" >&5
11057 +echo "${ECHO_T}no" >&6
11058 +fi
11059 +
11060 +fi
11061 +if test -z "$ac_cv_prog_RANLIB"; then
11062 +  ac_ct_RANLIB=$RANLIB
11063 +  # Extract the first word of "ranlib", so it can be a program name with args.
11064 +set dummy ranlib; ac_word=$2
11065 +echo "$as_me:$LINENO: checking for $ac_word" >&5
11066 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11067 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
11068 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11069 +else
11070 +  if test -n "$ac_ct_RANLIB"; then
11071 +  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
11072 +else
11073 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11074 +for as_dir in $PATH
11075 +do
11076 +  IFS=$as_save_IFS
11077 +  test -z "$as_dir" && as_dir=.
11078 +  for ac_exec_ext in '' $ac_executable_extensions; do
11079 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11080 +    ac_cv_prog_ac_ct_RANLIB="ranlib"
11081 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11082 +    break 2
11083 +  fi
11084 +done
11085 +done
11086 +
11087 +  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
11088 +fi
11089 +fi
11090 +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
11091 +if test -n "$ac_ct_RANLIB"; then
11092 +  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
11093 +echo "${ECHO_T}$ac_ct_RANLIB" >&6
11094 +else
11095 +  echo "$as_me:$LINENO: result: no" >&5
11096 +echo "${ECHO_T}no" >&6
11097 +fi
11098 +
11099 +  RANLIB=$ac_ct_RANLIB
11100 +else
11101 +  RANLIB="$ac_cv_prog_RANLIB"
11102 +fi
11103 +
11104 +if test -n "$ac_tool_prefix"; then
11105 +  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
11106 +set dummy ${ac_tool_prefix}strip; ac_word=$2
11107 +echo "$as_me:$LINENO: checking for $ac_word" >&5
11108 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11109 +if test "${ac_cv_prog_STRIP+set}" = set; then
11110 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11111 +else
11112 +  if test -n "$STRIP"; then
11113 +  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
11114 +else
11115 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11116 +for as_dir in $PATH
11117 +do
11118 +  IFS=$as_save_IFS
11119 +  test -z "$as_dir" && as_dir=.
11120 +  for ac_exec_ext in '' $ac_executable_extensions; do
11121 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11122 +    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
11123 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11124 +    break 2
11125 +  fi
11126 +done
11127 +done
11128 +
11129 +fi
11130 +fi
11131 +STRIP=$ac_cv_prog_STRIP
11132 +if test -n "$STRIP"; then
11133 +  echo "$as_me:$LINENO: result: $STRIP" >&5
11134 +echo "${ECHO_T}$STRIP" >&6
11135 +else
11136 +  echo "$as_me:$LINENO: result: no" >&5
11137 +echo "${ECHO_T}no" >&6
11138 +fi
11139 +
11140 +fi
11141 +if test -z "$ac_cv_prog_STRIP"; then
11142 +  ac_ct_STRIP=$STRIP
11143 +  # Extract the first word of "strip", so it can be a program name with args.
11144 +set dummy strip; ac_word=$2
11145 +echo "$as_me:$LINENO: checking for $ac_word" >&5
11146 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11147 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
11148 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11149 +else
11150 +  if test -n "$ac_ct_STRIP"; then
11151 +  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
11152 +else
11153 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11154 +for as_dir in $PATH
11155 +do
11156 +  IFS=$as_save_IFS
11157 +  test -z "$as_dir" && as_dir=.
11158 +  for ac_exec_ext in '' $ac_executable_extensions; do
11159 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11160 +    ac_cv_prog_ac_ct_STRIP="strip"
11161 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11162 +    break 2
11163 +  fi
11164 +done
11165 +done
11166 +
11167 +  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
11168 +fi
11169 +fi
11170 +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
11171 +if test -n "$ac_ct_STRIP"; then
11172 +  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
11173 +echo "${ECHO_T}$ac_ct_STRIP" >&6
11174 +else
11175 +  echo "$as_me:$LINENO: result: no" >&5
11176 +echo "${ECHO_T}no" >&6
11177 +fi
11178 +
11179 +  STRIP=$ac_ct_STRIP
11180 +else
11181 +  STRIP="$ac_cv_prog_STRIP"
11182 +fi
11183 +
11184 +
11185 +enable_dlopen=no
11186 +enable_win32_dll=no
11187 +
11188 +# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
11189 +if test "${enable_libtool_lock+set}" = set; then
11190 +  enableval="$enable_libtool_lock"
11191 +  
11192 +fi; 
11193 +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
11194 +
11195 +# Some flags need to be propagated to the compiler or linker for good
11196 +# libtool support.
11197 +case $host in
11198 +*-*-irix6*)
11199 +  # Find out which ABI we are using.
11200 +  echo '#line __oline__ "configure"' > conftest.$ac_ext
11201 +  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11202 +  (eval $ac_compile) 2>&5
11203 +  ac_status=$?
11204 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11205 +  (exit $ac_status); }; then
11206 +    case `/usr/bin/file conftest.$ac_objext` in
11207 +    *32-bit*)
11208 +      LD="${LD-ld} -32"
11209 +      ;;
11210 +    *N32*)
11211 +      LD="${LD-ld} -n32"
11212 +      ;;
11213 +    *64-bit*)
11214 +      LD="${LD-ld} -64"
11215 +      ;;
11216 +    esac
11217 +  fi
11218 +  rm -rf conftest*
11219 +  ;;
11220 +
11221 +*-*-sco3.2v5*)
11222 +  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
11223 +  SAVE_CFLAGS="$CFLAGS"
11224 +  CFLAGS="$CFLAGS -belf"
11225 +  echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
11226 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
11227 +if test "${lt_cv_cc_needs_belf+set}" = set; then
11228 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11229 +else
11230 +  
11231 +
11232 +     ac_ext=c
11233 +ac_cpp='$CPP $CPPFLAGS'
11234 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11235 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11236 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
11237 +
11238 +     cat >conftest.$ac_ext <<_ACEOF
11239 +#line $LINENO "configure"
11240 +#include "confdefs.h"
11241 +
11242 +int
11243 +main ()
11244 +{
11245 +
11246 +  ;
11247 +  return 0;
11248 +}
11249 +_ACEOF
11250 +rm -f conftest.$ac_objext conftest$ac_exeext
11251 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11252 +  (eval $ac_link) 2>&5
11253 +  ac_status=$?
11254 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11255 +  (exit $ac_status); } &&
11256 +         { ac_try='test -s conftest$ac_exeext'
11257 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11258 +  (eval $ac_try) 2>&5
11259 +  ac_status=$?
11260 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11261 +  (exit $ac_status); }; }; then
11262 +  lt_cv_cc_needs_belf=yes
11263 +else
11264 +  echo "$as_me: failed program was:" >&5
11265 +cat conftest.$ac_ext >&5
11266 +lt_cv_cc_needs_belf=no
11267 +fi
11268 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11269 +     ac_ext=c
11270 +ac_cpp='$CPP $CPPFLAGS'
11271 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11272 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11273 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
11274 +
11275 +fi
11276 +echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
11277 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
11278 +  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
11279 +    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
11280 +    CFLAGS="$SAVE_CFLAGS"
11281 +  fi
11282 +  ;;
11283 +
11284 +
11285 +esac
11286 +
11287 +# Sed substitution that helps us do robust quoting.  It backslashifies
11288 +# metacharacters that are still active within double-quoted strings.
11289 +Xsed='sed -e s/^X//'
11290 +sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
11291 +
11292 +# Same as above, but do not quote variable references.
11293 +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
11294 +
11295 +# Sed substitution to delay expansion of an escaped shell variable in a
11296 +# double_quote_subst'ed string.
11297 +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
11298 +
11299 +# Constants:
11300 +rm="rm -f"
11301 +
11302 +# Global variables:
11303 +default_ofile=libtool
11304 +can_build_shared=yes
11305 +
11306 +# All known linkers require a `.a' archive for static linking (except M$VC,
11307 +# which needs '.lib').
11308 +libext=a
11309 +ltmain="$ac_aux_dir/ltmain.sh"
11310 +ofile="$default_ofile"
11311 +with_gnu_ld="$lt_cv_prog_gnu_ld"
11312 +need_locks="$enable_libtool_lock"
11313 +
11314 +old_CC="$CC"
11315 +old_CFLAGS="$CFLAGS"
11316 +
11317 +# Set sane defaults for various variables
11318 +test -z "$AR" && AR=ar
11319 +test -z "$AR_FLAGS" && AR_FLAGS=cru
11320 +test -z "$AS" && AS=as
11321 +test -z "$CC" && CC=cc
11322 +test -z "$DLLTOOL" && DLLTOOL=dlltool
11323 +test -z "$LD" && LD=ld
11324 +test -z "$LN_S" && LN_S="ln -s"
11325 +test -z "$MAGIC_CMD" && MAGIC_CMD=file
11326 +test -z "$NM" && NM=nm
11327 +test -z "$OBJDUMP" && OBJDUMP=objdump
11328 +test -z "$RANLIB" && RANLIB=:
11329 +test -z "$STRIP" && STRIP=:
11330 +test -z "$ac_objext" && ac_objext=o
11331 +
11332 +if test x"$host" != x"$build"; then
11333 +  ac_tool_prefix=${host_alias}-
11334 +else
11335 +  ac_tool_prefix=
11336 +fi
11337 +
11338 +# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
11339 +case $host_os in
11340 +linux-gnu*) ;;
11341 +linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
11342 +esac
11343 +
11344 +case $host_os in
11345 +aix3*)
11346 +  # AIX sometimes has problems with the GCC collect2 program.  For some
11347 +  # reason, if we set the COLLECT_NAMES environment variable, the problems
11348 +  # vanish in a puff of smoke.
11349 +  if test "X${COLLECT_NAMES+set}" != Xset; then
11350 +    COLLECT_NAMES=
11351 +    export COLLECT_NAMES
11352 +  fi
11353 +  ;;
11354 +esac
11355 +
11356 +# Determine commands to create old-style static archives.
11357 +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
11358 +old_postinstall_cmds='chmod 644 $oldlib'
11359 +old_postuninstall_cmds=
11360 +
11361 +if test -n "$RANLIB"; then
11362 +  case $host_os in
11363 +  openbsd*)
11364 +    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
11365 +    ;;
11366 +  *)
11367 +    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
11368 +    ;;
11369 +  esac
11370 +  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
11371 +fi
11372 +
11373 +# Allow CC to be a program name with arguments.
11374 +set dummy $CC
11375 +compiler="$2"
11376 +
11377 +echo "$as_me:$LINENO: checking for objdir" >&5
11378 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6
11379 +rm -f .libs 2>/dev/null
11380 +mkdir .libs 2>/dev/null
11381 +if test -d .libs; then
11382 +  objdir=.libs
11383 +else
11384 +  # MS-DOS does not allow filenames that begin with a dot.
11385 +  objdir=_libs
11386 +fi
11387 +rmdir .libs 2>/dev/null
11388 +echo "$as_me:$LINENO: result: $objdir" >&5
11389 +echo "${ECHO_T}$objdir" >&6
11390 +
11391 +
11392 +
11393 +# Check whether --with-pic or --without-pic was given.
11394 +if test "${with_pic+set}" = set; then
11395 +  withval="$with_pic"
11396 +  pic_mode="$withval"
11397 +else
11398 +  pic_mode=default
11399 +fi; 
11400 +test -z "$pic_mode" && pic_mode=default
11401 +
11402 +# We assume here that the value for lt_cv_prog_cc_pic will not be cached
11403 +# in isolation, and that seeing it set (from the cache) indicates that
11404 +# the associated values are set (in the cache) correctly too.
11405 +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
11406 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
11407 +if test "${lt_cv_prog_cc_pic+set}" = set; then
11408 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11409 +else
11410 +   lt_cv_prog_cc_pic=
11411 +  lt_cv_prog_cc_shlib=
11412 +  lt_cv_prog_cc_wl=
11413 +  lt_cv_prog_cc_static=
11414 +  lt_cv_prog_cc_no_builtin=
11415 +  lt_cv_prog_cc_can_build_shared=$can_build_shared
11416 +
11417 +  if test "$GCC" = yes; then
11418 +    lt_cv_prog_cc_wl='-Wl,'
11419 +    lt_cv_prog_cc_static='-static'
11420 +
11421 +    case $host_os in
11422 +    aix*)
11423 +      # Below there is a dirty hack to force normal static linking with -ldl
11424 +      # The problem is because libdl dynamically linked with both libc and
11425 +      # libC (AIX C++ library), which obviously doesn't included in libraries
11426 +      # list by gcc. This cause undefined symbols with -static flags.
11427 +      # This hack allows C programs to be linked with "-static -ldl", but
11428 +      # not sure about C++ programs.
11429 +      lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
11430 +      ;;
11431 +    amigaos*)
11432 +      # FIXME: we need at least 68020 code to build shared libraries, but
11433 +      # adding the `-m68020' flag to GCC prevents building anything better,
11434 +      # like `-m68040'.
11435 +      lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
11436 +      ;;
11437 +    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
11438 +      # PIC is the default for these OSes.
11439 +      ;;
11440 +    darwin* | rhapsody*)
11441 +      # PIC is the default on this platform
11442 +      # Common symbols not allowed in MH_DYLIB files
11443 +      lt_cv_prog_cc_pic='-fno-common'
11444 +      ;;
11445 +    cygwin* | mingw* | pw32* | os2*)
11446 +      # This hack is so that the source file can tell whether it is being
11447 +      # built for inclusion in a dll (and should export symbols for example).
11448 +      lt_cv_prog_cc_pic='-DDLL_EXPORT'
11449 +      ;;
11450 +    sysv4*MP*)
11451 +      if test -d /usr/nec; then
11452 +        lt_cv_prog_cc_pic=-Kconform_pic
11453 +      fi
11454 +      ;;
11455 +    *)
11456 +      lt_cv_prog_cc_pic='-fPIC'
11457 +      ;;
11458 +    esac
11459 +  else
11460 +    # PORTME Check for PIC flags for the system compiler.
11461 +    case $host_os in
11462 +    aix3* | aix4* | aix5*)
11463 +      lt_cv_prog_cc_wl='-Wl,'
11464 +      # All AIX code is PIC.
11465 +      if test "$host_cpu" = ia64; then
11466 +       # AIX 5 now supports IA64 processor
11467 +       lt_cv_prog_cc_static='-Bstatic'
11468 +      else
11469 +       lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
11470 +      fi
11471 +      ;;
11472 +
11473 +    hpux9* | hpux10* | hpux11*)
11474 +      # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
11475 +      lt_cv_prog_cc_wl='-Wl,'
11476 +      lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
11477 +      lt_cv_prog_cc_pic='+Z'
11478 +      ;;
11479 +
11480 +    irix5* | irix6*)
11481 +      lt_cv_prog_cc_wl='-Wl,'
11482 +      lt_cv_prog_cc_static='-non_shared'
11483 +      # PIC (with -KPIC) is the default.
11484 +      ;;
11485 +
11486 +    cygwin* | mingw* | pw32* | os2*)
11487 +      # This hack is so that the source file can tell whether it is being
11488 +      # built for inclusion in a dll (and should export symbols for example).
11489 +      lt_cv_prog_cc_pic='-DDLL_EXPORT'
11490 +      ;;
11491 +
11492 +    newsos6)
11493 +      lt_cv_prog_cc_pic='-KPIC'
11494 +      lt_cv_prog_cc_static='-Bstatic'
11495 +      ;;
11496 +
11497 +    osf3* | osf4* | osf5*)
11498 +      # All OSF/1 code is PIC.
11499 +      lt_cv_prog_cc_wl='-Wl,'
11500 +      lt_cv_prog_cc_static='-non_shared'
11501 +      ;;
11502 +
11503 +    sco3.2v5*)
11504 +      lt_cv_prog_cc_pic='-Kpic'
11505 +      lt_cv_prog_cc_static='-dn'
11506 +      lt_cv_prog_cc_shlib='-belf'
11507 +      ;;
11508 +
11509 +    solaris*)
11510 +      lt_cv_prog_cc_pic='-KPIC'
11511 +      lt_cv_prog_cc_static='-Bstatic'
11512 +      lt_cv_prog_cc_wl='-Wl,'
11513 +      ;;
11514 +
11515 +    sunos4*)
11516 +      lt_cv_prog_cc_pic='-PIC'
11517 +      lt_cv_prog_cc_static='-Bstatic'
11518 +      lt_cv_prog_cc_wl='-Qoption ld '
11519 +      ;;
11520 +
11521 +    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
11522 +      lt_cv_prog_cc_pic='-KPIC'
11523 +      lt_cv_prog_cc_static='-Bstatic'
11524 +      if test "x$host_vendor" = xsni; then
11525 +       lt_cv_prog_cc_wl='-LD'
11526 +      else
11527 +       lt_cv_prog_cc_wl='-Wl,'
11528 +      fi
11529 +      ;;
11530 +
11531 +    uts4*)
11532 +      lt_cv_prog_cc_pic='-pic'
11533 +      lt_cv_prog_cc_static='-Bstatic'
11534 +      ;;
11535 +
11536 +    sysv4*MP*)
11537 +      if test -d /usr/nec ;then
11538 +       lt_cv_prog_cc_pic='-Kconform_pic'
11539 +       lt_cv_prog_cc_static='-Bstatic'
11540 +      fi
11541 +      ;;
11542 +
11543 +    *)
11544 +      lt_cv_prog_cc_can_build_shared=no
11545 +      ;;
11546 +    esac
11547 +  fi
11548 +
11549 +fi
11550 +
11551 +if test -z "$lt_cv_prog_cc_pic"; then
11552 +  echo "$as_me:$LINENO: result: none" >&5
11553 +echo "${ECHO_T}none" >&6
11554 +else
11555 +  echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic" >&5
11556 +echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6
11557 +
11558 +  # Check to make sure the pic_flag actually works.
11559 +  echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
11560 +echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6
11561 +  if test "${lt_cv_prog_cc_pic_works+set}" = set; then
11562 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11563 +else
11564 +      save_CFLAGS="$CFLAGS"
11565 +    CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
11566 +    cat >conftest.$ac_ext <<_ACEOF
11567 +#line $LINENO "configure"
11568 +#include "confdefs.h"
11569 +
11570 +int
11571 +main ()
11572 +{
11573 +
11574 +  ;
11575 +  return 0;
11576 +}
11577 +_ACEOF
11578 +rm -f conftest.$ac_objext
11579 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11580 +  (eval $ac_compile) 2>&5
11581 +  ac_status=$?
11582 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11583 +  (exit $ac_status); } &&
11584 +         { ac_try='test -s conftest.$ac_objext'
11585 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11586 +  (eval $ac_try) 2>&5
11587 +  ac_status=$?
11588 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11589 +  (exit $ac_status); }; }; then
11590 +        case $host_os in
11591 +      hpux9* | hpux10* | hpux11*)
11592 +       # On HP-UX, both CC and GCC only warn that PIC is supported... then
11593 +       # they create non-PIC objects.  So, if there were any warnings, we
11594 +       # assume that PIC is not supported.
11595 +       if test -s conftest.err; then
11596 +         lt_cv_prog_cc_pic_works=no
11597 +       else
11598 +         lt_cv_prog_cc_pic_works=yes
11599 +       fi
11600 +       ;;
11601 +      *)
11602 +       lt_cv_prog_cc_pic_works=yes
11603 +       ;;
11604 +      esac
11605 +    
11606 +else
11607 +  echo "$as_me: failed program was:" >&5
11608 +cat conftest.$ac_ext >&5
11609 +      lt_cv_prog_cc_pic_works=no
11610 +    
11611 +fi
11612 +rm -f conftest.$ac_objext conftest.$ac_ext
11613 +    CFLAGS="$save_CFLAGS"
11614 +  
11615 +fi
11616 +
11617 +
11618 +  if test "X$lt_cv_prog_cc_pic_works" = Xno; then
11619 +    lt_cv_prog_cc_pic=
11620 +    lt_cv_prog_cc_can_build_shared=no
11621 +  else
11622 +    lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
11623 +  fi
11624 +
11625 +  echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5
11626 +echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6
11627 +fi
11628 +
11629 +# Check for any special shared library compilation flags.
11630 +if test -n "$lt_cv_prog_cc_shlib"; then
11631 +  { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5
11632 +echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;}
11633 +  if echo "$old_CC $old_CFLAGS " | egrep -e "[         ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
11634 +  else
11635 +   { echo "$as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
11636 +echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
11637 +    lt_cv_prog_cc_can_build_shared=no
11638 +  fi
11639 +fi
11640 +
11641 +echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
11642 +echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6
11643 +if test "${lt_cv_prog_cc_static_works+set}" = set; then
11644 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11645 +else
11646 +    lt_cv_prog_cc_static_works=no
11647 +  save_LDFLAGS="$LDFLAGS"
11648 +  LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
11649 +  cat >conftest.$ac_ext <<_ACEOF
11650 +#line $LINENO "configure"
11651 +#include "confdefs.h"
11652 +
11653 +int
11654 +main ()
11655 +{
11656 +
11657 +  ;
11658 +  return 0;
11659 +}
11660 +_ACEOF
11661 +rm -f conftest.$ac_objext conftest$ac_exeext
11662 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11663 +  (eval $ac_link) 2>&5
11664 +  ac_status=$?
11665 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11666 +  (exit $ac_status); } &&
11667 +         { ac_try='test -s conftest$ac_exeext'
11668 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11669 +  (eval $ac_try) 2>&5
11670 +  ac_status=$?
11671 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11672 +  (exit $ac_status); }; }; then
11673 +  lt_cv_prog_cc_static_works=yes
11674 +else
11675 +  echo "$as_me: failed program was:" >&5
11676 +cat conftest.$ac_ext >&5
11677 +fi
11678 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11679 +  LDFLAGS="$save_LDFLAGS"
11680 +
11681 +fi
11682 +
11683 +
11684 +# Belt *and* braces to stop my trousers falling down:
11685 +test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
11686 +echo "$as_me:$LINENO: result: $lt_cv_prog_cc_static_works" >&5
11687 +echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6
11688 +
11689 +pic_flag="$lt_cv_prog_cc_pic"
11690 +special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
11691 +wl="$lt_cv_prog_cc_wl"
11692 +link_static_flag="$lt_cv_prog_cc_static"
11693 +no_builtin_flag="$lt_cv_prog_cc_no_builtin"
11694 +can_build_shared="$lt_cv_prog_cc_can_build_shared"
11695 +
11696 +
11697 +# Check to see if options -o and -c are simultaneously supported by compiler
11698 +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
11699 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
11700 +if test "${lt_cv_compiler_c_o+set}" = set; then
11701 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11702 +else
11703 +  
11704 +$rm -r conftest 2>/dev/null
11705 +mkdir conftest
11706 +cd conftest
11707 +echo "int some_variable = 0;" > conftest.$ac_ext
11708 +mkdir out
11709 +# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
11710 +# that will create temporary files in the current directory regardless of
11711 +# the output directory.  Thus, making CWD read-only will cause this test
11712 +# to fail, enabling locking or at least warning the user not to do parallel
11713 +# builds.
11714 +chmod -w .
11715 +save_CFLAGS="$CFLAGS"
11716 +CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
11717 +compiler_c_o=no
11718 +if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
11719 +  # The compiler can only warn and ignore the option if not recognized
11720 +  # So say no if there are warnings
11721 +  if test -s out/conftest.err; then
11722 +    lt_cv_compiler_c_o=no
11723 +  else
11724 +    lt_cv_compiler_c_o=yes
11725 +  fi
11726 +else
11727 +  # Append any errors to the config.log.
11728 +  cat out/conftest.err 1>&5
11729 +  lt_cv_compiler_c_o=no
11730 +fi
11731 +CFLAGS="$save_CFLAGS"
11732 +chmod u+w .
11733 +$rm conftest* out/*
11734 +rmdir out
11735 +cd ..
11736 +rmdir conftest
11737 +$rm -r conftest 2>/dev/null
11738 +
11739 +fi
11740 +
11741 +compiler_c_o=$lt_cv_compiler_c_o
11742 +echo "$as_me:$LINENO: result: $compiler_c_o" >&5
11743 +echo "${ECHO_T}$compiler_c_o" >&6
11744 +
11745 +if test x"$compiler_c_o" = x"yes"; then
11746 +  # Check to see if we can write to a .lo
11747 +  echo "$as_me:$LINENO: checking if $compiler supports -c -o file.lo" >&5
11748 +echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6
11749 +  if test "${lt_cv_compiler_o_lo+set}" = set; then
11750 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11751 +else
11752 +  
11753 +  lt_cv_compiler_o_lo=no
11754 +  save_CFLAGS="$CFLAGS"
11755 +  CFLAGS="$CFLAGS -c -o conftest.lo"
11756 +  save_objext="$ac_objext"
11757 +  ac_objext=lo
11758 +  cat >conftest.$ac_ext <<_ACEOF
11759 +#line $LINENO "configure"
11760 +#include "confdefs.h"
11761 +
11762 +int
11763 +main ()
11764 +{
11765 +int some_variable = 0;
11766 +  ;
11767 +  return 0;
11768 +}
11769 +_ACEOF
11770 +rm -f conftest.$ac_objext
11771 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11772 +  (eval $ac_compile) 2>&5
11773 +  ac_status=$?
11774 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11775 +  (exit $ac_status); } &&
11776 +         { ac_try='test -s conftest.$ac_objext'
11777 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11778 +  (eval $ac_try) 2>&5
11779 +  ac_status=$?
11780 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11781 +  (exit $ac_status); }; }; then
11782 +      # The compiler can only warn and ignore the option if not recognized
11783 +    # So say no if there are warnings
11784 +    if test -s conftest.err; then
11785 +      lt_cv_compiler_o_lo=no
11786 +    else
11787 +      lt_cv_compiler_o_lo=yes
11788 +    fi
11789 +  
11790 +else
11791 +  echo "$as_me: failed program was:" >&5
11792 +cat conftest.$ac_ext >&5
11793 +fi
11794 +rm -f conftest.$ac_objext conftest.$ac_ext
11795 +  ac_objext="$save_objext"
11796 +  CFLAGS="$save_CFLAGS"
11797 +  
11798 +fi
11799 +
11800 +  compiler_o_lo=$lt_cv_compiler_o_lo
11801 +  echo "$as_me:$LINENO: result: $compiler_o_lo" >&5
11802 +echo "${ECHO_T}$compiler_o_lo" >&6
11803 +else
11804 +  compiler_o_lo=no
11805 +fi
11806 +
11807 +# Check to see if we can do hard links to lock some files if needed
11808 +hard_links="nottested"
11809 +if test "$compiler_c_o" = no && test "$need_locks" != no; then
11810 +  # do not overwrite the value of need_locks provided by the user
11811 +  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
11812 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
11813 +  hard_links=yes
11814 +  $rm conftest*
11815 +  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11816 +  touch conftest.a
11817 +  ln conftest.a conftest.b 2>&5 || hard_links=no
11818 +  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11819 +  echo "$as_me:$LINENO: result: $hard_links" >&5
11820 +echo "${ECHO_T}$hard_links" >&6
11821 +  if test "$hard_links" = no; then
11822 +    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
11823 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
11824 +    need_locks=warn
11825 +  fi
11826 +else
11827 +  need_locks=no
11828 +fi
11829 +
11830 +if test "$GCC" = yes; then
11831 +  # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
11832 +  echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
11833 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
11834 +  echo "int some_variable = 0;" > conftest.$ac_ext
11835 +  save_CFLAGS="$CFLAGS"
11836 +  CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
11837 +  compiler_rtti_exceptions=no
11838 +  cat >conftest.$ac_ext <<_ACEOF
11839 +#line $LINENO "configure"
11840 +#include "confdefs.h"
11841 +
11842 +int
11843 +main ()
11844 +{
11845 +int some_variable = 0;
11846 +  ;
11847 +  return 0;
11848 +}
11849 +_ACEOF
11850 +rm -f conftest.$ac_objext
11851 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11852 +  (eval $ac_compile) 2>&5
11853 +  ac_status=$?
11854 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11855 +  (exit $ac_status); } &&
11856 +         { ac_try='test -s conftest.$ac_objext'
11857 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11858 +  (eval $ac_try) 2>&5
11859 +  ac_status=$?
11860 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11861 +  (exit $ac_status); }; }; then
11862 +      # The compiler can only warn and ignore the option if not recognized
11863 +    # So say no if there are warnings
11864 +    if test -s conftest.err; then
11865 +      compiler_rtti_exceptions=no
11866 +    else
11867 +      compiler_rtti_exceptions=yes
11868 +    fi
11869 +  
11870 +else
11871 +  echo "$as_me: failed program was:" >&5
11872 +cat conftest.$ac_ext >&5
11873 +fi
11874 +rm -f conftest.$ac_objext conftest.$ac_ext
11875 +  CFLAGS="$save_CFLAGS"
11876 +  echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5
11877 +echo "${ECHO_T}$compiler_rtti_exceptions" >&6
11878 +
11879 +  if test "$compiler_rtti_exceptions" = "yes"; then
11880 +    no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
11881 +  else
11882 +    no_builtin_flag=' -fno-builtin'
11883 +  fi
11884 +fi
11885 +
11886 +# See if the linker supports building shared libraries.
11887 +echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared libraries" >&5
11888 +echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6
11889 +
11890 +allow_undefined_flag=
11891 +no_undefined_flag=
11892 +need_lib_prefix=unknown
11893 +need_version=unknown
11894 +# when you set need_version to no, make sure it does not cause -set_version
11895 +# flags to be left without arguments
11896 +archive_cmds=
11897 +archive_expsym_cmds=
11898 +old_archive_from_new_cmds=
11899 +old_archive_from_expsyms_cmds=
11900 +export_dynamic_flag_spec=
11901 +whole_archive_flag_spec=
11902 +thread_safe_flag_spec=
11903 +hardcode_into_libs=no
11904 +hardcode_libdir_flag_spec=
11905 +hardcode_libdir_separator=
11906 +hardcode_direct=no
11907 +hardcode_minus_L=no
11908 +hardcode_shlibpath_var=unsupported
11909 +runpath_var=
11910 +link_all_deplibs=unknown
11911 +always_export_symbols=no
11912 +export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
11913 +# include_expsyms should be a list of space-separated symbols to be *always*
11914 +# included in the symbol list
11915 +include_expsyms=
11916 +# exclude_expsyms can be an egrep regular expression of symbols to exclude
11917 +# it will be wrapped by ` (' and `)$', so one must not match beginning or
11918 +# end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
11919 +# as well as any symbol that contains `d'.
11920 +exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
11921 +# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11922 +# platforms (ab)use it in PIC code, but their linkers get confused if
11923 +# the symbol is explicitly referenced.  Since portable code cannot
11924 +# rely on this symbol name, it's probably fine to never include it in
11925 +# preloaded symbol tables.
11926 +extract_expsyms_cmds=
11927 +
11928 +case $host_os in
11929 +cygwin* | mingw* | pw32*)
11930 +  # FIXME: the MSVC++ port hasn't been tested in a loooong time
11931 +  # When not using gcc, we currently assume that we are using
11932 +  # Microsoft Visual C++.
11933 +  if test "$GCC" != yes; then
11934 +    with_gnu_ld=no
11935 +  fi
11936 +  ;;
11937 +openbsd*)
11938 +  with_gnu_ld=no
11939 +  ;;
11940 +esac
11941 +
11942 +ld_shlibs=yes
11943 +if test "$with_gnu_ld" = yes; then
11944 +  # If archive_cmds runs LD, not CC, wlarc should be empty
11945 +  wlarc='${wl}'
11946 +
11947 +  # See if GNU ld supports shared libraries.
11948 +  case $host_os in
11949 +  aix3* | aix4* | aix5*)
11950 +    # On AIX, the GNU linker is very broken
11951 +    # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
11952 +    ld_shlibs=no
11953 +    cat <<EOF 1>&2
11954 +
11955 +*** Warning: the GNU linker, at least up to release 2.9.1, is reported
11956 +*** to be unable to reliably create shared libraries on AIX.
11957 +*** Therefore, libtool is disabling shared libraries support.  If you
11958 +*** really care for shared libraries, you may want to modify your PATH
11959 +*** so that a non-GNU linker is found, and then restart.
11960 +
11961 +EOF
11962 +    ;;
11963 +
11964 +  amigaos*)
11965 +    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
11966 +    hardcode_libdir_flag_spec='-L$libdir'
11967 +    hardcode_minus_L=yes
11968 +
11969 +    # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
11970 +    # that the semantics of dynamic libraries on AmigaOS, at least up
11971 +    # to version 4, is to share data among multiple programs linked
11972 +    # with the same dynamic library.  Since this doesn't match the
11973 +    # behavior of shared libraries on other platforms, we can use
11974 +    # them.
11975 +    ld_shlibs=no
11976 +    ;;
11977 +
11978 +  beos*)
11979 +    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
11980 +      allow_undefined_flag=unsupported
11981 +      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11982 +      # support --undefined.  This deserves some investigation.  FIXME
11983 +      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11984 +    else
11985 +      ld_shlibs=no
11986 +    fi
11987 +    ;;
11988 +
11989 +  cygwin* | mingw* | pw32*)
11990 +    # hardcode_libdir_flag_spec is actually meaningless, as there is
11991 +    # no search path for DLLs.
11992 +    hardcode_libdir_flag_spec='-L$libdir'
11993 +    allow_undefined_flag=unsupported
11994 +    always_export_symbols=yes
11995 +
11996 +    extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
11997 +      sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
11998 +      test -f $output_objdir/impgen.exe || (cd $output_objdir && \
11999 +      if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
12000 +      else $CC -o impgen impgen.c ; fi)~
12001 +      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
12002 +
12003 +    old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
12004 +
12005 +    # cygwin and mingw dlls have different entry points and sets of symbols
12006 +    # to exclude.
12007 +    # FIXME: what about values for MSVC?
12008 +    dll_entry=__cygwin_dll_entry@12
12009 +    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
12010 +    case $host_os in
12011 +    mingw*)
12012 +      # mingw values
12013 +      dll_entry=_DllMainCRTStartup@12
12014 +      dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
12015 +      ;;
12016 +    esac
12017 +
12018 +    # mingw and cygwin differ, and it's simplest to just exclude the union
12019 +    # of the two symbol sets.
12020 +    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
12021 +
12022 +    # recent cygwin and mingw systems supply a stub DllMain which the user
12023 +    # can override, but on older systems we have to supply one (in ltdll.c)
12024 +    if test "x$lt_cv_need_dllmain" = "xyes"; then
12025 +      ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
12026 +      ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
12027 +       test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
12028 +    else
12029 +      ltdll_obj=
12030 +      ltdll_cmds=
12031 +    fi
12032 +
12033 +    # Extract the symbol export list from an `--export-all' def file,
12034 +    # then regenerate the def file from the symbol export list, so that
12035 +    # the compiled dll only exports the symbol export list.
12036 +    # Be careful not to strip the DATA tag left be newer dlltools.
12037 +    export_symbols_cmds="$ltdll_cmds"'
12038 +      $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
12039 +      sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
12040 +
12041 +    # If the export-symbols file already is a .def file (1st line
12042 +    # is EXPORTS), use it as is.
12043 +    # If DATA tags from a recent dlltool are present, honour them!
12044 +    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
12045 +       cp $export_symbols $output_objdir/$soname-def;
12046 +      else
12047 +       echo EXPORTS > $output_objdir/$soname-def;
12048 +       _lt_hint=1;
12049 +       cat $export_symbols | while read symbol; do
12050 +        set dummy \$symbol;
12051 +        case \$# in
12052 +          2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
12053 +          *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
12054 +        esac;
12055 +        _lt_hint=`expr 1 + \$_lt_hint`;
12056 +       done;
12057 +      fi~
12058 +      '"$ltdll_cmds"'
12059 +      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
12060 +      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
12061 +      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
12062 +      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
12063 +      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
12064 +    ;;
12065 +
12066 +  netbsd*)
12067 +    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
12068 +      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
12069 +      wlarc=
12070 +    else
12071 +      archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
12072 +      archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
12073 +    fi
12074 +    ;;
12075 +
12076 +  solaris* | sysv5*)
12077 +    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
12078 +      ld_shlibs=no
12079 +      cat <<EOF 1>&2
12080 +
12081 +*** Warning: The releases 2.8.* of the GNU linker cannot reliably
12082 +*** create shared libraries on Solaris systems.  Therefore, libtool
12083 +*** is disabling shared libraries support.  We urge you to upgrade GNU
12084 +*** binutils to release 2.9.1 or newer.  Another option is to modify
12085 +*** your PATH or compiler configuration so that the native linker is
12086 +*** used, and then restart.
12087 +
12088 +EOF
12089 +    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
12090 +      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
12091 +      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
12092 +    else
12093 +      ld_shlibs=no
12094 +    fi
12095 +    ;;
12096 +
12097 +  sunos4*)
12098 +    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12099 +    wlarc=
12100 +    hardcode_direct=yes
12101 +    hardcode_shlibpath_var=no
12102 +    ;;
12103 +
12104 +  *)
12105 +    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
12106 +      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
12107 +      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
12108 +    else
12109 +      ld_shlibs=no
12110 +    fi
12111 +    ;;
12112 +  esac
12113 +
12114 +  if test "$ld_shlibs" = yes; then
12115 +    runpath_var=LD_RUN_PATH
12116 +    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
12117 +    export_dynamic_flag_spec='${wl}--export-dynamic'
12118 +    case $host_os in
12119 +    cygwin* | mingw* | pw32*)
12120 +      # dlltool doesn't understand --whole-archive et. al.
12121 +      whole_archive_flag_spec=
12122 +      ;;
12123 +    *)
12124 +      # ancient GNU ld didn't support --whole-archive et. al.
12125 +      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
12126 +       whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
12127 +      else
12128 +       whole_archive_flag_spec=
12129 +      fi
12130 +      ;;
12131 +    esac
12132 +  fi
12133 +else
12134 +  # PORTME fill in a description of your system's linker (not GNU ld)
12135 +  case $host_os in
12136 +  aix3*)
12137 +    allow_undefined_flag=unsupported
12138 +    always_export_symbols=yes
12139 +    archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
12140 +    # Note: this linker hardcodes the directories in LIBPATH if there
12141 +    # are no directories specified by -L.
12142 +    hardcode_minus_L=yes
12143 +    if test "$GCC" = yes && test -z "$link_static_flag"; then
12144 +      # Neither direct hardcoding nor static linking is supported with a
12145 +      # broken collect2.
12146 +      hardcode_direct=unsupported
12147 +    fi
12148 +    ;;
12149 +
12150 +  aix4* | aix5*)
12151 +    if test "$host_cpu" = ia64; then
12152 +      # On IA64, the linker does run time linking by default, so we don't
12153 +      # have to do anything special.
12154 +      aix_use_runtimelinking=no
12155 +      exp_sym_flag='-Bexport'
12156 +      no_entry_flag=""
12157 +    else
12158 +      aix_use_runtimelinking=no
12159 +
12160 +      # Test if we are trying to use run time linking or normal
12161 +      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
12162 +      # need to do runtime linking.
12163 +      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
12164 +       for ld_flag in $LDFLAGS; do
12165 +         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
12166 +           aix_use_runtimelinking=yes
12167 +           break
12168 +         fi
12169 +       done
12170 +      esac
12171 +
12172 +      exp_sym_flag='-bexport'
12173 +      no_entry_flag='-bnoentry'
12174 +    fi
12175 +
12176 +    # When large executables or shared objects are built, AIX ld can
12177 +    # have problems creating the table of contents.  If linking a library
12178 +    # or program results in "error TOC overflow" add -mminimal-toc to
12179 +    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
12180 +    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
12181 +
12182 +    hardcode_direct=yes
12183 +    archive_cmds=''
12184 +    hardcode_libdir_separator=':'
12185 +    if test "$GCC" = yes; then
12186 +      case $host_os in aix4.[012]|aix4.[012].*)
12187 +       collect2name=`${CC} -print-prog-name=collect2`
12188 +       if test -f "$collect2name" && \
12189 +         strings "$collect2name" | grep resolve_lib_name >/dev/null
12190 +       then
12191 +         # We have reworked collect2
12192 +         hardcode_direct=yes
12193 +       else
12194 +         # We have old collect2
12195 +         hardcode_direct=unsupported
12196 +         # It fails to find uninstalled libraries when the uninstalled
12197 +         # path is not listed in the libpath.  Setting hardcode_minus_L
12198 +         # to unsupported forces relinking
12199 +         hardcode_minus_L=yes
12200 +         hardcode_libdir_flag_spec='-L$libdir'
12201 +         hardcode_libdir_separator=
12202 +       fi
12203 +      esac
12204 +
12205 +      shared_flag='-shared'
12206 +    else
12207 +      # not using gcc
12208 +      if test "$host_cpu" = ia64; then
12209 +       shared_flag='${wl}-G'
12210 +      else
12211 +       if test "$aix_use_runtimelinking" = yes; then
12212 +         shared_flag='${wl}-G'
12213 +       else
12214 +         shared_flag='${wl}-bM:SRE'
12215 +       fi
12216 +      fi
12217 +    fi
12218 +
12219 +    # It seems that -bexpall can do strange things, so it is better to
12220 +    # generate a list of symbols to export.
12221 +    always_export_symbols=yes
12222 +    if test "$aix_use_runtimelinking" = yes; then
12223 +      # Warning - without using the other runtime loading flags (-brtl),
12224 +      # -berok will link without error, but may produce a broken library.
12225 +      allow_undefined_flag='-berok'
12226 +      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
12227 +      archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
12228 +    else
12229 +      if test "$host_cpu" = ia64; then
12230 +       hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
12231 +       allow_undefined_flag="-z nodefs"
12232 +       archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
12233 +      else
12234 +       hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
12235 +       # Warning - without using the other run time loading flags,
12236 +       # -berok will link without error, but may produce a broken library.
12237 +       allow_undefined_flag='${wl}-berok'
12238 +       # This is a bit strange, but is similar to how AIX traditionally builds
12239 +       # it's shared libraries.
12240 +       archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
12241 +      fi
12242 +    fi
12243 +    ;;
12244 +
12245 +  amigaos*)
12246 +    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
12247 +    hardcode_libdir_flag_spec='-L$libdir'
12248 +    hardcode_minus_L=yes
12249 +    # see comment about different semantics on the GNU ld section
12250 +    ld_shlibs=no
12251 +    ;;
12252 +
12253 +  cygwin* | mingw* | pw32*)
12254 +    # When not using gcc, we currently assume that we are using
12255 +    # Microsoft Visual C++.
12256 +    # hardcode_libdir_flag_spec is actually meaningless, as there is
12257 +    # no search path for DLLs.
12258 +    hardcode_libdir_flag_spec=' '
12259 +    allow_undefined_flag=unsupported
12260 +    # Tell ltmain to make .lib files, not .a files.
12261 +    libext=lib
12262 +    # FIXME: Setting linknames here is a bad hack.
12263 +    archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
12264 +    # The linker will automatically build a .lib file if we build a DLL.
12265 +    old_archive_from_new_cmds='true'
12266 +    # FIXME: Should let the user specify the lib program.
12267 +    old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
12268 +    fix_srcfile_path='`cygpath -w "$srcfile"`'
12269 +    ;;
12270 +
12271 +  darwin* | rhapsody*)
12272 +    case "$host_os" in
12273 +    rhapsody* | darwin1.[012])
12274 +      allow_undefined_flag='-undefined suppress'
12275 +      ;;
12276 +    *) # Darwin 1.3 on
12277 +      allow_undefined_flag='-flat_namespace -undefined suppress'
12278 +      ;;
12279 +    esac
12280 +    # FIXME: Relying on posixy $() will cause problems for
12281 +    #        cross-compilation, but unfortunately the echo tests do not
12282 +    #        yet detect zsh echo's removal of \ escapes.
12283 +    archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
12284 +    # We need to add '_' to the symbols in $export_symbols first
12285 +    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
12286 +    hardcode_direct=yes
12287 +    hardcode_shlibpath_var=no
12288 +    whole_archive_flag_spec='-all_load $convenience'
12289 +    ;;
12290 +
12291 +  freebsd1*)
12292 +    ld_shlibs=no
12293 +    ;;
12294 +
12295 +  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12296 +  # support.  Future versions do this automatically, but an explicit c++rt0.o
12297 +  # does not break anything, and helps significantly (at the cost of a little
12298 +  # extra space).
12299 +  freebsd2.2*)
12300 +    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12301 +    hardcode_libdir_flag_spec='-R$libdir'
12302 +    hardcode_direct=yes
12303 +    hardcode_shlibpath_var=no
12304 +    ;;
12305 +
12306 +  # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12307 +  freebsd2*)
12308 +    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12309 +    hardcode_direct=yes
12310 +    hardcode_minus_L=yes
12311 +    hardcode_shlibpath_var=no
12312 +    ;;
12313 +
12314 +  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12315 +  freebsd*)
12316 +    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
12317 +    hardcode_libdir_flag_spec='-R$libdir'
12318 +    hardcode_direct=yes
12319 +    hardcode_shlibpath_var=no
12320 +    ;;
12321 +
12322 +  hpux9* | hpux10* | hpux11*)
12323 +    case $host_os in
12324 +    hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
12325 +    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
12326 +    esac
12327 +    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
12328 +    hardcode_libdir_separator=:
12329 +    hardcode_direct=yes
12330 +    hardcode_minus_L=yes # Not in the search PATH, but as the default
12331 +                        # location of the library.
12332 +    export_dynamic_flag_spec='${wl}-E'
12333 +    ;;
12334 +
12335 +  irix5* | irix6*)
12336 +    if test "$GCC" = yes; then
12337 +      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
12338 +    else
12339 +      archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
12340 +    fi
12341 +    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
12342 +    hardcode_libdir_separator=:
12343 +    link_all_deplibs=yes
12344 +    ;;
12345 +
12346 +  netbsd*)
12347 +    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
12348 +      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12349 +    else
12350 +      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12351 +    fi
12352 +    hardcode_libdir_flag_spec='-R$libdir'
12353 +    hardcode_direct=yes
12354 +    hardcode_shlibpath_var=no
12355 +    ;;
12356 +
12357 +  newsos6)
12358 +    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12359 +    hardcode_direct=yes
12360 +    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
12361 +    hardcode_libdir_separator=:
12362 +    hardcode_shlibpath_var=no
12363 +    ;;
12364 +
12365 +  openbsd*)
12366 +    hardcode_direct=yes
12367 +    hardcode_shlibpath_var=no
12368 +    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
12369 +      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
12370 +      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
12371 +      export_dynamic_flag_spec='${wl}-E'
12372 +    else
12373 +      case "$host_os" in
12374 +      openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
12375 +       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12376 +       hardcode_libdir_flag_spec='-R$libdir'
12377 +        ;;
12378 +      *)
12379 +        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
12380 +        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
12381 +        ;;
12382 +      esac
12383 +    fi
12384 +    ;;
12385 +
12386 +  os2*)
12387 +    hardcode_libdir_flag_spec='-L$libdir'
12388 +    hardcode_minus_L=yes
12389 +    allow_undefined_flag=unsupported
12390 +    archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
12391 +    old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
12392 +    ;;
12393 +
12394 +  osf3*)
12395 +    if test "$GCC" = yes; then
12396 +      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
12397 +      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
12398 +    else
12399 +      allow_undefined_flag=' -expect_unresolved \*'
12400 +      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
12401 +    fi
12402 +    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
12403 +    hardcode_libdir_separator=:
12404 +    ;;
12405 +
12406 +  osf4* | osf5*)       # as osf3* with the addition of -msym flag
12407 +    if test "$GCC" = yes; then
12408 +      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
12409 +      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
12410 +      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
12411 +    else
12412 +      allow_undefined_flag=' -expect_unresolved \*'
12413 +      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
12414 +      archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
12415 +      $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
12416 +
12417 +      #Both c and cxx compiler support -rpath directly
12418 +      hardcode_libdir_flag_spec='-rpath $libdir'
12419 +    fi
12420 +    hardcode_libdir_separator=:
12421 +    ;;
12422 +
12423 +  sco3.2v5*)
12424 +    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12425 +    hardcode_shlibpath_var=no
12426 +    runpath_var=LD_RUN_PATH
12427 +    hardcode_runpath_var=yes
12428 +    export_dynamic_flag_spec='${wl}-Bexport'
12429 +    ;;
12430 +
12431 +  solaris*)
12432 +    # gcc --version < 3.0 without binutils cannot create self contained
12433 +    # shared libraries reliably, requiring libgcc.a to resolve some of
12434 +    # the object symbols generated in some cases.  Libraries that use
12435 +    # assert need libgcc.a to resolve __eprintf, for example.  Linking
12436 +    # a copy of libgcc.a into every shared library to guarantee resolving
12437 +    # such symbols causes other problems:  According to Tim Van Holder
12438 +    # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
12439 +    # (to the application) exception stack for one thing.
12440 +    no_undefined_flag=' -z defs'
12441 +    if test "$GCC" = yes; then
12442 +      case `$CC --version 2>/dev/null` in
12443 +      [12].*)
12444 +       cat <<EOF 1>&2
12445 +
12446 +*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
12447 +*** create self contained shared libraries on Solaris systems, without
12448 +*** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
12449 +*** -no-undefined support, which will at least allow you to build shared
12450 +*** libraries.  However, you may find that when you link such libraries
12451 +*** into an application without using GCC, you have to manually add
12452 +*** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
12453 +*** upgrade to a newer version of GCC.  Another option is to rebuild your
12454 +*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
12455 +
12456 +EOF
12457 +        no_undefined_flag=
12458 +       ;;
12459 +      esac
12460 +    fi
12461 +    # $CC -shared without GNU ld will not create a library from C++
12462 +    # object files and a static libstdc++, better avoid it by now
12463 +    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
12464 +    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
12465 +               $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
12466 +    hardcode_libdir_flag_spec='-R$libdir'
12467 +    hardcode_shlibpath_var=no
12468 +    case $host_os in
12469 +    solaris2.[0-5] | solaris2.[0-5].*) ;;
12470 +    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
12471 +      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
12472 +    esac
12473 +    link_all_deplibs=yes
12474 +    ;;
12475 +
12476 +  sunos4*)
12477 +    if test "x$host_vendor" = xsequent; then
12478 +      # Use $CC to link under sequent, because it throws in some extra .o
12479 +      # files that make .init and .fini sections work.
12480 +      archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12481 +    else
12482 +      archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12483 +    fi
12484 +    hardcode_libdir_flag_spec='-L$libdir'
12485 +    hardcode_direct=yes
12486 +    hardcode_minus_L=yes
12487 +    hardcode_shlibpath_var=no
12488 +    ;;
12489 +
12490 +  sysv4)
12491 +    if test "x$host_vendor" = xsno; then
12492 +      archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
12493 +      hardcode_direct=yes # is this really true???
12494 +    else
12495 +      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12496 +      hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12497 +    fi
12498 +    runpath_var='LD_RUN_PATH'
12499 +    hardcode_shlibpath_var=no
12500 +    ;;
12501 +
12502 +  sysv4.3*)
12503 +    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12504 +    hardcode_shlibpath_var=no
12505 +    export_dynamic_flag_spec='-Bexport'
12506 +    ;;
12507 +
12508 +  sysv5*)
12509 +    no_undefined_flag=' -z text'
12510 +    # $CC -shared without GNU ld will not create a library from C++
12511 +    # object files and a static libstdc++, better avoid it by now
12512 +    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
12513 +    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
12514 +               $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
12515 +    hardcode_libdir_flag_spec=
12516 +    hardcode_shlibpath_var=no
12517 +    runpath_var='LD_RUN_PATH'
12518 +    ;;
12519 +
12520 +  uts4*)
12521 +    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12522 +    hardcode_libdir_flag_spec='-L$libdir'
12523 +    hardcode_shlibpath_var=no
12524 +    ;;
12525 +
12526 +  dgux*)
12527 +    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12528 +    hardcode_libdir_flag_spec='-L$libdir'
12529 +    hardcode_shlibpath_var=no
12530 +    ;;
12531 +
12532 +  sysv4*MP*)
12533 +    if test -d /usr/nec; then
12534 +      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12535 +      hardcode_shlibpath_var=no
12536 +      runpath_var=LD_RUN_PATH
12537 +      hardcode_runpath_var=yes
12538 +      ld_shlibs=yes
12539 +    fi
12540 +    ;;
12541 +
12542 +  sysv4.2uw2*)
12543 +    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12544 +    hardcode_direct=yes
12545 +    hardcode_minus_L=no
12546 +    hardcode_shlibpath_var=no
12547 +    hardcode_runpath_var=yes
12548 +    runpath_var=LD_RUN_PATH
12549 +    ;;
12550 +
12551 +  sysv5uw7* | unixware7*)
12552 +    no_undefined_flag='${wl}-z ${wl}text'
12553 +    if test "$GCC" = yes; then
12554 +      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
12555 +    else
12556 +      archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
12557 +    fi
12558 +    runpath_var='LD_RUN_PATH'
12559 +    hardcode_shlibpath_var=no
12560 +    ;;
12561 +
12562 +  *)
12563 +    ld_shlibs=no
12564 +    ;;
12565 +  esac
12566 +fi
12567 +echo "$as_me:$LINENO: result: $ld_shlibs" >&5
12568 +echo "${ECHO_T}$ld_shlibs" >&6
12569 +test "$ld_shlibs" = no && can_build_shared=no
12570 +
12571 +# Check hardcoding attributes.
12572 +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
12573 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
12574 +hardcode_action=
12575 +if test -n "$hardcode_libdir_flag_spec" || \
12576 +   test -n "$runpath_var"; then
12577 +
12578 +  # We can hardcode non-existant directories.
12579 +  if test "$hardcode_direct" != no &&
12580 +     # If the only mechanism to avoid hardcoding is shlibpath_var, we
12581 +     # have to relink, otherwise we might link with an installed library
12582 +     # when we should be linking with a yet-to-be-installed one
12583 +     ## test "$hardcode_shlibpath_var" != no &&
12584 +     test "$hardcode_minus_L" != no; then
12585 +    # Linking always hardcodes the temporary library directory.
12586 +    hardcode_action=relink
12587 +  else
12588 +    # We can link without hardcoding, and we can hardcode nonexisting dirs.
12589 +    hardcode_action=immediate
12590 +  fi
12591 +else
12592 +  # We cannot hardcode anything, or else we can only hardcode existing
12593 +  # directories.
12594 +  hardcode_action=unsupported
12595 +fi
12596 +echo "$as_me:$LINENO: result: $hardcode_action" >&5
12597 +echo "${ECHO_T}$hardcode_action" >&6
12598 +
12599 +striplib=
12600 +old_striplib=
12601 +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
12602 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
12603 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
12604 +  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
12605 +  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
12606 +  echo "$as_me:$LINENO: result: yes" >&5
12607 +echo "${ECHO_T}yes" >&6
12608 +else
12609 +  echo "$as_me:$LINENO: result: no" >&5
12610 +echo "${ECHO_T}no" >&6
12611 +fi
12612 +
12613 +reload_cmds='$LD$reload_flag -o $output$reload_objs'
12614 +test -z "$deplibs_check_method" && deplibs_check_method=unknown
12615 +
12616 +# PORTME Fill in your ld.so characteristics
12617 +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
12618 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
12619 +library_names_spec=
12620 +libname_spec='lib$name'
12621 +soname_spec=
12622 +postinstall_cmds=
12623 +postuninstall_cmds=
12624 +finish_cmds=
12625 +finish_eval=
12626 +shlibpath_var=
12627 +shlibpath_overrides_runpath=unknown
12628 +version_type=none
12629 +dynamic_linker="$host_os ld.so"
12630 +sys_lib_dlsearch_path_spec="/lib /usr/lib"
12631 +sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12632 +
12633 +case $host_os in
12634 +aix3*)
12635 +  version_type=linux
12636 +  library_names_spec='${libname}${release}.so$versuffix $libname.a'
12637 +  shlibpath_var=LIBPATH
12638 +
12639 +  # AIX has no versioning support, so we append a major version to the name.
12640 +  soname_spec='${libname}${release}.so$major'
12641 +  ;;
12642 +
12643 +aix4* | aix5*)
12644 +  version_type=linux
12645 +  if test "$host_cpu" = ia64; then
12646 +    # AIX 5 supports IA64
12647 +    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
12648 +    shlibpath_var=LD_LIBRARY_PATH
12649 +  else
12650 +    # With GCC up to 2.95.x, collect2 would create an import file
12651 +    # for dependence libraries.  The import file would start with
12652 +    # the line `#! .'.  This would cause the generated library to
12653 +    # depend on `.', always an invalid library.  This was fixed in
12654 +    # development snapshots of GCC prior to 3.0.
12655 +    case $host_os in
12656 +      aix4 | aix4.[01] | aix4.[01].*)
12657 +       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12658 +            echo ' yes '
12659 +            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
12660 +         :
12661 +       else
12662 +         can_build_shared=no
12663 +       fi
12664 +       ;;
12665 +    esac
12666 +    # AIX (on Power*) has no versioning support, so currently we can
12667 +    # not hardcode correct soname into executable. Probably we can
12668 +    # add versioning support to collect2, so additional links can
12669 +    # be useful in future.
12670 +    if test "$aix_use_runtimelinking" = yes; then
12671 +      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
12672 +      # instead of lib<name>.a to let people know that these are not
12673 +      # typical AIX shared libraries.
12674 +      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
12675 +    else
12676 +      # We preserve .a as extension for shared libraries through AIX4.2
12677 +      # and later when we are not doing run time linking.
12678 +      library_names_spec='${libname}${release}.a $libname.a'
12679 +      soname_spec='${libname}${release}.so$major'
12680 +    fi
12681 +    shlibpath_var=LIBPATH
12682 +  fi
12683 +  ;;
12684 +
12685 +amigaos*)
12686 +  library_names_spec='$libname.ixlibrary $libname.a'
12687 +  # Create ${libname}_ixlibrary.a entries in /sys/libs.
12688 +  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
12689 +  ;;
12690 +
12691 +beos*)
12692 +  library_names_spec='${libname}.so'
12693 +  dynamic_linker="$host_os ld.so"
12694 +  shlibpath_var=LIBRARY_PATH
12695 +  ;;
12696 +
12697 +bsdi4*)
12698 +  version_type=linux
12699 +  need_version=no
12700 +  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
12701 +  soname_spec='${libname}${release}.so$major'
12702 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
12703 +  shlibpath_var=LD_LIBRARY_PATH
12704 +  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
12705 +  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
12706 +  export_dynamic_flag_spec=-rdynamic
12707 +  # the default ld.so.conf also contains /usr/contrib/lib and
12708 +  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
12709 +  # libtool to hard-code these into programs
12710 +  ;;
12711 +
12712 +cygwin* | mingw* | pw32*)
12713 +  version_type=windows
12714 +  need_version=no
12715 +  need_lib_prefix=no
12716 +  case $GCC,$host_os in
12717 +  yes,cygwin*)
12718 +    library_names_spec='$libname.dll.a'
12719 +    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
12720 +    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
12721 +      dldir=$destdir/`dirname \$dlpath`~
12722 +      test -d \$dldir || mkdir -p \$dldir~
12723 +      $install_prog .libs/$dlname \$dldir/$dlname'
12724 +    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
12725 +      dlpath=$dir/\$dldll~
12726 +       $rm \$dlpath'
12727 +    ;;
12728 +  yes,mingw*)
12729 +    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
12730 +    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
12731 +    ;;
12732 +  yes,pw32*)
12733 +    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
12734 +    ;;
12735 +  *)
12736 +    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
12737 +    ;;
12738 +  esac
12739 +  dynamic_linker='Win32 ld.exe'
12740 +  # FIXME: first we should search . and the directory the executable is in
12741 +  shlibpath_var=PATH
12742 +  ;;
12743 +
12744 +darwin* | rhapsody*)
12745 +  dynamic_linker="$host_os dyld"
12746 +  version_type=darwin
12747 +  need_lib_prefix=no
12748 +  need_version=no
12749 +  # FIXME: Relying on posixy $() will cause problems for
12750 +  #        cross-compilation, but unfortunately the echo tests do not
12751 +  #        yet detect zsh echo's removal of \ escapes.
12752 +  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
12753 +  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
12754 +  shlibpath_overrides_runpath=yes
12755 +  shlibpath_var=DYLD_LIBRARY_PATH
12756 +  ;;
12757 +
12758 +freebsd1*)
12759 +  dynamic_linker=no
12760 +  ;;
12761 +
12762 +freebsd*)
12763 +  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
12764 +  version_type=freebsd-$objformat
12765 +  case $version_type in
12766 +    freebsd-elf*)
12767 +      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
12768 +      need_version=no
12769 +      need_lib_prefix=no
12770 +      ;;
12771 +    freebsd-*)
12772 +      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
12773 +      need_version=yes
12774 +      ;;
12775 +  esac
12776 +  shlibpath_var=LD_LIBRARY_PATH
12777 +  case $host_os in
12778 +  freebsd2*)
12779 +    shlibpath_overrides_runpath=yes
12780 +    ;;
12781 +  *)
12782 +    shlibpath_overrides_runpath=no
12783 +    hardcode_into_libs=yes
12784 +    ;;
12785 +  esac
12786 +  ;;
12787 +
12788 +gnu*)
12789 +  version_type=linux
12790 +  need_lib_prefix=no
12791 +  need_version=no
12792 +  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
12793 +  soname_spec='${libname}${release}.so$major'
12794 +  shlibpath_var=LD_LIBRARY_PATH
12795 +  hardcode_into_libs=yes
12796 +  ;;
12797 +
12798 +hpux9* | hpux10* | hpux11*)
12799 +  # Give a soname corresponding to the major version so that dld.sl refuses to
12800 +  # link against other versions.
12801 +  dynamic_linker="$host_os dld.sl"
12802 +  version_type=sunos
12803 +  need_lib_prefix=no
12804 +  need_version=no
12805 +  shlibpath_var=SHLIB_PATH
12806 +  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
12807 +  library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
12808 +  soname_spec='${libname}${release}.sl$major'
12809 +  # HP-UX runs *really* slowly unless shared libraries are mode 555.
12810 +  postinstall_cmds='chmod 555 $lib'
12811 +  ;;
12812 +
12813 +irix5* | irix6*)
12814 +  version_type=irix
12815 +  need_lib_prefix=no
12816 +  need_version=no
12817 +  soname_spec='${libname}${release}.so$major'
12818 +  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
12819 +  case $host_os in
12820 +  irix5*)
12821 +    libsuff= shlibsuff=
12822 +    ;;
12823 +  *)
12824 +    case $LD in # libtool.m4 will add one of these switches to LD
12825 +    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
12826 +    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
12827 +    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
12828 +    *) libsuff= shlibsuff= libmagic=never-match;;
12829 +    esac
12830 +    ;;
12831 +  esac
12832 +  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
12833 +  shlibpath_overrides_runpath=no
12834 +  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
12835 +  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
12836 +  ;;
12837 +
12838 +# No shared lib support for Linux oldld, aout, or coff.
12839 +linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
12840 +  dynamic_linker=no
12841 +  ;;
12842 +
12843 +# This must be Linux ELF.
12844 +linux-gnu*)
12845 +  version_type=linux
12846 +  need_lib_prefix=no
12847 +  need_version=no
12848 +  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
12849 +  soname_spec='${libname}${release}.so$major'
12850 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
12851 +  shlibpath_var=LD_LIBRARY_PATH
12852 +  shlibpath_overrides_runpath=no
12853 +  # This implies no fast_install, which is unacceptable.
12854 +  # Some rework will be needed to allow for fast_install
12855 +  # before this can be enabled.
12856 +  hardcode_into_libs=yes
12857 +
12858 +  # We used to test for /lib/ld.so.1 and disable shared libraries on
12859 +  # powerpc, because MkLinux only supported shared libraries with the
12860 +  # GNU dynamic linker.  Since this was broken with cross compilers,
12861 +  # most powerpc-linux boxes support dynamic linking these days and
12862 +  # people can always --disable-shared, the test was removed, and we
12863 +  # assume the GNU/Linux dynamic linker is in use.
12864 +  dynamic_linker='GNU/Linux ld.so'
12865 +  ;;
12866 +
12867 +netbsd*)
12868 +  version_type=sunos
12869 +  need_lib_prefix=no
12870 +  need_version=no
12871 +  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
12872 +    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
12873 +    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
12874 +    dynamic_linker='NetBSD (a.out) ld.so'
12875 +  else
12876 +    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
12877 +    soname_spec='${libname}${release}.so$major'
12878 +    dynamic_linker='NetBSD ld.elf_so'
12879 +  fi
12880 +  shlibpath_var=LD_LIBRARY_PATH
12881 +  shlibpath_overrides_runpath=yes
12882 +  hardcode_into_libs=yes
12883 +  ;;
12884 +
12885 +newsos6)
12886 +  version_type=linux
12887 +  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
12888 +  shlibpath_var=LD_LIBRARY_PATH
12889 +  shlibpath_overrides_runpath=yes
12890 +  ;;
12891 +
12892 +openbsd*)
12893 +  version_type=sunos
12894 +  need_lib_prefix=no
12895 +  need_version=no
12896 +  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
12897 +    case "$host_os" in
12898 +    openbsd2.[89] | openbsd2.[89].*)
12899 +      shlibpath_overrides_runpath=no
12900 +      ;;
12901 +    *)
12902 +      shlibpath_overrides_runpath=yes
12903 +      ;;
12904 +    esac
12905 +  else
12906 +    shlibpath_overrides_runpath=yes
12907 +  fi
12908 +  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
12909 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
12910 +  shlibpath_var=LD_LIBRARY_PATH
12911 +  ;;
12912 +
12913 +os2*)
12914 +  libname_spec='$name'
12915 +  need_lib_prefix=no
12916 +  library_names_spec='$libname.dll $libname.a'
12917 +  dynamic_linker='OS/2 ld.exe'
12918 +  shlibpath_var=LIBPATH
12919 +  ;;
12920 +
12921 +osf3* | osf4* | osf5*)
12922 +  version_type=osf
12923 +  need_version=no
12924 +  soname_spec='${libname}${release}.so'
12925 +  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
12926 +  shlibpath_var=LD_LIBRARY_PATH
12927 +  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
12928 +  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
12929 +  ;;
12930 +
12931 +sco3.2v5*)
12932 +  version_type=osf
12933 +  soname_spec='${libname}${release}.so$major'
12934 +  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
12935 +  shlibpath_var=LD_LIBRARY_PATH
12936 +  ;;
12937 +
12938 +solaris*)
12939 +  version_type=linux
12940 +  need_lib_prefix=no
12941 +  need_version=no
12942 +  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
12943 +  soname_spec='${libname}${release}.so$major'
12944 +  shlibpath_var=LD_LIBRARY_PATH
12945 +  shlibpath_overrides_runpath=yes
12946 +  hardcode_into_libs=yes
12947 +  # ldd complains unless libraries are executable
12948 +  postinstall_cmds='chmod +x $lib'
12949 +  ;;
12950 +
12951 +sunos4*)
12952 +  version_type=sunos
12953 +  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
12954 +  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
12955 +  shlibpath_var=LD_LIBRARY_PATH
12956 +  shlibpath_overrides_runpath=yes
12957 +  if test "$with_gnu_ld" = yes; then
12958 +    need_lib_prefix=no
12959 +  fi
12960 +  need_version=yes
12961 +  ;;
12962 +
12963 +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12964 +  version_type=linux
12965 +  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
12966 +  soname_spec='${libname}${release}.so$major'
12967 +  shlibpath_var=LD_LIBRARY_PATH
12968 +  case $host_vendor in
12969 +    sni)
12970 +      shlibpath_overrides_runpath=no
12971 +      ;;
12972 +    motorola)
12973 +      need_lib_prefix=no
12974 +      need_version=no
12975 +      shlibpath_overrides_runpath=no
12976 +      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
12977 +      ;;
12978 +  esac
12979 +  ;;
12980 +
12981 +uts4*)
12982 +  version_type=linux
12983 +  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
12984 +  soname_spec='${libname}${release}.so$major'
12985 +  shlibpath_var=LD_LIBRARY_PATH
12986 +  ;;
12987 +
12988 +dgux*)
12989 +  version_type=linux
12990 +  need_lib_prefix=no
12991 +  need_version=no
12992 +  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
12993 +  soname_spec='${libname}${release}.so$major'
12994 +  shlibpath_var=LD_LIBRARY_PATH
12995 +  ;;
12996 +
12997 +sysv4*MP*)
12998 +  if test -d /usr/nec ;then
12999 +    version_type=linux
13000 +    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
13001 +    soname_spec='$libname.so.$major'
13002 +    shlibpath_var=LD_LIBRARY_PATH
13003 +  fi
13004 +  ;;
13005 +
13006 +*)
13007 +  dynamic_linker=no
13008 +  ;;
13009 +esac
13010 +echo "$as_me:$LINENO: result: $dynamic_linker" >&5
13011 +echo "${ECHO_T}$dynamic_linker" >&6
13012 +test "$dynamic_linker" = no && can_build_shared=no
13013 +
13014 +# Report the final consequences.
13015 +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
13016 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
13017 +echo "$as_me:$LINENO: result: $can_build_shared" >&5
13018 +echo "${ECHO_T}$can_build_shared" >&6
13019 +
13020 +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
13021 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
13022 +test "$can_build_shared" = "no" && enable_shared=no
13023 +
13024 +# On AIX, shared libraries and static libraries use the same namespace, and
13025 +# are all built from PIC.
13026 +case "$host_os" in
13027 +aix3*)
13028 +  test "$enable_shared" = yes && enable_static=no
13029 +  if test -n "$RANLIB"; then
13030 +    archive_cmds="$archive_cmds~\$RANLIB \$lib"
13031 +    postinstall_cmds='$RANLIB $lib'
13032 +  fi
13033 +  ;;
13034 +
13035 +aix4*)
13036 +  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
13037 +    test "$enable_shared" = yes && enable_static=no
13038 +  fi
13039 +  ;;
13040 +esac
13041 +echo "$as_me:$LINENO: result: $enable_shared" >&5
13042 +echo "${ECHO_T}$enable_shared" >&6
13043 +
13044 +echo "$as_me:$LINENO: checking whether to build static libraries" >&5
13045 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
13046 +# Make sure either enable_shared or enable_static is yes.
13047 +test "$enable_shared" = yes || enable_static=yes
13048 +echo "$as_me:$LINENO: result: $enable_static" >&5
13049 +echo "${ECHO_T}$enable_static" >&6
13050 +
13051 +if test "$hardcode_action" = relink; then
13052 +  # Fast installation is not supported
13053 +  enable_fast_install=no
13054 +elif test "$shlibpath_overrides_runpath" = yes ||
13055 +     test "$enable_shared" = no; then
13056 +  # Fast installation is not necessary
13057 +  enable_fast_install=needless
13058 +fi
13059 +
13060 +variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13061 +if test "$GCC" = yes; then
13062 +  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13063 +fi
13064 +
13065 +if test "x$enable_dlopen" != xyes; then
13066 +  enable_dlopen=unknown
13067 +  enable_dlopen_self=unknown
13068 +  enable_dlopen_self_static=unknown
13069 +else
13070 +  lt_cv_dlopen=no
13071 +  lt_cv_dlopen_libs=
13072 +
13073 +  case $host_os in
13074 +  beos*)
13075 +    lt_cv_dlopen="load_add_on"
13076 +    lt_cv_dlopen_libs=
13077 +    lt_cv_dlopen_self=yes
13078 +    ;;
13079 +
13080 +  cygwin* | mingw* | pw32*)
13081 +    lt_cv_dlopen="LoadLibrary"
13082 +    lt_cv_dlopen_libs=
13083 +   ;;
13084 +
13085 +  *)
13086 +    echo "$as_me:$LINENO: checking for shl_load" >&5
13087 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
13088 +if test "${ac_cv_func_shl_load+set}" = set; then
13089 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13090 +else
13091 +  cat >conftest.$ac_ext <<_ACEOF
13092 +#line $LINENO "configure"
13093 +#include "confdefs.h"
13094 +/* System header to define __stub macros and hopefully few prototypes,
13095 +    which can conflict with char shl_load (); below.  */
13096 +#include <assert.h>
13097 +/* Override any gcc2 internal prototype to avoid an error.  */
13098 +#ifdef __cplusplus
13099 +extern "C"
13100 +#endif
13101 +/* We use char because int might match the return type of a gcc2
13102 +   builtin and then its argument prototype would still apply.  */
13103 +char shl_load ();
13104 +char (*f) ();
13105 +
13106 +int
13107 +main ()
13108 +{
13109 +/* The GNU C library defines this for functions which it implements
13110 +    to always fail with ENOSYS.  Some functions are actually named
13111 +    something starting with __ and the normal name is an alias.  */
13112 +#if defined (__stub_shl_load) || defined (__stub___shl_load)
13113 +choke me
13114 +#else
13115 +f = shl_load;
13116 +#endif
13117 +
13118 +  ;
13119 +  return 0;
13120 +}
13121 +_ACEOF
13122 +rm -f conftest.$ac_objext conftest$ac_exeext
13123 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13124 +  (eval $ac_link) 2>&5
13125 +  ac_status=$?
13126 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13127 +  (exit $ac_status); } &&
13128 +         { ac_try='test -s conftest$ac_exeext'
13129 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13130 +  (eval $ac_try) 2>&5
13131 +  ac_status=$?
13132 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13133 +  (exit $ac_status); }; }; then
13134 +  ac_cv_func_shl_load=yes
13135 +else
13136 +  echo "$as_me: failed program was:" >&5
13137 +cat conftest.$ac_ext >&5
13138 +ac_cv_func_shl_load=no
13139 +fi
13140 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13141 +fi
13142 +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
13143 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6
13144 +if test $ac_cv_func_shl_load = yes; then
13145 +  lt_cv_dlopen="shl_load"
13146 +else
13147 +  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13148 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
13149 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13150 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13151 +else
13152 +  ac_check_lib_save_LIBS=$LIBS
13153 +LIBS="-ldld  $LIBS"
13154 +cat >conftest.$ac_ext <<_ACEOF
13155 +#line $LINENO "configure"
13156 +#include "confdefs.h"
13157 +
13158 +/* Override any gcc2 internal prototype to avoid an error.  */
13159 +#ifdef __cplusplus
13160 +extern "C"
13161 +#endif
13162 +/* We use char because int might match the return type of a gcc2
13163 +   builtin and then its argument prototype would still apply.  */
13164 +char shl_load ();
13165 +int
13166 +main ()
13167 +{
13168 +shl_load ();
13169 +  ;
13170 +  return 0;
13171 +}
13172 +_ACEOF
13173 +rm -f conftest.$ac_objext conftest$ac_exeext
13174 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13175 +  (eval $ac_link) 2>&5
13176 +  ac_status=$?
13177 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13178 +  (exit $ac_status); } &&
13179 +         { ac_try='test -s conftest$ac_exeext'
13180 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13181 +  (eval $ac_try) 2>&5
13182 +  ac_status=$?
13183 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13184 +  (exit $ac_status); }; }; then
13185 +  ac_cv_lib_dld_shl_load=yes
13186 +else
13187 +  echo "$as_me: failed program was:" >&5
13188 +cat conftest.$ac_ext >&5
13189 +ac_cv_lib_dld_shl_load=no
13190 +fi
13191 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13192 +LIBS=$ac_check_lib_save_LIBS
13193 +fi
13194 +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13195 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
13196 +if test $ac_cv_lib_dld_shl_load = yes; then
13197 +  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
13198 +else
13199 +  echo "$as_me:$LINENO: checking for dlopen" >&5
13200 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
13201 +if test "${ac_cv_func_dlopen+set}" = set; then
13202 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13203 +else
13204 +  cat >conftest.$ac_ext <<_ACEOF
13205 +#line $LINENO "configure"
13206 +#include "confdefs.h"
13207 +/* System header to define __stub macros and hopefully few prototypes,
13208 +    which can conflict with char dlopen (); below.  */
13209 +#include <assert.h>
13210 +/* Override any gcc2 internal prototype to avoid an error.  */
13211 +#ifdef __cplusplus
13212 +extern "C"
13213 +#endif
13214 +/* We use char because int might match the return type of a gcc2
13215 +   builtin and then its argument prototype would still apply.  */
13216 +char dlopen ();
13217 +char (*f) ();
13218 +
13219 +int
13220 +main ()
13221 +{
13222 +/* The GNU C library defines this for functions which it implements
13223 +    to always fail with ENOSYS.  Some functions are actually named
13224 +    something starting with __ and the normal name is an alias.  */
13225 +#if defined (__stub_dlopen) || defined (__stub___dlopen)
13226 +choke me
13227 +#else
13228 +f = dlopen;
13229 +#endif
13230 +
13231 +  ;
13232 +  return 0;
13233 +}
13234 +_ACEOF
13235 +rm -f conftest.$ac_objext conftest$ac_exeext
13236 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13237 +  (eval $ac_link) 2>&5
13238 +  ac_status=$?
13239 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13240 +  (exit $ac_status); } &&
13241 +         { ac_try='test -s conftest$ac_exeext'
13242 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13243 +  (eval $ac_try) 2>&5
13244 +  ac_status=$?
13245 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13246 +  (exit $ac_status); }; }; then
13247 +  ac_cv_func_dlopen=yes
13248 +else
13249 +  echo "$as_me: failed program was:" >&5
13250 +cat conftest.$ac_ext >&5
13251 +ac_cv_func_dlopen=no
13252 +fi
13253 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13254 +fi
13255 +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
13256 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6
13257 +if test $ac_cv_func_dlopen = yes; then
13258 +  lt_cv_dlopen="dlopen"
13259 +else
13260 +  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13261 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
13262 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13263 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13264 +else
13265 +  ac_check_lib_save_LIBS=$LIBS
13266 +LIBS="-ldl  $LIBS"
13267 +cat >conftest.$ac_ext <<_ACEOF
13268 +#line $LINENO "configure"
13269 +#include "confdefs.h"
13270 +
13271 +/* Override any gcc2 internal prototype to avoid an error.  */
13272 +#ifdef __cplusplus
13273 +extern "C"
13274 +#endif
13275 +/* We use char because int might match the return type of a gcc2
13276 +   builtin and then its argument prototype would still apply.  */
13277 +char dlopen ();
13278 +int
13279 +main ()
13280 +{
13281 +dlopen ();
13282 +  ;
13283 +  return 0;
13284 +}
13285 +_ACEOF
13286 +rm -f conftest.$ac_objext conftest$ac_exeext
13287 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13288 +  (eval $ac_link) 2>&5
13289 +  ac_status=$?
13290 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13291 +  (exit $ac_status); } &&
13292 +         { ac_try='test -s conftest$ac_exeext'
13293 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13294 +  (eval $ac_try) 2>&5
13295 +  ac_status=$?
13296 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13297 +  (exit $ac_status); }; }; then
13298 +  ac_cv_lib_dl_dlopen=yes
13299 +else
13300 +  echo "$as_me: failed program was:" >&5
13301 +cat conftest.$ac_ext >&5
13302 +ac_cv_lib_dl_dlopen=no
13303 +fi
13304 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13305 +LIBS=$ac_check_lib_save_LIBS
13306 +fi
13307 +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13308 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
13309 +if test $ac_cv_lib_dl_dlopen = yes; then
13310 +  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
13311 +else
13312 +  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
13313 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
13314 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then
13315 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13316 +else
13317 +  ac_check_lib_save_LIBS=$LIBS
13318 +LIBS="-lsvld  $LIBS"
13319 +cat >conftest.$ac_ext <<_ACEOF
13320 +#line $LINENO "configure"
13321 +#include "confdefs.h"
13322 +
13323 +/* Override any gcc2 internal prototype to avoid an error.  */
13324 +#ifdef __cplusplus
13325 +extern "C"
13326 +#endif
13327 +/* We use char because int might match the return type of a gcc2
13328 +   builtin and then its argument prototype would still apply.  */
13329 +char dlopen ();
13330 +int
13331 +main ()
13332 +{
13333 +dlopen ();
13334 +  ;
13335 +  return 0;
13336 +}
13337 +_ACEOF
13338 +rm -f conftest.$ac_objext conftest$ac_exeext
13339 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13340 +  (eval $ac_link) 2>&5
13341 +  ac_status=$?
13342 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13343 +  (exit $ac_status); } &&
13344 +         { ac_try='test -s conftest$ac_exeext'
13345 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13346 +  (eval $ac_try) 2>&5
13347 +  ac_status=$?
13348 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13349 +  (exit $ac_status); }; }; then
13350 +  ac_cv_lib_svld_dlopen=yes
13351 +else
13352 +  echo "$as_me: failed program was:" >&5
13353 +cat conftest.$ac_ext >&5
13354 +ac_cv_lib_svld_dlopen=no
13355 +fi
13356 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13357 +LIBS=$ac_check_lib_save_LIBS
13358 +fi
13359 +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
13360 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
13361 +if test $ac_cv_lib_svld_dlopen = yes; then
13362 +  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
13363 +else
13364 +  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
13365 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
13366 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then
13367 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13368 +else
13369 +  ac_check_lib_save_LIBS=$LIBS
13370 +LIBS="-ldld  $LIBS"
13371 +cat >conftest.$ac_ext <<_ACEOF
13372 +#line $LINENO "configure"
13373 +#include "confdefs.h"
13374 +
13375 +/* Override any gcc2 internal prototype to avoid an error.  */
13376 +#ifdef __cplusplus
13377 +extern "C"
13378 +#endif
13379 +/* We use char because int might match the return type of a gcc2
13380 +   builtin and then its argument prototype would still apply.  */
13381 +char dld_link ();
13382 +int
13383 +main ()
13384 +{
13385 +dld_link ();
13386 +  ;
13387 +  return 0;
13388 +}
13389 +_ACEOF
13390 +rm -f conftest.$ac_objext conftest$ac_exeext
13391 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13392 +  (eval $ac_link) 2>&5
13393 +  ac_status=$?
13394 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13395 +  (exit $ac_status); } &&
13396 +         { ac_try='test -s conftest$ac_exeext'
13397 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13398 +  (eval $ac_try) 2>&5
13399 +  ac_status=$?
13400 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13401 +  (exit $ac_status); }; }; then
13402 +  ac_cv_lib_dld_dld_link=yes
13403 +else
13404 +  echo "$as_me: failed program was:" >&5
13405 +cat conftest.$ac_ext >&5
13406 +ac_cv_lib_dld_dld_link=no
13407 +fi
13408 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13409 +LIBS=$ac_check_lib_save_LIBS
13410 +fi
13411 +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
13412 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
13413 +if test $ac_cv_lib_dld_dld_link = yes; then
13414 +  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
13415 +fi
13416 +
13417 +             
13418 +fi
13419 +
13420 +           
13421 +fi
13422 +
13423 +         
13424 +fi
13425 +
13426 +       
13427 +fi
13428 +
13429 +      
13430 +fi
13431 +
13432 +    ;;
13433 +  esac
13434 +
13435 +  if test "x$lt_cv_dlopen" != xno; then
13436 +    enable_dlopen=yes
13437 +  else
13438 +    enable_dlopen=no
13439 +  fi
13440 +
13441 +  case $lt_cv_dlopen in
13442 +  dlopen)
13443 +    save_CPPFLAGS="$CPPFLAGS"
13444 +        test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
13445 +
13446 +    save_LDFLAGS="$LDFLAGS"
13447 +    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
13448 +
13449 +    save_LIBS="$LIBS"
13450 +    LIBS="$lt_cv_dlopen_libs $LIBS"
13451 +
13452 +    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
13453 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
13454 +if test "${lt_cv_dlopen_self+set}" = set; then
13455 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13456 +else
13457 +         if test "$cross_compiling" = yes; then :
13458 +  lt_cv_dlopen_self=cross
13459 +else
13460 +    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13461 +  lt_status=$lt_dlunknown
13462 +  cat > conftest.$ac_ext <<EOF
13463 +#line __oline__ "configure"
13464 +#include "confdefs.h"
13465 +
13466 +#if HAVE_DLFCN_H
13467 +#include <dlfcn.h>
13468 +#endif
13469 +
13470 +#include <stdio.h>
13471 +
13472 +#ifdef RTLD_GLOBAL
13473 +#  define LT_DLGLOBAL          RTLD_GLOBAL
13474 +#else
13475 +#  ifdef DL_GLOBAL
13476 +#    define LT_DLGLOBAL                DL_GLOBAL
13477 +#  else
13478 +#    define LT_DLGLOBAL                0
13479 +#  endif
13480 +#endif
13481 +
13482 +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
13483 +   find out it does not work in some platform. */
13484 +#ifndef LT_DLLAZY_OR_NOW
13485 +#  ifdef RTLD_LAZY
13486 +#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
13487 +#  else
13488 +#    ifdef DL_LAZY
13489 +#      define LT_DLLAZY_OR_NOW         DL_LAZY
13490 +#    else
13491 +#      ifdef RTLD_NOW
13492 +#        define LT_DLLAZY_OR_NOW       RTLD_NOW
13493 +#      else
13494 +#        ifdef DL_NOW
13495 +#          define LT_DLLAZY_OR_NOW     DL_NOW
13496 +#        else
13497 +#          define LT_DLLAZY_OR_NOW     0
13498 +#        endif
13499 +#      endif
13500 +#    endif
13501 +#  endif
13502 +#endif
13503 +
13504 +#ifdef __cplusplus
13505 +extern "C" void exit (int);
13506 +#endif
13507 +
13508 +void fnord() { int i=42;}
13509 +int main ()
13510 +{
13511 +  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
13512 +  int status = $lt_dlunknown;
13513 +
13514 +  if (self)
13515 +    {
13516 +      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
13517 +      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
13518 +      /* dlclose (self); */
13519 +    }
13520 +
13521 +    exit (status);
13522 +}
13523 +EOF
13524 +  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13525 +  (eval $ac_link) 2>&5
13526 +  ac_status=$?
13527 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13528 +  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
13529 +    (./conftest; exit; ) 2>/dev/null
13530 +    lt_status=$?
13531 +    case x$lt_status in
13532 +      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
13533 +      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
13534 +      x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
13535 +    esac
13536 +  else :
13537 +    # compilation failed
13538 +    lt_cv_dlopen_self=no
13539 +  fi
13540 +fi
13541 +rm -fr conftest*
13542 +
13543 +    
13544 +fi
13545 +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
13546 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6
13547 +
13548 +    if test "x$lt_cv_dlopen_self" = xyes; then
13549 +      LDFLAGS="$LDFLAGS $link_static_flag"
13550 +      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
13551 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
13552 +if test "${lt_cv_dlopen_self_static+set}" = set; then
13553 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13554 +else
13555 +         if test "$cross_compiling" = yes; then :
13556 +  lt_cv_dlopen_self_static=cross
13557 +else
13558 +    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13559 +  lt_status=$lt_dlunknown
13560 +  cat > conftest.$ac_ext <<EOF
13561 +#line __oline__ "configure"
13562 +#include "confdefs.h"
13563 +
13564 +#if HAVE_DLFCN_H
13565 +#include <dlfcn.h>
13566 +#endif
13567 +
13568 +#include <stdio.h>
13569 +
13570 +#ifdef RTLD_GLOBAL
13571 +#  define LT_DLGLOBAL          RTLD_GLOBAL
13572 +#else
13573 +#  ifdef DL_GLOBAL
13574 +#    define LT_DLGLOBAL                DL_GLOBAL
13575 +#  else
13576 +#    define LT_DLGLOBAL                0
13577 +#  endif
13578 +#endif
13579 +
13580 +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
13581 +   find out it does not work in some platform. */
13582 +#ifndef LT_DLLAZY_OR_NOW
13583 +#  ifdef RTLD_LAZY
13584 +#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
13585 +#  else
13586 +#    ifdef DL_LAZY
13587 +#      define LT_DLLAZY_OR_NOW         DL_LAZY
13588 +#    else
13589 +#      ifdef RTLD_NOW
13590 +#        define LT_DLLAZY_OR_NOW       RTLD_NOW
13591 +#      else
13592 +#        ifdef DL_NOW
13593 +#          define LT_DLLAZY_OR_NOW     DL_NOW
13594 +#        else
13595 +#          define LT_DLLAZY_OR_NOW     0
13596 +#        endif
13597 +#      endif
13598 +#    endif
13599 +#  endif
13600 +#endif
13601 +
13602 +#ifdef __cplusplus
13603 +extern "C" void exit (int);
13604 +#endif
13605 +
13606 +void fnord() { int i=42;}
13607 +int main ()
13608 +{
13609 +  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
13610 +  int status = $lt_dlunknown;
13611 +
13612 +  if (self)
13613 +    {
13614 +      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
13615 +      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
13616 +      /* dlclose (self); */
13617 +    }
13618 +
13619 +    exit (status);
13620 +}
13621 +EOF
13622 +  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13623 +  (eval $ac_link) 2>&5
13624 +  ac_status=$?
13625 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13626 +  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
13627 +    (./conftest; exit; ) 2>/dev/null
13628 +    lt_status=$?
13629 +    case x$lt_status in
13630 +      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
13631 +      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
13632 +      x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
13633 +    esac
13634 +  else :
13635 +    # compilation failed
13636 +    lt_cv_dlopen_self_static=no
13637 +  fi
13638 +fi
13639 +rm -fr conftest*
13640 +
13641 +      
13642 +fi
13643 +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
13644 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
13645 +    fi
13646 +
13647 +    CPPFLAGS="$save_CPPFLAGS"
13648 +    LDFLAGS="$save_LDFLAGS"
13649 +    LIBS="$save_LIBS"
13650 +    ;;
13651 +  esac
13652 +
13653 +  case $lt_cv_dlopen_self in
13654 +  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
13655 +  *) enable_dlopen_self=unknown ;;
13656 +  esac
13657 +
13658 +  case $lt_cv_dlopen_self_static in
13659 +  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
13660 +  *) enable_dlopen_self_static=unknown ;;
13661 +  esac
13662 +fi
13663 +
13664 +
13665 +if test "$enable_shared" = yes && test "$GCC" = yes; then
13666 +  case $archive_cmds in
13667 +  *'~'*)
13668 +    # FIXME: we may have to deal with multi-command sequences.
13669 +    ;;
13670 +  '$CC '*)
13671 +    # Test whether the compiler implicitly links with -lc since on some
13672 +    # systems, -lgcc has to come before -lc. If gcc already passes -lc
13673 +    # to ld, don't add -lc before -lgcc.
13674 +    echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
13675 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
13676 +    if test "${lt_cv_archive_cmds_need_lc+set}" = set; then
13677 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13678 +else
13679 +  $rm conftest*
13680 +    echo 'static int dummy;' > conftest.$ac_ext
13681 +
13682 +    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13683 +  (eval $ac_compile) 2>&5
13684 +  ac_status=$?
13685 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13686 +  (exit $ac_status); }; then
13687 +      soname=conftest
13688 +      lib=conftest
13689 +      libobjs=conftest.$ac_objext
13690 +      deplibs=
13691 +      wl=$lt_cv_prog_cc_wl
13692 +      compiler_flags=-v
13693 +      linker_flags=-v
13694 +      verstring=
13695 +      output_objdir=.
13696 +      libname=conftest
13697 +      save_allow_undefined_flag=$allow_undefined_flag
13698 +      allow_undefined_flag=
13699 +      if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
13700 +  (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
13701 +  ac_status=$?
13702 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13703 +  (exit $ac_status); }
13704 +      then
13705 +       lt_cv_archive_cmds_need_lc=no
13706 +      else
13707 +       lt_cv_archive_cmds_need_lc=yes
13708 +      fi
13709 +      allow_undefined_flag=$save_allow_undefined_flag
13710 +    else
13711 +      cat conftest.err 1>&5
13712 +    fi
13713 +fi
13714 +
13715 +    echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5
13716 +echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6
13717 +    ;;
13718 +  esac
13719 +fi
13720 +need_lc=${lt_cv_archive_cmds_need_lc-yes}
13721 +
13722 +# The second clause should only fire when bootstrapping the
13723 +# libtool distribution, otherwise you forgot to ship ltmain.sh
13724 +# with your package, and you will get complaints that there are
13725 +# no rules to generate ltmain.sh.
13726 +if test -f "$ltmain"; then
13727 +  :
13728 +else
13729 +  # If there is no Makefile yet, we rely on a make rule to execute
13730 +  # `config.status --recheck' to rerun these tests and create the
13731 +  # libtool script then.
13732 +  test -f Makefile && make "$ltmain"
13733 +fi
13734 +
13735 +if test -f "$ltmain"; then
13736 +  trap "$rm \"${ofile}T\"; exit 1" 1 2 15
13737 +  $rm -f "${ofile}T"
13738 +
13739 +  echo creating $ofile
13740 +
13741 +  # Now quote all the things that may contain metacharacters while being
13742 +  # careful not to overquote the AC_SUBSTed values.  We take copies of the
13743 +  # variables and quote the copies for generation of the libtool script.
13744 +  for var in echo old_CC old_CFLAGS \
13745 +    AR AR_FLAGS CC LD LN_S NM SHELL \
13746 +    reload_flag reload_cmds wl \
13747 +    pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
13748 +    thread_safe_flag_spec whole_archive_flag_spec libname_spec \
13749 +    library_names_spec soname_spec \
13750 +    RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
13751 +    old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
13752 +    postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
13753 +    old_striplib striplib file_magic_cmd export_symbols_cmds \
13754 +    deplibs_check_method allow_undefined_flag no_undefined_flag \
13755 +    finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
13756 +    global_symbol_to_c_name_address \
13757 +    hardcode_libdir_flag_spec hardcode_libdir_separator  \
13758 +    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
13759 +    compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
13760 +
13761 +    case $var in
13762 +    reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
13763 +    old_postinstall_cmds | old_postuninstall_cmds | \
13764 +    export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
13765 +    extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
13766 +    postinstall_cmds | postuninstall_cmds | \
13767 +    finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
13768 +      # Double-quote double-evaled strings.
13769 +      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
13770 +      ;;
13771 +    *)
13772 +      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
13773 +      ;;
13774 +    esac
13775 +  done
13776 +
13777 +  cat <<__EOF__ > "${ofile}T"
13778 +#! $SHELL
13779 +
13780 +# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
13781 +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
13782 +# NOTE: Changes made to this file will be lost: look at ltmain.sh.
13783 +#
13784 +# Copyright (C) 1996-2000 Free Software Foundation, Inc.
13785 +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
13786 +#
13787 +# This program is free software; you can redistribute it and/or modify
13788 +# it under the terms of the GNU General Public License as published by
13789 +# the Free Software Foundation; either version 2 of the License, or
13790 +# (at your option) any later version.
13791 +#
13792 +# This program is distributed in the hope that it will be useful, but
13793 +# WITHOUT ANY WARRANTY; without even the implied warranty of
13794 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13795 +# General Public License for more details.
13796 +#
13797 +# You should have received a copy of the GNU General Public License
13798 +# along with this program; if not, write to the Free Software
13799 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
13800 +#
13801 +# As a special exception to the GNU General Public License, if you
13802 +# distribute this file as part of a program that contains a
13803 +# configuration script generated by Autoconf, you may include it under
13804 +# the same distribution terms that you use for the rest of that program.
13805 +
13806 +# Sed that helps us avoid accidentally triggering echo(1) options like -n.
13807 +Xsed="sed -e s/^X//"
13808 +
13809 +# The HP-UX ksh and POSIX shell print the target directory to stdout
13810 +# if CDPATH is set.
13811 +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
13812 +
13813 +# ### BEGIN LIBTOOL CONFIG
13814 +
13815 +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13816 +
13817 +# Shell to use when invoking shell scripts.
13818 +SHELL=$lt_SHELL
13819 +
13820 +# Whether or not to build shared libraries.
13821 +build_libtool_libs=$enable_shared
13822 +
13823 +# Whether or not to build static libraries.
13824 +build_old_libs=$enable_static
13825 +
13826 +# Whether or not to add -lc for building shared libraries.
13827 +build_libtool_need_lc=$need_lc
13828 +
13829 +# Whether or not to optimize for fast installation.
13830 +fast_install=$enable_fast_install
13831 +
13832 +# The host system.
13833 +host_alias=$host_alias
13834 +host=$host
13835 +
13836 +# An echo program that does not interpret backslashes.
13837 +echo=$lt_echo
13838 +
13839 +# The archiver.
13840 +AR=$lt_AR
13841 +AR_FLAGS=$lt_AR_FLAGS
13842 +
13843 +# The default C compiler.
13844 +CC=$lt_CC
13845 +
13846 +# Is the compiler the GNU C compiler?
13847 +with_gcc=$GCC
13848 +
13849 +# The linker used to build libraries.
13850 +LD=$lt_LD
13851 +
13852 +# Whether we need hard or soft links.
13853 +LN_S=$lt_LN_S
13854 +
13855 +# A BSD-compatible nm program.
13856 +NM=$lt_NM
13857 +
13858 +# A symbol stripping program
13859 +STRIP=$STRIP
13860 +
13861 +# Used to examine libraries when file_magic_cmd begins "file"
13862 +MAGIC_CMD=$MAGIC_CMD
13863 +
13864 +# Used on cygwin: DLL creation program.
13865 +DLLTOOL="$DLLTOOL"
13866 +
13867 +# Used on cygwin: object dumper.
13868 +OBJDUMP="$OBJDUMP"
13869 +
13870 +# Used on cygwin: assembler.
13871 +AS="$AS"
13872 +
13873 +# The name of the directory that contains temporary libtool files.
13874 +objdir=$objdir
13875 +
13876 +# How to create reloadable object files.
13877 +reload_flag=$lt_reload_flag
13878 +reload_cmds=$lt_reload_cmds
13879 +
13880 +# How to pass a linker flag through the compiler.
13881 +wl=$lt_wl
13882 +
13883 +# Object file suffix (normally "o").
13884 +objext="$ac_objext"
13885 +
13886 +# Old archive suffix (normally "a").
13887 +libext="$libext"
13888 +
13889 +# Executable file suffix (normally "").
13890 +exeext="$exeext"
13891 +
13892 +# Additional compiler flags for building library objects.
13893 +pic_flag=$lt_pic_flag
13894 +pic_mode=$pic_mode
13895 +
13896 +# Does compiler simultaneously support -c and -o options?
13897 +compiler_c_o=$lt_compiler_c_o
13898 +
13899 +# Can we write directly to a .lo ?
13900 +compiler_o_lo=$lt_compiler_o_lo
13901 +
13902 +# Must we lock files when doing compilation ?
13903 +need_locks=$lt_need_locks
13904 +
13905 +# Do we need the lib prefix for modules?
13906 +need_lib_prefix=$need_lib_prefix
13907 +
13908 +# Do we need a version for libraries?
13909 +need_version=$need_version
13910 +
13911 +# Whether dlopen is supported.
13912 +dlopen_support=$enable_dlopen
13913 +
13914 +# Whether dlopen of programs is supported.
13915 +dlopen_self=$enable_dlopen_self
13916 +
13917 +# Whether dlopen of statically linked programs is supported.
13918 +dlopen_self_static=$enable_dlopen_self_static
13919 +
13920 +# Compiler flag to prevent dynamic linking.
13921 +link_static_flag=$lt_link_static_flag
13922 +
13923 +# Compiler flag to turn off builtin functions.
13924 +no_builtin_flag=$lt_no_builtin_flag
13925 +
13926 +# Compiler flag to allow reflexive dlopens.
13927 +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
13928 +
13929 +# Compiler flag to generate shared objects directly from archives.
13930 +whole_archive_flag_spec=$lt_whole_archive_flag_spec
13931 +
13932 +# Compiler flag to generate thread-safe objects.
13933 +thread_safe_flag_spec=$lt_thread_safe_flag_spec
13934 +
13935 +# Library versioning type.
13936 +version_type=$version_type
13937 +
13938 +# Format of library name prefix.
13939 +libname_spec=$lt_libname_spec
13940 +
13941 +# List of archive names.  First name is the real one, the rest are links.
13942 +# The last name is the one that the linker finds with -lNAME.
13943 +library_names_spec=$lt_library_names_spec
13944 +
13945 +# The coded name of the library, if different from the real name.
13946 +soname_spec=$lt_soname_spec
13947 +
13948 +# Commands used to build and install an old-style archive.
13949 +RANLIB=$lt_RANLIB
13950 +old_archive_cmds=$lt_old_archive_cmds
13951 +old_postinstall_cmds=$lt_old_postinstall_cmds
13952 +old_postuninstall_cmds=$lt_old_postuninstall_cmds
13953 +
13954 +# Create an old-style archive from a shared archive.
13955 +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
13956 +
13957 +# Create a temporary old-style archive to link instead of a shared archive.
13958 +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
13959 +
13960 +# Commands used to build and install a shared archive.
13961 +archive_cmds=$lt_archive_cmds
13962 +archive_expsym_cmds=$lt_archive_expsym_cmds
13963 +postinstall_cmds=$lt_postinstall_cmds
13964 +postuninstall_cmds=$lt_postuninstall_cmds
13965 +
13966 +# Commands to strip libraries.
13967 +old_striplib=$lt_old_striplib
13968 +striplib=$lt_striplib
13969 +
13970 +# Method to check whether dependent libraries are shared objects.
13971 +deplibs_check_method=$lt_deplibs_check_method
13972 +
13973 +# Command to use when deplibs_check_method == file_magic.
13974 +file_magic_cmd=$lt_file_magic_cmd
13975 +
13976 +# Flag that allows shared libraries with undefined symbols to be built.
13977 +allow_undefined_flag=$lt_allow_undefined_flag
13978 +
13979 +# Flag that forces no undefined symbols.
13980 +no_undefined_flag=$lt_no_undefined_flag
13981 +
13982 +# Commands used to finish a libtool library installation in a directory.
13983 +finish_cmds=$lt_finish_cmds
13984 +
13985 +# Same as above, but a single script fragment to be evaled but not shown.
13986 +finish_eval=$lt_finish_eval
13987 +
13988 +# Take the output of nm and produce a listing of raw symbols and C names.
13989 +global_symbol_pipe=$lt_global_symbol_pipe
13990 +
13991 +# Transform the output of nm in a proper C declaration
13992 +global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
13993 +
13994 +# Transform the output of nm in a C name address pair
13995 +global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
13996 +
13997 +# This is the shared library runtime path variable.
13998 +runpath_var=$runpath_var
13999 +
14000 +# This is the shared library path variable.
14001 +shlibpath_var=$shlibpath_var
14002 +
14003 +# Is shlibpath searched before the hard-coded library search path?
14004 +shlibpath_overrides_runpath=$shlibpath_overrides_runpath
14005 +
14006 +# How to hardcode a shared library path into an executable.
14007 +hardcode_action=$hardcode_action
14008 +
14009 +# Whether we should hardcode library paths into libraries.
14010 +hardcode_into_libs=$hardcode_into_libs
14011 +
14012 +# Flag to hardcode \$libdir into a binary during linking.
14013 +# This must work even if \$libdir does not exist.
14014 +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
14015 +
14016 +# Whether we need a single -rpath flag with a separated argument.
14017 +hardcode_libdir_separator=$lt_hardcode_libdir_separator
14018 +
14019 +# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
14020 +# resulting binary.
14021 +hardcode_direct=$hardcode_direct
14022 +
14023 +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
14024 +# resulting binary.
14025 +hardcode_minus_L=$hardcode_minus_L
14026 +
14027 +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
14028 +# the resulting binary.
14029 +hardcode_shlibpath_var=$hardcode_shlibpath_var
14030 +
14031 +# Variables whose values should be saved in libtool wrapper scripts and
14032 +# restored at relink time.
14033 +variables_saved_for_relink="$variables_saved_for_relink"
14034 +
14035 +# Whether libtool must link a program against all its dependency libraries.
14036 +link_all_deplibs=$link_all_deplibs
14037 +
14038 +# Compile-time system search path for libraries
14039 +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
14040 +
14041 +# Run-time system search path for libraries
14042 +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
14043 +
14044 +# Fix the shell variable \$srcfile for the compiler.
14045 +fix_srcfile_path="$fix_srcfile_path"
14046 +
14047 +# Set to yes if exported symbols are required.
14048 +always_export_symbols=$always_export_symbols
14049 +
14050 +# The commands to list exported symbols.
14051 +export_symbols_cmds=$lt_export_symbols_cmds
14052 +
14053 +# The commands to extract the exported symbol list from a shared archive.
14054 +extract_expsyms_cmds=$lt_extract_expsyms_cmds
14055 +
14056 +# Symbols that should not be listed in the preloaded symbols.
14057 +exclude_expsyms=$lt_exclude_expsyms
14058 +
14059 +# Symbols that must always be exported.
14060 +include_expsyms=$lt_include_expsyms
14061 +
14062 +# ### END LIBTOOL CONFIG
14063 +
14064 +__EOF__
14065 +
14066 +  case $host_os in
14067 +  aix3*)
14068 +    cat <<\EOF >> "${ofile}T"
14069 +
14070 +# AIX sometimes has problems with the GCC collect2 program.  For some
14071 +# reason, if we set the COLLECT_NAMES environment variable, the problems
14072 +# vanish in a puff of smoke.
14073 +if test "X${COLLECT_NAMES+set}" != Xset; then
14074 +  COLLECT_NAMES=
14075 +  export COLLECT_NAMES
14076 +fi
14077 +EOF
14078 +    ;;
14079 +  esac
14080 +
14081 +  case $host_os in
14082 +  cygwin* | mingw* | pw32* | os2*)
14083 +    cat <<'EOF' >> "${ofile}T"
14084 +      # This is a source program that is used to create dlls on Windows
14085 +      # Don't remove nor modify the starting and closing comments
14086 +# /* ltdll.c starts here */
14087 +# #define WIN32_LEAN_AND_MEAN
14088 +# #include <windows.h>
14089 +# #undef WIN32_LEAN_AND_MEAN
14090 +# #include <stdio.h>
14091 +#
14092 +# #ifndef __CYGWIN__
14093 +# #  ifdef __CYGWIN32__
14094 +# #    define __CYGWIN__ __CYGWIN32__
14095 +# #  endif
14096 +# #endif
14097 +#
14098 +# #ifdef __cplusplus
14099 +# extern "C" {
14100 +# #endif
14101 +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
14102 +# #ifdef __cplusplus
14103 +# }
14104 +# #endif
14105 +#
14106 +# #ifdef __CYGWIN__
14107 +# #include <cygwin/cygwin_dll.h>
14108 +# DECLARE_CYGWIN_DLL( DllMain );
14109 +# #endif
14110 +# HINSTANCE __hDllInstance_base;
14111 +#
14112 +# BOOL APIENTRY
14113 +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
14114 +# {
14115 +#   __hDllInstance_base = hInst;
14116 +#   return TRUE;
14117 +# }
14118 +# /* ltdll.c ends here */
14119 +       # This is a source program that is used to create import libraries
14120 +       # on Windows for dlls which lack them. Don't remove nor modify the
14121 +       # starting and closing comments
14122 +# /* impgen.c starts here */
14123 +# /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
14124 +#
14125 +#  This file is part of GNU libtool.
14126 +#
14127 +#  This program is free software; you can redistribute it and/or modify
14128 +#  it under the terms of the GNU General Public License as published by
14129 +#  the Free Software Foundation; either version 2 of the License, or
14130 +#  (at your option) any later version.
14131 +#
14132 +#  This program is distributed in the hope that it will be useful,
14133 +#  but WITHOUT ANY WARRANTY; without even the implied warranty of
14134 +#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14135 +#  GNU General Public License for more details.
14136 +#
14137 +#  You should have received a copy of the GNU General Public License
14138 +#  along with this program; if not, write to the Free Software
14139 +#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
14140 +#  */
14141 +#
14142 +# #include <stdio.h>           /* for printf() */
14143 +# #include <unistd.h>          /* for open(), lseek(), read() */
14144 +# #include <fcntl.h>           /* for O_RDONLY, O_BINARY */
14145 +# #include <string.h>          /* for strdup() */
14146 +#
14147 +# /* O_BINARY isn't required (or even defined sometimes) under Unix */
14148 +# #ifndef O_BINARY
14149 +# #define O_BINARY 0
14150 +# #endif
14151 +#
14152 +# static unsigned int
14153 +# pe_get16 (fd, offset)
14154 +#      int fd;
14155 +#      int offset;
14156 +# {
14157 +#   unsigned char b[2];
14158 +#   lseek (fd, offset, SEEK_SET);
14159 +#   read (fd, b, 2);
14160 +#   return b[0] + (b[1]<<8);
14161 +# }
14162 +#
14163 +# static unsigned int
14164 +# pe_get32 (fd, offset)
14165 +#     int fd;
14166 +#     int offset;
14167 +# {
14168 +#   unsigned char b[4];
14169 +#   lseek (fd, offset, SEEK_SET);
14170 +#   read (fd, b, 4);
14171 +#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
14172 +# }
14173 +#
14174 +# static unsigned int
14175 +# pe_as32 (ptr)
14176 +#      void *ptr;
14177 +# {
14178 +#   unsigned char *b = ptr;
14179 +#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
14180 +# }
14181 +#
14182 +# int
14183 +# main (argc, argv)
14184 +#     int argc;
14185 +#     char *argv[];
14186 +# {
14187 +#     int dll;
14188 +#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
14189 +#     unsigned long export_rva, export_size, nsections, secptr, expptr;
14190 +#     unsigned long name_rvas, nexp;
14191 +#     unsigned char *expdata, *erva;
14192 +#     char *filename, *dll_name;
14193 +#
14194 +#     filename = argv[1];
14195 +#
14196 +#     dll = open(filename, O_RDONLY|O_BINARY);
14197 +#     if (dll < 1)
14198 +#      return 1;
14199 +#
14200 +#     dll_name = filename;
14201 +#
14202 +#     for (i=0; filename[i]; i++)
14203 +#      if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
14204 +#          dll_name = filename + i +1;
14205 +#
14206 +#     pe_header_offset = pe_get32 (dll, 0x3c);
14207 +#     opthdr_ofs = pe_header_offset + 4 + 20;
14208 +#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
14209 +#
14210 +#     if (num_entries < 1) /* no exports */
14211 +#      return 1;
14212 +#
14213 +#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
14214 +#     export_size = pe_get32 (dll, opthdr_ofs + 100);
14215 +#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
14216 +#     secptr = (pe_header_offset + 4 + 20 +
14217 +#            pe_get16 (dll, pe_header_offset + 4 + 16));
14218 +#
14219 +#     expptr = 0;
14220 +#     for (i = 0; i < nsections; i++)
14221 +#     {
14222 +#      char sname[8];
14223 +#      unsigned long secptr1 = secptr + 40 * i;
14224 +#      unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
14225 +#      unsigned long vsize = pe_get32 (dll, secptr1 + 16);
14226 +#      unsigned long fptr = pe_get32 (dll, secptr1 + 20);
14227 +#      lseek(dll, secptr1, SEEK_SET);
14228 +#      read(dll, sname, 8);
14229 +#      if (vaddr <= export_rva && vaddr+vsize > export_rva)
14230 +#      {
14231 +#          expptr = fptr + (export_rva - vaddr);
14232 +#          if (export_rva + export_size > vaddr + vsize)
14233 +#              export_size = vsize - (export_rva - vaddr);
14234 +#          break;
14235 +#      }
14236 +#     }
14237 +#
14238 +#     expdata = (unsigned char*)malloc(export_size);
14239 +#     lseek (dll, expptr, SEEK_SET);
14240 +#     read (dll, expdata, export_size);
14241 +#     erva = expdata - export_rva;
14242 +#
14243 +#     nexp = pe_as32 (expdata+24);
14244 +#     name_rvas = pe_as32 (expdata+32);
14245 +#
14246 +#     printf ("EXPORTS\n");
14247 +#     for (i = 0; i<nexp; i++)
14248 +#     {
14249 +#      unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
14250 +#      printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
14251 +#     }
14252 +#
14253 +#     return 0;
14254 +# }
14255 +# /* impgen.c ends here */
14256 +
14257 +EOF
14258 +    ;;
14259 +  esac
14260 +
14261 +  # We use sed instead of cat because bash on DJGPP gets confused if
14262 +  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
14263 +  # text mode, it properly converts lines to CR/LF.  This bash problem
14264 +  # is reportedly fixed, but why not run on old versions too?
14265 +  sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
14266 +
14267 +  mv -f "${ofile}T" "$ofile" || \
14268 +    (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
14269 +  chmod +x "$ofile"
14270 +fi
14271 +
14272 +
14273 +
14274 +
14275 +
14276 +# This can be used to rebuild libtool when needed
14277 +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
14278 +
14279 +# Always use our own libtool.
14280 +LIBTOOL='$(SHELL) $(top_builddir)/libtool'
14281 +
14282 +# Prevent multiple expansion
14283 +
14284 +
14285 +
14286 +
14287 +# Check whether --with-target-subdir or --without-target-subdir was given.
14288 +if test "${with_target_subdir+set}" = set; then
14289 +  withval="$with_target_subdir"
14290 +  
14291 +fi; 
14292 +
14293 +# Check whether --with-cross-host or --without-cross-host was given.
14294 +if test "${with_cross_host+set}" = set; then
14295 +  withval="$with_cross_host"
14296 +  
14297 +fi; 
14298 +
14299 +echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
14300 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
14301 +    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
14302 +if test "${enable_maintainer_mode+set}" = set; then
14303 +  enableval="$enable_maintainer_mode"
14304 +  USE_MAINTAINER_MODE=$enableval
14305 +else
14306 +  USE_MAINTAINER_MODE=no
14307 +fi; 
14308 +  echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
14309 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
14310 +  
14311 +
14312 +if test $USE_MAINTAINER_MODE = yes; then
14313 +  MAINTAINER_MODE_TRUE=
14314 +  MAINTAINER_MODE_FALSE='#'
14315 +else
14316 +  MAINTAINER_MODE_TRUE='#'
14317 +  MAINTAINER_MODE_FALSE=
14318 +fi
14319 +
14320 +  MAINT=$MAINTAINER_MODE_TRUE
14321 +  
14322 +
14323 +# automake wants to see AC_EXEEXT.  But we don't need it.  And having
14324 +# it is actually a problem, because the compiler we're passed can't
14325 +# necessarily do a full link.  So we fool automake here.
14326 +if false; then
14327 +  # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
14328 +  # to nothing, so nothing would remain between `then' and `fi' if it
14329 +  # were not for the `:' below.
14330 +  :
14331 +  
14332 +fi
14333 +
14334 +echo "$as_me:$LINENO: checking for thread model used by GCC" >&5
14335 +echo $ECHO_N "checking for thread model used by GCC... $ECHO_C" >&6
14336 +THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
14337 +if test -z "$THREADS"; then
14338 +   THREADS=no
14339 +fi
14340 +echo "$as_me:$LINENO: result: $THREADS" >&5
14341 +echo "${ECHO_T}$THREADS" >&6
14342 +
14343 +# Check whether --enable-parallel-mark or --disable-parallel-mark was given.
14344 +if test "${enable_parallel_mark+set}" = set; then
14345 +  enableval="$enable_parallel_mark"
14346 +  case "$THREADS" in
14347 +      no | none | single)
14348 +       { { echo "$as_me:$LINENO: error: Parallel mark requires --enable-threads=x spec" >&5
14349 +echo "$as_me: error: Parallel mark requires --enable-threads=x spec" >&2;}
14350 +   { (exit 1); exit 1; }; }
14351 +       ;;
14352 +    esac
14353 +
14354 +fi; 
14355 +
14356 +INCLUDES=-I${srcdir}/include
14357 +THREADLIBS=
14358 +case "$THREADS" in
14359 + no | none | single)
14360 +    THREADS=none
14361 +    ;;
14362 + posix | pthreads)
14363 +    THREADS=posix
14364 +    THREADLIBS=-lpthread
14365 +    case "$host" in
14366 +     x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
14367 +       cat >>confdefs.h <<\_ACEOF
14368 +@%:@define GC_LINUX_THREADS 1
14369 +_ACEOF
14370 +
14371 +       cat >>confdefs.h <<\_ACEOF
14372 +@%:@define _REENTRANT 1
14373 +_ACEOF
14374 +
14375 +        if test "${enable_parallel_mark}"; then
14376 +         cat >>confdefs.h <<\_ACEOF
14377 +@%:@define PARALLEL_MARK 1
14378 +_ACEOF
14379 +
14380 +       fi
14381 +       cat >>confdefs.h <<\_ACEOF
14382 +@%:@define THREAD_LOCAL_ALLOC 1
14383 +_ACEOF
14384 +
14385 +       ;;
14386 +     *-*-linux*)
14387 +       cat >>confdefs.h <<\_ACEOF
14388 +@%:@define GC_LINUX_THREADS 1
14389 +_ACEOF
14390 +
14391 +       cat >>confdefs.h <<\_ACEOF
14392 +@%:@define _REENTRANT 1
14393 +_ACEOF
14394 +
14395 +       ;;
14396 +     *-*-hpux*)
14397 +       { echo "$as_me:$LINENO: WARNING: \"Only HP/UX 11 threads are supported.\"" >&5
14398 +echo "$as_me: WARNING: \"Only HP/UX 11 threads are supported.\"" >&2;}
14399 +       cat >>confdefs.h <<\_ACEOF
14400 +@%:@define GC_HPUX_THREADS 1
14401 +_ACEOF
14402 +
14403 +       cat >>confdefs.h <<\_ACEOF
14404 +@%:@define _POSIX_C_SOURCE 199506L
14405 +_ACEOF
14406 +
14407 +       if test "${enable_parallel_mark}" = yes; then
14408 +         cat >>confdefs.h <<\_ACEOF
14409 +@%:@define PARALLEL_MARK 1
14410 +_ACEOF
14411 +
14412 +       fi
14413 +       cat >>confdefs.h <<\_ACEOF
14414 +@%:@define THREAD_LOCAL_ALLOC 1
14415 +_ACEOF
14416 +
14417 +       THREADLIBS="-lpthread -lrt"
14418 +       ;;
14419 +     *-*-freebsd*)
14420 +       { echo "$as_me:$LINENO: WARNING: \"FreeBSD does not yet fully support threads with Boehm GC.\"" >&5
14421 +echo "$as_me: WARNING: \"FreeBSD does not yet fully support threads with Boehm GC.\"" >&2;}
14422 +       cat >>confdefs.h <<\_ACEOF
14423 +@%:@define GC_FREEBSD_THREADS 1
14424 +_ACEOF
14425 +
14426 +       INCLUDES="$INCLUDES -pthread"
14427 +       THREADLIBS=-pthread
14428 +       ;;
14429 +     *-*-solaris*)
14430 +       cat >>confdefs.h <<\_ACEOF
14431 +@%:@define GC_SOLARIS_THREADS 1
14432 +_ACEOF
14433 +
14434 +       cat >>confdefs.h <<\_ACEOF
14435 +@%:@define GC_SOLARIS_PTHREADS 1
14436 +_ACEOF
14437 +
14438 +       ;;
14439 +     *-*-irix*)
14440 +       cat >>confdefs.h <<\_ACEOF
14441 +@%:@define GC_IRIX_THREADS 1
14442 +_ACEOF
14443 +
14444 +       ;;
14445 +     *-*-cygwin*)
14446 +       THREADLIBS=
14447 +       ;;
14448 +     *-*-darwin*)
14449 +       cat >>confdefs.h <<\_ACEOF
14450 +@%:@define GC_DARWIN_THREADS 1
14451 +_ACEOF
14452 +
14453 +       cat >>confdefs.h <<\_ACEOF
14454 +@%:@define THREAD_LOCAL_ALLOC 1
14455 +_ACEOF
14456 +
14457 +       if test "${enable_parallel_mark}" = yes; then
14458 +         cat >>confdefs.h <<\_ACEOF
14459 +@%:@define PARALLEL_MARK 1
14460 +_ACEOF
14461 +
14462 +       fi
14463 +       ;;
14464 +    esac
14465 +    ;;
14466 + win32)
14467 +    cat >>confdefs.h <<\_ACEOF
14468 +@%:@define GC_WIN32_THREADS 1
14469 +_ACEOF
14470 +
14471 +    cat >>confdefs.h <<\_ACEOF
14472 +@%:@define NO_GETENV 1
14473 +_ACEOF
14474 +
14475 +    ;;
14476 + decosf1 | irix | mach | os2 | solaris | dce | vxworks)
14477 +    { { echo "$as_me:$LINENO: error: thread package $THREADS not yet supported" >&5
14478 +echo "$as_me: error: thread package $THREADS not yet supported" >&2;}
14479 +   { (exit 1); exit 1; }; }
14480 +    ;;
14481 + *)
14482 +    { { echo "$as_me:$LINENO: error: $THREADS is an unknown thread package" >&5
14483 +echo "$as_me: error: $THREADS is an unknown thread package" >&2;}
14484 +   { (exit 1); exit 1; }; }
14485 +    ;;
14486 +esac
14487 +
14488 +
14489 +case "$host" in 
14490 +   powerpc-*-darwin*)
14491 +      powerpc_darwin=true
14492 +      ;;
14493 +esac
14494 +
14495 +
14496 +if test x$powerpc_darwin = xtrue; then
14497 +  POWERPC_DARWIN_TRUE=
14498 +  POWERPC_DARWIN_FALSE='#'
14499 +else
14500 +  POWERPC_DARWIN_TRUE='#'
14501 +  POWERPC_DARWIN_FALSE=
14502 +fi
14503 +
14504 +
14505 +# We never want libdl on darwin. It is a fake libdl that just ends up making
14506 +# dyld calls anyway
14507 +case "$host" in
14508 +  *-*-darwin*) ;;
14509 +  *) 
14510 +    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14511 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
14512 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then
14513 +  echo $ECHO_N "(cached) $ECHO_C" >&6
14514 +else
14515 +  ac_check_lib_save_LIBS=$LIBS
14516 +LIBS="-ldl  $LIBS"
14517 +cat >conftest.$ac_ext <<_ACEOF
14518 +#line $LINENO "configure"
14519 +#include "confdefs.h"
14520 +
14521 +/* Override any gcc2 internal prototype to avoid an error.  */
14522 +#ifdef __cplusplus
14523 +extern "C"
14524 +#endif
14525 +/* We use char because int might match the return type of a gcc2
14526 +   builtin and then its argument prototype would still apply.  */
14527 +char dlopen ();
14528 +int
14529 +main ()
14530 +{
14531 +dlopen ();
14532 +  ;
14533 +  return 0;
14534 +}
14535 +_ACEOF
14536 +rm -f conftest.$ac_objext conftest$ac_exeext
14537 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14538 +  (eval $ac_link) 2>&5
14539 +  ac_status=$?
14540 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14541 +  (exit $ac_status); } &&
14542 +         { ac_try='test -s conftest$ac_exeext'
14543 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14544 +  (eval $ac_try) 2>&5
14545 +  ac_status=$?
14546 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14547 +  (exit $ac_status); }; }; then
14548 +  ac_cv_lib_dl_dlopen=yes
14549 +else
14550 +  echo "$as_me: failed program was:" >&5
14551 +cat conftest.$ac_ext >&5
14552 +ac_cv_lib_dl_dlopen=no
14553 +fi
14554 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14555 +LIBS=$ac_check_lib_save_LIBS
14556 +fi
14557 +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14558 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
14559 +if test $ac_cv_lib_dl_dlopen = yes; then
14560 +  EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl"
14561 +fi
14562 +
14563 +    ;;
14564 +esac
14565 +
14566 +
14567 +
14568 +target_all=libgcjgc.la
14569 +
14570 +
14571 +
14572 +TARGET_ECOS="no"
14573 +
14574 +# Check whether --with-ecos or --without-ecos was given.
14575 +if test "${with_ecos+set}" = set; then
14576 +  withval="$with_ecos"
14577 +  TARGET_ECOS="$with_ecos"
14578 +
14579 +fi; 
14580 +
14581 +addobjs=
14582 +CXXINCLUDES=
14583 +case "$TARGET_ECOS" in
14584 +   no)
14585 +      ;;
14586 +   *)
14587 +      cat >>confdefs.h <<\_ACEOF
14588 +@%:@define ECOS 1
14589 +_ACEOF
14590 +
14591 +      CXXINCLUDES="-I${TARGET_ECOS}/include"
14592 +      addobjs="$addobjs ecos.lo"
14593 +      ;;
14594 +esac
14595 +
14596 +
14597 +
14598 +
14599 +
14600 +machdep=
14601 +case "$host" in
14602 + alpha*-*-openbsd*)
14603 +    machdep="alpha_mach_dep.lo"
14604 +    if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then
14605 +       { echo "$as_me:$LINENO: WARNING: OpenBSD/Alpha without dlopen(). Shared library support is disabled" >&5
14606 +echo "$as_me: WARNING: OpenBSD/Alpha without dlopen(). Shared library support is disabled" >&2;}
14607 +       # Check whether --enable-shared or --disable-shared was given.
14608 +if test "${enable_shared+set}" = set; then
14609 +  enableval="$enable_shared"
14610 +  p=${PACKAGE-default}
14611 +case $enableval in
14612 +yes) enable_shared=yes ;;
14613 +no) enable_shared=no ;;
14614 +*)
14615 +  enable_shared=no
14616 +  # Look at the argument we got.  We use all the common list separators.
14617 +  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
14618 +  for pkg in $enableval; do
14619 +    if test "X$pkg" = "X$p"; then
14620 +      enable_shared=yes
14621 +    fi
14622 +  done
14623 +  IFS="$ac_save_ifs"
14624 +  ;;
14625 +esac
14626 +else
14627 +  enable_shared=no
14628 +fi; 
14629 +    fi
14630 +    ;;
14631 + alpha*-*-*)
14632 +    machdep="alpha_mach_dep.lo"
14633 +    ;;
14634 + i?86-*-solaris2.[89]*)
14635 +    cat >>confdefs.h <<\_ACEOF
14636 +@%:@define SOLARIS25_PROC_VDB_BUG_FIXED 1
14637 +_ACEOF
14638 +
14639 +    ;;
14640 + mipstx39-*-elf*)
14641 +    machdep="mips_ultrix_mach_dep.lo"
14642 +    cat >>confdefs.h <<\_ACEOF
14643 +@%:@define STACKBASE __stackbase
14644 +_ACEOF
14645 +
14646 +    cat >>confdefs.h <<\_ACEOF
14647 +@%:@define DATASTART_IS_ETEXT 1
14648 +_ACEOF
14649 +
14650 +    ;;
14651 + mips-dec-ultrix*)
14652 +    machdep="mips_ultrix_mach-dep.lo"
14653 +    ;;
14654 + mips*-*-linux*)
14655 +    ;;
14656 + mips-*-*)
14657 +    machdep="mips_sgi_mach_dep.lo"
14658 +    cat >>confdefs.h <<\_ACEOF
14659 +@%:@define NO_EXECUTE_PERMISSION 1
14660 +_ACEOF
14661 +
14662 +    ;;
14663 + sparc-sun-solaris2.3*)
14664 +    machdep="sparc_mach_dep.lo"
14665 +    cat >>confdefs.h <<\_ACEOF
14666 +@%:@define SUNOS53_SHARED_LIB 1
14667 +_ACEOF
14668 +
14669 +    ;;
14670 + sparc-sun-solaris2.*)
14671 +    machdep="sparc_mach_dep.lo"
14672 +    ;;
14673 + ia64-*-*)
14674 +    machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
14675 +    ;;
14676 +esac
14677 +if test x"$machdep" = x; then
14678 +   machdep="mach_dep.lo"
14679 +fi
14680 +addobjs="$addobjs $machdep"
14681 +
14682 +
14683 +case "$host" in
14684 + sparc-sun-solaris2*)
14685 +    if test "$GCC" = yes; then
14686 +       new_CFLAGS=
14687 +       for i in $CFLAGS; do
14688 +         case "$i" in
14689 +          -O*)
14690 +             ;;
14691 +          *)
14692 +             new_CFLAGS="$new_CFLAGS $i"
14693 +             ;;
14694 +         esac
14695 +       done
14696 +       CFLAGS="$new_CFLAGS"
14697 +    fi
14698 +    ;;
14699 +esac
14700 +
14701 +MY_CFLAGS="$CFLAGS"
14702 +
14703 +
14704 +cat >>confdefs.h <<\_ACEOF
14705 +@%:@define SILENT 1
14706 +_ACEOF
14707 +
14708 +cat >>confdefs.h <<\_ACEOF
14709 +@%:@define NO_SIGNALS 1
14710 +_ACEOF
14711 +
14712 +cat >>confdefs.h <<\_ACEOF
14713 +@%:@define NO_EXECUTE_PERMISSION 1
14714 +_ACEOF
14715 +
14716 +cat >>confdefs.h <<\_ACEOF
14717 +@%:@define ALL_INTERIOR_POINTERS 1
14718 +_ACEOF
14719 +
14720 +
14721 +cat >>confdefs.h <<\_ACEOF
14722 +@%:@define JAVA_FINALIZATION 1
14723 +_ACEOF
14724 +
14725 +cat >>confdefs.h <<\_ACEOF
14726 +@%:@define GC_GCJ_SUPPORT 1
14727 +_ACEOF
14728 +
14729 +cat >>confdefs.h <<\_ACEOF
14730 +@%:@define ATOMIC_UNCOLLECTABLE 1
14731 +_ACEOF
14732 +
14733 +
14734 +if test -n "${with_cross_host}"; then
14735 +   cat >>confdefs.h <<\_ACEOF
14736 +@%:@define NO_SIGSET 1
14737 +_ACEOF
14738 +
14739 +   cat >>confdefs.h <<\_ACEOF
14740 +@%:@define NO_DEBUGGING 1
14741 +_ACEOF
14742 +
14743 +fi
14744 +
14745 +# Check whether --enable-full-debug or --disable-full-debug was given.
14746 +if test "${enable_full_debug+set}" = set; then
14747 +  enableval="$enable_full_debug"
14748 +   if test "$enable_full_debug" = "yes"; then
14749 +    { echo "$as_me:$LINENO: WARNING: \"Must define GC_DEBUG and use debug alloc. in clients.\"" >&5
14750 +echo "$as_me: WARNING: \"Must define GC_DEBUG and use debug alloc. in clients.\"" >&2;}
14751 +    cat >>confdefs.h <<\_ACEOF
14752 +@%:@define KEEP_BACK_PTRS 1
14753 +_ACEOF
14754 +
14755 +    cat >>confdefs.h <<\_ACEOF
14756 +@%:@define DBG_HDRS_ALL 1
14757 +_ACEOF
14758 +
14759 +    case $host in
14760 +      ia64-*-linux* )
14761 +       cat >>confdefs.h <<\_ACEOF
14762 +@%:@define MAKE_BACK_GRAPH 1
14763 +_ACEOF
14764 +
14765 +      ;;
14766 +      x86-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
14767 +       cat >>confdefs.h <<\_ACEOF
14768 +@%:@define MAKE_BACK_GRAPH 1
14769 +_ACEOF
14770 +
14771 +       { echo "$as_me:$LINENO: WARNING: \"Client must not use -fomit-frame-pointer.\"" >&5
14772 +echo "$as_me: WARNING: \"Client must not use -fomit-frame-pointer.\"" >&2;}
14773 +       cat >>confdefs.h <<\_ACEOF
14774 +@%:@define SAVE_CALL_COUNT 8
14775 +_ACEOF
14776 +
14777 +      ;;
14778 +    esac 
14779 +  fi
14780 +fi; 
14781 +
14782 +
14783 +
14784 +if test -z "$with_cross_host"; then
14785 +  USE_LIBDIR_TRUE=
14786 +  USE_LIBDIR_FALSE='#'
14787 +else
14788 +  USE_LIBDIR_TRUE='#'
14789 +  USE_LIBDIR_FALSE=
14790 +fi
14791 +
14792 +
14793 +if test "${multilib}" = "yes"; then
14794 +  multilib_arg="--enable-multilib"
14795 +else
14796 +  multilib_arg=
14797 +fi
14798 +
14799 +                    ac_config_files="$ac_config_files Makefile include/Makefile"
14800 +          ac_config_commands="$ac_config_commands default"
14801 +cat >confcache <<\_ACEOF
14802 +# This file is a shell script that caches the results of configure
14803 +# tests run on this system so they can be shared between configure
14804 +# scripts and configure runs, see configure's option --config-cache.
14805 +# It is not useful on other systems.  If it contains results you don't
14806 +# want to keep, you may remove or edit it.
14807 +#
14808 +# config.status only pays attention to the cache file if you give it
14809 +# the --recheck option to rerun configure.
14810 +#
14811 +# `ac_cv_env_foo' variables (set or unset) will be overridden when
14812 +# loading this file, other *unset* `ac_cv_foo' will be assigned the
14813 +# following values.
14814 +
14815 +_ACEOF
14816 +
14817 +# The following way of writing the cache mishandles newlines in values,
14818 +# but we know of no workaround that is simple, portable, and efficient.
14819 +# So, don't put newlines in cache variables' values.
14820 +# Ultrix sh set writes to stderr and can't be redirected directly,
14821 +# and sets the high bit in the cache file unless we assign to the vars.
14822 +{
14823 +  (set) 2>&1 |
14824 +    case `(ac_space=' '; set | grep ac_space) 2>&1` in
14825 +    *ac_space=\ *)
14826 +      # `set' does not quote correctly, so add quotes (double-quote
14827 +      # substitution turns \\\\ into \\, and sed turns \\ into \).
14828 +      sed -n \
14829 +        "s/'/'\\\\''/g;
14830 +         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14831 +      ;;
14832 +    *)
14833 +      # `set' quotes correctly as required by POSIX, so do not add quotes.
14834 +      sed -n \
14835 +        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
14836 +      ;;
14837 +    esac;
14838 +} |
14839 +  sed '
14840 +     t clear
14841 +     : clear
14842 +     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14843 +     t end
14844 +     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14845 +     : end' >>confcache
14846 +if cmp -s $cache_file confcache; then :; else
14847 +  if test -w $cache_file; then
14848 +    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
14849 +    cat confcache >$cache_file
14850 +  else
14851 +    echo "not updating unwritable cache $cache_file"
14852 +  fi
14853 +fi
14854 +rm -f confcache
14855 +
14856 +test "x$prefix" = xNONE && prefix=$ac_default_prefix
14857 +# Let make expand exec_prefix.
14858 +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14859 +
14860 +# VPATH may cause trouble with some makes, so we remove $(srcdir),
14861 +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14862 +# trailing colons and then remove the whole line if VPATH becomes empty
14863 +# (actually we leave an empty line to preserve line numbers).
14864 +if test "x$srcdir" = x.; then
14865 +  ac_vpsub='/^[        ]*VPATH[        ]*=/{
14866 +s/:*\$(srcdir):*/:/;
14867 +s/:*\${srcdir}:*/:/;
14868 +s/:*@srcdir@:*/:/;
14869 +s/^\([^=]*=[   ]*\):*/\1/;
14870 +s/:*$//;
14871 +s/^[^=]*=[     ]*$//;
14872 +}'
14873 +fi
14874 +
14875 +# Transform confdefs.h into DEFS.
14876 +# Protect against shell expansion while executing Makefile rules.
14877 +# Protect against Makefile macro expansion.
14878 +#
14879 +# If the first sed substitution is executed (which looks for macros that
14880 +# take arguments), then we branch to the quote section.  Otherwise,
14881 +# look for a macro that doesn't take arguments.
14882 +cat >confdef2opt.sed <<\_ACEOF
14883 +t clear
14884 +: clear
14885 +s,^[   ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\),-D\1=\2,g
14886 +t quote
14887 +s,^[   ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\),-D\1=\2,g
14888 +t quote
14889 +d
14890 +: quote
14891 +s,[    `~#$^&*(){}\\|;'"<>?],\\&,g
14892 +s,\[,\\&,g
14893 +s,\],\\&,g
14894 +s,\$,$$,g
14895 +p
14896 +_ACEOF
14897 +# We use echo to avoid assuming a particular line-breaking character.
14898 +# The extra dot is to prevent the shell from consuming trailing
14899 +# line-breaks from the sub-command output.  A line-break within
14900 +# single-quotes doesn't work because, if this script is created in a
14901 +# platform that uses two characters for line-breaks (e.g., DOS), tr
14902 +# would break.
14903 +ac_LF_and_DOT=`echo; echo .`
14904 +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
14905 +rm -f confdef2opt.sed
14906 +
14907 +
14908 +ac_libobjs=
14909 +ac_ltlibobjs=
14910 +for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
14911 +  # 1. Remove the extension, and $U if already installed.
14912 +  ac_i=`echo "$ac_i" |
14913 +         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
14914 +  # 2. Add them.
14915 +  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
14916 +  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
14917 +done
14918 +LIB@&t@OBJS=$ac_libobjs
14919 +
14920 +LTLIBOBJS=$ac_ltlibobjs
14921 +
14922 +
14923 +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
14924 +  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
14925 +Usually this means the macro was only invoked conditionally." >&5
14926 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
14927 +Usually this means the macro was only invoked conditionally." >&2;}
14928 +   { (exit 1); exit 1; }; }
14929 +fi
14930 +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
14931 +  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
14932 +Usually this means the macro was only invoked conditionally." >&5
14933 +echo "$as_me: error: conditional \"AMDEP\" was never defined.
14934 +Usually this means the macro was only invoked conditionally." >&2;}
14935 +   { (exit 1); exit 1; }; }
14936 +fi
14937 +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
14938 +  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
14939 +Usually this means the macro was only invoked conditionally." >&5
14940 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
14941 +Usually this means the macro was only invoked conditionally." >&2;}
14942 +   { (exit 1); exit 1; }; }
14943 +fi
14944 +if test -z "${POWERPC_DARWIN_TRUE}" && test -z "${POWERPC_DARWIN_FALSE}"; then
14945 +  { { echo "$as_me:$LINENO: error: conditional \"POWERPC_DARWIN\" was never defined.
14946 +Usually this means the macro was only invoked conditionally." >&5
14947 +echo "$as_me: error: conditional \"POWERPC_DARWIN\" was never defined.
14948 +Usually this means the macro was only invoked conditionally." >&2;}
14949 +   { (exit 1); exit 1; }; }
14950 +fi
14951 +if test -z "${USE_LIBDIR_TRUE}" && test -z "${USE_LIBDIR_FALSE}"; then
14952 +  { { echo "$as_me:$LINENO: error: conditional \"USE_LIBDIR\" was never defined.
14953 +Usually this means the macro was only invoked conditionally." >&5
14954 +echo "$as_me: error: conditional \"USE_LIBDIR\" was never defined.
14955 +Usually this means the macro was only invoked conditionally." >&2;}
14956 +   { (exit 1); exit 1; }; }
14957 +fi
14958 +
14959 +: ${CONFIG_STATUS=./config.status}
14960 +ac_clean_files_save=$ac_clean_files
14961 +ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14962 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
14963 +echo "$as_me: creating $CONFIG_STATUS" >&6;}
14964 +cat >$CONFIG_STATUS <<_ACEOF
14965 +#! $SHELL
14966 +# Generated by $as_me.
14967 +# Run this file to recreate the current configuration.
14968 +# Compiler output produced by configure, useful for debugging
14969 +# configure, is in config.log if it exists.
14970 +
14971 +debug=false
14972 +SHELL=\${CONFIG_SHELL-$SHELL}
14973 +_ACEOF
14974 +
14975 +cat >>$CONFIG_STATUS <<\_ACEOF
14976 +## --------------------- ##
14977 +## M4sh Initialization.  ##
14978 +## --------------------- ##
14979 +
14980 +# Be Bourne compatible
14981 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14982 +  emulate sh
14983 +  NULLCMD=:
14984 +  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
14985 +  # is contrary to our usage.  Disable this feature.
14986 +  alias -g '${1+"$@"}'='"$@"'
14987 +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
14988 +  set -o posix
14989 +fi
14990 +
14991 +# Support unset when possible.
14992 +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
14993 +  as_unset=unset
14994 +else
14995 +  as_unset=false
14996 +fi
14997 +
14998 +
14999 +# Work around bugs in pre-3.0 UWIN ksh.
15000 +$as_unset ENV MAIL MAILPATH
15001 +PS1='$ '
15002 +PS2='> '
15003 +PS4='+ '
15004 +
15005 +# NLS nuisances.
15006 +for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME
15007 +do
15008 +  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
15009 +    eval $as_var=C; export $as_var
15010 +  else
15011 +    $as_unset $as_var
15012 +  fi
15013 +done
15014 +
15015 +# Required to use basename.
15016 +if expr a : '\(a\)' >/dev/null 2>&1; then
15017 +  as_expr=expr
15018 +else
15019 +  as_expr=false
15020 +fi
15021 +
15022 +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
15023 +  as_basename=basename
15024 +else
15025 +  as_basename=false
15026 +fi
15027 +
15028 +
15029 +# Name of the executable.
15030 +as_me=`$as_basename "$0" ||
15031 +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15032 +        X"$0" : 'X\(//\)$' \| \
15033 +        X"$0" : 'X\(/\)$' \| \
15034 +        .     : '\(.\)' 2>/dev/null ||
15035 +echo X/"$0" |
15036 +    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15037 +         /^X\/\(\/\/\)$/{ s//\1/; q; }
15038 +         /^X\/\(\/\).*/{ s//\1/; q; }
15039 +         s/.*/./; q'`
15040 +
15041 +
15042 +# PATH needs CR, and LINENO needs CR and PATH.
15043 +# Avoid depending upon Character Ranges.
15044 +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15045 +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15046 +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15047 +as_cr_digits='0123456789'
15048 +as_cr_alnum=$as_cr_Letters$as_cr_digits
15049 +
15050 +# The user is always right.
15051 +if test "${PATH_SEPARATOR+set}" != set; then
15052 +  echo "#! /bin/sh" >conftest.sh
15053 +  echo  "exit 0"   >>conftest.sh
15054 +  chmod +x conftest.sh
15055 +  if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then
15056 +    PATH_SEPARATOR=';'
15057 +  else
15058 +    PATH_SEPARATOR=:
15059 +  fi
15060 +  rm -f conftest.sh
15061 +fi
15062 +
15063 +
15064 +  as_lineno_1=$LINENO
15065 +  as_lineno_2=$LINENO
15066 +  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15067 +  test "x$as_lineno_1" != "x$as_lineno_2" &&
15068 +  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
15069 +  # Find who we are.  Look in the path if we contain no path at all
15070 +  # relative or not.
15071 +  case $0 in
15072 +    *[\\/]* ) as_myself=$0 ;;
15073 +    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15074 +for as_dir in $PATH
15075 +do
15076 +  IFS=$as_save_IFS
15077 +  test -z "$as_dir" && as_dir=.
15078 +  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15079 +done
15080 +
15081 +       ;;
15082 +  esac
15083 +  # We did not find ourselves, most probably we were run as `sh COMMAND'
15084 +  # in which case we are not to be found in the path.
15085 +  if test "x$as_myself" = x; then
15086 +    as_myself=$0
15087 +  fi
15088 +  if test ! -f "$as_myself"; then
15089 +    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
15090 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
15091 +   { (exit 1); exit 1; }; }
15092 +  fi
15093 +  case $CONFIG_SHELL in
15094 +  '')
15095 +    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15096 +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
15097 +do
15098 +  IFS=$as_save_IFS
15099 +  test -z "$as_dir" && as_dir=.
15100 +  for as_base in sh bash ksh sh5; do
15101 +        case $as_dir in
15102 +        /*)
15103 +          if ("$as_dir/$as_base" -c '
15104 +  as_lineno_1=$LINENO
15105 +  as_lineno_2=$LINENO
15106 +  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15107 +  test "x$as_lineno_1" != "x$as_lineno_2" &&
15108 +  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
15109 +            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
15110 +            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
15111 +            CONFIG_SHELL=$as_dir/$as_base
15112 +            export CONFIG_SHELL
15113 +            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
15114 +          fi;;
15115 +        esac
15116 +       done
15117 +done
15118 +;;
15119 +  esac
15120 +
15121 +  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
15122 +  # uniformly replaced by the line number.  The first 'sed' inserts a
15123 +  # line-number line before each line; the second 'sed' does the real
15124 +  # work.  The second script uses 'N' to pair each line-number line
15125 +  # with the numbered line, and appends trailing '-' during
15126 +  # substitution so that $LINENO is not a special case at line end.
15127 +  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
15128 +  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
15129 +  sed '=' <$as_myself |
15130 +    sed '
15131 +      N
15132 +      s,$,-,
15133 +      : loop
15134 +      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
15135 +      t loop
15136 +      s,-$,,
15137 +      s,^['$as_cr_digits']*\n,,
15138 +    ' >$as_me.lineno &&
15139 +  chmod +x $as_me.lineno ||
15140 +    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
15141 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
15142 +   { (exit 1); exit 1; }; }
15143 +
15144 +  # Don't try to exec as it changes $[0], causing all sort of problems
15145 +  # (the dirname of $[0] is not the place where we might find the
15146 +  # original and so on.  Autoconf is especially sensible to this).
15147 +  . ./$as_me.lineno
15148 +  # Exit status is that of the last command.
15149 +  exit
15150 +}
15151 +
15152 +
15153 +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
15154 +  *c*,-n*) ECHO_N= ECHO_C='
15155 +' ECHO_T='     ' ;;
15156 +  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
15157 +  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
15158 +esac
15159 +
15160 +if expr a : '\(a\)' >/dev/null 2>&1; then
15161 +  as_expr=expr
15162 +else
15163 +  as_expr=false
15164 +fi
15165 +
15166 +rm -f conf$$ conf$$.exe conf$$.file
15167 +echo >conf$$.file
15168 +if ln -s conf$$.file conf$$ 2>/dev/null; then
15169 +  # We could just check for DJGPP; but this test a) works b) is more generic
15170 +  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15171 +  if test -f conf$$.exe; then
15172 +    # Don't use ln at all; we don't have any links
15173 +    as_ln_s='cp -p'
15174 +  else
15175 +    as_ln_s='ln -s'
15176 +  fi
15177 +elif ln conf$$.file conf$$ 2>/dev/null; then
15178 +  as_ln_s=ln
15179 +else
15180 +  as_ln_s='cp -p'
15181 +fi
15182 +rm -f conf$$ conf$$.exe conf$$.file
15183 +
15184 +if mkdir -p . 2>/dev/null; then
15185 +  as_mkdir_p=:
15186 +else
15187 +  as_mkdir_p=false
15188 +fi
15189 +
15190 +as_executable_p="test -f"
15191 +
15192 +# Sed expression to map a string onto a valid CPP name.
15193 +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
15194 +
15195 +# Sed expression to map a string onto a valid variable name.
15196 +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
15197 +
15198 +
15199 +# IFS
15200 +# We need space, tab and new line, in precisely that order.
15201 +as_nl='
15202 +'
15203 +IFS="  $as_nl"
15204 +
15205 +# CDPATH.
15206 +$as_unset CDPATH
15207 +
15208 +exec 6>&1
15209 +
15210 +# Open the log real soon, to keep \$[0] and so on meaningful, and to
15211 +# report actual input values of CONFIG_FILES etc. instead of their
15212 +# values after options handling.  Logging --version etc. is OK.
15213 +exec 5>>config.log
15214 +{
15215 +  echo
15216 +  sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
15217 +@%:@@%:@ Running $as_me. @%:@@%:@
15218 +_ASBOX
15219 +} >&5
15220 +cat >&5 <<_CSEOF
15221 +
15222 +This file was extended by $as_me, which was
15223 +generated by GNU Autoconf 2.54.  Invocation command line was
15224 +
15225 +  CONFIG_FILES    = $CONFIG_FILES
15226 +  CONFIG_HEADERS  = $CONFIG_HEADERS
15227 +  CONFIG_LINKS    = $CONFIG_LINKS
15228 +  CONFIG_COMMANDS = $CONFIG_COMMANDS
15229 +  $ $0 $@
15230 +
15231 +_CSEOF
15232 +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
15233 +echo >&5
15234 +_ACEOF
15235 +
15236 +# Files that config.status was made for.
15237 +if test -n "$ac_config_files"; then
15238 +  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15239 +fi
15240 +
15241 +if test -n "$ac_config_headers"; then
15242 +  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15243 +fi
15244 +
15245 +if test -n "$ac_config_links"; then
15246 +  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15247 +fi
15248 +
15249 +if test -n "$ac_config_commands"; then
15250 +  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15251 +fi
15252 +
15253 +cat >>$CONFIG_STATUS <<\_ACEOF
15254 +
15255 +ac_cs_usage="\
15256 +\`$as_me' instantiates files from templates according to the
15257 +current configuration.
15258 +
15259 +Usage: $0 [OPTIONS] [FILE]...
15260 +
15261 +  -h, --help       print this help, then exit
15262 +  -V, --version    print version number, then exit
15263 +  -d, --debug      don't remove temporary files
15264 +      --recheck    update $as_me by reconfiguring in the same conditions
15265 +  --file=FILE[:TEMPLATE]
15266 +                   instantiate the configuration file FILE
15267 +
15268 +Configuration files:
15269 +$config_files
15270 +
15271 +Configuration commands:
15272 +$config_commands
15273 +
15274 +Report bugs to <bug-autoconf@gnu.org>."
15275 +_ACEOF
15276 +
15277 +cat >>$CONFIG_STATUS <<_ACEOF
15278 +ac_cs_version="\\
15279 +config.status
15280 +configured by $0, generated by GNU Autoconf 2.54,
15281 +  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15282 +
15283 +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15284 +Free Software Foundation, Inc.
15285 +This config.status script is free software; the Free Software Foundation
15286 +gives unlimited permission to copy, distribute and modify it."
15287 +srcdir=$srcdir
15288 +INSTALL="$INSTALL"
15289 +_ACEOF
15290 +
15291 +cat >>$CONFIG_STATUS <<\_ACEOF
15292 +# If no file are specified by the user, then we need to provide default
15293 +# value.  By we need to know if files were specified by the user.
15294 +ac_need_defaults=:
15295 +while test $# != 0
15296 +do
15297 +  case $1 in
15298 +  --*=*)
15299 +    ac_option=`expr "x$1" : 'x\([^=]*\)='`
15300 +    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15301 +    ac_shift=:
15302 +    ;;
15303 +  -*)
15304 +    ac_option=$1
15305 +    ac_optarg=$2
15306 +    ac_shift=shift
15307 +    ;;
15308 +  *) # This is not an option, so the user has probably given explicit
15309 +     # arguments.
15310 +     ac_option=$1
15311 +     ac_need_defaults=false;;
15312 +  esac
15313 +
15314 +  case $ac_option in
15315 +  # Handling of the options.
15316 +_ACEOF
15317 +cat >>$CONFIG_STATUS <<_ACEOF
15318 +  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15319 +    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15320 +    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15321 +_ACEOF
15322 +cat >>$CONFIG_STATUS <<\_ACEOF
15323 +  --version | --vers* | -V )
15324 +    echo "$ac_cs_version"; exit 0 ;;
15325 +  --he | --h)
15326 +    # Conflict between --help and --header
15327 +    { { echo "$as_me:$LINENO: error: ambiguous option: $1
15328 +Try \`$0 --help' for more information." >&5
15329 +echo "$as_me: error: ambiguous option: $1
15330 +Try \`$0 --help' for more information." >&2;}
15331 +   { (exit 1); exit 1; }; };;
15332 +  --help | --hel | -h )
15333 +    echo "$ac_cs_usage"; exit 0 ;;
15334 +  --debug | --d* | -d )
15335 +    debug=: ;;
15336 +  --file | --fil | --fi | --f )
15337 +    $ac_shift
15338 +    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
15339 +    ac_need_defaults=false;;
15340 +  --header | --heade | --head | --hea )
15341 +    $ac_shift
15342 +    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
15343 +    ac_need_defaults=false;;
15344 +
15345 +  # This is an error.
15346 +  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
15347 +Try \`$0 --help' for more information." >&5
15348 +echo "$as_me: error: unrecognized option: $1
15349 +Try \`$0 --help' for more information." >&2;}
15350 +   { (exit 1); exit 1; }; } ;;
15351 +
15352 +  *) ac_config_targets="$ac_config_targets $1" ;;
15353 +
15354 +  esac
15355 +  shift
15356 +done
15357 +
15358 +_ACEOF
15359 +
15360 +cat >>$CONFIG_STATUS <<_ACEOF
15361 +#
15362 +# INIT-COMMANDS section.
15363 +#
15364 +
15365 +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
15366 +srcdir=${srcdir}
15367 +host=${host}
15368 +target=${target}
15369 +with_multisubdir=${with_multisubdir}
15370 +ac_configure_args="${multilib_arg} ${ac_configure_args}"
15371 +CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
15372 +gc_basedir=${gc_basedir}
15373 +CC="${CC}"
15374 +DEFS="$DEFS"
15375 +
15376 +
15377 +_ACEOF
15378 +
15379 +
15380 +
15381 +cat >>$CONFIG_STATUS <<\_ACEOF
15382 +for ac_config_target in $ac_config_targets
15383 +do
15384 +  case "$ac_config_target" in
15385 +  # Handling of arguments.
15386 +  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15387 +  "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
15388 +  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
15389 +  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15390 +  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
15391 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15392 +   { (exit 1); exit 1; }; };;
15393 +  esac
15394 +done
15395 +
15396 +# If the user did not use the arguments to specify the items to instantiate,
15397 +# then the envvar interface is used.  Set only those that are not.
15398 +# We use the long form for the default assignment because of an extremely
15399 +# bizarre bug on SunOS 4.1.3.
15400 +if $ac_need_defaults; then
15401 +  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15402 +  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15403 +fi
15404 +
15405 +# Create a temporary directory, and hook for its removal unless debugging.
15406 +$debug ||
15407 +{
15408 +  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15409 +  trap '{ (exit 1); exit 1; }' 1 2 13 15
15410 +}
15411 +
15412 +# Create a (secure) tmp directory for tmp files.
15413 +: ${TMPDIR=/tmp}
15414 +{
15415 +  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15416 +  test -n "$tmp" && test -d "$tmp"
15417 +}  ||
15418 +{
15419 +  tmp=$TMPDIR/cs$$-$RANDOM
15420 +  (umask 077 && mkdir $tmp)
15421 +} ||
15422 +{
15423 +   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15424 +   { (exit 1); exit 1; }
15425 +}
15426 +
15427 +_ACEOF
15428 +
15429 +cat >>$CONFIG_STATUS <<_ACEOF
15430 +
15431 +#
15432 +# CONFIG_FILES section.
15433 +#
15434 +
15435 +# No need to generate the scripts if there are no CONFIG_FILES.
15436 +# This happens for instance when ./config.status config.h
15437 +if test -n "\$CONFIG_FILES"; then
15438 +  # Protect against being on the right side of a sed subst in config.status.
15439 +  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15440 +   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15441 +s,@SHELL@,$SHELL,;t t
15442 +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15443 +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15444 +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15445 +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15446 +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15447 +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15448 +s,@exec_prefix@,$exec_prefix,;t t
15449 +s,@prefix@,$prefix,;t t
15450 +s,@program_transform_name@,$program_transform_name,;t t
15451 +s,@bindir@,$bindir,;t t
15452 +s,@sbindir@,$sbindir,;t t
15453 +s,@libexecdir@,$libexecdir,;t t
15454 +s,@datadir@,$datadir,;t t
15455 +s,@sysconfdir@,$sysconfdir,;t t
15456 +s,@sharedstatedir@,$sharedstatedir,;t t
15457 +s,@localstatedir@,$localstatedir,;t t
15458 +s,@libdir@,$libdir,;t t
15459 +s,@includedir@,$includedir,;t t
15460 +s,@oldincludedir@,$oldincludedir,;t t
15461 +s,@infodir@,$infodir,;t t
15462 +s,@mandir@,$mandir,;t t
15463 +s,@build_alias@,$build_alias,;t t
15464 +s,@host_alias@,$host_alias,;t t
15465 +s,@target_alias@,$target_alias,;t t
15466 +s,@DEFS@,$DEFS,;t t
15467 +s,@ECHO_C@,$ECHO_C,;t t
15468 +s,@ECHO_N@,$ECHO_N,;t t
15469 +s,@ECHO_T@,$ECHO_T,;t t
15470 +s,@LIBS@,$LIBS,;t t
15471 +s,@gc_basedir@,$gc_basedir,;t t
15472 +s,@build@,$build,;t t
15473 +s,@build_cpu@,$build_cpu,;t t
15474 +s,@build_vendor@,$build_vendor,;t t
15475 +s,@build_os@,$build_os,;t t
15476 +s,@host@,$host,;t t
15477 +s,@host_cpu@,$host_cpu,;t t
15478 +s,@host_vendor@,$host_vendor,;t t
15479 +s,@host_os@,$host_os,;t t
15480 +s,@target@,$target,;t t
15481 +s,@target_cpu@,$target_cpu,;t t
15482 +s,@target_vendor@,$target_vendor,;t t
15483 +s,@target_os@,$target_os,;t t
15484 +s,@mkinstalldirs@,$mkinstalldirs,;t t
15485 +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15486 +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15487 +s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15488 +s,@PACKAGE@,$PACKAGE,;t t
15489 +s,@VERSION@,$VERSION,;t t
15490 +s,@ACLOCAL@,$ACLOCAL,;t t
15491 +s,@AUTOCONF@,$AUTOCONF,;t t
15492 +s,@AUTOMAKE@,$AUTOMAKE,;t t
15493 +s,@AUTOHEADER@,$AUTOHEADER,;t t
15494 +s,@MAKEINFO@,$MAKEINFO,;t t
15495 +s,@AMTAR@,$AMTAR,;t t
15496 +s,@install_sh@,$install_sh,;t t
15497 +s,@STRIP@,$STRIP,;t t
15498 +s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
15499 +s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
15500 +s,@AWK@,$AWK,;t t
15501 +s,@SET_MAKE@,$SET_MAKE,;t t
15502 +s,@AS@,$AS,;t t
15503 +s,@ac_ct_AS@,$ac_ct_AS,;t t
15504 +s,@AR@,$AR,;t t
15505 +s,@ac_ct_AR@,$ac_ct_AR,;t t
15506 +s,@RANLIB@,$RANLIB,;t t
15507 +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
15508 +s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
15509 +s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
15510 +s,@MAINT@,$MAINT,;t t
15511 +s,@GC_CFLAGS@,$GC_CFLAGS,;t t
15512 +s,@CC@,$CC,;t t
15513 +s,@CFLAGS@,$CFLAGS,;t t
15514 +s,@LDFLAGS@,$LDFLAGS,;t t
15515 +s,@CPPFLAGS@,$CPPFLAGS,;t t
15516 +s,@ac_ct_CC@,$ac_ct_CC,;t t
15517 +s,@EXEEXT@,$EXEEXT,;t t
15518 +s,@OBJEXT@,$OBJEXT,;t t
15519 +s,@DEPDIR@,$DEPDIR,;t t
15520 +s,@am__include@,$am__include,;t t
15521 +s,@am__quote@,$am__quote,;t t
15522 +s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
15523 +s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
15524 +s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
15525 +s,@CCDEPMODE@,$CCDEPMODE,;t t
15526 +s,@LN_S@,$LN_S,;t t
15527 +s,@ECHO@,$ECHO,;t t
15528 +s,@CPP@,$CPP,;t t
15529 +s,@EGREP@,$EGREP,;t t
15530 +s,@LIBTOOL@,$LIBTOOL,;t t
15531 +s,@THREADLIBS@,$THREADLIBS,;t t
15532 +s,@POWERPC_DARWIN_TRUE@,$POWERPC_DARWIN_TRUE,;t t
15533 +s,@POWERPC_DARWIN_FALSE@,$POWERPC_DARWIN_FALSE,;t t
15534 +s,@EXTRA_TEST_LIBS@,$EXTRA_TEST_LIBS,;t t
15535 +s,@target_all@,$target_all,;t t
15536 +s,@CXX@,$CXX,;t t
15537 +s,@INCLUDES@,$INCLUDES,;t t
15538 +s,@CXXINCLUDES@,$CXXINCLUDES,;t t
15539 +s,@addobjs@,$addobjs,;t t
15540 +s,@MY_CFLAGS@,$MY_CFLAGS,;t t
15541 +s,@USE_LIBDIR_TRUE@,$USE_LIBDIR_TRUE,;t t
15542 +s,@USE_LIBDIR_FALSE@,$USE_LIBDIR_FALSE,;t t
15543 +s,@LIB@&t@OBJS@,$LIB@&t@OBJS,;t t
15544 +s,@LTLIBOBJS@,$LTLIBOBJS,;t t
15545 +CEOF
15546 +
15547 +_ACEOF
15548 +
15549 +  cat >>$CONFIG_STATUS <<\_ACEOF
15550 +  # Split the substitutions into bite-sized pieces for seds with
15551 +  # small command number limits, like on Digital OSF/1 and HP-UX.
15552 +  ac_max_sed_lines=48
15553 +  ac_sed_frag=1 # Number of current file.
15554 +  ac_beg=1 # First line for current file.
15555 +  ac_end=$ac_max_sed_lines # Line after last line for current file.
15556 +  ac_more_lines=:
15557 +  ac_sed_cmds=
15558 +  while $ac_more_lines; do
15559 +    if test $ac_beg -gt 1; then
15560 +      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15561 +    else
15562 +      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15563 +    fi
15564 +    if test ! -s $tmp/subs.frag; then
15565 +      ac_more_lines=false
15566 +    else
15567 +      # The purpose of the label and of the branching condition is to
15568 +      # speed up the sed processing (if there are no `@' at all, there
15569 +      # is no need to browse any of the substitutions).
15570 +      # These are the two extra sed commands mentioned above.
15571 +      (echo ':t
15572 +  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
15573 +      if test -z "$ac_sed_cmds"; then
15574 +       ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
15575 +      else
15576 +       ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
15577 +      fi
15578 +      ac_sed_frag=`expr $ac_sed_frag + 1`
15579 +      ac_beg=$ac_end
15580 +      ac_end=`expr $ac_end + $ac_max_sed_lines`
15581 +    fi
15582 +  done
15583 +  if test -z "$ac_sed_cmds"; then
15584 +    ac_sed_cmds=cat
15585 +  fi
15586 +fi # test -n "$CONFIG_FILES"
15587 +
15588 +_ACEOF
15589 +cat >>$CONFIG_STATUS <<\_ACEOF
15590 +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
15591 +  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15592 +  case $ac_file in
15593 +  - | *:- | *:-:* ) # input from stdin
15594 +        cat >$tmp/stdin
15595 +        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15596 +        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15597 +  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15598 +        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15599 +  * )   ac_file_in=$ac_file.in ;;
15600 +  esac
15601 +
15602 +  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
15603 +  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
15604 +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15605 +         X"$ac_file" : 'X\(//\)[^/]' \| \
15606 +         X"$ac_file" : 'X\(//\)$' \| \
15607 +         X"$ac_file" : 'X\(/\)' \| \
15608 +         .     : '\(.\)' 2>/dev/null ||
15609 +echo X"$ac_file" |
15610 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15611 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15612 +         /^X\(\/\/\)$/{ s//\1/; q; }
15613 +         /^X\(\/\).*/{ s//\1/; q; }
15614 +         s/.*/./; q'`
15615 +  { if $as_mkdir_p; then
15616 +    mkdir -p "$ac_dir"
15617 +  else
15618 +    as_dir="$ac_dir"
15619 +    as_dirs=
15620 +    while test ! -d "$as_dir"; do
15621 +      as_dirs="$as_dir $as_dirs"
15622 +      as_dir=`(dirname "$as_dir") 2>/dev/null ||
15623 +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15624 +         X"$as_dir" : 'X\(//\)[^/]' \| \
15625 +         X"$as_dir" : 'X\(//\)$' \| \
15626 +         X"$as_dir" : 'X\(/\)' \| \
15627 +         .     : '\(.\)' 2>/dev/null ||
15628 +echo X"$as_dir" |
15629 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15630 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15631 +         /^X\(\/\/\)$/{ s//\1/; q; }
15632 +         /^X\(\/\).*/{ s//\1/; q; }
15633 +         s/.*/./; q'`
15634 +    done
15635 +    test ! -n "$as_dirs" || mkdir $as_dirs
15636 +  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
15637 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
15638 +   { (exit 1); exit 1; }; }; }
15639 +
15640 +  ac_builddir=.
15641 +
15642 +if test "$ac_dir" != .; then
15643 +  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
15644 +  # A "../" for each directory in $ac_dir_suffix.
15645 +  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
15646 +else
15647 +  ac_dir_suffix= ac_top_builddir=
15648 +fi
15649 +
15650 +case $srcdir in
15651 +  .)  # No --srcdir option.  We are building in place.
15652 +    ac_srcdir=.
15653 +    if test -z "$ac_top_builddir"; then
15654 +       ac_top_srcdir=.
15655 +    else
15656 +       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
15657 +    fi ;;
15658 +  [\\/]* | ?:[\\/]* )  # Absolute path.
15659 +    ac_srcdir=$srcdir$ac_dir_suffix;
15660 +    ac_top_srcdir=$srcdir ;;
15661 +  *) # Relative path.
15662 +    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
15663 +    ac_top_srcdir=$ac_top_builddir$srcdir ;;
15664 +esac
15665 +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
15666 +# absolute.
15667 +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
15668 +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
15669 +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
15670 +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
15671 +
15672 +
15673 +  case $INSTALL in
15674 +  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15675 +  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
15676 +  esac
15677 +
15678 +  if test x"$ac_file" != x-; then
15679 +    { echo "$as_me:$LINENO: creating $ac_file" >&5
15680 +echo "$as_me: creating $ac_file" >&6;}
15681 +    rm -f "$ac_file"
15682 +  fi
15683 +  # Let's still pretend it is `configure' which instantiates (i.e., don't
15684 +  # use $as_me), people would be surprised to read:
15685 +  #    /* config.h.  Generated by config.status.  */
15686 +  if test x"$ac_file" = x-; then
15687 +    configure_input=
15688 +  else
15689 +    configure_input="$ac_file.  "
15690 +  fi
15691 +  configure_input=$configure_input"Generated from `echo $ac_file_in |
15692 +                                     sed 's,.*/,,'` by configure."
15693 +
15694 +  # First look for the input files in the build tree, otherwise in the
15695 +  # src tree.
15696 +  ac_file_inputs=`IFS=:
15697 +    for f in $ac_file_in; do
15698 +      case $f in
15699 +      -) echo $tmp/stdin ;;
15700 +      [\\/$]*)
15701 +         # Absolute (can't be DOS-style, as IFS=:)
15702 +         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
15703 +echo "$as_me: error: cannot find input file: $f" >&2;}
15704 +   { (exit 1); exit 1; }; }
15705 +         echo $f;;
15706 +      *) # Relative
15707 +         if test -f "$f"; then
15708 +           # Build tree
15709 +           echo $f
15710 +         elif test -f "$srcdir/$f"; then
15711 +           # Source tree
15712 +           echo $srcdir/$f
15713 +         else
15714 +           # /dev/null tree
15715 +           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
15716 +echo "$as_me: error: cannot find input file: $f" >&2;}
15717 +   { (exit 1); exit 1; }; }
15718 +         fi;;
15719 +      esac
15720 +    done` || { (exit 1); exit 1; }
15721 +_ACEOF
15722 +cat >>$CONFIG_STATUS <<_ACEOF
15723 +  sed "$ac_vpsub
15724 +$extrasub
15725 +_ACEOF
15726 +cat >>$CONFIG_STATUS <<\_ACEOF
15727 +:t
15728 +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15729 +s,@configure_input@,$configure_input,;t t
15730 +s,@srcdir@,$ac_srcdir,;t t
15731 +s,@abs_srcdir@,$ac_abs_srcdir,;t t
15732 +s,@top_srcdir@,$ac_top_srcdir,;t t
15733 +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
15734 +s,@builddir@,$ac_builddir,;t t
15735 +s,@abs_builddir@,$ac_abs_builddir,;t t
15736 +s,@top_builddir@,$ac_top_builddir,;t t
15737 +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
15738 +s,@INSTALL@,$ac_INSTALL,;t t
15739 +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
15740 +  rm -f $tmp/stdin
15741 +  if test x"$ac_file" != x-; then
15742 +    mv $tmp/out $ac_file
15743 +  else
15744 +    cat $tmp/out
15745 +    rm -f $tmp/out
15746 +  fi
15747 +
15748 +done
15749 +_ACEOF
15750 +cat >>$CONFIG_STATUS <<\_ACEOF
15751 +
15752 +#
15753 +# CONFIG_COMMANDS section.
15754 +#
15755 +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
15756 +  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
15757 +  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
15758 +  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
15759 +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15760 +         X"$ac_dest" : 'X\(//\)[^/]' \| \
15761 +         X"$ac_dest" : 'X\(//\)$' \| \
15762 +         X"$ac_dest" : 'X\(/\)' \| \
15763 +         .     : '\(.\)' 2>/dev/null ||
15764 +echo X"$ac_dest" |
15765 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15766 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15767 +         /^X\(\/\/\)$/{ s//\1/; q; }
15768 +         /^X\(\/\).*/{ s//\1/; q; }
15769 +         s/.*/./; q'`
15770 +  ac_builddir=.
15771 +
15772 +if test "$ac_dir" != .; then
15773 +  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
15774 +  # A "../" for each directory in $ac_dir_suffix.
15775 +  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
15776 +else
15777 +  ac_dir_suffix= ac_top_builddir=
15778 +fi
15779 +
15780 +case $srcdir in
15781 +  .)  # No --srcdir option.  We are building in place.
15782 +    ac_srcdir=.
15783 +    if test -z "$ac_top_builddir"; then
15784 +       ac_top_srcdir=.
15785 +    else
15786 +       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
15787 +    fi ;;
15788 +  [\\/]* | ?:[\\/]* )  # Absolute path.
15789 +    ac_srcdir=$srcdir$ac_dir_suffix;
15790 +    ac_top_srcdir=$srcdir ;;
15791 +  *) # Relative path.
15792 +    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
15793 +    ac_top_srcdir=$ac_top_builddir$srcdir ;;
15794 +esac
15795 +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
15796 +# absolute.
15797 +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
15798 +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
15799 +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
15800 +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
15801 +
15802 +
15803 +  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
15804 +echo "$as_me: executing $ac_dest commands" >&6;}
15805 +  case $ac_dest in
15806 +    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
15807 +  # Strip MF so we end up with the name of the file.
15808 +  mf=`echo "$mf" | sed -e 's/:.*$//'`
15809 +  if (sed 1q $mf | fgrep 'generated by automake') > /dev/null 2>&1; then
15810 +    dirpart=`(dirname "$mf") 2>/dev/null ||
15811 +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15812 +         X"$mf" : 'X\(//\)[^/]' \| \
15813 +         X"$mf" : 'X\(//\)$' \| \
15814 +         X"$mf" : 'X\(/\)' \| \
15815 +         .     : '\(.\)' 2>/dev/null ||
15816 +echo X"$mf" |
15817 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15818 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15819 +         /^X\(\/\/\)$/{ s//\1/; q; }
15820 +         /^X\(\/\).*/{ s//\1/; q; }
15821 +         s/.*/./; q'`
15822 +  else
15823 +    continue
15824 +  fi
15825 +  grep '^DEP_FILES *= *[^ @%:@]' < "$mf" > /dev/null || continue
15826 +  # Extract the definition of DEP_FILES from the Makefile without
15827 +  # running `make'.
15828 +  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
15829 +  test -z "$DEPDIR" && continue
15830 +  # When using ansi2knr, U may be empty or an underscore; expand it
15831 +  U=`sed -n -e '/^U = / s///p' < "$mf"`
15832 +  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
15833 +  # We invoke sed twice because it is the simplest approach to
15834 +  # changing $(DEPDIR) to its actual value in the expansion.
15835 +  for file in `sed -n -e '
15836 +    /^DEP_FILES = .*\\\\$/ {
15837 +      s/^DEP_FILES = //
15838 +      :loop
15839 +       s/\\\\$//
15840 +       p
15841 +       n
15842 +       /\\\\$/ b loop
15843 +      p
15844 +    }
15845 +    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
15846 +       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
15847 +    # Make sure the directory exists.
15848 +    test -f "$dirpart/$file" && continue
15849 +    fdir=`(dirname "$file") 2>/dev/null ||
15850 +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15851 +         X"$file" : 'X\(//\)[^/]' \| \
15852 +         X"$file" : 'X\(//\)$' \| \
15853 +         X"$file" : 'X\(/\)' \| \
15854 +         .     : '\(.\)' 2>/dev/null ||
15855 +echo X"$file" |
15856 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15857 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15858 +         /^X\(\/\/\)$/{ s//\1/; q; }
15859 +         /^X\(\/\).*/{ s//\1/; q; }
15860 +         s/.*/./; q'`
15861 +    { if $as_mkdir_p; then
15862 +    mkdir -p $dirpart/$fdir
15863 +  else
15864 +    as_dir=$dirpart/$fdir
15865 +    as_dirs=
15866 +    while test ! -d "$as_dir"; do
15867 +      as_dirs="$as_dir $as_dirs"
15868 +      as_dir=`(dirname "$as_dir") 2>/dev/null ||
15869 +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15870 +         X"$as_dir" : 'X\(//\)[^/]' \| \
15871 +         X"$as_dir" : 'X\(//\)$' \| \
15872 +         X"$as_dir" : 'X\(/\)' \| \
15873 +         .     : '\(.\)' 2>/dev/null ||
15874 +echo X"$as_dir" |
15875 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15876 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15877 +         /^X\(\/\/\)$/{ s//\1/; q; }
15878 +         /^X\(\/\).*/{ s//\1/; q; }
15879 +         s/.*/./; q'`
15880 +    done
15881 +    test ! -n "$as_dirs" || mkdir $as_dirs
15882 +  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
15883 +echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
15884 +   { (exit 1); exit 1; }; }; }
15885 +
15886 +    # echo "creating $dirpart/$file"
15887 +    echo '# dummy' > "$dirpart/$file"
15888 +  done
15889 +done
15890 + ;;
15891 +    default ) 
15892 +echo "$DEFS" > boehm-cflags
15893 +
15894 +if test -n "$CONFIG_FILES"; then
15895 +  LD="${ORIGINAL_LD_FOR_MULTILIBS}"
15896 +  ac_file=Makefile . ${gc_basedir}/../config-ml.in
15897 +fi ;;
15898 +  esac
15899 +done
15900 +_ACEOF
15901 +
15902 +cat >>$CONFIG_STATUS <<\_ACEOF
15903 +
15904 +{ (exit 0); exit 0; }
15905 +_ACEOF
15906 +chmod +x $CONFIG_STATUS
15907 +ac_clean_files=$ac_clean_files_save
15908 +
15909 +
15910 +# configure is writing to config.log, and then calls config.status.
15911 +# config.status does its own redirection, appending to config.log.
15912 +# Unfortunately, on DOS this fails, as config.log is still kept open
15913 +# by configure, so config.status won't be able to write to it; its
15914 +# output is simply discarded.  So we exec the FD to /dev/null,
15915 +# effectively closing config.log, so it can be properly (re)opened and
15916 +# appended to by config.status.  When coming back to configure, we
15917 +# need to make the FD available again.
15918 +if test "$no_create" != yes; then
15919 +  ac_cs_success=:
15920 +  exec 5>/dev/null
15921 +  $SHELL $CONFIG_STATUS || ac_cs_success=false
15922 +  exec 5>>config.log
15923 +  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15924 +  # would make configure fail if this is the last instruction.
15925 +  $ac_cs_success || { (exit 1); exit 1; }
15926 +fi
15927 +
15928 diff -buNr boehm-gc/autom4te.cache/requests boehm-gc/autom4te.cache/requests
15929 --- boehm-gc/autom4te.cache/requests    Wed Dec 31 16:00:00 1969
15930 +++ boehm-gc/autom4te.cache/requests    Sat Sep 13 01:32:42 2003
15931 @@ -0,0 +1,198 @@
15932 +# This file was created by autom4te-2.54.
15933 +# It contains the lists of macros which have been traced.
15934 +# It can be safely removed.
15935 +
15936 +@request = (
15937 +             bless( [
15938 +                      '0',
15939 +                      0,
15940 +                      [
15941 +                        '/sw/share/autoconf'
15942 +                      ],
15943 +                      [
15944 +                        '/sw/share/autoconf/autoconf/autoconf.m4f',
15945 +                        'aclocal.m4',
15946 +                        'configure.in'
15947 +                      ],
15948 +                      {
15949 +                        'm4_pattern_forbid' => 1,
15950 +                        'AC_C_VOLATILE' => 1,
15951 +                        'AC_TYPE_OFF_T' => 1,
15952 +                        'AC_FUNC_CLOSEDIR_VOID' => 1,
15953 +                        'AC_REPLACE_FNMATCH' => 1,
15954 +                        'AC_PROG_LIBTOOL' => 1,
15955 +                        'AC_FUNC_STAT' => 1,
15956 +                        'AC_FUNC_WAIT3' => 1,
15957 +                        'AC_HEADER_TIME' => 1,
15958 +                        'AC_FUNC_LSTAT' => 1,
15959 +                        'AC_STRUCT_TM' => 1,
15960 +                        'AM_AUTOMAKE_VERSION' => 1,
15961 +                        'AC_FUNC_GETMNTENT' => 1,
15962 +                        'AC_TYPE_MODE_T' => 1,
15963 +                        'AC_FUNC_STRTOD' => 1,
15964 +                        'AC_CHECK_HEADERS' => 1,
15965 +                        'AC_FUNC_STRNLEN' => 1,
15966 +                        'AC_PROG_CXX' => 1,
15967 +                        'AC_PATH_X' => 1,
15968 +                        'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
15969 +                        'AC_PROG_AWK' => 1,
15970 +                        'AC_HEADER_STDC' => 1,
15971 +                        'AC_HEADER_MAJOR' => 1,
15972 +                        'AC_FUNC_ERROR_AT_LINE' => 1,
15973 +                        'AC_PROG_GCC_TRADITIONAL' => 1,
15974 +                        'AC_LIBSOURCE' => 1,
15975 +                        'AC_FUNC_MBRTOWC' => 1,
15976 +                        'AC_STRUCT_ST_BLOCKS' => 1,
15977 +                        'AC_TYPE_SIGNAL' => 1,
15978 +                        'AC_TYPE_UID_T' => 1,
15979 +                        'AC_CONFIG_AUX_DIR' => 1,
15980 +                        'AC_PROG_MAKE_SET' => 1,
15981 +                        'm4_pattern_allow' => 1,
15982 +                        'AC_DEFINE_TRACE_LITERAL' => 1,
15983 +                        'AC_FUNC_STRERROR_R' => 1,
15984 +                        'AC_PROG_CC' => 1,
15985 +                        'AC_FUNC_FORK' => 1,
15986 +                        'AC_DECL_SYS_SIGLIST' => 1,
15987 +                        'AC_FUNC_STRCOLL' => 1,
15988 +                        'AC_FUNC_VPRINTF' => 1,
15989 +                        'AC_PROG_YACC' => 1,
15990 +                        'AC_INIT' => 1,
15991 +                        'AC_STRUCT_TIMEZONE' => 1,
15992 +                        'AC_FUNC_CHOWN' => 1,
15993 +                        'AC_SUBST' => 1,
15994 +                        'AC_FUNC_ALLOCA' => 1,
15995 +                        'AC_CANONICAL_HOST' => 1,
15996 +                        'AC_FUNC_GETPGRP' => 1,
15997 +                        'AC_PROG_RANLIB' => 1,
15998 +                        'AM_INIT_AUTOMAKE' => 1,
15999 +                        'AC_FUNC_SETPGRP' => 1,
16000 +                        'AC_CONFIG_SUBDIRS' => 1,
16001 +                        'AC_FUNC_MMAP' => 1,
16002 +                        'AC_FUNC_REALLOC' => 1,
16003 +                        'AC_TYPE_SIZE_T' => 1,
16004 +                        'AC_CHECK_TYPES' => 1,
16005 +                        'AC_CHECK_MEMBERS' => 1,
16006 +                        'AM_MAINTAINER_MODE' => 1,
16007 +                        'AC_FUNC_UTIME_NULL' => 1,
16008 +                        'AC_FUNC_SELECT_ARGTYPES' => 1,
16009 +                        'AC_FUNC_STRFTIME' => 1,
16010 +                        'AC_HEADER_STAT' => 1,
16011 +                        'AC_C_INLINE' => 1,
16012 +                        'AC_PROG_CPP' => 1,
16013 +                        'AC_TYPE_PID_T' => 1,
16014 +                        'AC_PROG_LEX' => 1,
16015 +                        'AC_C_CONST' => 1,
16016 +                        'AC_CONFIG_FILES' => 1,
16017 +                        'include' => 1,
16018 +                        'AC_FUNC_SETVBUF_REVERSED' => 1,
16019 +                        'AC_PROG_INSTALL' => 1,
16020 +                        'AM_GNU_GETTEXT' => 1,
16021 +                        'AC_CHECK_LIB' => 1,
16022 +                        'AC_FUNC_OBSTACK' => 1,
16023 +                        'AC_FUNC_MALLOC' => 1,
16024 +                        'AC_FUNC_GETGROUPS' => 1,
16025 +                        'AC_FUNC_GETLOADAVG' => 1,
16026 +                        'AH_OUTPUT' => 1,
16027 +                        'AC_FUNC_FSEEKO' => 1,
16028 +                        'AM_PROG_CC_C_O' => 1,
16029 +                        'AC_FUNC_MKTIME' => 1,
16030 +                        'AC_CANONICAL_SYSTEM' => 1,
16031 +                        'AM_CONDITIONAL' => 1,
16032 +                        'AC_CONFIG_HEADERS' => 1,
16033 +                        'AC_HEADER_SYS_WAIT' => 1,
16034 +                        'AC_PROG_LN_S' => 1,
16035 +                        'AC_FUNC_MEMCMP' => 1,
16036 +                        'm4_include' => 1,
16037 +                        'AC_HEADER_DIRENT' => 1,
16038 +                        'AC_CHECK_FUNCS' => 1
16039 +                      }
16040 +                    ], 'Request' ),
16041 +             bless( [
16042 +                      '1',
16043 +                      1,
16044 +                      [
16045 +                        '/sw/share/autoconf-2.54'
16046 +                      ],
16047 +                      [
16048 +                        '--reload-state=/sw/share/autoconf-2.54/autoconf/autoconf.m4f',
16049 +                        'aclocal.m4',
16050 +                        'configure.in'
16051 +                      ],
16052 +                      {
16053 +                        'm4_pattern_forbid' => 1,
16054 +                        'AC_TYPE_OFF_T' => 1,
16055 +                        'AC_PROG_LIBTOOL' => 1,
16056 +                        'AC_FUNC_STAT' => 1,
16057 +                        'AC_HEADER_TIME' => 1,
16058 +                        'AC_FUNC_WAIT3' => 1,
16059 +                        'AC_STRUCT_TM' => 1,
16060 +                        'AC_FUNC_LSTAT' => 1,
16061 +                        'AC_TYPE_MODE_T' => 1,
16062 +                        'AC_FUNC_STRTOD' => 1,
16063 +                        'AC_CHECK_HEADERS' => 1,
16064 +                        'AC_PROG_CXX' => 1,
16065 +                        'AC_PATH_X' => 1,
16066 +                        'AC_PROG_AWK' => 1,
16067 +                        'AC_HEADER_STDC' => 1,
16068 +                        'AC_HEADER_MAJOR' => 1,
16069 +                        'AC_FUNC_ERROR_AT_LINE' => 1,
16070 +                        'AC_PROG_GCC_TRADITIONAL' => 1,
16071 +                        'AC_LIBSOURCE' => 1,
16072 +                        'AC_STRUCT_ST_BLOCKS' => 1,
16073 +                        'AC_TYPE_SIGNAL' => 1,
16074 +                        'AC_TYPE_UID_T' => 1,
16075 +                        'AC_PROG_MAKE_SET' => 1,
16076 +                        'm4_pattern_allow' => 1,
16077 +                        'AC_DEFINE_TRACE_LITERAL' => 1,
16078 +                        'AM_PROG_LIBTOOL' => 1,
16079 +                        'AC_FUNC_STRERROR_R' => 1,
16080 +                        'AC_PROG_CC' => 1,
16081 +                        'AC_FUNC_FORK' => 1,
16082 +                        'AC_DECL_SYS_SIGLIST' => 1,
16083 +                        'AC_FUNC_STRCOLL' => 1,
16084 +                        'AC_FUNC_VPRINTF' => 1,
16085 +                        'AC_PROG_YACC' => 1,
16086 +                        'AC_STRUCT_TIMEZONE' => 1,
16087 +                        'AC_FUNC_CHOWN' => 1,
16088 +                        'AC_SUBST' => 1,
16089 +                        'AC_FUNC_ALLOCA' => 1,
16090 +                        'AC_FUNC_GETPGRP' => 1,
16091 +                        'AC_PROG_RANLIB' => 1,
16092 +                        'AC_FUNC_SETPGRP' => 1,
16093 +                        'AC_FUNC_MMAP' => 1,
16094 +                        'AC_TYPE_SIZE_T' => 1,
16095 +                        'AC_CHECK_TYPES' => 1,
16096 +                        'AC_FUNC_UTIME_NULL' => 1,
16097 +                        'AC_FUNC_STRFTIME' => 1,
16098 +                        'AC_HEADER_STAT' => 1,
16099 +                        'AC_C_INLINE' => 1,
16100 +                        'AC_PROG_CPP' => 1,
16101 +                        'AC_C_CONST' => 1,
16102 +                        'AC_PROG_LEX' => 1,
16103 +                        'AC_TYPE_PID_T' => 1,
16104 +                        'AC_CONFIG_FILES' => 1,
16105 +                        'include' => 1,
16106 +                        'AC_FUNC_SETVBUF_REVERSED' => 1,
16107 +                        'AC_FUNC_FNMATCH' => 1,
16108 +                        'AC_PROG_INSTALL' => 1,
16109 +                        'AM_GNU_GETTEXT' => 1,
16110 +                        'AC_FUNC_OBSTACK' => 1,
16111 +                        'AC_CHECK_LIB' => 1,
16112 +                        'AC_FUNC_MALLOC' => 1,
16113 +                        'AC_FUNC_GETGROUPS' => 1,
16114 +                        'AC_FUNC_GETLOADAVG' => 1,
16115 +                        'AH_OUTPUT' => 1,
16116 +                        'AC_FUNC_FSEEKO' => 1,
16117 +                        'AC_FUNC_MKTIME' => 1,
16118 +                        'AM_CONDITIONAL' => 1,
16119 +                        'AC_CONFIG_HEADERS' => 1,
16120 +                        'AC_HEADER_SYS_WAIT' => 1,
16121 +                        'AC_PROG_LN_S' => 1,
16122 +                        'AC_FUNC_MEMCMP' => 1,
16123 +                        'm4_include' => 1,
16124 +                        'AC_HEADER_DIRENT' => 1,
16125 +                        'AC_CHECK_FUNCS' => 1
16126 +                      }
16127 +                    ], 'Request' )
16128 +           );
16129 +
16130 diff -buNr boehm-gc/autom4te.cache/traces.0 boehm-gc/autom4te.cache/traces.0
16131 --- boehm-gc/autom4te.cache/traces.0    Wed Dec 31 16:00:00 1969
16132 +++ boehm-gc/autom4te.cache/traces.0    Sat Sep 13 01:32:42 2003
16133 @@ -0,0 +1,185 @@
16134 +m4trace:configure.in:16: -1- AC_INIT([gcj_mlc.c])
16135 +m4trace:configure.in:16: -1- m4_pattern_forbid([^_?A[CHUM]_])
16136 +m4trace:configure.in:16: -1- m4_pattern_forbid([_AC_])
16137 +m4trace:configure.in:16: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
16138 +m4trace:configure.in:16: -1- m4_pattern_allow([^AS_FLAGS$])
16139 +m4trace:configure.in:16: -1- m4_pattern_forbid([^_?m4_])
16140 +m4trace:configure.in:16: -1- m4_pattern_forbid([^dnl$])
16141 +m4trace:configure.in:16: -1- m4_pattern_forbid([^_?AS_])
16142 +m4trace:configure.in:16: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
16143 +m4trace:configure.in:16: -1- AC_SUBST([PATH_SEPARATOR])
16144 +m4trace:configure.in:16: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME],      ['AC_PACKAGE_NAME'])])
16145 +m4trace:configure.in:16: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME],   ['AC_PACKAGE_TARNAME'])])
16146 +m4trace:configure.in:16: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION],   ['AC_PACKAGE_VERSION'])])
16147 +m4trace:configure.in:16: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING],    ['AC_PACKAGE_STRING'])])
16148 +m4trace:configure.in:16: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
16149 +m4trace:configure.in:16: -1- AC_SUBST([exec_prefix], [NONE])
16150 +m4trace:configure.in:16: -1- AC_SUBST([prefix], [NONE])
16151 +m4trace:configure.in:16: -1- AC_SUBST([program_transform_name], [s,x,x,])
16152 +m4trace:configure.in:16: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
16153 +m4trace:configure.in:16: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
16154 +m4trace:configure.in:16: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
16155 +m4trace:configure.in:16: -1- AC_SUBST([datadir], ['${prefix}/share'])
16156 +m4trace:configure.in:16: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
16157 +m4trace:configure.in:16: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
16158 +m4trace:configure.in:16: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
16159 +m4trace:configure.in:16: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
16160 +m4trace:configure.in:16: -1- AC_SUBST([includedir], ['${prefix}/include'])
16161 +m4trace:configure.in:16: -1- AC_SUBST([oldincludedir], ['/usr/include'])
16162 +m4trace:configure.in:16: -1- AC_SUBST([infodir], ['${prefix}/info'])
16163 +m4trace:configure.in:16: -1- AC_SUBST([mandir], ['${prefix}/man'])
16164 +m4trace:configure.in:16: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
16165 +m4trace:configure.in:16: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
16166 +#undef PACKAGE_NAME])
16167 +m4trace:configure.in:16: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
16168 +m4trace:configure.in:16: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
16169 +#undef PACKAGE_TARNAME])
16170 +m4trace:configure.in:16: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
16171 +m4trace:configure.in:16: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
16172 +#undef PACKAGE_VERSION])
16173 +m4trace:configure.in:16: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
16174 +m4trace:configure.in:16: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
16175 +#undef PACKAGE_STRING])
16176 +m4trace:configure.in:16: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
16177 +m4trace:configure.in:16: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
16178 +#undef PACKAGE_BUGREPORT])
16179 +m4trace:configure.in:16: -1- AC_SUBST([build_alias])
16180 +m4trace:configure.in:16: -1- AC_SUBST([host_alias])
16181 +m4trace:configure.in:16: -1- AC_SUBST([target_alias])
16182 +m4trace:configure.in:16: -1- AC_SUBST([DEFS])
16183 +m4trace:configure.in:16: -1- AC_SUBST([ECHO_C])
16184 +m4trace:configure.in:16: -1- AC_SUBST([ECHO_N])
16185 +m4trace:configure.in:16: -1- AC_SUBST([ECHO_T])
16186 +m4trace:configure.in:16: -1- AC_SUBST([LIBS])
16187 +m4trace:configure.in:25: -1- AC_CONFIG_AUX_DIR([.])
16188 +m4trace:configure.in:27: -1- AC_SUBST([gc_basedir])
16189 +m4trace:configure.in:27: -1- AC_CONFIG_AUX_DIR([$gc_basedir/..])
16190 +m4trace:configure.in:27: -1- AC_CONFIG_AUX_DIR([..])
16191 +m4trace:configure.in:27: -1- AC_CANONICAL_SYSTEM
16192 +m4trace:configure.in:27: -1- AC_CANONICAL_HOST
16193 +m4trace:configure.in:27: -1- AC_SUBST([build], [$ac_cv_build])
16194 +m4trace:configure.in:27: -1- AC_SUBST([build_cpu], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
16195 +m4trace:configure.in:27: -1- AC_SUBST([build_vendor], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
16196 +m4trace:configure.in:27: -1- AC_SUBST([build_os], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
16197 +m4trace:configure.in:27: -1- AC_SUBST([host], [$ac_cv_host])
16198 +m4trace:configure.in:27: -1- AC_SUBST([host_cpu], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
16199 +m4trace:configure.in:27: -1- AC_SUBST([host_vendor], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
16200 +m4trace:configure.in:27: -1- AC_SUBST([host_os], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
16201 +m4trace:configure.in:27: -1- AC_SUBST([target], [$ac_cv_target])
16202 +m4trace:configure.in:27: -1- AC_SUBST([target_cpu], [`echo $ac_cv_target | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
16203 +m4trace:configure.in:27: -1- AC_SUBST([target_vendor], [`echo $ac_cv_target | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
16204 +m4trace:configure.in:27: -1- AC_SUBST([target_os], [`echo $ac_cv_target | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
16205 +m4trace:configure.in:27: -1- AC_SUBST([mkinstalldirs])
16206 +m4trace:configure.in:27: -1- AM_INIT_AUTOMAKE([gc], [6.0], [no-define])
16207 +m4trace:configure.in:27: -1- AC_PROG_INSTALL
16208 +m4trace:configure.in:27: -1- AC_SUBST([INSTALL_PROGRAM])
16209 +m4trace:configure.in:27: -1- AC_SUBST([INSTALL_SCRIPT])
16210 +m4trace:configure.in:27: -1- AC_SUBST([INSTALL_DATA])
16211 +m4trace:configure.in:27: -1- AC_SUBST([PACKAGE])
16212 +m4trace:configure.in:27: -1- AC_SUBST([VERSION])
16213 +m4trace:configure.in:27: -2- AC_DEFINE_TRACE_LITERAL([PACKAGE])
16214 +m4trace:configure.in:27: -2- AH_OUTPUT([PACKAGE], [/* Name of package */
16215 +#undef PACKAGE])
16216 +m4trace:configure.in:27: -2- AC_DEFINE_TRACE_LITERAL([VERSION])
16217 +m4trace:configure.in:27: -2- AH_OUTPUT([VERSION], [/* Version number of package */
16218 +#undef VERSION])
16219 +m4trace:configure.in:27: -1- AC_SUBST([ACLOCAL])
16220 +m4trace:configure.in:27: -1- AC_SUBST([AUTOCONF])
16221 +m4trace:configure.in:27: -1- AC_SUBST([AUTOMAKE])
16222 +m4trace:configure.in:27: -1- AC_SUBST([AUTOHEADER])
16223 +m4trace:configure.in:27: -1- AC_SUBST([MAKEINFO])
16224 +m4trace:configure.in:27: -1- AC_PROG_MAKE_SET
16225 +m4trace:configure.in:27: -1- AC_SUBST([SET_MAKE])
16226 +m4trace:configure.in:27: -1- AC_SUBST([CC])
16227 +m4trace:configure.in:27: -1- AC_SUBST([CC])
16228 +m4trace:configure.in:27: -1- AC_SUBST([CXX])
16229 +m4trace:configure.in:27: -1- AC_SUBST([AS])
16230 +m4trace:configure.in:27: -1- AC_SUBST([ac_ct_AS])
16231 +m4trace:configure.in:27: -1- AC_SUBST([AR])
16232 +m4trace:configure.in:27: -1- AC_SUBST([ac_ct_AR])
16233 +m4trace:configure.in:27: -1- AC_SUBST([RANLIB])
16234 +m4trace:configure.in:27: -1- AC_SUBST([ac_ct_RANLIB])
16235 +m4trace:configure.in:27: -1- AC_PROG_INSTALL
16236 +m4trace:configure.in:27: -1- AC_SUBST([INSTALL_PROGRAM])
16237 +m4trace:configure.in:27: -1- AC_SUBST([INSTALL_SCRIPT])
16238 +m4trace:configure.in:27: -1- AC_SUBST([INSTALL_DATA])
16239 +m4trace:configure.in:27: -1- AM_MAINTAINER_MODE
16240 +m4trace:configure.in:27: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
16241 +m4trace:configure.in:27: -1- AC_SUBST([MAINTAINER_MODE_TRUE])
16242 +m4trace:configure.in:27: -1- AC_SUBST([MAINTAINER_MODE_FALSE])
16243 +m4trace:configure.in:27: -1- AC_SUBST([MAINT])
16244 +m4trace:configure.in:27: -1- AC_SUBST([GC_CFLAGS])
16245 +m4trace:configure.in:29: -1- AC_PROG_LIBTOOL
16246 +m4trace:configure.in:29: -1- AC_PROG_LN_S
16247 +m4trace:configure.in:29: -1- AC_SUBST([LN_S], [$as_ln_s])
16248 +m4trace:configure.in:29: -1- AC_SUBST([RANLIB])
16249 +m4trace:configure.in:29: -1- AC_SUBST([ac_ct_RANLIB])
16250 +m4trace:configure.in:29: -1- AC_SUBST([STRIP])
16251 +m4trace:configure.in:29: -1- AC_SUBST([ac_ct_STRIP])
16252 +m4trace:configure.in:29: -1- AC_SUBST([LIBTOOL])
16253 +m4trace:configure.in:29: -1- AC_SUBST([CXXCPP])
16254 +m4trace:configure.in:29: -1- AC_SUBST([CPPFLAGS])
16255 +m4trace:configure.in:29: -1- AC_SUBST([CXXCPP])
16256 +m4trace:configure.in:38: -1- AM_MAINTAINER_MODE
16257 +m4trace:configure.in:38: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
16258 +m4trace:configure.in:38: -1- AC_SUBST([MAINTAINER_MODE_TRUE])
16259 +m4trace:configure.in:38: -1- AC_SUBST([MAINTAINER_MODE_FALSE])
16260 +m4trace:configure.in:38: -1- AC_SUBST([MAINT])
16261 +m4trace:configure.in:77: -1- AC_DEFINE_TRACE_LITERAL([GC_LINUX_THREADS])
16262 +m4trace:configure.in:78: -1- AC_DEFINE_TRACE_LITERAL([_REENTRANT])
16263 +m4trace:configure.in:80: -1- AC_DEFINE_TRACE_LITERAL([PARALLEL_MARK])
16264 +m4trace:configure.in:82: -1- AC_DEFINE_TRACE_LITERAL([THREAD_LOCAL_ALLOC])
16265 +m4trace:configure.in:85: -1- AC_DEFINE_TRACE_LITERAL([GC_LINUX_THREADS])
16266 +m4trace:configure.in:86: -1- AC_DEFINE_TRACE_LITERAL([_REENTRANT])
16267 +m4trace:configure.in:90: -1- AC_DEFINE_TRACE_LITERAL([GC_HPUX_THREADS])
16268 +m4trace:configure.in:91: -1- AC_DEFINE_TRACE_LITERAL([_POSIX_C_SOURCE])
16269 +m4trace:configure.in:93: -1- AC_DEFINE_TRACE_LITERAL([PARALLEL_MARK])
16270 +m4trace:configure.in:95: -1- AC_DEFINE_TRACE_LITERAL([THREAD_LOCAL_ALLOC])
16271 +m4trace:configure.in:100: -1- AC_DEFINE_TRACE_LITERAL([GC_FREEBSD_THREADS])
16272 +m4trace:configure.in:105: -1- AC_DEFINE_TRACE_LITERAL([GC_SOLARIS_THREADS])
16273 +m4trace:configure.in:106: -1- AC_DEFINE_TRACE_LITERAL([GC_SOLARIS_PTHREADS])
16274 +m4trace:configure.in:109: -1- AC_DEFINE_TRACE_LITERAL([GC_IRIX_THREADS])
16275 +m4trace:configure.in:117: -1- AC_DEFINE_TRACE_LITERAL([GC_DARWIN_THREADS])
16276 +m4trace:configure.in:118: -1- AC_DEFINE_TRACE_LITERAL([THREAD_LOCAL_ALLOC])
16277 +m4trace:configure.in:120: -1- AC_DEFINE_TRACE_LITERAL([PARALLEL_MARK])
16278 +m4trace:configure.in:124: -1- AC_DEFINE_TRACE_LITERAL([GC_WIN32_THREADS])
16279 +m4trace:configure.in:125: -1- AC_DEFINE_TRACE_LITERAL([NO_GETENV])
16280 +m4trace:configure.in:134: -1- AC_SUBST([THREADLIBS])
16281 +m4trace:configure.in:141: -1- AM_CONDITIONAL([POWERPC_DARWIN], [test x$powerpc_darwin = xtrue])
16282 +m4trace:configure.in:141: -1- AC_SUBST([POWERPC_DARWIN_TRUE])
16283 +m4trace:configure.in:141: -1- AC_SUBST([POWERPC_DARWIN_FALSE])
16284 +m4trace:configure.in:148: -1- AC_CHECK_LIB([dl], [dlopen], [EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl"])
16285 +m4trace:configure.in:152: -1- AC_SUBST([EXTRA_TEST_LIBS])
16286 +m4trace:configure.in:155: -1- AC_SUBST([target_all])
16287 +m4trace:configure.in:156: -1- AC_SUBST([target_alias])
16288 +m4trace:configure.in:174: -1- AC_DEFINE_TRACE_LITERAL([ECOS])
16289 +m4trace:configure.in:179: -1- AC_SUBST([CXX])
16290 +m4trace:configure.in:181: -1- AC_SUBST([INCLUDES])
16291 +m4trace:configure.in:182: -1- AC_SUBST([CXXINCLUDES])
16292 +m4trace:configure.in:197: -1- AC_DEFINE_TRACE_LITERAL([SOLARIS25_PROC_VDB_BUG_FIXED])
16293 +m4trace:configure.in:201: -1- AC_DEFINE_TRACE_LITERAL([STACKBASE])
16294 +m4trace:configure.in:202: -1- AC_DEFINE_TRACE_LITERAL([DATASTART_IS_ETEXT])
16295 +m4trace:configure.in:211: -1- AC_DEFINE_TRACE_LITERAL([NO_EXECUTE_PERMISSION])
16296 +m4trace:configure.in:215: -1- AC_DEFINE_TRACE_LITERAL([SUNOS53_SHARED_LIB])
16297 +m4trace:configure.in:228: -1- AC_SUBST([addobjs])
16298 +m4trace:configure.in:252: -1- AC_SUBST([MY_CFLAGS])
16299 +m4trace:configure.in:256: -1- AC_DEFINE_TRACE_LITERAL([SILENT])
16300 +m4trace:configure.in:257: -1- AC_DEFINE_TRACE_LITERAL([NO_SIGNALS])
16301 +m4trace:configure.in:258: -1- AC_DEFINE_TRACE_LITERAL([NO_EXECUTE_PERMISSION])
16302 +m4trace:configure.in:259: -1- AC_DEFINE_TRACE_LITERAL([ALL_INTERIOR_POINTERS])
16303 +m4trace:configure.in:262: -1- AC_DEFINE_TRACE_LITERAL([JAVA_FINALIZATION])
16304 +m4trace:configure.in:263: -1- AC_DEFINE_TRACE_LITERAL([GC_GCJ_SUPPORT])
16305 +m4trace:configure.in:264: -1- AC_DEFINE_TRACE_LITERAL([ATOMIC_UNCOLLECTABLE])
16306 +m4trace:configure.in:270: -1- AC_DEFINE_TRACE_LITERAL([NO_SIGSET])
16307 +m4trace:configure.in:271: -1- AC_DEFINE_TRACE_LITERAL([NO_DEBUGGING])
16308 +m4trace:configure.in:290: -1- AC_DEFINE_TRACE_LITERAL([KEEP_BACK_PTRS])
16309 +m4trace:configure.in:290: -1- AC_DEFINE_TRACE_LITERAL([DBG_HDRS_ALL])
16310 +m4trace:configure.in:290: -1- AC_DEFINE_TRACE_LITERAL([MAKE_BACK_GRAPH])
16311 +m4trace:configure.in:290: -1- AC_DEFINE_TRACE_LITERAL([MAKE_BACK_GRAPH])
16312 +m4trace:configure.in:290: -1- AC_DEFINE_TRACE_LITERAL([SAVE_CALL_COUNT])
16313 +m4trace:configure.in:292: -1- AM_CONDITIONAL([USE_LIBDIR], [test -z "$with_cross_host"])
16314 +m4trace:configure.in:292: -1- AC_SUBST([USE_LIBDIR_TRUE])
16315 +m4trace:configure.in:292: -1- AC_SUBST([USE_LIBDIR_FALSE])
16316 +m4trace:configure.in:317: -1- AC_CONFIG_FILES([Makefile include/Makefile])
16317 +m4trace:configure.in:317: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
16318 +m4trace:configure.in:317: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
16319 diff -buNr boehm-gc/autom4te.cache/traces.1 boehm-gc/autom4te.cache/traces.1
16320 --- boehm-gc/autom4te.cache/traces.1    Wed Dec 31 16:00:00 1969
16321 +++ boehm-gc/autom4te.cache/traces.1    Sat Sep 13 01:32:42 2003
16322 @@ -0,0 +1,250 @@
16323 +m4trace:aclocal.m4:166: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
16324 +m4trace:configure.in:16: -1- m4_pattern_forbid([^_?A[CHUM]_])
16325 +m4trace:configure.in:16: -1- m4_pattern_forbid([_AC_])
16326 +m4trace:configure.in:16: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
16327 +m4trace:configure.in:16: -1- m4_pattern_allow([^AS_FLAGS$])
16328 +m4trace:configure.in:16: -1- m4_pattern_forbid([^_?m4_])
16329 +m4trace:configure.in:16: -1- m4_pattern_forbid([^dnl$])
16330 +m4trace:configure.in:16: -1- m4_pattern_forbid([^_?AS_])
16331 +m4trace:configure.in:16: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
16332 +m4trace:configure.in:16: -1- AC_SUBST([PATH_SEPARATOR])
16333 +m4trace:configure.in:16: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME],      ['AC_PACKAGE_NAME'])])
16334 +m4trace:configure.in:16: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME],   ['AC_PACKAGE_TARNAME'])])
16335 +m4trace:configure.in:16: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION],   ['AC_PACKAGE_VERSION'])])
16336 +m4trace:configure.in:16: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING],    ['AC_PACKAGE_STRING'])])
16337 +m4trace:configure.in:16: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
16338 +m4trace:configure.in:16: -1- AC_SUBST([exec_prefix], [NONE])
16339 +m4trace:configure.in:16: -1- AC_SUBST([prefix], [NONE])
16340 +m4trace:configure.in:16: -1- AC_SUBST([program_transform_name], [s,x,x,])
16341 +m4trace:configure.in:16: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
16342 +m4trace:configure.in:16: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
16343 +m4trace:configure.in:16: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
16344 +m4trace:configure.in:16: -1- AC_SUBST([datadir], ['${prefix}/share'])
16345 +m4trace:configure.in:16: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
16346 +m4trace:configure.in:16: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
16347 +m4trace:configure.in:16: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
16348 +m4trace:configure.in:16: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
16349 +m4trace:configure.in:16: -1- AC_SUBST([includedir], ['${prefix}/include'])
16350 +m4trace:configure.in:16: -1- AC_SUBST([oldincludedir], ['/usr/include'])
16351 +m4trace:configure.in:16: -1- AC_SUBST([infodir], ['${prefix}/info'])
16352 +m4trace:configure.in:16: -1- AC_SUBST([mandir], ['${prefix}/man'])
16353 +m4trace:configure.in:16: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
16354 +m4trace:configure.in:16: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
16355 +#undef PACKAGE_NAME])
16356 +m4trace:configure.in:16: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
16357 +m4trace:configure.in:16: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
16358 +#undef PACKAGE_TARNAME])
16359 +m4trace:configure.in:16: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
16360 +m4trace:configure.in:16: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
16361 +#undef PACKAGE_VERSION])
16362 +m4trace:configure.in:16: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
16363 +m4trace:configure.in:16: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
16364 +#undef PACKAGE_STRING])
16365 +m4trace:configure.in:16: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
16366 +m4trace:configure.in:16: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
16367 +#undef PACKAGE_BUGREPORT])
16368 +m4trace:configure.in:16: -1- AC_SUBST([build_alias])
16369 +m4trace:configure.in:16: -1- AC_SUBST([host_alias])
16370 +m4trace:configure.in:16: -1- AC_SUBST([target_alias])
16371 +m4trace:configure.in:16: -1- AC_SUBST([DEFS])
16372 +m4trace:configure.in:16: -1- AC_SUBST([ECHO_C])
16373 +m4trace:configure.in:16: -1- AC_SUBST([ECHO_N])
16374 +m4trace:configure.in:16: -1- AC_SUBST([ECHO_T])
16375 +m4trace:configure.in:16: -1- AC_SUBST([LIBS])
16376 +m4trace:configure.in:27: -1- AC_SUBST([gc_basedir])
16377 +m4trace:configure.in:27: -1- AC_SUBST([build], [$ac_cv_build])
16378 +m4trace:configure.in:27: -1- AC_SUBST([build_cpu], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
16379 +m4trace:configure.in:27: -1- AC_SUBST([build_vendor], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
16380 +m4trace:configure.in:27: -1- AC_SUBST([build_os], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
16381 +m4trace:configure.in:27: -1- AC_SUBST([host], [$ac_cv_host])
16382 +m4trace:configure.in:27: -1- AC_SUBST([host_cpu], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
16383 +m4trace:configure.in:27: -1- AC_SUBST([host_vendor], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
16384 +m4trace:configure.in:27: -1- AC_SUBST([host_os], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
16385 +m4trace:configure.in:27: -1- AC_SUBST([target], [$ac_cv_target])
16386 +m4trace:configure.in:27: -1- AC_SUBST([target_cpu], [`echo $ac_cv_target | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
16387 +m4trace:configure.in:27: -1- AC_SUBST([target_vendor], [`echo $ac_cv_target | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
16388 +m4trace:configure.in:27: -1- AC_SUBST([target_os], [`echo $ac_cv_target | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
16389 +m4trace:configure.in:27: -1- AC_SUBST([mkinstalldirs])
16390 +m4trace:configure.in:27: -1- AC_PROG_INSTALL
16391 +m4trace:configure.in:27: -1- AC_SUBST([INSTALL_PROGRAM])
16392 +m4trace:configure.in:27: -1- AC_SUBST([INSTALL_SCRIPT])
16393 +m4trace:configure.in:27: -1- AC_SUBST([INSTALL_DATA])
16394 +m4trace:configure.in:27: -1- AC_SUBST([PACKAGE], [gc])
16395 +m4trace:configure.in:27: -1- AC_SUBST([VERSION], [6.1a1])
16396 +m4trace:configure.in:27: -1- AC_SUBST([ACLOCAL])
16397 +m4trace:configure.in:27: -1- AC_SUBST([AUTOCONF])
16398 +m4trace:configure.in:27: -1- AC_SUBST([AUTOMAKE])
16399 +m4trace:configure.in:27: -1- AC_SUBST([AUTOHEADER])
16400 +m4trace:configure.in:27: -1- AC_SUBST([MAKEINFO])
16401 +m4trace:configure.in:27: -1- AC_SUBST([AMTAR])
16402 +m4trace:configure.in:27: -1- AC_SUBST([install_sh])
16403 +m4trace:configure.in:27: -1- AC_SUBST([STRIP])
16404 +m4trace:configure.in:27: -1- AC_SUBST([ac_ct_STRIP])
16405 +m4trace:configure.in:27: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
16406 +m4trace:configure.in:27: -1- AC_PROG_AWK
16407 +m4trace:configure.in:27: -1- AC_SUBST([AWK])
16408 +m4trace:configure.in:27: -1- AC_PROG_MAKE_SET
16409 +m4trace:configure.in:27: -1- AC_SUBST([SET_MAKE])
16410 +m4trace:configure.in:27: -1- AC_SUBST([AS])
16411 +m4trace:configure.in:27: -1- AC_SUBST([ac_ct_AS])
16412 +m4trace:configure.in:27: -1- AC_SUBST([AR])
16413 +m4trace:configure.in:27: -1- AC_SUBST([ac_ct_AR])
16414 +m4trace:configure.in:27: -1- AC_SUBST([RANLIB])
16415 +m4trace:configure.in:27: -1- AC_SUBST([ac_ct_RANLIB])
16416 +m4trace:configure.in:27: -1- AC_PROG_INSTALL
16417 +m4trace:configure.in:27: -1- AC_SUBST([INSTALL_PROGRAM])
16418 +m4trace:configure.in:27: -1- AC_SUBST([INSTALL_SCRIPT])
16419 +m4trace:configure.in:27: -1- AC_SUBST([INSTALL_DATA])
16420 +m4trace:configure.in:27: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
16421 +m4trace:configure.in:27: -1- AC_SUBST([MAINTAINER_MODE_TRUE])
16422 +m4trace:configure.in:27: -1- AC_SUBST([MAINTAINER_MODE_FALSE])
16423 +m4trace:configure.in:27: -1- AC_SUBST([MAINT])
16424 +m4trace:configure.in:27: -1- AC_SUBST([GC_CFLAGS])
16425 +m4trace:configure.in:29: -1- AM_PROG_LIBTOOL
16426 +m4trace:configure.in:29: -1- AC_PROG_LIBTOOL
16427 +m4trace:configure.in:29: -1- AC_PROG_CC
16428 +m4trace:configure.in:29: -1- AC_SUBST([CC])
16429 +m4trace:configure.in:29: -1- AC_SUBST([CFLAGS])
16430 +m4trace:configure.in:29: -1- AC_SUBST([LDFLAGS])
16431 +m4trace:configure.in:29: -1- AC_SUBST([CPPFLAGS])
16432 +m4trace:configure.in:29: -1- AC_SUBST([CC])
16433 +m4trace:configure.in:29: -1- AC_SUBST([ac_ct_CC])
16434 +m4trace:configure.in:29: -1- AC_SUBST([CC])
16435 +m4trace:configure.in:29: -1- AC_SUBST([ac_ct_CC])
16436 +m4trace:configure.in:29: -1- AC_SUBST([CC])
16437 +m4trace:configure.in:29: -1- AC_SUBST([CC])
16438 +m4trace:configure.in:29: -1- AC_SUBST([ac_ct_CC])
16439 +m4trace:configure.in:29: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
16440 +m4trace:configure.in:29: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
16441 +m4trace:configure.in:29: -1- AC_SUBST([DEPDIR])
16442 +m4trace:configure.in:29: -1- AC_SUBST([am__include])
16443 +m4trace:configure.in:29: -1- AC_SUBST([am__quote])
16444 +m4trace:configure.in:29: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
16445 +m4trace:configure.in:29: -1- AC_SUBST([AMDEP_TRUE])
16446 +m4trace:configure.in:29: -1- AC_SUBST([AMDEP_FALSE])
16447 +m4trace:configure.in:29: -1- AC_SUBST([AMDEPBACKSLASH])
16448 +m4trace:configure.in:29: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
16449 +m4trace:configure.in:29: -1- AC_PROG_LN_S
16450 +m4trace:configure.in:29: -1- AC_SUBST([LN_S], [$as_ln_s])
16451 +m4trace:configure.in:29: -1- AC_SUBST([ECHO])
16452 +m4trace:configure.in:29: -1- AC_SUBST([RANLIB])
16453 +m4trace:configure.in:29: -1- AC_SUBST([ac_ct_RANLIB])
16454 +m4trace:configure.in:29: -1- AC_SUBST([STRIP])
16455 +m4trace:configure.in:29: -1- AC_SUBST([ac_ct_STRIP])
16456 +m4trace:configure.in:29: -1- AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen],
16457 +             [lt_cv_dlopen="dlopen"],
16458 +         [AC_CHECK_LIB([dl], [dlopen],
16459 +               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
16460 +           [AC_CHECK_LIB([svld], [dlopen],
16461 +                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
16462 +             [AC_CHECK_LIB([dld], [dld_link],
16463 +                   [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
16464 +             ])
16465 +           ])
16466 +         ])
16467 +       ])
16468 +m4trace:configure.in:29: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen],
16469 +                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
16470 +             [AC_CHECK_LIB([dld], [dld_link],
16471 +                   [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
16472 +             ])
16473 +           ])
16474 +m4trace:configure.in:29: -1- AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link],
16475 +                   [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
16476 +             ])
16477 +m4trace:configure.in:29: -1- AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
16478 +m4trace:configure.in:29: -1- AC_CHECK_HEADERS([dlfcn.h])
16479 +m4trace:configure.in:29: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the <dlfcn.h> header file. */
16480 +#undef HAVE_DLFCN_H])
16481 +m4trace:configure.in:29: -1- AC_HEADER_STDC
16482 +m4trace:configure.in:29: -1- AC_PROG_CPP
16483 +m4trace:configure.in:29: -1- AC_SUBST([CPP])
16484 +m4trace:configure.in:29: -1- AC_SUBST([CPPFLAGS])
16485 +m4trace:configure.in:29: -1- AC_SUBST([CPP])
16486 +m4trace:configure.in:29: -1- AC_SUBST([EGREP])
16487 +m4trace:configure.in:29: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
16488 +m4trace:configure.in:29: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
16489 +#undef STDC_HEADERS])
16490 +m4trace:configure.in:29: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
16491 +                  inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
16492 +m4trace:configure.in:29: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
16493 +#undef HAVE_SYS_TYPES_H])
16494 +m4trace:configure.in:29: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
16495 +#undef HAVE_SYS_STAT_H])
16496 +m4trace:configure.in:29: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
16497 +#undef HAVE_STDLIB_H])
16498 +m4trace:configure.in:29: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
16499 +#undef HAVE_STRING_H])
16500 +m4trace:configure.in:29: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
16501 +#undef HAVE_MEMORY_H])
16502 +m4trace:configure.in:29: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
16503 +#undef HAVE_STRINGS_H])
16504 +m4trace:configure.in:29: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
16505 +#undef HAVE_INTTYPES_H])
16506 +m4trace:configure.in:29: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
16507 +#undef HAVE_STDINT_H])
16508 +m4trace:configure.in:29: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
16509 +#undef HAVE_UNISTD_H])
16510 +m4trace:configure.in:29: -1- AC_SUBST([LIBTOOL])
16511 +m4trace:configure.in:38: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
16512 +m4trace:configure.in:38: -1- AC_SUBST([MAINTAINER_MODE_TRUE])
16513 +m4trace:configure.in:38: -1- AC_SUBST([MAINTAINER_MODE_FALSE])
16514 +m4trace:configure.in:38: -1- AC_SUBST([MAINT])
16515 +m4trace:configure.in:77: -1- AC_DEFINE_TRACE_LITERAL([GC_LINUX_THREADS])
16516 +m4trace:configure.in:78: -1- AC_DEFINE_TRACE_LITERAL([_REENTRANT])
16517 +m4trace:configure.in:80: -1- AC_DEFINE_TRACE_LITERAL([PARALLEL_MARK])
16518 +m4trace:configure.in:82: -1- AC_DEFINE_TRACE_LITERAL([THREAD_LOCAL_ALLOC])
16519 +m4trace:configure.in:85: -1- AC_DEFINE_TRACE_LITERAL([GC_LINUX_THREADS])
16520 +m4trace:configure.in:86: -1- AC_DEFINE_TRACE_LITERAL([_REENTRANT])
16521 +m4trace:configure.in:90: -1- AC_DEFINE_TRACE_LITERAL([GC_HPUX_THREADS])
16522 +m4trace:configure.in:91: -1- AC_DEFINE_TRACE_LITERAL([_POSIX_C_SOURCE])
16523 +m4trace:configure.in:93: -1- AC_DEFINE_TRACE_LITERAL([PARALLEL_MARK])
16524 +m4trace:configure.in:95: -1- AC_DEFINE_TRACE_LITERAL([THREAD_LOCAL_ALLOC])
16525 +m4trace:configure.in:100: -1- AC_DEFINE_TRACE_LITERAL([GC_FREEBSD_THREADS])
16526 +m4trace:configure.in:105: -1- AC_DEFINE_TRACE_LITERAL([GC_SOLARIS_THREADS])
16527 +m4trace:configure.in:106: -1- AC_DEFINE_TRACE_LITERAL([GC_SOLARIS_PTHREADS])
16528 +m4trace:configure.in:109: -1- AC_DEFINE_TRACE_LITERAL([GC_IRIX_THREADS])
16529 +m4trace:configure.in:115: -1- AC_DEFINE_TRACE_LITERAL([GC_DARWIN_THREADS])
16530 +m4trace:configure.in:116: -1- AC_DEFINE_TRACE_LITERAL([THREAD_LOCAL_ALLOC])
16531 +m4trace:configure.in:118: -1- AC_DEFINE_TRACE_LITERAL([PARALLEL_MARK])
16532 +m4trace:configure.in:124: -1- AC_DEFINE_TRACE_LITERAL([GC_WIN32_THREADS])
16533 +m4trace:configure.in:125: -1- AC_DEFINE_TRACE_LITERAL([NO_GETENV])
16534 +m4trace:configure.in:134: -1- AC_SUBST([THREADLIBS])
16535 +m4trace:configure.in:141: -1- AM_CONDITIONAL([POWERPC_DARWIN], [test x$powerpc_darwin = xtrue])
16536 +m4trace:configure.in:141: -1- AC_SUBST([POWERPC_DARWIN_TRUE])
16537 +m4trace:configure.in:141: -1- AC_SUBST([POWERPC_DARWIN_FALSE])
16538 +m4trace:configure.in:148: -1- AC_CHECK_LIB([dl], [dlopen], [EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl"])
16539 +m4trace:configure.in:152: -1- AC_SUBST([EXTRA_TEST_LIBS])
16540 +m4trace:configure.in:155: -1- AC_SUBST([target_all])
16541 +m4trace:configure.in:156: -1- AC_SUBST([target_alias])
16542 +m4trace:configure.in:174: -1- AC_DEFINE_TRACE_LITERAL([ECOS])
16543 +m4trace:configure.in:179: -1- AC_SUBST([CXX])
16544 +m4trace:configure.in:181: -1- AC_SUBST([INCLUDES])
16545 +m4trace:configure.in:182: -1- AC_SUBST([CXXINCLUDES])
16546 +m4trace:configure.in:197: -1- AC_DEFINE_TRACE_LITERAL([SOLARIS25_PROC_VDB_BUG_FIXED])
16547 +m4trace:configure.in:201: -1- AC_DEFINE_TRACE_LITERAL([STACKBASE])
16548 +m4trace:configure.in:202: -1- AC_DEFINE_TRACE_LITERAL([DATASTART_IS_ETEXT])
16549 +m4trace:configure.in:211: -1- AC_DEFINE_TRACE_LITERAL([NO_EXECUTE_PERMISSION])
16550 +m4trace:configure.in:215: -1- AC_DEFINE_TRACE_LITERAL([SUNOS53_SHARED_LIB])
16551 +m4trace:configure.in:228: -1- AC_SUBST([addobjs])
16552 +m4trace:configure.in:252: -1- AC_SUBST([MY_CFLAGS])
16553 +m4trace:configure.in:256: -1- AC_DEFINE_TRACE_LITERAL([SILENT])
16554 +m4trace:configure.in:257: -1- AC_DEFINE_TRACE_LITERAL([NO_SIGNALS])
16555 +m4trace:configure.in:258: -1- AC_DEFINE_TRACE_LITERAL([NO_EXECUTE_PERMISSION])
16556 +m4trace:configure.in:259: -1- AC_DEFINE_TRACE_LITERAL([ALL_INTERIOR_POINTERS])
16557 +m4trace:configure.in:262: -1- AC_DEFINE_TRACE_LITERAL([JAVA_FINALIZATION])
16558 +m4trace:configure.in:263: -1- AC_DEFINE_TRACE_LITERAL([GC_GCJ_SUPPORT])
16559 +m4trace:configure.in:264: -1- AC_DEFINE_TRACE_LITERAL([ATOMIC_UNCOLLECTABLE])
16560 +m4trace:configure.in:270: -1- AC_DEFINE_TRACE_LITERAL([NO_SIGSET])
16561 +m4trace:configure.in:271: -1- AC_DEFINE_TRACE_LITERAL([NO_DEBUGGING])
16562 +m4trace:configure.in:290: -1- AC_DEFINE_TRACE_LITERAL([KEEP_BACK_PTRS])
16563 +m4trace:configure.in:290: -1- AC_DEFINE_TRACE_LITERAL([DBG_HDRS_ALL])
16564 +m4trace:configure.in:290: -1- AC_DEFINE_TRACE_LITERAL([MAKE_BACK_GRAPH])
16565 +m4trace:configure.in:290: -1- AC_DEFINE_TRACE_LITERAL([MAKE_BACK_GRAPH])
16566 +m4trace:configure.in:290: -1- AC_DEFINE_TRACE_LITERAL([SAVE_CALL_COUNT])
16567 +m4trace:configure.in:292: -1- AM_CONDITIONAL([USE_LIBDIR], [test -z "$with_cross_host"])
16568 +m4trace:configure.in:292: -1- AC_SUBST([USE_LIBDIR_TRUE])
16569 +m4trace:configure.in:292: -1- AC_SUBST([USE_LIBDIR_FALSE])
16570 +m4trace:configure.in:317: -1- AC_CONFIG_FILES([Makefile include/Makefile])
16571 +m4trace:configure.in:317: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
16572 +m4trace:configure.in:317: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
16573 diff -buNr boehm-gc/backgraph.c boehm-gc/backgraph.c
16574 --- boehm-gc/backgraph.c        Wed Jan 30 18:48:45 2002
16575 +++ boehm-gc/backgraph.c        Sat Sep 13 01:32:42 2003
16576 @@ -307,6 +307,7 @@
16577      }
16578    while (currentp < (word *)(p + gc_descr)) {
16579      word current = *currentp++;
16580 +    FIXUP_POINTER(current);
16581      if (current >= (word)GC_least_plausible_heap_addr && 
16582         current <= (word)GC_greatest_plausible_heap_addr) {
16583         ptr_t target = GC_base((GC_PTR)current);
16584 diff -buNr boehm-gc/configure boehm-gc/configure
16585 --- boehm-gc/configure  Tue May 13 17:18:14 2003
16586 +++ boehm-gc/configure  Sat Sep 13 01:32:42 2003
16587 @@ -61,7 +61,6 @@
16588  program_transform_name=s,x,x,
16589  silent=
16590  site=
16591 -sitefile=
16592  srcdir=
16593  target=NONE
16594  verbose=
16595 @@ -176,7 +175,6 @@
16596    --help                  print this message
16597    --no-create             do not create output files
16598    --quiet, --silent       do not print \`checking...' messages
16599 -  --site-file=FILE        use FILE as the site file
16600    --version               print the version of autoconf that created configure
16601  Directory and file names:
16602    --prefix=PREFIX         install architecture-independent files in PREFIX
16603 @@ -347,11 +345,6 @@
16604    -site=* | --site=* | --sit=*)
16605      site="$ac_optarg" ;;
16606  
16607 -  -site-file | --site-file | --site-fil | --site-fi | --site-f)
16608 -    ac_prev=sitefile ;;
16609 -  -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
16610 -    sitefile="$ac_optarg" ;;
16611 -
16612    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16613      ac_prev=srcdir ;;
16614    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16615 @@ -517,16 +510,12 @@
16616  srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
16617  
16618  # Prefer explicitly selected file to automatically selected ones.
16619 -if test -z "$sitefile"; then
16620 -  if test -z "$CONFIG_SITE"; then
16621 +if test -z "$CONFIG_SITE"; then
16622      if test "x$prefix" != xNONE; then
16623        CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
16624      else
16625        CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
16626      fi
16627 -  fi
16628 -else
16629 -  CONFIG_SITE="$sitefile"
16630  fi
16631  for ac_site_file in $CONFIG_SITE; do
16632    if test -r "$ac_site_file"; then
16633 @@ -604,7 +593,7 @@
16634  # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
16635  # ./install, which can be erroneously created by make from ./install.sh.
16636  echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
16637 -echo "configure:608: checking for a BSD compatible install" >&5
16638 +echo "configure:597: checking for a BSD compatible install" >&5
16639  if test -z "$INSTALL"; then
16640  if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
16641    echo $ac_n "(cached) $ac_c" 1>&6
16642 @@ -657,7 +646,7 @@
16643  test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
16644  
16645  echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
16646 -echo "configure:661: checking whether build environment is sane" >&5
16647 +echo "configure:650: checking whether build environment is sane" >&5
16648  # Just in case
16649  sleep 1
16650  echo timestamp > conftestfile
16651 @@ -714,7 +703,7 @@
16652  test "$program_transform_name" = "" && program_transform_name="s,x,x,"
16653  
16654  echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
16655 -echo "configure:718: checking whether ${MAKE-make} sets \${MAKE}" >&5
16656 +echo "configure:707: checking whether ${MAKE-make} sets \${MAKE}" >&5
16657  set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
16658  if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
16659    echo $ac_n "(cached) $ac_c" 1>&6
16660 @@ -747,12 +736,12 @@
16661  fi
16662  
16663  echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
16664 -echo "configure:751: checking for Cygwin environment" >&5
16665 +echo "configure:740: checking for Cygwin environment" >&5
16666  if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
16667    echo $ac_n "(cached) $ac_c" 1>&6
16668  else
16669    cat > conftest.$ac_ext <<EOF
16670 -#line 756 "configure"
16671 +#line 745 "configure"
16672  #include "confdefs.h"
16673  
16674  int main() {
16675 @@ -763,7 +752,7 @@
16676  return __CYGWIN__;
16677  ; return 0; }
16678  EOF
16679 -if { (eval echo configure:767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16680 +if { (eval echo configure:756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16681    rm -rf conftest*
16682    ac_cv_cygwin=yes
16683  else
16684 @@ -780,19 +769,19 @@
16685  CYGWIN=
16686  test "$ac_cv_cygwin" = yes && CYGWIN=yes
16687  echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
16688 -echo "configure:784: checking for mingw32 environment" >&5
16689 +echo "configure:773: checking for mingw32 environment" >&5
16690  if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
16691    echo $ac_n "(cached) $ac_c" 1>&6
16692  else
16693    cat > conftest.$ac_ext <<EOF
16694 -#line 789 "configure"
16695 +#line 778 "configure"
16696  #include "confdefs.h"
16697  
16698  int main() {
16699  return __MINGW32__;
16700  ; return 0; }
16701  EOF
16702 -if { (eval echo configure:796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16703 +if { (eval echo configure:785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16704    rm -rf conftest*
16705    ac_cv_mingw32=yes
16706  else
16707 @@ -903,7 +892,7 @@
16708  fi
16709  
16710  echo $ac_n "checking host system type""... $ac_c" 1>&6
16711 -echo "configure:907: checking host system type" >&5
16712 +echo "configure:896: checking host system type" >&5
16713  
16714  host_alias=$host
16715  case "$host_alias" in
16716 @@ -924,7 +913,7 @@
16717  echo "$ac_t""$host" 1>&6
16718  
16719  echo $ac_n "checking target system type""... $ac_c" 1>&6
16720 -echo "configure:928: checking target system type" >&5
16721 +echo "configure:917: checking target system type" >&5
16722  
16723  target_alias=$target
16724  case "$target_alias" in
16725 @@ -942,7 +931,7 @@
16726  echo "$ac_t""$target" 1>&6
16727  
16728  echo $ac_n "checking build system type""... $ac_c" 1>&6
16729 -echo "configure:946: checking build system type" >&5
16730 +echo "configure:935: checking build system type" >&5
16731  
16732  build_alias=$build
16733  case "$build_alias" in
16734 @@ -982,7 +971,7 @@
16735  
16736  missing_dir=`cd $ac_aux_dir && pwd`
16737  echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
16738 -echo "configure:986: checking for working aclocal" >&5
16739 +echo "configure:975: checking for working aclocal" >&5
16740  # Run test in a subshell; some versions of sh will print an error if
16741  # an executable is not found, even if stderr is redirected.
16742  # Redirect stdin to placate older versions of autoconf.  Sigh.
16743 @@ -995,7 +984,7 @@
16744  fi
16745  
16746  echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
16747 -echo "configure:999: checking for working autoconf" >&5
16748 +echo "configure:988: checking for working autoconf" >&5
16749  # Run test in a subshell; some versions of sh will print an error if
16750  # an executable is not found, even if stderr is redirected.
16751  # Redirect stdin to placate older versions of autoconf.  Sigh.
16752 @@ -1008,7 +997,7 @@
16753  fi
16754  
16755  echo $ac_n "checking for working automake""... $ac_c" 1>&6
16756 -echo "configure:1012: checking for working automake" >&5
16757 +echo "configure:1001: checking for working automake" >&5
16758  # Run test in a subshell; some versions of sh will print an error if
16759  # an executable is not found, even if stderr is redirected.
16760  # Redirect stdin to placate older versions of autoconf.  Sigh.
16761 @@ -1021,7 +1010,7 @@
16762  fi
16763  
16764  echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
16765 -echo "configure:1025: checking for working autoheader" >&5
16766 +echo "configure:1014: checking for working autoheader" >&5
16767  # Run test in a subshell; some versions of sh will print an error if
16768  # an executable is not found, even if stderr is redirected.
16769  # Redirect stdin to placate older versions of autoconf.  Sigh.
16770 @@ -1034,7 +1023,7 @@
16771  fi
16772  
16773  echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
16774 -echo "configure:1038: checking for working makeinfo" >&5
16775 +echo "configure:1027: checking for working makeinfo" >&5
16776  # Run test in a subshell; some versions of sh will print an error if
16777  # an executable is not found, even if stderr is redirected.
16778  # Redirect stdin to placate older versions of autoconf.  Sigh.
16779 @@ -1060,7 +1049,7 @@
16780  # Extract the first word of "gcc", so it can be a program name with args.
16781  set dummy gcc; ac_word=$2
16782  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
16783 -echo "configure:1064: checking for $ac_word" >&5
16784 +echo "configure:1053: checking for $ac_word" >&5
16785  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
16786    echo $ac_n "(cached) $ac_c" 1>&6
16787  else
16788 @@ -1090,7 +1079,7 @@
16789    # Extract the first word of "cc", so it can be a program name with args.
16790  set dummy cc; ac_word=$2
16791  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
16792 -echo "configure:1094: checking for $ac_word" >&5
16793 +echo "configure:1083: checking for $ac_word" >&5
16794  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
16795    echo $ac_n "(cached) $ac_c" 1>&6
16796  else
16797 @@ -1139,7 +1128,7 @@
16798  fi
16799  
16800  echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
16801 -echo "configure:1143: checking whether we are using GNU C" >&5
16802 +echo "configure:1132: checking whether we are using GNU C" >&5
16803  if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
16804    echo $ac_n "(cached) $ac_c" 1>&6
16805  else
16806 @@ -1148,7 +1137,7 @@
16807    yes;
16808  #endif
16809  EOF
16810 -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
16811 +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
16812    ac_cv_prog_gcc=yes
16813  else
16814    ac_cv_prog_gcc=no
16815 @@ -1163,7 +1152,7 @@
16816    ac_save_CFLAGS="$CFLAGS"
16817    CFLAGS=
16818    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
16819 -echo "configure:1167: checking whether ${CC-cc} accepts -g" >&5
16820 +echo "configure:1156: checking whether ${CC-cc} accepts -g" >&5
16821  if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
16822    echo $ac_n "(cached) $ac_c" 1>&6
16823  else
16824 @@ -1200,7 +1189,7 @@
16825  # Extract the first word of "$ac_prog", so it can be a program name with args.
16826  set dummy $ac_prog; ac_word=$2
16827  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
16828 -echo "configure:1204: checking for $ac_word" >&5
16829 +echo "configure:1193: checking for $ac_word" >&5
16830  if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
16831    echo $ac_n "(cached) $ac_c" 1>&6
16832  else
16833 @@ -1233,7 +1222,7 @@
16834  test -z "$CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
16835  
16836  echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
16837 -echo "configure:1237: checking whether we are using GNU C++" >&5
16838 +echo "configure:1226: checking whether we are using GNU C++" >&5
16839  if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
16840    echo $ac_n "(cached) $ac_c" 1>&6
16841  else
16842 @@ -1242,7 +1231,7 @@
16843    yes;
16844  #endif
16845  EOF
16846 -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
16847 +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
16848    ac_cv_prog_gxx=yes
16849  else
16850    ac_cv_prog_gxx=no
16851 @@ -1257,7 +1246,7 @@
16852    ac_save_CXXFLAGS="$CXXFLAGS"
16853    CXXFLAGS=
16854    echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
16855 -echo "configure:1261: checking whether ${CXX-g++} accepts -g" >&5
16856 +echo "configure:1250: checking whether ${CXX-g++} accepts -g" >&5
16857  if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
16858    echo $ac_n "(cached) $ac_c" 1>&6
16859  else
16860 @@ -1290,7 +1279,7 @@
16861  # NEWLIB_CONFIGURE, which doesn't work because that means that it will
16862  # be run before AC_CANONICAL_HOST.
16863  echo $ac_n "checking build system type""... $ac_c" 1>&6
16864 -echo "configure:1294: checking build system type" >&5
16865 +echo "configure:1283: checking build system type" >&5
16866  
16867  build_alias=$build
16868  case "$build_alias" in
16869 @@ -1311,7 +1300,7 @@
16870  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
16871  set dummy ${ac_tool_prefix}as; ac_word=$2
16872  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
16873 -echo "configure:1315: checking for $ac_word" >&5
16874 +echo "configure:1304: checking for $ac_word" >&5
16875  if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
16876    echo $ac_n "(cached) $ac_c" 1>&6
16877  else
16878 @@ -1343,7 +1332,7 @@
16879  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
16880  set dummy ${ac_tool_prefix}ar; ac_word=$2
16881  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
16882 -echo "configure:1347: checking for $ac_word" >&5
16883 +echo "configure:1336: checking for $ac_word" >&5
16884  if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
16885    echo $ac_n "(cached) $ac_c" 1>&6
16886  else
16887 @@ -1375,7 +1364,7 @@
16888  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
16889  set dummy ${ac_tool_prefix}ranlib; ac_word=$2
16890  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
16891 -echo "configure:1379: checking for $ac_word" >&5
16892 +echo "configure:1368: checking for $ac_word" >&5
16893  if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
16894    echo $ac_n "(cached) $ac_c" 1>&6
16895  else
16896 @@ -1407,7 +1396,7 @@
16897    # Extract the first word of "ranlib", so it can be a program name with args.
16898  set dummy ranlib; ac_word=$2
16899  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
16900 -echo "configure:1411: checking for $ac_word" >&5
16901 +echo "configure:1400: checking for $ac_word" >&5
16902  if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
16903    echo $ac_n "(cached) $ac_c" 1>&6
16904  else
16905 @@ -1452,7 +1441,7 @@
16906  # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
16907  # ./install, which can be erroneously created by make from ./install.sh.
16908  echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
16909 -echo "configure:1456: checking for a BSD compatible install" >&5
16910 +echo "configure:1445: checking for a BSD compatible install" >&5
16911  if test -z "$INSTALL"; then
16912  if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
16913    echo $ac_n "(cached) $ac_c" 1>&6
16914 @@ -1506,7 +1495,7 @@
16915  
16916  
16917  echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
16918 -echo "configure:1510: checking whether to enable maintainer-specific portions of Makefiles" >&5
16919 +echo "configure:1499: checking whether to enable maintainer-specific portions of Makefiles" >&5
16920      # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
16921  if test "${enable_maintainer_mode+set}" = set; then
16922    enableval="$enable_maintainer_mode"
16923 @@ -1544,7 +1533,7 @@
16924    
16925  
16926  echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
16927 -echo "configure:1548: checking for executable suffix" >&5
16928 +echo "configure:1537: checking for executable suffix" >&5
16929  if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
16930    echo $ac_n "(cached) $ac_c" 1>&6
16931  else
16932 @@ -1554,10 +1543,10 @@
16933    rm -f conftest*
16934    echo 'int main () { return 0; }' > conftest.$ac_ext
16935    ac_cv_exeext=
16936 -  if { (eval echo configure:1558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
16937 +  if { (eval echo configure:1547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
16938      for file in conftest.*; do
16939        case $file in
16940 -      *.c | *.o | *.obj | *.ilk | *.pdb) ;;
16941 +      *.c | *.o | *.obj) ;;
16942        *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
16943        esac
16944      done
16945 @@ -1676,7 +1665,7 @@
16946  if test "$GCC" = yes; then
16947    # Check if gcc -print-prog-name=ld gives a path.
16948    echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
16949 -echo "configure:1680: checking for ld used by GCC" >&5
16950 +echo "configure:1669: checking for ld used by GCC" >&5
16951    case $host in
16952    *-*-mingw*)
16953      # gcc leaves a trailing carriage return which upsets mingw
16954 @@ -1706,10 +1695,10 @@
16955    esac
16956  elif test "$with_gnu_ld" = yes; then
16957    echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
16958 -echo "configure:1710: checking for GNU ld" >&5
16959 +echo "configure:1699: checking for GNU ld" >&5
16960  else
16961    echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
16962 -echo "configure:1713: checking for non-GNU ld" >&5
16963 +echo "configure:1702: checking for non-GNU ld" >&5
16964  fi
16965  if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
16966    echo $ac_n "(cached) $ac_c" 1>&6
16967 @@ -1744,7 +1733,7 @@
16968  fi
16969  test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
16970  echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
16971 -echo "configure:1748: checking if the linker ($LD) is GNU ld" >&5
16972 +echo "configure:1737: checking if the linker ($LD) is GNU ld" >&5
16973  if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
16974    echo $ac_n "(cached) $ac_c" 1>&6
16975  else
16976 @@ -1761,7 +1750,7 @@
16977  
16978  
16979  echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
16980 -echo "configure:1765: checking for $LD option to reload object files" >&5
16981 +echo "configure:1754: checking for $LD option to reload object files" >&5
16982  if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
16983    echo $ac_n "(cached) $ac_c" 1>&6
16984  else
16985 @@ -1773,7 +1762,7 @@
16986  test -n "$reload_flag" && reload_flag=" $reload_flag"
16987  
16988  echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
16989 -echo "configure:1777: checking for BSD-compatible nm" >&5
16990 +echo "configure:1766: checking for BSD-compatible nm" >&5
16991  if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
16992    echo $ac_n "(cached) $ac_c" 1>&6
16993  else
16994 @@ -1811,7 +1800,7 @@
16995  echo "$ac_t""$NM" 1>&6
16996  
16997  echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
16998 -echo "configure:1815: checking whether ln -s works" >&5
16999 +echo "configure:1804: checking whether ln -s works" >&5
17000  if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
17001    echo $ac_n "(cached) $ac_c" 1>&6
17002  else
17003 @@ -1832,7 +1821,7 @@
17004  fi
17005  
17006  echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
17007 -echo "configure:1836: checking how to recognise dependant libraries" >&5
17008 +echo "configure:1825: checking how to recognise dependant libraries" >&5
17009  if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
17010    echo $ac_n "(cached) $ac_c" 1>&6
17011  else
17012 @@ -2005,13 +1994,13 @@
17013  deplibs_check_method=$lt_cv_deplibs_check_method
17014  
17015  echo $ac_n "checking for object suffix""... $ac_c" 1>&6
17016 -echo "configure:2009: checking for object suffix" >&5
17017 +echo "configure:1998: checking for object suffix" >&5
17018  if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
17019    echo $ac_n "(cached) $ac_c" 1>&6
17020  else
17021    rm -f conftest*
17022  echo 'int i = 1;' > conftest.$ac_ext
17023 -if { (eval echo configure:2015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17024 +if { (eval echo configure:2004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17025    for ac_file in conftest.*; do
17026      case $ac_file in
17027      *.c) ;;
17028 @@ -2035,7 +2024,7 @@
17029  file_magic*)
17030    if test "$file_magic_cmd" = '$MAGIC_CMD'; then
17031      echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
17032 -echo "configure:2039: checking for ${ac_tool_prefix}file" >&5
17033 +echo "configure:2028: checking for ${ac_tool_prefix}file" >&5
17034  if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
17035    echo $ac_n "(cached) $ac_c" 1>&6
17036  else
17037 @@ -2097,7 +2086,7 @@
17038  if test -z "$lt_cv_path_MAGIC_CMD"; then
17039    if test -n "$ac_tool_prefix"; then
17040      echo $ac_n "checking for file""... $ac_c" 1>&6
17041 -echo "configure:2101: checking for file" >&5
17042 +echo "configure:2090: checking for file" >&5
17043  if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
17044    echo $ac_n "(cached) $ac_c" 1>&6
17045  else
17046 @@ -2168,7 +2157,7 @@
17047  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
17048  set dummy ${ac_tool_prefix}ranlib; ac_word=$2
17049  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
17050 -echo "configure:2172: checking for $ac_word" >&5
17051 +echo "configure:2161: checking for $ac_word" >&5
17052  if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
17053    echo $ac_n "(cached) $ac_c" 1>&6
17054  else
17055 @@ -2200,7 +2189,7 @@
17056    # Extract the first word of "ranlib", so it can be a program name with args.
17057  set dummy ranlib; ac_word=$2
17058  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
17059 -echo "configure:2204: checking for $ac_word" >&5
17060 +echo "configure:2193: checking for $ac_word" >&5
17061  if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
17062    echo $ac_n "(cached) $ac_c" 1>&6
17063  else
17064 @@ -2235,7 +2224,7 @@
17065  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
17066  set dummy ${ac_tool_prefix}strip; ac_word=$2
17067  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
17068 -echo "configure:2239: checking for $ac_word" >&5
17069 +echo "configure:2228: checking for $ac_word" >&5
17070  if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
17071    echo $ac_n "(cached) $ac_c" 1>&6
17072  else
17073 @@ -2267,7 +2256,7 @@
17074    # Extract the first word of "strip", so it can be a program name with args.
17075  set dummy strip; ac_word=$2
17076  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
17077 -echo "configure:2271: checking for $ac_word" >&5
17078 +echo "configure:2260: checking for $ac_word" >&5
17079  if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
17080    echo $ac_n "(cached) $ac_c" 1>&6
17081  else
17082 @@ -2334,21 +2323,8 @@
17083  case $host in
17084  *-*-irix6*)
17085    # Find out which ABI we are using.
17086 -  echo '#line 2338 "configure"' > conftest.$ac_ext
17087 -  if { (eval echo configure:2339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17088 -   if test "$lt_cv_prog_gnu_ld" = yes; then
17089 -    case `/usr/bin/file conftest.$ac_objext` in
17090 -    *32-bit*)
17091 -      LD="${LD-ld} -melf32bsmip"
17092 -      ;;
17093 -    *N32*)
17094 -      LD="${LD-ld} -melf32bmipn32"
17095 -      ;;
17096 -    *64-bit*)
17097 -      LD="${LD-ld} -melf64bmip"
17098 -      ;;
17099 -    esac
17100 -   else
17101 +  echo '#line 2327 "configure"' > conftest.$ac_ext
17102 +  if { (eval echo configure:2328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17103      case `/usr/bin/file conftest.$ac_objext` in
17104      *32-bit*)
17105        LD="${LD-ld} -32"
17106 @@ -2361,14 +2337,13 @@
17107        ;;
17108      esac
17109     fi
17110 -  fi
17111    rm -rf conftest*
17112    ;;
17113  
17114  ia64-*-hpux*)
17115    # Find out which ABI we are using.
17116    echo 'int i;' > conftest.$ac_ext
17117 -  if { (eval echo configure:2372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17118 +  if { (eval echo configure:2347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17119      case "`/usr/bin/file conftest.o`" in
17120      *ELF-32*)
17121        HPUX_IA64_MODE="32"
17122 @@ -2384,7 +2359,7 @@
17123  x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
17124    # Find out which ABI we are using.
17125    echo 'int i;' > conftest.$ac_ext
17126 -  if { (eval echo configure:2388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17127 +  if { (eval echo configure:2363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17128      case "`/usr/bin/file conftest.o`" in
17129      *32-bit*)
17130        case $host in
17131 @@ -2428,7 +2403,7 @@
17132    SAVE_CFLAGS="$CFLAGS"
17133    CFLAGS="$CFLAGS -belf"
17134    echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
17135 -echo "configure:2432: checking whether the C compiler needs -belf" >&5
17136 +echo "configure:2407: checking whether the C compiler needs -belf" >&5
17137  if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
17138    echo $ac_n "(cached) $ac_c" 1>&6
17139  else
17140 @@ -2441,14 +2416,14 @@
17141  cross_compiling=$ac_cv_prog_cc_cross
17142  
17143       cat > conftest.$ac_ext <<EOF
17144 -#line 2445 "configure"
17145 +#line 2420 "configure"
17146  #include "confdefs.h"
17147  
17148  int main() {
17149  
17150  ; return 0; }
17151  EOF
17152 -if { (eval echo configure:2452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17153 +if { (eval echo configure:2427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17154    rm -rf conftest*
17155    lt_cv_cc_needs_belf=yes
17156  else
17157 @@ -2478,7 +2453,7 @@
17158  esac
17159  
17160  echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
17161 -echo "configure:2482: checking how to run the C++ preprocessor" >&5
17162 +echo "configure:2457: checking how to run the C++ preprocessor" >&5
17163  if test -z "$CXXCPP"; then
17164  if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
17165    echo $ac_n "(cached) $ac_c" 1>&6
17166 @@ -2491,12 +2466,12 @@
17167  cross_compiling=$ac_cv_prog_cxx_cross
17168    CXXCPP="${CXX-g++} -E"
17169    cat > conftest.$ac_ext <<EOF
17170 -#line 2495 "configure"
17171 +#line 2470 "configure"
17172  #include "confdefs.h"
17173  #include <stdlib.h>
17174  EOF
17175  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17176 -{ (eval echo configure:2500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17177 +{ (eval echo configure:2475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17178  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17179  if test -z "$ac_err"; then
17180    :
17181 @@ -2643,7 +2618,7 @@
17182  
17183  
17184  echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
17185 -echo "configure:2647: checking whether to enable maintainer-specific portions of Makefiles" >&5
17186 +echo "configure:2622: checking whether to enable maintainer-specific portions of Makefiles" >&5
17187      # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
17188  if test "${enable_maintainer_mode+set}" = set; then
17189    enableval="$enable_maintainer_mode"
17190 @@ -2676,7 +2651,7 @@
17191    
17192  
17193  echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
17194 -echo "configure:2680: checking for executable suffix" >&5
17195 +echo "configure:2655: checking for executable suffix" >&5
17196  if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
17197    echo $ac_n "(cached) $ac_c" 1>&6
17198  else
17199 @@ -2686,10 +2661,10 @@
17200    rm -f conftest*
17201    echo 'int main () { return 0; }' > conftest.$ac_ext
17202    ac_cv_exeext=
17203 -  if { (eval echo configure:2690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
17204 +  if { (eval echo configure:2665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
17205      for file in conftest.*; do
17206        case $file in
17207 -      *.c | *.o | *.obj | *.ilk | *.pdb) ;;
17208 +      *.c | *.o | *.obj) ;;
17209        *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
17210        esac
17211      done
17212 @@ -2709,7 +2684,7 @@
17213  fi
17214  
17215  echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6
17216 -echo "configure:2713: checking for thread model used by GCC" >&5
17217 +echo "configure:2688: checking for thread model used by GCC" >&5
17218  THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
17219  if test -z "$THREADS"; then
17220     THREADS=no
17221 @@ -2818,6 +2793,22 @@
17222       *-*-cygwin*)
17223         THREADLIBS=
17224         ;;
17225 +     *-*-darwin*)
17226 +       cat >> confdefs.h <<\EOF
17227 +#define GC_DARWIN_THREADS 1
17228 +EOF
17229 +
17230 +       cat >> confdefs.h <<\EOF
17231 +#define THREAD_LOCAL_ALLOC 1
17232 +EOF
17233 +
17234 +       if test "${enable_parallel_mark}" = yes; then
17235 +         cat >> confdefs.h <<\EOF
17236 +#define PARALLEL_MARK 1
17237 +EOF
17238 +
17239 +       fi
17240 +       ;;
17241      esac
17242      ;;
17243   win32)
17244 @@ -2829,12 +2820,6 @@
17245  #define NO_GETENV 1
17246  EOF
17247  
17248 -    if test $enable_shared = yes; then
17249 -      cat >> confdefs.h <<\EOF
17250 -#define GC_DLL 1
17251 -EOF
17252 -
17253 -    fi
17254      ;;
17255   decosf1 | irix | mach | os2 | solaris | dce | vxworks)
17256      { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
17257 @@ -2845,8 +2830,28 @@
17258  esac
17259  
17260  
17261 -echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
17262 -echo "configure:2850: checking for dlopen in -ldl" >&5
17263 +case "$host" in 
17264 +   powerpc-*-darwin*)
17265 +      powerpc_darwin=true
17266 +      ;;
17267 +esac
17268 +
17269 +
17270 +if test x$powerpc_darwin = xtrue; then
17271 +  POWERPC_DARWIN_TRUE=
17272 +  POWERPC_DARWIN_FALSE='#'
17273 +else
17274 +  POWERPC_DARWIN_TRUE='#'
17275 +  POWERPC_DARWIN_FALSE=
17276 +fi
17277 +
17278 +# We never want libdl on darwin. It is a fake libdl that just ends up making
17279 +# dyld calls anyway
17280 +case "$host" in
17281 +  *-*-darwin*) ;;
17282 +  *) 
17283 +    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
17284 +echo "configure:2855: checking for dlopen in -ldl" >&5
17285  ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
17286  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
17287    echo $ac_n "(cached) $ac_c" 1>&6
17288 @@ -2854,7 +2859,7 @@
17289    ac_save_LIBS="$LIBS"
17290  LIBS="-ldl  $LIBS"
17291  cat > conftest.$ac_ext <<EOF
17292 -#line 2858 "configure"
17293 +#line 2863 "configure"
17294  #include "confdefs.h"
17295  /* Override any gcc2 internal prototype to avoid an error.  */
17296  /* We use char because int might match the return type of a gcc2
17297 @@ -2865,7 +2870,7 @@
17298  dlopen()
17299  ; return 0; }
17300  EOF
17301 -if { (eval echo configure:2869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17302 +if { (eval echo configure:2874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17303    rm -rf conftest*
17304    eval "ac_cv_lib_$ac_lib_var=yes"
17305  else
17306 @@ -2885,6 +2890,9 @@
17307    echo "$ac_t""no" 1>&6
17308  fi
17309  
17310 +    ;;
17311 +esac
17312 +
17313  
17314  
17315  target_all=libgcjgc.la
17316 @@ -3100,17 +3108,15 @@
17317  fi
17318  
17319  
17320 -if test -n "$with_cross_host" &&
17321 -   test x"$with_cross_host" != x"no"; then
17322 -  toolexecdir='$(exec_prefix)/$(target_alias)'
17323 -  toolexeclibdir='$(toolexecdir)/lib'
17324 -else
17325 -  toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
17326 -  toolexeclibdir='$(libdir)'
17327 -fi
17328 -toolexeclibdir=$toolexeclibdir/`$CC -print-multi-os-directory`
17329  
17330  
17331 +if test -z "$with_cross_host"; then
17332 +  USE_LIBDIR_TRUE=
17333 +  USE_LIBDIR_FALSE='#'
17334 +else
17335 +  USE_LIBDIR_TRUE='#'
17336 +  USE_LIBDIR_FALSE=
17337 +fi
17338  
17339  if test "${multilib}" = "yes"; then
17340    multilib_arg="--enable-multilib"
17341 @@ -3307,14 +3313,16 @@
17342  s%@LIBTOOL@%$LIBTOOL%g
17343  s%@CXXCPP@%$CXXCPP%g
17344  s%@THREADLIBS@%$THREADLIBS%g
17345 +s%@POWERPC_DARWIN_TRUE@%$POWERPC_DARWIN_TRUE%g
17346 +s%@POWERPC_DARWIN_FALSE@%$POWERPC_DARWIN_FALSE%g
17347  s%@EXTRA_TEST_LIBS@%$EXTRA_TEST_LIBS%g
17348  s%@target_all@%$target_all%g
17349  s%@INCLUDES@%$INCLUDES%g
17350  s%@CXXINCLUDES@%$CXXINCLUDES%g
17351  s%@addobjs@%$addobjs%g
17352  s%@MY_CFLAGS@%$MY_CFLAGS%g
17353 -s%@toolexecdir@%$toolexecdir%g
17354 -s%@toolexeclibdir@%$toolexeclibdir%g
17355 +s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
17356 +s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
17357  
17358  CEOF
17359  EOF
17360 @@ -3323,7 +3331,7 @@
17361  
17362  # Split the substitutions into bite-sized pieces for seds with
17363  # small command number limits, like on Digital OSF/1 and HP-UX.
17364 -ac_max_sed_cmds=60 # Maximum number of lines to put in a sed script.
17365 +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
17366  ac_file=1 # Number of current file.
17367  ac_beg=1 # First line for current file.
17368  ac_end=$ac_max_sed_cmds # Line after last line for current file.
17369 @@ -3425,7 +3433,6 @@
17370  CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
17371  gc_basedir=${gc_basedir}
17372  CC="${CC}"
17373 -ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
17374  DEFS="$DEFS"
17375  
17376  EOF
17377 diff -buNr boehm-gc/configure.in boehm-gc/configure.in
17378 --- boehm-gc/configure.in       Mon Apr 28 13:55:07 2003
17379 +++ boehm-gc/configure.in       Sat Sep 13 01:32:42 2003
17380 @@ -1,4 +1,4 @@
17381 -# Copyright (c) 1999, 2000, 2001, 2002, 2003 by Red Hat, Inc. All rights reserved.
17382 +# Copyright (c) 1999, 2000, 2001, 2002 by Red Hat, Inc. All rights reserved.
17383  # 
17384  # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
17385  # OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
17386 @@ -111,14 +111,18 @@
17387       *-*-cygwin*)
17388         THREADLIBS=
17389         ;;
17390 +     *-*-darwin*)
17391 +       AC_DEFINE(GC_DARWIN_THREADS)
17392 +       AC_DEFINE(THREAD_LOCAL_ALLOC)
17393 +       if test "${enable_parallel_mark}" = yes; then
17394 +         AC_DEFINE(PARALLEL_MARK)
17395 +       fi
17396 +       ;;
17397      esac
17398      ;;
17399   win32)
17400      AC_DEFINE(GC_WIN32_THREADS)
17401      AC_DEFINE(NO_GETENV)
17402 -    if test $enable_shared = yes; then
17403 -      AC_DEFINE(GC_DLL)
17404 -    fi
17405      ;;
17406   decosf1 | irix | mach | os2 | solaris | dce | vxworks)
17407      AC_MSG_ERROR(thread package $THREADS not yet supported)
17408 @@ -129,7 +133,22 @@
17409  esac
17410  AC_SUBST(THREADLIBS)
17411  
17412 -AC_CHECK_LIB(dl, dlopen, EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl")
17413 +case "$host" in 
17414 +   powerpc-*-darwin*)
17415 +      powerpc_darwin=true
17416 +      ;;
17417 +esac
17418 +AM_CONDITIONAL(POWERPC_DARWIN,test x$powerpc_darwin = xtrue)
17419 +
17420 +# We never want libdl on darwin. It is a fake libdl that just ends up making
17421 +# dyld calls anyway
17422 +case "$host" in
17423 +  *-*-darwin*) ;;
17424 +  *) 
17425 +    AC_CHECK_LIB(dl, dlopen, EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl")
17426 +    ;;
17427 +esac
17428 +
17429  AC_SUBST(EXTRA_TEST_LIBS)
17430  
17431  target_all=libgcjgc.la
17432 @@ -270,17 +289,7 @@
17433      esac ]
17434    fi)
17435  
17436 -if test -n "$with_cross_host" &&
17437 -   test x"$with_cross_host" != x"no"; then
17438 -  toolexecdir='$(exec_prefix)/$(target_alias)'
17439 -  toolexeclibdir='$(toolexecdir)/lib'
17440 -else
17441 -  toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
17442 -  toolexeclibdir='$(libdir)'
17443 -fi
17444 -toolexeclibdir=$toolexeclibdir/`$CC -print-multi-os-directory`
17445 -AC_SUBST(toolexecdir)
17446 -AC_SUBST(toolexeclibdir)
17447 +AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
17448  
17449  if test "${multilib}" = "yes"; then
17450    multilib_arg="--enable-multilib"
17451 @@ -304,6 +313,5 @@
17452  CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
17453  gc_basedir=${gc_basedir}
17454  CC="${CC}"
17455 -ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
17456  DEFS="$DEFS"
17457  )
17458 diff -buNr boehm-gc/configure.in~ boehm-gc/configure.in~
17459 --- boehm-gc/configure.in~      Wed Dec 31 16:00:00 1969
17460 +++ boehm-gc/configure.in~      Sat Sep 13 01:32:42 2003
17461 @@ -0,0 +1,317 @@
17462 +# Copyright (c) 1999, 2000, 2001, 2002 by Red Hat, Inc. All rights reserved.
17463 +# 
17464 +# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
17465 +# OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
17466 +# 
17467 +# Permission is hereby granted to use or copy this program
17468 +# for any purpose,  provided the above notices are retained on all copies.
17469 +# Permission to modify the code and to distribute modified code is granted,
17470 +# provided the above notices are retained, and a notice that the code was
17471 +# modified is included with the above copyright notice.
17472 +#
17473 +# Original author: Tom Tromey
17474 +
17475 +dnl Process this file with autoconf to produce configure.
17476 +
17477 +AC_INIT(gcj_mlc.c)
17478 +
17479 +# This works around the fact that libtool configuration may change LD
17480 +# for this particular configuration, but some shells, instead of
17481 +# keeping the changes in LD private, export them just because LD is
17482 +# exported.
17483 +ORIGINAL_LD_FOR_MULTILIBS=$LD
17484 +
17485 +dnl Can't be done in GC_CONFIGURE because that confuses automake. 
17486 +AC_CONFIG_AUX_DIR(.)
17487 +
17488 +GC_CONFIGURE(.)
17489 +
17490 +AM_PROG_LIBTOOL
17491 +
17492 +dnl We use these options to decide which functions to include.
17493 +AC_ARG_WITH(target-subdir,
17494 +[  --with-target-subdir=SUBDIR
17495 +                          configuring with a cross compiler])
17496 +AC_ARG_WITH(cross-host,
17497 +[  --with-cross-host=HOST  configuring with a cross compiler])
17498 +
17499 +AM_MAINTAINER_MODE
17500 +# automake wants to see AC_EXEEXT.  But we don't need it.  And having
17501 +# it is actually a problem, because the compiler we're passed can't
17502 +# necessarily do a full link.  So we fool automake here.
17503 +if false; then
17504 +  # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
17505 +  # to nothing, so nothing would remain between `then' and `fi' if it
17506 +  # were not for the `:' below.
17507 +  :
17508 +  AC_EXEEXT
17509 +fi
17510 +
17511 +AC_MSG_CHECKING([for thread model used by GCC])
17512 +THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
17513 +if test -z "$THREADS"; then
17514 +   THREADS=no
17515 +fi
17516 +AC_MSG_RESULT([$THREADS])
17517 +
17518 +AC_ARG_ENABLE(parallel-mark,
17519 +[  --enable-parallel-mark      parallelize marking and free list construction],
17520 +   [case "$THREADS" in
17521 +      no | none | single)
17522 +       AC_MSG_ERROR([Parallel mark requires --enable-threads=x spec])
17523 +       ;;
17524 +    esac]
17525 +)
17526 +
17527 +INCLUDES=-I${srcdir}/include
17528 +THREADLIBS=
17529 +case "$THREADS" in
17530 + no | none | single)
17531 +    THREADS=none
17532 +    ;;
17533 + posix | pthreads)
17534 +    THREADS=posix
17535 +    THREADLIBS=-lpthread
17536 +    case "$host" in
17537 +     x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
17538 +       AC_DEFINE(GC_LINUX_THREADS)
17539 +       AC_DEFINE(_REENTRANT)
17540 +        if test "${enable_parallel_mark}"; then
17541 +         AC_DEFINE(PARALLEL_MARK)
17542 +       fi
17543 +       AC_DEFINE(THREAD_LOCAL_ALLOC)
17544 +       ;;
17545 +     *-*-linux*)
17546 +       AC_DEFINE(GC_LINUX_THREADS)
17547 +       AC_DEFINE(_REENTRANT)
17548 +       ;;
17549 +     *-*-hpux*)
17550 +       AC_MSG_WARN("Only HP/UX 11 threads are supported.")
17551 +       AC_DEFINE(GC_HPUX_THREADS)
17552 +       AC_DEFINE(_POSIX_C_SOURCE,199506L)
17553 +       if test "${enable_parallel_mark}" = yes; then
17554 +         AC_DEFINE(PARALLEL_MARK)
17555 +       fi
17556 +       AC_DEFINE(THREAD_LOCAL_ALLOC)
17557 +       THREADLIBS="-lpthread -lrt"
17558 +       ;;
17559 +     *-*-freebsd*)
17560 +       AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
17561 +       AC_DEFINE(GC_FREEBSD_THREADS)
17562 +       INCLUDES="$INCLUDES -pthread"
17563 +       THREADLIBS=-pthread
17564 +       ;;
17565 +     *-*-solaris*)
17566 +       AC_DEFINE(GC_SOLARIS_THREADS)
17567 +       AC_DEFINE(GC_SOLARIS_PTHREADS)
17568 +       ;;
17569 +     *-*-irix*)
17570 +       AC_DEFINE(GC_IRIX_THREADS)
17571 +       ;;
17572 +     *-*-cygwin*)
17573 +       THREADLIBS=
17574 +       ;;
17575 +    esac
17576 +    ;;
17577 +     *-*-darwin*)
17578 +       AC_DEFINE(GC_DARWIN_THREADS)
17579 +       AC_DEFINE(THREAD_LOCAL_ALLOC)
17580 +       if test "${enable_parallel_mark}" = yes; then
17581 +         AC_DEFINE(PARALLEL_MARK)
17582 +       fi
17583 +       ;;
17584 + win32)
17585 +    AC_DEFINE(GC_WIN32_THREADS)
17586 +    AC_DEFINE(NO_GETENV)
17587 +    ;;
17588 + decosf1 | irix | mach | os2 | solaris | dce | vxworks)
17589 +    AC_MSG_ERROR(thread package $THREADS not yet supported)
17590 +    ;;
17591 + *)
17592 +    AC_MSG_ERROR($THREADS is an unknown thread package)
17593 +    ;;
17594 +esac
17595 +AC_SUBST(THREADLIBS)
17596 +
17597 +case "$host" in 
17598 +   powerpc-*-darwin*)
17599 +      powerpc_darwin=true
17600 +      ;;
17601 +esac
17602 +AM_CONDITIONAL(POWERPC_DARWIN,test x$powerpc_darwin = xtrue)
17603 +
17604 +# We never want libdl on darwin. It is a fake libdl that just ends up making
17605 +# dyld calls anyway
17606 +case "$host" in
17607 +  *-*-darwin*) ;;
17608 +  *) 
17609 +    AC_CHECK_LIB(dl, dlopen, EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl")
17610 +    ;;
17611 +esac
17612 +
17613 +AC_SUBST(EXTRA_TEST_LIBS)
17614 +
17615 +target_all=libgcjgc.la
17616 +AC_SUBST(target_all)
17617 +AC_SUBST(target_alias)
17618 +
17619 +dnl If the target is an eCos system, use the appropriate eCos
17620 +dnl I/O routines.
17621 +dnl FIXME: this should not be a local option but a global target
17622 +dnl system; at present there is no eCos target.
17623 +TARGET_ECOS="no"
17624 +AC_ARG_WITH(ecos,
17625 +[  --with-ecos             enable runtime eCos target support],
17626 +TARGET_ECOS="$with_ecos"
17627 +)
17628 +
17629 +addobjs=
17630 +CXXINCLUDES=
17631 +case "$TARGET_ECOS" in
17632 +   no)
17633 +      ;;
17634 +   *)
17635 +      AC_DEFINE(ECOS)
17636 +      CXXINCLUDES="-I${TARGET_ECOS}/include"
17637 +      addobjs="$addobjs ecos.lo"
17638 +      ;;
17639 +esac
17640 +AC_SUBST(CXX)
17641 +
17642 +AC_SUBST(INCLUDES)
17643 +AC_SUBST(CXXINCLUDES)
17644 +
17645 +machdep=
17646 +case "$host" in
17647 + alpha*-*-openbsd*)
17648 +    machdep="alpha_mach_dep.lo"
17649 +    if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then
17650 +       AC_MSG_WARN(OpenBSD/Alpha without dlopen(). Shared library support is disabled)
17651 +       AM_DISABLE_SHARED
17652 +    fi
17653 +    ;;
17654 + alpha*-*-*)
17655 +    machdep="alpha_mach_dep.lo"
17656 +    ;;
17657 + i?86-*-solaris2.[[89]]*)
17658 +    AC_DEFINE(SOLARIS25_PROC_VDB_BUG_FIXED)
17659 +    ;;
17660 + mipstx39-*-elf*)
17661 +    machdep="mips_ultrix_mach_dep.lo"
17662 +    AC_DEFINE(STACKBASE, __stackbase)
17663 +    AC_DEFINE(DATASTART_IS_ETEXT)
17664 +    ;;
17665 + mips-dec-ultrix*)
17666 +    machdep="mips_ultrix_mach-dep.lo"
17667 +    ;;
17668 + mips*-*-linux*)
17669 +    ;;
17670 + mips-*-*)
17671 +    machdep="mips_sgi_mach_dep.lo"
17672 +    AC_DEFINE(NO_EXECUTE_PERMISSION)
17673 +    ;;
17674 + sparc-sun-solaris2.3*)
17675 +    machdep="sparc_mach_dep.lo"
17676 +    AC_DEFINE(SUNOS53_SHARED_LIB)
17677 +    ;;
17678 + sparc-sun-solaris2.*)
17679 +    machdep="sparc_mach_dep.lo"
17680 +    ;;
17681 + ia64-*-*)
17682 +    machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
17683 +    ;;
17684 +esac
17685 +if test x"$machdep" = x; then
17686 +   machdep="mach_dep.lo"
17687 +fi
17688 +addobjs="$addobjs $machdep"
17689 +AC_SUBST(addobjs)
17690 +
17691 +dnl As of 4.13a2, the collector will not properly work on Solaris when
17692 +dnl built with gcc and -O.  So we remove -O in the appropriate case.
17693 +case "$host" in
17694 + sparc-sun-solaris2*)
17695 +    if test "$GCC" = yes; then
17696 +       new_CFLAGS=
17697 +       for i in $CFLAGS; do
17698 +         case "$i" in
17699 +          -O*)
17700 +             ;;
17701 +          *)
17702 +             new_CFLAGS="$new_CFLAGS $i"
17703 +             ;;
17704 +         esac
17705 +       done
17706 +       CFLAGS="$new_CFLAGS"
17707 +    fi
17708 +    ;;
17709 +esac
17710 +
17711 +dnl We need to override the top-level CFLAGS.  This is how we do it.
17712 +MY_CFLAGS="$CFLAGS"
17713 +AC_SUBST(MY_CFLAGS)
17714 +
17715 +dnl Include defines that have become de facto standard.
17716 +dnl ALL_INTERIOR_POINTERS can be overridden in startup code.
17717 +AC_DEFINE(SILENT)
17718 +AC_DEFINE(NO_SIGNALS)
17719 +AC_DEFINE(NO_EXECUTE_PERMISSION)
17720 +AC_DEFINE(ALL_INTERIOR_POINTERS)
17721 +
17722 +dnl By default, make the library as general as possible.
17723 +AC_DEFINE(JAVA_FINALIZATION)
17724 +AC_DEFINE(GC_GCJ_SUPPORT)
17725 +AC_DEFINE(ATOMIC_UNCOLLECTABLE)
17726 +
17727 +dnl This is something of a hack.  When cross-compiling we turn off
17728 +dnl some functionality. These is only correct when targetting an
17729 +dnl embedded system.  FIXME.
17730 +if test -n "${with_cross_host}"; then
17731 +   AC_DEFINE(NO_SIGSET)
17732 +   AC_DEFINE(NO_DEBUGGING)
17733 +fi
17734 +
17735 +AC_ARG_ENABLE(full-debug,
17736 +[  --enable-full-debug include full support for pointer backtracing etc.],
17737 +[ if test "$enable_full_debug" = "yes"; then
17738 +    AC_MSG_WARN("Must define GC_DEBUG and use debug alloc. in clients.")
17739 +    AC_DEFINE(KEEP_BACK_PTRS)
17740 +    AC_DEFINE(DBG_HDRS_ALL)
17741 +    case $host in
17742 +      ia64-*-linux* )
17743 +       AC_DEFINE(MAKE_BACK_GRAPH)
17744 +      ;;
17745 +      x86-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
17746 +       AC_DEFINE(MAKE_BACK_GRAPH)
17747 +       AC_MSG_WARN("Client must not use -fomit-frame-pointer.")
17748 +       AC_DEFINE(SAVE_CALL_COUNT, 8)
17749 +      ;;
17750 +    esac ]
17751 +  fi)
17752 +
17753 +AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
17754 +
17755 +if test "${multilib}" = "yes"; then
17756 +  multilib_arg="--enable-multilib"
17757 +else
17758 +  multilib_arg=
17759 +fi
17760 +
17761 +AC_OUTPUT(Makefile include/Makefile, [
17762 +dnl Put all the -D options in a file.
17763 +echo "$DEFS" > boehm-cflags
17764 +
17765 +if test -n "$CONFIG_FILES"; then
17766 +  LD="${ORIGINAL_LD_FOR_MULTILIBS}"
17767 +  ac_file=Makefile . ${gc_basedir}/../config-ml.in
17768 +fi],
17769 +srcdir=${srcdir}
17770 +host=${host}
17771 +target=${target}
17772 +with_multisubdir=${with_multisubdir}
17773 +ac_configure_args="${multilib_arg} ${ac_configure_args}"
17774 +CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
17775 +gc_basedir=${gc_basedir}
17776 +CC="${CC}"
17777 +DEFS="$DEFS"
17778 +)
17779 diff -buNr boehm-gc/darwin_stop_world.c boehm-gc/darwin_stop_world.c
17780 --- boehm-gc/darwin_stop_world.c        Wed Dec 31 16:00:00 1969
17781 +++ boehm-gc/darwin_stop_world.c        Sat Sep 13 01:32:42 2003
17782 @@ -0,0 +1,200 @@
17783 +#include "private/pthread_support.h"
17784 +
17785 +# if defined(GC_DARWIN_THREADS)
17786 +
17787 +#define DEBUG_THREADS 0
17788 +
17789 +/* From "Inside Mac OS X - Mach-O Runtime Architecture" published by Apple
17790 +   Page 49:
17791 +   "The space beneath the stack pointer, where a new stack frame would normally
17792 +   be allocated, is called the red zone. This area as shown in Figure 3-2 may
17793 +   be used for any purpose as long as a new stack frame does not need to be
17794 +   added to the stack."
17795 +   
17796 +   Page 50: "If a leaf procedure's red zone usage would exceed 224 bytes, then
17797 +   it must set up a stack frame just like routines that call other routines."
17798 +*/
17799 +#define PPC_RED_ZONE_SIZE 224
17800 +
17801 +void GC_push_all_stacks() {
17802 +    int i;
17803 +    kern_return_t r;
17804 +    GC_thread p;
17805 +    pthread_t me;
17806 +    ptr_t lo, hi;
17807 +#      if defined(POWERPC)
17808 +        ppc_thread_state_t state;
17809 +#      else
17810 +#              error FIXME for non-ppc OS X
17811 +#      endif
17812 +    mach_msg_type_number_t thread_state_count = MACHINE_THREAD_STATE_COUNT;
17813 +    
17814 +    me = pthread_self();
17815 +    if (!GC_thr_initialized) GC_thr_init();
17816 +    
17817 +    for(i=0;i<THREAD_TABLE_SZ;i++) {
17818 +        for(p=GC_threads[i];p!=0;p=p->next) {
17819 +            if(p -> flags & FINISHED) continue;
17820 +            if(pthread_equal(p->id,me)) {
17821 +                lo = GC_approx_sp();
17822 +            } else {
17823 +                /* Get the thread state (registers, etc) */
17824 +                r = thread_get_state(
17825 +                    p->stop_info.mach_thread,
17826 +                    MACHINE_THREAD_STATE,
17827 +                    (natural_t*)&state,
17828 +                    &thread_state_count);
17829 +                if(r != KERN_SUCCESS) ABORT("thread_get_state failed");
17830 +    
17831 +                #ifdef POWERPC
17832 +                    lo = (void*)(state.r1 - PPC_RED_ZONE_SIZE);
17833 +                    
17834 +                    GC_push_one(state.r0); 
17835 +                    GC_push_one(state.r2); 
17836 +                    GC_push_one(state.r3); 
17837 +                    GC_push_one(state.r4); 
17838 +                    GC_push_one(state.r5); 
17839 +                    GC_push_one(state.r6); 
17840 +                    GC_push_one(state.r7); 
17841 +                    GC_push_one(state.r8); 
17842 +                    GC_push_one(state.r9); 
17843 +                    GC_push_one(state.r10); 
17844 +                    GC_push_one(state.r11); 
17845 +                    GC_push_one(state.r12); 
17846 +                    GC_push_one(state.r13); 
17847 +                    GC_push_one(state.r14); 
17848 +                    GC_push_one(state.r15); 
17849 +                    GC_push_one(state.r16); 
17850 +                    GC_push_one(state.r17); 
17851 +                    GC_push_one(state.r18); 
17852 +                    GC_push_one(state.r19); 
17853 +                    GC_push_one(state.r20); 
17854 +                    GC_push_one(state.r21); 
17855 +                    GC_push_one(state.r22); 
17856 +                    GC_push_one(state.r23); 
17857 +                    GC_push_one(state.r24); 
17858 +                    GC_push_one(state.r25); 
17859 +                    GC_push_one(state.r26); 
17860 +                    GC_push_one(state.r27); 
17861 +                    GC_push_one(state.r28); 
17862 +                    GC_push_one(state.r29); 
17863 +                    GC_push_one(state.r30); 
17864 +                    GC_push_one(state.r31);
17865 +                #else
17866 +                #      error FIXME for non-PPC darwin
17867 +                #endif /* !POWERPC */
17868 +            } /* p != me */
17869 +            if(p->flags & MAIN_THREAD)
17870 +                hi = GC_stackbottom;
17871 +            else
17872 +                hi = p->stack_end;
17873 +            #if DEBUG_THREADS
17874 +                GC_printf3("Darwin: Stack for thread 0x%lx = [%lx,%lx)\n",
17875 +                    (unsigned long) p -> id,
17876 +                    (unsigned long) lo,
17877 +                    (unsigned long) hi
17878 +                );
17879 +            #endif
17880 +            GC_push_all_stack(lo,hi);
17881 +        } /* for(p=GC_threads[i]...) */
17882 +    } /* for(i=0;i<THREAD_TABLE_SZ...) */
17883 +}
17884 +
17885 +/* Caller holds allocation lock.       */
17886 +void GC_stop_world()
17887 +{
17888 +    int i;
17889 +    GC_thread p;
17890 +    pthread_t my_thread = pthread_self();
17891 +    kern_return_t kern_result;
17892 +    
17893 +    #if DEBUG_THREADS
17894 +    GC_printf1("Stopping the world from 0x%lx\n", pthread_self());
17895 +    #endif
17896 +       
17897 +    /* Make sure all free list construction has stopped before we start. */
17898 +    /* No new construction can start, since free list construction is  */
17899 +    /* required to acquire and release the GC lock before it starts,   */
17900 +    /* and we have the lock.                                           */
17901 +#   ifdef PARALLEL_MARK
17902 +      GC_acquire_mark_lock();
17903 +      GC_ASSERT(GC_fl_builder_count == 0);
17904 +      /* We should have previously waited for it to become zero. */
17905 +#   endif /* PARALLEL_MARK */
17906 +
17907 +    for (i = 0; i < THREAD_TABLE_SZ; i++) {
17908 +        for (p = GC_threads[i]; p != 0; p = p -> next) {
17909 +            if (p -> id == my_thread) continue;
17910 +            if (p -> flags & FINISHED) continue;
17911 +            if (p -> thread_blocked) /* Will wait */ continue;
17912 +            
17913 +            #if DEBUG_THREADS
17914 +            GC_printf1("Suspending thread 0x%lx\n", p -> id);
17915 +            #endif
17916 +            
17917 +            /* Suspend the thread */
17918 +            kern_result = thread_suspend(p->stop_info.mach_thread);
17919 +            if(kern_result != KERN_SUCCESS) ABORT("thread_suspend failed");            
17920 +        }
17921 +    }
17922 +    
17923 +#   ifdef MPROTECT_VDB
17924 +    if(GC_incremental) {
17925 +        extern void GC_mprotect_stop();
17926 +        GC_mprotect_stop();
17927 +    }
17928 +#   endif
17929 +    
17930 +#   ifdef PARALLEL_MARK
17931 +      GC_release_mark_lock();
17932 +#   endif
17933 +    #if DEBUG_THREADS
17934 +      GC_printf1("World stopped from 0x%lx\n", pthread_self());
17935 +    #endif
17936 +}
17937 +
17938 +/* Caller holds allocation lock, and has held it continuously since    */
17939 +/* the world stopped.                                                  */
17940 +void GC_start_world()
17941 +{
17942 +    pthread_t my_thread = pthread_self();
17943 +    int i;
17944 +    GC_thread p;
17945 +    kern_return_t kern_result;
17946 +
17947 +#   if DEBUG_THREADS
17948 +      GC_printf0("World starting\n");
17949 +#   endif
17950 +
17951 +#   ifdef MPROTECT_VDB
17952 +    if(GC_incremental) {
17953 +        extern void GC_mprotect_resume();
17954 +        GC_mprotect_resume();
17955 +    }
17956 +#   endif
17957 +
17958 +    for (i = 0; i < THREAD_TABLE_SZ; i++) {
17959 +        for (p = GC_threads[i]; p != 0; p = p -> next) {
17960 +            if (p -> id == my_thread) continue;
17961 +            if (p -> flags & FINISHED) continue;
17962 +            if (p -> thread_blocked) continue;
17963 +    
17964 +            #if DEBUG_THREADS
17965 +            GC_printf1("Resuming 0x%lx\n", p -> id);
17966 +            #endif
17967 +            
17968 +            /* Resume the thread */
17969 +            kern_result = thread_resume(p->stop_info.mach_thread);
17970 +            if(kern_result != KERN_SUCCESS) ABORT("thread_resume failed");
17971 +        }
17972 +    }
17973 +    #if DEBUG_THREADS
17974 +      GC_printf0("World started\n");
17975 +    #endif
17976 +}
17977 +
17978 +void GC_stop_init() {
17979 +
17980 +}
17981 +
17982 +#endif
17983 diff -buNr boehm-gc/dbg_mlc.c boehm-gc/dbg_mlc.c
17984 --- boehm-gc/dbg_mlc.c  Tue Feb 12 21:38:39 2002
17985 +++ boehm-gc/dbg_mlc.c  Sat Sep 13 01:32:42 2003
17986 @@ -60,7 +60,7 @@
17987  # include <stdlib.h>
17988  
17989  # if defined(LINUX) || defined(SUNOS4) || defined(SUNOS5) \
17990 -     || defined(HPUX) || defined(IRIX) || defined(OSF1)
17991 +     || defined(HPUX) || defined(IRIX5) || defined(OSF1)
17992  #   define RANDOM() random()
17993  # else
17994  #   define RANDOM() (long)rand()
17995 @@ -228,6 +228,8 @@
17996      
17997  #endif /* KEEP_BACK_PTRS */
17998  
17999 +# define CROSSES_HBLK(p, sz) \
18000 +       (((word)(p + sizeof(oh) + sz - 1) ^ (word)p) >= HBLKSIZE)
18001  /* Store debugging info into p.  Return displaced pointer. */
18002  /* Assumes we don't hold allocation lock.                 */
18003  ptr_t GC_store_debug_info(p, sz, string, integer)
18004 @@ -243,6 +245,8 @@
18005      /* But that's expensive.  And this way things should only appear   */
18006      /* inconsistent while we're in the handler.                                */
18007      LOCK();
18008 +    GC_ASSERT(GC_size(p) >= sizeof(oh) + sz);
18009 +    GC_ASSERT(!(SMALL_OBJ(sz) && CROSSES_HBLK(p, sz)));
18010  #   ifdef KEEP_BACK_PTRS
18011        ((oh *)p) -> oh_back_ptr = HIDE_BACK_PTR(NOT_MARKED);
18012  #   endif
18013 @@ -275,6 +279,8 @@
18014      /* There is some argument that we should disable signals here.     */
18015      /* But that's expensive.  And this way things should only appear   */
18016      /* inconsistent while we're in the handler.                                */
18017 +    GC_ASSERT(GC_size(p) >= sizeof(oh) + sz);
18018 +    GC_ASSERT(!(SMALL_OBJ(sz) && CROSSES_HBLK(p, sz)));
18019  #   ifdef KEEP_BACK_PTRS
18020        ((oh *)p) -> oh_back_ptr = HIDE_BACK_PTR(NOT_MARKED);
18021  #   endif
18022 @@ -324,10 +330,11 @@
18023  {
18024      register oh * ohdr = (oh *)GC_base(p);
18025      
18026 +    GC_ASSERT(!I_HOLD_LOCK());
18027      GC_err_printf1("0x%lx (", ((unsigned long)ohdr + sizeof(oh)));
18028      GC_err_puts(ohdr -> oh_string);
18029  #   ifdef SHORT_DBG_HDRS
18030 -      GC_err_printf1(":%ld, sz=%ld)\n", (unsigned long)(ohdr -> oh_int));
18031 +      GC_err_printf1(":%ld)\n", (unsigned long)(ohdr -> oh_int));
18032  #   else
18033        GC_err_printf2(":%ld, sz=%ld)\n", (unsigned long)(ohdr -> oh_int),
18034                                         (unsigned long)(ohdr -> oh_sz));
18035 @@ -342,6 +349,7 @@
18036      ptr_t p;
18037  # endif
18038  {
18039 +    GC_ASSERT(!I_HOLD_LOCK());
18040      if (GC_HAS_DEBUG_INFO(p)) {
18041         GC_print_obj(p);
18042      } else {
18043 @@ -355,6 +363,7 @@
18044  {
18045      register oh * ohdr = (oh *)GC_base(p);
18046      
18047 +    GC_ASSERT(!I_HOLD_LOCK());
18048      GC_err_printf2("0x%lx in object at 0x%lx(", (unsigned long)clobbered_addr,
18049                                                 (unsigned long)p);
18050      if (clobbered_addr <= (ptr_t)(&(ohdr -> oh_sz))
18051 @@ -376,14 +385,18 @@
18052  
18053  void GC_check_heap_proc GC_PROTO((void));
18054  
18055 +void GC_print_all_smashed_proc GC_PROTO((void));
18056 +
18057  void GC_do_nothing() {}
18058  
18059  void GC_start_debugging()
18060  {
18061  #   ifndef SHORT_DBG_HDRS
18062        GC_check_heap = GC_check_heap_proc;
18063 +      GC_print_all_smashed = GC_print_all_smashed_proc;
18064  #   else
18065        GC_check_heap = GC_do_nothing;
18066 +      GC_print_all_smashed = GC_do_nothing;
18067  #   endif
18068      GC_print_heap_obj = GC_debug_print_heap_obj_proc;
18069      GC_debugging_started = TRUE;
18070 @@ -429,6 +442,62 @@
18071      return (GC_store_debug_info(result, (word)lb, s, (word)i));
18072  }
18073  
18074 +# ifdef __STDC__
18075 +    GC_PTR GC_debug_malloc_ignore_off_page(size_t lb, GC_EXTRA_PARAMS)
18076 +# else
18077 +    GC_PTR GC_debug_malloc_ignore_off_page(lb, s, i)
18078 +    size_t lb;
18079 +    char * s;
18080 +    int i;
18081 +#   ifdef GC_ADD_CALLER
18082 +       --> GC_ADD_CALLER not implemented for K&R C
18083 +#   endif
18084 +# endif
18085 +{
18086 +    GC_PTR result = GC_malloc_ignore_off_page(lb + DEBUG_BYTES);
18087 +    
18088 +    if (result == 0) {
18089 +        GC_err_printf1("GC_debug_malloc_ignore_off_page(%ld) returning NIL (",
18090 +                      (unsigned long) lb);
18091 +        GC_err_puts(s);
18092 +        GC_err_printf1(":%ld)\n", (unsigned long)i);
18093 +        return(0);
18094 +    }
18095 +    if (!GC_debugging_started) {
18096 +       GC_start_debugging();
18097 +    }
18098 +    ADD_CALL_CHAIN(result, ra);
18099 +    return (GC_store_debug_info(result, (word)lb, s, (word)i));
18100 +}
18101 +
18102 +# ifdef __STDC__
18103 +    GC_PTR GC_debug_malloc_atomic_ignore_off_page(size_t lb, GC_EXTRA_PARAMS)
18104 +# else
18105 +    GC_PTR GC_debug_malloc_atomic_ignore_off_page(lb, s, i)
18106 +    size_t lb;
18107 +    char * s;
18108 +    int i;
18109 +#   ifdef GC_ADD_CALLER
18110 +       --> GC_ADD_CALLER not implemented for K&R C
18111 +#   endif
18112 +# endif
18113 +{
18114 +    GC_PTR result = GC_malloc_atomic_ignore_off_page(lb + DEBUG_BYTES);
18115 +    
18116 +    if (result == 0) {
18117 +        GC_err_printf1("GC_debug_malloc_atomic_ignore_off_page(%ld)"
18118 +                      " returning NIL (", (unsigned long) lb);
18119 +        GC_err_puts(s);
18120 +        GC_err_printf1(":%ld)\n", (unsigned long)i);
18121 +        return(0);
18122 +    }
18123 +    if (!GC_debugging_started) {
18124 +       GC_start_debugging();
18125 +    }
18126 +    ADD_CALL_CHAIN(result, ra);
18127 +    return (GC_store_debug_info(result, (word)lb, s, (word)i));
18128 +}
18129 +
18130  # ifdef DBG_HDRS_ALL
18131  /* 
18132   * An allocation function for internal use.
18133 @@ -447,7 +516,7 @@
18134                        (unsigned long) lb);
18135          return(0);
18136      }
18137 -    ADD_CALL_CHAIN(result, ra);
18138 +    ADD_CALL_CHAIN(result, GC_RETURN_ADDR);
18139      return (GC_store_debug_info_inner(result, (word)lb, "INTERNAL", (word)0));
18140    }
18141  
18142 @@ -461,7 +530,7 @@
18143                        (unsigned long) lb);
18144          return(0);
18145      }
18146 -    ADD_CALL_CHAIN(result, ra);
18147 +    ADD_CALL_CHAIN(result, GC_RETURN_ADDR);
18148      return (GC_store_debug_info_inner(result, (word)lb, "INTERNAL", (word)0));
18149    }
18150  # endif
18151 @@ -592,7 +661,7 @@
18152      int i;
18153  # endif
18154  {
18155 -    GC_PTR result = GC_malloc_uncollectable(lb + DEBUG_BYTES);
18156 +    GC_PTR result = GC_malloc_uncollectable(lb + UNCOLLECTABLE_DEBUG_BYTES);
18157      
18158      if (result == 0) {
18159          GC_err_printf1("GC_debug_malloc_uncollectable(%ld) returning NIL (",
18160 @@ -618,7 +687,8 @@
18161      int i;
18162  # endif
18163  {
18164 -    GC_PTR result = GC_malloc_atomic_uncollectable(lb + DEBUG_BYTES);
18165 +    GC_PTR result =
18166 +       GC_malloc_atomic_uncollectable(lb + UNCOLLECTABLE_DEBUG_BYTES);
18167      
18168      if (result == 0) {
18169          GC_err_printf1(
18170 @@ -774,6 +844,45 @@
18171  }
18172  
18173  #ifndef SHORT_DBG_HDRS
18174 +
18175 +/* List of smashed objects.  We defer printing these, since we can't   */
18176 +/* always print them nicely with the allocation lock held.             */
18177 +/* We put them here instead of in GC_arrays, since it may be useful to */
18178 +/* be able to look at them with the debugger.                          */
18179 +#define MAX_SMASHED 20
18180 +ptr_t GC_smashed[MAX_SMASHED];
18181 +unsigned GC_n_smashed = 0;
18182 +
18183 +# if defined(__STDC__) || defined(__cplusplus)
18184 +    void GC_add_smashed(ptr_t smashed)
18185 +# else
18186 +    void GC_add_smashed(smashed)
18187 +    ptr_t smashed;
18188 +#endif
18189 +{
18190 +    GC_ASSERT(GC_is_marked(GC_base(smashed)));
18191 +    GC_smashed[GC_n_smashed] = smashed;
18192 +    if (GC_n_smashed < MAX_SMASHED - 1) ++GC_n_smashed;
18193 +      /* In case of overflow, we keep the first MAX_SMASHED-1  */
18194 +      /* entries plus the last one.                            */
18195 +    GC_have_errors = TRUE;
18196 +}
18197 +
18198 +/* Print all objects on the list.  Clear the list.     */
18199 +void GC_print_all_smashed_proc ()
18200 +{
18201 +    unsigned i;
18202 +
18203 +    GC_ASSERT(!I_HOLD_LOCK());
18204 +    if (GC_n_smashed == 0) return;
18205 +    GC_err_printf0("GC_check_heap_block: found smashed heap objects:\n");
18206 +    for (i = 0; i < GC_n_smashed; ++i) {
18207 +        GC_print_smashed_obj(GC_base(GC_smashed[i]), GC_smashed[i]);
18208 +       GC_smashed[i] = 0;
18209 +    }
18210 +    GC_n_smashed = 0;
18211 +}
18212 +
18213  /* Check all marked objects in the given block for validity */
18214  /*ARGSUSED*/
18215  # if defined(__STDC__) || defined(__cplusplus)
18216 @@ -802,11 +911,7 @@
18217                 && GC_HAS_DEBUG_INFO((ptr_t)p)) {
18218                 ptr_t clobbered = GC_check_annotated_obj((oh *)p);
18219                 
18220 -               if (clobbered != 0) {
18221 -                   GC_err_printf0(
18222 -                       "GC_check_heap_block: found smashed location at ");
18223 -                   GC_print_smashed_obj((ptr_t)p, clobbered);
18224 -               }
18225 +               if (clobbered != 0) GC_add_smashed(clobbered);
18226             }
18227             word_no += sz;
18228             p += sz;
18229 @@ -819,9 +924,11 @@
18230  void GC_check_heap_proc()
18231  {
18232  #   ifndef SMALL_CONFIG
18233 -       if (sizeof(oh) & (2 * sizeof(word) - 1) != 0) {
18234 -           ABORT("Alignment problem: object header has inappropriate size\n");
18235 -       }
18236 +#     ifdef ALIGN_DOUBLE
18237 +        GC_STATIC_ASSERT((sizeof(oh) & (2 * sizeof(word) - 1)) == 0);
18238 +#     else
18239 +        GC_STATIC_ASSERT((sizeof(oh) & (sizeof(word) - 1)) == 0);
18240 +#     endif
18241  #   endif
18242      GC_apply_to_all_blocks(GC_check_heap_block, (word)0);
18243  }
18244 @@ -908,7 +1015,7 @@
18245      ptr_t base = GC_base(obj);
18246      if (0 == base || (ptr_t)obj - base != sizeof(oh)) {
18247          GC_err_printf1(
18248 -           "GC_register_finalizer called with non-base-pointer 0x%lx\n",
18249 +           "GC_debug_register_finalizer called with non-base-pointer 0x%lx\n",
18250             obj);
18251      }
18252      if (0 == fn) {
18253 @@ -940,7 +1047,7 @@
18254      ptr_t base = GC_base(obj);
18255      if (0 == base || (ptr_t)obj - base != sizeof(oh)) {
18256          GC_err_printf1(
18257 -         "GC_register_finalizer_no_order called with non-base-pointer 0x%lx\n",
18258 +         "GC_debug_register_finalizer_no_order called with non-base-pointer 0x%lx\n",
18259           obj);
18260      }
18261      if (0 == fn) {
18262 @@ -973,7 +1080,7 @@
18263      ptr_t base = GC_base(obj);
18264      if (0 == base || (ptr_t)obj - base != sizeof(oh)) {
18265          GC_err_printf1(
18266 -           "GC_register_finalizer_ignore_self called with non-base-pointer 0x%lx\n",
18267 +           "GC_debug_register_finalizer_ignore_self called with non-base-pointer 0x%lx\n",
18268             obj);
18269      }
18270      if (0 == fn) {
18271 diff -buNr boehm-gc/dyn_load.c boehm-gc/dyn_load.c
18272 --- boehm-gc/dyn_load.c Mon Mar  3 22:38:30 2003
18273 +++ boehm-gc/dyn_load.c Sat Sep 13 02:01:31 2003
18274 @@ -55,9 +55,10 @@
18275      !defined(MSWIN32) && !defined(MSWINCE) && \
18276      !(defined(ALPHA) && defined(OSF1)) && \
18277      !defined(HPUX) && !(defined(LINUX) && defined(__ELF__)) && \
18278 -    !defined(RS6000) && !defined(SCO_ELF) && \
18279 +    !defined(RS6000) && !defined(SCO_ELF) && !defined(DGUX) && \
18280      !(defined(FREEBSD) && defined(__ELF__)) && \
18281 -    !(defined(NETBSD) && defined(__ELF__)) && !defined(HURD)
18282 +    !(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \
18283 +    !defined(DARWIN)
18284   --> We only know how to find data segments of dynamic libraries for the
18285   --> above.  Additional SVR4 variants might not be too
18286   --> hard to add.
18287 @@ -80,7 +81,7 @@
18288  #endif
18289  
18290  #if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
18291 -    (defined(FREEBSD) && defined(__ELF__)) || \
18292 +    (defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
18293      (defined(NETBSD) && defined(__ELF__)) || defined(HURD)
18294  #   include <stddef.h>
18295  #   include <elf.h>
18296 @@ -264,7 +265,7 @@
18297  # endif /* SUNOS */
18298  
18299  #if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
18300 -    (defined(FREEBSD) && defined(__ELF__)) || \
18301 +    (defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
18302      (defined(NETBSD) && defined(__ELF__)) || defined(HURD)
18303  
18304  
18305 @@ -282,56 +283,23 @@
18306         /* Repeatedly read until buffer is filled, or EOF is encountered */
18307         /* Defined in os_dep.c.                                          */
18308  
18309 -static char *parse_map_entry(char *buf_ptr, word *start, word *end,
18310 +char *GC_parse_map_entry(char *buf_ptr, word *start, word *end,
18311                               char *prot_buf, unsigned int *maj_dev);
18312 +word GC_apply_to_maps(word (*fn)(char *));
18313 +       /* From os_dep.c        */
18314  
18315 -void GC_register_dynamic_libraries()
18316 +word GC_register_map_entries(char *maps)
18317  {
18318 -    int f;
18319 -    int result;
18320      char prot_buf[5];
18321 -    int maps_size;
18322 -    char maps_temp[32768];
18323 -    char *maps_buf;
18324 -    char *buf_ptr;
18325 +    char *buf_ptr = maps;
18326      int count;
18327      word start, end;
18328 -    unsigned int maj_dev, min_dev;
18329 +    unsigned int maj_dev;
18330      word least_ha, greatest_ha;
18331      unsigned i;
18332      word datastart = (word)(DATASTART);
18333  
18334 -    /* Read /proc/self/maps    */
18335 -        /* Note that we may not allocate, and thus can't use stdio.    */
18336 -        f = open("/proc/self/maps", O_RDONLY);
18337 -        if (-1 == f) ABORT("Couldn't open /proc/self/maps");
18338 -       /* stat() doesn't work for /proc/self/maps, so we have to
18339 -          read it to find out how large it is... */
18340 -       maps_size = 0;
18341 -       do {
18342 -           result = GC_repeat_read(f, maps_temp, sizeof(maps_temp));
18343 -           if (result <= 0) ABORT("Couldn't read /proc/self/maps");
18344 -           maps_size += result;
18345 -       } while (result == sizeof(maps_temp));
18346 -
18347 -       if (maps_size > sizeof(maps_temp)) {
18348 -           /* If larger than our buffer, close and re-read it. */
18349 -           close(f);
18350 -           f = open("/proc/self/maps", O_RDONLY);
18351 -           if (-1 == f) ABORT("Couldn't open /proc/self/maps");
18352 -           maps_buf = alloca(maps_size);
18353 -           if (NULL == maps_buf) ABORT("/proc/self/maps alloca failed");
18354 -           result = GC_repeat_read(f, maps_buf, maps_size);
18355 -           if (result <= 0) ABORT("Couldn't read /proc/self/maps");
18356 -       } else {
18357 -           /* Otherwise use the fixed size buffer */
18358 -           maps_buf = maps_temp;
18359 -       }
18360 -
18361 -       close(f);
18362 -        maps_buf[result] = '\0';
18363 -        buf_ptr = maps_buf;
18364 -    /* Compute heap bounds. Should be done by add_to_heap?     */
18365 +    /* Compute heap bounds. FIXME: Should be done by add_to_heap?      */
18366         least_ha = (word)(-1);
18367         greatest_ha = 0;
18368         for (i = 0; i < GC_n_heap_sects; ++i) {
18369 @@ -342,11 +310,10 @@
18370          }
18371         if (greatest_ha < (word)GC_scratch_last_end_ptr)
18372             greatest_ha = (word)GC_scratch_last_end_ptr; 
18373 -    for (;;) {
18374 -
18375 -        buf_ptr = parse_map_entry(buf_ptr, &start, &end, prot_buf, &maj_dev);
18376 -       if (buf_ptr == NULL) return;
18377  
18378 +    for (;;) {
18379 +        buf_ptr = GC_parse_map_entry(buf_ptr, &start, &end, prot_buf, &maj_dev);
18380 +       if (buf_ptr == NULL) return 1;
18381         if (prot_buf[1] == 'w') {
18382             /* This is a writable mapping.  Add it to           */
18383             /* the root set unless it is already otherwise      */
18384 @@ -358,16 +325,7 @@
18385  #          ifdef THREADS
18386               if (GC_segment_is_thread_stack(start, end)) continue;
18387  #          endif
18388 -           /* The rest of this assumes that there is no mapping        */
18389 -           /* spanning the beginning of the data segment, or extending */
18390 -           /* beyond the entire heap at both ends.                     */
18391 -           /* Empirically these assumptions hold.                      */
18392 -           
18393 -           if (start < (word)DATAEND && end > (word)DATAEND) {
18394 -               /* Rld may use space at the end of the main data        */
18395 -               /* segment.  Thus we add that in.                       */
18396 -               start = (word)DATAEND;
18397 -           }
18398 +           /* We no longer exclude the main data segment.              */
18399             if (start < least_ha && end > least_ha) {
18400                 end = least_ha;
18401             }
18402 @@ -378,6 +336,13 @@
18403             GC_add_roots_inner((char *)start, (char *)end, TRUE);
18404         }
18405       }
18406 +    return 1;
18407 +}
18408 +
18409 +void GC_register_dynamic_libraries()
18410 +{
18411 +   if (!GC_apply_to_maps(GC_register_map_entries))
18412 +       ABORT("Failed to read /proc for library registration.");
18413  }
18414  
18415  /* We now take care of the main data segment ourselves: */
18416 @@ -387,60 +352,6 @@
18417  }
18418    
18419  # define HAVE_REGISTER_MAIN_STATIC_DATA
18420 -//
18421 -//  parse_map_entry parses an entry from /proc/self/maps so we can
18422 -//  locate all writable data segments that belong to shared libraries.
18423 -//  The format of one of these entries and the fields we care about
18424 -//  is as follows:
18425 -//  XXXXXXXX-XXXXXXXX r-xp 00000000 30:05 260537     name of mapping...\n
18426 -//  ^^^^^^^^ ^^^^^^^^ ^^^^          ^^
18427 -//  start    end      prot          maj_dev
18428 -//  0        9        18            32
18429 -//
18430 -//  The parser is called with a pointer to the entry and the return value
18431 -//  is either NULL or is advanced to the next entry(the byte after the
18432 -//  trailing '\n'.)
18433 -//
18434 -#define OFFSET_MAP_START   0
18435 -#define OFFSET_MAP_END     9
18436 -#define OFFSET_MAP_PROT   18
18437 -#define OFFSET_MAP_MAJDEV 32
18438 -
18439 -static char *parse_map_entry(char *buf_ptr, word *start, word *end,
18440 -                             char *prot_buf, unsigned int *maj_dev)
18441 -{
18442 -    int i;
18443 -    unsigned int val;
18444 -    char *tok;
18445 -
18446 -    if (buf_ptr == NULL || *buf_ptr == '\0') {
18447 -        return NULL;
18448 -    }
18449 -
18450 -    memcpy(prot_buf, buf_ptr+OFFSET_MAP_PROT, 4); // do the protections first
18451 -    prot_buf[4] = '\0';
18452 -
18453 -    if (prot_buf[1] == 'w') { // we can skip all of this if it's not writable
18454 -
18455 -        tok = buf_ptr;
18456 -        buf_ptr[OFFSET_MAP_START+8] = '\0';
18457 -        *start = strtoul(tok, NULL, 16);
18458 -
18459 -        tok = buf_ptr+OFFSET_MAP_END;
18460 -        buf_ptr[OFFSET_MAP_END+8] = '\0';
18461 -        *end = strtoul(tok, NULL, 16);
18462 -
18463 -        buf_ptr += OFFSET_MAP_MAJDEV;
18464 -        tok = buf_ptr;
18465 -        while (*buf_ptr != ':') buf_ptr++;
18466 -        *buf_ptr++ = '\0';
18467 -        *maj_dev = strtoul(tok, NULL, 16);
18468 -    }
18469 -
18470 -    while (*buf_ptr && *buf_ptr++ != '\n');
18471 -
18472 -    return buf_ptr;
18473 -}
18474  
18475  #endif /* USE_PROC_FOR_LIBRARIES */
18476  
18477 @@ -508,6 +419,7 @@
18478            GC_add_roots_inner(DATASTART2, (char *)(DATAEND2), TRUE);
18479  #       endif
18480      }
18481 +
18482      return TRUE;
18483    } else {
18484      return FALSE;
18485 @@ -630,6 +542,7 @@
18486         /* The type is a lie, since the real type doesn't make sense here, */
18487         /* and we only test for NULL.                                      */
18488  
18489 +
18490  /* We use /proc to track down all parts of the address space that are  */
18491  /* mapped by the process, and throw out regions we know we shouldn't   */
18492  /* worry about.  This may also work under other SVR4 variants.         */
18493 @@ -1056,7 +969,122 @@
18494  }
18495  #endif /* RS6000 */
18496  
18497 +#ifdef DARWIN
18498 +
18499 +#include <mach-o/dyld.h>
18500 +#include <mach-o/getsect.h>
18501 +
18502 +/*#define DARWIN_DEBUG*/
18503 +    
18504 +const static struct { 
18505 +    const char *seg;
18506 +    const char *sect;
18507 +} GC_dyld_sections[] = {
18508 +    { SEG_DATA, SECT_DATA },
18509 +    { SEG_DATA, SECT_BSS },
18510 +    { SEG_DATA, SECT_COMMON }
18511 +};
18512 +
18513 +#ifdef DARWIN_DEBUG
18514 +static const char *GC_dyld_name_for_hdr(struct mach_header *hdr) {
18515 +    unsigned long i,c;
18516 +    c = _dyld_image_count();
18517 +    for(i=0;i<c;i++) if(_dyld_get_image_header(i) == hdr)
18518 +        return _dyld_get_image_name(i);
18519 +    return NULL;
18520 +}
18521 +#endif
18522 +
18523 +/* This should never be called by a thread holding the lock */
18524 +static void GC_dyld_image_add(struct mach_header* hdr, unsigned long slide) {
18525 +    unsigned long start,end,i;
18526 +    const struct section *sec;
18527 +    for(i=0;i<sizeof(GC_dyld_sections)/sizeof(GC_dyld_sections[0]);i++) {
18528 +        sec = getsectbynamefromheader(
18529 +            hdr,GC_dyld_sections[i].seg,GC_dyld_sections[i].sect);
18530 +        if(sec == NULL || sec->size == 0) continue;
18531 +        start = slide + sec->addr;
18532 +        end = start + sec->size;
18533 +#              ifdef DARWIN_DEBUG
18534 +            GC_printf4("Adding section at %p-%p (%lu bytes) from image %s\n",
18535 +                start,end,sec->size,GC_dyld_name_for_hdr(hdr));
18536 +#              endif
18537 +        GC_add_roots((char*)start,(char*)end);
18538 +    }
18539 +#      ifdef DARWIN_DEBUG
18540 +    GC_print_static_roots();
18541 +#      endif
18542 +}
18543 +
18544 +/* This should never be called by a thread holding the lock */
18545 +static void GC_dyld_image_remove(struct mach_header* hdr, unsigned long slide) {
18546 +    unsigned long start,end,i;
18547 +    const struct section *sec;
18548 +    for(i=0;i<sizeof(GC_dyld_sections)/sizeof(GC_dyld_sections[0]);i++) {
18549 +        sec = getsectbynamefromheader(
18550 +            hdr,GC_dyld_sections[i].seg,GC_dyld_sections[i].sect);
18551 +        if(sec == NULL || sec->size == 0) continue;
18552 +        start = slide + sec->addr;
18553 +        end = start + sec->size;
18554 +#              ifdef DARWIN_DEBUG
18555 +            GC_printf4("Removing section at %p-%p (%lu bytes) from image %s\n",
18556 +                start,end,sec->size,GC_dyld_name_for_hdr(hdr));
18557 +#              endif
18558 +        GC_remove_roots((char*)start,(char*)end);
18559 +    }
18560 +#      ifdef DARWIN_DEBUG
18561 +    GC_print_static_roots();
18562 +#      endif
18563 +}
18564 +
18565 +void GC_register_dynamic_libraries() {
18566 +    /* Currently does nothing. The callbacks are setup by GC_init_dyld() 
18567 +    The dyld library takes it from there. */
18568 +}
18569 +
18570 +/* The _dyld_* functions have an internal lock so no _dyld functions
18571 +   can be called while the world is stopped without the risk of a deadlock.
18572 +   Because of this we MUST setup callbacks BEFORE we ever stop the world.
18573 +   This should be called BEFORE any thread in created and WITHOUT the
18574 +   allocation lock held. */
18575 +   
18576 +void GC_init_dyld() {
18577 +    static GC_bool initialized = FALSE;
18578 +    
18579 +    if(initialized) return;
18580 +    
18581 +#   ifdef DARWIN_DEBUG
18582 +        GC_printf0("Forcing full bind of GC code...\n");
18583 +#   endif
18584 +    if(!_dyld_bind_fully_image_containing_address((unsigned long*)GC_malloc))
18585 +        GC_abort("_dyld_bind_fully_image_containing_addres failed");
18586 +            
18587 +#   ifdef DARWIN_DEBUG
18588 +        GC_printf0("Registering dyld callbacks...\n");
18589 +#   endif
18590 +
18591 +    /* Apple's Documentation:
18592 +    When you call _dyld_register_func_for_add_image, the dynamic linker runtime
18593 +    calls the specified callback (func) once for each of the images that is
18594 +    currently loaded into the program. When a new image is added to the program,
18595 +    your callback is called again with the mach_header for the new image, and the      virtual memory slide amount of the new image. 
18596 +        
18597 +    This WILL properly register existing and all future libraries
18598 +    */
18599 +        
18600 +    _dyld_register_func_for_add_image(GC_dyld_image_add);
18601 +    _dyld_register_func_for_remove_image(GC_dyld_image_remove);
18602 +    initialized = TRUE;
18603 +}
18604 +
18605 +#define HAVE_REGISTER_MAIN_STATIC_DATA
18606 +GC_bool GC_register_main_static_data()
18607 +{
18608 +  /* Already done through dyld callbacks */
18609 +  return FALSE;
18610 +}
18611  
18612 +#endif /* DARWIN */
18613  
18614  #else /* !DYNAMIC_LOADING */
18615  
18616 diff -buNr boehm-gc/dyn_load.c.rej boehm-gc/dyn_load.c.rej
18617 --- boehm-gc/dyn_load.c.rej     Wed Dec 31 16:00:00 1969
18618 +++ boehm-gc/dyn_load.c.rej     Sat Sep 13 01:46:24 2003
18619 @@ -0,0 +1,50 @@
18620 +***************
18621 +*** 284,290 ****
18622 +       /* Defined in os_dep.c.                                          */
18623 +  
18624 +  char *GC_parse_map_entry(char *buf_ptr, word *start, word *end,
18625 +-                          char *prot_buf, unsigned int *maj_dev);
18626 +  word GC_apply_to_maps(word (*fn)(char *));
18627 +       /* From os_dep.c        */
18628 +  
18629 +--- 284,290 ----
18630 +       /* Defined in os_dep.c.                                          */
18631 +  
18632 +  char *GC_parse_map_entry(char *buf_ptr, word *start, word *end,
18633 ++                              char *prot_buf, unsigned int *maj_dev);
18634 +  word GC_apply_to_maps(word (*fn)(char *));
18635 +       /* From os_dep.c        */
18636 +  
18637 +***************
18638 +*** 335,341 ****
18639 +           if (start >= least_ha && end <= greatest_ha) continue;
18640 +           GC_add_roots_inner((char *)start, (char *)end, TRUE);
18641 +       }
18642 +-     }
18643 +      return 1;
18644 +  }
18645 +  
18646 +--- 335,341 ----
18647 +           if (start >= least_ha && end <= greatest_ha) continue;
18648 +           GC_add_roots_inner((char *)start, (char *)end, TRUE);
18649 +       }
18650 ++      }
18651 +      return 1;
18652 +  }
18653 +  
18654 +***************
18655 +*** 971,976 ****
18656 +  
18657 +  #ifdef DARWIN
18658 +  
18659 +  #include <mach-o/dyld.h>
18660 +  #include <mach-o/getsect.h>
18661 +  
18662 +--- 971,977 ----
18663 +  
18664 +  #ifdef DARWIN
18665 +  
18666 ++ #define __private_extern__
18667 +  #include <mach-o/dyld.h>
18668 +  #include <mach-o/getsect.h>
18669 +  
18670 diff -buNr boehm-gc/finalize.c boehm-gc/finalize.c
18671 --- boehm-gc/finalize.c Mon Feb 11 20:37:53 2002
18672 +++ boehm-gc/finalize.c Sat Sep 13 01:32:42 2003
18673 @@ -207,7 +207,8 @@
18674         UNLOCK();
18675         ENABLE_SIGNALS();
18676  #     endif
18677 -      new_dl = GC_oom_fn(sizeof(struct disappearing_link));
18678 +      new_dl = (struct disappearing_link *)
18679 +             GC_oom_fn(sizeof(struct disappearing_link));
18680        if (0 == new_dl) {
18681         GC_finalization_failures++;
18682         return(0);
18683 @@ -433,7 +434,8 @@
18684         UNLOCK();
18685         ENABLE_SIGNALS();
18686  #     endif
18687 -      new_fo = GC_oom_fn(sizeof(struct finalizable_object));
18688 +      new_fo = (struct finalizable_object *)
18689 +             GC_oom_fn(sizeof(struct finalizable_object));
18690        if (0 == new_fo) {
18691         GC_finalization_failures++;
18692         return;
18693 @@ -759,8 +761,9 @@
18694  /* Should be called without allocation lock.                           */
18695  int GC_invoke_finalizers()
18696  {
18697 -    register struct finalizable_object * curr_fo;
18698 -    register int count = 0;
18699 +    struct finalizable_object * curr_fo;
18700 +    int count = 0;
18701 +    word mem_freed_before;
18702      DCL_LOCK_STATE;
18703      
18704      while (GC_finalize_now != 0) {
18705 @@ -768,6 +771,9 @@
18706             DISABLE_SIGNALS();
18707             LOCK();
18708  #      endif
18709 +       if (count == 0) {
18710 +           mem_freed_before = GC_mem_freed;
18711 +       }
18712         curr_fo = GC_finalize_now;
18713  #      ifdef THREADS
18714             if (curr_fo != 0) GC_finalize_now = fo_next(curr_fo);
18715 @@ -789,6 +795,11 @@
18716             GC_free((GC_PTR)curr_fo);
18717  #      endif
18718      }
18719 +    if (count != 0 && mem_freed_before != GC_mem_freed) {
18720 +        LOCK();
18721 +       GC_finalizer_mem_freed += (GC_mem_freed - mem_freed_before);
18722 +       UNLOCK();
18723 +    }
18724      return count;
18725  }
18726  
18727 @@ -801,7 +812,9 @@
18728      if (GC_finalize_now == 0) return;
18729      if (!GC_finalize_on_demand) {
18730         (void) GC_invoke_finalizers();
18731 +#      ifndef THREADS
18732         GC_ASSERT(GC_finalize_now == 0);
18733 +#      endif   /* Otherwise GC can run concurrently and add more */
18734         return;
18735      }
18736      if (GC_finalizer_notifier != (void (*) GC_PROTO((void)))0
18737 @@ -839,3 +852,17 @@
18738      return(result);
18739  }
18740  
18741 +#if !defined(NO_DEBUGGING)
18742 +
18743 +void GC_print_finalization_stats()
18744 +{
18745 +    struct finalizable_object *fo = GC_finalize_now;
18746 +    size_t ready = 0;
18747 +
18748 +    GC_printf2("%lu finalization table entries; %lu disappearing links\n",
18749 +              GC_fo_entries, GC_dl_entries);
18750 +    for (; 0 != fo; fo = fo_next(fo)) ++ready;
18751 +    GC_printf1("%lu objects are eligible for immediate finalization\n", ready);
18752 +}
18753 +
18754 +#endif /* NO_DEBUGGING */
18755 diff -buNr boehm-gc/gc_dlopen.c boehm-gc/gc_dlopen.c
18756 --- boehm-gc/gc_dlopen.c        Tue Oct 16 02:01:35 2001
18757 +++ boehm-gc/gc_dlopen.c        Sat Sep 13 01:32:42 2003
18758 @@ -19,12 +19,14 @@
18759  /*
18760   * This used to be in dyn_load.c.  It was extracted into a separate file
18761   * to avoid having to link against libdl.{a,so} if the client doesn't call
18762 - * dlopen.  -HB
18763 + * dlopen.  Of course this fails if the collector is in a dynamic
18764 + * library. -HB
18765   */
18766  
18767  #include "private/gc_priv.h"
18768  
18769 -# if defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS)
18770 +# if (defined(GC_PTHREADS) && !defined(GC_DARWIN_THREADS)) \
18771 +      || defined(GC_SOLARIS_THREADS)
18772  
18773  # if defined(dlopen) && !defined(GC_USE_LD_WRAP)
18774      /* To support various threads pkgs, gc.h interposes on dlopen by     */
18775 @@ -44,19 +46,14 @@
18776    /* calls in either a multithreaded environment, or if the library    */
18777    /* initialization code allocates substantial amounts of GC'ed memory.        */
18778    /* But I don't know of a better solution.                            */
18779 -  /* This can still deadlock if the client explicitly starts a GC      */
18780 -  /* during the dlopen.  He shouldn't do that.                         */
18781 -  static GC_bool disable_gc_for_dlopen()
18782 +  static void disable_gc_for_dlopen()
18783    {
18784 -    GC_bool result;
18785      LOCK();
18786 -    result = GC_dont_gc;
18787      while (GC_incremental && GC_collection_in_progress()) {
18788         GC_collect_a_little_inner(1000);
18789      }
18790 -    GC_dont_gc = TRUE;
18791 +    ++GC_dont_gc;
18792      UNLOCK();
18793 -    return(result);
18794    }
18795  
18796    /* Redefine dlopen to guarantee mutual exclusion with        */
18797 @@ -74,10 +71,9 @@
18798  #endif
18799  {
18800      void * result;
18801 -    GC_bool dont_gc_save;
18802      
18803  #   ifndef USE_PROC_FOR_LIBRARIES
18804 -      dont_gc_save = disable_gc_for_dlopen();
18805 +      disable_gc_for_dlopen();
18806  #   endif
18807  #   ifdef GC_USE_LD_WRAP
18808        result = (void *)__real_dlopen(path, mode);
18809 @@ -85,7 +81,7 @@
18810        result = dlopen(path, mode);
18811  #   endif
18812  #   ifndef USE_PROC_FOR_LIBRARIES
18813 -      GC_dont_gc = dont_gc_save;
18814 +      GC_enable(); /* undoes disable_gc_for_dlopen */
18815  #   endif
18816      return(result);
18817  }
18818 diff -buNr boehm-gc/gcj_mlc.c boehm-gc/gcj_mlc.c
18819 --- boehm-gc/gcj_mlc.c  Mon Feb 11 20:37:53 2002
18820 +++ boehm-gc/gcj_mlc.c  Sat Sep 13 01:32:42 2003
18821 @@ -157,6 +157,7 @@
18822              GC_words_allocd += lw;
18823          }
18824         *(void **)op = ptr_to_struct_containing_descr;
18825 +       GC_ASSERT(((void **)op)[1] == 0);
18826         UNLOCK();
18827      } else {
18828         LOCK();
18829 diff -buNr boehm-gc/if_mach.c boehm-gc/if_mach.c
18830 --- boehm-gc/if_mach.c  Fri Aug 17 11:30:45 2001
18831 +++ boehm-gc/if_mach.c  Sat Sep 13 01:32:42 2003
18832 @@ -14,7 +14,7 @@
18833      if (strcmp(MACH_TYPE, argv[1]) != 0) return(0);
18834      if (strcmp(OS_TYPE, "") != 0 && strcmp(argv[2], "") != 0
18835          && strcmp(OS_TYPE, argv[2]) != 0) return(0);
18836 -    printf("^^^^Starting command^^^^\n");
18837 +    fprintf(stderr, "^^^^Starting command^^^^\n");
18838      fflush(stdout);
18839      execvp(argv[3], argv+3);
18840      perror("Couldn't execute");
18841 diff -buNr boehm-gc/include/Makefile.in boehm-gc/include/Makefile.in
18842 --- boehm-gc/include/Makefile.in        Tue Dec 31 09:52:45 2002
18843 +++ boehm-gc/include/Makefile.in        Sat Sep 13 01:32:42 2003
18844 @@ -1,6 +1,8 @@
18845 -# Makefile.in generated automatically by automake 1.4 from Makefile.am
18846 +# Makefile.in generated by automake 1.6.3 from Makefile.am.
18847 +# @configure_input@
18848  
18849 -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
18850 +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
18851 +# Free Software Foundation, Inc.
18852  # This Makefile.in is free software; the Free Software Foundation
18853  # gives unlimited permission to copy and/or distribute it,
18854  # with or without modifications, as long as this notice is preserved.
18855 @@ -10,7 +12,7 @@
18856  # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
18857  # PARTICULAR PURPOSE.
18858  
18859 -
18860 +@SET_MAKE@
18861  SHELL = @SHELL@
18862  
18863  srcdir = @srcdir@
18864 @@ -31,13 +33,9 @@
18865  mandir = @mandir@
18866  includedir = @includedir@
18867  oldincludedir = /usr/include
18868 -
18869 -DESTDIR =
18870 -
18871  pkgdatadir = $(datadir)/@PACKAGE@
18872  pkglibdir = $(libdir)/@PACKAGE@
18873  pkgincludedir = $(includedir)/@PACKAGE@
18874 -
18875  top_builddir = ..
18876  
18877  ACLOCAL = @ACLOCAL@
18878 @@ -45,12 +43,16 @@
18879  AUTOMAKE = @AUTOMAKE@
18880  AUTOHEADER = @AUTOHEADER@
18881  
18882 +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
18883  INSTALL = @INSTALL@
18884 -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
18885 +INSTALL_PROGRAM = @INSTALL_PROGRAM@
18886  INSTALL_DATA = @INSTALL_DATA@
18887 +install_sh_DATA = $(install_sh) -c -m 644
18888 +install_sh_PROGRAM = $(install_sh) -c
18889 +install_sh_SCRIPT = $(install_sh) -c
18890  INSTALL_SCRIPT = @INSTALL_SCRIPT@
18891 +INSTALL_HEADER = $(INSTALL_DATA)
18892  transform = @program_transform_name@
18893 -
18894  NORMAL_INSTALL = :
18895  PRE_INSTALL = :
18896  POST_INSTALL = :
18897 @@ -63,171 +65,190 @@
18898  host_triplet = @host@
18899  target_alias = @target_alias@
18900  target_triplet = @target@
18901 +
18902 +EXEEXT = @EXEEXT@
18903 +OBJEXT = @OBJEXT@
18904 +PATH_SEPARATOR = @PATH_SEPARATOR@
18905 +AMTAR = @AMTAR@
18906  AR = @AR@
18907  AS = @AS@
18908 +AWK = @AWK@
18909  CC = @CC@
18910  CPP = @CPP@
18911  CXX = @CXX@
18912  CXXCPP = @CXXCPP@
18913  CXXINCLUDES = @CXXINCLUDES@
18914 +DEPDIR = @DEPDIR@
18915  DLLTOOL = @DLLTOOL@
18916 -EXEEXT = @EXEEXT@
18917 +ECHO = @ECHO@
18918 +EGREP = @EGREP@
18919  EXTRA_TEST_LIBS = @EXTRA_TEST_LIBS@
18920 +F77 = @F77@
18921  GCJ = @GCJ@
18922  GCJFLAGS = @GCJFLAGS@
18923  GC_CFLAGS = @GC_CFLAGS@
18924  INCLUDES = @INCLUDES@
18925 +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
18926  LIBTOOL = @LIBTOOL@
18927  LN_S = @LN_S@
18928  MAINT = @MAINT@
18929 -MAKEINFO = @MAKEINFO@
18930  MY_CFLAGS = @MY_CFLAGS@
18931  OBJDUMP = @OBJDUMP@
18932 -OBJEXT = @OBJEXT@
18933  PACKAGE = @PACKAGE@
18934  RANLIB = @RANLIB@
18935 +RC = @RC@
18936  STRIP = @STRIP@
18937  THREADLIBS = @THREADLIBS@
18938  VERSION = @VERSION@
18939  addobjs = @addobjs@
18940 +am__include = @am__include@
18941 +am__quote = @am__quote@
18942  gc_basedir = @gc_basedir@
18943 +install_sh = @install_sh@
18944  mkinstalldirs = @mkinstalldirs@
18945  target_all = @target_all@
18946 -
18947  AUTOMAKE_OPTIONS = foreign
18948  
18949  noinst_HEADERS = gc.h gc_backptr.h gc_local_alloc.h \
18950    gc_pthread_redirects.h gc_cpp.h
18951  
18952 +subdir = include
18953  CONFIG_CLEAN_FILES = 
18954 +depcomp =
18955 +am__depfiles_maybe =
18956 +DIST_SOURCES =
18957  HEADERS =  $(noinst_HEADERS)
18958  
18959 -DIST_COMMON =  Makefile.am Makefile.in
18960 -
18961 +all: all-am
18962  
18963 -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
18964 -
18965 -TAR = gtar
18966 -GZIP_ENV = --best
18967 -all: all-redirect
18968  .SUFFIXES:
18969  $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
18970 -       cd $(top_srcdir) && $(AUTOMAKE) --cygnus include/Makefile
18971 +       cd $(top_srcdir) && \
18972 +         $(AUTOMAKE) --cygnus  include/Makefile
18973 +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
18974 +       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
18975  
18976 -Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
18977 -       cd $(top_builddir) \
18978 -         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
18979 +mostlyclean-libtool:
18980 +       -rm -f *.lo
18981  
18982 +clean-libtool:
18983 +       -rm -rf .libs _libs
18984 +
18985 +distclean-libtool:
18986 +       -rm -f libtool
18987 +uninstall-info-am:
18988 +
18989 +ETAGS = etags
18990 +ETAGSFLAGS =
18991  
18992  tags: TAGS
18993  
18994 -ID: $(HEADERS) $(SOURCES) $(LISP)
18995 -       list='$(SOURCES) $(HEADERS)'; \
18996 -       unique=`for i in $$list; do echo $$i; done | \
18997 -         awk '    { files[$$0] = 1; } \
18998 +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
18999 +       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
19000 +       unique=`for i in $$list; do \
19001 +           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
19002 +         done | \
19003 +         $(AWK) '    { files[$$0] = 1; } \
19004                END { for (i in files) print i; }'`; \
19005 -       here=`pwd` && cd $(srcdir) \
19006 -         && mkid -f$$here/ID $$unique $(LISP)
19007 +       mkid -fID $$unique
19008  
19009 -TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
19010 +TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
19011 +               $(TAGS_FILES) $(LISP)
19012         tags=; \
19013         here=`pwd`; \
19014 -       list='$(SOURCES) $(HEADERS)'; \
19015 -       unique=`for i in $$list; do echo $$i; done | \
19016 -         awk '    { files[$$0] = 1; } \
19017 +       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
19018 +       unique=`for i in $$list; do \
19019 +           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
19020 +         done | \
19021 +         $(AWK) '    { files[$$0] = 1; } \
19022                END { for (i in files) print i; }'`; \
19023 -       test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
19024 -         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
19025 -
19026 -mostlyclean-tags:
19027 -
19028 -clean-tags:
19029 +       test -z "$(ETAGS_ARGS)$$tags$$unique" \
19030 +         || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
19031 +            $$tags $$unique
19032 +
19033 +GTAGS:
19034 +       here=`$(am__cd) $(top_builddir) && pwd` \
19035 +         && cd $(top_srcdir) \
19036 +         && gtags -i $(GTAGS_ARGS) $$here
19037  
19038  distclean-tags:
19039 -       -rm -f TAGS ID
19040 -
19041 -maintainer-clean-tags:
19042 -
19043 -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
19044 -
19045 -subdir = include
19046 -
19047 -distdir: $(DISTFILES)
19048 -       @for file in $(DISTFILES); do \
19049 -         if test -f $$file; then d=.; else d=$(srcdir); fi; \
19050 -         if test -d $$d/$$file; then \
19051 -           cp -pr $$d/$$file $(distdir)/$$file; \
19052 -         else \
19053 -           test -f $(distdir)/$$file \
19054 -           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
19055 -           || cp -p $$d/$$file $(distdir)/$$file || :; \
19056 -         fi; \
19057 -       done
19058 -info-am:
19059 -info: info-am
19060 -dvi-am:
19061 -dvi: dvi-am
19062 +       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
19063  check-am:
19064  check: check-am
19065 -installcheck-am:
19066 -installcheck: installcheck-am
19067 -install-info-am: 
19068 -install-info: install-info-am
19069 -install-exec-am:
19070 -install-exec: install-exec-am
19071 +all-am: Makefile $(HEADERS)
19072  
19073 -install-data-am:
19074 -install-data: install-data-am
19075 +installdirs:
19076  
19077 -install-am: all-am
19078 -       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
19079  install: install-am
19080 -uninstall-am:
19081 +install-exec: install-exec-am
19082 +install-data: install-data-am
19083  uninstall: uninstall-am
19084 -all-am: Makefile $(HEADERS)
19085 -all-redirect: all-am
19086 -install-strip:
19087 -       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
19088 -installdirs:
19089  
19090 +install-am: all-am
19091 +       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
19092  
19093 +installcheck: installcheck-am
19094 +install-strip:
19095 +       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
19096 +         INSTALL_STRIP_FLAG=-s \
19097 +         `test -z '$(STRIP)' || \
19098 +           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
19099  mostlyclean-generic:
19100  
19101  clean-generic:
19102  
19103  distclean-generic:
19104         -rm -f Makefile $(CONFIG_CLEAN_FILES)
19105 -       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
19106  
19107  maintainer-clean-generic:
19108 -mostlyclean-am:  mostlyclean-tags mostlyclean-generic
19109 +       @echo "This command is intended for maintainers to use"
19110 +       @echo "it deletes files that may require special tools to rebuild."
19111 +clean: clean-am
19112  
19113 -mostlyclean: mostlyclean-am
19114 +clean-am: clean-generic clean-libtool mostlyclean-am
19115  
19116 -clean-am:  clean-tags clean-generic mostlyclean-am
19117 +distclean: distclean-am
19118  
19119 -clean: clean-am
19120 +distclean-am: clean-am distclean-generic distclean-libtool \
19121 +       distclean-tags
19122  
19123 -distclean-am:  distclean-tags distclean-generic clean-am
19124 -       -rm -f libtool
19125 +dvi: dvi-am
19126  
19127 -distclean: distclean-am
19128 +dvi-am:
19129  
19130 -maintainer-clean-am:  maintainer-clean-tags maintainer-clean-generic \
19131 -               distclean-am
19132 -       @echo "This command is intended for maintainers to use;"
19133 -       @echo "it deletes files that may require special tools to rebuild."
19134 +info: info-am
19135 +
19136 +info-am:
19137 +
19138 +install-data-am:
19139 +
19140 +install-exec-am:
19141 +
19142 +install-info:
19143 +
19144 +install-man:
19145 +
19146 +installcheck-am:
19147  
19148  maintainer-clean: maintainer-clean-am
19149  
19150 -.PHONY: tags mostlyclean-tags distclean-tags clean-tags \
19151 -maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \
19152 -installcheck-am installcheck install-info-am install-info \
19153 -install-exec-am install-exec install-data-am install-data install-am \
19154 -install uninstall-am uninstall all-redirect all-am all installdirs \
19155 -mostlyclean-generic distclean-generic clean-generic \
19156 -maintainer-clean-generic clean mostlyclean distclean maintainer-clean
19157 +maintainer-clean-am: distclean-am maintainer-clean-generic
19158 +
19159 +mostlyclean: mostlyclean-am
19160 +
19161 +mostlyclean-am: mostlyclean-generic mostlyclean-libtool
19162 +
19163 +uninstall-am:
19164  
19165 +.PHONY: GTAGS all all-am check check-am clean clean-generic \
19166 +       clean-libtool distclean distclean-generic distclean-libtool \
19167 +       distclean-tags dvi dvi-am info info-am install install-am \
19168 +       install-data install-data-am install-exec install-exec-am \
19169 +       install-info install-info-am install-man install-strip \
19170 +       installcheck installcheck-am installdirs maintainer-clean \
19171 +       maintainer-clean-generic mostlyclean mostlyclean-generic \
19172 +       mostlyclean-libtool tags uninstall uninstall-am \
19173 +       uninstall-info-am
19174  
19175  # Tell versions [3.59,3.63) of GNU make to not export all variables.
19176  # Otherwise a system limit (for SysV at least) may be exceeded.
19177 diff -buNr boehm-gc/include/gc.h boehm-gc/include/gc.h
19178 --- boehm-gc/include/gc.h       Mon Feb 11 20:37:56 2002
19179 +++ boehm-gc/include/gc.h       Sat Sep 13 01:32:42 2003
19180 @@ -30,91 +30,7 @@
19181  
19182  # define _GC_H
19183  
19184 -/*
19185 - * Some tests for old macros.  These violate our namespace rules and will
19186 - * disappear shortly.  Use the GC_ names.
19187 - */
19188 -#if defined(SOLARIS_THREADS) || defined(_SOLARIS_THREADS)
19189 -# define GC_SOLARIS_THREADS
19190 -#endif
19191 -#if defined(_SOLARIS_PTHREADS)
19192 -# define GC_SOLARIS_PTHREADS
19193 -#endif
19194 -#if defined(IRIX_THREADS)
19195 -# define GC_IRIX_THREADS
19196 -#endif
19197 -#if defined(HPUX_THREADS)
19198 -# define GC_HPUX_THREADS
19199 -#endif
19200 -#if defined(OSF1_THREADS)
19201 -# define GC_OSF1_THREADS
19202 -#endif
19203 -#if defined(LINUX_THREADS)
19204 -# define GC_LINUX_THREADS
19205 -#endif
19206 -#if defined(WIN32_THREADS)
19207 -# define GC_WIN32_THREADS
19208 -#endif
19209 -#if defined(USE_LD_WRAP)
19210 -# define GC_USE_LD_WRAP
19211 -#endif
19212 -
19213 -#if !defined(_REENTRANT) && (defined(GC_SOLARIS_THREADS) \
19214 -                            || defined(GC_SOLARIS_PTHREADS) \
19215 -                            || defined(GC_HPUX_THREADS) \
19216 -                            || defined(GC_LINUX_THREADS))
19217 -# define _REENTRANT
19218 -       /* Better late than never.  This fails if system headers that   */
19219 -       /* depend on this were previously included.                     */
19220 -#endif
19221 -
19222 -#if defined(GC_SOLARIS_PTHREADS) && !defined(GC_SOLARIS_THREADS)
19223 -#   define GC_SOLARIS_THREADS
19224 -#endif
19225 -
19226 -# if defined(GC_SOLARIS_PTHREADS) || defined(GC_FREEBSD_THREADS) || \
19227 -       defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) || \
19228 -       defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS)
19229 -#   define GC_PTHREADS
19230 -# endif
19231 -
19232 -# define __GC
19233 -# include <stddef.h>
19234 -# ifdef _WIN32_WCE
19235 -/* Yet more kluges for WinCE */
19236 -#   include <stdlib.h>         /* size_t is defined here */
19237 -    typedef long ptrdiff_t;    /* ptrdiff_t is not defined */
19238 -# endif
19239 -
19240 -#if defined(__MINGW32__) &&defined(_DLL) && !defined(GC_NOT_DLL)
19241 -# ifdef GC_BUILD
19242 -#   define GC_API __declspec(dllexport)
19243 -# else
19244 -#   define GC_API __declspec(dllimport)
19245 -# endif
19246 -#endif
19247 -
19248 -#if (defined(__DMC__) || defined(_MSC_VER)) \
19249 -               && (defined(_DLL) && !defined(GC_NOT_DLL) \
19250 -                   || defined(GC_DLL))
19251 -# ifdef GC_BUILD
19252 -#   define GC_API extern __declspec(dllexport)
19253 -# else
19254 -#   define GC_API __declspec(dllimport)
19255 -# endif
19256 -#endif
19257 -
19258 -#if defined(__WATCOMC__) && defined(GC_DLL)
19259 -# ifdef GC_BUILD
19260 -#   define GC_API extern __declspec(dllexport)
19261 -# else
19262 -#   define GC_API extern __declspec(dllimport)
19263 -# endif
19264 -#endif
19265 -
19266 -#ifndef GC_API
19267 -#define GC_API extern
19268 -#endif
19269 +# include "gc_config_macros.h"
19270  
19271  # if defined(__STDC__) || defined(__cplusplus)
19272  #   define GC_PROTO(args) args
19273 @@ -154,7 +70,7 @@
19274                         /*  Env variable GC_NPROC is set to > 1, or     */
19275                         /*  GC_NPROC is not set and this is an MP.      */
19276                         /* If GC_parallel is set, incremental           */
19277 -                       /* collection is aonly partially functional,    */
19278 +                       /* collection is only partially functional,     */
19279                         /* and may not be desirable.                    */
19280                         
19281  
19282 @@ -215,8 +131,14 @@
19283                         /* thread, which will call GC_invoke_finalizers */
19284                         /* in response.                                 */
19285  
19286 -GC_API int GC_dont_gc; /* Dont collect unless explicitly requested, e.g. */
19287 -                       /* because it's not safe.                         */
19288 +GC_API int GC_dont_gc; /* != 0 ==> Dont collect.  In versions 7.2a1+,  */
19289 +                       /* this overrides explicit GC_gcollect() calls. */
19290 +                       /* Used as a counter, so that nested enabling   */
19291 +                       /* and disabling work correctly.  Should        */
19292 +                       /* normally be updated with GC_enable() and     */
19293 +                       /* GC_disable() calls.                          */
19294 +                       /* Direct assignment to GC_dont_gc is           */
19295 +                       /* deprecated.                                  */
19296  
19297  GC_API int GC_dont_expand;
19298                         /* Dont expand heap unless explicitly requested */
19299 @@ -296,15 +218,6 @@
19300                                 /* Interferes with blacklisting.        */
19301                                 /* Wizards only.                        */
19302  
19303 -/* Public procedures */
19304 -
19305 -/* Initialize the collector.  This is only required when using thread-local
19306 - * allocation, since unlike the regular allocation routines, GC_local_malloc
19307 - * is not self-initializing.  If you use GC_local_malloc you should arrange
19308 - * to call this somehow (e.g. from a constructor) before doing any allocation.
19309 - */
19310 -GC_API void GC_init GC_PROTO((void));
19311 -
19312  GC_API unsigned long GC_time_limit;
19313                                 /* If incremental collection is enabled, */
19314                                 /* We try to terminate collections       */
19315 @@ -316,9 +229,18 @@
19316                                 /* enabled.                              */
19317  #      define GC_TIME_UNLIMITED 999999
19318                                 /* Setting GC_time_limit to this value   */
19319 -                               /* will disable the "pause time exceeded */
19320 +                               /* will disable the "pause time exceeded"*/
19321                                 /* tests.                                */
19322  
19323 +/* Public procedures */
19324 +
19325 +/* Initialize the collector.  This is only required when using thread-local
19326 + * allocation, since unlike the regular allocation routines, GC_local_malloc
19327 + * is not self-initializing.  If you use GC_local_malloc you should arrange
19328 + * to call this somehow (e.g. from a constructor) before doing any allocation.
19329 + */
19330 +GC_API void GC_init GC_PROTO((void));
19331 +
19332  /*
19333   * general purpose allocation routines, with roughly malloc calling conv.
19334   * The atomic versions promise that no relevant pointers are contained
19335 @@ -419,17 +341,21 @@
19336  GC_API void GC_add_roots GC_PROTO((char * low_address,
19337                                    char * high_address_plus_1));
19338  
19339 +/* Remove a root segment.  Wizards only. */
19340 +GC_API void GC_remove_roots GC_PROTO((char * low_address, 
19341 +    char * high_address_plus_1));
19342 +
19343  /* Add a displacement to the set of those considered valid by the      */
19344  /* collector.  GC_register_displacement(n) means that if p was returned */
19345  /* by GC_malloc, then (char *)p + n will be considered to be a valid   */
19346 -/* pointer to n.  N must be small and less than the size of p.         */
19347 +/* pointer to p.  N must be small and less than the size of p.         */
19348  /* (All pointers to the interior of objects from the stack are         */
19349  /* considered valid in any case.  This applies to heap objects and     */
19350  /* static data.)                                                       */
19351  /* Preferably, this should be called before any other GC procedures.   */
19352  /* Calling it later adds to the probability of excess memory           */
19353  /* retention.                                                          */
19354 -/* This is a no-op if the collector was compiled with recognition of   */
19355 +/* This is a no-op if the collector has recognition of                 */
19356  /* arbitrary interior pointers enabled, which is now the default.      */
19357  GC_API void GC_register_displacement GC_PROTO((GC_word n));
19358  
19359 @@ -464,9 +390,18 @@
19360  GC_API size_t GC_get_bytes_since_gc GC_PROTO((void));
19361  
19362  /* Return the total number of bytes allocated in this process.         */
19363 -/* Never decreases.                                                    */
19364 +/* Never decreases, except due to wrapping.                            */
19365  GC_API size_t GC_get_total_bytes GC_PROTO((void));
19366  
19367 +/* Disable garbage collection.  Even GC_gcollect calls will be                 */
19368 +/* ineffective.                                                                */
19369 +GC_API void GC_disable GC_PROTO((void));
19370 +
19371 +/* Reenable garbage collection.  GC_diable() and GC_enable() calls     */
19372 +/* nest.  Garbage collection is enabled if the number of calls to both */
19373 +/* both functions is equal.                                            */
19374 +GC_API void GC_enable GC_PROTO((void));
19375 +
19376  /* Enable incremental/generational collection. */
19377  /* Not advisable unless dirty bits are                 */
19378  /* available or most heap objects are          */
19379 @@ -474,7 +409,11 @@
19380  /* Don't use in leak finding mode.             */
19381  /* Ignored if GC_dont_gc is true.              */
19382  /* Only the generational piece of this is      */
19383 -/* functional if GC_parallel is TRUE.          */
19384 +/* functional if GC_parallel is TRUE           */
19385 +/* or if GC_time_limit is GC_TIME_UNLIMITED.   */
19386 +/* Causes GC_local_gcj_malloc() to revert to   */
19387 +/* locked allocation.  Must be called          */
19388 +/* before any GC_local_gcj_malloc() calls.     */
19389  GC_API void GC_enable_incremental GC_PROTO((void));
19390  
19391  /* Does incremental mode write-protect pages?  Returns zero or */
19392 @@ -518,6 +457,42 @@
19393  #   define GC_RETURN_ADDR (GC_word)__return_address
19394  #endif
19395  
19396 +#ifdef __linux__
19397 +# include <features.h>
19398 +# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
19399 +     && !defined(__ia64__)
19400 +#   define GC_HAVE_BUILTIN_BACKTRACE
19401 +#   define GC_CAN_SAVE_CALL_STACKS
19402 +# endif
19403 +# if defined(__i386__) || defined(__x86_64__)
19404 +#   define GC_CAN_SAVE_CALL_STACKS
19405 +# endif
19406 +#endif
19407 +
19408 +#if defined(__sparc__)
19409 +#   define GC_CAN_SAVE_CALL_STACKS
19410 +#endif
19411 +
19412 +/* If we're on an a platform on which we can't save call stacks, but   */
19413 +/* gcc is normally used, we go ahead and define GC_ADD_CALLER.         */
19414 +/* We make this decision independent of whether gcc is actually being  */
19415 +/* used, in order to keep the interface consistent, and allow mixing   */
19416 +/* of compilers.                                                       */
19417 +/* This may also be desirable if it is possible but expensive to       */
19418 +/* retrieve the call chain.                                            */
19419 +#if (defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) \
19420 +     || defined(__FreeBSD__)) & !defined(GC_CAN_SAVE_CALL_STACKS)
19421 +# define GC_ADD_CALLER
19422 +# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) 
19423 +    /* gcc knows how to retrieve return address, but we don't know */
19424 +    /* how to generate call stacks.                               */
19425 +#   define GC_RETURN_ADDR (GC_word)__builtin_return_address(0)
19426 +# else
19427 +    /* Just pass 0 for gcc compatibility. */
19428 +#   define GC_RETURN_ADDR 0
19429 +# endif
19430 +#endif
19431 +
19432  #ifdef GC_ADD_CALLER
19433  #  define GC_EXTRAS GC_RETURN_ADDR, __FILE__, __LINE__
19434  #  define GC_EXTRA_PARAMS GC_word ra, GC_CONST char * s, int i
19435 @@ -536,18 +511,42 @@
19436         GC_PROTO((size_t size_in_bytes, GC_EXTRA_PARAMS));
19437  GC_API GC_PTR GC_debug_malloc_stubborn
19438         GC_PROTO((size_t size_in_bytes, GC_EXTRA_PARAMS));
19439 +GC_API GC_PTR GC_debug_malloc_ignore_off_page
19440 +       GC_PROTO((size_t size_in_bytes, GC_EXTRA_PARAMS));
19441 +GC_API GC_PTR GC_debug_malloc_atomic_ignore_off_page
19442 +       GC_PROTO((size_t size_in_bytes, GC_EXTRA_PARAMS));
19443  GC_API void GC_debug_free GC_PROTO((GC_PTR object_addr));
19444  GC_API GC_PTR GC_debug_realloc
19445         GC_PROTO((GC_PTR old_object, size_t new_size_in_bytes,
19446                   GC_EXTRA_PARAMS));
19447 -                                
19448  GC_API void GC_debug_change_stubborn GC_PROTO((GC_PTR));
19449  GC_API void GC_debug_end_stubborn_change GC_PROTO((GC_PTR));
19450 +
19451 +/* Routines that allocate objects with debug information (like the     */
19452 +/* above), but just fill in dummy file and line number information.    */
19453 +/* Thus they can serve as drop-in malloc/realloc replacements.  This   */
19454 +/* can be useful for two reasons:                                      */
19455 +/* 1) It allows the collector to be built with DBG_HDRS_ALL defined    */
19456 +/*    even if some allocation calls come from 3rd party libraries      */
19457 +/*    that can't be recompiled.                                                */
19458 +/* 2) On some platforms, the file and line information is redundant,   */
19459 +/*    since it can be reconstructed from a stack trace.  On such       */
19460 +/*    platforms it may be more convenient not to recompile, e.g. for   */
19461 +/*    leak detection.  This can be accomplished by instructing the     */
19462 +/*    linker to replace malloc/realloc with these.                     */
19463 +GC_API GC_PTR GC_debug_malloc_replacement GC_PROTO((size_t size_in_bytes));
19464 +GC_API GC_PTR GC_debug_realloc_replacement
19465 +             GC_PROTO((GC_PTR object_addr, size_t size_in_bytes));
19466 +                                
19467  # ifdef GC_DEBUG
19468  #   define GC_MALLOC(sz) GC_debug_malloc(sz, GC_EXTRAS)
19469  #   define GC_MALLOC_ATOMIC(sz) GC_debug_malloc_atomic(sz, GC_EXTRAS)
19470 -#   define GC_MALLOC_UNCOLLECTABLE(sz) GC_debug_malloc_uncollectable(sz, \
19471 -                                                       GC_EXTRAS)
19472 +#   define GC_MALLOC_UNCOLLECTABLE(sz) \
19473 +                       GC_debug_malloc_uncollectable(sz, GC_EXTRAS)
19474 +#   define GC_MALLOC_IGNORE_OFF_PAGE(sz) \
19475 +                       GC_debug_malloc_ignore_off_page(sz, GC_EXTRAS)
19476 +#   define GC_MALLOC_ATOMIC_IGNORE_OFF_PAGE(sz) \
19477 +                       GC_debug_malloc_atomic_ignore_off_page(sz, GC_EXTRAS)
19478  #   define GC_REALLOC(old, sz) GC_debug_realloc(old, sz, GC_EXTRAS)
19479  #   define GC_FREE(p) GC_debug_free(p)
19480  #   define GC_REGISTER_FINALIZER(p, f, d, of, od) \
19481 @@ -566,6 +565,10 @@
19482  #   define GC_MALLOC(sz) GC_malloc(sz)
19483  #   define GC_MALLOC_ATOMIC(sz) GC_malloc_atomic(sz)
19484  #   define GC_MALLOC_UNCOLLECTABLE(sz) GC_malloc_uncollectable(sz)
19485 +#   define GC_MALLOC_IGNORE_OFF_PAGE(sz) \
19486 +                       GC_malloc_ignore_off_page(sz)
19487 +#   define GC_MALLOC_ATOMIC_IGNORE_OFF_PAGE(sz) \
19488 +                       GC_malloc_atomic_ignore_off_page(sz)
19489  #   define GC_REALLOC(old, sz) GC_realloc(old, sz)
19490  #   define GC_FREE(p) GC_free(p)
19491  #   define GC_REGISTER_FINALIZER(p, f, d, of, od) \
19492 @@ -644,7 +647,8 @@
19493  /* itself.  There is a stylistic argument that this is wrong,  */
19494  /* but it's unavoidable for C++, since the compiler may                */
19495  /* silently introduce these.  It's also benign in that specific        */
19496 -/* case.                                                       */
19497 +/* case.  And it helps if finalizable objects are split to     */
19498 +/* avoid cycles.                                               */
19499  /* Note that cd will still be viewed as accessible, even if it */
19500  /* refers to the object itself.                                        */
19501  GC_API void GC_register_finalizer_ignore_self
19502 @@ -717,11 +721,6 @@
19503         /* Undoes a registration by either of the above two     */
19504         /* routines.                                            */
19505  
19506 -/* Auxiliary fns to make finalization work correctly with displaced    */
19507 -/* pointers introduced by the debugging allocators.                    */
19508 -GC_API GC_PTR GC_make_closure GC_PROTO((GC_finalization_proc fn, GC_PTR data));
19509 -GC_API void GC_debug_invoke_finalizer GC_PROTO((GC_PTR obj, GC_PTR data));
19510 -
19511  /* Returns !=0  if GC_invoke_finalizers has something to do.           */
19512  GC_API int GC_should_invoke_finalizers GC_PROTO((void));
19513  
19514 @@ -739,6 +738,10 @@
19515  GC_API GC_warn_proc GC_set_warn_proc GC_PROTO((GC_warn_proc p));
19516      /* Returns old warning procedure.  */
19517         
19518 +GC_API GC_word GC_set_free_space_divisor GC_PROTO((GC_word value));
19519 +    /* Set free_space_divisor.  See above for definition.      */
19520 +    /* Returns old value.                                      */
19521 +       
19522  /* The following is intended to be used by a higher level      */
19523  /* (e.g. Java-like) finalization facility.  It is expected     */
19524  /* that finalization code will arrange for hidden pointers to  */
19525 @@ -875,12 +878,16 @@
19526  
19527  #if defined(GC_WIN32_THREADS)
19528  # include <windows.h>
19529 +# include <winbase.h>
19530  
19531    /*
19532     * All threads must be created using GC_CreateThread, so that they will be
19533 -   * recorded in the thread table.
19534 +   * recorded in the thread table.  For backwards compatibility, this is not
19535 +   * technically true if the GC is built as a dynamic library, since it can
19536 +   * and does then use DllMain to keep track of thread creations.  But new code
19537 +   * should be built to call GC_CreateThread.
19538     */
19539 -  HANDLE WINAPI GC_CreateThread(
19540 +  GC_API HANDLE GC_CreateThread(
19541        LPSECURITY_ATTRIBUTES lpThreadAttributes,
19542        DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
19543        LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId );
19544 @@ -914,13 +921,18 @@
19545  #   define GC_INIT() { extern end, etext; \
19546                        GC_noop(&end, &etext); }
19547  #else
19548 -# if (defined(__CYGWIN32__) && defined(GC_USE_DLL)) || defined (_AIX)
19549 +# if defined(__CYGWIN32__) && defined(GC_DLL) || defined (_AIX)
19550      /*
19551 -     * Similarly gnu-win32 DLLs need explicit initialization
19552 +     * Similarly gnu-win32 DLLs need explicit initialization from
19553 +     * the main program, as does AIX.
19554       */
19555  #   define GC_INIT() { GC_add_roots(DATASTART, DATAEND); }
19556  # else
19557 +#  if defined(__APPLE__) && defined(__MACH__)
19558 +#   define GC_INIT() { GC_init(); }
19559 +#  else
19560  #   define GC_INIT()
19561 +#  endif
19562  # endif
19563  #endif
19564  
19565 diff -buNr boehm-gc/include/gc_allocator.h boehm-gc/include/gc_allocator.h
19566 --- boehm-gc/include/gc_allocator.h     Wed Dec 31 16:00:00 1969
19567 +++ boehm-gc/include/gc_allocator.h     Sat Sep 13 01:32:42 2003
19568 @@ -0,0 +1,232 @@
19569 +/*
19570 + * Copyright (c) 1996-1997
19571 + * Silicon Graphics Computer Systems, Inc.
19572 + *
19573 + * Permission to use, copy, modify, distribute and sell this software
19574 + * and its documentation for any purpose is hereby granted without fee,
19575 + * provided that the above copyright notice appear in all copies and
19576 + * that both that copyright notice and this permission notice appear
19577 + * in supporting documentation.  Silicon Graphics makes no
19578 + * representations about the suitability of this software for any
19579 + * purpose.  It is provided "as is" without express or implied warranty.
19580 + *
19581 + * Copyright (c) 2002
19582 + * Hewlett-Packard Company
19583 + *
19584 + * Permission to use, copy, modify, distribute and sell this software
19585 + * and its documentation for any purpose is hereby granted without fee,
19586 + * provided that the above copyright notice appear in all copies and
19587 + * that both that copyright notice and this permission notice appear
19588 + * in supporting documentation.  Hewlett-Packard Company makes no
19589 + * representations about the suitability of this software for any
19590 + * purpose.  It is provided "as is" without express or implied warranty.
19591 + */
19592 +
19593 +/*
19594 + * This implements standard-conforming allocators that interact with
19595 + * the garbage collector.  Gc_alloctor<T> allocates garbage-collectable
19596 + * objects of type T.  Traceable_allocator<T> allocates objects that
19597 + * are not temselves garbage collected, but are scanned by the
19598 + * collector for pointers to collectable objects.  Traceable_alloc
19599 + * should be used for explicitly managed STL containers that may
19600 + * point to collectable objects.
19601 + *
19602 + * This code was derived from an earlier version of the GNU C++ standard
19603 + * library, which itself was derived from the SGI STL implementation.
19604 + */
19605 +
19606 +#include "gc.h"        // For size_t
19607 +
19608 +/* First some helpers to allow us to dispatch on whether or not a type
19609 + * is known to be pointerfree.
19610 + * These are private, except that the client may invoke the
19611 + * GC_DECLARE_PTRFREE macro.
19612 + */
19613 +
19614 +struct GC_true_type {};
19615 +struct GC_false_type {};
19616 +
19617 +template <class GC_tp>
19618 +struct GC_type_traits {
19619 +  GC_false_type GC_is_ptr_free;
19620 +};
19621 +
19622 +# define GC_DECLARE_PTRFREE(T) \
19623 +template<> struct GC_type_traits<T> { GC_true_type GC_is_ptr_free; }
19624 +
19625 +GC_DECLARE_PTRFREE(signed char);
19626 +GC_DECLARE_PTRFREE(unsigned char);
19627 +GC_DECLARE_PTRFREE(signed short);
19628 +GC_DECLARE_PTRFREE(unsigned short);
19629 +GC_DECLARE_PTRFREE(signed int);
19630 +GC_DECLARE_PTRFREE(unsigned int);
19631 +GC_DECLARE_PTRFREE(signed long);
19632 +GC_DECLARE_PTRFREE(unsigned long);
19633 +GC_DECLARE_PTRFREE(float);
19634 +GC_DECLARE_PTRFREE(double);
19635 +/* The client may want to add others.  */
19636 +
19637 +// In the following GC_Tp is GC_true_type iff we are allocating a
19638 +// pointerfree object.
19639 +template <class GC_Tp>
19640 +inline void * GC_selective_alloc(size_t n, GC_Tp) {
19641 +    return GC_MALLOC(n);
19642 +}
19643 +
19644 +template <>
19645 +inline void * GC_selective_alloc<GC_true_type>(size_t n, GC_true_type) {
19646 +    return GC_MALLOC_ATOMIC(n);
19647 +}
19648 +
19649 +/* Now the public gc_allocator<T> class:
19650 + */
19651 +template <class GC_Tp>
19652 +class gc_allocator {
19653 +public:
19654 +  typedef size_t     size_type;
19655 +  typedef ptrdiff_t  difference_type;
19656 +  typedef GC_Tp*       pointer;
19657 +  typedef const GC_Tp* const_pointer;
19658 +  typedef GC_Tp&       reference;
19659 +  typedef const GC_Tp& const_reference;
19660 +  typedef GC_Tp        value_type;
19661 +
19662 +  template <class GC_Tp1> struct rebind {
19663 +    typedef gc_allocator<GC_Tp1> other;
19664 +  };
19665 +
19666 +  gc_allocator()  {}
19667 +# ifndef _MSC_VER
19668 +    // I'm not sure why this is needed here in addition to the following.
19669 +    // The standard specifies it for the standard allocator, but VC++ rejects
19670 +    // it.     -HB
19671 +    gc_allocator(const gc_allocator&) throw() {}
19672 +# endif
19673 +  template <class GC_Tp1> gc_allocator(const gc_allocator<GC_Tp1>&) throw() {}
19674 +  ~gc_allocator() throw() {}
19675 +
19676 +  pointer address(reference GC_x) const { return &GC_x; }
19677 +  const_pointer address(const_reference GC_x) const { return &GC_x; }
19678 +
19679 +  // GC_n is permitted to be 0.  The C++ standard says nothing about what
19680 +  // the return value is when GC_n == 0.
19681 +  GC_Tp* allocate(size_type GC_n, const void* = 0) {
19682 +    GC_type_traits<GC_Tp> traits;
19683 +    return static_cast<GC_Tp *>
19684 +           (GC_selective_alloc(GC_n * sizeof(GC_Tp),
19685 +                               traits.GC_is_ptr_free));
19686 +  }
19687 +
19688 +  // __p is not permitted to be a null pointer.
19689 +  void deallocate(pointer __p, size_type GC_n)
19690 +    { GC_FREE(__p); }
19691 +
19692 +  size_type max_size() const throw()
19693 +    { return size_t(-1) / sizeof(GC_Tp); }
19694 +
19695 +  void construct(pointer __p, const GC_Tp& __val) { new(__p) GC_Tp(__val); }
19696 +  void destroy(pointer __p) { __p->~GC_Tp(); }
19697 +};
19698 +
19699 +template<>
19700 +class gc_allocator<void> {
19701 +  typedef size_t      size_type;
19702 +  typedef ptrdiff_t   difference_type;
19703 +  typedef void*       pointer;
19704 +  typedef const void* const_pointer;
19705 +  typedef void        value_type;
19706 +
19707 +  template <class GC_Tp1> struct rebind {
19708 +    typedef gc_allocator<GC_Tp1> other;
19709 +  };
19710 +};
19711 +
19712 +
19713 +template <class GC_T1, class GC_T2>
19714 +inline bool operator==(const gc_allocator<GC_T1>&, const gc_allocator<GC_T2>&)
19715 +{
19716 +  return true;
19717 +}
19718 +
19719 +template <class GC_T1, class GC_T2>
19720 +inline bool operator!=(const gc_allocator<GC_T1>&, const gc_allocator<GC_T2>&)
19721 +{
19722 +  return false;
19723 +}
19724 +
19725 +/*
19726 + * And the public traceable_allocator class.
19727 + */
19728 +
19729 +// Note that we currently don't specialize the pointer-free case, since a
19730 +// pointer-free traceable container doesn't make that much sense,
19731 +// though it could become an issue due to abstraction boundaries.
19732 +template <class GC_Tp>
19733 +class traceable_allocator {
19734 +public:
19735 +  typedef size_t     size_type;
19736 +  typedef ptrdiff_t  difference_type;
19737 +  typedef GC_Tp*       pointer;
19738 +  typedef const GC_Tp* const_pointer;
19739 +  typedef GC_Tp&       reference;
19740 +  typedef const GC_Tp& const_reference;
19741 +  typedef GC_Tp        value_type;
19742 +
19743 +  template <class GC_Tp1> struct rebind {
19744 +    typedef traceable_allocator<GC_Tp1> other;
19745 +  };
19746 +
19747 +  traceable_allocator() throw() {}
19748 +# ifndef _MSC_VER
19749 +    traceable_allocator(const traceable_allocator&) throw() {}
19750 +# endif
19751 +  template <class GC_Tp1> traceable_allocator
19752 +         (const traceable_allocator<GC_Tp1>&) throw() {}
19753 +  ~traceable_allocator() throw() {}
19754 +
19755 +  pointer address(reference GC_x) const { return &GC_x; }
19756 +  const_pointer address(const_reference GC_x) const { return &GC_x; }
19757 +
19758 +  // GC_n is permitted to be 0.  The C++ standard says nothing about what
19759 +  // the return value is when GC_n == 0.
19760 +  GC_Tp* allocate(size_type GC_n, const void* = 0) {
19761 +    return static_cast<GC_Tp*>(GC_MALLOC_UNCOLLECTABLE(GC_n * sizeof(GC_Tp)));
19762 +  }
19763 +
19764 +  // __p is not permitted to be a null pointer.
19765 +  void deallocate(pointer __p, size_type GC_n)
19766 +    { GC_FREE(__p); }
19767 +
19768 +  size_type max_size() const throw()
19769 +    { return size_t(-1) / sizeof(GC_Tp); }
19770 +
19771 +  void construct(pointer __p, const GC_Tp& __val) { new(__p) GC_Tp(__val); }
19772 +  void destroy(pointer __p) { __p->~GC_Tp(); }
19773 +};
19774 +
19775 +template<>
19776 +class traceable_allocator<void> {
19777 +  typedef size_t      size_type;
19778 +  typedef ptrdiff_t   difference_type;
19779 +  typedef void*       pointer;
19780 +  typedef const void* const_pointer;
19781 +  typedef void        value_type;
19782 +
19783 +  template <class GC_Tp1> struct rebind {
19784 +    typedef traceable_allocator<GC_Tp1> other;
19785 +  };
19786 +};
19787 +
19788 +
19789 +template <class GC_T1, class GC_T2>
19790 +inline bool operator==(const traceable_allocator<GC_T1>&, const traceable_allocator<GC_T2>&)
19791 +{
19792 +  return true;
19793 +}
19794 +
19795 +template <class GC_T1, class GC_T2>
19796 +inline bool operator!=(const traceable_allocator<GC_T1>&, const traceable_allocator<GC_T2>&)
19797 +{
19798 +  return false;
19799 +}
19800 +
19801 diff -buNr boehm-gc/include/gc_config_macros.h boehm-gc/include/gc_config_macros.h
19802 --- boehm-gc/include/gc_config_macros.h Wed Dec 31 16:00:00 1969
19803 +++ boehm-gc/include/gc_config_macros.h Sat Sep 13 01:32:42 2003
19804 @@ -0,0 +1,142 @@
19805 +/*
19806 + * This should never be included directly.  It is included only from gc.h.
19807 + * We separate it only to make gc.h more suitable as documentation.
19808 + * 
19809 + * Some tests for old macros.  These violate our namespace rules and will
19810 + * disappear shortly.  Use the GC_ names.
19811 + */
19812 +#if defined(SOLARIS_THREADS) || defined(_SOLARIS_THREADS)
19813 +# define GC_SOLARIS_THREADS
19814 +#endif
19815 +#if defined(_SOLARIS_PTHREADS)
19816 +# define GC_SOLARIS_PTHREADS
19817 +#endif
19818 +#if defined(IRIX_THREADS)
19819 +# define GC_IRIX_THREADS
19820 +#endif
19821 +#if defined(DGUX_THREADS)
19822 +# if !defined(GC_DGUX386_THREADS)
19823 +#  define GC_DGUX386_THREADS
19824 +# endif
19825 +#endif
19826 +#if defined(HPUX_THREADS)
19827 +# define GC_HPUX_THREADS
19828 +#endif
19829 +#if defined(OSF1_THREADS)
19830 +# define GC_OSF1_THREADS
19831 +#endif
19832 +#if defined(LINUX_THREADS)
19833 +# define GC_LINUX_THREADS
19834 +#endif
19835 +#if defined(WIN32_THREADS)
19836 +# define GC_WIN32_THREADS
19837 +#endif
19838 +#if defined(USE_LD_WRAP)
19839 +# define GC_USE_LD_WRAP
19840 +#endif
19841 +
19842 +#if !defined(_REENTRANT) && (defined(GC_SOLARIS_THREADS) \
19843 +                            || defined(GC_SOLARIS_PTHREADS) \
19844 +                            || defined(GC_HPUX_THREADS) \
19845 +                            || defined(GC_LINUX_THREADS))
19846 +# define _REENTRANT
19847 +       /* Better late than never.  This fails if system headers that   */
19848 +       /* depend on this were previously included.                     */
19849 +#endif
19850 +
19851 +#if defined(GC_DGUX386_THREADS) && !defined(_POSIX4A_DRAFT10_SOURCE)
19852 +# define _POSIX4A_DRAFT10_SOURCE 1
19853 +#endif
19854 +
19855 +# if defined(GC_SOLARIS_PTHREADS) || defined(GC_FREEBSD_THREADS) || \
19856 +       defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) || \
19857 +       defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \
19858 +       defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \
19859 +        (defined(GC_WIN32_THREADS) && defined(__CYGWIN32__))
19860 +#   define GC_PTHREADS
19861 +# endif
19862 +
19863 +#if defined(GC_THREADS) && !defined(GC_PTHREADS)
19864 +# if defined(__linux__)
19865 +#   define GC_LINUX_THREADS
19866 +#   define GC_PTHREADS
19867 +# endif
19868 +# if !defined(LINUX) && (defined(_PA_RISC1_1) || defined(_PA_RISC2_0) \
19869 +                         || defined(hppa) || defined(__HPPA))
19870 +#   define GC_HPUX_THREADS
19871 +#   define GC_PTHREADS
19872 +# endif
19873 +# if !defined(__linux__) && (defined(__alpha) || defined(__alpha__))
19874 +#   define GC_OSF1_THREADS
19875 +#   define GC_PTHREADS
19876 +# endif
19877 +# if defined(__mips) && !defined(__linux__)
19878 +#   define GC_IRIX_THREADS
19879 +#   define GC_PTHREADS
19880 +# endif
19881 +# if defined(__sparc) && !defined(__linux__)
19882 +#   define GC_SOLARIS_PTHREADS
19883 +#   define GC_PTHREADS
19884 +# endif
19885 +# if defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
19886 +#   define GC_DARWIN_THREADS
19887 +#   define GC_PTHREADS
19888 +# endif
19889 +# if !defined(GC_PTHREADS) && defined(__FreeBSD__)
19890 +#   define GC_FREEBSD_THREADS
19891 +#   define GC_PTHREADS
19892 +# endif
19893 +# if defined(DGUX) && (defined(i386) || defined(__i386__))
19894 +#   define GC_DGUX386_THREADS
19895 +#   define GC_PTHREADS
19896 +# endif
19897 +#endif /* GC_THREADS */
19898 +
19899 +#if defined(GC_THREADS) && !defined(GC_PTHREADS) && defined(MSWIN32)
19900 +# define GC_WIN32_THREADS
19901 +#endif
19902 +
19903 +#if defined(GC_SOLARIS_PTHREADS) && !defined(GC_SOLARIS_THREADS)
19904 +#   define GC_SOLARIS_THREADS
19905 +#endif
19906 +
19907 +# define __GC
19908 +# include <stddef.h>
19909 +# ifdef _WIN32_WCE
19910 +/* Yet more kluges for WinCE */
19911 +#   include <stdlib.h>         /* size_t is defined here */
19912 +    typedef long ptrdiff_t;    /* ptrdiff_t is not defined */
19913 +# endif
19914 +
19915 +#if defined(_DLL) && !defined(GC_NOT_DLL) && !defined(GC_DLL)
19916 +# define GC_DLL
19917 +#endif
19918 +
19919 +#if defined(__MINGW32__) && defined(GC_DLL)
19920 +# ifdef GC_BUILD
19921 +#   define GC_API __declspec(dllexport)
19922 +# else
19923 +#   define GC_API __declspec(dllimport)
19924 +# endif
19925 +#endif
19926 +
19927 +#if (defined(__DMC__) || defined(_MSC_VER)) && defined(GC_DLL)
19928 +# ifdef GC_BUILD
19929 +#   define GC_API extern __declspec(dllexport)
19930 +# else
19931 +#   define GC_API __declspec(dllimport)
19932 +# endif
19933 +#endif
19934 +
19935 +#if defined(__WATCOMC__) && defined(GC_DLL)
19936 +# ifdef GC_BUILD
19937 +#   define GC_API extern __declspec(dllexport)
19938 +# else
19939 +#   define GC_API extern __declspec(dllimport)
19940 +# endif
19941 +#endif
19942 +
19943 +#ifndef GC_API
19944 +#define GC_API extern
19945 +#endif
19946 +
19947 diff -buNr boehm-gc/include/gc_cpp.h boehm-gc/include/gc_cpp.h
19948 --- boehm-gc/include/gc_cpp.h   Fri Aug 17 18:04:43 2001
19949 +++ boehm-gc/include/gc_cpp.h   Sat Sep 13 01:32:42 2003
19950 @@ -134,7 +134,9 @@
19951  #include "gc.h"
19952  
19953  #ifndef THINK_CPLUS
19954 -#define _cdecl
19955 +#  define GC_cdecl
19956 +#else
19957 +#  define GC_cdecl _cdecl
19958  #endif
19959  
19960  #if ! defined( GC_NO_OPERATOR_NEW_ARRAY ) \
19961 @@ -159,12 +161,22 @@
19962  class gc {public:
19963      inline void* operator new( size_t size );
19964      inline void* operator new( size_t size, GCPlacement gcp );
19965 +    inline void* operator new( size_t size, void *p );
19966 +       /* Must be redefined here, since the other overloadings */
19967 +       /* hide the global definition.                          */
19968      inline void operator delete( void* obj );
19969 +#   ifndef __BORLANDC__  /* Confuses the Borland compiler. */
19970 +      inline void operator delete( void*, void* );
19971 +#   endif
19972  
19973  #ifdef GC_OPERATOR_NEW_ARRAY
19974      inline void* operator new[]( size_t size );
19975      inline void* operator new[]( size_t size, GCPlacement gcp );
19976 +    inline void* operator new[]( size_t size, void *p );
19977      inline void operator delete[]( void* obj );
19978 +#   ifndef __BORLANDC__
19979 +      inline void gc::operator delete[]( void*, void* );
19980 +#   endif
19981  #endif /* GC_OPERATOR_NEW_ARRAY */
19982      };    
19983      /*
19984 @@ -176,7 +188,7 @@
19985      inline gc_cleanup();
19986      inline virtual ~gc_cleanup();
19987  private:
19988 -    inline static void _cdecl cleanup( void* obj, void* clientData );};
19989 +    inline static void GC_cdecl cleanup( void* obj, void* clientData );};
19990      /*
19991      Instances of classes derived from "gc_cleanup" will be allocated
19992      in the collected heap by default.  When the collector discovers an
19993 @@ -211,7 +223,6 @@
19994      classes derived from "gc_cleanup" or containing members derived
19995      from "gc_cleanup". */
19996  
19997 -#ifdef GC_OPERATOR_NEW_ARRAY
19998  
19999  #ifdef _MSC_VER
20000   /** This ensures that the system default operator new[] doesn't get
20001 @@ -220,42 +231,24 @@
20002    *  There seems to be really redirect new in this environment without
20003    *  including this everywhere. 
20004    */
20005 - inline void *operator new[]( size_t size )
20006 - {
20007 -    return GC_MALLOC_UNCOLLECTABLE( size );
20008 - }
20009 -
20010 - inline void operator delete[](void* obj)
20011 - {
20012 -    GC_FREE(obj);
20013 - };
20014 + void *operator new[]( size_t size );
20015  
20016 - inline void* operator new( size_t size)
20017 - {
20018 -    return GC_MALLOC_UNCOLLECTABLE( size);
20019 - };   
20020 + void operator delete[](void* obj);
20021  
20022 - inline void operator delete(void* obj)
20023 - {
20024 -    GC_FREE(obj);
20025 - };
20026 + void* operator new( size_t size);
20027  
20028 + void operator delete(void* obj);
20029  
20030 -// This new operator is used by VC++ in case of Debug builds !
20031 -  inline void* operator new( size_t size,
20032 + // This new operator is used by VC++ in case of Debug builds !
20033 + void* operator new(  size_t size,
20034                       int ,//nBlockUse,
20035                       const char * szFileName,
20036 -                     int nLine
20037 -                     ) {
20038 -# ifndef GC_DEBUG
20039 -     return GC_malloc_uncollectable( size );
20040 -# else
20041 -     return GC_debug_malloc_uncollectable(size, szFileName, nLine);
20042 -# endif
20043 -  }
20044 -
20045 +                     int nLine );
20046  #endif /* _MSC_VER */
20047  
20048 +
20049 +#ifdef GC_OPERATOR_NEW_ARRAY
20050 +
20051  inline void* operator new[](
20052      size_t size, 
20053      GCPlacement gcp,
20054 @@ -283,9 +276,15 @@
20055      else
20056          return GC_MALLOC_UNCOLLECTABLE( size );}
20057  
20058 +inline void* gc::operator new( size_t size, void *p ) {
20059 +    return p;}
20060 +
20061  inline void gc::operator delete( void* obj ) {
20062      GC_FREE( obj );}
20063      
20064 +#ifndef __BORLANDC__
20065 +  inline void gc::operator delete( void*, void* ) {}
20066 +#endif
20067  
20068  #ifdef GC_OPERATOR_NEW_ARRAY
20069  
20070 @@ -295,14 +294,21 @@
20071  inline void* gc::operator new[]( size_t size, GCPlacement gcp ) {
20072      return gc::operator new( size, gcp );}
20073  
20074 +inline void* gc::operator new[]( size_t size, void *p ) {
20075 +    return p;}
20076 +
20077  inline void gc::operator delete[]( void* obj ) {
20078      gc::operator delete( obj );}
20079      
20080 +#ifndef __BORLANDC__
20081 +  inline void gc::operator delete[]( void*, void* ) {}
20082 +#endif
20083 +    
20084  #endif /* GC_OPERATOR_NEW_ARRAY */
20085  
20086  
20087  inline gc_cleanup::~gc_cleanup() {
20088 -    GC_REGISTER_FINALIZER_IGNORE_SELF( GC_base(this), 0, 0, 0, 0 );}
20089 +    GC_register_finalizer_ignore_self( GC_base(this), 0, 0, 0, 0 );}
20090  
20091  inline void gc_cleanup::cleanup( void* obj, void* displ ) {
20092      ((gc_cleanup*) ((char*) obj + (ptrdiff_t) displ))->~gc_cleanup();}
20093 diff -buNr boehm-gc/include/gc_local_alloc.h boehm-gc/include/gc_local_alloc.h
20094 --- boehm-gc/include/gc_local_alloc.h   Fri Aug 17 11:30:50 2001
20095 +++ boehm-gc/include/gc_local_alloc.h   Sat Sep 13 01:32:42 2003
20096 @@ -33,6 +33,9 @@
20097   * -DTHREAD_LOCAL_ALLOC, which is currently supported only on Linux.
20098   *
20099   * The debugging allocators use standard, not thread-local allocation.
20100 + *
20101 + * These routines normally require an explicit call to GC_init(), though
20102 + * that may be done from a constructor function.
20103   */
20104  
20105  #ifndef GC_LOCAL_ALLOC_H
20106 diff -buNr boehm-gc/include/gc_mark.h boehm-gc/include/gc_mark.h
20107 --- boehm-gc/include/gc_mark.h  Fri Aug 17 11:30:50 2001
20108 +++ boehm-gc/include/gc_mark.h  Sat Sep 13 01:32:42 2003
20109 @@ -129,7 +129,9 @@
20110  /* be reserved for exceptional cases.  That will ensure that           */
20111  /* performance of this call is not extremely performance critical.     */
20112  /* (Otherwise we would need to inline GC_mark_and_push completely,     */
20113 -/* which would tie the client code to a fixed colllector version.)     */
20114 +/* which would tie the client code to a fixed collector version.)      */
20115 +/* Note that mark procedures should explicitly call FIXUP_POINTER()    */
20116 +/* if required.                                                                */
20117  struct GC_ms_entry *GC_mark_and_push
20118                 GC_PROTO((GC_PTR obj,
20119                           struct GC_ms_entry * mark_stack_ptr,
20120 diff -buNr boehm-gc/include/gc_pthread_redirects.h boehm-gc/include/gc_pthread_redirects.h
20121 --- boehm-gc/include/gc_pthread_redirects.h     Tue Oct 16 21:55:28 2001
20122 +++ boehm-gc/include/gc_pthread_redirects.h     Sat Sep 13 01:32:42 2003
20123 @@ -52,15 +52,21 @@
20124    int GC_pthread_create(pthread_t *new_thread,
20125                          const pthread_attr_t *attr,
20126                         void *(*start_routine)(void *), void *arg);
20127 +#ifndef GC_DARWIN_THREADS
20128    int GC_pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);
20129 +#endif
20130    int GC_pthread_join(pthread_t thread, void **retval);
20131    int GC_pthread_detach(pthread_t thread);
20132  
20133  # define pthread_create GC_pthread_create
20134 +#ifndef GC_DARWIN_THREADS
20135  # define pthread_sigmask GC_pthread_sigmask
20136 +#endif
20137  # define pthread_join GC_pthread_join
20138  # define pthread_detach GC_pthread_detach
20139 +#ifndef GC_DARWIN_THREADS
20140  # define dlopen GC_dlopen
20141 +#endif
20142  
20143  #endif /* GC_xxxxx_THREADS */
20144  
20145 diff -buNr boehm-gc/include/gc_typed.h boehm-gc/include/gc_typed.h
20146 --- boehm-gc/include/gc_typed.h Fri Aug 17 11:30:50 2001
20147 +++ boehm-gc/include/gc_typed.h Sat Sep 13 01:32:42 2003
20148 @@ -29,14 +29,21 @@
20149  #   include "gc.h"
20150  # endif
20151  
20152 +#ifdef __cplusplus
20153 +  extern "C" {
20154 +#endif
20155  typedef GC_word * GC_bitmap;
20156         /* The least significant bit of the first word is one if        */
20157         /* the first word in the object may be a pointer.               */
20158         
20159 +# define GC_WORDSZ (8*sizeof(GC_word))
20160  # define GC_get_bit(bm, index) \
20161 -               (((bm)[divWORDSZ(index)] >> modWORDSZ(index)) & 1)
20162 +               (((bm)[index/GC_WORDSZ] >> (index%GC_WORDSZ)) & 1)
20163  # define GC_set_bit(bm, index) \
20164 -               (bm)[divWORDSZ(index)] |= (word)1 << modWORDSZ(index)
20165 +               (bm)[index/GC_WORDSZ] |= ((GC_word)1 << (index%GC_WORDSZ))
20166 +# define GC_WORD_OFFSET(t, f) (offsetof(t,f)/sizeof(GC_word))
20167 +# define GC_WORD_LEN(t) (sizeof(t)/ sizeof(GC_word))
20168 +# define GC_BITMAP_SIZE(t) ((GC_WORD_LEN(t) + GC_WORDSZ-1)/GC_WORDSZ)
20169  
20170  typedef GC_word GC_descr;
20171  
20172 @@ -57,6 +64,16 @@
20173                 /* is intended to be called once per type, not once     */
20174                 /* per allocation.                                      */
20175  
20176 +/* It is possible to generate a descriptor for a C type T with */
20177 +/* word aligned pointer fields f1, f2, ... as follows:                 */
20178 +/*                                                                     */
20179 +/* GC_descr T_descr;
20180 +/* GC_word T_bitmap[GC_BITMAP_SIZE(T)] = {0};                          */
20181 +/* GC_set_bit(T_bitmap, GC_WORD_OFFSET(T,f1));                         */
20182 +/* GC_set_bit(T_bitmap, GC_WORD_OFFSET(T,f2));                         */
20183 +/* ...                                                                 */
20184 +/* T_descr = GC_make_descriptor(T_bitmap, GC_WORD_LEN(T));             */
20185 +
20186  GC_API GC_PTR GC_malloc_explicitly_typed
20187                         GC_PROTO((size_t size_in_bytes, GC_descr d));
20188                 /* Allocate an object whose layout is described by d.   */
20189 @@ -79,15 +96,18 @@
20190         /* Returned object is cleared.                          */
20191  
20192  #ifdef GC_DEBUG
20193 -#   define GC_MALLOC_EXPLICTLY_TYPED(bytes, d) GC_MALLOC(bytes)
20194 -#   define GC_CALLOC_EXPLICTLY_TYPED(n, bytes, d) GC_MALLOC(n*bytes)
20195 +#   define GC_MALLOC_EXPLICITLY_TYPED(bytes, d) GC_MALLOC(bytes)
20196 +#   define GC_CALLOC_EXPLICITLY_TYPED(n, bytes, d) GC_MALLOC(n*bytes)
20197  #else
20198 -#  define GC_MALLOC_EXPLICTLY_TYPED(bytes, d) \
20199 +#  define GC_MALLOC_EXPLICITLY_TYPED(bytes, d) \
20200         GC_malloc_explicitly_typed(bytes, d)
20201 -#  define GC_CALLOC_EXPLICTLY_TYPED(n, bytes, d) \
20202 +#  define GC_CALLOC_EXPLICITLY_TYPED(n, bytes, d) \
20203         GC_calloc_explicitly_typed(n, bytes, d)
20204  #endif /* !GC_DEBUG */
20205  
20206 +#ifdef __cplusplus
20207 +  } /* matches extern "C" */
20208 +#endif
20209  
20210  #endif /* _GC_TYPED_H */
20211  
20212 diff -buNr boehm-gc/include/new_gc_alloc.h boehm-gc/include/new_gc_alloc.h
20213 --- boehm-gc/include/new_gc_alloc.h     Tue Oct 16 02:01:38 2001
20214 +++ boehm-gc/include/new_gc_alloc.h     Sat Sep 13 01:32:42 2003
20215 @@ -64,6 +64,14 @@
20216  #endif
20217  #endif
20218  
20219 +/* A hack to deal with gcc 3.1.  If you are using gcc3.1 and later,    */
20220 +/* you should probably really use gc_allocator.h instead.              */
20221 +#if defined (__GNUC__) && \
20222 +    (__GNUC > 3 || (__GNUC__ == 3 && (__GNUC_MINOR__ >= 1)))
20223 +# define simple_alloc __simple_alloc
20224 +#endif
20225 +
20226 +
20227  
20228  #define GC_ALLOC_H
20229  
20230 diff -buNr boehm-gc/include/private/darwin_semaphore.h boehm-gc/include/private/darwin_semaphore.h
20231 --- boehm-gc/include/private/darwin_semaphore.h Wed Dec 31 16:00:00 1969
20232 +++ boehm-gc/include/private/darwin_semaphore.h Sat Sep 13 01:32:42 2003
20233 @@ -0,0 +1,68 @@
20234 +#ifndef GC_DARWIN_SEMAPHORE_H
20235 +#define GC_DARWIN_SEMAPHORE_H
20236 +
20237 +#if !defined(GC_DARWIN_THREADS)
20238 +#error darwin_semaphore.h included with GC_DARWIN_THREADS not defined
20239 +#endif
20240 +
20241 +/*
20242 +   This is a very simple semaphore implementation for darwin. It
20243 +   is implemented in terms of pthreads calls so it isn't async signal
20244 +   safe. This isn't a problem because signals aren't used to
20245 +   suspend threads on darwin.
20246 +*/
20247 +   
20248 +typedef struct {
20249 +    pthread_mutex_t mutex;
20250 +    pthread_cond_t cond;
20251 +    int value;
20252 +} sem_t;
20253 +
20254 +static int sem_init(sem_t *sem, int pshared, int value) {
20255 +    int ret;
20256 +    if(pshared)
20257 +        GC_abort("sem_init with pshared set");
20258 +    sem->value = value;
20259 +    
20260 +    ret = pthread_mutex_init(&sem->mutex,NULL);
20261 +    if(ret < 0) return -1;
20262 +    ret = pthread_cond_init(&sem->cond,NULL);
20263 +    if(ret < 0) return -1;
20264 +    return 0;
20265 +}
20266 +
20267 +static int sem_post(sem_t *sem) {
20268 +    if(pthread_mutex_lock(&sem->mutex) < 0)
20269 +        return -1;
20270 +    sem->value++;
20271 +    if(pthread_cond_signal(&sem->cond) < 0) {
20272 +        pthread_mutex_unlock(&sem->mutex);
20273 +        return -1;
20274 +    }
20275 +    if(pthread_mutex_unlock(&sem->mutex) < 0)
20276 +        return -1;
20277 +    return 0;
20278 +}
20279 +
20280 +static int sem_wait(sem_t *sem) {
20281 +    if(pthread_mutex_lock(&sem->mutex) < 0)
20282 +        return -1;
20283 +    while(sem->value == 0) {
20284 +        pthread_cond_wait(&sem->cond,&sem->mutex);
20285 +    }
20286 +    sem->value--;
20287 +    if(pthread_mutex_unlock(&sem->mutex) < 0)
20288 +        return -1;    
20289 +    return 0;
20290 +}
20291 +
20292 +static int sem_destroy(sem_t *sem) {
20293 +    int ret;
20294 +    ret = pthread_cond_destroy(&sem->cond);
20295 +    if(ret < 0) return -1;
20296 +    ret = pthread_mutex_destroy(&sem->mutex);
20297 +    if(ret < 0) return -1;
20298 +    return 0;
20299 +}
20300 +
20301 +#endif
20302 diff -buNr boehm-gc/include/private/darwin_stop_world.h boehm-gc/include/private/darwin_stop_world.h
20303 --- boehm-gc/include/private/darwin_stop_world.h        Wed Dec 31 16:00:00 1969
20304 +++ boehm-gc/include/private/darwin_stop_world.h        Sat Sep 13 01:32:42 2003
20305 @@ -0,0 +1,15 @@
20306 +#ifndef GC_DARWIN_STOP_WORLD_H
20307 +#define GC_DARWIN_STOP_WORLD_H
20308 +
20309 +#if !defined(GC_DARWIN_THREADS)
20310 +#error darwin_stop_world.h included without GC_DARWIN_THREADS defined
20311 +#endif
20312 +
20313 +#include <mach/mach.h>
20314 +#include <mach/thread_act.h>
20315 +
20316 +struct thread_stop_info {
20317 +    mach_port_t mach_thread;
20318 +};
20319 +
20320 +#endif
20321 diff -buNr boehm-gc/include/private/dbg_mlc.h boehm-gc/include/private/dbg_mlc.h
20322 --- boehm-gc/include/private/dbg_mlc.h  Mon Feb 11 20:37:57 2002
20323 +++ boehm-gc/include/private/dbg_mlc.h  Sat Sep 13 01:32:42 2003
20324 @@ -115,16 +115,24 @@
20325  
20326  #ifdef SHORT_DBG_HDRS
20327  #   define DEBUG_BYTES (sizeof (oh))
20328 +#   define UNCOLLECTABLE_DEBUG_BYTES DEBUG_BYTES
20329  #else
20330      /* Add space for END_FLAG, but use any extra space that was already        */
20331      /* added to catch off-the-end pointers.                            */
20332 -#   define DEBUG_BYTES (sizeof (oh) + sizeof (word) - EXTRA_BYTES)
20333 +    /* For uncollectable objects, the extra byte is not added.         */
20334 +#   define UNCOLLECTABLE_DEBUG_BYTES (sizeof (oh) + sizeof (word))
20335 +#   define DEBUG_BYTES (UNCOLLECTABLE_DEBUG_BYTES - EXTRA_BYTES)
20336  #endif
20337  #define USR_PTR_FROM_BASE(p) ((ptr_t)(p) + sizeof(oh))
20338  
20339  /* Round bytes to words without adding extra byte at end.      */
20340  #define SIMPLE_ROUNDED_UP_WORDS(n) BYTES_TO_WORDS((n) + WORDS_TO_BYTES(1) - 1)
20341  
20342 +/* ADD_CALL_CHAIN stores a (partial) call chain into an object */
20343 +/* header.  It may be called with or without the allocation    */
20344 +/* lock.                                                       */
20345 +/* PRINT_CALL_CHAIN prints the call chain stored in an object  */
20346 +/* to stderr.  It requires that we do not hold the lock.       */
20347  #ifdef SAVE_CALL_CHAIN
20348  #   define ADD_CALL_CHAIN(base, ra) GC_save_callers(((oh *)(base)) -> oh_ci)
20349  #   define PRINT_CALL_CHAIN(base) GC_print_callers(((oh *)(base)) -> oh_ci)
20350 diff -buNr boehm-gc/include/private/gc_hdrs.h boehm-gc/include/private/gc_hdrs.h
20351 --- boehm-gc/include/private/gc_hdrs.h  Fri Aug 17 18:04:43 2001
20352 +++ boehm-gc/include/private/gc_hdrs.h  Sat Sep 13 01:32:42 2003
20353 @@ -70,7 +70,7 @@
20354  #define ADVANCE(p, hhdr, source) \
20355             { \
20356               hdr * new_hdr = GC_invalid_header; \
20357 -              p = GC_FIND_START(p, hhdr, &new_hdr, (word)source); \
20358 +              p = GC_find_start(p, hhdr, &new_hdr); \
20359               hhdr = new_hdr; \
20360             }
20361  
20362 diff -buNr boehm-gc/include/private/gc_locks.h boehm-gc/include/private/gc_locks.h
20363 --- boehm-gc/include/private/gc_locks.h Fri Sep 27 13:40:06 2002
20364 +++ boehm-gc/include/private/gc_locks.h Sat Sep 13 01:32:42 2003
20365 @@ -145,23 +145,24 @@
20366  #    if defined(POWERPC)
20367          inline static int GC_test_and_set(volatile unsigned int *addr) {
20368            int oldval;
20369 -          int temp = 1; // locked value
20370 +          int temp = 1; /* locked value */
20371  
20372            __asm__ __volatile__(
20373 -               "1:\tlwarx %0,0,%3\n"   // load and reserve
20374 -               "\tcmpwi %0, 0\n"       // if load is
20375 -               "\tbne 2f\n"            //   non-zero, return already set
20376 -               "\tstwcx. %2,0,%1\n"    // else store conditional
20377 -               "\tbne- 1b\n"           // retry if lost reservation
20378 -               "2:\t\n"                // oldval is zero if we set
20379 +               "1:\tlwarx %0,0,%3\n"   /* load and reserve               */
20380 +               "\tcmpwi %0, 0\n"       /* if load is                     */
20381 +               "\tbne 2f\n"            /*   non-zero, return already set */
20382 +               "\tstwcx. %2,0,%1\n"    /* else store conditional         */
20383 +               "\tbne- 1b\n"           /* retry if lost reservation      */
20384 +               "\tsync\n"              /* import barrier                 */
20385 +               "2:\t\n"                /* oldval is zero if we set       */
20386                : "=&r"(oldval), "=p"(addr)
20387                : "r"(temp), "1"(addr)
20388 -              : "memory");
20389 -          return (int)oldval;
20390 +              : "cr0","memory");
20391 +          return oldval;
20392          }
20393  #       define GC_TEST_AND_SET_DEFINED
20394          inline static void GC_clear(volatile unsigned int *addr) {
20395 -         __asm__ __volatile__("eieio" ::: "memory");
20396 +         __asm__ __volatile__("eieio" : : : "memory");
20397            *(addr) = 0;
20398          }
20399  #       define GC_CLEAR_DEFINED
20400 @@ -191,8 +192,11 @@
20401            return oldvalue;
20402          }
20403  #       define GC_TEST_AND_SET_DEFINED
20404 -        /* Should probably also define GC_clear, since it needs        */
20405 -        /* a memory barrier ??                                 */
20406 +        inline static void GC_clear(volatile unsigned int *addr) {
20407 +          __asm__ __volatile__("mb" : : : "memory");
20408 +          *(addr) = 0;
20409 +        }
20410 +#       define GC_CLEAR_DEFINED
20411  #    endif /* ALPHA */
20412  #    ifdef ARM32
20413          inline static int GC_test_and_set(volatile unsigned int *addr) {
20414 @@ -224,8 +228,16 @@
20415  #    endif
20416  #  endif /* __GNUC__ */
20417  #  if (defined(ALPHA) && !defined(__GNUC__))
20418 -#    define GC_test_and_set(addr) __cxx_test_and_set_atomic(addr, 1)
20419 +#    ifndef OSF1
20420 +       --> We currently assume that if gcc is not used, we are
20421 +       --> running under Tru64.
20422 +#    endif
20423 +#    include <machine/builtins.h>
20424 +#    include <c_asm.h>
20425 +#    define GC_test_and_set(addr) __ATOMIC_EXCH_LONG(addr, 1)
20426  #    define GC_TEST_AND_SET_DEFINED
20427 +#    define GC_clear(addr) { asm("mb"); *(volatile unsigned *)addr = 0; }
20428 +#    define GC_CLEAR_DEFINED
20429  #  endif
20430  #  if defined(MSWIN32)
20431  #    define GC_test_and_set(addr) InterlockedExchange((LPLONG)addr,1)
20432 @@ -238,7 +250,11 @@
20433  #      define GC_TEST_AND_SET_DEFINED
20434  #    elif __mips < 3 || !(defined (_ABIN32) || defined(_ABI64)) \
20435         || !defined(_COMPILER_VERSION) || _COMPILER_VERSION < 700
20436 -#        define GC_test_and_set(addr) test_and_set(addr, 1)
20437 +#       ifdef __GNUC__
20438 +#          define GC_test_and_set(addr) _test_and_set(addr,1)
20439 +#       else
20440 +#          define GC_test_and_set(addr) test_and_set(addr,1)
20441 +#       endif
20442  #    else
20443  #       define GC_test_and_set(addr) __test_and_set(addr,1)
20444  #       define GC_clear(addr) __lock_release(addr);
20445 @@ -279,7 +295,7 @@
20446  #  endif
20447  
20448  #  if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
20449 -      && !defined(GC_IRIX_THREADS)
20450 +      && !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS)
20451  #    define NO_THREAD (pthread_t)(-1)
20452  #    include <pthread.h>
20453  #    if defined(PARALLEL_MARK) 
20454 @@ -310,12 +326,12 @@
20455           {
20456            char result;
20457            __asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1"
20458 -               : "=m"(*(addr)), "=r"(result)
20459 -               : "r" (new_val), "0"(*(addr)), "a"(old) : "memory");
20460 +               : "+m"(*(addr)), "=r"(result)
20461 +               : "r" (new_val), "a"(old) : "memory");
20462            return (GC_bool) result;
20463           }
20464  #      endif /* !GENERIC_COMPARE_AND_SWAP */
20465 -       inline static void GC_memory_write_barrier()
20466 +       inline static void GC_memory_barrier()
20467         {
20468          /* We believe the processor ensures at least processor */
20469          /* consistent ordering.  Thus a compiler barrier       */
20470 @@ -323,6 +339,37 @@
20471           __asm__ __volatile__("" : : : "memory");
20472         }
20473  #     endif /* I386 */
20474 +
20475 +#     if defined(POWERPC)
20476 +#      if !defined(GENERIC_COMPARE_AND_SWAP)
20477 +        /* Returns TRUE if the comparison succeeded. */
20478 +        inline static GC_bool GC_compare_and_exchange(volatile GC_word *addr,
20479 +            GC_word old, GC_word new_val) 
20480 +        {
20481 +            int result, dummy;
20482 +            __asm__ __volatile__(
20483 +                "1:\tlwarx %0,0,%5\n"
20484 +                  "\tcmpw %0,%4\n"
20485 +                  "\tbne  2f\n"
20486 +                  "\tstwcx. %3,0,%2\n"
20487 +                  "\tbne- 1b\n"
20488 +                  "\tsync\n"
20489 +                  "\tli %1, 1\n"
20490 +                  "\tb 3f\n"
20491 +                "2:\tli %1, 0\n"
20492 +                "3:\t\n"
20493 +                :  "=&r" (dummy), "=r" (result), "=p" (addr)
20494 +                :  "r" (new_val), "r" (old), "2"(addr)
20495 +                : "cr0","memory");
20496 +            return (GC_bool) result;
20497 +        }
20498 +#      endif /* !GENERIC_COMPARE_AND_SWAP */
20499 +        inline static void GC_memory_barrier()
20500 +        {
20501 +            __asm__ __volatile__("sync" : : : "memory");
20502 +        }
20503 +#     endif /* POWERPC */
20504 +
20505  #     if defined(IA64)
20506  #      if !defined(GENERIC_COMPARE_AND_SWAP)
20507           inline static GC_bool GC_compare_and_exchange(volatile GC_word *addr,
20508 @@ -337,12 +384,52 @@
20509  #      endif /* !GENERIC_COMPARE_AND_SWAP */
20510  #      if 0
20511         /* Shouldn't be needed; we use volatile stores instead. */
20512 -        inline static void GC_memory_write_barrier()
20513 +        inline static void GC_memory_barrier()
20514          {
20515            __asm__ __volatile__("mf" : : : "memory");
20516          }
20517  #      endif /* 0 */
20518  #     endif /* IA64 */
20519 +#     if defined(ALPHA)
20520 +#      if !defined(GENERIC_COMPARE_AND_SWAP)
20521 +#        if defined(__GNUC__)
20522 +           inline static GC_bool GC_compare_and_exchange(volatile GC_word *addr,
20523 +                                                        GC_word old, GC_word new_val) 
20524 +          {
20525 +            unsigned long was_equal;
20526 +             unsigned long temp;
20527 +
20528 +             __asm__ __volatile__(
20529 +                             "1:     ldq_l %0,%1\n"
20530 +                             "       cmpeq %0,%4,%2\n"
20531 +                            "       mov %3,%0\n"
20532 +                             "       beq %2,2f\n"
20533 +                             "       stq_c %0,%1\n"
20534 +                             "       beq %0,1b\n"
20535 +                             "2:\n"
20536 +                             "       mb\n"
20537 +                             :"=&r" (temp), "=m" (*addr), "=&r" (was_equal)
20538 +                             : "r" (new_val), "Ir" (old)
20539 +                            :"memory");
20540 +             return was_equal;
20541 +           }
20542 +#        else /* !__GNUC__ */
20543 +           inline static GC_bool GC_compare_and_exchange(volatile GC_word *addr,
20544 +                                                        GC_word old, GC_word new_val) 
20545 +         {
20546 +           return __CMP_STORE_QUAD(addr, old, new_val, addr);
20547 +          }
20548 +#        endif /* !__GNUC__ */
20549 +#      endif /* !GENERIC_COMPARE_AND_SWAP */
20550 +#      ifdef __GNUC__
20551 +         inline static void GC_memory_barrier()
20552 +         {
20553 +           __asm__ __volatile__("mb" : : : "memory");
20554 +         }
20555 +#      else
20556 +#       define GC_memory_barrier() asm("mb")
20557 +#      endif /* !__GNUC__ */
20558 +#     endif /* ALPHA */
20559  #     if defined(S390)
20560  #      if !defined(GENERIC_COMPARE_AND_SWAP)
20561          inline static GC_bool GC_compare_and_exchange(volatile C_word *addr,
20562 @@ -434,8 +521,12 @@
20563                 { GC_ASSERT(I_HOLD_LOCK()); UNSET_LOCK_HOLDER(); \
20564                   pthread_mutex_unlock(&GC_allocate_ml); }
20565  #      else /* !GC_ASSERTIONS */
20566 +#        if defined(NO_PTHREAD_TRYLOCK)
20567 +#          define LOCK() GC_lock();
20568 +#        else /* !defined(NO_PTHREAD_TRYLOCK) */
20569  #        define LOCK() \
20570            { if (0 != pthread_mutex_trylock(&GC_allocate_ml)) GC_lock(); }
20571 +#        endif
20572  #        define UNLOCK() pthread_mutex_unlock(&GC_allocate_ml)
20573  #      endif /* !GC_ASSERTIONS */
20574  #   endif /* USE_PTHREAD_LOCKS */
20575 @@ -478,11 +569,18 @@
20576                 }
20577  #    define EXIT_GC() GC_collecting = 0;
20578  #  endif /* GC_IRIX_THREADS */
20579 -#  ifdef GC_WIN32_THREADS
20580 +#  if defined(GC_WIN32_THREADS)
20581 +#    if defined(GC_PTHREADS)
20582 +#      include <pthread.h>
20583 +       extern pthread_mutex_t GC_allocate_ml;
20584 +#      define LOCK()   pthread_mutex_lock(&GC_allocate_ml)
20585 +#      define UNLOCK() pthread_mutex_unlock(&GC_allocate_ml)
20586 +#    else
20587  #    include <windows.h>
20588       GC_API CRITICAL_SECTION GC_allocate_ml;
20589  #    define LOCK() EnterCriticalSection(&GC_allocate_ml);
20590  #    define UNLOCK() LeaveCriticalSection(&GC_allocate_ml);
20591 +#    endif
20592  #  endif
20593  #  ifndef SET_LOCK_HOLDER
20594  #      define SET_LOCK_HOLDER()
20595 diff -buNr boehm-gc/include/private/gc_pmark.h boehm-gc/include/private/gc_pmark.h
20596 --- boehm-gc/include/private/gc_pmark.h Mon Feb 11 20:37:57 2002
20597 +++ boehm-gc/include/private/gc_pmark.h Sat Sep 13 01:32:42 2003
20598 @@ -137,7 +137,7 @@
20599  #ifdef __STDC__
20600  # ifdef PRINT_BLACK_LIST
20601      ptr_t GC_find_start(ptr_t current, hdr *hhdr, hdr **new_hdr_p,
20602 -                       ptr_t source);
20603 +                       word source);
20604  # else
20605      ptr_t GC_find_start(ptr_t current, hdr *hhdr, hdr **new_hdr_p);
20606  # endif
20607 @@ -145,7 +145,7 @@
20608    ptr_t GC_find_start();
20609  #endif
20610  
20611 -mse *GC_signal_mark_stack_overflow(mse *msp);
20612 +mse * GC_signal_mark_stack_overflow GC_PROTO((mse *msp));
20613  
20614  # ifdef GATHERSTATS
20615  #   define ADD_TO_ATOMIC(sz) GC_atomic_in_use += (sz)
20616 @@ -174,14 +174,6 @@
20617      } \
20618  }
20619  
20620 -#ifdef PRINT_BLACK_LIST
20621 -#   define GC_FIND_START(current, hhdr, new_hdr_p, source) \
20622 -       GC_find_start(current, hhdr, new_hdr_p, source)
20623 -#else
20624 -#   define GC_FIND_START(current, hhdr, new_hdr_p, source) \
20625 -       GC_find_start(current, hhdr, new_hdr_p)
20626 -#endif
20627 -
20628  /* Push the contents of current onto the mark stack if it is a valid   */
20629  /* ptr to a currently unmarked object.  Mark it.                       */
20630  /* If we assumed a standard-conforming compiler, we could probably     */
20631 @@ -195,8 +187,7 @@
20632      GET_HDR(my_current, my_hhdr); \
20633      if (IS_FORWARDING_ADDR_OR_NIL(my_hhdr)) { \
20634          hdr * new_hdr = GC_invalid_header; \
20635 -         my_current = GC_FIND_START(my_current, my_hhdr, \
20636 -                                   &new_hdr, (word)source); \
20637 +         my_current = GC_find_start(my_current, my_hhdr, &new_hdr); \
20638           my_hhdr = new_hdr; \
20639      } \
20640      PUSH_CONTENTS_HDR(my_current, mark_stack_top, mark_stack_limit, \
20641 @@ -290,21 +281,39 @@
20642  
20643  /*
20644   * Push a single value onto mark stack. Mark from the object pointed to by p.
20645 + * Invoke FIXUP_POINTER(p) before any further processing.
20646   * P is considered valid even if it is an interior pointer.
20647   * Previously marked objects are not pushed.  Hence we make progress even
20648   * if the mark stack overflows.
20649   */
20650 +
20651 +# if NEED_FIXUP_POINTER
20652 +    /* Try both the raw version and the fixed up one.  */
20653  # define GC_PUSH_ONE_STACK(p, source) \
20654      if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr      \
20655          && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {      \
20656          PUSH_ONE_CHECKED_STACK(p, source);     \
20657 +      } \
20658 +      FIXUP_POINTER(p); \
20659 +      if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr    \
20660 +        && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {      \
20661 +        PUSH_ONE_CHECKED_STACK(p, source);     \
20662      }
20663 +# else /* !NEED_FIXUP_POINTER */
20664 +#   define GC_PUSH_ONE_STACK(p, source) \
20665 +      if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr    \
20666 +        && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {      \
20667 +        PUSH_ONE_CHECKED_STACK(p, source);     \
20668 +      }
20669 +# endif
20670 +
20671  
20672  /*
20673   * As above, but interior pointer recognition as for
20674   * normal for heap pointers.
20675   */
20676  # define GC_PUSH_ONE_HEAP(p,source) \
20677 +    FIXUP_POINTER(p); \
20678      if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr      \
20679          && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {      \
20680             GC_mark_stack_top = GC_mark_and_push( \
20681 diff -buNr boehm-gc/include/private/gc_priv.h boehm-gc/include/private/gc_priv.h
20682 --- boehm-gc/include/private/gc_priv.h  Tue Mar  4 09:56:49 2003
20683 +++ boehm-gc/include/private/gc_priv.h  Sat Sep 13 01:32:42 2003
20684 @@ -30,6 +30,12 @@
20685  #   define BSD_TIME
20686  #endif
20687  
20688 +#ifdef DGUX
20689 +#   include <sys/types.h>
20690 +#   include <sys/time.h>
20691 +#   include <sys/resource.h>
20692 +#endif /* DGUX */
20693 +
20694  #ifdef BSD_TIME
20695  #   include <sys/types.h>
20696  #   include <sys/time.h>
20697 @@ -210,7 +216,6 @@
20698  #  define ALIGN_DOUBLE
20699  #endif
20700  
20701 -
20702  /* ALIGN_DOUBLE requires MERGE_SIZES at present. */
20703  # if defined(ALIGN_DOUBLE) && !defined(MERGE_SIZES)
20704  #   define MERGE_SIZES
20705 @@ -347,7 +352,8 @@
20706  #   include <string.h>
20707  #   define BCOPY_EXISTS
20708  # endif
20709 -# if defined(MACOSX)
20710 +# if defined(DARWIN)
20711 +#   include <string.h>
20712  #   define BCOPY_EXISTS
20713  # endif
20714  
20715 @@ -360,68 +366,6 @@
20716  #   define BZERO(x,n) bzero((char *)(x),(int)(n))
20717  # endif
20718  
20719 -/* HBLKSIZE aligned allocation.  0 is taken to mean failure    */
20720 -/* space is assumed to be cleared.                             */
20721 -/* In the case os USE_MMAP, the argument must also be a        */
20722 -/* physical page size.                                         */
20723 -/* GET_MEM is currently not assumed to retrieve 0 filled space, */
20724 -/* though we should perhaps take advantage of the case in which */
20725 -/* does.                                                       */
20726 -struct hblk;   /* See below.   */
20727 -# ifdef PCR
20728 -    char * real_malloc();
20729 -#   define GET_MEM(bytes) HBLKPTR(real_malloc((size_t)bytes + GC_page_size) \
20730 -                                 + GC_page_size-1)
20731 -# else
20732 -#   ifdef OS2
20733 -      void * os2_alloc(size_t bytes);
20734 -#     define GET_MEM(bytes) HBLKPTR((ptr_t)os2_alloc((size_t)bytes \
20735 -                                   + GC_page_size) \
20736 -                                    + GC_page_size-1)
20737 -#   else
20738 -#     if defined(NEXT) || defined(MACOSX) || defined(DOS4GW) || \
20739 -        (defined(AMIGA) && !defined(GC_AMIGA_FASTALLOC)) || \
20740 -        (defined(SUNOS5) && !defined(USE_MMAP))
20741 -#       define GET_MEM(bytes) HBLKPTR((size_t) \
20742 -                                     calloc(1, (size_t)bytes + GC_page_size) \
20743 -                                      + GC_page_size-1)
20744 -#     else
20745 -#      ifdef MSWIN32
20746 -          extern ptr_t GC_win32_get_mem();
20747 -#         define GET_MEM(bytes) (struct hblk *)GC_win32_get_mem(bytes)
20748 -#      else
20749 -#        ifdef MACOS
20750 -#          if defined(USE_TEMPORARY_MEMORY)
20751 -               extern Ptr GC_MacTemporaryNewPtr(size_t size,
20752 -                                                Boolean clearMemory);
20753 -#               define GET_MEM(bytes) HBLKPTR( \
20754 -                   GC_MacTemporaryNewPtr(bytes + GC_page_size, true) \
20755 -                   + GC_page_size-1)
20756 -#          else
20757 -#                  define GET_MEM(bytes) HBLKPTR( \
20758 -                       NewPtrClear(bytes + GC_page_size) + GC_page_size-1)
20759 -#          endif
20760 -#        else
20761 -#          ifdef MSWINCE
20762 -             extern ptr_t GC_wince_get_mem();
20763 -#            define GET_MEM(bytes) (struct hblk *)GC_wince_get_mem(bytes)
20764 -#          else
20765 -#            if defined(AMIGA) && defined(GC_AMIGA_FASTALLOC)
20766 -               extern void *GC_amiga_get_mem(size_t size);
20767 -               define GET_MEM(bytes) HBLKPTR((size_t) \
20768 -                  GC_amiga_get_mem((size_t)bytes + GC_page_size) \
20769 -                 + GC_page_size-1)
20770 -#            else
20771 -                extern ptr_t GC_unix_get_mem();
20772 -#               define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes)
20773 -#            endif
20774 -#          endif
20775 -#        endif
20776 -#      endif
20777 -#     endif
20778 -#   endif
20779 -# endif
20780 -
20781  /* Delay any interrupts or signals that may abort this thread.  Data   */
20782  /* structures are in a consistent state outside this pair of calls.    */
20783  /* ANSI C allows both to be empty (though the standard isn't very      */
20784 @@ -486,7 +430,7 @@
20785  #   ifdef SMALL_CONFIG
20786  #      define ABORT(msg) abort();
20787  #   else
20788 -       GC_API void GC_abort();
20789 +       GC_API void GC_abort GC_PROTO((GC_CONST char * msg));
20790  #       define ABORT(msg) GC_abort(msg);
20791  #   endif
20792  # endif
20793 @@ -646,9 +590,10 @@
20794   */
20795   
20796  # ifdef LARGE_CONFIG
20797 -#   define LOG_PHT_ENTRIES  19  /* Collisions likely at 512K blocks,   */
20798 -                               /* which is >= 2GB.  Each table takes   */
20799 -                               /* 64KB.                                */
20800 +#   define LOG_PHT_ENTRIES  20  /* Collisions likely at 1M blocks,     */
20801 +                               /* which is >= 4GB.  Each table takes   */
20802 +                               /* 128KB, some of which may never be    */
20803 +                               /* touched.                             */
20804  # else
20805  #   ifdef SMALL_CONFIG
20806  #     define LOG_PHT_ENTRIES  14 /* Collisions are likely if heap grows        */
20807 @@ -656,7 +601,7 @@
20808                                  /* Each hash table occupies 2K bytes.   */
20809  #   else /* default "medium" configuration */
20810  #     define LOG_PHT_ENTRIES  16 /* Collisions are likely if heap grows        */
20811 -                                /* to more than 16K hblks >= 256MB.    */
20812 +                                /* to more than 64K hblks >= 256MB.    */
20813                                  /* Each hash table occupies 8K bytes.  */
20814  #   endif
20815  # endif
20816 @@ -897,6 +842,10 @@
20817    word _mem_freed;
20818         /* Number of explicitly deallocated words of memory     */
20819         /* since last collection.                               */
20820 +  word _finalizer_mem_freed;
20821 +       /* Words of memory explicitly deallocated while         */
20822 +       /* finalizers were running.  Used to approximate mem.   */
20823 +       /* explicitly deallocated by finalizers.                */
20824    ptr_t _scratch_end_ptr;
20825    ptr_t _scratch_last_end_ptr;
20826         /* Used by headers.c, and can easily appear to point to */
20827 @@ -957,7 +906,7 @@
20828                        /* OFFSET_TOO_BIG if the value j would be too    */
20829                        /* large to fit in the entry.  (Note that the    */
20830                        /* size of these entries matters, both for       */
20831 -                      /* space consumption and for cache utilization.  */
20832 +                      /* space consumption and for cache utilization.) */
20833  #   define OFFSET_TOO_BIG 0xfe
20834  #   define OBJ_INVALID 0xff
20835  #   define MAP_ENTRY(map, bytes) (map)[bytes]
20836 @@ -1067,6 +1016,7 @@
20837  # define GC_words_finalized GC_arrays._words_finalized
20838  # define GC_non_gc_bytes_at_gc GC_arrays._non_gc_bytes_at_gc
20839  # define GC_mem_freed GC_arrays._mem_freed
20840 +# define GC_finalizer_mem_freed GC_arrays._finalizer_mem_freed
20841  # define GC_scratch_end_ptr GC_arrays._scratch_end_ptr
20842  # define GC_scratch_last_end_ptr GC_arrays._scratch_last_end_ptr
20843  # define GC_mark_procs GC_arrays._mark_procs
20844 @@ -1201,17 +1151,19 @@
20845                                 /* header structure associated with     */
20846                                 /* block.                               */
20847  
20848 -extern GC_bool GC_is_initialized;      /* GC_init() has been run.      */
20849 -
20850  extern GC_bool GC_objects_are_marked;  /* There are marked objects in  */
20851                                         /* the heap.                    */
20852  
20853  #ifndef SMALL_CONFIG
20854    extern GC_bool GC_incremental;
20855                         /* Using incremental/generational collection. */
20856 +# define TRUE_INCREMENTAL \
20857 +       (GC_incremental && GC_time_limit != GC_TIME_UNLIMITED)
20858 +       /* True incremental, not just generational, mode */
20859  #else
20860  # define GC_incremental FALSE
20861                         /* Hopefully allow optimizer to remove some code. */
20862 +# define TRUE_INCREMENTAL FALSE
20863  #endif
20864  
20865  extern GC_bool GC_dirty_maintained;
20866 @@ -1229,6 +1181,10 @@
20867  extern long GC_large_alloc_warn_suppressed;
20868         /* Number of warnings suppressed so far.        */
20869  
20870 +#ifdef THREADS
20871 +  extern GC_bool GC_world_stopped;
20872 +#endif
20873 +
20874  /* Operations */
20875  # ifndef abs
20876  #   define abs(x)  ((x) < 0? (-(x)) : (x))
20877 @@ -1452,6 +1408,7 @@
20878                                     /* Set all mark bits associated with */
20879                                     /* a free list.                      */
20880  void GC_add_roots_inner GC_PROTO((char * b, char * e, GC_bool tmp));
20881 +void GC_remove_roots_inner GC_PROTO((char * b, char * e));
20882  GC_bool GC_is_static_root GC_PROTO((ptr_t p));
20883                 /* Is the address p in one of the registered static     */
20884                 /* root sections?                                       */
20885 @@ -1624,6 +1581,8 @@
20886                                 /* until the blocks are available or    */
20887                                 /* until it fails by returning FALSE.   */
20888  
20889 +extern GC_bool GC_is_initialized;      /* GC_init() has been run.      */
20890 +
20891  #if defined(MSWIN32) || defined(MSWINCE)
20892    void GC_deinit GC_PROTO((void));
20893                                  /* Free any resources allocated by      */
20894 @@ -1666,6 +1625,8 @@
20895                                 /* free list nonempty, and return its   */
20896                                 /* head.                                */
20897    
20898 +void GC_free_inner(GC_PTR p);
20899 +  
20900  void GC_init_headers GC_PROTO((void));
20901  struct hblkhdr * GC_install_header GC_PROTO((struct hblk *h));
20902                                 /* Install a header for block h.        */
20903 @@ -1695,6 +1656,12 @@
20904                         /* finalizers to be run, and we haven't called  */
20905                         /* this procedure yet this GC cycle.            */
20906                         
20907 +GC_API GC_PTR GC_make_closure GC_PROTO((GC_finalization_proc fn, GC_PTR data));
20908 +GC_API void GC_debug_invoke_finalizer GC_PROTO((GC_PTR obj, GC_PTR data));
20909 +                       /* Auxiliary fns to make finalization work      */
20910 +                       /* correctly with displaced pointers introduced */
20911 +                       /* by the debugging allocators.                 */
20912 +                       
20913  void GC_add_to_heap GC_PROTO((struct hblk *p, word bytes));
20914                         /* Add a HBLKSIZE aligned chunk to the heap.    */
20915    
20916 @@ -1704,16 +1671,36 @@
20917                         /* description of the object to stderr.         */
20918  extern void (*GC_check_heap) GC_PROTO((void));
20919                         /* Check that all objects in the heap with      */
20920 -                       /* debugging info are intact.  Print            */
20921 -                       /* descriptions of any that are not.            */
20922 +                       /* debugging info are intact.                   */
20923 +                       /* Add any that are not to GC_smashed list.     */
20924 +extern void (*GC_print_all_smashed) GC_PROTO((void));
20925 +                       /* Print GC_smashed if it's not empty.          */
20926 +                       /* Clear GC_smashed list.                       */
20927 +extern void GC_print_all_errors GC_PROTO((void));
20928 +                       /* Print smashed and leaked objects, if any.    */
20929 +                       /* Clear the lists of such objects.             */
20930  extern void (*GC_print_heap_obj) GC_PROTO((ptr_t p));
20931                         /* If possible print s followed by a more       */
20932                         /* detailed description of the object           */
20933                         /* referred to by p.                            */
20934 +#if defined(LINUX) && defined(__ELF__) && !defined(SMALL_CONFIG)
20935 +  void GC_print_address_map GC_PROTO((void));
20936 +                       /* Print an address map of the process.         */
20937 +#endif
20938  
20939 +extern GC_bool GC_have_errors;  /* We saw a smashed or leaked object.  */
20940 +                               /* Call error printing routine          */
20941 +                               /* occasionally.                        */
20942  extern GC_bool GC_print_stats; /* Produce at least some logging output */
20943                                 /* Set from environment variable.       */
20944  
20945 +#ifndef NO_DEBUGGING
20946 +  extern GC_bool GC_dump_regularly;  /* Generate regular debugging dumps. */
20947 +# define COND_DUMP if (GC_dump_regularly) GC_dump();
20948 +#else
20949 +# define COND_DUMP
20950 +#endif
20951 +
20952  /* Macros used for collector internal allocation.      */
20953  /* These assume the collector lock is held.            */
20954  #ifdef DBG_HDRS_ALL
20955 @@ -1785,6 +1772,7 @@
20956  void GC_print_hblkfreelist GC_PROTO((void));
20957  void GC_print_heap_sects GC_PROTO((void));
20958  void GC_print_static_roots GC_PROTO((void));
20959 +void GC_print_finalization_stats GC_PROTO((void));
20960  void GC_dump GC_PROTO((void));
20961  
20962  #ifdef KEEP_BACK_PTRS
20963 @@ -1866,6 +1854,10 @@
20964  #      define GC_ASSERT(expr)
20965  # endif
20966  
20967 +/* Check a compile time assertion at compile time.  The error  */
20968 +/* message for failure is a bit baroque, but ...               */
20969 +# define GC_STATIC_ASSERT(expr) sizeof(char[(expr)? 1 : -1])
20970 +
20971  # if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC)
20972      /* We need additional synchronization facilities from the thread   */
20973      /* support.  We believe these are less performance critical                */
20974 @@ -1911,7 +1903,7 @@
20975    /* in Linux glibc, but it's not exported.)  Thus we continue to use  */
20976    /* the same hard-coded signals we've always used.                    */
20977  #  if !defined(SIG_SUSPEND)
20978 -#   if defined(GC_LINUX_THREADS)
20979 +#   if defined(GC_LINUX_THREADS) || defined(GC_DGUX386_THREADS)
20980  #    if defined(SPARC) && !defined(SIGPWR)
20981         /* SPARC/Linux doesn't properly define SIGPWR in <signal.h>.
20982          * It is aliased to SIGLOST in asm/signal.h, though.            */
20983 diff -buNr boehm-gc/include/private/gcconfig.h boehm-gc/include/private/gcconfig.h
20984 --- boehm-gc/include/private/gcconfig.h Wed Apr  9 17:08:01 2003
20985 +++ boehm-gc/include/private/gcconfig.h Sat Sep 13 01:32:42 2003
20986 @@ -14,10 +14,24 @@
20987   * modified is included with the above copyright notice.
20988   */
20989   
20990 +/*
20991 + * This header is private to the gc.  It is almost always included from
20992 + * gc_priv.h.  However it is possible to include it by itself if just the
20993 + * configuration macros are needed.  In that
20994 + * case, a few declarations relying on types declared in gc_priv.h will be
20995 + * omitted.
20996 + */
20997
20998  #ifndef GCCONFIG_H
20999  
21000  # define GCCONFIG_H
21001  
21002 +# ifndef GC_PRIVATE_H
21003 +    /* Fake ptr_t declaration, just to avoid compilation errors.       */
21004 +    /* This avoids many instances if "ifndef GC_PRIVATE_H" below.      */
21005 +    typedef struct GC_undefined_struct * ptr_t;
21006 +# endif
21007 +
21008  /* Machine dependent parameters.  Some tuning parameters can be found  */
21009  /* near the top of gc_private.h.                                       */
21010  
21011 @@ -44,7 +58,7 @@
21012  # endif
21013  
21014  /* Determine the machine type: */
21015 -# if defined(__arm__) || defined(__thumb__)
21016 +# if defined(__XSCALE__)
21017  #    define ARM32
21018  #    if !defined(LINUX)
21019  #      define NOSYS
21020 @@ -95,8 +109,8 @@
21021  #    if defined(nec_ews) || defined(_nec_ews)
21022  #      define EWS4800
21023  #    endif
21024 -#    if !defined(LINUX) && !defined(EWS4800) && !defined(NETBSD)
21025 -#      if defined(ultrix) || defined(__ultrix)
21026 +#    if !defined(LINUX) && !defined(EWS4800)
21027 +#      if defined(ultrix) || defined(__ultrix) || defined(__NetBSD__)
21028  #       define ULTRIX
21029  #      else
21030  #       if defined(_SYSTYPE_SVR4) || defined(SYSTYPE_SVR4) \
21031 @@ -107,6 +121,16 @@
21032  #       endif
21033  #      endif
21034  #    endif /* !LINUX */
21035 +#    if defined(__NetBSD__) && defined(__MIPSEL__)
21036 +#      undef ULTRIX
21037 +#    endif
21038 +#    define mach_type_known
21039 +# endif
21040 +# if defined(DGUX) && (defined(i386) || defined(__i386__))
21041 +#    define I386
21042 +#    ifndef _USING_DGUX
21043 +#    define _USING_DGUX
21044 +#    endif
21045  #    define mach_type_known
21046  # endif
21047  # if defined(sequent) && (defined(i386) || defined(__i386__))
21048 @@ -198,6 +222,10 @@
21049  #    define IA64
21050  #    define mach_type_known
21051  # endif
21052 +# if defined(LINUX) && defined(__arm__)
21053 +#    define ARM32
21054 +#    define mach_type_known
21055 +# endif
21056  # if defined(LINUX) && (defined(powerpc) || defined(__powerpc__))
21057  #    define POWERPC
21058  #    define mach_type_known
21059 @@ -237,19 +265,19 @@
21060  #   define MACOS
21061  #   define mach_type_known
21062  # endif
21063 -# if defined(__MWERKS__) && defined(__powerc)
21064 +# if defined(__MWERKS__) && defined(__powerc) && !defined(__MACH__)
21065  #   define POWERPC
21066  #   define MACOS
21067  #   define mach_type_known
21068  # endif
21069  # if defined(macosx) || \
21070       defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
21071 -#    define MACOSX
21072 +#    define DARWIN
21073  #    define POWERPC
21074  #    define mach_type_known
21075  # endif
21076  # if defined(__APPLE__) && defined(__MACH__) && defined(__i386__)
21077 -#    define MACOSX
21078 +#    define DARWIN
21079  #    define I386
21080       --> Not really supported, but at least we recognize it.
21081  # endif
21082 @@ -291,7 +319,7 @@
21083  #   define CX_UX
21084  #   define mach_type_known
21085  # endif
21086 -# if defined(DGUX)
21087 +# if defined(DGUX) && defined(m88k)
21088  #   define M88K
21089      /* DGUX defined */
21090  #   define mach_type_known
21091 @@ -425,8 +453,6 @@
21092                     /*             IA64       ==> Intel IPF             */
21093                     /*                            (e.g. Itanium)        */
21094                     /*                  (LINUX and HPUX)                */
21095 -                   /*             IA64_32    ==> IA64 w/32 bit ABI     */
21096 -                   /*                  (HPUX)                          */
21097                     /*             SH         ==> Hitachi SuperH        */
21098                     /*                  (LINUX & MSWINCE)               */
21099                     /*             X86_64     ==> AMD x86-64            */
21100 @@ -450,15 +476,17 @@
21101   * defining it to be 1 will always work, but perform poorly.
21102   *
21103   * DATASTART is the beginning of the data segment.
21104 - * On UNIX systems, the collector will scan the area between DATASTART
21105 + * On some platforms SEARCH_FOR_DATA_START is defined.
21106 + * SEARCH_FOR_DATASTART will cause GC_data_start to
21107 + * be set to an address determined by accessing data backwards from _end
21108 + * until an unmapped page is found.  DATASTART will be defined to be
21109 + * GC_data_start.
21110 + * On UNIX-like systems, the collector will scan the area between DATASTART
21111   * and DATAEND for root pointers.
21112   *
21113   * DATAEND, if not `end' where `end' is defined as ``extern int end[];''.
21114   * RTH suggests gaining access to linker script synth'd values with
21115   * this idiom instead of `&end' where `end' is defined as ``extern int end;'' .
21116 - * Otherwise, ``GCC will assume these are in .sdata/.sbss'' and it will, e.g.,
21117 - * cause failures on alpha*-*-* with ``-msmall-data or -fpic'' or mips-*-*
21118 - * without any special options.
21119   *
21120   * ALIGN_DOUBLE of GC_malloc should return blocks aligned to twice
21121   * the pointer size.
21122 @@ -470,8 +498,13 @@
21123   * 1) define STACK_GROWS_UP if the stack grows toward higher addresses, and
21124   * 2) define exactly one of
21125   *     STACKBOTTOM (should be defined to be an expression)
21126 + *     LINUX_STACKBOTTOM
21127   *     HEURISTIC1
21128   *     HEURISTIC2
21129 + * If STACKBOTTOM is defined, then it's value will be used directly as the
21130 + * stack base.  If LINUX_STACKBOTTOM is defined, then it will be determined
21131 + * with a method appropriate for most Linux systems.  Currently we look
21132 + * first for __libc_stack_end, and if that fails read it from /proc.
21133   * If either of the last two macros are defined, then STACKBOTTOM is computed
21134   * during collector startup using one of the following two heuristics:
21135   * HEURISTIC1:  Take an address inside GC_init's frame, and round it up to
21136 @@ -536,6 +569,9 @@
21137   * An architecture may also define CLEAR_DOUBLE(x) to be a fast way to
21138   * clear the two words at GC_malloc-aligned address x.  By default,
21139   * word stores of 0 are used instead.
21140 + *
21141 + * HEAP_START may be defined as the initial address hint for mmap-based
21142 + * allocation.
21143   */
21144  
21145  /* If we are using a recent version of gcc, we can use __builtin_unwind_init()
21146 @@ -571,7 +607,7 @@
21147  #            define DYNAMIC_LOADING
21148  #           include <features.h>
21149  #           if defined(__GLIBC__)&& __GLIBC__>=2
21150 -#              define LINUX_DATA_START
21151 +#              define SEARCH_FOR_DATA_START
21152  #           else /* !GLIBC2 */
21153                 extern char **__environ;
21154  #              define DATASTART ((ptr_t)(&__environ))
21155 @@ -669,23 +705,42 @@
21156  #     define ALIGNMENT 4       /* Guess.  Can someone verify?  */
21157                                 /* This was 2, but that didn't sound right. */
21158  #     define OS_TYPE "LINUX"
21159 -#     define DYNAMIC_LOADING
21160 +      /* HEURISTIC1 has been reliably reported to fail for a 32-bit    */
21161 +      /* executable on a 64 bit kernel.                                        */
21162  #     define LINUX_STACKBOTTOM
21163 -       /* Stack usually starts at 0x80000000 */
21164 -#     define LINUX_DATA_START
21165 +#     define DYNAMIC_LOADING
21166 +#     define SEARCH_FOR_DATA_START
21167        extern int _end[];
21168  #     define DATAEND (_end)
21169  #   endif
21170 -#   ifdef MACOSX
21171 +#   ifdef DARWIN
21172        /* There are reasons to suspect this may not be reliable.        */
21173  #     define ALIGNMENT 4
21174 -#     define OS_TYPE "MACOSX"
21175 +#     define OS_TYPE "DARWIN"
21176 +#     define DYNAMIC_LOADING
21177 +      /* XXX: see get_end(3), get_etext() and get_end() should not be used.
21178 +         These aren't used when dyld support is enabled (it is by default) */
21179  #     define DATASTART ((ptr_t) get_etext())
21180 +#     define DATAEND   ((ptr_t) get_end())
21181  #     define STACKBOTTOM ((ptr_t) 0xc0000000)
21182 -#     define DATAEND   /* not needed */
21183 -#     undef MPROTECT_VDB
21184 +#     define USE_MMAP
21185 +#     define USE_MMAP_ANON
21186 +#     define USE_ASM_PUSH_REGS
21187 +      /* This is potentially buggy. It needs more testing. See the comments in
21188 +         os_dep.c */
21189 +#     define MPROTECT_VDB
21190  #     include <unistd.h>
21191  #     define GETPAGESIZE() getpagesize()
21192 +#     if defined(USE_PPC_PREFETCH) && defined(__GNUC__)
21193 +       /* The performance impact of prefetches is untested */
21194 +#      define PREFETCH(x) \
21195 +         __asm__ __volatile__ ("dcbt 0,%0" : : "r" ((const void *) (x)))
21196 +#      define PREFETCH_FOR_WRITE(x) \
21197 +         __asm__ __volatile__ ("dcbtst 0,%0" : : "r" ((const void *) (x)))
21198 +#     endif
21199 +      /* There seems to be some issues with trylock hanging on darwin. This
21200 +         should be looked into some more */
21201 +#     define NO_PTHREAD_TRYLOCK
21202  #   endif
21203  #   ifdef NETBSD
21204  #     define ALIGNMENT 4
21205 @@ -746,8 +801,8 @@
21206  #      define OS_TYPE "SUNOS5"
21207         extern int _etext[];
21208         extern int _end[];
21209 -       extern char * GC_SysVGetDataStart();
21210 -#       define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, _etext)
21211 +       extern ptr_t GC_SysVGetDataStart();
21212 +#       define DATASTART GC_SysVGetDataStart(0x10000, _etext)
21213  #      define DATAEND (_end)
21214  #      if !defined(USE_MMAP) && defined(REDIRECT_MALLOC)
21215  #          define USE_MMAP
21216 @@ -801,9 +856,9 @@
21217  #   endif
21218  #   ifdef DRSNX
21219  #      define OS_TYPE "DRSNX"
21220 -       extern char * GC_SysVGetDataStart();
21221 +       extern ptr_t GC_SysVGetDataStart();
21222         extern int etext[];
21223 -#       define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, etext)
21224 +#       define DATASTART GC_SysVGetDataStart(0x10000, etext)
21225  #      define MPROTECT_VDB
21226  #       define STACKBOTTOM ((ptr_t) 0xdfff0000)
21227  #      define DYNAMIC_LOADING
21228 @@ -819,13 +874,14 @@
21229        extern int _etext[];
21230  #     define DATAEND (_end)
21231  #     define SVR4
21232 +      extern ptr_t GC_SysVGetDataStart();
21233  #     ifdef __arch64__
21234 +#      define DATASTART GC_SysVGetDataStart(0x100000, _etext)
21235         /* libc_stack_end is not set reliably for sparc64 */
21236 -#       define STACKBOTTOM ((ptr_t) 0x80000000000)
21237 -#      define DATASTART (ptr_t)GC_SysVGetDataStart(0x100000, _etext)
21238 +#       define STACKBOTTOM ((ptr_t) 0x80000000000ULL)
21239  #     else
21240 +#       define DATASTART GC_SysVGetDataStart(0x10000, _etext)
21241  #       define LINUX_STACKBOTTOM
21242 -#      define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, _etext)
21243  #     endif
21244  #   endif
21245  #   ifdef OPENBSD
21246 @@ -876,7 +932,7 @@
21247  #   ifdef SUNOS5
21248  #      define OS_TYPE "SUNOS5"
21249          extern int _etext[], _end[];
21250 -       extern char * GC_SysVGetDataStart();
21251 +       extern ptr_t GC_SysVGetDataStart();
21252  #       define DATASTART GC_SysVGetDataStart(0x1000, _etext)
21253  #      define DATAEND (_end)
21254  /*     # define STACKBOTTOM ((ptr_t)(_start)) worked through 2.7,      */
21255 @@ -921,6 +977,28 @@
21256  #       define DYNAMIC_LOADING
21257  #      define ELF_CLASS ELFCLASS32
21258  #   endif
21259 +#   ifdef DGUX
21260 +#      define OS_TYPE "DGUX"
21261 +       extern int _etext, _end;
21262 +       extern ptr_t GC_SysVGetDataStart();
21263 +#      define DATASTART GC_SysVGetDataStart(0x1000, &_etext)
21264 +#      define DATAEND (&_end)
21265 +#      define STACK_GROWS_DOWN
21266 +#      define HEURISTIC2
21267 +#      include <unistd.h>
21268 +#      define GETPAGESIZE()  sysconf(_SC_PAGESIZE)
21269 +#      define DYNAMIC_LOADING
21270 +#      ifndef USE_MMAP
21271 +#        define USE_MMAP
21272 +#      endif /* USE_MMAP */
21273 +#      define MAP_FAILED (void *) -1
21274 +#      ifdef USE_MMAP
21275 +#        define HEAP_START (ptr_t)0x40000000
21276 +#      else /* USE_MMAP */
21277 +#        define HEAP_START DATAEND
21278 +#      endif /* USE_MMAP */
21279 +#   endif /* DGUX */
21280 +
21281  #   ifdef LINUX
21282  #      ifndef __GNUC__
21283           /* The Intel compiler doesn't like inline assembly */
21284 @@ -944,6 +1022,9 @@
21285             /* possibly because Linux threads is itself a malloc client */
21286             /* and can't deal with the signals.                         */
21287  #      endif
21288 +#      define HEAP_START 0x1000
21289 +               /* This encourages mmap to give us low addresses,       */
21290 +               /* thus allowing the heap to grow to ~3GB               */
21291  #       ifdef __ELF__
21292  #            define DYNAMIC_LOADING
21293  #           ifdef UNDEFINED    /* includes ro data */
21294 @@ -952,7 +1033,7 @@
21295  #           endif
21296  #           include <features.h>
21297  #           if defined(__GLIBC__) && __GLIBC__ >= 2
21298 -#               define LINUX_DATA_START
21299 +#               define SEARCH_FOR_DATA_START
21300  #           else
21301                  extern char **__environ;
21302  #                define DATASTART ((ptr_t)(&__environ))
21303 @@ -1061,16 +1142,9 @@
21304  #      ifdef __ELF__
21305  #          define DYNAMIC_LOADING
21306  #      endif
21307 -/* Handle unmapped hole i386*-*-freebsd[45]* may put between etext and edata. */
21308         extern char etext[];
21309 -       extern char edata[];
21310 -       extern char end[];
21311 -#      define NEED_FIND_LIMIT
21312 -#      define DATASTART ((ptr_t)(etext))
21313 -#      define MIN(x,y) ((x) < (y) ? (x) : (y))
21314 -#      define DATAEND (MIN (GC_find_limit (DATASTART, TRUE), DATASTART2))
21315 -#      define DATASTART2 ((ptr_t)(edata))
21316 -#      define DATAEND2 ((ptr_t)(end))
21317 +       extern char * GC_FreeBSDGetDataStart();
21318 +#      define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext)
21319  #   endif
21320  #   ifdef NETBSD
21321  #      define OS_TYPE "NETBSD"
21322 @@ -1149,7 +1223,11 @@
21323  #     define DATASTART ((ptr_t)(__data_start))
21324  #     define ALIGNMENT 4
21325  #     define USE_GENERIC_PUSH_REGS
21326 +#     if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2 || __GLIBC__ > 2
21327  #     define LINUX_STACKBOTTOM
21328 +#     else
21329 +#        define STACKBOTTOM 0x80000000
21330 +#     endif
21331  #   endif /* Linux */
21332  #   ifdef EWS4800
21333  #      define HEURISTIC2
21334 @@ -1222,15 +1300,21 @@
21335  #       define DATAEND /* not needed */
21336  #   endif
21337  #   if defined(NETBSD)
21338 -#     define OS_TYPE "NETBSD"
21339 +      /* This also checked for __MIPSEL__ .  Why?  NETBSD recognition  */
21340 +      /* should be handled at the top of the file.                     */
21341  #     define ALIGNMENT 4
21342 +#     define OS_TYPE "NETBSD"
21343  #     define HEURISTIC2
21344  #     define USE_GENERIC_PUSH_REGS
21345 -      extern int _fdata[];
21346 -#     define DATASTART ((ptr_t)(_fdata))
21347 -      extern int _end[];
21348 -#     define DATAEND ((ptr_t)(_end))
21349 +#     ifdef __ELF__
21350 +        extern int etext[];
21351 +#       define DATASTART GC_data_start
21352 +#       define NEED_FIND_LIMIT
21353  #     define DYNAMIC_LOADING
21354 +#     else
21355 +#       define DATASTART ((ptr_t) 0x10000000)
21356 +#       define STACKBOTTOM ((ptr_t) 0x7ffff000)
21357 +#     endif /* _ELF_ */
21358  #  endif
21359  # endif
21360  
21361 @@ -1239,15 +1323,16 @@
21362  #   ifdef __64BIT__
21363  #     define ALIGNMENT 8
21364  #     define CPP_WORDSZ 64
21365 +#     define STACKBOTTOM 0x1000000000000000
21366  #   else
21367  #     define ALIGNMENT 4
21368  #     define CPP_WORDSZ 32
21369 +#     define STACKBOTTOM ((ptr_t)((ulong)&errno))
21370  #   endif
21371      extern int _data[], _end[];
21372  #   define DATASTART ((ptr_t)((ulong)_data))
21373  #   define DATAEND ((ptr_t)((ulong)_end))
21374      extern int errno;
21375 -#   define STACKBOTTOM ((ptr_t)((ulong)&errno))
21376  #   define USE_GENERIC_PUSH_REGS
21377  #   define DYNAMIC_LOADING
21378         /* For really old versions of AIX, this may have to be removed. */
21379 @@ -1311,15 +1396,23 @@
21380  #     define OS_TYPE "LINUX"
21381  #     define LINUX_STACKBOTTOM
21382  #     define DYNAMIC_LOADING
21383 -#     define LINUX_DATA_START
21384 +#     define SEARCH_FOR_DATA_START
21385        extern int _end[];
21386 -#     define DATAEND (_end)
21387 +#     define DATAEND (&_end)
21388  #   endif /* LINUX */
21389  # endif /* HP_PA */
21390  
21391  # ifdef ALPHA
21392  #   define MACH_TYPE "ALPHA"
21393  #   define ALIGNMENT 8
21394 +#   define CPP_WORDSZ 64
21395 +#   ifndef LINUX
21396 +#     define USE_GENERIC_PUSH_REGS
21397 +      /* Gcc and probably the DEC/Compaq compiler spill pointers to preserved */
21398 +      /* fp registers in some cases when the target is a 21264.  The assembly */
21399 +      /* code doesn't handle that yet, and version dependencies make that a   */
21400 +      /* bit tricky.  Do the easy thing for now.                                   */
21401 +#   endif
21402  #   ifdef NETBSD
21403  #      define OS_TYPE "NETBSD"
21404  #      define HEURISTIC2
21405 @@ -1327,13 +1420,11 @@
21406  #      define ELFCLASS32 32
21407  #      define ELFCLASS64 64
21408  #      define ELF_CLASS ELFCLASS64
21409 -#      define CPP_WORDSZ 64
21410  #       define DYNAMIC_LOADING
21411  #   endif
21412  #   ifdef OPENBSD
21413  #      define OS_TYPE "OPENBSD"
21414  #      define HEURISTIC2
21415 -#      define CPP_WORDSZ 64
21416  #      ifdef __ELF__   /* since OpenBSD/Alpha 2.9 */
21417  #         define DATASTART GC_data_start
21418  #         define ELFCLASS32 32
21419 @@ -1357,17 +1448,16 @@
21420         extern char edata[];
21421         extern char end[];
21422  #      define NEED_FIND_LIMIT
21423 -#      define DATASTART ((ptr_t)(etext))
21424 +#      define DATASTART ((ptr_t)(&etext))
21425  #      define DATAEND (GC_find_limit (DATASTART, TRUE))
21426 -#      define DATASTART2 ((ptr_t)(edata))
21427 -#      define DATAEND2 ((ptr_t)(end))
21428 -#      define CPP_WORDSZ 64
21429 +#      define DATASTART2 ((ptr_t)(&edata))
21430 +#      define DATAEND2 ((ptr_t)(&end))
21431  #   endif
21432  #   ifdef OSF1
21433  #      define OS_TYPE "OSF1"
21434  #      define DATASTART ((ptr_t) 0x140000000)
21435         extern int _end[];
21436 -#      define DATAEND ((ptr_t) _end)
21437 +#      define DATAEND ((ptr_t) &_end)
21438         extern char ** environ;
21439         /* round up from the value of environ to the nearest page boundary */
21440         /* Probably breaks if putenv is called before collector            */
21441 @@ -1380,17 +1470,17 @@
21442         /* This is currently unused, since we disabled HEURISTIC2       */
21443         extern int __start[];
21444  #      define HEURISTIC2_LIMIT ((ptr_t)((word)(__start) & ~(getpagesize()-1)))
21445 -#      define CPP_WORDSZ 64
21446 +#      ifndef GC_OSF1_THREADS
21447 +         /* Unresolved signal issues with threads.     */
21448  #      define MPROTECT_VDB
21449 +#       endif
21450  #      define DYNAMIC_LOADING
21451  #   endif
21452  #   ifdef LINUX
21453  #       define OS_TYPE "LINUX"
21454 -#       define CPP_WORDSZ 64
21455  #       define STACKBOTTOM ((ptr_t) 0x120000000)
21456  #       ifdef __ELF__
21457  #        define SEARCH_FOR_DATA_START
21458 -#        define DATASTART GC_data_start
21459  #         define DYNAMIC_LOADING
21460  #       else
21461  #           define DATASTART ((ptr_t) 0x140000000)
21462 @@ -1468,7 +1558,6 @@
21463         extern char * GC_register_stackbottom;
21464  #      define BACKING_STORE_BASE ((ptr_t)GC_register_stackbottom)
21465  #      define SEARCH_FOR_DATA_START
21466 -#      define DATASTART GC_data_start
21467  #      ifdef __GNUC__
21468  #         define DYNAMIC_LOADING
21469  #      else
21470 @@ -1502,13 +1591,15 @@
21471  #   endif
21472  #   ifdef  DGUX
21473  #      define OS_TYPE "DGUX"
21474 -       extern char * GC_SysVGetDataStart();
21475 -#       define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, etext)
21476 +       extern ptr_t GC_SysVGetDataStart();
21477 +#       define DATASTART GC_SysVGetDataStart(0x10000, etext)
21478  #   endif
21479  #   define STACKBOTTOM ((char*)0xf0000000) /* determined empirically */
21480  # endif
21481  
21482  # ifdef S370
21483 +    /* If this still works, and if anyone cares, this should probably  */
21484 +    /* be moved to the S390 category.                                  */
21485  #   define MACH_TYPE "S370"
21486  #   define ALIGNMENT 4 /* Required by hardware */
21487  #   define USE_GENERIC_PUSH_REGS
21488 @@ -1517,8 +1608,8 @@
21489          extern int etext[];
21490         extern int _etext[];
21491         extern int _end[];
21492 -       extern char * GC_SysVGetDataStart();
21493 -#       define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, _etext)
21494 +       extern ptr_t GC_SysVGetDataStart();
21495 +#       define DATASTART GC_SysVGetDataStart(0x10000, _etext)
21496  #      define DATAEND (_end)
21497  #      define HEURISTIC2
21498  #   endif
21499 @@ -1576,7 +1667,7 @@
21500  #            define DYNAMIC_LOADING
21501  #           include <features.h>
21502  #           if defined(__GLIBC__) && __GLIBC__ >= 2
21503 -#               define LINUX_DATA_START
21504 +#               define SEARCH_FOR_DATA_START
21505  #           else
21506                  extern char **__environ;
21507  #                define DATASTART ((ptr_t)(&__environ))
21508 @@ -1623,7 +1714,7 @@
21509  #     define STACKBOTTOM ((ptr_t) 0x7c000000)
21510  #     define USE_GENERIC_PUSH_REGS
21511  #     define DYNAMIC_LOADING
21512 -#     define LINUX_DATA_START
21513 +#     define SEARCH_FOR_DATA_START
21514        extern int _end[];
21515  #     define DATAEND (_end)
21516  #   endif
21517 @@ -1640,7 +1731,9 @@
21518  #   define MACH_TYPE "X86_64"
21519  #   define ALIGNMENT 8
21520  #   define CPP_WORDSZ 64
21521 +#   ifndef HBLKSIZE
21522  #   define HBLKSIZE 4096
21523 +#   endif
21524  #   define CACHE_LINE_SIZE 64
21525  #   define USE_GENERIC_PUSH_REGS
21526  #   ifdef LINUX
21527 @@ -1660,7 +1753,7 @@
21528  #              define DATASTART ((ptr_t)((((word) (_etext)) + 0xfff) & ~0xfff))
21529  #           endif
21530  #           include <features.h>
21531 -#           define LINUX_DATA_START
21532 +#           define SEARCH_FOR_DATA_START
21533              extern int _end[];
21534  #           define DATAEND (_end)
21535  #      else
21536 @@ -1674,19 +1767,6 @@
21537  #   endif
21538  # endif
21539  
21540 -#ifdef LINUX_DATA_START
21541 -    /* Some Linux distributions arrange to define __data_start.  Some  */
21542 -    /* define data_start as a weak symbol.  The latter is technically  */
21543 -    /* broken, since the user program may define data_start, in which  */
21544 -    /* case we lose.  Nonetheless, we try both, prefering __data_start.        */
21545 -    /* We assume gcc.  */
21546 -#   pragma weak __data_start
21547 -    extern int __data_start[];
21548 -#   pragma weak data_start
21549 -    extern int data_start[];
21550 -#   define DATASTART ((ptr_t)(__data_start != 0? __data_start : data_start))
21551 -#endif
21552 -
21553  #if defined(LINUX) && defined(REDIRECT_MALLOC)
21554      /* Rld appears to allocate some memory with its own allocator, and */
21555      /* some through malloc, which might be redirected.  To make this   */
21556 @@ -1742,8 +1822,8 @@
21557  # endif
21558  
21559  # if defined(SVR4) || defined(LINUX) || defined(IRIX) || defined(HPUX) \
21560 -    || defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \
21561 -    || defined(BSD) || defined(_AIX) || defined(MACOSX) || defined(OSF1)
21562 +           || defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) || defined(DGUX) \
21563 +           || defined(BSD) || defined(AIX) || defined(DARWIN) || defined(OSF1)
21564  #   define UNIX_LIKE   /* Basic Unix-like system calls work.   */
21565  # endif
21566  
21567 @@ -1762,13 +1842,13 @@
21568  # endif
21569  
21570  # ifdef SRC_M3
21571 -/* Postponed for now. */
21572 +       /* Postponed for now. */
21573  #   undef PROC_VDB
21574  #   undef MPROTECT_VDB
21575  # endif
21576  
21577  # ifdef SMALL_CONFIG
21578 -/* Presumably not worth the space it takes. */
21579 +       /* Presumably not worth the space it takes. */
21580  #   undef PROC_VDB
21581  #   undef MPROTECT_VDB
21582  # endif
21583 @@ -1808,8 +1888,9 @@
21584      /* platforms as well, though it should be avoided in win32.                */
21585  # endif /* LINUX */
21586  
21587 -# if defined(SEARCH_FOR_DATA_START) && defined(GC_PRIVATE_H)
21588 +# if defined(SEARCH_FOR_DATA_START)
21589      extern ptr_t GC_data_start;
21590 +#   define DATASTART GC_data_start
21591  # endif
21592  
21593  # ifndef CLEAR_DOUBLE
21594 @@ -1818,28 +1899,25 @@
21595         ((word*)x)[1] = 0;
21596  # endif /* CLEAR_DOUBLE */
21597  
21598 -/* Internally we use GC_SOLARIS_THREADS to test for either old or pthreads. */
21599 +       /* Internally we use GC_SOLARIS_THREADS to test for either old or pthreads. */
21600  # if defined(GC_SOLARIS_PTHREADS) && !defined(GC_SOLARIS_THREADS)
21601  #   define GC_SOLARIS_THREADS
21602  # endif
21603  
21604  # if defined(GC_IRIX_THREADS) && !defined(IRIX5)
21605 ---> inconsistent configuration
21606 +       --> inconsistent configuration
21607  # endif
21608  # if defined(GC_LINUX_THREADS) && !defined(LINUX)
21609 ---> inconsistent configuration
21610 +       --> inconsistent configuration
21611  # endif
21612  # if defined(GC_SOLARIS_THREADS) && !defined(SUNOS5)
21613 ---> inconsistent configuration
21614 +       --> inconsistent configuration
21615  # endif
21616  # if defined(GC_HPUX_THREADS) && !defined(HPUX)
21617 ---> inconsistent configuration
21618 +       --> inconsistent configuration
21619  # endif
21620 -# if defined(GC_WIN32_THREADS) && !defined(MSWIN32)
21621 -    /* Ideally CYGWIN32 should work, in addition to MSWIN32.  I suspect        */
21622 -    /* the necessary code is mostly there, but nobody has actually made */
21623 -    /* sure the right combination of pieces is compiled in, etc.       */
21624 ---> inconsistent configuration
21625 +# if defined(GC_WIN32_THREADS) && !defined(MSWIN32) && !defined(CYGWIN32)
21626 +       --> inconsistent configuration
21627  # endif
21628  
21629  # if defined(PCR) || defined(SRC_M3) || \
21630 @@ -1848,8 +1926,8 @@
21631  #   define THREADS
21632  # endif
21633  
21634 -# if defined(HP_PA) || defined(M88K) || defined(POWERPC) && !defined(MACOSX) \
21635 -     || defined(LINT) || defined(MSWINCE) \
21636 +# if defined(HP_PA) || defined(M88K) || defined(POWERPC) && !defined(DARWIN) \
21637 +            || defined(LINT) || defined(MSWINCE) || defined(ARM32) \
21638       || (defined(I386) && defined(__LCC__))
21639         /* Use setjmp based hack to mark from callee-save registers.    */
21640         /* The define should move to the individual platform            */
21641 @@ -1862,36 +1940,26 @@
21642                                 /* include assembly code to do it well. */
21643  # endif
21644  
21645 -/* Can we save call chain in objects for debugging?                    */
21646 -/* SET NFRAMES (# of saved frames) and NARGS (#of args for each frame) */
21647 -/* to reasonable values for the platform.                              */
21648 -/* Set SAVE_CALL_CHAIN if we can.  SAVE_CALL_COUNT can be specified at */
21649 -/* build time, though we feel free to adjust it slightly.              */
21650 -/* Define NEED_CALLINFO if we either save the call stack or            */
21651 -/* GC_ADD_CALLER is defined.                                           */
21652 -#ifdef LINUX
21653 -# include <features.h>
21654 -# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2
21655 -#   define HAVE_BUILTIN_BACKTRACE
21656 -# endif
21657 -#endif
21658 +  /* Can we save call chain in objects for debugging?                  */
21659 +  /* SET NFRAMES (# of saved frames) and NARGS (#of args for each      */
21660 +  /* frame) to reasonable values for the platform.                     */
21661 +  /* Set SAVE_CALL_CHAIN if we can.  SAVE_CALL_COUNT can be specified  */
21662 +  /* at build time, though we feel free to adjust it slightly.         */
21663 +  /* Define NEED_CALLINFO if we either save the call stack or          */
21664 +  /* GC_ADD_CALLER is defined.                                         */
21665 +  /* GC_CAN_SAVE_CALL_STACKS is set in gc.h.                           */
21666  
21667  #if defined(SPARC)
21668 -# define CAN_SAVE_CALL_STACKS
21669  # define CAN_SAVE_CALL_ARGS
21670  #endif
21671  #if (defined(I386) || defined(X86_64)) && defined(LINUX)
21672      /* SAVE_CALL_CHAIN is supported if the code is compiled to save    */
21673      /* frame pointers by default, i.e. no -fomit-frame-pointer flag.   */
21674 -# define CAN_SAVE_CALL_STACKS
21675  # define CAN_SAVE_CALL_ARGS
21676  #endif
21677 -#if defined(HAVE_BUILTIN_BACKTRACE) && !defined(CAN_SAVE_CALL_STACKS)
21678 -# define CAN_SAVE_CALL_STACKS
21679 -#endif
21680  
21681  # if defined(SAVE_CALL_COUNT) && !defined(GC_ADD_CALLER) \
21682 -     && defined(CAN_SAVE_CALL_STACKS)
21683 +            && defined(GC_CAN_SAVE_CALL_STACKS)
21684  #   define SAVE_CALL_CHAIN 
21685  # endif
21686  # ifdef SAVE_CALL_CHAIN
21687 @@ -1919,5 +1987,97 @@
21688  # if defined(MAKE_BACK_GRAPH) && !defined(DBG_HDRS_ALL)
21689  #   define DBG_HDRS_ALL
21690  # endif
21691 +
21692 +# if defined(POINTER_MASK) && !defined(POINTER_SHIFT)
21693 +#   define POINTER_SHIFT 0
21694 +# endif
21695 +
21696 +# if defined(POINTER_SHIFT) && !defined(POINTER_MASK)
21697 +#   define POINTER_MASK ((GC_word)(-1))
21698 +# endif
21699 +
21700 +# if !defined(FIXUP_POINTER) && defined(POINTER_MASK)
21701 +#   define FIXUP_POINTER(p) (p) = ((p) & (POINTER_MASK) << POINTER_SHIFT)
21702 +# endif
21703 +
21704 +# if defined(FIXUP_POINTER)
21705 +#   define NEED_FIXUP_POINTER 1
21706 +# else
21707 +#   define NEED_FIXUP_POINTER 0
21708 +#   define FIXUP_POINTER(p)
21709 +# endif
21710 +
21711 +#ifdef GC_PRIVATE_H
21712 +       /* This relies on some type definitions from gc_priv.h, from    */
21713 +        /* where it's normally included.                               */
21714 +       /*                                                              */
21715 +       /* How to get heap memory from the OS:                          */
21716 +       /* Note that sbrk()-like allocation is preferred, since it      */
21717 +       /* usually makes it possible to merge consecutively allocated   */
21718 +       /* chunks.  It also avoids unintented recursion with            */
21719 +       /* -DREDIRECT_MALLOC.                                           */
21720 +       /* GET_MEM() returns a HLKSIZE aligned chunk.                   */
21721 +       /* 0 is taken to mean failure.                                  */
21722 +       /* In the case os USE_MMAP, the argument must also be a         */
21723 +       /* physical page size.                                          */
21724 +       /* GET_MEM is currently not assumed to retrieve 0 filled space, */
21725 +       /* though we should perhaps take advantage of the case in which */
21726 +       /* does.                                                        */
21727 +       struct hblk;    /* See gc_priv.h.       */
21728 +# ifdef PCR
21729 +           char * real_malloc();
21730 +#   define GET_MEM(bytes) HBLKPTR(real_malloc((size_t)bytes + GC_page_size) \
21731 +                                         + GC_page_size-1)
21732 +# else
21733 +#   ifdef OS2
21734 +             void * os2_alloc(size_t bytes);
21735 +#     define GET_MEM(bytes) HBLKPTR((ptr_t)os2_alloc((size_t)bytes \
21736 +                                           + GC_page_size) \
21737 +                                           + GC_page_size-1)
21738 +#   else
21739 +#     if defined(NEXT) || defined(DOS4GW) || \
21740 +                (defined(AMIGA) && !defined(GC_AMIGA_FASTALLOC)) || \
21741 +                (defined(SUNOS5) && !defined(USE_MMAP))
21742 +#       define GET_MEM(bytes) HBLKPTR((size_t) \
21743 +                                             calloc(1, (size_t)bytes + GC_page_size) \
21744 +                                             + GC_page_size-1)
21745 +#     else
21746 +#      ifdef MSWIN32
21747 +         extern ptr_t GC_win32_get_mem();
21748 +#         define GET_MEM(bytes) (struct hblk *)GC_win32_get_mem(bytes)
21749 +#      else
21750 +#        ifdef MACOS
21751 +#          if defined(USE_TEMPORARY_MEMORY)
21752 +                       extern Ptr GC_MacTemporaryNewPtr(size_t size,
21753 +                                                        Boolean clearMemory);
21754 +#               define GET_MEM(bytes) HBLKPTR( \
21755 +                           GC_MacTemporaryNewPtr(bytes + GC_page_size, true) \
21756 +                           + GC_page_size-1)
21757 +#          else
21758 +#                  define GET_MEM(bytes) HBLKPTR( \
21759 +                               NewPtrClear(bytes + GC_page_size) + GC_page_size-1)
21760 +#          endif
21761 +#        else
21762 +#          ifdef MSWINCE
21763 +             extern ptr_t GC_wince_get_mem();
21764 +#            define GET_MEM(bytes) (struct hblk *)GC_wince_get_mem(bytes)
21765 +#          else
21766 +#            if defined(AMIGA) && defined(GC_AMIGA_FASTALLOC)
21767 +                       extern void *GC_amiga_get_mem(size_t size);
21768 +                       define GET_MEM(bytes) HBLKPTR((size_t) \
21769 +                         GC_amiga_get_mem((size_t)bytes + GC_page_size) \
21770 +                         + GC_page_size-1)
21771 +#            else
21772 +               extern ptr_t GC_unix_get_mem();
21773 +#               define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes)
21774 +#            endif
21775 +#          endif
21776 +#        endif
21777 +#      endif
21778 +#     endif
21779 +#   endif
21780 +# endif
21781 +
21782 +#endif /* GC_PRIVATE_H */
21783  
21784  # endif /* GCCONFIG_H */
21785 diff -buNr boehm-gc/include/private/pthread_stop_world.h boehm-gc/include/private/pthread_stop_world.h
21786 --- boehm-gc/include/private/pthread_stop_world.h       Wed Dec 31 16:00:00 1969
21787 +++ boehm-gc/include/private/pthread_stop_world.h       Sat Sep 13 01:32:42 2003
21788 @@ -0,0 +1,12 @@
21789 +#ifndef GC_PTHREAD_STOP_WORLD_H
21790 +#define GC_PTHREAD_STOP_WORLD_H
21791 +
21792 +struct thread_stop_info {
21793 +    int        signal;
21794 +    word last_stop_count;      /* GC_last_stop_count value when thread */
21795 +                               /* last successfully handled a suspend  */
21796 +                               /* signal.                              */
21797 +    ptr_t stack_ptr;           /* Valid only when stopped.             */
21798 +};
21799 +    
21800 +#endif
21801 diff -buNr boehm-gc/include/private/pthread_support.h boehm-gc/include/private/pthread_support.h
21802 --- boehm-gc/include/private/pthread_support.h  Wed Dec 31 16:00:00 1969
21803 +++ boehm-gc/include/private/pthread_support.h  Sat Sep 13 01:32:42 2003
21804 @@ -0,0 +1,97 @@
21805 +#ifndef GC_PTHREAD_SUPPORT_H
21806 +#define GC_PTHREAD_SUPPORT_H
21807 +
21808 +# include "private/gc_priv.h"
21809 +
21810 +# if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
21811 +     && !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS)
21812 +     
21813 +#if defined(GC_DARWIN_THREADS)
21814 +# include "private/darwin_stop_world.h"
21815 +#else
21816 +# include "private/pthread_stop_world.h"
21817 +#endif
21818 +
21819 +/* We use the allocation lock to protect thread-related data structures. */
21820 +
21821 +/* The set of all known threads.  We intercept thread creation and     */
21822 +/* joins.                                                              */
21823 +/* Protected by allocation/GC lock.                                    */
21824 +/* Some of this should be declared volatile, but that's inconsistent   */
21825 +/* with some library routine declarations.                             */
21826 +typedef struct GC_Thread_Rep {
21827 +    struct GC_Thread_Rep * next;  /* More recently allocated threads   */
21828 +                                 /* with a given pthread id come       */
21829 +                                 /* first.  (All but the first are     */
21830 +                                 /* guaranteed to be dead, but we may  */
21831 +                                 /* not yet have registered the join.) */
21832 +    pthread_t id;
21833 +    /* Extra bookkeeping information the stopping code uses */
21834 +    struct thread_stop_info stop_info;
21835 +    
21836 +    short flags;
21837 +#      define FINISHED 1       /* Thread has exited.   */
21838 +#      define DETACHED 2       /* Thread is intended to be detached.   */
21839 +#      define MAIN_THREAD 4    /* True for the original thread only.   */
21840 +    short thread_blocked;      /* Protected by GC lock.                */
21841 +                               /* Treated as a boolean value.  If set, */
21842 +                               /* thread will acquire GC lock before   */
21843 +                               /* doing any pointer manipulations, and */
21844 +                               /* has set its sp value.  Thus it does  */
21845 +                               /* not need to be sent a signal to stop */
21846 +                               /* it.                                  */
21847 +    ptr_t stack_end;           /* Cold end of the stack.               */
21848 +#   ifdef IA64
21849 +       ptr_t backing_store_end;
21850 +       ptr_t backing_store_ptr;
21851 +#   endif
21852 +    void * status;             /* The value returned from the thread.  */
21853 +                               /* Used only to avoid premature         */
21854 +                               /* reclamation of any data it might     */
21855 +                               /* reference.                           */
21856 +#   ifdef THREAD_LOCAL_ALLOC
21857 +#      if CPP_WORDSZ == 64 && defined(ALIGN_DOUBLE)
21858 +#          define GRANULARITY 16
21859 +#          define NFREELISTS 49
21860 +#      else
21861 +#          define GRANULARITY 8
21862 +#          define NFREELISTS 65
21863 +#      endif
21864 +       /* The ith free list corresponds to size i*GRANULARITY */
21865 +#      define INDEX_FROM_BYTES(n) ((ADD_SLOP(n) + GRANULARITY - 1)/GRANULARITY)
21866 +#      define BYTES_FROM_INDEX(i) ((i) * GRANULARITY - EXTRA_BYTES)
21867 +#      define SMALL_ENOUGH(bytes) (ADD_SLOP(bytes) <= \
21868 +                                   (NFREELISTS-1)*GRANULARITY)
21869 +       ptr_t ptrfree_freelists[NFREELISTS];
21870 +       ptr_t normal_freelists[NFREELISTS];
21871 +#      ifdef GC_GCJ_SUPPORT
21872 +         ptr_t gcj_freelists[NFREELISTS];
21873 +#      endif
21874 +               /* Free lists contain either a pointer or a small count */
21875 +               /* reflecting the number of granules allocated at that  */
21876 +               /* size.                                                */
21877 +               /* 0 ==> thread-local allocation in use, free list      */
21878 +               /*       empty.                                         */
21879 +               /* > 0, <= DIRECT_GRANULES ==> Using global allocation, */
21880 +               /*       too few objects of this size have been         */
21881 +               /*       allocated by this thread.                      */
21882 +               /* >= HBLKSIZE  => pointer to nonempty free list.       */
21883 +               /* > DIRECT_GRANULES, < HBLKSIZE ==> transition to      */
21884 +               /*    local alloc, equivalent to 0.                     */
21885 +#      define DIRECT_GRANULES (HBLKSIZE/GRANULARITY)
21886 +               /* Don't use local free lists for up to this much       */
21887 +               /* allocation.                                          */
21888 +#   endif
21889 +} * GC_thread;
21890 +
21891 +# define THREAD_TABLE_SZ 128   /* Must be power of 2   */
21892 +extern volatile GC_thread GC_threads[THREAD_TABLE_SZ];
21893 +
21894 +extern GC_bool GC_thr_initialized;
21895 +
21896 +GC_thread GC_lookup_thread(pthread_t id);
21897 +
21898 +void GC_stop_init();
21899 +
21900 +#endif /* GC_PTHREADS && !GC_SOLARIS_THREADS.... etc */
21901 +#endif /* GC_PTHREAD_SUPPORT_H */
21902 diff -buNr boehm-gc/include/private/solaris_threads.h boehm-gc/include/private/solaris_threads.h
21903 --- boehm-gc/include/private/solaris_threads.h  Tue Oct 23 16:21:39 2001
21904 +++ boehm-gc/include/private/solaris_threads.h  Sat Sep 13 01:32:42 2003
21905 @@ -16,7 +16,8 @@
21906  #      define DETACHED 2       /* Thread is intended to be detached.   */
21907  #      define CLIENT_OWNS_STACK        4
21908                                 /* Stack was supplied by client.        */
21909 -#      define SUSPENDED 8      /* Currently suspended. */
21910 +#      define SUSPNDED 8       /* Currently suspended.                 */
21911 +                              /* SUSPENDED is used insystem header.    */
21912      ptr_t stack;
21913      size_t stack_size;
21914      cond_t join_cv;
21915 diff -buNr boehm-gc/include/private/specific.h boehm-gc/include/private/specific.h
21916 --- boehm-gc/include/private/specific.h Fri Mar 29 14:52:13 2002
21917 +++ boehm-gc/include/private/specific.h Sat Sep 13 01:32:42 2003
21918 @@ -85,7 +85,7 @@
21919      unsigned hash_val = CACHE_HASH(qtid);
21920      tse * volatile * entry_ptr = key -> cache + hash_val;
21921      tse * entry = *entry_ptr;   /* Must be loaded only once.   */
21922 -    if (entry -> qtid == qtid) {
21923 +    if (EXPECT(entry -> qtid == qtid, 1)) {
21924        GC_ASSERT(entry -> thread == pthread_self());
21925        return entry -> value;
21926      }
21927 diff -buNr boehm-gc/irix_threads.c boehm-gc/irix_threads.c
21928 --- boehm-gc/irix_threads.c     Sun May 19 10:36:14 2002
21929 +++ boehm-gc/irix_threads.c     Sat Sep 13 01:32:42 2003
21930 @@ -41,6 +41,10 @@
21931  #undef pthread_join
21932  #undef pthread_detach
21933  
21934 +#ifdef HANDLE_FORK
21935 +  --> Not yet supported.  Try porting the code from linux_threads.c.
21936 +#endif
21937 +
21938  void GC_thr_init();
21939  
21940  #if 0
21941 diff -buNr boehm-gc/mach_dep.c boehm-gc/mach_dep.c
21942 --- boehm-gc/mach_dep.c Thu Jul 18 13:06:00 2002
21943 +++ boehm-gc/mach_dep.c Sat Sep 13 01:32:42 2003
21944 @@ -74,7 +74,7 @@
21945  /* on your architecture.  Run the test_setjmp program to see whether    */
21946  /* there is any chance it will work.                                    */
21947  
21948 -#ifndef USE_GENERIC_PUSH_REGS
21949 +#if !defined(USE_GENERIC_PUSH_REGS) && !defined(USE_ASM_PUSH_REGS)
21950  void GC_push_regs()
21951  {
21952  #       ifdef RT
21953 @@ -228,7 +228,8 @@
21954         || ( defined(I386) && defined(FREEBSD) && defined(__ELF__) ) \
21955         || ( defined(I386) && defined(NETBSD) && defined(__ELF__) ) \
21956         || ( defined(I386) && defined(OPENBSD) && defined(__ELF__) ) \
21957 -       || ( defined(I386) && defined(HURD) && defined(__ELF__) )
21958 +       || ( defined(I386) && defined(HURD) && defined(__ELF__) ) \
21959 +       || ( defined(I386) && defined(DGUX) )
21960  
21961         /* This is modified for Linux with ELF (Note: _ELF_ only) */
21962         /* This section handles FreeBSD with ELF. */
21963 @@ -377,7 +378,7 @@
21964        /* other machines... */
21965  #       if !defined(M68K) && !defined(VAX) && !defined(RT) 
21966  #      if !defined(SPARC) && !defined(I386) && !defined(NS32K)
21967 -#      if !defined(POWERPC) && !defined(UTS4) 
21968 +#      if !(defined(POWERPC) && defined(LINUX)) && !defined(UTS4) 
21969  #       if !defined(PJ) && !(defined(MIPS) && defined(LINUX))
21970             --> bad news <--
21971  #      endif
21972 @@ -385,7 +386,7 @@
21973  #       endif
21974  #       endif
21975  }
21976 -#endif /* !USE_GENERIC_PUSH_REGS */
21977 +#endif /* !USE_GENERIC_PUSH_REGS && !USE_ASM_PUSH_REGS */
21978  
21979  #if defined(USE_GENERIC_PUSH_REGS)
21980  void GC_generic_push_regs(cold_gc_frame)
21981 diff -buNr boehm-gc/malloc.c boehm-gc/malloc.c
21982 --- boehm-gc/malloc.c   Mon Feb 11 20:37:53 2002
21983 +++ boehm-gc/malloc.c   Sat Sep 13 01:32:42 2003
21984 @@ -182,6 +182,7 @@
21985      ptr_t result;
21986      DCL_LOCK_STATE;
21987  
21988 +    if (GC_have_errors) GC_print_all_errors();
21989      GC_INVOKE_FINALIZERS();
21990      if (SMALL_OBJ(lb)) {
21991         DISABLE_SIGNALS();
21992 @@ -294,6 +295,11 @@
21993              return(GENERAL_MALLOC((word)lb, NORMAL));
21994          }
21995          /* See above comment on signals.       */
21996 +       GC_ASSERT(0 == obj_link(op)
21997 +                 || (word)obj_link(op)
21998 +                       <= (word)GC_greatest_plausible_heap_addr
21999 +                    && (word)obj_link(op)
22000 +                       >= (word)GC_least_plausible_heap_addr);
22001          *opp = obj_link(op);
22002          obj_link(op) = 0;
22003          GC_words_allocd += lw;
22004 @@ -338,6 +344,7 @@
22005      return((GC_PTR)REDIRECT_MALLOC(n*lb));
22006    }
22007  
22008 +#ifndef strdup
22009  # include <string.h>
22010  # ifdef __STDC__
22011      char *strdup(const char *s)
22012 @@ -346,11 +353,16 @@
22013      char *s;
22014  # endif
22015    {
22016 -    size_t len = strlen + 1;
22017 +    size_t len = strlen(s) + 1;
22018      char * result = ((char *)REDIRECT_MALLOC(len+1));
22019      BCOPY(s, result, len+1);
22020      return result;
22021    }
22022 +#endif /* !defined(strdup) */
22023 + /* If strdup is macro defined, we assume that it actually calls malloc, */
22024 + /* and thus the right thing will happen even without overriding it.    */
22025 + /* This seems to be true on most Linux systems.                        */
22026 +
22027  # endif /* REDIRECT_MALLOC */
22028  
22029  /* Explicitly deallocate an object p.                          */
22030 @@ -373,6 +385,7 @@
22031         /* Required by ANSI.  It's not my fault ...     */
22032      h = HBLKPTR(p);
22033      hhdr = HDR(h);
22034 +    GC_ASSERT(GC_base(p) == p);
22035  #   if defined(REDIRECT_MALLOC) && \
22036         (defined(GC_SOLARIS_THREADS) || defined(GC_LINUX_THREADS) \
22037          || defined(__MINGW32__)) /* Should this be MSWIN32 in general? */
22038 @@ -454,7 +467,10 @@
22039  }
22040  #endif /* THREADS */
22041  
22042 -# ifdef REDIRECT_MALLOC
22043 +# if defined(REDIRECT_MALLOC) && !defined(REDIRECT_FREE)
22044 +#   define REDIRECT_FREE GC_free
22045 +# endif
22046 +# ifdef REDIRECT_FREE
22047  #   ifdef __STDC__
22048        void free(GC_PTR p)
22049  #   else
22050 @@ -463,7 +479,7 @@
22051  #   endif
22052    {
22053  #   ifndef IGNORE_FREE
22054 -      GC_free(p);
22055 +      REDIRECT_FREE(p);
22056  #   endif
22057    }
22058  # endif  /* REDIRECT_MALLOC */
22059 diff -buNr boehm-gc/mallocx.c boehm-gc/mallocx.c
22060 --- boehm-gc/mallocx.c  Fri Aug 17 18:04:43 2001
22061 +++ boehm-gc/mallocx.c  Sat Sep 13 01:32:42 2003
22062 @@ -142,7 +142,11 @@
22063      }
22064  }
22065  
22066 -# if defined(REDIRECT_MALLOC) || defined(REDIRECT_REALLOC)
22067 +# if defined(REDIRECT_MALLOC) && !defined(REDIRECT_REALLOC)
22068 +#   define REDIRECT_REALLOC GC_realloc
22069 +# endif
22070 +
22071 +# ifdef REDIRECT_REALLOC
22072  # ifdef __STDC__
22073      GC_PTR realloc(GC_PTR p, size_t lb)
22074  # else
22075 @@ -151,13 +155,9 @@
22076      size_t lb;
22077  # endif
22078    {
22079 -#   ifdef REDIRECT_REALLOC
22080        return(REDIRECT_REALLOC(p, lb));
22081 -#   else
22082 -      return(GC_realloc(p, lb));
22083 -#   endif
22084    }
22085 -# endif /* REDIRECT_MALLOC */
22086 +# endif /* REDIRECT_REALLOC */
22087  
22088  
22089  /* The same thing, except caller does not hold allocation lock.        */
22090 @@ -177,6 +177,7 @@
22091      lw = ROUNDED_UP_WORDS(lb);
22092      n_blocks = OBJ_SZ_TO_BLOCKS(lw);
22093      init = GC_obj_kinds[k].ok_init;
22094 +    if (GC_have_errors) GC_print_all_errors();
22095      GC_INVOKE_FINALIZERS();
22096      DISABLE_SIGNALS();
22097      LOCK();
22098 @@ -286,6 +287,7 @@
22099  register ptr_t op;
22100  DCL_LOCK_STATE;
22101  
22102 +    if (GC_have_errors) GC_print_all_errors();
22103      GC_INVOKE_FINALIZERS();
22104      DISABLE_SIGNALS();
22105      LOCK();
22106 @@ -354,6 +356,7 @@
22107          return;
22108      }
22109      lw = ALIGNED_WORDS(lb);
22110 +    if (GC_have_errors) GC_print_all_errors();
22111      GC_INVOKE_FINALIZERS();
22112      DISABLE_SIGNALS();
22113      LOCK();
22114 @@ -375,6 +378,7 @@
22115         while ((hbp = *rlh) != 0) {
22116              hhdr = HDR(hbp);
22117              *rlh = hhdr -> hb_next;
22118 +           hhdr -> hb_last_reclaimed = (unsigned short) GC_gc_no;
22119  #          ifdef PARALLEL_MARK
22120                 {
22121                   signed_word my_words_allocd_tmp = GC_words_allocd_tmp;
22122 @@ -574,6 +578,44 @@
22123         return((GC_PTR) op);
22124      }
22125  }
22126 +
22127 +#ifdef __STDC__
22128 +/* Not well tested nor integrated.     */
22129 +/* Debug version is tricky and currently missing.      */
22130 +#include <limits.h>
22131 +
22132 +GC_PTR GC_memalign(size_t align, size_t lb) 
22133 +{ 
22134 +    size_t new_lb;
22135 +    size_t offset;
22136 +    ptr_t result;
22137 +
22138 +#   ifdef ALIGN_DOUBLE
22139 +       if (align <= WORDS_TO_BYTES(2) && lb > align) return GC_malloc(lb);
22140 +#   endif
22141 +    if (align <= WORDS_TO_BYTES(1)) return GC_malloc(lb);
22142 +    if (align >= HBLKSIZE/2 || lb >= HBLKSIZE/2) {
22143 +        if (align > HBLKSIZE) return GC_oom_fn(LONG_MAX-1024) /* Fail */;
22144 +       return GC_malloc(lb <= HBLKSIZE? HBLKSIZE : lb);
22145 +           /* Will be HBLKSIZE aligned.        */
22146 +    }
22147 +    /* We could also try to make sure that the real rounded-up object size */
22148 +    /* is a multiple of align.  That would be correct up to HBLKSIZE.     */
22149 +    new_lb = lb + align - 1;
22150 +    result = GC_malloc(new_lb);
22151 +    offset = (word)result % align;
22152 +    if (offset != 0) {
22153 +       offset = align - offset;
22154 +        if (!GC_all_interior_pointers) {
22155 +           if (offset >= VALID_OFFSET_SZ) return GC_malloc(HBLKSIZE);
22156 +           GC_register_displacement(offset);
22157 +       }
22158 +    }
22159 +    result = (GC_PTR) ((ptr_t)result + offset);
22160 +    GC_ASSERT((word)result % align == 0);
22161 +    return result;
22162 +}
22163 +#endif 
22164  
22165  # ifdef ATOMIC_UNCOLLECTABLE
22166  /* Allocate lb bytes of pointerfree, untraced, uncollectable data      */
22167 diff -buNr boehm-gc/mark.c boehm-gc/mark.c
22168 --- boehm-gc/mark.c     Fri Mar 29 14:52:12 2002
22169 +++ boehm-gc/mark.c     Sat Sep 13 01:32:42 2003
22170 @@ -19,6 +19,10 @@
22171  # include <stdio.h>
22172  # include "private/gc_pmark.h"
22173  
22174 +#if defined(MSWIN32) && defined(__GNUC__)
22175 +# include <excpt.h>
22176 +#endif
22177 +
22178  /* We put this here to minimize the risk of inlining. */
22179  /*VARARGS*/
22180  #ifdef __WATCOMC__
22181 @@ -261,20 +265,20 @@
22182  /* remains valid until all marking is complete.                */
22183  /* A zero value indicates that it's OK to miss some    */
22184  /* register values.                                    */
22185 -GC_bool GC_mark_some(cold_gc_frame)
22186 -ptr_t cold_gc_frame;
22187 +/* We hold the allocation lock.  In the case of        */
22188 +/* incremental collection, the world may not be stopped.*/
22189 +#ifdef MSWIN32
22190 +  /* For win32, this is called after we establish a structured */
22191 +  /* exception handler, in case Windows unmaps one of our root */
22192 +  /* segments.  See below.  In either case, we acquire the     */
22193 +  /* allocator lock long before we get here.                   */
22194 +  GC_bool GC_mark_some_inner(cold_gc_frame)
22195 +  ptr_t cold_gc_frame;
22196 +#else
22197 +  GC_bool GC_mark_some(cold_gc_frame)
22198 +  ptr_t cold_gc_frame;
22199 +#endif
22200  {
22201 -#if defined(MSWIN32) && !defined(__GNUC__)
22202 -  /* Windows 98 appears to asynchronously create and remove writable   */
22203 -  /* memory mappings, for reasons we haven't yet understood.  Since    */
22204 -  /* we look for writable regions to determine the root set, we may    */
22205 -  /* try to mark from an address range that disappeared since we       */
22206 -  /* started the collection.  Thus we have to recover from faults here. */
22207 -  /* This code does not appear to be necessary for Windows 95/NT/2000. */ 
22208 -  /* Note that this code should never generate an incremental GC write */
22209 -  /* fault.                                                            */
22210 -  __try {
22211 -#endif /* defined(MSWIN32) && !defined(__GNUC__) */
22212      switch(GC_mark_state) {
22213         case MS_NONE:
22214             return(FALSE);
22215 @@ -395,23 +399,130 @@
22216             ABORT("GC_mark_some: bad state");
22217             return(FALSE);
22218      }
22219 -#if defined(MSWIN32) && !defined(__GNUC__)
22220 +}
22221 +
22222 +
22223 +#ifdef MSWIN32
22224 +
22225 +# ifdef __GNUC__
22226 +
22227 +    typedef struct {
22228 +      EXCEPTION_REGISTRATION ex_reg;
22229 +      void *alt_path;
22230 +    } ext_ex_regn;
22231 +
22232 +
22233 +    static EXCEPTION_DISPOSITION mark_ex_handler(
22234 +        struct _EXCEPTION_RECORD *ex_rec, 
22235 +        void *est_frame,
22236 +        struct _CONTEXT *context,
22237 +        void *disp_ctxt)
22238 +    {
22239 +        if (ex_rec->ExceptionCode == STATUS_ACCESS_VIOLATION) {
22240 +          ext_ex_regn *xer = (ext_ex_regn *)est_frame;
22241 +
22242 +          /* Unwind from the inner function assuming the standard */
22243 +          /* function prologue.                                   */
22244 +          /* Assumes code has not been compiled with              */
22245 +          /* -fomit-frame-pointer.                                */
22246 +          context->Esp = context->Ebp;
22247 +          context->Ebp = *((DWORD *)context->Esp);
22248 +          context->Esp = context->Esp - 8;
22249 +
22250 +          /* Resume execution at the "real" handler within the    */
22251 +          /* wrapper function.                                    */
22252 +          context->Eip = (DWORD )(xer->alt_path);
22253 +
22254 +          return ExceptionContinueExecution;
22255 +
22256 +        } else {
22257 +            return ExceptionContinueSearch;
22258 +        }
22259 +    }
22260 +# endif /* __GNUC__ */
22261 +
22262 +
22263 +  GC_bool GC_mark_some(cold_gc_frame)
22264 +  ptr_t cold_gc_frame;
22265 +  {
22266 +      GC_bool ret_val;
22267 +
22268 +#   ifndef __GNUC__
22269 +      /* Windows 98 appears to asynchronously create and remove  */
22270 +      /* writable memory mappings, for reasons we haven't yet    */
22271 +      /* understood.  Since we look for writable regions to      */
22272 +      /* determine the root set, we may try to mark from an      */
22273 +      /* address range that disappeared since we started the     */
22274 +      /* collection.  Thus we have to recover from faults here.  */
22275 +      /* This code does not appear to be necessary for Windows   */
22276 +      /* 95/NT/2000. Note that this code should never generate   */
22277 +      /* an incremental GC write fault.                          */
22278 +
22279 +      __try {
22280 +
22281 +#   else /* __GNUC__ */
22282 +
22283 +      /* Manually install an exception handler since GCC does    */
22284 +      /* not yet support Structured Exception Handling (SEH) on  */
22285 +      /* Win32.                                                  */
22286 +
22287 +      ext_ex_regn er;
22288 +
22289 +      er.alt_path = &&handle_ex;
22290 +      er.ex_reg.handler = mark_ex_handler;
22291 +      asm volatile ("movl %%fs:0, %0" : "=r" (er.ex_reg.prev));
22292 +      asm volatile ("movl %0, %%fs:0" : : "r" (&er));
22293 +
22294 +#   endif /* __GNUC__ */
22295 +
22296 +          ret_val = GC_mark_some_inner(cold_gc_frame);
22297 +
22298 +#   ifndef __GNUC__
22299 +
22300    } __except (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ?
22301             EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) {
22302 +
22303 +#   else /* __GNUC__ */
22304 +
22305 +          /* Prevent GCC from considering the following code unreachable */
22306 +          /* and thus eliminating it.                                    */
22307 +          if (er.alt_path != 0)
22308 +              goto rm_handler;
22309 +
22310 +handle_ex:
22311 +          /* Execution resumes from here on an access violation. */
22312 +
22313 +#   endif /* __GNUC__ */
22314 +
22315  #   ifdef CONDPRINT
22316        if (GC_print_stats) {
22317         GC_printf0("Caught ACCESS_VIOLATION in marker. "
22318                    "Memory mapping disappeared.\n");
22319        }
22320  #   endif /* CONDPRINT */
22321 +
22322      /* We have bad roots on the stack.  Discard mark stack.    */
22323      /* Rescan from marked objects.  Redetermine roots.         */
22324      GC_invalidate_mark_state();        
22325      scan_ptr = 0;
22326 -    return FALSE;
22327 +
22328 +          ret_val = FALSE;
22329 +
22330 +#   ifndef __GNUC__
22331 +
22332    }
22333 -#endif /* defined(MSWIN32) && !defined(__GNUC__) */
22334 -}
22335 +
22336 +#   else /* __GNUC__ */
22337 +
22338 +rm_handler:
22339 +      /* Uninstall the exception handler */
22340 +      asm volatile ("mov %0, %%fs:0" : : "r" (er.ex_reg.prev));
22341 +
22342 +#   endif /* __GNUC__ */
22343 +
22344 +      return ret_val;
22345 +  }
22346 +#endif /* MSWIN32 */
22347  
22348  
22349  GC_bool GC_mark_stack_empty()
22350 @@ -434,13 +545,7 @@
22351  /*       for the large object.                                         */
22352  /*     - just return current if it does not point to a large object.   */
22353  /*ARGSUSED*/
22354 -# ifdef PRINT_BLACK_LIST
22355 -  ptr_t GC_find_start(current, hhdr, new_hdr_p, source)
22356 -  ptr_t source;
22357 -# else
22358 -  ptr_t GC_find_start(current, hhdr, new_hdr_p)
22359 -# define source 0
22360 -# endif
22361 +ptr_t GC_find_start(current, hhdr, new_hdr_p)
22362  register ptr_t current;
22363  register hdr *hhdr, **new_hdr_p;
22364  {
22365 @@ -468,7 +573,6 @@
22366      } else {
22367          return(current);
22368      }
22369 -#   undef source
22370  }
22371  
22372  void GC_invalidate_mark_state()
22373 @@ -546,8 +650,8 @@
22374            /* Large length.                                             */
22375            /* Process part of the range to avoid pushing too much on the        */
22376            /* stack.                                                    */
22377 -         GC_ASSERT(descr < GC_greatest_plausible_heap_addr
22378 -                           - GC_least_plausible_heap_addr);
22379 +         GC_ASSERT(descr < (word)GC_greatest_plausible_heap_addr
22380 +                           - (word)GC_least_plausible_heap_addr);
22381  #        ifdef PARALLEL_MARK
22382  #          define SHARE_BYTES 2048
22383             if (descr > SHARE_BYTES && GC_parallel
22384 @@ -578,6 +682,7 @@
22385            while (descr != 0) {
22386              if ((signed_word)descr < 0) {
22387                current = *current_p;
22388 +             FIXUP_POINTER(current);
22389               if ((ptr_t)current >= least_ha && (ptr_t)current < greatest_ha) {
22390                 PREFETCH(current);
22391                  HC_PUSH_CONTENTS((ptr_t)current, mark_stack_top,
22392 @@ -652,6 +757,7 @@
22393           PREFETCH((ptr_t)limit - PREF_DIST*CACHE_LINE_SIZE);
22394           GC_ASSERT(limit >= current_p);
22395           deferred = *limit;
22396 +         FIXUP_POINTER(deferred);
22397           limit = (word *)((char *)limit - ALIGNMENT);
22398           if ((ptr_t)deferred >= least_ha && (ptr_t)deferred <  greatest_ha) {
22399             PREFETCH(deferred);
22400 @@ -661,6 +767,7 @@
22401           /* Unroll once, so we don't do too many of the prefetches     */
22402           /* based on limit.                                            */
22403           deferred = *limit;
22404 +         FIXUP_POINTER(deferred);
22405           limit = (word *)((char *)limit - ALIGNMENT);
22406           if ((ptr_t)deferred >= least_ha && (ptr_t)deferred <  greatest_ha) {
22407             PREFETCH(deferred);
22408 @@ -675,6 +782,7 @@
22409         /* Since HC_PUSH_CONTENTS expands to a lot of code,     */
22410         /* we don't.                                            */
22411          current = *current_p;
22412 +       FIXUP_POINTER(current);
22413          PREFETCH((ptr_t)current_p + PREF_DIST*CACHE_LINE_SIZE);
22414          if ((ptr_t)current >= least_ha && (ptr_t)current <  greatest_ha) {
22415           /* Prefetch the contents of the object we just pushed.  It's  */
22416 @@ -726,22 +834,33 @@
22417      mse *top = local - 1;
22418      unsigned i = 0;
22419  
22420 +    /* Make sure that prior writes to the mark stack are visible. */
22421 +    /* On some architectures, the fact that the reads are        */
22422 +    /* volatile should suffice.                                          */
22423 +#   if !defined(IA64) && !defined(HP_PA) && !defined(I386)
22424 +      GC_memory_barrier();
22425 +#   endif
22426      GC_ASSERT(high >= low-1 && high - low + 1 <= GC_mark_stack_size);
22427      for (p = low; p <= high && i <= max; ++p) {
22428         word descr = *(volatile word *) &(p -> mse_descr);
22429 +       /* In the IA64 memory model, the following volatile store is    */
22430 +       /* ordered after this read of descr.  Thus a thread must read   */
22431 +       /* the original nonzero value.  HP_PA appears to be similar,    */
22432 +       /* and if I'm reading the P4 spec correctly, X86 is probably    */
22433 +       /* also OK.  In some other cases we need a barrier.             */
22434 +#       if !defined(IA64) && !defined(HP_PA) && !defined(I386)
22435 +          GC_memory_barrier();
22436 +#       endif
22437         if (descr != 0) {
22438             *(volatile word *) &(p -> mse_descr) = 0;
22439 +           /* More than one thread may get this entry, but that's only */
22440 +           /* a minor performance problem.                             */
22441             ++top;
22442             top -> mse_descr = descr;
22443             top -> mse_start = p -> mse_start;
22444             GC_ASSERT(  top -> mse_descr & GC_DS_TAGS != GC_DS_LENGTH || 
22445                         top -> mse_descr < GC_greatest_plausible_heap_addr
22446                                            - GC_least_plausible_heap_addr);
22447 -           /* There is no synchronization here.  We assume that at     */
22448 -           /* least one thread will see the original descriptor.       */
22449 -           /* Otherwise we need a barrier.                             */
22450 -           /* More than one thread may get this entry, but that's only */
22451 -           /* a minor performance problem.                             */
22452             /* If this is a big object, count it as                     */
22453             /* size/256 + 1 objects.                                    */
22454             ++i;
22455 @@ -778,7 +897,7 @@
22456        BCOPY(low, my_start, stack_size * sizeof(mse));
22457        GC_ASSERT(GC_mark_stack_top = my_top);
22458  #     if !defined(IA64) && !defined(HP_PA)
22459 -        GC_memory_write_barrier();
22460 +        GC_memory_barrier();
22461  #     endif
22462         /* On IA64, the volatile write acts as a release barrier. */
22463        GC_mark_stack_top = my_top + stack_size;
22464 @@ -1342,7 +1461,7 @@
22465  #   define GC_least_plausible_heap_addr least_ha
22466  
22467      if (top == 0) return;
22468 -    /* check all pointers in range and put in push if they appear */
22469 +    /* check all pointers in range and push if they appear     */
22470      /* to be valid.                                              */
22471        lim = t - 1 /* longword */;
22472        for (p = b; p <= lim; p = (word *)(((char *)p) + ALIGNMENT)) {
22473 @@ -1366,7 +1485,7 @@
22474  ptr_t top;
22475  ptr_t cold_gc_frame;
22476  {
22477 -  if (GC_all_interior_pointers) {
22478 +  if (!NEED_FIXUP_POINTER && GC_all_interior_pointers) {
22479  #   define EAGER_BYTES 1024
22480      /* Push the hot end of the stack eagerly, so that register values   */
22481      /* saved inside GC frames are marked before they disappear.                */
22482 @@ -1375,6 +1494,7 @@
22483         GC_push_all_stack(bottom, top);
22484         return;
22485      }
22486 +    GC_ASSERT(bottom <= cold_gc_frame && cold_gc_frame <= top);
22487  #   ifdef STACK_GROWS_DOWN
22488         GC_push_all(cold_gc_frame - sizeof(ptr_t), top);
22489         GC_push_all_eager(bottom, cold_gc_frame);
22490 @@ -1395,7 +1515,7 @@
22491  ptr_t bottom;
22492  ptr_t top;
22493  {
22494 -  if (GC_all_interior_pointers) {
22495 +  if (!NEED_FIXUP_POINTER && GC_all_interior_pointers) {
22496      GC_push_all(bottom, top);
22497    } else {
22498      GC_push_all_eager(bottom, top);
22499 diff -buNr boehm-gc/mark_rts.c boehm-gc/mark_rts.c
22500 --- boehm-gc/mark_rts.c Mon Mar  3 22:38:29 2003
22501 +++ boehm-gc/mark_rts.c Sat Sep 13 01:32:42 2003
22502 @@ -275,33 +275,72 @@
22503  }
22504  
22505  /* Internal use only; lock held.       */
22506 -void GC_remove_tmp_roots()
22507 +static void GC_remove_root_at_pos(i) 
22508 +int i;
22509  {
22510 -    register int i;
22511 -    
22512 -    for (i = 0; i < n_root_sets; ) {
22513 -       if (GC_static_roots[i].r_tmp) {
22514 -           GC_root_size -=
22515 -               (GC_static_roots[i].r_end - GC_static_roots[i].r_start);
22516 +    GC_root_size -= (GC_static_roots[i].r_end - GC_static_roots[i].r_start);
22517             GC_static_roots[i].r_start = GC_static_roots[n_root_sets-1].r_start;
22518             GC_static_roots[i].r_end = GC_static_roots[n_root_sets-1].r_end;
22519             GC_static_roots[i].r_tmp = GC_static_roots[n_root_sets-1].r_tmp;
22520             n_root_sets--;
22521 -       } else {
22522 -           i++;
22523 -       }
22524 -    }
22525 -#   if !defined(MSWIN32) && !defined(MSWINCE)
22526 -    {
22527 +}
22528 +
22529 +#if !defined(MSWIN32) && !defined(MSWINCE)
22530 +static void GC_rebuild_root_index()
22531 +{
22532         register int i;
22533         
22534         for (i = 0; i < RT_SIZE; i++) GC_root_index[i] = 0;
22535         for (i = 0; i < n_root_sets; i++)
22536                 add_roots_to_index(GC_static_roots + i);
22537 +}
22538 +#endif
22539 +
22540 +/* Internal use only; lock held.       */
22541 +void GC_remove_tmp_roots()
22542 +{
22543 +    register int i;
22544 +    
22545 +    for (i = 0; i < n_root_sets; ) {
22546 +       if (GC_static_roots[i].r_tmp) {
22547 +            GC_remove_root_at_pos(i);
22548 +       } else {
22549 +           i++;
22550      }
22551 -#   endif
22552 +    }
22553 +    #if !defined(MSWIN32) && !defined(MSWINCE)
22554 +    GC_rebuild_root_index();
22555 +    #endif
22556 +}
22557 +
22558 +#if !defined(MSWIN32) && !defined(MSWINCE)
22559 +void GC_remove_roots(b, e)
22560 +char * b; char * e;
22561 +{
22562 +    DCL_LOCK_STATE;
22563      
22564 +    DISABLE_SIGNALS();
22565 +    LOCK();
22566 +    GC_remove_roots_inner(b, e);
22567 +    UNLOCK();
22568 +    ENABLE_SIGNALS();
22569 +}
22570 +
22571 +/* Should only be called when the lock is held */
22572 +void GC_remove_roots_inner(b,e)
22573 +char * b; char * e;
22574 +{
22575 +    int i;
22576 +    for (i = 0; i < n_root_sets; ) {
22577 +       if (GC_static_roots[i].r_start >= (ptr_t)b && GC_static_roots[i].r_end <= (ptr_t)e) {
22578 +            GC_remove_root_at_pos(i);
22579 +       } else {
22580 +           i++;
22581 +       }
22582 +    }
22583 +    GC_rebuild_root_index();
22584  }
22585 +#endif /* !defined(MSWIN32) && !defined(MSWINCE) */
22586  
22587  #if defined(MSWIN32) || defined(_WIN32_WCE_EMULATION)
22588  /* Workaround for the OS mapping and unmapping behind our back:                */
22589 @@ -573,8 +612,11 @@
22590  
22591       /* Mark thread local free lists, even if their mark       */
22592       /* descriptor excludes the link field.                    */
22593 +     /* If the world is not stopped, this is unsafe.  It is    */
22594 +     /* also unnecessary, since we will do this again with the */
22595 +     /* world stopped.                                         */
22596  #      ifdef THREAD_LOCAL_ALLOC
22597 -         GC_mark_thread_local_free_lists();
22598 +         if (GC_world_stopped) GC_mark_thread_local_free_lists();
22599  #      endif
22600  
22601      /*
22602 diff -buNr boehm-gc/misc.c boehm-gc/misc.c
22603 --- boehm-gc/misc.c     Mon Mar  3 22:38:30 2003
22604 +++ boehm-gc/misc.c     Sat Sep 13 01:32:42 2003
22605 @@ -46,8 +46,10 @@
22606  #      ifdef GC_SOLARIS_THREADS
22607           mutex_t GC_allocate_ml;       /* Implicitly initialized.      */
22608  #      else
22609 -#          ifdef GC_WIN32_THREADS
22610 -#            if !defined(GC_NOT_DLL) && (defined(_DLL) || defined(GC_DLL))
22611 +#          if defined(GC_WIN32_THREADS) 
22612 +#             if defined(GC_PTHREADS)
22613 +                 pthread_mutex_t GC_allocate_ml = PTHREAD_MUTEX_INITIALIZER;
22614 +#            elif defined(GC_DLL)
22615                  __declspec(dllexport) CRITICAL_SECTION GC_allocate_ml;
22616  #            else
22617                  CRITICAL_SECTION GC_allocate_ml;
22618 @@ -90,6 +92,7 @@
22619         /* defined here so we don't have to load debug_malloc.o */
22620  
22621  void (*GC_check_heap) GC_PROTO((void)) = (void (*) GC_PROTO((void)))0;
22622 +void (*GC_print_all_smashed) GC_PROTO((void)) = (void (*) GC_PROTO((void)))0;
22623  
22624  void (*GC_start_call_back) GC_PROTO((void)) = (void (*) GC_PROTO((void)))0;
22625  
22626 @@ -109,6 +112,10 @@
22627  
22628  GC_bool GC_print_back_height = 0;
22629  
22630 +#ifndef NO_DEBUGGING
22631 +  GC_bool GC_dump_regularly = 0;  /* Generate regular debugging dumps. */
22632 +#endif
22633 +
22634  #ifdef FIND_LEAK
22635    int GC_find_leak = 1;
22636  #else
22637 @@ -137,6 +144,13 @@
22638  
22639  extern signed_word GC_mem_found;
22640  
22641 +void * GC_project2(arg1, arg2)
22642 +void *arg1;
22643 +void *arg2;
22644 +{
22645 +  return arg2;
22646 +}
22647 +
22648  # ifdef MERGE_SIZES
22649      /* Set things up so that GC_size_map[i] >= words(i),               */
22650      /* but not too much bigger                                         */
22651 @@ -455,7 +469,7 @@
22652      
22653      DISABLE_SIGNALS();
22654  
22655 -#ifdef MSWIN32
22656 +#if defined(GC_WIN32_THREADS) && !defined(GC_PTHREADS)
22657      if (!GC_is_initialized) InitializeCriticalSection(&GC_allocate_ml);
22658  #endif /* MSWIN32 */
22659  
22660 @@ -473,6 +487,15 @@
22661           GC_init_parallel();
22662         }
22663  #   endif /* PARALLEL_MARK || THREAD_LOCAL_ALLOC */
22664 +
22665 +#   if defined(DYNAMIC_LOADING) && defined(DARWIN)
22666 +    {
22667 +        /* This must be called WITHOUT the allocation lock held
22668 +        and before any threads are created */
22669 +        extern void GC_init_dyld();
22670 +        GC_init_dyld();
22671 +    }
22672 +#   endif
22673  }
22674  
22675  #if defined(MSWIN32) || defined(MSWINCE)
22676 @@ -485,6 +508,22 @@
22677  
22678  extern void GC_setpagesize();
22679  
22680 +
22681 +#ifdef MSWIN32
22682 +extern GC_bool GC_no_win32_dlls;
22683 +#else
22684 +# define GC_no_win32_dlls FALSE
22685 +#endif
22686 +
22687 +void GC_exit_check GC_PROTO((void))
22688 +{
22689 +   GC_gcollect();
22690 +}
22691 +
22692 +#ifdef SEARCH_FOR_DATA_START
22693 +  extern void GC_init_linux_data_start GC_PROTO((void));
22694 +#endif
22695 +
22696  #ifdef UNIX_LIKE
22697  
22698  extern void GC_set_and_save_fault_handler GC_PROTO((void (*handler)(int)));
22699 @@ -495,12 +534,23 @@
22700      GC_err_printf1("Caught signal %d: looping in handler\n", sig);
22701      for(;;);
22702  }
22703 -#endif
22704  
22705 -#ifdef MSWIN32
22706 -extern GC_bool GC_no_win32_dlls;
22707 -#else
22708 -# define GC_no_win32_dlls FALSE
22709 +static GC_bool installed_looping_handler = FALSE;
22710 +
22711 +void maybe_install_looping_handler()
22712 +{
22713 +    /* Install looping handler before the write fault handler, so we   */
22714 +    /* handle write faults correctly.                                  */
22715 +      if (!installed_looping_handler && 0 != GETENV("GC_LOOP_ON_ABORT")) {
22716 +        GC_set_and_save_fault_handler(looping_handler);
22717 +        installed_looping_handler = TRUE;
22718 +      }
22719 +}
22720 +
22721 +#else /* !UNIX_LIKE */
22722 +
22723 +# define maybe_install_looping_handler()
22724 +
22725  #endif
22726  
22727  void GC_init_inner()
22728 @@ -517,12 +567,19 @@
22729  #   if defined(MSWIN32) || defined(MSWINCE)
22730         InitializeCriticalSection(&GC_write_cs);
22731  #   endif
22732 -
22733      if (0 != GETENV("GC_PRINT_STATS")) {
22734        GC_print_stats = 1;
22735      } 
22736 +#   ifndef NO_DEBUGGING
22737 +      if (0 != GETENV("GC_DUMP_REGULARLY")) {
22738 +        GC_dump_regularly = 1;
22739 +      }
22740 +#   endif
22741      if (0 != GETENV("GC_FIND_LEAK")) {
22742        GC_find_leak = 1;
22743 +#     ifdef __STDC__
22744 +        atexit(GC_exit_check);
22745 +#     endif
22746      }
22747      if (0 != GETENV("GC_ALL_INTERIOR_POINTERS")) {
22748        GC_all_interior_pointers = 1;
22749 @@ -560,11 +617,7 @@
22750          }
22751        }
22752      }
22753 -#   ifdef UNIX_LIKE
22754 -      if (0 != GETENV("GC_LOOP_ON_ABORT")) {
22755 -        GC_set_and_save_fault_handler(looping_handler);
22756 -      }
22757 -#   endif
22758 +    maybe_install_looping_handler();
22759      /* Adjust normal object descriptor for extra allocation.   */
22760      if (ALIGNMENT > GC_DS_TAGS && EXTRA_BYTES != 0) {
22761        GC_obj_kinds[NORMAL].ok_descriptor = ((word)(-ALIGNMENT) | GC_DS_LENGTH);
22762 @@ -599,11 +652,21 @@
22763  #       if defined(LINUX) && defined(IA64)
22764           GC_register_stackbottom = GC_get_register_stack_base();
22765  #       endif
22766 +      } else {
22767 +#       if defined(LINUX) && defined(IA64)
22768 +         if (GC_register_stackbottom == 0) {
22769 +           WARN("GC_register_stackbottom should be set with GC_stackbottom", 0);
22770 +           /* The following is likely to fail, since we rely on        */
22771 +           /* alignment properties that may not hold with a user set   */
22772 +           /* GC_stackbottom.                                          */
22773 +           GC_register_stackbottom = GC_get_register_stack_base();
22774        }
22775  #   endif
22776 -    GC_ASSERT(sizeof (ptr_t) == sizeof(word));
22777 -    GC_ASSERT(sizeof (signed_word) == sizeof(word));
22778 -    GC_ASSERT(sizeof (struct hblk) == HBLKSIZE);
22779 +      }
22780 +#   endif
22781 +    GC_STATIC_ASSERT(sizeof (ptr_t) == sizeof(word));
22782 +    GC_STATIC_ASSERT(sizeof (signed_word) == sizeof(word));
22783 +    GC_STATIC_ASSERT(sizeof (struct hblk) == HBLKSIZE);
22784  #   ifndef THREADS
22785  #     if defined(STACK_GROWS_UP) && defined(STACK_GROWS_DOWN)
22786         ABORT(
22787 @@ -642,6 +705,18 @@
22788           initial_heap_sz = divHBLKSZ(initial_heap_sz);
22789         }
22790      }
22791 +    {
22792 +       char * sz_str = GETENV("GC_MAXIMUM_HEAP_SIZE");
22793 +       if (sz_str != NULL) {
22794 +         word max_heap_sz = (word)atol(sz_str);
22795 +         if (max_heap_sz < initial_heap_sz * HBLKSIZE) {
22796 +           WARN("Bad maximum heap size %s - ignoring it.\n",
22797 +                sz_str);
22798 +         } 
22799 +         if (0 == GC_max_retries) GC_max_retries = 2;
22800 +         GC_set_max_heap_size(max_heap_sz);
22801 +       }
22802 +    }
22803      if (!GC_expand_hp_inner(initial_heap_sz)) {
22804          GC_err_printf0("Can't start up: not enough memory\n");
22805          EXIT();
22806 @@ -677,6 +752,7 @@
22807         GC_incremental = TRUE;
22808        }
22809  #   endif /* !SMALL_CONFIG */
22810 +    COND_DUMP;
22811      /* Get black list set up and/or incrmental GC started */
22812        if (!GC_dont_precollect || GC_incremental) GC_gcollect_inner();
22813      GC_is_initialized = TRUE;
22814 @@ -713,6 +789,7 @@
22815      GC_setpagesize();
22816      if (GC_no_win32_dlls) goto out;
22817  #   ifndef GC_SOLARIS_THREADS
22818 +      maybe_install_looping_handler();  /* Before write fault handler! */
22819          GC_dirty_init();
22820  #   endif
22821      if (!GC_is_initialized) {
22822 @@ -932,6 +1009,17 @@
22823      return(result);
22824  }
22825  
22826 +# if defined(__STDC__) || defined(__cplusplus)
22827 +    GC_word GC_set_free_space_divisor (GC_word value)
22828 +# else
22829 +    GC_word GC_set_free_space_divisor (value)
22830 +    GC_word value;
22831 +# endif
22832 +{
22833 +    GC_word old = GC_free_space_divisor;
22834 +    GC_free_space_divisor = value;
22835 +    return old;
22836 +}
22837  
22838  #ifndef PCR
22839  void GC_abort(msg)
22840 @@ -958,122 +1046,18 @@
22841  }
22842  #endif
22843  
22844 -#ifdef NEED_CALLINFO
22845 -
22846 -#ifdef HAVE_BUILTIN_BACKTRACE
22847 -# include <execinfo.h>
22848 -# ifdef LINUX
22849 -#   include <unistd.h>
22850 -# endif
22851 -#endif
22852 -
22853 -void GC_print_callers (info)
22854 -struct callinfo info[NFRAMES];
22855 -{
22856 -    register int i;
22857 -    
22858 -#   if NFRAMES == 1
22859 -      GC_err_printf0("\tCaller at allocation:\n");
22860 -#   else
22861 -      GC_err_printf0("\tCall chain at allocation:\n");
22862 -#   endif
22863 -    for (i = 0; i < NFRAMES; i++) {
22864 -       if (info[i].ci_pc == 0) break;
22865 -#      if NARGS > 0
22866 -       {
22867 -         int j;
22868 -
22869 -         GC_err_printf0("\t\targs: ");
22870 -         for (j = 0; j < NARGS; j++) {
22871 -           if (j != 0) GC_err_printf0(", ");
22872 -           GC_err_printf2("%d (0x%X)", ~(info[i].ci_arg[j]),
22873 -                                       ~(info[i].ci_arg[j]));
22874 -         }
22875 -         GC_err_printf0("\n");
22876 -       }
22877 -#      endif
22878 -#      if defined(HAVE_BUILTIN_BACKTRACE) && !defined(REDIRECT_MALLOC)
22879 -         /* Unfortunately backtrace_symbols calls malloc, which makes  */
22880 -         /* it dangersous if that has been redirected.                 */
22881 -         {
22882 -           char **sym_name =
22883 -             backtrace_symbols((void **)(&(info[i].ci_pc)), 1);
22884 -           char *name = sym_name[0];
22885 -           GC_bool found_it = (strchr(name, '(') != 0);
22886 -           FILE *pipe;
22887 -#          ifdef LINUX
22888 -             if (!found_it) {
22889 -#              define EXE_SZ 100
22890 -               static char exe_name[EXE_SZ];
22891 -#              define CMD_SZ 200
22892 -               char cmd_buf[CMD_SZ];
22893 -#              define RESULT_SZ 200
22894 -               static char result_buf[RESULT_SZ];
22895 -               size_t result_len;
22896 -               static GC_bool found_exe_name = FALSE;
22897 -               static GC_bool will_fail = FALSE;
22898 -               int ret_code;
22899 -               /* Unfortunately, this is the common case for the       */
22900 -               /* main executable.                                     */
22901 -               /* Try to get it via a hairy and expensive scheme.      */
22902 -               /* First we get the name of the executable:             */
22903 -               if (will_fail) goto out;
22904 -               if (!found_exe_name) { 
22905 -                 ret_code = readlink("/proc/self/exe", exe_name, EXE_SZ);
22906 -                 if (ret_code < 0 || ret_code >= EXE_SZ || exe_name[0] != '/') {
22907 -                   will_fail = TRUE;   /* Dont try again. */
22908 -                   goto out;
22909 -                 }
22910 -                 exe_name[ret_code] = '\0';
22911 -                 found_exe_name = TRUE;
22912 -               }
22913 -               /* Then we use popen to start addr2line -e <exe> <addr> */
22914 -               /* There are faster ways to do this, but hopefully this */
22915 -               /* isn't time critical.                                 */
22916 -               sprintf(cmd_buf, "/usr/bin/addr2line -e %s 0x%lx", exe_name,
22917 -                                (unsigned long)info[i].ci_pc);
22918 -               pipe = popen(cmd_buf, "r");
22919 -               if (pipe < 0 || fgets(result_buf, RESULT_SZ, pipe) == 0) {
22920 -                 will_fail = TRUE;
22921 -                 goto out;
22922 -               }
22923 -               result_len = strlen(result_buf);
22924 -               if (result_buf[result_len - 1] == '\n') --result_len;
22925 -               if (result_buf[0] == '?'
22926 -                   || result_buf[result_len-2] == ':' 
22927 -                      && result_buf[result_len-1] == '0')
22928 -                   goto out;
22929 -               if (result_len < RESULT_SZ - 25) {
22930 -                 /* Add in hex address */
22931 -                   sprintf(result_buf + result_len, " [0x%lx]",
22932 -                         (unsigned long)info[i].ci_pc);
22933 -               }
22934 -               name = result_buf;
22935 -               pclose(pipe);
22936 -               out:
22937 -             }
22938 -#          endif
22939 -           GC_err_printf1("\t\t%s\n", name);
22940 -           free(sym_name);
22941 -         }
22942 -#      else
22943 -         GC_err_printf1("\t\t##PC##= 0x%lx\n", info[i].ci_pc);
22944 -#      endif
22945 -    }
22946 -}
22947 -
22948 -#endif /* SAVE_CALL_CHAIN */
22949 -
22950 -/* Needed by SRC_M3, gcj, and should perhaps be the official interface */
22951 -/* to GC_dont_gc.                                                      */
22952  void GC_enable()
22953  {
22954 +    LOCK();
22955      GC_dont_gc--;
22956 +    UNLOCK();
22957  }
22958  
22959  void GC_disable()
22960  {
22961 +    LOCK();
22962      GC_dont_gc++;
22963 +    UNLOCK();
22964  }
22965  
22966  #if !defined(NO_DEBUGGING)
22967 @@ -1088,6 +1072,8 @@
22968      GC_print_hblkfreelist();
22969      GC_printf0("\n***Blocks in use:\n");
22970      GC_print_block_list();
22971 +    GC_printf0("\n***Finalization statistics:\n");
22972 +    GC_print_finalization_stats();
22973  }
22974  
22975  #endif /* NO_DEBUGGING */
22976 diff -buNr boehm-gc/os_dep.c boehm-gc/os_dep.c
22977 --- boehm-gc/os_dep.c   Fri Jul 19 01:54:43 2002
22978 +++ boehm-gc/os_dep.c   Sat Sep 13 01:32:42 2003
22979 @@ -80,12 +80,15 @@
22980  #   define NEED_FIND_LIMIT
22981  # endif
22982  
22983 -#ifdef NEED_FIND_LIMIT
22984 -#   include <setjmp.h>
22985 -#endif
22986 -
22987  #if defined(FREEBSD) && defined(I386)
22988  #  include <machine/trap.h>
22989 +#  if !defined(PCR)
22990 +#    define NEED_FIND_LIMIT
22991 +#  endif
22992 +#endif
22993 +
22994 +#ifdef NEED_FIND_LIMIT
22995 +#   include <setjmp.h>
22996  #endif
22997  
22998  #ifdef AMIGA
22999 @@ -129,6 +132,11 @@
23000  # define jmp_buf sigjmp_buf
23001  #endif
23002  
23003 +#ifdef DARWIN
23004 +/* for get_etext and friends */
23005 +#include <mach-o/getsect.h>
23006 +#endif
23007 +
23008  #ifdef DJGPP
23009    /* Apparently necessary for djgpp 2.01.  May cause problems with     */
23010    /* other versions.                                                   */
23011 @@ -147,6 +155,155 @@
23012  # define OPT_PROT_EXEC 0
23013  #endif
23014  
23015 +#if defined(LINUX) && \
23016 +    (defined(USE_PROC_FOR_LIBRARIES) || defined(IA64) || !defined(SMALL_CONFIG))
23017 +
23018 +/* We need to parse /proc/self/maps, either to find dynamic libraries, */
23019 +/* and/or to find the register backing store base (IA64).  Do it once  */
23020 +/* here.                                                               */
23021 +
23022 +#define READ read
23023 +
23024 +/* Repeatedly perform a read call until the buffer is filled or        */
23025 +/* we encounter EOF.                                           */
23026 +ssize_t GC_repeat_read(int fd, char *buf, size_t count)
23027 +{
23028 +    ssize_t num_read = 0;
23029 +    ssize_t result;
23030 +    
23031 +    while (num_read < count) {
23032 +       result = READ(fd, buf + num_read, count - num_read);
23033 +       if (result < 0) return result;
23034 +       if (result == 0) break;
23035 +       num_read += result;
23036 +    }
23037 +    return num_read;
23038 +}
23039 +
23040 +/*
23041 + * Apply fn to a buffer containing the contents of /proc/self/maps.
23042 + * Return the result of fn or, if we failed, 0.
23043 + */
23044 +
23045 +word GC_apply_to_maps(word (*fn)(char *))
23046 +{
23047 +    int f;
23048 +    int result;
23049 +    int maps_size;
23050 +    char maps_temp[32768];
23051 +    char *maps_buf;
23052 +
23053 +    /* Read /proc/self/maps    */
23054 +        /* Note that we may not allocate, and thus can't use stdio.    */
23055 +        f = open("/proc/self/maps", O_RDONLY);
23056 +        if (-1 == f) return 0;
23057 +       /* stat() doesn't work for /proc/self/maps, so we have to
23058 +          read it to find out how large it is... */
23059 +       maps_size = 0;
23060 +       do {
23061 +           result = GC_repeat_read(f, maps_temp, sizeof(maps_temp));
23062 +           if (result <= 0) return 0;
23063 +           maps_size += result;
23064 +       } while (result == sizeof(maps_temp));
23065 +
23066 +       if (maps_size > sizeof(maps_temp)) {
23067 +           /* If larger than our buffer, close and re-read it. */
23068 +           close(f);
23069 +           f = open("/proc/self/maps", O_RDONLY);
23070 +           if (-1 == f) return 0;
23071 +           maps_buf = alloca(maps_size);
23072 +           if (NULL == maps_buf) return 0;
23073 +           result = GC_repeat_read(f, maps_buf, maps_size);
23074 +           if (result <= 0) return 0;
23075 +       } else {
23076 +           /* Otherwise use the fixed size buffer */
23077 +           maps_buf = maps_temp;
23078 +       }
23079 +
23080 +       close(f);
23081 +        maps_buf[result] = '\0';
23082 +       
23083 +    /* Apply fn to result. */
23084 +       return fn(maps_buf);
23085 +}
23086 +
23087 +#endif /* Need GC_apply_to_maps */
23088 +
23089 +#if defined(LINUX) && (defined(USE_PROC_FOR_LIBRARIES) || defined(IA64))
23090 +//
23091 +//  GC_parse_map_entry parses an entry from /proc/self/maps so we can
23092 +//  locate all writable data segments that belong to shared libraries.
23093 +//  The format of one of these entries and the fields we care about
23094 +//  is as follows:
23095 +//  XXXXXXXX-XXXXXXXX r-xp 00000000 30:05 260537     name of mapping...\n
23096 +//  ^^^^^^^^ ^^^^^^^^ ^^^^          ^^
23097 +//  start    end      prot          maj_dev
23098 +//  0        9        18            32
23099 +//  
23100 +//  For 64 bit ABIs:
23101 +//  0       17       34            56
23102 +//
23103 +//  The parser is called with a pointer to the entry and the return value
23104 +//  is either NULL or is advanced to the next entry(the byte after the
23105 +//  trailing '\n'.)
23106 +//
23107 +#if CPP_WORDSZ == 32
23108 +# define OFFSET_MAP_START   0
23109 +# define OFFSET_MAP_END     9
23110 +# define OFFSET_MAP_PROT   18
23111 +# define OFFSET_MAP_MAJDEV 32
23112 +# define ADDR_WIDTH        8
23113 +#endif
23114 +
23115 +#if CPP_WORDSZ == 64
23116 +# define OFFSET_MAP_START   0
23117 +# define OFFSET_MAP_END    17
23118 +# define OFFSET_MAP_PROT   34
23119 +# define OFFSET_MAP_MAJDEV 56
23120 +# define ADDR_WIDTH       16
23121 +#endif
23122 +
23123 +/*
23124 + * Assign various fields of the first line in buf_ptr to *start, *end,
23125 + * *prot_buf and *maj_dev.  Only *prot_buf may be set for unwritable maps.
23126 + */
23127 +char *GC_parse_map_entry(char *buf_ptr, word *start, word *end,
23128 +                                char *prot_buf, unsigned int *maj_dev)
23129 +{
23130 +    int i;
23131 +    char *tok;
23132 +
23133 +    if (buf_ptr == NULL || *buf_ptr == '\0') {
23134 +        return NULL;
23135 +    }
23136 +
23137 +    memcpy(prot_buf, buf_ptr+OFFSET_MAP_PROT, 4); // do the protections first
23138 +    prot_buf[4] = '\0';
23139 +
23140 +    if (prot_buf[1] == 'w') { // we can skip all of this if it's not writable
23141 +
23142 +        tok = buf_ptr;
23143 +        buf_ptr[OFFSET_MAP_START+ADDR_WIDTH] = '\0';
23144 +        *start = strtoul(tok, NULL, 16);
23145 +
23146 +        tok = buf_ptr+OFFSET_MAP_END;
23147 +        buf_ptr[OFFSET_MAP_END+ADDR_WIDTH] = '\0';
23148 +        *end = strtoul(tok, NULL, 16);
23149 +
23150 +        buf_ptr += OFFSET_MAP_MAJDEV;
23151 +        tok = buf_ptr;
23152 +        while (*buf_ptr != ':') buf_ptr++;
23153 +        *buf_ptr++ = '\0';
23154 +        *maj_dev = strtoul(tok, NULL, 16);
23155 +    }
23156 +
23157 +    while (*buf_ptr && *buf_ptr++ != '\n');
23158 +
23159 +    return buf_ptr;
23160 +}
23161 +
23162 +#endif /* Need to parse /proc/self/maps. */    
23163 +
23164  #if defined(SEARCH_FOR_DATA_START)
23165    /* The I386 case can be handled without a search.  The Alpha case    */
23166    /* used to be handled differently as well, but the rules changed     */
23167 @@ -154,6 +311,11 @@
23168    /* cover all versions.                                               */
23169  
23170  # ifdef LINUX
23171 +    /* Some Linux distributions arrange to define __data_start.  Some  */
23172 +    /* define data_start as a weak symbol.  The latter is technically  */
23173 +    /* broken, since the user program may define data_start, in which  */
23174 +    /* case we lose.  Nonetheless, we try both, prefering __data_start.        */
23175 +    /* We assume gcc-compatible pragmas.       */
23176  #   pragma weak __data_start
23177      extern int __data_start[];
23178  #   pragma weak data_start
23179 @@ -169,16 +331,16 @@
23180  
23181  #   ifdef LINUX
23182        /* Try the easy approaches first:        */
23183 -      if (__data_start != 0) {
23184 -         GC_data_start = (ptr_t)__data_start;
23185 +      if ((ptr_t)__data_start != 0) {
23186 +         GC_data_start = (ptr_t)(__data_start);
23187           return;
23188        }
23189 -      if (data_start != 0) {
23190 -         GC_data_start = (ptr_t)data_start;
23191 +      if ((ptr_t)data_start != 0) {
23192 +         GC_data_start = (ptr_t)(data_start);
23193           return;
23194        }
23195  #   endif /* LINUX */
23196 -    GC_data_start = GC_find_limit((ptr_t)_end, FALSE);
23197 +    GC_data_start = GC_find_limit((ptr_t)(_end), FALSE);
23198    }
23199  #endif
23200  
23201 @@ -617,7 +779,8 @@
23202      }
23203  
23204      /* Return the first nonaddressible location > p (up) or    */
23205 -    /* the smallest location q s.t. [q,p] is addressible (!up).        */
23206 +    /* the smallest location q s.t. [q,p) is addressable (!up).        */
23207 +    /* We assume that p (up) or p-1 (!up) is addressable.      */
23208      ptr_t GC_find_limit(p, up)
23209      ptr_t p;
23210      GC_bool up;
23211 @@ -650,18 +813,18 @@
23212      }
23213  # endif
23214  
23215 -# if defined(ECOS) || defined(NOSYS)
23216 -ptr_t GC_get_stack_base()
23217 -{
23218 +#if defined(ECOS) || defined(NOSYS)
23219 +  ptr_t GC_get_stack_base()
23220 +  {
23221    return STACKBOTTOM;
23222 -}
23223 -
23224 -#else
23225 +  }
23226 +#endif
23227  
23228  #ifdef LINUX_STACKBOTTOM
23229  
23230  #include <sys/types.h>
23231  #include <sys/stat.h>
23232 +#include <ctype.h>
23233  
23234  # define STAT_SKIP 27   /* Number of fields preceding startstack       */
23235                         /* field in /proc/self/stat                     */
23236 @@ -670,6 +833,33 @@
23237    extern ptr_t __libc_stack_end;
23238  
23239  # ifdef IA64
23240 +    /* Try to read the backing store base from /proc/self/maps.        */
23241 +    /* We look for the writable mapping with a 0 major device,  */
23242 +    /* which is        as close to our frame as possible, but below it.*/
23243 +    static word backing_store_base_from_maps(char *maps)
23244 +    {
23245 +      char prot_buf[5];
23246 +      char *buf_ptr = maps;
23247 +      word start, end;
23248 +      unsigned int maj_dev;
23249 +      word current_best = 0;
23250 +      word dummy;
23251 +  
23252 +      for (;;) {
23253 +        buf_ptr = GC_parse_map_entry(buf_ptr, &start, &end, prot_buf, &maj_dev);
23254 +       if (buf_ptr == NULL) return current_best;
23255 +       if (prot_buf[1] == 'w' && maj_dev == 0) {
23256 +           if (end < (word)(&dummy) && start > current_best) current_best = start;
23257 +       }
23258 +      }
23259 +      return current_best;
23260 +    }
23261 +
23262 +    static word backing_store_base_from_proc(void)
23263 +    {
23264 +        return GC_apply_to_maps(backing_store_base_from_maps);
23265 +    }
23266 +
23267  #   pragma weak __libc_ia64_register_backing_store_base
23268      extern ptr_t __libc_ia64_register_backing_store_base;
23269  
23270 @@ -683,9 +873,15 @@
23271         /* Hence we check for both nonzero address and value.           */
23272         return __libc_ia64_register_backing_store_base;
23273        } else {
23274 -       word result = (word)GC_stackbottom - BACKING_STORE_DISPLACEMENT;
23275 +       word result = backing_store_base_from_proc();
23276 +       if (0 == result) {
23277 +         /* Use dumb heuristics.  Works only for default configuration. */
23278 +         result = (word)GC_stackbottom - BACKING_STORE_DISPLACEMENT;
23279         result += BACKING_STORE_ALIGNMENT - 1;
23280         result &= ~(BACKING_STORE_ALIGNMENT - 1);
23281 +         /* Verify that it's at least readable.  If not, we goofed. */
23282 +         GC_noop1(*(word *)result); 
23283 +       }
23284         return (ptr_t)result;
23285        }
23286      }
23287 @@ -697,11 +893,8 @@
23288      /* using direct I/O system calls in order to avoid calling malloc   */
23289      /* in case REDIRECT_MALLOC is defined.                             */ 
23290  #   define STAT_BUF_SIZE 4096
23291 -#   if defined(GC_USE_LD_WRAP)
23292 -#      define STAT_READ __real_read
23293 -#   else
23294  #      define STAT_READ read
23295 -#   endif    
23296 +         /* Should probably call the real read, if read is wrapped.    */
23297      char stat_buf[STAT_BUF_SIZE];
23298      int f;
23299      char c;
23300 @@ -710,7 +903,16 @@
23301  
23302      /* First try the easy way.  This should work for glibc 2.2 */
23303        if (0 != &__libc_stack_end) {
23304 +#       ifdef IA64
23305 +         /* Some versions of glibc set the address 16 bytes too        */
23306 +         /* low while the initialization code is running.              */
23307 +         if (((word)__libc_stack_end & 0xfff) + 0x10 < 0x1000) {
23308 +           return __libc_stack_end + 0x10;
23309 +         } /* Otherwise it's not safe to add 16 bytes and we fall      */
23310 +           /* back to using /proc.                                     */
23311 +#      else 
23312         return __libc_stack_end;
23313 +#      endif
23314        }
23315      f = open("/proc/self/stat", O_RDONLY);
23316      if (f < 0 || STAT_READ(f, stat_buf, STAT_BUF_SIZE) < 2 * STAT_SKIP) {
23317 @@ -764,8 +966,11 @@
23318  
23319  ptr_t GC_get_stack_base()
23320  {
23321 +#   if defined(HEURISTIC1) || defined(HEURISTIC2) || \
23322 +       defined(LINUX_STACKBOTTOM) || defined(FREEBSD_STACKBOTTOM)
23323      word dummy;
23324      ptr_t result;
23325 +#   endif
23326  
23327  #   define STACKBOTTOM_ALIGNMENT_M1 ((word)STACK_GRAN - 1)
23328  
23329 @@ -814,7 +1019,6 @@
23330         return(result);
23331  #   endif /* STACKBOTTOM */
23332  }
23333 -# endif /* NOSYS ECOS */
23334  
23335  # endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS */
23336  
23337 @@ -924,15 +1128,14 @@
23338    /* Unfortunately, we have to handle win32s very differently from NT,         */
23339    /* Since VirtualQuery has very different semantics.  In particular,  */
23340    /* under win32s a VirtualQuery call on an unmapped page returns an   */
23341 -  /* invalid result.  Under GC_register_data_segments is a noop and    */
23342 +  /* invalid result.  Under NT, GC_register_data_segments is a noop and        */
23343    /* all real work is done by GC_register_dynamic_libraries.  Under    */
23344    /* win32s, we cannot find the data segments associated with dll's.   */
23345 -  /* We rgister the main data segment here.                            */
23346 -#  ifdef __GCC__
23347 -  GC_bool GC_no_win32_dlls = TRUE;      /* GCC can't do SEH, so we can't use VirtualQuery */
23348 -#  else
23349 +  /* We register the main data segment here.                           */
23350    GC_bool GC_no_win32_dlls = FALSE;     
23351 -#  endif
23352 +       /* This used to be set for gcc, to avoid dealing with           */
23353 +       /* the structured exception handling issues.  But we now have   */
23354 +       /* assembly code to do that right.                              */
23355    
23356    void GC_init_win32()
23357    {
23358 @@ -965,35 +1168,101 @@
23359    }
23360  # endif
23361    
23362 -  /* Is p the start of either the malloc heap, or of one of our */
23363 -  /* heap sections?                                            */
23364 -  GC_bool GC_is_heap_base (ptr_t p)
23365 -  {
23366 -     
23367 -     register unsigned i;
23368 -     
23369  #    ifndef REDIRECT_MALLOC
23370 -       static ptr_t malloc_heap_pointer = 0;
23371 +  /* We maintain a linked list of AllocationBase values that we know   */
23372 +  /* correspond to malloc heap sections.  Currently this is only called */
23373 +  /* during a GC.  But there is some hope that for long running                */
23374 +  /* programs we will eventually see most heap sections.               */
23375       
23376 -       if (0 == malloc_heap_pointer) {
23377 -         MEMORY_BASIC_INFORMATION buf;
23378 -         void *pTemp = malloc( 1 );
23379 -         register DWORD result = VirtualQuery(pTemp, &buf, sizeof(buf));
23380 +  /* In the long run, it would be more reliable to occasionally walk   */
23381 +  /* the malloc heap with HeapWalk on the default heap.  But that      */
23382 +  /* apparently works only for NT-based Windows.                       */ 
23383             
23384 -         free( pTemp );
23385 +  /* In the long run, a better data structure would also be nice ...   */
23386 +  struct GC_malloc_heap_list {
23387 +    void * allocation_base;
23388 +    struct GC_malloc_heap_list *next;
23389 +  } *GC_malloc_heap_l = 0;
23390  
23391 +  /* Is p the base of one of the malloc heap sections we already know  */
23392 +  /* about?                                                            */
23393 +  GC_bool GC_is_malloc_heap_base(ptr_t p)
23394 +  {
23395 +    struct GC_malloc_heap_list *q = GC_malloc_heap_l;
23396 +
23397 +    while (0 != q) {
23398 +      if (q -> allocation_base == p) return TRUE;
23399 +      q = q -> next;
23400 +    }
23401 +    return FALSE;
23402 +  }
23403           
23404 +  void *GC_get_allocation_base(void *p)
23405 +  {
23406 +    MEMORY_BASIC_INFORMATION buf;
23407 +    DWORD result = VirtualQuery(p, &buf, sizeof(buf));
23408           if (result != sizeof(buf)) {
23409               ABORT("Weird VirtualQuery result");
23410           }
23411 -         malloc_heap_pointer = (ptr_t)(buf.AllocationBase);
23412 +    return buf.AllocationBase;
23413         }
23414 -       if (p == malloc_heap_pointer) return(TRUE);
23415 +
23416 +  size_t GC_max_root_size = 100000;    /* Appr. largest root size.     */
23417 +
23418 +  void GC_add_current_malloc_heap()
23419 +  {
23420 +    struct GC_malloc_heap_list *new_l =
23421 +                 malloc(sizeof(struct GC_malloc_heap_list));
23422 +    void * candidate = GC_get_allocation_base(new_l);
23423 +
23424 +    if (new_l == 0) return;
23425 +    if (GC_is_malloc_heap_base(candidate)) {
23426 +      /* Try a little harder to find malloc heap.                      */
23427 +       size_t req_size = 10000;
23428 +       do {
23429 +         void *p = malloc(req_size);
23430 +         if (0 == p) { free(new_l); return; }
23431 +         candidate = GC_get_allocation_base(p);
23432 +         free(p);
23433 +         req_size *= 2;
23434 +       } while (GC_is_malloc_heap_base(candidate)
23435 +                && req_size < GC_max_root_size/10 && req_size < 500000);
23436 +       if (GC_is_malloc_heap_base(candidate)) {
23437 +         free(new_l); return;
23438 +       }
23439 +    }
23440 +#   ifdef CONDPRINT
23441 +      if (GC_print_stats)
23442 +         GC_printf1("Found new system malloc AllocationBase at 0x%lx\n",
23443 +                     candidate);
23444 +#   endif
23445 +    new_l -> allocation_base = candidate;
23446 +    new_l -> next = GC_malloc_heap_l;
23447 +    GC_malloc_heap_l = new_l;
23448 +  }
23449 +# endif /* REDIRECT_MALLOC */
23450 +  
23451 +  /* Is p the start of either the malloc heap, or of one of our */
23452 +  /* heap sections?                                            */
23453 +  GC_bool GC_is_heap_base (ptr_t p)
23454 +  {
23455 +     
23456 +     unsigned i;
23457 +     
23458 +#    ifndef REDIRECT_MALLOC
23459 +       static word last_gc_no = -1;
23460 +     
23461 +       if (last_gc_no != GC_gc_no) {
23462 +        GC_add_current_malloc_heap();
23463 +        last_gc_no = GC_gc_no;
23464 +       }
23465 +       if (GC_root_size > GC_max_root_size) GC_max_root_size = GC_root_size;
23466 +       if (GC_is_malloc_heap_base(p)) return TRUE;
23467  #    endif
23468       for (i = 0; i < GC_n_heap_bases; i++) {
23469 -         if (GC_heap_bases[i] == p) return(TRUE);
23470 +         if (GC_heap_bases[i] == p) return TRUE;
23471       }
23472 -     return(FALSE);
23473 +     return FALSE ;
23474    }
23475  
23476  # ifdef MSWIN32
23477 @@ -1043,7 +1312,7 @@
23478  
23479  # if (defined(SVR4) || defined(AUX) || defined(DGUX) \
23480        || (defined(LINUX) && defined(SPARC))) && !defined(PCR)
23481 -char * GC_SysVGetDataStart(max_page_size, etext_addr)
23482 +ptr_t GC_SysVGetDataStart(max_page_size, etext_addr)
23483  int max_page_size;
23484  int * etext_addr;
23485  {
23486 @@ -1069,12 +1338,45 @@
23487         /* string constants in the text segment, but after etext.       */
23488         /* Use plan B.  Note that we now know there is a gap between    */
23489         /* text and data segments, so plan A bought us something.       */
23490 -       result = (char *)GC_find_limit((ptr_t)(DATAEND) - MIN_PAGE_SIZE, FALSE);
23491 +       result = (char *)GC_find_limit((ptr_t)(DATAEND), FALSE);
23492      }
23493 -    return((char *)result);
23494 +    return((ptr_t)result);
23495  }
23496  # endif
23497  
23498 +# if defined(FREEBSD) && defined(I386) && !defined(PCR)
23499 +/* Its unclear whether this should be identical to the above, or       */
23500 +/* whether it should apply to non-X86 architectures.                   */
23501 +/* For now we don't assume that there is always an empty page after    */
23502 +/* etext.  But in some cases there actually seems to be slightly more.  */
23503 +/* This also deals with holes between read-only data and writable data.        */
23504 +ptr_t GC_FreeBSDGetDataStart(max_page_size, etext_addr)
23505 +int max_page_size;
23506 +int * etext_addr;
23507 +{
23508 +    word text_end = ((word)(etext_addr) + sizeof(word) - 1)
23509 +                    & ~(sizeof(word) - 1);
23510 +       /* etext rounded to word boundary       */
23511 +    VOLATILE word next_page = (text_end + (word)max_page_size - 1)
23512 +                             & ~((word)max_page_size - 1);
23513 +    VOLATILE ptr_t result = (ptr_t)text_end;
23514 +    GC_setup_temporary_fault_handler();
23515 +    if (setjmp(GC_jmp_buf) == 0) {
23516 +       /* Try reading at the address.                          */
23517 +       /* This should happen before there is another thread.   */
23518 +       for (; next_page < (word)(DATAEND); next_page += (word)max_page_size)
23519 +           *(VOLATILE char *)next_page;
23520 +       GC_reset_fault_handler();
23521 +    } else {
23522 +       GC_reset_fault_handler();
23523 +       /* As above, we go to plan B    */
23524 +       result = GC_find_limit((ptr_t)(DATAEND), FALSE);
23525 +    }
23526 +    return(result);
23527 +}
23528 +
23529 +# endif
23530 +
23531  
23532  #ifdef AMIGA
23533  
23534 @@ -1086,8 +1388,7 @@
23535  
23536  void GC_register_data_segments()
23537  {
23538 -#   if !defined(PCR) && !defined(SRC_M3) && !defined(NEXT) && !defined(MACOS) \
23539 -       && !defined(MACOSX)
23540 +#   if !defined(PCR) && !defined(SRC_M3) && !defined(MACOS)
23541  #     if defined(REDIRECT_MALLOC) && defined(GC_SOLARIS_THREADS)
23542         /* As of Solaris 2.3, the Solaris threads implementation        */
23543         /* allocates the data structure for the initial thread with     */
23544 @@ -1104,9 +1405,6 @@
23545  #       endif
23546  #     endif
23547  #   endif
23548 -#   if !defined(PCR) && (defined(NEXT) || defined(MACOSX))
23549 -      GC_add_roots_inner(DATASTART, (char *) get_end(), FALSE);
23550 -#   endif
23551  #   if defined(MACOS)
23552      {
23553  #   if defined(THINK_C)
23554 @@ -1216,18 +1514,28 @@
23555  ptr_t GC_unix_get_mem(bytes)
23556  word bytes;
23557  {
23558 -    static GC_bool initialized = FALSE;
23559 -    static int fd;
23560      void *result;
23561      static ptr_t last_addr = HEAP_START;
23562  
23563 +#   ifndef USE_MMAP_ANON
23564 +      static GC_bool initialized = FALSE;
23565 +      static int fd;
23566 +
23567      if (!initialized) {
23568         fd = open("/dev/zero", O_RDONLY);
23569 +         fcntl(fd, F_SETFD, FD_CLOEXEC);
23570         initialized = TRUE;
23571      }
23572 +#   endif
23573 +
23574      if (bytes & (GC_page_size -1)) ABORT("Bad GET_MEM arg");
23575 +#   ifdef USE_MMAP_ANON
23576 +      result = mmap(last_addr, bytes, PROT_READ | PROT_WRITE | OPT_PROT_EXEC,
23577 +                   GC_MMAP_FLAGS | MAP_ANON, -1, 0/* offset */);
23578 +#   else
23579      result = mmap(last_addr, bytes, PROT_READ | PROT_WRITE | OPT_PROT_EXEC,
23580                   GC_MMAP_FLAGS, fd, 0/* offset */);
23581 +#   endif
23582      if (result == MAP_FAILED) return(0);
23583      last_addr = (ptr_t)result + bytes + GC_page_size - 1;
23584      last_addr = (ptr_t)((word)last_addr & ~(GC_page_size - 1));
23585 @@ -1322,7 +1630,15 @@
23586          result = (ptr_t) GlobalAlloc(0, bytes + HBLKSIZE);
23587          result = (ptr_t)(((word)result + HBLKSIZE) & ~(HBLKSIZE-1));
23588      } else {
23589 -        result = (ptr_t) VirtualAlloc(NULL, bytes,
23590 +       /* VirtualProtect only works on regions returned by a   */
23591 +       /* single VirtualAlloc call.  Thus we allocate one      */
23592 +       /* extra page, which will prevent merging of blocks     */
23593 +       /* in separate regions, and eliminate any temptation    */
23594 +       /* to call VirtualProtect on a range spanning regions.  */
23595 +       /* This wastes a small amount of memory, and risks      */
23596 +       /* increased fragmentation.  But better alternatives    */
23597 +       /* would require effort.                                */
23598 +        result = (ptr_t) VirtualAlloc(NULL, bytes + 1,
23599                                       MEM_COMMIT | MEM_RESERVE,
23600                                       PAGE_EXECUTE_READWRITE);
23601      }
23602 @@ -1378,6 +1694,10 @@
23603         /* Reserve more pages */
23604         word res_bytes = (bytes + GC_sysinfo.dwAllocationGranularity-1)
23605                          & ~(GC_sysinfo.dwAllocationGranularity-1);
23606 +       /* If we ever support MPROTECT_VDB here, we will probably need to       */
23607 +       /* ensure that res_bytes is strictly > bytes, so that VirtualProtect    */
23608 +       /* never spans regions.  It seems to be OK for a VirtualFree argument   */
23609 +       /* to span regions, so we should be OK for now.                         */
23610         result = (ptr_t) VirtualAlloc(NULL, res_bytes,
23611                                       MEM_RESERVE | MEM_TOP_DOWN,
23612                                       PAGE_EXECUTE_READWRITE);
23613 @@ -1508,6 +1828,7 @@
23614        }
23615  #   else
23616        if (-1 == zero_descr) zero_descr = open("/dev/zero", O_RDWR);
23617 +      fcntl(zero_descr, F_SETFD, FD_CLOEXEC);
23618        if (0 == start_addr) return;
23619        result = mmap(start_addr, len, PROT_READ | PROT_WRITE | OPT_PROT_EXEC,
23620                     MAP_FIXED | MAP_PRIVATE, zero_descr, 0);
23621 @@ -1694,7 +2015,6 @@
23622   *             make sure that other system calls are similarly protected
23623   *             or write only to the stack.
23624   */
23625
23626  GC_bool GC_dirty_maintained = FALSE;
23627  
23628  # ifdef DEFAULT_VDB
23629 @@ -1708,6 +2028,9 @@
23630  /* Initialize virtual dirty bit implementation.                        */
23631  void GC_dirty_init()
23632  {
23633 +#ifdef PRINTSTATS
23634 +    GC_printf0("Initializing DEFAULT_VDB...\n");
23635 +#endif
23636      GC_dirty_maintained = TRUE;
23637  }
23638  
23639 @@ -1776,17 +2099,21 @@
23640  /*
23641   * This implementation maintains dirty bits itself by catching write
23642   * faults and keeping track of them.  We assume nobody else catches
23643 - * SIGBUS or SIGSEGV.  We assume no write faults occur in system calls
23644 - * except as a result of a read system call.  This means clients must
23645 - * either ensure that system calls do not touch the heap, or must
23646 - * provide their own wrappers analogous to the one for read.
23647 + * SIGBUS or SIGSEGV.  We assume no write faults occur in system calls.
23648 + * This means that clients must ensure that system calls don't write
23649 + * to the write-protected heap.  Probably the best way to do this is to
23650 + * ensure that system calls write at most to POINTERFREE objects in the
23651 + * heap, and do even that only if we are on a platform on which those
23652 + * are not protected.  Another alternative is to wrap system calls
23653 + * (see example for read below), but the current implementation holds
23654 + * a lock across blocking calls, making it problematic for multithreaded
23655 + * applications. 
23656   * We assume the page size is a multiple of HBLKSIZE.
23657 - * This implementation is currently SunOS 4.X and IRIX 5.X specific, though we
23658 - * tried to use portable code where easily possible.  It is known
23659 - * not to work under a number of other systems.
23660 + * We prefer them to be the same.  We avoid protecting POINTERFREE
23661 + * objects only if they are the same.
23662   */
23663  
23664 -# if !defined(MSWIN32) && !defined(MSWINCE)
23665 +# if !defined(MSWIN32) && !defined(MSWINCE) && !defined(DARWIN)
23666  
23667  #   include <sys/mman.h>
23668  #   include <signal.h>
23669 @@ -1805,6 +2132,23 @@
23670           
23671  # else
23672  
23673 +# ifdef DARWIN
23674 +    /* Using vm_protect (mach syscall) over mprotect (BSD syscall) seems to
23675 +       decrease the likelihood of some of the problems described below. */
23676 +    #include <mach/vm_map.h>
23677 +    extern mach_port_t GC_task_self;
23678 +    #define PROTECT(addr,len) \
23679 +        if(vm_protect(GC_task_self,(vm_address_t)(addr),(vm_size_t)(len), \
23680 +                FALSE,VM_PROT_READ) != KERN_SUCCESS) { \
23681 +            ABORT("vm_portect failed"); \
23682 +        }
23683 +    #define UNPROTECT(addr,len) \
23684 +        if(vm_protect(GC_task_self,(vm_address_t)(addr),(vm_size_t)(len), \
23685 +                FALSE,VM_PROT_READ|VM_PROT_WRITE) != KERN_SUCCESS) { \
23686 +            ABORT("vm_portect failed"); \
23687 +        }
23688 +# else
23689 +    
23690  #   ifndef MSWINCE
23691  #     include <signal.h>
23692  #   endif
23693 @@ -1822,20 +2166,22 @@
23694                               &protect_junk)) { \
23695             ABORT("un-VirtualProtect failed"); \
23696           }
23697 -         
23698 -# endif
23699 +# endif /* !DARWIN */
23700 +# endif /* MSWIN32 || MSWINCE || DARWIN */
23701  
23702  #if defined(SUNOS4) || defined(FREEBSD)
23703      typedef void (* SIG_PF)();
23704 -#endif
23705 +#endif /* SUNOS4 || FREEBSD */
23706 +
23707  #if defined(SUNOS5SIGS) || defined(OSF1) || defined(LINUX) \
23708 -    || defined(MACOSX) || defined(HURD)
23709 +    || defined(HURD)
23710  # ifdef __STDC__
23711      typedef void (* SIG_PF)(int);
23712  # else
23713      typedef void (* SIG_PF)();
23714  # endif
23715 -#endif
23716 +#endif /* SUNOS5SIGS || OSF1 || LINUX || HURD */
23717 +
23718  #if defined(MSWIN32)
23719      typedef LPTOP_LEVEL_EXCEPTION_FILTER SIG_PF;
23720  #   undef SIG_DFL
23721 @@ -1849,7 +2195,8 @@
23722  
23723  #if defined(IRIX5) || defined(OSF1) || defined(HURD)
23724      typedef void (* REAL_SIG_PF)(int, int, struct sigcontext *);
23725 -#endif
23726 +#endif /* IRIX5 || OSF1 || HURD */
23727 +
23728  #if defined(SUNOS5SIGS)
23729  # ifdef HPUX
23730  #   define SIGINFO __siginfo
23731 @@ -1861,13 +2208,14 @@
23732  # else
23733      typedef void (* REAL_SIG_PF)();
23734  # endif
23735 -#endif
23736 +#endif /* SUNOS5SIGS */
23737 +
23738  #if defined(LINUX)
23739  #   if __GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2
23740        typedef struct sigcontext s_c;
23741  #   else  /* glibc < 2.2 */
23742  #     include <linux/version.h>
23743 -#     if (LINUX_VERSION_CODE >= 0x20100) && !defined(M68K) || defined(ALPHA)
23744 +#     if (LINUX_VERSION_CODE >= 0x20100) && !defined(M68K) || defined(ALPHA) || defined(ARM32)
23745          typedef struct sigcontext s_c;
23746  #     else
23747          typedef struct sigcontext_struct s_c;
23748 @@ -1895,139 +2243,14 @@
23749         return (char *)faultaddr;
23750      }
23751  #   endif /* !ALPHA */
23752 -# endif
23753 -
23754 -# if defined(MACOSX) /* Should also test for PowerPC? */
23755 -    typedef void (* REAL_SIG_PF)(int, int, struct sigcontext *);
23756 -
23757 -/* Decodes the machine instruction which was responsible for the sending of the
23758 -   SIGBUS signal. Sadly this is the only way to find the faulting address because
23759 -   the signal handler doesn't get it directly from the kernel (although it is
23760 -   available on the Mach level, but droppped by the BSD personality before it
23761 -   calls our signal handler...)
23762 -   This code should be able to deal correctly with all PPCs starting from the
23763 -   601 up to and including the G4s (including Velocity Engine). */
23764 -#define EXTRACT_OP1(iw)     (((iw) & 0xFC000000) >> 26)
23765 -#define EXTRACT_OP2(iw)     (((iw) & 0x000007FE) >> 1)
23766 -#define EXTRACT_REGA(iw)    (((iw) & 0x001F0000) >> 16)
23767 -#define EXTRACT_REGB(iw)    (((iw) & 0x03E00000) >> 21)
23768 -#define EXTRACT_REGC(iw)    (((iw) & 0x0000F800) >> 11)
23769 -#define EXTRACT_DISP(iw)    ((short *) &(iw))[1]
23770 -
23771 -static char *get_fault_addr(struct sigcontext *scp)
23772 -{
23773 -   unsigned int   instr = *((unsigned int *) scp->sc_ir);
23774 -   unsigned int * regs = &((unsigned int *) scp->sc_regs)[2];
23775 -   int            disp = 0, tmp;
23776 -   unsigned int   baseA = 0, baseB = 0;
23777 -   unsigned int   addr, alignmask = 0xFFFFFFFF;
23778 -
23779 -#ifdef GC_DEBUG_DECODER
23780 -   GC_err_printf1("Instruction: 0x%lx\n", instr);
23781 -   GC_err_printf1("Opcode 1: d\n", (int)EXTRACT_OP1(instr));
23782 -#endif
23783 -   switch(EXTRACT_OP1(instr)) {
23784 -      case 38:   /* stb */
23785 -      case 39:   /* stbu */
23786 -      case 54:   /* stfd */
23787 -      case 55:   /* stfdu */
23788 -      case 52:   /* stfs */
23789 -      case 53:   /* stfsu */
23790 -      case 44:   /* sth */
23791 -      case 45:   /* sthu */
23792 -      case 47:   /* stmw */
23793 -      case 36:   /* stw */
23794 -      case 37:   /* stwu */
23795 -            tmp = EXTRACT_REGA(instr);
23796 -            if(tmp > 0)
23797 -               baseA = regs[tmp];
23798 -            disp = EXTRACT_DISP(instr);
23799 -            break;
23800 -      case 31:
23801 -#ifdef GC_DEBUG_DECODER
23802 -            GC_err_printf1("Opcode 2: %d\n", (int)EXTRACT_OP2(instr));
23803 -#endif
23804 -            switch(EXTRACT_OP2(instr)) {
23805 -               case 86:    /* dcbf */
23806 -               case 54:    /* dcbst */
23807 -               case 1014:  /* dcbz */
23808 -               case 247:   /* stbux */
23809 -               case 215:   /* stbx */
23810 -               case 759:   /* stfdux */
23811 -               case 727:   /* stfdx */
23812 -               case 983:   /* stfiwx */
23813 -               case 695:   /* stfsux */
23814 -               case 663:   /* stfsx */
23815 -               case 918:   /* sthbrx */
23816 -               case 439:   /* sthux */
23817 -               case 407:   /* sthx */
23818 -               case 661:   /* stswx */
23819 -               case 662:   /* stwbrx */
23820 -               case 150:   /* stwcx. */
23821 -               case 183:   /* stwux */
23822 -               case 151:   /* stwx */
23823 -               case 135:   /* stvebx */
23824 -               case 167:   /* stvehx */
23825 -               case 199:   /* stvewx */
23826 -               case 231:   /* stvx */
23827 -               case 487:   /* stvxl */
23828 -                     tmp = EXTRACT_REGA(instr);
23829 -                     if(tmp > 0)
23830 -                        baseA = regs[tmp];
23831 -                        baseB = regs[EXTRACT_REGC(instr)];
23832 -                        /* determine Altivec alignment mask */
23833 -                        switch(EXTRACT_OP2(instr)) {
23834 -                           case 167:   /* stvehx */
23835 -                                 alignmask = 0xFFFFFFFE;
23836 -                                 break;
23837 -                           case 199:   /* stvewx */
23838 -                                 alignmask = 0xFFFFFFFC;
23839 -                                 break;
23840 -                           case 231:   /* stvx */
23841 -                                 alignmask = 0xFFFFFFF0;
23842 -                                 break;
23843 -                           case 487:  /* stvxl */
23844 -                                 alignmask = 0xFFFFFFF0;
23845 -                                 break;
23846 -                        }
23847 -                        break;
23848 -               case 725:   /* stswi */
23849 -                     tmp = EXTRACT_REGA(instr);
23850 -                     if(tmp > 0)
23851 -                        baseA = regs[tmp];
23852 -                        break;
23853 -               default:   /* ignore instruction */
23854 -#ifdef GC_DEBUG_DECODER
23855 -                     GC_err_printf("Ignored by inner handler\n");
23856 -#endif
23857 -                     return NULL;
23858 -                    break;
23859 -            }
23860 -            break;
23861 -      default:   /* ignore instruction */
23862 -#ifdef GC_DEBUG_DECODER
23863 -            GC_err_printf("Ignored by main handler\n");
23864 -#endif
23865 -            return NULL;
23866 -            break;
23867 -   }
23868 -       
23869 -   addr = (baseA + baseB) + disp;
23870 -  addr &= alignmask;
23871 -#ifdef GC_DEBUG_DECODER
23872 -   GC_err_printf1("BaseA: %d\n", baseA);
23873 -   GC_err_printf1("BaseB: %d\n", baseB);
23874 -   GC_err_printf1("Disp:  %d\n", disp);
23875 -   GC_err_printf1("Address: %d\n", addr);
23876 -#endif
23877 -   return (char *)addr;
23878 -}
23879 -#endif /* MACOSX */
23880 +# endif /* LINUX */
23881  
23882 +#ifndef DARWIN
23883  SIG_PF GC_old_bus_handler;
23884  SIG_PF GC_old_segv_handler;    /* Also old MSWIN32 ACCESS_VIOLATION filter */
23885 +#endif /* !DARWIN */
23886  
23887 -#ifdef THREADS
23888 +#if defined(THREADS)
23889  /* We need to lock around the bitmap update in the write fault handler */
23890  /* in order to avoid the risk of losing a bit.  We do this with a      */
23891  /* test-and-set spin lock if we know how to do that.  Otherwise we     */
23892 @@ -2076,6 +2299,7 @@
23893  #endif /* !THREADS */
23894  
23895  /*ARGSUSED*/
23896 +#if !defined(DARWIN)
23897  # if defined (SUNOS4) || defined(FREEBSD)
23898      void GC_write_fault_handler(sig, code, scp, addr)
23899      int sig, code;
23900 @@ -2091,7 +2315,8 @@
23901  #     define SIG_OK (sig == SIGBUS)
23902  #     define CODE_OK (code == BUS_PAGE_FAULT)
23903  #   endif
23904 -# endif
23905 +# endif /* SUNOS4 || FREEBSD */
23906 +
23907  # if defined(IRIX5) || defined(OSF1) || defined(HURD)
23908  #   include <errno.h>
23909      void GC_write_fault_handler(int sig, int code, struct sigcontext *scp)
23910 @@ -2107,7 +2332,8 @@
23911  #     define SIG_OK (sig == SIGBUS || sig == SIGSEGV)  
23912  #     define CODE_OK  TRUE
23913  #   endif
23914 -# endif
23915 +# endif /* IRIX5 || OSF1 || HURD */
23916 +
23917  # if defined(LINUX)
23918  #   if defined(ALPHA) || defined(M68K)
23919        void GC_write_fault_handler(int sig, int code, s_c * sc)
23920 @@ -2115,15 +2341,20 @@
23921  #     if defined(IA64) || defined(HP_PA)
23922          void GC_write_fault_handler(int sig, siginfo_t * si, s_c * scp)
23923  #     else
23924 +#       if defined(ARM32)
23925 +          void GC_write_fault_handler(int sig, int a2, int a3, int a4, s_c sc)
23926 +#       else
23927          void GC_write_fault_handler(int sig, s_c sc)
23928  #     endif
23929  #   endif
23930 +#   endif
23931  #   define SIG_OK (sig == SIGSEGV)
23932  #   define CODE_OK TRUE
23933         /* Empirically c.trapno == 14, on IA32, but is that useful?     */
23934         /* Should probably consider alignment issues on other           */
23935         /* architectures.                                               */
23936 -# endif
23937 +# endif /* LINUX */
23938 +
23939  # if defined(SUNOS5SIGS)
23940  #  ifdef __STDC__
23941      void GC_write_fault_handler(int sig, struct SIGINFO *scp, void * context)
23942 @@ -2144,13 +2375,7 @@
23943  #     define SIG_OK (sig == SIGSEGV)
23944  #     define CODE_OK (scp -> si_code == SEGV_ACCERR)
23945  #   endif
23946 -# endif
23947 -
23948 -# if defined(MACOSX)
23949 -    void GC_write_fault_handler(int sig, int code, struct sigcontext *scp)
23950 -#   define SIG_OK (sig == SIGBUS)
23951 -#   define CODE_OK (code == 0 /* experimentally determined */)
23952 -# endif
23953 +# endif /* SUNOS5SIGS */
23954  
23955  # if defined(MSWIN32) || defined(MSWINCE)
23956      LONG WINAPI GC_write_fault_handler(struct _EXCEPTION_POINTERS *exc_info)
23957 @@ -2158,7 +2383,7 @@
23958                         STATUS_ACCESS_VIOLATION)
23959  #   define CODE_OK (exc_info -> ExceptionRecord -> ExceptionInformation[0] == 1)
23960                         /* Write fault */
23961 -# endif
23962 +# endif /* MSWIN32 || MSWINCE */
23963  {
23964      register unsigned i;
23965  #   if defined(HURD) 
23966 @@ -2218,6 +2443,9 @@
23967  #             if defined(POWERPC)
23968                  char * addr = (char *) (sc.regs->dar);
23969  #            else
23970 +#               if defined(ARM32)
23971 +                  char * addr = (char *)sc.fault_address;
23972 +#               else
23973                 --> architecture not supported
23974  #            endif
23975  #          endif
23976 @@ -2225,8 +2453,6 @@
23977  #      endif
23978  #     endif
23979  #   endif
23980 -#   if defined(MACOSX)
23981 -        char * addr = get_fault_addr(scp);
23982  #   endif
23983  #   if defined(MSWIN32) || defined(MSWINCE)
23984         char * addr = (char *) (exc_info -> ExceptionRecord
23985 @@ -2291,9 +2517,6 @@
23986                     (*(REAL_SIG_PF)old_handler) (sig, code, scp);
23987                     return;
23988  #              endif
23989 -#              ifdef MACOSX
23990 -                   (*(REAL_SIG_PF)old_handler) (sig, code, scp);
23991 -#              endif
23992  #              ifdef MSWIN32
23993                     return((*old_handler)(exc_info));
23994  #              endif
23995 @@ -2335,10 +2558,11 @@
23996      ABORT("Unexpected bus error or segmentation fault");
23997  #endif
23998  }
23999 +#endif /* !DARWIN */
24000  
24001  /*
24002   * We hold the allocation lock.  We expect block h to be written
24003 - * shortly.  Ensure that all pages cvontaining any part of the n hblks
24004 + * shortly.  Ensure that all pages containing any part of the n hblks
24005   * starting at h are no longer protected.  If is_ptrfree is false,
24006   * also ensure that they will subsequently appear to be dirty.
24007   */
24008 @@ -2367,6 +2591,7 @@
24009      UNPROTECT(h_trunc, (ptr_t)h_end - (ptr_t)h_trunc);
24010  }
24011  
24012 +#if !defined(DARWIN)
24013  void GC_dirty_init()
24014  {
24015  #   if defined(SUNOS5SIGS) || defined(IRIX5) || defined(LINUX) || \
24016 @@ -2389,13 +2614,6 @@
24017          (void)sigaddset(&act.sa_mask, SIG_SUSPEND);
24018  #     endif /* SIG_SUSPEND */
24019  #    endif
24020 -#   if defined(MACOSX)
24021 -      struct sigaction act, oldact;
24022 -
24023 -      act.sa_flags = SA_RESTART;
24024 -      act.sa_handler = GC_write_fault_handler;
24025 -      sigemptyset(&act.sa_mask);
24026 -#   endif
24027  #   ifdef PRINTSTATS
24028         GC_printf0("Inititalizing mprotect virtual dirty bit implementation\n");
24029  #   endif
24030 @@ -2435,9 +2653,12 @@
24031         sigaction(SIGSEGV, 0, &oldact);
24032         sigaction(SIGSEGV, &act, 0);
24033  #     else
24034 -       sigaction(SIGSEGV, &act, &oldact);
24035 +       {
24036 +         int res = sigaction(SIGSEGV, &act, &oldact);
24037 +         if (res != 0) ABORT("Sigaction failed");
24038 +       }
24039  #     endif
24040 -#     if defined(_sigargs) || defined(HURD)
24041 +#     if defined(_sigargs) || defined(HURD) || !defined(SA_SIGINFO)
24042         /* This is Irix 5.x, not 6.x.  Irix 5.x does not have   */
24043         /* sa_sigaction.                                        */
24044         GC_old_segv_handler = oldact.sa_handler;
24045 @@ -2458,7 +2679,7 @@
24046  #       endif
24047        }
24048  #   endif
24049 -#   if defined(MACOSX) || defined(HPUX) || defined(LINUX) || defined(HURD)
24050 +#   if defined(HPUX) || defined(LINUX) || defined(HURD)
24051        sigaction(SIGBUS, &act, &oldact);
24052        GC_old_bus_handler = oldact.sa_handler;
24053        if (GC_old_bus_handler == SIG_IGN) {
24054 @@ -2470,7 +2691,7 @@
24055           GC_err_printf0("Replaced other SIGBUS handler\n");
24056  #       endif
24057        }
24058 -#   endif /* MACOS || HPUX || LINUX */
24059 +#   endif /* HPUX || LINUX || HURD */
24060  #   if defined(MSWIN32)
24061        GC_old_segv_handler = SetUnhandledExceptionFilter(GC_write_fault_handler);
24062        if (GC_old_segv_handler != NULL) {
24063 @@ -2482,6 +2703,7 @@
24064        }
24065  #   endif
24066  }
24067 +#endif /* !DARWIN */
24068  
24069  int GC_incremental_protection_needs()
24070  {
24071 @@ -2628,15 +2850,23 @@
24072               ((ptr_t)end_block - (ptr_t)start_block) + HBLKSIZE);
24073  }
24074  
24075 -#if !defined(MSWIN32) && !defined(MSWINCE) && !defined(THREADS) \
24076 -    && !defined(GC_USE_LD_WRAP)
24077 +#if 0
24078 +
24079 +/* We no longer wrap read by default, since that was causing too many  */
24080 +/* problems.  It is preferred that the client instead avoids writing   */
24081 +/* to the write-protected heap with a system call.                     */
24082 +/* This still serves as sample code if you do want to wrap system calls.*/
24083 +
24084 +#if !defined(MSWIN32) && !defined(MSWINCE) && !defined(GC_USE_LD_WRAP)
24085  /* Replacement for UNIX system call.                                    */
24086  /* Other calls that write to the heap should be handled similarly.      */
24087  /* Note that this doesn't work well for blocking reads:  It will hold   */
24088 -/* tha allocation lock for the entur duration of the call. Multithreaded */
24089 +/* the allocation lock for the entire duration of the call. Multithreaded */
24090  /* clients should really ensure that it won't block, either by setting          */
24091  /* the descriptor nonblocking, or by calling select or poll first, to   */
24092  /* make sure that input is available.                                   */
24093 +/* Another, preferred alternative is to ensure that system calls never           */
24094 +/* write to the protected heap (see above).                              */
24095  # if defined(__STDC__) && !defined(SUNOS4)
24096  #   include <unistd.h>
24097  #   include <sys/uio.h>
24098 @@ -2706,6 +2936,8 @@
24099      /* actually calls.                                                 */
24100  #endif
24101  
24102 +#endif /* 0 */
24103 +
24104  /*ARGSUSED*/
24105  GC_bool GC_page_was_ever_dirty(h)
24106  struct hblk *h;
24107 @@ -2721,13 +2953,6 @@
24108  {
24109  }
24110  
24111 -# else /* !MPROTECT_VDB */
24112 -
24113 -#   ifdef GC_USE_LD_WRAP
24114 -      ssize_t __wrap_read(int fd, void *buf, size_t nbyte)
24115 -      { return __real_read(fd, buf, nbyte); }
24116 -#   endif
24117 -
24118  # endif /* MPROTECT_VDB */
24119  
24120  # ifdef PROC_VDB
24121 @@ -2806,6 +3031,7 @@
24122      }
24123      GC_proc_fd = syscall(SYS_ioctl, fd, PIOCOPENPD, 0);
24124      close(fd);
24125 +    syscall(SYS_fcntl, GC_proc_fd, F_SETFD, FD_CLOEXEC);
24126      if (GC_proc_fd < 0) {
24127         ABORT("/proc ioctl failed");
24128      }
24129 @@ -3045,6 +3271,553 @@
24130  
24131  # endif /* PCR_VDB */
24132  
24133 +#if defined(MPROTECT_VDB) && defined(DARWIN)
24134 +/* The following sources were used as a *reference* for this exception handling
24135 +   code:
24136 +      1. Apple's mach/xnu documentation
24137 +      2. Timothy J. Wood's "Mach Exception Handlers 101" post to the
24138 +         omnigroup's macosx-dev list. 
24139 +         www.omnigroup.com/mailman/archive/macosx-dev/2000-June/002030.html
24140 +      3. macosx-nat.c from Apple's GDB source code.
24141 +*/
24142 +   
24143 +/* There seem to be numerous problems with darwin's mach exception handling.
24144 +   I'm pretty sure they are not problems in my code. Search for 
24145 +   BROKEN_EXCEPTION_HANDLING for more information. */
24146 +#define BROKEN_EXCEPTION_HANDLING
24147 +   
24148 +#include <mach/mach.h>
24149 +#include <mach/mach_error.h>
24150 +#include <mach/thread_status.h>
24151 +#include <mach/exception.h>
24152 +#include <mach/task.h>
24153 +#include <pthread.h>
24154 +
24155 +/* These are not defined in any header, although they are documented */
24156 +extern boolean_t exc_server(mach_msg_header_t *,mach_msg_header_t *);
24157 +extern kern_return_t exception_raise(
24158 +    mach_port_t,mach_port_t,mach_port_t,
24159 +    exception_type_t,exception_data_t,mach_msg_type_number_t);
24160 +extern kern_return_t exception_raise_state(
24161 +    mach_port_t,mach_port_t,mach_port_t,
24162 +    exception_type_t,exception_data_t,mach_msg_type_number_t,
24163 +    thread_state_flavor_t*,thread_state_t,mach_msg_type_number_t,
24164 +    thread_state_t,mach_msg_type_number_t*);
24165 +extern kern_return_t exception_raise_state_identity(
24166 +    mach_port_t,mach_port_t,mach_port_t,
24167 +    exception_type_t,exception_data_t,mach_msg_type_number_t,
24168 +    thread_state_flavor_t*,thread_state_t,mach_msg_type_number_t,
24169 +    thread_state_t,mach_msg_type_number_t*);
24170 +
24171 +
24172 +#define MAX_EXCEPTION_PORTS 16
24173 +
24174 +static mach_port_t GC_task_self;
24175 +
24176 +static struct {
24177 +    mach_msg_type_number_t count;
24178 +    exception_mask_t      masks[MAX_EXCEPTION_PORTS];
24179 +    exception_handler_t   ports[MAX_EXCEPTION_PORTS];
24180 +    exception_behavior_t  behaviors[MAX_EXCEPTION_PORTS];
24181 +    thread_state_flavor_t flavors[MAX_EXCEPTION_PORTS];
24182 +} GC_old_exc_ports;
24183 +
24184 +static struct {
24185 +    mach_port_t exception;
24186 +#if defined(THREADS)
24187 +    mach_port_t reply;
24188 +#endif
24189 +} GC_ports;
24190 +
24191 +typedef struct {
24192 +    mach_msg_header_t head;
24193 +} GC_msg_t;
24194 +
24195 +typedef enum {
24196 +    GC_MP_NORMAL, GC_MP_DISCARDING, GC_MP_STOPPED
24197 +} GC_mprotect_state_t;
24198 +
24199 +/* FIXME: 1 and 2 seem to be safe to use in the msgh_id field,
24200 +   but it isn't  documented. Use the source and see if they
24201 +   should be ok. */
24202 +#define ID_STOP 1
24203 +#define ID_RESUME 2
24204 +
24205 +/* These values are only used on the reply port */
24206 +#define ID_ACK 3
24207 +
24208 +#if defined(THREADS)
24209 +
24210 +GC_mprotect_state_t GC_mprotect_state;
24211 +
24212 +/* The following should ONLY be called when the world is stopped  */
24213 +static void GC_mprotect_thread_notify(mach_msg_id_t id) {
24214 +    struct {
24215 +        GC_msg_t msg;
24216 +        mach_msg_trailer_t trailer;
24217 +    } buf;
24218 +    mach_msg_return_t r;
24219 +    /* remote, local */
24220 +    buf.msg.head.msgh_bits = 
24221 +        MACH_MSGH_BITS(MACH_MSG_TYPE_MAKE_SEND,0);
24222 +    buf.msg.head.msgh_size = sizeof(buf.msg);
24223 +    buf.msg.head.msgh_remote_port = GC_ports.exception;
24224 +    buf.msg.head.msgh_local_port = MACH_PORT_NULL;
24225 +    buf.msg.head.msgh_id = id;
24226 +            
24227 +    r = mach_msg(
24228 +        &buf.msg.head,
24229 +        MACH_SEND_MSG|MACH_RCV_MSG|MACH_RCV_LARGE,
24230 +        sizeof(buf.msg),
24231 +        sizeof(buf),
24232 +        GC_ports.reply,
24233 +        MACH_MSG_TIMEOUT_NONE,
24234 +        MACH_PORT_NULL);
24235 +    if(r != MACH_MSG_SUCCESS)
24236 +        ABORT("mach_msg failed in GC_mprotect_thread_notify");
24237 +    if(buf.msg.head.msgh_id != ID_ACK)
24238 +        ABORT("invalid ack in GC_mprotect_thread_notify");
24239 +}
24240 +
24241 +/* Should only be called by the mprotect thread */
24242 +static void GC_mprotect_thread_reply() {
24243 +    GC_msg_t msg;
24244 +    mach_msg_return_t r;
24245 +    /* remote, local */
24246 +    msg.head.msgh_bits = 
24247 +        MACH_MSGH_BITS(MACH_MSG_TYPE_MAKE_SEND,0);
24248 +    msg.head.msgh_size = sizeof(msg);
24249 +    msg.head.msgh_remote_port = GC_ports.reply;
24250 +    msg.head.msgh_local_port = MACH_PORT_NULL;
24251 +    msg.head.msgh_id = ID_ACK;
24252 +            
24253 +    r = mach_msg(
24254 +        &msg.head,
24255 +        MACH_SEND_MSG,
24256 +        sizeof(msg),
24257 +        0,
24258 +        MACH_PORT_NULL,
24259 +        MACH_MSG_TIMEOUT_NONE,
24260 +        MACH_PORT_NULL);
24261 +    if(r != MACH_MSG_SUCCESS)
24262 +        ABORT("mach_msg failed in GC_mprotect_thread_reply");
24263 +}
24264 +
24265 +void GC_mprotect_stop() {
24266 +    GC_mprotect_thread_notify(ID_STOP);
24267 +}
24268 +void GC_mprotect_resume() {
24269 +    GC_mprotect_thread_notify(ID_RESUME);
24270 +}
24271 +
24272 +#else /* !THREADS */
24273 +/* The compiler should optimize away any GC_mprotect_state computations */
24274 +#define GC_mprotect_state GC_MP_NORMAL
24275 +#endif
24276 +
24277 +static void *GC_mprotect_thread(void *arg) {
24278 +    mach_msg_return_t r;
24279 +    /* These two structures contain some private kernel data. We don't need to
24280 +       access any of it so we don't bother defining a proper struct. The
24281 +       correct definitions are in the xnu source code. */
24282 +    struct {
24283 +        mach_msg_header_t head;
24284 +        char data[256];
24285 +    } reply;
24286 +    struct {
24287 +        mach_msg_header_t head;
24288 +        mach_msg_body_t msgh_body;
24289 +        char data[1024];
24290 +    } msg;
24291 +
24292 +    mach_msg_id_t id;
24293 +    
24294 +    for(;;) {
24295 +        r = mach_msg(
24296 +            &msg.head,
24297 +            MACH_RCV_MSG|MACH_RCV_LARGE|
24298 +                (GC_mprotect_state == GC_MP_DISCARDING ? MACH_RCV_TIMEOUT : 0),
24299 +            0,
24300 +            sizeof(msg),
24301 +            GC_ports.exception,
24302 +            GC_mprotect_state == GC_MP_DISCARDING ? 0 : MACH_MSG_TIMEOUT_NONE,
24303 +            MACH_PORT_NULL);
24304 +        
24305 +        id = r == MACH_MSG_SUCCESS ? msg.head.msgh_id : -1;
24306 +        
24307 +#if defined(THREADS)
24308 +        if(GC_mprotect_state == GC_MP_DISCARDING) {
24309 +            if(r == MACH_RCV_TIMED_OUT) {
24310 +                GC_mprotect_state = GC_MP_STOPPED;
24311 +                GC_mprotect_thread_reply();
24312 +                continue;
24313 +            }
24314 +            if(r == MACH_MSG_SUCCESS && (id == ID_STOP || id == ID_RESUME))
24315 +                ABORT("out of order mprotect thread request");
24316 +        }
24317 +#endif
24318 +        
24319 +        if(r != MACH_MSG_SUCCESS) {
24320 +            GC_err_printf2("mach_msg failed with %d %s\n", 
24321 +                (int)r,mach_error_string(r));
24322 +            ABORT("mach_msg failed");
24323 +        }
24324 +        
24325 +        switch(id) {
24326 +#if defined(THREADS)
24327 +            case ID_STOP:
24328 +                if(GC_mprotect_state != GC_MP_NORMAL)
24329 +                    ABORT("Called mprotect_stop when state wasn't normal");
24330 +                GC_mprotect_state = GC_MP_DISCARDING;
24331 +                break;
24332 +            case ID_RESUME:
24333 +                if(GC_mprotect_state != GC_MP_STOPPED)
24334 +                    ABORT("Called mprotect_resume when state wasn't stopped");
24335 +                GC_mprotect_state = GC_MP_NORMAL;
24336 +                GC_mprotect_thread_reply();
24337 +                break;
24338 +#endif /* THREADS */
24339 +            default:
24340 +                   /* Handle the message (calls catch_exception_raise) */
24341 +               if(!exc_server(&msg.head,&reply.head))
24342 +                    ABORT("exc_server failed");
24343 +                /* Send the reply */
24344 +                r = mach_msg(
24345 +                    &reply.head,
24346 +                    MACH_SEND_MSG,
24347 +                    reply.head.msgh_size,
24348 +                    0,
24349 +                    MACH_PORT_NULL,
24350 +                    MACH_MSG_TIMEOUT_NONE,
24351 +                    MACH_PORT_NULL);
24352 +               if(r != MACH_MSG_SUCCESS) {
24353 +                       /* This will fail if the thread dies, but the thread shouldn't
24354 +                          die... */
24355 +                       #ifdef BROKEN_EXCEPTION_HANDLING
24356 +                       GC_err_printf2(
24357 +                        "mach_msg failed with %d %s while sending exc reply\n",
24358 +                        (int)r,mach_error_string(r));
24359 +               #else
24360 +                       ABORT("mach_msg failed while sending exception reply");
24361 +               #endif
24362 +               }
24363 +        } /* switch */
24364 +    } /* for(;;) */
24365 +    /* NOT REACHED */
24366 +    return NULL;
24367 +}
24368 +
24369 +/* All this SIGBUS code shouldn't be necessary. All protection faults should
24370 +   be going throught the mach exception handler. However, it seems a SIGBUS is
24371 +   occasionally sent for some unknown reason. Even more odd, it seems to be
24372 +   meaningless and safe to ignore. */
24373 +#ifdef BROKEN_EXCEPTION_HANDLING
24374 +
24375 +typedef void (* SIG_PF)();
24376 +static SIG_PF GC_old_bus_handler;
24377 +
24378 +/* Updates to this aren't atomic, but the SIGBUSs seem pretty rare.
24379 +   Even if this doesn't get updated property, it isn't really a problem */
24380 +static int GC_sigbus_count;
24381 +
24382 +static void GC_darwin_sigbus(int num,siginfo_t *sip,void *context) {
24383 +    if(num != SIGBUS) ABORT("Got a non-sigbus signal in the sigbus handler");
24384 +    
24385 +    /* Ugh... some seem safe to ignore, but too many in a row probably means
24386 +       trouble. GC_sigbus_count is reset for each mach exception that is
24387 +       handled */
24388 +    if(GC_sigbus_count >= 8) {
24389 +        ABORT("Got more than 8 SIGBUSs in a row!");
24390 +    } else {
24391 +        GC_sigbus_count++;
24392 +        GC_err_printf0("GC: WARNING: Ignoring SIGBUS.\n");
24393 +    }
24394 +}
24395 +#endif /* BROKEN_EXCEPTION_HANDLING */
24396 +
24397 +void GC_dirty_init() {
24398 +    kern_return_t r;
24399 +    mach_port_t me;
24400 +    pthread_t thread;
24401 +    pthread_attr_t attr;
24402 +    exception_mask_t mask;
24403 +    
24404 +#   ifdef PRINTSTATS
24405 +        GC_printf0("Inititalizing mach/darwin mprotect virtual dirty bit "
24406 +            "implementation\n");
24407 +#   endif  
24408 +#      ifdef BROKEN_EXCEPTION_HANDLING
24409 +        GC_err_printf0("GC: WARNING: Enabling workarounds for various darwin "
24410 +            "exception handling bugs.\n");
24411 +#      endif
24412 +    GC_dirty_maintained = TRUE;
24413 +    if (GC_page_size % HBLKSIZE != 0) {
24414 +        GC_err_printf0("Page size not multiple of HBLKSIZE\n");
24415 +        ABORT("Page size not multiple of HBLKSIZE");
24416 +    }
24417 +    
24418 +    GC_task_self = me = mach_task_self();
24419 +    
24420 +    r = mach_port_allocate(me,MACH_PORT_RIGHT_RECEIVE,&GC_ports.exception);
24421 +    if(r != KERN_SUCCESS) ABORT("mach_port_allocate failed (exception port)");
24422 +    
24423 +    r = mach_port_insert_right(me,GC_ports.exception,GC_ports.exception,
24424 +       MACH_MSG_TYPE_MAKE_SEND);
24425 +    if(r != KERN_SUCCESS)
24426 +       ABORT("mach_port_insert_right failed (exception port)");
24427 +
24428 +    #if defined(THREADS)
24429 +        r = mach_port_allocate(me,MACH_PORT_RIGHT_RECEIVE,&GC_ports.reply);
24430 +        if(r != KERN_SUCCESS) ABORT("mach_port_allocate failed (reply port)");
24431 +    #endif
24432 +
24433 +    /* The exceptions we want to catch */  
24434 +    mask = EXC_MASK_BAD_ACCESS;
24435 +
24436 +    r = task_get_exception_ports(
24437 +        me,
24438 +        mask,
24439 +        GC_old_exc_ports.masks,
24440 +        &GC_old_exc_ports.count,
24441 +        GC_old_exc_ports.ports,
24442 +        GC_old_exc_ports.behaviors,
24443 +        GC_old_exc_ports.flavors
24444 +    );
24445 +    if(r != KERN_SUCCESS) ABORT("task_get_exception_ports failed");
24446 +        
24447 +    r = task_set_exception_ports(
24448 +        me,
24449 +        mask,
24450 +        GC_ports.exception,
24451 +        EXCEPTION_DEFAULT,
24452 +        MACHINE_THREAD_STATE
24453 +    );
24454 +    if(r != KERN_SUCCESS) ABORT("task_set_exception_ports failed");
24455 +
24456 +    if(pthread_attr_init(&attr) != 0) ABORT("pthread_attr_init failed");
24457 +    if(pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED) != 0) 
24458 +        ABORT("pthread_attr_setdetachedstate failed");
24459 +
24460 +#      undef pthread_create
24461 +    /* This will call the real pthread function, not our wrapper */
24462 +    if(pthread_create(&thread,&attr,GC_mprotect_thread,NULL) != 0)
24463 +        ABORT("pthread_create failed");
24464 +    pthread_attr_destroy(&attr);
24465 +    
24466 +    /* Setup the sigbus handler for ignoring the meaningless SIGBUSs */
24467 +    #ifdef BROKEN_EXCEPTION_HANDLING 
24468 +    {
24469 +        struct sigaction sa, oldsa;
24470 +        sa.sa_handler = (SIG_PF)GC_darwin_sigbus;
24471 +        sigemptyset(&sa.sa_mask);
24472 +        sa.sa_flags = SA_RESTART|SA_SIGINFO;
24473 +        if(sigaction(SIGBUS,&sa,&oldsa) < 0) ABORT("sigaction");
24474 +        GC_old_bus_handler = (SIG_PF)oldsa.sa_handler;
24475 +        if (GC_old_bus_handler != SIG_DFL) {
24476 +#              ifdef PRINTSTATS
24477 +                GC_err_printf0("Replaced other SIGBUS handler\n");
24478 +#              endif
24479 +        }
24480 +    }
24481 +    #endif /* BROKEN_EXCEPTION_HANDLING  */
24482 +}
24483
24484 +/* The source code for Apple's GDB was used as a reference for the exception
24485 +   forwarding code. This code is similar to be GDB code only because there is 
24486 +   only one way to do it. */
24487 +static kern_return_t GC_forward_exception(
24488 +        mach_port_t thread,
24489 +        mach_port_t task,
24490 +        exception_type_t exception,
24491 +        exception_data_t data,
24492 +        mach_msg_type_number_t data_count
24493 +) {
24494 +    int i;
24495 +    kern_return_t r;
24496 +    mach_port_t port;
24497 +    exception_behavior_t behavior;
24498 +    thread_state_flavor_t flavor;
24499 +    
24500 +    thread_state_data_t thread_state;
24501 +    mach_msg_type_number_t thread_state_count = THREAD_STATE_MAX;
24502 +        
24503 +    for(i=0;i<GC_old_exc_ports.count;i++)
24504 +        if(GC_old_exc_ports.masks[i] & (1 << exception))
24505 +            break;
24506 +    if(i==GC_old_exc_ports.count) ABORT("No handler for exception!");
24507 +    
24508 +    port = GC_old_exc_ports.ports[i];
24509 +    behavior = GC_old_exc_ports.behaviors[i];
24510 +    flavor = GC_old_exc_ports.flavors[i];
24511 +
24512 +    if(behavior != EXCEPTION_DEFAULT) {
24513 +        r = thread_get_state(thread,flavor,thread_state,&thread_state_count);
24514 +        if(r != KERN_SUCCESS)
24515 +            ABORT("thread_get_state failed in forward_exception");
24516 +    }
24517 +    
24518 +    switch(behavior) {
24519 +        case EXCEPTION_DEFAULT:
24520 +            r = exception_raise(port,thread,task,exception,data,data_count);
24521 +            break;
24522 +        case EXCEPTION_STATE:
24523 +            r = exception_raise_state(port,thread,task,exception,data,
24524 +                data_count,&flavor,thread_state,thread_state_count,
24525 +                thread_state,&thread_state_count);
24526 +            break;
24527 +        case EXCEPTION_STATE_IDENTITY:
24528 +            r = exception_raise_state_identity(port,thread,task,exception,data,
24529 +                data_count,&flavor,thread_state,thread_state_count,
24530 +                thread_state,&thread_state_count);
24531 +            break;
24532 +        default:
24533 +            r = KERN_FAILURE; /* make gcc happy */
24534 +            ABORT("forward_exception: unknown behavior");
24535 +            break;
24536 +    }
24537 +    
24538 +    if(behavior != EXCEPTION_DEFAULT) {
24539 +        r = thread_set_state(thread,flavor,thread_state,thread_state_count);
24540 +        if(r != KERN_SUCCESS)
24541 +            ABORT("thread_set_state failed in forward_exception");
24542 +    }
24543 +    
24544 +    return r;
24545 +}
24546 +
24547 +#define FWD() GC_forward_exception(thread,task,exception,code,code_count)
24548 +
24549 +/* This violates the namespace rules but there isn't anything that can be done
24550 +   about it. The exception handling stuff is hard coded to call this */
24551 +kern_return_t
24552 +catch_exception_raise(
24553 +   mach_port_t exception_port,mach_port_t thread,mach_port_t task,
24554 +   exception_type_t exception,exception_data_t code,
24555 +   mach_msg_type_number_t code_count
24556 +) {
24557 +    kern_return_t r;
24558 +    char *addr;
24559 +    struct hblk *h;
24560 +    int i;
24561 +#ifdef POWERPC
24562 +    thread_state_flavor_t flavor = PPC_EXCEPTION_STATE;
24563 +    mach_msg_type_number_t exc_state_count = PPC_EXCEPTION_STATE_COUNT;
24564 +    ppc_exception_state_t exc_state;
24565 +#else
24566 +#      error FIXME for non-ppc darwin
24567 +#endif
24568 +
24569 +    
24570 +    if(exception != EXC_BAD_ACCESS || code[0] != KERN_PROTECTION_FAILURE) {
24571 +        #ifdef DEBUG_EXCEPTION_HANDLING
24572 +        /* We aren't interested, pass it on to the old handler */
24573 +        GC_printf3("Exception: 0x%x Code: 0x%x 0x%x in catch....\n",
24574 +            exception,
24575 +            code_count > 0 ? code[0] : -1,
24576 +            code_count > 1 ? code[1] : -1); 
24577 +        #endif
24578 +        return FWD();
24579 +    }
24580 +
24581 +    r = thread_get_state(thread,flavor,
24582 +        (natural_t*)&exc_state,&exc_state_count);
24583 +    if(r != KERN_SUCCESS) {
24584 +        /* The thread is supposed to be suspended while the exception handler
24585 +           is called. This shouldn't fail. */
24586 +        #ifdef BROKEN_EXCEPTION_HANDLING
24587 +            GC_err_printf0("thread_get_state failed in "
24588 +                "catch_exception_raise\n");
24589 +            return KERN_SUCCESS;
24590 +        #else
24591 +            ABORT("thread_get_state failed in catch_exception_raise");
24592 +        #endif
24593 +    }
24594 +    
24595 +    /* This is the address that caused the fault */
24596 +    addr = (char*) exc_state.dar;
24597 +        
24598 +    if((HDR(addr)) == 0) {
24599 +        /* Ugh... just like the SIGBUS problem above, it seems we get a bogus 
24600 +           KERN_PROTECTION_FAILURE every once and a while. We wait till we get
24601 +           a bunch in a row before doing anything about it. If a "real" fault 
24602 +           ever occurres it'll just keep faulting over and over and we'll hit
24603 +           the limit pretty quickly. */
24604 +        #ifdef BROKEN_EXCEPTION_HANDLING
24605 +            static char *last_fault;
24606 +            static int last_fault_count;
24607 +            
24608 +            if(addr != last_fault) {
24609 +                last_fault = addr;
24610 +                last_fault_count = 0;
24611 +            }
24612 +            if(++last_fault_count < 32) {
24613 +                if(last_fault_count == 1)
24614 +                    GC_err_printf1(
24615 +                        "GC: WARNING: Ignoring KERN_PROTECTION_FAILURE at %p\n",
24616 +                        addr);
24617 +                return KERN_SUCCESS;
24618 +            }
24619 +            
24620 +            GC_err_printf1("Unexpected KERN_PROTECTION_FAILURE at %p\n",addr);
24621 +            /* Can't pass it along to the signal handler because that is
24622 +               ignoring SIGBUS signals. We also shouldn't call ABORT here as
24623 +               signals don't always work too well from the exception handler. */
24624 +            GC_err_printf0("Aborting\n");
24625 +            exit(EXIT_FAILURE);
24626 +        #else /* BROKEN_EXCEPTION_HANDLING */
24627 +            /* Pass it along to the next exception handler 
24628 +               (which should call SIGBUS/SIGSEGV) */
24629 +            return FWD();
24630 +        #endif /* !BROKEN_EXCEPTION_HANDLING */
24631 +    }
24632 +
24633 +    #ifdef BROKEN_EXCEPTION_HANDLING
24634 +        /* Reset the number of consecutive SIGBUSs */
24635 +        GC_sigbus_count = 0;
24636 +    #endif
24637 +    
24638 +    if(GC_mprotect_state == GC_MP_NORMAL) { /* common case */
24639 +        h = (struct hblk*)((word)addr & ~(GC_page_size-1));
24640 +        UNPROTECT(h, GC_page_size);    
24641 +        for (i = 0; i < divHBLKSZ(GC_page_size); i++) {
24642 +            register int index = PHT_HASH(h+i);
24643 +            async_set_pht_entry_from_index(GC_dirty_pages, index);
24644 +        }
24645 +    } else if(GC_mprotect_state == GC_MP_DISCARDING) {
24646 +        /* Lie to the thread for now. No sense UNPROTECT()ing the memory
24647 +           when we're just going to PROTECT() it again later. The thread
24648 +           will just fault again once it resumes */
24649 +    } else {
24650 +        /* Shouldn't happen, i don't think */
24651 +        GC_printf0("KERN_PROTECTION_FAILURE while world is stopped\n");
24652 +        return FWD();
24653 +    }
24654 +    return KERN_SUCCESS;
24655 +}
24656 +#undef FWD
24657 +
24658 +/* These should never be called, but just in case...  */
24659 +kern_return_t catch_exception_raise_state(mach_port_name_t exception_port,
24660 +    int exception, exception_data_t code, mach_msg_type_number_t codeCnt,
24661 +    int flavor, thread_state_t old_state, int old_stateCnt,
24662 +    thread_state_t new_state, int new_stateCnt)
24663 +{
24664 +    ABORT("catch_exception_raise_state");
24665 +    return(KERN_INVALID_ARGUMENT);
24666 +}
24667 +kern_return_t catch_exception_raise_state_identity(
24668 +    mach_port_name_t exception_port, mach_port_t thread, mach_port_t task,
24669 +    int exception, exception_data_t code, mach_msg_type_number_t codeCnt,
24670 +    int flavor, thread_state_t old_state, int old_stateCnt, 
24671 +    thread_state_t new_state, int new_stateCnt)
24672 +{
24673 +    ABORT("catch_exception_raise_state_identity");
24674 +    return(KERN_INVALID_ARGUMENT);
24675 +}
24676 +
24677 +
24678 +#endif /* DARWIN && MPROTECT_VDB */
24679 +
24680  # ifndef HAVE_INCREMENTAL_PROTECTION_NEEDS
24681    int GC_incremental_protection_needs()
24682    {
24683 @@ -3105,19 +3878,20 @@
24684  #  endif
24685  #endif /* SPARC */
24686  
24687 -#ifdef SAVE_CALL_CHAIN
24688 +#ifdef  NEED_CALLINFO
24689  /* Fill in the pc and argument information for up to NFRAMES of my     */
24690  /* callers.  Ignore my frame and my callers frame.                     */
24691  
24692  #ifdef LINUX
24693 -# include <features.h>
24694 -# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2
24695 -#   define HAVE_BUILTIN_BACKTRACE
24696 -# endif
24697 +#   include <unistd.h>
24698  #endif
24699  
24700 +#endif /* NEED_CALLINFO */
24701 +
24702 +#ifdef SAVE_CALL_CHAIN
24703 +
24704  #if NARGS == 0 && NFRAMES % 2 == 0 /* No padding */ \
24705 -    && defined(HAVE_BUILTIN_BACKTRACE)
24706 +    && defined(GC_HAVE_BUILTIN_BACKTRACE)
24707  
24708  #include <execinfo.h>
24709  
24710 @@ -3188,31 +3962,139 @@
24711  
24712  #endif /* SAVE_CALL_CHAIN */
24713  
24714 -#if defined(LINUX) && defined(__ELF__) && \
24715 -    (!defined(SMALL_CONFIG) || defined(USE_PROC_FOR_LIBRARIES))
24716 -#ifdef GC_USE_LD_WRAP
24717 -#   define READ __real_read
24718 -#else
24719 -#   define READ read
24720 -#endif
24721 -
24722 +#ifdef NEED_CALLINFO
24723  
24724 -/* Repeatedly perform a read call until the buffer is filled or        */
24725 -/* we encounter EOF.                                           */
24726 -ssize_t GC_repeat_read(int fd, char *buf, size_t count)
24727 +/* Print info to stderr.  We do NOT hold the allocation lock */
24728 +void GC_print_callers (info)
24729 +struct callinfo info[NFRAMES];
24730  {
24731 -    ssize_t num_read = 0;
24732 -    ssize_t result;
24733 +    register int i;
24734 +    static int reentry_count = 0;
24735 +    GC_bool stop = FALSE;
24736      
24737 -    while (num_read < count) {
24738 -       result = READ(fd, buf + num_read, count - num_read);
24739 -       if (result < 0) return result;
24740 -       if (result == 0) break;
24741 -       num_read += result;
24742 +    LOCK();
24743 +      ++reentry_count;
24744 +    UNLOCK();
24745 +    
24746 +#   if NFRAMES == 1
24747 +      GC_err_printf0("\tCaller at allocation:\n");
24748 +#   else
24749 +      GC_err_printf0("\tCall chain at allocation:\n");
24750 +#   endif
24751 +    for (i = 0; i < NFRAMES && !stop ; i++) {
24752 +       if (info[i].ci_pc == 0) break;
24753 +#      if NARGS > 0
24754 +       {
24755 +         int j;
24756 +
24757 +         GC_err_printf0("\t\targs: ");
24758 +         for (j = 0; j < NARGS; j++) {
24759 +           if (j != 0) GC_err_printf0(", ");
24760 +           GC_err_printf2("%d (0x%X)", ~(info[i].ci_arg[j]),
24761 +                                       ~(info[i].ci_arg[j]));
24762      }
24763 -    return num_read;
24764 +         GC_err_printf0("\n");
24765 +       }
24766 +#      endif
24767 +        if (reentry_count > 1) {
24768 +           /* We were called during an allocation during       */
24769 +           /* a previous GC_print_callers call; punt.          */
24770 +           GC_err_printf1("\t\t##PC##= 0x%lx\n", info[i].ci_pc);
24771 +           continue;
24772 +       }
24773 +       {
24774 +#        ifdef LINUX
24775 +           FILE *pipe;
24776 +#        endif
24777 +#        if defined(GC_HAVE_BUILTIN_BACKTRACE)
24778 +           char **sym_name =
24779 +             backtrace_symbols((void **)(&(info[i].ci_pc)), 1);
24780 +           char *name = sym_name[0];
24781 +#        else
24782 +           char buf[40];
24783 +           char *name = buf;
24784 +           sprintf(buf, "##PC##= 0x%lx", info[i].ci_pc);
24785 +#        endif
24786 +#        if defined(LINUX) && !defined(SMALL_CONFIG)
24787 +           /* Try for a line number. */
24788 +           {
24789 +#              define EXE_SZ 100
24790 +               static char exe_name[EXE_SZ];
24791 +#              define CMD_SZ 200
24792 +               char cmd_buf[CMD_SZ];
24793 +#              define RESULT_SZ 200
24794 +               static char result_buf[RESULT_SZ];
24795 +               size_t result_len;
24796 +               static GC_bool found_exe_name = FALSE;
24797 +               static GC_bool will_fail = FALSE;
24798 +               int ret_code;
24799 +               /* Try to get it via a hairy and expensive scheme.      */
24800 +               /* First we get the name of the executable:             */
24801 +               if (will_fail) goto out;
24802 +               if (!found_exe_name) { 
24803 +                 ret_code = readlink("/proc/self/exe", exe_name, EXE_SZ);
24804 +                 if (ret_code < 0 || ret_code >= EXE_SZ
24805 +                     || exe_name[0] != '/') {
24806 +                   will_fail = TRUE;   /* Dont try again. */
24807 +                   goto out;
24808 +                 }
24809 +                 exe_name[ret_code] = '\0';
24810 +                 found_exe_name = TRUE;
24811 +               }
24812 +               /* Then we use popen to start addr2line -e <exe> <addr> */
24813 +               /* There are faster ways to do this, but hopefully this */
24814 +               /* isn't time critical.                                 */
24815 +               sprintf(cmd_buf, "/usr/bin/addr2line -f -e %s 0x%lx", exe_name,
24816 +                                (unsigned long)info[i].ci_pc);
24817 +               pipe = popen(cmd_buf, "r");
24818 +               if (pipe == NULL
24819 +                   || (result_len = fread(result_buf, 1, RESULT_SZ - 1, pipe))
24820 +                      == 0) {
24821 +                 if (pipe != NULL) pclose(pipe);
24822 +                 will_fail = TRUE;
24823 +                 goto out;
24824 +               }
24825 +               if (result_buf[result_len - 1] == '\n') --result_len;
24826 +               result_buf[result_len] = 0;
24827 +               if (result_buf[0] == '?'
24828 +                   || result_buf[result_len-2] == ':' 
24829 +                      && result_buf[result_len-1] == '0') {
24830 +                   pclose(pipe);
24831 +                   goto out;
24832 +               }
24833 +               /* Get rid of embedded newline, if any.  Test for "main" */
24834 +               {
24835 +                  char * nl = strchr(result_buf, '\n');
24836 +                  if (nl != NULL && nl < result_buf + result_len) {
24837 +                    *nl = ':';
24838 +                  }
24839 +                  if (strncmp(result_buf, "main", nl - result_buf) == 0) {
24840 +                    stop = TRUE;
24841 +                  }
24842 +               }
24843 +               if (result_len < RESULT_SZ - 25) {
24844 +                 /* Add in hex address */
24845 +                   sprintf(result_buf + result_len, " [0x%lx]",
24846 +                         (unsigned long)info[i].ci_pc);
24847 +               }
24848 +               name = result_buf;
24849 +               pclose(pipe);
24850 +               out:;
24851 +           }
24852 +#        endif /* LINUX */
24853 +         GC_err_printf1("\t\t%s\n", name);
24854 +#        if defined(GC_HAVE_BUILTIN_BACKTRACE)
24855 +           free(sym_name);  /* May call GC_free; that's OK */
24856 +#         endif
24857 +       }
24858 +    }
24859 +    LOCK();
24860 +      --reentry_count;
24861 +    UNLOCK();
24862  }
24863 -#endif /* LINUX && ... */
24864 +
24865 +#endif /* NEED_CALLINFO */
24866 +
24867  
24868  
24869  #if defined(LINUX) && defined(__ELF__) && !defined(SMALL_CONFIG)
24870 @@ -3220,20 +4102,16 @@
24871  /* Dump /proc/self/maps to GC_stderr, to enable looking up names for
24872     addresses in FIND_LEAK output. */
24873  
24874 +static word dump_maps(char *maps)
24875 +{
24876 +    GC_err_write(maps, strlen(maps));
24877 +    return 1;
24878 +}
24879 +
24880  void GC_print_address_map()
24881  {
24882 -    int f;
24883 -    int result;
24884 -    char maps_temp[32768];
24885      GC_err_printf0("---------- Begin address map ----------\n");
24886 -        f = open("/proc/self/maps", O_RDONLY);
24887 -        if (-1 == f) ABORT("Couldn't open /proc/self/maps");
24888 -       do {
24889 -           result = GC_repeat_read(f, maps_temp, sizeof(maps_temp));
24890 -           if (result <= 0) ABORT("Couldn't read /proc/self/maps");
24891 -           GC_err_write(maps_temp, result);
24892 -       } while (result == sizeof(maps_temp));
24893 -     
24894 +    GC_apply_to_maps(dump_maps);
24895      GC_err_printf0("---------- End address map ----------\n");
24896  }
24897  
24898 diff -buNr boehm-gc/powerpc_darwin_mach_dep.s boehm-gc/powerpc_darwin_mach_dep.s
24899 --- boehm-gc/powerpc_darwin_mach_dep.s  Wed Dec 31 16:00:00 1969
24900 +++ boehm-gc/powerpc_darwin_mach_dep.s  Sat Sep 13 01:32:42 2003
24901 @@ -0,0 +1,84 @@
24902 +
24903 +; GC_push_regs function. Under some optimization levels GCC will clobber
24904 +; some of the non-volatile registers before we get a chance to save them
24905 +; therefore, this can't be inline asm.
24906 +
24907 +.text
24908 +       .align 2
24909 +       .globl _GC_push_regs
24910 +_GC_push_regs:
24911 +    
24912 +    ; Prolog
24913 +       mflr r0
24914 +       stw r0,8(r1)
24915 +       stwu r1,-80(r1)
24916 +
24917 +       ; Push r13-r31
24918 +       mr r3,r13
24919 +       bl L_GC_push_one$stub
24920 +       mr r3,r14
24921 +       bl L_GC_push_one$stub
24922 +       mr r3,r15
24923 +       bl L_GC_push_one$stub
24924 +       mr r3,r16
24925 +       bl L_GC_push_one$stub
24926 +       mr r3,r17
24927 +       bl L_GC_push_one$stub
24928 +       mr r3,r18
24929 +       bl L_GC_push_one$stub
24930 +       mr r3,r19
24931 +       bl L_GC_push_one$stub
24932 +       mr r3,r20
24933 +       bl L_GC_push_one$stub
24934 +       mr r3,r21
24935 +       bl L_GC_push_one$stub
24936 +       mr r3,r22
24937 +       bl L_GC_push_one$stub
24938 +       mr r3,r23
24939 +       bl L_GC_push_one$stub
24940 +       mr r3,r24
24941 +       bl L_GC_push_one$stub
24942 +       mr r3,r25
24943 +       bl L_GC_push_one$stub
24944 +       mr r3,r26
24945 +       bl L_GC_push_one$stub
24946 +       mr r3,r27
24947 +       bl L_GC_push_one$stub
24948 +       mr r3,r28
24949 +       bl L_GC_push_one$stub
24950 +       mr r3,r29
24951 +       bl L_GC_push_one$stub
24952 +       mr r3,r30
24953 +       bl L_GC_push_one$stub
24954 +       mr r3,r31
24955 +       bl L_GC_push_one$stub
24956 +
24957 +    ; 
24958 +    lwz r0,88(r1)
24959 +    addi r1,r1,80
24960 +       mtlr r0
24961 +       
24962 +       ; Return
24963 +       blr
24964 +
24965 +; PIC stuff, generated by GCC
24966 +
24967 +.data
24968 +.picsymbol_stub
24969 +L_GC_push_one$stub:
24970 +       .indirect_symbol _GC_push_one
24971 +       mflr r0
24972 +       bcl 20,31,L0$_GC_push_one
24973 +L0$_GC_push_one:
24974 +       mflr r11
24975 +       addis r11,r11,ha16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)
24976 +       mtlr r0
24977 +       lwz r12,lo16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)(r11)
24978 +       mtctr r12
24979 +       addi r11,r11,lo16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)
24980 +       bctr
24981 +.data
24982 +.lazy_symbol_pointer
24983 +L_GC_push_one$lazy_ptr:
24984 +       .indirect_symbol _GC_push_one
24985 +       .long dyld_stub_binding_helper
24986 diff -buNr boehm-gc/pthread_stop_world.c boehm-gc/pthread_stop_world.c
24987 --- boehm-gc/pthread_stop_world.c       Wed Dec 31 16:00:00 1969
24988 +++ boehm-gc/pthread_stop_world.c       Sat Sep 13 01:32:42 2003
24989 @@ -0,0 +1,445 @@
24990 +#include "private/pthread_support.h"
24991 +
24992 +#if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
24993 +     && !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS) \
24994 +     && !defined(GC_DARWIN_THREADS)
24995 +
24996 +#include <signal.h>
24997 +#include <semaphore.h>
24998 +#include <errno.h>
24999 +#include <unistd.h>
25000 +
25001 +#if DEBUG_THREADS
25002 +
25003 +#ifndef NSIG
25004 +# if defined(MAXSIG)
25005 +#  define NSIG (MAXSIG+1)
25006 +# elif defined(_NSIG)
25007 +#  define NSIG _NSIG
25008 +# elif defined(__SIGRTMAX)
25009 +#  define NSIG (__SIGRTMAX+1)
25010 +# else
25011 +  --> please fix it
25012 +# endif
25013 +#endif
25014 +
25015 +void GC_print_sig_mask()
25016 +{
25017 +    sigset_t blocked;
25018 +    int i;
25019 +
25020 +    if (pthread_sigmask(SIG_BLOCK, NULL, &blocked) != 0)
25021 +       ABORT("pthread_sigmask");
25022 +    GC_printf0("Blocked: ");
25023 +    for (i = 1; i < NSIG; i++) {
25024 +        if (sigismember(&blocked, i)) { GC_printf1("%ld ",(long) i); }
25025 +    }
25026 +    GC_printf0("\n");
25027 +}
25028 +
25029 +#endif
25030 +
25031 +word GC_stop_count;    /* Incremented at the beginning of GC_stop_world. */
25032 +
25033 +#ifdef GC_OSF1_THREADS
25034 +  GC_bool GC_retry_signals = TRUE;
25035 +#else
25036 +  GC_bool GC_retry_signals = FALSE;
25037 +#endif
25038 +
25039 +/*
25040 + * We use signals to stop threads during GC.
25041 + * 
25042 + * Suspended threads wait in signal handler for SIG_THR_RESTART.
25043 + * That's more portable than semaphores or condition variables.
25044 + * (We do use sem_post from a signal handler, but that should be portable.)
25045 + *
25046 + * The thread suspension signal SIG_SUSPEND is now defined in gc_priv.h.
25047 + * Note that we can't just stop a thread; we need it to save its stack
25048 + * pointer(s) and acknowledge.
25049 + */
25050 +
25051 +#ifndef SIG_THR_RESTART
25052 +#  if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS)
25053 +#    ifdef _SIGRTMIN
25054 +#      define SIG_THR_RESTART _SIGRTMIN + 5
25055 +#    else
25056 +#      define SIG_THR_RESTART SIGRTMIN + 5
25057 +#    endif
25058 +#  else
25059 +#   define SIG_THR_RESTART SIGXCPU
25060 +#  endif
25061 +#endif
25062 +
25063 +sem_t GC_suspend_ack_sem;
25064 +
25065 +void GC_suspend_handler(int sig)
25066 +{
25067 +    int dummy;
25068 +    pthread_t my_thread = pthread_self();
25069 +    GC_thread me;
25070 +    sigset_t mask;
25071 +#   ifdef PARALLEL_MARK
25072 +       word my_mark_no = GC_mark_no;
25073 +       /* Marker can't proceed until we acknowledge.  Thus this is     */
25074 +       /* guaranteed to be the mark_no correspending to our            */
25075 +       /* suspension, i.e. the marker can't have incremented it yet.   */
25076 +#   endif
25077 +    word my_stop_count = GC_stop_count;
25078 +
25079 +    if (sig != SIG_SUSPEND) ABORT("Bad signal in suspend_handler");
25080 +
25081 +#if DEBUG_THREADS
25082 +    GC_printf1("Suspending 0x%lx\n", my_thread);
25083 +#endif
25084 +
25085 +    me = GC_lookup_thread(my_thread);
25086 +    /* The lookup here is safe, since I'm doing this on behalf  */
25087 +    /* of a thread which holds the allocation lock in order    */
25088 +    /* to stop the world.  Thus concurrent modification of the */
25089 +    /* data structure is impossible.                           */
25090 +    if (me -> stop_info.last_stop_count == my_stop_count) {
25091 +       /* Duplicate signal.  OK if we are retrying.    */
25092 +       if (!GC_retry_signals) {
25093 +           WARN("Duplicate suspend signal in thread %lx\n",
25094 +                pthread_self());
25095 +       }
25096 +       return;
25097 +    }
25098 +#   ifdef SPARC
25099 +       me -> stop_info.stack_ptr = (ptr_t)GC_save_regs_in_stack();
25100 +#   else
25101 +       me -> stop_info.stack_ptr = (ptr_t)(&dummy);
25102 +#   endif
25103 +#   ifdef IA64
25104 +       me -> backing_store_ptr = (ptr_t)GC_save_regs_in_stack();
25105 +#   endif
25106 +
25107 +    /* Tell the thread that wants to stop the world that this   */
25108 +    /* thread has been stopped.  Note that sem_post() is       */
25109 +    /* the only async-signal-safe primitive in LinuxThreads.    */
25110 +    sem_post(&GC_suspend_ack_sem);
25111 +    me -> stop_info.last_stop_count = my_stop_count;
25112 +
25113 +    /* Wait until that thread tells us to restart by sending    */
25114 +    /* this thread a SIG_THR_RESTART signal.                   */
25115 +    /* SIG_THR_RESTART should be masked at this point.  Thus there     */
25116 +    /* is no race.                                             */
25117 +    if (sigfillset(&mask) != 0) ABORT("sigfillset() failed");
25118 +    if (sigdelset(&mask, SIG_THR_RESTART) != 0) ABORT("sigdelset() failed");
25119 +#   ifdef NO_SIGNALS
25120 +      if (sigdelset(&mask, SIGINT) != 0) ABORT("sigdelset() failed");
25121 +      if (sigdelset(&mask, SIGQUIT) != 0) ABORT("sigdelset() failed");
25122 +      if (sigdelset(&mask, SIGTERM) != 0) ABORT("sigdelset() failed");
25123 +      if (sigdelset(&mask, SIGABRT) != 0) ABORT("sigdelset() failed");
25124 +#   endif
25125 +    do {
25126 +           me->stop_info.signal = 0;
25127 +           sigsuspend(&mask);             /* Wait for signal */
25128 +    } while (me->stop_info.signal != SIG_THR_RESTART);
25129 +    /* If the RESTART signal gets lost, we can still lose.  That should be  */
25130 +    /* less likely than losing the SUSPEND signal, since we don't do much   */
25131 +    /* between the sem_post and sigsuspend.                                */
25132 +    /* We'd need more handshaking to work around that, since we don't want  */
25133 +    /* to accidentally leave a RESTART signal pending, thus causing us to   */
25134 +    /* continue prematurely in a future round.                             */ 
25135 +
25136 +#if DEBUG_THREADS
25137 +    GC_printf1("Continuing 0x%lx\n", my_thread);
25138 +#endif
25139 +}
25140 +
25141 +void GC_restart_handler(int sig)
25142 +{
25143 +    pthread_t my_thread = pthread_self();
25144 +    GC_thread me;
25145 +
25146 +    if (sig != SIG_THR_RESTART) ABORT("Bad signal in suspend_handler");
25147 +
25148 +    /* Let the GC_suspend_handler() know that we got a SIG_THR_RESTART. */
25149 +    /* The lookup here is safe, since I'm doing this on behalf  */
25150 +    /* of a thread which holds the allocation lock in order    */
25151 +    /* to stop the world.  Thus concurrent modification of the */
25152 +    /* data structure is impossible.                           */
25153 +    me = GC_lookup_thread(my_thread);
25154 +    me->stop_info.signal = SIG_THR_RESTART;
25155 +
25156 +    /*
25157 +    ** Note: even if we didn't do anything useful here,
25158 +    ** it would still be necessary to have a signal handler,
25159 +    ** rather than ignoring the signals, otherwise
25160 +    ** the signals will not be delivered at all, and
25161 +    ** will thus not interrupt the sigsuspend() above.
25162 +    */
25163 +
25164 +#if DEBUG_THREADS
25165 +    GC_printf1("In GC_restart_handler for 0x%lx\n", pthread_self());
25166 +#endif
25167 +}
25168 +
25169 +# ifdef IA64
25170 +#   define IF_IA64(x) x
25171 +# else
25172 +#   define IF_IA64(x)
25173 +# endif
25174 +/* We hold allocation lock.  Should do exactly the right thing if the  */
25175 +/* world is stopped.  Should not fail if it isn't.                     */
25176 +void GC_push_all_stacks()
25177 +{
25178 +    int i;
25179 +    GC_thread p;
25180 +    ptr_t lo, hi;
25181 +    /* On IA64, we also need to scan the register backing store. */
25182 +    IF_IA64(ptr_t bs_lo; ptr_t bs_hi;)
25183 +    pthread_t me = pthread_self();
25184 +    
25185 +    if (!GC_thr_initialized) GC_thr_init();
25186 +    #if DEBUG_THREADS
25187 +        GC_printf1("Pushing stacks from thread 0x%lx\n", (unsigned long) me);
25188 +    #endif
25189 +    for (i = 0; i < THREAD_TABLE_SZ; i++) {
25190 +      for (p = GC_threads[i]; p != 0; p = p -> next) {
25191 +        if (p -> flags & FINISHED) continue;
25192 +        if (pthread_equal(p -> id, me)) {
25193 +#          ifdef SPARC
25194 +               lo = (ptr_t)GC_save_regs_in_stack();
25195 +#          else
25196 +               lo = GC_approx_sp();
25197 +#           endif
25198 +           IF_IA64(bs_hi = (ptr_t)GC_save_regs_in_stack();)
25199 +       } else {
25200 +           lo = p -> stop_info.stack_ptr;
25201 +           IF_IA64(bs_hi = p -> backing_store_ptr;)
25202 +       }
25203 +        if ((p -> flags & MAIN_THREAD) == 0) {
25204 +           hi = p -> stack_end;
25205 +           IF_IA64(bs_lo = p -> backing_store_end);
25206 +        } else {
25207 +            /* The original stack. */
25208 +            hi = GC_stackbottom;
25209 +           IF_IA64(bs_lo = BACKING_STORE_BASE;)
25210 +        }
25211 +        #if DEBUG_THREADS
25212 +            GC_printf3("Stack for thread 0x%lx = [%lx,%lx)\n",
25213 +               (unsigned long) p -> id,
25214 +               (unsigned long) lo, (unsigned long) hi);
25215 +        #endif
25216 +       if (0 == lo) ABORT("GC_push_all_stacks: sp not set!\n");
25217 +#       ifdef STACK_GROWS_UP
25218 +         /* We got them backwards! */
25219 +          GC_push_all_stack(hi, lo);
25220 +#       else
25221 +          GC_push_all_stack(lo, hi);
25222 +#      endif
25223 +#      ifdef IA64
25224 +          if (pthread_equal(p -> id, me)) {
25225 +           GC_push_all_eager(bs_lo, bs_hi);
25226 +         } else {
25227 +           GC_push_all_stack(bs_lo, bs_hi);
25228 +         }
25229 +#      endif
25230 +      }
25231 +    }
25232 +}
25233 +
25234 +/* There seems to be a very rare thread stopping problem.  To help us  */
25235 +/* debug that, we save the ids of the stopping thread. */
25236 +pthread_t GC_stopping_thread;
25237 +int GC_stopping_pid;
25238 +
25239 +/* We hold the allocation lock.  Suspend all threads that might        */
25240 +/* still be running.  Return the number of suspend signals that        */
25241 +/* were sent. */
25242 +int GC_suspend_all()
25243 +{
25244 +    int n_live_threads = 0;
25245 +    int i;
25246 +    GC_thread p;
25247 +    int result;
25248 +    pthread_t my_thread = pthread_self();
25249 +    
25250 +    GC_stopping_thread = my_thread;    /* debugging only.      */
25251 +    GC_stopping_pid = getpid();                /* debugging only.      */
25252 +    for (i = 0; i < THREAD_TABLE_SZ; i++) {
25253 +      for (p = GC_threads[i]; p != 0; p = p -> next) {
25254 +        if (p -> id != my_thread) {
25255 +            if (p -> flags & FINISHED) continue;
25256 +            if (p -> stop_info.last_stop_count == GC_stop_count) continue;
25257 +           if (p -> thread_blocked) /* Will wait */ continue;
25258 +            n_live_threads++;
25259 +           #if DEBUG_THREADS
25260 +             GC_printf1("Sending suspend signal to 0x%lx\n", p -> id);
25261 +           #endif
25262 +        
25263 +        result = pthread_kill(p -> id, SIG_SUSPEND);
25264 +           switch(result) {
25265 +                case ESRCH:
25266 +                    /* Not really there anymore.  Possible? */
25267 +                    n_live_threads--;
25268 +                    break;
25269 +                case 0:
25270 +                    break;
25271 +                default:
25272 +                    ABORT("pthread_kill failed");
25273 +            }
25274 +        }
25275 +      }
25276 +    }
25277 +    return n_live_threads;
25278 +}
25279 +
25280 +/* Caller holds allocation lock.       */
25281 +void GC_stop_world()
25282 +{
25283 +    int i;
25284 +    int n_live_threads;
25285 +    int code;
25286 +
25287 +    #if DEBUG_THREADS
25288 +    GC_printf1("Stopping the world from 0x%lx\n", pthread_self());
25289 +    #endif
25290 +       
25291 +    /* Make sure all free list construction has stopped before we start. */
25292 +    /* No new construction can start, since free list construction is  */
25293 +    /* required to acquire and release the GC lock before it starts,   */
25294 +    /* and we have the lock.                                           */
25295 +#   ifdef PARALLEL_MARK
25296 +      GC_acquire_mark_lock();
25297 +      GC_ASSERT(GC_fl_builder_count == 0);
25298 +      /* We should have previously waited for it to become zero. */
25299 +#   endif /* PARALLEL_MARK */
25300 +    ++GC_stop_count;
25301 +    n_live_threads = GC_suspend_all();
25302 +
25303 +      if (GC_retry_signals) {
25304 +         unsigned long wait_usecs = 0;  /* Total wait since retry.     */
25305 +#        define WAIT_UNIT 3000
25306 +#        define RETRY_INTERVAL 100000
25307 +         for (;;) {
25308 +             int ack_count;
25309 +
25310 +             sem_getvalue(&GC_suspend_ack_sem, &ack_count);
25311 +             if (ack_count == n_live_threads) break;
25312 +             if (wait_usecs > RETRY_INTERVAL) {
25313 +                 int newly_sent = GC_suspend_all();
25314 +
25315 +#                 ifdef CONDPRINT
25316 +                   if (GC_print_stats) {
25317 +                     GC_printf1("Resent %ld signals after timeout\n",
25318 +                                newly_sent);
25319 +                   }
25320 +#                 endif
25321 +                 sem_getvalue(&GC_suspend_ack_sem, &ack_count);
25322 +                 if (newly_sent < n_live_threads - ack_count) {
25323 +                     WARN("Lost some threads during GC_stop_world?!\n",0);
25324 +                     n_live_threads = ack_count + newly_sent;
25325 +                 }
25326 +                 wait_usecs = 0;
25327 +             }
25328 +             usleep(WAIT_UNIT);
25329 +             wait_usecs += WAIT_UNIT;
25330 +         }
25331 +      }
25332 +    for (i = 0; i < n_live_threads; i++) {
25333 +         if (0 != (code = sem_wait(&GC_suspend_ack_sem))) {
25334 +             GC_err_printf1("Sem_wait returned %ld\n", (unsigned long)code);
25335 +             ABORT("sem_wait for handler failed");
25336 +         }
25337 +    }
25338 +#   ifdef PARALLEL_MARK
25339 +      GC_release_mark_lock();
25340 +#   endif
25341 +    #if DEBUG_THREADS
25342 +      GC_printf1("World stopped from 0x%lx\n", pthread_self());
25343 +    #endif
25344 +    GC_stopping_thread = 0;  /* debugging only */
25345 +}
25346 +
25347 +/* Caller holds allocation lock, and has held it continuously since    */
25348 +/* the world stopped.                                                  */
25349 +void GC_start_world()
25350 +{
25351 +    pthread_t my_thread = pthread_self();
25352 +    register int i;
25353 +    register GC_thread p;
25354 +    register int n_live_threads = 0;
25355 +    register int result;
25356 +
25357 +#   if DEBUG_THREADS
25358 +      GC_printf0("World starting\n");
25359 +#   endif
25360 +
25361 +    for (i = 0; i < THREAD_TABLE_SZ; i++) {
25362 +      for (p = GC_threads[i]; p != 0; p = p -> next) {
25363 +        if (p -> id != my_thread) {
25364 +            if (p -> flags & FINISHED) continue;
25365 +           if (p -> thread_blocked) continue;
25366 +            n_live_threads++;
25367 +           #if DEBUG_THREADS
25368 +             GC_printf1("Sending restart signal to 0x%lx\n", p -> id);
25369 +           #endif
25370 +        
25371 +        result = pthread_kill(p -> id, SIG_THR_RESTART);
25372 +           switch(result) {
25373 +                case ESRCH:
25374 +                    /* Not really there anymore.  Possible? */
25375 +                    n_live_threads--;
25376 +                    break;
25377 +                case 0:
25378 +                    break;
25379 +                default:
25380 +                    ABORT("pthread_kill failed");
25381 +            }
25382 +        }
25383 +      }
25384 +    }
25385 +    #if DEBUG_THREADS
25386 +      GC_printf0("World started\n");
25387 +    #endif
25388 +}
25389 +
25390 +void GC_stop_init() {
25391 +    struct sigaction act;
25392 +    
25393 +    if (sem_init(&GC_suspend_ack_sem, 0, 0) != 0)
25394 +        ABORT("sem_init failed");
25395 +
25396 +    act.sa_flags = SA_RESTART;
25397 +    if (sigfillset(&act.sa_mask) != 0) {
25398 +       ABORT("sigfillset() failed");
25399 +    }
25400 +#   ifdef NO_SIGNALS
25401 +      if (sigdelset(&act.sa_mask, SIGINT) != 0
25402 +         || sigdelset(&act.sa_mask, SIGQUIT != 0)
25403 +         || sigdelset(&act.sa_mask, SIGABRT != 0)
25404 +         || sigdelset(&act.sa_mask, SIGTERM != 0)) {
25405 +        ABORT("sigdelset() failed");
25406 +      }
25407 +#   endif
25408 +
25409 +    /* SIG_THR_RESTART is unmasked by the handler when necessary.      */
25410 +    act.sa_handler = GC_suspend_handler;
25411 +    if (sigaction(SIG_SUSPEND, &act, NULL) != 0) {
25412 +       ABORT("Cannot set SIG_SUSPEND handler");
25413 +    }
25414 +
25415 +    act.sa_handler = GC_restart_handler;
25416 +    if (sigaction(SIG_THR_RESTART, &act, NULL) != 0) {
25417 +       ABORT("Cannot set SIG_THR_RESTART handler");
25418 +    }
25419 +
25420 +    /* Check for GC_RETRY_SIGNALS.     */
25421 +      if (0 != GETENV("GC_RETRY_SIGNALS")) {
25422 +         GC_retry_signals = TRUE;
25423 +      }
25424 +      if (0 != GETENV("GC_NO_RETRY_SIGNALS")) {
25425 +         GC_retry_signals = FALSE;
25426 +      }
25427 +#     ifdef CONDPRINT
25428 +          if (GC_print_stats && GC_retry_signals) {
25429 +              GC_printf0("Will retry suspend signal if necessary.\n");
25430 +         }
25431 +#     endif
25432 +}
25433 +
25434 +#endif
25435 diff -buNr boehm-gc/pthread_support.c boehm-gc/pthread_support.c
25436 --- boehm-gc/pthread_support.c  Wed Dec 31 16:00:00 1969
25437 +++ boehm-gc/pthread_support.c  Sat Sep 13 01:32:42 2003
25438 @@ -0,0 +1,1568 @@
25439 +/* 
25440 + * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
25441 + * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
25442 + * Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
25443 + * Copyright (c) 2000-2001 by Hewlett-Packard Company.  All rights reserved.
25444 + *
25445 + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
25446 + * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
25447 + *
25448 + * Permission is hereby granted to use or copy this program
25449 + * for any purpose,  provided the above notices are retained on all copies.
25450 + * Permission to modify the code and to distribute modified code is granted,
25451 + * provided the above notices are retained, and a notice that the code was
25452 + * modified is included with the above copyright notice.
25453 + */
25454 +/*
25455 + * Support code for LinuxThreads, the clone()-based kernel
25456 + * thread package for Linux which is included in libc6.
25457 + *
25458 + * This code relies on implementation details of LinuxThreads,
25459 + * (i.e. properties not guaranteed by the Pthread standard),
25460 + * though this version now does less of that than the other Pthreads
25461 + * support code.
25462 + *
25463 + * Note that there is a lot of code duplication between linux_threads.c
25464 + * and thread support for some of the other Posix platforms; any changes
25465 + * made here may need to be reflected there too.
25466 + */
25467 + /* DG/UX ix86 support <takis@xfree86.org> */
25468 +/*
25469 + * Linux_threads.c now also includes some code to support HPUX and
25470 + * OSF1 (Compaq Tru64 Unix, really).  The OSF1 support is not yet
25471 + * functional.  The OSF1 code is based on Eric Benson's
25472 + * patch, though that was originally against hpux_irix_threads.  The code
25473 + * here is completely untested.  With 0.0000001% probability, it might
25474 + * actually work.
25475 + *
25476 + * Eric also suggested an alternate basis for a lock implementation in
25477 + * his code:
25478 + * + #elif defined(OSF1)
25479 + * +    unsigned long GC_allocate_lock = 0;
25480 + * +    msemaphore GC_allocate_semaphore;
25481 + * + #  define GC_TRY_LOCK() \
25482 + * +    ((msem_lock(&GC_allocate_semaphore, MSEM_IF_NOWAIT) == 0) \
25483 + * +     ? (GC_allocate_lock = 1) \
25484 + * +     : 0)
25485 + * + #  define GC_LOCK_TAKEN GC_allocate_lock
25486 + */
25487 +
25488 +/*#define DEBUG_THREADS 1*/
25489 +/*#define GC_ASSERTIONS*/
25490 +
25491 +# include "private/pthread_support.h"
25492 +
25493 +# if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
25494 +     && !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS)
25495 +
25496 +# if defined(GC_HPUX_THREADS) && !defined(USE_PTHREAD_SPECIFIC) \
25497 +     && !defined(USE_HPUX_TLS)
25498 +#   define USE_HPUX_TLS
25499 +# endif
25500 +
25501 +# if (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \
25502 +      defined(GC_DARWIN_THREADS)) && !defined(USE_PTHREAD_SPECIFIC)
25503 +#   define USE_PTHREAD_SPECIFIC
25504 +# endif
25505 +
25506 +# if defined(GC_DGUX386_THREADS) && !defined(_POSIX4A_DRAFT10_SOURCE)
25507 +#   define _POSIX4A_DRAFT10_SOURCE 1
25508 +# endif
25509 +
25510 +# if defined(GC_DGUX386_THREADS) && !defined(_USING_POSIX4A_DRAFT10)
25511 +#   define _USING_POSIX4A_DRAFT10 1
25512 +# endif
25513 +
25514 +# ifdef THREAD_LOCAL_ALLOC
25515 +#   if !defined(USE_PTHREAD_SPECIFIC) && !defined(USE_HPUX_TLS)
25516 +#     include "private/specific.h"
25517 +#   endif
25518 +#   if defined(USE_PTHREAD_SPECIFIC)
25519 +#     define GC_getspecific pthread_getspecific
25520 +#     define GC_setspecific pthread_setspecific
25521 +#     define GC_key_create pthread_key_create
25522 +      typedef pthread_key_t GC_key_t;
25523 +#   endif
25524 +#   if defined(USE_HPUX_TLS)
25525 +#     define GC_getspecific(x) (x)
25526 +#     define GC_setspecific(key, v) ((key) = (v), 0)
25527 +#     define GC_key_create(key, d) 0
25528 +      typedef void * GC_key_t;
25529 +#   endif
25530 +# endif
25531 +# include <stdlib.h>
25532 +# include <pthread.h>
25533 +# include <sched.h>
25534 +# include <time.h>
25535 +# include <errno.h>
25536 +# include <unistd.h>
25537 +# include <sys/mman.h>
25538 +# include <sys/time.h>
25539 +# include <sys/types.h>
25540 +# include <sys/stat.h>
25541 +# include <fcntl.h>
25542 +
25543 +#if defined(GC_DARWIN_THREADS)
25544 +# include "private/darwin_semaphore.h"
25545 +#else
25546 +# include <semaphore.h>
25547 +#endif /* !GC_DARWIN_THREADS */
25548 +
25549 +#if defined(GC_DARWIN_THREADS)
25550 +# include <sys/sysctl.h>
25551 +#endif /* GC_DARWIN_THREADS */
25552 +
25553 +
25554 +
25555 +#if defined(GC_DGUX386_THREADS)
25556 +# include <sys/dg_sys_info.h>
25557 +# include <sys/_int_psem.h>
25558 +  /* sem_t is an uint in DG/UX */
25559 +  typedef unsigned int  sem_t;
25560 +#endif /* GC_DGUX386_THREADS */
25561 +
25562 +#ifndef __GNUC__
25563 +#   define __inline__
25564 +#endif
25565 +
25566 +#ifdef GC_USE_LD_WRAP
25567 +#   define WRAP_FUNC(f) __wrap_##f
25568 +#   define REAL_FUNC(f) __real_##f
25569 +#else
25570 +#   define WRAP_FUNC(f) GC_##f
25571 +#   if !defined(GC_DGUX386_THREADS)
25572 +#     define REAL_FUNC(f) f
25573 +#   else /* GC_DGUX386_THREADS */
25574 +#     define REAL_FUNC(f) __d10_##f
25575 +#   endif /* GC_DGUX386_THREADS */
25576 +#   undef pthread_create
25577 +#   if !defined(GC_DARWIN_THREADS)
25578 +#   undef pthread_sigmask
25579 +#   endif
25580 +#   undef pthread_join
25581 +#   undef pthread_detach
25582 +#endif
25583 +
25584 +void GC_thr_init();
25585 +
25586 +static GC_bool parallel_initialized = FALSE;
25587 +
25588 +void GC_init_parallel();
25589 +
25590 +# if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL)
25591 +
25592 +/* We don't really support thread-local allocation with DBG_HDRS_ALL */
25593 +
25594 +#ifdef USE_HPUX_TLS
25595 +  __thread
25596 +#endif
25597 +GC_key_t GC_thread_key;
25598 +
25599 +static GC_bool keys_initialized;
25600 +
25601 +/* Recover the contents of the freelist array fl into the global one gfl.*/
25602 +/* Note that the indexing scheme differs, in that gfl has finer size   */
25603 +/* resolution, even if not all entries are used.                       */
25604 +/* We hold the allocator lock.                                         */
25605 +static void return_freelists(ptr_t *fl, ptr_t *gfl)
25606 +{
25607 +    int i;
25608 +    ptr_t q, *qptr;
25609 +    size_t nwords;
25610 +
25611 +    for (i = 1; i < NFREELISTS; ++i) {
25612 +       nwords = i * (GRANULARITY/sizeof(word));
25613 +        qptr = fl + i; 
25614 +       q = *qptr;
25615 +       if ((word)q >= HBLKSIZE) {
25616 +         if (gfl[nwords] == 0) {
25617 +           gfl[nwords] = q;
25618 +         } else {
25619 +           /* Concatenate: */
25620 +           for (; (word)q >= HBLKSIZE; qptr = &(obj_link(q)), q = *qptr);
25621 +           GC_ASSERT(0 == q);
25622 +           *qptr = gfl[nwords];
25623 +           gfl[nwords] = fl[i];
25624 +         }
25625 +       }
25626 +       /* Clear fl[i], since the thread structure may hang around.     */
25627 +       /* Do it in a way that is likely to trap if we access it.       */
25628 +       fl[i] = (ptr_t)HBLKSIZE;
25629 +    }
25630 +}
25631 +
25632 +/* We statically allocate a single "size 0" object. It is linked to    */
25633 +/* itself, and is thus repeatedly reused for all size 0 allocation     */
25634 +/* requests.  (Size 0 gcj allocation requests are incorrect, and       */
25635 +/* we arrange for those to fault asap.)                                        */
25636 +static ptr_t size_zero_object = (ptr_t)(&size_zero_object);
25637 +
25638 +/* Each thread structure must be initialized.  */
25639 +/* This call must be made from the new thread. */
25640 +/* Caller holds allocation lock.               */
25641 +void GC_init_thread_local(GC_thread p)
25642 +{
25643 +    int i;
25644 +
25645 +    if (!keys_initialized) {
25646 +       if (0 != GC_key_create(&GC_thread_key, 0)) {
25647 +           ABORT("Failed to create key for local allocator");
25648 +        }
25649 +       keys_initialized = TRUE;
25650 +    }
25651 +    if (0 != GC_setspecific(GC_thread_key, p)) {
25652 +       ABORT("Failed to set thread specific allocation pointers");
25653 +    }
25654 +    for (i = 1; i < NFREELISTS; ++i) {
25655 +       p -> ptrfree_freelists[i] = (ptr_t)1;
25656 +       p -> normal_freelists[i] = (ptr_t)1;
25657 +#      ifdef GC_GCJ_SUPPORT
25658 +         p -> gcj_freelists[i] = (ptr_t)1;
25659 +#      endif
25660 +    }   
25661 +    /* Set up the size 0 free lists.   */
25662 +    p -> ptrfree_freelists[0] = (ptr_t)(&size_zero_object);
25663 +    p -> normal_freelists[0] = (ptr_t)(&size_zero_object);
25664 +#   ifdef GC_GCJ_SUPPORT
25665 +        p -> gcj_freelists[0] = (ptr_t)(-1);
25666 +#   endif
25667 +}
25668 +
25669 +#ifdef GC_GCJ_SUPPORT
25670 +  extern ptr_t * GC_gcjobjfreelist;
25671 +#endif
25672 +
25673 +/* We hold the allocator lock. */
25674 +void GC_destroy_thread_local(GC_thread p)
25675 +{
25676 +    /* We currently only do this from the thread itself or from        */
25677 +    /* the fork handler for a child process.                   */
25678 +#   ifndef HANDLE_FORK
25679 +      GC_ASSERT(GC_getspecific(GC_thread_key) == (void *)p);
25680 +#   endif
25681 +    return_freelists(p -> ptrfree_freelists, GC_aobjfreelist);
25682 +    return_freelists(p -> normal_freelists, GC_objfreelist);
25683 +#   ifdef GC_GCJ_SUPPORT
25684 +       return_freelists(p -> gcj_freelists, GC_gcjobjfreelist);
25685 +#   endif
25686 +}
25687 +
25688 +extern GC_PTR GC_generic_malloc_many();
25689 +
25690 +GC_PTR GC_local_malloc(size_t bytes)
25691 +{
25692 +    if (EXPECT(!SMALL_ENOUGH(bytes),0)) {
25693 +        return(GC_malloc(bytes));
25694 +    } else {
25695 +       int index = INDEX_FROM_BYTES(bytes);
25696 +       ptr_t * my_fl;
25697 +       ptr_t my_entry;
25698 +#      if defined(REDIRECT_MALLOC) && !defined(USE_PTHREAD_SPECIFIC)
25699 +       GC_key_t k = GC_thread_key;
25700 +#      endif
25701 +       void * tsd;
25702 +
25703 +#      if defined(REDIRECT_MALLOC) && !defined(USE_PTHREAD_SPECIFIC)
25704 +           if (EXPECT(0 == k, 0)) {
25705 +               /* This can happen if we get called when the world is   */
25706 +               /* being initialized.  Whether we can actually complete */
25707 +               /* the initialization then is unclear.                  */
25708 +               GC_init_parallel();
25709 +               k = GC_thread_key;
25710 +           }
25711 +#      endif
25712 +       tsd = GC_getspecific(GC_thread_key);
25713 +#      ifdef GC_ASSERTIONS
25714 +         LOCK();
25715 +         GC_ASSERT(tsd == (void *)GC_lookup_thread(pthread_self()));
25716 +         UNLOCK();
25717 +#      endif
25718 +       my_fl = ((GC_thread)tsd) -> normal_freelists + index;
25719 +       my_entry = *my_fl;
25720 +       if (EXPECT((word)my_entry >= HBLKSIZE, 1)) {
25721 +           ptr_t next = obj_link(my_entry);
25722 +           GC_PTR result = (GC_PTR)my_entry;
25723 +           *my_fl = next;
25724 +           obj_link(my_entry) = 0;
25725 +           PREFETCH_FOR_WRITE(next);
25726 +           return result;
25727 +       } else if ((word)my_entry - 1 < DIRECT_GRANULES) {
25728 +           *my_fl = my_entry + index + 1;
25729 +            return GC_malloc(bytes);
25730 +       } else {
25731 +           GC_generic_malloc_many(BYTES_FROM_INDEX(index), NORMAL, my_fl);
25732 +           if (*my_fl == 0) return GC_oom_fn(bytes);
25733 +           return GC_local_malloc(bytes);
25734 +       }
25735 +    }
25736 +}
25737 +
25738 +GC_PTR GC_local_malloc_atomic(size_t bytes)
25739 +{
25740 +    if (EXPECT(!SMALL_ENOUGH(bytes), 0)) {
25741 +        return(GC_malloc_atomic(bytes));
25742 +    } else {
25743 +       int index = INDEX_FROM_BYTES(bytes);
25744 +       ptr_t * my_fl = ((GC_thread)GC_getspecific(GC_thread_key))
25745 +                       -> ptrfree_freelists + index;
25746 +       ptr_t my_entry = *my_fl;
25747 +    
25748 +       if (EXPECT((word)my_entry >= HBLKSIZE, 1)) {
25749 +           GC_PTR result = (GC_PTR)my_entry;
25750 +           *my_fl = obj_link(my_entry);
25751 +           return result;
25752 +       } else if ((word)my_entry - 1 < DIRECT_GRANULES) {
25753 +           *my_fl = my_entry + index + 1;
25754 +        return GC_malloc_atomic(bytes);
25755 +       } else {
25756 +           GC_generic_malloc_many(BYTES_FROM_INDEX(index), PTRFREE, my_fl);
25757 +           /* *my_fl is updated while the collector is excluded;       */
25758 +           /* the free list is always visible to the collector as      */
25759 +           /* such.                                                    */
25760 +           if (*my_fl == 0) return GC_oom_fn(bytes);
25761 +           return GC_local_malloc_atomic(bytes);
25762 +       }
25763 +    }
25764 +}
25765 +
25766 +#ifdef GC_GCJ_SUPPORT
25767 +
25768 +#include "include/gc_gcj.h"
25769 +
25770 +#ifdef GC_ASSERTIONS
25771 +  extern GC_bool GC_gcj_malloc_initialized;
25772 +#endif
25773 +
25774 +extern int GC_gcj_kind;
25775 +
25776 +GC_PTR GC_local_gcj_malloc(size_t bytes,
25777 +                          void * ptr_to_struct_containing_descr)
25778 +{
25779 +    GC_ASSERT(GC_gcj_malloc_initialized);
25780 +    if (EXPECT(!SMALL_ENOUGH(bytes), 0)) {
25781 +        return GC_gcj_malloc(bytes, ptr_to_struct_containing_descr);
25782 +    } else {
25783 +       int index = INDEX_FROM_BYTES(bytes);
25784 +       ptr_t * my_fl = ((GC_thread)GC_getspecific(GC_thread_key))
25785 +                       -> gcj_freelists + index;
25786 +       ptr_t my_entry = *my_fl;
25787 +       if (EXPECT((word)my_entry >= HBLKSIZE, 1)) {
25788 +           GC_PTR result = (GC_PTR)my_entry;
25789 +           GC_ASSERT(!GC_incremental);
25790 +           /* We assert that any concurrent marker will stop us.       */
25791 +           /* Thus it is impossible for a mark procedure to see the    */
25792 +           /* allocation of the next object, but to see this object    */
25793 +           /* still containing a free list pointer.  Otherwise the     */
25794 +           /* marker might find a random "mark descriptor".            */
25795 +           *(volatile ptr_t *)my_fl = obj_link(my_entry);
25796 +           /* We must update the freelist before we store the pointer. */
25797 +           /* Otherwise a GC at this point would see a corrupted       */
25798 +           /* free list.                                               */
25799 +           /* A memory barrier is probably never needed, since the     */
25800 +           /* action of stopping this thread will cause prior writes   */
25801 +           /* to complete.                                             */
25802 +           GC_ASSERT(((void * volatile *)result)[1] == 0); 
25803 +           *(void * volatile *)result = ptr_to_struct_containing_descr; 
25804 +           return result;
25805 +       } else if ((word)my_entry - 1 < DIRECT_GRANULES) {
25806 +           if (!GC_incremental) *my_fl = my_entry + index + 1;
25807 +               /* In the incremental case, we always have to take this */
25808 +               /* path.  Thus we leave the counter alone.              */
25809 +            return GC_gcj_malloc(bytes, ptr_to_struct_containing_descr);
25810 +       } else {
25811 +           GC_generic_malloc_many(BYTES_FROM_INDEX(index), GC_gcj_kind, my_fl);
25812 +           if (*my_fl == 0) return GC_oom_fn(bytes);
25813 +           return GC_local_gcj_malloc(bytes, ptr_to_struct_containing_descr);
25814 +       }
25815 +    }
25816 +}
25817 +
25818 +#endif /* GC_GCJ_SUPPORT */
25819 +
25820 +# else  /* !THREAD_LOCAL_ALLOC  && !DBG_HDRS_ALL */
25821 +
25822 +#   define GC_destroy_thread_local(t)
25823 +
25824 +# endif /* !THREAD_LOCAL_ALLOC */
25825 +
25826 +#if 0
25827 +/*
25828 +To make sure that we're using LinuxThreads and not some other thread
25829 +package, we generate a dummy reference to `pthread_kill_other_threads_np'
25830 +(was `__pthread_initial_thread_bos' but that disappeared),
25831 +which is a symbol defined in LinuxThreads, but (hopefully) not in other
25832 +thread packages.
25833 +
25834 +We no longer do this, since this code is now portable enough that it might
25835 +actually work for something else.
25836 +*/
25837 +void (*dummy_var_to_force_linux_threads)() = pthread_kill_other_threads_np;
25838 +#endif /* 0 */
25839 +
25840 +#if defined(SPARC) || defined(IA64)
25841 +  extern word GC_save_regs_in_stack();
25842 +#endif
25843 +
25844 +long GC_nprocs = 1;    /* Number of processors.  We may not have       */
25845 +                       /* access to all of them, but this is as good   */
25846 +                       /* a guess as any ...                           */
25847 +
25848 +#ifdef PARALLEL_MARK
25849 +
25850 +# ifndef MAX_MARKERS
25851 +#   define MAX_MARKERS 16
25852 +# endif
25853 +
25854 +static ptr_t marker_sp[MAX_MARKERS] = {0};
25855 +
25856 +void * GC_mark_thread(void * id)
25857 +{
25858 +  word my_mark_no = 0;
25859 +
25860 +  marker_sp[(word)id] = GC_approx_sp();
25861 +  for (;; ++my_mark_no) {
25862 +    /* GC_mark_no is passed only to allow GC_help_marker to terminate  */
25863 +    /* promptly.  This is important if it were called from the signal  */
25864 +    /* handler or from the GC lock acquisition code.  Under Linux, it's        */
25865 +    /* not safe to call it from a signal handler, since it uses mutexes        */
25866 +    /* and condition variables.  Since it is called only here, the     */
25867 +    /* argument is unnecessary.                                                */
25868 +    if (my_mark_no < GC_mark_no || my_mark_no > GC_mark_no + 2) {
25869 +       /* resynchronize if we get far off, e.g. because GC_mark_no     */
25870 +       /* wrapped.                                                     */
25871 +       my_mark_no = GC_mark_no;
25872 +    }
25873 +#   ifdef DEBUG_THREADS
25874 +       GC_printf1("Starting mark helper for mark number %ld\n", my_mark_no);
25875 +#   endif
25876 +    GC_help_marker(my_mark_no);
25877 +  }
25878 +}
25879 +
25880 +extern long GC_markers;                /* Number of mark threads we would      */
25881 +                               /* like to have.  Includes the          */
25882 +                               /* initiating thread.                   */
25883 +
25884 +pthread_t GC_mark_threads[MAX_MARKERS];
25885 +
25886 +#define PTHREAD_CREATE REAL_FUNC(pthread_create)
25887 +
25888 +static void start_mark_threads()
25889 +{
25890 +    unsigned i;
25891 +    pthread_attr_t attr;
25892 +
25893 +    if (GC_markers > MAX_MARKERS) {
25894 +       WARN("Limiting number of mark threads\n", 0);
25895 +       GC_markers = MAX_MARKERS;
25896 +    }
25897 +    if (0 != pthread_attr_init(&attr)) ABORT("pthread_attr_init failed");
25898 +       
25899 +    if (0 != pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED))
25900 +       ABORT("pthread_attr_setdetachstate failed");
25901 +
25902 +#   if defined(HPUX) || defined(GC_DGUX386_THREADS)
25903 +      /* Default stack size is usually too small: fix it. */
25904 +      /* Otherwise marker threads or GC may run out of   */
25905 +      /* space.                                                  */
25906 +#     define MIN_STACK_SIZE (8*HBLKSIZE*sizeof(word))
25907 +      {
25908 +       size_t old_size;
25909 +       int code;
25910 +
25911 +        if (pthread_attr_getstacksize(&attr, &old_size) != 0)
25912 +         ABORT("pthread_attr_getstacksize failed\n");
25913 +       if (old_size < MIN_STACK_SIZE) {
25914 +         if (pthread_attr_setstacksize(&attr, MIN_STACK_SIZE) != 0)
25915 +                 ABORT("pthread_attr_setstacksize failed\n");
25916 +       }
25917 +      }
25918 +#   endif /* HPUX || GC_DGUX386_THREADS */
25919 +#   ifdef CONDPRINT
25920 +      if (GC_print_stats) {
25921 +       GC_printf1("Starting %ld marker threads\n", GC_markers - 1);
25922 +      }
25923 +#   endif
25924 +    for (i = 0; i < GC_markers - 1; ++i) {
25925 +      if (0 != PTHREAD_CREATE(GC_mark_threads + i, &attr,
25926 +                             GC_mark_thread, (void *)(word)i)) {
25927 +       WARN("Marker thread creation failed, errno = %ld.\n", errno);
25928 +      }
25929 +    }
25930 +}
25931 +
25932 +#else  /* !PARALLEL_MARK */
25933 +
25934 +static __inline__ void start_mark_threads()
25935 +{
25936 +}
25937 +
25938 +#endif /* !PARALLEL_MARK */
25939 +
25940 +/* Defining INSTALL_LOOPING_SEGV_HANDLER causes SIGSEGV and SIGBUS to  */
25941 +/* result in an infinite loop in a signal handler.  This can be very   */
25942 +/* useful for debugging, since (as of RH7) gdb still seems to have     */
25943 +/* serious problems with threads.                                      */
25944 +#ifdef INSTALL_LOOPING_SEGV_HANDLER
25945 +void GC_looping_handler(int sig)
25946 +{
25947 +    GC_printf3("Signal %ld in thread %lx, pid %ld\n",
25948 +              sig, pthread_self(), getpid());
25949 +    for (;;);
25950 +}
25951 +#endif
25952 +
25953 +GC_bool GC_thr_initialized = FALSE;
25954 +
25955 +volatile GC_thread GC_threads[THREAD_TABLE_SZ];
25956 +
25957 +void GC_push_thread_structures GC_PROTO((void))
25958 +{
25959 +    GC_push_all((ptr_t)(GC_threads), (ptr_t)(GC_threads)+sizeof(GC_threads));
25960 +#   if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL)
25961 +      GC_push_all((ptr_t)(&GC_thread_key),
25962 +         (ptr_t)(&GC_thread_key)+sizeof(&GC_thread_key));
25963 +#   endif
25964 +}
25965 +
25966 +#ifdef THREAD_LOCAL_ALLOC
25967 +/* We must explicitly mark ptrfree and gcj free lists, since the free  */
25968 +/* list links wouldn't otherwise be found.  We also set them in the    */
25969 +/* normal free lists, since that involves touching less memory than if */
25970 +/* we scanned them normally.                                           */
25971 +void GC_mark_thread_local_free_lists(void)
25972 +{
25973 +    int i, j;
25974 +    GC_thread p;
25975 +    ptr_t q;
25976 +    
25977 +    for (i = 0; i < THREAD_TABLE_SZ; ++i) {
25978 +      for (p = GC_threads[i]; 0 != p; p = p -> next) {
25979 +       for (j = 1; j < NFREELISTS; ++j) {
25980 +         q = p -> ptrfree_freelists[j];
25981 +         if ((word)q > HBLKSIZE) GC_set_fl_marks(q);
25982 +         q = p -> normal_freelists[j];
25983 +         if ((word)q > HBLKSIZE) GC_set_fl_marks(q);
25984 +#        ifdef GC_GCJ_SUPPORT
25985 +           q = p -> gcj_freelists[j];
25986 +           if ((word)q > HBLKSIZE) GC_set_fl_marks(q);
25987 +#        endif /* GC_GCJ_SUPPORT */
25988 +       }
25989 +      }
25990 +    }
25991 +}
25992 +#endif /* THREAD_LOCAL_ALLOC */
25993 +
25994 +static struct GC_Thread_Rep first_thread;
25995 +
25996 +/* Add a thread to GC_threads.  We assume it wasn't already there.     */
25997 +/* Caller holds allocation lock.                                       */
25998 +GC_thread GC_new_thread(pthread_t id)
25999 +{
26000 +    int hv = ((word)id) % THREAD_TABLE_SZ;
26001 +    GC_thread result;
26002 +    static GC_bool first_thread_used = FALSE;
26003 +    
26004 +    if (!first_thread_used) {
26005 +       result = &first_thread;
26006 +       first_thread_used = TRUE;
26007 +    } else {
26008 +        result = (struct GC_Thread_Rep *)
26009 +                GC_INTERNAL_MALLOC(sizeof(struct GC_Thread_Rep), NORMAL);
26010 +    }
26011 +    if (result == 0) return(0);
26012 +    result -> id = id;
26013 +    result -> next = GC_threads[hv];
26014 +    GC_threads[hv] = result;
26015 +    GC_ASSERT(result -> flags == 0 && result -> thread_blocked == 0);
26016 +    return(result);
26017 +}
26018 +
26019 +/* Delete a thread from GC_threads.  We assume it is there.    */
26020 +/* (The code intentionally traps if it wasn't.)                        */
26021 +/* Caller holds allocation lock.                               */
26022 +void GC_delete_thread(pthread_t id)
26023 +{
26024 +    int hv = ((word)id) % THREAD_TABLE_SZ;
26025 +    register GC_thread p = GC_threads[hv];
26026 +    register GC_thread prev = 0;
26027 +    
26028 +    while (!pthread_equal(p -> id, id)) {
26029 +        prev = p;
26030 +        p = p -> next;
26031 +    }
26032 +    if (prev == 0) {
26033 +        GC_threads[hv] = p -> next;
26034 +    } else {
26035 +        prev -> next = p -> next;
26036 +    }
26037 +    GC_INTERNAL_FREE(p);
26038 +}
26039 +
26040 +/* If a thread has been joined, but we have not yet            */
26041 +/* been notified, then there may be more than one thread       */
26042 +/* in the table with the same pthread id.                      */
26043 +/* This is OK, but we need a way to delete a specific one.     */
26044 +void GC_delete_gc_thread(pthread_t id, GC_thread gc_id)
26045 +{
26046 +    int hv = ((word)id) % THREAD_TABLE_SZ;
26047 +    register GC_thread p = GC_threads[hv];
26048 +    register GC_thread prev = 0;
26049 +
26050 +    while (p != gc_id) {
26051 +        prev = p;
26052 +        p = p -> next;
26053 +    }
26054 +    if (prev == 0) {
26055 +        GC_threads[hv] = p -> next;
26056 +    } else {
26057 +        prev -> next = p -> next;
26058 +    }
26059 +    GC_INTERNAL_FREE(p);
26060 +}
26061 +
26062 +/* Return a GC_thread corresponding to a given thread_t.       */
26063 +/* Returns 0 if it's not there.                                        */
26064 +/* Caller holds  allocation lock or otherwise inhibits                 */
26065 +/* updates.                                                    */
26066 +/* If there is more than one thread with the given id we       */
26067 +/* return the most recent one.                                 */
26068 +GC_thread GC_lookup_thread(pthread_t id)
26069 +{
26070 +    int hv = ((word)id) % THREAD_TABLE_SZ;
26071 +    register GC_thread p = GC_threads[hv];
26072 +    
26073 +    while (p != 0 && !pthread_equal(p -> id, id)) p = p -> next;
26074 +    return(p);
26075 +}
26076 +
26077 +#ifdef HANDLE_FORK
26078 +/* Remove all entries from the GC_threads table, except the    */
26079 +/* one for the current thread.  We need to do this in the child        */
26080 +/* process after a fork(), since only the current thread       */
26081 +/* survives in the child.                                      */
26082 +void GC_remove_all_threads_but_me(void)
26083 +{
26084 +    pthread_t self = pthread_self();
26085 +    int hv;
26086 +    GC_thread p, next, me;
26087 +
26088 +    for (hv = 0; hv < THREAD_TABLE_SZ; ++hv) {
26089 +      me = 0;
26090 +      for (p = GC_threads[hv]; 0 != p; p = next) {
26091 +       next = p -> next;
26092 +       if (p -> id == self) {
26093 +         me = p;
26094 +         p -> next = 0;
26095 +       } else {
26096 +#        ifdef THREAD_LOCAL_ALLOC
26097 +           if (!(p -> flags & FINISHED)) {
26098 +             GC_destroy_thread_local(p);
26099 +           }
26100 +#        endif /* THREAD_LOCAL_ALLOC */
26101 +         if (p != &first_thread) GC_INTERNAL_FREE(p);
26102 +       }
26103 +      }
26104 +      GC_threads[hv] = me;
26105 +    }
26106 +}
26107 +#endif /* HANDLE_FORK */
26108 +
26109 +#ifdef USE_PROC_FOR_LIBRARIES
26110 +int GC_segment_is_thread_stack(ptr_t lo, ptr_t hi)
26111 +{
26112 +    int i;
26113 +    GC_thread p;
26114 +    
26115 +#   ifdef PARALLEL_MARK
26116 +      for (i = 0; i < GC_markers; ++i) {
26117 +       if (marker_sp[i] > lo & marker_sp[i] < hi) return 1;
26118 +      }
26119 +#   endif
26120 +    for (i = 0; i < THREAD_TABLE_SZ; i++) {
26121 +      for (p = GC_threads[i]; p != 0; p = p -> next) {
26122 +       if (0 != p -> stack_end) {
26123 +#        ifdef STACK_GROWS_UP
26124 +            if (p -> stack_end >= lo && p -> stack_end < hi) return 1;
26125 +#        else /* STACK_GROWS_DOWN */
26126 +            if (p -> stack_end > lo && p -> stack_end <= hi) return 1;
26127 +#        endif
26128 +       }
26129 +      }
26130 +    }
26131 +    return 0;
26132 +}
26133 +#endif /* USE_PROC_FOR_LIBRARIES */
26134 +
26135 +#ifdef GC_LINUX_THREADS
26136 +/* Return the number of processors, or i<= 0 if it can't be determined.        */
26137 +int GC_get_nprocs()
26138 +{
26139 +    /* Should be "return sysconf(_SC_NPROCESSORS_ONLN);" but that      */
26140 +    /* appears to be buggy in many cases.                              */
26141 +    /* We look for lines "cpu<n>" in /proc/stat.                       */
26142 +#   define STAT_BUF_SIZE 4096
26143 +#   define STAT_READ read
26144 +       /* If read is wrapped, this may need to be redefined to call    */
26145 +       /* the real one.                                                */
26146 +    char stat_buf[STAT_BUF_SIZE];
26147 +    int f;
26148 +    word result = 1;
26149 +       /* Some old kernels only have a single "cpu nnnn ..."   */
26150 +       /* entry in /proc/stat.  We identify those as           */
26151 +       /* uniprocessors.                                       */
26152 +    size_t i, len = 0;
26153 +
26154 +    f = open("/proc/stat", O_RDONLY);
26155 +    if (f < 0 || (len = STAT_READ(f, stat_buf, STAT_BUF_SIZE)) < 100) {
26156 +       WARN("Couldn't read /proc/stat\n", 0);
26157 +       return -1;
26158 +    }
26159 +    for (i = 0; i < len - 100; ++i) {
26160 +        if (stat_buf[i] == '\n' && stat_buf[i+1] == 'c'
26161 +           && stat_buf[i+2] == 'p' && stat_buf[i+3] == 'u') {
26162 +           int cpu_no = atoi(stat_buf + i + 4);
26163 +           if (cpu_no >= result) result = cpu_no + 1;
26164 +       }
26165 +    }
26166 +    close(f);
26167 +    return result;
26168 +}
26169 +#endif /* GC_LINUX_THREADS */
26170 +
26171 +/* We hold the GC lock.  Wait until an in-progress GC has finished.    */
26172 +/* Repeatedly RELEASES GC LOCK in order to wait.                       */
26173 +/* If wait_for_all is true, then we exit with the GC lock held and no  */
26174 +/* collection in progress; otherwise we just wait for the current GC   */
26175 +/* to finish.                                                          */
26176 +extern GC_bool GC_collection_in_progress();
26177 +void GC_wait_for_gc_completion(GC_bool wait_for_all)
26178 +{
26179 +    if (GC_incremental && GC_collection_in_progress()) {
26180 +       int old_gc_no = GC_gc_no;
26181 +
26182 +       /* Make sure that no part of our stack is still on the mark stack, */
26183 +       /* since it's about to be unmapped.                                */
26184 +       while (GC_incremental && GC_collection_in_progress()
26185 +              && (wait_for_all || old_gc_no == GC_gc_no)) {
26186 +           ENTER_GC();
26187 +            GC_collect_a_little_inner(1);
26188 +           EXIT_GC();
26189 +           UNLOCK();
26190 +           sched_yield();
26191 +           LOCK();
26192 +       }
26193 +    }
26194 +}
26195 +
26196 +#ifdef HANDLE_FORK
26197 +/* Procedures called before and after a fork.  The goal here is to make */
26198 +/* it safe to call GC_malloc() in a forked child.  It's unclear that is        */
26199 +/* attainable, since the single UNIX spec seems to imply that one      */
26200 +/* should only call async-signal-safe functions, and we probably can't */
26201 +/* quite guarantee that.  But we give it our best shot.  (That same    */
26202 +/* spec also implies that it's not safe to call the system malloc      */
26203 +/* between fork() and exec().  Thus we're doing no worse than it.      */
26204 +
26205 +/* Called before a fork()              */
26206 +void GC_fork_prepare_proc(void)
26207 +{
26208 +    /* Acquire all relevant locks, so that after releasing the locks   */
26209 +    /* the child will see a consistent state in which monitor          */
26210 +    /* invariants hold.         Unfortunately, we can't acquire libc locks     */
26211 +    /* we might need, and there seems to be no guarantee that libc     */
26212 +    /* must install a suitable fork handler.                           */
26213 +    /* Wait for an ongoing GC to finish, since we can't finish it in   */
26214 +    /* the (one remaining thread in) the child.                                */
26215 +      LOCK();
26216 +#     if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC)
26217 +        GC_wait_for_reclaim();
26218 +#     endif
26219 +      GC_wait_for_gc_completion(TRUE);
26220 +#     if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC)
26221 +        GC_acquire_mark_lock();
26222 +#     endif
26223 +}
26224 +
26225 +/* Called in parent after a fork()     */
26226 +void GC_fork_parent_proc(void)
26227 +{
26228 +#   if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC)
26229 +      GC_release_mark_lock();
26230 +#   endif
26231 +    UNLOCK();
26232 +}
26233 +
26234 +/* Called in child after a fork()      */
26235 +void GC_fork_child_proc(void)
26236 +{
26237 +    /* Clean up the thread table, so that just our thread is left. */
26238 +#   if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC)
26239 +      GC_release_mark_lock();
26240 +#   endif
26241 +    GC_remove_all_threads_but_me();
26242 +#   ifdef PARALLEL_MARK
26243 +      /* Turn off parallel marking in the child, since we are probably         */
26244 +      /* just going to exec, and we would have to restart mark threads.        */
26245 +        GC_markers = 1;
26246 +        GC_parallel = FALSE;
26247 +#   endif /* PARALLEL_MARK */
26248 +    UNLOCK();
26249 +}
26250 +#endif /* HANDLE_FORK */
26251 +
26252 +#if defined(GC_DGUX386_THREADS)
26253 +/* Return the number of processors, or i<= 0 if it can't be determined. */
26254 +int GC_get_nprocs()
26255 +{
26256 +    /* <takis@XFree86.Org> */
26257 +    int numCpus;
26258 +    struct dg_sys_info_pm_info pm_sysinfo;
26259 +    int status =0;
26260 +
26261 +    status = dg_sys_info((long int *) &pm_sysinfo,
26262 +       DG_SYS_INFO_PM_INFO_TYPE, DG_SYS_INFO_PM_CURRENT_VERSION);
26263 +    if (status < 0)
26264 +       /* set -1 for error */
26265 +       numCpus = -1;
26266 +    else
26267 +      /* Active CPUs */
26268 +      numCpus = pm_sysinfo.idle_vp_count;
26269 +
26270 +#  ifdef DEBUG_THREADS
26271 +    GC_printf1("Number of active CPUs in this system: %d\n", numCpus);
26272 +#  endif
26273 +    return(numCpus);
26274 +}
26275 +#endif /* GC_DGUX386_THREADS */
26276 +
26277 +/* We hold the allocation lock.        */
26278 +void GC_thr_init()
26279 +{
26280 +#      ifndef GC_DARWIN_THREADS
26281 +        int dummy;
26282 +#      endif
26283 +    GC_thread t;
26284 +
26285 +    if (GC_thr_initialized) return;
26286 +    GC_thr_initialized = TRUE;
26287 +    
26288 +#   ifdef HANDLE_FORK
26289 +      /* Prepare for a possible fork.  */
26290 +        pthread_atfork(GC_fork_prepare_proc, GC_fork_parent_proc,
26291 +                      GC_fork_child_proc);
26292 +#   endif /* HANDLE_FORK */
26293 +    /* Add the initial thread, so we can stop it.      */
26294 +      t = GC_new_thread(pthread_self());
26295 +#     ifdef GC_DARWIN_THREADS
26296 +         t -> stop_info.mach_thread = mach_thread_self();
26297 +#     else
26298 +         t -> stop_info.stack_ptr = (ptr_t)(&dummy);
26299 +#     endif
26300 +      t -> flags = DETACHED | MAIN_THREAD;
26301 +
26302 +    GC_stop_init();
26303 +
26304 +    /* Set GC_nprocs.  */
26305 +      {
26306 +       char * nprocs_string = GETENV("GC_NPROCS");
26307 +       GC_nprocs = -1;
26308 +       if (nprocs_string != NULL) GC_nprocs = atoi(nprocs_string);
26309 +      }
26310 +      if (GC_nprocs <= 0) {
26311 +#       if defined(GC_HPUX_THREADS)
26312 +         GC_nprocs = pthread_num_processors_np();
26313 +#       endif
26314 +#      if defined(GC_OSF1_THREADS)
26315 +         GC_nprocs = sysconf(_SC_NPROCESSORS_ONLN);
26316 +         if (GC_nprocs <= 0) GC_nprocs = 1;
26317 +#      endif
26318 +#       if defined(GC_FREEBSD_THREADS)
26319 +          GC_nprocs = 1;
26320 +#       endif
26321 +#       if defined(GC_DARWIN_THREADS)
26322 +         int ncpus = 1;
26323 +         size_t len = sizeof(ncpus);
26324 +         sysctl((int[2]) {CTL_HW, HW_NCPU}, 2, &ncpus, &len, NULL, 0);
26325 +         GC_nprocs = ncpus;
26326 +#       endif
26327 +#      if defined(GC_LINUX_THREADS) || defined(GC_DGUX386_THREADS)
26328 +          GC_nprocs = GC_get_nprocs();
26329 +#      endif
26330 +      }
26331 +      if (GC_nprocs <= 0) {
26332 +       WARN("GC_get_nprocs() returned %ld\n", GC_nprocs);
26333 +       GC_nprocs = 2;
26334 +#      ifdef PARALLEL_MARK
26335 +         GC_markers = 1;
26336 +#      endif
26337 +      } else {
26338 +#      ifdef PARALLEL_MARK
26339 +          {
26340 +           char * markers_string = GETENV("GC_MARKERS");
26341 +           if (markers_string != NULL) {
26342 +             GC_markers = atoi(markers_string);
26343 +           } else {
26344 +             GC_markers = GC_nprocs;
26345 +           }
26346 +          }
26347 +#      endif
26348 +      }
26349 +#   ifdef PARALLEL_MARK
26350 +#     ifdef CONDPRINT
26351 +        if (GC_print_stats) {
26352 +          GC_printf2("Number of processors = %ld, "
26353 +                "number of marker threads = %ld\n", GC_nprocs, GC_markers);
26354 +       }
26355 +#     endif
26356 +      if (GC_markers == 1) {
26357 +       GC_parallel = FALSE;
26358 +#      ifdef CONDPRINT
26359 +         if (GC_print_stats) {
26360 +           GC_printf0("Single marker thread, turning off parallel marking\n");
26361 +         }
26362 +#      endif
26363 +      } else {
26364 +       GC_parallel = TRUE;
26365 +       /* Disable true incremental collection, but generational is OK. */
26366 +       GC_time_limit = GC_TIME_UNLIMITED;
26367 +      }
26368 +#   endif
26369 +}
26370 +
26371 +
26372 +/* Perform all initializations, including those that   */
26373 +/* may require allocation.                             */
26374 +/* Called without allocation lock.                     */
26375 +/* Must be called before a second thread is created.   */
26376 +/* Called without allocation lock.                     */
26377 +void GC_init_parallel()
26378 +{
26379 +    if (parallel_initialized) return;
26380 +    parallel_initialized = TRUE;
26381 +
26382 +    /* GC_init() calls us back, so set flag first.     */
26383 +    if (!GC_is_initialized) GC_init();
26384 +    /* If we are using a parallel marker, start the helper threads.  */
26385 +#     ifdef PARALLEL_MARK
26386 +        if (GC_parallel) start_mark_threads();
26387 +#     endif
26388 +    /* Initialize thread local free lists if used.     */
26389 +#   if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL)
26390 +      LOCK();
26391 +      GC_init_thread_local(GC_lookup_thread(pthread_self()));
26392 +      UNLOCK();
26393 +#   endif
26394 +}
26395 +
26396 +
26397 +#if !defined(GC_DARWIN_THREADS)
26398 +int WRAP_FUNC(pthread_sigmask)(int how, const sigset_t *set, sigset_t *oset)
26399 +{
26400 +    sigset_t fudged_set;
26401 +    
26402 +    if (set != NULL && (how == SIG_BLOCK || how == SIG_SETMASK)) {
26403 +        fudged_set = *set;
26404 +        sigdelset(&fudged_set, SIG_SUSPEND);
26405 +        set = &fudged_set;
26406 +    }
26407 +    return(REAL_FUNC(pthread_sigmask)(how, set, oset));
26408 +}
26409 +#endif /* !GC_DARWIN_THREADS */
26410 +
26411 +/* Wrappers for functions that are likely to block for an appreciable  */
26412 +/* length of time.  Must be called in pairs, if at all.                        */
26413 +/* Nothing much beyond the system call itself should be executed       */
26414 +/* between these.                                                      */
26415 +
26416 +void GC_start_blocking(void) {
26417 +#   define SP_SLOP 128
26418 +    GC_thread me;
26419 +    LOCK();
26420 +    me = GC_lookup_thread(pthread_self());
26421 +    GC_ASSERT(!(me -> thread_blocked));
26422 +#   ifdef SPARC
26423 +       me -> stop_info.stack_ptr = (ptr_t)GC_save_regs_in_stack();
26424 +#   else
26425 +#   ifndef GC_DARWIN_THREADS
26426 +       me -> stop_info.stack_ptr = (ptr_t)GC_approx_sp();
26427 +#   endif
26428 +#   endif
26429 +#   ifdef IA64
26430 +       me -> backing_store_ptr = (ptr_t)GC_save_regs_in_stack() + SP_SLOP;
26431 +#   endif
26432 +    /* Add some slop to the stack pointer, since the wrapped call may  */
26433 +    /* end up pushing more callee-save registers.                      */
26434 +#   ifndef GC_DARWIN_THREADS
26435 +#   ifdef STACK_GROWS_UP
26436 +       me -> stop_info.stack_ptr += SP_SLOP;
26437 +#   else
26438 +       me -> stop_info.stack_ptr -= SP_SLOP;
26439 +#   endif
26440 +#   endif
26441 +    me -> thread_blocked = TRUE;
26442 +    UNLOCK();
26443 +}
26444 +
26445 +void GC_end_blocking(void) {
26446 +    GC_thread me;
26447 +    LOCK();   /* This will block if the world is stopped.      */
26448 +    me = GC_lookup_thread(pthread_self());
26449 +    GC_ASSERT(me -> thread_blocked);
26450 +    me -> thread_blocked = FALSE;
26451 +    UNLOCK();
26452 +}
26453 +    
26454 +#if defined(GC_DGUX386_THREADS)
26455 +#define __d10_sleep sleep
26456 +#endif /* GC_DGUX386_THREADS */
26457 +
26458 +/* A wrapper for the standard C sleep function */
26459 +int WRAP_FUNC(sleep) (unsigned int seconds)
26460 +{
26461 +    int result;
26462 +
26463 +    GC_start_blocking();
26464 +    result = REAL_FUNC(sleep)(seconds);
26465 +    GC_end_blocking();
26466 +    return result;
26467 +}
26468 +
26469 +struct start_info {
26470 +    void *(*start_routine)(void *);
26471 +    void *arg;
26472 +    word flags;
26473 +    sem_t registered;          /* 1 ==> in our thread table, but       */
26474 +                               /* parent hasn't yet noticed.           */
26475 +};
26476 +
26477 +/* Called at thread exit.                              */
26478 +/* Never called for main thread.  That's OK, since it  */
26479 +/* results in at most a tiny one-time leak.  And       */
26480 +/* linuxthreads doesn't reclaim the main threads       */
26481 +/* resources or id anyway.                             */
26482 +void GC_thread_exit_proc(void *arg)
26483 +{
26484 +    GC_thread me;
26485 +
26486 +    LOCK();
26487 +    me = GC_lookup_thread(pthread_self());
26488 +    GC_destroy_thread_local(me);
26489 +    if (me -> flags & DETACHED) {
26490 +       GC_delete_thread(pthread_self());
26491 +    } else {
26492 +       me -> flags |= FINISHED;
26493 +    }
26494 +#   if defined(THREAD_LOCAL_ALLOC) && !defined(USE_PTHREAD_SPECIFIC) \
26495 +       && !defined(USE_HPUX_TLS) && !defined(DBG_HDRS_ALL)
26496 +      GC_remove_specific(GC_thread_key);
26497 +#   endif
26498 +    GC_wait_for_gc_completion(FALSE);
26499 +    UNLOCK();
26500 +}
26501 +
26502 +int WRAP_FUNC(pthread_join)(pthread_t thread, void **retval)
26503 +{
26504 +    int result;
26505 +    GC_thread thread_gc_id;
26506 +    
26507 +    LOCK();
26508 +    thread_gc_id = GC_lookup_thread(thread);
26509 +    /* This is guaranteed to be the intended one, since the thread id  */
26510 +    /* cant have been recycled by pthreads.                            */
26511 +    UNLOCK();
26512 +    result = REAL_FUNC(pthread_join)(thread, retval);
26513 +# if defined (GC_FREEBSD_THREADS)
26514 +    /* On FreeBSD, the wrapped pthread_join() sometimes returns (what
26515 +       appears to be) a spurious EINTR which caused the test and real code
26516 +       to gratuitously fail.  Having looked at system pthread library source
26517 +       code, I see how this return code may be generated.  In one path of
26518 +       code, pthread_join() just returns the errno setting of the thread
26519 +       being joined.  This does not match the POSIX specification or the
26520 +       local man pages thus I have taken the liberty to catch this one
26521 +       spurious return value properly conditionalized on GC_FREEBSD_THREADS. */
26522 +    if (result == EINTR) result = 0;
26523 +# endif
26524 +    if (result == 0) {
26525 +        LOCK();
26526 +        /* Here the pthread thread id may have been recycled. */
26527 +        GC_delete_gc_thread(thread, thread_gc_id);
26528 +        UNLOCK();
26529 +    }
26530 +    return result;
26531 +}
26532 +
26533 +int
26534 +WRAP_FUNC(pthread_detach)(pthread_t thread)
26535 +{
26536 +    int result;
26537 +    GC_thread thread_gc_id;
26538 +    
26539 +    LOCK();
26540 +    thread_gc_id = GC_lookup_thread(thread);
26541 +    UNLOCK();
26542 +    result = REAL_FUNC(pthread_detach)(thread);
26543 +    if (result == 0) {
26544 +      LOCK();
26545 +      thread_gc_id -> flags |= DETACHED;
26546 +      /* Here the pthread thread id may have been recycled. */
26547 +      if (thread_gc_id -> flags & FINISHED) {
26548 +        GC_delete_gc_thread(thread, thread_gc_id);
26549 +      }
26550 +      UNLOCK();
26551 +    }
26552 +    return result;
26553 +}
26554 +
26555 +void * GC_start_routine(void * arg)
26556 +{
26557 +    int dummy;
26558 +    struct start_info * si = arg;
26559 +    void * result;
26560 +    GC_thread me;
26561 +    pthread_t my_pthread;
26562 +    void *(*start)(void *);
26563 +    void *start_arg;
26564 +
26565 +    my_pthread = pthread_self();
26566 +#   ifdef DEBUG_THREADS
26567 +        GC_printf1("Starting thread 0x%lx\n", my_pthread);
26568 +        GC_printf1("pid = %ld\n", (long) getpid());
26569 +        GC_printf1("sp = 0x%lx\n", (long) &arg);
26570 +#   endif
26571 +    LOCK();
26572 +    me = GC_new_thread(my_pthread);
26573 +#ifdef GC_DARWIN_THREADS
26574 +    me -> stop_info.mach_thread = mach_thread_self();
26575 +#else
26576 +    me -> stop_info.stack_ptr = 0;
26577 +#endif
26578 +    me -> flags = si -> flags;
26579 +    /* me -> stack_end = GC_linux_stack_base(); -- currently (11/99)   */
26580 +    /* doesn't work because the stack base in /proc/self/stat is the   */
26581 +    /* one for the main thread.  There is a strong argument that that's        */
26582 +    /* a kernel bug, but a pervasive one.                              */
26583 +#   ifdef STACK_GROWS_DOWN
26584 +      me -> stack_end = (ptr_t)(((word)(&dummy) + (GC_page_size - 1))
26585 +                               & ~(GC_page_size - 1));
26586 +#        ifndef GC_DARWIN_THREADS
26587 +        me -> stop_info.stack_ptr = me -> stack_end - 0x10;
26588 +#        endif
26589 +       /* Needs to be plausible, since an asynchronous stack mark      */
26590 +       /* should not crash.                                            */
26591 +#   else
26592 +      me -> stack_end = (ptr_t)((word)(&dummy) & ~(GC_page_size - 1));
26593 +      me -> stop_info.stack_ptr = me -> stack_end + 0x10;
26594 +#   endif
26595 +    /* This is dubious, since we may be more than a page into the stack, */
26596 +    /* and hence skip some of it, though it's not clear that matters.   */
26597 +#   ifdef IA64
26598 +      me -> backing_store_end = (ptr_t)
26599 +                       (GC_save_regs_in_stack() & ~(GC_page_size - 1));
26600 +      /* This is also < 100% convincing.  We should also read this     */
26601 +      /* from /proc, but the hook to do so isn't there yet.            */
26602 +#   endif /* IA64 */
26603 +    UNLOCK();
26604 +    start = si -> start_routine;
26605 +#   ifdef DEBUG_THREADS
26606 +       GC_printf1("start_routine = 0x%lx\n", start);
26607 +#   endif
26608 +    start_arg = si -> arg;
26609 +    sem_post(&(si -> registered));     /* Last action on si.   */
26610 +                                       /* OK to deallocate.    */
26611 +    pthread_cleanup_push(GC_thread_exit_proc, 0);
26612 +#   if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL)
26613 +       LOCK();
26614 +        GC_init_thread_local(me);
26615 +       UNLOCK();
26616 +#   endif
26617 +    result = (*start)(start_arg);
26618 +#if DEBUG_THREADS
26619 +        GC_printf1("Finishing thread 0x%x\n", pthread_self());
26620 +#endif
26621 +    me -> status = result;
26622 +    me -> flags |= FINISHED;
26623 +    pthread_cleanup_pop(1);
26624 +    /* Cleanup acquires lock, ensuring that we can't exit              */
26625 +    /* while a collection that thinks we're alive is trying to stop     */
26626 +    /* us.                                                             */
26627 +    return(result);
26628 +}
26629 +
26630 +int
26631 +WRAP_FUNC(pthread_create)(pthread_t *new_thread,
26632 +                 const pthread_attr_t *attr,
26633 +                  void *(*start_routine)(void *), void *arg)
26634 +{
26635 +    int result;
26636 +    int detachstate;
26637 +    word my_flags = 0;
26638 +    struct start_info * si; 
26639 +       /* This is otherwise saved only in an area mmapped by the thread */
26640 +       /* library, which isn't visible to the collector.                */
26641
26642 +    /* We resist the temptation to muck with the stack size here,      */
26643 +    /* even if the default is unreasonably small.  That's the client's */
26644 +    /* responsibility.                                                 */
26645 +
26646 +    LOCK();
26647 +    si = (struct start_info *)GC_INTERNAL_MALLOC(sizeof(struct start_info),
26648 +                                                NORMAL);
26649 +    UNLOCK();
26650 +    if (!parallel_initialized) GC_init_parallel();
26651 +    if (0 == si) return(ENOMEM);
26652 +    sem_init(&(si -> registered), 0, 0);
26653 +    si -> start_routine = start_routine;
26654 +    si -> arg = arg;
26655 +    LOCK();
26656 +    if (!GC_thr_initialized) GC_thr_init();
26657 +#   ifdef GC_ASSERTIONS
26658 +      {
26659 +       int stack_size;
26660 +       if (NULL == attr) {
26661 +          pthread_attr_t my_attr;
26662 +          pthread_attr_init(&my_attr);
26663 +          pthread_attr_getstacksize(&my_attr, &stack_size);
26664 +       } else {
26665 +          pthread_attr_getstacksize(attr, &stack_size);
26666 +       }
26667 +       GC_ASSERT(stack_size >= (8*HBLKSIZE*sizeof(word)));
26668 +       /* Our threads may need to do some work for the GC.     */
26669 +       /* Ridiculously small threads won't work, and they      */
26670 +       /* probably wouldn't work anyway.                       */
26671 +      }
26672 +#   endif
26673 +    if (NULL == attr) {
26674 +       detachstate = PTHREAD_CREATE_JOINABLE;
26675 +    } else { 
26676 +        pthread_attr_getdetachstate(attr, &detachstate);
26677 +    }
26678 +    if (PTHREAD_CREATE_DETACHED == detachstate) my_flags |= DETACHED;
26679 +    si -> flags = my_flags;
26680 +    UNLOCK();
26681 +#   ifdef DEBUG_THREADS
26682 +        GC_printf1("About to start new thread from thread 0x%X\n",
26683 +                  pthread_self());
26684 +#   endif
26685 +
26686 +    result = REAL_FUNC(pthread_create)(new_thread, attr, GC_start_routine, si);
26687 +
26688 +#   ifdef DEBUG_THREADS
26689 +        GC_printf1("Started thread 0x%X\n", *new_thread);
26690 +#   endif
26691 +    /* Wait until child has been added to the thread table.            */
26692 +    /* This also ensures that we hold onto si until the child is done  */
26693 +    /* with it.  Thus it doesn't matter whether it is otherwise                */
26694 +    /* visible to the collector.                                       */
26695 +    while (0 != sem_wait(&(si -> registered))) {
26696 +        if (EINTR != errno) ABORT("sem_wait failed");
26697 +    }
26698 +    sem_destroy(&(si -> registered));
26699 +       LOCK();
26700 +       GC_INTERNAL_FREE(si);
26701 +       UNLOCK();
26702 +
26703 +    return(result);
26704 +}
26705 +
26706 +#ifdef GENERIC_COMPARE_AND_SWAP
26707 +  pthread_mutex_t GC_compare_and_swap_lock = PTHREAD_MUTEX_INITIALIZER;
26708 +
26709 +  GC_bool GC_compare_and_exchange(volatile GC_word *addr,
26710 +                                 GC_word old, GC_word new_val)
26711 +  {
26712 +    GC_bool result;
26713 +    pthread_mutex_lock(&GC_compare_and_swap_lock);
26714 +    if (*addr == old) {
26715 +      *addr = new_val;
26716 +      result = TRUE;
26717 +    } else {
26718 +      result = FALSE;
26719 +    }
26720 +    pthread_mutex_unlock(&GC_compare_and_swap_lock);
26721 +    return result;
26722 +  }
26723 +  
26724 +  GC_word GC_atomic_add(volatile GC_word *addr, GC_word how_much)
26725 +  {
26726 +    GC_word old;
26727 +    pthread_mutex_lock(&GC_compare_and_swap_lock);
26728 +    old = *addr;
26729 +    *addr = old + how_much;
26730 +    pthread_mutex_unlock(&GC_compare_and_swap_lock);
26731 +    return old;
26732 +  }
26733 +
26734 +#endif /* GENERIC_COMPARE_AND_SWAP */
26735 +/* Spend a few cycles in a way that can't introduce contention with    */
26736 +/* othre threads.                                                      */
26737 +void GC_pause()
26738 +{
26739 +    int i;
26740 +#      ifndef __GNUC__
26741 +        volatile word dummy = 0;
26742 +#      endif
26743 +
26744 +    for (i = 0; i < 10; ++i) { 
26745 +#     ifdef __GNUC__
26746 +        __asm__ __volatile__ (" " : : : "memory");
26747 +#     else
26748 +       /* Something that's unlikely to be optimized away. */
26749 +       GC_noop(++dummy);
26750 +#     endif
26751 +    }
26752 +}
26753 +    
26754 +#define SPIN_MAX 1024  /* Maximum number of calls to GC_pause before   */
26755 +                       /* give up.                                     */
26756 +
26757 +VOLATILE GC_bool GC_collecting = 0;
26758 +                       /* A hint that we're in the collector and       */
26759 +                        /* holding the allocation lock for an           */
26760 +                        /* extended period.                             */
26761 +
26762 +#if !defined(USE_SPIN_LOCK) || defined(PARALLEL_MARK)
26763 +/* If we don't want to use the below spinlock implementation, either   */
26764 +/* because we don't have a GC_test_and_set implementation, or because  */
26765 +/* we don't want to risk sleeping, we can still try spinning on        */
26766 +/* pthread_mutex_trylock for a while.  This appears to be very         */
26767 +/* beneficial in many cases.                                           */
26768 +/* I suspect that under high contention this is nearly always better   */
26769 +/* than the spin lock.  But it's a bit slower on a uniprocessor.       */
26770 +/* Hence we still default to the spin lock.                            */
26771 +/* This is also used to acquire the mark lock for the parallel         */
26772 +/* marker.                                                             */
26773 +
26774 +/* Here we use a strict exponential backoff scheme.  I don't know      */
26775 +/* whether that's better or worse than the above.  We eventually       */
26776 +/* yield by calling pthread_mutex_lock(); it never makes sense to      */
26777 +/* explicitly sleep.                                                   */
26778 +
26779 +void GC_generic_lock(pthread_mutex_t * lock)
26780 +{
26781 +#ifndef NO_PTHREAD_TRYLOCK
26782 +    unsigned pause_length = 1;
26783 +    unsigned i;
26784 +    
26785 +    if (0 == pthread_mutex_trylock(lock)) return;
26786 +    for (; pause_length <= SPIN_MAX; pause_length <<= 1) {
26787 +       for (i = 0; i < pause_length; ++i) {
26788 +           GC_pause();
26789 +       }
26790 +        switch(pthread_mutex_trylock(lock)) {
26791 +           case 0:
26792 +               return;
26793 +           case EBUSY:
26794 +               break;
26795 +           default:
26796 +               ABORT("Unexpected error from pthread_mutex_trylock");
26797 +        }
26798 +    }
26799 +#endif /* !NO_PTHREAD_TRYLOCK */
26800 +    pthread_mutex_lock(lock);
26801 +}
26802 +
26803 +#endif /* !USE_SPIN_LOCK || PARALLEL_MARK */
26804 +
26805 +#if defined(USE_SPIN_LOCK)
26806 +
26807 +/* Reasonably fast spin locks.  Basically the same implementation */
26808 +/* as STL alloc.h.  This isn't really the right way to do this.   */
26809 +/* but until the POSIX scheduling mess gets straightened out ...  */
26810 +
26811 +volatile unsigned int GC_allocate_lock = 0;
26812 +
26813 +
26814 +void GC_lock()
26815 +{
26816 +#   define low_spin_max 30  /* spin cycles if we suspect uniprocessor */
26817 +#   define high_spin_max SPIN_MAX /* spin cycles for multiprocessor */
26818 +    static unsigned spin_max = low_spin_max;
26819 +    unsigned my_spin_max;
26820 +    static unsigned last_spins = 0;
26821 +    unsigned my_last_spins;
26822 +    int i;
26823 +
26824 +    if (!GC_test_and_set(&GC_allocate_lock)) {
26825 +        return;
26826 +    }
26827 +    my_spin_max = spin_max;
26828 +    my_last_spins = last_spins;
26829 +    for (i = 0; i < my_spin_max; i++) {
26830 +        if (GC_collecting || GC_nprocs == 1) goto yield;
26831 +        if (i < my_last_spins/2 || GC_allocate_lock) {
26832 +            GC_pause();
26833 +            continue;
26834 +        }
26835 +        if (!GC_test_and_set(&GC_allocate_lock)) {
26836 +           /*
26837 +             * got it!
26838 +             * Spinning worked.  Thus we're probably not being scheduled
26839 +             * against the other process with which we were contending.
26840 +             * Thus it makes sense to spin longer the next time.
26841 +            */
26842 +            last_spins = i;
26843 +            spin_max = high_spin_max;
26844 +            return;
26845 +        }
26846 +    }
26847 +    /* We are probably being scheduled against the other process.  Sleep. */
26848 +    spin_max = low_spin_max;
26849 +yield:
26850 +    for (i = 0;; ++i) {
26851 +        if (!GC_test_and_set(&GC_allocate_lock)) {
26852 +            return;
26853 +        }
26854 +#       define SLEEP_THRESHOLD 12
26855 +               /* Under Linux very short sleeps tend to wait until     */
26856 +               /* the current time quantum expires.  On old Linux      */
26857 +               /* kernels nanosleep(<= 2ms) just spins under Linux.    */
26858 +               /* (Under 2.4, this happens only for real-time          */
26859 +               /* processes.)  We want to minimize both behaviors      */
26860 +               /* here.                                                */
26861 +        if (i < SLEEP_THRESHOLD) {
26862 +            sched_yield();
26863 +       } else {
26864 +           struct timespec ts;
26865 +       
26866 +           if (i > 24) i = 24;
26867 +                       /* Don't wait for more than about 15msecs, even */
26868 +                       /* under extreme contention.                    */
26869 +           ts.tv_sec = 0;
26870 +           ts.tv_nsec = 1 << i;
26871 +           nanosleep(&ts, 0);
26872 +       }
26873 +    }
26874 +}
26875 +
26876 +#else  /* !USE_SPINLOCK */
26877 +void GC_lock()
26878 +{
26879 +#ifndef NO_PTHREAD_TRYLOCK
26880 +    if (1 == GC_nprocs || GC_collecting) {
26881 +       pthread_mutex_lock(&GC_allocate_ml);
26882 +    } else {
26883 +        GC_generic_lock(&GC_allocate_ml);
26884 +    }
26885 +#else  /* !NO_PTHREAD_TRYLOCK */
26886 +    pthread_mutex_lock(&GC_allocate_ml);
26887 +#endif /* !NO_PTHREAD_TRYLOCK */
26888 +}
26889 +
26890 +#endif /* !USE_SPINLOCK */
26891 +
26892 +#if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC)
26893 +
26894 +#ifdef GC_ASSERTIONS
26895 +  pthread_t GC_mark_lock_holder = NO_THREAD;
26896 +#endif
26897 +
26898 +#if 0
26899 +  /* Ugly workaround for a linux threads bug in the final versions      */
26900 +  /* of glibc2.1.  Pthread_mutex_trylock sets the mutex owner           */
26901 +  /* field even when it fails to acquire the mutex.  This causes        */
26902 +  /* pthread_cond_wait to die.  Remove for glibc2.2.                    */
26903 +  /* According to the man page, we should use                           */
26904 +  /* PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP, but that isn't actually   */
26905 +  /* defined.                                                           */
26906 +  static pthread_mutex_t mark_mutex =
26907 +        {0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, {0, 0}};
26908 +#else
26909 +  static pthread_mutex_t mark_mutex = PTHREAD_MUTEX_INITIALIZER;
26910 +#endif
26911 +
26912 +static pthread_cond_t builder_cv = PTHREAD_COND_INITIALIZER;
26913 +
26914 +void GC_acquire_mark_lock()
26915 +{
26916 +/*
26917 +    if (pthread_mutex_lock(&mark_mutex) != 0) {
26918 +       ABORT("pthread_mutex_lock failed");
26919 +    }
26920 +*/
26921 +    GC_generic_lock(&mark_mutex);
26922 +#   ifdef GC_ASSERTIONS
26923 +       GC_mark_lock_holder = pthread_self();
26924 +#   endif
26925 +}
26926 +
26927 +void GC_release_mark_lock()
26928 +{
26929 +    GC_ASSERT(GC_mark_lock_holder == pthread_self());
26930 +#   ifdef GC_ASSERTIONS
26931 +       GC_mark_lock_holder = NO_THREAD;
26932 +#   endif
26933 +    if (pthread_mutex_unlock(&mark_mutex) != 0) {
26934 +       ABORT("pthread_mutex_unlock failed");
26935 +    }
26936 +}
26937 +
26938 +/* Collector must wait for a freelist builders for 2 reasons:          */
26939 +/* 1) Mark bits may still be getting examined without lock.            */
26940 +/* 2) Partial free lists referenced only by locals may not be scanned  */
26941 +/*    correctly, e.g. if they contain "pointer-free" objects, since the        */
26942 +/*    free-list link may be ignored.                                   */
26943 +void GC_wait_builder()
26944 +{
26945 +    GC_ASSERT(GC_mark_lock_holder == pthread_self());
26946 +#   ifdef GC_ASSERTIONS
26947 +       GC_mark_lock_holder = NO_THREAD;
26948 +#   endif
26949 +    if (pthread_cond_wait(&builder_cv, &mark_mutex) != 0) {
26950 +       ABORT("pthread_cond_wait failed");
26951 +    }
26952 +    GC_ASSERT(GC_mark_lock_holder == NO_THREAD);
26953 +#   ifdef GC_ASSERTIONS
26954 +       GC_mark_lock_holder = pthread_self();
26955 +#   endif
26956 +}
26957 +
26958 +void GC_wait_for_reclaim()
26959 +{
26960 +    GC_acquire_mark_lock();
26961 +    while (GC_fl_builder_count > 0) {
26962 +       GC_wait_builder();
26963 +    }
26964 +    GC_release_mark_lock();
26965 +}
26966 +
26967 +void GC_notify_all_builder()
26968 +{
26969 +    GC_ASSERT(GC_mark_lock_holder == pthread_self());
26970 +    if (pthread_cond_broadcast(&builder_cv) != 0) {
26971 +       ABORT("pthread_cond_broadcast failed");
26972 +    }
26973 +}
26974 +
26975 +#endif /* PARALLEL_MARK || THREAD_LOCAL_ALLOC */
26976 +
26977 +#ifdef PARALLEL_MARK
26978 +
26979 +static pthread_cond_t mark_cv = PTHREAD_COND_INITIALIZER;
26980 +
26981 +void GC_wait_marker()
26982 +{
26983 +    GC_ASSERT(GC_mark_lock_holder == pthread_self());
26984 +#   ifdef GC_ASSERTIONS
26985 +       GC_mark_lock_holder = NO_THREAD;
26986 +#   endif
26987 +    if (pthread_cond_wait(&mark_cv, &mark_mutex) != 0) {
26988 +       ABORT("pthread_cond_wait failed");
26989 +    }
26990 +    GC_ASSERT(GC_mark_lock_holder == NO_THREAD);
26991 +#   ifdef GC_ASSERTIONS
26992 +       GC_mark_lock_holder = pthread_self();
26993 +#   endif
26994 +}
26995 +
26996 +void GC_notify_all_marker()
26997 +{
26998 +    if (pthread_cond_broadcast(&mark_cv) != 0) {
26999 +       ABORT("pthread_cond_broadcast failed");
27000 +    }
27001 +}
27002 +
27003 +#endif /* PARALLEL_MARK */
27004 +
27005 +# endif /* GC_LINUX_THREADS and friends */
27006 +
27007 diff -buNr boehm-gc/ptr_chck.c boehm-gc/ptr_chck.c
27008 --- boehm-gc/ptr_chck.c Fri Aug 17 11:30:46 2001
27009 +++ boehm-gc/ptr_chck.c Sat Sep 13 01:32:42 2003
27010 @@ -79,7 +79,7 @@
27011         return(p);
27012      }
27013      sz = WORDS_TO_BYTES(hhdr -> hb_sz);
27014 -    if (sz > WORDS_TO_BYTES(MAXOBJSZ)) {
27015 +    if (sz > MAXOBJBYTES) {
27016        base = (ptr_t)HBLKPTR(p);
27017        limit = base + sz;
27018        if ((ptr_t)p >= limit) {
27019 @@ -165,7 +165,7 @@
27020      pdispl = HBLKDISPL(p);
27021      map_entry = MAP_ENTRY((hhdr -> hb_map), pdispl);
27022      if (map_entry == OBJ_INVALID
27023 -       || sz > MAXOBJSZ && (ptr_t)p >= (ptr_t)h + sz) {
27024 +       || sz > MAXOBJBYTES && (ptr_t)p >= (ptr_t)h + sz) {
27025         goto fail;
27026      }
27027      return(p);
27028 diff -buNr boehm-gc/reclaim.c boehm-gc/reclaim.c
27029 --- boehm-gc/reclaim.c  Fri Mar 29 14:52:12 2002
27030 +++ boehm-gc/reclaim.c  Sat Sep 13 01:32:42 2003
27031 @@ -27,10 +27,43 @@
27032         /* nonzero.                                                     */
27033  #endif /* PARALLEL_MARK */
27034  
27035 -static void report_leak(p, sz)
27036 -ptr_t p;
27037 -word sz;
27038 +/* We defer printing of leaked objects until we're done with the GC    */
27039 +/* cycle, since the routine for printing objects needs to run outside  */
27040 +/* the collector, e.g. without the allocation lock.                    */
27041 +#define MAX_LEAKED 40
27042 +ptr_t GC_leaked[MAX_LEAKED];
27043 +unsigned GC_n_leaked = 0;
27044 +
27045 +GC_bool GC_have_errors = FALSE;
27046 +
27047 +void GC_add_leaked(leaked)
27048 +ptr_t leaked;
27049 +{
27050 +    if (GC_n_leaked < MAX_LEAKED) {
27051 +      GC_have_errors = TRUE;
27052 +      GC_leaked[GC_n_leaked++] = leaked;
27053 +      /* Make sure it's not reclaimed this cycle */
27054 +        GC_set_mark_bit(leaked);
27055 +    }
27056 +}
27057 +
27058 +static GC_bool printing_errors = FALSE;
27059 +/* Print all objects on the list after printing any smashed objs.      */
27060 +/* Clear both lists.                                                   */
27061 +void GC_print_all_errors ()
27062  {
27063 +    unsigned i;
27064 +
27065 +    LOCK();
27066 +    if (printing_errors) {
27067 +       UNLOCK();
27068 +       return;
27069 +    }
27070 +    printing_errors = TRUE;
27071 +    UNLOCK();
27072 +    if (GC_debugging_started) GC_print_all_smashed();
27073 +    for (i = 0; i < GC_n_leaked; ++i) {
27074 +       ptr_t p = GC_leaked[i];
27075      if (HDR(p) -> hb_obj_kind == PTRFREE) {
27076          GC_err_printf0("Leaked atomic object at ");
27077      } else {
27078 @@ -38,12 +71,17 @@
27079      }
27080      GC_print_heap_obj(p);
27081      GC_err_printf0("\n");
27082 +       GC_free(p);
27083 +       GC_leaked[i] = 0;
27084 +    }
27085 +    GC_n_leaked = 0;
27086 +    printing_errors = FALSE;
27087  }
27088  
27089 +
27090  #   define FOUND_FREE(hblk, word_no) \
27091        { \
27092 -         report_leak((ptr_t)hblk + WORDS_TO_BYTES(word_no), \
27093 -                    HDR(hblk) -> hb_sz); \
27094 +         GC_add_leaked((ptr_t)hblk + WORDS_TO_BYTES(word_no)); \
27095        }
27096  
27097  /*
27098 @@ -866,7 +904,7 @@
27099   * Clear *flp.
27100   * This must be done before dropping a list of free gcj-style objects,
27101   * since may otherwise end up with dangling "descriptor" pointers.
27102 - * It may help for other pointer-containg objects.
27103 + * It may help for other pointer-containing objects.
27104   */
27105  void GC_clear_fl_links(flp)
27106  ptr_t *flp;
27107 diff -buNr boehm-gc/solaris_pthreads.c boehm-gc/solaris_pthreads.c
27108 --- boehm-gc/solaris_pthreads.c Mon Feb 11 20:37:53 2002
27109 +++ boehm-gc/solaris_pthreads.c Sat Sep 13 01:32:42 2003
27110 @@ -13,9 +13,8 @@
27111  /*
27112   * Support code for Solaris threads.  Provides functionality we wish Sun
27113   * had provided.  Relies on some information we probably shouldn't rely on.
27114 - * Modified Peter C. for Solaris Posix Threads.
27115 + * Modified by Peter C. for Solaris Posix Threads.
27116   */
27117 -/* Boehm, September 14, 1994 4:44 pm PDT */
27118  
27119  # if defined(GC_SOLARIS_PTHREADS)
27120  # include "private/gc_priv.h"
27121 diff -buNr boehm-gc/solaris_threads.c boehm-gc/solaris_threads.c
27122 --- boehm-gc/solaris_threads.c  Mon Feb 11 20:37:53 2002
27123 +++ boehm-gc/solaris_threads.c  Sat Sep 13 01:32:42 2003
27124 @@ -37,6 +37,10 @@
27125  # include <unistd.h>
27126  # include <errno.h>
27127  
27128 +#ifdef HANDLE_FORK
27129 +  --> Not yet supported.  Try porting the code from linux_threads.c.
27130 +#endif
27131 +
27132  /*
27133   * This is the default size of the LWP arrays. If there are more LWPs
27134   * than this when a stop-the-world GC happens, set_max_lwps will be
27135 @@ -361,7 +365,7 @@
27136                        sizeof (prgregset_t)) != 0) {
27137                     int j;
27138  
27139 -                   for(j = 0; j < NGREG; j++)
27140 +                   for(j = 0; j < NPRGREG; j++)
27141                     {
27142                             GC_printf3("%i: %x -> %x\n", j,
27143                                        GC_lwp_registers[i][j],
27144 @@ -821,7 +825,7 @@
27145      if (result == 0) {
27146         t = GC_lookup_thread(target_thread);
27147         if (t == 0) ABORT("thread unknown to GC");
27148 -        t -> flags |= SUSPENDED;
27149 +        t -> flags |= SUSPNDED;
27150      }
27151      UNLOCK();
27152      return(result);
27153 @@ -837,7 +841,7 @@
27154      if (result == 0) {
27155         t = GC_lookup_thread(target_thread);
27156         if (t == 0) ABORT("thread unknown to GC");
27157 -        t -> flags &= ~SUSPENDED;
27158 +        t -> flags &= ~SUSPNDED;
27159      }
27160      UNLOCK();
27161      return(result);
27162 @@ -923,7 +927,7 @@
27163         my_flags |= CLIENT_OWNS_STACK;
27164      }
27165      if (flags & THR_DETACHED) my_flags |= DETACHED;
27166 -    if (flags & THR_SUSPENDED) my_flags |= SUSPENDED;
27167 +    if (flags & THR_SUSPENDED) my_flags |= SUSPNDED;
27168      result = thr_create(stack, stack_size, start_routine,
27169                         arg, flags & ~THR_DETACHED, &my_new_thread);
27170      if (result == 0) {
27171 diff -buNr boehm-gc/threadlibs.c boehm-gc/threadlibs.c
27172 --- boehm-gc/threadlibs.c       Mon Feb 11 20:37:53 2002
27173 +++ boehm-gc/threadlibs.c       Sat Sep 13 01:32:42 2003
27174 @@ -4,13 +4,14 @@
27175  int main()
27176  {
27177  #   if defined(GC_USE_LD_WRAP)
27178 -       printf("-Wl,--wrap -Wl,read -Wl,--wrap -Wl,dlopen "
27179 +       printf("-Wl,--wrap -Wl,dlopen "
27180                "-Wl,--wrap -Wl,pthread_create -Wl,--wrap -Wl,pthread_join "
27181                "-Wl,--wrap -Wl,pthread_detach "
27182                "-Wl,--wrap -Wl,pthread_sigmask -Wl,--wrap -Wl,sleep\n");
27183  #   endif
27184  #   if defined(GC_LINUX_THREADS) || defined(GC_IRIX_THREADS) \
27185 -       || defined(GC_FREEBSD_THREADS) || defined(GC_SOLARIS_PTHREADS)
27186 +       || defined(GC_FREEBSD_THREADS) || defined(GC_SOLARIS_PTHREADS) \
27187 +       || defined(GC_MACOSX_THREADS)
27188          printf("-lpthread\n");
27189  #   endif
27190  #   if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS)
27191 @@ -18,6 +19,17 @@
27192  #   endif
27193  #   if defined(GC_SOLARIS_THREADS) && !defined(GC_SOLARIS_PTHREADS)
27194          printf("-lthread -ldl\n");
27195 +#   endif
27196 +#   if defined(GC_WIN32_THREADS) && defined(CYGWIN32)
27197 +        printf("-lpthread\n");
27198 +#   endif
27199 +#   if defined(GC_OSF1_THREADS)
27200 +       printf("-lpthread -lrt");
27201 +#   endif
27202 +    /* You need GCC 3.0.3 to build this one!           */  
27203 +    /* DG/UX native gcc doesnt know what "-pthread" is */
27204 +#   if defined(GC_DGUX386_THREADS)
27205 +        printf("-ldl -pthread\n");
27206  #   endif
27207      return 0;
27208  }
27209 diff -buNr boehm-gc/typd_mlc.c boehm-gc/typd_mlc.c
27210 --- boehm-gc/typd_mlc.c Fri Aug 17 11:30:46 2001
27211 +++ boehm-gc/typd_mlc.c Sat Sep 13 01:32:42 2003
27212 @@ -437,6 +437,7 @@
27213      for (; bm != 0; bm >>= 1, current_p++) {
27214         if (bm & 1) {
27215             current = *current_p;
27216 +           FIXUP_POINTER(current);
27217             if ((ptr_t)current >= least_ha && (ptr_t)current <= greatest_ha) {
27218                 PUSH_CONTENTS((ptr_t)current, mark_stack_ptr,
27219                               mark_stack_limit, current_p, exit1);
27220 @@ -674,7 +675,7 @@
27221          if( !FASTLOCK_SUCCEEDED() || (op = *opp) == 0 ) {
27222              FASTUNLOCK();
27223              op = (ptr_t)GENERAL_MALLOC((word)lb, GC_explicit_kind);
27224 -           if (0 == op) return(0);
27225 +           if (0 == op) return 0;
27226  #          ifdef MERGE_SIZES
27227                 lw = GC_size_map[lb];   /* May have been uninitialized. */            
27228  #          endif
27229 diff -buNr boehm-gc/version.h boehm-gc/version.h
27230 --- boehm-gc/version.h  Mon Feb 11 20:37:53 2002
27231 +++ boehm-gc/version.h  Sat Sep 13 01:32:42 2003
27232 @@ -1,8 +1,25 @@
27233 -#define GC_VERSION_MAJOR 6
27234 -#define GC_VERSION_MINOR 1
27235 -#define GC_ALPHA_VERSION 3
27236 +/* The version here should match that in configure/configure.in        */
27237 +/* Eventually this one may become unnecessary.  For now we need        */
27238 +/* it to keep the old-style build process working.             */
27239 +#define GC_TMP_VERSION_MAJOR 6
27240 +#define GC_TMP_VERSION_MINOR 2
27241 +#define GC_TMP_ALPHA_VERSION 5
27242  
27243 +#if defined(GC_VERSION_MAJOR)
27244 +# if GC_TMP_VERSION_MAJOR != GC_VERSION_MAJOR || \
27245 +     GC_TMP_VERSION_MINOR != GC_VERSION_MINOR || \
27246 +     GC_TMP_ALPHA_VERSION != GC_ALPHA_VERSION
27247 +#   error Inconsistent version info.  Check version.h and configure.in.
27248 +# endif
27249 +#else
27250 +# define GC_VERSION_MAJOR GC_TMP_VERSION_MAJOR
27251 +# define GC_VERSION_MINOR GC_TMP_VERSION_MINOR
27252 +# define GC_ALPHA_VERSION GC_TMP_ALPHA_VERSION
27253 +#endif
27254 +
27255 +#ifndef GC_NOT_ALPHA
27256  #   define GC_NOT_ALPHA 0xff
27257 +#endif
27258  
27259  #ifndef GC_NO_VERSION_VAR
27260  
27261 diff -buNr boehm-gc/win32_threads.c boehm-gc/win32_threads.c
27262 --- boehm-gc/win32_threads.c    Mon Apr 28 13:55:07 2003
27263 +++ boehm-gc/win32_threads.c    Sat Sep 13 01:32:42 2003
27264 @@ -2,12 +2,26 @@
27265  
27266  #include "private/gc_priv.h"
27267  
27268 -#if 0
27269 -#define STRICT
27270 -#include <windows.h>
27271 +#ifdef CYGWIN32
27272 +# include <errno.h>
27273 +
27274 + /* Cygwin-specific forward decls */
27275 +# undef pthread_create 
27276 +# undef pthread_sigmask 
27277 +# undef pthread_join 
27278 +# undef dlopen 
27279 +
27280 +# define DEBUG_CYGWIN_THREADS 0
27281 +
27282 +  GC_bool GC_thr_initialized = FALSE;
27283 +  void * GC_start_routine(void * arg);
27284 +  void GC_thread_exit_proc(void *arg);
27285 +
27286  #endif
27287  
27288 -#define MAX_THREADS 64
27289 +#ifndef MAX_THREADS
27290 +# define MAX_THREADS 64
27291 +#endif
27292  
27293  struct thread_entry {
27294    LONG in_use;
27295 @@ -18,6 +32,12 @@
27296                         /* !in_use ==> stack == 0       */
27297    CONTEXT context;
27298    GC_bool suspended;
27299 +
27300 +# ifdef CYGWIN32
27301 +    void *status; /* hold exit value until join in case it's a pointer */
27302 +    pthread_t pthread_id;
27303 +# endif
27304 +
27305  };
27306  
27307  volatile GC_bool GC_please_stop = FALSE;
27308 @@ -29,6 +49,12 @@
27309      /* Unlike the other threads implementations, the thread table here */
27310      /* contains no pointers to the collectable heap.  Thus we have     */
27311      /* no private structures we need to preserve.                      */
27312 +# ifdef CYGWIN32
27313 +  { int i; /* pthreads may keep a pointer in the thread exit value */
27314 +    for (i = 0; i < MAX_THREADS; i++)
27315 +      if (thread_table[i].in_use) GC_push_all((ptr_t)&(thread_table[i].status),(ptr_t)(&(thread_table[i].status)+1));
27316 +  }
27317 +# endif
27318  }
27319  
27320  void GC_stop_world()
27321 @@ -36,6 +62,10 @@
27322    DWORD thread_id = GetCurrentThreadId();
27323    int i;
27324  
27325 +#ifdef CYGWIN32
27326 +  if (!GC_thr_initialized) ABORT("GC_stop_world() called before GC_thr_init()");
27327 +#endif
27328 +
27329    GC_please_stop = TRUE;
27330    for (i = 0; i < MAX_THREADS; i++)
27331      if (thread_table[i].stack != 0
27332 @@ -53,10 +83,14 @@
27333         DWORD exitCode; 
27334         if (GetExitCodeThread(thread_table[i].handle,&exitCode) &&
27335              exitCode != STILL_ACTIVE) {
27336 -            thread_table[i].stack = 0;
27337 +          thread_table[i].stack = 0; /* prevent stack from being pushed */
27338 +#         ifndef CYGWIN32
27339 +            /* this breaks pthread_join on Cygwin, which is guaranteed to  */
27340 +           /* only see user pthreads                                      */
27341             thread_table[i].in_use = FALSE;
27342             CloseHandle(thread_table[i].handle);
27343             BZERO((void *)(&thread_table[i].context), sizeof(CONTEXT));
27344 +#         endif
27345             continue;
27346         }
27347         if (SuspendThread(thread_table[i].handle) == (DWORD)-1)
27348 @@ -335,9 +369,11 @@
27349      if (*lo < start) *lo = start;
27350  }
27351  
27352 -#if !defined(MSWINCE) && !(defined(__MINGW32__) && !defined(_DLL))
27353 +#if !defined(MSWINCE) && defined(GC_DLL)
27354  
27355 -HANDLE WINAPI GC_CreateThread(
27356 +/* We register threads from DllMain */
27357 +
27358 +GC_API HANDLE GC_CreateThread(
27359      LPSECURITY_ATTRIBUTES lpThreadAttributes, 
27360      DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, 
27361      LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId )
27362 @@ -346,7 +382,10 @@
27363                          lpParameter, dwCreationFlags, lpThreadId);
27364  }
27365  
27366 -#else /* !defined(MSWINCE) && !(defined(__MINGW32__) && !defined(_DLL)) */
27367 +#else /* defined(MSWINCE) || !defined(GC_DLL))  */
27368 +
27369 +/* We have no DllMain to take care of new threads.  Thus we    */
27370 +/* must properly intercept thread creation.                    */
27371  
27372  typedef struct {
27373      HANDLE child_ready_h, parent_ready_h;
27374 @@ -527,22 +566,11 @@
27375  
27376  LONG WINAPI GC_write_fault_handler(struct _EXCEPTION_POINTERS *exc_info);
27377  
27378 -#ifdef GC_DLL
27379 -
27380 -/*
27381 - * This isn't generally safe, since DllMain is not premptible.
27382 - * If another thread holds the lock while this runs we're in trouble.
27383 - * Pontus Rydin suggests wrapping the thread start routine instead.
27384 +/* threadAttach/threadDetach routines used by both CYGWIN and DLL
27385 + * implementation, since both recieve explicit notification on thread
27386 + * creation/destruction.
27387   */
27388 -BOOL WINAPI DllMain(HINSTANCE inst, ULONG reason, LPVOID reserved)
27389 -{
27390 -  switch (reason) {
27391 -  case DLL_PROCESS_ATTACH:
27392 -    InitializeCriticalSection(&GC_allocate_ml);
27393 -    GC_init(); /* Force initialization before thread attach.   */
27394 -    /* fall through */
27395 -  case DLL_THREAD_ATTACH:
27396 -    {
27397 +static void threadAttach() {
27398        int i;
27399        /* It appears to be unsafe to acquire a lock here, since this    */
27400        /* code is apparently not preeemptible on some systems.          */
27401 @@ -554,14 +582,11 @@
27402        /* The following should be a noop according to the win32 */
27403        /* documentation.  There is empirical evidence that it   */
27404        /* isn't.                - HB                                    */
27405 -#     ifdef MPROTECT_VDB
27406 +# if defined(MPROTECT_VDB)
27407         if (GC_incremental) SetUnhandledExceptionFilter(GC_write_fault_handler);
27408  #     endif
27409 -
27410 -      for (i = 0;
27411                                /* cast away volatile qualifier */
27412 -          InterlockedExchange((LPLONG) &thread_table[i].in_use, 1) != 0;
27413 -          i++) {
27414 +  for (i = 0; InterlockedExchange((LONG*)&thread_table[i].in_use,1) != 0; i++) {
27415         /* Compare-and-swap would make this cleaner, but that's not     */
27416         /* supported before Windows 98 and NT 4.0.  In Windows 2000,    */
27417         /* InterlockedExchange is supposed to be replaced by            */
27418 @@ -571,11 +596,13 @@
27419           ABORT("too many threads");
27420        }
27421        thread_table[i].id = GetCurrentThreadId();
27422 +# ifdef CYGWIN32
27423 +    thread_table[i].pthread_id = pthread_self();
27424 +# endif
27425        if (!DuplicateHandle(GetCurrentProcess(),
27426                            GetCurrentThread(),
27427                            GetCurrentProcess(),
27428 -                          /* cast away volatile qualifier */
27429 -                          (HANDLE *) &thread_table[i].handle,
27430 +                      (HANDLE*)&thread_table[i].handle,
27431                            0,
27432                            0,
27433                            DUPLICATE_SAME_ACCESS)) {
27434 @@ -584,33 +611,226 @@
27435         ABORT("DuplicateHandle failed");
27436        }
27437        thread_table[i].stack = GC_get_stack_base();
27438 +  if (thread_table[i].stack == NULL) 
27439 +    ABORT("Failed to find stack base in threadAttach");
27440        /* If this thread is being created while we are trying to stop   */
27441        /* the world, wait here.  Hopefully this can't happen on any     */
27442        /* systems that don't allow us to block here.                    */
27443        while (GC_please_stop) Sleep(20);
27444 -    }
27445 -    break;
27446 -  case DLL_THREAD_DETACH:
27447 -    {
27448 +}
27449 +
27450 +static void threadDetach(DWORD thread_id) {
27451        int i;
27452 -      DWORD thread_id = GetCurrentThreadId();
27453 +
27454        LOCK();
27455        for (i = 0;
27456             i < MAX_THREADS &&
27457 -          (thread_table[i].stack == 0 || thread_table[i].id != thread_id);
27458 +       !thread_table[i].in_use || thread_table[i].id != thread_id;
27459            i++) {}
27460 -      if (i >= MAX_THREADS) {
27461 +  if (i >= MAX_THREADS ) {
27462           WARN("thread %ld not found on detach", (GC_word)thread_id);
27463 -      } else {
27464 +  }
27465 +  else {
27466            thread_table[i].stack = 0;
27467            thread_table[i].in_use = FALSE;
27468            CloseHandle(thread_table[i].handle);
27469             /* cast away volatile qualifier */
27470 -          BZERO((void *) &thread_table[i].context, sizeof(CONTEXT));
27471 +    BZERO((void *)&thread_table[i].context, sizeof(CONTEXT));
27472 +  }
27473 +  UNLOCK();
27474 +}
27475 +
27476 +#ifdef CYGWIN32
27477 +
27478 +/* Called by GC_init() - we hold the allocation lock.  */
27479 +void GC_thr_init() {
27480 +    if (GC_thr_initialized) return;
27481 +    GC_thr_initialized = TRUE;
27482 +
27483 +#if 0
27484 +    /* this might already be handled in GC_init... */
27485 +    InitializeCriticalSection(&GC_allocate_ml);
27486 +#endif
27487 +
27488 +    /* Add the initial thread, so we can stop it.      */
27489 +    threadAttach();
27490 +}
27491 +
27492 +struct start_info {
27493 +    void *(*start_routine)(void *);
27494 +    void *arg;
27495 +};
27496 +
27497 +int GC_pthread_join(pthread_t pthread_id, void **retval) {
27498 +    int result;
27499 +    int i;
27500 +
27501 +#   if DEBUG_CYGWIN_THREADS
27502 +      GC_printf3("thread 0x%x(0x%x) is joining thread 0x%x.\n",(int)pthread_self(),
27503 +                GetCurrentThreadId(), (int)pthread_id);
27504 +#   endif
27505 +
27506 +    /* Can't do any table lookups here, because thread being joined 
27507 +       might not have registered itself yet */
27508 +
27509 +    result = pthread_join(pthread_id, retval);
27510 +
27511 +    LOCK();
27512 +    for (i = 0; !thread_table[i].in_use || thread_table[i].pthread_id != pthread_id;
27513 +         i++) {
27514 +      if (i == MAX_THREADS - 1) {
27515 +        GC_printf1("Failed to find thread 0x%x in pthread_join()\n", pthread_id);
27516 +        ABORT("thread not found on detach");
27517 +      }
27518        }
27519        UNLOCK();
27520 +    threadDetach(thread_table[i].id);
27521 +
27522 +#   if DEBUG_CYGWIN_THREADS
27523 +      GC_printf3("thread 0x%x(0x%x) completed join with thread 0x%x.\n",
27524 +                (int)pthread_self(), GetCurrentThreadId(), (int)pthread_id);
27525 +#   endif
27526 +
27527 +    return result;
27528 +}
27529 +
27530 +/* Cygwin-pthreads calls CreateThread internally, but it's not
27531 + * easily interceptible by us..
27532 + *   so intercept pthread_create instead
27533 + */
27534 +int
27535 +GC_pthread_create(pthread_t *new_thread,
27536 +                 const pthread_attr_t *attr,
27537 +                  void *(*start_routine)(void *), void *arg) {
27538 +    int result;
27539 +    struct start_info * si;
27540 +
27541 +    if (!GC_is_initialized) GC_init();
27542 +               /* make sure GC is initialized (i.e. main thread is attached) */
27543 +    
27544 +    /* This is otherwise saved only in an area mmapped by the thread */
27545 +    /* library, which isn't visible to the collector.           */
27546 +    si = GC_malloc_uncollectable(sizeof(struct start_info)); 
27547 +    if (0 == si) return(EAGAIN);
27548 +
27549 +    si -> start_routine = start_routine;
27550 +    si -> arg = arg;
27551 +
27552 +#   if DEBUG_CYGWIN_THREADS
27553 +      GC_printf2("About to create a thread from 0x%x(0x%x)\n",(int)pthread_self(),
27554 +                                                             GetCurrentThreadId);
27555 +#   endif
27556 +    result = pthread_create(new_thread, attr, GC_start_routine, si); 
27557 +
27558 +    if (result) { /* failure */
27559 +       GC_free(si);
27560 +    } 
27561 +
27562 +    return(result);
27563 +}
27564 +
27565 +void * GC_start_routine(void * arg)
27566 +{
27567 +    struct start_info * si = arg;
27568 +    void * result;
27569 +    void *(*start)(void *);
27570 +    void *start_arg;
27571 +    pthread_t pthread_id;
27572 +    int i;
27573 +
27574 +#   if DEBUG_CYGWIN_THREADS
27575 +      GC_printf2("thread 0x%x(0x%x) starting...\n",(int)pthread_self(),
27576 +                                                  GetCurrentThreadId());
27577 +#   endif
27578 +
27579 +    /* If a GC occurs before the thread is registered, that GC will    */
27580 +    /* ignore this thread.  That's fine, since it will block trying to  */
27581 +    /* acquire the allocation lock, and won't yet hold interesting     */
27582 +    /* pointers.                                                       */
27583 +    LOCK();
27584 +    /* We register the thread here instead of in the parent, so that   */
27585 +    /* we don't need to hold the allocation lock during pthread_create. */
27586 +    threadAttach();
27587 +    UNLOCK();
27588 +
27589 +    start = si -> start_routine;
27590 +    start_arg = si -> arg;
27591 +    pthread_id = pthread_self();
27592 +
27593 +    GC_free(si); /* was allocated uncollectable */
27594 +
27595 +    pthread_cleanup_push(GC_thread_exit_proc, pthread_id);
27596 +    result = (*start)(start_arg);
27597 +    pthread_cleanup_pop(0);
27598 +
27599 +#   if DEBUG_CYGWIN_THREADS
27600 +      GC_printf2("thread 0x%x(0x%x) returned from start routine.\n",
27601 +                (int)pthread_self(),GetCurrentThreadId());
27602 +#   endif
27603 +
27604 +    LOCK();
27605 +    for (i = 0; thread_table[i].pthread_id != pthread_id; i++) {
27606 +      if (i == MAX_THREADS - 1)
27607 +        ABORT("thread not found on exit");
27608 +    }
27609 +    thread_table[i].status = result;
27610 +    UNLOCK();
27611 +
27612 +    return(result);
27613 +}
27614 +
27615 +void GC_thread_exit_proc(void *arg)
27616 +{
27617 +    pthread_t pthread_id = (pthread_t)arg;
27618 +    int i;
27619 +
27620 +#   if DEBUG_CYGWIN_THREADS
27621 +      GC_printf2("thread 0x%x(0x%x) called pthread_exit().\n",
27622 +                (int)pthread_self(),GetCurrentThreadId());
27623 +#   endif
27624 +
27625 +    LOCK();
27626 +    for (i = 0; thread_table[i].pthread_id != pthread_id; i++) {
27627 +      if (i == MAX_THREADS - 1)
27628 +        ABORT("thread not found on exit");
27629      }
27630 +    UNLOCK();
27631 +
27632 +#if 0
27633 +    /* TODO: we need a way to get the exit value after a pthread_exit so we can stash it safely away */
27634 +    thread_table[i].status = ???
27635 +#endif
27636 +}
27637 +
27638 +/* nothing required here... */
27639 +int GC_pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) {
27640 +  return pthread_sigmask(how, set, oset);
27641 +}
27642 +int GC_pthread_detach(pthread_t thread) {
27643 +  return pthread_detach(thread);
27644 +}
27645 +#else /* !CYGWIN32 */
27646 +
27647 +/*
27648 + * We avoid acquiring locks here, since this doesn't seem to be preemptable.
27649 + * Pontus Rydin suggests wrapping the thread start routine instead.
27650 + */
27651 +#ifdef GC_DLL
27652 +BOOL WINAPI DllMain(HINSTANCE inst, ULONG reason, LPVOID reserved)
27653 +{
27654 +  switch (reason) {
27655 +  case DLL_PROCESS_ATTACH:
27656 +    InitializeCriticalSection(&GC_allocate_ml);
27657 +    GC_init(); /* Force initialization before thread attach.   */
27658 +    /* fall through */
27659 +  case DLL_THREAD_ATTACH:
27660 +    threadAttach();
27661 +    break;
27662 +
27663 +  case DLL_THREAD_DETACH:
27664 +    threadDetach(GetCurrentThreadId());
27665      break;
27666 +
27667    case DLL_PROCESS_DETACH:
27668      {
27669        int i;
27670 @@ -636,8 +856,8 @@
27671    }
27672    return TRUE;
27673  }
27674 -
27675 -#   endif /* GC_DLL */
27676 +#endif /* GC_DLL */
27677 +#endif /* !CYGWIN32 */
27678  
27679  # endif /* !MSWINCE */
27680