Upgrade Boehm GC to 7.2alpha4.
authorStefan Ring <stefan@complang.tuwien.ac.at>
Sun, 31 Oct 2010 15:22:47 +0000 (16:22 +0100)
committerStefan Ring <stefan@complang.tuwien.ac.at>
Sun, 31 Oct 2010 15:22:47 +0000 (16:22 +0100)
--HG--
rename : src/mm/boehm-gc/AmigaOS.c => src/mm/boehm-gc/extra/AmigaOS.c
rename : src/mm/boehm-gc/MacOS.c => src/mm/boehm-gc/extra/MacOS.c
rename : src/mm/boehm-gc/add_gc_prefix.c => src/mm/boehm-gc/extra/add_gc_prefix.c
rename : src/mm/boehm-gc/gcname.c => src/mm/boehm-gc/extra/gcname.c
rename : src/mm/boehm-gc/if_mach.c => src/mm/boehm-gc/extra/if_mach.c
rename : src/mm/boehm-gc/if_not_there.c => src/mm/boehm-gc/extra/if_not_there.c
rename : src/mm/boehm-gc/msvc_dbg.c => src/mm/boehm-gc/extra/msvc_dbg.c
rename : src/mm/boehm-gc/setjmp_t.c => src/mm/boehm-gc/extra/setjmp_t.c
rename : src/mm/boehm-gc/libatomic_ops-1.2/AUTHORS => src/mm/boehm-gc/libatomic_ops/AUTHORS
rename : src/mm/boehm-gc/libatomic_ops-1.2/COPYING => src/mm/boehm-gc/libatomic_ops/COPYING
rename : src/mm/boehm-gc/libatomic_ops-1.2/ChangeLog => src/mm/boehm-gc/libatomic_ops/ChangeLog
rename : src/mm/boehm-gc/libatomic_ops-1.2/INSTALL => src/mm/boehm-gc/libatomic_ops/INSTALL
rename : src/mm/boehm-gc/libatomic_ops-1.2/Makefile.am => src/mm/boehm-gc/libatomic_ops/Makefile.am
rename : src/mm/boehm-gc/libatomic_ops-1.2/Makefile.in => src/mm/boehm-gc/libatomic_ops/Makefile.in
rename : src/mm/boehm-gc/libatomic_ops-1.2/NEWS => src/mm/boehm-gc/libatomic_ops/NEWS
rename : src/mm/boehm-gc/libatomic_ops-1.2/README => src/mm/boehm-gc/libatomic_ops/README
rename : src/mm/boehm-gc/libatomic_ops-1.2/aclocal.m4 => src/mm/boehm-gc/libatomic_ops/aclocal.m4
rename : src/mm/boehm-gc/libatomic_ops-1.2/compile => src/mm/boehm-gc/libatomic_ops/compile
rename : src/mm/boehm-gc/libatomic_ops-1.2/config.guess => src/mm/boehm-gc/libatomic_ops/config.guess
rename : src/mm/boehm-gc/libatomic_ops-1.2/config.sub => src/mm/boehm-gc/libatomic_ops/config.sub
rename : src/mm/boehm-gc/libatomic_ops-1.2/configure => src/mm/boehm-gc/libatomic_ops/configure
rename : src/mm/boehm-gc/libatomic_ops-1.2/configure.ac => src/mm/boehm-gc/libatomic_ops/configure.ac
rename : src/mm/boehm-gc/libatomic_ops-1.2/depcomp => src/mm/boehm-gc/libatomic_ops/depcomp
rename : src/mm/boehm-gc/libatomic_ops-1.2/doc/COPYING => src/mm/boehm-gc/libatomic_ops/doc/COPYING
rename : src/mm/boehm-gc/libatomic_ops-1.2/doc/LICENSING.txt => src/mm/boehm-gc/libatomic_ops/doc/LICENSING.txt
rename : src/mm/boehm-gc/libatomic_ops-1.2/doc/Makefile.am => src/mm/boehm-gc/libatomic_ops/doc/Makefile.am
rename : src/mm/boehm-gc/libatomic_ops-1.2/doc/Makefile.in => src/mm/boehm-gc/libatomic_ops/doc/Makefile.in
rename : src/mm/boehm-gc/libatomic_ops-1.2/doc/README.txt => src/mm/boehm-gc/libatomic_ops/doc/README.txt
rename : src/mm/boehm-gc/libatomic_ops-1.2/doc/README_malloc.txt => src/mm/boehm-gc/libatomic_ops/doc/README_malloc.txt
rename : src/mm/boehm-gc/libatomic_ops-1.2/doc/README_stack.txt => src/mm/boehm-gc/libatomic_ops/doc/README_stack.txt
rename : src/mm/boehm-gc/libatomic_ops-1.2/doc/README_win32.txt => src/mm/boehm-gc/libatomic_ops/doc/README_win32.txt
rename : src/mm/boehm-gc/libatomic_ops-1.2/install-sh => src/mm/boehm-gc/libatomic_ops/install-sh
rename : src/mm/boehm-gc/libatomic_ops-1.2/missing => src/mm/boehm-gc/libatomic_ops/missing
rename : src/mm/boehm-gc/libatomic_ops-1.2/mkinstalldirs => src/mm/boehm-gc/libatomic_ops/mkinstalldirs
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/Makefile.am => src/mm/boehm-gc/libatomic_ops/src/Makefile.am
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/Makefile.in => src/mm/boehm-gc/libatomic_ops/src/Makefile.in
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/Makefile.msft => src/mm/boehm-gc/libatomic_ops/src/Makefile.msft
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops.c => src/mm/boehm-gc/libatomic_ops/src/atomic_ops.c
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/Makefile.am => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/Makefile.am
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/Makefile.in => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/Makefile.in
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/generalize-small.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/generalize-small.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/generalize-small.template => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/generalize-small.template
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/generalize.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/generalize.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/Makefile.am => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/Makefile.am
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/Makefile.in => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/Makefile.in
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/README => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/README
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/acquire_release_volatile.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/acquire_release_volatile.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/aligned_atomic_load_store.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/aligned_atomic_load_store.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/all_acquire_release_volatile.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/all_acquire_release_volatile.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/all_atomic_load_store.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/all_atomic_load_store.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ao_t_is_int.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/ao_t_is_int.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/armcc/arm_v6.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/armcc/arm_v6.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/atomic_load_store.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/atomic_load_store.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/char_acquire_release_volatile.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/char_acquire_release_volatile.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/char_atomic_load_store.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/char_atomic_load_store.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/emul_cas.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/emul_cas.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/alpha.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/alpha.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/arm.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/arm.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/cris.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/cris.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/hppa.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/hppa.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/ia64.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/ia64.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/m68k.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/m68k.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/mips.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/mips.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/powerpc.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/powerpc.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/s390.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/s390.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/sparc.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/sparc.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86_64.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86_64.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/generic_pthread.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/generic_pthread.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/hpc/hppa.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/hpc/hppa.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/hpc/ia64.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/hpc/ia64.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ibmc/powerpc.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/ibmc/powerpc.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/icc/ia64.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/icc/ia64.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/int_acquire_release_volatile.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/int_acquire_release_volatile.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/int_aligned_atomic_load_store.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/int_aligned_atomic_load_store.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/int_atomic_load_store.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/int_atomic_load_store.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/msftc/x86.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/msftc/x86.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/msftc/x86_64.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/msftc/x86_64.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ordered.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/ordered.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ordered_except_wr.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/ordered_except_wr.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/read_ordered.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/read_ordered.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/short_acquire_release_volatile.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/short_acquire_release_volatile.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/short_aligned_atomic_load_store.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/short_aligned_atomic_load_store.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/short_atomic_load_store.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/short_atomic_load_store.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/standard_ao_double_t.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/standard_ao_double_t.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc/sparc.S => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/sunc/sparc.S
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc/sparc.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/sunc/sparc.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc/x86.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/sunc/x86.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc/x86_64.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/sunc/x86_64.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/test_and_set_t_is_ao_t.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/test_and_set_t_is_ao_t.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/test_and_set_t_is_char.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/test_and_set_t_is_char.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_malloc.c => src/mm/boehm-gc/libatomic_ops/src/atomic_ops_malloc.c
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_malloc.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops_malloc.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_stack.c => src/mm/boehm-gc/libatomic_ops/src/atomic_ops_stack.c
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_stack.h => src/mm/boehm-gc/libatomic_ops/src/atomic_ops_stack.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_sysdeps.S => src/mm/boehm-gc/libatomic_ops/src/atomic_ops_sysdeps.S
rename : src/mm/boehm-gc/libatomic_ops-1.2/src/config.h.in => src/mm/boehm-gc/libatomic_ops/src/config.h.in
rename : src/mm/boehm-gc/libatomic_ops-1.2/tests/Makefile.am => src/mm/boehm-gc/libatomic_ops/tests/Makefile.am
rename : src/mm/boehm-gc/libatomic_ops-1.2/tests/Makefile.in => src/mm/boehm-gc/libatomic_ops/tests/Makefile.in
rename : src/mm/boehm-gc/libatomic_ops-1.2/tests/list_atomic.c => src/mm/boehm-gc/libatomic_ops/tests/list_atomic.c
rename : src/mm/boehm-gc/libatomic_ops-1.2/tests/list_atomic.template => src/mm/boehm-gc/libatomic_ops/tests/list_atomic.template
rename : src/mm/boehm-gc/libatomic_ops-1.2/tests/run_parallel.inc => src/mm/boehm-gc/libatomic_ops/tests/run_parallel.inc
rename : src/mm/boehm-gc/libatomic_ops-1.2/tests/test_atomic.c => src/mm/boehm-gc/libatomic_ops/tests/test_atomic.c
rename : src/mm/boehm-gc/libatomic_ops-1.2/tests/test_atomic.template => src/mm/boehm-gc/libatomic_ops/tests/test_atomic.template
rename : src/mm/boehm-gc/libatomic_ops-1.2/tests/test_atomic_include.h => src/mm/boehm-gc/libatomic_ops/tests/test_atomic_include.h
rename : src/mm/boehm-gc/libatomic_ops-1.2/tests/test_malloc.c => src/mm/boehm-gc/libatomic_ops/tests/test_malloc.c
rename : src/mm/boehm-gc/libatomic_ops-1.2/tests/test_stack.c => src/mm/boehm-gc/libatomic_ops/tests/test_stack.c

327 files changed:
src/mm/boehm-gc/AmigaOS.c [deleted file]
src/mm/boehm-gc/ChangeLog
src/mm/boehm-gc/EMX_MAKEFILE
src/mm/boehm-gc/MacOS.c [deleted file]
src/mm/boehm-gc/Makefile [deleted file]
src/mm/boehm-gc/Makefile.am
src/mm/boehm-gc/Makefile.direct
src/mm/boehm-gc/Makefile.dj
src/mm/boehm-gc/Makefile.in
src/mm/boehm-gc/NT_MAKEFILE
src/mm/boehm-gc/NT_STATIC_THREADS_MAKEFILE
src/mm/boehm-gc/NT_THREADS_MAKEFILE [deleted file]
src/mm/boehm-gc/NT_X64_STATIC_THREADS_MAKEFILE
src/mm/boehm-gc/NT_X64_THREADS_MAKEFILE
src/mm/boehm-gc/PCR-Makefile
src/mm/boehm-gc/README.QUICK
src/mm/boehm-gc/SMakefile.amiga
src/mm/boehm-gc/acinclude.m4 [deleted file]
src/mm/boehm-gc/aclocal.m4
src/mm/boehm-gc/add_gc_prefix.c [deleted file]
src/mm/boehm-gc/allchblk.c
src/mm/boehm-gc/alloc.c
src/mm/boehm-gc/autogen.sh
src/mm/boehm-gc/backgraph.c
src/mm/boehm-gc/blacklst.c
src/mm/boehm-gc/build_atomic_ops.sh
src/mm/boehm-gc/build_atomic_ops.sh.cygwin
src/mm/boehm-gc/checksums.c
src/mm/boehm-gc/compile
src/mm/boehm-gc/config.guess
src/mm/boehm-gc/config.sub
src/mm/boehm-gc/configure
src/mm/boehm-gc/configure.ac
src/mm/boehm-gc/configure_atomic_ops.sh
src/mm/boehm-gc/darwin_stop_world.c
src/mm/boehm-gc/dbg_mlc.c
src/mm/boehm-gc/depcomp
src/mm/boehm-gc/doc/README
src/mm/boehm-gc/doc/README.DGUX386
src/mm/boehm-gc/doc/README.autoconf
src/mm/boehm-gc/doc/README.environment
src/mm/boehm-gc/doc/README.macros
src/mm/boehm-gc/doc/README.solaris2
src/mm/boehm-gc/doc/README.win32
src/mm/boehm-gc/doc/README.win64
src/mm/boehm-gc/doc/simple_example.html
src/mm/boehm-gc/dyn_load.c
src/mm/boehm-gc/extra/AmigaOS.c [new file with mode: 0644]
src/mm/boehm-gc/extra/MacOS.c [new file with mode: 0644]
src/mm/boehm-gc/extra/add_gc_prefix.c [new file with mode: 0644]
src/mm/boehm-gc/extra/gc.c [new file with mode: 0644]
src/mm/boehm-gc/extra/gcname.c [new file with mode: 0644]
src/mm/boehm-gc/extra/if_mach.c [new file with mode: 0644]
src/mm/boehm-gc/extra/if_not_there.c [new file with mode: 0644]
src/mm/boehm-gc/extra/msvc_dbg.c [new file with mode: 0644]
src/mm/boehm-gc/extra/setjmp_t.c [new file with mode: 0644]
src/mm/boehm-gc/extra/threadlibs.c [new file with mode: 0644]
src/mm/boehm-gc/finalize.c
src/mm/boehm-gc/gc.mak
src/mm/boehm-gc/gc_cpp.cc
src/mm/boehm-gc/gc_dlopen.c
src/mm/boehm-gc/gcj_mlc.c
src/mm/boehm-gc/gcname.c [deleted file]
src/mm/boehm-gc/headers.c
src/mm/boehm-gc/if_mach.c [deleted file]
src/mm/boehm-gc/if_not_there.c [deleted file]
src/mm/boehm-gc/include/gc.h
src/mm/boehm-gc/include/gc_allocator.h
src/mm/boehm-gc/include/gc_backptr.h
src/mm/boehm-gc/include/gc_config_macros.h
src/mm/boehm-gc/include/gc_cpp.h
src/mm/boehm-gc/include/gc_gcj.h
src/mm/boehm-gc/include/gc_inline.h
src/mm/boehm-gc/include/gc_mark.h
src/mm/boehm-gc/include/gc_pthread_redirects.h
src/mm/boehm-gc/include/gc_typed.h
src/mm/boehm-gc/include/gc_version.h
src/mm/boehm-gc/include/javaxfc.h
src/mm/boehm-gc/include/new_gc_alloc.h
src/mm/boehm-gc/include/private/darwin_semaphore.h
src/mm/boehm-gc/include/private/darwin_stop_world.h
src/mm/boehm-gc/include/private/dbg_mlc.h
src/mm/boehm-gc/include/private/gc_hdrs.h
src/mm/boehm-gc/include/private/gc_locks.h
src/mm/boehm-gc/include/private/gc_pmark.h
src/mm/boehm-gc/include/private/gc_priv.h
src/mm/boehm-gc/include/private/gcconfig.h
src/mm/boehm-gc/include/private/pthread_stop_world.h
src/mm/boehm-gc/include/private/pthread_support.h
src/mm/boehm-gc/include/private/thread_local_alloc.h
src/mm/boehm-gc/install-sh
src/mm/boehm-gc/libatomic_ops-1.2/AUTHORS [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/COPYING [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/ChangeLog [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/INSTALL [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/Makefile.am [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/Makefile.in [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/NEWS [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/README [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/aclocal.m4 [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/compile [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/config.guess [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/config.sub [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/configure [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/configure.ac [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/depcomp [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/doc/COPYING [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/doc/LICENSING.txt [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/doc/Makefile.am [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/doc/Makefile.in [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/doc/README.txt [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/doc/README_malloc.txt [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/doc/README_stack.txt [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/doc/README_win32.txt [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/install-sh [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/missing [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/mkinstalldirs [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/Makefile.am [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/Makefile.in [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/Makefile.msft [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops.c [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/Makefile.am [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/Makefile.in [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/generalize-small.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/generalize-small.template [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/generalize.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/Makefile.am [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/Makefile.in [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/README [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/acquire_release_volatile.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/aligned_atomic_load_store.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/all_acquire_release_volatile.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/all_atomic_load_store.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ao_t_is_int.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/armcc/arm_v6.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/atomic_load_store.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/char_acquire_release_volatile.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/char_atomic_load_store.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/emul_cas.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/alpha.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/arm.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/cris.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/hppa.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/ia64.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/m68k.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/mips.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/powerpc.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/s390.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/sparc.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86_64.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/generic_pthread.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/hpc/hppa.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/hpc/ia64.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ibmc/powerpc.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/icc/ia64.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/int_acquire_release_volatile.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/int_aligned_atomic_load_store.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/int_atomic_load_store.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/msftc/x86.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/msftc/x86_64.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ordered.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ordered_except_wr.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/read_ordered.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/short_acquire_release_volatile.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/short_aligned_atomic_load_store.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/short_atomic_load_store.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/standard_ao_double_t.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc/sparc.S [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc/sparc.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc/x86.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc/x86_64.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/test_and_set_t_is_ao_t.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/test_and_set_t_is_char.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_malloc.c [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_malloc.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_stack.c [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_stack.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_sysdeps.S [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/src/config.h.in [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/tests/Makefile.am [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/tests/Makefile.in [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/tests/list_atomic.c [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/tests/list_atomic.template [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/tests/run_parallel.inc [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/tests/test_atomic.c [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/tests/test_atomic.template [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/tests/test_atomic_include.h [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/tests/test_malloc.c [deleted file]
src/mm/boehm-gc/libatomic_ops-1.2/tests/test_stack.c [deleted file]
src/mm/boehm-gc/libatomic_ops/AUTHORS [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/COPYING [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/ChangeLog [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/INSTALL [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/Makefile.am [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/Makefile.in [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/NEWS [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/README [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/aclocal.m4 [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/compile [new file with mode: 0755]
src/mm/boehm-gc/libatomic_ops/config.guess [new file with mode: 0755]
src/mm/boehm-gc/libatomic_ops/config.sub [new file with mode: 0755]
src/mm/boehm-gc/libatomic_ops/configure [new file with mode: 0755]
src/mm/boehm-gc/libatomic_ops/configure.ac [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/depcomp [new file with mode: 0755]
src/mm/boehm-gc/libatomic_ops/doc/COPYING [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/doc/LICENSING.txt [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/doc/Makefile.am [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/doc/Makefile.in [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/doc/README.txt [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/doc/README_malloc.txt [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/doc/README_stack.txt [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/doc/README_win32.txt [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/install-sh [new file with mode: 0755]
src/mm/boehm-gc/libatomic_ops/missing [new file with mode: 0755]
src/mm/boehm-gc/libatomic_ops/mkinstalldirs [new file with mode: 0755]
src/mm/boehm-gc/libatomic_ops/src/Makefile.am [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/Makefile.in [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/Makefile.msft [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops.c [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops.h [new file with mode: 0755]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/Makefile.am [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/Makefile.in [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/generalize-small.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/generalize-small.template [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/generalize.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/Makefile.am [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/Makefile.in [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/README [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/acquire_release_volatile.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/aligned_atomic_load_store.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/all_acquire_release_volatile.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/all_atomic_load_store.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/ao_t_is_int.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/armcc/arm_v6.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/atomic_load_store.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/char_acquire_release_volatile.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/char_atomic_load_store.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/emul_cas.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/alpha.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/arm.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/cris.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/hppa.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/ia64.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/m68k.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/mips.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/powerpc.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/s390.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/sh.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/sparc.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86_64.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/generic_pthread.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/hpc/hppa.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/hpc/ia64.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/ibmc/powerpc.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/icc/ia64.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/int_acquire_release_volatile.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/int_aligned_atomic_load_store.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/int_atomic_load_store.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/msftc/arm.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/msftc/common32_defs.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/msftc/x86.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/msftc/x86_64.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/ordered.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/ordered_except_wr.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/read_ordered.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/short_acquire_release_volatile.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/short_aligned_atomic_load_store.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/short_atomic_load_store.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/standard_ao_double_t.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/sunc/sparc.S [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/sunc/sparc.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/sunc/x86.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/sunc/x86_64.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/test_and_set_t_is_ao_t.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/test_and_set_t_is_char.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops_malloc.c [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops_malloc.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops_stack.c [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops_stack.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/atomic_ops_sysdeps.S [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/src/config.h.in [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/tests/Makefile.am [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/tests/Makefile.in [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/tests/list_atomic.c [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/tests/list_atomic.template [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/tests/run_parallel.inc [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/tests/test_atomic.c [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/tests/test_atomic.template [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/tests/test_atomic_include.h [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/tests/test_malloc.c [new file with mode: 0644]
src/mm/boehm-gc/libatomic_ops/tests/test_stack.c [new file with mode: 0644]
src/mm/boehm-gc/libtool.m4 [deleted file]
src/mm/boehm-gc/ltmain.sh
src/mm/boehm-gc/m4/gc_set_version.m4 [new file with mode: 0644]
src/mm/boehm-gc/mach_dep.c
src/mm/boehm-gc/malloc.c
src/mm/boehm-gc/mallocx.c
src/mm/boehm-gc/mark.c
src/mm/boehm-gc/mark_rts.c
src/mm/boehm-gc/misc.c
src/mm/boehm-gc/missing
src/mm/boehm-gc/mkinstalldirs
src/mm/boehm-gc/msvc_dbg.c [deleted file]
src/mm/boehm-gc/new_hblk.c
src/mm/boehm-gc/obj_map.c
src/mm/boehm-gc/os_dep.c
src/mm/boehm-gc/pthread_stop_world.c
src/mm/boehm-gc/pthread_support.c
src/mm/boehm-gc/ptr_chck.c
src/mm/boehm-gc/real_malloc.c
src/mm/boehm-gc/reclaim.c
src/mm/boehm-gc/setjmp_t.c [deleted file]
src/mm/boehm-gc/sparc_mach_dep.S
src/mm/boehm-gc/stubborn.c
src/mm/boehm-gc/tests/huge_test.c
src/mm/boehm-gc/tests/test.c
src/mm/boehm-gc/tests/test_cpp.cc
src/mm/boehm-gc/tests/tests.am
src/mm/boehm-gc/thread_local_alloc.c
src/mm/boehm-gc/threadlibs.c [deleted file]
src/mm/boehm-gc/typd_mlc.c
src/mm/boehm-gc/win32_threads.c

diff --git a/src/mm/boehm-gc/AmigaOS.c b/src/mm/boehm-gc/AmigaOS.c
deleted file mode 100644 (file)
index d171503..0000000
+++ /dev/null
@@ -1,623 +0,0 @@
-
-
-/******************************************************************
-
-  AmigaOS-spesific routines for GC.
-  This file is normally included from os_dep.c
-
-******************************************************************/
-
-
-#if !defined(GC_AMIGA_DEF) && !defined(GC_AMIGA_SB) && !defined(GC_AMIGA_DS) && !defined(GC_AMIGA_AM)
-# include "gc_priv.h"
-# include <stdio.h>
-# include <signal.h>
-# define GC_AMIGA_DEF
-# define GC_AMIGA_SB
-# define GC_AMIGA_DS
-# define GC_AMIGA_AM
-#endif
-
-
-#ifdef GC_AMIGA_DEF
-
-# ifndef __GNUC__
-#   include <exec/exec.h>
-# endif
-# include <proto/exec.h>
-# include <proto/dos.h>
-# include <dos/dosextens.h>
-# include <workbench/startup.h>
-
-#endif
-
-
-
-
-#ifdef GC_AMIGA_SB
-
-/******************************************************************
-   Find the base of the stack.
-******************************************************************/
-
-ptr_t GC_get_main_stack_base()
-{
-    struct Process *proc = (struct Process*)SysBase->ThisTask;
-    /* Reference: Amiga Guru Book Pages: 42,567,574 */
-    if (proc->pr_Task.tc_Node.ln_Type==NT_PROCESS
-        && proc->pr_CLI != NULL) {
-       /* first ULONG is StackSize */
-       /*longPtr = proc->pr_ReturnAddr;
-       size = longPtr[0];*/
-
-       return (char *)proc->pr_ReturnAddr + sizeof(ULONG);
-    } else {
-       return (char *)proc->pr_Task.tc_SPUpper;
-    }
-}
-
-#if 0 /* old version */
-ptr_t GC_get_stack_base()
-{
-    extern struct WBStartup *_WBenchMsg;
-    extern long __base;
-    extern long __stack;
-    struct Task *task;
-    struct Process *proc;
-    struct CommandLineInterface *cli;
-    long size;
-
-    if ((task = FindTask(0)) == 0) {
-       GC_err_puts("Cannot find own task structure\n");
-       ABORT("task missing");
-    }
-    proc = (struct Process *)task;
-    cli = BADDR(proc->pr_CLI);
-
-    if (_WBenchMsg != 0 || cli == 0) {
-       size = (char *)task->tc_SPUpper - (char *)task->tc_SPLower;
-    } else {
-       size = cli->cli_DefaultStack * 4;
-    }
-    return (ptr_t)(__base + GC_max(size, __stack));
-}
-#endif
-
-
-#endif
-
-
-#ifdef GC_AMIGA_DS
-/******************************************************************
-   Register data segments.
-******************************************************************/
-
-   void GC_register_data_segments()
-   {
-     struct Process    *proc;
-     struct CommandLineInterface *cli;
-     BPTR myseglist;
-     ULONG *data;
-     int       num;
-
-
-#    ifdef __GNUC__
-        ULONG dataSegSize;
-        GC_bool found_segment = FALSE;
-       extern char __data_size[];
-
-       dataSegSize=__data_size+8;
-       /* Can`t find the Location of __data_size, because
-           it`s possible that is it, inside the segment. */
-
-#     endif
-
-       proc= (struct Process*)SysBase->ThisTask;
-
-       /* Reference: Amiga Guru Book Pages: 538ff,565,573
-                    and XOper.asm */
-       if (proc->pr_Task.tc_Node.ln_Type==NT_PROCESS) {
-         if (proc->pr_CLI == NULL) {
-           myseglist = proc->pr_SegList;
-         } else {
-           /* ProcLoaded       'Loaded as a command: '*/
-           cli = BADDR(proc->pr_CLI);
-           myseglist = cli->cli_Module;
-         }
-       } else {
-         ABORT("Not a Process.");
-       }
-
-       if (myseglist == NULL) {
-           ABORT("Arrrgh.. can't find segments, aborting");
-       }
-
-       /* xoper hunks Shell Process */
-
-       num=0;
-        for (data = (ULONG *)BADDR(myseglist); data != NULL;
-             data = (ULONG *)BADDR(data[0])) {
-         if (((ULONG) GC_register_data_segments < (ULONG) &data[1]) ||
-             ((ULONG) GC_register_data_segments > (ULONG) &data[1] + data[-1])) {
-#             ifdef __GNUC__
-               if (dataSegSize == data[-1]) {
-                 found_segment = TRUE;
-               }
-#            endif
-             GC_add_roots_inner((char *)&data[1],
-                                ((char *)&data[1]) + data[-1], FALSE);
-          }
-          ++num;
-        } /* for */
-#      ifdef __GNUC__
-          if (!found_segment) {
-            ABORT("Can`t find correct Segments.\nSolution: Use an newer version of ixemul.library");
-          }
-#      endif
-  }
-
-#if 0 /* old version */
-  void GC_register_data_segments()
-  {
-    extern struct WBStartup *_WBenchMsg;
-    struct Process     *proc;
-    struct CommandLineInterface *cli;
-    BPTR myseglist;
-    ULONG *data;
-
-    if ( _WBenchMsg != 0 ) {
-       if ((myseglist = _WBenchMsg->sm_Segment) == 0) {
-           GC_err_puts("No seglist from workbench\n");
-           return;
-       }
-    } else {
-       if ((proc = (struct Process *)FindTask(0)) == 0) {
-           GC_err_puts("Cannot find process structure\n");
-           return;
-       }
-       if ((cli = BADDR(proc->pr_CLI)) == 0) {
-           GC_err_puts("No CLI\n");
-           return;
-       }
-       if ((myseglist = cli->cli_Module) == 0) {
-           GC_err_puts("No seglist from CLI\n");
-           return;
-       }
-    }
-
-    for (data = (ULONG *)BADDR(myseglist); data != 0;
-         data = (ULONG *)BADDR(data[0])) {
-#        ifdef AMIGA_SKIP_SEG
-           if (((ULONG) GC_register_data_segments < (ULONG) &data[1]) ||
-           ((ULONG) GC_register_data_segments > (ULONG) &data[1] + data[-1])) {
-#       else
-          {
-#       endif /* AMIGA_SKIP_SEG */
-          GC_add_roots_inner((char *)&data[1],
-                            ((char *)&data[1]) + data[-1], FALSE);
-         }
-    }
-  }
-#endif /* old version */
-
-
-#endif
-
-
-
-#ifdef GC_AMIGA_AM
-
-#ifndef GC_AMIGA_FASTALLOC
-
-void *GC_amiga_allocwrapper(size_t size,void *(*AllocFunction)(size_t size2)){
-       return (*AllocFunction)(size);
-}
-
-void *(*GC_amiga_allocwrapper_do)(size_t size,void *(*AllocFunction)(size_t size2))
-       =GC_amiga_allocwrapper;
-
-#else
-
-
-
-
-void *GC_amiga_allocwrapper_firsttime(size_t size,void *(*AllocFunction)(size_t size2));
-
-void *(*GC_amiga_allocwrapper_do)(size_t size,void *(*AllocFunction)(size_t size2))
-       =GC_amiga_allocwrapper_firsttime;
-
-
-/******************************************************************
-   Amiga-spesific routines to obtain memory, and force GC to give
-   back fast-mem whenever possible.
-       These hacks makes gc-programs go many times faster when
-   the amiga is low on memory, and are therefore strictly necesarry.
-
-   -Kjetil S. Matheussen, 2000.
-******************************************************************/
-
-
-
-/* List-header for all allocated memory. */
-
-struct GC_Amiga_AllocedMemoryHeader{
-       ULONG size;
-       struct GC_Amiga_AllocedMemoryHeader *next;
-};
-struct GC_Amiga_AllocedMemoryHeader *GC_AMIGAMEM=(struct GC_Amiga_AllocedMemoryHeader *)(int)~(NULL);
-
-
-
-/* Type of memory. Once in the execution of a program, this might change to MEMF_ANY|MEMF_CLEAR */
-
-ULONG GC_AMIGA_MEMF = MEMF_FAST | MEMF_CLEAR;
-
-
-/* Prevents GC_amiga_get_mem from allocating memory if this one is TRUE. */
-#ifndef GC_AMIGA_ONLYFAST
-BOOL GC_amiga_dontalloc=FALSE;
-#endif
-
-#ifdef GC_AMIGA_PRINTSTATS
-int succ=0,succ2=0;
-int nsucc=0,nsucc2=0;
-int nullretries=0;
-int numcollects=0;
-int chipa=0;
-int allochip=0;
-int allocfast=0;
-int cur0=0;
-int cur1=0;
-int cur10=0;
-int cur50=0;
-int cur150=0;
-int cur151=0;
-int ncur0=0;
-int ncur1=0;
-int ncur10=0;
-int ncur50=0;
-int ncur150=0;
-int ncur151=0;
-#endif
-
-/* Free everything at program-end. */
-
-void GC_amiga_free_all_mem(void){
-       struct GC_Amiga_AllocedMemoryHeader *gc_am=(struct GC_Amiga_AllocedMemoryHeader *)(~(int)(GC_AMIGAMEM));
-       struct GC_Amiga_AllocedMemoryHeader *temp;
-
-#ifdef GC_AMIGA_PRINTSTATS
-       printf("\n\n"
-               "%d bytes of chip-mem, and %d bytes of fast-mem where allocated from the OS.\n",
-               allochip,allocfast
-       );
-       printf(
-               "%d bytes of chip-mem were returned from the GC_AMIGA_FASTALLOC supported allocating functions.\n",
-               chipa
-       );
-       printf("\n");
-       printf("GC_gcollect was called %d times to avoid returning NULL or start allocating with the MEMF_ANY flag.\n",numcollects);
-       printf("%d of them was a success. (the others had to use allocation from the OS.)\n",nullretries);
-       printf("\n");
-       printf("Succeded forcing %d gc-allocations (%d bytes) of chip-mem to be fast-mem.\n",succ,succ2);
-       printf("Failed forcing %d gc-allocations (%d bytes) of chip-mem to be fast-mem.\n",nsucc,nsucc2);
-       printf("\n");
-       printf(
-               "Number of retries before succeding a chip->fast force:\n"
-               "0: %d, 1: %d, 2-9: %d, 10-49: %d, 50-149: %d, >150: %d\n",
-               cur0,cur1,cur10,cur50,cur150,cur151
-       );
-       printf(
-               "Number of retries before giving up a chip->fast force:\n"
-               "0: %d, 1: %d, 2-9: %d, 10-49: %d, 50-149: %d, >150: %d\n",
-               ncur0,ncur1,ncur10,ncur50,ncur150,ncur151
-       );
-#endif
-
-       while(gc_am!=NULL){
-               temp=gc_am->next;
-               FreeMem(gc_am,gc_am->size);
-               gc_am=(struct GC_Amiga_AllocedMemoryHeader *)(~(int)(temp));
-       }
-}
-
-#ifndef GC_AMIGA_ONLYFAST
-
-/* All memory with address lower than this one is chip-mem. */
-
-char *chipmax;
-
-
-/*
- * Allways set to the last size of memory tried to be allocated.
- * Needed to ensure allocation when the size is bigger than 100000.
- *
- */
-size_t latestsize;
-
-#endif
-
-
-/*
- * The actual function that is called with the GET_MEM macro.
- *
- */
-
-void *GC_amiga_get_mem(size_t size){
-       struct GC_Amiga_AllocedMemoryHeader *gc_am;
-
-#ifndef GC_AMIGA_ONLYFAST
-       if(GC_amiga_dontalloc==TRUE){
-//             printf("rejected, size: %d, latestsize: %d\n",size,latestsize);
-               return NULL;
-       }
-
-       // We really don't want to use chip-mem, but if we must, then as little as possible.
-       if(GC_AMIGA_MEMF==(MEMF_ANY|MEMF_CLEAR) && size>100000 && latestsize<50000) return NULL;
-#endif
-
-       gc_am=AllocMem((ULONG)(size + sizeof(struct GC_Amiga_AllocedMemoryHeader)),GC_AMIGA_MEMF);
-       if(gc_am==NULL) return NULL;
-
-       gc_am->next=GC_AMIGAMEM;
-       gc_am->size=size + sizeof(struct GC_Amiga_AllocedMemoryHeader);
-       GC_AMIGAMEM=(struct GC_Amiga_AllocedMemoryHeader *)(~(int)(gc_am));
-
-//     printf("Allocated %d (%d) bytes at address: %x. Latest: %d\n",size,tot,gc_am,latestsize);
-
-#ifdef GC_AMIGA_PRINTSTATS
-       if((char *)gc_am<chipmax){
-               allochip+=size;
-       }else{
-               allocfast+=size;
-       }
-#endif
-
-       return gc_am+1;
-
-}
-
-
-
-
-#ifndef GC_AMIGA_ONLYFAST
-
-/* Tries very hard to force GC to find fast-mem to return. Done recursively
- * to hold the rejected memory-pointers reachable from the collector in an
- * easy way.
- *
- */
-#ifdef GC_AMIGA_RETRY
-void *GC_amiga_rec_alloc(size_t size,void *(*AllocFunction)(size_t size2),const int rec){
-       void *ret;
-
-       ret=(*AllocFunction)(size);
-
-#ifdef GC_AMIGA_PRINTSTATS
-       if((char *)ret>chipmax || ret==NULL){
-               if(ret==NULL){
-                       nsucc++;
-                       nsucc2+=size;
-                       if(rec==0) ncur0++;
-                       if(rec==1) ncur1++;
-                       if(rec>1 && rec<10) ncur10++;
-                       if(rec>=10 && rec<50) ncur50++;
-                       if(rec>=50 && rec<150) ncur150++;
-                       if(rec>=150) ncur151++;
-               }else{
-                       succ++;
-                       succ2+=size;
-                       if(rec==0) cur0++;
-                       if(rec==1) cur1++;
-                       if(rec>1 && rec<10) cur10++;
-                       if(rec>=10 && rec<50) cur50++;
-                       if(rec>=50 && rec<150) cur150++;
-                       if(rec>=150) cur151++;
-               }
-       }
-#endif
-
-       if (((char *)ret)<=chipmax && ret!=NULL && (rec<(size>500000?9:size/5000))){
-               ret=GC_amiga_rec_alloc(size,AllocFunction,rec+1);
-//             GC_free(ret2);
-       }
-
-       return ret;
-}
-#endif
-
-
-/* The allocating-functions defined inside the amiga-blocks in gc.h is called
- * via these functions.
- */
-
-
-void *GC_amiga_allocwrapper_any(size_t size,void *(*AllocFunction)(size_t size2)){
-       void *ret,*ret2;
-
-       GC_amiga_dontalloc=TRUE;        // Pretty tough thing to do, but its indeed necesarry.
-       latestsize=size;
-
-       ret=(*AllocFunction)(size);
-
-       if(((char *)ret) <= chipmax){
-               if(ret==NULL){
-                       //Give GC access to allocate memory.
-#ifdef GC_AMIGA_GC
-                       if(!GC_dont_gc){
-                               GC_gcollect();
-#ifdef GC_AMIGA_PRINTSTATS
-                               numcollects++;
-#endif
-                               ret=(*AllocFunction)(size);
-                       }
-#endif
-                       if(ret==NULL){
-                               GC_amiga_dontalloc=FALSE;
-                               ret=(*AllocFunction)(size);
-                               if(ret==NULL){
-                                       WARN("Out of Memory!  Returning NIL!\n", 0);
-                               }
-                       }
-#ifdef GC_AMIGA_PRINTSTATS
-                       else{
-                               nullretries++;
-                       }
-                       if(ret!=NULL && (char *)ret<=chipmax) chipa+=size;
-#endif
-               }
-#ifdef GC_AMIGA_RETRY
-               else{
-                       /* We got chip-mem. Better try again and again and again etc., we might get fast-mem sooner or later... */
-                       /* Using gctest to check the effectiviness of doing this, does seldom give a very good result. */
-                       /* However, real programs doesn't normally rapidly allocate and deallocate. */
-//                     printf("trying to force... %d bytes... ",size);
-                       if(
-                               AllocFunction!=GC_malloc_uncollectable
-#ifdef ATOMIC_UNCOLLECTABLE
-                               && AllocFunction!=GC_malloc_atomic_uncollectable
-#endif
-                       ){
-                               ret2=GC_amiga_rec_alloc(size,AllocFunction,0);
-                       }else{
-                               ret2=(*AllocFunction)(size);
-#ifdef GC_AMIGA_PRINTSTATS
-                               if((char *)ret2<chipmax || ret2==NULL){
-                                       nsucc++;
-                                       nsucc2+=size;
-                                       ncur0++;
-                               }else{
-                                       succ++;
-                                       succ2+=size;
-                                       cur0++;
-                               }
-#endif
-                       }
-                       if(((char *)ret2)>chipmax){
-//                             printf("Succeeded.\n");
-                               GC_free(ret);
-                               ret=ret2;
-                       }else{
-                               GC_free(ret2);
-//                             printf("But did not succeed.\n");
-                       }
-               }
-#endif
-       }
-
-       GC_amiga_dontalloc=FALSE;
-
-       return ret;
-}
-
-
-
-void (*GC_amiga_toany)(void)=NULL;
-
-void GC_amiga_set_toany(void (*func)(void)){
-       GC_amiga_toany=func;
-}
-
-#endif // !GC_AMIGA_ONLYFAST
-
-
-void *GC_amiga_allocwrapper_fast(size_t size,void *(*AllocFunction)(size_t size2)){
-       void *ret;
-
-       ret=(*AllocFunction)(size);
-
-       if(ret==NULL){
-               // Enable chip-mem allocation.
-//             printf("ret==NULL\n");
-#ifdef GC_AMIGA_GC
-               if(!GC_dont_gc){
-                       GC_gcollect();
-#ifdef GC_AMIGA_PRINTSTATS
-                       numcollects++;
-#endif
-                       ret=(*AllocFunction)(size);
-               }
-#endif
-               if(ret==NULL){
-#ifndef GC_AMIGA_ONLYFAST
-                       GC_AMIGA_MEMF=MEMF_ANY | MEMF_CLEAR;
-                       if(GC_amiga_toany!=NULL) (*GC_amiga_toany)();
-                       GC_amiga_allocwrapper_do=GC_amiga_allocwrapper_any;
-                       return GC_amiga_allocwrapper_any(size,AllocFunction);
-#endif
-               }
-#ifdef GC_AMIGA_PRINTSTATS
-               else{
-                       nullretries++;
-               }
-#endif
-       }
-
-       return ret;
-}
-
-void *GC_amiga_allocwrapper_firsttime(size_t size,void *(*AllocFunction)(size_t size2)){
-       atexit(&GC_amiga_free_all_mem);
-       chipmax=(char *)SysBase->MaxLocMem;             // For people still having SysBase in chip-mem, this might speed up a bit.
-       GC_amiga_allocwrapper_do=GC_amiga_allocwrapper_fast;
-       return GC_amiga_allocwrapper_fast(size,AllocFunction);
-}
-
-
-#endif //GC_AMIGA_FASTALLOC
-
-
-
-/*
- * The wrapped realloc function.
- *
- */
-void *GC_amiga_realloc(void *old_object,size_t new_size_in_bytes){
-#ifndef GC_AMIGA_FASTALLOC
-       return GC_realloc(old_object,new_size_in_bytes);
-#else
-       void *ret;
-       latestsize=new_size_in_bytes;
-       ret=GC_realloc(old_object,new_size_in_bytes);
-       if(ret==NULL && GC_AMIGA_MEMF==(MEMF_FAST | MEMF_CLEAR)){
-               /* Out of fast-mem. */
-#ifdef GC_AMIGA_GC
-               if(!GC_dont_gc){
-                       GC_gcollect();
-#ifdef GC_AMIGA_PRINTSTATS
-                       numcollects++;
-#endif
-                       ret=GC_realloc(old_object,new_size_in_bytes);
-               }
-#endif
-               if(ret==NULL){
-#ifndef GC_AMIGA_ONLYFAST
-                       GC_AMIGA_MEMF=MEMF_ANY | MEMF_CLEAR;
-                       if(GC_amiga_toany!=NULL) (*GC_amiga_toany)();
-                       GC_amiga_allocwrapper_do=GC_amiga_allocwrapper_any;
-                       ret=GC_realloc(old_object,new_size_in_bytes);
-#endif
-               }
-#ifdef GC_AMIGA_PRINTSTATS
-               else{
-                       nullretries++;
-               }
-#endif
-       }
-       if(ret==NULL){
-               WARN("Out of Memory!  Returning NIL!\n", 0);
-       }
-#ifdef GC_AMIGA_PRINTSTATS
-       if(((char *)ret)<chipmax && ret!=NULL){
-               chipa+=new_size_in_bytes;
-       }
-#endif
-       return ret;
-#endif
-}
-
-#endif //GC_AMIGA_AM
-
-
index 091408d75cb5361e2b412028e6c1911c7d1cbb51..faf6817b91361f5f55f62c3731d7ada13e40325b 100644 (file)
+[7.2alpha4]
+
+2009-12-01  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/gc_version.h, configure.ac, doc/README: Change to
+       version 7.2alpha4.
+       * configure: Regenerate.
+
+2009-11-21  Ivan Maidanski <ivmai@mail.ru>
+
+       * configure.ac (AC_CONFIG_COMMANDS): Quote srcdir value.
+       * configure: Regenerate.
+
+2009-11-18  Ivan Maidanski <ivmai@mail.ru> (really mostly Zoltan Varga)
+
+       * include/gc.h (GC_get_suspend_signal): New function declaration.
+       * misc.c (GC_get_suspend_signal): New API function (only if
+       THREADS).
+
+2009-11-16  Ivan Maidanski <ivmai@mail.ru>
+
+       * alloc.c (min_bytes_allocd): Multiply GC_free_space_divisor by
+       two if GC_incremental (instead of TRUE_INCREMENTAL).
+
+2009-11-10  Ivan Maidanski <ivmai@mail.ru>
+
+       * sparc_mach_dep.S (GC_push_regs): Remove the reference.
+
+2009-11-09  Ivan Maidanski <ivmai@mail.ru>
+
+       * os_dep.c (SIZE_T, PULONG_PTR): Remove.
+       * os_dep.c (ULONG_PTR): Replace with GC_ULONG_PTR (defined as GC
+       "word"); add the comment.
+       * os_dep.c (GetWriteWatch_type, detect_GetWriteWatch,
+       GC_gww_read_dirty): Prefix ULONG_PTR with "GC_".
+
+2009-11-07  Ivan Maidanski <ivmai@mail.ru>
+
+       * win32_threads.c (THREAD_TABLE_SZ): Change back to a power-of-two
+       const value (for speed).
+       * win32_threads.c (THREAD_TABLE_INDEX): New macro.
+       * win32_threads.c (GC_new_thread, GC_lookup_thread_inner,
+       GC_delete_gc_thread, GC_delete_thread, GC_lookup_pthread): Use
+       THREAD_TABLE_INDEX instead of THREAD_TABLE_SZ.
+       * win32_threads.c (PTHREAD_MAP_HASH): Rename to PTHREAD_MAP_INDEX.
+
+2009-11-07  Ivan Maidanski <ivmai@mail.ru>
+
+       * win32_threads.c (THREAD_TABLE_SZ): Make the const value prime.
+
+2009-11-06  Ivan Maidanski <ivmai@mail.ru>
+
+       * backgraph.c: Remove apostrophe char from "#error".
+
+2009-11-06  Ivan Maidanski <ivmai@mail.ru>
+
+       * doc/README.macros (GC_DISABLE_INCREMENTAL): Document.
+       * include/private/gcconfig.h (GC_DISABLE_INCREMENTAL): Recognize
+       new macro; implicitly define it if SMALL_CONFIG.
+       * alloc.c (GC_incremental, GC_timeout_stop_func): Check for
+       GC_DISABLE_INCREMENTAL instead of SMALL_CONFIG.
+       * include/private/gc_priv.h (GC_incremental, TRUE_INCREMENTAL,
+       GC_push_conditional): Ditto.
+       * mark.c (GC_push_next_marked_dirty, GC_push_selected,
+       GC_push_conditional, GC_block_was_dirty): Ditto.
+       * misc.c (GC_enable_incremental): Ditto.
+       * misc.c (GC_init): Ditto (for "GC_PAUSE_TIME_TARGET" and
+       "GC_ENABLE_INCREMENTAL" environment variables).
+       * misc.c (GC_enable_incremental): Reformat the code.
+
+2009-11-06  Ivan Maidanski <ivmai@mail.ru>
+
+       * dyn_load.c (WIN32_LEAN_AND_MEAN): Guard with ifndef.
+       * misc.c (WIN32_LEAN_AND_MEAN): Ditto.
+       * os_dep.c (WIN32_LEAN_AND_MEAN): Ditto.
+       * allchblk.c (GC_allochblk_nth): Fix a minor typo (don't/doesn't)
+       in a comment.
+       * backgraph.c: Ditto.
+       * dyn_load.c (GC_register_dynamic_libraries): Ditto.
+       * extra/threadlibs.c (main): Ditto.
+       * pthread_support.c (pthread_join): Ditto.
+       * tests/test.c (main): Ditto.
+
+2009-11-06  Ivan Maidanski <ivmai@mail.ru>
+
+       * mach_dep.c (GC_push_regs): Remove STATIC (just to catch
+       a duplicate symbol definition linker error).
+       * misc.c (GC_clear_stack_inner): Ditto.
+       * sparc_mach_dep.S (GC_push_regs): Comment out the reference.
+       * sparc_mach_dep.S: Remove trailing spaces at EOLn; remove
+       multiple trailing blank lines.
+
+2009-11-06  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/private/gc_priv.h (GC_write_disabled): New variable
+       declaration (only if GC_ASSERTIONS and Win32 threads).
+       * misc.c (GC_write): Add assertion for GC_write_disabled value is
+       not on (only if THREADS).
+       * win32_threads.c (GC_write_disabled): New variable (only if
+       GC_ASSERTIONS and not Cygwin).
+       * win32_threads.c (GC_stop_world): Set and clear GC_write_disabled
+       (while holding GC_write_cs).
+
+2009-11-05  Ivan Maidanski <ivmai@mail.ru>
+
+       * win32_threads.c (GC_please_stop): If DllMain-based thread
+       registration is not compiled in then define GC_please_stop as
+       a non-volatile variable for assertion only.
+       * win32_threads.c (GC_stop_world): Set and clear only if defined.
+       * win32_threads.c (GC_stop_world): Add the comment for GC_printf()
+       usage (while holding GC_write_cs).
+       * win32_threads.c (GC_delete_gc_thread): Ditto.
+       * os_dep.c (GC_remove_protection): Ditto.
+
+2009-11-05  Ivan Maidanski <ivmai@mail.ru>
+
+       * pthread_support.c (GC_inner_start_routine): Join 3 sequential
+       GC_printf() calls into a single one (for DEBUG_THREADS).
+
+2009-11-05  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/private/gc_priv.h (GC_total_stacksize): New variable
+       declaration (only if THREADS).
+       * alloc.c (GC_total_stacksize): New variable (only if THREADS).
+       * alloc.c (min_bytes_allocd): Calculate stack_size using
+       GC_stackbottom only in the single-threaded case; otherwise use
+       GC_total_stacksize; print GC_total_stacksize value if
+       DEBUG_THREADS.
+       * darwin_stop_world.c (GC_push_all_stacks): Use "%p" printf type
+       specifier for lo/hi values (instead of "%lx").
+       * darwin_stop_world.c (GC_push_all_stacks): Use
+       GC_push_all_stack_frames() instead of GC_push_all_stack().
+       * darwin_stop_world.c (GC_push_all_stacks): Recalculate
+       GC_total_stacksize value.
+       * pthread_stop_world.c (GC_push_all_stacks): Ditto.
+       * win32_threads.c (GC_push_all_stacks): Ditto.
+       * win32_threads.c (GC_push_stack_for): Pass "me" argument; return
+       stack size; don't check for non-zero value of thread->stack_base.
+       * win32_threads.c (GC_push_all_stacks): Don't call
+       GC_push_stack_for() and don't check for "t->id == me" if
+       thread->stack_base is zero.
+
+2009-11-05  Ivan Maidanski <ivmai@mail.ru>
+
+       * dyn_load.c (GC_dump_meminfo): Prefix "%lx" printf type specifier
+       with "0x".
+       * os_dep.c (PROTECT): Ditto.
+       * win32_threads.c (GC_mark_thread_local_free_lists): Cast p->id to
+       int (to match printf type specifier).
+
+2009-11-05  Ivan Maidanski <ivmai@mail.ru>
+
+       * tests/test.c (check_heap_stats): Take into account the unmapped
+       memory size when checking for "Unexpected heap growth"; remove
+       FIXME.
+
+2009-11-03  Hans Boehm <Hans.Boehm@hp.com>
+
+       * alloc.c: Revert last change.
+
+2009-11-02  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/private/gcconfig.h (STACKBOTTOM): Add a presence check
+       for eCos/NOSYS.
+       * misc.c (GC_write): Comment out _Jv_diag_write() call (since no
+       longer defined in GCJ).
+
+2009-11-02  Ivan Maidanski <ivmai@mail.ru>
+
+       * os_dep.c (brk): Rename to ecos_gc_brk.
+
+2009-11-01  Ivan Maidanski <ivmai@mail.ru>
+
+       * alloc.c (min_bytes_allocd): Use GC_stackbottom value to compute
+       stack_size even if THREADS.
+       * doc/README.macros (DEBUG_THREADS): Document.
+       * pthread_support.c (DEBUG_THREADS): Remove the commented out
+       definition.
+       * win32_threads.c (DEBUG_WIN32_THREADS): Remove duplicate
+       definition.
+       * win32_threads.c: Include errno.h (except for WinCE).
+       * win32_threads.c (GC_win32_start_inner): Copy "start" and "param"
+       to local variables, and free "arg" parameter before "start"
+       invocation.
+       * win32_threads.c (GC_beginthreadex): Set errno to EAGAIN on error
+       (instead of calling SetLastError(ERROR_NOT_ENOUGH_MEMORY)).
+       * win32_threads.c (GC_beginthreadex): Return 0 on error (instead
+       of -1).
+
+2009-10-23  Ivan Maidanski <ivmai@mail.ru>
+
+       * darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
+       Use GC_INNER for the function definition.
+       * include/private/darwin_stop_world.h
+       (GC_darwin_register_mach_handler_thread): Remove the prototype.
+       * include/private/darwin_stop_world.h: Add copyright header.
+       * os_dep.c (GC_darwin_register_mach_handler_thread): Use GC_INNER
+       for the function prototype.
+       * include/private/gc_priv.h (NDEBUG): Explicitly define if
+       NO_DEBUGGING and not GC_ASSERTIONS (before the standard headers
+       inclusion).
+
+2009-10-22  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/private/gcconfig.h: Move DebugBreak() workaround (for
+       x86mingw32ce toolchain) to gc_priv.h (after windows.h inclusion).
+
+2009-10-22  Ivan Maidanski <ivmai@mail.ru>
+
+       * allchblk.c (GC_unmap_old, GC_merge_unmapped, GC_allochblk,
+       GC_freehblk): Use GC_INNER for the function definition.
+       * alloc.c (GC_never_stop_func, GC_should_collect,
+       GC_try_to_collect_inner, GC_collect_a_little_inner,
+       GC_set_fl_marks, GC_add_to_our_memory, GC_add_to_heap,
+       GC_expand_hp_inner, GC_collect_or_expand, GC_allocobj): Ditto.
+       * backgraph.c (GC_build_back_graph, GC_traverse_back_graph):
+       Ditto.
+       * blacklst.c (GC_default_print_heap_obj_proc, GC_bl_init,
+       GC_promote_black_lists, GC_unpromote_black_lists,
+       GC_add_to_black_list_normal, GC_add_to_black_list_stack,
+       GC_is_black_listed): Ditto.
+       * darwin_stop_world.c (GC_push_all_stacks, GC_push_all_stacks,
+       GC_stop_init, GC_stop_world, GC_start_world): Ditto.
+       * dbg_mlc.c (GC_has_other_debug_info, GC_store_back_pointer,
+       GC_marked_for_finalization, GC_generate_random_backtrace_no_gc,
+       GC_store_debug_info, GC_start_debugging,
+       GC_debug_generic_malloc_inner,
+       GC_debug_generic_malloc_inner_ignore_off_page,
+       GC_debug_malloc_uncollectable, GC_debug_free_inner): Ditto.
+       * dyn_load.c (GC_register_dynamic_libraries,
+       GC_register_main_static_data, GC_init_dyld): Ditto.
+       * finalize.c (GC_push_finalizer_structures, GC_finalize,
+       GC_notify_or_invoke_finalizers, GC_print_finalization_stats):
+       Ditto.
+       * gcj_mlc.c (GC_core_gcj_malloc): Ditto.
+       * headers.c (GC_find_header, GC_header_cache_miss,
+       GC_scratch_alloc, GC_init_headers, GC_install_header,
+       GC_install_counts, GC_remove_header, GC_remove_counts,
+       GC_next_used_block, GC_prev_block): Ditto.
+       * mach_dep.c (GC_with_callee_saves_pushed): Ditto.
+       * malloc.c (GC_collect_or_expand, GC_alloc_large,
+       GC_generic_malloc_inner, GC_generic_malloc_inner_ignore_off_page,
+       GC_core_malloc_atomic, GC_core_malloc, GC_free_inner): Ditto.
+       * mallocx.c (GC_generic_malloc_ignore_off_page): Ditto.
+       * mark.c (GC_collection_in_progress, GC_clear_hdr_marks,
+       GC_set_hdr_marks, GC_set_mark_bit, GC_clear_mark_bit,
+       GC_clear_marks, GC_initiate_gc, GC_mark_some,
+       GC_mark_stack_empty, GC_invalidate_mark_state,
+       GC_signal_mark_stack_overflow, GC_mark_from, GC_help_marker,
+       GC_mark_init, GC_push_all, GC_push_conditional,
+       GC_mark_and_push_stack, GC_push_all_eager, GC_push_all_stack):
+       Ditto.
+       * mark_rts.c (GC_is_static_root, GC_roots_present, GC_approx_sp,
+       GC_exclude_static_roots_inner, GC_push_all_register_frames,
+       GC_push_all_stack_frames, GC_cond_register_dynamic_libraries,
+       GC_push_roots): Ditto.
+       * misc.c (GC_extend_size_map, GC_clear_stack, GC_err_write):
+       Ditto.
+       * new_hblk.c (GC_build_fl, GC_new_hblk): Ditto.
+       * obj_map.c (GC_register_displacement_inner, GC_add_map_entry,
+       GC_initialize_offsets): Ditto.
+       * os_dep.c (GC_get_maps, GC_parse_map_entry, GC_text_mapping,
+       GC_init_linux_data_start, GC_init_netbsd_elf, GC_setpagesize,
+       GC_set_and_save_fault_handler, GC_setup_temporary_fault_handler,
+       GC_reset_fault_handler, GC_get_register_stack_base, GC_init_win32,
+       GC_add_current_malloc_heap, GC_is_heap_base, GC_unmap, GC_remap,
+       GC_unmap_gap, GC_push_all_stacks, GC_gww_dirty_init,
+       GC_dirty_init, GC_read_dirty, GC_page_was_dirty,
+       GC_page_was_ever_dirty, GC_remove_protection,
+       GC_write_fault_handler, GC_mprotect_stop, GC_mprotect_resume,
+       GC_save_callers, GC_print_callers): Ditto.
+       * pthread_stop_world.c (GC_push_all_stacks, GC_stop_world,
+       GC_start_world, GC_stop_init): Ditto.
+       * pthread_support.c (GC_mark_thread_local_free_lists,
+       GC_lookup_thread, GC_reset_finalizer_nested,
+       GC_check_finalizer_nested, GC_segment_is_thread_stack,
+       GC_greatest_stack_base_below, GC_thr_init, GC_init_parallel,
+       GC_do_blocking_inner, GC_lock, GC_acquire_mark_lock,
+       GC_release_mark_lock, GC_wait_for_reclaim, GC_notify_all_builder,
+       GC_wait_marker, GC_notify_all_marker): Ditto.
+       * reclaim.c (GC_print_all_errors, GC_block_empty,
+       GC_reclaim_generic, GC_start_reclaim, GC_continue_reclaim,
+       GC_reclaim_all): Ditto.
+       * thread_local_alloc.c (GC_init_thread_local,
+       GC_destroy_thread_local, GC_mark_thread_local_fls_for): Ditto.
+       * win32_threads.c (GC_reset_finalizer_nested,
+       GC_check_finalizer_nested, GC_do_blocking_inner, GC_stop_world,
+       GC_start_world, GC_push_all_stacks, GC_get_next_stack,
+       GC_acquire_mark_lock, GC_release_mark_lock, GC_wait_for_reclaim,
+       GC_notify_all_builder, GC_wait_marker, GC_notify_all_marker,
+       GC_thr_init, GC_init_parallel, GC_lock,
+       GC_mark_thread_local_free_lists): Ditto.
+       * alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
+       GC_traverse_back_graph): Use GC_INNER for the function prototype.
+       * darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
+       Ditto.
+       * dbg_mlc.c (GC_default_print_heap_obj_proc): Ditto.
+       * dyn_load.c (GC_parse_map_entry, GC_get_maps,
+       GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
+       GC_get_next_stack): Ditto.
+       * finalize.c (GC_reset_finalizer_nested,
+       GC_check_finalizer_nested): Ditto.
+       * gcj_mlc.c (GC_start_debugging): Ditto.
+       * include/private/dbg_mlc.h (GC_save_callers, GC_print_callers,
+       GC_has_other_debug_info, GC_store_debug_info): Ditto.
+       * include/private/gc_hdrs.h (GC_header_cache_miss): Ditto.
+       * include/private/gc_locks.h (GC_lock): Ditto.
+       * include/private/gc_pmark.h (GC_signal_mark_stack_overflow,
+       GC_mark_from): Ditto.
+       * include/private/pthread_support.h (GC_lookup_thread,
+       GC_stop_init): Ditto.
+       * include/private/thread_local_alloc.h (GC_init_thread_local,
+       GC_destroy_thread_local, GC_mark_thread_local_fls_for): Ditto.
+       * malloc.c (GC_extend_size_map, GC_text_mapping): Ditto.
+       * mark.c (GC_page_was_ever_dirty): Ditto.
+       * mark_rts.c (GC_mark_thread_local_free_lists): Ditto.
+       * misc.c (GC_register_main_static_data, GC_init_win32,
+       GC_setpagesize, GC_init_linux_data_start,
+       GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
+       GC_do_blocking_inner): Ditto.
+       * os_dep.c (GC_greatest_stack_base_below): Ditto.
+       * win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init):
+       Ditto.
+       * include/private/gc_priv.h: Ditto (for most prototypes).
+       * include/private/gc_priv.h (GC_INNER): Update the comment.
+       * doc/README.macros (GC_DLL): Update.
+
+2009-10-22  Ivan Maidanski <ivmai@mail.ru>
+
+       * alloc.c (GC_collection_in_progress): Move the prototype to
+       gc_priv.h.
+       * gc_dlopen.c (GC_collection_in_progress): Ditto.
+       * pthread_support.c (GC_collection_in_progress): Ditto.
+       * misc.c (GC_init_parallel): Ditto.
+       * pthread_support.c (GC_init_parallel): Ditto.
+       * win32_threads.c (GC_init_parallel): Ditto.
+       * darwin_stop_world.c (GC_thr_init): Ditto.
+       * misc.c (GC_thr_init): Ditto.
+       * pthread_stop_world.c (GC_thr_init): Ditto.
+       * pthread_support.c (GC_thr_init): Ditto.
+       * blacklst.c (GC_clear_bl, GC_copy_bl,
+       GC_number_stack_black_listed): Make STATIC.
+       * dbg_mlc.c (GC_print_obj, GC_make_closure,
+       GC_debug_invoke_finalizer): Ditto.
+       * malloc.c (GC_alloc_large_and_clear): Ditto.
+       * mark.c (GC_push_selected, GC_push_marked1, GC_push_marked2,
+       GC_push_marked4, GC_push_marked, GC_push_next_marked,
+       GC_push_next_marked_dirty, GC_push_next_marked_uncollectable):
+       Ditto.
+       * misc.c (GC_clear_stack_inner): Ditto.
+       * os_dep.c (GC_repeat_read, GC_default_push_other_roots): Ditto.
+       * darwin_stop_world.c (FindTopOfStack): Make static; define only
+       if not DARWIN_DONT_PARSE_STACK.
+       * dbg_mlc.c (GC_debug_free_inner): Define only if DBG_HDRS_ALL.
+       * dyn_load.c (GC_repeat_read): Remove unused prototype.
+       * include/private/gc_pmark.h (GC_find_start): Ditto.
+       * misc.c (GC_read, GC_register_finalizer_no_order): Ditto.
+       * dyn_load.c (GC_segment_is_thread_stack): Add prototype (only if
+       THREADS).
+       * dyn_load.c (GC_register_main_static_data): Define only if
+       DYNAMIC_LOADING.
+       * finalize.c (GC_enqueue_all_finalizers): Remove unnecessary tail
+       "return" statement.
+       * gc_dlopen.c (GC_SOLARIS_THREADS): Don't recognize (since implies
+       GC_PTHREADS).
+       * include/gc.h: Fix a typo.
+       * include/gc_inline.h (GC_ASSERT): Define (if not defined) since
+       the header is public.
+       * include/gc_inline.h (GC_generic_malloc_many): New public
+       function declaration.
+       * mallocx.c (GC_generic_malloc_many): Make public.
+       * include/private/gc_priv.h (GC_INNER): Use visibility attribute
+       (if available).
+       * include/private/gc_priv.h (GC_EXTERN): Define using GC_INNER.
+       * include/private/gc_priv.h: Include atomic_ops.h if THREADS and
+       MPROTECT_VDB.
+       * os_dep.c: Don't include atomic_ops.h
+       * win32_threads.c: Ditto.
+       * include/private/gc_priv.h (GC_push_selected, GC_push_regs,
+       GC_push_marked, GC_number_stack_black_listed,
+       GC_alloc_large_and_clear, GC_reclaim_or_delete_all,
+       GC_generic_malloc_many, GC_make_closure,
+       GC_debug_invoke_finalizer, GC_print_obj, GC_page_was_ever_dirty):
+       Remove the prototype.
+       * mark.c (GC_page_was_ever_dirty): Add prototype (only if
+       PROC_VDB).
+       * include/private/gc_priv.h (GC_push_next_marked_dirty,
+       GC_push_next_marked, GC_push_next_marked_uncollectable): Move
+       the prototype to mark.c.
+       * include/private/gc_priv.h (GC_is_static_root): Declare only if
+       not THREADS.
+       * include/private/gc_priv.h (GC_free_inner): Declare only if
+       THREADS.
+       * include/private/gc_priv.h (GC_debug_free_inner): Declare only if
+       THREADS and DBG_HDRS_ALL.
+       * include/private/gc_priv.h (GC_markers): Declare GC_markers only
+       if PARALLEL_MARK.
+       * include/private/gc_priv.h (GC_register_main_static_data): Move
+       the prototype to misc.c.
+       * mach_dep.c (GC_push_regs): Make STATIC; define only along with
+       HAVE_PUSH_REGS definition.
+       * mach_dep.c (GC_clear_stack_inner): Replace K&R-style function
+       definition with the ANSI C one.
+       * mark.c (GC_started_thread_while_stopped): Declared only if not
+       GNU C.
+       * win32_threads.c (GC_started_thread_while_stopped): Don't define
+       if GNU C.
+       * mark.c (GC_mark_from): Avoid unbalanced brackets in
+       #if-#else-#endif blocks.
+       * mark_rts.c (GC_is_static_root): Define only if not THREADS.
+       * os_dep.c (GC_get_stack_base): Make public (for OpenBSD).
+       * os_dep.c (GC_page_was_ever_dirty): Comment out the function
+       except for PROC_VDB.
+       * tests/test.c (main): Don't reference GC_print_obj,
+       GC_make_closure, GC_debug_invoke_finalizer,
+       GC_page_was_ever_dirty, GC_is_fresh (in GC_noop).
+       * thread_local_alloc.c: Don't include "gc_inline.h".
+       * win32_threads.c (GC_write_fault_handler): Declare only if
+       MPROTECT_VDB.
+
+2009-10-21  Ivan Maidanski <ivmai@mail.ru>
+
+       * allchblk.c (DEBUG): Remove macro (since unused).
+       * allchblk.c: Include private/gc_priv.h before other includes and
+       definitions.
+       * alloc.c: Ditto.
+       * gc_dlopen.c: Ditto.
+       * headers.c: Ditto.
+       * mallocx.c: Ditto.
+       * mark_rts.c: Ditto.
+       * new_hblk.c: Ditto.
+       * reclaim.c: Ditto.
+       * mark.c: Include private/gc_pmark.h before other includes.
+       * misc.c: Ditto.
+       * dyn_load.c (_GNU_SOURCE): Move the definition to gc_priv.h.
+       * pthread_support.c (_USING_POSIX4A_DRAFT10): Ditto.
+       * pthread_support.c (_POSIX4A_DRAFT10_SOURCE): Remove (since
+       already defined in gc_config_macros.h).
+       * dyn_load.c (GC_init_dyld): Remove parameter cast for
+       _dyld_register_func_for_add_image() and
+       _dyld_register_func_for_remove_image(); add the comment about
+       possible warnings; add FIXME for the deprecated
+       _dyld_bind_fully_image_containing_address().
+       * include/private/gc_priv.h: Include gc.h before the standard
+       headers inclusion.
+       * tests/test.c: Ditto.
+       * include/private/gcconfig.h (DebugBreak): Update the comment.
+       * typd_mlc.c (ED_INITIAL_SIZE): Remove ';'.
+       * alloc.c: Reformat the code (partly adjust indentation).
+       * backgraph.c: Ditto.
+       * blacklst.c: Ditto.
+       * checksums.c: Ditto.
+       * finalize.c: Ditto.
+       * gcj_mlc.c: Ditto.
+       * mach_dep.c: Ditto.
+       * mark_rts.c: Ditto.
+       * obj_map.c: Ditto.
+       * os_dep.c: Ditto.
+       * ptr_chck.c: Ditto.
+       * stubborn.c: Ditto.
+       * thread_local_alloc.c: Ditto.
+       * typd_mlc.c: Ditto.
+
+2009-10-20  Ivan Maidanski <ivmai@mail.ru> (really mostly OpenBSD contributors)
+
+       * configure.ac (openbsd): Define GC_OPENBSD_THREADS.
+       * configure.ac: Add AM_CONDITIONAL(OPENBSD_THREADS).
+       * configure.ac: Add sparc-openbsd case.
+       * doc/README.macros (GC_NETBSD_THREADS, GC_OPENBSD_THREADS):
+       Document.
+       * tests/test.c (main): Handle OpenBSD case.
+       * extra/threadlibs.c: Add the copyright header; expand all tabs to
+       spaces; remove trailing spaces at EOLn.
+       * include/private/pthread_stop_world.h: Ditto.
+       * extra/threadlibs.c (main): Replace K&R-style function definition
+       with the ANSI C one.
+       * extra/threadlibs.c (main): Handle GC_OPENBSD_THREADS case.
+       * dyn_load.c (OPENBSD): Recognize (similar to NETBSD).
+       * include/gc_config_macros.h (GC_SOLARIS_THREADS): Recognize;
+       define it for OpenBSD.
+       * include/gc_pthread_redirects.h (GC_pthread_sigmask,
+       pthread_sigmask): Don't declare and redefine for OpenBSD.
+       * include/private/gcconfig.h: Handle OpenBSD (on arm, sh, i386,
+       amd64, powerpc).
+       * mach_dep.c (NO_GETCONTEXT): Ditto.
+       * include/private/pthread_stop_world.h (thread_stop_info): Don't
+       define last_stop_count field if OpenBSD.
+       * misc.c (GC_init_dyld): Add declaration (if NetBSD).
+       * misc.c (GC_init): Don't call GC_init_netbsd_elf() for OpenBSD.
+       * os_dep.c (GC_init_netbsd_elf): Don't define for OpenBSD.
+       * os_dep.c (old_segv_act, GC_jmp_buf_openbsd): New static variable
+       (only if OpenBSD).
+       * os_dep.c (GC_fault_handler_openbsd, GC_find_limit_openbsd,
+       GC_skip_hole_openbsd): New static function (only if OpenBSD).
+       * os_dep.c (GC_get_stack_base, GC_get_main_stack_base,
+       GC_register_data_segments): Define specially for OpenBSD case.
+       * os_dep.c (GC_fault_handler_lock): Initialize to
+       AO_TS_INITIALIZER (instead of 0).
+       * pthread_support.c (GC_allocate_lock): Ditto.
+       * pthread_stop_world.c (NSIG, GC_print_sig_mask,
+       GC_remove_allowed_signals, suspend_handler_mask, GC_stop_count,
+       GC_world_is_stopped, GC_retry_signals, SIG_THR_RESTART,
+       GC_suspend_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
+       GC_restart_handler): Don't define and use if OpenBSD.
+       * pthread_stop_world.c (GC_suspend_all, GC_stop_world,
+       GC_start_world): Handle OpenBSD case.
+       * pthread_stop_world.c (GC_stop_init): Define as empty if OpenBSD.
+       * pthread_support.c (pthread_sigmask): Don't undefine the macro and
+       don't define the wrapper function if OpenBSD.
+       * pthread_support.c (GC_thr_init): Handle OpenBSD case.
+       * configure: Regenerate.
+       * include/private/config.h.in: Ditto.
+
+2009-10-20  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
+
+       * dyn_load.c: Move the inclusion of private/gc_priv.h below
+       definition of a feature macro (_GNU_SOURCE).
+
+2009-10-20  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/gc.h (REVEAL_POINTER): Remove redundant parentheses.
+       * include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): New macros
+       (only if GC_I_HIDE_POINTERS).
+       * backgraph.c (GET_OH_BG_PTR): Prefix REVEAL_POINTER() with "GC_".
+       * dbg_mlc.c (GC_get_back_ptr_info): Ditto.
+       * finalize.c (GC_grow_table, GC_dump_finalization, GC_finalize,
+       GC_enqueue_all_finalizers): Ditto.
+       * backgraph.c (SET_OH_BG_PTR): Prefix HIDE_POINTER() with "GC_".
+       * finalize.c (GC_general_register_disappearing_link,
+       GC_unregister_disappearing_link, GC_register_finalizer_inner,
+       GC_finalize): Ditto.
+       * include/private/dbg_mlc.h (HIDE_BACK_PTR): Ditto.
+       * include/private/dbg_mlc.h (GC_I_HIDE_POINTERS): Define instead
+       of I_HIDE_POINTERS.
+       * include/private/gc_priv.h (GC_I_HIDE_POINTERS): Ditto.
+       * include/gc.h (_GC_H): Strip leading underscore.
+       * include/gc_backptr.h (_GC_H): Ditto.
+       * include/gc_gcj.h (_GC_H): Ditto.
+       * include/gc_mark.h (_GC_H): Ditto.
+       * include/gc_typed.h (_GC_TYPED_H, _GC_H): Ditto.
+       * include/javaxfc.h (_GC_H): Ditto.
+       * include/new_gc_alloc.h (__GC_SPECIALIZE): Ditto.
+       * include/private/dbg_mlc.h (_GC_H): Ditto.
+       * include/private/gc_priv.h (_GC_H): Ditto.
+       * include/gc_backptr.h: Reformat the code (adjust indentation,
+       comment out function parameter names).
+       * include/gc_gcj.h: Ditto.
+       * include/gc_mark.h: Ditto.
+       * include/gc_typed.h: Ditto.
+       * include/javaxfc.h: Ditto.
+       * include/private/dbg_mlc.h: Ditto.
+       * include/private/gc_priv.h: Ditto.
+
+2009-10-19  Ivan Maidanski <ivmai@mail.ru>
+
+       * gc_cpp.cc: Include "gc_cpp.h" instead of <gc_cpp.h>.
+
+2009-10-19  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/private/gc_priv.h (GC_INNER): New macro (for GC-scope
+       variable definitions).
+       * include/private/gc_priv.h (GC_EXTERN): Update the comment.
+       * allchblk.c (GC_unmap_threshold): Define as GC_INNER.
+       * alloc.c (GC_incremental, GC_world_stopped, GC_n_heap_sects,
+       GC_n_memory, GC_fail_count): Ditto.
+       * blacklst.c (GC_black_list_spacing, GC_print_heap_obj): Ditto.
+       * gcj_mlc.c (GC_gcj_malloc_initialized, GC_gcjobjfreelist): Ditto.
+       * mach_dep.c (GC_save_regs_ret_val): Ditto.
+       * mark.c (GC_n_mark_procs, GC_obj_kinds, GC_n_kinds,
+       GC_mark_stack, GC_mark_stack_limit, GC_mark_stack_size,
+       GC_mark_stack_top, GC_mark_state, GC_mark_stack_too_small,
+       GC_mark_no, GC_markers): Ditto.
+       * mark_rts.c (GC_root_size, GC_push_typed_structures): Ditto.
+       * misc.c (GC_allocate_ml, GC_debugging_started, GC_check_heap,
+       GC_print_all_smashed, GC_print_back_height, GC_dump_regularly,
+       GC_backtraces, GC_force_unmap_on_gcollect,
+       GC_large_alloc_warn_interval, GC_is_initialized, GC_write_cs,
+       GC_current_warn_proc, GC_blocked_sp, GC_activation_frame): Ditto.
+       * os_dep.c (GC_page_size, GC_dont_query_stack_min,
+       GC_no_win32_dlls, GC_wnt, GC_sysinfo, GC_push_other_roots,
+       GC_dirty_maintained, GC_fault_handler_lock): Ditto.
+       * pthread_support.c (GC_allocate_ml, GC_lock_holder,
+       GC_need_to_lock, GC_thr_initialized, GC_threads,
+       GC_in_thread_creation, GC_collecting, GC_allocate_lock,
+       GC_mark_lock_holder): Ditto.
+       * reclaim.c (GC_bytes_found, GC_fl_builder_count, GC_have_errors):
+       Ditto.
+       * win32_threads.c (GC_allocate_ml, GC_lock_holder,
+       GC_need_to_lock, GC_mark_lock_holder, GC_collecting): Ditto.
+       * extra/gc.c (GC_INNER, GC_EXTERN): Define as STATIC.
+       * mach_dep.c (GC_with_callee_saves_pushed): Remove redundant {}.
+       * os_dep.c (GC_init_win32): Reformat the comment.
+
+2009-10-19  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/private/gc_priv.h (GC_bytes_allocd, GC_objfreelist,
+       GC_aobjfreelist): Replace GC_EXTERN to extern for SEPARATE_GLOBALS
+       case (since they are not defined inside GC at present).
+       * include/private/gc_priv.h (GC_objects_are_marked): Remove the
+       declaration (since made static).
+       * mark.c (GC_objects_are_marked): Define as STATIC.
+       * win32_threads.c (GC_thr_initialized, GC_in_thread_creation):
+       Ditto.
+       * mark.c (GC_N_KINDS_INITIAL_VALUE): New macro (defined and used
+       to initialize GC_n_kinds).
+       * win32_threads.c (start_mark_threads): Adjust the comment.
+
+2009-10-19  Ivan Maidanski <ivmai@mail.ru>
+
+       * alloc.c (GC_notify_full_gc): Use GC_INLINE for a tiny static
+       function.
+       * backgraph.c (pop_in_progress, GC_apply_to_each_object): Ditto.
+       * mark_rts.c (add_roots_to_index): Ditto.
+
+2009-10-19  Ivan Maidanski <ivmai@mail.ru>
+
+       * extra/gc.c: New file.
+       * Makefile.am (EXTRA_DIST): Add "extra/gc.c".
+       * configure: Regenerate.
+       * Makefile.in: Ditto.
+
+2009-10-19  Ivan Maidanski <ivmai@mail.ru>
+
+       * misc.c (GC_log): Remove the declaration; move the definition (to
+       the place where it is used); make STATIC.
+       * misc.c (GC_init): Use GC_err_printf() instead of GC_log_printf()
+       to print open log failure.
+       * misc.c (GC_write): Don't abort on open log failure if the GC is
+       compiled with GC_PRINT_VERBOSE_STATS (useful for WinCE).
+
+2009-10-19  Ivan Maidanski <ivmai@mail.ru> (really Andreas Tobler)
+
+       * include/private/gcconfig.h (USE_MMAP): Guard with ifndef.
+
+2009-10-18  Ivan Maidanski <ivmai@mail.ru>
+
+       * allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Move
+       the variable declaration to gc_priv.h.
+       * alloc.c (GC_bytes_found, GC_unmap_threshold,
+       GC_force_unmap_on_gcollect): Ditto.
+       * dyn_load.c (GC_no_win32_dlls, GC_wnt): Ditto.
+       * finalize.c (GC_fail_count): Ditto.
+       * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
+       GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Ditto.
+       * include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
+       GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
+       GC_mark_stack_too_small, GC_mark_state): Ditto.
+       * include/private/pthread_support.h (GC_threads,
+       GC_thr_initialized, GC_in_thread_creation): Ditto.
+       * mallocx.c (GC_bytes_found): Ditto.
+       * mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Ditto.
+       * misc.c (GC_unmap_threshold): Ditto.
+       * os_dep.c (GC_unmap_threshold): Ditto.
+       * pthread_support.c (GC_markers): Ditto.
+       * thread_local_alloc.c (GC_gcjobjfreelist,
+       GC_gcj_malloc_initialized, GC_gcj_kind): Ditto.
+       * win32_threads.c (GC_fault_handler_lock, GC_write_cs,
+       GC_dont_query_stack_min, GC_markers, GC_wnt): Ditto.
+       * include/private/gc_priv.h (GC_EXTERN): New macro (used mostly as
+       a tag for now); defined after "gcconfig.h" inclusion.
+       * include/private/gc_priv.h: Use GC_EXTERN instead of "extern"
+       keyword for most global variables.
+       * alloc.c (GC_copyright): Add the comment about the symbol
+       visibility.
+       * finalize.c (GC_fo_entries): Ditto.
+       * include/private/gc_priv.h (GC_print_stats): Ditto.
+       * misc.c (GC_quiet): Ditto.
+       * mallocx.c (GC_bytes_allocd_tmp): Make the volatile variable
+       STATIC.
+       * pthread_support.c (GC_threads): Add explicit zero initializer
+       (to make the variable definition differ from the declaration).
+
+2009-10-18  Ivan Maidanski <ivmai@mail.ru>
+
+       * backgraph.c (GC_quiet): Remove the declaration (not needed
+       anymore since gc_priv.h is always included).
+       * checksums.c (GC_quiet): Ditto.
+       * gcj_mlc.c (GC_quiet): Ditto.
+       * headers.c (GC_hdr_cache_hits, GC_hdr_cache_misses): Add the
+       comment.
+       * include/private/gc_hdrs.h (GC_hdr_cache_hits,
+       GC_hdr_cache_misses): Ditto.
+       * mark.c (GC_first_nonempty): Make the volatile variable STATIC.
+       * pthread_stop_world.c (GC_stop_count, GC_world_is_stopped):
+       Ditto.
+       * win32_threads.c (GC_please_stop, GC_max_thread_index,
+       GC_mark_mutex_waitcnt): Ditto.
+
+2009-10-18  Ivan Maidanski <ivmai@mail.ru>
+
+       * pthread_support.c (GC_USE_LD_WRAP): Fix a typo (swapped 'L' and
+       'D') in the name.
+
+2009-10-17  Ivan Maidanski <ivmai@mail.ru>
+
+       * gc_dlopen.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Define if dlopen
+       redirection is turned off; turn it on later when dlopen real
+       symbol is no longer needed (according to the comment and the same
+       as in dyn_load.c).
+       * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): Rename to WRAP_DLFUNC and
+       REAL_DLFUNC, respectively (to have unique names since the
+       definitions may differ from that of the similar ones in
+       pthread_support.c).
+       * mark.c (source): Undefine the macro when no longer needed.
+       * os_dep.c (handler): Rename the type to GC_fault_handler_t (to
+       have the unique name across the project).
+       * os_dep.c (STAT_BUF_SIZE, STAT_READ); Guard with ifndef; add the
+       comment.
+       * pthread_support.c (STAT_BUF_SIZE, STAT_READ): Ditto.
+       * os_dep.c (sbrk): Undo sbrk() redirection (for ECOS) when no
+       longer needed.
+
+2009-10-17  Ivan Maidanski <ivmai@mail.ru>
+
+       * pthread_stop_world.c (pthread_sigmask): Undefine before using
+       in GC_print_sig_mask() (only if DEBUG_THREADS); add the comment.
+       * win32_threads.c (dlopen, _beginthread): Don't undefine (since
+       neither redirected nor used here).
+       * win32_threads.c (GC_Thread_Rep): Rename "table_management" to
+       "tm" for short; remove "tm_" prefix.
+       * win32_threads.c (in_use, next): Don't define the macros; use
+       tm.in_use and tm.next fields, respectively (to ease debugging).
+       * win32_threads.c (HASH): Rename to PTHREAD_MAP_HASH (to have
+       unique name across the project).
+
+2009-10-17  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/private/gc_priv.h (I_HIDE_POINTERS): Define before gc.h
+       inclusion.
+       * include/private/gc_pmark.h (I_HIDE_POINTERS): Define if gc.h is
+       not included yet.
+       * finalize.c (I_HIDE_POINTERS): Don't define.
+       * include/private/dbg_mlc.h (I_HIDE_POINTERS): Ditto.
+       * misc.c (I_HIDE_POINTERS): Ditto.
+       * include/private/dbg_mlc.h (HIDE_POINTER, REVEAL_POINTER,
+       GC_hidden_pointer): Don't define if HIDE_POINTER is undefined.
+       * include/private/gc_pmark.h: Remove the comment about gc_priv.h
+       inclusion order.
+
+2009-10-17  Ivan Maidanski <ivmai@mail.ru>
+
+       * dyn_load.c: Include gc_priv.h before using configuration
+       information (MACOS).
+       * dyn_load.c (GC_must_restore_redefined_dlopen): Rename to
+       GC_MUST_RESTORE_REDEFINED_DLOPEN.
+
+2009-10-17  Ivan Maidanski <ivmai@mail.ru>
+
+       * backgraph.c (SET_OH_BG_PTR): Place outermost parenthesis
+       properly.
+       * darwin_stop_world.c: Replace "if DEBUG_THREADS" with
+       "ifdef DEBUG_THREADS".
+       * pthread_stop_world.c: Ditto.
+       * pthread_support.c: Ditto.
+       * include/gc_inline.h: Guard with GC_INLINE_H.
+
+2009-10-17  Ivan Maidanski <ivmai@mail.ru>
+
+       * alloc.c (GC_copyright): Define as const.
+       * alloc.c (GC_collect_at_heapsize): Replace "static" with "STATIC"
+       (since the name starts with "GC_" prefix).
+       * dbg_mlc.c (GC_describe_type_fns): Ditto.
+       * dyn_load.c (GC_FirstDLOpenedLinkMap,
+       GC_register_dynlib_callback, GC_dyld_sections,
+       GC_dyld_name_for_hdr, GC_dyld_image_add, GC_dyld_image_remove):
+       Ditto.
+       * malloc.c (GC_libpthread_start, GC_libpthread_end,
+       GC_libld_start, GC_libld_end): Ditto.
+       * mark_rts.c (GC_remove_root_at_pos, GC_rebuild_root_index):
+       Ditto.
+       * os_dep.c (GC_gww_read_dirty, GC_gww_page_was_dirty,
+       GC_gww_page_was_ever_dirty, GC_mprotect_thread_notify,
+       GC_mprotect_thread_reply, GC_mprotect_thread, GC_darwin_sigbus,
+       GC_forward_exception): Ditto.
+       * pthread_support.c (GC_syms_initialized): Ditto.
+       * typd_mlc.c (GC_push_typed_structures_proc): Ditto.
+       * win32_threads.c (GC_win32_dll_threads,
+       GC_register_my_thread_inner, GC_lookup_pthread, GC_get_stack_min,
+       GC_waitForSingleObjectInfinite): Ditto.
+       * darwin_stop_world.c (GC_use_mach_handler_thread,
+       GC_use_mach_handler_thread, GC_mach_threads_count): Replace
+       "static" with "STATIC" and add zero initializer.
+       * os_dep.c (GC_task_self, GC_ports, GC_mprotect_state,
+       GC_sigbus_count): Ditto.
+       * headers.c (free_hdr): Replace "static" with GC_INLINE.
+       * misc.c (GC_tmp): Rename static variable to fwrite_gc_res.
+       * os_dep.c (memory): Rename static variable to ecos_gc_memory.
+       * os_dep.c (async_set_pht_entry_from_index): Make static (for
+       MPROTECT_VDB case).
+       * pthread_support.c (GC_real_pthread_create,
+       GC_real_pthread_sigmask, GC_real_pthread_join,
+       GC_real_pthread_detach, GC_init_real_syms): Use REAL_FUNC() macro
+       for static GC_real_XXX symbols.
+       * win32_threads.c (GC_may_be_in_stack): Remove "GC_" prefix.
+
+2009-10-17  Ivan Maidanski <ivmai@mail.ru>
+
+       * alloc.c (GC_never_stop_func, GC_check_fl_marks,
+       GC_finish_collection): Reformat the code (make opening bracket
+       style uniform across the file).
+       * allchblk.c (GC_allochblk): Ditto.
+       * backgraph.c (add_edge): Ditto.
+       * dbg_mlc.c (GC_marked_for_finalization): Ditto.
+       * dyn_load.c (GC_register_dynamic_libraries, GC_init_dyld): Ditto.
+       * finalize.c (GC_null_finalize_mark_proc): Ditto.
+       * gc_dlopen.c (GC_dlopen): Ditto.
+       * mark.c (GC_push_marked1, GC_push_marked2, GC_push_marked4):
+       Ditto.
+       * misc.c (looping_handler, GC_call_with_gc_active,
+       GC_do_blocking_inner, GC_do_blocking): Ditto.
+       * os_dep.c (GC_get_main_stack_base, GC_read_dirty): Ditto.
+       * pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
+       GC_pthread_join, GC_pthread_detach, GC_check_tls,
+       GC_do_blocking_inner, GC_call_with_gc_active): Ditto.
+       * reclaim.c (GC_reclaim_clear, GC_reclaim_block,
+       GC_print_free_list): Ditto.
+       * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty,
+       GC_remove_protection): Reformat the code (wrap long lines).
+
+2009-10-16  Ivan Maidanski <ivmai@mail.ru>
+
+       * alloc.c (GC_finish_collection): Replace getenv() with GETENV().
+       * dyn_load.c (GC_init_dyld): Ditto.
+       * os_dep.c (GC_print_callers): Ditto.
+       * dyn_load.c (GC_dyld_name_for_hdr): Cast _dyld_get_image_name()
+       result (since it's always of "struct mach_header" type).
+       * dyn_load.c (GC_init_dyld): Cast GC_dyld_image_add and
+       GC_dyld_image_remove (to always have the first argument of
+       "struct mach_header" pointer type).
+
+2009-10-16  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
+
+       * configure.ac: Add threads support for OpenBSD case (threads may
+       not work correctly for it).
+       * configure: Regenerate.
+
+2009-10-15  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
+
+       * acinclude.m4: Rename to m4/gc_set_version.m4.
+       * aclocal.m4: Regenerate.
+       * configure: Ditto.
+       * Makefile.in: Ditto.
+       * m4/libtool.m4: Delete the file.
+       * m4/lt~obsolete.m4: Ditto.
+       * m4/ltoptions.m4: Ditto.
+       * m4/ltsugar.m4: Ditto.
+       * m4/ltversion.m4: Ditto.
+
+2009-10-15  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/private/gcconfig.h: Define DebugBreak() as _exit(-1) for
+       x86mingw32ce toolchain to workaround the incorrect DebugBreak()
+       declaration in winbase.h (the workaround would turn into a no-op
+       when DebugBreak() will be defined as a macro in the toolchain).
+
+2009-10-15  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/private/gcconfig.h: Recognize __i386__ if WinCE (for
+       x86mingw32ce toolchain).
+       * include/private/gcconfig.h (NO_GETENV): Don't define for CeGCC
+       toolchain (or if already defined).
+       * include/private/gcconfig.h (NO_GETENV_WIN32): New macro (always
+       defined for WinCE or if NO_GETENV is defined).
+       * misc.c (GC_CreateLogFile): Use NO_GETENV_WIN32 macro instead of
+       NO_GETENV one.
+
+2009-10-15  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
+
+       * configure.ac: Add AC_CONFIG_MACRO_DIR([m4]).
+       * Makefile.am: Add "ACLOCAL_AMFLAGS = -I m4".
+       * libtool.m4: Remove.
+       * aclocal.m4: Regenerate.
+       * configure: Ditto.
+       * Makefile.in: Ditto.
+       * m4/libtool.m4: New file (generated).
+       * m4/lt~obsolete.m4: Ditto.
+       * m4/ltoptions.m4: Ditto.
+       * m4/ltsugar.m4: Ditto.
+       * m4/ltversion.m4: Ditto.
+
+2009-10-10  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/gc.h (GC_UNDERSCORE_STDCALL): Recognize new macro;
+       prefix GC_CreateThread and GC_ExitThread with '_' if defined.
+       * doc/README.macros (GC_UNDERSCORE_STDCALL): Document.
+
+2009-10-09  Ivan Maidanski <ivmai@mail.ru>
+
+       * alloc.c (GC_collect_or_expand): Add "retry" argument; add the
+       comments; don't use "default" stop_func on a retry if
+       GC_dont_expand.
+       * alloc.c (GC_collect_or_expand): Reformat the code (make the
+       indentation style uniform across the function).
+       * alloc.c (GC_allocobj): Pass "retry" argument to
+       GC_collect_or_expand().
+       * malloc.c (GC_alloc_large): Ditto.
+       * include/private/gc_priv.h (GC_collect_or_expand): Move the
+       declaration to malloc.c; add "retry" argument.
+
+2009-10-09  Ivan Maidanski <ivmai@mail.ru>
+
+       * alloc.c (GC_start_call_back): Move the variable definition from
+       misc.c.
+       * include/private/gc_priv.h (GC_start_call_back): Remove the
+       declaration.
+       * alloc.c (GC_notify_full_gc): Remove unnecessary cast of 0.
+       * alloc.c (GC_try_to_collect_inner): Also call stop_func at the
+       beginning of the function.
+       * include/gc.h (GC_try_to_collect): Refine the comment about
+       stop_func.
+
+2009-10-08  Ivan Maidanski <ivmai@mail.ru>
+
+       * alloc.c (GC_default_stop_func, GC_try_to_collect_general,
+       GC_gcollect): Add the comment.
+       * alloc.c (GC_try_to_collect_general): Move the assertion on
+       stop_func != 0 to GC_try_to_collect().
+       * alloc.c (GC_try_to_collect_general): If stop_func == 0 then use
+       GC_default_stop_func instead (holding the lock).
+       * alloc.c (GC_gcollect): Pass 0 as stop_func instead of
+       GC_default_stop_func (to prevent data races).
+
+2009-10-08  Ivan Maidanski <ivmai@mail.ru>
+
+       * Makefile.direct: Move "define arguments" documentation to
+       doc/README.macros; add reference to doc/README.macros.
+       * Makefile.dj: Change the documentation reference to
+       doc/README.macros.
+       * README.QUICK: Ditto.
+       * configure.ac: Ditto.
+       * allchblk.c: Remove unnecessary "-D" from the comment.
+       * doc/README.macros: Ditto.
+       * README.environment: Ditto.
+       * include/gc.h: Ditto.
+       * include/gc_inline.h: Ditto.
+       * include/private/gcconfig.h: Ditto.
+       * README.QUICK: Fix a typo.
+       * README.QUICK: Expand all tabs to spaces.
+       * configure: Regenerate.
+       * include/private/config.h.in: Ditto.
+
+2009-10-07  Ivan Maidanski <ivmai@mail.ru>
+
+       * misc.c (GC_CreateLogFile): Use FILE_ATTRIBUTE_NORMAL for
+       CreateFile(); don't immediately flush every write if very verbose.
+
+2009-10-07  Ivan Maidanski <ivmai@mail.ru>
+
+       * doc/README.win32: Replace ".exe.log" to ".gc.log".
+       * doc/README.win64: Ditto.
+       * doc/README.win64: Fix a typo.
+       * misc.c (GC_CreateLogFile): Strip executable file extension for
+       the log file; use ".gc.log" extension (instead of ".log").
+
+2009-10-07  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/gc_config_macros.h: Avoid the redefinition of
+       GC_xxx_THREADS macros.
+
+2009-10-06  Ivan Maidanski <ivmai@mail.ru>
+
+       * alloc.c (GC_try_to_collect_general): Change the type of "result"
+       local variable to GC_bool.
+
+2009-10-06  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/gc_config_macros.h: Use old behavior for FreeBSD and
+       NetBSD platform detection code (check that other GC_xxx_THREADS
+       are undefined); add FIXME.
+
+2009-10-06  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/gc_config_macros.h: Rearrange the platform detection
+       code (GC_WIN32_PTHREADS implies GC_WIN32_THREADS; define
+       GC_THREADS first if GC_XXX_THREADS already set; define proper
+       GC_XXX_THREADS if GC_THREADS; define GC_PTHREADS in a single
+       place; define _REENTRANT if posix threads except for Win32).
+       * include/gc_config_macros.h: Reformat the code (make the
+       indentation style uniform across the file).
+
+2009-10-06  Ivan Maidanski <ivmai@mail.ru>
+
+       * alloc.c (GC_try_to_collect_general): New function (move the code
+       from GC_try_to_collect, pass force_unmap argument).
+       * alloc.c (GC_try_to_collect, GC_gcollect): Call
+       GC_try_to_collect_general().
+       * alloc.c (GC_gcollect_and_unmap): New public function.
+       * include/gc.h (GC_gcollect_and_unmap): New function declaration.
+       * tests/test.c (window_proc): Call GC_gcollect_and_unmap() on
+       WM_HIBERNATE event (instead of GC_set_force_unmap_on_gcollect()
+       and GC_gcollect()).
+
+2009-10-06  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/gc.h (GC_allow_register_threads, GC_register_my_thread,
+       GC_unregister_my_thread, GC_malloc_many): Refine the comment.
+       * include/gc.h (GC_malloc_many, GC_NEXT): Declare unconditionally
+       (that is, don't depend on GC_THREADS macro).
+       * include/gc.h: Don't check for __CYGWIN32__ and __CYGWIN__ along
+       with a check for GC_PTHREADS (since the former implies the
+       latter).
+
+2009-10-06  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/gc.h: Reformat the code (make the indentation style
+       uniform across the file).
+       * include/gc.h (GC_SOLARIS_THREADS): Don't check for.
+       * include/gc.h (GC_MIN, GC_MAX): Don't define.
+       * mallocx.c (GC_malloc_many): Add comment to #endif.
+
+2009-10-02  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
+
+       * configure.ac: Drop the subdir-objects Automake option, since
+       it's incompatible with picking source files from libatomic_ops.
+       * Makefile.in: Regenerate.
+
+2009-10-01  Ivan Maidanski <ivmai@mail.ru> (really mostly Andreas Tobler)
+
+       * allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Add
+       "extern" keyword to a global variable declaration (some compilers
+       require it).
+       * alloc.c (GC_bytes_found, GC_unmap_threshold,
+       GC_force_unmap_on_gcollect): Ditto.
+       * dyn_load.c (GC_no_win32_dlls, GC_wnt): Ditto.
+       * finalize.c (GC_fail_count): Ditto.
+       * include/private/gc_hdrs.h (GC_hdr_cache_hits,
+       GC_hdr_cache_misses): Ditto.
+       * mallocx.c (GC_bytes_found): Ditto.
+       * mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Ditto.
+       * misc.c (GC_unmap_threshold): Ditto.
+       * os_dep.c (GC_unmap_threshold, GC_old_allocator): Ditto.
+       * pthread_support.c (GC_markers): Ditto.
+       * thread_local_alloc.c (GC_gcjobjfreelist,
+       GC_gcj_malloc_initialized, GC_gcj_kind): Ditto.
+       * win32_threads.c (GC_fault_handler_lock, GC_write_cs,
+       GC_dont_query_stack_min, GC_markers, GC_wnt): Ditto.
+
+2009-10-01  Ivan Maidanski <ivmai@mail.ru>
+
+       * Makefile.in: Regenerate (by autoreconf -vif, deleting libtool.m4
+       first and using libtool-2.2, automake-1.10.2, autoconf-2.64).
+       * aclocal.m4: Ditto.
+       * config.guess: Ditto.
+       * config.sub: Ditto.
+       * configure: Ditto.
+       * depcomp: Ditto.
+       * install-sh: Ditto.
+       * ltmain.sh: Ditto.
+       * missing: Ditto.
+       * mkinstalldirs: Ditto.
+       * include/private/config.h.in: Ditto.
+
+2009-10-01  Ivan Maidanski <ivmai@mail.ru>
+
+       * tests/huge_test.c: Define GC_IGNORE_WARN (if not defined) to
+       suppress misleading GC "Out of Memory!" warning printed on every
+       GC_MALLOC(LONG_MAX) call.
+       * tests/huge_test.c: Include "gc.h" instead of <gc.h>.
+       * tests/huge_test.c (main): Replace K&R-style function definition
+       with the ANSI C one.
+       * tests/huge_test.c: Expand all tabs to spaces.
+
+2009-10-01  Ivan Maidanski <ivmai@mail.ru>
+
+       * dyn_load.c (GC_register_dynamic_libraries): Always use
+       lpMaximumApplicationAddress value for WinCE (even for old
+       versions).
+       * os_dep.c (VER_PLATFORM_WIN32_CE): Define if not in winbase.h.
+       * os_dep.c (GC_dont_query_stack_min): New global variable (only if
+       WinCE and THREADS).
+       * os_dep.c (GC_setpagesize): Adjust lpMaximumApplicationAddress
+       for WinCE (prior to version 6) if not _WIN32_WCE_EMULATION; set
+       GC_dont_query_stack_min for older WinCE (prior to version 5).
+       * win32_threads.c (GC_dont_query_stack_min): Declare.
+       * win32_threads.c (GC_get_stack_min): Rename the macro to
+       GC_wince_evaluate_stack_min for WinCE; update the comment.
+       * win32_threads.c (GC_push_stack_for, GC_get_next_stack): Use
+       GC_wince_evaluate_stack_min() instead of GC_get_stack_min() for
+       WinCE and don't update thread's last_stack_min value (only if
+       GC_dont_query_stack_min).
+       * win32_threads.c (GC_push_stack_for): Skip assertion for WinCE if
+       GC_dont_query_stack_min (since the evaluated stack_min value may
+       be incorrect if the stack is bigger than 64 KiB).
+
+2009-10-01  Ivan Maidanski <ivmai@mail.ru>
+
+       * gc_dlopen.c (GC_dlopen): Add function redirector (only if
+       GC_USE_LD_WRAP).
+       * include/gc.h: Include "gc_pthread_redirects.h" even if
+       GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
+       * include/gc_pthread_redirects.h (GC_PTHREAD_REDIRECTS_H): Don't
+       define and check for (since included only from gc.h).
+       * include/gc_pthread_redirects.h: Declare "GC_" symbols even if
+       GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
+       * include/gc_pthread_redirects.h: Include signal.h only to get
+       sigset_t definition.
+
+2009-09-30  Ivan Maidanski <ivmai@mail.ru>
+
+       * configure: Regenerate (by autoreconf -vif, deleting libtool.m4
+       first).
+       * Makefile.in: Ditto.
+       * aclocal.m4: Ditto.
+       * include/private/config.h.in: Ditto.
+
+2009-09-30  Ivan Maidanski <ivmai@mail.ru>
+
+       * Makefile.direct: Remove trailing spaces at EOLn.
+       * Makefile.direct: Document GC_REGISTER_MEM_PRIVATE.
+       * mark_rts.c (GC_is_tmp_root): Define also for WinCE unless
+       NO_DEBUGGING (that is, replace _WIN32_WCE_EMULATION with MSWINCE).
+       * os_dep.c (GC_sysinfo): Remove explicit global variable
+       initialization to "{0}" (revert back the previous change) since it
+       might produce a warning.
+
+2009-09-30  Ivan Maidanski <ivmai@mail.ru>
+
+       * allchblk.c (GC_large_alloc_warn_interval): Move declaration from
+       gc_priv.h.
+       * allchblk.c (GC_large_alloc_warn_suppressed): Move definition
+       from misc.c; define as STATIC.
+       * include/private/gc_priv.h (GC_large_alloc_warn_interval,
+       GC_large_alloc_warn_suppressed): Remove declaration.
+       * alloc.c (GC_bytes_found): Add "defined in" comment.
+       * mallocx.c (GC_bytes_found): Ditto.
+       * misc.c (GC_unmap_threshold): Ditto.
+       * os_dep.c (GC_old_allocator): Ditto.
+       * pthread_support.c (GC_markers): Ditto.
+       * thread_local_alloc.c (GC_gcjobjfreelist,
+       GC_gcj_malloc_initialized, GC_gcj_kind): Ditto.
+       * win32_threads.c (GC_markers): Ditto.
+       * alloc.c (GC_start_time): Explicitly initialize to 0 or NULL (to
+       be distinctive from a variable declaration).
+       * backgraph.c (GC_max_height, GC_deepest_obj): Ditto.
+       * blacklst.c (GC_old_normal_bl, GC_incomplete_normal_bl,
+       GC_old_stack_bl, GC_incomplete_stack_bl): Ditto.
+       * checksums.c (GC_faulted, GC_n_dirty_errors,
+       GC_n_faulted_dirty_errors, GC_n_changed_errors, GC_n_clean,
+       GC_n_dirty, GC_bytes_in_used_blocks): Ditto.
+       * dbg_mlc.c (GC_smashed): Ditto.
+       * finalize.c (GC_old_dl_entries): Ditto.
+       * gcj_mlc.c (GC_gcj_kind, GC_gcj_debug_kind, GC_gcjobjfreelist,
+       GC_gcjdebugobjfreelist): Ditto.
+       * mach_dep.c (GC_save_regs_ret_val): Ditto.
+       * mark.c (GC_n_rescuing_pages, GC_mark_stack, GC_mark_stack_limit,
+       GC_mark_stack_top): Ditto.
+       * misc.c (GC_min_sp, GC_high_water, GC_bytes_allocd_at_reset):
+       Ditto.
+       * os_dep.c (GC_data_start, GC_page_size, GC_sysinfo,
+       GC_old_segv_handler, GC_old_bus_handler,
+       GC_old_bus_handler_used_si, GC_old_segv_handler_used_si,
+       GC_proc_buf, GC_proc_fd, GC_vd_base): Ditto.
+       * pthread_stop_world.c (GC_stop_count, GC_stopping_pid): Ditto.
+       * reclaim.c (GC_leaked): Ditto.
+       * typd_mlc.c (GC_explicit_kind, GC_array_kind, GC_ext_descriptors,
+       GC_typed_mark_proc_index, GC_array_mark_proc_index,
+       GC_eobjfreelist, GC_arobjfreelist): Ditto.
+       * win32_threads.c (GC_pthread_map_cache, GC_marker_cv,
+       GC_marker_Id): Ditto.
+       * dbg_mlc.c (GC_smashed, GC_n_smashed): Define as STATIC.
+       * gcj_mlc.c (GC_gcjdebugobjfreelist): Ditto.
+       * os_dep.c (GC_vd_base): Ditto.
+       * pthread_support.c (GC_mark_threads): Ditto.
+       * reclaim.c (GC_leaked): Ditto.
+       * typd_mlc.c (GC_bm_table): Ditto.
+       * mark_rts.c (GC_save_regs_ret_val): Change declaration type to
+       that of definition; add "defined in" comment.
+       * mark_rts.c (GC_push_current_stack): Remove unnecessary cast for
+       GC_save_regs_ret_val.
+       * misc.c (GC_check_heap, GC_print_all_smashed,
+       GC_start_call_back): Remove unnecessary cast (of 0).
+       * misc.c (GC_LARGE_ALLOC_WARN_INTERVAL): New tuning macro.
+       * misc.c (GC_large_alloc_warn_interval): Initialize to
+       GC_LARGE_ALLOC_WARN_INTERVAL value.
+       * misc.c (GC_tmp): Change to "static".
+       * os_dep.c (GC_setpagesize): Reformat the code (collapse multiple
+       function definitions).
+       * os_dep.c (GC_mprotect_state): Define as static.
+       * pthread_support.c (dummy_thread_local): Prefix with "GC_".
+       * win32_threads.c (WinMain): Remove FIXME for WinCE.
+
+2009-09-30  Ivan Maidanski <ivmai@mail.ru> (really Hans Boehm)
+
+       * os_dep.c (PROTECT, UNPROTECT): Use distinct ABORT messages.
+
+2009-09-30  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
+
+       * configure.ac: Rewrite the tests for external or internal
+       libatomic_ops.
+       * configure.ac: In particular, drop the symbolic links. Add option
+       --with-libatomic-ops for forced selection.
+       * Makefile.am: Adjust the path of source files from libatomic_ops
+       to not use the links.
+       * Makefile.am (libgc_la_LIBADD): Add $(ATOMIC_OPS_LIBS). This will
+       be empty if we use the bundled AO sources.
+       * configure: Regenerate.
+       * Makefile.in: Ditto.
+
+2009-09-29  Ivan Maidanski <ivmai@mail.ru>
+
+       * Makefile.am: Strip version suffix for libatomic_ops directory.
+       * build_atomic_ops.sh: Ditto.
+       * build_atomic_ops.sh.cygwin: Ditto.
+       * configure_atomic_ops.sh: Ditto.
+       * Makefile.direct: Remove AO_VERSION definition; strip version
+       suffix for libatomic_ops directory.
+       * NT_STATIC_THREADS_MAKEFILE: Ditto.
+       * NT_X64_STATIC_THREADS_MAKEFILE: Ditto.
+       * NT_X64_THREADS_MAKEFILE: Ditto.
+       * gc.mak: Ditto.
+       * Makefile.in: Regenerate.
+
+2009-09-29  Ivan Maidanski <ivmai@mail.ru>
+
+       * libatomic_ops: Rename from "libatomic_ops-1.2".
+
+2009-09-28  Ivan Maidanski <ivmai@mail.ru>
+
+       * alloc.c (GC_version): Add "const" keyword.
+       * alloc.c (GC_get_version): New public function.
+       * include/gc.h (GC_get_version): New function declaration; update
+       the comment for the GC version.
+
+2009-09-27  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
+       GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Use "extern"
+       (for the global variable declaration) again.
+       * include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
+       GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
+       GC_mark_stack_too_small, GC_mark_state): Ditto.
+       * include/private/gcconfig.h (GC_register_stackbottom): Ditto.
+       * include/private/pthread_support.h (GC_threads,
+       GC_thr_initialized, GC_in_thread_creation): Ditto.
+       * include/private/gc_priv.h: Ditto (for all global variables).
+
+2009-09-27  Ivan Maidanski <ivmai@mail.ru>
+
+       * real_malloc.c: Include private/config.h if HAVE_CONFIG_H.
+
+2009-09-27  Ivan Maidanski <ivmai@mail.ru>
+
+       * allchblk.c (GC_hblkfreelist): Define as STATIC.
+       * blacklst.c (GC_total_stack_black_listed): Ditto.
+       * include/private/gc_priv.h (GC_hblkfreelist, GC_stopped_mark,
+       GC_total_stack_black_listed, GC_push_stubborn_structures): Remove
+       declaration.
+       * mark_rts.c (GC_stopped_mark): Add declaration (only if
+       THREAD_LOCAL_ALLOC).
+       * allchblk.c (GC_fail_count): Move the declaration out of
+       GC_allochblk_nth(); remove "extern".
+       * alloc.c (IF_THREADS): Remove unused macro.
+       * alloc.c (GC_world_stopped): Define only if THREAD_LOCAL_ALLOC.
+       * alloc.c (GC_stopped_mark): Set GC_world_stopped value only if
+       THREAD_LOCAL_ALLOC.
+       * alloc.c (GC_bytes_found, GC_collection_in_progress,
+       GC_check_tls, GC_unmap_threshold, GC_force_unmap_on_gcollect):
+       Remove K&R-style "extern" for the declaration.
+       * dbg_mlc.c (GC_free_inner): Ditto.
+       * dyn_load.c (GC_repeat_read, GC_roots_present, GC_is_heap_base,
+       GC_get_next_stack, GC_no_win32_dlls, GC_wnt): Ditto.
+       * finalize.c (GC_fail_count): Ditto.
+       * include/private/gc_hdrs.h (GC_hdr_cache_hits,
+       GC_hdr_cache_misses): Ditto.
+       * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
+       GC_lock, GC_collecting, GC_mark_lock_holder, GC_need_to_lock):
+       Ditto.
+       * include/private/gc_pmark.h (GC_mark_procs, GC_n_mark_procs,
+       GC_mark_stack_size, GC_mark_stack_limit, GC_mark_stack_top,
+       GC_mark_stack, GC_mark_stack_too_small, GC_mark_state): Ditto.
+       * include/private/gc_priv.h (GC_current_warn_proc, GC_obj_kinds,
+       GC_n_kinds, GC_fo_entries, GC_n_heap_sects, GC_n_memory,
+       GC_page_size, GC_sysinfo, GC_black_list_spacing,
+       GC_objects_are_marked, GC_incremental, GC_dirty_maintained,
+       GC_root_size, GC_debugging_started, GC_large_alloc_warn_interval,
+       GC_large_alloc_warn_suppressed, GC_blocked_sp,
+       GC_activation_frame, GC_push_other_roots,
+       GC_push_finalizer_structures, GC_push_thread_structures,
+       GC_push_typed_structures, GC_start_call_back, GC_is_initialized,
+       GC_check_heap, GC_print_all_smashed, GC_print_all_errors,
+       GC_print_heap_obj, GC_have_errors, GC_print_stats,
+       GC_dump_regularly, GC_backtraces, GC_print_back_height,
+       GC_debug_generic_malloc_inner,
+       GC_debug_generic_malloc_inner_ignore_off_page,
+       GC_fl_builder_count, GC_mark_no, GC_help_marker,
+       GC_setup_temporary_fault_handler, GC_reset_fault_handler): Ditto.
+       * include/private/gcconfig.h (GC_SysVGetDataStart,
+       GC_FreeBSDGetDataStart, GC_register_stackbottom,
+       GC_MacTemporaryNewPtr, GC_amiga_get_mem): Ditto.
+       * include/private/pthread_support.h (GC_threads,
+       GC_thr_initialized, GC_in_thread_creation): Ditto.
+       * malloc.c (GC_text_mapping): Ditto.
+       * mallocx.c (GC_bytes_found): Ditto.
+       * mark.c (GC_check_dirty, GC_started_thread_while_stopped): Ditto.
+       * mark_rts.c (GC_save_regs_ret_val): Ditto.
+       * misc.c (GC_clear_stack_inner, GC_init_parallel, GC_init_win32,
+       GC_setpagesize, GC_init_linux_data_start,
+       GC_set_and_save_fault_handler, GC_unmap_threshold): Ditto.
+       * os_dep.c (GC_unmap_threshold, GC_push_all_stacks,
+       GC_darwin_register_mach_handler_thread): Ditto.
+       * pthread_support.c (GC_markers, GC_collection_in_progress):
+       Ditto.
+       * tests/test.c (GC_amiga_free_all_mem): Ditto.
+       * thread_local_alloc.c (GC_gcjobjfreelist,
+       GC_gcj_malloc_initialized, GC_gcj_kind): Ditto.
+       * win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init,
+       GC_fault_handler_lock, GC_write_cs, GC_markers): Ditto.
+       * misc.c (GC_read, GC_register_finalizer_no_order, GC_init_dyld):
+       Move the declaration out of GC_init(); remove "extern".
+       * os_dep.c (GC_abort): Add the comment; add workaround to suppress
+       compiler "unreachable code" warnings for ABORT callers (where
+       ABORT is followed by a dummy return statement).
+       * os_dep.c (GC_old_allocator): Move the declaration out of
+       GC_default_push_other_roots(); remove "extern".
+       * darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
+       Move the declaration out of GC_stop_world() and GC_start_world()
+       (only if MPROTECT_VDB); remove "extern".
+
+2009-09-27  Ivan Maidanski <ivmai@mail.ru>
+
+       * win32_threads.c (GC_get_stack_min, GC_push_stack_for,
+       GC_get_next_stack): Recognize _WIN32_WCE_EMULATION macro (used for
+       WinCE emulation and for custom WinCE 6 devices); add the comment.
+       * win32_threads.c (GC_get_stack_min): Cast pointer to word instead
+       of DWORD.
+       * win32_threads.c (GC_get_next_stack): Don't use and maintain the
+       latest known stack_min value for WinCE (if GC_get_stack_min is
+       defined as a macro); update the comments.
+       * win32_threads.c (GC_wnt): Don't declare for WinCE.
+
+2009-09-26  Ivan Maidanski <ivmai@mail.ru>
+
+       * Makefile.direct: Document EMPTY_GETENV_RESULTS.
+       * gcj_mlc.c (GC_clear_stack): Remove declaration.
+       * malloc.c (GC_clear_stack): Ditto.
+       * mallocx.c (GC_clear_stack): Ditto.
+       * typd_mlc.c (GC_clear_stack): Ditto.
+       * gcj_mlc.c (GENERAL_MALLOC, GENERAL_MALLOC_IOP): Rename to
+       GENERAL_MALLOC_INNER and GENERAL_MALLOC_INNER_IOP, respectively;
+       remove "lb" unnecessary cast to word.
+       * include/private/gc_priv.h (GC_clear_stack): Add declaration.
+       * include/private/gc_priv.h (GENERAL_MALLOC, GENERAL_MALLOC_IOP):
+       Move common declaration from typd_mlc.c and malloc.c; remove
+       unnecessary result and "lb" parameter casts.
+       * include/private/thread_local_alloc.h: Guard against duplicate
+       header file inclusion.
+       * os_dep.c (USE_MUNMAP): Replace "-->" with an error directive for
+       the case when USE_MMAP is not defined.
+       * pthread_support.c (GC_is_thread_tsd_valid): New internal
+       function (only if GC_ASSERTIONS and THREAD_LOCAL_ALLOC); move the
+       code from thread-local GC_malloc(); add FIXME for the condition.
+       * win32_threads.c (GC_is_thread_tsd_valid): Ditto.
+       * thread_local_alloc.c (GC_gcjobjfreelist): Change the type (to
+       match that of its definition).
+       * thread_local_alloc.c (GC_destroy_thread_local): Add a cast for
+       GC_gcjobjfreelist.
+       * thread_local_alloc.c (GC_lookup_thread, GC_lookup_thread_inner):
+       Remove unused declaration; don't include pthread.h.
+       * thread_local_alloc.c (GC_is_thread_tsd_valid): New declaration
+       (only if GC_ASSERTIONS).
+       * thread_local_alloc.c (GC_malloc): Use GC_is_thread_tsd_valid()
+       instead of GC_lookup_thread().
+       * win32_threads.c (GC_lookup_thread_inner): Define as STATIC.
+       * win32_threads.c (UNPROTECT): Rename to UNPROTECT_THREAD (to have
+       id different from that in os_dep.c).
+
+2009-09-26  Ivan Maidanski <ivmai@mail.ru>
+
+       * allchblk.c (GC_enough_large_bytes_left): Replace "inline static"
+       with GC_INLINE.
+       * include/private/gc_priv.h (fixed_getenv): Ditto.
+       * alloc.c (GC_max, GC_min): Replace "static INLINE" with
+       GC_INLINE.
+       * mark_rts.c (rt_hash): Ditto.
+       * win32_threads.c (GC_get_max_thread_index): Ditto.
+       * include/private/gc_priv.h (INLINE): Prefix with "GC_"; include
+       "static"; define for Sun CC; define for VC++ (and other
+       compilers).
+       * pthread_support.c: Don't define __inline__ for non-GNU compilers
+       (not needed anymore).
+
+2009-09-26  Ivan Maidanski <ivmai@mail.ru>
+
+       * NT_THREADS_MAKEFILE: Remove file (since it duplicates gc.mak).
+       * Makefile.in: Remove reference to NT_THREADS_MAKEFILE.
+       * Makefile.am: Ditto.
+       * Makefile.dj: Ditto.
+       * Makefile.direct: Ditto.
+       * doc/README.win32: Add reference to gc.mak.
+       * NT_X64_THREADS_MAKEFILE: Ditto.
+
+2009-09-26  Ivan Maidanski <ivmai@mail.ru>
+
+       * Makefile.in: Regenerate (by autoreconf -vif).
+       * aclocal.m4: Ditto.
+       * compile: Ditto.
+       * config.guess: Ditto.
+       * config.sub: Ditto.
+       * configure: Ditto.
+       * depcomp: Ditto.
+       * install-sh: Ditto.
+       * ltmain.sh: Ditto.
+       * missing: Ditto.
+       * mkinstalldirs: Ditto.
+       * include/private/config.h.in: New file (generated).
+       * Makefile.direct: Remove references to acinclude.m4, libtool.m4.
+
+2009-09-26  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
+
+       * autogen.sh: Update.
+
+2009-09-26  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
+
+       * Makefile.am: Don't add libtool.m4 to EXTRA_DIST.
+       * acinclude.m4: Fix underquoting of GC_SET_VERSION.
+       * README.QUICK: Update information for Makefile.
+       * Makefile.am: Do not distribute the substituted bdw-gc.pc.
+       * configure.ac: Add AM conditional analog to KEEP_BACK_PTRS.
+       * tests/tests.am: Use it here to conditionally enable tracetest
+       when possible.
+
+2009-09-26  Ivan Maidanski <ivmai@mail.ru>
+
+       * dyn_load.c (GC_wnt): Update the comment.
+       * dyn_load.c (GC_register_dynamic_libraries): Add the comment for
+       _WIN32_WCE_EMULATION; recognize GC_REGISTER_MEM_PRIVATE (new
+       macro); call GC_is_heap_base() only if check for Type succeeded.
+
+2009-09-26  Ivan Maidanski <ivmai@mail.ru>
+
+       * mark_rts.c (GC_is_tmp_root): Don't define unless NO_DEBUGGING;
+       update the comment.
+       * include/private/gc_priv.h (GC_is_tmp_root): Remove declaration.
+
+2009-09-26  Ivan Maidanski <ivmai@mail.ru>
+
+       * alloc.c: Expand all tabs to spaces; remove trailing spaces at
+       EOLn; remove multiple trailing blank lines.
+       * misc.c: Ditto.
+       * os_dep.c: Ditto.
+       * pthread_support.c: Ditto.
+       * include/private/gc_priv.h: Ditto.
+       * include/private/gcconfig.h: Ditto.
+
+2009-09-25  Hans Boehm <Hans.Boehm@hp.com>
+
+       * include/private/gcconfig.h (CANCEL_SAFE, IF_CANCEL): new macros.
+       * include/private/gc_priv.h (DISABLE_CANCEL, RESTORE_CANCEL,
+       ASSERT_CANCEL_DISABLED): New macros.
+       * alloc.c (GC_maybe_gc): Assert cancellation disabled.
+       (GC_collect_a_little_inner,GC_try_to_collect, GC_collect_or_expand):
+       Disable cancellation.
+       (GC_add_to_our_memory): Check for overflow.
+       * misc.c (GC_cancel_disable_count): declare.
+       (GC_init, GC_write): Disable cancellation.
+       (GC_init): Remove redundant GC_is_initialized test.
+       * os_dep.c (GC_repeat_read): Assert cancellation disabled.
+       (GC_get_stack_base): Disable cancellation.
+       * pthread_stop_world.c (GC_suspend_handler_inner): Disable
+       cancellation.
+       * pthread_support.c (GC_mark_thread): Permanently disable
+       cancellation.
+       (GC_wait_for_gc_completion, GC_wait_builder, GC_wait_marker):
+       Assert cancellation disabled.
+       (fork handling): Disable cancellation, fix comment.
+       (GC_pthread_create): Disable cancellation.
+       (GC_unregister_my_thread): Disable cancellation.
+       * Makefile.direct: Document NO_CANCEL_SAFE.
+
+2009-09-25  Ivan Maidanski <ivmai@mail.ru>
+
+       * Makefile: Remove outdated file (Makefile.direct should be used
+       instead).
+
+2009-09-25  Ivan Maidanski <ivmai@mail.ru>
+
+       * win32_threads.c: Reformat the code (make indentation and
+       opening bracket style uniform across the file; wrap long code and
+       comment lines).
+
+2009-09-25  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/gc.h (GC_use_DllMain): Refine (and reformat) the
+       comment.
+
+2009-09-25  Ivan Maidanski <ivmai@mail.ru> (really mostly Petter Urkedal)
+
+       * configure.ac: Add documentation to AC_DEFINE for GC_THREADS and
+       EMPTY_GETENV_RESULTS.
+       * configure.ac: Fix a typo.
+       * Makefile.am: Ditto.
+
+2009-09-25  Ivan Maidanski <ivmai@mail.ru>
+
+       * checksums.c (GC_checksum, GC_update_check_page): Remove
+       "register" keyword in local variable declarations (for the code
+       used only for debugging or which is not time-critical).
+       * dbg_mlc.c (GC_has_other_debug_info, GC_store_debug_info,
+       GC_store_debug_info_inner, GC_check_annotated_obj, GC_print_obj,
+       GC_print_smashed_obj, GC_debug_end_stubborn_change,
+       GC_debug_invoke_finalizer): Ditto.
+       * dyn_load.c (GC_register_dynamic_libraries): Ditto.
+       * mallocx.c (GC_realloc): Ditto.
+       * mark_rts.c (GC_print_static_roots, GC_is_static_root,
+       GC_clear_roots): Ditto.
+       * misc.c (GC_write): Ditto.
+       * os_dep.c (GC_print_callers): Ditto.
+       * dyn_load.c (GC_register_dynamic_libraries): Rename "i" local
+       variable to "j" for the nested loop (just not to hide the similar
+       variable in the outer one).
+       * mark_rts.c (GC_print_static_roots): Output an error message
+       using GC_err_printf() (instead of GC_printf()).
+
+2009-09-25  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
+
+       * configure.ac: Move include flag from ${INCLUDE} ...
+       * Makefile.am: ... to AM_CPPFLAGS and also add the build directory.
+       * configure.ac: Call AM_CONFIG_HEADER([include/private/config.h]).
+       * configure.ac: Add documentation to all AC_DEFINE either directly
+       or using AH_TEMPLATE.
+
+2009-09-24  Ivan Maidanski <ivmai@mail.ru>
+
+       * win32_threads.c (GC_waitForSingleObjectInfinite): New static
+       function (only if GC_WINMAIN_REDIRECT).
+       * win32_threads.c (WinMain): Call GC_waitForSingleObjectInfinite()
+       thru GC_do_blocking() instead of calling WaitForSingleObject()
+       directly.
+
+2009-09-24  Ivan Maidanski <ivmai@mail.ru>
+
+       * pthread_support.c (start_mark_threads): Refine printed message.
+       * win32_threads.c (GC_thr_init): Ditto.
+       * win32_threads.c: Reformat some code pieces (wrap too long code
+       lines).
+
+2009-09-24  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai145.diff)
+
+       * Makefile.direct (GC_WINMAIN_REDIRECT): Add the comment for.
+       * Makefile.direct (NO_GETENV): Update the comment.
+       * include/gc.h (GC_WINMAIN_WINCE_LPTSTR): Remove macro.
+       * include/gc.h (GC_WinMain): Remove declaration.
+       * include/gc.h (WinMain): Define (as GC_WinMain) if and only if
+       GC_WINMAIN_REDIRECT.
+       * tests/test.c (GC_COND_INIT): Define as GC_INIT() also in case of
+       WinCE target unless GC_WINMAIN_REDIRECT is defined.
+       * tests/test.c (WINMAIN_LPTSTR): New macro.
+       * tests/test.c (WinMain): Use WINMAIN_LPTSTR instead of LP[W]STR
+       and GC_WINMAIN_WINCE_LPTSTR.
+       * win32_threads.c (start_mark_threads): Add the comment for
+       MARK_THREAD_STACK_SIZE.
+       * win32_threads.c: Recognize new GC_WINMAIN_REDIRECT macro.
+       * win32_threads.c (WINMAIN_LPTSTR, WINMAIN_THREAD_STACK_SIZE): New
+       macro (only if GC_WINMAIN_REDIRECT).
+       * win32_threads.c: Undefine WinMain macro if GC_WINMAIN_REDIRECT.
+       * win32_threads.c (GC_WinMain): Add prototype (only if
+       GC_WINMAIN_REDIRECT).
+       * win32_threads.c (main_thread_args, WinMain): Rename
+       GC_WINMAIN_WINCE_LPTSTR to WINMAIN_LPTSTR.
+       * win32_threads.c (WinMain): Call GC_INIT() instead of GC_init();
+       use WINMAIN_THREAD_STACK_SIZE.
+       * win32_threads.c (WinMain): Call GC_deinit() and
+       DeleteCriticalSection() only if WinCE; add FIXME.
+
+2009-09-24  Ivan Maidanski <ivmai@mail.ru>
+
+       * os_dep.c (GC_get_main_stack_base): add assertion for mem_base
+       value returned by GC_get_stack_base().
+
+2009-09-23  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai150.diff)
+
+       * Makefile.direct (MUNMAP_THRESHOLD, GC_FORCE_UNMAP_ON_GCOLLECT):
+       Add the comment for.
+       * alloc.c (GC_unmap_threshold, GC_force_unmap_on_gcollect):
+       Declare external variable (only if USE_MUNMAP).
+       * alloc.c (GC_try_to_collect): Temporarily set GC_unmap_threshold
+       value to 1 if GC_force_unmap_on_gcollect and restore it before
+       unlocking (only if USE_MUNMAP).
+       * doc/README.environment (GC_FORCE_UNMAP_ON_GCOLLECT): Add
+       information for.
+       * include/gc.h (GC_set_force_unmap_on_gcollect,
+       GC_get_force_unmap_on_gcollect): New public function prototype.
+       * include/gc.h (GC_FORCE_UNMAP_ON_GCOLLECT): New macro is
+       recognized.
+       * misc.c (GC_FORCE_UNMAP_ON_GCOLLECT): Ditto.
+       * include/gc.h (GC_INIT_CONF_FORCE_UNMAP_ON_GCOLLECT): New
+       internal macro (used by GC_INIT only).
+       * misc.c (GC_force_unmap_on_gcollect): New global variable.
+       * misc.c (GC_init): Recognize new "GC_FORCE_UNMAP_ON_GCOLLECT"
+       environment variable (and set GC_force_unmap_on_gcollect).
+       * misc.c (GC_set_force_unmap_on_gcollect,
+       GC_get_force_unmap_on_gcollect): New public function.
+       * tests/test.c (window_proc): Call GC_set_force_unmap_on_gcollect
+       to force the mode on if WM_HIBERNATE; restore the mode after
+       GC_gcollect().
+
+2009-09-23  Ivan Maidanski <ivmai@mail.ru>
+
+       * Makefile.direct (LARGE_CONFIG): Update information.
+       * include/gc.h (GC_stop_func): Refine the comment.
+
+2009-09-21  Ivan Maidanski <ivmai@mail.ru>
+
+       * configure.ac: Use EMPTY_GETENV_RESULTS instead of NO_GETENV for
+       Win32 (workaround for Wine bug).
+
+2009-09-20  Ivan Maidanski <ivmai@mail.ru>
+
+       * allchblk.c (GC_freehblk): Adjust local variables indentation.
+       * mallocx.c (GC_generic_malloc_many): Ditto.
+       * typd_mlc.c (GC_malloc_explicitly_typed_ignore_off_page,
+       GC_calloc_explicitly_typed): Ditto.
+       * typd_mlc.c (GC_make_array_descriptor): Remove unnecessary
+       brackets.
+
+2009-09-20  Ivan Maidanski <ivmai@mail.ru>
+
+       * configure.ac: Replace GC_WIN32_THREADS with GC_THREADS.
+       * configure.ac: Process enable_parallel_mark option for Cygwin and
+       Win32; define THREAD_LOCAL_ALLOC for Win32.
+
+2009-09-20  Ivan Maidanski <ivmai@mail.ru>
+
+       * include/private/gc_priv.h: Define AO_ASSUME_WINDOWS98 if
+       PARALLEL_MARK (required for VC++ x86).
+
+2009-09-19  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai149.diff)
+
+       * dbg_mlc.c (GC_generate_random_backtrace): Call
+       GC_try_to_collect(GC_never_stop_func) instead of GC_gcollect();
+       if GC is disabled then print error message and return.
+       * include/gc.h (GC_try_to_collect): Refine the comment.
+       * include/private/gc_priv.h (GC_never_stop_func): Fix return type;
+       refine the comment.
+
+2009-09-19  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai147.diff)
+
+       * add_gc_prefix.c: Move the file to the new "extra" directory.
+       * AmigaOS.c: Ditto.
+       * gcname.c: Ditto.
+       * if_mach.c: Ditto.
+       * if_not_there.c: Ditto.
+       * MacOS.c: Ditto.
+       * msvc_dbg.c: Ditto.
+       * setjmp_t.c: Ditto.
+       * threadlibs.c: Ditto.
+       * EMX_MAKEFILE: Prepend setjmp_t.c with "extra" directory.
+       * Makefile: Prepend AmigaOS.c, MacOS.c, add_gc_prefix.c, gcname.c,
+       if_mach.c, if_not_there.c, msvc_dbg.c, setjmp_t.c, threadlibs.c
+       with "extra" directory.
+       * Makefile.am: Ditto.
+       * Makefile.direct: Ditto.
+       * Makefile.dj: Ditto.
+       * Makefile.in: Ditto.
+       * NT_MAKEFILE: Prepend msvc_dbg.obj with "extra" directory.
+       * NT_STATIC_THREADS_MAKEFILE: Ditto.
+       * NT_X64_STATIC_THREADS_MAKEFILE: Ditto.
+       * NT_X64_THREADS_MAKEFILE: Ditto.
+       * NT_THREADS_MAKEFILE: Prepend msvc_dbg.c with "extra" directory.
+       * gc.mak: Ditto.
+       * PCR-Makefile: Prepend if_mach.c, if_not_there.c with "extra"
+       directory.
+       * SMakefile.amiga: Prepend AmigaOS.c, setjmp_t.c with "extra"
+       directory.
+       * doc/simple_example.html: Update for threadlibs.c.
+       * os_dep.c: Prepend included AmigaOS.c with "extra" directory.
+
+2009-09-19  Ivan Maidanski <ivmai@mail.ru>
+
+       * allchblk.c: Expand all tabs to spaces; remove trailing spaces at
+       EOLn; remove multiple trailing blank lines.
+       * mark.c: Ditto.
+       * mark_rts.c: Ditto.
+       * pthread_stop_world.c: Ditto.
+       * win32_threads.c: Ditto.
+       * include/gc.h: Ditto.
+       * include/private/gc_priv.h: Ditto.
+       * pthread_stop_world.c: Add copyright header.
+       * include/gc.h: Reformat some comments.
+
+2009-09-19  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai130a.diff, ivmai130b.diff - superseding diff44, diff69)
+
+       * include/gc.h (GC_do_blocking, GC_call_with_gc_active): New
+       function prototype.
+       * include/private/gc_priv.h (STOP_WORLD): Replace a no-op (for the
+       single-threaded case) with an assertion check for the state to be
+       not a "do-blocking" one.
+       * include/private/gc_priv.h (blocking_data): Move the structure
+       definition from pthread_support.c; change "fn" return type to void
+       pointer.
+       * include/private/gc_priv.h (GC_activation_frame_s): New structure
+       type.
+       * include/private/gc_priv.h (GC_push_all_stack_frames): New
+       function declaration (only if THREADS).
+       * include/private/gc_priv.h (GC_world_stopped): Don't declare
+       unless THREADS.
+       * include/private/gc_priv.h (GC_blocked_sp,
+       GC_activation_frame_s): New declaration (only if not THREADS).
+       * include/private/gc_priv.h (GC_push_all_register_frames): New
+       function declaration (only for IA-64).
+       * include/private/gc_priv.h (NURSERY, GC_push_proc): Remove
+       obsolete (unused) symbols.
+       * include/private/gc_priv.h (GC_push_all_stack_partially_eager):
+       Remove declaration (since it is static now).
+       * mark_rts.c (GC_push_all_stack_partially_eager): Move from mark.c
+       (for code locality) and make STATIC.
+       * mark_rts.c (GC_push_all_register_frames): New function (only for
+       IA-64).
+       * mark_rts.c (GC_push_all_stack_frames): New function (only if
+       THREADS).
+       * mark_rts.c (GC_add_trace_entry): New function prototype (used by
+       GC_push_all_stack_partially_eager(), only if TRACE_BUF).
+       * mark_rts.c (GC_push_all_stack_part_eager_frames): New function.
+       * mar_rts.c (GC_save_regs_ret_val): Move the declaration out of a
+       function body (only for IA-64).
+       * mark_rts.c (GC_push_current_stack): Call
+       GC_push_all_stack_part_eager_frames() instead of
+       GC_push_all_stack_partially_eager().
+       * mark_rts.c (GC_push_current_stack): Call
+       GC_push_all_register_frames() instead of GC_push_all_eager() for
+       IA-64 backing store.
+       * misc.c (GC_do_blocking_inner): Declare function (if THREADS
+       only).
+       * misc.c (GC_blocked_sp, GC_blocked_register_sp,
+       GC_activation_frame): New global variables (only if not THREADS).
+       * misc.c (GC_call_with_gc_active, GC_do_blocking_inner): New API
+       function (only if not THREADS).
+       * misc.c (GC_do_blocking): Move the function from
+       pthread_support.c.
+       * include/private/pthread_support.h (GC_Thread_Rep): Add
+       "activation_frame" field.
+       * pthread_stop_world.c (GC_push_all_stacks): Call
+       GC_push_all_stack_frames() and GC_push_all_register_frames instead
+       of GC_push_all_stack() and/or GC_push_all_eager(); don't check for
+       STACK_GROWS_UP here.
+       * pthread_support.c (GC_do_blocking_inner): Remove "static"; store
+       "fn" result back to "client_data" field.
+       * pthread_support.c (GC_call_with_gc_active): New API function.
+       * win32_threads.c (GC_call_with_gc_active): Ditto.
+       * win32_threads.c (GC_Thread_Rep): Add "thread_blocked_sp" and
+       "activation_frame" fields.
+       * win32_threads.c (GC_new_thread): Add assertion checking for
+       thread_blocked_sp is NULL.
+       * win32_threads.c (GC_do_blocking_inner): New function.
+       * win32_threads.c (GC_stop_world): Don't suspend a thread if its
+       thread_blocked_sp is non-NULL.
+       * win32_threads.c (GC_push_stack_for): Use thread
+       "activation_frame" (if non-NULL); use "thread_blocked_sp" if
+       non-NULL (instead of calling GetThreadContext()); "UNPROTECT" the
+       thread before modifying its last_stack_min; call
+       GC_push_all_stack_frames() instead of GC_push_all_stack(); update
+       the comments.
+
+2009-09-19  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai129.diff - superseding diff47)
+
+       * alloc.c (GC_default_stop_func): New static variable (initialized
+       to GC_never_stop_func).
+       * alloc.c (GC_set_stop_func, GC_get_stop_func): New function.
+       * alloc.c (GC_timeout_stop_func): Define as GC_default_stop_func
+       (instead of GC_never_stop_func) if SMALL_CONFIG (or NO_CLOCK),
+       else call GC_default_stop_func() before getting "current_time".
+       * alloc.c (GC_maybe_gc): Expand GC_gcollect_inner() macro (for
+       FIXME comment).
+       * alloc.c (GC_maybe_gc, GC_collect_a_little_inner): add FIXME for
+       replacing GC_never_stop_func with GC_default_stop_func (if
+       possible).
+       * alloc.c (GC_gcollect): Use GC_default_stop_func.
+       * alloc.c (GC_collect_or_expand): Use GC_default_stop_func
+       (instead of GC_never_stop_func) unless it is trigged due to out of
+       memory; don't increment GC_fail_count and don't output warning
+       (before trying to collect again) in case the collection has been
+       interrupted (by GC_default_stop_func) and the heap expansion has
+       failed too.
+       * include/gc.h (GC_set_stop_func, GC_get_stop_func): New function
+       prototypes.
+
+2009-09-19  Ivan Maidanski <ivmai@mail.ru>
+
+       * os_dep.c (GC_get_stack_base): Add FIXME; add assertion for
+       GC_get_writable_length() result.
+
+2009-09-18  Ivan Maidanski <ivmai@mail.ru> (really Ludovic Courtes)
+
+       * configure.ac: Don't use -lpthread -ldl for Cygwin.
+
+2009-09-18  Ivan Maidanski <ivmai@mail.ru>
+
+       * NT_THREADS_MAKEFILE: Make it back equal to gc.mak.
+
+2009-09-18  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai142.diff)
+
+       * include/private/gcconfig.h (GWW_VDB): Undefine if
+       USE_GLOBAL_ALLOC (since incompatible).
+       * os_dep.c (GetWriteWatch_alloc_flag): Define as 0 unless GWW_VDB
+       is defined.
+       * os_dep.c (GC_unmap_threshold): Declare (for use in
+       GC_init_win32) if USE_MUNMAP.
+       * os_dep.c (GC_init_win32): Turn off memory unmapping if
+       GlobalAlloc() is used.
+       * os_dep.c (GC_win32_get_mem): Define and use new
+       VIRTUAL_ALLOC_PAD macro; don't waste a extra memory page unless
+       MPROTECT_VDB is in use.
+
+2009-09-17  Ivan Maidanski <ivmai@mail.ru>
+
+       * Makefile: Replace "version.h" with "include/gc_version.h".
+       * include/gc_version.h: Ditto.
+
+2009-09-17  Ivan Maidanski <ivmai@mail.ru>
+
+       * alloc.c (GC_collect_or_expand): Output heap size in WARN()
+       (before returning FALSE) for convenience.
+
+2009-09-17  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai139.diff)
+
+       * allchblk.c (GC_allochblk_nth): Use GC_PRIdPTR in WARN() format
+       string.
+       * pthread_support.c (start_mark_threads, GC_thr_init): Ditto.
+       * win32_threads.c (GC_delete_thread): Ditto.
+       * include/private/gc_priv.h (GC_PRIdPTR): New macro.
+       * pthread_stop_world.c (GC_suspend_handler_inner): Remove
+       unnecessary cast for WARN argument.
+       * pthread_support.c (start_mark_threads): if pthread_create()
+       failed then don't try to create other marker threads and (after
+       printing a warning) adjust GC_markers and GC_parallel values; log
+       GC_markers value (possibly adjusted) after that.
+
+2009-09-16  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai140.diff)
+
+       * win32_threads.c (start_mark_threads): if pthread_create() is
+       failed then don't try to create other marker threads and (after
+       printing a warning) adjust GC_markers and GC_parallel values.
+       * win32_threads.c (mark_mutex_event, builder_cv, mark_cv): Move
+       the definition upper (to be visible in start_mark_threads()).
+       * win32_threads.c (start_mark_threads): if CreateThread() or
+       _beginthreadex() is failed then don't try to create other marker
+       threads and (after printing a warning) adjust GC_markers,
+       GC_parallel values, and destroy the event objects (either only
+       some for the uncreated threads if DONT_USE_SIGNALANDWAIT or all if
+       not a single thread is created).
+       * win32_threads.c (GC_thr_init): Log GC_markers value (possibly
+       adjusted) after start_mark_threads() call.
+
+2009-09-16  Ivan Maidanski <ivmai@mail.ru>
+
+       * Makefile.am: Back remove "GC_" prefix for PTHREADS,
+       DARWIN_THREADS, WIN32_THREADS (for configure.ac).
+
+2009-09-16  Ivan Maidanski <ivmai@mail.ru>
+
+       * ChangeLog: Remove trailing spaces at EOLn; insert blank lines
+       where missed.
+       * doc/README: Expand all tabs to spaces; remove trailing spaces at
+       EOLn; remove multiple trailing blank lines.
+       * doc/README.autoconf: Ditto.
+       * doc/README.DGUX386: Ditto.
+       * doc/README.environment: Ditto.
+       * doc/README.macros: Ditto.
+       * doc/README.win32: Ditto.
+       * tests/test.c: Ditto.
+       * tests/test_cpp.cc: Ditto.
+       * backgraph.c: Ditto.
+       * blacklst.c: Ditto.
+       * checksums.c: Ditto.
+       * darwin_stop_world.c: Ditto.
+       * dbg_mlc.c: Ditto.
+       * dyn_load.c: Ditto.
+       * finalize.c: Ditto.
+       * gc_dlopen.c: Ditto.
+       * gcj_mlc.c: Ditto.
+       * headers.c: Ditto.
+       * mach_dep.c: Ditto.
+       * malloc.c: Ditto.
+       * mallocx.c: Ditto.
+       * new_hblk.c: Ditto.
+       * obj_map.c: Ditto.
+       * ptr_chck.c: Ditto.
+       * real_malloc.c: Ditto.
+       * reclaim.c: Ditto.
+       * stubborn.c: Ditto.
+       * thread_local_alloc.c: Ditto.
+       * typd_mlc.c: Ditto.
+       * gc_cpp.cc: Ditto.
+       * include/gc_allocator.h: Ditto.
+       * include/gc_backptr.h: Ditto.
+       * include/gc_config_macros.h: Ditto.
+       * include/gc_cpp.h: Ditto.
+       * include/gc_gcj.h: Ditto.
+       * include/gc_inline.h: Ditto.
+       * include/gc_mark.h: Ditto.
+       * include/gc_pthread_redirects.h: Ditto.
+       * include/gc_typed.h: Ditto.
+       * include/gc_version.h: Ditto.
+       * include/javaxfc.h: Ditto.
+       * include/new_gc_alloc.h: Ditto.
+       * include/private/darwin_semaphore.h: Ditto.
+       * include/private/dbg_mlc.h: Ditto.
+       * include/private/gc_hdrs.h: Ditto.
+       * include/private/gc_locks.h: Ditto.
+       * include/private/gc_pmark.h: Ditto.
+       * include/private/gcconfig.h: Ditto.
+       * include/private/pthread_support.h: Ditto.
+       * include/private/thread_local_alloc.h: Ditto.
+       * darwin_stop_world.c: Add copyright header.
+       * include/gc_backptr.h: Ditto.
+       * include/gc_config_macros.h: Ditto.
+       * include/gc_pthread_redirects.h: Ditto.
+       * include/gc_version.h: Ditto.
+       * include/javaxfc.h: Ditto.
+       * include/private/darwin_semaphore.h: Ditto.
+       * include/private/pthread_support.h: Ditto.
+       * gc_cpp.cc: Make copyright header uniform across the package.
+       * include/gc_cpp.h: Ditto.
+
+2009-09-16  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
+       (gc_config_h_6a.patch with a minor correction)
+
+       * include/private/gc_priv.h: Change include of config.h to
+       private/config.h.
+       * include/private/gc_pmark.h: Ditto.
+       * gc_cpp.cc: Ditto.
+       * tests/test.c: Ditto.
+       * tests/test_cpp.cc: Include private/config.h (if HAVE_CONFIG_H);
+       undefine GC_BUILD.
+
+2009-09-16  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai128.diff - superseding diff62, diff66 partly)
+
+       * finalize.c (GC_general_register_disappearing_link): Return
+       GC_SUCCESS, GC_DUPLICATE, GC_NO_MEMORY (instead of 0, 1 and 2,
+       respectively).
+       * include/gc.h (GC_NO_MEMORY): New macro (defined as 2).
+       * include/gc.h (GC_register_disappearing_link,
+       GC_general_register_disappearing_link): Update the comment.
+       * typd_mlc.c (GC_calloc_explicitly_typed): Use GC_NO_MEMORY macro.
+       * finalize.c (GC_general_register_disappearing_link,
+       GC_register_finalizer_inner): Recalculate the hash table index
+       after GC_oom_fn succeeded (since the table may grow while not
+       holding the lock) and check again that the entry is still not in
+       the table (free the unused entry otherwise unless DBG_HDRS_ALL).
+       * finalize.c (GC_register_finalizer_inner): Initialize "hhdr"
+       local variable (to prevent a compiler warning).
+       * finalize.c (GC_register_finalizer_inner): Don't modify the data
+       pointed by "ocd" and "ofn" in GC_register_finalizer_inner() failed
+       (due to out of memory).
+
+2009-09-16  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai124.diff - superseding diff67 partly)
+
+       * alloc.c (GC_set_fl_marks, GC_clear_fl_marks): Transform loop to
+       suppress compiler "variable might be uninitialized" warnings.
+
+2009-09-16  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai138.diff)
+
+       * Makefile.direct (DONT_USE_SIGNALANDWAIT): Add the comment for.
+       * win32_threads.c (DONT_USE_SIGNALANDWAIT): Always define for
+       WinCE.
+       * win32_threads.c (THREAD_HANDLE): Cast Id (of DWORD type) to
+       HANDLE thru word type (to avoid a compiler warning) for WinCE.
+       * win32_threads.c (GC_marker_cv, GC_marker_Id): New static array
+       (only if DONT_USE_SIGNALANDWAIT).
+       * win32_threads.c (start_mark_threads): Initialize GC_marker_Id
+       and GC_marker_cv for each helper thread (only if
+       DONT_USE_SIGNALANDWAIT).
+       * win32_threads.c (GC_mark_mutex_state): New static variable (only
+       if DONT_USE_SIGNALANDWAIT).
+       * win32_threads.c (GC_mark_mutex_waitcnt,
+       signalObjectAndWait_func): Don't define if DONT_USE_SIGNALANDWAIT.
+       * win32_threads.c (GC_acquire_mark_lock, GC_release_mark_lock):
+       Use InterlockedExchange() over GC_mark_mutex_state (instead of
+       AO_fetch_and_add()) if DONT_USE_SIGNALANDWAIT.
+       * win32_threads.c (GC_wait_marker, GC_notify_all_marker):
+       Implement wait/broadcast primitives using Win32 multiple events
+       (one for each marker thread) if DONT_USE_SIGNALANDWAIT (instead of
+       using Win32 SignalObjectAndWait).
+       * win32_threads.c (GC_thr_init): Don't declare hK32 local
+       variable, don't check for GC_wnt, and don't initialize
+       signalObjectAndWait_func if DONT_USE_SIGNALANDWAIT.
+
+2009-09-16  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai127.diff - superseding diff49)
+
+       * alloc.c (GC_finish_collection): Call GC_print_finalization_stats
+       if GC_print_stats (after getting "done_time").
+       * finalize.c (GC_old_dl_entries): New static variable (only if not
+       SMALL_CONFIG).
+       * finalize.c (GC_finalize): Save current GC_dl_entries value (only
+       if not SMALL_CONFIG).
+       * finalize.c (GC_print_finalization_stats): Define if and only if
+       not SMALL_CONFIG; use GC_old_dl_entries value; use GC_log_printf()
+       instead of GC_printf(); use "%lu" (instead of "%u") print format
+       specifier; use unsigned long type for "ready" counter (for LP64
+       targets).
+       * misc.c (GC_dump): No longer call GC_print_finalization_stats()
+       here (since it is called from GC_finish_collection()).
+       * misc.c (STACKBASE): Remove unused macro undef (for NOSYS and
+       ECOS).
+
+2009-09-16  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai134.diff)
+
+       * alloc.c (GC_expand_hp): Replace GC_init_inner() call with
+       GC_init() one.
+       * malloc.c (GC_alloc_large, GC_generic_malloc_inner): Ditto.
+       * mallocx.c (GC_generic_malloc_many): Ditto.
+       * misc.c (GC_enable_incremental): Ditto.
+       * alloc.c (GC_expand_hp): Update the comment.
+       * mark.c (GC_obj_kinds): Ditto.
+       * win32_threads.c (GC_allow_register_threads): Ditto.
+       * private/gc_priv.h (GC_init_inner): Remove function declaration.
+       * misc.c (GC_init_inner): Replace with public GC_init().
+
+2009-09-16  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai126.diff)
+
+       * gcj_mlc.c (GC_gcj_fake_mark_proc): New static function.
+       * gcj_mlc.c (GC_init_gcj_malloc): If mp is 0 then supply
+       GC_gcj_fake_mark_proc (aborting with the appropriate message)
+       instead.
+
+2009-09-16  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai125.diff)
+
+       * os_dep.c (GC_wince_get_mem): If VirtualAlloc() returns NULL (due
+       to out of memory) then don't increment GC_n_heap_bases and don't
+       call VirtualAlloc() again (with MEM_COMMIT).
+       * os_dep.c (GC_remap): Abort with a more informatory message if
+       VirtualAlloc() fails due to out of memory; update FIXME.
+
+2009-09-16  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai132.diff - superseding diff41a, diff64, diff84 partly)
+
+       * Makefile: Fix typo for msvc_dbg.c.
+       * Makefile.direct: Ditto.
+       * Makefile.am: Prefix PTHREADS, DARWIN_THREADS, WIN32_THREADS with
+       "GC_".
+       * Makefile.dj: Don't reference remove files (nursery.c,
+       gc_nursery.h, gc_copy_descr.h).
+       * NT_MAKEFILE: Don't define __STDC__ macro (no longer used).
+       * NT_STATIC_THREADS_MAKEFILE: Ditto.
+       * NT_THREADS_MAKEFILE: Ditto.
+       * NT_X64_STATIC_THREADS_MAKEFILE: Ditto.
+       * NT_X64_THREADS_MAKEFILE: Ditto.
+       * gc.mak: Ditto.
+       * NT_MAKEFILE: Remove unnecessary -DGC_BUILD (since it is always
+       defined in the source files).
+       * NT_THREADS_MAKEFILE: Ditto.
+       * NT_X64_THREADS_MAKEFILE: Ditto.
+       * gc.mak: Ditto.
+       * NT_X64_THREADS_MAKEFILE: Fix typo for -DGC_NOT_DLL.
+       * NT_STATIC_THREADS_MAKEFILE: Replace GC_WIN32_THREADS with
+       GC_THREADS.
+       * NT_THREADS_MAKEFILE: Ditto.
+       * NT_X64_STATIC_THREADS_MAKEFILE: Ditto.
+       * NT_X64_THREADS_MAKEFILE: Ditto.
+       * gc.mak: Ditto.
+       * NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE to suppress the
+       compiler warnings.
+       * NT_STATIC_THREADS_MAKEFILE: Ditto.
+       * NT_X64_STATIC_THREADS_MAKEFILE: Place -D_CRT_SECURE_NO_DEPRECATE
+       before "$*.C" (and "$*.CPP").
+       * NT_X64_THREADS_MAKEFILE: Ditto.
+
+2009-09-16  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai131.diff - superseding diff83, diff84 partly)
+
+       * doc/README.solaris2: Replace GC_SOLARIS_THREADS with GC_THREADS.
+       * doc/README.win32: Replace GC_WIN32_THREADS with GC_THREADS.
+       * doc/README.win64: Add info about mingw-w64; add note for VC++
+       warnings suppression.
+
+2009-09-15  Hans Boehm <Hans.Boehm@hp.com> (Mostly Juan Jose Garcia-Ripoll)
+       (Also similar to, but not the same as, Ivan's diff104_cvs)
+
+       * os_dep.c (GC_forward_exception): Fix logic in several places.
+       (OSX-specific)
+
+2009-09-15  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai137v2.diff)
+
+       * include/private/gc_priv.h (MAX_HEAP_SECTS): Guard with ifndef.
+
+2009-09-14  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai136v2.diff)
+
+       * Makefile.direct: Copy missing information for -DSHORT_DBG_HDRS
+       from Makefile.
+       * Makefile: Remove the information about "define arguments" (which
+       is incomplete and outdated compared to that in Makefile.direct);
+       add help reference to Makefile.direct.
+       * Makefile.dj: Ditto.
+
+2009-09-14  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai135.diff)
+
+       * alloc.c (world_stopped_total_time, world_stopped_total_divisor):
+       Replace "STATIC" with "static" in the definition (since the
+       symbols aren't prefixed with "GC_").
+       * win32_threads.c (marker_sp, marker_bsp, marker_last_stack_min,
+       start_mark_threads, mark_mutex, builder_cv, mark_cv,
+       mark_mutex_event, signalObjectAndWait_func, main_thread_start):
+       Ditto.
+       * pthread_support.c (GC_wait_builder): Define as STATIC.
+       * win32_threads.c (GC_wait_builder): Ditto.
+
+2009-09-14  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai133.diff)
+
+       * misc.c (GC_get_heap_size_inner, GC_get_free_bytes_inner): New
+       API function.
+       * include/gc_pmark.h (GC_get_heap_size_inner,
+       GC_get_free_bytes_inner): New function declaration.
+
+2009-09-10  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai121.diff)
+
+       * include/gc.h: Recognize __CEGCC__ (as a synonym for _WIN32_WCE).
+       * include/gc_config_macros.h: Ditto.
+       * include/gc.h (GC_MAXIMUM_HEAP_SIZE): Recognize new macro.
+       * include/gc.h (GC_INIT_CONF_MAXIMUM_HEAP_SIZE): New macro (for
+       internal use).
+       * include/gc_config_macros.h: Always include stddef.h if GCC.
+       * include/gc_config_macros.h (GC_API): Define for CeGCC in the
+       same way as for MinGW.
+       * include/gc_config_macros.h (GC_API): Group the definition for
+       all cases together (check for GC_DLL only once).
+       * include/gc_pthread_redirects.h: Group non-Darwin code together.
+       * tests/test.c: Recognize GC_PRINT_VERBOSE_STATS (only if GC_DLL).
+
+2009-09-10  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai120a.diff, ivmai120b.diff)
+
+       * Makefile.direct (GC_PTHREADS_PARAMARK, GC_IGNORE_GCJ_INFO,
+       GC_PRINT_VERBOSE_STATS, GC_DONT_EXPAND, GC_INITIAL_HEAP_SIZE,
+       GC_FREE_SPACE_DIVISOR, GC_TIME_LIMIT, GC_FULL_FREQ): Add the
+       comment for.
+       * misc.c (GC_init_inner): Recognize GC_PRINT_VERBOSE_STATS (new
+       macro).
+       * dyn_load.c (GC_wnt): Change definition to TRUE for WinCE; add
+       FIXME and the comment for WinCE.
+       * gcj_mlc.c (GC_init_gcj_malloc): Recognize GC_IGNORE_GCJ_INFO
+       (new macro).
+       * include/gc.h (GC_HAVE_BUILTIN_BACKTRACE): Don't define for VC++
+       WinCE (since backtrace() is unimplemented).
+       * include/private/gc_priv.h (GC_n_heap_bases): Remove declaration
+       (since static).
+       * os_dep.c (GC_n_heap_bases): Define as STATIC; move the
+       definition to be above GC_is_heap_base().
+       * include/private/gcconfig.h: Don't define NOSYS for WinCE on ARM
+       (both for MinGW and CeGCC toolchains).
+       * include/private/gcconfig.h: Recognize __CEGCC__ and
+       __MINGW32CE__ (as synonyms for __WIN32_WCE).
+       * include/private/gcconfig.h: If SH4 then don't set config
+       parameters for SH.
+       * include/private/thread_local_alloc.h (GC_key_create): Don't
+       abort on failures, just return -1 in these cases (this also
+       prevents compilation error for targets where ABORT is defined
+       indirectly as an inline assembler sequence).
+       * mark.c (WRAP_MARK_SOME): Also define for WinCE; add FIXME for
+       the GCC-based cross-compiler.
+       * mark.c (ext_ex_regn, mark_ex_handler): Don't define unless
+       WRAP_MARK_SOME is defined; define also for WinCE case; don't
+       check for _WIN64 (since WRAP_MARK_SOME is undefined for it).
+       * mark.c (GC_mark_some): Use __try/__except also for WinCE; update
+       the comment.
+       * misc.c: Include signal.h after gc_pmark.h included; check for
+       MSWINCE instead of _WIN32_WCE.
+       * misc.c (GC_init_inner): Remove duplicate GC_setpagesize() call.
+       * misc.c: Don't include <crtdbg.h> for WinCE targets.
+       * misc.c (GC_write): Define _MAX_PATH if undefined (workaround for
+       CeGCC toolchain).
+       * misc.c (GC_write): Use OutputDebugStringW() instead of
+       _CrtDbgReport() for WinCE targets.
+       * os_dep.c (GC_least_described_address): Define as STATIC.
+       * os_dep.c (GC_register_data_segments): Fix code indentation.
+       * os_dep.c (GC_wince_get_mem): Initialize "result" local variable
+       (to prevent a compiler warning).
+       * os_dep.c (GC_dirty_init): Add comment for WinCE target.
+       * tests/test.c: Don't include winbase.h directly if GCC for WinCE,
+       include assert.h instead.
+       * tests/test.c (tiny_reverse_test): Define and use
+       TINY_REVERSE_UPPER_VALUE macro (4 if VERY_SMALL_CONFIG else 10);
+       useful for WinCE.
+       * win32_threads.c (GC_Thread_Rep): Don't declare "handle" field
+       for WinCE (since thread Id is used as a "real" thread handle).
+       * win32_threads.c (THREAD_HANDLE): New macro.
+       * win32_threads.c (GC_register_my_thread_inner): Don't recognize
+       DONT_IMPORT_GETCURTHREAD anymore; don't record thread handle on
+       WinCE.
+       * Makefile.direct (DONT_IMPORT_GETCURTHREAD): Remove comment for.
+       * win32_threads.c (UNPROTECT, GC_fault_handler_lock): Don't check
+       for MSWINCE.
+       * win32_threads.c (GC_delete_gc_thread, GC_delete_thread): Don't
+       close thread handle on WinCE (since it's a thread Id).
+       * win32_threads.c (GC_suspend): Don't check for MSWINCE in the
+       MPROTECT-related code (for the case if MPROTECT_VDB would be
+       implemented for WinCE).
+       * win32_threads.c (GC_suspend, GC_start_world, GC_push_stack_for):
+       Use THREAD_HANDLE(t) to obtain thread handle.
+       * win32_threads.c (GC_PTHREADS_PARAMARK): New macro recognized;
+       implicitly define GC_PTHREADS_PARAMARK if GC_PTHREADS; include
+       pthread.h; define NUMERIC_THREAD_ID(id) if undefined yet; replace
+       GC_PTHREADS with GC_PTHREADS_PARAMARK where appropriate (for the
+       parallel mark support).
+       * win32_threads.c (start_mark_threads): Use int type for "i" local
+       variable (instead of "unsigned") to prevent a compiler warning.
+       * win32_threads.c (start_mark_threads): Don't check CreateThread()
+       result for -1; call CloseHandle() for the handle created by
+       CreateThread() (on WinCE); don't use errno (since errno.h is
+       missing on some targets like WinCE) when printing warning on a
+       marker thread creation failure.
+       * win32_threads.c (signalObjectAndWait_func): Define for WinCE.
+       * win32_threads.c (GC_wait_marker): Remove unnecessary assertion
+       for non-zero signalObjectAndWait_func (to make the code compilable
+       for WinCE).
+       * win32_threads.c (GC_thr_init): Allow PARALLEL_MARK for WinCE;
+       use GC_sysinfo to get processors count if WinCE; don't check for
+       SignalObjectAndWait() if WinCE; replace GC_PTHREADS with
+       GC_PTHREADS_PARAMARK.
+       * win32_threads.c (GC_thr_init): Recognize GC_MIN_MARKERS new
+       macro (useful for testing parallel marking on WinCE).
+       * win32_threads.c (GC_win32_start, main_thread_start): Define as
+       STATIC.
+       * win32_threads.c: Don't define main_thread_args,
+       main_thread_start(), WinMain() for WinCE if GC_DLL.
+       * win32_threads.c (WINCE_MAIN_STACK_SIZE): Remove useless macro
+       (since the stack size parameter is ignored on WinCE).
+       * win32_threads.c (main_thread_start): Remove forward declaration;
+       place its definition before WinMain() one.
+       * win32_threads.c (WinMain): Abort if GC_CreateThread() or
+       WaitForSingleObject() failed (for the main thread).
+
+2009-09-10  Ivan Maidanski <ivmai@mail.ru>
+       (diff118_cvs - superseding diff53)
+
+       * allchblk.c (MUNMAP_THRESHOLD): Move macro definition out of
+       a function.
+       * allchblk.c (GC_unmap_threshold): New global variable definition
+       (initialized to MUNMAP_THRESHOLD).
+       * allchblk.c (GC_unmap_old): Use GC_unmap_threshold instead of
+       MUNMAP_THRESHOLD; skip unmapping if GC_unmap_threshold is 0.
+       * doc/README.environment (GC_UNMAP_THRESHOLD): Add information.
+       * misc.c (GC_unmap_threshold): New variable declaration.
+       * misc.c (GC_init_inner): Recognize "GC_UNMAP_THRESHOLD"
+       environment variable to set GC_unmap_threshold value (only if
+       USE_MUNMAP).
+
+2009-09-10  Ivan Maidanski <ivmai@mail.ru>
+       (diff117)
+
+       * dbg_mlc.c (OFN_UNSET): New macro (to detect
+       GC_register_finalizer() failures).
+       * dbg_mlc.c (store_old): Add a check for register_finalizer()
+       failure caused by an out-of-memory event (leave *ofn and *ocd
+       unmodified in that case).
+       * dbg_mlc.c (GC_debug_register_finalizer,
+       GC_debug_register_finalizer_no_order,
+       GC_debug_register_finalizer_unreachable,
+       GC_debug_register_finalizer_ignore_self): Initialize my_old_fn
+       to OFN_UNSET; clear *ocd and *ofn for non-heap objects (the same
+       as in GC_register_finalizer_inner()).
+
+2009-09-10  Ivan Maidanski <ivmai@mail.ru>
+       (diff116a, diff116b, diff116c)
+
+       * Makefile.direct (GC_DLL): Add the comment for.
+       * doc/README.macros: Fix a typo.
+       * doc/README.macros (_DLL, GC_DLL, GC_NOT_DLL): Update info.
+       * doc/README.macros (__STDC__): Remove info.
+       * dbg_mlc.c (GC_get_back_ptr_info, GC_generate_random_heap_address,
+       GC_generate_random_valid_address, GC_print_backtrace,
+       GC_generate_random_backtrace, GC_register_describe_type_fn): Add
+       GC_API and GC_CALL to function definition.
+       * malloc.c (GC_generic_malloc): Ditto.
+       * mallocx.c (GC_incr_bytes_allocd, GC_incr_bytes_freed): Ditto.
+       * mark.c (GC_mark_and_push): Ditto.
+       * misc.c (GC_new_free_list_inner, GC_new_free_list,
+       GC_new_kind_inner, GC_new_kind, GC_new_proc_inner, GC_new_proc):
+       Ditto.
+       * include/gc_backptr.h (GC_get_back_ptr_info,
+       GC_generate_random_heap_address, GC_generate_random_valid_address,
+       GC_generate_random_backtrace, GC_print_backtrace): Add GC_API and
+       GC_CALL to function prototype.
+       * include/gc_mark.h (GC_mark_and_push, GC_new_free_list,
+       GC_new_free_list_inner, GC_new_kind, GC_new_kind_inner,
+       GC_new_proc, GC_new_proc_inner, GC_generic_malloc,
+       GC_register_describe_type_fn): Ditto.
+       * include/new_gc_alloc.h (GC_incr_bytes_allocd, GC_incr_mem_freed,
+       GC_generic_malloc_words_small): Ditto.
+       * gc_cpp.cc: Include "config.h" (if HAVE_CONFIG_H defined).
+       * include/private/gc_pmark.h: Ditto.
+       * include/private/gc_priv.h: Ditto.
+       * tests/test.c: Ditto.
+       * gc_cpp.cc: Define GC_BUILD.
+       * include/private/gc_pmark.h: Ditto.
+       * include/private/gc_priv.h: Ditto.
+       * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): New macro.
+       * gc_dlopen.c (dlopen): Add GC_API to the wrapper function
+       definition.
+       * pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
+       GC_pthread_join, GC_pthread_detach, pthread_sigmask, pthread_join,
+       pthread_detach, pthread_create): Ditto.
+       * win32_threads.c (GC_pthread_join, GC_pthread_create,
+       GC_pthread_sigmask, GC_pthread_detach): Ditto.
+       * gc_dlopen.c (dlopen): Use WRAP_FUNC and REAL_FUNC macros.
+       * include/gc_backptr.h: Include "gc.h".
+       * include/gc_backptr.h: Use extern "C" for the exported functions.
+       * include/gc_mark.h: Ditto.
+       * include/gc_config_macros.h (GC_THREADS): Define the macro if any
+       GC_XXX_THREADS is defined.
+       * include/gc_config_macros.h (_PTHREADS, _POSIX4A_DRAFT10_SOURCE):
+       Move the definitions below the place where GC_NETBSD_THREADS and
+       GC_DGUX386_THREADS are defined.
+       * include/gc_config_macros.h (GC_DLL): Don't define (even if _DLL
+       is defined) for GCC.
+       * include/gc_config_macros.h (GC_API): Define for Cygwin (in the
+       same way as for VC++); define for GCC v4+ (other than already
+       recognized MinGW/Cygwin) as a "default" visibility attribute if
+       GC_DLL is defined.
+       * include/gc_config_macros.h (GC_ATTR_MALLOC, GC_ATTR_ALLOC_SIZE):
+       New macro.
+       * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
+       GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
+       GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
+       GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
+       GC_debug_malloc_atomic, GC_debug_strdup,
+       GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
+       GC_debug_malloc_ignore_off_page,
+       GC_debug_malloc_atomic_ignore_off_page,
+       GC_debug_malloc_replacement): Add GC_ATTR_MALLOC attribute.
+       * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
+       GC_gcj_malloc_ignore_off_page): Ditto.
+       * include/gc.h (GC_malloc, GC_malloc_atomic,
+       GC_malloc_uncollectable, GC_malloc_stubborn,
+       GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
+       GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
+       GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
+       GC_debug_malloc_stubborn, GC_debug_malloc_ignore_off_page,
+       GC_debug_malloc_atomic_ignore_off_page,
+       GC_debug_malloc_replacement: Add GC_ATTR_ALLOC_SIZE attribute
+       (for the first argument).
+       * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
+       GC_gcj_malloc_ignore_off_page): Ditto.
+       * include/gc.h (GC_memalign, GC_realloc, GC_debug_realloc,
+       GC_debug_realloc_replacement): Add GC_ATTR_ALLOC_SIZE attribute
+       (for the second argument).
+       * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
+       GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
+       GC_malloc_atomic_uncollectable, GC_free, GC_base, GC_size,
+       GC_realloc, GC_expand_hp, GC_set_max_heap_size,
+       GC_exclude_static_roots, GC_add_roots, GC_remove_roots,
+       GC_register_displacement, GC_debug_register_displacement,
+       GC_try_to_collect, GC_malloc_ignore_off_page,
+       GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
+       GC_debug_malloc_atomic, GC_debug_strdup,
+       GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
+       GC_debug_malloc_ignore_off_page,
+       GC_debug_malloc_atomic_ignore_off_page, GC_debug_free,
+       GC_debug_realloc, GC_debug_malloc_replacement,
+       GC_debug_realloc_replacement, GC_finalization_proc,
+       GC_register_finalizer, GC_debug_register_finalizer,
+       GC_register_finalizer_ignore_self,
+       GC_debug_register_finalizer_ignore_self,
+       GC_register_finalizer_no_order,
+       GC_debug_register_finalizer_no_order,
+       GC_register_finalizer_unreachable,
+       GC_debug_register_finalizer_unreachable,
+       GC_register_disappearing_link,
+       GC_general_register_disappearing_link,
+       GC_unregister_disappearing_link, GC_noop1, GC_warn_proc,
+       GC_set_warn_proc, GC_ignore_warn_proc, GC_fn_type,
+       GC_call_with_alloc_lock, GC_stack_base_func,
+       GC_call_with_stack_base, GC_same_obj, GC_pre_incr, GC_post_incr,
+       GC_is_visible, GC_is_valid_displacement, GC_same_obj_print_proc,
+       GC_is_valid_displacement_print_proc, GC_is_visible_print_proc,
+       GC_malloc_many, GC_CreateThread, GC_beginthreadex,
+       GC_endthreadex): Comment out (or remove if single and meaningless)
+       function argument names (to avoid identifiers out of the name
+       space).
+       * include/gc_gcj.h (GC_init_gcj_malloc, GC_gcj_malloc,
+       GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Ditto.
+       * include/gc.h (GC_try_to_collect): Update the comment.
+       * include/gc.h (GC_size, GC_register_my_thread): Add const
+       qualifier for the argument referent.
+       * misc.c (GC_size): Ditto.
+       * pthread_support.c (GC_register_my_thread_inner,
+       GC_register_my_thread): Ditto.
+       * win32_threads.c (GC_register_my_thread_inner,
+       GC_register_my_thread): Ditto.
+       * include/gc.h (GC_INIT_CONF_ROOTS): New macro for internal use
+       (define instead of GC_INIT() for Cygwin and AIX).
+       * include/gc.h (GC_DONT_EXPAND, GC_MAX_RETRIES,
+       GC_FREE_SPACE_DIVISOR, GC_FULL_FREQ, GC_TIME_LIMIT, GC_IGNORE_WARN,
+       GC_INITIAL_HEAP_SIZE): Recognize new macro.
+       * include/gc.h (GC_INIT_CONF_DONT_EXPAND, GC_INIT_CONF_MAX_RETRIES,
+       GC_INIT_CONF_FREE_SPACE_DIVISOR, GC_INIT_CONF_FULL_FREQ,
+       GC_INIT_CONF_TIME_LIMIT, GC_INIT_CONF_IGNORE_WARN,
+       GC_INIT_CONF_INITIAL_HEAP_SIZE): New macro for internal use.
+       * include/gc.h (GC_INIT): Use GC_INIT_CONF_XXX macros.
+       * include/gc_mark.h: Prefix GC_H with '_'.
+       * include/gc_mark.h (GC_least_plausible_heap_addr,
+       GC_greatest_plausible_heap_addr, GC_debug_header_size): Use GC_API
+       for the public variable declaration.
+       * include/new_gc_alloc.h (GC_objfreelist_ptr, GC_aobjfreelist_ptr,
+       GC_uobjfreelist_ptr, GC_auobjfreelist_ptr): Ditto.
+       * include/gc_pthread_redirects.h (GC_pthread_create,
+       GC_pthread_sigmask, GC_dlopen, GC_pthread_join, GC_pthread_detach):
+       Use GC_API for the wrapper prototype.
+       * include/gc_pthread_redirects.h (pthread_create, pthread_join,
+       pthread_detach, pthread_sigmask, dlopen): Undefine unconditionally
+       before redirecting.
+       * include/new_gc_alloc.h: Replace GC_incr_mem_freed() with
+       GC_incr_bytes_freed(); remove FIXME.
+       * include/private/gc_priv.h (GC_make_closure,
+       GC_debug_invoke_finalizer, GC_noop): Remove GC_API for the private
+       function.
+       * tests/test.c (GC_print_stats): Handle GC_DLL case regardless of
+       the target.
+
+2009-09-10  Ivan Maidanski <ivmai@mail.ru>
+       (diff115)
+
+       * finalize.c (GC_general_register_disappearing_link,
+       GC_register_finalizer_inner): Remove unnecessary "ifdef THREADS"
+       guard for LOCK/UNLOCK().
+       * finalize.c (GC_general_register_disappearing_link,
+       GC_register_finalizer_inner): Get GC_oom_fn value before releasing
+       the lock (to prevent data races).
+       * gcj_mlc.c (GC_gcj_malloc, GC_debug_gcj_malloc,
+       GC_gcj_malloc_ignore_off_page): Ditto.
+       * mallocx.c (GC_generic_malloc_ignore_off_page): Ditto.
+       * include/gc_inline.h (GC_FAST_MALLOC_GRANS): Use GC_get_oom_fn()
+       instead of GC_oom_fn (to prevent data races).
+       * malloc.c (GC_generic_malloc): Ditto.
+       * mallocx.c (GC_memalign): Ditto.
+       * pthread_support.c (pthread_create): Ditto.
+       * gcj_mlc.c (maybe_finalize): Acquire the lock before setting
+       last_finalized_no value to prevent data races.
+       * include/gc.h (GC_gc_no, GC_get_gc_no, GC_oom_fn, GC_set_oom_fn,
+       GC_set_find_leak, GC_set_finalize_on_demand,
+       GC_set_java_finalization, GC_set_finalizer_notifier,
+       GC_set_dont_expand, GC_set_full_freq, GC_set_non_gc_bytes,
+       GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
+       GC_set_dont_precollect, GC_set_time_limit, GC_warn_proc): Refine
+       the comment.
+       * misc.c (GC_set_oom_fn): Ditto.
+       * include/gc.h (GC_general_register_disappearing_link): Refine the
+       comment (replace "soft" word with "weak").
+       * misc.c (GC_oom_fn, GC_get_gc_no, GC_get_parallel,
+       GC_set_finalizer_notifier, GC_set_find_leak): Add the comment.
+       * misc.c (GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
+       GC_get_finalizer_notifier): Use LOCK/UNLOCK to prevent data races.
+
+2009-09-10  Ivan Maidanski <ivmai@mail.ru>
+       (diff114a, diff114b, diff114c)
+
+       * dbg_mlc.c: Guard include <errno.h> with ifndef MSWINCE; include
+       "private/dbg_mlc.h" before it.
+       * malloc.c: Ditto.
+       * dbg_mlc.c (GC_debug_strdup): Use memcpy() instead of strcpy()
+       for WinCE (since deprecated); evaluate strlen() only once; don't
+       set errno for WinCE.
+       * malloc.c (GC_strdup): Ditto.
+       * dyn_load.c (GC_wnt): Define as macro (FALSE) for WinCE.
+       * include/gc.h (GC_unregister_my_thread): Refine the comment.
+       * include/gc.h (GC_uintptr_t, GC_beginthreadex, GC_endthreadex):
+       Don't declare for WinCE.
+       * include/gc.h (GC_WINMAIN_WINCE_LPTSTR): New macro (WinCE only).
+       * include/gc.h (GC_WinMain): Remove GC_API.
+       * include/gc.h (GC_WinMain): Use GC_WINMAIN_WINCE_LPTSTR for
+       lpCmdLine.
+       * tests/test.c (GC_WinMain): Ditto.
+       * win32_threads.c (main_thread_args, GC_WinMain): Ditto.
+       * include/gc_config_macros.h (ptrdiff_t): Guard with
+       ifndef _PTRDIFF_T_DEFINED; define _PTRDIFF_T_DEFINED macro.
+       * include/private/gc_locks.h: Guard include "atomic_ops.h" with
+       ifdef GC_PTHREADS (and not GC_WIN32_THREADS).
+       * mark.c: Include "atomic_ops.h" if PARALLEL_MARK.
+       * thread_local_alloc.c: Include "atomic_ops.h" if GC_GCJ_SUPPORT.
+       * win32_threads.c: Include "atomic_ops.h" if MPROTECT_VDB.
+       * include/private/gc_locks.h: Use include "atomic_ops.h" instead
+       of include <atomic_ops.h>.
+       * include/private/gc_priv.h: Ditto.
+       * include/private/gc_locks.h (GC_allocate_ml, GC_need_to_lock):
+       Don't export (replace GC_API to "extern").
+       * win32_threads.c (GC_allocate_ml): Don't export.
+       * include/private/gc_priv.h (DebugBreak): Define as macro for
+       WinCE (if not UNDER_CE and DebugBreak is not defined yet).
+       * include/private/gc_priv.h (UNALIGNED): Rename to UNALIGNED_PTRS
+       (since "UNALIGNED" is defined in winnt.h of WinCE).
+       * mark.c (UNALIGNED): Ditto.
+       * include/private/gcconfig.h (ARM32): Recognize _M_ARM and _ARM_.
+       * include/private/gcconfig.h (ALIGNMENT): Check always defined.
+       * include/private/gcconfig.h: Allow GC_WIN32_THREADS for WinCE.
+       * include/private/thread_local_alloc.h: Define USE_WIN32_SPECIFIC
+       for WinCE (since __declspec(thread) is unsupported).
+       * include/private/thread_local_alloc.h (TLS_OUT_OF_INDEXES):
+       Define for WinCE (if undefined).
+       * malloc.c (GC_malloc): Remove outdated comment about disabling
+       signals.
+       * misc.c: Don't include <tchar.h> (since not used anymore and may
+       break TEXT() macro defined in winnt.h).
+       * misc.c (GC_init_inner): Don't use GetModuleHandle() and
+       InitializeCriticalSectionAndSpinCount() for WinCE.
+       * misc.c (GC_init_inner): Replace GetModuleHandleA() with
+       GetModuleHandle() (and use TEXT() macro controlled by UNICODE).
+       * misc.c (LOG_FILE): Remove unused macro; don't use _T() macro.
+       * misc.c (GC_CreateLogFile): New static function (Win32/WinCE
+       only); move the code from GC_write(); replace GETENV() with
+       GetEnvironmentVariable(); replace CreateFileA() with
+       CreateFile(); use TEXT() macro (for Unicode support); replace
+       strcat() with memcpy() (since deprecated in WinCE).
+       * misc.c (GC_write): Define as STATIC.
+       * win32_threads.c (GC_attached_thread): Ditto.
+       * misc.c (GC_write): Use GC_CreateLogFile().
+       * misc.c: Define vsnprintf macro as StringCchVPrintfA for WinCE.
+       * misc.c (GC_abort): Try to invoke MessageBoxA() dynamically
+       (Win32 only) if DONT_USE_USER32_DLL is defined.
+       * misc.c (GC_abort): Duplicate msg to GC log file (for Win32 and
+       WinCE).
+       * misc.c (GC_abort): Use a more user-friendly abort if
+       NO_DEBUGGING (Win32 only).
+       * os_dep.c: Include "atomic_ops.h" only if MPROTECT_VDB (and
+       THREADS).
+       * os_dep.c (detect_GetWriteWatch): Use TEXT() for GetModuleHandle
+       (for Unicode support); check GetModuleHandle() result.
+       * tests/test.c: Don't define assert for WinCE (since may be
+       redefined by "assert.h" included from libatomic_ops).
+       * tests/test.c (FAIL): Define as ABORT for all targets (except
+       for PCR).
+       * tests/test.c (n_tests): Don't use AO_t.
+       * tests/test.c (check_heap_stats): Don't cast n_tests.
+       * tests/test.c (inc_int_counter): New function (for n_tests atomic
+       incrementation).
+       * tests/test.c (run_one_test): Test GC_memalign() for all targets.
+       * tests/test.c (run_one_test): Avoid unbalanced brackets in
+       #if-#else-#endif blocks.
+       * tests/test.c (run_one_test): Replace AO_fetch_and_add1() and
+       private LOCK/UNLOCK with GC_call_with_alloc_lock(inc_int_counter).
+       * tests/test.c (check_heap_stats): Replace
+       "if (sizeof(char *) > 4)" with "#if CPP_WORDSZ == 64" to suppress
+       "unreachable code" compiler warning.
+       * tests/test.c (WinMain): Set cmd type to LPWSTR (for WinCE
+       "UNDER_CE" mode); else use LPSTR type (for Win32 and WinCE).
+       * tests/test.c (thr_window): Replace "L" string prefix with
+       TEXT().
+       * thread_local_alloc.c: Check THREADS is defined (to prevent other
+       compiler errors and warnings otherwise).
+       * tests/test.c (WinMain): Recognize GC_NO_DLLMAIN macro (for
+       GC_use_DllMain()).
+       * Makefile.direct (GC_NO_DLLMAIN, DONT_IMPORT_GETCURTHREAD): Add
+       the comments for.
+       * win32_threads.c (GC_register_my_thread_inner): Recognize
+       DONT_IMPORT_GETCURTHREAD macro.
+       * win32_threads.c: Recognize GC_NO_DLLMAIN macro (to exclude
+       DllMain support if needed).
+       * win32_threads.c (GC_NO_DLLMAIN): Define implicitly if DllMain
+       thread registration is unsupported for a given configuration.
+       * win32_threads.c (GC_use_DllMain): Update the comment; refine
+       ABORT message.
+       * win32_threads.c (GC_use_DllMain,
+       GC_started_thread_while_stopped, GC_register_my_thread_inner,
+       GC_lookup_thread_inner, GC_delete_gc_thread,
+       GC_allow_register_threads, GC_lookup_pthread,
+       GC_push_thread_structures, GC_stop_world, GC_push_all_stacks):
+       Check for GC_NO_DLLMAIN.
+       * win32_threads.c (GC_Thread_Rep.tm_in_use, GC_attached_thread,
+       DllMain): Don't define if GC_NO_DLLMAIN.
+       * win32_threads.c (GC_stop_world): Declare "i" and "max" local
+       vars only if not GC_NO_DLLMAIN (to suppress compiler warning).
+       * win32_threads.c (GC_mark_thread, start_mark_threads): Use
+       CreateThread() instead of _beginthreadex() for WinCE.
+       * win32_threads.c (MARK_THREAD_STACK_SIZE, WINCE_MAIN_STACK_SIZE):
+       New macros defined (used by start_mark_threads(), WinMain()).
+       * win32_threads.c (GC_thr_init): Exclude parallel-specific code on
+       WinCE for now (since getenv(), GetProcessAffinityMask() and
+       SignalObjectAndWait() are missing on WinCE).
+       * win32_threads.c (GC_thr_init): replace GetModuleHandleA() with
+       GetModuleHandle(); replace CreateEventA() with CreateEvent(); use
+       TEXT() macro (for Unicode support).
+
+2009-09-10  Ivan Maidanski <ivmai@mail.ru>
+       (diff113)
+
+       * include/gc.h (GC_has_static_roots_func): New typedef (user filter
+       callback).
+       * include/gc.h (GC_register_has_static_roots_callback): Use
+       GC_has_static_roots_func type.
+       * dyn_load.c (GC_has_static_roots,
+       GC_register_has_static_roots_callback): Ditto.
+       * dyn_load.c (GC_has_static_roots,
+       GC_register_has_static_roots_callback): Define on all platforms.
+       * dyn_load.c (GC_register_dynlib_callback,
+       GC_register_dynamic_libraries, GC_init_dyld): Replace K&R-style
+       functions definition with the ANSI C one.
+       * dyn_load.c (GC_register_dynlib_callback): Use new local variable
+       "callback" (initialized from GC_has_static_roots) to minimize data
+       races.
+       * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr,
+       GC_cond_add_roots): Define as STATIC.
+       * mark_rts.c (GC_remove_roots_inner): Ditto.
+       * dyn_load.c (GC_dyld_image_add): Don't call GC_add_roots() for
+       sections smaller than pointer size (just to avoid acquiring the
+       lock unnecessarily).
+       * dyn_load.c (GC_dyld_name_for_hdr): Define unconditionally (not
+       only for DARWIN_DEBUG).
+       * dyn_load.c (GC_dyld_image_add): Replace GC_add_roots() call with
+       LOCK + GC_add_roots_inner() + UNLOCK.
+       * dyn_load.c (GC_dyld_image_add): Call GC_has_static_roots() user
+       callback (if set) holding the lock; if it returns 0 then don't call
+       GC_add_roots_inner() for that region.
+       * dyn_load.c (GC_register_has_static_roots_callback): Put
+       "callback" value to GC_has_static_roots on all platforms.
+       * dyn_load.c (GC_has_static_roots): Update the comments.
+       * include/gc.h (GC_exclude_static_roots, GC_add_roots,
+       GC_remove_roots, GC_register_has_static_roots_callback): Ditto.
+       * include/private/gc_priv.h (struct roots): Ditto.
+       * include/private/gc_priv.h (GC_remove_roots_inner): Move prototype
+       to mark_rts.c and declare it as STATIC.
+       * include/private/gc_priv.h (GC_exclude_static_roots_inner): New
+       prototype.
+       * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Use
+       GC_exclude_static_roots_inner() instead of GC_exclude_static_roots.
+       * misc.c (GC_init_inner): Ditto.
+       * mark_rts.c (GC_exclude_static_roots_inner): New function (move
+       all the code from GC_exclude_static_roots(); add the comment.
+       * mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots_inner):
+       add alignment assertion for the lower bound; add assertion for the
+       lower bound to be less than the upper one.
+       * mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots): Adjust
+       the upper bound (round down to be of a pointer-aligned value);
+       return in case of an empty range.
+       * mark_rts.c (GC_exclude_static_roots): Acquire the lock and call
+       GC_exclude_static_roots_inner().
+       * mark_rts.c (GC_remove_roots): Quickly check the bounds and return
+       in case of a do-nothing case (before acquiring the lock).
+
+2009-09-10  Ivan Maidanski <ivmai@mail.ru>
+       (diff112)
+
+       * finalize.c (GC_fail_count): New external variable declaration.
+       * finalize.c (GC_reset_finalizer_nested,
+       GC_check_finalizer_nested): New function declarations (if THREADS
+       only).
+       * finalize.c (GC_finalizer_nested, GC_finalizer_skipped): New
+       static global variables (used internally by GC_finalize() and
+       GC_check_finalizer_nested()).
+       * finalize.c (GC_check_finalizer_nested): New static function
+       definition (only if not THREADS, used internally by
+       GC_notify_or_invoke_finalizers() to minimize the probability of
+       a deep recursion when a client finalizer tries to allocate GC
+       memory).
+       * finalize.c (GC_finalize): Reset GC_finalizer_nested value (or
+       call GC_reset_finalizer_nested()) if last heap expansion failed.
+       * finalize.c (GC_notify_or_invoke_finalizers): Access GC_gc_no,
+       GC_finalizer_now, GC_finalize_on_demand, GC_finalizer_notifier,
+       last_finalizer_notification variables holding the lock (to avoid
+       data races).
+       * finalize.c (GC_finalizer_notifier): Add comment.
+       * finalize.c (GC_notify_or_invoke_finalizers): Add "quick" check
+       for an empty finalization queue (only if THREADS and not
+       KEEP_BACK_PTRS/MAKE_BACK_GRAPH).
+       * finalize.c (GC_notify_or_invoke_finalizers): Call
+       GC_check_finalizer_nested() and skip GC_invoke_finalizers() call
+       if appropriate.
+       * include/private/pthread_support.h (GC_Thread_Rep): Add unsigned
+       finalizer_nested and finalizer_skipped fields (for internal use
+       by the multi-threaded GC_check_finalizer_nested()).
+       * win32_threads.c (GC_Thread_Rep): Ditto.
+       * pthread_support.c (GC_reset_finalizer_nested,
+       GC_check_finalizer_nested): New function definitions (the
+       multi-threaded variants of that in finalize.c).
+       * win32_threads.c (GC_reset_finalizer_nested,
+       GC_check_finalizer_nested): Ditto.
+
+2009-09-10  Ivan Maidanski <ivmai@mail.ru>
+       (diff103_cvs - resembling diff78, diff88_cvs, diff99_cvs,
+       diff100_cvs, diff101_cvs, diff102_cvs)
+
+       * alloc.c (GC_stopped_mark): Remove GC_log_printf("") (not needed
+       anymore and GCC produces a warning for it).
+       * alloc.c (GC_stopped_mark): Adjust printf argument type
+       specifier.
+       * backgraph.c: Include dbg_mlc.h before ifdef MAKE_BACK_GRAPH (for
+       the case when the configuration information comes from aconfig
+       file).
+       * checksums.c: Ditto (for gc_priv.h and CHECKSUMS, respectively).
+       * include/gc_allocator.h (GC_ATTR_UNUSED): Use "__unused__"
+       keyword instead of "unused".
+       * include/gc_allocator.h: Fix typos in comments.
+       * thread_local_alloc.c: Ditto.
+       * include/javaxfc.h (GC_finalize_all): Update comment.
+       * include/private/gc_priv.h (GC_API_PRIV): New macro (defined as
+       GC_API and serves only as a marker for the private but exported
+       symbols used by test.c only).
+       * include/private/gc_priv.h (GC_abort, GC_arrays, GC_is_marked,
+       GC_printf, GC_err_printf, GC_log_printf): Replace GC_API decl with
+       GC_API_PRIV one.
+       * include/private/gc_priv.h (GC_fo_entries): Don't export it
+       outside a DLL.
+       * include/private/gc_priv.h (GC_ATTR_FORMAT_PRINTF): New macro
+       designated to check the arguments correctness of printf-like
+       functions (currently works only for GCC v3+).
+       * include/private/gc_priv.h (GC_printf, GC_err_printf,
+       GC_log_printf): Use GC_ATTR_FORMAT_PRINTF attribute.
+
 2009-09-03  Hans Boehm <Hans.Boehm@hp.com> (really Loren J. Rittle)
 
        * dyn_load.c (HAVE_DL_ITERATE_PHDR): Break definition from use.
        Define for FreeBSD 7.0+.
-       
+
 2009-09-02  Hans Boehm <Hans.Boehm@hp.com> (with help from Victor Ivrii and
-                                           others)     
+                                           others)
 
        * mach_dep.c: Don't include ucontext.h with NO_GETCONTEXT.
 
        between blocks.
        (GC_split_block): Remove dead code setting hb_flags.  Add comment.
        (GC_allochblk): Split blocks also in generational-only mode.
-       * os_dep.c (GC_unmap_gap): Dont really use munmap.
+       * os_dep.c (GC_unmap_gap): Don't really use munmap.
 
 2009-08-08  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
        (Mistakenly omitted from last check-in)
+
        * include/private/gc_priv.h (GC_unmapped_bytes): Define as 0 for
        not USE_MUNMAP case.
 
 2009-08-07  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
-       diff111 (supersedes diff101_cvs which, in turn, resembles diff52, diff75, diff83 partly)
+       diff111 (supersedes diff101_cvs which, in turn, resembles diff52,
+       diff75, diff83 partly)
 
        * Makefile.direct (MARK_BIT_PER_OBJ, PRINT_BLACK_LIST,
        USE_PROC_FOR_LIBRARIES): Fix typo in the comments.
        diff100_cvs (diff51 and diff55, partly)
 
        * pthread_support.c (GC_allow_register_threads): New API function.
-        * win32_threads.c (GC_allow_register_threads): Ditto.
-        * include/gc.h (GC_allow_register_threads): New API prototype.
-        * include/gc.h (GC_register_my_thread, GC_unregister_my_thread):
-        Update the comments.
-        * pthread_support.c (GC_register_my_thread): Check the collector
-        is in the multi-threaded mode.
-        * win32_threads.c (GC_register_my_thread): Ditto.
-       
+       * win32_threads.c (GC_allow_register_threads): Ditto.
+       * include/gc.h (GC_allow_register_threads): New API prototype.
+       * include/gc.h (GC_register_my_thread, GC_unregister_my_thread):
+       Update the comments.
+       * pthread_support.c (GC_register_my_thread): Check the collector
+       is in the multi-threaded mode.
+       * win32_threads.c (GC_register_my_thread): Ditto.
+
 2009-07-10  Hans Boehm <Hans.Boehm@hp.com>
 
        * finalize.c (GC_finalize_all): Always call GC_invoke_finalizers
        instead, following Ivan's original patch.
 
 2009-06-20  Hans Boehm <Hans.Boehm@hp.com>
-       
+
        * allchblk.c (GC_allochblk_nth): Add assertion.
        * checksums.c: Add GC_record_fault, GC_was_faulted,
        CC_n_faulted_dirty_errors.
        * os_dep.c (GC_remove_protection): Compute index correctly.
 
 2009-06-12  Hans Boehm <Hans.Boehm@hp.com>
-       
+
        * include/gc_version.h, configure.ac, doc/README:
        Change to version 7.2alpha3.
        * configure: Regenerate.
 [7.2alpha2]
 
 2009-06-12  Hans Boehm <Hans.Boehm@hp.com>
-       
+
        * include/gc_version.h, configure.ac, doc/README:
        Change to version 7.2alpha2.
        * configure: Regenerate.
        diff98_cvs(resembling diff3, diff27, diff59, diff61, diff66,
        diff73 partly)
 
-        * dbg_mlc.c (GC_print_smashed_obj): Convert a group of printf()
-        calls into a single one (for output atomicity).
-        * typd_mlc.c (GC_calloc_explicitly_typed): Don't declare and use
-        GC_finalization_failures variable; check the result of
-        GC_general_register_disappearing_link() (for lack of memory)
-        instead.
-        * finalize.c (GC_finalization_failures): Remove unused global
-        variable.
-        * finalize.c (GC_general_register_disappearing_link,
-        GC_general_register_disappearing_link): Don't update the value of
-        GC_finalization_failures (since unused).
-        * include/private/gc_pmark.h (PUSH_ONE_CHECKED_STACK,
-        GC_PUSH_ONE_STACK, GC_PUSH_ONE_HEAP): The first parameter is of
-        word type now (as FIXUP_POINTER requires numeric argument).
-        * finalize.c (GC_ignore_self_finalize_mark_proc): GC_PUSH_ONE_HEAP
-        requires the first parameter of word type.
-        * mark.c (PUSH_GRANULE): Ditto.
-        * mark.c (GC_push_one, GC_push_all_eager): Ditto (for
-        GC_PUSH_ONE_STACK).
-        * finalize.c (GC_finalize_all): Call GC_invoke_finalizers() or
+       * dbg_mlc.c (GC_print_smashed_obj): Convert a group of printf()
+       calls into a single one (for output atomicity).
+       * typd_mlc.c (GC_calloc_explicitly_typed): Don't declare and use
+       GC_finalization_failures variable; check the result of
+       GC_general_register_disappearing_link() (for lack of memory)
+       instead.
+       * finalize.c (GC_finalization_failures): Remove unused global
+       variable.
+       * finalize.c (GC_general_register_disappearing_link,
+       GC_general_register_disappearing_link): Don't update the value of
+       GC_finalization_failures (since unused).
+       * include/private/gc_pmark.h (PUSH_ONE_CHECKED_STACK,
+       GC_PUSH_ONE_STACK, GC_PUSH_ONE_HEAP): The first parameter is of
+       word type now (as FIXUP_POINTER requires numeric argument).
+       * finalize.c (GC_ignore_self_finalize_mark_proc): GC_PUSH_ONE_HEAP
+       requires the first parameter of word type.
+       * mark.c (PUSH_GRANULE): Ditto.
+       * mark.c (GC_push_one, GC_push_all_eager): Ditto (for
+       GC_PUSH_ONE_STACK).
+       * finalize.c (GC_finalize_all): Call GC_invoke_finalizers() or
        GC_finalizer_notifier directly, instead
-        of GC_INVOKE_FINALIZERS() to prevent infinite looping.
+       of GC_INVOKE_FINALIZERS() to prevent infinite looping.
        * include/javaxfc.h: Clarify GC_finalize_all comment.
-        * gcj_mlc.c: Include gc_pmark.h before "ifdef GC_GCJ_SUPPORT" (not
-        after) for configuration information.
-        * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Add comment.
-        * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Check "op" local
-        variable for NULL before dereferencing it, return GC_oom_fn() in
-        this case.
-        * typd_mlc.c (GC_malloc_explicitly_typed,
-        GC_malloc_explicitly_typed_ignore_off_page): Transform the code to
-        suppress compiler warning (for uninitialized "lg" variable).
+       * gcj_mlc.c: Include gc_pmark.h before "ifdef GC_GCJ_SUPPORT" (not
+       after) for configuration information.
+       * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Add comment.
+       * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Check "op" local
+       variable for NULL before dereferencing it, return GC_oom_fn() in
+       this case.
+       * typd_mlc.c (GC_malloc_explicitly_typed,
+       GC_malloc_explicitly_typed_ignore_off_page): Transform the code to
+       suppress compiler warning (for uninitialized "lg" variable).
 
 2009-06-12  Hans Boehm <Hans.Boehm@hp.com>
 
 2009-06-12  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
        diff97_cvs (resembling diff43, diff51, diff67, diff76, diff83 partly)
 
-        * pthread_support.c (GC_inner_start_routine): Don't release the
-        GC lock between GC_register_my_thread_inner() and
-        GC_init_thread_local() calls (post the "registered" even after
-        calling GC_init_thread_local()).
-        * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread):
-        Use GC_lookup_thread_inner() instead of GC_lookup_thread() and
-        acquire the GC lock only once.
-        * win32_threads.c (GC_thr_init): Call GC_register_my_thread_inner()
-        directly instead of GC_register_my_thread() since I_HOLD_LOCK
-        and our (main) thread is not registered yet (add assertion for it).
-        * win32_threads.c (GC_init_parallel): Call GC_lookup_thread_inner()
-        directly instead of GC_lookup_thread() (since I_HOLD_LOCK).
-        * win32_threads.c (GC_lookup_thread): Remove unused function.
-        * win32_threads.c: Remove "#error GC_DLL untested with Cygwin".
-        * win32_threads.c (GC_win32_dll_threads): Define as FALSE macro
-        also if THREAD_LOCAL_ALLOC or GC_PTHREADS.
-        * win32_threads.c (GC_use_DllMain): Call ABORT also if GC_PTHREADS
-        (for Cygwin).
-        * win32_threads.c (GC_push_stack_for): Add parentheses around "&&"
-        (inside GC_ASSERT) to prevent compiler warning.
-        * win32_threads.c (GC_push_all_stacks): Remove FIXME for
-        PARALLEL_MARK.
-        * win32_threads.c (MAX_MARKERS, GC_markers): Move the definitions
-        to a place before GC_get_next_stack().
-        * win32_threads.c (marker_sp, marker_bsp): New static arrays (same
-        as in pthread_support.c).
-        * win32_threads.c (marker_last_stack_min): New static arrays (the
-        same semantics as for last_stack_min of GC_Thread_Rep).
-        * win32_threads.c (GC_get_next_stack): Handle marker threads.
-        * win32_threads.c (GC_mark_thread): Save the current stack pointer
-        to marker_[b]sp.
-        * win32_threads.c (start_mark_threads): Initialize
-        marker_last_stack_min elements (to "unset" value).
+       * pthread_support.c (GC_inner_start_routine): Don't release the
+       GC lock between GC_register_my_thread_inner() and
+       GC_init_thread_local() calls (post the "registered" even after
+       calling GC_init_thread_local()).
+       * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread):
+       Use GC_lookup_thread_inner() instead of GC_lookup_thread() and
+       acquire the GC lock only once.
+       * win32_threads.c (GC_thr_init): Call GC_register_my_thread_inner()
+       directly instead of GC_register_my_thread() since I_HOLD_LOCK
+       and our (main) thread is not registered yet (add assertion for it).
+       * win32_threads.c (GC_init_parallel): Call GC_lookup_thread_inner()
+       directly instead of GC_lookup_thread() (since I_HOLD_LOCK).
+       * win32_threads.c (GC_lookup_thread): Remove unused function.
+       * win32_threads.c: Remove "#error GC_DLL untested with Cygwin".
+       * win32_threads.c (GC_win32_dll_threads): Define as FALSE macro
+       also if THREAD_LOCAL_ALLOC or GC_PTHREADS.
+       * win32_threads.c (GC_use_DllMain): Call ABORT also if GC_PTHREADS
+       (for Cygwin).
+       * win32_threads.c (GC_push_stack_for): Add parentheses around "&&"
+       (inside GC_ASSERT) to prevent compiler warning.
+       * win32_threads.c (GC_push_all_stacks): Remove FIXME for
+       PARALLEL_MARK.
+       * win32_threads.c (MAX_MARKERS, GC_markers): Move the definitions
+       to a place before GC_get_next_stack().
+       * win32_threads.c (marker_sp, marker_bsp): New static arrays (same
+       as in pthread_support.c).
+       * win32_threads.c (marker_last_stack_min): New static arrays (the
+       same semantics as for last_stack_min of GC_Thread_Rep).
+       * win32_threads.c (GC_get_next_stack): Handle marker threads.
+       * win32_threads.c (GC_mark_thread): Save the current stack pointer
+       to marker_[b]sp.
+       * win32_threads.c (start_mark_threads): Initialize
+       marker_last_stack_min elements (to "unset" value).
 
 2009-06-12  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
        (diff96_cvs, partly from diff45 and diff75)
 
-        * misc.c (GC_set_oom_fn, GC_set_all_interior_pointers,
-        GC_set_finalize_on_demand, GC_set_java_finalization,
-        GC_set_finalizer_notifier, GC_set_dont_expand, GC_set_full_freq,
-        GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
-        GC_set_dont_precollect, GC_set_time_limit, GC_set_warn_proc):
-        Change return type to void (these API functions no longer return
-        the old value).
-        * include/gc.h: Ditto (for prototypes).
-        * tests/test.c (main, WinMain, test): Remove explicit cast to void
-        for GC_set_warn_proc().
-        * misc.c (GC_get_oom_fn, GC_get_all_interior_pointers,
-        GC_get_finalize_on_demand, GC_get_java_finalization,
-        GC_get_finalizer_notifier, GC_get_dont_expand, GC_get_full_freq,
-        GC_get_no_dls, GC_get_free_space_divisor, GC_get_max_retries,
-        GC_get_dont_precollect, GC_get_time_limit, GC_get_warn_proc): New
-        API functions (to get the current value of the corresponding R/W
-        public variables).
-        * include/gc.h: Ditto (for prototypes).
-        * include/gc.h (GC_set_warn_proc, GC_set_free_space_divisor):
-        Update the comment.
-        * misc.c (GC_ignore_warn_proc): New API call-back function.
-        * include/gc.h (GC_ignore_warn_proc): Ditto (for the prototype).
-        * misc.c (GC_set_find_leak, GC_get_find_leak, GC_set_non_gc_bytes,
-        GC_get_non_gc_bytes): New API setter and getter functions (for the
-        public GC_find_leak and GC_non_gc_bytes variables, respectively).
-        * include/gc.h: Ditto (for prototypes).
-        * include/gc.h (GC_memalign): Add proto to GC API.
-        * mallocx.c (GC_memalign): Use GC_API, GC_CALL for the definition.
-        * tests/test.c (run_one_test): Test GC_memalign() on Win32 too,
-        remove GC_memalign() proto.
-        * misc.c (GC_write): Use multi-byte (A) variants of Win32
-        GetModuleFileName() and CreateFile().
+       * misc.c (GC_set_oom_fn, GC_set_all_interior_pointers,
+       GC_set_finalize_on_demand, GC_set_java_finalization,
+       GC_set_finalizer_notifier, GC_set_dont_expand, GC_set_full_freq,
+       GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
+       GC_set_dont_precollect, GC_set_time_limit, GC_set_warn_proc):
+       Change return type to void (these API functions no longer return
+       the old value).
+       * include/gc.h: Ditto (for prototypes).
+       * tests/test.c (main, WinMain, test): Remove explicit cast to void
+       for GC_set_warn_proc().
+       * misc.c (GC_get_oom_fn, GC_get_all_interior_pointers,
+       GC_get_finalize_on_demand, GC_get_java_finalization,
+       GC_get_finalizer_notifier, GC_get_dont_expand, GC_get_full_freq,
+       GC_get_no_dls, GC_get_free_space_divisor, GC_get_max_retries,
+       GC_get_dont_precollect, GC_get_time_limit, GC_get_warn_proc): New
+       API functions (to get the current value of the corresponding R/W
+       public variables).
+       * include/gc.h: Ditto (for prototypes).
+       * include/gc.h (GC_set_warn_proc, GC_set_free_space_divisor):
+       Update the comment.
+       * misc.c (GC_ignore_warn_proc): New API call-back function.
+       * include/gc.h (GC_ignore_warn_proc): Ditto (for the prototype).
+       * misc.c (GC_set_find_leak, GC_get_find_leak, GC_set_non_gc_bytes,
+       GC_get_non_gc_bytes): New API setter and getter functions (for the
+       public GC_find_leak and GC_non_gc_bytes variables, respectively).
+       * include/gc.h: Ditto (for prototypes).
+       * include/gc.h (GC_memalign): Add proto to GC API.
+       * mallocx.c (GC_memalign): Use GC_API, GC_CALL for the definition.
+       * tests/test.c (run_one_test): Test GC_memalign() on Win32 too,
+       remove GC_memalign() proto.
+       * misc.c (GC_write): Use multi-byte (A) variants of Win32
+       GetModuleFileName() and CreateFile().
        * tests/test.c (main): Replace K&R-style function definition with the
        ANSI C one.
 
-2009-06-12  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski and George Talbot)
+2009-06-12  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski and
+                                           George Talbot)
        (diff95_cvs)
+
        * include/private/gcconfig.h (PLATFORM_ANDROID): New macro
-        recognized (for Linux on ARM32 without glibc).
-        * include/private/gcconfig.h (STRTOULL): Define for all targets
-        (define as "strtoul" for most targets except for LLP64/Win64).
-        * misc.c (GC_init_inner): Use STRTOULL instead of atoi/atol()
-        (cast the result to word type) to decode values of "GC_TRACE",
-        "GC_INITIAL_HEAP_SIZE", "GC_MAXIMUM_HEAP_SIZE" environment vars.
+       recognized (for Linux on ARM32 without glibc).
+       * include/private/gcconfig.h (STRTOULL): Define for all targets
+       (define as "strtoul" for most targets except for LLP64/Win64).
+       * misc.c (GC_init_inner): Use STRTOULL instead of atoi/atol()
+       (cast the result to word type) to decode values of "GC_TRACE",
+       "GC_INITIAL_HEAP_SIZE", "GC_MAXIMUM_HEAP_SIZE" environment vars.
 
 2009-06-12  Hans Boehm <Hans.Boehm@hp.com> (Really mostly George Talbot)
+
        * include/gc_allocator.h: Add gc_allocator_ignore_off_page.
        * tests/test_cpp.cc: Add call to gc_allocator_ignore_off_page.
 
 2009-06-11  Hans Boehm <Hans.Boehm@hp.com>
+
        * win32_threads.c (GC_release_mark_lock): Correct misspelling of
        AO_load in assertion.
 
        (diff93_cvs: resembling diff27, diff30, diff43, diff44, diff66,
        diff76, diff79, diff83 partly)
 
-        * win32_threads.c (MAX_THREADS): Define as 1 if GC_win32_dll_threads
-        is defined as FALSE (otherwise the size of dll_thread_table is near
-        200 KiB for 32-bit).
-        * win32_threads.c (GC_use_DllMain): Optimize for THREAD_LOCAL_ALLOC.
-        * win32_threads.c (GC_Thread_Rep): Add backing_store_end and
-        backing_store_ptr fields for IA64 support.
-        * win32_threads.c (GC_register_my_thread_inner): Set
-        backing_store_end field to reg_base value for IA64 (same as in
-        pthread_support.c).
-        * win32_threads.c (SET_PTHREAD_MAP_CACHE): Put parentheses in the
-        "right" places, remove ';'.
-        * win32_threads.c (GC_fault_handler_lock): Declare only
-        if MPROTECT_VDB (and not WinCE).
-        * win32_threads.c (GC_suspend): Acquire and release
-        GC_fault_handler_lock only if MPROTECT_VDB (and not WinCE).
-        * win32_threads.c (GC_suspend): Define as STATIC.
-        * win32_threads.c (GC_push_stack_for): Fix WARN() format specifier
-        (should be word-complient, "%p" is used w/o "0x"), don't cast sp.
-        * win32_threads.c (GC_push_all_stacks): Convert a group of printf()
-        calls into a single one (for output atomicity).
-        * win32_threads.c (GC_get_next_stack): Unprotect thread descriptor
-        before altering its last_stack_min ("thread" variable is added).
-        * win32_threads.c (GC_get_next_stack): Remove unnecessary checks for
-        "s" is non-NULL. 
-        * win32_threads.c (GC_get_next_stack): Don't call GC_may_be_in_stack
-        if WinCE.
-        * win32_threads.c (GC_get_next_stack): Pass current_min value to
-        GC_get_stack_min as-is (without -1).
-        * win32_threads.c (GC_wait_marker): Remove FIXME and use "release"
-        version of AO_fetch_and_sub1().
-        * win32_threads.c (GC_win32_start_inner, GC_win32_start): convert int
-        to pointer (and vice verse) thru word type to suppress warnings.
+       * win32_threads.c (MAX_THREADS): Define as 1 if GC_win32_dll_threads
+       is defined as FALSE (otherwise the size of dll_thread_table is near
+       200 KiB for 32-bit).
+       * win32_threads.c (GC_use_DllMain): Optimize for THREAD_LOCAL_ALLOC.
+       * win32_threads.c (GC_Thread_Rep): Add backing_store_end and
+       backing_store_ptr fields for IA64 support.
+       * win32_threads.c (GC_register_my_thread_inner): Set
+       backing_store_end field to reg_base value for IA64 (same as in
+       pthread_support.c).
+       * win32_threads.c (SET_PTHREAD_MAP_CACHE): Put parentheses in the
+       "right" places, remove ';'.
+       * win32_threads.c (GC_fault_handler_lock): Declare only
+       if MPROTECT_VDB (and not WinCE).
+       * win32_threads.c (GC_suspend): Acquire and release
+       GC_fault_handler_lock only if MPROTECT_VDB (and not WinCE).
+       * win32_threads.c (GC_suspend): Define as STATIC.
+       * win32_threads.c (GC_push_stack_for): Fix WARN() format specifier
+       (should be word-complient, "%p" is used w/o "0x"), don't cast sp.
+       * win32_threads.c (GC_push_all_stacks): Convert a group of printf()
+       calls into a single one (for output atomicity).
+       * win32_threads.c (GC_get_next_stack): Unprotect thread descriptor
+       before altering its last_stack_min ("thread" variable is added).
+       * win32_threads.c (GC_get_next_stack): Remove unnecessary checks for
+       "s" is non-NULL.
+       * win32_threads.c (GC_get_next_stack): Don't call GC_may_be_in_stack
+       if WinCE.
+       * win32_threads.c (GC_get_next_stack): Pass current_min value to
+       GC_get_stack_min as-is (without -1).
+       * win32_threads.c (GC_wait_marker): Remove FIXME and use "release"
+       version of AO_fetch_and_sub1().
+       * win32_threads.c (GC_win32_start_inner, GC_win32_start): convert int
+       to pointer (and vice versa) thru word type to suppress warnings.
        * win32_threads.c (GC_mark_mutex_waitcnt): Fix comment, always
        access atomically.
        * misc.c: Change GC_THREADS tests back to THREADS.
        (diff92_cvs: resembling diff20, diff27, diff34, diff38, diff43, diff45,
        diff46, diff56, diff60, diff62, diff74, diff75, diff81 partly)
 
-        * allchblk.c (GC_print_hblkfreelist, GC_dump_regions): Convert
-        a group of printf() calls into a single one (for output atomicity).
-        * include/gc.h (GC_set_all_interior_pointers, GC_set_full_freq,
-        GC_set_time_limit): New prototypes.
-        * misc.c (GC_set_all_interior_pointers, GC_set_full_freq,
-        GC_set_time_limit): New public setter/getter functions.
-        * include/gc.h: Fix (and remove outdated) comments for thread-local
-        allocation.
-        * include/gc.h: Fix typos in comments.
-        * misc.c (GC_init_inner, GC_printf): Ditto.
-        * include/gc.h (GC_unregister_disappearing_link): Refine comment.
-        * include/gc.h (GC_stack_base): Recognize _M_IA64 macro.
-        * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
-        GC_bytes_allocd_at_reset, DEGRADE_RATE): Define only if THREADS.
-        * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
-        GC_bytes_allocd_at_reset): Define as STATIC.
-        * misc.c (GC_get_heap_size, GC_get_free_bytes,
-        GC_get_bytes_since_gc, GC_get_total_bytes): Acquire the GC lock to
-        avoid data races.
-        * misc.c (GC_write_cs): Define only if THREADS (Win32/WinCE only).
-        * misc.c (GC_init_inner): Initialize GC_write_cs only if THREADS.
-        * misc.c (GC_init_inner): Use GC_INITIAL_HEAP_SIZE (if available) to
-        set the default initial value of initial_heap_sz.
-        * misc.c (GC_deinit): Destroy GC_write_cs only if THREADS.
-        * misc.c (GC_init_inner): Fix WARN() format specifier (should be
-        word-complient, "%p" is used w/o "0x").
-        * misc.c (GC_init_inner): Don't recognize "GC_PAUSE_TIME_TARGET"
-        environment variable if SMALL_CONFIG.
-        * misc.c (GC_init_inner): Recognize "GC_FULL_FREQUENCY" environment
-        variable to set initial GC_full_freq value (if not SMALL_CONFIG).
-        * doc/README.environment (GC_FULL_FREQUENCY): Add information.
-        * doc/README.environment (GC_MARKERS): Refine information.
-        * misc.c (GC_init_inner): Change GC_ASSERT to GC_STATIC_ASSERT where
-        possible.
-        * misc.c (IF_NEED_TO_LOCK): New macro (instead of GC_need_to_lock).
-        * misc.c (GC_write): Use IF_NEED_TO_LOCK for handling GC_write_cs.
-        * misc.c (GC_abort): Don't define if SMALL_CONFIG.
-        * misc.c (GC_abort): Directly use WRITE() instead of GC_err_printf()
-        (to prevent possible infinite recursion).
+       * allchblk.c (GC_print_hblkfreelist, GC_dump_regions): Convert
+       a group of printf() calls into a single one (for output atomicity).
+       * include/gc.h (GC_set_all_interior_pointers, GC_set_full_freq,
+       GC_set_time_limit): New prototypes.
+       * misc.c (GC_set_all_interior_pointers, GC_set_full_freq,
+       GC_set_time_limit): New public setter/getter functions.
+       * include/gc.h: Fix (and remove outdated) comments for thread-local
+       allocation.
+       * include/gc.h: Fix typos in comments.
+       * misc.c (GC_init_inner, GC_printf): Ditto.
+       * include/gc.h (GC_unregister_disappearing_link): Refine comment.
+       * include/gc.h (GC_stack_base): Recognize _M_IA64 macro.
+       * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
+       GC_bytes_allocd_at_reset, DEGRADE_RATE): Define only if THREADS.
+       * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
+       GC_bytes_allocd_at_reset): Define as STATIC.
+       * misc.c (GC_get_heap_size, GC_get_free_bytes,
+       GC_get_bytes_since_gc, GC_get_total_bytes): Acquire the GC lock to
+       avoid data races.
+       * misc.c (GC_write_cs): Define only if THREADS (Win32/WinCE only).
+       * misc.c (GC_init_inner): Initialize GC_write_cs only if THREADS.
+       * misc.c (GC_init_inner): Use GC_INITIAL_HEAP_SIZE (if available) to
+       set the default initial value of initial_heap_sz.
+       * misc.c (GC_deinit): Destroy GC_write_cs only if THREADS.
+       * misc.c (GC_init_inner): Fix WARN() format specifier (should be
+       word-complient, "%p" is used w/o "0x").
+       * misc.c (GC_init_inner): Don't recognize "GC_PAUSE_TIME_TARGET"
+       environment variable if SMALL_CONFIG.
+       * misc.c (GC_init_inner): Recognize "GC_FULL_FREQUENCY" environment
+       variable to set initial GC_full_freq value (if not SMALL_CONFIG).
+       * doc/README.environment (GC_FULL_FREQUENCY): Add information.
+       * doc/README.environment (GC_MARKERS): Refine information.
+       * misc.c (GC_init_inner): Change GC_ASSERT to GC_STATIC_ASSERT where
+       possible.
+       * misc.c (IF_NEED_TO_LOCK): New macro (instead of GC_need_to_lock).
+       * misc.c (GC_write): Use IF_NEED_TO_LOCK for handling GC_write_cs.
+       * misc.c (GC_abort): Don't define if SMALL_CONFIG.
+       * misc.c (GC_abort): Directly use WRITE() instead of GC_err_printf()
+       (to prevent possible infinite recursion).
 
 2009-06-09  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
        diff90_cvs (resembling diff28, diff30, diff32, diff34, diff47,
        diff49, diff60, diff62, diff66, diff67, diff68, diff72 partly)
 
-        * finalize.c (finalization_mark_proc): Replace K&R-style declaration
-        with ANSI C one.
-        * finalize.c (GC_grow_table, GC_register_finalizer_inner,
-        GC_enqueue_all_finalizers): Remove outdated comments about disabling
-        signals.
-        * finalize.c (GC_general_register_disappearing_link): Fix assertion
-        to catch NULL "obj" value.
-        * finalize.c (GC_unregister_disappearing_link): Check "link"
-        alignment before gaining the lock.
-        * finalize.c (GC_finalize): Refine comment.
-        * finalize.c (GC_finalize): Fix WARN() format specifier (should be
-        word-complient, "%p" is used w/o "0x").
-        * finalize.c (GC_invoke_finalizers): Initialize "bytes_freed_before"
-        variable (to 0) to suppress compiler warning.
-        * include/gc_gcj.h (MARK_DESCR_OFFSET): Move to private/gc_pmark.h.
-        * include/gc_gcj.h: add "extern C" header and tail.
-        * include/private/gc_pmark.h: Remove GC_do_parallel_mark(),
-        GC_help_wanted, GC_helper_count, GC_active_count declarations (move
-        the comments to the place where these symbols are defined in mark.c).
-        * mark.c: Add STATIC GC_do_parallel_mark() declaration (for use by
-        GC_mark_some_inner, if PARALLEL_MARK only).
-        * mark.c (GC_mark_some_inner, GC_help_wanted, GC_helper_count,
-        GC_active_count, GC_do_parallel_mark): Define as STATIC.
-        * pthread_support.c (GC_mark_thread): Ditto.
-        * typd_mlc.c (GC_explicit_typing_initialized, GC_explicit_kind,
-        GC_array_kind, GC_ext_descriptors, GC_ed_size, GC_avail_descr,
-        GC_typed_mark_proc_index, GC_array_mark_proc_index, GC_eobjfreelist,
-        GC_arobjfreelist): Ditto.
-        * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Change GC_ASSERT
-        for HBLKSIZE to GC_STATIC_ASSERT.
-        * mark.c (GC_noop): Define for Borland C the same as for Watcom.
-        * mark.c (GC_noop, GC_mark_and_push): Add ARGSUSED tag.
-        * pthread_support.c (GC_do_blocking_inner): Ditto.
-        * mark.c (GC_mark_from): Initialize "limit" (to 0) in the default
-        switch branch to suppress compiler warning.
-        * mark.c (GC_return_mark_stack): Append new-line to printf message.
-        * mark.c: Remove unused GC_true_func(), GC_PUSH_ALL().
-        * pthread_support.c (GC_mark_thread): Add dummy "return 0" to
-        suppress compiler warning.
-        * pthread_support.c (start_mark_threads): Move the code limiting
-        "GC_markers" value (and printing a warning) to GC_thr_init().
-        * pthread_support.c (GC_thr_init): Silently limit "GC_markers" value
-        if based on the number of CPUs.
-        * pthread_support.c (GC_thr_init): Treat incorrect "GC_markers"
-        values as one.
+       * finalize.c (finalization_mark_proc): Replace K&R-style declaration
+       with ANSI C one.
+       * finalize.c (GC_grow_table, GC_register_finalizer_inner,
+       GC_enqueue_all_finalizers): Remove outdated comments about disabling
+       signals.
+       * finalize.c (GC_general_register_disappearing_link): Fix assertion
+       to catch NULL "obj" value.
+       * finalize.c (GC_unregister_disappearing_link): Check "link"
+       alignment before gaining the lock.
+       * finalize.c (GC_finalize): Refine comment.
+       * finalize.c (GC_finalize): Fix WARN() format specifier (should be
+       word-complient, "%p" is used w/o "0x").
+       * finalize.c (GC_invoke_finalizers): Initialize "bytes_freed_before"
+       variable (to 0) to suppress compiler warning.
+       * include/gc_gcj.h (MARK_DESCR_OFFSET): Move to private/gc_pmark.h.
+       * include/gc_gcj.h: add "extern C" header and tail.
+       * include/private/gc_pmark.h: Remove GC_do_parallel_mark(),
+       GC_help_wanted, GC_helper_count, GC_active_count declarations (move
+       the comments to the place where these symbols are defined in mark.c).
+       * mark.c: Add STATIC GC_do_parallel_mark() declaration (for use by
+       GC_mark_some_inner, if PARALLEL_MARK only).
+       * mark.c (GC_mark_some_inner, GC_help_wanted, GC_helper_count,
+       GC_active_count, GC_do_parallel_mark): Define as STATIC.
+       * pthread_support.c (GC_mark_thread): Ditto.
+       * typd_mlc.c (GC_explicit_typing_initialized, GC_explicit_kind,
+       GC_array_kind, GC_ext_descriptors, GC_ed_size, GC_avail_descr,
+       GC_typed_mark_proc_index, GC_array_mark_proc_index, GC_eobjfreelist,
+       GC_arobjfreelist): Ditto.
+       * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Change GC_ASSERT
+       for HBLKSIZE to GC_STATIC_ASSERT.
+       * mark.c (GC_noop): Define for Borland C the same as for Watcom.
+       * mark.c (GC_noop, GC_mark_and_push): Add ARGSUSED tag.
+       * pthread_support.c (GC_do_blocking_inner): Ditto.
+       * mark.c (GC_mark_from): Initialize "limit" (to 0) in the default
+       switch branch to suppress compiler warning.
+       * mark.c (GC_return_mark_stack): Append new-line to printf message.
+       * mark.c: Remove unused GC_true_func(), GC_PUSH_ALL().
+       * pthread_support.c (GC_mark_thread): Add dummy "return 0" to
+       suppress compiler warning.
+       * pthread_support.c (start_mark_threads): Move the code limiting
+       "GC_markers" value (and printing a warning) to GC_thr_init().
+       * pthread_support.c (GC_thr_init): Silently limit "GC_markers" value
+       if based on the number of CPUs.
+       * pthread_support.c (GC_thr_init): Treat incorrect "GC_markers"
+       values as one.
        * pthread_support.c (GC_register_my_thread_inner): Add a check for
        "stack_end" is non-NULL (the same as in win32_threads.c).
        * pthread_support.c (pthread_create): Call GC_oom_fn before giving up
        to "while" one to suppress "possible extraneous ';'" warning.
 
 2009-06-08  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski
-       and Zoltan Varga)
-        * darwin_stop_world.c (GC_push_all_stacks): Recognize ARM32.
-        * include/private/gc_priv.h (GC_THREAD_STATE_T): Define for ARM32
-        (Darwin only).
-        * include/private/gcconfig.h: Add machine-specific part for DARWIN.
-        * include/private/gcconfig.h (ARM32): Define config parameters for
-        DARWIN (iPhone).
+                                           and Zoltan Varga)
+
+       * darwin_stop_world.c (GC_push_all_stacks): Recognize ARM32.
+       * include/private/gc_priv.h (GC_THREAD_STATE_T): Define for ARM32
+       (Darwin only).
+       * include/private/gcconfig.h: Add machine-specific part for DARWIN.
+       * include/private/gcconfig.h (ARM32): Define config parameters for
+       DARWIN (iPhone).
 
 2009-06-08  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
        (diff91_cvs: resembling diff3, diff27, diff33, diff45, diff47, diff49,
        diff60, diff67, diff68 partly)
+
        * alloc.c (GC_FULL_FREQ, GC_DONT_EXPAND, GC_FREE_SPACE_DIVISOR,
-        GC_TIME_LIMIT): New macros (used to control the default initial
-        values of GC_full_freq variable, GC_dont_expand,
-        GC_free_space_divisor, GC_time_limit respectively).
-        * include/private/gc_priv.h (TIME_LIMIT): Remove macro (replaced
-        with GC_TIME_LIMIT in alloc.c).
-        * alloc.c (GC_need_full_gc, GC_stopped_mark, GC_finish_collection):
-        Define as STATIC.
-        * mark_rts.c (GC_push_current_stack, GC_push_gc_structures): Ditto.
-        * include/private/gc_priv.h (GC_stopped_mark, GC_finish_collection):
-        Move the prototypes to alloc.c, make STATIC.
-        * include/private/gc_priv.h (GC_push_current_stack,
-        GC_push_gc_structures, GC_push_regs_and_stack): Remove prototypes
-        (move the comments to the places where these functions are defined).
-        * mach_dep.c (GC_push_regs_and_stack): Move to mark_rts.c and define
-        as STATIC.
-        * alloc.c (GC_timeout_stop_func, GC_stopped_mark,
-        GC_print_heap_sects): Convert a group of printf() calls into
-        a single one (for output atomicity).
-        * mark_rts.c (GC_print_static_roots): Ditto.
-        * alloc.c (GC_stopped_mark): Output blank line (when logging) for
-        convenience to delimit collections.
-        * alloc.c (GC_clear_a_few_frames): Rename NWORDS to CLEAR_NWORDS;
-        make "frames" local variable volatile (to prevent optimization).
-        * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
-        GC_finish_collection, GC_allocobj): Remove outdated comments about
-        disabling signals.
-        * include/private/gc_priv.h (GC_register_displacement_inner,
-        GC_gcollect_inner): Ditto.
-        * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
-        GC_finish_collection): Initialize "start_time" local variable (to 0)
-        to suppress compiler warning.
-        * mark_rts.c (GC_add_roots_inner): Ditto (for "old" variable).
-        * alloc.c (GC_RATE, MAX_PRIOR_ATTEMPTS): Guard with "ifndef".
-        * include/private/gc_priv.h (clock, GC_stop_world, GC_start_world,
-        GC_acquire_mark_lock, GC_release_mark_lock, GC_notify_all_builder,
-        GC_wait_for_reclaim, GC_notify_all_marker, GC_wait_marker): Replace
-        K&R-style function prototypes with ANSI C one.
-        * include/private/gc_priv.h (ABORT): Define as DebugBreak() for
-        Win32/WinCE if SMALL_CONFIG (the same as in GC_abort()).
-        * include/private/gc_priv.h (ROUNDED_UP_WORDS, abs): Remove unused
-        macros.
-        * include/private/gc_priv.h (GC_noop): Declare for Borland C the
-        same as for Watcom.
-        * mark_rts.c (GC_push_conditional_with_exclusions): Add ARGSUSED tag.
+       GC_TIME_LIMIT): New macros (used to control the default initial
+       values of GC_full_freq variable, GC_dont_expand,
+       GC_free_space_divisor, GC_time_limit respectively).
+       * include/private/gc_priv.h (TIME_LIMIT): Remove macro (replaced
+       with GC_TIME_LIMIT in alloc.c).
+       * alloc.c (GC_need_full_gc, GC_stopped_mark, GC_finish_collection):
+       Define as STATIC.
+       * mark_rts.c (GC_push_current_stack, GC_push_gc_structures): Ditto.
+       * include/private/gc_priv.h (GC_stopped_mark, GC_finish_collection):
+       Move the prototypes to alloc.c, make STATIC.
+       * include/private/gc_priv.h (GC_push_current_stack,
+       GC_push_gc_structures, GC_push_regs_and_stack): Remove prototypes
+       (move the comments to the places where these functions are defined).
+       * mach_dep.c (GC_push_regs_and_stack): Move to mark_rts.c and define
+       as STATIC.
+       * alloc.c (GC_timeout_stop_func, GC_stopped_mark,
+       GC_print_heap_sects): Convert a group of printf() calls into
+       a single one (for output atomicity).
+       * mark_rts.c (GC_print_static_roots): Ditto.
+       * alloc.c (GC_stopped_mark): Output blank line (when logging) for
+       convenience to delimit collections.
+       * alloc.c (GC_clear_a_few_frames): Rename NWORDS to CLEAR_NWORDS;
+       make "frames" local variable volatile (to prevent optimization).
+       * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
+       GC_finish_collection, GC_allocobj): Remove outdated comments about
+       disabling signals.
+       * include/private/gc_priv.h (GC_register_displacement_inner,
+       GC_gcollect_inner): Ditto.
+       * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
+       GC_finish_collection): Initialize "start_time" local variable (to 0)
+       to suppress compiler warning.
+       * mark_rts.c (GC_add_roots_inner): Ditto (for "old" variable).
+       * alloc.c (GC_RATE, MAX_PRIOR_ATTEMPTS): Guard with "ifndef".
+       * include/private/gc_priv.h (clock, GC_stop_world, GC_start_world,
+       GC_acquire_mark_lock, GC_release_mark_lock, GC_notify_all_builder,
+       GC_wait_for_reclaim, GC_notify_all_marker, GC_wait_marker): Replace
+       K&R-style function prototypes with ANSI C one.
+       * include/private/gc_priv.h (ABORT): Define as DebugBreak() for
+       Win32/WinCE if SMALL_CONFIG (the same as in GC_abort()).
+       * include/private/gc_priv.h (ROUNDED_UP_WORDS, abs): Remove unused
+       macros.
+       * include/private/gc_priv.h (GC_noop): Declare for Borland C the
+       same as for Watcom.
+       * mark_rts.c (GC_push_conditional_with_exclusions): Add ARGSUSED tag.
 
 2009-06-04  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
        (diff89_cvs, resembling diff3, diff27, diff34, diff38, diff47, diff49,
        diff59, diff60, diff66, diff67, diff68, diff69a, diff70, diff81
        partly)
-        * dbg_mlc.c (GC_store_debug_info, GC_store_debug_info_inner): Remove
-        outdated comment about disabling signals.
-        * mallocx.c (GC_malloc_uncollectable,
-        GC_malloc_atomic_uncollectable): Ditto.
-        * os_dep.c: Ditto.
-        * dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change):
-        Add ARGSUSED tag.
-        * pthread_stop_world.c (GC_suspend_handler,
-        GC_suspend_handler_inner): Ditto.
-        * dbg_mlc.c (GC_debug_free, GC_debug_realloc): Fix printf message.
-        * dbg_mlc.c (GC_debug_realloc): Set "result" to NULL in the default
-        switch branch to suppress compiler warning.
-        * dyn_load.c (GC_init_dyld): Use ABORT() instead of GC_abort().
-        * include/private/darwin_semaphore.h (sem_init): Ditto.
-        * include/javaxfc.h: Replace "GC_H" with "_GC_H".
-        * include/private/dbg_mlc.h (GC_has_other_debug_info,
-        GC_store_debug_info): Replace K&R-style function prototypes with ANSI
-        C one.
-        * include/private/gcconfig.h (GC_FreeBSDGetDataStart, real_malloc,
-        GC_win32_get_mem, GC_wince_get_mem, GC_unix_get_mem): Ditto.
-        * include/private/pthread_support.h (GC_stop_init): Ditto.
-        * include/private/gcconfig.h: Refine comment about setting
-        GC_stackbottom.
-        * include/private/gcconfig.h (FIXUP_POINTER): Put parentheses in the
-        "right" places.
-        * include/private/pthread_support.h (GC_Thread_Rep): Refine comment
-        for "stack_end" field.
-        * mallocx.c (GC_malloc_uncollectable,
-        GC_malloc_atomic_uncollectable): Remove cast to undefined "hbklk".
-        * os_dep.c (GC_USE_MEM_TOP_DOWN): New macro (for setting
-        GC_mem_top_down to MEM_TOP_DOWN for debug purposes).
-        * os_dep.c (GC_gww_read_dirty, catch_exception_raise): Fix WARN()
-        format specifier (should be word-compliant, "%p" is used w/o "0x").
-        * pthread_stop_world.c (GC_suspend_handler_inner): Ditto.
-        * os_dep.c (GC_dirty_init): Append new-line to printf messages.
-        * os_dep.c (GC_mprotect_thread): Fix GC_err_printf message.
-        * os_dep.c (GC_save_callers): Change GC_ASSERT to GC_STATIC_ASSERT.
-        * pthread_stop_world.c (GC_retry_signals, GC_suspend_ack_sem): Define
-        as STATIC.
-        * pthread_stop_world.c (GC_push_all_stacks): Add assertion for that
-        "thread_blocked" is not set for the current thread.
-        * real_malloc.c: Add "extern GC_quiet" to suppress compiler warning.
-        * reclaim.c (GC_reclaim_all): Initialize "start_time" (to 0) to
-        suppress compiler warning.
-       
+
+       * dbg_mlc.c (GC_store_debug_info, GC_store_debug_info_inner): Remove
+       outdated comment about disabling signals.
+       * mallocx.c (GC_malloc_uncollectable,
+       GC_malloc_atomic_uncollectable): Ditto.
+       * os_dep.c: Ditto.
+       * dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change):
+       Add ARGSUSED tag.
+       * pthread_stop_world.c (GC_suspend_handler,
+       GC_suspend_handler_inner): Ditto.
+       * dbg_mlc.c (GC_debug_free, GC_debug_realloc): Fix printf message.
+       * dbg_mlc.c (GC_debug_realloc): Set "result" to NULL in the default
+       switch branch to suppress compiler warning.
+       * dyn_load.c (GC_init_dyld): Use ABORT() instead of GC_abort().
+       * include/private/darwin_semaphore.h (sem_init): Ditto.
+       * include/javaxfc.h: Replace "GC_H" with "_GC_H".
+       * include/private/dbg_mlc.h (GC_has_other_debug_info,
+       GC_store_debug_info): Replace K&R-style function prototypes with ANSI
+       C one.
+       * include/private/gcconfig.h (GC_FreeBSDGetDataStart, real_malloc,
+       GC_win32_get_mem, GC_wince_get_mem, GC_unix_get_mem): Ditto.
+       * include/private/pthread_support.h (GC_stop_init): Ditto.
+       * include/private/gcconfig.h: Refine comment about setting
+       GC_stackbottom.
+       * include/private/gcconfig.h (FIXUP_POINTER): Put parentheses in the
+       "right" places.
+       * include/private/pthread_support.h (GC_Thread_Rep): Refine comment
+       for "stack_end" field.
+       * mallocx.c (GC_malloc_uncollectable,
+       GC_malloc_atomic_uncollectable): Remove cast to undefined "hbklk".
+       * os_dep.c (GC_USE_MEM_TOP_DOWN): New macro (for setting
+       GC_mem_top_down to MEM_TOP_DOWN for debug purposes).
+       * os_dep.c (GC_gww_read_dirty, catch_exception_raise): Fix WARN()
+       format specifier (should be word-compliant, "%p" is used w/o "0x").
+       * pthread_stop_world.c (GC_suspend_handler_inner): Ditto.
+       * os_dep.c (GC_dirty_init): Append new-line to printf messages.
+       * os_dep.c (GC_mprotect_thread): Fix GC_err_printf message.
+       * os_dep.c (GC_save_callers): Change GC_ASSERT to GC_STATIC_ASSERT.
+       * pthread_stop_world.c (GC_retry_signals, GC_suspend_ack_sem): Define
+       as STATIC.
+       * pthread_stop_world.c (GC_push_all_stacks): Add assertion for that
+       "thread_blocked" is not set for the current thread.
+       * real_malloc.c: Add "extern GC_quiet" to suppress compiler warning.
+       * reclaim.c (GC_reclaim_all): Initialize "start_time" (to 0) to
+       suppress compiler warning.
+
 2009-06-02  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
        (adding last bit of diff86_cvs)
+
        * tests/test.c (check_heap_stats): Avoid unbalanced brackets in ifdef.
 
 2009-05-27  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
        (diff26)
+
        * win32_threads.c: restructure parallel marking mutex intialization.
        * win32_threads.c, alloc.c, darwin_stop_world.c, mallocx.c, mark.c,
        pthread_stop_world.c, pthread_support.c: Add runtime conditions
 
 2009-05-27  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
        (diff39)
+
        * include/private/gcconfig.h: refine MINGW32 test.
        * mark.c: Add win64/gcc tests.
 
 2009-05-27  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
        (diff86_cvs, resembling diff28, diff32, diff33, diff38, diff68 partly)
+
        * test.c (fork_a_thread, reverse_test, alloc8bytes, tree_test,
-        typed_test, run_one_test, check_heap_stats, main, test): Replace
-        all K&R-style function definitions with ANSI C ones.
-        * trace_test.c (main): Ditto.
-        * test.c (GC_COND_INIT): Define as GC_INIT() also in case of
-        THREAD_LOCAL_ALLOC.
-        * test.c (reverse_test): Call fork_a_thread() only if GC_PTHREADS
-        or GC_WIN32_THREADS; remove fork_a_thread() macros definition.
-        * test.c (reverse_test): Use "volatile" when clearing "b" and "c"
-        local variables (to suppress "assigned value is never used"
-        compiler warning).
-        * test.c (tree_test): Use public GC_noop1() instead of private
-        GC_noop().
-        * test.c (typed_test): Ditto.
-        * test.c (check_heap_stats): Define and assign value to
-        "late_finalize_count" local variable only if its value is used
-        (if FINALIZE_ON_DEMAND defined).
-        * test.c (main): Remove DJGPP-specific initialization of
-        GC_stackbottom (not needed anymore, handled in gcconfig.h).
-        * trace_test.c: Guard #define GC_DEBUG with #ifndef.
-        * trace_test.c: Include "gc_backptr.h".
-        * trace_test.c (main): Call GC_INIT().
-        * trace_test.c (main): Add "return 0" statement.
+       typed_test, run_one_test, check_heap_stats, main, test): Replace
+       all K&R-style function definitions with ANSI C ones.
+       * trace_test.c (main): Ditto.
+       * test.c (GC_COND_INIT): Define as GC_INIT() also in case of
+       THREAD_LOCAL_ALLOC.
+       * test.c (reverse_test): Call fork_a_thread() only if GC_PTHREADS
+       or GC_WIN32_THREADS; remove fork_a_thread() macros definition.
+       * test.c (reverse_test): Use "volatile" when clearing "b" and "c"
+       local variables (to suppress "assigned value is never used"
+       compiler warning).
+       * test.c (tree_test): Use public GC_noop1() instead of private
+       GC_noop().
+       * test.c (typed_test): Ditto.
+       * test.c (check_heap_stats): Define and assign value to
+       "late_finalize_count" local variable only if its value is used
+       (if FINALIZE_ON_DEMAND defined).
+       * test.c (main): Remove DJGPP-specific initialization of
+       GC_stackbottom (not needed anymore, handled in gcconfig.h).
+       * trace_test.c: Guard #define GC_DEBUG with #ifndef.
+       * trace_test.c: Include "gc_backptr.h".
+       * trace_test.c (main): Call GC_INIT().
+       * trace_test.c (main): Add "return 0" statement.
 
 2009-05-25  Hans Boehm <Hans.Boehm@hp.com> (Really Petter Urkedal)
+
        * dyn_load.c (GC_register_dynlib_callback): Use new index j
        instead of i in the inner loop.
 
-2009-05-24  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski, diff85)
+2009-05-24  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
+       (diff85)
+
        * tests/test.c: Increment n_tests with fetch_and_add when possible,
        avoiding need to export lock.
 
-2009-05-22  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski, diff63,diff65)
+2009-05-22  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
+       (diff63,diff65)
+
        * include/gc_pthread_redirects.h:
                - dlfcn.h is included for dlopen() proto before undefining
                "dlopen" (so, it's possible now to include dlfcn.h after
                (before closing "extern C").
        * pthread_support.c: Fix out of memory handling for Thread_Reps.
        * win32_threads.c: Don't include process.h on winCE,
-       improve out of memory handling for thread structures, dont
+       improve out of memory handling for thread structures, don't
        define GC_beginthreadex and GC_endthreadex for winCE.
 
-2009-05-22  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski, diff71)
+2009-05-22  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski
+       (diff71)
+
        * tests/test.c: Change gcj vtable decriptor type from size_t to
        GC_word.
 
 2009-05-22  Hans Boehm <Hans.Boehm@hp.com>
+
        * gcj_mlc.c: Add comment.
        * tests/test.c: Change NTEST to NTHREADS.  Fork 5 threads by default.
        Run reverse_test a second time in each thread.Add comments.
-       Dont rely on AO_fetch_and_add.
+       Don't rely on AO_fetch_and_add.
 
 2009-05-22  Hans Boehm <Hans.Boehm@hp.com> (Largely from Ludovic Cortes)
+
        * dyn_load.c (GC_register_dynlib_callback,
        GC_register_dynamic_libraries_dl_iterate_phdr): Add support
        for GNU_PT_RELRO relocations.
 
-2009-05-22  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski, diff61)
+2009-05-22  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
+       (diff61)
+
        * Makefile, Makefile.direct: GC_SOLARIS_PTHREADS was replaced
        by GC_SOLARIS_THREADS.
        * include/gc.h: Improve finalizer documentation.
        * mips_sgi_mach_dep.s: Replace _MIPS_SIM_ABI32 with _ABIO32.
        * pthread_stop_world.c, Makefile.dj: Fix typos.
 
-2009-05-21  Hans Boehm <Hans.Boehm@hp.com> 
+2009-05-21  Hans Boehm <Hans.Boehm@hp.com>
+
        * win32_threads.c (GC_new_thread): Make first_thread
        visible to the whole file.
        (UNPROTECT): New macro.
        (GC_remove_protection): Check if already unprotected.
 
 2009-05-20  Hans Boehm <Hans.Boehm@hp.com> (really Ivan Maidanski)
+
        * doc/README.win32: Add OpenWatcom warning.
        * include/private/gcconfig.h: Really check it in.
 
 2009-05-19  Hans Boehm <Hans.Boehm@hp.com> (Mostly Ivan Maidanski, Dave Korn)
+
        * os_dep.c (GC_get_stack_base, windows): Replace with Dave Korn's
        code from gcc version.
        * os_dep.c: make gc compilable (optionally) for Cygwin with
-       GetWriteWatch-based virtual dirty bit implementation ("os_dep.c" file). 
+       GetWriteWatch-based virtual dirty bit implementation ("os_dep.c" file).
        * os_dep.c: Make non-win32 GC_write_fault_handler STATIC.
        * mark.c (GC_noop): fix declaration definition mismatch for DMC.
        * include/private/gcconfig.h: Enable MPROTECT_VDB and GWW_VDB for
        Watcom (Win32 only).  It works.
 
-       and GWW_VDB.  It works.
+2009-05-07  Hans Boehm <Hans.Boehm@hp.com> (and Mark Sibly)
 
-2009-05-07  Hans Boehm <Hans.Boehm@hp.com> and Mark Sibly
        * mach_dep.c: Don't use __builtin_unwind_init for register
        state on PowerPC/Darwin.
 
 2009-04-24  Hans Boehm <Hans.Boehm@hp.com>
+
        * doc/gcdescr.html: Improve description of object freelist
        structure.
        * include/private/gc_priv.h: Fix comment for _size_map.
 
 2009-03-16  Hans Boehm <Hans.Boehm@hp.com>
+
        * os_dep.c (GC_linux_stack_base): Relax sanity test.
 
-2009-03-11  Hans Boehm <Hans.Boehm@hp.com>  (Really Ivan Maidanski)
+2009-03-11  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
+
        * include/private/gc_pmark.h (PUSH_CONTENTS_HDR for
        MARK_BIT_PER_OBJ): Add missing backslash before eoln.
 
 2009-02-28  Hans Boehm <Hans.Boehm@hp.com>
+
        * misc.c (GC_set_warn_proc): Implicitly intialize GC on
        non-Cygwin win32.
 
 2009-02-28  Hans Boehm <Hans.Boehm@hp.com> (Really Petr Krajca)
+
        * configure.ac: Enable thread-local allocation for sparc-linux.
        * configure: Regenerate.
 
 2009-02-28  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
+
        * alloc.c (GC_try_to_collect): Remove duplicate initialization
        check.
        * malloc.c (GC_generic_malloc): Remove lw to eliminate single-
        * mallocx.c (GC_generic_malloc_ignore_off_page): Ditto.
 
 2009-02-28  Hans Boehm <Hans.Boehm@hp.com> (Mostly Ivan Maidansky)
+
        * allchblk.c, backgraph.c, dbg_mlc.c, dyn_load.c,
        finalize.c, include/private/gc_pmark.h, malloc.c, mark.c,
        os_dep.c, pthread_stop_world.c, pthread_support.c, reclaim.c,
        * misc.c: Refine comment.
 
 2009-02-28  Hans Boehm <Hans.Boehm@hp.com>
+
        * os_dep.c: Define GC_GWW_BUF_LEN more intelligently.  Add FIXME
        comment.
 
 2009-02-28  Hans Boehm <Hans.Boehm@hp.com> (With input from Ivan Maidansky)
+
        * win32_threads.c (GC_push_stack_for): Yet another attempt
        at the stack_min finding logic.  Try to clean up the existing code
        while minimizing VirtualQuery calls.
        *include/gc.h: Update obsolete comments.
 
 2009-02-24  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
+
        * tests/test.c:
        (gcj_class_struct2): Use cast instead of l suffix.
        Cast GetLastError to int in various places.
        Cast GC_gc_no to unsigned in printf.
 
 2009-02-24  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
+
        * include/gc.h: Fix two typos in comments.
 
 2009-02-24  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
+
        * finalize.c: Fix typo in comment.
 
 2008-12-03  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
+
        * blacklst.c (GC_print_source_pointer): Don't call GC_print_heap_obj
        with lock.
 
 2008-12-01  Hans Boehm <Hans.Boehm@hp.com>
+
        * reclaim.c: (GC_reclaim_block): Scan even nearly full blocks
        if we are checking for leaks.
 
 2008-11-12  Hans Boehm <Hans.Boehm@hp.com> (Really mostly Ivan Maidansky)
+
        * win32_threads.c: Remove mark lock spinning.
        * win32_threads.c, pthread_support.c: Update GC_unlocked_count,
        GC_spin_count, and GC_block_count using atomic operations.
 
 2008-11-11  Hans Boehm <Hans.Boehm@hp.com>
        (Really almost entirely Ivan Maidansky)
+
        * win32_threads.c: Support PARALLEL_MARK.  Make printf arg
        types agree with format specifiers.  Add missing copyright header.
        Add STATIC for GC_threads.
        * include/private/gcconfig.h: Add FIXME comment.
        * tests/test.c (run_ine_test): Replace LOCK/UNLOCK use with
        AO_fetch_and_add1_full.  Declare n_tests as AO_t.
-       (WinMain): Dont call GC_use_DllMain.
+       (WinMain): Don't call GC_use_DllMain.
        with PARALLEL_MARK or THREAD_LOCAL_ALLOC.
 
 2008-11-10  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
+
        * alloc.c (GC_try_to_collect_inner): Don't print redundant
        GC_bytes_allocd and GC_gc_no.
        (GC_stopped_mark): Print average world stop time.
        * include/private/gc_priv.h (MS_TIME_DIFF): Add cast.
 
 2008-11-10  Hans Boehm <Hans.Boehm@hp.com> (Really mostly Ivan Maidansky)
+
        * misc.c, doc/README.environment: Add support  for
        GC_FREE_SPACE_DIVISOR and GC-disable-incremental.
        * include/gc.h: Make GC_set_free_space_divisor correspond to
        (somewhat unfortunate) reality.
 
 2008-11-07  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
+
        (Mostly improves LLP64 support.)
        * backgraph.c, checksums.c, dbg_mlc.c, finalize.c, mark.c,
        misc.c, reclaim.c: Changed some int and long type to word or size_t
        * mark.c (GC_check_dirty): Move declaration out of func body.
 
 2008-11-06  Hans Boehm <Hans.Boehm@hp.com>
+
        * doc/gcinterface.html: Improve REDIRECT_MALLOC documentation.
        * include/gc.h (GC_register_my_thread): Improve comment.
 
 2008-11-04  Hans Boehm <Hans.Boehm@hp.com>
+
        * Makefile.direct: Add comment for -DCHECKSUMS.
 
 2008-10-27  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
+
        * thread_local_alloc.c, include/private/thread_local_alloc.h:
        Fix typos in comments.
        * finalize.c: Declare mark_procs and GC_register_finalizer_inner
        * malloc.c (GC_free): Move size calculation below assertion.
 
 2008-10-27  Hans Boehm <Hans.Boehm@hp.com>
+
        * win32_threads.c (GC_get_stack_min, GC_may_be_in_stack):
        Add one entry VirtualQuery cache, I_HOLD_LOCK assertions.
        (GC_push_stack_for, GC_get_next_stack) : Hopefully fix WINCE support.
 
-2008-10-27  Hans Boehm <Hans.Boehm@hp.com> (Thanks to Klaus Treichel.)
+2008-10-27  Hans Boehm <Hans.Boehm@hp.com> (Thanks to Klaus Treichel)
+
        * finalize.c (GC_general_register_disappearing_link): Add
        assertion.
        * malloc.c (GC_generic_malloc): Round lb to granules, not words.
        granules, not words.
 
 2008-10-27  Hans Boehm <Hans.Boehm@hp.com> (Really Rex Dieter and
-       Petr Krajca)
+                                           Petr Krajca)
+
        * mach_dep.c (NO_GETCONTEXT): Define for sparc linux.
        * configure.ac: Define mach_dep for sparc-linux.
        * configure: Regenerate.
 
 2008-10-25  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
+
        * mark_rts.c (GC_approx_sp): Use volatile to avoid common
        warning.
 
 2008-10-25  Hans Boehm <Hans.Boehm@hp.com>
+
        * dyn_load.c (GC_cond_add_roots): Fix GC_get_next_stack argument
        order.
 
 2008-10-24  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
+
        * alloc.c, dbg_mlc.c, dyn_load.c, finalize.c, gcj_mlc.c,
        include/gc.h, include/gc_config_macros.h, include/gc_cpp.h,
        include/gc_gcj.h, include/gc_mark.h, include/gc_typed.h,
 
 2008-10-24  Hans Boehm <Hans.Boehm@hp.com>
        (Partially based loosely on patch from Ivan Maidanski)
+
        * win32_threads.c (GC_may_be_in_stack): New.  (GC_Thread_Rep):
        Add last_stack_min.  (GC_push_stack_for): Use last_stack_min.
        (GC_get_next_stack): Add limit argument, use_last_stack_min.
        * Makefile.in: Regenerate.
 
 2008-10-21  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
+
        * include/private/gc_locks.h, include/private/gc_pmark.h,
        include/private/gc_priv.h, include/private/gcconfig.h,
        mach_dep.c, mark_rts.c, misc.c, os_dep.c, pthread_stop_world.c,
        Fix comments.
 
 2008-10-21  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
+
        * pthread_support.c: Comment out LOCK_STATS.
        * include/gc.h: Fix comments.
 
 2008-10-20  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
+
        * misc.c (GC_init_inner): Enable GC_LOG_FILE on Cygwin.
        * include/private/gcconfig.h: Consider USE_MMAP for Cygwin.
        * os_dep.c (GC_get_main_stack_base): Use alternate definition
        * include/private/gc_priv.h: Sometimes define SETJMP on Cygwin.
 
 2008-10-20  Hans Boehm <Hans.Boehm@hp.com>
+
        * doc/README: Make it clearer when Makefile.direct is assumed.
        * cord/cord.am: install include/cord.h.
        * Makefile.in: Regenerate.
 
 2008-09-24  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
+
        * win32_threads.c (GC_pthread_join, GC_pthread_start_inner):
        Remove unused variables.
        * darwin_stop_world.c: Always declare GC_thr_init().
-       * dbg_mlc.c (GC_debug_free_inner): Dont touch oh_sz if
+       * dbg_mlc.c (GC_debug_free_inner): Don't touch oh_sz if
        SHORT_DBG_HDRS is defined.
        * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET, parallel
        mark, USE_MARK_BITS version): Refer to correct parameter name.
 
 2008-09-24  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
+
        * finalize.c (GC_general_register_disappearing_link): Remove
        redundant code.
        * gcj_mlc.c (GC_init_gcj_malloc): Add cast to signed.
        defined for X86. (STATIC): Define as "static" with NO_DEBUGGING.
 
 2008-09-24  Hans Boehm <Hans.Boehm@hp.com>
+
        * include/private/gc_priv.h: Update MAX_HEAP_SECTS.
 
 2008-09-10  Hans Boehm <Hans.Boehm@hp.com>
+
        * dbg_mlc.c (GC_print_smashed_obj): Increase robustness with
        smashed string, (GC_debug_free_inner): Mark as free.
        * mallocx.c (GC_malloc_many): Always clear new block if
        * tests/test.c: Don't define GC_DEBUG if already defined.
 
 2008-08-27  Hans Boehm <Hans.Boehm@hp.com>
+
        * doc/simple_example.html: update --enable-full-debug reference,
        Make HTML formatting standards compliant.
        * doc/debugging.html, doc/leak.html: Fix HTML formatting bugs.
        * doc/gcinterface.html: specify encoding.
 
 2008-08-27  Hans Boehm <Hans.Boehm@hp.com> (with help from Marco Maggi)
+
        * doc/simple_example.html: Update thread-local allocation
        description.
 
 2008-08-26  Hans Boehm <Hans.Boehm@hp.com> (with help from Marco Maggi)
+
        * configure.ac: Check for gc-debug earlier; replace remaining
        full-debug tests.
        * configure: Regenerate.
        * tests/test.c: Minimally test GC_..._INCR and friends.
 
 2008-08-21  Hans Boehm <Hans.Boehm@hp.com>
+
        * mark.c: (GC_push_next_marked, GC_push_next_marked_dirty,
        GC_push_next_marked_uncollectable): Never invoke GC_push_marked
        on free hblk.
        * include/private/gc_pmark.h: (PUSH_OBJ): Add assertion.
 
 2008-08-21  Hans Boehm <Hans.Boehm@hp.com>
+
        * alloc.c, include/gc_mark.h, Makefile.direct: Improve comments.
 
 2008-08-01  Hans Boehm <Hans.Boehm@hp.com> (Really Klaus Treichel)
+
        * configure.ac: Set win32_threads on MinGW.
        * configure: Regenerate.
 
 2008-07-25  Hans Boehm <Hans.Boehm@hp.com> (Really mostly Ivan Maidanski)
+
        Ivan's description of the patch follows. Note that a few pieces like
        the GC_malloc(0) patch, were not applied since an alternate had been
        previously applied.  A few differed stylistically from the rest of
        naming bugs (as a few did), where replaced by STATIC, which is
        ignored by default.
 
-        - minor bug fixing (for FreeBSD, for THREAD_LOCAL_ALLOC and for
-         GC_malloc(0));
-        - addition of missing getter/setter functions for public variables
-         (may be useful if compiled as Win32 DLL);
-        - addition of missing GC_API for some exported functions;
-        - addition of missing "static" declarator for internal functions
-          and variables (where possible);
-        - replacement of all remaining K&R-style definitions with ANSI
-         C ones (__STDC__ macro is not used anymore);
-        - addition of some Win32 macro definitions (that may be missing in
-         the standard headers supplied with a compiler) for GWW_VDB mode;
-        - elimination of most compiler warnings (except for
-         "uninitialized data" warning);
-        - several typos correction;
-        - missing parenthesis addition in macros in some header files of
-         "libatomic_ops" module.
+       - minor bug fixing (for FreeBSD, for THREAD_LOCAL_ALLOC and for
+       GC_malloc(0));
+       - addition of missing getter/setter functions for public variables
+       (may be useful if compiled as Win32 DLL);
+       - addition of missing GC_API for some exported functions;
+       - addition of missing "static" declarator for internal functions
+       and variables (where possible);
+       - replacement of all remaining K&R-style definitions with ANSI
+       C ones (__STDC__ macro is not used anymore);
+       - addition of some Win32 macro definitions (that may be missing in
+       the standard headers supplied with a compiler) for GWW_VDB mode;
+       - elimination of most compiler warnings (except for
+       "uninitialized data" warning);
+       - several typos correction;
+       - missing parenthesis addition in macros in some header files of
+       "libatomic_ops" module.
 
        My highlights based on reading the patch:
 
        * allchblk.c: Remove GC_freehblk_ptr decl.
        Make free_list_index_of() static.
-       * include/gc.h: Use __int64 on win64, define GC_oom_func, 
+       * include/gc.h: Use __int64 on win64, define GC_oom_func,
        GC_finalizer_notifier_proc, GC_finalizer_notifier_proc,
        add getter and setters: GC_get_gc_no, GC_get_parallel,
        GC_set_oom_fn, GC_set_finalize_on_demand,
        blacklist printing.
        * misc.c: Fix log file naming based on environment variable
        for Windows.  Make GC_set_warn_proc and GC_set_free_space_divisor
-       just return current value with 0 argument.  Add DONT_USER_USER32_DLL.
+       just return current value with 0 argument.  Add DONT_USE_USER32_DLL.
        Add various getters and setters as in gc.h.
        * os_dep.c: Remove no longer used GC_disable/enable_signals
        implementations.  (GC_get_stack_base): Add pthread_attr_destroy
        call GC_init_thread_local.
 
 2008-07-21  Hans Boehm <Hans.Boehm@hp.com>
+
        * Makefile.direct, mach_dep.c: Add support for NO_GETCONTEXT.
        * mach_dep.c: Include signal.h.
        * gc_priv.h: Factor out INLINE declaration.
        * include/gc_inline.h: Fix comments.
 
 2008-05-03  Hans Boehm <Hans.Boehm@hp.com>
-       
+
        * include/gc_version.h, configure.ac, doc/README:
        Change to version 7.2alpha1.
        * configure: Regenerate.
 [7.1]
 
 2008-05-03  Hans Boehm <Hans.Boehm@hp.com>
-       
+
        * include/gc_version.h, configure.ac, doc/README:
        Change to version 7.1.
        * configure: Regenerate.
        * include/private/gc_priv.h: Comment hb_sz range limit.
 
 2008-01-29  Hans Boehm <Hans.Boehm@hp.com>  (with help from Manuel Serrano)
-       
+
        * mark.c (GC_push_next_marked): correct comment.
        * Makefile.direct: document NO_PROC_STAT.
        * include/private/gcconfig.h: Accomodate NO_PROC_STAT.
 
 2008-01-10  Hans Boehm <Hans.Boehm@hp.com>
-       
+
        * include/gc_version.h, configure.ac, doc/README:
        Change to version 7.1alpha3.
        * configure: Regenerate.
 [7.1alpha2]
 
 2008-01-10  Hans Boehm <Hans.Boehm@hp.com>
-       
+
        * include/gc_version.h, configure.ac, doc/README:
        Change to version 7.1alpha2.
        * configure: Regenerate.
 
 2008-01-10  Hans Boehm <Hans.Boehm@hp.com>
-       
+
        * Makefile.am: Mention atomic_ops.c and atomic_ops_sysdeps.S
        again.  Refer to build directory as ".".
        * Makefile.in: Regenerate.
-       
+
 2008-01-10  Hans Boehm <Hans.Boehm@hp.com>
 
        * configure.ac: Ignore --enable-parallel-mark on Darwin for now.
 2007-12-23  Hans Boehm <Hans.Boehm@hp.com>
 
        * Makefile.am: Add NT_X64_THREADS_MAKEFILE.
+
 2007-12-23  Hans Boehm <Hans.Boehm@hp.com> (Really mostly Friedrich Dominicus)
 
        * NT_X64_STATIC_THREADS_MAKEFILE: Clean up obsolete comment.
 
        * configure.ac: Put libatomic_ops links in build directory.
        * configure: Regenerate.
-       * Makefile.am: Dont mention atomic_ops.c and atomic_ops_sysdeps.S
+       * Makefile.am: Don't mention atomic_ops.c and atomic_ops_sysdeps.S
        as nodist sources.
 
 2007-12-20  Hans Boehm <Hans.Boehm@hp.com>
        GC_NO_THREAD_DECLS, don't test explicitly for GC_SOLARIS_THREADS.
 
 2007-12-20  Hans Boehm <Hans.Boehm@hp.com>
-       
-       * alloc.c: Deal correctly with address wrapping for 
+
+       * alloc.c: Deal correctly with address wrapping for
        GC_greatest_plausible_heap_addr and GC_least_plausible_heap_addr.
        * finalize.c, include/gc.h (GC_register_disappearing_link,
        GC_register_finalizer_inner): Improve out-of-memory handling.
        * allchblk.c, configure.ac (add --enable-munmap)
        * configure: Regenerate.
 
-2007-12-10  Andreas Tobler  <a.tobler@schweiz.org>
+2007-12-10  Andreas Tobler <a.tobler@schweiz.org>
 
        * dyn_load.c (GC_dyld_image_add): Remove ifdef clause and use the macro
        GC_GETSECTBYNAME instead.
        * Makefile.in: Regenerate.
 
 2007-08-15  Hans Boehm <Hans.Boehm@hp.com> (really Samuel Thibault)
-       
+
        * pthread_support.c (GC_thr_init): Use sysconf(_SC_NPROCESSORS_ONLN)
        for HURD.
 
        No longer test for RS6000.
 
 2007-08-03  Hans Boehm <Hans.Boehm@hp.com>
-       
+
        * alloc.c, backgraph.c, headers.c, include/private/gc_priv.h:
        Maintain GC_our_memory and GC_n_memory.
        * dbg_mlc.c (GC_print_smashed_obj): Improve message.
        exist.
 
 2007-07-02  Hans Boehm <Hans.Boehm@hp.com>
-       
+
        * version.h, configure.ac, doc/README: Change to version 7.1alpha1.
        * configure: Regenerate.
 
 2007-07-02  Hans Boehm <Hans.Boehm@hp.com>
-       
+
        * version.h, configure.ac, doc/README: Change to version 7.0.
        * configure: Regenerate.
 
 
        * backgraph.c (per_object_func): Make argument types consistent.
        (GC_traverse_back_graph): Mark GC_deepest_obj.
-       
+
 2007-06-29  Hans Boehm <Hans.Boehm@hp.com>
 
        * finalize.c (GC_finalize): Change dl_size and fo_size to size_t.
        * Makefile.am, Makefile.direct: Add NT_X64_STATIC_THREADS_MAKEFILE.
        * Makefile.in: Regenerate.
        * NT_X64_STATIC_THREADS_MAKEFILE: Fix warning flags.
-       * allochblk.c, alloc.c, blacklst.c, dbg_malc.c, dyn_load.c,
+       * allochblk.c, alloc.c, blacklst.c, dbg_mlc.c, dyn_load.c,
        finalize.c, headers.c, mach_dep.c, malloc.c, mark.c, misc.c,
        obj_map.c, os_dep.c, ptr_chck.c, reclaim.c, typd_mlc.c,
        win32_threads.c, cord/de_win.c, include/gc_mark.h,
        * msvc_dbg.c(GetModuleBase): Replace strcat with strcat_s.
 
 2007-06-06  Hans Boehm <Hans.Boehm@hp.com>
-       
+
        * include/gc.h: (GC_word, GC_signed_word): Fix win64 definitions.
        Don't include windows.h in an extern "C" context.
        * include/private/gcconfig.h: Fix win64/X86_64 configuration.
        * cord/cord.am, tests/tests.am: Add better library dependencies.
        Remove now unnecessary dependencies.
        * Makefile.in: Regenerate.
-       * include/gc.h (GC_begin_thread_ex, GC_endthreadex, GC_ExitThread):
+       * include/gc.h (GC_beginthreadex, GC_endthreadex, GC_ExitThread):
        Move to define on all Windows platforms.  (_beginthread): define
        to generate error if used.
 
        * include/private/gc_locks.h: Format to 80 columns.
 
 2007-05-22  Hans Boehm <Hans.Boehm@hp.com>
-       
+
        * malloc.c(GC_free): Ignore bad frees on MSWIN32 with REDIRECT_MALLOC.
        * NT_MAKEFILE: msvc_dbg.h is in include/private.  Don't use cvars
        rc.
        * tests/thread_leak_test.c: Don't unconditionally define
        GC_LINUX_THREADS.
 
-2007-05-21  Andreas Tobler  <a.tobler@schweiz.org>
+2007-05-21  Andreas Tobler <a.tobler@schweiz.org>
 
        * Makefile.am: Remove extra_ldflags_libgc definition.
        * Makefile.in: Regenerate.
 
 2007-05-08  Hans Boehm <Hans.Boehm@hp.com>
 
-       * Makefile.am: Dont distribute copied atomic_ops files.  Include
+       * Makefile.am: Don't distribute copied atomic_ops files.  Include
        libatomic_ops with "make dist".
        * Makefile.in: Regenerate.
        * configure: Regenerate.
        * include/gc.h: Remove more SRC_M3 references.
        * include/private/gcconfig.h: Remove still more SRC_M3 references.
        GC_SOLARIS_THREADS no longer needs to be checked separately.
-       
+
 2007-05-08  Hans Boehm <Hans.Boehm@hp.com>
 
        * thread_local_alloc.c, include/private/thread_local_alloc.h:
        * win32_threads.c: Include stdint.h for Mingw.  Add GC_API for DllMain.
        (GC_use_DllMain): Fix assertion.
 
-2007-02-14  Andreas Tobler  <a.tobler@schweiz.org>
+2007-02-14  Andreas Tobler <a.tobler@schweiz.org>
 
        * configure.ac: Introduce extra_ldflags_libgc. Use it for Darwin.
        * configure: Regenerate.
        targets. Remove comments.
        Prepare ppc64 support for Darwin.
 
-2007-01-29  Andreas Tobler  <a.tobler@schweiz.org>
+2007-01-29  Andreas Tobler <a.tobler@schweiz.org>
 
        * darwin_stop_world.c: Clean up and reformat code.
 
-2007-01-28  Andreas Tobler  <a.tobler@schweiz.org>
+2007-01-28  Andreas Tobler <a.tobler@schweiz.org>
 
        * darwin_stop_world.c (GC_push_all_stacks): Fix compiler warnings.
        Make i unsigned.
        * configure: Regenerate.
        * README.changes: Point to ChangeLog.
 
-2007-01-25  Andreas Tobler  <a.tobler@schweiz.org>
+2007-01-25  Andreas Tobler <a.tobler@schweiz.org>
 
        * darwin_stop_world.c: Move THREAD_FLD defines to ...
        * include/private/gc_priv.h: ... here.
        * os_dep.c (catch_exception_raise): Use THREAD_FLD for exc_state member
        access.
 
-2007-01-18  Andreas Tobler  <a.tobler@schweiz.org>
+2007-01-18  Andreas Tobler <a.tobler@schweiz.org>
 
        * os_dep.c (if defined(MPROTECT_VDB) && defined(DARWIN)): Clean up and
        reformat code.
        Correct email reference.
 
-2007-01-11  Andreas Tobler  <a.tobler@schweiz.org>
+2007-01-11  Andreas Tobler <a.tobler@schweiz.org>
 
        * configure.ac (i?86*-*-darwin*): Replaced HAS_I386_THREAD_STATE_* with
        HAS_X86_THREAD_STATE32_*.
        X86_64 Darwin. Replaced old i386_EXCEPTION_STATE_* definition with
        x86_EXCEPTION_STATE32_*. Add X86_64 for exc_state.faultvaddr.
 
-2007-01-09  Andreas Tobler  <a.tobler@schweiz.org>
+2007-01-09  Andreas Tobler <a.tobler@schweiz.org>
 
        * libtool.m4: Update to version from libtool-1.5.22.
        * ltmain.sh: Likewise.
        * ChangeLog: Created.
 
 See doc/README.changes for earlier changes.
-
index c7e5bb806ed0fd4178f91c556197fdf39a88f7d6..bb3a967d402b6f6e22726bf8fbbeca3fc681dcba 100644 (file)
@@ -130,8 +130,8 @@ gctest.exe: tests/test.o gc.a
 # If an optimized setjmp_test generates a segmentation fault,
 # odds are your compiler is broken.  Gctest may still work.
 # Try compiling setjmp_t.c unoptimized.
-setjmp_test.exe: $(srcdir)/setjmp_t.c $(srcdir)/gc.h
-       $(CC) $(CFLAGS) -o setjmp_test.exe $(srcdir)/setjmp_t.c
+setjmp_test.exe: $(srcdir)/extra/setjmp_t.c $(srcdir)/gc.h
+       $(CC) $(CFLAGS) -o setjmp_test.exe $(srcdir)/extra/setjmp_t.c
 
 test: setjmp_test.exe gctest.exe
        ./setjmp_test
diff --git a/src/mm/boehm-gc/MacOS.c b/src/mm/boehm-gc/MacOS.c
deleted file mode 100644 (file)
index b56bea7..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
-       MacOS.c
-       
-       Some routines for the Macintosh OS port of the Hans-J. Boehm, Alan J. Demers
-       garbage collector.
-       
-       <Revision History>
-       
-       11/22/94  pcb  StripAddress the temporary memory handle for 24-bit mode.
-       11/30/94  pcb  Tracking all memory usage so we can deallocate it all at once.
-       02/10/96  pcb  Added routine to perform a final collection when
-unloading shared library.
-       
-       by Patrick C. Beard.
- */
-/* Boehm, February 15, 1996 2:55 pm PST */
-
-#include <Resources.h>
-#include <Memory.h>
-#include <LowMem.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "gc.h"
-#include "gc_priv.h"
-
-// use 'CODE' resource 0 to get exact location of the beginning of global space.
-
-typedef struct {
-       unsigned long aboveA5;
-       unsigned long belowA5;
-       unsigned long JTSize;
-       unsigned long JTOffset;
-} *CodeZeroPtr, **CodeZeroHandle;
-
-void* GC_MacGetDataStart()
-{
-       CodeZeroHandle code0 = (CodeZeroHandle)GetResource('CODE', 0);
-       if (code0) {
-               long belowA5Size = (**code0).belowA5;
-               ReleaseResource((Handle)code0);
-               return (LMGetCurrentA5() - belowA5Size);
-       }
-       fprintf(stderr, "Couldn't load the jump table.");
-       exit(-1);
-       return 0;
-}
-
-/* track the use of temporary memory so it can be freed all at once. */
-
-typedef struct TemporaryMemoryBlock TemporaryMemoryBlock, **TemporaryMemoryHandle;
-
-struct TemporaryMemoryBlock {
-       TemporaryMemoryHandle nextBlock;
-       char data[];
-};
-
-static TemporaryMemoryHandle theTemporaryMemory = NULL;
-static Boolean firstTime = true;
-
-void GC_MacFreeTemporaryMemory(void);
-
-Ptr GC_MacTemporaryNewPtr(size_t size, Boolean clearMemory)
-{
-       static Boolean firstTime = true;
-       OSErr result;
-       TemporaryMemoryHandle tempMemBlock;
-       Ptr tempPtr = nil;
-
-       tempMemBlock = (TemporaryMemoryHandle)TempNewHandle(size + sizeof(TemporaryMemoryBlock), &result);
-       if (tempMemBlock && result == noErr) {
-               HLockHi((Handle)tempMemBlock);
-               tempPtr = (**tempMemBlock).data;
-               if (clearMemory) memset(tempPtr, 0, size);
-               tempPtr = StripAddress(tempPtr);
-
-               // keep track of the allocated blocks.
-               (**tempMemBlock).nextBlock = theTemporaryMemory;
-               theTemporaryMemory = tempMemBlock;
-       }
-       
-#     if !defined(SHARED_LIBRARY_BUILD)
-       // install an exit routine to clean up the memory used at the end.
-       if (firstTime) {
-               atexit(&GC_MacFreeTemporaryMemory);
-               firstTime = false;
-       }
-#     endif
-       
-       return tempPtr;
-}
-
-extern word GC_fo_entries; 
-
-static void perform_final_collection()
-{
-  unsigned i;
-  word last_fo_entries = 0;
-  
-  /* adjust the stack bottom, because CFM calls us from another stack
-     location. */
-     GC_stackbottom = (ptr_t)&i;
-
-  /* try to collect and finalize everything in sight */
-    for (i = 0; i < 2 || GC_fo_entries < last_fo_entries; i++) {
-        last_fo_entries = GC_fo_entries;
-        GC_gcollect();
-    }
-}
-
-
-void GC_MacFreeTemporaryMemory()
-{
-# if defined(SHARED_LIBRARY_BUILD)
-    /* if possible, collect all memory, and invoke all finalizers. */
-      perform_final_collection();
-# endif
-
-    if (theTemporaryMemory != NULL) {
-       long totalMemoryUsed = 0;
-       TemporaryMemoryHandle tempMemBlock = theTemporaryMemory;
-       while (tempMemBlock != NULL) {
-               TemporaryMemoryHandle nextBlock = (**tempMemBlock).nextBlock;
-               totalMemoryUsed += GetHandleSize((Handle)tempMemBlock);
-               DisposeHandle((Handle)tempMemBlock);
-               tempMemBlock = nextBlock;
-       }
-       theTemporaryMemory = NULL;
-
-#       if !defined(SHARED_LIBRARY_BUILD)
-         if (GC_print_stats) {
-            fprintf(stdout, "[total memory used:  %ld bytes.]\n",
-                  totalMemoryUsed);
-            fprintf(stdout, "[total collections:  %ld.]\n", GC_gc_no);
-         }
-#       endif
-    }
-}
-
-#if __option(far_data)
-
-  void* GC_MacGetDataEnd()
-  {
-       CodeZeroHandle code0 = (CodeZeroHandle)GetResource('CODE', 0);
-       if (code0) {
-               long aboveA5Size = (**code0).aboveA5;
-               ReleaseResource((Handle)code0);
-               return (LMGetCurrentA5() + aboveA5Size);
-       }
-       fprintf(stderr, "Couldn't load the jump table.");
-       exit(-1);
-       return 0;
-  }
-
-#endif /* __option(far_data) */
diff --git a/src/mm/boehm-gc/Makefile b/src/mm/boehm-gc/Makefile
deleted file mode 100644 (file)
index b7f99fd..0000000
+++ /dev/null
@@ -1,716 +0,0 @@
-# This is the original manually generated Makefile.  It may still be used
-# to build the collector.
-#
-# Primary targets:
-# gc.a - builds basic library
-# c++ - adds C++ interface to library
-# cords - adds cords (heavyweight strings) to library
-# test - prints porting information, then builds basic version of gc.a,
-#               and runs some tests of collector and cords.  Does not add cords or
-#       c++ interface to gc.a
-# cord/de - builds dumb editor based on cords.
-ABI_FLAG= 
-# ABI_FLAG should be the cc flag that specifies the ABI.  On most
-# platforms this will be the empty string.  Possible values:
-# +DD64 for 64-bit executable on HP/UX.
-# -n32, -n64, -o32 for SGI/MIPS ABIs.
-
-AS_ABI_FLAG=$(ABI_FLAG)
-# ABI flag for assembler.  On HP/UX this is +A64 for 64 bit
-# executables.
-
-CC=cc $(ABI_FLAG)
-CXX=g++ $(ABI_FLAG)
-AS=as $(AS_ABI_FLAG)
-#  The above doesn't work with gas, which doesn't run cpp.
-#  Define AS as `gcc -c -x assembler-with-cpp' instead.
-
-# Redefining srcdir allows object code for the nonPCR version of the collector
-# to be generated in different directories.
-srcdir= .
-VPATH= $(srcdir)
-
-# Atomic_ops installation directory.  If this doesn't exist, we create
-# it from the included libatomic_ops distribution.
-AO_VERSION=1.2
-AO_SRC_DIR=$(srcdir)/libatomic_ops-$(AO_VERSION)
-AO_INSTALL_DIR=$(srcdir)/libatomic_ops-install
-
-CFLAGS= -O -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include -DATOMIC_UNCOLLECTABLE -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS
-
-# To build the parallel collector on Linux, add to the above:
-# -DGC_LINUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC
-# To build the thread-capable preload library that intercepts
-# malloc, add -DGC_USE_DLOPEN_WRAP -DREDIRECT_MALLOC=GC_malloc -fpic
-# To build the parallel collector in a static library on HP/UX,
-# add to the above:
-# -DGC_HPUX_THREADS -DTHREAD_LOCAL_ALLOC -D_POSIX_C_SOURCE=199506L -mt
-# FIXME: PARALLEL_MARK currently broken on HP/UX.
-# To build the thread-safe collector on Tru64, add to the above:
-# -pthread -DGC_OSF1_THREADS
-
-# HOSTCC and HOSTCFLAGS are used to build executables that will be run as
-# part of the build process, i.e. on the build machine.  These will usually
-# be the same as CC and CFLAGS, except in a cross-compilation environment.
-# Note that HOSTCFLAGS should include any -D flags that affect thread support.
-HOSTCC=$(CC)
-HOSTCFLAGS=$(CFLAGS)
-
-# For dynamic library builds, it may be necessary to add flags to generate
-# PIC code, e.g. -fPIC on Linux.
-
-# Setjmp_test may yield overly optimistic results when compiled
-# without optimization.
-
-# These define arguments influence the collector configuration:
-# -DFIND_LEAK causes GC_find_leak to be initially set.
-#   This causes the collector to assume that all inaccessible
-#   objects should have been explicitly deallocated, and reports exceptions.
-#   Finalization and the test program are not usable in this mode.
-# -DGC_SOLARIS_THREADS enables support for Solaris pthreads.
-#   Must also define -D_REENTRANT.
-# -DGC_IRIX_THREADS enables support for Irix pthreads.  See README.irix.
-# -DGC_HPUX_THREADS enables support for HP/UX 11 pthreads.
-#   Also requires -D_REENTRANT or -D_POSIX_C_SOURCE=199506L. See README.hp.
-# -DGC_LINUX_THREADS enables support for Xavier Leroy's Linux threads.
-#   see README.linux.  -D_REENTRANT may also be required.
-# -DGC_OSF1_THREADS enables support for Tru64 pthreads.
-# -DGC_FREEBSD_THREADS enables support for FreeBSD pthreads.
-#   Appeared to run into some underlying thread problems.
-# -DGC_DARWIN_THREADS enables support for Mac OS X pthreads.
-# -DGC_AIX_THREADS enables support for IBM AIX threads.
-# -DGC_DGUX386_THREADS enables support for DB/UX on I386 threads.
-#   See README.DGUX386.
-# -DGC_WIN32_THREADS enables support for win32 threads.  That makes sense
-#   for this Makefile only under Cygwin.
-# -DGC_THREADS should set the appropriate one of the above macros.
-#   It assumes pthreads for Solaris.
-# -DALL_INTERIOR_POINTERS allows all pointers to the interior
-#   of objects to be recognized.  (See gc_priv.h for consequences.)
-#   Alternatively, GC_all_interior_pointers can be set at process
-#   initialization time.
-# -DSMALL_CONFIG tries to tune the collector for small heap sizes,
-#   usually causing it to use less space in such situations.
-#   Incremental collection no longer works in this case.
-# -DLARGE_CONFIG tunes the collector for unusually large heaps.
-#   Necessary for heaps larger than about 500 MB on most machines.
-#   Recommended for heaps larger than about 64 MB.
-# -DDONT_ADD_BYTE_AT_END is meaningful only with -DALL_INTERIOR_POINTERS or
-#   GC_all_interior_pointers = 1.  Normally -DALL_INTERIOR_POINTERS
-#   causes all objects to be padded so that pointers just past the end of
-#   an object can be recognized.  This can be expensive.  (The padding
-#   is normally more than one byte due to alignment constraints.)
-#   -DDONT_ADD_BYTE_AT_END disables the padding.
-# -DNO_EXECUTE_PERMISSION may cause some or all of the heap to not
-#   have execute permission, i.e. it may be impossible to execute
-#   code from the heap.  Currently this only affects the incremental
-#   collector on UNIX machines.  It may greatly improve its performance,
-#   since this may avoid some expensive cache synchronization.
-# -DGC_NO_OPERATOR_NEW_ARRAY declares that the C++ compiler does not support
-#   the  new syntax "operator new[]" for allocating and deleting arrays.
-#   See gc_cpp.h for details.  No effect on the C part of the collector.
-#   This is defined implicitly in a few environments.  Must also be defined
-#   by clients that use gc_cpp.h.
-# -DREDIRECT_MALLOC=X causes malloc to be defined as alias for X.
-#   Unless the following macros are defined, realloc is also redirected
-#   to GC_realloc, and free is redirected to GC_free.
-#   Calloc and strdup are redefined in terms of the new malloc.  X should
-#   be either GC_malloc or GC_malloc_uncollectable, or
-#   GC_debug_malloc_replacement.  (The latter invokes GC_debug_malloc
-#   with dummy source location information, but still results in
-#   properly remembered call stacks on Linux/X86 and Solaris/SPARC.
-#   It requires that the following two macros also be used.)
-#   The former is occasionally useful for working around leaks in code
-#   you don't want to (or can't) look at.  It may not work for
-#   existing code, but it often does.  Neither works on all platforms,
-#   since some ports use malloc or calloc to obtain system memory.
-#   (Probably works for UNIX, and win32.)  If you build with DBG_HDRS_ALL,
-#   you should only use GC_debug_malloc_replacement as a malloc
-#   replacement.
-# -DREDIRECT_REALLOC=X causes GC_realloc to be redirected to X.
-#   The canonical use is -DREDIRECT_REALLOC=GC_debug_realloc_replacement,
-#   together with -DREDIRECT_MALLOC=GC_debug_malloc_replacement to
-#   generate leak reports with call stacks for both malloc and realloc.
-#   This also requires the following:
-# -DREDIRECT_FREE=X causes free to be redirected to X.  The
-#   canonical use is -DREDIRECT_FREE=GC_debug_free.
-# -DIGNORE_FREE turns calls to free into a noop.  Only useful with
-#   -DREDIRECT_MALLOC.
-# -DNO_DEBUGGING removes GC_dump and the debugging routines it calls.
-#   Reduces code size slightly at the expense of debuggability.
-# -DJAVA_FINALIZATION makes it somewhat safer to finalize objects out of
-#   order by specifying a nonstandard finalization mark procedure  (see
-#   finalize.c).  Objects reachable from finalizable objects will be marked
-#   in a separate postpass, and hence their memory won't be reclaimed.
-#   Not recommended unless you are implementing a language that specifies
-#   these semantics.  Since 5.0, determines only the initial value
-#   of GC_java_finalization variable.
-# -DFINALIZE_ON_DEMAND causes finalizers to be run only in response
-#   to explicit GC_invoke_finalizers() calls.
-#   In 5.0 this became runtime adjustable, and this only determines the
-#   initial value of GC_finalize_on_demand.
-# -DATOMIC_UNCOLLECTABLE includes code for GC_malloc_atomic_uncollectable.
-#   This is useful if either the vendor malloc implementation is poor,
-#   or if REDIRECT_MALLOC is used.
-# -DMARK_BIT_PER_GRANULE requests that a mark bit (or often byte)
-#   be allocated for each allocation granule, as opposed to each object.
-#   This often improves speed, possibly at some cost in space and/or
-#   cache footprint.  Normally it is best to let this decision be
-#   made automatically depending on platform.
-# -DMARK_BIT_PER_OBJ requests that a mark bit be allocated for each
-#   object instead of allocation granule.  The opposiet of
-#   MARK_BIT_PER_GRANULE.
-# -DHBLKSIZE=ddd, where ddd is a power of 2 between 512 and 16384, explicitly
-#   sets the heap block size.  Each heap block is devoted to a single size and
-#   kind of object.  For the incremental collector it makes sense to match
-#   the most likely page size.  Otherwise large values result in more
-#   fragmentation, but generally better performance for large heaps.
-# -DUSE_MMAP use MMAP instead of sbrk to get new memory.
-#   Works for Solaris and Irix.
-# -DUSE_MUNMAP causes memory to be returned to the OS under the right
-#   circumstances.  This currently disables VM-based incremental collection.
-#   This is currently experimental, and works only under some Unix,
-#   Linux and Windows versions.
-# -DMMAP_STACKS (for Solaris threads) Use mmap from /dev/zero rather than
-#   GC_scratch_alloc() to get stack memory.
-# -DPRINT_BLACK_LIST Whenever a black list entry is added, i.e. whenever
-#   the garbage collector detects a value that looks almost, but not quite,
-#   like a pointer, print both the address containing the value, and the
-#   value of the near-bogus-pointer.  Can be used to identifiy regions of
-#   memory that are likely to contribute misidentified pointers.
-# -DKEEP_BACK_PTRS Add code to save back pointers in debugging headers
-#   for objects allocated with the debugging allocator.  If all objects
-#   through GC_MALLOC with GC_DEBUG defined, this allows the client
-#   to determine how particular or randomly chosen objects are reachable
-#   for debugging/profiling purposes.  The gc_backptr.h interface is
-#   implemented only if this is defined.
-# -DGC_ASSERTIONS Enable some internal GC assertion checking.  Currently
-#   this facility is only used in a few places.  It is intended primarily
-#   for debugging of the garbage collector itself, but could also
-# -DDBG_HDRS_ALL Make sure that all objects have debug headers.  Increases
-#   the reliability (from 99.9999% to 100% mod. bugs) of some of the debugging
-#   code (especially KEEP_BACK_PTRS).  Makes -DSHORT_DBG_HDRS possible.
-#   Assumes that all client allocation is done through debugging
-#   allocators.
-# -DSHORT_DBG_HDRS Assume that all objects have debug headers.  Shorten
-#   the headers to minimize object size, at the expense of checking for
-#   writes past the end of an object.  This is intended for environments
-#   in which most client code is written in a "safe" language, such as
-#   Scheme or Java.  Assumes that all client allocation is done using
-#   the GC_debug_ functions, or through the macros that expand to these,
-#   or by redirecting malloc to GC_debug_malloc_replacement.
-#   (Also eliminates the field for the requested object size.)
-#   occasionally be useful for debugging of client code.  Slows down the
-#   collector somewhat, but not drastically.
-# -DSAVE_CALL_COUNT=<n> Set the number of call frames saved with objects
-#   allocated through the debugging interface.  Affects the amount of
-#   information generated in leak reports.  Only matters on platforms
-#   on which we can quickly generate call stacks, currently Linux/(X86 & SPARC)
-#   and Solaris/SPARC and platforms that provide execinfo.h.
-#   Default is zero.  On X86, client
-#   code should NOT be compiled with -fomit-frame-pointer.
-# -DSAVE_CALL_NARGS=<n> Set the number of functions arguments to be
-#   saved with each call frame.  Default is zero.  Ignored if we
-#   don't know how to retrieve arguments on the platform.
-# -DCHECKSUMS reports on erroneously clear dirty bits, and unexpectedly
-#   altered stubborn objects, at substantial performance cost.
-#   Use only for debugging of the incremental collector.
-# -DGC_GCJ_SUPPORT includes support for gcj (and possibly other systems
-#   that include a pointer to a type descriptor in each allocated object).
-#   Building this way requires an ANSI C compiler.
-# -DUSE_I686_PREFETCH causes the collector to issue Pentium III style
-#   prefetch instructions.  No effect except on X86 Linux platforms.
-#   Assumes a very recent gcc-compatible compiler and assembler.
-#   (Gas prefetcht0 support was added around May 1999.)
-#   Empirically the code appears to still run correctly on Pentium II
-#   processors, though with no performance benefit.  May not run on other
-#   X86 processors?  In some cases this improves performance by
-#   15% or so.
-# -DUSE_3DNOW_PREFETCH causes the collector to issue AMD 3DNow style
-#   prefetch instructions.  Same restrictions as USE_I686_PREFETCH.
-#   Minimally tested.  Didn't appear to be an obvious win on a K6-2/500.
-# -DUSE_PPC_PREFETCH causes the collector to issue PowerPC style
-#   prefetch instructions.  No effect except on PowerPC OS X platforms.
-#   Performance impact untested.
-# -DGC_USE_LD_WRAP in combination with the old flags listed in README.linux
-#   causes the collector some system and pthread calls in a more transparent
-#   fashion than the usual macro-based approach.  Requires GNU ld, and
-#   currently probably works only with Linux.
-# -DGC_USE_DLOPEN_WRAP causes the collector to redefine malloc and intercepted
-#   pthread routines with their real names, and causes it to use dlopen
-#   and dlsym to refer to the original versions.  This makes it possible to
-#   build an LD_PRELOADable malloc replacement library.
-# -DTHREAD_LOCAL_ALLOC defines GC_malloc(), GC_malloc_atomic()
-#   and GC_gcj_malloc() to use a per-thread set of free-lists.
-#   These then allocate  in a way that usually does not involve
-#   acquisition of a global lock.  Currently supported only on platforms
-#   such as Linux that use pthread_support.c.  Recommended for multiprocessors.
-#   Requires explicit GC_INIT() call.
-# -DUSE_COMPILER_TLS causes thread local allocation to use compiler-supported
-#   "__thread" thread-local variables.  This is the default in HP/UX.  It
-#   may help performance on recent Linux installations.  (It failed for
-#   me on RedHat 8, but appears to work on RedHat 9.)
-# -DPARALLEL_MARK allows the marker to run in multiple threads.  Recommended
-#   for multiprocessors.  Currently requires Linux on X86 or IA64, though
-#   support for other Posix platforms should be fairly easy to add,
-#   if the thread implementation is otherwise supported.
-# -DNO_GETENV prevents the collector from looking at environment variables.
-#   These may otherwise alter its configuration, or turn off GC altogether.
-#   I don't know of a reason to disable this, except possibly if the
-#   resulting process runs as a privileged user?
-# -DUSE_GLOBAL_ALLOC.  Win32 only.  Use GlobalAlloc instead of
-#   VirtualAlloc to allocate the heap.  May be needed to work around
-#   a Windows NT/2000 issue.  Incompatible with USE_MUNMAP.
-#   See README.win32 for details.
-# -DMAKE_BACK_GRAPH. Enable GC_PRINT_BACK_HEIGHT environment variable.
-#   See README.environment for details.  Experimental. Limited platform
-#   support.  Implies DBG_HDRS_ALL.  All allocation should be done using
-#   the debug interface.
-# -DSTUBBORN_ALLOC allows allocation of "hard to change" objects, and thus
-#   makes incremental collection easier.  Was enabled by default until 6.0.
-#   Rarely used, to my knowledge.
-# -DHANDLE_FORK attempts to make GC_malloc() work in a child process fork()ed
-#   from a multithreaded parent.  Currently only supported by pthread_support.c.
-#   (Similar code should work on Solaris or Irix, but it hasn't been tried.)
-# -DTEST_WITH_SYSTEM_MALLOC causes gctest to allocate (and leak) large chunks
-#   of memory with the standard system malloc.  This will cause the root
-#   set and collected heap to grow significantly if malloced memory is
-#   somehow getting traced by the collector.  This has no impact on the
-#   generated library; it only affects the test.
-# -DNO_INCREMENTAL cases the gctest program to not invoke the incremental
-#   collector.  This has no impact on the generated library, only on the
-#   test program.  (This is often useful for debugging failures unrelated
-#   to incremental GC.)
-# -DPOINTER_MASK=0x... causes candidate pointers to be ANDed with the
-#   given mask before being considered.  If either this or the following
-#   macro is defined, it will be assumed that all pointers stored in
-#   the heap need to be processed this way.  Stack and register pointers
-#   will be considered both with and without processing.
-#   These macros are normally needed only to support systems that use
-#   high-order pointer tags. EXPERIMENTAL.
-# -DPOINTER_SHIFT=n causes the collector to left shift candidate pointers
-#   by the indicated amount before trying to interpret them.  Applied
-#   after POINTER_MASK. EXPERIMENTAL.  See also the preceding macro.
-# -DENABLE_TRACE enables the GC_TRACE=addr environment setting to do its
-#   job.  By default this is not supported in order to keep the marker as fast
-#   as possible.
-# -DDARWIN_DONT_PARSE_STACK Causes the Darwin port to discover thread
-#   stack bounds in the same way as other pthread ports, without trying to
-#   walk the frames onthe stack.  This is recommended only as a fallback
-#   for applications that don't support proper stack unwinding.
-#
-
-CXXFLAGS= $(CFLAGS) 
-AR= ar
-RANLIB= ranlib
-
-
-OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o \
-  headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dbg_mlc.o  \
-  malloc.o stubborn.o checksums.o pthread_support.o pthread_stop_world.o \
-  darwin_stop_world.o typd_mlc.o ptr_chck.o mallocx.o gcj_mlc.o specific.o \
-  gc_dlopen.o backgraph.o win32_threads.o thread_local_alloc.o
-
-CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c \
-  headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c \
-  new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c \
-  checksums.c pthread_support.c pthread_stop_world.c darwin_stop_world.c \
-  typd_mlc.c ptr_chck.c mallocx.c gcj_mlc.c specific.c gc_dlopen.c \
-  backgraph.c win32_threads.c thread_local_alloc.c
-
-CORD_SRCS=  cord/cordbscs.c cord/cordxtra.c cord/cordprnt.c cord/de.c cord/cordtest.c include/cord.h include/ec.h include/private/cord_pos.h cord/de_win.c cord/de_win.h cord/de_cmds.h cord/de_win.ICO cord/de_win.RC
-
-CORD_OBJS=  cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o
-
-SRCS= $(CSRCS) mips_sgi_mach_dep.s rs6000_mach_dep.s alpha_mach_dep.S \
-    sparc_mach_dep.S include/gc.h include/gc_typed.h include/gc_tiny_fl.h \
-    include/private/gc_hdrs.h include/private/gc_priv.h \
-    include/private/gcconfig.h include/private/gc_pmark.h \
-    include/gc_inline.h include/gc_mark.h \
-    threadlibs.c if_mach.c if_not_there.c gc_cpp.cc include/gc_cpp.h \
-    gcname.c include/weakpointer.h include/private/gc_locks.h \
-    mips_ultrix_mach_dep.s \
-    include/new_gc_alloc.h include/gc_allocator.h \
-    include/javaxfc.h sparc_sunos4_mach_dep.s sparc_netbsd_mach_dep.s \
-    include/gc_backptr.h \
-    hpux_test_and_clear.s include/gc_gcj.h \
-    include/private/dbg_mlc.h \
-    include/private/specific.h \
-    include/leak_detector.h include/gc_amiga_redirects.h \
-    include/gc_pthread_redirects.h ia64_save_regs_in_stack.s \
-    include/gc_config_macros.h include/private/pthread_support.h \
-    include/private/pthread_stop_world.h include/private/darwin_semaphore.h \
-    include/private/darwin_stop_world.h include/private/thread_local_alloc.h \
-    $(CORD_SRCS)
-
-DOC_FILES= README.QUICK doc/README.Mac doc/README.MacOSX doc/README.OS2 \
-       doc/README.amiga doc/README.cords doc/debugging.html \
-       doc/porting.html doc/overview.html \
-       doc/README.dj doc/README.hp doc/README.linux doc/README.rs6000 \
-       doc/README.sgi doc/README.solaris2 doc/README.uts \
-       doc/README.win32 doc/barrett_diagram doc/README \
-        doc/README.contributors doc/README.changes doc/gc.man \
-       doc/README.environment doc/tree.html doc/gcdescr.html \
-       doc/README.autoconf doc/README.macros doc/README.ews4800 \
-       doc/README.DGUX386 doc/README.arm.cross doc/leak.html \
-       doc/scale.html doc/gcinterface.html doc/README.darwin \
-       doc/simple_example.html
-
-TESTS= tests/test.c tests/test_cpp.cc tests/trace_test.c \
-       tests/leak_test.c tests/thread_leak_test.c tests/middle.c
-
-GNU_BUILD_FILES= configure.ac Makefile.am configure acinclude.m4 \
-                libtool.m4 install-sh configure.host Makefile.in \
-                aclocal.m4 config.sub config.guess \
-                include/include.am doc/doc.am \
-                ltmain.sh mkinstalldirs depcomp missing \
-                cord/cord.am tests/tests.am autogen.sh \
-                bdw-gc.pc.in compile
-
-OTHER_MAKEFILES= OS2_MAKEFILE NT_MAKEFILE NT_THREADS_MAKEFILE gc.mak \
-                BCC_MAKEFILE EMX_MAKEFILE WCC_MAKEFILE Makefile.dj \
-                PCR-Makefile SMakefile.amiga Makefile.DLLs \
-                digimars.mak Makefile.direct NT_STATIC_THREADS_MAKEFILE \
-                configure_atomic_ops.sh
-#      Makefile and Makefile.direct are copies of each other.
-
-OTHER_FILES= Makefile setjmp_t.c callprocs \
-           MacProjects.sit.hqx MacOS.c \
-           Mac_files/datastart.c Mac_files/dataend.c \
-           Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
-           add_gc_prefix.c gc_cpp.cpp \
-          version.h AmigaOS.c mscvc_dbg.c include/private/msvc_dbg.h \
-          $(TESTS) $(GNU_BUILD_FILES) $(OTHER_MAKEFILES)
-
-CORD_INCLUDE_FILES= $(srcdir)/include/gc.h $(srcdir)/include/cord.h \
-       $(srcdir)/include/ec.h $(srcdir)/include/private/cord_pos.h
-
-UTILS= if_mach if_not_there threadlibs
-
-# Libraries needed for curses applications.  Only needed for de.
-CURSES= -lcurses -ltermlib
-
-# The following is irrelevant on most systems.  But a few
-# versions of make otherwise fork the shell specified in
-# the SHELL environment variable.
-SHELL= /bin/sh
-
-SPECIALCFLAGS = -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include
-# Alternative flags to the C compiler for mach_dep.c.
-# Mach_dep.c often doesn't like optimization, and it's
-# not time-critical anyway.
-# Set SPECIALCFLAGS to -q nodirect_code on Encore.
-
-all: gc.a gctest
-
-# if AO_INSTALL_DIR doesn't exist, we assume that it is pointing to
-# the default location, and we need to build
-$(AO_INSTALL_DIR): 
-       CC=$(CC) $(srcdir)/configure_atomic_ops.sh
-       cd $(AO_SRC_DIR); make CC=$(CC) install
-
-LEAKFLAGS=$(CFLAGS) -DFIND_LEAK
-
-BSD-pkg-all: bsd-libgc.a bsd-libleak.a
-
-bsd-libgc.a:
-       $(MAKE) CFLAGS="$(CFLAGS)" clean c++-t
-       mv gc.a bsd-libgc.a
-
-bsd-libleak.a:
-       $(MAKE) -f Makefile.direct CFLAGS="$(LEAKFLAGS)" clean c++-nt
-       mv gc.a bsd-libleak.a
-
-BSD-pkg-install: BSD-pkg-all
-       ${CP} bsd-libgc.a libgc.a
-       ${INSTALL_DATA} libgc.a ${PREFIX}/lib
-       ${INSTALL_DATA} gc.h gc_cpp.h ${PREFIX}/include
-       ${INSTALL_MAN} doc/gc.man ${PREFIX}/man/man3/gc.3
-
-pcr: PCR-Makefile include/private/gc_private.h include/private/gc_hdrs.h \
-include/private/gc_locks.h include/gc.h include/private/gcconfig.h \
-mach_dep.o $(SRCS)
-       $(MAKE) -f PCR-Makefile depend
-       $(MAKE) -f PCR-Makefile
-
-$(OBJS) tests/test.o dyn_load.o dyn_load_sunos53.o: \
-    $(srcdir)/include/private/gc_priv.h \
-    $(srcdir)/include/private/gc_hdrs.h $(srcdir)/include/private/gc_locks.h \
-    $(srcdir)/include/gc.h $(srcdir)/include/gc_pthread_redirects.h \
-    $(srcdir)/include/private/gcconfig.h $(srcdir)/include/gc_typed.h \
-    $(srcdir)/include/gc_config_macros.h Makefile $(AO_INSTALL_DIR)
-# The dependency on Makefile is needed.  Changing
-# options affects the size of GC_arrays,
-# invalidating all .o files that rely on gc_priv.h
-
-mark.o typd_mlc.o finalize.o ptr_chck.o: $(srcdir)/include/gc_mark.h \
-                                        $(srcdir)/include/private/gc_pmark.h
-
-specific.o pthread_support.o thread_local_alloc.o win32_threads.o: \
-       $(srcdir)/include/private/specific.h $(srcdir)/include/gc_inline.h \
-       $(srcdir)/include/private/thread_local_alloc.h
-
-dbg_mlc.o gcj_mlc.o: $(srcdir)/include/private/dbg_mlc.h
-
-tests/test.o: tests $(srcdir)/tests/test.c
-       $(CC) $(CFLAGS) -c $(srcdir)/tests/test.c
-       mv test.o tests/test.o
-
-tests:
-       mkdir tests
-
-base_lib gc.a: $(OBJS) dyn_load.o $(UTILS)
-       echo > base_lib
-       rm -f dont_ar_1
-       cp $(AO_INSTALL_DIR)/lib/libatomic_ops.a gc.a
-       ./if_mach SPARC SOLARIS touch dont_ar_1
-       ./if_mach SPARC SOLARIS $(AR) rus gc.a $(OBJS) dyn_load.o
-       ./if_mach M68K AMIGA touch dont_ar_1
-       ./if_mach M68K AMIGA $(AR) -vrus gc.a $(OBJS) dyn_load.o
-       ./if_not_there dont_ar_1 $(AR) ru gc.a $(OBJS) dyn_load.o
-       ./if_not_there dont_ar_1 $(RANLIB) gc.a || cat /dev/null
-#      ignore ranlib failure; that usually means it doesn't exist, and isn't needed
-
-cords: $(CORD_OBJS) cord/cordtest $(UTILS)
-       rm -f dont_ar_3
-       ./if_mach SPARC SOLARIS touch dont_ar_3
-       ./if_mach SPARC SOLARIS $(AR) rus gc.a $(CORD_OBJS)
-       ./if_mach M68K AMIGA touch dont_ar_3
-       ./if_mach M68K AMIGA $(AR) -vrus gc.a $(CORD_OBJS)
-       ./if_not_there dont_ar_3 $(AR) ru gc.a $(CORD_OBJS)
-       ./if_not_there dont_ar_3 $(RANLIB) gc.a || cat /dev/null
-
-gc_cpp.o: $(srcdir)/gc_cpp.cc $(srcdir)/include/gc_cpp.h $(srcdir)/include/gc.h Makefile
-       $(CXX) -c $(CXXFLAGS) $(srcdir)/gc_cpp.cc
-
-test_cpp: $(srcdir)/tests/test_cpp.cc $(srcdir)/include/gc_cpp.h gc_cpp.o $(srcdir)/include/gc.h \
-base_lib $(UTILS)
-       rm -f test_cpp
-       ./if_mach HP_PA HPUX $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/tests/test_cpp.cc gc_cpp.o gc.a -ldld `./threadlibs`
-       ./if_not_there test_cpp $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/tests/test_cpp.cc gc_cpp.o gc.a `./threadlibs`
-
-c++-t: c++
-       ./test_cpp 1
-
-c++-nt: c++
-       @echo "Use ./test_cpp 1 to test the leak library"
-
-c++: gc_cpp.o $(srcdir)/include/gc_cpp.h test_cpp
-       rm -f dont_ar_4
-       ./if_mach SPARC SOLARIS touch dont_ar_4
-       ./if_mach SPARC SOLARIS $(AR) rus gc.a gc_cpp.o
-       ./if_mach M68K AMIGA touch dont_ar_4
-       ./if_mach M68K AMIGA $(AR) -vrus gc.a gc_cpp.o
-       ./if_not_there dont_ar_4 $(AR) ru gc.a gc_cpp.o
-       ./if_not_there dont_ar_4 $(RANLIB) gc.a || cat /dev/null
-       ./test_cpp 1
-       echo > c++
-
-dyn_load_sunos53.o: dyn_load.c
-       $(CC) $(CFLAGS) -DSUNOS53_SHARED_LIB -c $(srcdir)/dyn_load.c -o $@
-
-# SunOS5 shared library version of the collector
-sunos5gc.so: $(OBJS) dyn_load_sunos53.o
-       $(CC) -G -o sunos5gc.so $(OBJS) dyn_load_sunos53.o $(AO_INSTALL_DIR)/lib/libatomic_ops.a -ldl
-       ln sunos5gc.so libgc.so
-
-# Alpha/OSF shared library version of the collector
-libalphagc.so: $(OBJS)
-       ld -shared -o libalphagc.so $(OBJS) dyn_load.o -lc
-       ln libalphagc.so libgc.so
-
-# IRIX shared library version of the collector
-libirixgc.so: $(OBJS) dyn_load.o
-       ld -shared $(ABI_FLAG) -o libirixgc.so $(OBJS) dyn_load.o -lc
-       ln libirixgc.so libgc.so
-
-# Linux shared library version of the collector
-liblinuxgc.so: $(OBJS) dyn_load.o
-       gcc -shared -o liblinuxgc.so $(OBJS) dyn_load.o
-       ln liblinuxgc.so libgc.so
-
-# Build gctest with dynamic library
-dyn_test:
-       $(CC) $(CFLAGS) -o gctest tests/test.c libgc.so `./threadlibs`
-       ./gctest
-
-# Alternative Linux rule.  This is preferable, but is likely to break the
-# Makefile for some non-linux platforms.
-# LIBOBJS= $(patsubst %.o, %.lo, $(OBJS))
-#
-#.SUFFIXES: .lo $(SUFFIXES)
-#
-#.c.lo:
-#      $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c $< -o $@
-#
-# liblinuxgc.so: $(LIBOBJS) dyn_load.lo
-#      gcc -shared -Wl,-soname=libgc.so.0 -o libgc.so.0 $(LIBOBJS) dyn_load.lo
-#      touch liblinuxgc.so
-
-mach_dep.o: $(srcdir)/mach_dep.c $(srcdir)/mips_sgi_mach_dep.s \
-           $(srcdir)/mips_ultrix_mach_dep.s \
-            $(srcdir)/rs6000_mach_dep.s \
-           $(srcdir)/sparc_mach_dep.S $(srcdir)/sparc_sunos4_mach_dep.s \
-           $(srcdir)/ia64_save_regs_in_stack.s \
-           $(srcdir)/sparc_netbsd_mach_dep.s $(UTILS)
-       rm -f mach_dep.o
-       ./if_mach SPARC SOLARIS $(CC) -c -o mach_dep2.o $(srcdir)/sparc_mach_dep.S
-       ./if_mach SPARC OPENBSD $(AS) -o mach_dep2.o $(srcdir)/sparc_sunos4_mach_dep.s
-       ./if_mach SPARC NETBSD $(AS) -o mach_dep2.o $(srcdir)/sparc_netbsd_mach_dep.s
-       ./if_mach SPARC "" $(CC) -c -o mach_dep1.o $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
-       ./if_mach SPARC "" ld -r -o mach_dep.o mach_dep1.o mach_dep2.o
-       ./if_mach IA64 "" as $(AS_ABI_FLAG) -o ia64_save_regs_in_stack.o $(srcdir)/ia64_save_regs_in_stack.s
-       ./if_mach IA64 "" $(CC) -c -o mach_dep1.o $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
-       ./if_mach IA64 "" ld -r -o mach_dep.o mach_dep1.o ia64_save_regs_in_stack.o
-       ./if_not_there mach_dep.o $(CC) -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
-
-mark_rts.o: $(srcdir)/mark_rts.c $(UTILS)
-       rm -f mark_rts.o
-       -./if_mach ALPHA OSF1 $(CC) -c $(CFLAGS) -Wo,-notail $(srcdir)/mark_rts.c
-       ./if_not_there mark_rts.o $(CC) -c $(CFLAGS) $(srcdir)/mark_rts.c
-#      Work-around for DEC optimizer tail recursion elimination bug.
-#  The ALPHA-specific line should be removed if gcc is used.
-
-alloc.o: version.h
-
-cord:
-       mkdir cord
-
-cord/cordbscs.o: cord $(srcdir)/cord/cordbscs.c $(CORD_INCLUDE_FILES)
-       $(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordbscs.c
-       mv cordbscs.o cord/cordbscs.o
-#  not all compilers understand -o filename
-
-cord/cordxtra.o: cord $(srcdir)/cord/cordxtra.c $(CORD_INCLUDE_FILES)
-       $(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordxtra.c
-       mv cordxtra.o cord/cordxtra.o
-
-cord/cordprnt.o: cord $(srcdir)/cord/cordprnt.c $(CORD_INCLUDE_FILES)
-       $(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordprnt.c
-       mv cordprnt.o cord/cordprnt.o
-
-cord/cordtest: $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a $(UTILS)
-       rm -f cord/cordtest
-       ./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a -lucb
-       ./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a -ldld `./threadlibs`
-       ./if_mach M68K AMIGA $(CC) $(CFLAGS) -UGC_AMIGA_MAKINGLIB -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a `./threadlibs`
-       ./if_not_there cord/cordtest $(CC) $(CFLAGS) -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a `./threadlibs`
-
-cord/de: $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(UTILS)
-       rm -f cord/de
-       ./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) -lucb `./threadlibs`
-       ./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) -ldld `./threadlibs`
-       ./if_mach POWERPC AIX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses
-       ./if_mach POWERPC DARWIN $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a
-       ./if_mach I386 LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs`
-       ./if_mach ALPHA LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs`
-       ./if_mach IA64 LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs`
-       ./if_mach M68K AMIGA $(CC) $(CFLAGS) -UGC_AMIGA_MAKINGLIB -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses
-       ./if_not_there cord/de $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) `./threadlibs`
-
-if_mach: $(srcdir)/if_mach.c $(srcdir)/include/private/gcconfig.h
-       $(HOSTCC) $(HOSTCFLAGS) -o if_mach $(srcdir)/if_mach.c
-
-threadlibs: $(srcdir)/threadlibs.c $(srcdir)/include/private/gcconfig.h Makefile
-       $(HOSTCC) $(HOSTCFLAGS) -o threadlibs $(srcdir)/threadlibs.c
-
-if_not_there: $(srcdir)/if_not_there.c
-       $(HOSTCC) $(HOSTCFLAGS) -o if_not_there $(srcdir)/if_not_there.c
-
-clean: 
-       rm -f gc.a *.o *.exe tests/*.o gctest gctest_dyn_link test_cpp \
-             setjmp_test  mon.out gmon.out a.out core if_not_there if_mach \
-             threadlibs $(CORD_OBJS) cord/cordtest cord/de 
-       -rm -f *~
-
-gctest: tests/test.o gc.a $(UTILS)
-       rm -f gctest
-       ./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o gctest  tests/test.o gc.a -lucb
-       ./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o gctest  tests/test.o gc.a -ldld `./threadlibs`
-       ./if_mach M68K AMIGA $(CC) $(CFLAGS) -UGC_AMIGA_MAKINGLIB -o gctest  tests/test.o gc.a `./threadlibs`
-       ./if_not_there gctest $(CC) $(CFLAGS) -o gctest tests/test.o gc.a `./threadlibs`
-
-# If an optimized setjmp_test generates a segmentation fault,
-# odds are your compiler is broken.  Gctest may still work.
-# Try compiling setjmp_t.c unoptimized.
-setjmp_test: $(srcdir)/setjmp_t.c $(srcdir)/include/gc.h $(UTILS) $(AO_INSTALL_DIR)
-       $(CC) $(CFLAGS) -o setjmp_test $(srcdir)/setjmp_t.c
-
-test:  KandRtest cord/cordtest
-       cord/cordtest
-
-# Those tests that work even with a K&R C compiler:
-KandRtest: setjmp_test gctest
-       ./setjmp_test
-       ./gctest
-
-add_gc_prefix: $(srcdir)/add_gc_prefix.c $(srcdir)/version.h
-       $(CC) -o add_gc_prefix $(srcdir)/add_gc_prefix.c
-
-gcname: $(srcdir)/gcname.c $(srcdir)/version.h
-       $(CC) -o gcname $(srcdir)/gcname.c
-
-#We assume this is being done from source directory.
-dist gc.tar: $(SRCS) $(DOC_FILES) $(OTHER_FILES) add_gc_prefix gcname
-       cp Makefile Makefile.old
-       cp Makefile.direct Makefile
-       CC=$(CC) ./configure_atomic_ops.sh
-       cd $(AO_SRC_DIR); make dist
-       if test $(srcdir)/libatomic_ops-$(AO_VERSION) = $(AO_SRC_DIR); \
-       then \
-         mv $(AO_SRC_DIR) $(AO_SRC_DIR).bak ; \
-         tar xvfz $(AO_SRC_DIR).bak/libatomic_ops-$(AO_VERSION).tar.gz ; \
-       else \
-         tar xvfz $(AO_SRC_DIR)/libatomic_ops-$(AO_VERSION).tar.gz ; \
-       fi
-       rm -f `./gcname`
-       ln -s . `./gcname`
-       ./add_gc_prefix $(SRCS) $(DOC_FILES) $(OTHER_FILES) libatomic_ops-$(AO_VERSION) > /tmp/gc.tar-files
-       tar cvfh gc.tar `cat /tmp/gc.tar-files`
-       cp gc.tar `./gcname`.tar
-       gzip `./gcname`.tar
-       rm `./gcname`
-
-gc.tar.Z: gc.tar
-       compress gc.tar
-
-gc.tar.gz: gc.tar
-       gzip gc.tar
-
-lint: $(CSRCS) tests/test.c
-       lint -DLINT $(CSRCS) tests/test.c | egrep -v "possible pointer alignment problem|abort|exit|sbrk|mprotect|syscall|change in ANSI|improper alignment"
-
-# BTL: added to test shared library version of collector.
-# Currently works only under SunOS5.  Requires GC_INIT call from statically
-# loaded client code.
-ABSDIR = `pwd`
-gctest_dyn_link: tests/test.o libgc.so
-       $(CC) -L$(ABSDIR) -R$(ABSDIR) -o gctest_dyn_link tests/test.o -lgc -ldl -lthread
-
-gctest_irix_dyn_link: tests/test.o libirixgc.so
-       $(CC) -L$(ABSDIR) -o gctest_irix_dyn_link tests/test.o -lirixgc
-
-# The following appear to be dead, especially since libgc_globals.h
-# is apparently lost.
-test_dll.o: tests/test.c libgc_globals.h
-       $(CC) $(CFLAGS) -DGC_USE_DLL -c tests/test.c -o test_dll.o
-
-test_dll: test_dll.o libgc_dll.a libgc.dll
-       $(CC) test_dll.o -L$(ABSDIR) -lgc_dll -o test_dll
-
-SYM_PREFIX-libgc=GC
-
-# Uncomment the following line to build a GNU win32 DLL
-# include Makefile.DLLs
-
-reserved_namespace: $(SRCS)
-       for file in $(SRCS) tests/test.c tests/test_cpp.cc; do \
-               sed s/GC_/_GC_/g < $$file > tmp; \
-               cp tmp $$file; \
-               done
-
-user_namespace: $(SRCS)
-       for file in $(SRCS) tests/test.c tests/test_cpp.cc; do \
-               sed s/_GC_/GC_/g < $$file > tmp; \
-               cp tmp $$file; \
-               done
index fb658e27aed1fbe481fce88d9b4d8ed9a3297c67..1dc609fb66a8166d15008c56e205edfd473c8130 100644 (file)
@@ -1,8 +1,8 @@
 # Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
-# 
+#
 # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
 # OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
-# 
+#
 # Permission is hereby granted to use or copy this program
 # for any purpose,  provided the above notices are retained on all copies.
 # Permission to modify the code and to distribute modified code is granted,
@@ -23,7 +23,7 @@
 # use the internal version.  This is done since libatomic_ops doesn't
 # use libtool, since it has no real use for it.  But that seems to make
 # it hard to use either the resulting object files or libraries.
-# Thus there seems too be no real reason to recusively build in the
+# Thus there seems too be no real reason to recursively build in the
 # libatomic_ops directory.
 # if USE_INTERNAL_LIBATOMICS_OPS
 # SUBDIRS = @maybe_libatomic_ops@
 # endif
 SUBDIRS =
 
+ACLOCAL_AMFLAGS = -I m4
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
+if USE_INTERNAL_LIBATOMIC_OPS
+AM_CPPFLAGS += -I$(top_builddir)/libatomic_ops/src \
+              -I$(top_srcdir)/libatomic_ops/src
+endif
+
 # Initialize variables so that we can declare files locally.
-EXTRA_DIST = 
+EXTRA_DIST =
 lib_LTLIBRARIES =
 include_HEADERS =
 pkginclude_HEADERS =
@@ -42,7 +49,7 @@ check_PROGRAMS =
 TESTS =
 
 pkgconfigdir = $(libdir)/pkgconfig
-dist_pkgconfig_DATA = bdw-gc.pc
+pkgconfig_DATA = bdw-gc.pc
 
 # C Library
 # ---------
@@ -71,17 +78,17 @@ if WIN32_THREADS
 libgc_la_SOURCES += win32_threads.c
 endif
 
-if USE_INTERNAL_LIBATOMIC_OPS   
-nodist_libgc_la_SOURCES = ./atomic_ops.c        
-endif   
-        
-if NEED_ATOMIC_OPS_ASM          
-nodist_libgc_la_SOURCES = ./atomic_ops_sysdeps.S        
+if USE_INTERNAL_LIBATOMIC_OPS
+nodist_libgc_la_SOURCES = libatomic_ops/src/atomic_ops.c
+endif
+
+if NEED_ATOMIC_OPS_ASM
+nodist_libgc_la_SOURCES = libatomic_ops/src/atomic_ops_sysdeps.S
 endif
 
 # Include THREADDLLIBS here to ensure that the correct versions of
 # linuxthread semaphore functions get linked:
-libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS)
+libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS) $(ATOMIC_OPS_LIBS)
 libgc_la_DEPENDENCIES = @addobjs@
 libgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:3:0 -no-undefined
 
@@ -115,7 +122,7 @@ AM_CXXFLAGS = @GC_CFLAGS@
 AM_CFLAGS = @GC_CFLAGS@
 
 ## FIXME: relies on internal code generated by automake.
-## FIXME: ./configure --enable-dependency-tracking should be used 
+## FIXME: ./configure --enable-dependency-tracking should be used
 #all_objs = @addobjs@ $(libgc_la_OBJECTS)
 #$(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
 #include/private/gc_hdrs.h include/gc.h include/gc_gcj.h \
@@ -161,7 +168,7 @@ EXTRA_DIST += README.QUICK
 
 # other makefiles
 # :GOTCHA: deliberately we do not include 'Makefile'
-EXTRA_DIST += BCC_MAKEFILE NT_MAKEFILE NT_THREADS_MAKEFILE \
+EXTRA_DIST += BCC_MAKEFILE NT_MAKEFILE \
     OS2_MAKEFILE PCR-Makefile digimars.mak EMX_MAKEFILE        \
     Makefile.direct Makefile.dj        Makefile.DLLs SMakefile.amiga \
     WCC_MAKEFILE build_atomic_ops.sh build_atomic_ops.sh.cygwin \
@@ -170,28 +177,24 @@ EXTRA_DIST += BCC_MAKEFILE NT_MAKEFILE NT_THREADS_MAKEFILE \
 
 # files used by makefiles other than Makefile.am
 #
-EXTRA_DIST += add_gc_prefix.c gcname.c if_mach.c if_not_there.c \
-    hpux_test_and_clear.s gc.mak MacOS.c \
-    MacProjects.sit.hqx mach_dep.c setjmp_t.c \
-    threadlibs.c AmigaOS.c \
+EXTRA_DIST += extra/add_gc_prefix.c extra/gc.c extra/gcname.c \
+    extra/if_mach.c extra/if_not_there.c hpux_test_and_clear.s gc.mak \
+    extra/MacOS.c MacProjects.sit.hqx mach_dep.c extra/setjmp_t.c \
+    extra/threadlibs.c extra/AmigaOS.c \
     Mac_files/datastart.c Mac_files/dataend.c \
     Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
-    include/private/msvc_dbg.h msvc_dbg.c
+    include/private/msvc_dbg.h extra/msvc_dbg.c
 
 # The libatomic_ops library.  This is not ideal, since we pick up junk from
-# there.  The hard-coded version number should also go.
-EXTRA_DIST += libatomic_ops-1.2
+# there.
+EXTRA_DIST += libatomic_ops
 
 # this is an auxiliary shell file used by Makefile and Makefile.direct
 #
 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
 
-# :FIXME: why do we distribute this one???
-#
-EXTRA_DIST += libtool.m4
-
 #
-# :GOTCHA: GNU make rule for making .s out of .S is flawed, 
+# :GOTCHA: GNU make rule for making .s out of .S is flawed,
 # it will not remove dest if building fails
 .S.s:
        if $(CPP) $< >$@ ; then :; else rm -f $@; fi
@@ -202,5 +205,3 @@ include tests/tests.am
 include doc/doc.am
 # Putting these at the top causes cord to be built first, and not find libgc.a
 # on HP/UX.  There may be a better fix.
-
-
index 810034478bef191bf02a299742a7928b513987f1..124da25483ed8a5d4716c4855d64a81c2a30d673 100644 (file)
@@ -6,10 +6,10 @@
 # c++ - adds C++ interface to library
 # cords - adds cords (heavyweight strings) to library
 # test - prints porting information, then builds basic version of gc.a,
-#               and runs some tests of collector and cords.  Does not add cords or
-#       c++ interface to gc.a
+#        and runs some tests of collector and cords.  Does not add cords or
+#        c++ interface to gc.a
 # cord/de - builds dumb editor based on cords.
-ABI_FLAG= 
+ABI_FLAG=
 # ABI_FLAG should be the cc flag that specifies the ABI.  On most
 # platforms this will be the empty string.  Possible values:
 # +DD64 for 64-bit executable on HP/UX.
@@ -32,8 +32,7 @@ VPATH= $(srcdir)
 
 # Atomic_ops installation directory.  If this doesn't exist, we create
 # it from the included libatomic_ops distribution.
-AO_VERSION=1.2
-AO_SRC_DIR=$(srcdir)/libatomic_ops-$(AO_VERSION)
+AO_SRC_DIR=$(srcdir)/libatomic_ops
 AO_INSTALL_DIR=$(srcdir)/libatomic_ops-install
 
 CFLAGS= -O -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include -DATOMIC_UNCOLLECTABLE -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS
@@ -62,277 +61,10 @@ HOSTCFLAGS=$(CFLAGS)
 # Setjmp_test may yield overly optimistic results when compiled
 # without optimization.
 
-# These define arguments influence the collector configuration:
-# -DFIND_LEAK causes GC_find_leak to be initially set.
-#   This causes the collector to assume that all inaccessible
-#   objects should have been explicitly deallocated, and reports exceptions.
-#   Finalization and the test program are not usable in this mode.
-#
-# IMPORTANT: Any of the _THREADS options must normally also be defined in
-# the client before including gc.h.  This redefines thread primitives to
-# invoke the GC_ versions instead.  Alternatively, linker-based symbol
-# interception can be used on a few platforms.
-# -DGC_THREADS should set the appropriate one of the below macros,
-#   except -DGC_WIN32_PTHREADS, which must be set explicitly.
-# -DGC_SOLARIS_THREADS enables support for Solaris pthreads.
-#   Must also define -D_REENTRANT.
-# -DGC_IRIX_THREADS enables support for Irix pthreads.  See README.irix.
-# -DGC_HPUX_THREADS enables support for HP/UX 11 pthreads.
-#   Also requires -D_REENTRANT or -D_POSIX_C_SOURCE=199506L. See README.hp.
-# -DGC_LINUX_THREADS enables support for Xavier Leroy's Linux threads
-#   or NPTL threads. See README.linux.  -D_REENTRANT may also be required.
-# -DGC_OSF1_THREADS enables support for Tru64 pthreads.
-# -DGC_FREEBSD_THREADS enables support for FreeBSD pthreads.
-#   Appeared to run into some underlying thread problems.
-# -DGC_DARWIN_THREADS enables support for Mac OS X pthreads.
-# -DGC_AIX_THREADS enables support for IBM AIX threads.
-# -DGC_DGUX386_THREADS enables support for DB/UX on I386 threads.
-#   See README.DGUX386.  (Probably has not been tested recently.)
-# -DGC_WIN32_THREADS enables support for win32 threads.  That makes sense
-#   for this Makefile only under Cygwin.
-# -DGC_WIN32_PTHREADS enables support for Ming32 pthreads.  This cannot be
-#   enabled automatically by GC_THREADS, which would assume Win32 native
-#   threads.
-# -DPTW32_STATIC_LIB causes the static version of the Mingw pthreads library
-#   to be used.  Requires -DGC_WIN32_PTHREADS.
-#   
-# -DALL_INTERIOR_POINTERS allows all pointers to the interior
-#   of objects to be recognized.  (See gc_priv.h for consequences.)
-#   Alternatively, GC_all_interior_pointers can be set at process
-#   initialization time.
-# -DSMALL_CONFIG tries to tune the collector for small heap sizes,
-#   usually causing it to use less space in such situations.
-#   Incremental collection no longer works in this case.
-# -DLARGE_CONFIG tunes the collector for unusually large heaps.
-#   Necessary for heaps larger than about 500 MB on most machines.
-#   Recommended for heaps larger than about 64 MB.
-# -DDONT_ADD_BYTE_AT_END is meaningful only with -DALL_INTERIOR_POINTERS or
-#   GC_all_interior_pointers = 1.  Normally -DALL_INTERIOR_POINTERS
-#   causes all objects to be padded so that pointers just past the end of
-#   an object can be recognized.  This can be expensive.  (The padding
-#   is normally more than one byte due to alignment constraints.)
-#   -DDONT_ADD_BYTE_AT_END disables the padding.
-# -DNO_EXECUTE_PERMISSION may cause some or all of the heap to not
-#   have execute permission, i.e. it may be impossible to execute
-#   code from the heap.  Currently this only affects the incremental
-#   collector on UNIX machines.  It may greatly improve its performance,
-#   since this may avoid some expensive cache synchronization.
-# -DGC_NO_OPERATOR_NEW_ARRAY declares that the C++ compiler does not support
-#   the  new syntax "operator new[]" for allocating and deleting arrays.
-#   See gc_cpp.h for details.  No effect on the C part of the collector.
-#   This is defined implicitly in a few environments.  Must also be defined
-#   by clients that use gc_cpp.h.
-# -DREDIRECT_MALLOC=X causes malloc to be defined as alias for X.
-#   Unless the following macros are defined, realloc is also redirected
-#   to GC_realloc, and free is redirected to GC_free.
-#   Calloc and strdup are redefined in terms of the new malloc.  X should
-#   be either GC_malloc or GC_malloc_uncollectable, or
-#   GC_debug_malloc_replacement.  (The latter invokes GC_debug_malloc
-#   with dummy source location information, but still results in
-#   properly remembered call stacks on Linux/X86 and Solaris/SPARC.
-#   It requires that the following two macros also be used.)
-#   The former is occasionally useful for working around leaks in code
-#   you don't want to (or can't) look at.  It may not work for
-#   existing code, but it often does.  Neither works on all platforms,
-#   since some ports use malloc or calloc to obtain system memory.
-#   (Probably works for UNIX, and win32.)  If you build with DBG_HDRS_ALL,
-#   you should only use GC_debug_malloc_replacement as a malloc
-#   replacement.
-# -DREDIRECT_REALLOC=X causes GC_realloc to be redirected to X.
-#   The canonical use is -DREDIRECT_REALLOC=GC_debug_realloc_replacement,
-#   together with -DREDIRECT_MALLOC=GC_debug_malloc_replacement to
-#   generate leak reports with call stacks for both malloc and realloc.
-#   This also requires the following:
-# -DREDIRECT_FREE=X causes free to be redirected to X.  The
-#   canonical use is -DREDIRECT_FREE=GC_debug_free.
-# -DIGNORE_FREE turns calls to free into a noop.  Only useful with
-#   -DREDIRECT_MALLOC.
-# -DNO_DEBUGGING removes GC_dump and the debugging routines it calls.
-#   Reduces code size slightly at the expense of debuggability.
-# -DJAVA_FINALIZATION makes it somewhat safer to finalize objects out of
-#   order by specifying a nonstandard finalization mark procedure  (see
-#   finalize.c).  Objects reachable from finalizable objects will be marked
-#   in a separate postpass, and hence their memory won't be reclaimed.
-#   Not recommended unless you are implementing a language that specifies
-#   these semantics.  Since 5.0, determines only the initial value
-#   of GC_java_finalization variable.
-# -DFINALIZE_ON_DEMAND causes finalizers to be run only in response
-#   to explicit GC_invoke_finalizers() calls.
-#   In 5.0 this became runtime adjustable, and this only determines the
-#   initial value of GC_finalize_on_demand.
-# -DATOMIC_UNCOLLECTABLE includes code for GC_malloc_atomic_uncollectable.
-#   This is useful if either the vendor malloc implementation is poor,
-#   or if REDIRECT_MALLOC is used.
-# -DMARK_BIT_PER_GRANULE requests that a mark bit (or often byte)
-#   be allocated for each allocation granule, as opposed to each object.
-#   This often improves speed, possibly at some cost in space and/or
-#   cache footprint.  Normally it is best to let this decision be
-#   made automatically depending on platform.
-# -DMARK_BIT_PER_OBJ requests that a mark bit be allocated for each
-#   object instead of allocation granule.  The opposite of
-#   MARK_BIT_PER_GRANULE.
-# -DHBLKSIZE=ddd, where ddd is a power of 2 between 512 and 16384, explicitly
-#   sets the heap block size.  Each heap block is devoted to a single size and
-#   kind of object.  For the incremental collector it makes sense to match
-#   the most likely page size.  Otherwise large values result in more
-#   fragmentation, but generally better performance for large heaps.
-# -DUSE_MMAP use MMAP instead of sbrk to get new memory.
-#   Works for Linux, FreeBSD, Cygwin, Solaris and Irix.
-# -DUSE_MUNMAP causes memory to be returned to the OS under the right
-#   circumstances.  This currently disables VM-based incremental collection
-#   (except for Win32 with GetWriteWatch available).
-#   Works under some Unix, Linux and Windows versions.
-#   Requires -DUSE_MMAP except for Windows.
-# -DMMAP_STACKS (for Solaris threads) Use mmap from /dev/zero rather than
-#   GC_scratch_alloc() to get stack memory.
-# -DPRINT_BLACK_LIST Whenever a black list entry is added, i.e. whenever
-#   the garbage collector detects a value that looks almost, but not quite,
-#   like a pointer, print both the address containing the value, and the
-#   value of the near-bogus-pointer.  Can be used to identify regions of
-#   memory that are likely to contribute misidentified pointers.
-# -DKEEP_BACK_PTRS Add code to save back pointers in debugging headers
-#   for objects allocated with the debugging allocator.  If all objects
-#   through GC_MALLOC with GC_DEBUG defined, this allows the client
-#   to determine how particular or randomly chosen objects are reachable
-#   for debugging/profiling purposes.  The gc_backptr.h interface is
-#   implemented only if this is defined.
-# -DGC_ASSERTIONS Enable some internal GC assertion checking.  Currently
-#   this facility is only used in a few places.  It is intended primarily
-#   for debugging of the garbage collector itself, but could also
-# -DDBG_HDRS_ALL Make sure that all objects have debug headers.  Increases
-#   the reliability (from 99.9999% to 100% mod. bugs) of some of the debugging
-#   code (especially KEEP_BACK_PTRS).  Makes -DSHORT_DBG_HDRS possible.
-#   Assumes that all client allocation is done through debugging
-#   allocators.
-# -DSHORT_DBG_HDRS Assume that all objects have debug headers.  Shorten
-#   the headers to minimize object size, at the expense of checking for
-#   writes past the end of an object.  This is intended for environments
-#   in which most client code is written in a "safe" language, such as
-#   Scheme or Java.  Assumes that all client allocation is done using
-#   the GC_debug_ functions, or through the macros that expand to these,
-#   or by redirecting malloc to GC_debug_malloc_replacement.
-#   (Also eliminates the field for the requested object size.)
-# -DSAVE_CALL_COUNT=<n> Set the number of call frames saved with objects
-#   allocated through the debugging interface.  Affects the amount of
-#   information generated in leak reports.  Only matters on platforms
-#   on which we can quickly generate call stacks, currently Linux/(X86 & SPARC)
-#   and Solaris/SPARC and platforms that provide execinfo.h.
-#   Default is zero.  On X86, client
-#   code should NOT be compiled with -fomit-frame-pointer.
-# -DSAVE_CALL_NARGS=<n> Set the number of functions arguments to be
-#   saved with each call frame.  Default is zero.  Ignored if we
-#   don't know how to retrieve arguments on the platform.
-# -DCHECKSUMS reports on erroneously clear dirty bits, and unexpectedly
-#   altered stubborn objects, at substantial performance cost.
-#   Use only for debugging of the incremental collector.
-#   Not compatible with USE_MUNMAP or threads.
-# -DGC_GCJ_SUPPORT includes support for gcj (and possibly other systems
-#   that include a pointer to a type descriptor in each allocated object).
-#   Building this way requires an ANSI C compiler.
-# -DUSE_I686_PREFETCH causes the collector to issue Pentium III style
-#   prefetch instructions.  No effect except on X86 Linux platforms.
-#   Assumes a very recent gcc-compatible compiler and assembler.
-#   (Gas prefetcht0 support was added around May 1999.)
-#   Empirically the code appears to still run correctly on Pentium II
-#   processors, though with no performance benefit.  May not run on other
-#   X86 processors?  In some cases this improves performance by
-#   15% or so.
-# -DUSE_3DNOW_PREFETCH causes the collector to issue AMD 3DNow style
-#   prefetch instructions.  Same restrictions as USE_I686_PREFETCH.
-#   Minimally tested.  Didn't appear to be an obvious win on a K6-2/500.
-# -DUSE_PPC_PREFETCH causes the collector to issue PowerPC style
-#   prefetch instructions.  No effect except on PowerPC OS X platforms.
-#   Performance impact untested.
-# -DGC_USE_LD_WRAP in combination with the old flags listed in README.linux
-#   causes the collector some system and pthread calls in a more transparent
-#   fashion than the usual macro-based approach.  Requires GNU ld, and
-#   currently probably works only with Linux.
-# -DGC_USE_DLOPEN_WRAP causes the collector to redefine malloc and intercepted
-#   pthread routines with their real names, and causes it to use dlopen
-#   and dlsym to refer to the original versions.  This makes it possible to
-#   build an LD_PRELOADable malloc replacement library.
-# -DTHREAD_LOCAL_ALLOC defines GC_malloc(), GC_malloc_atomic()
-#   and GC_gcj_malloc() to use a per-thread set of free-lists.
-#   These then allocate  in a way that usually does not involve
-#   acquisition of a global lock.  Recommended for multiprocessors.
-#   Requires explicit GC_INIT() call, unless REDIRECT_MALLOC is
-#   defined and GC_malloc is used first.
-# -DUSE_COMPILER_TLS causes thread local allocation to use compiler-supported
-#   "__thread" thread-local variables.  This is the default in HP/UX.  It
-#   may help performance on recent Linux installations.  (It failed for
-#   me on RedHat 8, but appears to work on RedHat 9.)
-# -DPARALLEL_MARK allows the marker to run in multiple threads.  Recommended
-#   for multiprocessors.
-# -DNO_GETENV prevents the collector from looking at environment variables.
-#   These may otherwise alter its configuration, or turn off GC altogether.
-#   I don't know of a reason to disable this, except possibly if the
-#   resulting process runs as a privileged user?
-# -DUSE_GLOBAL_ALLOC.  Win32 only.  Use GlobalAlloc instead of
-#   VirtualAlloc to allocate the heap.  May be needed to work around
-#   a Windows NT/2000 issue.  Incompatible with USE_MUNMAP.
-#   See README.win32 for details.
-# -DMAKE_BACK_GRAPH. Enable GC_PRINT_BACK_HEIGHT environment variable.
-#   See README.environment for details.  Experimental. Limited platform
-#   support.  Implies DBG_HDRS_ALL.  All allocation should be done using
-#   the debug interface.
-# -DSTUBBORN_ALLOC allows allocation of "hard to change" objects, and thus
-#   makes incremental collection easier.  Was enabled by default until 6.0.
-#   Rarely used, to my knowledge.
-# -DHANDLE_FORK attempts to make GC_malloc() work in a child process fork()ed
-#   from a multithreaded parent.  Currently only supported by pthread_support.c.
-#   (Similar code should work on Solaris or Irix, but it hasn't been tried.)
-# -DTEST_WITH_SYSTEM_MALLOC causes gctest to allocate (and leak) large chunks
-#   of memory with the standard system malloc.  This will cause the root
-#   set and collected heap to grow significantly if malloced memory is
-#   somehow getting traced by the collector.  This has no impact on the
-#   generated library; it only affects the test.
-# -DNO_INCREMENTAL cases the gctest program to not invoke the incremental
-#   collector.  This has no impact on the generated library, only on the
-#   test program.  (This is often useful for debugging failures unrelated
-#   to incremental GC.)
-# -DPOINTER_MASK=0x... causes candidate pointers to be ANDed with the
-#   given mask before being considered.  If either this or the following
-#   macro is defined, it will be assumed that all pointers stored in
-#   the heap need to be processed this way.  Stack and register pointers
-#   will be considered both with and without processing.
-#   These macros are normally needed only to support systems that use
-#   high-order pointer tags. EXPERIMENTAL.
-# -DPOINTER_SHIFT=n causes the collector to left shift candidate pointers
-#   by the indicated amount before trying to interpret them.  Applied
-#   after POINTER_MASK. EXPERIMENTAL.  See also the preceding macro.
-# -DENABLE_TRACE enables the GC_TRACE=addr environment setting to do its
-#   job.  By default this is not supported in order to keep the marker as fast
-#   as possible.
-# -DDARWIN_DONT_PARSE_STACK Causes the Darwin port to discover thread
-#   stack bounds in the same way as other pthread ports, without trying to
-#   walk the frames onthe stack.  This is recommended only as a fallback
-#   for applications that don't support proper stack unwinding.
-# -DUSE_PROC_FOR_LIBRARIES Causes the Linux collector to treat writable
-#   memory mappings (as reported by /proc) as roots, if it doesn't have
-#   other information about them.  It no longer traverses dynamic loader
-#   data structures to find dynamic library static data.  This may be
-#   required for applications that store pointers in mmapped segments without
-#   informaing the collector.  But it typically performs poorly, especially
-#   since it will scan inactive but cached NPTL thread stacks completely.
-# -DNO_PROC_STAT Causes the collector to avoid relying on Linux'
-#   /proc/self/stat.
-# -DNO_GETCONTEXT Causes the collector to not assume the existence of
-#   the getcontext() function on linux-like platforms.  This currently
-#   happens implicitly on Darwin, Hurd, or ARM or MIPS hardware.
-#   It is explicitly needed for some old versions of FreeBSD.
-# -DSTATIC=static Causes various GC_ symbols that could logically be
-#   declared static to be declared (this is the default if -DNO_DEBUGGING is
-#   specified).  Reduces the number of visible symbols (letting the optimizer
-#   do its work better), which is probably cleaner, but may make some kinds of
-#   debugging and profiling harder.
-# -DDONT_USE_USER32_DLL (Win32 only) Don't use "user32" DLL import library
-#   (containing MessageBox() entry); useful for a static GC library.
-# -DGC_PREFER_MPROTECT_VDB Choose MPROTECT_VDB manually in case of multiple
-#   virtual dirty bit strategies are implemented (at present useful on Win32
-#   to force MPROTECT_VDB strategy instead of the default GWW_VDB one).
-#
+# Look into doc/README.macros for the description of the "define arguments"
+# influencing the collector configuration.
 
-CXXFLAGS= $(CFLAGS) 
+CXXFLAGS= $(CFLAGS)
 AR= ar
 RANLIB= ranlib
 
@@ -358,9 +90,9 @@ SRCS= $(CSRCS) mips_sgi_mach_dep.s rs6000_mach_dep.s alpha_mach_dep.S \
     sparc_mach_dep.S include/gc.h include/gc_typed.h include/gc_tiny_fl.h \
     include/gc_version.h include/private/gc_hdrs.h include/private/gc_priv.h \
     include/private/gcconfig.h include/private/gc_pmark.h \
-    include/gc_inline.h include/gc_mark.h \
-    threadlibs.c if_mach.c if_not_there.c gc_cpp.cc include/gc_cpp.h \
-    gcname.c include/weakpointer.h include/private/gc_locks.h \
+    include/gc_inline.h include/gc_mark.h extra/threadlibs.c \
+    extra/if_mach.c extra/if_not_there.c gc_cpp.cc include/gc_cpp.h \
+    extra/gcname.c include/weakpointer.h include/private/gc_locks.h \
     mips_ultrix_mach_dep.s \
     include/new_gc_alloc.h include/gc_allocator.h \
     include/javaxfc.h sparc_sunos4_mach_dep.s sparc_netbsd_mach_dep.s \
@@ -392,27 +124,27 @@ TESTS= tests/test.c tests/test_cpp.cc tests/trace_test.c \
        tests/leak_test.c tests/thread_leak_test.c tests/middle.c \
        tests/smash_test.c tests/huge_test.c
 
-GNU_BUILD_FILES= configure.ac Makefile.am configure acinclude.m4 \
-                libtool.m4 install-sh configure.host Makefile.in \
+GNU_BUILD_FILES= configure.ac Makefile.am configure \
+                install-sh configure.host Makefile.in \
                 aclocal.m4 config.sub config.guess \
                 include/include.am doc/doc.am \
                 ltmain.sh mkinstalldirs depcomp missing \
                 cord/cord.am tests/tests.am autogen.sh \
                 bdw-gc.pc.in compile
 
-OTHER_MAKEFILES= OS2_MAKEFILE NT_MAKEFILE NT_THREADS_MAKEFILE gc.mak \
+OTHER_MAKEFILES= OS2_MAKEFILE NT_MAKEFILE gc.mak \
                 BCC_MAKEFILE EMX_MAKEFILE WCC_MAKEFILE Makefile.dj \
                 PCR-Makefile SMakefile.amiga Makefile.DLLs \
                 digimars.mak Makefile.direct NT_STATIC_THREADS_MAKEFILE \
                 NT_X64_STATIC_THREADS_MAKEFILE NT_X64_THREADS_MAKEFILE \
-                build_atomic_ops.sh build_atomic_ops.sh.cygwin 
+                build_atomic_ops.sh build_atomic_ops.sh.cygwin
 
-OTHER_FILES= Makefile setjmp_t.c callprocs \
-           MacProjects.sit.hqx MacOS.c \
+OTHER_FILES= Makefile extra/setjmp_t.c callprocs \
+           MacProjects.sit.hqx extra/MacOS.c \
            Mac_files/datastart.c Mac_files/dataend.c \
            Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
-           add_gc_prefix.c gc_cpp.cpp \
-          AmigaOS.c mscvc_dbg.c include/private/msvc_dbg.h \
+           extra/add_gc_prefix.c gc_cpp.cpp \
+           extra/AmigaOS.c extra/msvc_dbg.c include/private/msvc_dbg.h \
           $(TESTS) $(GNU_BUILD_FILES) $(OTHER_MAKEFILES)
 
 CORD_INCLUDE_FILES= $(srcdir)/include/gc.h $(srcdir)/include/cord.h \
@@ -438,7 +170,7 @@ all: gc.a gctest
 
 # if AO_INSTALL_DIR doesn't exist, we assume that it is pointing to
 # the default location, and we need to build
-$(AO_INSTALL_DIR): 
+$(AO_INSTALL_DIR):
        CC=$(CC) MAKE=$(MAKE) $(srcdir)/build_atomic_ops.sh
 
 LEAKFLAGS=$(CFLAGS) -DFIND_LEAK
@@ -640,19 +372,19 @@ cord/de: $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(UTILS)
        ./if_mach M68K AMIGA $(CC) $(CFLAGS) -UGC_AMIGA_MAKINGLIB -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses
        ./if_not_there cord/de $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) `./threadlibs`
 
-if_mach: $(srcdir)/if_mach.c $(srcdir)/include/private/gcconfig.h
-       $(HOSTCC) $(HOSTCFLAGS) -o if_mach $(srcdir)/if_mach.c
+if_mach: $(srcdir)/extra/if_mach.c $(srcdir)/include/private/gcconfig.h
+       $(HOSTCC) $(HOSTCFLAGS) -o if_mach $(srcdir)/extra/if_mach.c
 
-threadlibs: $(srcdir)/threadlibs.c $(srcdir)/include/private/gcconfig.h Makefile
-       $(HOSTCC) $(HOSTCFLAGS) -o threadlibs $(srcdir)/threadlibs.c
+threadlibs: $(srcdir)/extra/threadlibs.c $(srcdir)/include/private/gcconfig.h Makefile
+       $(HOSTCC) $(HOSTCFLAGS) -o threadlibs $(srcdir)/extra/threadlibs.c
 
-if_not_there: $(srcdir)/if_not_there.c
-       $(HOSTCC) $(HOSTCFLAGS) -o if_not_there $(srcdir)/if_not_there.c
+if_not_there: $(srcdir)/extra/if_not_there.c
+       $(HOSTCC) $(HOSTCFLAGS) -o if_not_there $(srcdir)/extra/if_not_there.c
 
-clean: 
+clean:
        rm -f gc.a *.o *.exe tests/*.o gctest gctest_dyn_link test_cpp \
              setjmp_test  mon.out gmon.out a.out core if_not_there if_mach \
-             threadlibs $(CORD_OBJS) cord/cordtest cord/de 
+             threadlibs $(CORD_OBJS) cord/cordtest cord/de
        -rm -f *~
 
 gctest: tests/test.o gc.a $(UTILS)
@@ -665,8 +397,8 @@ gctest: tests/test.o gc.a $(UTILS)
 # If an optimized setjmp_test generates a segmentation fault,
 # odds are your compiler is broken.  Gctest may still work.
 # Try compiling setjmp_t.c unoptimized.
-setjmp_test: $(srcdir)/setjmp_t.c $(srcdir)/include/gc.h $(UTILS) $(AO_INSTALL_DIR)
-       $(CC) $(CFLAGS) -o setjmp_test $(srcdir)/setjmp_t.c
+setjmp_test: $(srcdir)/extra/setjmp_t.c $(srcdir)/include/gc.h $(UTILS) $(AO_INSTALL_DIR)
+       $(CC) $(CFLAGS) -o setjmp_test $(srcdir)/extra/setjmp_t.c
 
 test:  KandRtest cord/cordtest
        cord/cordtest
@@ -676,11 +408,11 @@ KandRtest: setjmp_test gctest
        ./setjmp_test
        ./gctest
 
-add_gc_prefix: $(srcdir)/add_gc_prefix.c $(srcdir)/include/gc_version.h
-       $(CC) -o add_gc_prefix $(srcdir)/add_gc_prefix.c
+add_gc_prefix: $(srcdir)/extra/add_gc_prefix.c $(srcdir)/include/gc_version.h
+       $(CC) -o add_gc_prefix $(srcdir)/extra/add_gc_prefix.c
 
-gcname: $(srcdir)/gcname.c $(srcdir)/include/gc_version.h
-       $(CC) -o gcname $(srcdir)/gcname.c
+gcname: $(srcdir)/extra/gcname.c $(srcdir)/include/gc_version.h
+       $(CC) -o gcname $(srcdir)/extra/gcname.c
 
 #We assume this is being done from source directory.
 dist gc.tar: $(SRCS) $(DOC_FILES) $(OTHER_FILES) add_gc_prefix gcname
@@ -688,16 +420,16 @@ dist gc.tar: $(SRCS) $(DOC_FILES) $(OTHER_FILES) add_gc_prefix gcname
        cp Makefile.direct Makefile
        CC=$(CC) ./configure_atomic_ops.sh
        cd $(AO_SRC_DIR); $(MAKE) dist
-       if test $(srcdir)/libatomic_ops-$(AO_VERSION) = $(AO_SRC_DIR); \
+       if test $(srcdir)/libatomic_ops = $(AO_SRC_DIR); \
        then \
          mv $(AO_SRC_DIR) $(AO_SRC_DIR).bak ; \
-         tar xvfz $(AO_SRC_DIR).bak/libatomic_ops-$(AO_VERSION).tar.gz ; \
+         tar xvfz $(AO_SRC_DIR).bak/libatomic_ops.tar.gz ; \
        else \
-         tar xvfz $(AO_SRC_DIR)/libatomic_ops-$(AO_VERSION).tar.gz ; \
+         tar xvfz $(AO_SRC_DIR)/libatomic_ops.tar.gz ; \
        fi
        rm -f `./gcname`
        ln -s . `./gcname`
-       ./add_gc_prefix $(SRCS) $(DOC_FILES) $(OTHER_FILES) libatomic_ops-$(AO_VERSION) > /tmp/gc.tar-files
+       ./add_gc_prefix $(SRCS) $(DOC_FILES) $(OTHER_FILES) libatomic_ops > /tmp/gc.tar-files
        tar cvfh gc.tar `cat /tmp/gc.tar-files`
        cp gc.tar `./gcname`.tar
        gzip `./gcname`.tar
index 94f6e83947f1d7772d422b5173779bf639bdae25..aa10badd6b319cc9080b715166b5e008d91cddc9 100644 (file)
@@ -19,8 +19,6 @@ CXX=gxx $(ABI_FLAG)
 AS=gcc -c -x assembler-with-cpp $(ABI_FLAG)
 #  The above doesn't work with gas, which doesn't run cpp.
 #  Define AS as `gcc -c -x assembler-with-cpp' instead.
-#  Under Irix 6, you will have to specify the ABI (-o32, -n32, or -64)
-#  if you use something other than the default ABI on your machine.
 
 # special defines for DJGPP
 CXXLD=gxx $(ABI_FLAG)
@@ -31,125 +29,8 @@ VPATH= $(srcdir)
 
 CFLAGS= -gstabs+ -O2 -I$(srcdir)/include -DATOMIC_UNCOLLECTABLE -DALL_INTERIOR_POINTERS -DNO_EXECUTE_PERMISSION
 
-# Setjmp_test may yield overly optimistic results when compiled
-# without optimization.
-# -DFIND_LEAK causes GC_find_leak to be initially set.
-#   This causes the collector to assume that all inaccessible
-#   objects should have been explicitly deallocated, and reports exceptions.
-#   Finalization and the test program are not usable in this mode.
-# -DALL_INTERIOR_POINTERS allows all pointers to the interior
-#   of objects to be recognized.  (See gc_priv.h for consequences.)
-# -DSMALL_CONFIG tries to tune the collector for small heap sizes,
-#   usually causing it to use less space in such situations.
-#   Incremental collection no longer works in this case.
-# -DLARGE_CONFIG tunes the collector for unusually large heaps.
-#   Necessary for heaps larger than about 500 MB on most machines.
-#   Recommended for heaps larger than about 64 MB.
-# -DDONT_ADD_BYTE_AT_END is meaningful only with
-#   -DALL_INTERIOR_POINTERS.  Normally -DALL_INTERIOR_POINTERS
-#   causes all objects to be padded so that pointers just past the end of
-#   an object can be recognized.  This can be expensive.  (The padding
-#   is normally more than one byte due to alignment constraints.)
-#   -DDONT_ADD_BYTE_AT_END disables the padding.
-# -DNO_SIGNALS does not disable signals during critical parts of
-#   the GC process.  This is no less correct than many malloc 
-#   implementations, and it sometimes has a significant performance
-#   impact.  However, it is dangerous for many not-quite-ANSI C
-#   programs that call things like printf in asynchronous signal handlers.
-#   This is on by default.  Turning it off has not been extensively tested with
-#   compilers that reorder stores.  It should have been.
-# -DNO_EXECUTE_PERMISSION may cause some or all of the heap to not
-#   have execute permission, i.e. it may be impossible to execute
-#   code from the heap.  Currently this only affects the incremental
-#   collector on UNIX machines.  It may greatly improve its performance,
-#   since this may avoid some expensive cache synchronization.
-# -DGC_NO_OPERATOR_NEW_ARRAY declares that the C++ compiler does not support
-#   the  new syntax "operator new[]" for allocating and deleting arrays.
-#   See gc_cpp.h for details.  No effect on the C part of the collector.
-#   This is defined implicitly in a few environments.  Must also be defined
-#   by clients that use gc_cpp.h.
-# -DREDIRECT_MALLOC=X causes malloc, realloc, and free to be defined
-#   as aliases for X, GC_realloc, and GC_free, respectively.
-#   Calloc is redefined in terms of the new malloc.  X should
-#   be either GC_malloc or GC_malloc_uncollectable.
-#   The former is occasionally useful for working around leaks in code
-#   you don't want to (or can't) look at.  It may not work for
-#   existing code, but it often does.  Neither works on all platforms,
-#   since some ports use malloc or calloc to obtain system memory.
-#   (Probably works for UNIX, and win32.)
-# -DIGNORE_FREE turns calls to free into a noop.  Only useful with
-#   -DREDIRECT_MALLOC.
-# -DNO_DEBUGGING removes GC_dump and the debugging routines it calls.
-#   Reduces code size slightly at the expense of debuggability.
-# -DJAVA_FINALIZATION makes it somewhat safer to finalize objects out of
-#   order by specifying a nonstandard finalization mark procedure  (see
-#   finalize.c).  Objects reachable from finalizable objects will be marked
-#   in a separate postpass, and hence their memory won't be reclaimed.
-#   Not recommended unless you are implementing a language that specifies
-#   these semantics.  Since 5.0, determines only the initial value
-#   of GC_java_finalization variable.
-# -DFINALIZE_ON_DEMAND causes finalizers to be run only in response
-#   to explicit GC_invoke_finalizers() calls.
-#   In 5.0 this became runtime adjustable, and this only determines the
-#   initial value of GC_finalize_on_demand.
-# -DATOMIC_UNCOLLECTABLE includes code for GC_malloc_atomic_uncollectable.
-#   This is useful if either the vendor malloc implementation is poor,
-#   or if REDIRECT_MALLOC is used.
-# -DHBLKSIZE=ddd, where ddd is a power of 2 between 512 and 16384, explicitly
-#   sets the heap block size.  Each heap block is devoted to a single size and
-#   kind of object.  For the incremental collector it makes sense to match
-#   the most likely page size.  Otherwise large values result in more
-#   fragmentation, but generally better performance for large heaps.
-# -DPRINT_BLACK_LIST Whenever a black list entry is added, i.e. whenever
-#   the garbage collector detects a value that looks almost, but not quite,
-#   like a pointer, print both the address containing the value, and the
-#   value of the near-bogus-pointer.  Can be used to identifiy regions of
-#   memory that are likely to contribute misidentified pointers.
-# -DKEEP_BACK_PTRS Add code to save back pointers in debugging headers
-#   for objects allocated with the debugging allocator.  If all objects
-#   through GC_MALLOC with GC_DEBUG defined, this allows the client
-#   to determine how particular or randomly chosen objects are reachable
-#   for debugging/profiling purposes.  The gc_backptr.h interface is
-#   implemented only if this is defined.
-# -DGC_ASSERTIONS Enable some internal GC assertion checking.  Currently
-#   this facility is only used in a few places.  It is intended primarily
-#   for debugging of the garbage collector itself, but could also
-# -DDBG_HDRS_ALL Make sure that all objects have debug headers.  Increases
-#   the reliability (from 99.9999% to 100%) of some of the debugging
-#   code (especially KEEP_BACK_PTRS).  Makes -DSHORT_DBG_HDRS possible.
-#   Assumes that all client allocation is done through debugging
-#   allocators.
-# -DSHORT_DBG_HDRS Assume that all objects have debug headers.  Shorten
-#   the headers to minimize object size, at the expense of checking for
-#   writes past the end of an object.  This is intended for environments
-#   in which most client code is written in a "safe" language, such as
-#   Scheme or Java.  Assumes that all client allocation is done using
-#   the GC_debug_ functions (or through the macros that expand to these.
-#   (Also eliminates the field for the requested object size.)
-#   occasionally be useful for debugging of client code.  Slows down the
-#   collector somewhat, but not drastically.
-# -DCHECKSUMS reports on erroneously clear dirty bits, and unexpectedly
-#   altered stubborn objects, at substantial performance cost.
-#   Use only for debugging of the incremental collector.
-# -DGC_GCJ_SUPPORT includes support for gcj (and possibly other systems
-#   that include a pointer to a type descriptor in each allocated object).
-#   Building this way requires an ANSI C compiler.
-# -DUSE_I686_PREFETCH causes the collector to issue Pentium III style
-#   prefetch instructions.  No effect except on X86 Linux platforms.
-#   Assumes a very recent gcc-compatible compiler and assembler.
-#   (Gas prefetcht0 support was added around May 1999.)
-#   Empirically the code appears to still run correctly on Pentium II
-#   processors, though with no performance benefit.  May not run on other
-#   X86 processors?  In some cases this improves performance by
-#   15% or so.
-# -DUSE_3DNOW_PREFETCH causes the collector to issue AMD 3DNow style
-#   prefetch instructions.  Same restrictions as USE_I686_PREFETCH.
-#   UNTESTED!!
-# -DGC_USE_LD_WRAP in combination with the gld flags listed in README.linux
-#   causes the collector some system and pthread calls in a more transparent
-#   fashion than the usual macro-based approach.  Requires GNU ld, and
-#   currently probably works only with Linux.
-
+# Look into doc/README.macros for the description of the "define arguments"
+# influencing the collector configuration.
 
 CXXFLAGS= $(CFLAGS) -DGC_OPERATOR_NEW_ARRAY
 AR= ar
@@ -168,8 +49,8 @@ SRCS= $(CSRCS) mips_sgi_mach_dep.S rs6000_mach_dep.s alpha_mach_dep.S \
     sparc_mach_dep.S include/gc.h include/gc_version.h include/gc_typed.h \
     include/private/gc_hdrs.h include/private/gc_priv.h \
     include/private/gcconfig.h include/private/gc_mark.h \
-    include/gc_inline.h gc.man \
-    threadlibs.c if_mach.c if_not_there.c gc_cpp.cc include/gc_cpp.h \
+    include/gc_inline.h gc.man extra/threadlibs.c \
+    extra/if_mach.c extra/if_not_there.c gc_cpp.cc include/gc_cpp.h \
     include/weakpointer.h include/private/gc_locks.h \
     gcc_support.c mips_ultrix_mach_dep.s include/gc_alloc.h \
     include/new_gc_alloc.h include/javaxfc.h sparc_sunos4_mach_dep.s \
@@ -180,17 +61,17 @@ SRCS= $(CSRCS) mips_sgi_mach_dep.S rs6000_mach_dep.s alpha_mach_dep.S \
     include/leak_detector.h $(CORD_SRCS)
 
 OTHER_FILES= Makefile PCR-Makefile OS2_MAKEFILE NT_MAKEFILE BCC_MAKEFILE \
-           README tests/test.c test_cpp.cc setjmp_t.c SMakefile.amiga \
+           README tests/test.c test_cpp.cc extra/setjmp_t.c SMakefile.amiga \
            SCoptions.amiga README.amiga README.win32 cord/README \
           README.rs6000 README.QUICK callprocs pc_excludes \
            barrett_diagram README.OS2 README.Mac MacProjects.sit.hqx \
-           MacOS.c EMX_MAKEFILE README.debugging \
+           extra/MacOS.c EMX_MAKEFILE README.debugging \
            Mac_files/datastart.c Mac_files/dataend.c \
            Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
-           add_gc_prefix.c README.solaris2 README.sgi README.hp README.uts \
-          win32_threads.c NT_THREADS_MAKEFILE gc.mak README.dj Makefile.dj \
-          README.alpha README.linux README.MacOSX Makefile.DLLs \
-          WCC_MAKEFILE nursery.c include/gc_nursery.h include/gc_copy_descr.h
+           extra/add_gc_prefix.c README.solaris2 README.sgi README.hp \
+           README.uts win32_threads.c gc.mak README.dj \
+           Makefile.dj README.alpha README.linux README.MacOSX Makefile.DLLs \
+          WCC_MAKEFILE
 
 CORD_INCLUDE_FILES= $(srcdir)/include/gc.h $(srcdir)/include/cord.h \
        $(srcdir)/include/ec.h $(srcdir)/include/private/cord_pos.h
@@ -337,21 +218,21 @@ cord/de$(EXE_SUFFIX): $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $
        ./if_mach ALPHA LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses
        ./if_not_there cord/de$(EXE_SUFFIX) $(CC) $(CFLAGS) -o cord/de$(EXE_SUFFIX) $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES)
 
-if_mach$(EXE_SUFFIX): $(srcdir)/if_mach.c $(srcdir)/include/private/gcconfig.h
+if_mach$(EXE_SUFFIX): $(srcdir)/extra/if_mach.c $(srcdir)/include/private/gcconfig.h
        rm -f if_mach if_mach$(EXE_SUFFIX)
-       $(CC) $(CFLAGS) -o if_mach $(srcdir)/if_mach.c
+       $(CC) $(CFLAGS) -o if_mach $(srcdir)/extra/if_mach.c
 
-threadlibs$(EXE_SUFFIX): $(srcdir)/threadlibs.c $(srcdir)include/private/gcconfig.h Makefile
+threadlibs$(EXE_SUFFIX): $(srcdir)/extra/threadlibs.c $(srcdir)include/private/gcconfig.h Makefile
        rm -f threadlibs threadlibs$(EXE_SUFFIX)
-       $(CC) $(CFLAGS) -o threadlibs $(srcdir)/threadlibs.c
+       $(CC) $(CFLAGS) -o threadlibs $(srcdir)/extra/threadlibs.c
 
-if_not_there$(EXE_SUFFIX): $(srcdir)/if_not_there.c
+if_not_there$(EXE_SUFFIX): $(srcdir)/extra/if_not_there.c
        rm -f if_not_there if_not_there$(EXE_SUFFIX)
-       $(CC) $(CFLAGS) -o if_not_there $(srcdir)/if_not_there.c
+       $(CC) $(CFLAGS) -o if_not_there $(srcdir)/extra/if_not_there.c
 
 # Clean removes *.o several times,
 # because as the first one doesn't seem to get them all!
-clean: 
+clean:
        rm -f gc.a *.o
        rm -f *.o
        rm -f *.o
@@ -374,10 +255,10 @@ gctest$(EXE_SUFFIX): tests/test.o gc.a if_mach$(EXE_SUFFIX) if_not_there$(EXE_SU
 # If an optimized setjmp_test generates a segmentation fault,
 # odds are your compiler is broken.  Gctest may still work.
 # Try compiling setjmp_t.c unoptimized.
-setjmp_test$(EXE_SUFFIX): $(srcdir)/setjmp_t.c $(srcdir)/include/gc.h \
+setjmp_test$(EXE_SUFFIX): $(srcdir)/extra/setjmp_t.c $(srcdir)/include/gc.h \
                if_mach$(EXE_SUFFIX) if_not_there$(EXE_SUFFIX)
        rm -f setjmp_test$(EXE_SUFFIX)
-       $(CC) $(CFLAGS) -o setjmp_test $(srcdir)/setjmp_t.c
+       $(CC) $(CFLAGS) -o setjmp_test $(srcdir)/extra/setjmp_t.c
        rm -f setjmp_test
 
 test:  KandRtest cord/cordtest$(EXE_SUFFIX)
@@ -388,8 +269,8 @@ KandRtest: setjmp_test$(EXE_SUFFIX) gctest$(EXE_SUFFIX)
        ./setjmp_test$(EXE_SUFFIX)
        ./gctest$(EXE_SUFFIX)
 
-add_gc_prefix$(EXE_SUFFIX): add_gc_prefix.c
-       $(CC) -o add_gc_prefix$(EXE_SUFFIX) $(srcdir)/add_gc_prefix.c
+add_gc_prefix$(EXE_SUFFIX): extra/add_gc_prefix.c
+       $(CC) -o add_gc_prefix$(EXE_SUFFIX) $(srcdir)/extra/add_gc_prefix.c
        rm -f add_gc_prefix
 
 gc.tar: $(SRCS) $(OTHER_FILES) add_gc_prefix
@@ -425,4 +306,3 @@ SYM_PREFIX-libgc=GC
 
 # Uncomment the following line to build a GNU win32 DLL
 # include Makefile.DLLs
-
index 3272cba8dd9b2114a10cacd24bbee3e4d376e58f..459be22ea5b6b86194bb5f9a734666842d7862e0 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 @SET_MAKE@
 
 # Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
-# 
+#
 # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
 # OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
-# 
+#
 # Permission is hereby granted to use or copy this program
 # for any purpose,  provided the above notices are retained on all copies.
 # Permission to modify the code and to distribute modified code is granted,
 
 
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -95,47 +91,51 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
+@USE_INTERNAL_LIBATOMIC_OPS_TRUE@am__append_1 = -I$(top_builddir)/libatomic_ops/src \
+@USE_INTERNAL_LIBATOMIC_OPS_TRUE@             -I$(top_srcdir)/libatomic_ops/src
+
 check_PROGRAMS = gctest$(EXEEXT) leaktest$(EXEEXT) middletest$(EXEEXT) \
        smashtest$(EXEEXT) hugetest$(EXEEXT) $(am__EXEEXT_1) \
-       $(am__EXEEXT_2)
+       $(am__EXEEXT_2) $(am__EXEEXT_3)
 
 # C Library: Architecture Dependent
 # ---------------------------------
-@PTHREADS_TRUE@am__append_1 = pthread_support.c pthread_stop_world.c
-@DARWIN_THREADS_TRUE@am__append_2 = darwin_stop_world.c
-@WIN32_THREADS_TRUE@am__append_3 = win32_threads.c
+@PTHREADS_TRUE@am__append_2 = pthread_support.c pthread_stop_world.c
+@DARWIN_THREADS_TRUE@am__append_3 = darwin_stop_world.c
+@WIN32_THREADS_TRUE@am__append_4 = win32_threads.c
 
 # C++ Interface
 # -------------
-@CPLUSPLUS_TRUE@am__append_4 = libgccpp.la
-@CPLUSPLUS_TRUE@am__append_5 = include/gc_cpp.h include/gc_allocator.h
+@CPLUSPLUS_TRUE@am__append_5 = libgccpp.la
+@CPLUSPLUS_TRUE@am__append_6 = include/gc_cpp.h include/gc_allocator.h
 DIST_COMMON = $(am__configure_deps) $(am__pkginclude_HEADERS_DIST) \
        $(dist_noinst_HEADERS) $(dist_noinst_SCRIPTS) \
-       $(dist_pkgconfig_DATA) $(dist_pkgdata_DATA) $(include_HEADERS) \
-       $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/bdw-gc.pc.in $(srcdir)/cord/cord.am \
-       $(srcdir)/doc/doc.am $(srcdir)/include/include.am \
-       $(srcdir)/tests/tests.am $(top_srcdir)/configure ChangeLog \
-       compile config.guess config.sub depcomp install-sh ltmain.sh \
-       missing mkinstalldirs
-
-#TESTS += tracetest$(EXEEXT)
-#check_PROGRAMS += tracetest
-#tracetest_SOURCES = tests/trace_test.c
-#tracetest_LDADD = $(test_ldadd)
-@THREADS_TRUE@am__append_6 = threadleaktest$(EXEEXT)
-@THREADS_TRUE@am__append_7 = threadleaktest
-@CPLUSPLUS_TRUE@am__append_8 = test_cpp$(EXEEXT)
-@CPLUSPLUS_TRUE@am__append_9 = test_cpp
+       $(dist_pkgdata_DATA) $(include_HEADERS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in $(srcdir)/bdw-gc.pc.in \
+       $(srcdir)/cord/cord.am $(srcdir)/doc/doc.am \
+       $(srcdir)/include/include.am $(srcdir)/tests/tests.am \
+       $(top_srcdir)/configure \
+       $(top_srcdir)/include/private/config.h.in ChangeLog compile \
+       config.guess config.sub depcomp install-sh ltmain.sh missing \
+       mkinstalldirs
+@KEEP_BACK_PTRS_TRUE@am__append_7 = tracetest$(EXEEXT)
+@KEEP_BACK_PTRS_TRUE@am__append_8 = tracetest
+@THREADS_TRUE@am__append_9 = threadleaktest$(EXEEXT)
+@THREADS_TRUE@am__append_10 = threadleaktest
+@CPLUSPLUS_TRUE@am__append_11 = test_cpp$(EXEEXT)
+@CPLUSPLUS_TRUE@am__append_12 = test_cpp
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/libtool.m4 $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/gc_set_version.m4 \
+       $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+       $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+       $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
+ configure.lineno config.status.lineno
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/include/private/config.h
 CONFIG_CLEAN_FILES = bdw-gc.pc
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
@@ -143,16 +143,18 @@ am__vpath_adj = case $$p in \
     *) f=$$p;; \
   esac;
 am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \
-       "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(includedir)" \
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgdatadir)" \
+       "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" \
        "$(DESTDIR)$(pkgincludedir)"
 libLTLIBRARIES_INSTALL = $(INSTALL)
 LTLIBRARIES = $(lib_LTLIBRARIES)
 libcord_la_DEPENDENCIES = $(top_builddir)/libgc.la
-am__dirstamp = $(am__leading_dot)dirstamp
-am_libcord_la_OBJECTS = cord/cordbscs.lo cord/cordprnt.lo \
-       cord/cordtest.lo cord/cordxtra.lo
+am_libcord_la_OBJECTS = cordbscs.lo cordprnt.lo cordtest.lo \
+       cordxtra.lo
 libcord_la_OBJECTS = $(am_libcord_la_OBJECTS)
+libcord_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(libcord_la_LDFLAGS) $(LDFLAGS) -o $@
 am__DEPENDENCIES_1 =
 am__libgc_la_SOURCES_DIST = allchblk.c alloc.c blacklst.c checksums.c \
        dbg_mlc.c dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c \
@@ -172,34 +174,41 @@ am_libgc_la_OBJECTS = allchblk.lo alloc.lo blacklst.lo checksums.lo \
        real_malloc.lo reclaim.lo specific.lo stubborn.lo typd_mlc.lo \
        backgraph.lo thread_local_alloc.lo $(am__objects_1) \
        $(am__objects_2) $(am__objects_3)
-@NEED_ATOMIC_OPS_ASM_FALSE@@USE_INTERNAL_LIBATOMIC_OPS_TRUE@nodist_libgc_la_OBJECTS = ./atomic_ops.lo
+@NEED_ATOMIC_OPS_ASM_FALSE@@USE_INTERNAL_LIBATOMIC_OPS_TRUE@nodist_libgc_la_OBJECTS = atomic_ops.lo
 @NEED_ATOMIC_OPS_ASM_TRUE@nodist_libgc_la_OBJECTS =  \
-@NEED_ATOMIC_OPS_ASM_TRUE@     ./atomic_ops_sysdeps.lo
+@NEED_ATOMIC_OPS_ASM_TRUE@     atomic_ops_sysdeps.lo
 libgc_la_OBJECTS = $(am_libgc_la_OBJECTS) $(nodist_libgc_la_OBJECTS)
+libgc_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(libgc_la_LDFLAGS) \
+       $(LDFLAGS) -o $@
 @CPLUSPLUS_TRUE@libgccpp_la_DEPENDENCIES = ./libgc.la
 am__libgccpp_la_SOURCES_DIST = gc_cpp.cc
 @CPLUSPLUS_TRUE@am_libgccpp_la_OBJECTS = gc_cpp.lo
 libgccpp_la_OBJECTS = $(am_libgccpp_la_OBJECTS)
+libgccpp_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+       $(CXXFLAGS) $(libgccpp_la_LDFLAGS) $(LDFLAGS) -o $@
 @CPLUSPLUS_TRUE@am_libgccpp_la_rpath = -rpath $(libdir)
-@THREADS_TRUE@am__EXEEXT_1 = threadleaktest$(EXEEXT)
-@CPLUSPLUS_TRUE@am__EXEEXT_2 = test_cpp$(EXEEXT)
-am_gctest_OBJECTS = tests/test.$(OBJEXT)
+@KEEP_BACK_PTRS_TRUE@am__EXEEXT_1 = tracetest$(EXEEXT)
+@THREADS_TRUE@am__EXEEXT_2 = threadleaktest$(EXEEXT)
+@CPLUSPLUS_TRUE@am__EXEEXT_3 = test_cpp$(EXEEXT)
+am_gctest_OBJECTS = test.$(OBJEXT)
 gctest_OBJECTS = $(am_gctest_OBJECTS)
 am__DEPENDENCIES_2 = $(top_builddir)/libgc.la $(am__DEPENDENCIES_1)
-am_hugetest_OBJECTS = tests/huge_test.$(OBJEXT)
+am_hugetest_OBJECTS = huge_test.$(OBJEXT)
 hugetest_OBJECTS = $(am_hugetest_OBJECTS)
 hugetest_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_leaktest_OBJECTS = tests/leak_test.$(OBJEXT)
+am_leaktest_OBJECTS = leak_test.$(OBJEXT)
 leaktest_OBJECTS = $(am_leaktest_OBJECTS)
 leaktest_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_middletest_OBJECTS = tests/middle.$(OBJEXT)
+am_middletest_OBJECTS = middle.$(OBJEXT)
 middletest_OBJECTS = $(am_middletest_OBJECTS)
 middletest_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_smashtest_OBJECTS = tests/smash_test.$(OBJEXT)
+am_smashtest_OBJECTS = smash_test.$(OBJEXT)
 smashtest_OBJECTS = $(am_smashtest_OBJECTS)
 smashtest_DEPENDENCIES = $(am__DEPENDENCIES_2)
 am__test_cpp_SOURCES_DIST = tests/test_cpp.cc
-@CPLUSPLUS_TRUE@am_test_cpp_OBJECTS = tests/test_cpp.$(OBJEXT)
+@CPLUSPLUS_TRUE@am_test_cpp_OBJECTS = test_cpp.$(OBJEXT)
 test_cpp_OBJECTS = $(am_test_cpp_OBJECTS)
 @AVOID_CPP_LIB_FALSE@@CPLUSPLUS_TRUE@test_cpp_DEPENDENCIES =  \
 @AVOID_CPP_LIB_FALSE@@CPLUSPLUS_TRUE@  libgccpp.la \
@@ -207,53 +216,66 @@ test_cpp_OBJECTS = $(am_test_cpp_OBJECTS)
 @AVOID_CPP_LIB_TRUE@@CPLUSPLUS_TRUE@test_cpp_DEPENDENCIES = gc_cpp.o \
 @AVOID_CPP_LIB_TRUE@@CPLUSPLUS_TRUE@   $(am__DEPENDENCIES_2)
 am__threadleaktest_SOURCES_DIST = tests/thread_leak_test.c
-@THREADS_TRUE@am_threadleaktest_OBJECTS =  \
-@THREADS_TRUE@ tests/thread_leak_test.$(OBJEXT)
+@THREADS_TRUE@am_threadleaktest_OBJECTS = thread_leak_test.$(OBJEXT)
 threadleaktest_OBJECTS = $(am_threadleaktest_OBJECTS)
 @THREADS_TRUE@threadleaktest_DEPENDENCIES = $(am__DEPENDENCIES_2)
+am__tracetest_SOURCES_DIST = tests/trace_test.c
+@KEEP_BACK_PTRS_TRUE@am_tracetest_OBJECTS = trace_test.$(OBJEXT)
+tracetest_OBJECTS = $(am_tracetest_OBJECTS)
+@KEEP_BACK_PTRS_TRUE@tracetest_DEPENDENCIES = $(am__DEPENDENCIES_2)
 SCRIPTS = $(dist_noinst_SCRIPTS)
 DEFAULT_INCLUDES = 
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
-CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
-LTCCASCOMPILE = $(LIBTOOL) --mode=compile $(CCAS) $(AM_CCASFLAGS) \
-       $(CCASFLAGS)
+CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
+LTCPPASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-       $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
-       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-       $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
 CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
-       $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
+LTCCASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
 SOURCES = $(libcord_la_SOURCES) $(libgc_la_SOURCES) \
        $(EXTRA_libgc_la_SOURCES) $(nodist_libgc_la_SOURCES) \
        $(libgccpp_la_SOURCES) $(gctest_SOURCES) $(hugetest_SOURCES) \
        $(leaktest_SOURCES) $(middletest_SOURCES) $(smashtest_SOURCES) \
-       $(test_cpp_SOURCES) $(threadleaktest_SOURCES)
+       $(test_cpp_SOURCES) $(threadleaktest_SOURCES) \
+       $(tracetest_SOURCES)
 DIST_SOURCES = $(libcord_la_SOURCES) $(am__libgc_la_SOURCES_DIST) \
        $(EXTRA_libgc_la_SOURCES) $(am__libgccpp_la_SOURCES_DIST) \
        $(gctest_SOURCES) $(hugetest_SOURCES) $(leaktest_SOURCES) \
        $(middletest_SOURCES) $(smashtest_SOURCES) \
        $(am__test_cpp_SOURCES_DIST) \
-       $(am__threadleaktest_SOURCES_DIST)
+       $(am__threadleaktest_SOURCES_DIST) \
+       $(am__tracetest_SOURCES_DIST)
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
        html-recursive info-recursive install-data-recursive \
-       install-exec-recursive install-info-recursive \
-       install-recursive installcheck-recursive installdirs-recursive \
-       pdf-recursive ps-recursive uninstall-info-recursive \
-       uninstall-recursive
-dist_pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
 dist_pkgdataDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(dist_pkgconfig_DATA) $(dist_pkgdata_DATA)
+pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(dist_pkgdata_DATA) $(pkgconfig_DATA)
 includeHEADERS_INSTALL = $(INSTALL_HEADER)
 am__pkginclude_HEADERS_DIST = include/gc_cpp.h include/gc_allocator.h \
        include/gc.h include/gc_typed.h include/gc_inline.h \
@@ -265,6 +287,8 @@ am__pkginclude_HEADERS_DIST = include/gc_cpp.h include/gc_allocator.h \
 pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER)
 HEADERS = $(dist_noinst_HEADERS) $(include_HEADERS) \
        $(pkginclude_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
@@ -280,25 +304,19 @@ GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
+ATOMIC_OPS_LIBS = @ATOMIC_OPS_LIBS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
-AVOID_CPP_LIB_FALSE = @AVOID_CPP_LIB_FALSE@
-AVOID_CPP_LIB_TRUE = @AVOID_CPP_LIB_TRUE@
 AWK = @AWK@
 CC = @CC@
 CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
 CCASFLAGS = @CCASFLAGS@ $(DEFS)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
-COMPILER_XLC_FALSE = @COMPILER_XLC_FALSE@
-COMPILER_XLC_TRUE = @COMPILER_XLC_TRUE@
-CPLUSPLUS_FALSE = @CPLUSPLUS_FALSE@
-CPLUSPLUS_TRUE = @CPLUSPLUS_TRUE@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CXX = @CXX@
@@ -307,29 +325,27 @@ CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CXXINCLUDES = @CXXINCLUDES@
 CYGPATH_W = @CYGPATH_W@
-DARWIN_THREADS_FALSE = @DARWIN_THREADS_FALSE@
-DARWIN_THREADS_TRUE = @DARWIN_THREADS_TRUE@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
-ENABLE_GCJ_SUPPORT_FALSE = @ENABLE_GCJ_SUPPORT_FALSE@
-ENABLE_GCJ_SUPPORT_TRUE = @ENABLE_GCJ_SUPPORT_TRUE@
 EXEEXT = @EXEEXT@
 EXTRA_TEST_LIBS = @EXTRA_TEST_LIBS@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
 GC_CFLAGS = @GC_CFLAGS@
 GC_VERSION = @GC_VERSION@
 GREP = @GREP@
 INCLUDES = @INCLUDES@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
@@ -337,57 +353,48 @@ LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
-NEED_ATOMIC_OPS_ASM_FALSE = @NEED_ATOMIC_OPS_ASM_FALSE@
-NEED_ATOMIC_OPS_ASM_TRUE = @NEED_ATOMIC_OPS_ASM_TRUE@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
-PTHREADS_FALSE = @PTHREADS_FALSE@
-PTHREADS_TRUE = @PTHREADS_TRUE@
 RANLIB = @RANLIB@
+SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
 THREADDLLIBS = @THREADDLLIBS@
-THREADS_FALSE = @THREADS_FALSE@
-THREADS_TRUE = @THREADS_TRUE@
 UNWINDLIBS = @UNWINDLIBS@
-USE_INTERNAL_LIBATOMIC_OPS_FALSE = @USE_INTERNAL_LIBATOMIC_OPS_FALSE@
-USE_INTERNAL_LIBATOMIC_OPS_TRUE = @USE_INTERNAL_LIBATOMIC_OPS_TRUE@
-USE_LIBDIR_FALSE = @USE_LIBDIR_FALSE@
-USE_LIBDIR_TRUE = @USE_LIBDIR_TRUE@
 VERSION = @VERSION@
-WIN32_THREADS_FALSE = @WIN32_THREADS_FALSE@
-WIN32_THREADS_TRUE = @WIN32_THREADS_TRUE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 addlibs = @addlibs@
 addobjs = @addobjs@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
-atomic_ops_libs = @atomic_ops_libs@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -407,6 +414,7 @@ libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -416,6 +424,7 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 subdirs = @subdirs@
 sysconfdir = @sysconfdir@
 target = @target@
@@ -424,12 +433,15 @@ target_all = @target_all@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 
 # We currently use the source files directly from libatomic_ops, if we
 # use the internal version.  This is done since libatomic_ops doesn't
 # use libtool, since it has no real use for it.  But that seems to make
 # it hard to use either the resulting object files or libraries.
-# Thus there seems too be no real reason to recusively build in the
+# Thus there seems too be no real reason to recursively build in the
 # libatomic_ops directory.
 # if USE_INTERNAL_LIBATOMICS_OPS
 # SUBDIRS = @maybe_libatomic_ops@
@@ -437,6 +449,9 @@ target_vendor = @target_vendor@
 # SUBDIRS =
 # endif
 SUBDIRS = 
+ACLOCAL_AMFLAGS = -I m4
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
+       $(am__append_1)
 
 # Initialize variables so that we can declare files locally.
 
@@ -458,36 +473,33 @@ SUBDIRS =
 #
 
 # The libatomic_ops library.  This is not ideal, since we pick up junk from
-# there.  The hard-coded version number should also go.
-
-# :FIXME: why do we distribute this one???
-#
+# there.
 EXTRA_DIST = gc_cpp.cpp README.QUICK BCC_MAKEFILE NT_MAKEFILE \
-       NT_THREADS_MAKEFILE OS2_MAKEFILE PCR-Makefile digimars.mak \
-       EMX_MAKEFILE Makefile.direct Makefile.dj Makefile.DLLs \
-       SMakefile.amiga WCC_MAKEFILE build_atomic_ops.sh \
-       build_atomic_ops.sh.cygwin NT_STATIC_THREADS_MAKEFILE \
-       NT_X64_STATIC_THREADS_MAKEFILE NT_X64_THREADS_MAKEFILE \
-       add_gc_prefix.c gcname.c if_mach.c if_not_there.c \
-       hpux_test_and_clear.s gc.mak MacOS.c MacProjects.sit.hqx \
-       mach_dep.c setjmp_t.c threadlibs.c AmigaOS.c \
+       OS2_MAKEFILE PCR-Makefile digimars.mak EMX_MAKEFILE \
+       Makefile.direct Makefile.dj Makefile.DLLs SMakefile.amiga \
+       WCC_MAKEFILE build_atomic_ops.sh build_atomic_ops.sh.cygwin \
+       NT_STATIC_THREADS_MAKEFILE NT_X64_STATIC_THREADS_MAKEFILE \
+       NT_X64_THREADS_MAKEFILE extra/add_gc_prefix.c extra/gc.c \
+       extra/gcname.c extra/if_mach.c extra/if_not_there.c \
+       hpux_test_and_clear.s gc.mak extra/MacOS.c MacProjects.sit.hqx \
+       mach_dep.c extra/setjmp_t.c extra/threadlibs.c extra/AmigaOS.c \
        Mac_files/datastart.c Mac_files/dataend.c \
        Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
-       include/private/msvc_dbg.h msvc_dbg.c libatomic_ops-1.2 \
-       libtool.m4 cord/cordbscs.c cord/cordtest.c cord/de.c \
-       cord/cordprnt.c cord/cordxtra.c cord/de_cmds.h cord/de_win.h \
-       cord/de_win.c cord/de_win.RC cord/de_win.ICO
+       include/private/msvc_dbg.h extra/msvc_dbg.c libatomic_ops \
+       cord/cordbscs.c cord/cordtest.c cord/de.c cord/cordprnt.c \
+       cord/cordxtra.c cord/de_cmds.h cord/de_win.h cord/de_win.c \
+       cord/de_win.RC cord/de_win.ICO
 
 # C Library
 # ---------
-lib_LTLIBRARIES = libgc.la $(am__append_4) libcord.la
+lib_LTLIBRARIES = libgc.la $(am__append_5) libcord.la
 
 # unprefixed header
 include_HEADERS = include/extra/gc.h include/extra/gc_cpp.h
 
 # installed headers
 #
-pkginclude_HEADERS = $(am__append_5) include/gc.h include/gc_typed.h \
+pkginclude_HEADERS = $(am__append_6) include/gc.h include/gc_typed.h \
        include/gc_inline.h include/gc_mark.h include/gc_cpp.h \
        include/weakpointer.h include/new_gc_alloc.h \
        include/gc_allocator.h include/gc_backptr.h include/gc_gcj.h \
@@ -508,23 +520,23 @@ dist_noinst_HEADERS = include/private/gc_hdrs.h \
        include/private/thread_local_alloc.h include/cord.h \
        include/ec.h include/javaxfc.h
 TESTS = gctest$(EXEEXT) leaktest$(EXEEXT) middletest$(EXEEXT) \
-       smashtest$(EXEEXT) hugetest$(EXEEXT) $(am__append_6) \
-       $(am__append_8)
+       smashtest$(EXEEXT) hugetest$(EXEEXT) $(am__append_7) \
+       $(am__append_9) $(am__append_11)
 pkgconfigdir = $(libdir)/pkgconfig
-dist_pkgconfig_DATA = bdw-gc.pc
+pkgconfig_DATA = bdw-gc.pc
 libgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
        dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c malloc.c \
        mallocx.c mark.c mark_rts.c misc.c new_hblk.c obj_map.c \
        os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
        specific.c stubborn.c typd_mlc.c backgraph.c \
-       thread_local_alloc.c $(am__append_1) $(am__append_2) \
-       $(am__append_3)
-@NEED_ATOMIC_OPS_ASM_TRUE@nodist_libgc_la_SOURCES = ./atomic_ops_sysdeps.S      
-@USE_INTERNAL_LIBATOMIC_OPS_TRUE@nodist_libgc_la_SOURCES = ./atomic_ops.c       
+       thread_local_alloc.c $(am__append_2) $(am__append_3) \
+       $(am__append_4)
+@NEED_ATOMIC_OPS_ASM_TRUE@nodist_libgc_la_SOURCES = libatomic_ops/src/atomic_ops_sysdeps.S
+@USE_INTERNAL_LIBATOMIC_OPS_TRUE@nodist_libgc_la_SOURCES = libatomic_ops/src/atomic_ops.c
 
 # Include THREADDLLIBS here to ensure that the correct versions of
 # linuxthread semaphore functions get linked:
-libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS)
+libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS) $(ATOMIC_OPS_LIBS)
 libgc_la_DEPENDENCIES = @addobjs@
 libgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:3:0 -no-undefined
 EXTRA_libgc_la_SOURCES = alpha_mach_dep.S \
@@ -577,6 +589,8 @@ smashtest_SOURCES = tests/smash_test.c
 smashtest_LDADD = $(test_ldadd)
 hugetest_SOURCES = tests/huge_test.c
 hugetest_LDADD = $(test_ldadd)
+@KEEP_BACK_PTRS_TRUE@tracetest_SOURCES = tests/trace_test.c
+@KEEP_BACK_PTRS_TRUE@tracetest_LDADD = $(test_ldadd)
 @THREADS_TRUE@threadleaktest_SOURCES = tests/thread_leak_test.c
 @THREADS_TRUE@threadleaktest_LDADD = $(test_ldadd)
 @CPLUSPLUS_TRUE@test_cpp_SOURCES = tests/test_cpp.cc
@@ -659,25 +673,42 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+include/private/config.h: include/private/stamp-h1
+       @if test ! -f $@; then \
+         rm -f include/private/stamp-h1; \
+         $(MAKE) $(AM_MAKEFLAGS) include/private/stamp-h1; \
+       else :; fi
+
+include/private/stamp-h1: $(top_srcdir)/include/private/config.h.in $(top_builddir)/config.status
+       @rm -f include/private/stamp-h1
+       cd $(top_builddir) && $(SHELL) ./config.status include/private/config.h
+$(top_srcdir)/include/private/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
+       cd $(top_srcdir) && $(AUTOHEADER)
+       rm -f include/private/stamp-h1
+       touch $@
+
+distclean-hdr:
+       -rm -f include/private/config.h include/private/stamp-h1
 bdw-gc.pc: $(top_builddir)/config.status $(srcdir)/bdw-gc.pc.in
        cd $(top_builddir) && $(SHELL) ./config.status $@
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
-       test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+       test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
        @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
          if test -f $$p; then \
            f=$(am__strip_dir) \
-           echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-           $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+           echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+           $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
          else :; fi; \
        done
 
 uninstall-libLTLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
          p=$(am__strip_dir) \
-         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
        done
 
 clean-libLTLIBRARIES:
@@ -688,30 +719,12 @@ clean-libLTLIBRARIES:
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
-cord/$(am__dirstamp):
-       @$(mkdir_p) cord
-       @: > cord/$(am__dirstamp)
-cord/$(DEPDIR)/$(am__dirstamp):
-       @$(mkdir_p) cord/$(DEPDIR)
-       @: > cord/$(DEPDIR)/$(am__dirstamp)
-cord/cordbscs.lo: cord/$(am__dirstamp) cord/$(DEPDIR)/$(am__dirstamp)
-cord/cordprnt.lo: cord/$(am__dirstamp) cord/$(DEPDIR)/$(am__dirstamp)
-cord/cordtest.lo: cord/$(am__dirstamp) cord/$(DEPDIR)/$(am__dirstamp)
-cord/cordxtra.lo: cord/$(am__dirstamp) cord/$(DEPDIR)/$(am__dirstamp)
 libcord.la: $(libcord_la_OBJECTS) $(libcord_la_DEPENDENCIES) 
-       $(LINK) -rpath $(libdir) $(libcord_la_LDFLAGS) $(libcord_la_OBJECTS) $(libcord_la_LIBADD) $(LIBS)
-./$(am__dirstamp):
-       @$(mkdir_p) .
-       @: > ./$(am__dirstamp)
-$(DEPDIR)/$(am__dirstamp):
-       @$(mkdir_p) ./$(DEPDIR)
-       @: > $(DEPDIR)/$(am__dirstamp)
-./atomic_ops_sysdeps.lo: ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp)
-./atomic_ops.lo: ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp)
+       $(libcord_la_LINK) -rpath $(libdir) $(libcord_la_OBJECTS) $(libcord_la_LIBADD) $(LIBS)
 libgc.la: $(libgc_la_OBJECTS) $(libgc_la_DEPENDENCIES) 
-       $(LINK) -rpath $(libdir) $(libgc_la_LDFLAGS) $(libgc_la_OBJECTS) $(libgc_la_LIBADD) $(LIBS)
+       $(libgc_la_LINK) -rpath $(libdir) $(libgc_la_OBJECTS) $(libgc_la_LIBADD) $(LIBS)
 libgccpp.la: $(libgccpp_la_OBJECTS) $(libgccpp_la_DEPENDENCIES) 
-       $(CXXLINK) $(am_libgccpp_la_rpath) $(libgccpp_la_LDFLAGS) $(libgccpp_la_OBJECTS) $(libgccpp_la_LIBADD) $(LIBS)
+       $(libgccpp_la_LINK) $(am_libgccpp_la_rpath) $(libgccpp_la_OBJECTS) $(libgccpp_la_LIBADD) $(LIBS)
 
 clean-checkPROGRAMS:
        @list='$(check_PROGRAMS)'; for p in $$list; do \
@@ -719,79 +732,49 @@ clean-checkPROGRAMS:
          echo " rm -f $$p $$f"; \
          rm -f $$p $$f ; \
        done
-tests/$(am__dirstamp):
-       @$(mkdir_p) tests
-       @: > tests/$(am__dirstamp)
-tests/$(DEPDIR)/$(am__dirstamp):
-       @$(mkdir_p) tests/$(DEPDIR)
-       @: > tests/$(DEPDIR)/$(am__dirstamp)
-tests/test.$(OBJEXT): tests/$(am__dirstamp) \
-       tests/$(DEPDIR)/$(am__dirstamp)
 gctest$(EXEEXT): $(gctest_OBJECTS) $(gctest_DEPENDENCIES) 
        @rm -f gctest$(EXEEXT)
-       $(LINK) $(gctest_LDFLAGS) $(gctest_OBJECTS) $(gctest_LDADD) $(LIBS)
-tests/huge_test.$(OBJEXT): tests/$(am__dirstamp) \
-       tests/$(DEPDIR)/$(am__dirstamp)
+       $(LINK) $(gctest_OBJECTS) $(gctest_LDADD) $(LIBS)
 hugetest$(EXEEXT): $(hugetest_OBJECTS) $(hugetest_DEPENDENCIES) 
        @rm -f hugetest$(EXEEXT)
-       $(LINK) $(hugetest_LDFLAGS) $(hugetest_OBJECTS) $(hugetest_LDADD) $(LIBS)
-tests/leak_test.$(OBJEXT): tests/$(am__dirstamp) \
-       tests/$(DEPDIR)/$(am__dirstamp)
+       $(LINK) $(hugetest_OBJECTS) $(hugetest_LDADD) $(LIBS)
 leaktest$(EXEEXT): $(leaktest_OBJECTS) $(leaktest_DEPENDENCIES) 
        @rm -f leaktest$(EXEEXT)
-       $(LINK) $(leaktest_LDFLAGS) $(leaktest_OBJECTS) $(leaktest_LDADD) $(LIBS)
-tests/middle.$(OBJEXT): tests/$(am__dirstamp) \
-       tests/$(DEPDIR)/$(am__dirstamp)
+       $(LINK) $(leaktest_OBJECTS) $(leaktest_LDADD) $(LIBS)
 middletest$(EXEEXT): $(middletest_OBJECTS) $(middletest_DEPENDENCIES) 
        @rm -f middletest$(EXEEXT)
-       $(LINK) $(middletest_LDFLAGS) $(middletest_OBJECTS) $(middletest_LDADD) $(LIBS)
-tests/smash_test.$(OBJEXT): tests/$(am__dirstamp) \
-       tests/$(DEPDIR)/$(am__dirstamp)
+       $(LINK) $(middletest_OBJECTS) $(middletest_LDADD) $(LIBS)
 smashtest$(EXEEXT): $(smashtest_OBJECTS) $(smashtest_DEPENDENCIES) 
        @rm -f smashtest$(EXEEXT)
-       $(LINK) $(smashtest_LDFLAGS) $(smashtest_OBJECTS) $(smashtest_LDADD) $(LIBS)
-tests/test_cpp.$(OBJEXT): tests/$(am__dirstamp) \
-       tests/$(DEPDIR)/$(am__dirstamp)
+       $(LINK) $(smashtest_OBJECTS) $(smashtest_LDADD) $(LIBS)
 test_cpp$(EXEEXT): $(test_cpp_OBJECTS) $(test_cpp_DEPENDENCIES) 
        @rm -f test_cpp$(EXEEXT)
-       $(CXXLINK) $(test_cpp_LDFLAGS) $(test_cpp_OBJECTS) $(test_cpp_LDADD) $(LIBS)
-tests/thread_leak_test.$(OBJEXT): tests/$(am__dirstamp) \
-       tests/$(DEPDIR)/$(am__dirstamp)
+       $(CXXLINK) $(test_cpp_OBJECTS) $(test_cpp_LDADD) $(LIBS)
 threadleaktest$(EXEEXT): $(threadleaktest_OBJECTS) $(threadleaktest_DEPENDENCIES) 
        @rm -f threadleaktest$(EXEEXT)
-       $(LINK) $(threadleaktest_LDFLAGS) $(threadleaktest_OBJECTS) $(threadleaktest_LDADD) $(LIBS)
+       $(LINK) $(threadleaktest_OBJECTS) $(threadleaktest_LDADD) $(LIBS)
+tracetest$(EXEEXT): $(tracetest_OBJECTS) $(tracetest_DEPENDENCIES) 
+       @rm -f tracetest$(EXEEXT)
+       $(LINK) $(tracetest_OBJECTS) $(tracetest_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
-       -rm -f ./atomic_ops.$(OBJEXT)
-       -rm -f ./atomic_ops.lo
-       -rm -f ./atomic_ops_sysdeps.$(OBJEXT)
-       -rm -f ./atomic_ops_sysdeps.lo
-       -rm -f cord/cordbscs.$(OBJEXT)
-       -rm -f cord/cordbscs.lo
-       -rm -f cord/cordprnt.$(OBJEXT)
-       -rm -f cord/cordprnt.lo
-       -rm -f cord/cordtest.$(OBJEXT)
-       -rm -f cord/cordtest.lo
-       -rm -f cord/cordxtra.$(OBJEXT)
-       -rm -f cord/cordxtra.lo
-       -rm -f tests/huge_test.$(OBJEXT)
-       -rm -f tests/leak_test.$(OBJEXT)
-       -rm -f tests/middle.$(OBJEXT)
-       -rm -f tests/smash_test.$(OBJEXT)
-       -rm -f tests/test.$(OBJEXT)
-       -rm -f tests/test_cpp.$(OBJEXT)
-       -rm -f tests/thread_leak_test.$(OBJEXT)
 
 distclean-compile:
        -rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allchblk.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alpha_mach_dep.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops_sysdeps.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backgraph.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blacklst.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checksums.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cordbscs.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cordprnt.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cordtest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cordxtra.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/darwin_stop_world.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbg_mlc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dyn_load.Plo@am__quote@
@@ -800,10 +783,13 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gc_dlopen.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gcj_mlc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/headers.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/huge_test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/leak_test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mallocx.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mark.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mark_rts.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/middle.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/new_hblk.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/obj_map.Plo@am__quote@
@@ -814,113 +800,245 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptr_chck.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/real_malloc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reclaim.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smash_test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc_mach_dep.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/specific.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stubborn.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_cpp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread_leak_test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread_local_alloc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trace_test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/typd_mlc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32_threads.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@cord/$(DEPDIR)/cordbscs.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@cord/$(DEPDIR)/cordprnt.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@cord/$(DEPDIR)/cordtest.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@cord/$(DEPDIR)/cordxtra.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/huge_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/leak_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/middle.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/smash_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_cpp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/thread_leak_test.Po@am__quote@
 
 .S.o:
-       $(CCASCOMPILE) -c $<
+@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCCAS_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@    source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@    DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@        $(CPPASCOMPILE) -c -o $@ $<
 
 .S.obj:
-       $(CCASCOMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCCAS_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@    source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@    DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@        $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+atomic_ops_sysdeps.lo: libatomic_ops/src/atomic_ops_sysdeps.S
+@am__fastdepCCAS_TRUE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT atomic_ops_sysdeps.lo -MD -MP -MF $(DEPDIR)/atomic_ops_sysdeps.Tpo -c -o atomic_ops_sysdeps.lo `test -f 'libatomic_ops/src/atomic_ops_sysdeps.S' || echo '$(srcdir)/'`libatomic_ops/src/atomic_ops_sysdeps.S
+@am__fastdepCCAS_TRUE@ mv -f $(DEPDIR)/atomic_ops_sysdeps.Tpo $(DEPDIR)/atomic_ops_sysdeps.Plo
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@    source='libatomic_ops/src/atomic_ops_sysdeps.S' object='atomic_ops_sysdeps.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@    DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@        $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o atomic_ops_sysdeps.lo `test -f 'libatomic_ops/src/atomic_ops_sysdeps.S' || echo '$(srcdir)/'`libatomic_ops/src/atomic_ops_sysdeps.S
 
 .c.o:
-@am__fastdepCC_TRUE@   depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
 
 .c.obj:
-@am__fastdepCC_TRUE@   depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`; \
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@   then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
-@am__fastdepCC_TRUE@   depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \
-@am__fastdepCC_TRUE@   if $(LTCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@   $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
 
+cordbscs.lo: cord/cordbscs.c
+@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cordbscs.lo -MD -MP -MF $(DEPDIR)/cordbscs.Tpo -c -o cordbscs.lo `test -f 'cord/cordbscs.c' || echo '$(srcdir)/'`cord/cordbscs.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/cordbscs.Tpo $(DEPDIR)/cordbscs.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='cord/cordbscs.c' object='cordbscs.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cordbscs.lo `test -f 'cord/cordbscs.c' || echo '$(srcdir)/'`cord/cordbscs.c
+
+cordprnt.lo: cord/cordprnt.c
+@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cordprnt.lo -MD -MP -MF $(DEPDIR)/cordprnt.Tpo -c -o cordprnt.lo `test -f 'cord/cordprnt.c' || echo '$(srcdir)/'`cord/cordprnt.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/cordprnt.Tpo $(DEPDIR)/cordprnt.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='cord/cordprnt.c' object='cordprnt.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cordprnt.lo `test -f 'cord/cordprnt.c' || echo '$(srcdir)/'`cord/cordprnt.c
+
+cordtest.lo: cord/cordtest.c
+@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cordtest.lo -MD -MP -MF $(DEPDIR)/cordtest.Tpo -c -o cordtest.lo `test -f 'cord/cordtest.c' || echo '$(srcdir)/'`cord/cordtest.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/cordtest.Tpo $(DEPDIR)/cordtest.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='cord/cordtest.c' object='cordtest.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cordtest.lo `test -f 'cord/cordtest.c' || echo '$(srcdir)/'`cord/cordtest.c
+
+cordxtra.lo: cord/cordxtra.c
+@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cordxtra.lo -MD -MP -MF $(DEPDIR)/cordxtra.Tpo -c -o cordxtra.lo `test -f 'cord/cordxtra.c' || echo '$(srcdir)/'`cord/cordxtra.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/cordxtra.Tpo $(DEPDIR)/cordxtra.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='cord/cordxtra.c' object='cordxtra.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cordxtra.lo `test -f 'cord/cordxtra.c' || echo '$(srcdir)/'`cord/cordxtra.c
+
+atomic_ops.lo: libatomic_ops/src/atomic_ops.c
+@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atomic_ops.lo -MD -MP -MF $(DEPDIR)/atomic_ops.Tpo -c -o atomic_ops.lo `test -f 'libatomic_ops/src/atomic_ops.c' || echo '$(srcdir)/'`libatomic_ops/src/atomic_ops.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/atomic_ops.Tpo $(DEPDIR)/atomic_ops.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='libatomic_ops/src/atomic_ops.c' object='atomic_ops.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atomic_ops.lo `test -f 'libatomic_ops/src/atomic_ops.c' || echo '$(srcdir)/'`libatomic_ops/src/atomic_ops.c
+
+test.o: tests/test.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test.o -MD -MP -MF $(DEPDIR)/test.Tpo -c -o test.o `test -f 'tests/test.c' || echo '$(srcdir)/'`tests/test.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/test.Tpo $(DEPDIR)/test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tests/test.c' object='test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test.o `test -f 'tests/test.c' || echo '$(srcdir)/'`tests/test.c
+
+test.obj: tests/test.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test.obj -MD -MP -MF $(DEPDIR)/test.Tpo -c -o test.obj `if test -f 'tests/test.c'; then $(CYGPATH_W) 'tests/test.c'; else $(CYGPATH_W) '$(srcdir)/tests/test.c'; fi`
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/test.Tpo $(DEPDIR)/test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tests/test.c' object='test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test.obj `if test -f 'tests/test.c'; then $(CYGPATH_W) 'tests/test.c'; else $(CYGPATH_W) '$(srcdir)/tests/test.c'; fi`
+
+huge_test.o: tests/huge_test.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT huge_test.o -MD -MP -MF $(DEPDIR)/huge_test.Tpo -c -o huge_test.o `test -f 'tests/huge_test.c' || echo '$(srcdir)/'`tests/huge_test.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/huge_test.Tpo $(DEPDIR)/huge_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tests/huge_test.c' object='huge_test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o huge_test.o `test -f 'tests/huge_test.c' || echo '$(srcdir)/'`tests/huge_test.c
+
+huge_test.obj: tests/huge_test.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT huge_test.obj -MD -MP -MF $(DEPDIR)/huge_test.Tpo -c -o huge_test.obj `if test -f 'tests/huge_test.c'; then $(CYGPATH_W) 'tests/huge_test.c'; else $(CYGPATH_W) '$(srcdir)/tests/huge_test.c'; fi`
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/huge_test.Tpo $(DEPDIR)/huge_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tests/huge_test.c' object='huge_test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o huge_test.obj `if test -f 'tests/huge_test.c'; then $(CYGPATH_W) 'tests/huge_test.c'; else $(CYGPATH_W) '$(srcdir)/tests/huge_test.c'; fi`
+
+leak_test.o: tests/leak_test.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT leak_test.o -MD -MP -MF $(DEPDIR)/leak_test.Tpo -c -o leak_test.o `test -f 'tests/leak_test.c' || echo '$(srcdir)/'`tests/leak_test.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/leak_test.Tpo $(DEPDIR)/leak_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tests/leak_test.c' object='leak_test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o leak_test.o `test -f 'tests/leak_test.c' || echo '$(srcdir)/'`tests/leak_test.c
+
+leak_test.obj: tests/leak_test.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT leak_test.obj -MD -MP -MF $(DEPDIR)/leak_test.Tpo -c -o leak_test.obj `if test -f 'tests/leak_test.c'; then $(CYGPATH_W) 'tests/leak_test.c'; else $(CYGPATH_W) '$(srcdir)/tests/leak_test.c'; fi`
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/leak_test.Tpo $(DEPDIR)/leak_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tests/leak_test.c' object='leak_test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o leak_test.obj `if test -f 'tests/leak_test.c'; then $(CYGPATH_W) 'tests/leak_test.c'; else $(CYGPATH_W) '$(srcdir)/tests/leak_test.c'; fi`
+
+middle.o: tests/middle.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT middle.o -MD -MP -MF $(DEPDIR)/middle.Tpo -c -o middle.o `test -f 'tests/middle.c' || echo '$(srcdir)/'`tests/middle.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/middle.Tpo $(DEPDIR)/middle.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tests/middle.c' object='middle.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o middle.o `test -f 'tests/middle.c' || echo '$(srcdir)/'`tests/middle.c
+
+middle.obj: tests/middle.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT middle.obj -MD -MP -MF $(DEPDIR)/middle.Tpo -c -o middle.obj `if test -f 'tests/middle.c'; then $(CYGPATH_W) 'tests/middle.c'; else $(CYGPATH_W) '$(srcdir)/tests/middle.c'; fi`
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/middle.Tpo $(DEPDIR)/middle.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tests/middle.c' object='middle.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o middle.obj `if test -f 'tests/middle.c'; then $(CYGPATH_W) 'tests/middle.c'; else $(CYGPATH_W) '$(srcdir)/tests/middle.c'; fi`
+
+smash_test.o: tests/smash_test.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT smash_test.o -MD -MP -MF $(DEPDIR)/smash_test.Tpo -c -o smash_test.o `test -f 'tests/smash_test.c' || echo '$(srcdir)/'`tests/smash_test.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/smash_test.Tpo $(DEPDIR)/smash_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tests/smash_test.c' object='smash_test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o smash_test.o `test -f 'tests/smash_test.c' || echo '$(srcdir)/'`tests/smash_test.c
+
+smash_test.obj: tests/smash_test.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT smash_test.obj -MD -MP -MF $(DEPDIR)/smash_test.Tpo -c -o smash_test.obj `if test -f 'tests/smash_test.c'; then $(CYGPATH_W) 'tests/smash_test.c'; else $(CYGPATH_W) '$(srcdir)/tests/smash_test.c'; fi`
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/smash_test.Tpo $(DEPDIR)/smash_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tests/smash_test.c' object='smash_test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o smash_test.obj `if test -f 'tests/smash_test.c'; then $(CYGPATH_W) 'tests/smash_test.c'; else $(CYGPATH_W) '$(srcdir)/tests/smash_test.c'; fi`
+
+thread_leak_test.o: tests/thread_leak_test.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT thread_leak_test.o -MD -MP -MF $(DEPDIR)/thread_leak_test.Tpo -c -o thread_leak_test.o `test -f 'tests/thread_leak_test.c' || echo '$(srcdir)/'`tests/thread_leak_test.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/thread_leak_test.Tpo $(DEPDIR)/thread_leak_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tests/thread_leak_test.c' object='thread_leak_test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o thread_leak_test.o `test -f 'tests/thread_leak_test.c' || echo '$(srcdir)/'`tests/thread_leak_test.c
+
+thread_leak_test.obj: tests/thread_leak_test.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT thread_leak_test.obj -MD -MP -MF $(DEPDIR)/thread_leak_test.Tpo -c -o thread_leak_test.obj `if test -f 'tests/thread_leak_test.c'; then $(CYGPATH_W) 'tests/thread_leak_test.c'; else $(CYGPATH_W) '$(srcdir)/tests/thread_leak_test.c'; fi`
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/thread_leak_test.Tpo $(DEPDIR)/thread_leak_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tests/thread_leak_test.c' object='thread_leak_test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o thread_leak_test.obj `if test -f 'tests/thread_leak_test.c'; then $(CYGPATH_W) 'tests/thread_leak_test.c'; else $(CYGPATH_W) '$(srcdir)/tests/thread_leak_test.c'; fi`
+
+trace_test.o: tests/trace_test.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT trace_test.o -MD -MP -MF $(DEPDIR)/trace_test.Tpo -c -o trace_test.o `test -f 'tests/trace_test.c' || echo '$(srcdir)/'`tests/trace_test.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/trace_test.Tpo $(DEPDIR)/trace_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tests/trace_test.c' object='trace_test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o trace_test.o `test -f 'tests/trace_test.c' || echo '$(srcdir)/'`tests/trace_test.c
+
+trace_test.obj: tests/trace_test.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT trace_test.obj -MD -MP -MF $(DEPDIR)/trace_test.Tpo -c -o trace_test.obj `if test -f 'tests/trace_test.c'; then $(CYGPATH_W) 'tests/trace_test.c'; else $(CYGPATH_W) '$(srcdir)/tests/trace_test.c'; fi`
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/trace_test.Tpo $(DEPDIR)/trace_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tests/trace_test.c' object='trace_test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o trace_test.obj `if test -f 'tests/trace_test.c'; then $(CYGPATH_W) 'tests/trace_test.c'; else $(CYGPATH_W) '$(srcdir)/tests/trace_test.c'; fi`
+
 .cc.o:
-@am__fastdepCXX_TRUE@  depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \
-@am__fastdepCXX_TRUE@  if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \
-@am__fastdepCXX_TRUE@  then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
+@am__fastdepCXX_TRUE@  $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
 
 .cc.obj:
-@am__fastdepCXX_TRUE@  depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`; \
-@am__fastdepCXX_TRUE@  if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCXX_TRUE@  then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
+@am__fastdepCXX_TRUE@  $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .cc.lo:
-@am__fastdepCXX_TRUE@  depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \
-@am__fastdepCXX_TRUE@  if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \
-@am__fastdepCXX_TRUE@  then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi
+@am__fastdepCXX_TRUE@  $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
 
+test_cpp.o: tests/test_cpp.cc
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_cpp.o -MD -MP -MF $(DEPDIR)/test_cpp.Tpo -c -o test_cpp.o `test -f 'tests/test_cpp.cc' || echo '$(srcdir)/'`tests/test_cpp.cc
+@am__fastdepCXX_TRUE@  mv -f $(DEPDIR)/test_cpp.Tpo $(DEPDIR)/test_cpp.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='tests/test_cpp.cc' object='test_cpp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_cpp.o `test -f 'tests/test_cpp.cc' || echo '$(srcdir)/'`tests/test_cpp.cc
+
+test_cpp.obj: tests/test_cpp.cc
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_cpp.obj -MD -MP -MF $(DEPDIR)/test_cpp.Tpo -c -o test_cpp.obj `if test -f 'tests/test_cpp.cc'; then $(CYGPATH_W) 'tests/test_cpp.cc'; else $(CYGPATH_W) '$(srcdir)/tests/test_cpp.cc'; fi`
+@am__fastdepCXX_TRUE@  mv -f $(DEPDIR)/test_cpp.Tpo $(DEPDIR)/test_cpp.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='tests/test_cpp.cc' object='test_cpp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_cpp.obj `if test -f 'tests/test_cpp.cc'; then $(CYGPATH_W) 'tests/test_cpp.cc'; else $(CYGPATH_W) '$(srcdir)/tests/test_cpp.cc'; fi`
+
 .s.o:
-       $(CCASCOMPILE) -c $<
+       $(CCASCOMPILE) -c -o $@ $<
 
 .s.obj:
-       $(CCASCOMPILE) -c `$(CYGPATH_W) '$<'`
+       $(CCASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 mostlyclean-libtool:
        -rm -f *.lo
 
 clean-libtool:
        -rm -rf .libs _libs
-       -rm -rf cord/.libs cord/_libs
 
 distclean-libtool:
-       -rm -f libtool
-uninstall-info-am:
-install-dist_pkgconfigDATA: $(dist_pkgconfig_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
-       @list='$(dist_pkgconfig_DATA)'; for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(dist_pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
-         $(dist_pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
-       done
-
-uninstall-dist_pkgconfigDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(dist_pkgconfig_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
-       done
+       -rm -f libtool config.lt
 install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)"
+       test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
        @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
@@ -935,9 +1053,26 @@ uninstall-dist_pkgdataDATA:
          echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
          rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
        done
+install-pkgconfigDATA: $(pkgconfig_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+       @list='$(pkgconfig_DATA)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f=$(am__strip_dir) \
+         echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+         $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+       done
+
+uninstall-pkgconfigDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pkgconfig_DATA)'; for p in $$list; do \
+         f=$(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+       done
 install-includeHEADERS: $(include_HEADERS)
        @$(NORMAL_INSTALL)
-       test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
+       test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
        @list='$(include_HEADERS)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
@@ -954,7 +1089,7 @@ uninstall-includeHEADERS:
        done
 install-pkgincludeHEADERS: $(pkginclude_HEADERS)
        @$(NORMAL_INSTALL)
-       test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)"
+       test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
        @list='$(pkginclude_HEADERS)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          f=$(am__strip_dir) \
@@ -1001,8 +1136,7 @@ $(RECURSIVE_TARGETS):
          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
        fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
+$(RECURSIVE_CLEAN_TARGETS):
        @failcom='exit 1'; \
        for f in x $$MAKEFLAGS; do \
          case $$f in \
@@ -1046,8 +1180,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
        mkid -fID $$unique
 tags: TAGS
 
@@ -1072,8 +1206,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
        if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -1083,13 +1217,12 @@ ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
        tags=; \
-       here=`pwd`; \
        list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
        test -z "$(CTAGS_ARGS)$$tags$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
             $$tags $$unique
@@ -1105,7 +1238,7 @@ distclean-tags:
 check-TESTS: $(TESTS)
        @failed=0; all=0; xfail=0; xpass=0; skip=0; \
        srcdir=$(srcdir); export srcdir; \
-       list='$(TESTS)'; \
+       list=' $(TESTS) '; \
        if test -n "$$list"; then \
          for tst in $$list; do \
            if test -f ./$$tst; then dir=./; \
@@ -1114,7 +1247,7 @@ check-TESTS: $(TESTS)
            if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
              all=`expr $$all + 1`; \
              case " $(XFAIL_TESTS) " in \
-             *" $$tst "*) \
+             *[\ \     ]$$tst[\ \      ]*) \
                xpass=`expr $$xpass + 1`; \
                failed=`expr $$failed + 1`; \
                echo "XPASS: $$tst"; \
@@ -1126,7 +1259,7 @@ check-TESTS: $(TESTS)
            elif test $$? -ne 77; then \
              all=`expr $$all + 1`; \
              case " $(XFAIL_TESTS) " in \
-             *" $$tst "*) \
+             *[\ \     ]$$tst[\ \      ]*) \
                xfail=`expr $$xfail + 1`; \
                echo "XFAIL: $$tst"; \
              ;; \
@@ -1140,23 +1273,36 @@ check-TESTS: $(TESTS)
              echo "SKIP: $$tst"; \
            fi; \
          done; \
+         if test "$$all" -eq 1; then \
+           tests="test"; \
+           All=""; \
+         else \
+           tests="tests"; \
+           All="All "; \
+         fi; \
          if test "$$failed" -eq 0; then \
            if test "$$xfail" -eq 0; then \
-             banner="All $$all tests passed"; \
+             banner="$$All$$all $$tests passed"; \
            else \
-             banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+             if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+             banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
            fi; \
          else \
            if test "$$xpass" -eq 0; then \
-             banner="$$failed of $$all tests failed"; \
+             banner="$$failed of $$all $$tests failed"; \
            else \
-             banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+             if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+             banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
            fi; \
          fi; \
          dashes="$$banner"; \
          skipped=""; \
          if test "$$skip" -ne 0; then \
-           skipped="($$skip tests were not run)"; \
+           if test "$$skip" -eq 1; then \
+             skipped="($$skip test was not run)"; \
+           else \
+             skipped="($$skip tests were not run)"; \
+           fi; \
            test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
              dashes="$$skipped"; \
          fi; \
@@ -1177,24 +1323,22 @@ check-TESTS: $(TESTS)
 
 distdir: $(DISTFILES)
        $(am__remove_distdir)
-       mkdir $(distdir)
-       $(mkdir_p) $(distdir)/. $(distdir)/Mac_files $(distdir)/cord $(distdir)/doc $(distdir)/include $(distdir)/include/extra $(distdir)/include/private $(distdir)/tests
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       test -d $(distdir) || mkdir $(distdir)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
@@ -1208,7 +1352,7 @@ distdir: $(DISTFILES)
        list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test -d "$(distdir)/$$subdir" \
-           || $(mkdir_p) "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
            || exit 1; \
            distdir=`$(am__cd) $(distdir) && pwd`; \
            top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -1216,6 +1360,8 @@ distdir: $(DISTFILES)
              $(MAKE) $(AM_MAKEFLAGS) \
                top_distdir="$$top_distdir" \
                distdir="$$distdir/$$subdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
                distdir) \
              || exit 1; \
          fi; \
@@ -1223,7 +1369,7 @@ distdir: $(DISTFILES)
        -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+         ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
        || chmod -R a+r $(distdir)
 dist-gzip: distdir
        tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
@@ -1232,6 +1378,10 @@ dist-bzip2: distdir
        tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
        $(am__remove_distdir)
 
+dist-lzma: distdir
+       tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+       $(am__remove_distdir)
+
 dist-tarZ: distdir
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
        $(am__remove_distdir)
@@ -1259,6 +1409,8 @@ distcheck: dist
          GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
          bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.lzma*) \
+         unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
@@ -1298,7 +1450,7 @@ distcheck: dist
        $(am__remove_distdir)
        @(echo "$(distdir) archives ready for distribution: "; \
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-         sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+         sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
        @cd $(distuninstallcheck_dir) \
        && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@@ -1324,8 +1476,8 @@ check: check-recursive
 all-am: Makefile $(LTLIBRARIES) $(SCRIPTS) $(DATA) $(HEADERS)
 installdirs: installdirs-recursive
 installdirs-am:
-       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(pkgincludedir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(pkgincludedir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-recursive
 install-exec: install-exec-recursive
@@ -1347,12 +1499,6 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-       -rm -f ./$(am__dirstamp)
-       -rm -f cord/$(DEPDIR)/$(am__dirstamp)
-       -rm -f cord/$(am__dirstamp)
-       -rm -f tests/$(DEPDIR)/$(am__dirstamp)
-       -rm -f tests/$(am__dirstamp)
-       -test -z "$(DEPDIR)/$(am__dirstamp)" || rm -f $(DEPDIR)/$(am__dirstamp)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -1364,10 +1510,10 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
 
 distclean: distclean-recursive
        -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-       -rm -rf ./$(DEPDIR) cord/$(DEPDIR) tests/$(DEPDIR)
+       -rm -rf ./$(DEPDIR)
        -rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-libtool distclean-tags
+       distclean-hdr distclean-libtool distclean-tags
 
 dvi: dvi-recursive
 
@@ -1379,21 +1525,29 @@ info: info-recursive
 
 info-am:
 
-install-data-am: install-dist_pkgconfigDATA install-dist_pkgdataDATA \
-       install-includeHEADERS install-pkgincludeHEADERS
+install-data-am: install-dist_pkgdataDATA install-includeHEADERS \
+       install-pkgconfigDATA install-pkgincludeHEADERS
+
+install-dvi: install-dvi-recursive
 
 install-exec-am: install-libLTLIBRARIES
 
+install-html: install-html-recursive
+
 install-info: install-info-recursive
 
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
        -rm -f $(am__CONFIG_DISTCLEAN_FILES)
        -rm -rf $(top_srcdir)/autom4te.cache
-       -rm -rf ./$(DEPDIR) cord/$(DEPDIR) tests/$(DEPDIR)
+       -rm -rf ./$(DEPDIR)
        -rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -1410,32 +1564,35 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-dist_pkgconfigDATA uninstall-dist_pkgdataDATA \
-       uninstall-includeHEADERS uninstall-info-am \
-       uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
-       check-TESTS check-am clean clean-checkPROGRAMS clean-generic \
-       clean-libLTLIBRARIES clean-libtool clean-recursive ctags \
-       ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
-       dist-tarZ dist-zip distcheck distclean distclean-compile \
-       distclean-generic distclean-libtool distclean-recursive \
-       distclean-tags distcleancheck distdir distuninstallcheck dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-dist_pkgconfigDATA \
-       install-dist_pkgdataDATA install-exec install-exec-am \
+uninstall-am: uninstall-dist_pkgdataDATA uninstall-includeHEADERS \
+       uninstall-libLTLIBRARIES uninstall-pkgconfigDATA \
+       uninstall-pkgincludeHEADERS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+       install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am am--refresh check check-TESTS check-am clean \
+       clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
+       clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
+       dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \
+       distclean distclean-compile distclean-generic distclean-hdr \
+       distclean-libtool distclean-tags distcleancheck distdir \
+       distuninstallcheck dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am \
+       install-dist_pkgdataDATA install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
        install-includeHEADERS install-info install-info-am \
-       install-libLTLIBRARIES install-man install-pkgincludeHEADERS \
-       install-strip installcheck installcheck-am installdirs \
-       installdirs-am maintainer-clean maintainer-clean-generic \
-       maintainer-clean-recursive mostlyclean mostlyclean-compile \
-       mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
-       pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
-       uninstall-dist_pkgconfigDATA uninstall-dist_pkgdataDATA \
-       uninstall-includeHEADERS uninstall-info-am \
-       uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS
+       install-libLTLIBRARIES install-man install-pdf install-pdf-am \
+       install-pkgconfigDATA install-pkgincludeHEADERS install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs installdirs-am maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags tags-recursive uninstall uninstall-am \
+       uninstall-dist_pkgdataDATA uninstall-includeHEADERS \
+       uninstall-libLTLIBRARIES uninstall-pkgconfigDATA \
+       uninstall-pkgincludeHEADERS
 
 .s.lo:
        $(LTCOMPILE) $(ASM_CPP_OPTIONS) -c $<
@@ -1444,7 +1601,7 @@ uninstall-info: uninstall-info-recursive
        $(LTCOMPILE) $(ASM_CPP_OPTIONS) -c $<
 
 #
-# :GOTCHA: GNU make rule for making .s out of .S is flawed, 
+# :GOTCHA: GNU make rule for making .s out of .S is flawed,
 # it will not remove dest if building fails
 .S.s:
        if $(CPP) $< >$@ ; then :; else rm -f $@; fi
index c8739effc6b89390d3d375b2bb39277f153e2b65..e4100b517f77c806bb4181b48db50a1dffa82466 100644 (file)
@@ -6,15 +6,15 @@ MY_CPU=X86
 CPU=$(MY_CPU)
 !include <ntwin32.mak>
 
-OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj malloc.obj stubborn.obj dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj msvc_dbg.obj
+OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj malloc.obj stubborn.obj dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj extra\msvc_dbg.obj
 
 all: gctest.exe cord\de.exe test_cpp.exe
 
 .c.obj:
-       $(cc) $(cdebug) $(cflags) $(cvars) -Iinclude -DALL_INTERIOR_POINTERS -D__STDC__ -DGC_NOT_DLL -DGC_BUILD $*.c /Fo$*.obj
+       $(cc) $(cdebug) $(cflags) $(cvars) -Iinclude -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -D_CRT_SECURE_NO_DEPRECATE $*.c /Fo$*.obj
 
 .cpp.obj:
-       $(cc) $(cdebug) $(cflags) $(cvars) -Iinclude -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -DGC_BUILD $*.CPP /Fo$*.obj
+       $(cc) $(cdebug) $(cflags) $(cvars) -Iinclude -DALL_INTERIOR_POINTERS -DGC_NOT_DLL $*.CPP /Fo$*.obj
 
 $(OBJS) tests\test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h include\private\gc_locks.h include\private\gc_pmark.h include\gc_mark.h include\private\msvc_dbg.h
 
index d0f912751e9c744ed55130c385826b5055ddefce..69a9c5b8a30e9a2b4c9e4e01f2f211bdd9b50e78 100644 (file)
@@ -15,19 +15,18 @@ CPU=$(MY_CPU)
 # should do, since we only need the headers.
 # We assume this was manually unpacked, since I'm not sure there is
 # a Windows standard command line tool to do this.
-AO_VERSION=1.2
-AO_SRC_DIR=libatomic_ops-$(AO_VERSION)/src
+AO_SRC_DIR=libatomic_ops/src
 AO_INCLUDE_DIR=$(AO_SRC_DIR)
 
-OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj malloc.obj stubborn.obj dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj win32_threads.obj msvc_dbg.obj thread_local_alloc.obj
+OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj malloc.obj stubborn.obj dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj win32_threads.obj extra\msvc_dbg.obj thread_local_alloc.obj
 
 all: gctest.exe cord\de.exe test_cpp.exe
 
 .c.obj:
-       $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -D__STDC__ -DGC_NOT_DLL -DGC_WIN32_THREADS -DTHREAD_LOCAL_ALLOC $*.c /Fo$*.obj
+       $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -DGC_THREADS -DTHREAD_LOCAL_ALLOC -D_CRT_SECURE_NO_DEPRECATE $*.c /Fo$*.obj
 
 .cpp.obj:
-       $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL $*.CPP -DGC_WIN32_THREADS -DTHREAD_LOCAL_ALLOC /Fo$*.obj
+       $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL $*.CPP -DGC_THREADS -DTHREAD_LOCAL_ALLOC /Fo$*.obj
 
 $(OBJS) tests\test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h include\private\gc_locks.h include\private\gc_pmark.h include\gc_mark.h include\private\msvc_dbg.h
 
diff --git a/src/mm/boehm-gc/NT_THREADS_MAKEFILE b/src/mm/boehm-gc/NT_THREADS_MAKEFILE
deleted file mode 100644 (file)
index 5c02c90..0000000
+++ /dev/null
@@ -1,2220 +0,0 @@
-# Microsoft Developer Studio Generated NMAKE File, Format Version 4.10
-# This has been hand-edited way too many times.
-# A clean, manually generated makefile would be an improvement.
-
-# TARGTYPE "Win32 (x86) Application" 0x0101
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-AO_VERSION=1.2
-!IF "$(CFG)" == ""
-CFG=gctest - Win32 Release
-!MESSAGE No configuration specified.  Defaulting to cord - Win32 Debug.
-!ENDIF 
-
-!IF "$(CFG)" != "gc - Win32 Release" && "$(CFG)" != "gc - Win32 Debug" &&\
- "$(CFG)" != "gctest - Win32 Release" && "$(CFG)" != "gctest - Win32 Debug" &&\
- "$(CFG)" != "cord - Win32 Release" && "$(CFG)" != "cord - Win32 Debug"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE on this makefile
-!MESSAGE by defining the macro CFG on the command line.  For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "gc.mak" CFG="cord - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "gc - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "gc - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "gctest - Win32 Release" (based on "Win32 (x86) Application")
-!MESSAGE "gctest - Win32 Debug" (based on "Win32 (x86) Application")
-!MESSAGE "cord - Win32 Release" (based on "Win32 (x86) Application")
-!MESSAGE "cord - Win32 Debug" (based on "Win32 (x86) Application")
-!MESSAGE 
-!ERROR An invalid configuration is specified.
-!ENDIF 
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE 
-NULL=nul
-!ENDIF 
-################################################################################
-# Begin Project
-# PROP Target_Last_Scanned "gctest - Win32 Debug"
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-OUTDIR=.\Release
-INTDIR=.\Release
-
-ALL : ".\Release\gc.dll" ".\Release\gc.bsc"
-
-CLEAN : 
-       -@erase ".\Release\allchblk.obj"
-       -@erase ".\Release\allchblk.sbr"
-       -@erase ".\Release\alloc.obj"
-       -@erase ".\Release\alloc.sbr"
-       -@erase ".\Release\blacklst.obj"
-       -@erase ".\Release\blacklst.sbr"
-       -@erase ".\Release\checksums.obj"
-       -@erase ".\Release\checksums.sbr"
-       -@erase ".\Release\dbg_mlc.obj"
-       -@erase ".\Release\dbg_mlc.sbr"
-       -@erase ".\Release\dyn_load.obj"
-       -@erase ".\Release\dyn_load.sbr"
-       -@erase ".\Release\finalize.obj"
-       -@erase ".\Release\finalize.sbr"
-       -@erase ".\Release\gc.bsc"
-       -@erase ".\Release\gc_cpp.obj"
-       -@erase ".\Release\gc_cpp.sbr"
-       -@erase ".\Release\gc.dll"
-       -@erase ".\Release\gc.exp"
-       -@erase ".\Release\gc.lib"
-       -@erase ".\Release\headers.obj"
-       -@erase ".\Release\headers.sbr"
-       -@erase ".\Release\mach_dep.obj"
-       -@erase ".\Release\mach_dep.sbr"
-       -@erase ".\Release\malloc.obj"
-       -@erase ".\Release\malloc.sbr"
-       -@erase ".\Release\mallocx.obj"
-       -@erase ".\Release\mallocx.sbr"
-       -@erase ".\Release\mark.obj"
-       -@erase ".\Release\mark.sbr"
-       -@erase ".\Release\mark_rts.obj"
-       -@erase ".\Release\mark_rts.sbr"
-       -@erase ".\Release\misc.obj"
-       -@erase ".\Release\misc.sbr"
-       -@erase ".\Release\new_hblk.obj"
-       -@erase ".\Release\new_hblk.sbr"
-       -@erase ".\Release\obj_map.obj"
-       -@erase ".\Release\obj_map.sbr"
-       -@erase ".\Release\os_dep.obj"
-       -@erase ".\Release\os_dep.sbr"
-       -@erase ".\Release\ptr_chck.obj"
-       -@erase ".\Release\ptr_chck.sbr"
-       -@erase ".\Release\reclaim.obj"
-       -@erase ".\Release\reclaim.sbr"
-       -@erase ".\Release\stubborn.obj"
-       -@erase ".\Release\stubborn.sbr"
-       -@erase ".\Release\typd_mlc.obj"
-       -@erase ".\Release\typd_mlc.sbr"
-       -@erase ".\Release\win32_threads.obj"
-       -@erase ".\Release\win32_threads.sbr"
-       -@erase ".\Release\msvc_dbg.obj"
-       -@erase ".\Release\msvc_dbg.sbr"
-
-"$(OUTDIR)" :
-    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I include /D "NDEBUG" /D "GC_BUILD" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "GC_WIN32_THREADS" /FR /YX /c
-CPP_PROJ=/nologo /MD /W3 /GX /O2 /I include /D "NDEBUG" /D "GC_BUILD" /D\
- "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D\
- "GC_WIN32_THREADS" /FR"$(INTDIR)/" /Fp"$(INTDIR)/gc.pch" \
- /Ilibatomic_ops-$(AO_VERSION)/src /YX /Fo"$(INTDIR)/" /c 
-CPP_OBJS=.\Release/
-CPP_SBRS=.\Release/
-
-.c{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.c{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-MTL=mktyplib.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /win32
-MTL_PROJ=/nologo /D "NDEBUG" /win32 
-RSC=rc.exe
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/gc.bsc" 
-BSC32_SBRS= \
-       ".\Release\allchblk.sbr" \
-       ".\Release\alloc.sbr" \
-       ".\Release\blacklst.sbr" \
-       ".\Release\checksums.sbr" \
-       ".\Release\dbg_mlc.sbr" \
-       ".\Release\dyn_load.sbr" \
-       ".\Release\finalize.sbr" \
-       ".\Release\gc_cpp.sbr" \
-       ".\Release\headers.sbr" \
-       ".\Release\mach_dep.sbr" \
-       ".\Release\malloc.sbr" \
-       ".\Release\mallocx.sbr" \
-       ".\Release\mark.sbr" \
-       ".\Release\mark_rts.sbr" \
-       ".\Release\misc.sbr" \
-       ".\Release\new_hblk.sbr" \
-       ".\Release\obj_map.sbr" \
-       ".\Release\os_dep.sbr" \
-       ".\Release\ptr_chck.sbr" \
-       ".\Release\reclaim.sbr" \
-       ".\Release\stubborn.sbr" \
-       ".\Release\typd_mlc.sbr" \
-       ".\Release\msvc_dbg.sbr" \
-       ".\Release\win32_threads.sbr"
-
-".\Release\gc.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
-    $(BSC32) @<<
-  $(BSC32_FLAGS) $(BSC32_SBRS)
-<<
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
- advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
- odbccp32.lib /nologo /subsystem:windows /dll /incremental:no\
- /pdb:"$(OUTDIR)/gc.pdb" /machine:I386 /out:"$(OUTDIR)/gc.dll"\
- /implib:"$(OUTDIR)/gc.lib" 
-LINK32_OBJS= \
-       ".\Release\allchblk.obj" \
-       ".\Release\alloc.obj" \
-       ".\Release\blacklst.obj" \
-       ".\Release\checksums.obj" \
-       ".\Release\dbg_mlc.obj" \
-       ".\Release\dyn_load.obj" \
-       ".\Release\finalize.obj" \
-       ".\Release\gc_cpp.obj" \
-       ".\Release\headers.obj" \
-       ".\Release\mach_dep.obj" \
-       ".\Release\malloc.obj" \
-       ".\Release\mallocx.obj" \
-       ".\Release\mark.obj" \
-       ".\Release\mark_rts.obj" \
-       ".\Release\misc.obj" \
-       ".\Release\new_hblk.obj" \
-       ".\Release\obj_map.obj" \
-       ".\Release\os_dep.obj" \
-       ".\Release\ptr_chck.obj" \
-       ".\Release\reclaim.obj" \
-       ".\Release\stubborn.obj" \
-       ".\Release\typd_mlc.obj" \
-       ".\Release\msvc_dbg.obj" \
-       ".\Release\win32_threads.obj"
-
-".\Release\gc.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
-    $(LINK32) @<<
-  $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-OUTDIR=.\Debug
-INTDIR=.\Debug
-
-ALL : ".\Debug\gc.dll" ".\Debug\gc.bsc"
-
-CLEAN : 
-       -@erase ".\Debug\allchblk.obj"
-       -@erase ".\Debug\allchblk.sbr"
-       -@erase ".\Debug\alloc.obj"
-       -@erase ".\Debug\alloc.sbr"
-       -@erase ".\Debug\blacklst.obj"
-       -@erase ".\Debug\blacklst.sbr"
-       -@erase ".\Debug\checksums.obj"
-       -@erase ".\Debug\checksums.sbr"
-       -@erase ".\Debug\dbg_mlc.obj"
-       -@erase ".\Debug\dbg_mlc.sbr"
-       -@erase ".\Debug\dyn_load.obj"
-       -@erase ".\Debug\dyn_load.sbr"
-       -@erase ".\Debug\finalize.obj"
-       -@erase ".\Debug\finalize.sbr"
-       -@erase ".\Debug\gc_cpp.obj"
-       -@erase ".\Debug\gc_cpp.sbr"
-       -@erase ".\Debug\gc.bsc"
-       -@erase ".\Debug\gc.dll"
-       -@erase ".\Debug\gc.exp"
-       -@erase ".\Debug\gc.lib"
-       -@erase ".\Debug\gc.map"
-       -@erase ".\Debug\gc.pdb"
-       -@erase ".\Debug\headers.obj"
-       -@erase ".\Debug\headers.sbr"
-       -@erase ".\Debug\mach_dep.obj"
-       -@erase ".\Debug\mach_dep.sbr"
-       -@erase ".\Debug\malloc.obj"
-       -@erase ".\Debug\malloc.sbr"
-       -@erase ".\Debug\mallocx.obj"
-       -@erase ".\Debug\mallocx.sbr"
-       -@erase ".\Debug\mark.obj"
-       -@erase ".\Debug\mark.sbr"
-       -@erase ".\Debug\mark_rts.obj"
-       -@erase ".\Debug\mark_rts.sbr"
-       -@erase ".\Debug\misc.obj"
-       -@erase ".\Debug\misc.sbr"
-       -@erase ".\Debug\new_hblk.obj"
-       -@erase ".\Debug\new_hblk.sbr"
-       -@erase ".\Debug\obj_map.obj"
-       -@erase ".\Debug\obj_map.sbr"
-       -@erase ".\Debug\os_dep.obj"
-       -@erase ".\Debug\os_dep.sbr"
-       -@erase ".\Debug\ptr_chck.obj"
-       -@erase ".\Debug\ptr_chck.sbr"
-       -@erase ".\Debug\reclaim.obj"
-       -@erase ".\Debug\reclaim.sbr"
-       -@erase ".\Debug\stubborn.obj"
-       -@erase ".\Debug\stubborn.sbr"
-       -@erase ".\Debug\typd_mlc.obj"
-       -@erase ".\Debug\typd_mlc.sbr"
-       -@erase ".\Debug\vc40.idb"
-       -@erase ".\Debug\vc40.pdb"
-       -@erase ".\Debug\win32_threads.obj"
-       -@erase ".\Debug\win32_threads.sbr"
-       -@erase ".\Debug\msvc_dbg.obj"
-       -@erase ".\Debug\msvc_dbg.sbr"
-
-"$(OUTDIR)" :
-    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I include /D "_DEBUG" /D "GC_BUILD" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "GC_WIN32_THREADS" /FR /YX /c
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I include /D "_DEBUG" /D "GC_BUILD"\
- /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" \
- /D "GC_ASSERTIONS" /D "__STDC__" /D\
- "GC_WIN32_THREADS" /FR"$(INTDIR)/" /Fp"$(INTDIR)/gc.pch" /YX /Fo"$(INTDIR)/"\
- /Ilibatomic_ops-$(AO_VERSION)/src /Fd"$(INTDIR)/" /c 
-CPP_OBJS=.\Debug/
-CPP_SBRS=.\Debug/
-
-.c{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.c{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-MTL=mktyplib.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /win32
-MTL_PROJ=/nologo /D "_DEBUG" /win32 
-RSC=rc.exe
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/gc.bsc" 
-BSC32_SBRS= \
-       ".\Debug\allchblk.sbr" \
-       ".\Debug\alloc.sbr" \
-       ".\Debug\blacklst.sbr" \
-       ".\Debug\checksums.sbr" \
-       ".\Debug\dbg_mlc.sbr" \
-       ".\Debug\dyn_load.sbr" \
-       ".\Debug\finalize.sbr" \
-       ".\Debug\gc_cpp.sbr" \
-       ".\Debug\headers.sbr" \
-       ".\Debug\mach_dep.sbr" \
-       ".\Debug\malloc.sbr" \
-       ".\Debug\mallocx.sbr" \
-       ".\Debug\mark.sbr" \
-       ".\Debug\mark_rts.sbr" \
-       ".\Debug\misc.sbr" \
-       ".\Debug\new_hblk.sbr" \
-       ".\Debug\obj_map.sbr" \
-       ".\Debug\os_dep.sbr" \
-       ".\Debug\ptr_chck.sbr" \
-       ".\Debug\reclaim.sbr" \
-       ".\Debug\stubborn.sbr" \
-       ".\Debug\typd_mlc.sbr" \
-       ".\Debug\msvc_dbg.sbr" \
-       ".\Debug\win32_threads.sbr"
-
-".\Debug\gc.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
-    $(BSC32) @<<
-  $(BSC32_FLAGS) $(BSC32_SBRS)
-<<
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /incremental:no /map /debug /machine:I386
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
- advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
- odbccp32.lib /nologo /subsystem:windows /dll /incremental:no\
- /pdb:"$(OUTDIR)/gc.pdb" /map:"$(INTDIR)/gc.map" /debug /machine:I386\
- /out:"$(OUTDIR)/gc.dll" /implib:"$(OUTDIR)/gc.lib" 
-LINK32_OBJS= \
-       ".\Debug\allchblk.obj" \
-       ".\Debug\alloc.obj" \
-       ".\Debug\blacklst.obj" \
-       ".\Debug\checksums.obj" \
-       ".\Debug\dbg_mlc.obj" \
-       ".\Debug\dyn_load.obj" \
-       ".\Debug\finalize.obj" \
-       ".\Debug\gc_cpp.obj" \
-       ".\Debug\headers.obj" \
-       ".\Debug\mach_dep.obj" \
-       ".\Debug\malloc.obj" \
-       ".\Debug\mallocx.obj" \
-       ".\Debug\mark.obj" \
-       ".\Debug\mark_rts.obj" \
-       ".\Debug\misc.obj" \
-       ".\Debug\new_hblk.obj" \
-       ".\Debug\obj_map.obj" \
-       ".\Debug\os_dep.obj" \
-       ".\Debug\ptr_chck.obj" \
-       ".\Debug\reclaim.obj" \
-       ".\Debug\stubborn.obj" \
-       ".\Debug\typd_mlc.obj" \
-       ".\Debug\msvc_dbg.obj" \
-       ".\Debug\win32_threads.obj"
-
-".\Debug\gc.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
-    $(LINK32) @<<
-  $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF  "$(CFG)" == "gctest - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "gctest\Release"
-# PROP BASE Intermediate_Dir "gctest\Release"
-# PROP BASE Target_Dir "gctest"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "gctest\Release"
-# PROP Intermediate_Dir "gctest\Release"
-# PROP Target_Dir "gctest"
-OUTDIR=.\gctest\Release
-INTDIR=.\gctest\Release
-
-ALL : "gc - Win32 Release" ".\Release\gctest.exe"
-
-CLEAN : 
-       -@erase ".\gctest\Release\test.obj"
-       -@erase ".\Release\gctest.exe"
-
-"$(OUTDIR)" :
-    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-test.c : tests\test.c
-       copy tests\test.c test.c
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I include /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "GC_WIN32_THREADS" /YX /c
-CPP_PROJ=/nologo /MD /W3 /GX /O2 /I include /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D\
- "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "GC_WIN32_THREADS"\
- /Ilibatomic_ops-$(AO_VERSION)/src /Fp"$(INTDIR)/gctest.pch" \
- /YX /Fo"$(INTDIR)/" /c 
-CPP_OBJS=.\gctest\Release/
-CPP_SBRS=.\.
-
-.c{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.c{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-MTL=mktyplib.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /win32
-MTL_PROJ=/nologo /D "NDEBUG" /win32 
-RSC=rc.exe
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/gctest.bsc" 
-BSC32_SBRS= \
-       
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"Release/gctest.exe"
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
- advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
- odbccp32.lib /nologo /subsystem:windows /incremental:no\
- /pdb:"$(OUTDIR)/gctest.pdb" /machine:I386 /out:"Release/gctest.exe" 
-LINK32_OBJS= \
-       ".\gctest\Release\test.obj" \
-       ".\Release\gc.lib"
-
-".\Release\gctest.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
-    $(LINK32) @<<
-  $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF  "$(CFG)" == "gctest - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "gctest\Debug"
-# PROP BASE Intermediate_Dir "gctest\Debug"
-# PROP BASE Target_Dir "gctest"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "gctest\Debug"
-# PROP Intermediate_Dir "gctest\Debug"
-# PROP Target_Dir "gctest"
-OUTDIR=.\gctest\Debug
-INTDIR=.\gctest\Debug
-
-ALL : "gc - Win32 Debug" ".\Debug\gctest.exe" ".\gctest\Debug\gctest.bsc"
-
-CLEAN : 
-       -@erase ".\Debug\gctest.exe"
-       -@erase ".\gctest\Debug\gctest.bsc"
-       -@erase ".\gctest\Debug\gctest.map"
-       -@erase ".\gctest\Debug\gctest.pdb"
-       -@erase ".\gctest\Debug\test.obj"
-       -@erase ".\gctest\Debug\test.sbr"
-       -@erase ".\gctest\Debug\vc40.idb"
-       -@erase ".\gctest\Debug\vc40.pdb"
-
-"$(OUTDIR)" :
-    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "GC_WIN32_THREADS" /FR /YX /c
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I include /D "_DEBUG" /D "WIN32" /D "_WINDOWS"\
- /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "GC_WIN32_THREADS" /FR"$(INTDIR)/"\
- /Ilibatomic_ops-$(AO_VERSION)/src /Fp"$(INTDIR)/gctest.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c 
-CPP_OBJS=.\gctest\Debug/
-CPP_SBRS=.\gctest\Debug/
-
-.c{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.c{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-MTL=mktyplib.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /win32
-MTL_PROJ=/nologo /D "_DEBUG" /win32 
-RSC=rc.exe
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/gctest.bsc" 
-BSC32_SBRS= \
-       ".\gctest\Debug\test.sbr"
-
-".\gctest\Debug\gctest.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
-    $(BSC32) @<<
-  $(BSC32_FLAGS) $(BSC32_SBRS)
-<<
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:no /map /debug /machine:I386 /out:"Debug/gctest.exe"
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
- advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
- odbccp32.lib /nologo /subsystem:windows /incremental:no\
- /pdb:"$(OUTDIR)/gctest.pdb" /map:"$(INTDIR)/gctest.map" /debug /machine:I386\
- /out:"Debug/gctest.exe" 
-LINK32_OBJS= \
-       ".\Debug\gc.lib" \
-       ".\gctest\Debug\test.obj"
-
-".\Debug\gctest.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
-    $(LINK32) @<<
-  $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF  "$(CFG)" == "cord - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "cord\Release"
-# PROP BASE Intermediate_Dir "cord\Release"
-# PROP BASE Target_Dir "cord"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "cord\Release"
-# PROP Intermediate_Dir "cord\Release"
-# PROP Target_Dir "cord"
-OUTDIR=.\cord\Release
-INTDIR=.\cord\Release
-
-ALL : "gc - Win32 Release" ".\Release\de.exe"
-
-CLEAN : 
-       -@erase ".\cord\Release\cordbscs.obj"
-       -@erase ".\cord\Release\cordxtra.obj"
-       -@erase ".\cord\Release\de.obj"
-       -@erase ".\cord\Release\de_win.obj"
-       -@erase ".\cord\Release\de_win.res"
-       -@erase ".\Release\de.exe"
-
-"$(OUTDIR)" :
-    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /YX /c
-CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "." /I include /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D\
- /Ilibatomic_ops-$(AO_VERSION)/src "ALL_INTERIOR_POINTERS" /Fp"$(INTDIR)/cord.pch" /YX /Fo"$(INTDIR)/" /c 
-CPP_OBJS=.\cord\Release/
-CPP_SBRS=.\.
-
-.c{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.c{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-MTL=mktyplib.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /win32
-MTL_PROJ=/nologo /D "NDEBUG" /win32 
-RSC=rc.exe
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-RSC_PROJ=/l 0x809 /fo"$(INTDIR)/de_win.res" /d "NDEBUG" 
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/cord.bsc" 
-BSC32_SBRS= \
-       
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"Release/de.exe"
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
- advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
- odbccp32.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)/de.pdb"\
- /machine:I386 /out:"Release/de.exe" 
-LINK32_OBJS= \
-       ".\cord\Release\cordbscs.obj" \
-       ".\cord\Release\cordxtra.obj" \
-       ".\cord\Release\de.obj" \
-       ".\cord\Release\de_win.obj" \
-       ".\cord\Release\de_win.res" \
-       ".\Release\gc.lib"
-
-".\Release\de.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
-    $(LINK32) @<<
-  $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF  "$(CFG)" == "cord - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "cord\Debug"
-# PROP BASE Intermediate_Dir "cord\Debug"
-# PROP BASE Target_Dir "cord"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "cord\Debug"
-# PROP Intermediate_Dir "cord\Debug"
-# PROP Target_Dir "cord"
-OUTDIR=.\cord\Debug
-INTDIR=.\cord\Debug
-
-ALL : "gc - Win32 Debug" ".\Debug\de.exe"
-
-CLEAN : 
-       -@erase ".\cord\Debug\cordbscs.obj"
-       -@erase ".\cord\Debug\cordxtra.obj"
-       -@erase ".\cord\Debug\de.obj"
-       -@erase ".\cord\Debug\de.pdb"
-       -@erase ".\cord\Debug\de_win.obj"
-       -@erase ".\cord\Debug\de_win.res"
-       -@erase ".\cord\Debug\vc40.idb"
-       -@erase ".\cord\Debug\vc40.pdb"
-       -@erase ".\Debug\de.exe"
-       -@erase ".\Debug\de.ilk"
-
-"$(OUTDIR)" :
-    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /YX /c
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /I include /D "_DEBUG" /D "WIN32" /D\
- "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /Fp"$(INTDIR)/cord.pch" /YX\
- /Ilibatomic_ops-$(AO_VERSION)/src /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c 
-CPP_OBJS=.\cord\Debug/
-CPP_SBRS=.\.
-
-.c{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_OBJS)}.obj:
-   $(CPP) $(CPP_PROJ) $<  
-
-.c{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cpp{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-.cxx{$(CPP_SBRS)}.sbr:
-   $(CPP) $(CPP_PROJ) $<  
-
-MTL=mktyplib.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /win32
-MTL_PROJ=/nologo /D "_DEBUG" /win32 
-RSC=rc.exe
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-RSC_PROJ=/l 0x809 /fo"$(INTDIR)/de_win.res" /d "_DEBUG" 
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/cord.bsc" 
-BSC32_SBRS= \
-       
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"Debug/de.exe"
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
- advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
- odbccp32.lib /nologo /subsystem:windows /incremental:yes\
- /pdb:"$(OUTDIR)/de.pdb" /debug /machine:I386 /out:"Debug/de.exe" 
-LINK32_OBJS= \
-       ".\cord\Debug\cordbscs.obj" \
-       ".\cord\Debug\cordxtra.obj" \
-       ".\cord\Debug\de.obj" \
-       ".\cord\Debug\de_win.obj" \
-       ".\cord\Debug\de_win.res" \
-       ".\Debug\gc.lib"
-
-".\Debug\de.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
-    $(LINK32) @<<
-  $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ENDIF 
-
-################################################################################
-# Begin Target
-
-# Name "gc - Win32 Release"
-# Name "gc - Win32 Debug"
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-!ENDIF 
-
-################################################################################
-# Begin Source File
-
-SOURCE=.\gc_cpp.cpp
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_RECLA=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       ".\include\gc_cpp.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_RECLA=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\gc_cpp.obj" : $(SOURCE) $(DEP_CPP_RECLA) "$(INTDIR)"
-
-".\Release\gc_cpp.sbr" : $(SOURCE) $(DEP_CPP_RECLA) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_RECLA=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       ".\include\gc_cpp.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_RECLA=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\gc_cpp.obj" : $(SOURCE) $(DEP_CPP_RECLA) "$(INTDIR)"
-
-".\Debug\gc_cpp.sbr" : $(SOURCE) $(DEP_CPP_RECLA) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\reclaim.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_RECLA=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_RECLA=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\reclaim.obj" : $(SOURCE) $(DEP_CPP_RECLA) "$(INTDIR)"
-
-".\Release\reclaim.sbr" : $(SOURCE) $(DEP_CPP_RECLA) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_RECLA=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_RECLA=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\reclaim.obj" : $(SOURCE) $(DEP_CPP_RECLA) "$(INTDIR)"
-
-".\Debug\reclaim.sbr" : $(SOURCE) $(DEP_CPP_RECLA) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-
-################################################################################
-# Begin Source File
-
-SOURCE=.\os_dep.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_OS_DE=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\STAT.H"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_OS_DE=\
-       ".\il\PCR_IL.h"\
-       ".\mm\PCR_MM.h"\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       ".\vd\PCR_VD.h"\
-       
-
-".\Release\os_dep.obj" : $(SOURCE) $(DEP_CPP_OS_DE) "$(INTDIR)"
-
-".\Release\os_dep.sbr" : $(SOURCE) $(DEP_CPP_OS_DE) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_OS_DE=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\STAT.H"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_OS_DE=\
-       ".\il\PCR_IL.h"\
-       ".\mm\PCR_MM.h"\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       ".\vd\PCR_VD.h"\
-       
-
-".\Debug\os_dep.obj" : $(SOURCE) $(DEP_CPP_OS_DE) "$(INTDIR)"
-
-".\Debug\os_dep.sbr" : $(SOURCE) $(DEP_CPP_OS_DE) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\misc.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_MISC_=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_MISC_=\
-       ".\il\PCR_IL.h"\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\misc.obj" : $(SOURCE) $(DEP_CPP_MISC_) "$(INTDIR)"
-
-".\Release\misc.sbr" : $(SOURCE) $(DEP_CPP_MISC_) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_MISC_=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_MISC_=\
-       ".\il\PCR_IL.h"\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\misc.obj" : $(SOURCE) $(DEP_CPP_MISC_) "$(INTDIR)"
-
-".\Debug\misc.sbr" : $(SOURCE) $(DEP_CPP_MISC_) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\mark_rts.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_MARK_=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_MARK_=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\mark_rts.obj" : $(SOURCE) $(DEP_CPP_MARK_) "$(INTDIR)"
-
-".\Release\mark_rts.sbr" : $(SOURCE) $(DEP_CPP_MARK_) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_MARK_=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_MARK_=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\mark_rts.obj" : $(SOURCE) $(DEP_CPP_MARK_) "$(INTDIR)"
-
-".\Debug\mark_rts.sbr" : $(SOURCE) $(DEP_CPP_MARK_) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\mach_dep.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_MACH_=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_MACH_=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\mach_dep.obj" : $(SOURCE) $(DEP_CPP_MACH_) "$(INTDIR)"
-
-".\Release\mach_dep.sbr" : $(SOURCE) $(DEP_CPP_MACH_) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_MACH_=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_MACH_=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\mach_dep.obj" : $(SOURCE) $(DEP_CPP_MACH_) "$(INTDIR)"
-
-".\Debug\mach_dep.sbr" : $(SOURCE) $(DEP_CPP_MACH_) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\headers.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_HEADE=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_HEADE=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\headers.obj" : $(SOURCE) $(DEP_CPP_HEADE) "$(INTDIR)"
-
-".\Release\headers.sbr" : $(SOURCE) $(DEP_CPP_HEADE) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_HEADE=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_HEADE=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\headers.obj" : $(SOURCE) $(DEP_CPP_HEADE) "$(INTDIR)"
-
-".\Debug\headers.sbr" : $(SOURCE) $(DEP_CPP_HEADE) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\alloc.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_ALLOC=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_ALLOC=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\alloc.obj" : $(SOURCE) $(DEP_CPP_ALLOC) "$(INTDIR)"
-
-".\Release\alloc.sbr" : $(SOURCE) $(DEP_CPP_ALLOC) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_ALLOC=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_ALLOC=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\alloc.obj" : $(SOURCE) $(DEP_CPP_ALLOC) "$(INTDIR)"
-
-".\Debug\alloc.sbr" : $(SOURCE) $(DEP_CPP_ALLOC) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\allchblk.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_ALLCH=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_ALLCH=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\allchblk.obj" : $(SOURCE) $(DEP_CPP_ALLCH) "$(INTDIR)"
-
-".\Release\allchblk.sbr" : $(SOURCE) $(DEP_CPP_ALLCH) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_ALLCH=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_ALLCH=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\allchblk.obj" : $(SOURCE) $(DEP_CPP_ALLCH) "$(INTDIR)"
-
-".\Debug\allchblk.sbr" : $(SOURCE) $(DEP_CPP_ALLCH) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\stubborn.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_STUBB=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_STUBB=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\stubborn.obj" : $(SOURCE) $(DEP_CPP_STUBB) "$(INTDIR)"
-
-".\Release\stubborn.sbr" : $(SOURCE) $(DEP_CPP_STUBB) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_STUBB=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_STUBB=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\stubborn.obj" : $(SOURCE) $(DEP_CPP_STUBB) "$(INTDIR)"
-
-".\Debug\stubborn.sbr" : $(SOURCE) $(DEP_CPP_STUBB) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\obj_map.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_OBJ_M=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_OBJ_M=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\obj_map.obj" : $(SOURCE) $(DEP_CPP_OBJ_M) "$(INTDIR)"
-
-".\Release\obj_map.sbr" : $(SOURCE) $(DEP_CPP_OBJ_M) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_OBJ_M=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_OBJ_M=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\obj_map.obj" : $(SOURCE) $(DEP_CPP_OBJ_M) "$(INTDIR)"
-
-".\Debug\obj_map.sbr" : $(SOURCE) $(DEP_CPP_OBJ_M) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\new_hblk.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_NEW_H=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_NEW_H=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\new_hblk.obj" : $(SOURCE) $(DEP_CPP_NEW_H) "$(INTDIR)"
-
-".\Release\new_hblk.sbr" : $(SOURCE) $(DEP_CPP_NEW_H) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_NEW_H=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_NEW_H=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\new_hblk.obj" : $(SOURCE) $(DEP_CPP_NEW_H) "$(INTDIR)"
-
-".\Debug\new_hblk.sbr" : $(SOURCE) $(DEP_CPP_NEW_H) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\mark.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_MARK_C=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_pmark.h"\
-       ".\include\gc_mark.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_MARK_C=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\mark.obj" : $(SOURCE) $(DEP_CPP_MARK_C) "$(INTDIR)"
-
-".\Release\mark.sbr" : $(SOURCE) $(DEP_CPP_MARK_C) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_MARK_C=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_pmark.h"\
-       ".\include\gc_mark.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_MARK_C=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\mark.obj" : $(SOURCE) $(DEP_CPP_MARK_C) "$(INTDIR)"
-
-".\Debug\mark.sbr" : $(SOURCE) $(DEP_CPP_MARK_C) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\malloc.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_MALLO=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_MALLO=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\malloc.obj" : $(SOURCE) $(DEP_CPP_MALLO) "$(INTDIR)"
-
-".\Release\malloc.sbr" : $(SOURCE) $(DEP_CPP_MALLO) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_MALLO=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_MALLO=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\malloc.obj" : $(SOURCE) $(DEP_CPP_MALLO) "$(INTDIR)"
-
-".\Debug\malloc.sbr" : $(SOURCE) $(DEP_CPP_MALLO) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\mallocx.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_MALLX=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_MALLX=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\mallocx.obj" : $(SOURCE) $(DEP_CPP_MALLX) "$(INTDIR)"
-
-".\Release\mallocx.sbr" : $(SOURCE) $(DEP_CPP_MALLX) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_MALLX=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_MALLX=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\mallocx.obj" : $(SOURCE) $(DEP_CPP_MALLX) "$(INTDIR)"
-
-".\Debug\mallocx.sbr" : $(SOURCE) $(DEP_CPP_MALLX) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\finalize.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_FINAL=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_pmark.h"\
-       ".\include\gc_mark.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_FINAL=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\finalize.obj" : $(SOURCE) $(DEP_CPP_FINAL) "$(INTDIR)"
-
-".\Release\finalize.sbr" : $(SOURCE) $(DEP_CPP_FINAL) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_FINAL=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_pmark.h"\
-       ".\include\gc_mark.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_FINAL=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\finalize.obj" : $(SOURCE) $(DEP_CPP_FINAL) "$(INTDIR)"
-
-".\Debug\finalize.sbr" : $(SOURCE) $(DEP_CPP_FINAL) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\dbg_mlc.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_DBG_M=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_DBG_M=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\dbg_mlc.obj" : $(SOURCE) $(DEP_CPP_DBG_M) "$(INTDIR)"
-
-".\Release\dbg_mlc.sbr" : $(SOURCE) $(DEP_CPP_DBG_M) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_DBG_M=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_DBG_M=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\dbg_mlc.obj" : $(SOURCE) $(DEP_CPP_DBG_M) "$(INTDIR)"
-
-".\Debug\dbg_mlc.sbr" : $(SOURCE) $(DEP_CPP_DBG_M) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\blacklst.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_BLACK=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_BLACK=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\blacklst.obj" : $(SOURCE) $(DEP_CPP_BLACK) "$(INTDIR)"
-
-".\Release\blacklst.sbr" : $(SOURCE) $(DEP_CPP_BLACK) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_BLACK=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_BLACK=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\blacklst.obj" : $(SOURCE) $(DEP_CPP_BLACK) "$(INTDIR)"
-
-".\Debug\blacklst.sbr" : $(SOURCE) $(DEP_CPP_BLACK) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\typd_mlc.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_TYPD_=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_pmark.h"\
-       ".\include\gc_mark.h"\
-       ".\include\private\gc_priv.h"\
-       ".\include\gc_typed.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_TYPD_=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\typd_mlc.obj" : $(SOURCE) $(DEP_CPP_TYPD_) "$(INTDIR)"
-
-".\Release\typd_mlc.sbr" : $(SOURCE) $(DEP_CPP_TYPD_) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_TYPD_=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_pmark.h"\
-       ".\include\gc_mark.h"\
-       ".\include\private\gc_priv.h"\
-       ".\include\gc_typed.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_TYPD_=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\typd_mlc.obj" : $(SOURCE) $(DEP_CPP_TYPD_) "$(INTDIR)"
-
-".\Debug\typd_mlc.sbr" : $(SOURCE) $(DEP_CPP_TYPD_) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ptr_chck.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_PTR_C=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_pmark.h"\
-       ".\include\gc_mark.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_PTR_C=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\ptr_chck.obj" : $(SOURCE) $(DEP_CPP_PTR_C) "$(INTDIR)"
-
-".\Release\ptr_chck.sbr" : $(SOURCE) $(DEP_CPP_PTR_C) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_PTR_C=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_pmark.h"\
-       ".\include\gc_mark.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_PTR_C=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\ptr_chck.obj" : $(SOURCE) $(DEP_CPP_PTR_C) "$(INTDIR)"
-
-".\Debug\ptr_chck.sbr" : $(SOURCE) $(DEP_CPP_PTR_C) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\dyn_load.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_DYN_L=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\STAT.H"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_DYN_L=\
-       ".\il\PCR_IL.h"\
-       ".\mm\PCR_MM.h"\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\dyn_load.obj" : $(SOURCE) $(DEP_CPP_DYN_L) "$(INTDIR)"
-
-".\Release\dyn_load.sbr" : $(SOURCE) $(DEP_CPP_DYN_L) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_DYN_L=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\STAT.H"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_DYN_L=\
-       ".\il\PCR_IL.h"\
-       ".\mm\PCR_MM.h"\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\dyn_load.obj" : $(SOURCE) $(DEP_CPP_DYN_L) "$(INTDIR)"
-
-".\Debug\dyn_load.sbr" : $(SOURCE) $(DEP_CPP_DYN_L) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\win32_threads.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_WIN32=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_WIN32=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\win32_threads.obj" : $(SOURCE) $(DEP_CPP_WIN32) "$(INTDIR)"
-
-".\Release\win32_threads.sbr" : $(SOURCE) $(DEP_CPP_WIN32) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_WIN32=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_WIN32=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\win32_threads.obj" : $(SOURCE) $(DEP_CPP_WIN32) "$(INTDIR)"
-
-".\Debug\win32_threads.sbr" : $(SOURCE) $(DEP_CPP_WIN32) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\msvc_dbg.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_WIN32=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       ".\include\private\msvc_dbg.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_WIN32=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\msvc_dbg.obj" : $(SOURCE) $(DEP_CPP_WIN32) "$(INTDIR)"
-
-".\Release\msvc_dbg.sbr" : $(SOURCE) $(DEP_CPP_WIN32) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_WIN32=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       ".\include\private\msvc_dbg.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_WIN32=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\msvc_dbg.obj" : $(SOURCE) $(DEP_CPP_WIN32) "$(INTDIR)"
-
-".\Debug\msvc_dbg.sbr" : $(SOURCE) $(DEP_CPP_WIN32) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\checksums.c
-
-!IF  "$(CFG)" == "gc - Win32 Release"
-
-DEP_CPP_CHECK=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_CHECK=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Release\checksums.obj" : $(SOURCE) $(DEP_CPP_CHECK) "$(INTDIR)"
-
-".\Release\checksums.sbr" : $(SOURCE) $(DEP_CPP_CHECK) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gc - Win32 Debug"
-
-DEP_CPP_CHECK=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_CHECK=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-".\Debug\checksums.obj" : $(SOURCE) $(DEP_CPP_CHECK) "$(INTDIR)"
-
-".\Debug\checksums.sbr" : $(SOURCE) $(DEP_CPP_CHECK) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "gctest - Win32 Release"
-# Name "gctest - Win32 Debug"
-
-!IF  "$(CFG)" == "gctest - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "gctest - Win32 Debug"
-
-!ENDIF 
-
-################################################################################
-# Begin Project Dependency
-
-# Project_Dep_Name "gc"
-
-!IF  "$(CFG)" == "gctest - Win32 Release"
-
-"gc - Win32 Release" : 
-   $(MAKE) /$(MAKEFLAGS) /F ".\gc.mak" CFG="gc - Win32 Release" 
-
-!ELSEIF  "$(CFG)" == "gctest - Win32 Debug"
-
-"gc - Win32 Debug" : 
-   $(MAKE) /$(MAKEFLAGS) /F ".\gc.mak" CFG="gc - Win32 Debug" 
-
-!ENDIF 
-
-# End Project Dependency
-################################################################################
-# Begin Source File
-
-SOURCE=.\tests\test.c
-DEP_CPP_TEST_=\
-       ".\include\private\gcconfig.h"\
-       ".\include\gc.h"\
-       ".\include\private\gc_hdrs.h"\
-       ".\include\private\gc_priv.h"\
-       ".\include\gc_typed.h"\
-       {$(INCLUDE)}"\sys\TYPES.H"\
-       
-NODEP_CPP_TEST_=\
-       ".\th\PCR_Th.h"\
-       ".\th\PCR_ThCrSec.h"\
-       ".\th\PCR_ThCtl.h"\
-       
-
-!IF  "$(CFG)" == "gctest - Win32 Release"
-
-
-".\gctest\Release\test.obj" : $(SOURCE) $(DEP_CPP_TEST_) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "gctest - Win32 Debug"
-
-
-".\gctest\Debug\test.obj" : $(SOURCE) $(DEP_CPP_TEST_) "$(INTDIR)"
-
-".\gctest\Debug\test.sbr" : $(SOURCE) $(DEP_CPP_TEST_) "$(INTDIR)"
-
-
-!ENDIF 
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "cord - Win32 Release"
-# Name "cord - Win32 Debug"
-
-!IF  "$(CFG)" == "cord - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "cord - Win32 Debug"
-
-!ENDIF 
-
-################################################################################
-# Begin Project Dependency
-
-# Project_Dep_Name "gc"
-
-!IF  "$(CFG)" == "cord - Win32 Release"
-
-"gc - Win32 Release" : 
-   $(MAKE) /$(MAKEFLAGS) /F ".\gc.mak" CFG="gc - Win32 Release" 
-
-!ELSEIF  "$(CFG)" == "cord - Win32 Debug"
-
-"gc - Win32 Debug" : 
-   $(MAKE) /$(MAKEFLAGS) /F ".\gc.mak" CFG="gc - Win32 Debug" 
-
-!ENDIF 
-
-# End Project Dependency
-################################################################################
-# Begin Source File
-
-SOURCE=.\cord\de_win.c
-DEP_CPP_DE_WI=\
-       ".\include\cord.h"\
-       ".\cord\de_cmds.h"\
-       ".\cord\de_win.h"\
-       ".\include\private\cord_pos.h"\
-       
-NODEP_CPP_DE_WI=\
-       ".\include\gc.h"\
-       
-
-!IF  "$(CFG)" == "cord - Win32 Release"
-
-
-".\cord\Release\de_win.obj" : $(SOURCE) $(DEP_CPP_DE_WI) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF  "$(CFG)" == "cord - Win32 Debug"
-
-
-".\cord\Debug\de_win.obj" : $(SOURCE) $(DEP_CPP_DE_WI) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\cord\de.c
-DEP_CPP_DE_C2e=\
-       ".\include\cord.h"\
-       ".\cord\de_cmds.h"\
-       ".\cord\de_win.h"\
-       ".\include\private\cord_pos.h"\
-       
-NODEP_CPP_DE_C2e=\
-       ".\include\gc.h"\
-       
-
-!IF  "$(CFG)" == "cord - Win32 Release"
-
-
-".\cord\Release\de.obj" : $(SOURCE) $(DEP_CPP_DE_C2e) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF  "$(CFG)" == "cord - Win32 Debug"
-
-
-".\cord\Debug\de.obj" : $(SOURCE) $(DEP_CPP_DE_C2e) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\cord\cordxtra.c
-DEP_CPP_CORDX=\
-       ".\include\cord.h"\
-       ".\include\ec.h"\
-       ".\include\private\cord_pos.h"\
-       
-NODEP_CPP_CORDX=\
-       ".\include\gc.h"\
-       
-
-!IF  "$(CFG)" == "cord - Win32 Release"
-
-
-".\cord\Release\cordxtra.obj" : $(SOURCE) $(DEP_CPP_CORDX) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF  "$(CFG)" == "cord - Win32 Debug"
-
-
-".\cord\Debug\cordxtra.obj" : $(SOURCE) $(DEP_CPP_CORDX) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\cord\cordbscs.c
-DEP_CPP_CORDB=\
-       ".\include\cord.h"\
-       ".\include\private\cord_pos.h"\
-       
-NODEP_CPP_CORDB=\
-       ".\include\gc.h"\
-       
-
-!IF  "$(CFG)" == "cord - Win32 Release"
-
-
-".\cord\Release\cordbscs.obj" : $(SOURCE) $(DEP_CPP_CORDB) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF  "$(CFG)" == "cord - Win32 Debug"
-
-
-".\cord\Debug\cordbscs.obj" : $(SOURCE) $(DEP_CPP_CORDB) "$(INTDIR)"
-   $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF 
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\cord\de_win.RC
-
-!IF  "$(CFG)" == "cord - Win32 Release"
-
-
-".\cord\Release\de_win.res" : $(SOURCE) "$(INTDIR)"
-   $(RSC) /l 0x809 /fo"$(INTDIR)/de_win.res" /i "cord" /d "NDEBUG" $(SOURCE)
-
-
-!ELSEIF  "$(CFG)" == "cord - Win32 Debug"
-
-
-".\cord\Debug\de_win.res" : $(SOURCE) "$(INTDIR)"
-   $(RSC) /l 0x809 /fo"$(INTDIR)/de_win.res" /i "cord" /d "_DEBUG" $(SOURCE)
-
-
-!ENDIF 
-
-# End Source File
-# End Target
-# End Project
-################################################################################
index d0264b6074053067f8d123bd97026ae7058f3e5e..611604b67bd029c18c141dda1e879aa66776de9a 100644 (file)
@@ -15,22 +15,21 @@ CPU=$(MY_CPU)
 # should do, since we only need the headers.
 # We assume this was manually unpacked, since I'm not sure there is
 # a Windows standard command line tool to do this.
-AO_VERSION=1.2
-AO_SRC_DIR=libatomic_ops-$(AO_VERSION)/src
+AO_SRC_DIR=libatomic_ops/src
 AO_INCLUDE_DIR=$(AO_SRC_DIR)
 
-OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj malloc.obj stubborn.obj dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj win32_threads.obj msvc_dbg.obj thread_local_alloc.obj
+OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj malloc.obj stubborn.obj dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj win32_threads.obj extra\msvc_dbg.obj thread_local_alloc.obj
 
 all: gctest.exe cord\de.exe test_cpp.exe
 
 .c.obj:
-       $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -D__STDC__ -DGC_NOT_DLL -DGC_WIN32_THREADS -DTHREAD_LOCAL_ALLOC $*.c /Fo$*.obj /wd4701 -D_CRT_SECURE_NO_DEPRECATE
+       $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -DGC_THREADS -DTHREAD_LOCAL_ALLOC -D_CRT_SECURE_NO_DEPRECATE $*.c /Fo$*.obj /wd4701
 # Disable "may not be initialized" warnings.  They're too approximate.
 # Disable crt security warnings, since unfortunately they warn about all sorts
 # of safe uses of strncpy.  It would be nice to leave the rest enabled.
 
 .cpp.obj:
-       $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL $*.CPP -DGC_WIN32_THREADS -DTHREAD_LOCAL_ALLOC /Fo$*.obj -D_CRT_SECURE_NO_DEPRECATE
+       $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -DGC_THREADS -DTHREAD_LOCAL_ALLOC -D_CRT_SECURE_NO_DEPRECATE $*.CPP /Fo$*.obj
 
 $(OBJS) tests\test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h include\private\gc_locks.h include\private\gc_pmark.h include\gc_mark.h include\private\msvc_dbg.h
 
index 5a16aec08ea4d9eddacf61afc50e003e005070b4..ee851a6c1f847c27e2365e11b05d28fffa05ed0e 100644 (file)
@@ -1,7 +1,7 @@
 # Makefile for Windows NT.  Assumes Microsoft compiler.
 # modified 2007 August by Friedrich Dominicus:
 #                      - copied from NT_X64_STATIC_THREADS_MAKEFILES
-#                       - checked agaist NT_THREADS_MAKEFILE
+#                       - checked agaist gc.mak (NT_THREADS_MAKEFILE)
 #                       - added changes to integrate the tools
 #                       - currently just with debug information
 # problems can be sent to
@@ -22,21 +22,20 @@ CPU=$(MY_CPU)
 # should do, since we only need the headers.
 # We assume this was manually unpacked, since I'm not sure there is
 # a Windows standard command line tool to do this.
-AO_VERSION=1.2
-AO_SRC_DIR=libatomic_ops-$(AO_VERSION)/src
+AO_SRC_DIR=libatomic_ops/src
 AO_INCLUDE_DIR=$(AO_SRC_DIR)
 
-OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj malloc.obj stubborn.obj dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj win32_threads.obj msvc_dbg.obj thread_local_alloc.obj
+OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj malloc.obj stubborn.obj dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj win32_threads.obj extra\msvc_dbg.obj thread_local_alloc.obj
 
 all: gc64_dll.dll gctest.exe cord\de.exe test_cpp.exe
 
 .c.obj:
-       $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_DLL -D__STDC__ -DGC_BUILD -DGC_WIN32_THREADS  $*.c /Fo$*.obj /wd4701 -D_CRT_SECURE_NO_DEPRECATE
+       $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_DLL -DGC_THREADS -D_CRT_SECURE_NO_DEPRECATE $*.c /Fo$*.obj /wd4701
 # Disable "may not be initialized" warnings.  They're too approximate.
 # Disable crt security warnings, since unfortunately they warn about all sorts # of safe uses of strncpy.  It would be nice to leave the rest enabled.
 
 .cpp.obj:
-       $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL-DALL_INTERIOR_POINTERS -DGC_DLL -D__STDC__ -DGC_BUILD -DGC_WIN32_THREADS $*.CPP /Fo$*.obj -D_CRT_SECURE_NO_DEPRECATE
+       $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DALL_INTERIOR_POINTERS -DGC_DLL -DGC_THREADS -D_CRT_SECURE_NO_DEPRECATE $*.CPP /Fo$*.obj
 
 $(OBJS) tests\test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h include\private\gc_locks.h include\private\gc_pmark.h include\gc_mark.h include\private\msvc_dbg.h
 
index db4c9f01819d0d8df2b1466c259fa7b6e8439fef..d7b79d1512f88e66d486baa2e49123db506bf9f9 100644 (file)
@@ -59,10 +59,10 @@ mach_dep.o: mach_dep.c mips_mach_dep.s rs6000_mach_dep.s if_mach if_not_there
        ./if_mach SPARC SOLARIS as -o mach_dep.o sparc_mach_dep.s
        ./if_not_there mach_dep.o $(CC) -c $(SPECIALCFLAGS) mach_dep.c
 
-if_mach: if_mach.c gcconfig.h
-       $(CC) $(CFLAGS) -o if_mach if_mach.c
+if_mach: extra/if_mach.c gcconfig.h
+       $(CC) $(CFLAGS) -o if_mach extra/if_mach.c
 
-if_not_there: if_not_there.c
-       $(CC) $(CFLAGS) -o if_not_there if_not_there.c
+if_not_there: extra/if_not_there.c
+       $(CC) $(CFLAGS) -o if_not_there extra/if_not_there.c
 
 
index 5ffa505c9e8ab0a7cf0d55ca12ce17c7fc6a1491..26204cee6ef1084ad8a14c0ff494c65533fa0e44 100644 (file)
@@ -27,13 +27,14 @@ For the version number, see doc/README or version.h.
 INSTALLATION:
 Under UN*X, Linux:
 Alternative 1 (the old way): type "make test" in this directory.
-       Link against gc.a.  With the most recent GC distributions
-       you may have to copy Makefile.direct to Makefile first.
+        Link against gc.a.  With the most recent GC distributions
+        you may have to type "make -f Makefile.direct test" or
+        copy Makefile.direct to Makefile first.
 
 Alternative 2 (the new way): type
-       "./configure --prefix=<dir>; make; make check; make install".
-       Link against <dir>/lib/libgc.a or <dir>/lib/libgc.so.
-       See README.autoconf for details
+        "./configure --prefix=<dir>; make; make check; make install".
+        Link against <dir>/lib/libgc.a or <dir>/lib/libgc.so.
+        See README.autoconf for details
 
 Under Windows 95, 98, Me, NT, or 2000:
 copy the appropriate makefile to MAKEFILE, read it, and type "nmake test".
@@ -43,7 +44,7 @@ Read the machine specific README in the doc directory if one exists.
 
 If you need thread support, you will need to follow the special
 platform-dependent instructions (win32), or define GC_THREADS
-as described in Makefile (Makefile.direct), or possibly use
+as described in doc/README.macros, or possibly use
 --enable-threads=posix when running the configure script.
 
 If you wish to use the cord (structured string) library with the stand-alone
@@ -55,8 +56,8 @@ package should still work.)
 
 If you wish to use the collector from C++, type "make c++", or use
 --enable-cplusplus with the configure script.   With Makefile.direct,
-hese add further files to gc.a and to the include subdirectory.  With the
-alternat build process,this generates libgccpp.
+these ones add further files to gc.a and to the include subdirectory.
+With the alternate build process,this generates libgccpp.
 See cord/cord.h and include/gc_cpp.h.
 
 TYPICAL USE:
@@ -85,4 +86,3 @@ accessed with pthread_getspecific()).  The collector does scan
 thread stacks though, so generally the best solution is to ensure that
 any pointers stored in thread-local storage are also stored on the
 thread's stack for the duration of their lifetime.
-
index 94fb723865ca108ce3a54fdfc64746aab819ad10..acdca66ad86e7be422926ac74fce750e2e5fc824 100644 (file)
@@ -99,7 +99,7 @@ allchblk.o : allchblk.c $(INC)
 misc.o : misc.c $(INC)
        $(CC) misc.c $(SCOPT)
 
-os_dep.o : os_dep.c $(INC) AmigaOS.c
+os_dep.o : os_dep.c $(INC) extra/AmigaOS.c
        $(CC) os_dep.c $(SCOPT)
 
 mark_rts.o : mark_rts.c $(INC)
@@ -156,8 +156,8 @@ ptr_chck.o: ptr_chck.c $(INC)
 test.o : test.c $(INC)
        $(CC) test.c $(SOPT)
 
-setjmp_t: setjmp_t.c gc.h
-   $(CC) setjmp_t.c $(SOPT)
+setjmp_t: extra/setjmp_t.c gc.h
+   $(CC) extra/setjmp_t.c $(SOPT)
 
 
 # cords:
diff --git a/src/mm/boehm-gc/acinclude.m4 b/src/mm/boehm-gc/acinclude.m4
deleted file mode 100644 (file)
index 72602a0..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# 
-# 
-# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
-# OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
-# 
-# Permission is hereby granted to use or copy this program
-# for any purpose,  provided the above notices are retained on all copies.
-# Permission to modify the code and to distribute modified code is granted,
-# provided the above notices are retained, and a notice that the code was
-# modified is included with the above copyright notice.
-#
-# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
-
-# GC_SET_VERSION
-# sets and AC_DEFINEs GC_VERSION_MAJOR, GC_VERSION_MINOR and GC_ALPHA_VERSION
-# based on the contents of PACKAGE_VERSION; PACKAGE_VERSION must conform to
-# [0-9]+[.][0-9]+(alpha[0.9]+)? 
-# in lex syntax; if there is no alpha number, GC_ALPHA_VERSION is empty
-#
-AC_DEFUN(GC_SET_VERSION, [
-  AC_MSG_CHECKING(GC version numbers)
-  GC_VERSION_MAJOR=`echo $PACKAGE_VERSION | sed 's/^\([[0-9]][[0-9]]*\)[[.]].*$/\1/g'`
-  GC_VERSION_MINOR=`echo $PACKAGE_VERSION | sed 's/^[[^.]]*[[.]]\([[0-9]][[0-9]]*\).*$/\1/g'`
-  GC_ALPHA_VERSION=`echo $PACKAGE_VERSION | sed 's/^[[^.]]*[[.]][[0-9]]*//'`
-
-  case "$GC_ALPHA_VERSION" in
-    alpha*) 
-      GC_ALPHA_VERSION=`echo $GC_ALPHA_VERSION \
-      | sed 's/alpha\([[0-9]][[0-9]]*\)/\1/'` ;;
-    *)  GC_ALPHA_MAJOR='' ;;
-  esac
-
-  if test :$GC_VERSION_MAJOR: = :: \
-     -o   :$GC_VERSION_MINOR: = :: ;
-  then
-    AC_MSG_RESULT(invalid)
-    AC_MSG_ERROR([nonconforming PACKAGE_VERSION='$PACKAGE_VERSION'])
-  fi
-  
-  AC_DEFINE_UNQUOTED(GC_VERSION_MAJOR, $GC_VERSION_MAJOR)
-  AC_DEFINE_UNQUOTED(GC_VERSION_MINOR, $GC_VERSION_MINOR)
-  if test :$GC_ALPHA_VERSION: != :: ; then
-    AC_DEFINE_UNQUOTED(GC_ALPHA_VERSION, $GC_ALPHA_VERSION)
-  fi
-  AC_MSG_RESULT(major=$GC_VERSION_MAJOR minor=$GC_VERSION_MINOR \
-${GC_ALPHA_VERSION:+alpha=}$GC_ALPHA_VERSION)
-])
-
-sinclude(libtool.m4)
index 8d195b5182429c1673648395be4027ceb6c9fe11..f8c5cc1d90e29c983a86be5d4cfb79eb26725285 100644 (file)
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
+[m4_warning([this file was generated for autoconf 2.64.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 # generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.10'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.10.2], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
 
 # AM_SET_CURRENT_AUTOMAKE_VERSION
 # -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-        [AM_AUTOMAKE_VERSION([1.9.6])])
+[AM_AUTOMAKE_VERSION([1.10.2])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # Figure out how to run the assembler.                      -*- Autoconf -*-
 
-# Copyright (C) 2001, 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
 # AM_PROG_AS
 # ----------
@@ -49,6 +74,7 @@ test "${CCAS+set}" = set || CCAS=$CC
 test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
 AC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
 AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
+_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
 ])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
@@ -106,14 +132,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 7
+# serial 8
 
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
@@ -122,8 +148,10 @@ AC_DEFUN([AM_CONDITIONAL],
 [AC_PREREQ(2.52)dnl
  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
 if $2; then
   $1_TRUE=
   $1_FALSE='#'
@@ -137,15 +165,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
+# serial 9
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -173,6 +200,7 @@ AC_REQUIRE([AM_DEP_TRACK])dnl
 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
                    [depcc="$$1"   am_compiler_list=])
 
@@ -238,6 +266,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
          >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
@@ -290,24 +319,34 @@ if test "x$enable_dependency_tracking" != xno; then
   AMDEPBACKSLASH='\'
 fi
 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 ])
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 3
+#serial 4
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
+[# Autoconf 2.62 quotes --file arguments for eval, but not when files
+# are listed without --file.  Let's play safe and only enable the eval
+# if we detect the quoting.
+case $CONFIG_FILES in
+*\'*) eval set x "$CONFIG_FILES" ;;
+*)   set x $CONFIG_FILES ;;
+esac
+shift
+for mf
+do
   # Strip MF so we end up with the name of the file.
   mf=`echo "$mf" | sed -e 's/:.*$//'`
   # Check whether this is an Automake generated Makefile or not.
@@ -315,8 +354,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
   # some people rename them; so instead we look at the file content.
   # Grep'ing the first line is not enough: some people post-process
   # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+  # Grep'ing the whole file is not good either: AIX grep has a line
+  # limit of 2048, but all sed's we know have understand at least 4000.
+  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
     dirpart=`AS_DIRNAME("$mf")`
   else
     continue
@@ -361,16 +401,28 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 ])
 
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 12
+# serial 13
 
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
@@ -387,16 +439,20 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 # arguments mandatory, and then we can depend on a new Autoconf
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
+[AC_PREREQ([2.60])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
 fi
 
 # test whether we have cygpath
@@ -416,6 +472,9 @@ m4_ifval([$2],
  AC_SUBST([PACKAGE], [$1])dnl
  AC_SUBST([VERSION], [$2])],
 [_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
@@ -451,6 +510,10 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX],
                   [_AM_DEPENDENCIES(CXX)],
                   [define([AC_PROG_CXX],
                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                  [_AM_DEPENDENCIES(OBJC)],
+                  [define([AC_PROG_OBJC],
+                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 ])
 ])
 
@@ -464,16 +527,17 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX],
 # our stamp files there.
 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 [# Compute $1's index in $config_headers.
+_am_arg=$1
 _am_stamp_count=1
 for _am_header in $config_headers :; do
   case $_am_header in
-    $1 | $1:* )
+    $_am_arg | $_am_arg:* )
       break ;;
     * )
       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
   esac
 done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 #
@@ -486,7 +550,7 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
 AC_SUBST(install_sh)])
 
 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
@@ -591,13 +655,14 @@ AC_MSG_RESULT([$_am_result])
 rm -f confinc confmf
 ])
 
-# Copyright (C) 1999, 2000, 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 6
 
 # AM_PROG_CC_C_O
 # --------------
@@ -605,11 +670,13 @@ rm -f confinc confmf
 AC_DEFUN([AM_PROG_CC_C_O],
 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
 # FIXME: we rely on the cache variable name because
 # there is no other way.
 set dummy $CC
-ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
    # Losing compiler, so override with the script.
    # FIXME: It is wrong to rewrite CC.
    # But if we don't then we get into trouble of one sort or another.
@@ -617,18 +684,22 @@ if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
    CC="$am_aux_dir/compile $CC"
 fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
 ])
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
@@ -644,6 +715,7 @@ AC_SUBST($1)])
 # If it does, set am_missing_run to use it, otherwise, to nothing.
 AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
@@ -654,7 +726,7 @@ else
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -662,70 +734,33 @@ fi
 
 # AM_PROG_MKDIR_P
 # ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake.  There are at least two reasons why we must not
-# use `-m 0755':
-#   - it causes special bits like SGID to be ignored,
-#   - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out.  Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
+# Check for `mkdir -p'.
 AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
-  else
-    mkdir_p='$(install_sh) -d'
-  fi
-fi
-AC_SUBST([mkdir_p])])
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 4
 
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
@@ -742,7 +777,7 @@ AC_DEFUN([_AM_SET_OPTION],
 # ----------------------------------
 # OPTIONS is a space-separated list of Automake options.
 AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 # -------------------------------------------
@@ -827,9 +862,21 @@ dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 if test "$cross_compiling" != no; then
   AC_CHECK_TOOL([STRIP], [strip], :)
 fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
+# Copyright (C) 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
 # Check how to create a tarball.                            -*- Autoconf -*-
 
 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
@@ -926,4 +973,9 @@ AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
-m4_include([acinclude.m4])
+m4_include([m4/gc_set_version.m4])
+m4_include([m4/libtool.m4])
+m4_include([m4/ltoptions.m4])
+m4_include([m4/ltsugar.m4])
+m4_include([m4/ltversion.m4])
+m4_include([m4/lt~obsolete.m4])
diff --git a/src/mm/boehm-gc/add_gc_prefix.c b/src/mm/boehm-gc/add_gc_prefix.c
deleted file mode 100644 (file)
index a7fd4fc..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# include <stdio.h>
-# include <gc.h>
-int main(argc, argv, envp)
-int argc;
-char ** argv;
-char ** envp;
-{
-    int i;
-    
-    for (i = 1; i < argc; i++) {
-      if (GC_ALPHA_VERSION == GC_NOT_ALPHA) {
-       printf("gc%d.%d/%s ", GC_VERSION_MAJOR, GC_VERSION_MINOR, argv[i]);
-      } else {
-       printf("gc%d.%dalpha%d/%s ", GC_VERSION_MAJOR,
-              GC_VERSION_MINOR, GC_ALPHA_VERSION, argv[i]);
-      }
-    }
-    return(0);
-}
index 627ef904a199e4ad4f08fb78dd4e4487fb474585..d6a1437152d9baad9c52b53f3300b8d3a9792b66 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1998-1999 by Silicon Graphics.  All rights reserved.
  * modified is included with the above copyright notice.
  */
 
-/* #define DEBUG */
-#include <stdio.h>
 #include "private/gc_priv.h"
 
+#include <stdio.h>
+
 GC_bool GC_use_entire_heap = 0;
 
 /*
@@ -26,47 +26,48 @@ GC_bool GC_use_entire_heap = 0;
  * Adjacent free blocks are coalesced.
  */
 
+
 # define MAX_BLACK_LIST_ALLOC (2*HBLKSIZE)
-               /* largest block we will allocate starting on a black   */
-               /* listed block.  Must be >= HBLKSIZE.                  */
+                /* largest block we will allocate starting on a black   */
+                /* listed block.  Must be >= HBLKSIZE.                  */
 
 
 # define UNIQUE_THRESHOLD 32
-       /* Sizes up to this many HBLKs each have their own free list    */
+        /* Sizes up to this many HBLKs each have their own free list    */
 # define HUGE_THRESHOLD 256
-       /* Sizes of at least this many heap blocks are mapped to a      */
-       /* single free list.                                            */
+        /* Sizes of at least this many heap blocks are mapped to a      */
+        /* single free list.                                            */
 # define FL_COMPRESSION 8
-       /* In between sizes map this many distinct sizes to a single    */
-       /* bin.                                                         */
+        /* In between sizes map this many distinct sizes to a single    */
+        /* bin.                                                         */
 
 # define N_HBLK_FLS (HUGE_THRESHOLD - UNIQUE_THRESHOLD)/FL_COMPRESSION \
-                                + UNIQUE_THRESHOLD
+                                 + UNIQUE_THRESHOLD
 
-struct hblk * GC_hblkfreelist[N_HBLK_FLS+1] = { 0 };
+STATIC struct hblk * GC_hblkfreelist[N_HBLK_FLS+1] = { 0 };
+                                /* List of completely empty heap blocks */
+                                /* Linked through hb_next field of      */
+                                /* header structure associated with     */
+                                /* block.                               */
 
 #ifndef USE_MUNMAP
 
   STATIC word GC_free_bytes[N_HBLK_FLS+1] = { 0 };
-       /* Number of free bytes on each list.   */
-
-  /* Return the largest n such that                                    */
-  /* Is GC_large_allocd_bytes + the number of free bytes on lists      */
-  /* n .. N_HBLK_FLS > GC_max_large_allocd_bytes.                      */
-  /* If there is no such n, return 0.                                  */
-# ifdef __GNUC__
-  __inline__
-# endif
-  static int GC_enough_large_bytes_left(void)
+        /* Number of free bytes on each list.   */
+
+  /* Return the largest n such that                                     */
+  /* Is GC_large_allocd_bytes + the number of free bytes on lists       */
+  /* n .. N_HBLK_FLS > GC_max_large_allocd_bytes.                       */
+  /* If there is no such n, return 0.                                   */
+  GC_INLINE int GC_enough_large_bytes_left(void)
   {
     int n;
     word bytes = GC_large_allocd_bytes;
 
     GC_ASSERT(GC_max_large_allocd_bytes <= GC_heapsize);
     for (n = N_HBLK_FLS; n >= 0; --n) {
-       bytes += GC_free_bytes[n];
-       if (bytes >= GC_max_large_allocd_bytes) return n;
+        bytes += GC_free_bytes[n];
+        if (bytes >= GC_max_large_allocd_bytes) return n;
     }
     return 0;
   }
@@ -88,8 +89,8 @@ STATIC int GC_hblk_fl_from_blocks(word blocks_needed)
     if (blocks_needed <= UNIQUE_THRESHOLD) return (int)blocks_needed;
     if (blocks_needed >= HUGE_THRESHOLD) return N_HBLK_FLS;
     return (int)(blocks_needed - UNIQUE_THRESHOLD)/FL_COMPRESSION
-                                       + UNIQUE_THRESHOLD;
-    
+                                        + UNIQUE_THRESHOLD;
+
 }
 
 # define PHDR(hhdr) HDR(hhdr -> hb_prev)
@@ -109,48 +110,48 @@ void GC_print_hblkfreelist(void)
     hdr * hhdr;
     word sz;
     unsigned i;
-    
+
     for (i = 0; i <= N_HBLK_FLS; ++i) {
       h = GC_hblkfreelist[i];
 #     ifdef USE_MUNMAP
         if (0 != h) GC_printf("Free list %u:\n", i);
 #     else
         if (0 != h) GC_printf("Free list %u (Total size %lu):\n",
-                             i, (unsigned long)GC_free_bytes[i]);
+                              i, (unsigned long)GC_free_bytes[i]);
 #     endif
       while (h != 0) {
         hhdr = HDR(h);
         sz = hhdr -> hb_sz;
-       total_free += sz;
-       GC_printf("\t%p size %lu %s black listed\n", h, (unsigned long)sz, 
-               GC_is_black_listed(h, HBLKSIZE) != 0 ? "start" :
-               GC_is_black_listed(h, hhdr -> hb_sz) != 0 ? "partially" :
-                                                       "not");
+        total_free += sz;
+        GC_printf("\t%p size %lu %s black listed\n", h, (unsigned long)sz,
+                GC_is_black_listed(h, HBLKSIZE) != 0 ? "start" :
+                GC_is_black_listed(h, hhdr -> hb_sz) != 0 ? "partially" :
+                                                        "not");
         h = hhdr -> hb_next;
       }
     }
 #   ifndef USE_MUNMAP
       if (total_free != GC_large_free_bytes) {
-       GC_printf("GC_large_free_bytes = %lu (INCONSISTENT!!)\n",
-                 (unsigned long) GC_large_free_bytes);
+        GC_printf("GC_large_free_bytes = %lu (INCONSISTENT!!)\n",
+                  (unsigned long) GC_large_free_bytes);
       }
 #   endif
     GC_printf("Total of %lu bytes on free list\n", (unsigned long)total_free);
 }
 
 /* Return the free list index on which the block described by the header */
-/* appears, or -1 if it appears nowhere.                                */
+/* appears, or -1 if it appears nowhere.                                 */
 static int free_list_index_of(hdr *wanted)
 {
     struct hblk * h;
     hdr * hhdr;
     int i;
-    
+
     for (i = 0; i <= N_HBLK_FLS; ++i) {
       h = GC_hblkfreelist[i];
       while (h != 0) {
         hhdr = HDR(h);
-       if (hhdr == wanted) return i;
+        if (hhdr == wanted) return i;
         h = hhdr -> hb_next;
       }
     }
@@ -165,61 +166,61 @@ void GC_dump_regions(void)
     size_t bytes;
     hdr *hhdr;
     for (i = 0; i < GC_n_heap_sects; ++i) {
-       start = GC_heap_sects[i].hs_start;
-       bytes = GC_heap_sects[i].hs_bytes;
-       end = start + bytes;
-       /* Merge in contiguous sections.        */
-         while (i+1 < GC_n_heap_sects && GC_heap_sects[i+1].hs_start == end) {
-           ++i;
-           end = GC_heap_sects[i].hs_start + GC_heap_sects[i].hs_bytes;
-         }
-       GC_printf("***Section from %p to %p\n", start, end);
-       for (p = start; p < end;) {
-           hhdr = HDR(p);
-           if (IS_FORWARDING_ADDR_OR_NIL(hhdr)) {
-               GC_printf("\t%p Missing header!!(%p)\n", p, hhdr);
-               p += HBLKSIZE;
-               continue;
-           }
-           if (HBLK_IS_FREE(hhdr)) {
+        start = GC_heap_sects[i].hs_start;
+        bytes = GC_heap_sects[i].hs_bytes;
+        end = start + bytes;
+        /* Merge in contiguous sections.        */
+          while (i+1 < GC_n_heap_sects && GC_heap_sects[i+1].hs_start == end) {
+            ++i;
+            end = GC_heap_sects[i].hs_start + GC_heap_sects[i].hs_bytes;
+          }
+        GC_printf("***Section from %p to %p\n", start, end);
+        for (p = start; p < end;) {
+            hhdr = HDR(p);
+            if (IS_FORWARDING_ADDR_OR_NIL(hhdr)) {
+                GC_printf("\t%p Missing header!!(%p)\n", p, hhdr);
+                p += HBLKSIZE;
+                continue;
+            }
+            if (HBLK_IS_FREE(hhdr)) {
                 int correct_index = GC_hblk_fl_from_blocks(
-                                       divHBLKSZ(hhdr -> hb_sz));
-               int actual_index;
-               
-               GC_printf("\t%p\tfree block of size 0x%lx bytes%s\n", p,
-                         (unsigned long)(hhdr -> hb_sz),
-                         IS_MAPPED(hhdr) ? "" : " (unmapped)");
-               actual_index = free_list_index_of(hhdr);
-               if (-1 == actual_index) {
-                   GC_printf("\t\tBlock not on free list %d!!\n",
-                             correct_index);
-               } else if (correct_index != actual_index) {
-                   GC_printf("\t\tBlock on list %d, should be on %d!!\n",
-                             actual_index, correct_index);
-               }
-               p += hhdr -> hb_sz;
-           } else {
-               GC_printf("\t%p\tused for blocks of size 0x%lx bytes\n", p,
-                         (unsigned long)(hhdr -> hb_sz));
-               p += HBLKSIZE * OBJ_SZ_TO_BLOCKS(hhdr -> hb_sz);
-           }
-       }
+                                        divHBLKSZ(hhdr -> hb_sz));
+                int actual_index;
+
+                GC_printf("\t%p\tfree block of size 0x%lx bytes%s\n", p,
+                          (unsigned long)(hhdr -> hb_sz),
+                          IS_MAPPED(hhdr) ? "" : " (unmapped)");
+                actual_index = free_list_index_of(hhdr);
+                if (-1 == actual_index) {
+                    GC_printf("\t\tBlock not on free list %d!!\n",
+                              correct_index);
+                } else if (correct_index != actual_index) {
+                    GC_printf("\t\tBlock on list %d, should be on %d!!\n",
+                              actual_index, correct_index);
+                }
+                p += hhdr -> hb_sz;
+            } else {
+                GC_printf("\t%p\tused for blocks of size 0x%lx bytes\n", p,
+                          (unsigned long)(hhdr -> hb_sz));
+                p += HBLKSIZE * OBJ_SZ_TO_BLOCKS(hhdr -> hb_sz);
+            }
+        }
     }
 }
 
 # endif /* NO_DEBUGGING */
 
-/* Initialize hdr for a block containing the indicated size and        */
-/* kind of objects.                                                    */
-/* Return FALSE on failure.                                            */
+/* Initialize hdr for a block containing the indicated size and         */
+/* kind of objects.                                                     */
+/* Return FALSE on failure.                                             */
 static GC_bool setup_header(hdr * hhdr, struct hblk *block, size_t byte_sz,
-                           int kind, unsigned flags)
+                            int kind, unsigned flags)
 {
     word descr;
 #   ifndef MARK_BIT_PER_OBJ
       size_t granules;
 #   endif
-    
+
     /* Set size, kind and mark proc fields */
       hhdr -> hb_sz = byte_sz;
       hhdr -> hb_obj_kind = (unsigned char)kind;
@@ -228,26 +229,26 @@ static GC_bool setup_header(hdr * hhdr, struct hblk *block, size_t byte_sz,
       descr = GC_obj_kinds[kind].ok_descriptor;
       if (GC_obj_kinds[kind].ok_relocate_descr) descr += byte_sz;
       hhdr -> hb_descr = descr;
-    
+
 #   ifdef MARK_BIT_PER_OBJ
-     /* Set hb_inv_sz as portably as possible.                                 */
+     /* Set hb_inv_sz as portably as possible.                          */
      /* We set it to the smallest value such that sz * inv_sz > 2**32    */
-     /* This may be more precision than necessary.                     */
+     /* This may be more precision than necessary.                      */
       if (byte_sz > MAXOBJBYTES) {
-        hhdr -> hb_inv_sz = LARGE_INV_SZ;
+         hhdr -> hb_inv_sz = LARGE_INV_SZ;
       } else {
-       word inv_sz;
+        word inv_sz;
 
 #       if CPP_WORDSZ == 64
           inv_sz = ((word)1 << 32)/byte_sz;
-         if (((inv_sz*byte_sz) >> 32) == 0) ++inv_sz;
-#      else  /* 32 bit words */
-         GC_ASSERT(byte_sz >= 4);
-         inv_sz = ((unsigned)1 << 31)/byte_sz;
-         inv_sz *= 2;
-         while (inv_sz*byte_sz > byte_sz) ++inv_sz;
-#      endif
-       hhdr -> hb_inv_sz = inv_sz;
+          if (((inv_sz*byte_sz) >> 32) == 0) ++inv_sz;
+#       else  /* 32 bit words */
+          GC_ASSERT(byte_sz >= 4);
+          inv_sz = ((unsigned)1 << 31)/byte_sz;
+          inv_sz *= 2;
+          while (inv_sz*byte_sz > byte_sz) ++inv_sz;
+#       endif
+        hhdr -> hb_inv_sz = inv_sz;
       }
 #   else /* MARK_BIT_PER_GRANULE */
       hhdr -> hb_large_block = (unsigned char)(byte_sz > MAXOBJBYTES);
@@ -264,10 +265,10 @@ static GC_bool setup_header(hdr * hhdr, struct hblk *block, size_t byte_sz,
         hhdr -> hb_map = GC_obj_map[index];
       }
 #   endif /* MARK_BIT_PER_GRANULE */
-      
+
     /* Clear mark bits */
-      GC_clear_hdr_marks(hhdr);
-      
+    GC_clear_hdr_marks(hhdr);
+
     hhdr -> hb_last_reclaimed = (unsigned short)GC_gc_no;
     return(TRUE);
 }
@@ -284,35 +285,35 @@ STATIC void GC_remove_from_fl(hdr *hhdr, int n)
 
     GC_ASSERT(((hhdr -> hb_sz) & (HBLKSIZE-1)) == 0);
 #   ifndef USE_MUNMAP
-      /* We always need index to mainatin free counts. */
+      /* We always need index to mainatin free counts.  */
       if (FL_UNKNOWN == n) {
           index = GC_hblk_fl_from_blocks(divHBLKSZ(hhdr -> hb_sz));
       } else {
-         index = n;
+          index = n;
       }
 #   endif
     if (hhdr -> hb_prev == 0) {
-#      ifdef USE_MUNMAP
-         if (FL_UNKNOWN == n) {
+#       ifdef USE_MUNMAP
+          if (FL_UNKNOWN == n) {
             index = GC_hblk_fl_from_blocks(divHBLKSZ(hhdr -> hb_sz));
-         } else {
-           index = n;
-         }
-#      endif
-       GC_ASSERT(HDR(GC_hblkfreelist[index]) == hhdr);
-       GC_hblkfreelist[index] = hhdr -> hb_next;
+          } else {
+            index = n;
+          }
+#       endif
+        GC_ASSERT(HDR(GC_hblkfreelist[index]) == hhdr);
+        GC_hblkfreelist[index] = hhdr -> hb_next;
     } else {
-       hdr *phdr;
-       GET_HDR(hhdr -> hb_prev, phdr);
-       phdr -> hb_next = hhdr -> hb_next;
+        hdr *phdr;
+        GET_HDR(hhdr -> hb_prev, phdr);
+        phdr -> hb_next = hhdr -> hb_next;
     }
     FREE_ASSERT(GC_free_bytes[index] >= hhdr -> hb_sz);
     INCR_FREE_BYTES(index, - (signed_word)(hhdr -> hb_sz));
     if (0 != hhdr -> hb_next) {
-       hdr * nhdr;
-       GC_ASSERT(!IS_FORWARDING_ADDR_OR_NIL(NHDR(hhdr)));
-       GET_HDR(hhdr -> hb_next, nhdr);
-       nhdr -> hb_prev = hhdr -> hb_prev;
+        hdr * nhdr;
+        GC_ASSERT(!IS_FORWARDING_ADDR_OR_NIL(NHDR(hhdr)));
+        GET_HDR(hhdr -> hb_next, nhdr);
+        nhdr -> hb_prev = hhdr -> hb_prev;
     }
 }
 
@@ -326,21 +327,21 @@ STATIC struct hblk * GC_free_block_ending_at(struct hblk *h)
 
     GET_HDR(p, phdr);
     while (0 != phdr && IS_FORWARDING_ADDR_OR_NIL(phdr)) {
-       p = FORWARDED_ADDR(p,phdr);
-       phdr = HDR(p);
+        p = FORWARDED_ADDR(p,phdr);
+        phdr = HDR(p);
     }
     if (0 != phdr) {
         if(HBLK_IS_FREE(phdr)) {
-           return p;
-       } else {
-           return 0;
-       }
+            return p;
+        } else {
+            return 0;
+        }
     }
     p = GC_prev_block(h - 1);
     if (0 != p) {
       phdr = HDR(p);
       if (HBLK_IS_FREE(phdr) && (ptr_t)p + phdr -> hb_sz == (ptr_t)h) {
-       return p;
+        return p;
       }
     }
     return 0;
@@ -362,9 +363,9 @@ STATIC void GC_add_to_fl(struct hblk *h, hdr *hhdr)
       hdr * prevhdr = HDR(prev);
       GC_ASSERT(nexthdr == 0 || !HBLK_IS_FREE(nexthdr)
                 || (signed_word)GC_heapsize < 0);
-               /* In the last case, blocks may be too large to merge. */
+                /* In the last case, blocks may be too large to merge. */
       GC_ASSERT(prev == 0 || !HBLK_IS_FREE(prevhdr)
-               || (signed_word)GC_heapsize < 0);
+                || (signed_word)GC_heapsize < 0);
 #   endif
     GC_ASSERT(((hhdr -> hb_sz) & (HBLKSIZE-1)) == 0);
     GC_hblkfreelist[index] = h;
@@ -381,94 +382,96 @@ STATIC void GC_add_to_fl(struct hblk *h, hdr *hhdr)
 
 #ifdef USE_MUNMAP
 
+#   ifndef MUNMAP_THRESHOLD
+#     define MUNMAP_THRESHOLD 6
+#   endif
+
+GC_INNER int GC_unmap_threshold = MUNMAP_THRESHOLD;
+
 /* Unmap blocks that haven't been recently touched.  This is the only way */
-/* way blocks are ever unmapped.                                         */
-void GC_unmap_old(void)
+/* way blocks are ever unmapped.                                          */
+GC_INNER void GC_unmap_old(void)
 {
     struct hblk * h;
     hdr * hhdr;
-    word sz;
-    unsigned short last_rec, threshold;
     int i;
-#   ifndef MUNMAP_THRESHOLD
-#     define MUNMAP_THRESHOLD 6
-#   endif
-    
+
+    if (GC_unmap_threshold == 0)
+      return; /* unmapping disabled */
+
     for (i = 0; i <= N_HBLK_FLS; ++i) {
       for (h = GC_hblkfreelist[i]; 0 != h; h = hhdr -> hb_next) {
         hhdr = HDR(h);
-       if (!IS_MAPPED(hhdr)) continue;
-       threshold = (unsigned short)(GC_gc_no - MUNMAP_THRESHOLD);
-       last_rec = hhdr -> hb_last_reclaimed;
-       if ((last_rec > GC_gc_no || last_rec < threshold)
-           && threshold < GC_gc_no /* not recently wrapped */) {
-          sz = hhdr -> hb_sz;
-         GC_unmap((ptr_t)h, sz);
-         hhdr -> hb_flags |= WAS_UNMAPPED;
-       }
+        if (!IS_MAPPED(hhdr)) continue;
+
+        if ((unsigned short)GC_gc_no - hhdr -> hb_last_reclaimed >
+                (unsigned short)GC_unmap_threshold) {
+          GC_unmap((ptr_t)h, hhdr -> hb_sz);
+          hhdr -> hb_flags |= WAS_UNMAPPED;
+        }
       }
-    }  
+    }
 }
 
-/* Merge all unmapped blocks that are adjacent to other free           */
-/* blocks.  This may involve remapping, since all blocks are either    */
-/* fully mapped or fully unmapped.                                     */
-void GC_merge_unmapped(void)
+/* Merge all unmapped blocks that are adjacent to other free            */
+/* blocks.  This may involve remapping, since all blocks are either     */
+/* fully mapped or fully unmapped.                                      */
+GC_INNER void GC_merge_unmapped(void)
 {
     struct hblk * h, *next;
     hdr * hhdr, *nexthdr;
     word size, nextsize;
     int i;
-    
+
     for (i = 0; i <= N_HBLK_FLS; ++i) {
       h = GC_hblkfreelist[i];
       while (h != 0) {
-       GET_HDR(h, hhdr);
-       size = hhdr->hb_sz;
-       next = (struct hblk *)((word)h + size);
-       GET_HDR(next, nexthdr);
-       /* Coalesce with successor, if possible */
-         if (0 != nexthdr && HBLK_IS_FREE(nexthdr)
-             && (signed_word) (size + (nextsize = nexthdr->hb_sz)) > 0
-                /* no pot. overflow */) {
-           /* Note that we usually try to avoid adjacent free blocks   */
-           /* that are either both mapped or both unmapped.  But that  */
-           /* isn't guaranteed to hold since we remap blocks when we   */
-           /* split them, and don't merge at that point.  It may also  */
-           /* not hold if the merged block would be too big.           */
-           if (IS_MAPPED(hhdr) && !IS_MAPPED(nexthdr)) {
-             /* make both consistent, so that we can merge */
-               if (size > nextsize) {
-                 GC_remap((ptr_t)next, nextsize);
-               } else {
-                 GC_unmap((ptr_t)h, size);
-                 GC_unmap_gap((ptr_t)h, size, (ptr_t)next, nextsize);
-                 hhdr -> hb_flags |= WAS_UNMAPPED;
-               }
-           } else if (IS_MAPPED(nexthdr) && !IS_MAPPED(hhdr)) {
-             if (size > nextsize) {
-               GC_unmap((ptr_t)next, nextsize);
-               GC_unmap_gap((ptr_t)h, size, (ptr_t)next, nextsize);
-             } else {
-               GC_remap((ptr_t)h, size);
-               hhdr -> hb_flags &= ~WAS_UNMAPPED;
-               hhdr -> hb_last_reclaimed = nexthdr -> hb_last_reclaimed;
-             }
-           } else if (!IS_MAPPED(hhdr) && !IS_MAPPED(nexthdr)) {
-             /* Unmap any gap in the middle */
-               GC_unmap_gap((ptr_t)h, size, (ptr_t)next, nextsize);
-           }
-           /* If they are both unmapped, we merge, but leave unmapped. */
-           GC_remove_from_fl(hhdr, i);
-           GC_remove_from_fl(nexthdr, FL_UNKNOWN);
-           hhdr -> hb_sz += nexthdr -> hb_sz; 
-           GC_remove_header(next);
-           GC_add_to_fl(h, hhdr); 
-           /* Start over at beginning of list */
-           h = GC_hblkfreelist[i];
-         } else /* not mergable with successor */ {
-           h = hhdr -> hb_next;
-         }
+        GET_HDR(h, hhdr);
+        size = hhdr->hb_sz;
+        next = (struct hblk *)((word)h + size);
+        GET_HDR(next, nexthdr);
+        /* Coalesce with successor, if possible */
+          if (0 != nexthdr && HBLK_IS_FREE(nexthdr)
+              && (signed_word) (size + (nextsize = nexthdr->hb_sz)) > 0
+                 /* no pot. overflow */) {
+            /* Note that we usually try to avoid adjacent free blocks   */
+            /* that are either both mapped or both unmapped.  But that  */
+            /* isn't guaranteed to hold since we remap blocks when we   */
+            /* split them, and don't merge at that point.  It may also  */
+            /* not hold if the merged block would be too big.           */
+            if (IS_MAPPED(hhdr) && !IS_MAPPED(nexthdr)) {
+              /* make both consistent, so that we can merge */
+                if (size > nextsize) {
+                  GC_remap((ptr_t)next, nextsize);
+                } else {
+                  GC_unmap((ptr_t)h, size);
+                  GC_unmap_gap((ptr_t)h, size, (ptr_t)next, nextsize);
+                  hhdr -> hb_flags |= WAS_UNMAPPED;
+                }
+            } else if (IS_MAPPED(nexthdr) && !IS_MAPPED(hhdr)) {
+              if (size > nextsize) {
+                GC_unmap((ptr_t)next, nextsize);
+                GC_unmap_gap((ptr_t)h, size, (ptr_t)next, nextsize);
+              } else {
+                GC_remap((ptr_t)h, size);
+                hhdr -> hb_flags &= ~WAS_UNMAPPED;
+                hhdr -> hb_last_reclaimed = nexthdr -> hb_last_reclaimed;
+              }
+            } else if (!IS_MAPPED(hhdr) && !IS_MAPPED(nexthdr)) {
+              /* Unmap any gap in the middle */
+                GC_unmap_gap((ptr_t)h, size, (ptr_t)next, nextsize);
+            }
+            /* If they are both unmapped, we merge, but leave unmapped. */
+            GC_remove_from_fl(hhdr, i);
+            GC_remove_from_fl(nexthdr, FL_UNKNOWN);
+            hhdr -> hb_sz += nexthdr -> hb_sz;
+            GC_remove_header(next);
+            GC_add_to_fl(h, hhdr);
+            /* Start over at beginning of list */
+            h = GC_hblkfreelist[i];
+          } else /* not mergable with successor */ {
+            h = hhdr -> hb_next;
+          }
       } /* while (h != 0) ... */
     } /* for ... */
 }
@@ -485,7 +488,7 @@ void GC_merge_unmapped(void)
  * If the return value is not 0, then hhdr is the header for it.
  */
 STATIC struct hblk * GC_get_first_part(struct hblk *h, hdr *hhdr,
-                                      size_t bytes, int index)
+                                       size_t bytes, int index)
 {
     word total_size = hhdr -> hb_sz;
     struct hblk * rest;
@@ -497,9 +500,9 @@ STATIC struct hblk * GC_get_first_part(struct hblk *h, hdr *hhdr,
     rest = (struct hblk *)((word)h + bytes);
     rest_hdr = GC_install_header(rest);
     if (0 == rest_hdr) {
-       /* FIXME: This is likely to be very bad news ... */
-       WARN("Header allocation failed: Dropping block.\n", 0);
-       return(0);
+        /* FIXME: This is likely to be very bad news ... */
+        WARN("Header allocation failed: Dropping block.\n", 0);
+        return(0);
     }
     rest_hdr -> hb_sz = total_size - bytes;
     rest_hdr -> hb_flags = 0;
@@ -526,7 +529,7 @@ STATIC struct hblk * GC_get_first_part(struct hblk *h, hdr *hhdr,
  * rare enough that it doesn't matter.  The code is cleaner this way.)
  */
 STATIC void GC_split_block(struct hblk *h, hdr *hhdr, struct hblk *n,
-                          hdr *nhdr, int index /* Index of free list */)
+                           hdr *nhdr, int index /* Index of free list */)
 {
     word total_size = hhdr -> hb_sz;
     word h_size = (word)n - (word)h;
@@ -539,12 +542,12 @@ STATIC void GC_split_block(struct hblk *h, hdr *hhdr, struct hblk *n,
       nhdr -> hb_sz = total_size - h_size;
       nhdr -> hb_flags = 0;
       if (0 != prev) {
-       HDR(prev) -> hb_next = n;
+        HDR(prev) -> hb_next = n;
       } else {
         GC_hblkfreelist[index] = n;
       }
       if (0 != next) {
-       HDR(next) -> hb_prev = n;
+        HDR(next) -> hb_prev = n;
       }
       INCR_FREE_BYTES(index, -(signed_word)h_size);
       FREE_ASSERT(GC_free_bytes[index] > 0);
@@ -555,10 +558,10 @@ STATIC void GC_split_block(struct hblk *h, hdr *hhdr, struct hblk *n,
     GC_add_to_fl(h, hhdr);
     nhdr -> hb_flags |= FREE_BLK;
 }
-       
+
 STATIC struct hblk *
 GC_allochblk_nth(size_t sz/* bytes */, int kind, unsigned flags, int n,
-                GC_bool may_split);
+                 GC_bool may_split);
 
 /*
  * Allocate (and return pointer to) a heap block
@@ -569,15 +572,15 @@ GC_allochblk_nth(size_t sz/* bytes */, int kind, unsigned flags, int n,
  *
  * The client is responsible for clearing the block, if necessary.
  */
-struct hblk *
+GC_INNER struct hblk *
 GC_allochblk(size_t sz, int kind, unsigned flags/* IGNORE_OFF_PAGE or 0 */)
 {
     word blocks;
     int start_list;
     int i;
     struct hblk *result;
-    int split_limit; /* Highest index of free list whose blocks we     */
-                    /* split.                                          */
+    int split_limit; /* Highest index of free list whose blocks we      */
+                     /* split.                                          */
 
     GC_ASSERT((sz & (GRANULE_BYTES - 1)) == 0);
     blocks = OBJ_SZ_TO_BLOCKS(sz);
@@ -589,41 +592,45 @@ GC_allochblk(size_t sz, int kind, unsigned flags/* IGNORE_OFF_PAGE or 0 */)
     result = GC_allochblk_nth(sz, kind, flags, start_list, FALSE);
     if (0 != result) return result;
     if (GC_use_entire_heap || GC_dont_gc
-       || USED_HEAP_SIZE < GC_requested_heapsize
+        || USED_HEAP_SIZE < GC_requested_heapsize
         || GC_incremental || !GC_should_collect()) {
-       /* Should use more of the heap, even if it requires splitting. */
-       split_limit = N_HBLK_FLS;
+        /* Should use more of the heap, even if it requires splitting. */
+        split_limit = N_HBLK_FLS;
     } else {
 #     ifdef USE_MUNMAP
-       /* avoid splitting, since that might require remapping */
-       split_limit = 0;
+        /* avoid splitting, since that might require remapping */
+        split_limit = 0;
 #     else
-       if (GC_finalizer_bytes_freed > (GC_heapsize >> 4))  {
-         /* If we are deallocating lots of memory from         */
-         /* finalizers, fail and collect sooner rather         */
-         /* than later.                                        */
-         split_limit = 0;
-       } else {
-         /* If we have enough large blocks left to cover any   */
-         /* previous request for large blocks, we go ahead     */
-         /* and split.  Assuming a steady state, that should   */
-         /* be safe.  It means that we can use the full        */
-         /* heap if we allocate only small objects.            */
+        if (GC_finalizer_bytes_freed > (GC_heapsize >> 4)) {
+          /* If we are deallocating lots of memory from         */
+          /* finalizers, fail and collect sooner rather         */
+          /* than later.                                        */
+          split_limit = 0;
+        } else {
+          /* If we have enough large blocks left to cover any   */
+          /* previous request for large blocks, we go ahead     */
+          /* and split.  Assuming a steady state, that should   */
+          /* be safe.  It means that we can use the full        */
+          /* heap if we allocate only small objects.            */
           split_limit = GC_enough_large_bytes_left();
-       }
+        }
 #     endif
     }
     if (start_list < UNIQUE_THRESHOLD) {
-      /* No reason to try start_list again, since all blocks are exact */
-      /* matches.                                                      */
+      /* No reason to try start_list again, since all blocks are exact  */
+      /* matches.                                                       */
       ++start_list;
     }
     for (i = start_list; i <= split_limit; ++i) {
-       struct hblk * result = GC_allochblk_nth(sz, kind, flags, i, TRUE);
-       if (0 != result) return result;
+        struct hblk * result = GC_allochblk_nth(sz, kind, flags, i, TRUE);
+        if (0 != result) return result;
     }
     return 0;
 }
+
+STATIC long GC_large_alloc_warn_suppressed = 0;
+                        /* Number of warnings suppressed so far.        */
+
 /*
  * The same, but with search restricted to nth free list.
  * Flags is IGNORE_OFF_PAGE or zero.
@@ -631,156 +638,157 @@ GC_allochblk(size_t sz, int kind, unsigned flags/* IGNORE_OFF_PAGE or 0 */)
  * The may_split flag indicates whether it's OK to split larger blocks.
  */
 STATIC struct hblk *
-GC_allochblk_nth(size_t sz, int kind, unsigned flags, int n, GC_bool may_split)
+GC_allochblk_nth(size_t sz, int kind, unsigned flags, int n,
+                 GC_bool may_split)
 {
     struct hblk *hbp;
-    hdr * hhdr;                /* Header corr. to hbp */
-                       /* Initialized after loop if hbp !=0    */
-                       /* Gcc uninitialized use warning is bogus.      */
+    hdr * hhdr;         /* Header corr. to hbp */
+                        /* Initialized after loop if hbp !=0    */
+                        /* Gcc uninitialized use warning is bogus.      */
     struct hblk *thishbp;
-    hdr * thishdr;             /* Header corr. to hbp */
+    hdr * thishdr;              /* Header corr. to hbp */
     signed_word size_needed;    /* number of bytes in requested objects */
-    signed_word size_avail;    /* bytes available in this block        */
+    signed_word size_avail;     /* bytes available in this block        */
 
     size_needed = HBLKSIZE * OBJ_SZ_TO_BLOCKS(sz);
 
     /* search for a big enough block in free list */
-       hbp = GC_hblkfreelist[n];
-       for(; 0 != hbp; hbp = hhdr -> hb_next) {
-           GET_HDR(hbp, hhdr);
-           size_avail = hhdr->hb_sz;
-           if (size_avail < size_needed) continue;
-           if (size_avail != size_needed) {
-             signed_word next_size;
-
-             if (!may_split) continue;
-             /* If the next heap block is obviously better, go on.     */
-             /* This prevents us from disassembling a single large block */
-             /* to get tiny blocks.                                    */
-             thishbp = hhdr -> hb_next;
-             if (thishbp != 0) {
-               GET_HDR(thishbp, thishdr);
-               next_size = (signed_word)(thishdr -> hb_sz);
-               if (next_size < size_avail
-                   && next_size >= size_needed
-                   && !GC_is_black_listed(thishbp, (word)size_needed)) {
-                   continue;
-               }
-             }
-           }
-           if ( !IS_UNCOLLECTABLE(kind) &&
-                (kind != PTRFREE || size_needed > MAX_BLACK_LIST_ALLOC)) {
-             struct hblk * lasthbp = hbp;
-             ptr_t search_end = (ptr_t)hbp + size_avail - size_needed;
-             signed_word orig_avail = size_avail;
-             signed_word eff_size_needed = ((flags & IGNORE_OFF_PAGE)?
-                                               HBLKSIZE
-                                               : size_needed);
-             
-             
-             while ((ptr_t)lasthbp <= search_end
-                    && (thishbp = GC_is_black_listed(lasthbp,
-                                                     (word)eff_size_needed))
-                       != 0) {
-               lasthbp = thishbp;
-             }
-             size_avail -= (ptr_t)lasthbp - (ptr_t)hbp;
-             thishbp = lasthbp;
-             if (size_avail >= size_needed) {
-               if (thishbp != hbp &&
-                   0 != (thishdr = GC_install_header(thishbp))) {
-                 /* Make sure it's mapped before we mangle it. */
-#                  ifdef USE_MUNMAP
-                     if (!IS_MAPPED(hhdr)) {
-                       GC_remap((ptr_t)hbp, hhdr -> hb_sz);
-                       hhdr -> hb_flags &= ~WAS_UNMAPPED;
-                     }
-#                  endif
-                 /* Split the block at thishbp */
-                     GC_split_block(hbp, hhdr, thishbp, thishdr, n);
-                 /* Advance to thishbp */
-                     hbp = thishbp;
-                     hhdr = thishdr;
-                     /* We must now allocate thishbp, since it may     */
-                     /* be on the wrong free list.                     */
-               }
-             } else if (size_needed > (signed_word)BL_LIMIT
-                        && orig_avail - size_needed
-                           > (signed_word)BL_LIMIT) {
-               /* Punt, since anything else risks unreasonable heap growth. */
-               if (++GC_large_alloc_warn_suppressed
-                   >= GC_large_alloc_warn_interval) {
-                 WARN("Repeated allocation of very large block "
-                      "(appr. size %ld):\n"
-                      "\tMay lead to memory leak and poor performance.\n",
-                      size_needed);
-                 GC_large_alloc_warn_suppressed = 0;
-               }
-               size_avail = orig_avail;
-             } else if (size_avail == 0 && size_needed == HBLKSIZE
-                        && IS_MAPPED(hhdr)) {
-               if (!GC_find_leak) {
-                 static unsigned count = 0;
-                 
-                 /* The block is completely blacklisted.  We need      */
-                 /* to drop some such blocks, since otherwise we spend */
-                 /* all our time traversing them if pointerfree        */
-                 /* blocks are unpopular.                              */
-                 /* A dropped block will be reconsidered at next GC.   */
-                 if ((++count & 3) == 0) {
-                   /* Allocate and drop the block in small chunks, to  */
-                   /* maximize the chance that we will recover some    */
-                   /* later.                                           */
-                     word total_size = hhdr -> hb_sz;
-                     struct hblk * limit = hbp + divHBLKSZ(total_size);
-                     struct hblk * h;
-                     struct hblk * prev = hhdr -> hb_prev;
-                     
-                     GC_large_free_bytes -= total_size;
-                     GC_bytes_dropped += total_size;
-                     GC_remove_from_fl(hhdr, n);
-                     for (h = hbp; h < limit; h++) {
-                       if (h == hbp || 0 != (hhdr = GC_install_header(h))) {
-                         (void) setup_header(
-                                 hhdr, h,
-                                 HBLKSIZE,
-                                 PTRFREE, 0); /* Cant fail */
-                         if (GC_debugging_started) {
-                           BZERO(h, HBLKSIZE);
-                         }
-                       }
-                     }
-                   /* Restore hbp to point at free block */
-                     hbp = prev;
-                     if (0 == hbp) {
-                       return GC_allochblk_nth(sz, kind, flags, n, may_split);
-                     }
-                     hhdr = HDR(hbp);
-                 }
-               }
-             }
-           }
-           if( size_avail >= size_needed ) {
-#              ifdef USE_MUNMAP
-                 if (!IS_MAPPED(hhdr)) {
-                   GC_remap((ptr_t)hbp, hhdr -> hb_sz);
-                   hhdr -> hb_flags &= ~WAS_UNMAPPED;
-                   /* Note: This may leave adjacent, mapped free blocks. */
-                 }
-#              endif
-               /* hbp may be on the wrong freelist; the parameter n    */
-               /* is important.                                        */
-               hbp = GC_get_first_part(hbp, hhdr, size_needed, n);
-               break;
-           }
-       }
+        hbp = GC_hblkfreelist[n];
+        for(; 0 != hbp; hbp = hhdr -> hb_next) {
+            GET_HDR(hbp, hhdr);
+            size_avail = hhdr->hb_sz;
+            if (size_avail < size_needed) continue;
+            if (size_avail != size_needed) {
+              signed_word next_size;
+
+              if (!may_split) continue;
+              /* If the next heap block is obviously better, go on.     */
+              /* This prevents us from disassembling a single large block */
+              /* to get tiny blocks.                                    */
+              thishbp = hhdr -> hb_next;
+              if (thishbp != 0) {
+                GET_HDR(thishbp, thishdr);
+                next_size = (signed_word)(thishdr -> hb_sz);
+                if (next_size < size_avail
+                    && next_size >= size_needed
+                    && !GC_is_black_listed(thishbp, (word)size_needed)) {
+                    continue;
+                }
+              }
+            }
+            if ( !IS_UNCOLLECTABLE(kind) &&
+                 (kind != PTRFREE || size_needed > MAX_BLACK_LIST_ALLOC)) {
+              struct hblk * lasthbp = hbp;
+              ptr_t search_end = (ptr_t)hbp + size_avail - size_needed;
+              signed_word orig_avail = size_avail;
+              signed_word eff_size_needed = ((flags & IGNORE_OFF_PAGE)?
+                                                HBLKSIZE
+                                                : size_needed);
+
+
+              while ((ptr_t)lasthbp <= search_end
+                     && (thishbp = GC_is_black_listed(lasthbp,
+                                                      (word)eff_size_needed))
+                        != 0) {
+                lasthbp = thishbp;
+              }
+              size_avail -= (ptr_t)lasthbp - (ptr_t)hbp;
+              thishbp = lasthbp;
+              if (size_avail >= size_needed) {
+                if (thishbp != hbp &&
+                    0 != (thishdr = GC_install_header(thishbp))) {
+                  /* Make sure it's mapped before we mangle it. */
+#                   ifdef USE_MUNMAP
+                      if (!IS_MAPPED(hhdr)) {
+                        GC_remap((ptr_t)hbp, hhdr -> hb_sz);
+                        hhdr -> hb_flags &= ~WAS_UNMAPPED;
+                      }
+#                   endif
+                  /* Split the block at thishbp */
+                      GC_split_block(hbp, hhdr, thishbp, thishdr, n);
+                  /* Advance to thishbp */
+                      hbp = thishbp;
+                      hhdr = thishdr;
+                      /* We must now allocate thishbp, since it may     */
+                      /* be on the wrong free list.                     */
+                }
+              } else if (size_needed > (signed_word)BL_LIMIT
+                         && orig_avail - size_needed
+                            > (signed_word)BL_LIMIT) {
+                /* Punt, since anything else risks unreasonable heap growth. */
+                if (++GC_large_alloc_warn_suppressed
+                    >= GC_large_alloc_warn_interval) {
+                  WARN("Repeated allocation of very large block "
+                       "(appr. size %" GC_PRIdPTR "):\n"
+                       "\tMay lead to memory leak and poor performance.\n",
+                       size_needed);
+                  GC_large_alloc_warn_suppressed = 0;
+                }
+                size_avail = orig_avail;
+              } else if (size_avail == 0 && size_needed == HBLKSIZE
+                         && IS_MAPPED(hhdr)) {
+                if (!GC_find_leak) {
+                  static unsigned count = 0;
+
+                  /* The block is completely blacklisted.  We need      */
+                  /* to drop some such blocks, since otherwise we spend */
+                  /* all our time traversing them if pointerfree        */
+                  /* blocks are unpopular.                              */
+                  /* A dropped block will be reconsidered at next GC.   */
+                  if ((++count & 3) == 0) {
+                    /* Allocate and drop the block in small chunks, to  */
+                    /* maximize the chance that we will recover some    */
+                    /* later.                                           */
+                      word total_size = hhdr -> hb_sz;
+                      struct hblk * limit = hbp + divHBLKSZ(total_size);
+                      struct hblk * h;
+                      struct hblk * prev = hhdr -> hb_prev;
+
+                      GC_large_free_bytes -= total_size;
+                      GC_bytes_dropped += total_size;
+                      GC_remove_from_fl(hhdr, n);
+                      for (h = hbp; h < limit; h++) {
+                        if (h == hbp || 0 != (hhdr = GC_install_header(h))) {
+                          (void) setup_header(
+                                  hhdr, h,
+                                  HBLKSIZE,
+                                  PTRFREE, 0); /* Can't fail */
+                          if (GC_debugging_started) {
+                            BZERO(h, HBLKSIZE);
+                          }
+                        }
+                      }
+                    /* Restore hbp to point at free block */
+                      hbp = prev;
+                      if (0 == hbp) {
+                        return GC_allochblk_nth(sz, kind, flags, n, may_split);
+                      }
+                      hhdr = HDR(hbp);
+                  }
+                }
+              }
+            }
+            if( size_avail >= size_needed ) {
+#               ifdef USE_MUNMAP
+                  if (!IS_MAPPED(hhdr)) {
+                    GC_remap((ptr_t)hbp, hhdr -> hb_sz);
+                    hhdr -> hb_flags &= ~WAS_UNMAPPED;
+                    /* Note: This may leave adjacent, mapped free blocks. */
+                  }
+#               endif
+                /* hbp may be on the wrong freelist; the parameter n    */
+                /* is important.                                        */
+                hbp = GC_get_first_part(hbp, hhdr, size_needed, n);
+                break;
+            }
+        }
 
     if (0 == hbp) return 0;
-       
+
     /* Add it to map of valid blocks */
-       if (!GC_install_counts(hbp, (word)size_needed)) return(0);
-       /* This leaks memory under very rare conditions. */
-               
+        if (!GC_install_counts(hbp, (word)size_needed)) return(0);
+        /* This leaks memory under very rare conditions. */
+
     /* Set up header */
         if (!setup_header(hhdr, hbp, sz, kind, flags)) {
             GC_remove_counts(hbp, (word)size_needed);
@@ -790,25 +798,21 @@ GC_allochblk_nth(size_t sz, int kind, unsigned flags, int n, GC_bool may_split)
     /* Notify virtual dirty bit implementation that we are about to write.  */
     /* Ensure that pointerfree objects are not protected if it's avoidable. */
     /* This also ensures that newly allocated blocks are treated as dirty.  */
-    /* Necessary since we don't protect free blocks.                       */
-       GC_ASSERT((size_needed & (HBLKSIZE-1)) == 0);
-       GC_remove_protection(hbp, divHBLKSZ(size_needed),
-                            (hhdr -> hb_descr == 0) /* pointer-free */);
-        
-    /* We just successfully allocated a block.  Restart count of       */
-    /* consecutive failures.                                           */
-    {
-       extern unsigned GC_fail_count;
-       
-       GC_fail_count = 0;
-    }
+    /* Necessary since we don't protect free blocks.                        */
+        GC_ASSERT((size_needed & (HBLKSIZE-1)) == 0);
+        GC_remove_protection(hbp, divHBLKSZ(size_needed),
+                             (hhdr -> hb_descr == 0) /* pointer-free */);
+
+    /* We just successfully allocated a block.  Restart count of        */
+    /* consecutive failures.                                            */
+    GC_fail_count = 0;
 
     GC_large_free_bytes -= size_needed;
-    
+
     GC_ASSERT(IS_MAPPED(hhdr));
     return( hbp );
 }
+
 /*
  * Free a heap block.
  *
@@ -816,13 +820,11 @@ GC_allochblk_nth(size_t sz, int kind, unsigned flags, int n, GC_bool may_split)
  *
  * All mark words are assumed to be cleared.
  */
-void
-GC_freehblk(struct hblk *hbp)
+GC_INNER void GC_freehblk(struct hblk *hbp)
 {
-struct hblk *next, *prev;
-hdr *hhdr, *prevhdr, *nexthdr;
-signed_word size;
-
+    struct hblk *next, *prev;
+    hdr *hhdr, *prevhdr, *nexthdr;
+    signed_word size;
 
     GET_HDR(hbp, hhdr);
     size = hhdr->hb_sz;
@@ -830,18 +832,18 @@ signed_word size;
     if (size <= 0)
       ABORT("Deallocating excessively large block.  Too large an allocation?");
       /* Probably possible if we try to allocate more than half the address */
-      /* space at once.  If we dont catch it here, strange things happen    */
-      /* later.                                                                    */
+      /* space at once.  If we don't catch it here, strange things happen   */
+      /* later.                                                             */
     GC_remove_counts(hbp, (word)size);
     hhdr->hb_sz = size;
 #   ifdef USE_MUNMAP
       hhdr -> hb_last_reclaimed = (unsigned short)GC_gc_no;
 #   endif
-    
+
     /* Check for duplicate deallocation in the easy case */
       if (HBLK_IS_FREE(hhdr)) {
         GC_printf("Duplicate large block deallocation of %p\n", hbp);
-       ABORT("Duplicate large block deallocation");
+        ABORT("Duplicate large block deallocation");
       }
 
     GC_ASSERT(IS_MAPPED(hhdr));
@@ -852,31 +854,30 @@ signed_word size;
     /* Coalesce with successor, if possible */
       if(0 != nexthdr && HBLK_IS_FREE(nexthdr) && IS_MAPPED(nexthdr)
          && (signed_word)(hhdr -> hb_sz + nexthdr -> hb_sz) > 0
-        /* no overflow */) {
-       GC_remove_from_fl(nexthdr, FL_UNKNOWN);
-       hhdr -> hb_sz += nexthdr -> hb_sz; 
-       GC_remove_header(next);
+         /* no overflow */) {
+        GC_remove_from_fl(nexthdr, FL_UNKNOWN);
+        hhdr -> hb_sz += nexthdr -> hb_sz;
+        GC_remove_header(next);
       }
     /* Coalesce with predecessor, if possible. */
       if (0 != prev) {
-       prevhdr = HDR(prev);
-       if (IS_MAPPED(prevhdr)
-           && (signed_word)(hhdr -> hb_sz + prevhdr -> hb_sz) > 0) {
-         GC_remove_from_fl(prevhdr, FL_UNKNOWN);
-         prevhdr -> hb_sz += hhdr -> hb_sz;
-#        ifdef USE_MUNMAP
-           prevhdr -> hb_last_reclaimed = (unsigned short)GC_gc_no;
-#        endif
-         GC_remove_header(hbp);
-         hbp = prev;
-         hhdr = prevhdr;
-       }
+        prevhdr = HDR(prev);
+        if (IS_MAPPED(prevhdr)
+            && (signed_word)(hhdr -> hb_sz + prevhdr -> hb_sz) > 0) {
+          GC_remove_from_fl(prevhdr, FL_UNKNOWN);
+          prevhdr -> hb_sz += hhdr -> hb_sz;
+#         ifdef USE_MUNMAP
+            prevhdr -> hb_last_reclaimed = (unsigned short)GC_gc_no;
+#         endif
+          GC_remove_header(hbp);
+          hbp = prev;
+          hhdr = prevhdr;
+        }
       }
-    /* FIXME: It is not clear we really always want to do these merges */
-    /* with -DUSE_MUNMAP, since it updates ages and hence prevents     */
-    /* unmapping.                                                      */
+    /* FIXME: It is not clear we really always want to do these merges  */
+    /* with USE_MUNMAP, since it updates ages and hence prevents        */
+    /* unmapping.                                                       */
 
     GC_large_free_bytes += size;
-    GC_add_to_fl(hbp, hhdr);    
+    GC_add_to_fl(hbp, hhdr);
 }
-
index 3a61fb52dd98390e98429a9a751ea74b07a66c22..2723d47f4d40247091908ede9a7ebde85f8eaf6f 100644 (file)
  *
  */
 
+#include "private/gc_priv.h"
 
-# include "private/gc_priv.h"
-
-# include <stdio.h>
-# if !defined(MACOS) && !defined(MSWINCE)
-#   include <signal.h>
-#   include <sys/types.h>
-# endif
+#include <stdio.h>
+#if !defined(MACOS) && !defined(MSWINCE)
+# include <signal.h>
+# include <sys/types.h>
+#endif
 
 /*
  * Separate free lists are maintained for different sized objects
  */
 
 /*
- *  The allocator uses GC_allochblk to allocate large chunks of objects.
+ * The allocator uses GC_allochblk to allocate large chunks of objects.
  * These chunks all start on addresses which are multiples of
  * HBLKSZ.   Each allocated chunk has an associated header,
  * which can be located quickly based on the address of the chunk.
- * (See headers.c for details.) 
+ * (See headers.c for details.)
  * This makes it possible to check quickly whether an
  * arbitrary address corresponds to an object administered by the
  * allocator.
@@ -59,33 +58,31 @@ word GC_non_gc_bytes = 0;  /* Number of bytes not intended to be collected */
 
 word GC_gc_no = 0;
 
-#ifndef SMALL_CONFIG
-  int GC_incremental = 0;  /* By default, stop the world.      */
+#ifndef GC_DISABLE_INCREMENTAL
+  GC_INNER int GC_incremental = 0;      /* By default, stop the world.  */
 #endif
 
-int GC_parallel = FALSE;   /* By default, parallel GC is off.  */
+int GC_parallel = FALSE;   /* By default, parallel GC is off.   */
 
 #ifndef GC_FULL_FREQ
-# define GC_FULL_FREQ 19   /* Every 20th collection is a full  */
-                          /* collection, whether we need it    */
-                          /* or not.                           */
+# define GC_FULL_FREQ 19   /* Every 20th collection is a full   */
+                           /* collection, whether we need it    */
+                           /* or not.                           */
 #endif
 
 int GC_full_freq = GC_FULL_FREQ;
 
 STATIC GC_bool GC_need_full_gc = FALSE;
-                          /* Need full GC do to heap growth.   */
+                           /* Need full GC do to heap growth.   */
 
-#ifdef THREADS
-  GC_bool GC_world_stopped = FALSE;
-# define IF_THREADS(x) x
-#else
-# define IF_THREADS(x)
+#ifdef THREAD_LOCAL_ALLOC
+  GC_INNER GC_bool GC_world_stopped = FALSE;
 #endif
 
 STATIC word GC_used_heap_size_after_full = 0;
 
-char * GC_copyright[] =
+/* GC_copyright symbol is externally visible. */
+char * const GC_copyright[] =
 {"Copyright 1988,1989 Hans-J. Boehm and Alan J. Demers ",
 "Copyright (c) 1991-1995 by Xerox Corporation.  All rights reserved. ",
 "Copyright (c) 1996-1998 by Silicon Graphics.  All rights reserved. ",
@@ -94,20 +91,21 @@ char * GC_copyright[] =
 " EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.",
 "See source code for details." };
 
-/* Version macros are now defined in gc_version.h, which is included by        */
-/* gc.h, which is included by gc_priv.h".                              */
-
+/* Version macros are now defined in gc_version.h, which is included by */
+/* gc.h, which is included by gc_priv.h.                                */
 #ifndef GC_NO_VERSION_VAR
+  const unsigned GC_version = ((GC_VERSION_MAJOR << 16) |
+                        (GC_VERSION_MINOR << 8) | GC_TMP_ALPHA_VERSION);
+#endif
 
-unsigned GC_version = ((GC_VERSION_MAJOR << 16) | (GC_VERSION_MINOR << 8) | GC_TMP_ALPHA_VERSION);
-
-#endif /* GC_NO_VERSION_VAR */
+GC_API unsigned GC_CALL GC_get_version(void)
+{
+  return (GC_VERSION_MAJOR << 16) | (GC_VERSION_MINOR << 8) |
+          GC_TMP_ALPHA_VERSION;
+}
 
 /* some more variables */
 
-extern signed_word GC_bytes_found; /* Number of reclaimed bytes                */
-                                 /* after garbage collection           */
-
 #ifdef GC_DONT_EXPAND
   GC_bool GC_dont_expand = TRUE;
 #else
@@ -120,111 +118,149 @@ extern signed_word GC_bytes_found; /* Number of reclaimed bytes         */
 
 word GC_free_space_divisor = GC_FREE_SPACE_DIVISOR;
 
-extern GC_bool GC_collection_in_progress(void);
-               /* Collection is in progress, or was abandoned. */
-
-int GC_CALLBACK GC_never_stop_func (void) { return(0); }
+GC_INNER int GC_CALLBACK GC_never_stop_func(void)
+{
+  return(0);
+}
 
 #ifndef GC_TIME_LIMIT
-# define GC_TIME_LIMIT 50  /* We try to keep pause times from exceeding         */
-                          /* this by much. In milliseconds.             */
+# define GC_TIME_LIMIT 50  /* We try to keep pause times from exceeding  */
+                           /* this by much. In milliseconds.             */
 #endif
 
 unsigned long GC_time_limit = GC_TIME_LIMIT;
 
 #ifndef NO_CLOCK
-STATIC CLOCK_TYPE GC_start_time;/* Time at which we stopped world.     */
-                               /* used only in GC_timeout_stop_func.   */
+  STATIC CLOCK_TYPE GC_start_time = 0;
+                                /* Time at which we stopped world.      */
+                                /* used only in GC_timeout_stop_func.   */
 #endif
 
-STATIC int GC_n_attempts = 0;  /* Number of attempts at finishing      */
-                               /* collection within GC_time_limit.     */
+STATIC int GC_n_attempts = 0;   /* Number of attempts at finishing      */
+                                /* collection within GC_time_limit.     */
+
+STATIC GC_stop_func GC_default_stop_func = GC_never_stop_func;
+                                /* accessed holding the lock.           */
+
+GC_API void GC_CALL GC_set_stop_func(GC_stop_func stop_func)
+{
+  GC_ASSERT(stop_func != 0);
+  LOCK();
+  GC_default_stop_func = stop_func;
+  UNLOCK();
+}
 
-#if defined(SMALL_CONFIG) || defined(NO_CLOCK)
-#   define GC_timeout_stop_func GC_never_stop_func
+GC_API GC_stop_func GC_CALL GC_get_stop_func(void)
+{
+  GC_stop_func stop_func;
+  LOCK();
+  stop_func = GC_default_stop_func;
+  UNLOCK();
+  return stop_func;
+}
+
+#if defined(GC_DISABLE_INCREMENTAL) || defined(NO_CLOCK)
+# define GC_timeout_stop_func GC_default_stop_func
 #else
   STATIC int GC_CALLBACK GC_timeout_stop_func (void)
   {
     CLOCK_TYPE current_time;
     static unsigned count = 0;
     unsigned long time_diff;
-    
+
+    if ((*GC_default_stop_func)())
+      return(1);
+
     if ((count++ & 3) != 0) return(0);
     GET_TIME(current_time);
     time_diff = MS_TIME_DIFF(current_time,GC_start_time);
     if (time_diff >= GC_time_limit) {
-       if (GC_print_stats) {
-           GC_log_printf(
-               "Abandoning stopped marking after %lu msecs (attempt %d)\n",
-               time_diff, GC_n_attempts);
-       }
-       return(1);
+        if (GC_print_stats) {
+            GC_log_printf(
+                "Abandoning stopped marking after %lu msecs (attempt %d)\n",
+                time_diff, GC_n_attempts);
+        }
+        return(1);
     }
     return(0);
   }
-#endif /* !SMALL_CONFIG */
+#endif /* !GC_DISABLE_INCREMENTAL */
+
+#ifdef THREADS
+  GC_INNER word GC_total_stacksize = 0; /* updated on every push_all_stacks */
+#endif
 
-/* Return the minimum number of words that must be allocated between   */
-/* collections to amortize the collection cost.                                */
+/* Return the minimum number of words that must be allocated between    */
+/* collections to amortize the collection cost.                         */
 static word min_bytes_allocd(void)
 {
-#   ifdef THREADS
-       /* We punt, for now. */
-       signed_word stack_size = 10000;
+    int dummy; /* GC_stackbottom is used only for a single-threaded case. */
+#   ifdef STACK_GROWS_UP
+      word stack_size = (ptr_t)(&dummy) - GC_stackbottom;
 #   else
-        int dummy;
-        signed_word stack_size = (ptr_t)(&dummy) - GC_stackbottom;
+      word stack_size = GC_stackbottom - (ptr_t)(&dummy);
 #   endif
-    word total_root_size;          /* includes double stack size,      */
-                                   /* since the stack is expensive     */
-                                   /* to scan.                         */
-    word scan_size;            /* Estimate of memory to be scanned     */
-                               /* during normal GC.                    */
-    
-    if (stack_size < 0) stack_size = -stack_size;
+
+    word total_root_size;       /* includes double stack size,  */
+                                /* since the stack is expensive */
+                                /* to scan.                     */
+    word scan_size;             /* Estimate of memory to be scanned     */
+                                /* during normal GC.                    */
+
+#   ifdef THREADS
+      if (GC_need_to_lock) {
+        /* We are multi-threaded... */
+        stack_size = GC_total_stacksize;
+        /* For now, we just use the value computed during the latest GC. */
+#       ifdef DEBUG_THREADS
+          GC_printf("Total stacks size: %lu\n", (unsigned long)stack_size);
+#       endif
+      }
+#   endif
+
     total_root_size = 2 * stack_size + GC_root_size;
-    scan_size = 2 * GC_composite_in_use + GC_atomic_in_use/4
-               + total_root_size;
-    if (TRUE_INCREMENTAL) {
+    scan_size = 2 * GC_composite_in_use + GC_atomic_in_use / 4
+                + total_root_size;
+    if (GC_incremental) {
         return scan_size / (2 * GC_free_space_divisor);
     } else {
         return scan_size / GC_free_space_divisor;
     }
 }
 
-/* Return the number of bytes allocated, adjusted for explicit storage */
-/* management, etc..  This number is used in deciding when to trigger  */
-/* collections.                                                                */
+/* Return the number of bytes allocated, adjusted for explicit storage  */
+/* management, etc..  This number is used in deciding when to trigger   */
+/* collections.                                                         */
 STATIC word GC_adj_bytes_allocd(void)
 {
     signed_word result;
     signed_word expl_managed =
-               (signed_word)GC_non_gc_bytes
-               - (signed_word)GC_non_gc_bytes_at_gc;
-    
-    /* Don't count what was explicitly freed, or newly allocated for   */
-    /* explicit management.  Note that deallocating an explicitly      */
-    /* managed object should not alter result, assuming the client     */
-    /* is playing by the rules.                                                */
+                (signed_word)GC_non_gc_bytes
+                - (signed_word)GC_non_gc_bytes_at_gc;
+
+    /* Don't count what was explicitly freed, or newly allocated for    */
+    /* explicit management.  Note that deallocating an explicitly       */
+    /* managed object should not alter result, assuming the client      */
+    /* is playing by the rules.                                         */
     result = (signed_word)GC_bytes_allocd
-            + (signed_word)GC_bytes_dropped
-            - (signed_word)GC_bytes_freed 
-            + (signed_word)GC_finalizer_bytes_freed
-            - expl_managed;
+             + (signed_word)GC_bytes_dropped
+             - (signed_word)GC_bytes_freed
+             + (signed_word)GC_finalizer_bytes_freed
+             - expl_managed;
     if (result > (signed_word)GC_bytes_allocd) {
         result = GC_bytes_allocd;
-       /* probably client bug or unfortunate scheduling */
+        /* probably client bug or unfortunate scheduling */
     }
     result += GC_bytes_finalized;
-       /* We count objects enqueued for finalization as though they    */
-       /* had been reallocated this round. Finalization is user        */
-       /* visible progress.  And if we don't count this, we have       */
-       /* stability problems for programs that finalize all objects.   */
+        /* We count objects enqueued for finalization as though they    */
+        /* had been reallocated this round. Finalization is user        */
+        /* visible progress.  And if we don't count this, we have       */
+        /* stability problems for programs that finalize all objects.   */
     if (result < (signed_word)(GC_bytes_allocd >> 3)) {
-       /* Always count at least 1/8 of the allocations.  We don't want */
-       /* to collect too infrequently, since that would inhibit        */
-       /* coalescing of free storage blocks.                           */
-       /* This also makes us partially robust against client bugs.     */
+        /* Always count at least 1/8 of the allocations.  We don't want */
+        /* to collect too infrequently, since that would inhibit        */
+        /* coalescing of free storage blocks.                           */
+        /* This also makes us partially robust against client bugs.     */
         return(GC_bytes_allocd >> 3);
     } else {
         return(result);
@@ -232,11 +268,11 @@ STATIC word GC_adj_bytes_allocd(void)
 }
 
 
-/* Clear up a few frames worth of garbage left at the top of the stack.        */
-/* This is used to prevent us from accidentally treating garbage left  */
-/* on the stack by other parts of the collector as roots.  This        */
-/* differs from the code in misc.c, which actually tries to keep the   */
-/* stack clear of long-lived, client-generated garbage.                        */
+/* Clear up a few frames worth of garbage left at the top of the stack. */
+/* This is used to prevent us from accidentally treating garbage left   */
+/* on the stack by other parts of the collector as roots.  This         */
+/* differs from the code in misc.c, which actually tries to keep the    */
+/* stack clear of long-lived, client-generated garbage.                 */
 STATIC void GC_clear_a_few_frames(void)
 {
 #   ifndef CLEAR_NWORDS
@@ -244,16 +280,16 @@ STATIC void GC_clear_a_few_frames(void)
 #   endif
     volatile word frames[CLEAR_NWORDS];
     int i;
-    
+
     for (i = 0; i < CLEAR_NWORDS; i++) frames[i] = 0;
 }
 
-/* Heap size at which we need a collection to avoid expanding past     */
-/* limits used by blacklisting.                                                */
-static word GC_collect_at_heapsize = (word)(-1);
+/* Heap size at which we need a collection to avoid expanding past      */
+/* limits used by blacklisting.                                         */
+STATIC word GC_collect_at_heapsize = (word)(-1);
 
 /* Have we allocated enough to amortize a collection? */
-GC_bool GC_should_collect(void)
+GC_INNER GC_bool GC_should_collect(void)
 {
     static word last_min_bytes_allocd;
     static word last_gc_no;
@@ -262,14 +298,18 @@ GC_bool GC_should_collect(void)
       last_min_bytes_allocd = min_bytes_allocd();
     }
     return(GC_adj_bytes_allocd() >= last_min_bytes_allocd
-          || GC_heapsize >= GC_collect_at_heapsize);
+           || GC_heapsize >= GC_collect_at_heapsize);
 }
 
+/* STATIC */ void (*GC_start_call_back) (void) = 0;
+                        /* Called at start of full collections.         */
+                        /* Not called if 0.  Called with the allocation */
+                        /* lock held.  Not used by GC itself.           */
 
-STATIC void GC_notify_full_gc(void)
+GC_INLINE void GC_notify_full_gc(void)
 {
-    if (GC_start_call_back != (void (*) (void))0) {
-       (*GC_start_call_back)();
+    if (GC_start_call_back != 0) {
+        (*GC_start_call_back)();
     }
 }
 
@@ -278,7 +318,7 @@ STATIC GC_bool GC_is_full_gc = FALSE;
 STATIC GC_bool GC_stopped_mark(GC_stop_func stop_func);
 STATIC void GC_finish_collection(void);
 
-/* 
+/*
  * Initiate a garbage collection if appropriate.
  * Choose judiciously
  * between partial, full, and stop-world collections.
@@ -288,51 +328,55 @@ STATIC void GC_maybe_gc(void)
     static int n_partial_gcs = 0;
 
     GC_ASSERT(I_HOLD_LOCK());
+    ASSERT_CANCEL_DISABLED();
     if (GC_should_collect()) {
         if (!GC_incremental) {
-            GC_gcollect_inner();
+            /* FIXME: If possible, GC_default_stop_func should be used here */
+            GC_try_to_collect_inner(GC_never_stop_func);
             n_partial_gcs = 0;
             return;
         } else {
-#        ifdef PARALLEL_MARK
-           if (GC_parallel)
-             GC_wait_for_reclaim();
-#        endif
-         if (GC_need_full_gc || n_partial_gcs >= GC_full_freq) {
-           if (GC_print_stats) {
-               GC_log_printf(
-                 "***>Full mark for collection %lu after %ld allocd bytes\n",
-                 (unsigned long)GC_gc_no+1,
-                 (long)GC_bytes_allocd);
-           }
-           GC_promote_black_lists();
-           (void)GC_reclaim_all((GC_stop_func)0, TRUE);
-           GC_clear_marks();
+#         ifdef PARALLEL_MARK
+            if (GC_parallel)
+              GC_wait_for_reclaim();
+#         endif
+          if (GC_need_full_gc || n_partial_gcs >= GC_full_freq) {
+            if (GC_print_stats) {
+                GC_log_printf(
+                  "***>Full mark for collection %lu after %ld allocd bytes\n",
+                  (unsigned long)GC_gc_no+1,
+                  (long)GC_bytes_allocd);
+            }
+            GC_promote_black_lists();
+            (void)GC_reclaim_all((GC_stop_func)0, TRUE);
+            GC_clear_marks();
             n_partial_gcs = 0;
-           GC_notify_full_gc();
-           GC_is_full_gc = TRUE;
+            GC_notify_full_gc();
+            GC_is_full_gc = TRUE;
           } else {
             n_partial_gcs++;
           }
-       }
-        /* We try to mark with the world stopped.      */
-        /* If we run out of time, this turns into      */
-        /* incremental marking.                        */
-#      ifndef NO_CLOCK
+        }
+        /* We try to mark with the world stopped.       */
+        /* If we run out of time, this turns into       */
+        /* incremental marking.                 */
+#       ifndef NO_CLOCK
           if (GC_time_limit != GC_TIME_UNLIMITED) { GET_TIME(GC_start_time); }
-#      endif
-        if (GC_stopped_mark(GC_time_limit == GC_TIME_UNLIMITED? 
-                           GC_never_stop_func : GC_timeout_stop_func)) {
+#       endif
+        /* FIXME: If possible, GC_default_stop_func should be   */
+        /* used instead of GC_never_stop_func here.             */
+        if (GC_stopped_mark(GC_time_limit == GC_TIME_UNLIMITED?
+                            GC_never_stop_func : GC_timeout_stop_func)) {
 #           ifdef SAVE_CALL_CHAIN
                 GC_save_callers(GC_last_stack);
 #           endif
             GC_finish_collection();
         } else {
-           if (!GC_is_full_gc) {
-               /* Count this as the first attempt */
-               GC_n_attempts++;
-           }
-       }
+            if (!GC_is_full_gc) {
+                /* Count this as the first attempt */
+                GC_n_attempts++;
+            }
+        }
     }
 }
 
@@ -342,47 +386,48 @@ STATIC void GC_maybe_gc(void)
  * not GC_never_stop_func then abort if stop_func returns TRUE.
  * Return TRUE if we successfully completed the collection.
  */
-GC_bool GC_try_to_collect_inner(GC_stop_func stop_func)
+GC_INNER GC_bool GC_try_to_collect_inner(GC_stop_func stop_func)
 {
 #   ifndef SMALL_CONFIG
       CLOCK_TYPE start_time = 0; /* initialized to prevent warning. */
       CLOCK_TYPE current_time;
 #   endif
-    if (GC_dont_gc) return FALSE;
+    ASSERT_CANCEL_DISABLED();
+    if (GC_dont_gc || (*stop_func)()) return FALSE;
     if (GC_incremental && GC_collection_in_progress()) {
       if (GC_print_stats) {
-       GC_log_printf(
-           "GC_try_to_collect_inner: finishing collection in progress\n");
+        GC_log_printf(
+            "GC_try_to_collect_inner: finishing collection in progress\n");
       }
-      /* Just finish collection already in progress.   */
-       while(GC_collection_in_progress()) {
-           if (stop_func()) return(FALSE);
-           GC_collect_a_little_inner(1);
-       }
+      /* Just finish collection already in progress.    */
+        while(GC_collection_in_progress()) {
+            if ((*stop_func)()) return(FALSE);
+            GC_collect_a_little_inner(1);
+        }
     }
     if (stop_func == GC_never_stop_func) GC_notify_full_gc();
 #   ifndef SMALL_CONFIG
       if (GC_print_stats) {
-       GET_TIME(start_time);
-       GC_log_printf("Initiating full world-stop collection!\n");
+        GET_TIME(start_time);
+        GC_log_printf("Initiating full world-stop collection!\n");
       }
 #   endif
     GC_promote_black_lists();
-    /* Make sure all blocks have been reclaimed, so sweep routines     */
-    /* don't see cleared mark bits.                                    */
-    /* If we're guaranteed to finish, then this is unnecessary.                */
-    /* In the find_leak case, we have to finish to guarantee that      */
-    /* previously unmarked objects are not reported as leaks.          */
+    /* Make sure all blocks have been reclaimed, so sweep routines      */
+    /* don't see cleared mark bits.                                     */
+    /* If we're guaranteed to finish, then this is unnecessary.         */
+    /* In the find_leak case, we have to finish to guarantee that       */
+    /* previously unmarked objects are not reported as leaks.           */
 #       ifdef PARALLEL_MARK
-         if (GC_parallel)
-           GC_wait_for_reclaim();
+          if (GC_parallel)
+            GC_wait_for_reclaim();
 #       endif
-       if ((GC_find_leak || stop_func != GC_never_stop_func)
-           && !GC_reclaim_all(stop_func, FALSE)) {
-           /* Aborted.  So far everything is still consistent. */
-           return(FALSE);
-       }
-    GC_invalidate_mark_state();  /* Flush mark stack.  */
+        if ((GC_find_leak || stop_func != GC_never_stop_func)
+            && !GC_reclaim_all(stop_func, FALSE)) {
+            /* Aborted.  So far everything is still consistent. */
+            return(FALSE);
+        }
+    GC_invalidate_mark_state();  /* Flush mark stack.   */
     GC_clear_marks();
 #   ifdef SAVE_CALL_CHAIN
         GC_save_callers(GC_last_stack);
@@ -390,13 +435,13 @@ GC_bool GC_try_to_collect_inner(GC_stop_func stop_func)
     GC_is_full_gc = TRUE;
     if (!GC_stopped_mark(stop_func)) {
       if (!GC_incremental) {
-       /* We're partially done and have no way to complete or use      */
-       /* current work.  Reestablish invariants as cheaply as          */
-       /* possible.                                                    */
-       GC_invalidate_mark_state();
-       GC_unpromote_black_lists();
-      } /* else we claim the world is already still consistent.  We'll         */
-        /* finish incrementally.                                       */
+        /* We're partially done and have no way to complete or use      */
+        /* current work.  Reestablish invariants as cheaply as          */
+        /* possible.                                                    */
+        GC_invalidate_mark_state();
+        GC_unpromote_black_lists();
+      } /* else we claim the world is already still consistent.  We'll  */
+        /* finish incrementally.                                        */
       return(FALSE);
     }
     GC_finish_collection();
@@ -410,8 +455,6 @@ GC_bool GC_try_to_collect_inner(GC_stop_func stop_func)
     return(TRUE);
 }
 
-
-
 /*
  * Perform n units of garbage collection work.  A unit is intended to touch
  * roughly GC_RATE pages.  Every once in a while, we do more than that.
@@ -420,56 +463,61 @@ GC_bool GC_try_to_collect_inner(GC_stop_func stop_func)
  * cleanup gets expensive.
  */
 #ifndef GC_RATE
-# define GC_RATE 10 
+# define GC_RATE 10
 #endif
 #ifndef MAX_PRIOR_ATTEMPTS
 # define MAX_PRIOR_ATTEMPTS 1
 #endif
-       /* Maximum number of prior attempts at world stop marking       */
-       /* A value of 1 means that we finish the second time, no matter */
-       /* how long it takes.  Doesn't count the initial root scan      */
-       /* for a full GC.                                               */
+        /* Maximum number of prior attempts at world stop marking       */
+        /* A value of 1 means that we finish the second time, no matter */
+        /* how long it takes.  Doesn't count the initial root scan      */
+        /* for a full GC.                                               */
 
-STATIC int GC_deficit = 0;/* The number of extra calls to GC_mark_some */
-                         /* that we have made.                         */
+STATIC int GC_deficit = 0;/* The number of extra calls to GC_mark_some  */
+                          /* that we have made.                         */
 
-void GC_collect_a_little_inner(int n)
+GC_INNER void GC_collect_a_little_inner(int n)
 {
     int i;
-    
+    IF_CANCEL(int cancel_state;)
+
     if (GC_dont_gc) return;
+    DISABLE_CANCEL(cancel_state);
     if (GC_incremental && GC_collection_in_progress()) {
-       for (i = GC_deficit; i < GC_RATE*n; i++) {
-           if (GC_mark_some((ptr_t)0)) {
-               /* Need to finish a collection */
-#              ifdef SAVE_CALL_CHAIN
-                   GC_save_callers(GC_last_stack);
-#              endif
-#              ifdef PARALLEL_MARK
-                   if (GC_parallel)
-                     GC_wait_for_reclaim();
-#              endif
-               if (GC_n_attempts < MAX_PRIOR_ATTEMPTS
-                   && GC_time_limit != GC_TIME_UNLIMITED) {
-#                ifndef NO_CLOCK
-                   GET_TIME(GC_start_time);
-#                endif
-                 if (!GC_stopped_mark(GC_timeout_stop_func)) {
-                   GC_n_attempts++;
-                   break;
-                 }
-               } else {
-                 (void)GC_stopped_mark(GC_never_stop_func);
-               }
-               GC_finish_collection();
-               break;
-           }
-       }
-       if (GC_deficit > 0) GC_deficit -= GC_RATE*n;
-       if (GC_deficit < 0) GC_deficit = 0;
+        for (i = GC_deficit; i < GC_RATE*n; i++) {
+            if (GC_mark_some((ptr_t)0)) {
+                /* Need to finish a collection */
+#               ifdef SAVE_CALL_CHAIN
+                    GC_save_callers(GC_last_stack);
+#               endif
+#               ifdef PARALLEL_MARK
+                    if (GC_parallel)
+                      GC_wait_for_reclaim();
+#               endif
+                if (GC_n_attempts < MAX_PRIOR_ATTEMPTS
+                    && GC_time_limit != GC_TIME_UNLIMITED) {
+#                 ifndef NO_CLOCK
+                    GET_TIME(GC_start_time);
+#                 endif
+                  if (!GC_stopped_mark(GC_timeout_stop_func)) {
+                    GC_n_attempts++;
+                    break;
+                  }
+                } else {
+                  /* FIXME: If possible, GC_default_stop_func should be */
+                  /* used here.                                         */
+                  (void)GC_stopped_mark(GC_never_stop_func);
+                }
+                GC_finish_collection();
+                break;
+            }
+        }
+        if (GC_deficit > 0) GC_deficit -= GC_RATE*n;
+        if (GC_deficit < 0) GC_deficit = 0;
     } else {
         GC_maybe_gc();
     }
+    RESTORE_CANCEL(cancel_state);
 }
 
 GC_API int GC_CALL GC_collect_a_little(void)
@@ -485,23 +533,24 @@ GC_API int GC_CALL GC_collect_a_little(void)
     return(result);
 }
 
-# if !defined(REDIRECT_MALLOC) && (defined(MSWIN32) || defined(MSWINCE))
-  void GC_add_current_malloc_heap(void);
-# endif
+#if !defined(REDIRECT_MALLOC) && (defined(MSWIN32) || defined(MSWINCE))
+  GC_INNER void GC_add_current_malloc_heap(void);
+#endif
+
 #ifdef MAKE_BACK_GRAPH
-  void GC_build_back_graph(void);
+  GC_INNER void GC_build_back_graph(void);
 #endif
 
 #ifndef SMALL_CONFIG
-  /* Variables for world-stop average delay time statistic computation.        */
-  /* "divisor" is incremented every world-stop and halved when reached */
-  /* its maximum (or upon "total_time" oveflow).                       */
-  STATIC unsigned world_stopped_total_time = 0;
-  STATIC unsigned world_stopped_total_divisor = 0;
+  /* Variables for world-stop average delay time statistic computation. */
+  /* "divisor" is incremented every world-stop and halved when reached  */
+  /* its maximum (or upon "total_time" oveflow).                        */
+  static unsigned world_stopped_total_time = 0;
+  static unsigned world_stopped_total_divisor = 0;
 # ifndef MAX_TOTAL_TIME_DIVISOR
-    /* We shall not use big values here (so "outdated" delay time      */
-    /* values would have less impact on "average" delay time value than        */
-    /* newer ones).                                                    */
+    /* We shall not use big values here (so "outdated" delay time       */
+    /* values would have less impact on "average" delay time value than */
+    /* newer ones).                                                     */
 #   define MAX_TOTAL_TIME_DIVISOR 1000
 # endif
 #endif
@@ -519,7 +568,7 @@ STATIC GC_bool GC_stopped_mark(GC_stop_func stop_func)
       CLOCK_TYPE start_time = 0; /* initialized to prevent warning. */
       CLOCK_TYPE current_time;
 #   endif
-       
+
 #   if !defined(REDIRECT_MALLOC) && (defined(MSWIN32) || defined(MSWINCE))
         GC_add_current_malloc_heap();
 #   endif
@@ -529,16 +578,18 @@ STATIC GC_bool GC_stopped_mark(GC_stop_func stop_func)
 
 #   ifndef SMALL_CONFIG
       if (GC_print_stats)
-       GET_TIME(start_time);
+        GET_TIME(start_time);
 #   endif
 
     STOP_WORLD();
-    IF_THREADS(GC_world_stopped = TRUE);
+#   ifdef THREAD_LOCAL_ALLOC
+      GC_world_stopped = TRUE;
+#   endif
     if (GC_print_stats) {
-       /* Output blank line for convenience here */
-       GC_log_printf(
-             "\n--> Marking for collection %lu after %lu allocated bytes\n",
-             (unsigned long)GC_gc_no + 1, (unsigned long) GC_bytes_allocd);
+        /* Output blank line for convenience here */
+        GC_log_printf(
+              "\n--> Marking for collection %lu after %lu allocated bytes\n",
+              (unsigned long)GC_gc_no + 1, (unsigned long) GC_bytes_allocd);
     }
 #   ifdef MAKE_BACK_GRAPH
       if (GC_print_back_height) {
@@ -550,153 +601,175 @@ STATIC GC_bool GC_stopped_mark(GC_stop_func stop_func)
         /* Minimize junk left in my registers and on the stack */
             GC_clear_a_few_frames();
             GC_noop(0,0,0,0,0,0);
-       GC_initiate_gc();
-       for(i = 0;;i++) {
-           if ((*stop_func)()) {
-                   if (GC_print_stats) {
-                       GC_log_printf("Abandoned stopped marking after "
-                               "%u iterations\n", i);
-                   }
-                   GC_deficit = i; /* Give the mutator a chance. */
-                    IF_THREADS(GC_world_stopped = FALSE);
-                   START_WORLD();
-                   return(FALSE);
-           }
-           if (GC_mark_some((ptr_t)(&dummy))) break;
-       }
-       
+        GC_initiate_gc();
+        for(i = 0;;i++) {
+            if ((*stop_func)()) {
+                    if (GC_print_stats) {
+                        GC_log_printf("Abandoned stopped marking after "
+                                "%u iterations\n", i);
+                    }
+                    GC_deficit = i; /* Give the mutator a chance. */
+#                   ifdef THREAD_LOCAL_ALLOC
+                      GC_world_stopped = FALSE;
+#                   endif
+                    START_WORLD();
+                    return(FALSE);
+            }
+            if (GC_mark_some((ptr_t)(&dummy))) break;
+        }
+
     GC_gc_no++;
     if (GC_print_stats) {
       GC_log_printf(
-            "Collection %lu reclaimed %ld bytes ---> heapsize = %lu bytes\n",
-            (unsigned long)(GC_gc_no - 1), (long)GC_bytes_found,
-            (unsigned long)GC_heapsize);
-        /* Printf arguments may be pushed in funny places.  Clear the  */
-        /* space.                                                      */
-      GC_log_printf("");
+             "Collection %lu reclaimed %ld bytes ---> heapsize = %lu bytes\n",
+             (unsigned long)(GC_gc_no - 1), (long)GC_bytes_found,
+             (unsigned long)GC_heapsize);
     }
 
     /* Check all debugged objects for consistency */
         if (GC_debugging_started) {
             (*GC_check_heap)();
         }
-    
-    IF_THREADS(GC_world_stopped = FALSE);
+
+#   ifdef THREAD_LOCAL_ALLOC
+      GC_world_stopped = FALSE;
+#   endif
     START_WORLD();
 #   ifndef SMALL_CONFIG
       if (GC_print_stats) {
-       unsigned long time_diff;
-       unsigned total_time, divisor;
-       GET_TIME(current_time);
-       time_diff = MS_TIME_DIFF(current_time,start_time);
-
-       /* Compute new world-stop delay total time */
-       total_time = world_stopped_total_time;
-       divisor = world_stopped_total_divisor;
-       if ((int)total_time < 0 || divisor >= MAX_TOTAL_TIME_DIVISOR) {
-         /* Halve values if overflow occurs */
-         total_time >>= 1;
-         divisor >>= 1;
-       }
-       total_time += time_diff < (((unsigned)-1) >> 1) ?
-                       (unsigned)time_diff : ((unsigned)-1) >> 1;
-       /* Update old world_stopped_total_time and its divisor */
-       world_stopped_total_time = total_time;
-       world_stopped_total_divisor = ++divisor;
-       
-       GC_ASSERT(divisor != 0);
-       GC_log_printf(
-               "World-stopped marking took %lu msecs (%lu in average)\n",
-               time_diff, total_time / divisor);
+        unsigned long time_diff;
+        unsigned total_time, divisor;
+        GET_TIME(current_time);
+        time_diff = MS_TIME_DIFF(current_time,start_time);
+
+        /* Compute new world-stop delay total time */
+        total_time = world_stopped_total_time;
+        divisor = world_stopped_total_divisor;
+        if ((int)total_time < 0 || divisor >= MAX_TOTAL_TIME_DIVISOR) {
+          /* Halve values if overflow occurs */
+          total_time >>= 1;
+          divisor >>= 1;
+        }
+        total_time += time_diff < (((unsigned)-1) >> 1) ?
+                        (unsigned)time_diff : ((unsigned)-1) >> 1;
+        /* Update old world_stopped_total_time and its divisor */
+        world_stopped_total_time = total_time;
+        world_stopped_total_divisor = ++divisor;
+
+        GC_ASSERT(divisor != 0);
+        GC_log_printf(
+                "World-stopped marking took %lu msecs (%u in average)\n",
+                time_diff, total_time / divisor);
       }
 #   endif
     return(TRUE);
 }
 
-/* Set all mark bits for the free list whose first entry is q  */
-void GC_set_fl_marks(ptr_t q)
+/* Set all mark bits for the free list whose first entry is q   */
+GC_INNER void GC_set_fl_marks(ptr_t q)
 {
-   ptr_t p;
-   struct hblk * h, * last_h = 0;
-   hdr *hhdr;  /* gcc "might be uninitialized" warning is bogus. */
+   struct hblk *h, *last_h;
+   hdr *hhdr;
    IF_PER_OBJ(size_t sz;)
    unsigned bit_no;
 
-   for (p = q; p != 0; p = obj_link(p)){
-       h = HBLKPTR(p);
-       if (h != last_h) {
-         last_h = h; 
-         hhdr = HDR(h);
-         IF_PER_OBJ(sz = hhdr->hb_sz;)
-       }
-       bit_no = MARK_BIT_NO((ptr_t)p - (ptr_t)h, sz);
-       if (!mark_bit_from_hdr(hhdr, bit_no)) {
-         set_mark_bit_from_hdr(hhdr, bit_no);
+   if (q != NULL) {
+     h = HBLKPTR(q);
+     last_h = h;
+     hhdr = HDR(h);
+     IF_PER_OBJ(sz = hhdr->hb_sz;)
+
+     for (;;) {
+        bit_no = MARK_BIT_NO((ptr_t)q - (ptr_t)h, sz);
+        if (!mark_bit_from_hdr(hhdr, bit_no)) {
+          set_mark_bit_from_hdr(hhdr, bit_no);
           ++hhdr -> hb_n_marks;
         }
+
+        q = obj_link(q);
+        if (q == NULL)
+          break;
+
+        h = HBLKPTR(q);
+        if (h != last_h) {
+          last_h = h;
+          hhdr = HDR(h);
+          IF_PER_OBJ(sz = hhdr->hb_sz;)
+        }
+     }
    }
 }
 
 #ifdef GC_ASSERTIONS
-/* Check that all mark bits for the free list whose first entry is q   */
-/* are set.                                                            */
-void GC_check_fl_marks(ptr_t q)
-{
+  /* Check that all mark bits for the free list whose first entry is q  */
+  /* are set.                                                           */
+  void GC_check_fl_marks(ptr_t q)
+  {
    ptr_t p;
-
-   for (p = q; p != 0; p = obj_link(p)){
-       if (!GC_is_marked(p)) {
-           GC_err_printf("Unmarked object %p on list %p\n", p, q);
-           ABORT("Unmarked local free list entry.");
-       }
+   for (p = q; p != 0; p = obj_link(p)) {
+       if (!GC_is_marked(p)) {
+           GC_err_printf("Unmarked object %p on list %p\n", p, q);
+           ABORT("Unmarked local free list entry.");
+       }
    }
-}
+  }
 #endif
 
-/* Clear all mark bits for the free list whose first entry is q        */
-/* Decrement GC_bytes_found by number of bytes on free list.   */
+/* Clear all mark bits for the free list whose first entry is q */
+/* Decrement GC_bytes_found by number of bytes on free list.    */
 STATIC void GC_clear_fl_marks(ptr_t q)
 {
-   ptr_t p;
-   struct hblk * h, * last_h = 0;
+   struct hblk *h, *last_h;
    hdr *hhdr;
    size_t sz;
    unsigned bit_no;
 
-   for (p = q; p != 0; p = obj_link(p)){
-       h = HBLKPTR(p);
-       if (h != last_h) {
-         last_h = h; 
-         hhdr = HDR(h);
-         sz = hhdr->hb_sz;  /* Normally set only once. */
-       }
-       bit_no = MARK_BIT_NO((ptr_t)p - (ptr_t)h, sz);
-       if (mark_bit_from_hdr(hhdr, bit_no)) {
-         size_t n_marks = hhdr -> hb_n_marks - 1;
-         clear_mark_bit_from_hdr(hhdr, bit_no);
-#        ifdef PARALLEL_MARK
-           /* Appr. count, don't decrement to zero! */
-           if (0 != n_marks || !GC_parallel) {
+   if (q != NULL) {
+     h = HBLKPTR(q);
+     last_h = h;
+     hhdr = HDR(h);
+     sz = hhdr->hb_sz;  /* Normally set only once. */
+
+     for (;;) {
+        bit_no = MARK_BIT_NO((ptr_t)q - (ptr_t)h, sz);
+        if (mark_bit_from_hdr(hhdr, bit_no)) {
+          size_t n_marks = hhdr -> hb_n_marks - 1;
+          clear_mark_bit_from_hdr(hhdr, bit_no);
+#         ifdef PARALLEL_MARK
+            /* Appr. count, don't decrement to zero! */
+            if (0 != n_marks || !GC_parallel) {
               hhdr -> hb_n_marks = n_marks;
-           }
-#        else
+            }
+#         else
             hhdr -> hb_n_marks = n_marks;
-#        endif
+#         endif
+        }
+        GC_bytes_found -= sz;
+
+        q = obj_link(q);
+        if (q == NULL)
+          break;
+
+        h = HBLKPTR(q);
+        if (h != last_h) {
+          last_h = h;
+          hhdr = HDR(h);
+          sz = hhdr->hb_sz;
         }
-       GC_bytes_found -= sz;
+     }
    }
 }
 
 #if defined(GC_ASSERTIONS) && defined(THREADS) && defined(THREAD_LOCAL_ALLOC)
-extern void GC_check_tls(void);
+  void GC_check_tls(void);
 #endif
 
 #ifdef MAKE_BACK_GRAPH
-void GC_traverse_back_graph(void);
+  GC_INNER void GC_traverse_back_graph(void);
 #endif
 
-/* Finish up a collection.  Assumes mark bits are consistent, lock is  */
-/* held, but the world is otherwise running.                           */
+/* Finish up a collection.  Assumes mark bits are consistent, lock is   */
+/* held, but the world is otherwise running.                            */
 STATIC void GC_finish_collection(void)
 {
 #   ifndef SMALL_CONFIG
@@ -704,43 +777,43 @@ STATIC void GC_finish_collection(void)
       CLOCK_TYPE finalize_time = 0;
       CLOCK_TYPE done_time;
 #   endif
-       
+
 #   if defined(GC_ASSERTIONS) && defined(THREADS) \
        && defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL)
-       /* Check that we marked some of our own data.           */
-        /* FIXME: Add more checks.                             */
+        /* Check that we marked some of our own data.           */
+        /* FIXME: Add more checks.                              */
         GC_check_tls();
 #   endif
 
 #   ifndef SMALL_CONFIG
       if (GC_print_stats)
-       GET_TIME(start_time);
+        GET_TIME(start_time);
 #   endif
 
     GC_bytes_found = 0;
 #   if defined(LINUX) && defined(__ELF__) && !defined(SMALL_CONFIG)
-       if (getenv("GC_PRINT_ADDRESS_MAP") != 0) {
-         GC_print_address_map();
-       }
+        if (GETENV("GC_PRINT_ADDRESS_MAP") != 0) {
+          GC_print_address_map();
+        }
 #   endif
     COND_DUMP;
     if (GC_find_leak) {
       /* Mark all objects on the free list.  All objects should be */
-      /* marked when we're done.                                  */
-       {
-         word size;            /* current object size          */
-         unsigned kind;
-         ptr_t q;
-
-         for (kind = 0; kind < GC_n_kinds; kind++) {
-           for (size = 1; size <= MAXOBJGRANULES; size++) {
-             q = GC_obj_kinds[kind].ok_freelist[size];
-             if (q != 0) GC_set_fl_marks(q);
-           }
-         }
-       }
-       GC_start_reclaim(TRUE);
-         /* The above just checks; it doesn't really reclaim anything. */
+      /* marked when we're done.                                   */
+        {
+          word size;            /* current object size          */
+          unsigned kind;
+          ptr_t q;
+
+          for (kind = 0; kind < GC_n_kinds; kind++) {
+            for (size = 1; size <= MAXOBJGRANULES; size++) {
+              q = GC_obj_kinds[kind].ok_freelist[size];
+              if (q != 0) GC_set_fl_marks(q);
+            }
+          }
+        }
+        GC_start_reclaim(TRUE);
+          /* The above just checks; it doesn't really reclaim anything. */
     }
 
     GC_finalize();
@@ -750,72 +823,72 @@ STATIC void GC_finish_collection(void)
 
 #   ifndef SMALL_CONFIG
       if (GC_print_stats)
-       GET_TIME(finalize_time);
+        GET_TIME(finalize_time);
 #   endif
 
     if (GC_print_back_height) {
 #     ifdef MAKE_BACK_GRAPH
-       GC_traverse_back_graph();
+        GC_traverse_back_graph();
 #     else
-#      ifndef SMALL_CONFIG
-         GC_err_printf("Back height not available: "
-                       "Rebuild collector with -DMAKE_BACK_GRAPH\n");
-#      endif
+#       ifndef SMALL_CONFIG
+          GC_err_printf("Back height not available: "
+                        "Rebuild collector with -DMAKE_BACK_GRAPH\n");
+#       endif
 #     endif
     }
 
     /* Clear free list mark bits, in case they got accidentally marked   */
-    /* (or GC_find_leak is set and they were intentionally marked).     */
+    /* (or GC_find_leak is set and they were intentionally marked).      */
     /* Also subtract memory remaining from GC_bytes_found count.         */
     /* Note that composite objects on free list are cleared.             */
     /* Thus accidentally marking a free list is not a problem;  only     */
     /* objects on the list itself will be marked, and that's fixed here. */
       {
-       word size;              /* current object size          */
-       ptr_t q;        /* pointer to current object    */
-       unsigned kind;
-
-       for (kind = 0; kind < GC_n_kinds; kind++) {
-         for (size = 1; size <= MAXOBJGRANULES; size++) {
-           q = GC_obj_kinds[kind].ok_freelist[size];
-           if (q != 0) GC_clear_fl_marks(q);
-         }
-       }
+        word size;              /* current object size          */
+        ptr_t q;        /* pointer to current object    */
+        unsigned kind;
+
+        for (kind = 0; kind < GC_n_kinds; kind++) {
+          for (size = 1; size <= MAXOBJGRANULES; size++) {
+            q = GC_obj_kinds[kind].ok_freelist[size];
+            if (q != 0) GC_clear_fl_marks(q);
+          }
+        }
       }
 
 
     if (GC_print_stats == VERBOSE)
-       GC_log_printf("Bytes recovered before sweep - f.l. count = %ld\n",
-                 (long)GC_bytes_found);
-    
+        GC_log_printf("Bytes recovered before sweep - f.l. count = %ld\n",
+                  (long)GC_bytes_found);
+
     /* Reconstruct free lists to contain everything not marked */
         GC_start_reclaim(FALSE);
-       if (GC_print_stats) {
-         GC_log_printf("Heap contains %lu pointer-containing "
-                       "+ %lu pointer-free reachable bytes\n",
-                       (unsigned long)GC_composite_in_use,
-                       (unsigned long)GC_atomic_in_use);
-       }
-        if (GC_is_full_gc)  {
-           GC_used_heap_size_after_full = USED_HEAP_SIZE;
-           GC_need_full_gc = FALSE;
-       } else {
-           GC_need_full_gc =
-                USED_HEAP_SIZE - GC_used_heap_size_after_full
-                > min_bytes_allocd();
-       }
+        if (GC_print_stats) {
+          GC_log_printf("Heap contains %lu pointer-containing "
+                        "+ %lu pointer-free reachable bytes\n",
+                        (unsigned long)GC_composite_in_use,
+                        (unsigned long)GC_atomic_in_use);
+        }
+        if (GC_is_full_gc) {
+            GC_used_heap_size_after_full = USED_HEAP_SIZE;
+            GC_need_full_gc = FALSE;
+        } else {
+            GC_need_full_gc =
+                 USED_HEAP_SIZE - GC_used_heap_size_after_full
+                 > min_bytes_allocd();
+        }
 
     if (GC_print_stats == VERBOSE) {
-#      ifdef USE_MUNMAP
-         GC_log_printf("Immediately reclaimed %ld bytes in heap"
-                       " of size %lu bytes (%lu unmapped)\n",
-                       (long)GC_bytes_found, (unsigned long)GC_heapsize,
-                       (unsigned long)GC_unmapped_bytes);
-#      else
-         GC_log_printf("Immediately reclaimed %ld bytes in heap"
-                       " of size %lu bytes\n",
-                       (long)GC_bytes_found, (unsigned long)GC_heapsize);
-#      endif
+#       ifdef USE_MUNMAP
+          GC_log_printf("Immediately reclaimed %ld bytes in heap"
+                        " of size %lu bytes (%lu unmapped)\n",
+                        (long)GC_bytes_found, (unsigned long)GC_heapsize,
+                        (unsigned long)GC_unmapped_bytes);
+#       else
+          GC_log_printf("Immediately reclaimed %ld bytes in heap"
+                        " of size %lu bytes\n",
+                        (long)GC_bytes_found, (unsigned long)GC_heapsize);
+#       endif
     }
 
     /* Reset or increment counters for next cycle */
@@ -827,100 +900,138 @@ STATIC void GC_finish_collection(void)
       GC_bytes_dropped = 0;
       GC_bytes_freed = 0;
       GC_finalizer_bytes_freed = 0;
-      
+
 #   ifdef USE_MUNMAP
       GC_unmap_old();
 #   endif
 
 #   ifndef SMALL_CONFIG
       if (GC_print_stats) {
-       GET_TIME(done_time);
-       GC_log_printf("Finalize + initiate sweep took %lu + %lu msecs\n",
-                     MS_TIME_DIFF(finalize_time,start_time),
-                     MS_TIME_DIFF(done_time,finalize_time));
+        GET_TIME(done_time);
+
+        /* A convenient place to output finalization statistics. */
+        GC_print_finalization_stats();
+
+        GC_log_printf("Finalize + initiate sweep took %lu + %lu msecs\n",
+                      MS_TIME_DIFF(finalize_time,start_time),
+                      MS_TIME_DIFF(done_time,finalize_time));
       }
 #   endif
 }
 
-/* Externally callable routine to invoke full, stop-world collection */
-GC_API int GC_CALL GC_try_to_collect(GC_stop_func stop_func)
+/* If stop_func == 0 then GC_default_stop_func is used instead.         */
+STATIC GC_bool GC_try_to_collect_general(GC_stop_func stop_func,
+                                         GC_bool force_unmap)
 {
-    int result;
+    GC_bool result;
+#   ifdef USE_MUNMAP
+      int old_unmap_threshold;
+#   endif
+    IF_CANCEL(int cancel_state;)
     DCL_LOCK_STATE;
-    
+
     if (!GC_is_initialized) GC_init();
-    GC_ASSERT(stop_func != 0);
     if (GC_debugging_started) GC_print_all_smashed();
     GC_INVOKE_FINALIZERS();
     LOCK();
+    DISABLE_CANCEL(cancel_state);
+#   ifdef USE_MUNMAP
+      old_unmap_threshold = GC_unmap_threshold;
+      if (force_unmap ||
+          (GC_force_unmap_on_gcollect && old_unmap_threshold > 0))
+        GC_unmap_threshold = 1; /* unmap as much as possible */
+#   endif
     ENTER_GC();
     /* Minimize junk left in my registers */
       GC_noop(0,0,0,0,0,0);
-    result = (int)GC_try_to_collect_inner(stop_func);
+    result = GC_try_to_collect_inner(stop_func != 0 ? stop_func :
+                                     GC_default_stop_func);
     EXIT_GC();
+#   ifdef USE_MUNMAP
+      GC_unmap_threshold = old_unmap_threshold; /* restore */
+#   endif
+    RESTORE_CANCEL(cancel_state);
     UNLOCK();
-    if(result) {
+    if (result) {
         if (GC_debugging_started) GC_print_all_smashed();
         GC_INVOKE_FINALIZERS();
     }
     return(result);
 }
 
+/* Externally callable routines to invoke full, stop-the-world collection. */
+GC_API int GC_CALL GC_try_to_collect(GC_stop_func stop_func)
+{
+    GC_ASSERT(stop_func != 0);
+    return (int)GC_try_to_collect_general(stop_func, FALSE);
+}
+
 GC_API void GC_CALL GC_gcollect(void)
 {
-    (void)GC_try_to_collect(GC_never_stop_func);
+    /* 0 is passed as stop_func to get GC_default_stop_func value       */
+    /* while holding the allocation lock (to prevent data races).       */
+    (void)GC_try_to_collect_general(0, FALSE);
     if (GC_have_errors) GC_print_all_errors();
 }
 
-word GC_n_heap_sects = 0;      /* Number of sections currently in heap. */
+GC_API void GC_CALL GC_gcollect_and_unmap(void)
+{
+    (void)GC_try_to_collect_general(GC_never_stop_func, TRUE);
+}
+
+GC_INNER word GC_n_heap_sects = 0;
+                        /* Number of sections currently in heap. */
 
 #ifdef USE_PROC_FOR_LIBRARIES
-  word GC_n_memory = 0;                /* Number of GET_MEM allocated memory   */
-                               /* sections.                            */
+  GC_INNER word GC_n_memory = 0;
+                        /* Number of GET_MEM allocated memory sections. */
 #endif
 
 #ifdef USE_PROC_FOR_LIBRARIES
   /* Add HBLKSIZE aligned, GET_MEM-generated block to GC_our_memory. */
-  /* Defined to do nothing if USE_PROC_FOR_LIBRARIES not set.      */
-  void GC_add_to_our_memory(ptr_t p, size_t bytes)
+  /* Defined to do nothing if USE_PROC_FOR_LIBRARIES not set.       */
+  GC_INNER void GC_add_to_our_memory(ptr_t p, size_t bytes)
   {
     if (0 == p) return;
+    if (GC_n_memory >= MAX_HEAP_SECTS)
+      ABORT("Too many GC-allocated memory sections: Increase MAX_HEAP_SECTS");
     GC_our_memory[GC_n_memory].hs_start = p;
     GC_our_memory[GC_n_memory].hs_bytes = bytes;
     GC_n_memory++;
   }
 #endif
+
 /*
  * Use the chunk of memory starting at p of size bytes as part of the heap.
  * Assumes p is HBLKSIZE aligned, and bytes is a multiple of HBLKSIZE.
  */
-void GC_add_to_heap(struct hblk *p, size_t bytes)
+GC_INNER void GC_add_to_heap(struct hblk *p, size_t bytes)
 {
     hdr * phdr;
     word endp;
-    
+
     if (GC_n_heap_sects >= MAX_HEAP_SECTS) {
-       ABORT("Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS");
+        ABORT("Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS");
     }
     while ((word)p <= HBLKSIZE) {
         /* Can't handle memory near address zero. */
         ++p;
-       bytes -= HBLKSIZE;
+        bytes -= HBLKSIZE;
         if (0 == bytes) return;
     }
     endp = (word)p + bytes;
     if (endp <= (word)p) {
-       /* Address wrapped. */
-       bytes -= HBLKSIZE;
+        /* Address wrapped. */
+        bytes -= HBLKSIZE;
         if (0 == bytes) return;
-       endp -= HBLKSIZE;
+        endp -= HBLKSIZE;
     }
     phdr = GC_install_header(p);
     if (0 == phdr) {
-       /* This is extremely unlikely. Can't add it.  This will         */
-       /* almost certainly result in a 0 return from the allocator,    */
-       /* which is entirely appropriate.                               */
-       return;
+        /* This is extremely unlikely. Can't add it.  This will         */
+        /* almost certainly result in a 0 return from the allocator,    */
+        /* which is entirely appropriate.                               */
+        return;
     }
     GC_ASSERT(endp > (word)p && endp == (word)p + bytes);
     GC_heap_sects[GC_n_heap_sects].hs_start = (ptr_t)p;
@@ -933,47 +1044,47 @@ void GC_add_to_heap(struct hblk *p, size_t bytes)
     if ((ptr_t)p <= (ptr_t)GC_least_plausible_heap_addr
         || GC_least_plausible_heap_addr == 0) {
         GC_least_plausible_heap_addr = (void *)((ptr_t)p - sizeof(word));
-               /* Making it a little smaller than necessary prevents   */
-               /* us from getting a false hit from the variable        */
-               /* itself.  There's some unintentional reflection       */
-               /* here.                                                */
+                /* Making it a little smaller than necessary prevents   */
+                /* us from getting a false hit from the variable        */
+                /* itself.  There's some unintentional reflection       */
+                /* here.                                                */
     }
     if ((ptr_t)p + bytes >= (ptr_t)GC_greatest_plausible_heap_addr) {
         GC_greatest_plausible_heap_addr = (void *)endp;
     }
 }
 
-# if !defined(NO_DEBUGGING)
-void GC_print_heap_sects(void)
-{
+#if !defined(NO_DEBUGGING)
+  void GC_print_heap_sects(void)
+  {
     unsigned i;
-    
+
     GC_printf("Total heap size: %lu\n", (unsigned long) GC_heapsize);
     for (i = 0; i < GC_n_heap_sects; i++) {
         ptr_t start = GC_heap_sects[i].hs_start;
         size_t len = GC_heap_sects[i].hs_bytes;
         struct hblk *h;
         unsigned nbl = 0;
-        
-       for (h = (struct hblk *)start; h < (struct hblk *)(start + len); h++) {
-           if (GC_is_black_listed(h, HBLKSIZE)) nbl++;
-       }
-       GC_printf("Section %d from %p to %p %lu/%lu blacklisted\n",
-                 i, start, start + len,
-                 (unsigned long)nbl, (unsigned long)(len/HBLKSIZE));
+
+        for (h = (struct hblk *)start; h < (struct hblk *)(start + len); h++) {
+            if (GC_is_black_listed(h, HBLKSIZE)) nbl++;
+        }
+        GC_printf("Section %d from %p to %p %lu/%lu blacklisted\n",
+                  i, start, start + len,
+                  (unsigned long)nbl, (unsigned long)(len/HBLKSIZE));
     }
-}
-# endif
+  }
+#endif
 
 void * GC_least_plausible_heap_addr = (void *)ONES;
 void * GC_greatest_plausible_heap_addr = 0;
 
-static INLINE word GC_max(word x, word y)
+GC_INLINE word GC_max(word x, word y)
 {
     return(x > y? x : y);
 }
 
-static INLINE word GC_min(word x, word y)
+GC_INLINE word GC_min(word x, word y)
 {
     return(x < y? x : y);
 }
@@ -992,22 +1103,22 @@ GC_word GC_max_retries = 0;
  * Tiny values of n are rounded up.
  * Returns FALSE on failure.
  */
-GC_bool GC_expand_hp_inner(word n)
+GC_INNER GC_bool GC_expand_hp_inner(word n)
 {
     word bytes;
     struct hblk * space;
-    word expansion_slop;       /* Number of bytes by which we expect the */
-                               /* heap to expand soon.                   */
+    word expansion_slop;        /* Number of bytes by which we expect the */
+                                /* heap to expand soon.                   */
 
     if (n < MINHINCR) n = MINHINCR;
     bytes = n * HBLKSIZE;
     /* Make sure bytes is a multiple of GC_page_size */
       {
-       word mask = GC_page_size - 1;
-       bytes += mask;
-       bytes &= ~mask;
+        word mask = GC_page_size - 1;
+        bytes += mask;
+        bytes &= ~mask;
       }
-    
+
     if (GC_max_heapsize != 0 && GC_heapsize + bytes > GC_max_heapsize) {
         /* Exceeded self-imposed limit */
         return(FALSE);
@@ -1015,38 +1126,38 @@ GC_bool GC_expand_hp_inner(word n)
     space = GET_MEM(bytes);
     GC_add_to_our_memory((ptr_t)space, bytes);
     if( space == 0 ) {
-       if (GC_print_stats) {
-           GC_log_printf("Failed to expand heap by %ld bytes\n",
-                         (unsigned long)bytes);
-       }
-       return(FALSE);
+        if (GC_print_stats) {
+            GC_log_printf("Failed to expand heap by %ld bytes\n",
+                          (unsigned long)bytes);
+        }
+        return(FALSE);
     }
     if (GC_print_stats) {
-       GC_log_printf("Increasing heap size by %lu after %lu allocated bytes\n",
-                     (unsigned long)bytes,
-                     (unsigned long)GC_bytes_allocd);
+        GC_log_printf("Increasing heap size by %lu after %lu allocated bytes\n",
+                      (unsigned long)bytes,
+                      (unsigned long)GC_bytes_allocd);
     }
-    /* Adjust heap limits generously for blacklisting to work better.  */
-    /* GC_add_to_heap performs minimal adjustment needed for           */
-    /* correctness.                                                    */
+    /* Adjust heap limits generously for blacklisting to work better.   */
+    /* GC_add_to_heap performs minimal adjustment needed for            */
+    /* correctness.                                                     */
     expansion_slop = min_bytes_allocd() + 4*MAXHINCR*HBLKSIZE;
     if ((GC_last_heap_addr == 0 && !((word)space & SIGNB))
         || (GC_last_heap_addr != 0 && GC_last_heap_addr < (ptr_t)space)) {
         /* Assume the heap is growing up */
-       word new_limit = (word)space + bytes + expansion_slop;
-       if (new_limit > (word)space) {
+        word new_limit = (word)space + bytes + expansion_slop;
+        if (new_limit > (word)space) {
           GC_greatest_plausible_heap_addr =
             (void *)GC_max((word)GC_greatest_plausible_heap_addr,
                            (word)new_limit);
-       }
+        }
     } else {
         /* Heap is growing down */
-       word new_limit = (word)space - expansion_slop;
-       if (new_limit < (word)space) {
+        word new_limit = (word)space - expansion_slop;
+        if (new_limit < (word)space) {
           GC_least_plausible_heap_addr =
             (void *)GC_min((word)GC_least_plausible_heap_addr,
                            (word)space - expansion_slop);
-       }
+        }
     }
     GC_prev_heap_addr = GC_last_heap_addr;
     GC_last_heap_addr = (ptr_t)space;
@@ -1062,68 +1173,95 @@ GC_bool GC_expand_hp_inner(word n)
 }
 
 /* Really returns a bool, but it's externally visible, so that's clumsy. */
-/* Arguments is in bytes.                                              */
+/* Arguments is in bytes.  Includes GC_init() call.                      */
 GC_API int GC_CALL GC_expand_hp(size_t bytes)
 {
     int result;
     DCL_LOCK_STATE;
-    
+
     LOCK();
-    if (!GC_is_initialized) GC_init_inner();
+    if (!GC_is_initialized) GC_init();
     result = (int)GC_expand_hp_inner(divHBLKSZ((word)bytes));
     if (result) GC_requested_heapsize += bytes;
     UNLOCK();
     return(result);
 }
 
-unsigned GC_fail_count = 0;  
-                       /* How many consecutive GC/expansion failures?  */
-                       /* Reset by GC_allochblk.                       */
-
-GC_bool GC_collect_or_expand(word needed_blocks, GC_bool ignore_off_page)
+GC_INNER unsigned GC_fail_count = 0;
+                        /* How many consecutive GC/expansion failures?  */
+                        /* Reset by GC_allochblk.                       */
+
+/* Collect or expand heap in an attempt make the indicated number of    */
+/* free blocks available.  Should be called until the blocks are        */
+/* available (seting retry value to TRUE unless this is the first call  */
+/* in a loop) or until it fails by returning FALSE.                     */
+GC_INNER GC_bool GC_collect_or_expand(word needed_blocks,
+                                      GC_bool ignore_off_page,
+                                      GC_bool retry)
 {
+    GC_bool gc_not_stopped = TRUE;
+    word blocks_to_get;
+    IF_CANCEL(int cancel_state;)
+
+    DISABLE_CANCEL(cancel_state);
     if (!GC_incremental && !GC_dont_gc &&
-       ((GC_dont_expand && GC_bytes_allocd > 0) || GC_should_collect())) {
-      GC_gcollect_inner();
-    } else {
-      word blocks_to_get = GC_heapsize/(HBLKSIZE*GC_free_space_divisor)
-                          + needed_blocks;
-      
-      if (blocks_to_get > MAXHINCR) {
-          word slop;
-          
-         /* Get the minimum required to make it likely that we         */
-         /* can satisfy the current request in the presence of black-  */
-         /* listing.  This will probably be more than MAXHINCR.        */
-          if (ignore_off_page) {
-              slop = 4;
-          } else {
-             slop = 2*divHBLKSZ(BL_LIMIT);
-             if (slop > needed_blocks) slop = needed_blocks;
-         }
-          if (needed_blocks + slop > MAXHINCR) {
-              blocks_to_get = needed_blocks + slop;
-          } else {
-              blocks_to_get = MAXHINCR;
-          }
+        ((GC_dont_expand && GC_bytes_allocd > 0) || GC_should_collect())) {
+      /* Try to do a full collection using 'default' stop_func (unless  */
+      /* nothing has been allocated since the latest collection or heap */
+      /* expansion is disabled).                                        */
+      gc_not_stopped = GC_try_to_collect_inner(
+                        GC_bytes_allocd > 0 && (!GC_dont_expand || !retry) ?
+                        GC_default_stop_func : GC_never_stop_func);
+      if (gc_not_stopped == TRUE || !retry) {
+        /* Either the collection hasn't been aborted or this is the     */
+        /* first attempt (in a loop).                                   */
+        RESTORE_CANCEL(cancel_state);
+        return(TRUE);
+      }
+    }
+
+    blocks_to_get = GC_heapsize/(HBLKSIZE*GC_free_space_divisor)
+                        + needed_blocks;
+    if (blocks_to_get > MAXHINCR) {
+      word slop;
+
+      /* Get the minimum required to make it likely that we can satisfy */
+      /* the current request in the presence of black-listing.          */
+      /* This will probably be more than MAXHINCR.                      */
+      if (ignore_off_page) {
+        slop = 4;
+      } else {
+        slop = 2 * divHBLKSZ(BL_LIMIT);
+        if (slop > needed_blocks) slop = needed_blocks;
+      }
+      if (needed_blocks + slop > MAXHINCR) {
+        blocks_to_get = needed_blocks + slop;
+      } else {
+        blocks_to_get = MAXHINCR;
       }
-      if (!GC_expand_hp_inner(blocks_to_get)
+    }
+
+    if (!GC_expand_hp_inner(blocks_to_get)
         && !GC_expand_hp_inner(needed_blocks)) {
-       if (GC_fail_count++ < GC_max_retries) {
-           WARN("Out of Memory!  Trying to continue ...\n", 0);
-           GC_gcollect_inner();
-       } else {
-#          if !defined(AMIGA) || !defined(GC_AMIGA_FASTALLOC)
-             WARN("Out of Memory!  Returning NIL!\n", 0);
-#          endif
-           return(FALSE);
-       }
+      if (gc_not_stopped == FALSE) {
+        /* Don't increment GC_fail_count here (and no warning).     */
+        GC_gcollect_inner();
+        GC_ASSERT(GC_bytes_allocd == 0);
+      } else if (GC_fail_count++ < GC_max_retries) {
+        WARN("Out of Memory!  Trying to continue ...\n", 0);
+        GC_gcollect_inner();
       } else {
-          if (GC_fail_count && GC_print_stats) {
-             GC_printf("Memory available again ...\n");
-         }
+#       if !defined(AMIGA) || !defined(GC_AMIGA_FASTALLOC)
+          WARN("Out of Memory! Heap size: %" GC_PRIdPTR " MiB."
+               " Returning NIL!\n", (GC_heapsize - GC_unmapped_bytes) >> 20);
+#       endif
+        RESTORE_CANCEL(cancel_state);
+        return(FALSE);
       }
+    } else if (GC_fail_count && GC_print_stats) {
+      GC_printf("Memory available again ...\n");
     }
+    RESTORE_CANCEL(cancel_state);
     return(TRUE);
 }
 
@@ -1133,11 +1271,12 @@ GC_bool GC_collect_or_expand(word needed_blocks, GC_bool ignore_off_page)
  * The object MUST BE REMOVED FROM THE FREE LIST BY THE CALLER.
  * Assumes we hold the allocator lock.
  */
-ptr_t GC_allocobj(size_t gran, int kind)
+GC_INNER ptr_t GC_allocobj(size_t gran, int kind)
 {
     void ** flh = &(GC_obj_kinds[kind].ok_freelist[gran]);
     GC_bool tried_minor = FALSE;
-    
+    GC_bool retry = FALSE;
+
     if (gran == 0) return(0);
 
     while (*flh == 0) {
@@ -1152,21 +1291,22 @@ ptr_t GC_allocobj(size_t gran, int kind)
       }
       if (*flh == 0) {
         ENTER_GC();
-       if (GC_incremental && GC_time_limit == GC_TIME_UNLIMITED
-           && ! tried_minor ) {
-           GC_collect_a_little_inner(1);
-           tried_minor = TRUE;
-       } else {
-          if (!GC_collect_or_expand((word)1,FALSE)) {
-           EXIT_GC();
-           return(0);
-         }
-       }
-       EXIT_GC();
+        if (GC_incremental && GC_time_limit == GC_TIME_UNLIMITED
+            && !tried_minor) {
+          GC_collect_a_little_inner(1);
+          tried_minor = TRUE;
+        } else {
+          if (!GC_collect_or_expand(1, FALSE, retry)) {
+            EXIT_GC();
+            return(0);
+          }
+          retry = TRUE;
+        }
+        EXIT_GC();
       }
     }
-    /* Successful allocation; reset failure count.     */
+    /* Successful allocation; reset failure count.      */
     GC_fail_count = 0;
-    
+
     return(*flh);
 }
index afbfc55c057a73d6c1aa328b6706372aa7c3d27b..3bbdf3a0bd12a475f4c920e92e5aa5755a090a93 100644 (file)
@@ -5,7 +5,7 @@ set -e
 # These version are ok, pre-1.7 is not.  Post 1.7 may produce a lot of
 # warnings for unrelated projects, so prefer 1.7 for now.
 am_version=
-for v in 1.7 1.9 1.8; do
+for v in 1.10 1.9 1.8 1.7; do
     if type -p &>/dev/null automake-$v; then
        am_version="-$v"
        break
@@ -21,10 +21,11 @@ if [ -z "$am_version" ]; then
 fi
 
 set -x
-libtoolize --automake --force
 aclocal$am_version
-automake$am_version -ac
 autoconf
+autoheader
+automake$am_version -ac
+libtoolize --automake --force
 set +x
 echo
 echo "Ready to run './configure'."
index 0ca051948f14cb3c5bf923eada3d88318556e141..a432757a267eadddb585d78dd64cab152b71f113 100644 (file)
@@ -12,6 +12,8 @@
  *
  */
 
+#include "private/dbg_mlc.h"
+
 /*
  * This implements a full, though not well-tuned, representation of the
  * backwards points-to graph.  This is used to test for non-GC-robust
 
 #ifdef MAKE_BACK_GRAPH
 
-#define MAX_IN 10      /* Maximum in-degree we handle directly */
+#define MAX_IN  10      /* Maximum in-degree we handle directly */
 
-#include "private/dbg_mlc.h"
 /* #include <unistd.h> */
 
 #if !defined(DBG_HDRS_ALL) || (ALIGNMENT != CPP_WORDSZ/8) /* || !defined(UNIX_LIKE) */
-# error Configuration doesnt support MAKE_BACK_GRAPH
+# error The configuration does not support MAKE_BACK_GRAPH
 #endif
 
-/* We store single back pointers directly in the object's oh_bg_ptr field.   */
-/* If there is more than one ptr to an object, we store q | FLAG_MANY,              */
-/* where q is a pointer to a back_edges object.                                     */
-/* Every once in a while we use a back_edges object even for a single       */
-/* pointer, since we need the other fields in the back_edges structure to    */
-/* be present in some fraction of the objects.  Otherwise we get serious     */
-/* performance issues.                                                      */
+/* We store single back pointers directly in the object's oh_bg_ptr field. */
+/* If there is more than one ptr to an object, we store q | FLAG_MANY,     */
+/* where q is a pointer to a back_edges object.                            */
+/* Every once in a while we use a back_edges object even for a single      */
+/* pointer, since we need the other fields in the back_edges structure to  */
+/* be present in some fraction of the objects.  Otherwise we get serious   */
+/* performance issues.                                                     */
 #define FLAG_MANY 2
 
 typedef struct back_edges_struct {
-  word n_edges;        /* Number of edges, including those in continuation     */
-               /* structures.                                          */
+  word n_edges; /* Number of edges, including those in continuation     */
+                /* structures.                                          */
   unsigned short flags;
-#      define RETAIN 1 /* Directly points to a reachable object;       */
-                       /* retain for next GC.                          */
+#       define RETAIN 1 /* Directly points to a reachable object;       */
+                        /* retain for next GC.                          */
   unsigned short height_gc_no;
-               /* If height > 0, then the GC_gc_no value when it       */
-               /* was computed.  If it was computed this cycle, then   */
-               /* it is current.  If it was computed during the        */
-               /* last cycle, then it represents the old height,       */
-               /* which is only saved for live objects referenced by   */
-               /* dead ones.  This may grow due to refs from newly     */
-               /* dead objects.                                        */
+                /* If height > 0, then the GC_gc_no value when it       */
+                /* was computed.  If it was computed this cycle, then   */
+                /* it is current.  If it was computed during the        */
+                /* last cycle, then it represents the old height,       */
+                /* which is only saved for live objects referenced by   */
+                /* dead ones.  This may grow due to refs from newly     */
+                /* dead objects.                                        */
   signed_word height;
-               /* Longest path through unreachable nodes to this node  */
-               /* that we found using depth first search.              */
-  
+                /* Longest path through unreachable nodes to this node  */
+                /* that we found using depth first search.              */
+
 #   define HEIGHT_UNKNOWN ((signed_word)(-2))
 #   define HEIGHT_IN_PROGRESS ((signed_word)(-1))
   ptr_t edges[MAX_IN];
   struct back_edges_struct *cont;
-               /* Pointer to continuation structure; we use only the   */
-               /* edges field in the continuation.                     */
-               /* also used as free list link.                         */
+                /* Pointer to continuation structure; we use only the   */
+                /* edges field in the continuation.                     */
+                /* also used as free list link.                         */
 } back_edges;
 
-/* Allocate a new back edge structure.  Should be more sophisticated   */
-/* if this were production code.                                       */
+/* Allocate a new back edge structure.  Should be more sophisticated    */
+/* if this were production code.                                        */
 #define MAX_BACK_EDGE_STRUCTS 100000
 static back_edges *back_edge_space = 0;
 STATIC int GC_n_back_edge_structs = 0;
-                               /* Serves as pointer to never used      */
-                               /* back_edges space.                    */
+                                /* Serves as pointer to never used      */
+                                /* back_edges space.                    */
 static back_edges *avail_back_edges = 0;
-                               /* Pointer to free list of deallocated  */
-                               /* back_edges structures.               */
+                                /* Pointer to free list of deallocated  */
+                                /* back_edges structures.               */
 
 static back_edges * new_back_edges(void)
 {
   if (0 == back_edge_space) {
     back_edge_space = (back_edges *)
-                       GET_MEM(MAX_BACK_EDGE_STRUCTS*sizeof(back_edges));
+                        GET_MEM(MAX_BACK_EDGE_STRUCTS*sizeof(back_edges));
     GC_add_to_our_memory((ptr_t)back_edge_space,
-                        MAX_BACK_EDGE_STRUCTS*sizeof(back_edges));
+                         MAX_BACK_EDGE_STRUCTS*sizeof(back_edges));
   }
   if (0 != avail_back_edges) {
     back_edges * result = avail_back_edges;
@@ -98,12 +99,12 @@ static back_edges * new_back_edges(void)
   }
   if (GC_n_back_edge_structs >= MAX_BACK_EDGE_STRUCTS - 1) {
     ABORT("needed too much space for back edges: adjust "
-         "MAX_BACK_EDGE_STRUCTS");
+          "MAX_BACK_EDGE_STRUCTS");
   }
   return back_edge_space + (GC_n_back_edge_structs++);
 }
 
-/* Deallocate p and its associated continuation structures.    */
+/* Deallocate p and its associated continuation structures.     */
 static void deallocate_back_edges(back_edges *p)
 {
    back_edges *last = p;
@@ -113,10 +114,10 @@ static void deallocate_back_edges(back_edges *p)
    avail_back_edges = p;
 }
 
-/* Table of objects that are currently on the depth-first search       */
-/* stack.  Only objects with in-degree one are in this table.          */
-/* Other objects are identified using HEIGHT_IN_PROGRESS.              */
-/* FIXME: This data structure NEEDS IMPROVEMENT.                       */
+/* Table of objects that are currently on the depth-first search        */
+/* stack.  Only objects with in-degree one are in this table.           */
+/* Other objects are identified using HEIGHT_IN_PROGRESS.               */
+/* FIXME: This data structure NEEDS IMPROVEMENT.                        */
 #define INITIAL_IN_PROGRESS 10000
 static ptr_t * in_progress_space = 0;
 static size_t in_progress_size = 0;
@@ -129,23 +130,23 @@ static void push_in_progress(ptr_t p)
       in_progress_size = INITIAL_IN_PROGRESS;
       in_progress_space = (ptr_t *)GET_MEM(in_progress_size * sizeof(ptr_t));
       GC_add_to_our_memory((ptr_t)in_progress_space,
-                          in_progress_size * sizeof(ptr_t));
+                           in_progress_size * sizeof(ptr_t));
     } else {
       ptr_t * new_in_progress_space;
       in_progress_size *= 2;
       new_in_progress_space = (ptr_t *)
-                               GET_MEM(in_progress_size * sizeof(ptr_t));
+                                GET_MEM(in_progress_size * sizeof(ptr_t));
       GC_add_to_our_memory((ptr_t)new_in_progress_space,
-                          in_progress_size * sizeof(ptr_t));
+                           in_progress_size * sizeof(ptr_t));
       BCOPY(in_progress_space, new_in_progress_space,
-           n_in_progress * sizeof(ptr_t));
+            n_in_progress * sizeof(ptr_t));
       in_progress_space = new_in_progress_space;
-      /* FIXME: This just drops the old space. */
+      /* FIXME: This just drops the old space.  */
     }
   }
   if (in_progress_space == 0)
       ABORT("MAKE_BACK_GRAPH: Out of in-progress space: "
-           "Huge linear data structure?");
+            "Huge linear data structure?");
   in_progress_space[n_in_progress++] = p;
 }
 
@@ -158,24 +159,24 @@ static GC_bool is_in_progress(ptr_t p)
   return FALSE;
 }
 
-static void pop_in_progress(ptr_t p)
+GC_INLINE void pop_in_progress(ptr_t p)
 {
   --n_in_progress;
   GC_ASSERT(in_progress_space[n_in_progress] == p);
 }
 
 #define GET_OH_BG_PTR(p) \
-               (ptr_t)REVEAL_POINTER(((oh *)(p)) -> oh_bg_ptr)
-#define SET_OH_BG_PTR(p,q) (((oh *)(p)) -> oh_bg_ptr) = HIDE_POINTER(q)
+                (ptr_t)GC_REVEAL_POINTER(((oh *)(p)) -> oh_bg_ptr)
+#define SET_OH_BG_PTR(p,q) (((oh *)(p)) -> oh_bg_ptr = GC_HIDE_POINTER(q))
 
-/* Execute s once for each predecessor q of p in the points-to graph.  */
-/* s should be a bracketed statement.  We declare q.                   */
+/* Execute s once for each predecessor q of p in the points-to graph.   */
+/* s should be a bracketed statement.  We declare q.                    */
 #define FOR_EACH_PRED(q, p, s) \
   { \
     ptr_t q = GET_OH_BG_PTR(p); \
     if (!((word)q & FLAG_MANY)) { \
       if (q && !((word)q & 1)) s \
-             /* !((word)q & 1) checks for a misnterpreted freelist link */ \
+              /* !((word)q & 1) checks for a misnterpreted freelist link */ \
     } else { \
       back_edges *orig_be_ = (back_edges *)((word)q & ~FLAG_MANY); \
       back_edges *be_ = orig_be_; \
@@ -183,16 +184,16 @@ static void pop_in_progress(ptr_t p)
       word total_; \
       word n_edges_ = be_ -> n_edges; \
       for (total_ = 0, local_ = 0; total_ < n_edges_; ++local_, ++total_) { \
-         if (local_ == MAX_IN) { \
-             be_ = be_ -> cont; \
-             local_ = 0; \
-         } \
-         q = be_ -> edges[local_]; s \
+          if (local_ == MAX_IN) { \
+              be_ = be_ -> cont; \
+              local_ = 0; \
+          } \
+          q = be_ -> edges[local_]; s \
       } \
     } \
   }
 
-/* Ensure that p has a back_edges structure associated with it.        */
+/* Ensure that p has a back_edges structure associated with it. */
 static void ensure_struct(ptr_t p)
 {
   ptr_t old_back_ptr = GET_OH_BG_PTR(p);
@@ -213,53 +214,53 @@ static void ensure_struct(ptr_t p)
   }
 }
 
-/* Add the (forward) edge from p to q to the backward graph.  Both p   */
-/* q are pointers to the object base, i.e. pointers to an oh.          */
-static void add_edge(ptr_t p,  ptr_t q)
+/* Add the (forward) edge from p to q to the backward graph.  Both p    */
+/* q are pointers to the object base, i.e. pointers to an oh.           */
+static void add_edge(ptr_t p, ptr_t q)
 {
     ptr_t old_back_ptr = GET_OH_BG_PTR(q);
     back_edges * be, *be_cont;
     word i;
     static unsigned random_number = 13;
 #   define GOT_LUCKY_NUMBER (((++random_number) & 0x7f) == 0)
-      /* A not very random number we use to occasionally allocate a    */
-      /* back_edges structure even for a single backward edge.  This   */
-      /* prevents us from repeatedly tracing back through very long    */
-      /* chains, since we will have some place to store height and     */
-      /* in_progress flags along the way.                              */
+      /* A not very random number we use to occasionally allocate a     */
+      /* back_edges structure even for a single backward edge.  This    */
+      /* prevents us from repeatedly tracing back through very long     */
+      /* chains, since we will have some place to store height and      */
+      /* in_progress flags along the way.                               */
 
     GC_ASSERT(p == GC_base(p) && q == GC_base(q));
     if (!GC_HAS_DEBUG_INFO(q) || !GC_HAS_DEBUG_INFO(p)) {
-      /* This is really a misinterpreted free list link, since we saw */
-      /* a pointer to a free list.  Dont overwrite it!               */
+      /* This is really a misinterpreted free list link, since we saw   */
+      /* a pointer to a free list.  Don't overwrite it!                 */
       return;
     }
     if (0 == old_back_ptr) {
-       SET_OH_BG_PTR(q, p);
-       if (GOT_LUCKY_NUMBER) ensure_struct(q);
-       return;
+        SET_OH_BG_PTR(q, p);
+        if (GOT_LUCKY_NUMBER) ensure_struct(q);
+        return;
     }
     /* Check whether it was already in the list of predecessors. */
       FOR_EACH_PRED(pred, q, { if (p == pred) return; });
     ensure_struct(q);
     old_back_ptr = GET_OH_BG_PTR(q);
     be = (back_edges *)((word)old_back_ptr & ~FLAG_MANY);
-    for (i = be -> n_edges, be_cont = be; i > MAX_IN;
-       be_cont = be_cont -> cont, i -= MAX_IN) {}
+    for (i = be -> n_edges, be_cont = be; i > MAX_IN; i -= MAX_IN)
+        be_cont = be_cont -> cont;
     if (i == MAX_IN) {
-       be_cont -> cont = new_back_edges();
-       be_cont = be_cont -> cont;
-       i = 0;
+        be_cont -> cont = new_back_edges();
+        be_cont = be_cont -> cont;
+        i = 0;
     }
     be_cont -> edges[i] = p;
     be -> n_edges++;
     if (be -> n_edges == 100) {
 #       if 0
-         if (GC_print_stats) {
-           GC_err_printf("The following object has in-degree >= 100:\n");
-           GC_print_heap_obj(q);
-         }
-#      endif
+          if (GC_print_stats) {
+            GC_err_printf("The following object has in-degree >= 100:\n");
+            GC_print_heap_obj(q);
+          }
+#       endif
     }
 }
 
@@ -279,7 +280,7 @@ static void per_object_helper(struct hblk *h, word fn)
   } while (i + (int)sz <= BYTES_TO_WORDS(HBLKSIZE));
 }
 
-void GC_apply_to_each_object(per_object_func f)
+GC_INLINE void GC_apply_to_each_object(per_object_func f)
 {
   GC_apply_to_all_blocks(per_object_helper, (word)f);
 }
@@ -293,25 +294,25 @@ static void reset_back_edge(ptr_t p, size_t n_bytes, word gc_descr)
     if ((word)old_back_ptr & FLAG_MANY) {
       back_edges *be = (back_edges *)((word)old_back_ptr & ~FLAG_MANY);
       if (!(be -> flags & RETAIN)) {
-       deallocate_back_edges(be);
-        SET_OH_BG_PTR(p, 0); 
+        deallocate_back_edges(be);
+        SET_OH_BG_PTR(p, 0);
       } else {
 
-       GC_ASSERT(GC_is_marked(p));
+        GC_ASSERT(GC_is_marked(p));
 
-       /* Back edges may point to objects that will not be retained.   */
-       /* Delete them for now, but remember the height.                */
-       /* Some will be added back at next GC.                          */
-         be -> n_edges = 0;
-         if (0 != be -> cont) {
-           deallocate_back_edges(be -> cont);
-           be -> cont = 0;
-         }
+        /* Back edges may point to objects that will not be retained.   */
+        /* Delete them for now, but remember the height.                */
+        /* Some will be added back at next GC.                          */
+          be -> n_edges = 0;
+          if (0 != be -> cont) {
+            deallocate_back_edges(be -> cont);
+            be -> cont = 0;
+          }
 
-       GC_ASSERT(GC_is_marked(p));
+        GC_ASSERT(GC_is_marked(p));
 
-       /* We only retain things for one GC cycle at a time.            */
-         be -> flags &= ~RETAIN;
+        /* We only retain things for one GC cycle at a time.            */
+          be -> flags &= ~RETAIN;
       }
     } else /* Simple back pointer */ {
       /* Clear to avoid dangling pointer. */
@@ -324,33 +325,33 @@ static void add_back_edges(ptr_t p, size_t n_bytes, word gc_descr)
 {
   word *currentp = (word *)(p + sizeof(oh));
 
-  /* For now, fix up non-length descriptors conservatively.    */
+  /* For now, fix up non-length descriptors conservatively.     */
     if((gc_descr & GC_DS_TAGS) != GC_DS_LENGTH) {
       gc_descr = n_bytes;
     }
   while (currentp < (word *)(p + gc_descr)) {
     word current = *currentp++;
     FIXUP_POINTER(current);
-    if (current >= (word)GC_least_plausible_heap_addr && 
-       current <= (word)GC_greatest_plausible_heap_addr) {
+    if (current >= (word)GC_least_plausible_heap_addr &&
+        current <= (word)GC_greatest_plausible_heap_addr) {
        ptr_t target = GC_base((void *)current);
        if (0 != target) {
-        add_edge(p, target);
+         add_edge(p, target);
        }
     }
   }
 }
 
-/* Rebuild the representation of the backward reachability graph.      */
-/* Does not examine mark bits.  Can be called before GC.               */
-void GC_build_back_graph(void)
+/* Rebuild the representation of the backward reachability graph.       */
+/* Does not examine mark bits.  Can be called before GC.                */
+GC_INNER void GC_build_back_graph(void)
 {
   GC_apply_to_each_object(add_back_edges);
 }
 
-/* Return an approximation to the length of the longest simple path    */
-/* through unreachable objects to p.  We refer to this as the height   */
-/* of p.                                                               */
+/* Return an approximation to the length of the longest simple path     */
+/* through unreachable objects to p.  We refer to this as the height    */
+/* of p.                                                                */
 static word backwards_height(ptr_t p)
 {
   word result;
@@ -359,9 +360,9 @@ static word backwards_height(ptr_t p)
 
   if (0 == back_ptr) return 1;
   if (!((word)back_ptr & FLAG_MANY)) {
-    if (is_in_progress(p)) return 0;  /* DFS back edge, i.e. we followed  */
-                                     /* an edge to an object already     */
-                                     /* on our stack: ignore             */
+    if (is_in_progress(p)) return 0; /* DFS back edge, i.e. we followed */
+                                     /* an edge to an object already    */
+                                     /* on our stack: ignore            */
     push_in_progress(p);
     result = backwards_height(back_ptr)+1;
     pop_in_progress(p);
@@ -378,9 +379,9 @@ static word backwards_height(ptr_t p)
     word this_height;
     if (GC_is_marked(q) && !(FLAG_MANY & (word)GET_OH_BG_PTR(p))) {
       if (GC_print_stats)
-         GC_log_printf("Found bogus pointer from %p to %p\n", q, p);
-       /* Reachable object "points to" unreachable one.                */
-       /* Could be caused by our lax treatment of GC descriptors.      */
+          GC_log_printf("Found bogus pointer from %p to %p\n", q, p);
+        /* Reachable object "points to" unreachable one.                */
+        /* Could be caused by our lax treatment of GC descriptors.      */
       this_height = 1;
     } else {
         this_height = backwards_height(q);
@@ -392,15 +393,15 @@ static word backwards_height(ptr_t p)
   return result;
 }
 
-STATIC word GC_max_height;
-STATIC ptr_t GC_deepest_obj;
+STATIC word GC_max_height = 0;
+STATIC ptr_t GC_deepest_obj = NULL;
 
-/* Compute the maximum height of every unreachable predecessor p of  a         */
-/* reachable object.  Arrange to save the heights of all such objects p        */
-/* so that they can be used in calculating the height of objects in the        */
-/* next GC.                                                            */
-/* Set GC_max_height to be the maximum height we encounter, and        */
-/* GC_deepest_obj to be the corresponding object.                      */
+/* Compute the maximum height of every unreachable predecessor p of a   */
+/* reachable object.  Arrange to save the heights of all such objects p */
+/* so that they can be used in calculating the height of objects in the */
+/* next GC.                                                             */
+/* Set GC_max_height to be the maximum height we encounter, and         */
+/* GC_deepest_obj to be the corresponding object.                       */
 /*ARGSUSED*/
 static void update_max_height(ptr_t p, size_t n_bytes, word gc_descr)
 {
@@ -410,9 +411,9 @@ static void update_max_height(ptr_t p, size_t n_bytes, word gc_descr)
     ptr_t back_ptr;
     back_edges *be = 0;
 
-    /* If we remembered a height last time, use it as a minimum.       */
-    /* It may have increased due to newly unreachable chains pointing  */
-    /* to p, but it can't have decreased.                              */
+    /* If we remembered a height last time, use it as a minimum.        */
+    /* It may have increased due to newly unreachable chains pointing   */
+    /* to p, but it can't have decreased.                               */
     back_ptr = GET_OH_BG_PTR(p);
     if (0 != back_ptr && ((word)back_ptr & FLAG_MANY)) {
       be = (back_edges *)((word)back_ptr & ~FLAG_MANY);
@@ -423,33 +424,33 @@ static void update_max_height(ptr_t p, size_t n_bytes, word gc_descr)
         word q_height;
 
         q_height = backwards_height(q);
-       if (q_height > p_height) {
-         p_height = q_height;
-         p_deepest_obj = q;
-       }
+        if (q_height > p_height) {
+          p_height = q_height;
+          p_deepest_obj = q;
+        }
       }
     });
     if (p_height > 0) {
       /* Remember the height for next time. */
-       if (be == 0) {
-         ensure_struct(p);
-         back_ptr = GET_OH_BG_PTR(p);
-         be = (back_edges *)((word)back_ptr & ~FLAG_MANY);
-       }
-       be -> flags |= RETAIN;
-       be -> height = p_height;
-       be -> height_gc_no = (unsigned short)GC_gc_no;
+        if (be == 0) {
+          ensure_struct(p);
+          back_ptr = GET_OH_BG_PTR(p);
+          be = (back_edges *)((word)back_ptr & ~FLAG_MANY);
+        }
+        be -> flags |= RETAIN;
+        be -> height = p_height;
+        be -> height_gc_no = (unsigned short)GC_gc_no;
     }
     if (p_height > GC_max_height) {
-       GC_max_height = p_height;
-       GC_deepest_obj = p_deepest_obj;
+        GC_max_height = p_height;
+        GC_deepest_obj = p_deepest_obj;
     }
   }
 }
 
 STATIC word GC_max_max_height = 0;
 
-void GC_traverse_back_graph(void)
+GC_INNER void GC_traverse_back_graph(void)
 {
   GC_max_height = 0;
   GC_apply_to_each_object(update_max_height);
@@ -460,24 +461,19 @@ void GC_traverse_back_graph(void)
 void GC_print_back_graph_stats(void)
 {
   GC_printf("Maximum backwards height of reachable objects at GC %lu is %ld\n",
-           (unsigned long) GC_gc_no, (unsigned long)GC_max_height);
+            (unsigned long) GC_gc_no, (unsigned long)GC_max_height);
   if (GC_max_height > GC_max_max_height) {
     GC_max_max_height = GC_max_height;
     GC_printf("The following unreachable object is last in a longest chain "
-             "of unreachable objects:\n");
+              "of unreachable objects:\n");
     GC_print_heap_obj(GC_deepest_obj);
   }
   if (GC_print_stats) {
     GC_log_printf("Needed max total of %d back-edge structs\n",
-                 GC_n_back_edge_structs);
+                  GC_n_back_edge_structs);
   }
   GC_apply_to_each_object(reset_back_edge);
   GC_deepest_obj = 0;
 }
 
-#else  /* !MAKE_BACK_GRAPH */
-
-extern int GC_quiet;
-       /* ANSI C doesn't allow translation units to be empty.  */
-
-#endif /* !MAKE_BACK_GRAPH */
+#endif /* MAKE_BACK_GRAPH */
index f75ed901f648ef8aeb098c84f03432f04657f3f9..25ebea8e177a403031e27e6b524198b92b60bc0b 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  *
@@ -11,8 +11,8 @@
  * provided the above notices are retained, and a notice that the code was
  * modified is included with the above copyright notice.
  */
-/* Boehm, August 9, 1995 6:09 pm PDT */
-# include "private/gc_priv.h"
+
+#include "private/gc_priv.h"
 
 /*
  * We maintain several hash tables of hblks that have had false hits.
  * from elsewhere, since the former can pin a large object that spans the
  * block, eventhough it does not start on the dangerous block.
  */
+
 /*
  * Externally callable routines are:
+
  * GC_add_to_black_list_normal
  * GC_add_to_black_list_stack
  * GC_promote_black_lists
  * All require that the allocator lock is held.
  */
 
-/* Pointers to individual tables.  We replace one table by another by  */
-/* switching these pointers.                                           */
-STATIC word * GC_old_normal_bl;
-               /* Nonstack false references seen at last full          */
-               /* collection.                                          */
-STATIC word * GC_incomplete_normal_bl;
-               /* Nonstack false references seen since last            */
-               /* full collection.                                     */
-STATIC word * GC_old_stack_bl;
-STATIC word * GC_incomplete_stack_bl;
+/* Pointers to individual tables.  We replace one table by another by   */
+/* switching these pointers.                                            */
+STATIC word * GC_old_normal_bl = NULL;
+                /* Nonstack false references seen at last full          */
+                /* collection.                                          */
+STATIC word * GC_incomplete_normal_bl = NULL;
+                /* Nonstack false references seen since last            */
+                /* full collection.                                     */
+STATIC word * GC_old_stack_bl = NULL;
+STATIC word * GC_incomplete_stack_bl = NULL;
 
-word GC_total_stack_black_listed;
+STATIC word GC_total_stack_black_listed = 0;
+                        /* Number of bytes on stack blacklist.  */
 
-word GC_black_list_spacing = MINHINCR*HBLKSIZE;  /* Initial rough guess */
+GC_INNER word GC_black_list_spacing = MINHINCR * HBLKSIZE;
+                        /* Initial rough guess. */
 
-void GC_clear_bl(word *);
+STATIC void GC_clear_bl(word *);
 
-void GC_default_print_heap_obj_proc(ptr_t p)
+GC_INNER void GC_default_print_heap_obj_proc(ptr_t p)
 {
     ptr_t base = GC_base(p);
-
     GC_err_printf("start: %p, appr. length: %ld", base,
-                 (unsigned long)GC_size(base));
+                  (unsigned long)GC_size(base));
 }
 
-void (*GC_print_heap_obj) (ptr_t p) = GC_default_print_heap_obj_proc;
+GC_INNER void (*GC_print_heap_obj)(ptr_t p) = GC_default_print_heap_obj_proc;
 
 #ifdef PRINT_BLACK_LIST
 STATIC void GC_print_source_ptr(ptr_t p)
 {
     ptr_t base = GC_base(p);
     if (0 == base) {
-       if (0 == p) {
-           GC_err_printf("in register");
-       } else {
-           GC_err_printf("in root set");
-       }
+        if (0 == p) {
+            GC_err_printf("in register");
+        } else {
+            GC_err_printf("in root set");
+        }
     } else {
-       GC_err_printf("in object at ");
-       /* FIXME: We can't call the debug version of GC_print_heap_obj  */
-       /* (with PRINT_CALL_CHAIN) here because the lock is held and    */
-       /* the world is stopped.                                        */
-       GC_default_print_heap_obj_proc(base);
+        GC_err_printf("in object at ");
+        /* FIXME: We can't call the debug version of GC_print_heap_obj  */
+        /* (with PRINT_CALL_CHAIN) here because the lock is held and    */
+        /* the world is stopped.                                        */
+        GC_default_print_heap_obj_proc(base);
     }
 }
 #endif
 
-void GC_bl_init(void)
+GC_INNER void GC_bl_init(void)
 {
     if (!GC_all_interior_pointers) {
       GC_old_normal_bl = (word *)
-                        GC_scratch_alloc((word)(sizeof (page_hash_table)));
+                         GC_scratch_alloc((word)(sizeof (page_hash_table)));
       GC_incomplete_normal_bl = (word *)GC_scratch_alloc
-                                       ((word)(sizeof(page_hash_table)));
+                                        ((word)(sizeof(page_hash_table)));
       if (GC_old_normal_bl == 0 || GC_incomplete_normal_bl == 0) {
         GC_err_printf("Insufficient memory for black list\n");
         EXIT();
@@ -98,7 +99,7 @@ void GC_bl_init(void)
     }
     GC_old_stack_bl = (word *)GC_scratch_alloc((word)(sizeof(page_hash_table)));
     GC_incomplete_stack_bl = (word *)GC_scratch_alloc
-                                       ((word)(sizeof(page_hash_table)));
+                                        ((word)(sizeof(page_hash_table)));
     if (GC_old_stack_bl == 0 || GC_incomplete_stack_bl == 0) {
         GC_err_printf("Insufficient memory for black list\n");
         EXIT();
@@ -106,26 +107,26 @@ void GC_bl_init(void)
     GC_clear_bl(GC_old_stack_bl);
     GC_clear_bl(GC_incomplete_stack_bl);
 }
-               
-void GC_clear_bl(word *doomed)
+
+STATIC void GC_clear_bl(word *doomed)
 {
     BZERO(doomed, sizeof(page_hash_table));
 }
 
-void GC_copy_bl(word *old, word *new)
+STATIC void GC_copy_bl(word *old, word *new)
 {
     BCOPY(old, new, sizeof(page_hash_table));
 }
 
 static word total_stack_black_listed(void);
 
-/* Signal the completion of a collection.  Turn the incomplete black   */
-/* lists into new black lists, etc.                                    */                       
-void GC_promote_black_lists(void)
+/* Signal the completion of a collection.  Turn the incomplete black    */
+/* lists into new black lists, etc.                                     */
+GC_INNER void GC_promote_black_lists(void)
 {
     word * very_old_normal_bl = GC_old_normal_bl;
     word * very_old_stack_bl = GC_old_stack_bl;
-    
+
     GC_old_normal_bl = GC_incomplete_normal_bl;
     GC_old_stack_bl = GC_incomplete_stack_bl;
     if (!GC_all_interior_pointers) {
@@ -136,25 +137,25 @@ void GC_promote_black_lists(void)
     GC_incomplete_stack_bl = very_old_stack_bl;
     GC_total_stack_black_listed = total_stack_black_listed();
     if (GC_print_stats == VERBOSE)
-       GC_log_printf("%ld bytes in heap blacklisted for interior pointers\n",
-                     (unsigned long)GC_total_stack_black_listed);
+        GC_log_printf("%ld bytes in heap blacklisted for interior pointers\n",
+                      (unsigned long)GC_total_stack_black_listed);
     if (GC_total_stack_black_listed != 0) {
         GC_black_list_spacing =
-               HBLKSIZE*(GC_heapsize/GC_total_stack_black_listed);
+                HBLKSIZE*(GC_heapsize/GC_total_stack_black_listed);
     }
     if (GC_black_list_spacing < 3 * HBLKSIZE) {
-       GC_black_list_spacing = 3 * HBLKSIZE;
+        GC_black_list_spacing = 3 * HBLKSIZE;
     }
     if (GC_black_list_spacing > MAXHINCR * HBLKSIZE) {
-       GC_black_list_spacing = MAXHINCR * HBLKSIZE;
-       /* Makes it easier to allocate really huge blocks, which otherwise */
-       /* may have problems with nonuniform blacklist distributions.      */
-       /* This way we should always succeed immediately after growing the */ 
-       /* heap.                                                           */
+        GC_black_list_spacing = MAXHINCR * HBLKSIZE;
+        /* Makes it easier to allocate really huge blocks, which otherwise */
+        /* may have problems with nonuniform blacklist distributions.      */
+        /* This way we should always succeed immediately after growing the */
+        /* heap.                                                           */
     }
 }
 
-void GC_unpromote_black_lists(void)
+GC_INNER void GC_unpromote_black_lists(void)
 {
     if (!GC_all_interior_pointers) {
       GC_copy_bl(GC_old_normal_bl, GC_incomplete_normal_bl);
@@ -162,55 +163,55 @@ void GC_unpromote_black_lists(void)
     GC_copy_bl(GC_old_stack_bl, GC_incomplete_stack_bl);
 }
 
-/* P is not a valid pointer reference, but it falls inside     */
-/* the plausible heap bounds.                                  */
-/* Add it to the normal incomplete black list if appropriate.  */
+/* P is not a valid pointer reference, but it falls inside      */
+/* the plausible heap bounds.                                   */
+/* Add it to the normal incomplete black list if appropriate.   */
 #ifdef PRINT_BLACK_LIST
-  void GC_add_to_black_list_normal(word p, ptr_t source)
+  GC_INNER void GC_add_to_black_list_normal(word p, ptr_t source)
 #else
-  void GC_add_to_black_list_normal(word p)
+  GC_INNER void GC_add_to_black_list_normal(word p)
 #endif
 {
     if (!(GC_modws_valid_offsets[p & (sizeof(word)-1)])) return;
     {
         word index = PHT_HASH((word)p);
-        
+
         if (HDR(p) == 0 || get_pht_entry_from_index(GC_old_normal_bl, index)) {
-#          ifdef PRINT_BLACK_LIST
-               if (!get_pht_entry_from_index(GC_incomplete_normal_bl, index)) {
-                 GC_err_printf(
-                       "Black listing (normal) %p referenced from %p ",
-                       (ptr_t) p, source);
-                 GC_print_source_ptr(source);
-                 GC_err_puts("\n");
-               }
+#           ifdef PRINT_BLACK_LIST
+                if (!get_pht_entry_from_index(GC_incomplete_normal_bl, index)) {
+                  GC_err_printf(
+                        "Black listing (normal) %p referenced from %p ",
+                        (ptr_t) p, source);
+                  GC_print_source_ptr(source);
+                  GC_err_puts("\n");
+                }
 #           endif
             set_pht_entry_from_index(GC_incomplete_normal_bl, index);
         } /* else this is probably just an interior pointer to an allocated */
-          /* object, and isn't worth black listing.                        */
+          /* object, and isn't worth black listing.                         */
     }
 }
 
 /* And the same for false pointers from the stack. */
 #ifdef PRINT_BLACK_LIST
-  void GC_add_to_black_list_stack(word p, ptr_t source)
+  GC_INNER void GC_add_to_black_list_stack(word p, ptr_t source)
 #else
-  void GC_add_to_black_list_stack(word p)
+  GC_INNER void GC_add_to_black_list_stack(word p)
 #endif
 {
     word index = PHT_HASH((word)p);
-        
+
     if (HDR(p) == 0 || get_pht_entry_from_index(GC_old_stack_bl, index)) {
-#      ifdef PRINT_BLACK_LIST
-           if (!get_pht_entry_from_index(GC_incomplete_stack_bl, index)) {
-                 GC_err_printf(
-                       "Black listing (stack) %p referenced from %p ",
-                       (ptr_t)p, source);
-                 GC_print_source_ptr(source);
-                 GC_err_puts("\n");
-           }
+#       ifdef PRINT_BLACK_LIST
+            if (!get_pht_entry_from_index(GC_incomplete_stack_bl, index)) {
+                  GC_err_printf(
+                        "Black listing (stack) %p referenced from %p ",
+                        (ptr_t)p, source);
+                  GC_print_source_ptr(source);
+                  GC_err_puts("\n");
+            }
 #       endif
-       set_pht_entry_from_index(GC_incomplete_stack_bl, index);
+        set_pht_entry_from_index(GC_incomplete_stack_bl, index);
     }
 }
 
@@ -222,7 +223,7 @@ void GC_unpromote_black_lists(void)
  * If (h,len) is not black listed, return 0.
  * Knows about the structure of the black list hash tables.
  */
-struct hblk * GC_is_black_listed(struct hblk *h, word len)
+GC_INNER struct hblk * GC_is_black_listed(struct hblk *h, word len)
 {
     word index = PHT_HASH((word)h);
     word i;
@@ -234,8 +235,8 @@ struct hblk * GC_is_black_listed(struct hblk *h, word len)
         return(h+1);
       }
     }
-    
-    for (i = 0; ; ) {
+
+    for (i = 0;;) {
         if (GC_old_stack_bl[divWORDSZ(index)] == 0
             && GC_incomplete_stack_bl[divWORDSZ(index)] == 0) {
             /* An easy case */
@@ -253,37 +254,35 @@ struct hblk * GC_is_black_listed(struct hblk *h, word len)
     return(0);
 }
 
-
-/* Return the number of blacklisted blocks in a given range.   */
-/* Used only for statistical purposes.                         */
-/* Looks only at the GC_incomplete_stack_bl.                   */
-word GC_number_stack_black_listed(struct hblk *start, struct hblk *endp1)
+/* Return the number of blacklisted blocks in a given range.    */
+/* Used only for statistical purposes.                          */
+/* Looks only at the GC_incomplete_stack_bl.                    */
+STATIC word GC_number_stack_black_listed(struct hblk *start,
+                                         struct hblk *endp1)
 {
     register struct hblk * h;
     word result = 0;
-    
+
     for (h = start; h < endp1; h++) {
         word index = PHT_HASH((word)h);
-        
+
         if (get_pht_entry_from_index(GC_old_stack_bl, index)) result++;
     }
     return(result);
 }
 
-
 /* Return the total number of (stack) black-listed bytes. */
 static word total_stack_black_listed(void)
 {
     register unsigned i;
     word total = 0;
-    
+
     for (i = 0; i < GC_n_heap_sects; i++) {
-       struct hblk * start = (struct hblk *) GC_heap_sects[i].hs_start;
-       size_t len = (word) GC_heap_sects[i].hs_bytes;
-       struct hblk * endp1 = start + len/HBLKSIZE;
-       
-       total += GC_number_stack_black_listed(start, endp1);
+        struct hblk * start = (struct hblk *) GC_heap_sects[i].hs_start;
+        size_t len = (word) GC_heap_sects[i].hs_bytes;
+        struct hblk * endp1 = start + len/HBLKSIZE;
+
+        total += GC_number_stack_black_listed(start, endp1);
     }
     return(total * HBLKSIZE);
 }
-
index 4f740539913890fab901dec03e86ca1aa8721667..aa42decee1bc40dd4247052c18fa572e8de6c0d3 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
 P=`pwd`/libatomic_ops-install
-cd libatomic_ops-*[0-9]
+cd libatomic_ops
 ./configure --prefix=$P
 $MAKE CC=$CC install
index 0c24e33db132271ce0d3b76b44cb41693727af42..848a270d49bd632a49b00c8be7c2957621371766 100755 (executable)
@@ -6,7 +6,7 @@ mkdir libatomic_ops-install
 P=`pwd`
 Q=`mktemp -d`
 ln -s "$P" $Q/dir
-cd $Q/dir/libatomic_ops-*[0-9]
+cd $Q/dir/libatomic_ops
 ./configure --prefix=$Q/dir/libatomic_ops-install
 $MAKE CC=$CC install
 cd /
index 275026d5538fe097f3a517667cc451122db78c91..b8135af79dd977a1f6cc20daf58f6a433a83f371 100644 (file)
  * provided the above notices are retained, and a notice that the code was
  * modified is included with the above copyright notice.
  */
-/* Boehm, March 29, 1995 12:51 pm PST */
-# ifdef CHECKSUMS
 
-# include "private/gc_priv.h"
+#include "private/gc_priv.h"
 
-/* This is debugging code intended to verify the results of dirty bit  */
-/* computations. Works only in a single threaded environment.          */
-/* We assume that stubborn objects are changed only when they are      */
-/* enabled for writing.  (Certain kinds of writing are actually                */
-/* safe under other conditions.)                                       */
-# define NSUMS 10000
+#ifdef CHECKSUMS
 
-# define OFFSET 0x10000
+/* This is debugging code intended to verify the results of dirty bit   */
+/* computations. Works only in a single threaded environment.           */
+/* We assume that stubborn objects are changed only when they are       */
+/* enabled for writing.  (Certain kinds of writing are actually         */
+/* safe under other conditions.)                                        */
+#define NSUMS 10000
+
+#define OFFSET 0x10000
 
 typedef struct {
-       GC_bool new_valid;
-       word old_sum;
-       word new_sum;
-       struct hblk * block;    /* Block to which this refers + OFFSET  */
-                               /* to hide it from collector.           */
+        GC_bool new_valid;
+        word old_sum;
+        word new_sum;
+        struct hblk * block;    /* Block to which this refers + OFFSET  */
+                                /* to hide it from collector.           */
 } page_entry;
 
-page_entry GC_sums [NSUMS];
+page_entry GC_sums[NSUMS];
+
+STATIC word GC_faulted[NSUMS] = { 0 };
+                /* Record of pages on which we saw a write fault.       */
 
-STATIC word GC_faulted[NSUMS]; /* Record of pages on which we saw a write */
-                               /* fault.                                  */
 STATIC size_t GC_n_faulted = 0;
 
 void GC_record_fault(struct hblk * h)
@@ -56,52 +57,52 @@ STATIC GC_bool GC_was_faulted(struct hblk *h)
     page += GC_page_size - 1;
     page &= ~(GC_page_size - 1);
     for (i = 0; i < GC_n_faulted; ++i) {
-       if (GC_faulted[i] == page) return TRUE;
+        if (GC_faulted[i] == page) return TRUE;
     }
     return FALSE;
 }
 
 STATIC word GC_checksum(struct hblk *h)
 {
-    register word *p = (word *)h;
-    register word *lim = (word *)(h+1);
-    register word result = 0;
-    
+    word *p = (word *)h;
+    word *lim = (word *)(h+1);
+    word result = 0;
+
     while (p < lim) {
         result += *p++;
     }
     return(result | 0x80000000 /* doesn't look like pointer */);
 }
 
-# ifdef STUBBORN_ALLOC
-/* Check whether a stubborn object from the given block appears on     */
-/* the appropriate free list.                                          */
-STATIC GC_bool GC_on_free_list(struct hblk *h)
-{
+#ifdef STUBBORN_ALLOC
+  /* Check whether a stubborn object from the given block appears on    */
+  /* the appropriate free list.                                         */
+  STATIC GC_bool GC_on_free_list(struct hblk *h)
+  {
     hdr * hhdr = HDR(h);
     size_t sz = BYTES_TO_WORDS(hhdr -> hb_sz);
     ptr_t p;
-    
+
     if (sz > MAXOBJWORDS) return(FALSE);
     for (p = GC_sobjfreelist[sz]; p != 0; p = obj_link(p)) {
         if (HBLKPTR(p) == h) return(TRUE);
     }
     return(FALSE);
-}
-# endif
-int GC_n_dirty_errors;
-int GC_n_faulted_dirty_errors;
-int GC_n_changed_errors;
-int GC_n_clean;
-int GC_n_dirty;
+  }
+#endif
+
+int GC_n_dirty_errors = 0;
+int GC_n_faulted_dirty_errors = 0;
+int GC_n_changed_errors = 0;
+int GC_n_clean = 0;
+int GC_n_dirty = 0;
 
 STATIC void GC_update_check_page(struct hblk *h, int index)
 {
     page_entry *pe = GC_sums + index;
-    register hdr * hhdr = HDR(h);
+    hdr * hhdr = HDR(h);
     struct hblk *b;
-    
+
     if (pe -> block != 0 && pe -> block != h + OFFSET) ABORT("goofed");
     pe -> old_sum = pe -> new_sum;
     pe -> new_sum = GC_checksum(h);
@@ -111,46 +112,46 @@ STATIC void GC_update_check_page(struct hblk *h, int index)
         }
 #   endif
     if (GC_page_was_dirty(h)) {
-       GC_n_dirty++;
+        GC_n_dirty++;
     } else {
-       GC_n_clean++;
+        GC_n_clean++;
     }
     b = h;
     while (IS_FORWARDING_ADDR_OR_NIL(hhdr) && hhdr != 0) {
-       b -= (word)hhdr;
-       hhdr = HDR(b);
+        b -= (word)hhdr;
+        hhdr = HDR(b);
     }
     if (pe -> new_valid
-       && hhdr != 0 && hhdr -> hb_descr != 0 /* may contain pointers */
-       && pe -> old_sum != pe -> new_sum) {
-       if (!GC_page_was_dirty(h) || !GC_page_was_ever_dirty(h)) {
-           GC_bool was_faulted = GC_was_faulted(h);
-           /* Set breakpoint here */GC_n_dirty_errors++;
-           if (was_faulted) GC_n_faulted_dirty_errors++;
-       }
-#      ifdef STUBBORN_ALLOC
-         if (!HBLK_IS_FREE(hhdr)
-           && hhdr -> hb_obj_kind == STUBBORN
-           && !GC_page_was_changed(h)
-           && !GC_on_free_list(h)) {
-           /* if GC_on_free_list(h) then reclaim may have touched it   */
-           /* without any allocations taking place.                    */
-           /* Set breakpoint here */GC_n_changed_errors++;
-         }
-#      endif
+        && hhdr != 0 && hhdr -> hb_descr != 0 /* may contain pointers */
+        && pe -> old_sum != pe -> new_sum) {
+        if (!GC_page_was_dirty(h) || !GC_page_was_ever_dirty(h)) {
+            GC_bool was_faulted = GC_was_faulted(h);
+            /* Set breakpoint here */GC_n_dirty_errors++;
+            if (was_faulted) GC_n_faulted_dirty_errors++;
+        }
+#       ifdef STUBBORN_ALLOC
+          if (!HBLK_IS_FREE(hhdr)
+            && hhdr -> hb_obj_kind == STUBBORN
+            && !GC_page_was_changed(h)
+            && !GC_on_free_list(h)) {
+            /* if GC_on_free_list(h) then reclaim may have touched it   */
+            /* without any allocations taking place.                    */
+            /* Set breakpoint here */GC_n_changed_errors++;
+          }
+#       endif
     }
     pe -> new_valid = TRUE;
     pe -> block = h + OFFSET;
 }
 
-word GC_bytes_in_used_blocks;
+word GC_bytes_in_used_blocks = 0;
 
 /*ARGSUSED*/
 STATIC void GC_add_block(struct hblk *h, word dummy)
 {
    hdr * hhdr = HDR(h);
    size_t bytes = hhdr -> hb_sz;
-   
+
    bytes += HBLKSIZE-1;
    bytes &= ~(HBLKSIZE-1);
    GC_bytes_in_used_blocks += bytes;
@@ -159,15 +160,15 @@ STATIC void GC_add_block(struct hblk *h, word dummy)
 STATIC void GC_check_blocks(void)
 {
     word bytes_in_free_blocks = GC_large_free_bytes;
-    
+
     GC_bytes_in_used_blocks = 0;
     GC_apply_to_all_blocks(GC_add_block, (word)0);
     GC_printf("GC_bytes_in_used_blocks = %lu, bytes_in_free_blocks = %lu ",
-             (unsigned long)GC_bytes_in_used_blocks,
-             (unsigned long)bytes_in_free_blocks);
+              (unsigned long)GC_bytes_in_used_blocks,
+              (unsigned long)bytes_in_free_blocks);
     GC_printf("GC_heapsize = %lu\n", (unsigned long)GC_heapsize);
     if (GC_bytes_in_used_blocks + bytes_in_free_blocks != GC_heapsize) {
-       GC_printf("LOST SOME BLOCKS!!\n");
+        GC_printf("LOST SOME BLOCKS!!\n");
     }
 }
 
@@ -178,18 +179,18 @@ void GC_check_dirty(void)
     unsigned i;
     struct hblk *h;
     ptr_t start;
-    
+
     GC_check_blocks();
-    
+
     GC_n_dirty_errors = 0;
     GC_n_faulted_dirty_errors = 0;
     GC_n_changed_errors = 0;
     GC_n_clean = 0;
     GC_n_dirty = 0;
-    
+
     index = 0;
     for (i = 0; i < GC_n_heap_sects; i++) {
-       start = GC_heap_sects[i].hs_start;
+        start = GC_heap_sects[i].hs_start;
         for (h = (struct hblk *)start;
              h < (struct hblk *)(start + GC_heap_sects[i].hs_bytes);
              h++) {
@@ -200,19 +201,19 @@ void GC_check_dirty(void)
     }
 out:
     GC_printf("Checked %lu clean and %lu dirty pages\n",
-             (unsigned long) GC_n_clean, (unsigned long) GC_n_dirty);
+              (unsigned long) GC_n_clean, (unsigned long) GC_n_dirty);
     if (GC_n_dirty_errors > 0) {
         GC_printf("Found %d dirty bit errors (%d were faulted)\n",
-                 GC_n_dirty_errors, GC_n_faulted_dirty_errors);
+                  GC_n_dirty_errors, GC_n_faulted_dirty_errors);
     }
     if (GC_n_changed_errors > 0) {
-       GC_printf("Found %lu changed bit errors\n",
-                 (unsigned long)GC_n_changed_errors);
-       GC_printf("These may be benign (provoked by nonpointer changes)\n");
-#      ifdef THREADS
-           GC_printf(
-           "Also expect 1 per thread currently allocating a stubborn obj.\n");
-#      endif
+        GC_printf("Found %lu changed bit errors\n",
+                  (unsigned long)GC_n_changed_errors);
+        GC_printf("These may be benign (provoked by nonpointer changes)\n");
+#       ifdef THREADS
+          GC_printf(
+            "Also expect 1 per thread currently allocating a stubborn obj.\n");
+#       endif
     }
     for (i = 0; i < GC_n_faulted; ++i) {
         GC_faulted[i] = 0; /* Don't expose block pointers to GC */
@@ -220,10 +221,4 @@ out:
     GC_n_faulted = 0;
 }
 
-# else
-
-extern int GC_quiet;
-       /* ANSI C doesn't allow translation units to be empty.  */
-       /* So we guarantee this one is nonempty.                */
-
-# endif /* CHECKSUMS */
+#endif /* CHECKSUMS */
index 3d2170320efc07c320445d98bb4bfad1393a4e8d..1b1d232169586b87050f08c303ffcc44676da397 100755 (executable)
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand `-c -o'.
 
-scriptversion=2004-10-12.08
+scriptversion=2005-05-14.22
 
-# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -18,7 +18,7 @@ scriptversion=2004-10-12.08
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -47,11 +47,11 @@ right script to run: please start by reading the file `INSTALL'.
 
 Report bugs to <bug-automake@gnu.org>.
 EOF
-    exit 0
+    exit $?
     ;;
   -v | --v*)
     echo "compile $scriptversion"
-    exit 0
+    exit $?
     ;;
 esac
 
index 7924ac077df5bfda101688d959031c3b1762030b..7b24a8728ca386d01f252f342e8720ca9f3d63cd 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   Free Software Foundation, Inc.
 
-timestamp='2006-06-06'
+timestamp='2008-11-15'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -56,8 +56,8 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -161,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            arm*) machine=arm-unknown ;;
            sh3el) machine=shl-unknown ;;
            sh3eb) machine=sh-unknown ;;
+           sh5el) machine=sh5le-unknown ;;
            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
        esac
        # The Operating System including object format, if it has switched
@@ -211,7 +212,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
        exit ;;
     macppc:MirBSD:*:*)
-       echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+       echo powerpc-unknown-mirbsd${UNAME_RELEASE}
        exit ;;
     *:MirBSD:*:*)
        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -329,8 +330,21 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
-    i86pc:SunOS:5.*:*)
-       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+       eval $set_cc_for_build
+       SUN_ARCH="i386"
+       # If there is a compiler, see if it is configured for 64-bit objects.
+       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+       # This test works for both compilers.
+       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+           if echo '\n#ifdef __amd64\nIS_64BIT_ARCH\n#endif' | \
+               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+               grep IS_64BIT_ARCH >/dev/null
+           then
+               SUN_ARCH="x86_64"
+           fi
+       fi
+       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
     sun4*:SunOS:6*:*)
        # According to config.sub, this is the proper way to canonicalize
@@ -531,7 +545,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[45])
+    *:AIX:*:[456])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
@@ -780,7 +794,7 @@ EOF
     i*:CYGWIN*:*)
        echo ${UNAME_MACHINE}-pc-cygwin
        exit ;;
-    i*:MINGW*:*)
+    *:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
        exit ;;
     i*:windows32*:*)
@@ -790,12 +804,18 @@ EOF
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit ;;
-    x86:Interix*:[345]*)
-       echo i586-pc-interix${UNAME_RELEASE}
-       exit ;;
-    EM64T:Interix*:[345]*)
-       echo x86_64-unknown-interix${UNAME_RELEASE}
-       exit ;;
+    *:Interix*:[3456]*)
+       case ${UNAME_MACHINE} in
+           x86)
+               echo i586-pc-interix${UNAME_RELEASE}
+               exit ;;
+           EM64T | authenticamd | genuineintel)
+               echo x86_64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+           IA64)
+               echo ia64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+       esac ;;
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
        echo i${UNAME_MACHINE}-pc-mks
        exit ;;
@@ -829,7 +849,14 @@ EOF
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
     arm*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       eval $set_cc_for_build
+       if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+           | grep -q __ARM_EABI__
+       then
+           echo ${UNAME_MACHINE}-unknown-linux-gnu
+       else
+           echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+       fi
        exit ;;
     avr32*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -921,6 +948,9 @@ EOF
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
        exit ;;
+    padre:Linux:*:*)
+       echo sparc-unknown-linux-gnu
+       exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -950,6 +980,9 @@ EOF
     x86_64:Linux:*:*)
        echo x86_64-unknown-linux-gnu
        exit ;;
+    xtensa*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
     i*86:Linux:*:*)
        # The BFD linker knows what the default object file format is, so
        # first see if it will tell us. cd to the root directory to prevent
@@ -968,9 +1001,6 @@ EOF
          a.out-i386-linux)
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
                exit ;;
-         coff-i386)
-               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-               exit ;;
          "")
                # Either a pre-BFD a.out linker (linux-gnuoldld) or
                # one that does not give us useful --help.
@@ -1199,6 +1229,9 @@ EOF
     BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
        echo i586-pc-beos
        exit ;;
+    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
+       echo i586-pc-haiku
+       exit ;;
     SX-4:SUPER-UX:*:*)
        echo sx4-nec-superux${UNAME_RELEASE}
        exit ;;
@@ -1208,6 +1241,15 @@ EOF
     SX-6:SUPER-UX:*:*)
        echo sx6-nec-superux${UNAME_RELEASE}
        exit ;;
+    SX-7:SUPER-UX:*:*)
+       echo sx7-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8:SUPER-UX:*:*)
+       echo sx8-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8R:SUPER-UX:*:*)
+       echo sx8r-nec-superux${UNAME_RELEASE}
+       exit ;;
     Power*:Rhapsody:*:*)
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
        exit ;;
@@ -1458,9 +1500,9 @@ This script, last modified $timestamp, has failed to recognize
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 and
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
index 70584b007e2bf2d71a9bfce59815174f56653dc0..053e7381fa01f7a6842ba34a1316912163712293 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   Free Software Foundation, Inc.
 
-timestamp='2006-06-06'
+timestamp='2008-09-08'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -72,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -245,17 +245,19 @@ case $basic_machine in
        | bfin \
        | c4x | clipper \
        | d10v | d30v | dlx | dsp16xx \
-       | fr30 | frv \
+       | fido | fr30 | frv \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | i370 | i860 | i960 | ia64 \
        | ip2k | iq2000 \
        | m32c | m32r | m32rle | m68000 | m68k | m88k \
-       | maxq | mb | microblaze | mcore \
+       | maxq | mb | microblaze | mcore | mep | metag \
        | mips | mipsbe | mipseb | mipsel | mipsle \
        | mips16 \
        | mips64 | mips64el \
-       | mips64vr | mips64vrel \
+       | mips64octeon | mips64octeonel \
        | mips64orion | mips64orionel \
+       | mips64r5900 | mips64r5900el \
+       | mips64vr | mips64vrel \
        | mips64vr4100 | mips64vr4100el \
        | mips64vr4300 | mips64vr4300el \
        | mips64vr5000 | mips64vr5000el \
@@ -276,6 +278,7 @@ case $basic_machine in
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
        | pyramid \
+       | score \
        | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
@@ -284,8 +287,8 @@ case $basic_machine in
        | tahoe | thumb | tic4x | tic80 | tron \
        | v850 | v850e \
        | we32k \
-       | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
-       | z8k)
+       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+       | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
        m6811 | m68hc11 | m6812 | m68hc12)
@@ -323,19 +326,21 @@ case $basic_machine in
        | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
-       | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+       | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
        | i*86-* | i860-* | i960-* | ia64-* \
        | ip2k-* | iq2000-* \
        | m32c-* | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
-       | mips64vr-* | mips64vrel-* \
+       | mips64octeon-* | mips64octeonel-* \
        | mips64orion-* | mips64orionel-* \
+       | mips64r5900-* | mips64r5900el-* \
+       | mips64vr-* | mips64vrel-* \
        | mips64vr4100-* | mips64vr4100el-* \
        | mips64vr4300-* | mips64vr4300el-* \
        | mips64vr5000-* | mips64vr5000el-* \
@@ -363,14 +368,18 @@ case $basic_machine in
        | sparclite-* \
        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
        | tron-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
-       | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
-       | xstormy16-* | xtensa-* \
+       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | xstormy16-* | xtensa*-* \
        | ymp-* \
-       | z8k-*)
+       | z8k-* | z80-*)
+               ;;
+       # Recognize the basic CPU types without company name, with glob match.
+       xtensa*)
+               basic_machine=$basic_machine-unknown
                ;;
        # Recognize the various machine names and aliases which stand
        # for a CPU type and a company and sometimes even an OS.
@@ -442,10 +451,22 @@ case $basic_machine in
                basic_machine=ns32k-sequent
                os=-dynix
                ;;
+       blackfin)
+               basic_machine=bfin-unknown
+               os=-linux
+               ;;
+       blackfin-*)
+               basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
                ;;
+        cegcc)
+               basic_machine=arm-unknown
+               os=-cegcc
+               ;;
        convex-c1)
                basic_machine=c1-convex
                os=-bsd
@@ -474,8 +495,8 @@ case $basic_machine in
                basic_machine=craynv-cray
                os=-unicosmp
                ;;
-       cr16c)
-               basic_machine=cr16c-unknown
+       cr16)
+               basic_machine=cr16-unknown
                os=-elf
                ;;
        crds | unos)
@@ -513,6 +534,10 @@ case $basic_machine in
                basic_machine=m88k-motorola
                os=-sysv3
                ;;
+       dicos)
+               basic_machine=i686-pc
+               os=-dicos
+               ;;
        djgpp)
                basic_machine=i586-pc
                os=-msdosdjgpp
@@ -667,6 +692,14 @@ case $basic_machine in
                basic_machine=m68k-isi
                os=-sysv
                ;;
+       m68knommu)
+               basic_machine=m68k-unknown
+               os=-linux
+               ;;
+       m68knommu-*)
+               basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
        m88k-omron*)
                basic_machine=m88k-omron
                ;;
@@ -682,6 +715,10 @@ case $basic_machine in
                basic_machine=i386-pc
                os=-mingw32
                ;;
+       mingw32ce)
+               basic_machine=arm-unknown
+               os=-mingw32ce
+               ;;
        miniframe)
                basic_machine=m68000-convergent
                ;;
@@ -808,6 +845,14 @@ case $basic_machine in
                basic_machine=i860-intel
                os=-osf
                ;;
+       parisc)
+               basic_machine=hppa-unknown
+               os=-linux
+               ;;
+       parisc-*)
+               basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
        pbd)
                basic_machine=sparc-tti
                ;;
@@ -909,6 +954,10 @@ case $basic_machine in
        sb1el)
                basic_machine=mipsisa64sb1el-unknown
                ;;
+       sde)
+               basic_machine=mipsisa32-sde
+               os=-elf
+               ;;
        sei)
                basic_machine=mips-sei
                os=-seiux
@@ -920,6 +969,9 @@ case $basic_machine in
                basic_machine=sh-hitachi
                os=-hms
                ;;
+       sh5el)
+               basic_machine=sh5le-unknown
+               ;;
        sh64)
                basic_machine=sh64-unknown
                ;;
@@ -1009,6 +1061,10 @@ case $basic_machine in
                basic_machine=tic6x-unknown
                os=-coff
                ;;
+       tile*)
+               basic_machine=tile-unknown
+               os=-linux-gnu
+               ;;
        tx39)
                basic_machine=mipstx39-unknown
                ;;
@@ -1084,6 +1140,10 @@ case $basic_machine in
                basic_machine=z8k-unknown
                os=-sim
                ;;
+       z80-*-coff)
+               basic_machine=z80-unknown
+               os=-sim
+               ;;
        none)
                basic_machine=none-none
                os=-none
@@ -1204,7 +1264,7 @@ case $os in
              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* \
+             | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
              | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
@@ -1214,7 +1274,7 @@ case $os in
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1344,6 +1404,9 @@ case $os in
        -zvmoe)
                os=-zvmoe
                ;;
+       -dicos*)
+               os=-dicos
+               ;;
        -none)
                ;;
        *)
@@ -1366,6 +1429,9 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
+        score-*)
+               os=-elf
+               ;;
         spu-*)
                os=-elf
                ;;
@@ -1406,6 +1472,9 @@ case $basic_machine in
        m68*-cisco)
                os=-aout
                ;;
+        mep-*)
+               os=-elf
+               ;;
        mips*-cisco)
                os=-elf
                ;;
index 4b00787e9cb4e46fd5065dac3f5c063e6be933e7..40802d362206ef7ae5e5907ad5dba05ae6025dbf 100755 (executable)
@@ -1,63 +1,84 @@
 #! /bin/sh
-# From configure.ac Revision: 1.43 .
+# From configure.ac Revision: 1.57 .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for gc 7.2alpha3.
+# Generated by GNU Autoconf 2.64 for gc 7.2alpha4.
 #
 # Report bugs to <Hans.Boehm@hp.com>.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+# Foundation, Inc.
+#
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
   NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
 esac
-
 fi
 
 
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
   else
-    PATH_SEPARATOR=:
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
   fi
-  rm -f conf$$.sh
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
 fi
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
 fi
 
 
@@ -66,20 +87,18 @@ fi
 # there to prevent editors from complaining about space-tab.
 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
 # splitting by setting IFS to empty value.)
-as_nl='
-'
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
+case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
 IFS=$as_save_IFS
 
      ;;
@@ -90,32 +109,271 @@ if test "x$as_myself" = x; then
   as_myself=$0
 fi
 if test ! -f "$as_myself"; then
-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
 fi
 
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 done
 PS1='$ '
 PS2='> '
 PS4='+ '
 
 # NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+        /*)
+          for as_base in sh bash ksh sh5; do
+            # Try only shells that exist, to save several forks.
+            as_shell=$as_dir/$as_base
+            if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+                   { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+                  if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+          done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+             { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  # We cannot yet assume a decent shell, so we have to provide a
+       # neutralization value for shells without unset; and this also
+       # works around shells that cannot unset nonexistent variables.
+       BASH_ENV=/dev/null
+       ENV=/dev/null
+       (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+       export CONFIG_SHELL
+       exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
   else
-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+    $as_echo "$0: Please tell bug-autoconf@gnu.org and Hans.Boehm@hp.com
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
   fi
-done
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with status $?, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$?; test $as_status -eq 0 && as_status=1
+  if test "$3"; then
+    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  fi
+  $as_echo "$as_me: error: $1" >&2
+  as_fn_exit $as_status
+} # as_fn_error
 
-# Required to use basename.
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -129,13 +387,17 @@ else
   as_basename=false
 fi
 
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
 
-# Name of the executable.
 as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
         X"$0" : 'X\(//\)$' \| \
         X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
+$as_echo X/"$0" |
     sed '/^.*\/\([^/][^/]*\)\/*$/{
            s//\1/
            q
@@ -150,440 +412,154 @@ echo X/"$0" |
          }
          s/.*/./; q'`
 
-# CDPATH.
-$as_unset CDPATH
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
 
 
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-fi
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
-  if test $as_have_required = yes &&    (eval ":
-(as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
 }
 
-exitcode=0
-if as_func_success; then
-  :
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
 else
-  exitcode=1
-  echo as_func_success failed.
+  as_ln_s='cp -p'
 fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
 
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
 fi
 
-if as_func_ret_success; then
-  :
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
 else
-  exitcode=1
-  echo as_func_ret_success failed.
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
 fi
+as_executable_p=$as_test_x
 
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
-test \$exitcode = 0) || { (exit 1); exit 1; }
 
-(
-  as_lineno_1=\$LINENO
-  as_lineno_2=\$LINENO
-  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
-  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
-  :
-else
-  as_candidate_shells=
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  case $as_dir in
-        /*)
-          for as_base in sh bash ksh sh5; do
-            as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
-          done;;
-       esac
-done
-IFS=$as_save_IFS
 
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
 
-      for as_shell in $as_candidate_shells $SHELL; do
-        # Try only shells that exist, to save several forks.
-        if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-               { ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
+case X$lt_ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+  ;;
 esac
 
-fi
-
-
-:
-_ASEOF
-}; then
-  CONFIG_SHELL=$as_shell
-              as_have_required=yes
-              if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
-  (exit $1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
-  break
-fi
-
-fi
-
-      done
-
-      if test "x$CONFIG_SHELL" != x; then
-  for as_var in BASH_ENV ENV
-        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-        done
-        export CONFIG_SHELL
-        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
-    if test $as_have_required = no; then
-  echo This script requires a shell more modern than all the
-      echo shells that I found on your system.  Please install a
-      echo modern shell, or manually run the script under such a
-      echo shell if you do have one.
-      { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
-
-
-(eval "as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell autoconf@gnu.org about your system,
-  echo including any error possibly output before this
-  echo message
-}
-
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s='ln -s'
-  # ... but there are two gotchas:
-  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-  # In both cases, we have to default to `cp -p'.
-  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-       case $1 in
-        -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
-  ;;
-esac
-
-echo=${ECHO-echo}
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell.
-  exec $SHELL "$0" --no-reexec ${1+"$@"}
+ECHO=${lt_ECHO-echo}
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $ECHO works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
 fi
 
 if test "X$1" = X--fallback-echo; then
   # used as fallback echo
   shift
-  cat <<EOF
+  cat <<_LT_EOF
 $*
-EOF
+_LT_EOF
   exit 0
 fi
 
@@ -591,121 +567,116 @@ fi
 # if CDPATH is set.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
-if test -z "$ECHO"; then
-if test "X${echo_test_string+set}" != Xset; then
-# find a string as large as possible, as long as the shell can cope with it
-  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
-    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
-       echo_test_string=`eval $cmd` &&
-       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
-    then
-      break
-    fi
-  done
-fi
+if test -z "$lt_ECHO"; then
+  if test "X${echo_test_string+set}" != Xset; then
+    # find a string as large as possible, as long as the shell can cope with it
+    for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+        { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+      then
+        break
+      fi
+    done
+  fi
 
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-   test "X$echo_testing_string" = "X$echo_test_string"; then
-  :
-else
-  # The Solaris, AIX, and Digital Unix default echo programs unquote
-  # backslashes.  This makes it impossible to quote backslashes using
-  #   echo "$something" | sed 's/\\/\\\\/g'
-  #
-  # So, first we look for a working echo in the user's PATH.
+  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+     test "X$echo_testing_string" = "X$echo_test_string"; then
+    :
+  else
+    # The Solaris, AIX, and Digital Unix default echo programs unquote
+    # backslashes.  This makes it impossible to quote backslashes using
+    #   echo "$something" | sed 's/\\/\\\\/g'
+    #
+    # So, first we look for a working echo in the user's PATH.
 
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for dir in $PATH /usr/ucb; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for dir in $PATH /usr/ucb; do
+      IFS="$lt_save_ifs"
+      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        ECHO="$dir/echo"
+        break
+      fi
+    done
     IFS="$lt_save_ifs"
-    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      echo="$dir/echo"
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
 
-  if test "X$echo" = Xecho; then
-    # We didn't find a better echo, so look for alternatives.
-    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      # This shell has a builtin print -r that does the trick.
-      echo='print -r'
-    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
-        test "X$CONFIG_SHELL" != X/bin/ksh; then
-      # If we have ksh, try running configure again with it.
-      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-      export ORIGINAL_CONFIG_SHELL
-      CONFIG_SHELL=/bin/ksh
-      export CONFIG_SHELL
-      exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
-    else
-      # Try using printf.
-      echo='printf %s\n'
-      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-        echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-        test "X$echo_testing_string" = "X$echo_test_string"; then
-       # Cool, printf works
-       :
-      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
-          test "X$echo_testing_string" = 'X\t' &&
-          echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-          test "X$echo_testing_string" = "X$echo_test_string"; then
-       CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-       export CONFIG_SHELL
-       SHELL="$CONFIG_SHELL"
-       export SHELL
-       echo="$CONFIG_SHELL $0 --fallback-echo"
-      elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
-          test "X$echo_testing_string" = 'X\t' &&
-          echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-          test "X$echo_testing_string" = "X$echo_test_string"; then
-       echo="$CONFIG_SHELL $0 --fallback-echo"
+    if test "X$ECHO" = Xecho; then
+      # We didn't find a better echo, so look for alternatives.
+      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        # This shell has a builtin print -r that does the trick.
+        ECHO='print -r'
+      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+          test "X$CONFIG_SHELL" != X/bin/ksh; then
+        # If we have ksh, try running configure again with it.
+        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+        export ORIGINAL_CONFIG_SHELL
+        CONFIG_SHELL=/bin/ksh
+        export CONFIG_SHELL
+        exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
       else
-       # maybe with a smaller string...
-       prev=:
+        # Try using printf.
+        ECHO='printf %s\n'
+        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+          echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+          test "X$echo_testing_string" = "X$echo_test_string"; then
+         # Cool, printf works
+         :
+        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+            test "X$echo_testing_string" = 'X\t' &&
+            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+            test "X$echo_testing_string" = "X$echo_test_string"; then
+         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+         export CONFIG_SHELL
+         SHELL="$CONFIG_SHELL"
+         export SHELL
+         ECHO="$CONFIG_SHELL $0 --fallback-echo"
+        elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+            test "X$echo_testing_string" = 'X\t' &&
+            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+            test "X$echo_testing_string" = "X$echo_test_string"; then
+         ECHO="$CONFIG_SHELL $0 --fallback-echo"
+        else
+         # maybe with a smaller string...
+         prev=:
 
-       for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
-         if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
-         then
-           break
-         fi
-         prev="$cmd"
-       done
+         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+           if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+           then
+             break
+           fi
+           prev="$cmd"
+         done
 
-       if test "$prev" != 'sed 50q "$0"'; then
-         echo_test_string=`eval $prev`
-         export echo_test_string
-         exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
-       else
-         # Oops.  We lost completely, so just stick with echo.
-         echo=echo
-       fi
+         if test "$prev" != 'sed 50q "$0"'; then
+           echo_test_string=`eval $prev`
+           export echo_test_string
+           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+         else
+           # Oops.  We lost completely, so just stick with echo.
+           ECHO=echo
+         fi
+        fi
       fi
     fi
   fi
 fi
-fi
 
 # Copy echo and quote the copy suitably for passing to libtool from
 # the Makefile, instead of quoting the original, which is used later.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
-   ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+   lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
 fi
 
 
 
 
-tagnames=${tagnames+${tagnames},}CXX
-
-tagnames=${tagnames+${tagnames},}F77
-
 exec 7<&0 </dev/null 6>&1
 
 # Name of the host.
@@ -724,14 +695,14 @@ cross_compiling=no
 subdirs=
 MFLAGS=
 MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Identity of this package.
 PACKAGE_NAME='gc'
 PACKAGE_TARNAME='gc'
-PACKAGE_VERSION='7.2alpha3'
-PACKAGE_STRING='gc 7.2alpha3'
+PACKAGE_VERSION='7.2alpha4'
+PACKAGE_STRING='gc 7.2alpha4'
 PACKAGE_BUGREPORT='Hans.Boehm@hp.com'
+PACKAGE_URL=''
 
 ac_unique_file="gcj_mlc.c"
 # Factoring default headers for most tests.
@@ -770,175 +741,217 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-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
-datarootdir
-datadir
-sysconfdir
-sharedstatedir
-localstatedir
-includedir
-oldincludedir
-docdir
-infodir
-htmldir
-dvidir
-pdfdir
-psdir
-libdir
-localedir
-mandir
-DEFS
-ECHO_C
-ECHO_N
-ECHO_T
-LIBS
+enable_option_checking=no
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+NEED_ATOMIC_OPS_ASM_FALSE
+NEED_ATOMIC_OPS_ASM_TRUE
+USE_INTERNAL_LIBATOMIC_OPS_FALSE
+USE_INTERNAL_LIBATOMIC_OPS_TRUE
+subdirs
+ATOMIC_OPS_LIBS
+USE_LIBDIR_FALSE
+USE_LIBDIR_TRUE
+UNWINDLIBS
+KEEP_BACK_PTRS_FALSE
+KEEP_BACK_PTRS_TRUE
+ENABLE_GCJ_SUPPORT_FALSE
+ENABLE_GCJ_SUPPORT_TRUE
+CXXCPP
+CPP
+NMEDIT
+DSYMUTIL
+lt_ECHO
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+GREP
+SED
+LIBTOOL
+addlibs
+addobjs
+CXXINCLUDES
+INCLUDES
+CPLUSPLUS_FALSE
+CPLUSPLUS_TRUE
+target_all
+EXTRA_TEST_LIBS
+extra_ldflags_libgc
+AVOID_CPP_LIB_FALSE
+AVOID_CPP_LIB_TRUE
+COMPILER_XLC_FALSE
+COMPILER_XLC_TRUE
+OPENBSD_THREADS_FALSE
+OPENBSD_THREADS_TRUE
+WIN32_THREADS_FALSE
+WIN32_THREADS_TRUE
+DARWIN_THREADS_FALSE
+DARWIN_THREADS_TRUE
+PTHREADS_FALSE
+PTHREADS_TRUE
+THREADS_FALSE
+THREADS_TRUE
+THREADDLLIBS
+GC_CFLAGS
+RANLIB
+AR
+am__fastdepCCAS_FALSE
+am__fastdepCCAS_TRUE
+CCASDEPMODE
+CCASFLAGS
+CCAS
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+ac_ct_CXX
+CXXFLAGS
+CXX
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+GC_VERSION
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
 build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_maintainer_mode
+enable_dependency_tracking
+enable_threads
+enable_parallel_mark
+enable_cplusplus
+with_ecos
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_gnu_ld
+enable_libtool_lock
+with_target_subdir
+with_cross_host
+enable_gcj_support
+enable_gc_debug
+enable_java_finalization
+enable_atomic_uncollectable
+enable_redirect_malloc
+enable_large_config
+enable_gc_assertions
+enable_munmap
+with_libatomic_ops
+'
+      ac_precious_vars='build_alias
 host_alias
 target_alias
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-target
-target_cpu
-target_vendor
-target_os
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-CYGPATH_W
-PACKAGE
-VERSION
-ACLOCAL
-AUTOCONF
-AUTOMAKE
-AUTOHEADER
-MAKEINFO
-install_sh
-STRIP
-INSTALL_STRIP_PROGRAM
-mkdir_p
-AWK
-SET_MAKE
-am__leading_dot
-AMTAR
-am__tar
-am__untar
-MAINTAINER_MODE_TRUE
-MAINTAINER_MODE_FALSE
-MAINT
-GC_VERSION
 CC
 CFLAGS
 LDFLAGS
+LIBS
 CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
-DEPDIR
-am__include
-am__quote
-AMDEP_TRUE
-AMDEP_FALSE
-AMDEPBACKSLASH
-CCDEPMODE
-am__fastdepCC_TRUE
-am__fastdepCC_FALSE
 CXX
 CXXFLAGS
-ac_ct_CXX
-CXXDEPMODE
-am__fastdepCXX_TRUE
-am__fastdepCXX_FALSE
+CCC
 CCAS
 CCASFLAGS
-AR
-RANLIB
-GC_CFLAGS
-THREADDLLIBS
-THREADS_TRUE
-THREADS_FALSE
-PTHREADS_TRUE
-PTHREADS_FALSE
-DARWIN_THREADS_TRUE
-DARWIN_THREADS_FALSE
-WIN32_THREADS_TRUE
-WIN32_THREADS_FALSE
-COMPILER_XLC_TRUE
-COMPILER_XLC_FALSE
-AVOID_CPP_LIB_TRUE
-AVOID_CPP_LIB_FALSE
-extra_ldflags_libgc
-EXTRA_TEST_LIBS
-target_all
-CPLUSPLUS_TRUE
-CPLUSPLUS_FALSE
-INCLUDES
-CXXINCLUDES
-addobjs
-addlibs
-GREP
-EGREP
-LN_S
-ECHO
 CPP
-CXXCPP
-F77
-FFLAGS
-ac_ct_F77
-LIBTOOL
-ENABLE_GCJ_SUPPORT_TRUE
-ENABLE_GCJ_SUPPORT_FALSE
-UNWINDLIBS
-USE_LIBDIR_TRUE
-USE_LIBDIR_FALSE
-subdirs
-USE_INTERNAL_LIBATOMIC_OPS_TRUE
-USE_INTERNAL_LIBATOMIC_OPS_FALSE
-NEED_ATOMIC_OPS_ASM_TRUE
-NEED_ATOMIC_OPS_ASM_FALSE
-atomic_ops_libs
-LIBOBJS
-LTLIBOBJS'
-ac_subst_files=''
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CXX
-CXXFLAGS
-CCC
-CCAS
-CCASFLAGS
-CPP
-CXXCPP
-F77
-FFLAGS'
+CXXCPP'
 ac_subdirs_all='libatomic_ops'
 
 # Initialize some variables set by options.
 ac_init_help=
 ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
 # The variables have the same names as the options, with
 # dashes changed to underlines.
 cache_file=/dev/null
@@ -1037,13 +1050,20 @@ do
     datarootdir=$ac_optarg ;;
 
   -disable-* | --disable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
-    eval enable_$ac_feature=no ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
 
   -docdir | --docdir | --docdi | --doc | --do)
     ac_prev=docdir ;;
@@ -1056,13 +1076,20 @@ do
     dvidir=$ac_optarg ;;
 
   -enable-* | --enable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
-    eval enable_$ac_feature=\$ac_optarg ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -1253,22 +1280,36 @@ do
     ac_init_version=: ;;
 
   -with-* | --with-*)
-    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
-    eval with_$ac_package=\$ac_optarg ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
 
   -without-* | --without-*)
-    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
-    eval with_$ac_package=no ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
 
   --x)
     # Obsolete; use --with-x.
@@ -1288,25 +1329,25 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; }
+  -*) as_fn_error "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information."
     ;;
 
   *=*)
     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
-   { (exit 1); exit 1; }; }
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+    esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
 
   *)
     # FIXME: should be removed in autoconf 3.0.
-    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
     ;;
 
@@ -1315,23 +1356,36 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
 fi
 
-# Be sure to have absolute directory names.
+# Check all directory arguments for consistency.
 for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
                datadir sysconfdir sharedstatedir localstatedir includedir \
                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
                libdir localedir mandir
 do
   eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
   case $ac_val in
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -1345,7 +1399,7 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
     If a cross compiler is detected then cross compile mode will be used." >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
@@ -1361,23 +1415,21 @@ test "$silent" = yes && exec 6>/dev/null
 ac_pwd=`pwd` && test -n "$ac_pwd" &&
 ac_ls_di=`ls -di .` &&
 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  { echo "$as_me: error: Working directory cannot be determined" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error "working directory cannot be determined"
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  { echo "$as_me: error: pwd does not report name of working directory" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error "pwd does not report name of working directory"
 
 
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
   # Try the directory containing this script, then the parent directory.
-  ac_confdir=`$as_dirname -- "$0" ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$0" : 'X\(//\)[^/]' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$0" |
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_myself" : 'X\(//\)[^/]' \| \
+        X"$as_myself" : 'X\(//\)$' \| \
+        X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
            s//\1/
            q
@@ -1404,13 +1456,11 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
 fi
 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
 ac_abs_confdir=`(
-       cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
-   { (exit 1); exit 1; }; }
+       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
        pwd)`
 # When building in place, set srcdir=.
 if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1436,7 +1486,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures gc 7.2alpha3 to adapt to many kinds of systems.
+\`configure' configures gc 7.2alpha4 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1458,9 +1508,9 @@ Configuration:
 
 Installation directories:
   --prefix=PREFIX         install architecture-independent files in PREFIX
-                         [$ac_default_prefix]
+                          [$ac_default_prefix]
   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                         [PREFIX]
+                          [PREFIX]
 
 By default, \`make install' will install all the files in
 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
@@ -1470,25 +1520,25 @@ for instance \`--prefix=\$HOME'.
 For better control, use the options below.
 
 Fine tuning of the installation directories:
-  --bindir=DIR           user executables [EPREFIX/bin]
-  --sbindir=DIR          system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR       program executables [EPREFIX/libexec]
-  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
-  --libdir=DIR           object code libraries [EPREFIX/lib]
-  --includedir=DIR       C header files [PREFIX/include]
-  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
-  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR          info documentation [DATAROOTDIR/info]
-  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
-  --mandir=DIR           man documentation [DATAROOTDIR/man]
-  --docdir=DIR           documentation root [DATAROOTDIR/doc/gc]
-  --htmldir=DIR          html documentation [DOCDIR]
-  --dvidir=DIR           dvi documentation [DOCDIR]
-  --pdfdir=DIR           pdf documentation [DOCDIR]
-  --psdir=DIR            ps documentation [DOCDIR]
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/gc]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
 _ACEOF
 
   cat <<\_ACEOF
@@ -1507,11 +1557,12 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gc 7.2alpha3:";;
+     short | recursive ) echo "Configuration of gc 7.2alpha4:";;
    esac
   cat <<\_ACEOF
 
 Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-maintainer-mode  enable make rules and dependencies not useful
@@ -1542,13 +1593,14 @@ Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-ecos             enable runtime eCos target support
-  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
-  --with-tags[=TAGS]      include additional configurations [automatic]
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-target-subdir=SUBDIR
                           configuring with a cross compiler
   --with-cross-host=HOST  configuring with a cross compiler
+  --with-libatomic-ops=yes|no|check
+                          Use a pre-installed libatomic_ops? (default: check)
 
 Some influential environment variables:
   CC          C compiler command
@@ -1564,8 +1616,6 @@ Some influential environment variables:
   CCASFLAGS   assembler compiler flags (defaults to CFLAGS)
   CPP         C preprocessor
   CXXCPP      C++ preprocessor
-  F77         Fortran 77 compiler command
-  FFLAGS      Fortran 77 compiler flags
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -1578,15 +1628,17 @@ fi
 if test "$ac_init_help" = "recursive"; then
   # If there are subdirs, report their specific --help.
   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d "$ac_dir" || continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
     ac_builddir=.
 
 case "$ac_dir" in
 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
 *)
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
   # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
   case $ac_top_builddir_sub in
   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1622,7 +1674,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
       echo &&
       $SHELL "$ac_srcdir/configure" --help=recursive
     else
-      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
     fi || ac_status=$?
     cd "$ac_pwd" || { ac_status=$?; break; }
   done
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gc configure 7.2alpha3
-generated by GNU Autoconf 2.61
+gc configure 7.2alpha4
+generated by GNU Autoconf 2.64
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+Copyright (C) 2009 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
   exit
 fi
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
 
-It was created by gc $as_me 7.2alpha3, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
-
-  $ $0 $@
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
 
-_ACEOF
-exec 5>>config.log
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
 {
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
+       ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
 
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+} # ac_fn_c_try_compile
 
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-_ASUNAME
+       ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
 
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
+} # ac_fn_cxx_try_compile
 
-} >&5
+# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
+# ----------------------------------------------------
+# Tries to find if the field MEMBER exists in type AGGR, after including
+# INCLUDES, setting cache variable VAR accordingly.
+ac_fn_c_check_member ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+$as_echo_n "checking for $2.$3... " >&6; }
+if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (ac_aggr.$3)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$4=yes"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (sizeof ac_aggr.$3)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$4=yes"
+else
+  eval "$4=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$4
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 
-cat >&5 <<_ACEOF
+} # ac_fn_c_check_member
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
 
-## ----------- ##
-## Core tests. ##
-## ----------- ##
+} # ac_fn_c_try_link
 
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 
+} # ac_fn_c_check_header_compile
 
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
-    2)
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-       ac_must_keep_next=false # Got value, back to normal.
-      else
-       case $ac_arg in
-         *=* | --config-cache | -C | -disable-* | --disable-* \
-         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-         | -with-* | --with-* | -without-* | --without-* | --x)
-           case "$ac_configure_args0 " in
-             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-           esac
-           ;;
-         -* ) ac_must_keep_next=true ;;
-       esac
-      fi
-      ac_configure_args="$ac_configure_args '$ac_arg'"
-      ;;
-    esac
-  done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-       "s/'\''/'\''\\\\'\'''\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
+    ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
 
-    cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=\$$ac_var
-      case $ac_val in
-      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
+} # ac_fn_c_try_cpp
 
-    if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
-      echo
-      for ac_var in $ac_subst_files
-      do
-       eval ac_val=\$$ac_var
-       case $ac_val in
-       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-       esac
-       echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
-      echo
-      cat confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      echo "$as_me: caught signal $ac_signal"
-    echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core *.core core.conftest.* &&
-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
+} # ac_fn_c_try_run
 
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
+#undef $2
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
 _ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -n "$CONFIG_SITE"; then
-  set x "$CONFIG_SITE"
-elif test "x$prefix" != xNONE; then
-  set x "$prefix/share/config.site" "$prefix/etc/config.site"
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
 else
-  set x "$ac_default_prefix/share/config.site" \
-       "$ac_default_prefix/etc/config.site"
+  eval "$3=no"
 fi
-shift
-for ac_site_file
-do
-  if test -r "$ac_site_file"; then
-    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
-  fi
-done
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special
-  # files actually), so we avoid doing that.
-  if test -f "$cache_file"; then
-    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
-    esac
+} # ac_fn_c_check_func
+
+# ac_fn_cxx_try_cpp LINENO
+# ------------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
   fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } >/dev/null && {
+        test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       }; then :
+  ac_retval=0
 else
-  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-       { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-       { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
-echo "$as_me:   former value:  $ac_old_val" >&2;}
-       { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
-echo "$as_me:   current value: $ac_new_val" >&2;}
-       ac_cache_corrupted=:
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-   { (exit 1); exit 1; }; }
+    ac_retval=1
 fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
 
+} # ac_fn_cxx_try_cpp
 
+# ac_fn_cxx_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
 
+} # ac_fn_cxx_try_link
 
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( cat <<\_ASBOX
+## -------------------------------- ##
+## Report this to Hans.Boehm@hp.com ##
+## -------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 
+} # ac_fn_c_check_header_mongrel
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
 
+It was created by gc $as_me 7.2alpha4, which was
+generated by GNU Autoconf 2.64.  Invocation command line was
 
+  $ $0 $@
 
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
 
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
 
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
 
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
 
+_ASUNAME
 
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
 
+} >&5
 
+cat >&5 <<_ACEOF
 
 
+## ----------- ##
+## Core tests. ##
+## ----------- ##
 
+_ACEOF
 
 
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-    ## version must conform to [0-9]+[.][0-9]+(alpha[0-9]+)?
-
-ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
-  if test -f "$ac_dir/install-sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f "$ac_dir/install.sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  elif test -f "$ac_dir/shtool"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append ac_configure_args1 " '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+       ac_must_keep_next=false # Got value, back to normal.
+      else
+       case $ac_arg in
+         *=* | --config-cache | -C | -disable-* | --disable-* \
+         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+         | -with-* | --with-* | -without-* | --without-* | --x)
+           case "$ac_configure_args0 " in
+             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+           esac
+           ;;
+         -* ) ac_must_keep_next=true ;;
+       esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+       "s/'\''/'\''\\\\'\'''\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+       eval ac_val=\$$ac_var
+       case $ac_val in
+       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+       esac
+       $as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  ac_site_file1=$CONFIG_SITE
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+       # differences in whitespace do not lead to failure.
+       ac_old_val_w=`echo x $ac_old_val`
+       ac_new_val_w=`echo x $ac_new_val`
+       if test "$ac_old_val_w" != "$ac_new_val_w"; then
+         { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+         ac_cache_corrupted=:
+       else
+         { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+         eval $ac_var=\$ac_old_val
+       fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
   fi
 done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+    ## version must conform to [0-9]+[.][0-9]+(alpha[0-9]+)?
+
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+  for ac_t in install-sh install.sh shtool; do
+    if test -f "$ac_dir/$ac_t"; then
+      ac_aux_dir=$ac_dir
+      ac_install_sh="$ac_aux_dir/$ac_t -c"
+      break 2
+    fi
+  done
+done
 if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
 fi
 
 # These three variables are undocumented and unsupported,
@@ -2033,35 +2607,27 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
-{ echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
-if test "${ac_cv_build+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
 test "x$ac_build_alias" = x &&
   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
 test "x$ac_build_alias" = x &&
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
+*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -2077,28 +2643,24 @@ IFS=$ac_save_IFS
 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 
-{ echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
-if test "${ac_cv_host+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
   ac_cv_host=$ac_cv_build
 else
   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
 fi
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
+*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -2114,28 +2676,24 @@ IFS=$ac_save_IFS
 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
-{ echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
-if test "${ac_cv_target+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if test "${ac_cv_target+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test "x$target_alias" = x; then
   ac_cv_target=$ac_cv_host
 else
   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
 fi
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
 case $ac_cv_target in
 *-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
-echo "$as_me: error: invalid value of canonical target" >&2;}
-   { (exit 1); exit 1; }; };;
+*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
 esac
 target=$ac_cv_target
 ac_save_IFS=$IFS; IFS='-'
@@ -2160,8 +2718,8 @@ test -n "$target_alias" &&
 
 
 
-  { echo "$as_me:$LINENO: checking GC version numbers" >&5
-echo $ECHO_N "checking GC version numbers... $ECHO_C" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking GC version numbers" >&5
+$as_echo_n "checking GC version numbers... " >&6; }
   GC_VERSION_MAJOR=`echo $PACKAGE_VERSION | sed 's/^\([0-9][0-9]*\)[.].*$/\1/g'`
   GC_VERSION_MINOR=`echo $PACKAGE_VERSION | sed 's/^[^.]*[.]\([0-9][0-9]*\).*$/\1/g'`
   GC_ALPHA_VERSION=`echo $PACKAGE_VERSION | sed 's/^[^.]*[.][0-9]*//'`
@@ -2176,33 +2734,35 @@ echo $ECHO_N "checking GC version numbers... $ECHO_C" >&6; }
   if test :$GC_VERSION_MAJOR: = :: \
      -o   :$GC_VERSION_MINOR: = :: ;
   then
-    { echo "$as_me:$LINENO: result: invalid" >&5
-echo "${ECHO_T}invalid" >&6; }
-    { { echo "$as_me:$LINENO: error: nonconforming PACKAGE_VERSION='$PACKAGE_VERSION'" >&5
-echo "$as_me: error: nonconforming PACKAGE_VERSION='$PACKAGE_VERSION'" >&2;}
-   { (exit 1); exit 1; }; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: invalid" >&5
+$as_echo "invalid" >&6; }
+    as_fn_error "nonconforming PACKAGE_VERSION='$PACKAGE_VERSION'" "$LINENO" 5
   fi
 
-  cat >>confdefs.h <<_ACEOF
+
+cat >>confdefs.h <<_ACEOF
 #define GC_VERSION_MAJOR $GC_VERSION_MAJOR
 _ACEOF
 
-  cat >>confdefs.h <<_ACEOF
+
+cat >>confdefs.h <<_ACEOF
 #define GC_VERSION_MINOR $GC_VERSION_MINOR
 _ACEOF
 
   if test :$GC_ALPHA_VERSION: != :: ; then
-    cat >>confdefs.h <<_ACEOF
+
+cat >>confdefs.h <<_ACEOF
 #define GC_ALPHA_VERSION $GC_ALPHA_VERSION
 _ACEOF
 
   fi
-  { echo "$as_me:$LINENO: result: major=$GC_VERSION_MAJOR minor=$GC_VERSION_MINOR \
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: major=$GC_VERSION_MAJOR minor=$GC_VERSION_MINOR \
 ${GC_ALPHA_VERSION:+alpha=}$GC_ALPHA_VERSION" >&5
-echo "${ECHO_T}major=$GC_VERSION_MAJOR minor=$GC_VERSION_MINOR \
+$as_echo "major=$GC_VERSION_MAJOR minor=$GC_VERSION_MINOR \
 ${GC_ALPHA_VERSION:+alpha=}$GC_ALPHA_VERSION" >&6; }
 
-am__api_version="1.9"
+am__api_version='1.10'
+
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
 # incompatible versions:
@@ -2216,22 +2776,23 @@ am__api_version="1.9"
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # OS/2's system install, which has a completely different semantic
 # ./install, which can be erroneously created by make from ./install.sh.
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
 if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test "${ac_cv_path_install+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
-  ./ | .// | /cC/* | \
+    # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+  ./ | .// | /[cC]/* | \
   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
   /usr/ucb/* ) ;;
   *)
     # OSF1 and SCO ODT 3.0 have their own names for install.
@@ -2249,17 +2810,29 @@ case $as_dir/ in
            # program-specific install script used by HP pwplus--don't use.
            :
          else
-           ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-           break 3
+           rm -rf conftest.one conftest.two conftest.dir
+           echo one > conftest.one
+           echo two > conftest.two
+           mkdir conftest.dir
+           if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+             test -s conftest.one && test -s conftest.two &&
+             test -s conftest.dir/conftest.one &&
+             test -s conftest.dir/conftest.two
+           then
+             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+             break 3
+           fi
          fi
        fi
       done
     done
     ;;
 esac
-done
+
+  done
 IFS=$as_save_IFS
 
+rm -rf conftest.one conftest.two conftest.dir
 
 fi
   if test "${ac_cv_path_install+set}" = set; then
@@ -2272,8 +2845,8 @@ fi
     INSTALL=$ac_install_sh
   fi
 fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 # It thinks the first close brace ends the variable substitution.
@@ -2283,8 +2856,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
 # Just in case
 sleep 1
 echo timestamp > conftest.file
@@ -2307,11 +2880,8 @@ if (
       # if, for instance, CONFIG_SHELL is bash and it inherits a
       # broken ls alias from the environment.  This has actually
       # happened.  Such a system could not be considered "sane".
-      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&2;}
-   { (exit 1); exit 1; }; }
+      as_fn_error "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
    fi
 
    test "$2" = conftest.file
@@ -2320,26 +2890,20 @@ then
    # Ok.
    :
 else
-   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
+   as_fn_error "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
 fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 test "$program_prefix" != NONE &&
   program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
 test "$program_suffix" != NONE &&
   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.  echo might interpret backslashes.
+# Double any \ or $.
 # By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm -f conftest.sed
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
 # expand $ac_aux_dir to an absolute path
 am_aux_dir=`cd $ac_aux_dir && pwd`
@@ -2350,51 +2914,66 @@ if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
 else
   am_missing_run=
-  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
-  else
-    mkdir_p='$(install_sh) -d'
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if test "${ac_cv_path_mkdir+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+            'mkdir (GNU coreutils) '* | \
+            'mkdir (coreutils) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+       done
+  done
+IFS=$as_save_IFS
+
+fi
+
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    test -d ./--version && rmdir ./--version
+    MKDIR_P="$ac_install_sh -d"
   fi
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
 
 for ac_prog in gawk mawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
   ac_cv_prog_AWK="$AWK" # Let the user override the test.
@@ -2404,36 +2983,37 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_AWK="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  { echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
   test -n "$AWK" && break
 done
 
-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
 SHELL = /bin/sh
@@ -2450,12 +3030,12 @@ esac
 rm -f conftest.make
 fi
 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
   SET_MAKE=
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
@@ -2468,12 +3048,14 @@ else
 fi
 rmdir .tst 2>/dev/null
 
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
 fi
 
 # test whether we have cygpath
@@ -2488,7 +3070,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='gc'
- VERSION='7.2alpha3'
+ VERSION='7.2alpha4'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2516,7 +3098,7 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
 
 # Installed binaries are usually stripped using `strip' when the user
 # run `make install-strip'.  However `strip' might not be the right
@@ -2526,10 +3108,10 @@ if test "$cross_compiling" != no; then
   if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
 set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
@@ -2539,25 +3121,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 STRIP=$ac_cv_prog_STRIP
 if test -n "$STRIP"; then
-  { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -2566,10 +3148,10 @@ if test -z "$ac_cv_prog_STRIP"; then
   ac_ct_STRIP=$STRIP
   # Extract the first word of "strip", so it can be a program name with args.
 set dummy strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
@@ -2579,25 +3161,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_STRIP="strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
 if test -n "$ac_ct_STRIP"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
   if test "x$ac_ct_STRIP" = x; then
@@ -2605,12 +3187,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     STRIP=$ac_ct_STRIP
@@ -2620,7 +3198,7 @@ else
 fi
 
 fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
@@ -2634,20 +3212,20 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
 
 
 
-{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; }
+ac_config_headers="$ac_config_headers include/private/config.h"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
     # Check whether --enable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
+if test "${enable_maintainer_mode+set}" = set; then :
   enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
 else
   USE_MAINTAINER_MODE=no
 fi
 
-  { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; }
-
-
-if test $USE_MAINTAINER_MODE = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+   if test $USE_MAINTAINER_MODE = yes; then
   MAINTAINER_MODE_TRUE=
   MAINTAINER_MODE_FALSE='#'
 else
@@ -2674,8 +3252,8 @@ am__doit:
 .PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
-{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
 am__include="#"
 am__quote=
 _am_result=none
@@ -2702,12 +3280,12 @@ if test "$am__include" = "#"; then
 fi
 
 
-{ echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
 rm -f confinc confmf
 
 # Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
+if test "${enable_dependency_tracking+set}" = set; then :
   enableval=$enable_dependency_tracking;
 fi
 
@@ -2715,9 +3293,7 @@ if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
 fi
-
-
-if test "x$enable_dependency_tracking" != xno; then
+ if test "x$enable_dependency_tracking" != xno; then
   AMDEP_TRUE=
   AMDEP_FALSE='#'
 else
@@ -2726,7 +3302,6 @@ else
 fi
 
 
-
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2735,10 +3310,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2748,25 +3323,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -2775,10 +3350,10 @@ if test -z "$ac_cv_prog_CC"; then
   ac_ct_CC=$CC
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2788,25 +3363,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
   if test "x$ac_ct_CC" = x; then
@@ -2814,12 +3389,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     CC=$ac_ct_CC
@@ -2832,10 +3403,10 @@ if test -z "$CC"; then
           if test -n "$ac_tool_prefix"; then
     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2845,25 +3416,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -2872,10 +3443,10 @@ fi
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2886,18 +3457,18 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
      fi
     ac_cv_prog_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 if test $ac_prog_rejected = yes; then
@@ -2916,11 +3487,11 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -2931,10 +3502,10 @@ if test -z "$CC"; then
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2944,25 +3515,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -2975,10 +3546,10 @@ if test -z "$CC"; then
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2988,25 +3559,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -3018,12 +3589,8 @@ done
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     CC=$ac_ct_CC
@@ -3033,98 +3600,82 @@ fi
 fi
 
 
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "no acceptable C compiler found in \$PATH
+See \`config.log' for more details." "$LINENO" 5; }
 
 # Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    rm -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
 
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
+#include <stdio.h>
 int
 main ()
 {
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
 
   ;
   return 0;
 }
 _ACEOF
 ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
 # Try to create an executable without -o first, disregard a.out.
 # It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
-{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-#
-# List of possible output files, starting from the most likely.
-# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
-# only as a last resort.  b.out is created by i960 compilers.
-ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
-#
-# The IRIX 6 linker writes into existing files which may not be
-# executable, retaining their permissions.  Remove them first so a
-# subsequent execution test works.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
 ac_rmfiles=
 for ac_file in $ac_files
 do
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
   esac
 done
 rm -f $ac_rmfiles
 
-if { (ac_try="$ac_link_default"
+if { ac_try="$ac_link_default"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_link_default") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
@@ -3134,14 +3685,14 @@ for ac_file in $ac_files ''
 do
   test -f "$ac_file" || continue
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
        ;;
     [ab].out )
        # We found the default executable, but exeext='' is most
        # certainly right.
        break;;
     *.* )
-        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+       if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
        then :; else
           ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
        fi
@@ -3160,78 +3711,75 @@ test "$ac_cv_exeext" = no && ac_cv_exeext=
 else
   ac_file=''
 fi
-
-{ echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6; }
-if test -z "$ac_file"; then
-  echo "$as_me: failed program was:" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+if test -z "$ac_file"; then :
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "C compiler cannot create executables
+See \`config.log' for more details." "$LINENO" 5; }; }
 fi
-
 ac_exeext=$ac_cv_exeext
 
 # Check that the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
 # If not cross compiling, check that we can run a simple program.
 if test "$cross_compiling" != yes; then
   if { ac_try='./$ac_file'
-  { (case "(($ac_try" in
+  { case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
     cross_compiling=no
   else
     if test "$cross_compiling" = maybe; then
        cross_compiling=yes
     else
-       { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+See \`config.log' for more details." "$LINENO" 5; }
     fi
   fi
 fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
 ac_clean_files=$ac_clean_files_save
 # Check that the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6; }
-
-{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
-if { (ac_try="$ac_link"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
   # If both `conftest.exe' and `conftest' are `present' (well, observable)
 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
 # work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -3239,37 +3787,31 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 for ac_file in conftest.exe conftest conftest.*; do
   test -f "$ac_file" || continue
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
          break;;
     * ) break;;
   esac
 done
 else
-  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." "$LINENO" 5; }
 fi
-
 rm -f conftest$ac_cv_exeext
-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
 
 rm -f conftest.$ac_ext
 EXEEXT=$ac_cv_exeext
 ac_exeext=$EXEEXT
-{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
-if test "${ac_cv_objext+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -3281,51 +3823,46 @@ main ()
 }
 _ACEOF
 rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
+if { ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_compile") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
   for ac_file in conftest.o conftest.obj conftest.*; do
   test -f "$ac_file" || continue;
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
        break;;
   esac
 done
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." "$LINENO" 5; }
 fi
-
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
 OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -3339,54 +3876,34 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_compiler_gnu=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_compiler_gnu=no
+  ac_compiler_gnu=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
-GCC=`test $ac_compiler_gnu = yes && echo yes`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
 ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
-{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
    ac_c_werror_flag=yes
    ac_cv_prog_cc_g=no
    CFLAGS="-g"
-   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -3397,34 +3914,11 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_prog_cc_g=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       CFLAGS=""
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -3435,35 +3929,12 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_compile "$LINENO"; then :
 
-       ac_c_werror_flag=$ac_save_c_werror_flag
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
         CFLAGS="-g"
-        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -3474,42 +3945,18 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_prog_cc_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    ac_c_werror_flag=$ac_save_c_werror_flag
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
 if test "$ac_test_CFLAGS" = set; then
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
@@ -3525,18 +3972,14 @@ else
     CFLAGS=
   fi
 fi
-{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
 ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
@@ -3593,31 +4036,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
        -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
   CC="$ac_save_CC $ac_arg"
-  rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_prog_cc_c89=$ac_arg
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
 fi
-
 rm -f core conftest.err conftest.$ac_objext
   test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
@@ -3628,17 +4049,19 @@ fi
 # AC_CACHE_VAL
 case "x$ac_cv_prog_cc_c89" in
   x)
-    { echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6; } ;;
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
   xno)
-    { echo "$as_me:$LINENO: result: unsupported" >&5
-echo "${ECHO_T}unsupported" >&6; } ;;
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
   *)
     CC="$CC $ac_cv_prog_cc_c89"
-    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
 esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
 
+fi
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -3648,10 +4071,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 depcc="$CC"   am_compiler_list=
 
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
   # We make a subdir and do the tests there.  Otherwise we can end up
@@ -3713,6 +4136,7 @@ else
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
          >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
@@ -3738,13 +4162,11 @@ else
 fi
 
 fi
-{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
-
-
-if
+ if
   test "x$enable_dependency_tracking" != xno \
   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
   am__fastdepCC_TRUE=
@@ -3756,22 +4178,18 @@ fi
 
 
 if test "x$CC" != xcc; then
-  { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
-echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
 else
-  { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
-echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
 fi
-set dummy $CC; ac_cc=`echo $2 |
+set dummy $CC; ac_cc=`$as_echo "$2" |
                      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -3787,58 +4205,63 @@ _ACEOF
 # existing .o file with -o, though they will create one.
 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
 rm -f conftest2.*
-if { (case "(($ac_try" in
+if { case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-   test -f conftest2.$ac_objext && { (case "(($ac_try" in
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } &&
+   test -f conftest2.$ac_objext && { case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); };
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; };
 then
   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
   if test "x$CC" != xcc; then
     # Test first that cc exists at all.
     if { ac_try='cc -c conftest.$ac_ext >&5'
-  { (case "(($ac_try" in
+  { case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
       ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
       rm -f conftest2.*
-      if { (case "(($ac_try" in
+      if { case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        test -f conftest2.$ac_objext && { (case "(($ac_try" in
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } &&
+        test -f conftest2.$ac_objext && { case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); };
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; };
       then
        # cc works too.
        :
@@ -3855,23 +4278,22 @@ rm -f core conftest*
 
 fi
 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define NO_MINUS_C_MINUS_O 1
-_ACEOF
+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
 
 fi
 
 # FIXME: we rely on the cache variable name because
 # there is no other way.
 set dummy $CC
-ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
    # Losing compiler, so override with the script.
    # FIXME: It is wrong to rewrite CC.
    # But if we don't then we get into trouble of one sort or another.
@@ -3880,6 +4302,7 @@ if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
    CC="$am_aux_dir/compile $CC"
 fi
 
+
 ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3894,10 +4317,10 @@ if test -z "$CXX"; then
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CXX"; then
   ac_cv_prog_CXX="$CXX" # Let the user override the test.
@@ -3907,25 +4330,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 CXX=$ac_cv_prog_CXX
 if test -n "$CXX"; then
-  { echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -3938,10 +4361,10 @@ if test -z "$CXX"; then
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CXX"; then
   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
@@ -3951,25 +4374,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CXX="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
 if test -n "$ac_ct_CXX"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -3981,12 +4404,8 @@ done
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     CXX=$ac_ct_CXX
@@ -3996,49 +4415,36 @@ fi
   fi
 fi
 # Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C++ compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    rm -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
 
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -4052,54 +4458,34 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_cxx_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_cxx_try_compile "$LINENO"; then :
   ac_compiler_gnu=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_compiler_gnu=no
+  ac_compiler_gnu=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
-GXX=`test $ac_compiler_gnu = yes && echo yes`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
 ac_test_CXXFLAGS=${CXXFLAGS+set}
 ac_save_CXXFLAGS=$CXXFLAGS
-{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
    ac_cxx_werror_flag=yes
    ac_cv_prog_cxx_g=no
    CXXFLAGS="-g"
-   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -4110,34 +4496,11 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_cxx_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_cxx_try_compile "$LINENO"; then :
   ac_cv_prog_cxx_g=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       CXXFLAGS=""
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -4148,35 +4511,12 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_cxx_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_cxx_try_compile "$LINENO"; then :
 
-       ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
         CXXFLAGS="-g"
-        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -4187,42 +4527,18 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_cxx_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_cxx_try_compile "$LINENO"; then :
   ac_cv_prog_cxx_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
 if test "$ac_test_CXXFLAGS" = set; then
   CXXFLAGS=$ac_save_CXXFLAGS
 elif test $ac_cv_prog_cxx_g = yes; then
@@ -4246,10 +4562,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 depcc="$CXX"  am_compiler_list=
 
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
   # We make a subdir and do the tests there.  Otherwise we can end up
@@ -4311,6 +4627,7 @@ else
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
          >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
@@ -4336,13 +4653,11 @@ else
 fi
 
 fi
-{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
 
-
-
-if
+ if
   test "x$enable_dependency_tracking" != xno \
   && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
   am__fastdepCXX_TRUE=
@@ -4361,54 +4676,162 @@ test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
 
 
 
-## FIXME: really needed? (AC_LIBTOOL already provides this)
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AR="${ac_tool_prefix}ar"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+depcc="$CCAS"   am_compiler_list=
 
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  { echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CCAS_dependencies_compiler_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CCAS_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CCAS_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CCAS_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; }
+CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then
+  am__fastdepCCAS_TRUE=
+  am__fastdepCCAS_FALSE='#'
+else
+  am__fastdepCCAS_TRUE='#'
+  am__fastdepCCAS_FALSE=
+fi
+
+
+## FIXME: really needed? (AC_LIBTOOL already provides this)
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
 if test -z "$ac_cv_prog_AR"; then
   ac_ct_AR=$AR
   # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_AR"; then
   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
@@ -4418,25 +4841,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_AR="ar"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_AR=$ac_cv_prog_ac_ct_AR
 if test -n "$ac_ct_AR"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
   if test "x$ac_ct_AR" = x; then
@@ -4444,12 +4867,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     AR=$ac_ct_AR
@@ -4461,10 +4880,10 @@ fi
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -4474,25 +4893,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 RANLIB=$ac_cv_prog_RANLIB
 if test -n "$RANLIB"; then
-  { echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -4501,10 +4920,10 @@ if test -z "$ac_cv_prog_RANLIB"; then
   ac_ct_RANLIB=$RANLIB
   # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_RANLIB"; then
   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
@@ -4514,25 +4933,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
 if test -n "$ac_ct_RANLIB"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
   if test "x$ac_ct_RANLIB" = x; then
@@ -4540,12 +4959,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     RANLIB=$ac_ct_RANLIB
@@ -4555,85 +4970,6 @@ else
 fi
   # :)
 
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
-  ./ | .// | /cC/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
-         if test $ac_prog = install &&
-           grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-           # AIX install.  It has an incompatible calling convention.
-           :
-         elif test $ac_prog = install &&
-           grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-           # program-specific install script used by HP pwplus--don't use.
-           :
-         else
-           ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-           break 3
-         fi
-       fi
-      done
-    done
-    ;;
-esac
-done
-IFS=$as_save_IFS
-
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 
 . ${srcdir}/configure.host
@@ -4642,27 +4978,25 @@ GC_CFLAGS=${gc_cflags}
 
 
 # Check whether --enable-threads was given.
-if test "${enable_threads+set}" = set; then
+if test "${enable_threads+set}" = set; then :
   enableval=$enable_threads; THREADS=$enableval
 else
-   { echo "$as_me:$LINENO: checking for thread model used by GCC" >&5
-echo $ECHO_N "checking for thread model used by GCC... $ECHO_C" >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread model used by GCC" >&5
+$as_echo_n "checking for thread model used by GCC... " >&6; }
     THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
     if test -z "$THREADS"; then
       THREADS=no
     fi
-    { echo "$as_me:$LINENO: result: $THREADS" >&5
-echo "${ECHO_T}$THREADS" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THREADS" >&5
+$as_echo "$THREADS" >&6; }
 fi
 
 
 # Check whether --enable-parallel-mark was given.
-if test "${enable_parallel_mark+set}" = set; then
+if test "${enable_parallel_mark+set}" = set; then :
   enableval=$enable_parallel_mark; case "$THREADS" in
       no | none | single)
-       { { echo "$as_me:$LINENO: error: Parallel mark requires --enable-threads=x spec" >&5
-echo "$as_me: error: Parallel mark requires --enable-threads=x spec" >&2;}
-   { (exit 1); exit 1; }; }
+       as_fn_error "Parallel mark requires --enable-threads=x spec" "$LINENO" 5
        ;;
     esac
 
@@ -4670,12 +5004,32 @@ fi
 
 
 # Check whether --enable-cplusplus was given.
-if test "${enable_cplusplus+set}" = set; then
+if test "${enable_cplusplus+set}" = set; then :
   enableval=$enable_cplusplus;
 fi
 
 
-INCLUDES=-I${srcdir}/include
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 THREADDLLIBS=
 need_atomic_ops_asm=false
 ## Libraries needed to support dynamic loading and/or threads.
@@ -4688,156 +5042,109 @@ case "$THREADS" in
     THREADDLLIBS=-lpthread
     case "$host" in
      x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha-*-linux* | sparc*-*-linux*)
-       cat >>confdefs.h <<\_ACEOF
-#define GC_LINUX_THREADS 1
-_ACEOF
+       $as_echo "#define GC_LINUX_THREADS 1" >>confdefs.h
 
-       cat >>confdefs.h <<\_ACEOF
-#define _REENTRANT 1
-_ACEOF
+       $as_echo "#define _REENTRANT 1" >>confdefs.h
 
         if test "${enable_parallel_mark}" = yes; then
-         cat >>confdefs.h <<\_ACEOF
-#define PARALLEL_MARK 1
-_ACEOF
+         $as_echo "#define PARALLEL_MARK 1" >>confdefs.h
 
        fi
-       cat >>confdefs.h <<\_ACEOF
-#define THREAD_LOCAL_ALLOC 1
-_ACEOF
+       $as_echo "#define THREAD_LOCAL_ALLOC 1" >>confdefs.h
 
-       { echo "$as_me:$LINENO: WARNING: \"Explict GC_INIT() calls may be required.\"" >&5
-echo "$as_me: WARNING: \"Explict GC_INIT() calls may be required.\"" >&2;};
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Explicit GC_INIT() calls may be required.\"" >&5
+$as_echo "$as_me: WARNING: \"Explicit GC_INIT() calls may be required.\"" >&2;};
        ;;
      *-*-linux*)
-       cat >>confdefs.h <<\_ACEOF
-#define GC_LINUX_THREADS 1
-_ACEOF
+       $as_echo "#define GC_LINUX_THREADS 1" >>confdefs.h
 
-       cat >>confdefs.h <<\_ACEOF
-#define _REENTRANT 1
-_ACEOF
+       $as_echo "#define _REENTRANT 1" >>confdefs.h
 
        ;;
      *-*-aix*)
-       cat >>confdefs.h <<\_ACEOF
-#define GC_AIX_THREADS 1
-_ACEOF
+       $as_echo "#define GC_AIX_THREADS 1" >>confdefs.h
 
-       cat >>confdefs.h <<\_ACEOF
-#define _REENTRANT 1
-_ACEOF
+       $as_echo "#define _REENTRANT 1" >>confdefs.h
 
        ;;
      *-*-hpux11*)
-       { echo "$as_me:$LINENO: WARNING: \"Only HP/UX 11 POSIX threads are supported.\"" >&5
-echo "$as_me: WARNING: \"Only HP/UX 11 POSIX threads are supported.\"" >&2;}
-       cat >>confdefs.h <<\_ACEOF
-#define GC_HPUX_THREADS 1
-_ACEOF
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Only HP/UX 11 POSIX threads are supported.\"" >&5
+$as_echo "$as_me: WARNING: \"Only HP/UX 11 POSIX threads are supported.\"" >&2;}
+       $as_echo "#define GC_HPUX_THREADS 1" >>confdefs.h
 
-       cat >>confdefs.h <<\_ACEOF
-#define _POSIX_C_SOURCE 199506L
-_ACEOF
+       $as_echo "#define _POSIX_C_SOURCE 199506L" >>confdefs.h
 
        if test "${enable_parallel_mark}" = yes; then
-         cat >>confdefs.h <<\_ACEOF
-#define PARALLEL_MARK 1
-_ACEOF
+         $as_echo "#define PARALLEL_MARK 1" >>confdefs.h
 
        fi
-       cat >>confdefs.h <<\_ACEOF
-#define THREAD_LOCAL_ALLOC 1
-_ACEOF
+       $as_echo "#define THREAD_LOCAL_ALLOC 1" >>confdefs.h
 
-       { echo "$as_me:$LINENO: WARNING: \"Explict GC_INIT() calls may be required.\"" >&5
-echo "$as_me: WARNING: \"Explict GC_INIT() calls may be required.\"" >&2;};
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Explicit GC_INIT() calls may be required.\"" >&5
+$as_echo "$as_me: WARNING: \"Explicit GC_INIT() calls may be required.\"" >&2;};
        THREADDLLIBS="-lpthread -lrt"
        # HPUX needs REENTRANT for the _r calls.
 
-cat >>confdefs.h <<\_ACEOF
-#define _REENTRANT 1
-_ACEOF
+$as_echo "#define _REENTRANT 1" >>confdefs.h
 
        ;;
      *-*-hpux10*)
-       { echo "$as_me:$LINENO: WARNING: \"Only HP-UX 11 POSIX threads are supported.\"" >&5
-echo "$as_me: WARNING: \"Only HP-UX 11 POSIX threads are supported.\"" >&2;}
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Only HP-UX 11 POSIX threads are supported.\"" >&5
+$as_echo "$as_me: WARNING: \"Only HP-UX 11 POSIX threads are supported.\"" >&2;}
        ;;
+     *-*-openbsd*)
+        $as_echo "#define GC_OPENBSD_THREADS 1" >>confdefs.h
+
+        THREADDLLIBS=-pthread
+        INCLUDES="$INCLUDES -pthread"
+        openbsd_threads=true
+        ;;
      *-*-freebsd*)
-       { echo "$as_me:$LINENO: WARNING: \"FreeBSD does not yet fully support threads with Boehm GC.\"" >&5
-echo "$as_me: WARNING: \"FreeBSD does not yet fully support threads with Boehm GC.\"" >&2;}
-       cat >>confdefs.h <<\_ACEOF
-#define GC_FREEBSD_THREADS 1
-_ACEOF
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"FreeBSD does not yet fully support threads with Boehm GC.\"" >&5
+$as_echo "$as_me: WARNING: \"FreeBSD does not yet fully support threads with Boehm GC.\"" >&2;}
+       $as_echo "#define GC_FREEBSD_THREADS 1" >>confdefs.h
 
        INCLUDES="$INCLUDES -pthread"
        ;;
      *-*-kfreebsd*-gnu)
-       cat >>confdefs.h <<\_ACEOF
-#define GC_FREEBSD_THREADS 1
-_ACEOF
+       $as_echo "#define GC_FREEBSD_THREADS 1" >>confdefs.h
 
        INCLUDES="$INCLUDES -pthread"
        THREADDLLIBS=-pthread
-       cat >>confdefs.h <<\_ACEOF
-#define _REENTRANT 1
-_ACEOF
+       $as_echo "#define _REENTRANT 1" >>confdefs.h
 
         if test "${enable_parallel_mark}" = yes; then
-         cat >>confdefs.h <<\_ACEOF
-#define PARALLEL_MARK 1
-_ACEOF
+         $as_echo "#define PARALLEL_MARK 1" >>confdefs.h
 
        fi
-       cat >>confdefs.h <<\_ACEOF
-#define THREAD_LOCAL_ALLOC 1
-_ACEOF
+       $as_echo "#define THREAD_LOCAL_ALLOC 1" >>confdefs.h
 
-       cat >>confdefs.h <<\_ACEOF
-#define USE_COMPILER_TLS 1
-_ACEOF
+       $as_echo "#define USE_COMPILER_TLS 1" >>confdefs.h
 
        ;;
      *-*-gnu*)
-       cat >>confdefs.h <<\_ACEOF
-#define GC_GNU_THREADS 1
-_ACEOF
+       $as_echo "#define GC_GNU_THREADS 1" >>confdefs.h
 
-       cat >>confdefs.h <<\_ACEOF
-#define _REENTRANT 1
-_ACEOF
+       $as_echo "#define _REENTRANT 1" >>confdefs.h
 
-       cat >>confdefs.h <<\_ACEOF
-#define THREAD_LOCAL_ALLOC 1
-_ACEOF
+       $as_echo "#define THREAD_LOCAL_ALLOC 1" >>confdefs.h
 
        ;;
      *-*-netbsd*)
-       { echo "$as_me:$LINENO: WARNING: \"Only on NetBSD 2.0 or later.\"" >&5
-echo "$as_me: WARNING: \"Only on NetBSD 2.0 or later.\"" >&2;}
-       cat >>confdefs.h <<\_ACEOF
-#define GC_NETBSD_THREADS 1
-_ACEOF
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Only on NetBSD 2.0 or later.\"" >&5
+$as_echo "$as_me: WARNING: \"Only on NetBSD 2.0 or later.\"" >&2;}
+       $as_echo "#define GC_NETBSD_THREADS 1" >>confdefs.h
 
-       cat >>confdefs.h <<\_ACEOF
-#define _REENTRANT 1
-_ACEOF
+       $as_echo "#define _REENTRANT 1" >>confdefs.h
 
-       cat >>confdefs.h <<\_ACEOF
-#define _PTHREADS 1
-_ACEOF
+       $as_echo "#define _PTHREADS 1" >>confdefs.h
 
        THREADDLLIBS="-lpthread -lrt"
        ;;
      *-*-solaris*)
-       cat >>confdefs.h <<\_ACEOF
-#define GC_SOLARIS_THREADS 1
-_ACEOF
+       $as_echo "#define GC_SOLARIS_THREADS 1" >>confdefs.h
 
-       cat >>confdefs.h <<\_ACEOF
-#define THREAD_LOCAL_ALLOC 1
-_ACEOF
+       $as_echo "#define THREAD_LOCAL_ALLOC 1" >>confdefs.h
 
        THREADDLLIBS="-lpthread -lrt"
        if test "$GCC" != yes; then
@@ -4846,33 +5153,30 @@ _ACEOF
         fi
        ;;
      *-*-irix*)
-       cat >>confdefs.h <<\_ACEOF
-#define GC_IRIX_THREADS 1
-_ACEOF
+       $as_echo "#define GC_IRIX_THREADS 1" >>confdefs.h
 
        ;;
      *-*-cygwin*)
-       cat >>confdefs.h <<\_ACEOF
-#define GC_WIN32_THREADS 1
-_ACEOF
+       $as_echo "#define GC_THREADS 1" >>confdefs.h
 
-       cat >>confdefs.h <<\_ACEOF
-#define THREAD_LOCAL_ALLOC 1
-_ACEOF
+        if test "${enable_parallel_mark}" = yes; then
+         $as_echo "#define PARALLEL_MARK 1" >>confdefs.h
+
+       fi
+       $as_echo "#define THREAD_LOCAL_ALLOC 1" >>confdefs.h
 
+       # Cygwin doesn't have a real libpthread, so Libtool can't link
+       # against it.
+       THREADDLLIBS=""
        win32_threads=true
        ;;
      *-*-darwin*)
-       cat >>confdefs.h <<\_ACEOF
-#define GC_DARWIN_THREADS 1
-_ACEOF
+       $as_echo "#define GC_DARWIN_THREADS 1" >>confdefs.h
 
-       cat >>confdefs.h <<\_ACEOF
-#define THREAD_LOCAL_ALLOC 1
-_ACEOF
+       $as_echo "#define THREAD_LOCAL_ALLOC 1" >>confdefs.h
 
-       { echo "$as_me:$LINENO: WARNING: \"Explict GC_INIT() calls may be required.\"" >&5
-echo "$as_me: WARNING: \"Explict GC_INIT() calls may be required.\"" >&2;};
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Explicit GC_INIT() calls may be required.\"" >&5
+$as_echo "$as_me: WARNING: \"Explicit GC_INIT() calls may be required.\"" >&2;};
        # Parallel-mark is currently unreliable on Darwin; ignore request
        # if test "${enable_parallel_mark}" = yes; then
        #   AC_DEFINE(PARALLEL_MARK)
@@ -4880,21 +5184,15 @@ echo "$as_me: WARNING: \"Explict GC_INIT() calls may be required.\"" >&2;};
        darwin_threads=true
        ;;
      *-*-osf*)
-       cat >>confdefs.h <<\_ACEOF
-#define GC_OSF1_THREADS 1
-_ACEOF
+       $as_echo "#define GC_OSF1_THREADS 1" >>confdefs.h
 
         if test "${enable_parallel_mark}" = yes; then
-         cat >>confdefs.h <<\_ACEOF
-#define PARALLEL_MARK 1
-_ACEOF
+         $as_echo "#define PARALLEL_MARK 1" >>confdefs.h
 
-         cat >>confdefs.h <<\_ACEOF
-#define THREAD_LOCAL_ALLOC 1
-_ACEOF
+         $as_echo "#define THREAD_LOCAL_ALLOC 1" >>confdefs.h
 
-         { echo "$as_me:$LINENO: WARNING: \"Explict GC_INIT() calls may be required.\"" >&5
-echo "$as_me: WARNING: \"Explict GC_INIT() calls may be required.\"" >&2;};
+         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Explicit GC_INIT() calls may be required.\"" >&5
+$as_echo "$as_me: WARNING: \"Explicit GC_INIT() calls may be required.\"" >&2;};
          # May want to enable it in other cases, too.
          # Measurements havent yet been done.
        fi
@@ -4902,48 +5200,43 @@ echo "$as_me: WARNING: \"Explict GC_INIT() calls may be required.\"" >&2;};
        THREADDLLIBS="-lpthread -lrt"
        ;;
       *)
-       { { echo "$as_me:$LINENO: error: \"Pthreads not supported by the GC on this platform.\"" >&5
-echo "$as_me: error: \"Pthreads not supported by the GC on this platform.\"" >&2;}
-   { (exit 1); exit 1; }; }
+       as_fn_error "\"Pthreads not supported by the GC on this platform.\"" "$LINENO" 5
        ;;
     esac
     ;;
  win32)
-    cat >>confdefs.h <<\_ACEOF
-#define GC_WIN32_THREADS 1
-_ACEOF
+    $as_echo "#define GC_THREADS 1" >>confdefs.h
+
+    if test "${enable_parallel_mark}" = yes; then
+      $as_echo "#define PARALLEL_MARK 1" >>confdefs.h
+
+      $as_echo "#define THREAD_LOCAL_ALLOC 1" >>confdefs.h
 
+    fi
     win32_threads=true
-        cat >>confdefs.h <<\_ACEOF
-#define NO_GETENV 1
-_ACEOF
+
+$as_echo "#define EMPTY_GETENV_RESULTS 1" >>confdefs.h
 
     ;;
  dgux386)
     THREADS=dgux386
-    { echo "$as_me:$LINENO: result: $THREADDLLIBS" >&5
-echo "${ECHO_T}$THREADDLLIBS" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THREADDLLIBS" >&5
+$as_echo "$THREADDLLIBS" >&6; }
     # Use pthread GCC  switch
     THREADDLLIBS=-pthread
     if test "${enable_parallel_mark}" = yes; then
-        cat >>confdefs.h <<\_ACEOF
-#define PARALLEL_MARK 1
-_ACEOF
+        $as_echo "#define PARALLEL_MARK 1" >>confdefs.h
 
     fi
-    cat >>confdefs.h <<\_ACEOF
-#define THREAD_LOCAL_ALLOC 1
-_ACEOF
+    $as_echo "#define THREAD_LOCAL_ALLOC 1" >>confdefs.h
 
-    { echo "$as_me:$LINENO: WARNING: \"Explict GC_INIT() calls may be required.\"" >&5
-echo "$as_me: WARNING: \"Explict GC_INIT() calls may be required.\"" >&2;};
-    cat >>confdefs.h <<\_ACEOF
-#define GC_DGUX386_THREADS 1
-_ACEOF
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Explicit GC_INIT() calls may be required.\"" >&5
+$as_echo "$as_me: WARNING: \"Explicit GC_INIT() calls may be required.\"" >&2;};
+
+$as_echo "#define GC_DGUX386_THREADS 1" >>confdefs.h
 
-    cat >>confdefs.h <<\_ACEOF
-#define DGUX_THREADS 1
-_ACEOF
+
+$as_echo "#define DGUX_THREADS 1" >>confdefs.h
 
     # Enable _POSIX4A_DRAFT10_SOURCE with flag -pthread
     INCLUDES="-pthread $INCLUDES"
@@ -4951,30 +5244,20 @@ _ACEOF
  aix)
     THREADS=posix
     THREADDLLIBS=-lpthread
-    cat >>confdefs.h <<\_ACEOF
-#define GC_AIX_THREADS 1
-_ACEOF
+    $as_echo "#define GC_AIX_THREADS 1" >>confdefs.h
 
-    cat >>confdefs.h <<\_ACEOF
-#define _REENTRANT 1
-_ACEOF
+    $as_echo "#define _REENTRANT 1" >>confdefs.h
 
     ;;
  decosf1 | irix | mach | os2 | solaris | dce | vxworks)
-    { { echo "$as_me:$LINENO: error: thread package $THREADS not yet supported" >&5
-echo "$as_me: error: thread package $THREADS not yet supported" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error "thread package $THREADS not yet supported" "$LINENO" 5
     ;;
  *)
-    { { echo "$as_me:$LINENO: error: $THREADS is an unknown thread package" >&5
-echo "$as_me: error: $THREADS is an unknown thread package" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error "$THREADS is an unknown thread package" "$LINENO" 5
     ;;
 esac
 
-
-
-if test x$THREADS != xnone; then
+ if test x$THREADS != xnone; then
   THREADS_TRUE=
   THREADS_FALSE='#'
 else
@@ -4982,9 +5265,7 @@ else
   THREADS_FALSE=
 fi
 
-
-
-if test x$THREADS = xposix; then
+ if test x$THREADS = xposix; then
   PTHREADS_TRUE=
   PTHREADS_FALSE='#'
 else
@@ -4992,9 +5273,7 @@ else
   PTHREADS_FALSE=
 fi
 
-
-
-if test x$darwin_threads = xtrue; then
+ if test x$darwin_threads = xtrue; then
   DARWIN_THREADS_TRUE=
   DARWIN_THREADS_FALSE='#'
 else
@@ -5002,9 +5281,7 @@ else
   DARWIN_THREADS_FALSE=
 fi
 
-
-
-if test x$win32_threads = xtrue; then
+ if test x$win32_threads = xtrue; then
   WIN32_THREADS_TRUE=
   WIN32_THREADS_FALSE='#'
 else
@@ -5012,6 +5289,14 @@ else
   WIN32_THREADS_FALSE=
 fi
 
+ if test x$openbsd_threads = xtrue; then
+  OPENBSD_THREADS_TRUE=
+  OPENBSD_THREADS_FALSE='#'
+else
+  OPENBSD_THREADS_TRUE='#'
+  OPENBSD_THREADS_FALSE=
+fi
+
 
 case "$host" in
    powerpc-*-darwin*)
@@ -5024,1130 +5309,308 @@ esac
 case "$host" in
   powerpc*-*-darwin*)
 
-{ echo "$as_me:$LINENO: checking for ppc_thread_state_t.r0" >&5
-echo $ECHO_N "checking for ppc_thread_state_t.r0... $ECHO_C" >&6; }
-if test "${ac_cv_member_ppc_thread_state_t_r0+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <mach/thread_status.h>
+ac_fn_c_check_member "$LINENO" "ppc_thread_state_t" "r0" "ac_cv_member_ppc_thread_state_t_r0" "#include <mach/thread_status.h>
+"
+if test "x$ac_cv_member_ppc_thread_state_t_r0" = x""yes; then :
 
-int
-main ()
-{
-static ppc_thread_state_t ac_aggr;
-if (ac_aggr.r0)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_ppc_thread_state_t_r0=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+$as_echo "#define HAS_PPC_THREAD_STATE_R0 1" >>confdefs.h
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <mach/thread_status.h>
+fi
 
-int
-main ()
-{
-static ppc_thread_state_t ac_aggr;
-if (sizeof ac_aggr.r0)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_ppc_thread_state_t_r0=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+    ac_fn_c_check_member "$LINENO" "ppc_thread_state_t" "__r0" "ac_cv_member_ppc_thread_state_t___r0" "#include <mach/thread_status.h>
+"
+if test "x$ac_cv_member_ppc_thread_state_t___r0" = x""yes; then :
 
-       ac_cv_member_ppc_thread_state_t_r0=no
-fi
+$as_echo "#define HAS_PPC_THREAD_STATE___R0 1" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_ppc_thread_state_t_r0" >&5
-echo "${ECHO_T}$ac_cv_member_ppc_thread_state_t_r0" >&6; }
-if test $ac_cv_member_ppc_thread_state_t_r0 = yes; then
+    ac_fn_c_check_member "$LINENO" "ppc_thread_state64_t" "r0" "ac_cv_member_ppc_thread_state64_t_r0" "#include <mach/thread_status.h>
+"
+if test "x$ac_cv_member_ppc_thread_state64_t_r0" = x""yes; then :
 
-cat >>confdefs.h <<\_ACEOF
-#define HAS_PPC_THREAD_STATE_R0 1
-_ACEOF
+$as_echo "#define HAS_PPC_THREAD_STATE64_R0 1" >>confdefs.h
 
 fi
 
-    { echo "$as_me:$LINENO: checking for ppc_thread_state_t.__r0" >&5
-echo $ECHO_N "checking for ppc_thread_state_t.__r0... $ECHO_C" >&6; }
-if test "${ac_cv_member_ppc_thread_state_t___r0+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <mach/thread_status.h>
+    ac_fn_c_check_member "$LINENO" "ppc_thread_state64_t" "__r0" "ac_cv_member_ppc_thread_state64_t___r0" "#include <mach/thread_status.h>
+"
+if test "x$ac_cv_member_ppc_thread_state64_t___r0" = x""yes; then :
 
-int
-main ()
-{
-static ppc_thread_state_t ac_aggr;
-if (ac_aggr.__r0)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_ppc_thread_state_t___r0=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+$as_echo "#define HAS_PPC_THREAD_STATE64___R0 1" >>confdefs.h
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <mach/thread_status.h>
+fi
 
-int
-main ()
-{
-static ppc_thread_state_t ac_aggr;
-if (sizeof ac_aggr.__r0)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_ppc_thread_state_t___r0=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+    ;;
+  i?86*-*-darwin*)
+    ac_fn_c_check_member "$LINENO" "x86_thread_state32_t" "eax" "ac_cv_member_x86_thread_state32_t_eax" "#include <sys/cdefs.h>
+      #include <mach/thread_status.h>
+"
+if test "x$ac_cv_member_x86_thread_state32_t_eax" = x""yes; then :
 
-       ac_cv_member_ppc_thread_state_t___r0=no
-fi
+$as_echo "#define HAS_X86_THREAD_STATE32_EAX 1" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    ac_fn_c_check_member "$LINENO" "x86_thread_state32_t" "__eax" "ac_cv_member_x86_thread_state32_t___eax" "#include <sys/cdefs.h>
+      #include <mach/thread_status.h>
+"
+if test "x$ac_cv_member_x86_thread_state32_t___eax" = x""yes; then :
+
+$as_echo "#define HAS_X86_THREAD_STATE32___EAX 1" >>confdefs.h
+
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_ppc_thread_state_t___r0" >&5
-echo "${ECHO_T}$ac_cv_member_ppc_thread_state_t___r0" >&6; }
-if test $ac_cv_member_ppc_thread_state_t___r0 = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAS_PPC_THREAD_STATE___R0 1
-_ACEOF
+    ;;
+  x86_64-*-darwin*)
+    ac_fn_c_check_member "$LINENO" "x86_thread_state64_t" "rax" "ac_cv_member_x86_thread_state64_t_rax" "#include <sys/cdefs.h>
+      #include <mach/thread_status.h>
+"
+if test "x$ac_cv_member_x86_thread_state64_t_rax" = x""yes; then :
+
+$as_echo "#define HAS_X86_THREAD_STATE64_RAX 1" >>confdefs.h
 
 fi
 
-    { echo "$as_me:$LINENO: checking for ppc_thread_state64_t.r0" >&5
-echo $ECHO_N "checking for ppc_thread_state64_t.r0... $ECHO_C" >&6; }
-if test "${ac_cv_member_ppc_thread_state64_t_r0+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <mach/thread_status.h>
+    ac_fn_c_check_member "$LINENO" "x86_thread_state64_t" "__rax" "ac_cv_member_x86_thread_state64_t___rax" "#include <sys/cdefs.h>
+      #include <mach/thread_status.h>
+"
+if test "x$ac_cv_member_x86_thread_state64_t___rax" = x""yes; then :
 
-int
-main ()
-{
-static ppc_thread_state64_t ac_aggr;
-if (ac_aggr.r0)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+$as_echo "#define HAS_X86_THREAD_STATE64___RAX 1" >>confdefs.h
+
+fi
+
+     ;;
+  *) ;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_ppc_thread_state64_t_r0=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xlc" >&5
+$as_echo_n "checking for xlc... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <mach/thread_status.h>
 
 int
 main ()
 {
-static ppc_thread_state64_t ac_aggr;
-if (sizeof ac_aggr.r0)
-return 0;
+
+ #ifndef __xlC__
+ # error
+ #endif
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_ppc_thread_state64_t_r0=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  compiler_xlc=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_member_ppc_thread_state64_t_r0=no
+  compiler_xlc=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $compiler_xlc" >&5
+$as_echo "$compiler_xlc" >&6; }
+ if test $compiler_xlc = yes; then
+  COMPILER_XLC_TRUE=
+  COMPILER_XLC_FALSE='#'
+else
+  COMPILER_XLC_TRUE='#'
+  COMPILER_XLC_FALSE=
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_ppc_thread_state64_t_r0" >&5
-echo "${ECHO_T}$ac_cv_member_ppc_thread_state64_t_r0" >&6; }
-if test $ac_cv_member_ppc_thread_state64_t_r0 = yes; then
+if test $compiler_xlc = yes -a "$powerpc_darwin" = true; then
+  # the darwin stack-frame-walking code is completely broken on xlc
 
-cat >>confdefs.h <<\_ACEOF
-#define HAS_PPC_THREAD_STATE64_R0 1
-_ACEOF
+$as_echo "#define DARWIN_DONT_PARSE_STACK 1" >>confdefs.h
 
 fi
 
-    { echo "$as_me:$LINENO: checking for ppc_thread_state64_t.__r0" >&5
-echo $ECHO_N "checking for ppc_thread_state64_t.__r0... $ECHO_C" >&6; }
-if test "${ac_cv_member_ppc_thread_state64_t___r0+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# We never want libdl on darwin. It is a fake libdl that just ends up making
+# dyld calls anyway.  The same applies to Cygwin.
+case "$host" in
+  *-*-darwin*) ;;
+  *-*-cygwin*) ;;
+  *)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <mach/thread_status.h>
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
 int
 main ()
 {
-static ppc_thread_state64_t ac_aggr;
-if (ac_aggr.__r0)
-return 0;
+return dlopen ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_ppc_thread_state64_t___r0=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+  THREADDLLIBS="$THREADDLLIBS -ldl"
+fi
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <mach/thread_status.h>
+    ;;
+esac
 
-int
-main ()
-{
-static ppc_thread_state64_t ac_aggr;
-if (sizeof ac_aggr.__r0)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+case "$host" in
+  *-*-hpux*)
+    avoid_cpp_lib=yes;;
+  *)
+    avoid_cpp_lib=no;
+    ;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_ppc_thread_state64_t___r0=yes
+ if test $avoid_cpp_lib = yes; then
+  AVOID_CPP_LIB_TRUE=
+  AVOID_CPP_LIB_FALSE='#'
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_member_ppc_thread_state64_t___r0=no
+  AVOID_CPP_LIB_TRUE='#'
+  AVOID_CPP_LIB_FALSE=
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_ppc_thread_state64_t___r0" >&5
-echo "${ECHO_T}$ac_cv_member_ppc_thread_state64_t___r0" >&6; }
-if test $ac_cv_member_ppc_thread_state64_t___r0 = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAS_PPC_THREAD_STATE64___R0 1
-_ACEOF
-
-fi
 
+# extra LD Flags which are required for targets
+case "${host}" in
+  *-*-darwin*)
+    extra_ldflags_libgc=-Wl,-single_module
     ;;
-  i?86*-*-darwin*)
-    { echo "$as_me:$LINENO: checking for x86_thread_state32_t.eax" >&5
-echo $ECHO_N "checking for x86_thread_state32_t.eax... $ECHO_C" >&6; }
-if test "${ac_cv_member_x86_thread_state32_t_eax+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/cdefs.h>
-      #include <mach/thread_status.h>
-
-int
-main ()
-{
-static x86_thread_state32_t ac_aggr;
-if (ac_aggr.eax)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_x86_thread_state32_t_eax=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/cdefs.h>
-      #include <mach/thread_status.h>
 
-int
-main ()
-{
-static x86_thread_state32_t ac_aggr;
-if (sizeof ac_aggr.eax)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_x86_thread_state32_t_eax=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_member_x86_thread_state32_t_eax=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
+target_all=libgc.la
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_x86_thread_state32_t_eax" >&5
-echo "${ECHO_T}$ac_cv_member_x86_thread_state32_t_eax" >&6; }
-if test $ac_cv_member_x86_thread_state32_t_eax = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAS_X86_THREAD_STATE32_EAX 1
-_ACEOF
+TARGET_ECOS="no"
+
+# Check whether --with-ecos was given.
+if test "${with_ecos+set}" = set; then :
+  withval=$with_ecos; TARGET_ECOS="$with_ecos"
 
 fi
 
-    { echo "$as_me:$LINENO: checking for x86_thread_state32_t.__eax" >&5
-echo $ECHO_N "checking for x86_thread_state32_t.__eax... $ECHO_C" >&6; }
-if test "${ac_cv_member_x86_thread_state32_t___eax+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/cdefs.h>
-      #include <mach/thread_status.h>
 
-int
-main ()
-{
-static x86_thread_state32_t ac_aggr;
-if (ac_aggr.__eax)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_x86_thread_state32_t___eax=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+addobjs=
+addlibs=
+CXXINCLUDES=
+case "$TARGET_ECOS" in
+   no)
+      ;;
+   *)
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/cdefs.h>
-      #include <mach/thread_status.h>
+$as_echo "#define ECOS 1" >>confdefs.h
 
-int
-main ()
-{
-static x86_thread_state32_t ac_aggr;
-if (sizeof ac_aggr.__eax)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+      CXXINCLUDES="-I${TARGET_ECOS}/include"
+      addobjs="$addobjs ecos.lo"
+      ;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_x86_thread_state32_t___eax=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_member_x86_thread_state32_t___eax=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test "${enable_cplusplus}" = yes; then
+  CPLUSPLUS_TRUE=
+  CPLUSPLUS_FALSE='#'
+else
+  CPLUSPLUS_TRUE='#'
+  CPLUSPLUS_FALSE=
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_x86_thread_state32_t___eax" >&5
-echo "${ECHO_T}$ac_cv_member_x86_thread_state32_t___eax" >&6; }
-if test $ac_cv_member_x86_thread_state32_t___eax = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAS_X86_THREAD_STATE32___EAX 1
-_ACEOF
 
-fi
 
-    ;;
-  x86_64-*-darwin*)
-    { echo "$as_me:$LINENO: checking for x86_thread_state64_t.rax" >&5
-echo $ECHO_N "checking for x86_thread_state64_t.rax... $ECHO_C" >&6; }
-if test "${ac_cv_member_x86_thread_state64_t_rax+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/cdefs.h>
-      #include <mach/thread_status.h>
 
-int
-main ()
-{
-static x86_thread_state64_t ac_aggr;
-if (ac_aggr.rax)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_x86_thread_state64_t_rax=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/cdefs.h>
-      #include <mach/thread_status.h>
 
-int
-main ()
-{
-static x86_thread_state64_t ac_aggr;
-if (sizeof ac_aggr.rax)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_x86_thread_state64_t_rax=yes
+# Configuration of shared libraries
+#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+# Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_shared=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_member_x86_thread_state64_t_rax=no
+  enable_shared=yes
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_x86_thread_state64_t_rax" >&5
-echo "${ECHO_T}$ac_cv_member_x86_thread_state64_t_rax" >&6; }
-if test $ac_cv_member_x86_thread_state64_t_rax = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAS_X86_THREAD_STATE64_RAX 1
-_ACEOF
 
-fi
 
-    { echo "$as_me:$LINENO: checking for x86_thread_state64_t.__rax" >&5
-echo $ECHO_N "checking for x86_thread_state64_t.__rax... $ECHO_C" >&6; }
-if test "${ac_cv_member_x86_thread_state64_t___rax+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/cdefs.h>
-      #include <mach/thread_status.h>
 
-int
-main ()
-{
-static x86_thread_state64_t ac_aggr;
-if (ac_aggr.__rax)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_x86_thread_state64_t___rax=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/cdefs.h>
-      #include <mach/thread_status.h>
 
-int
-main ()
-{
-static x86_thread_state64_t ac_aggr;
-if (sizeof ac_aggr.__rax)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_x86_thread_state64_t___rax=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_member_x86_thread_state64_t___rax=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_x86_thread_state64_t___rax" >&5
-echo "${ECHO_T}$ac_cv_member_x86_thread_state64_t___rax" >&6; }
-if test $ac_cv_member_x86_thread_state64_t___rax = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAS_X86_THREAD_STATE64___RAX 1
-_ACEOF
-
-fi
-
-     ;;
-  *) ;;
-esac
-
-{ echo "$as_me:$LINENO: checking for xlc" >&5
-echo $ECHO_N "checking for xlc... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
- #ifndef __xlC__
- # error
- #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  compiler_xlc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       compiler_xlc=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $compiler_xlc" >&5
-echo "${ECHO_T}$compiler_xlc" >&6; }
-
-
-if test $compiler_xlc = yes; then
-  COMPILER_XLC_TRUE=
-  COMPILER_XLC_FALSE='#'
-else
-  COMPILER_XLC_TRUE='#'
-  COMPILER_XLC_FALSE=
-fi
-
-if test $compiler_xlc = yes -a "$powerpc_darwin" = true; then
-  # the darwin stack-frame-walking code is completely broken on xlc
-  cat >>confdefs.h <<\_ACEOF
-#define DARWIN_DONT_PARSE_STACK 1
-_ACEOF
-
-fi
-
-# We never want libdl on darwin. It is a fake libdl that just ends up making
-# dyld calls anyway
-case "$host" in
-  *-*-darwin*) ;;
-  *)
-    { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_dl_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_dl_dlopen=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
-if test $ac_cv_lib_dl_dlopen = yes; then
-  THREADDLLIBS="$THREADDLLIBS -ldl"
-fi
-
-    ;;
-esac
-
-case "$host" in
-  *-*-hpux*)
-    avoid_cpp_lib=yes;;
-  *)
-    avoid_cpp_lib=no;
-    ;;
-esac
-
-
-if test $avoid_cpp_lib = yes; then
-  AVOID_CPP_LIB_TRUE=
-  AVOID_CPP_LIB_FALSE='#'
-else
-  AVOID_CPP_LIB_TRUE='#'
-  AVOID_CPP_LIB_FALSE=
-fi
-
-
-# extra LD Flags which are required for targets
-case "${host}" in
-  *-*-darwin*)
-    extra_ldflags_libgc=-Wl,-single_module
-    ;;
-esac
 
 
+case "$host" in
+ alpha-*-openbsd*)
+     enable_shared=no
+     ;;
+ *)
+     ;;
+esac
 
-
-target_all=libgc.la
-
-
-TARGET_ECOS="no"
-
-# Check whether --with-ecos was given.
-if test "${with_ecos+set}" = set; then
-  withval=$with_ecos; TARGET_ECOS="$with_ecos"
-
-fi
-
-
-addobjs=
-addlibs=
-CXXINCLUDES=
-case "$TARGET_ECOS" in
-   no)
-      ;;
-   *)
-      cat >>confdefs.h <<\_ACEOF
-#define ECOS 1
-_ACEOF
-
-      CXXINCLUDES="-I${TARGET_ECOS}/include"
-      addobjs="$addobjs ecos.lo"
-      ;;
-esac
-
-
-
-if test "${enable_cplusplus}" = yes; then
-  CPLUSPLUS_TRUE=
-  CPLUSPLUS_FALSE='#'
-else
-  CPLUSPLUS_TRUE='#'
-  CPLUSPLUS_FALSE=
-fi
-
-
-
-
-
-
-
-# Configuration of shared libraries
-#
-{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
-# Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval=$enable_shared; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_shared=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
-else
-  enable_shared=yes
-fi
-
-
-
-case "$host" in
- alpha-*-openbsd*)
-     enable_shared=no
-     ;;
- *)
-     ;;
-esac
-
-{ echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
 
 # Configuration of machine-dependent code
 #
-{ echo "$as_me:$LINENO: checking which machine-dependent code should be used" >&5
-echo $ECHO_N "checking which machine-dependent code should be used... $ECHO_C" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which machine-dependent code should be used" >&5
+$as_echo_n "checking which machine-dependent code should be used... " >&6; }
 machdep=
 case "$host" in
  alpha-*-openbsd*)
     machdep="mach_dep.lo"
     if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then
-       { echo "$as_me:$LINENO: WARNING: OpenBSD/Alpha without dlopen(). Shared library support is disabled" >&5
-echo "$as_me: WARNING: OpenBSD/Alpha without dlopen(). Shared library support is disabled" >&2;}
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenBSD/Alpha without dlopen(). Shared library support is disabled" >&5
+$as_echo "$as_me: WARNING: OpenBSD/Alpha without dlopen(). Shared library support is disabled" >&2;}
     fi
     ;;
  alpha*-*-linux*)
     machdep="mach_dep.lo"
     ;;
  i?86-*-solaris2.[89] | i?86-*-solaris2.1?)
-    cat >>confdefs.h <<\_ACEOF
-#define SOLARIS25_PROC_VDB_BUG_FIXED 1
-_ACEOF
+
+$as_echo "#define SOLARIS25_PROC_VDB_BUG_FIXED 1" >>confdefs.h
 
     ;;
  mipstx39-*-elf*)
     machdep="mach_dep.lo"
-    cat >>confdefs.h <<\_ACEOF
-#define STACKBASE __stackbase
-_ACEOF
-
-    cat >>confdefs.h <<\_ACEOF
-#define DATASTART_IS_ETEXT 1
-_ACEOF
-
     ;;
  mips-dec-ultrix*)
     machdep="mach-dep.lo"
@@ -6168,11 +5631,13 @@ _ACEOF
  sparc64-*-netbsd*)
     machdep="mach_dep.lo sparc_mach_dep.lo"
     ;;
+ sparc*-*-openbsd*)
+    machdep="mach_dep.lo sparc_mach_dep.lo"
+    ;;
  sparc-sun-solaris2.3)
     machdep="mach_dep.lo sparc_mach_dep.lo"
-    cat >>confdefs.h <<\_ACEOF
-#define SUNOS53_SHARED_LIB 1
-_ACEOF
+
+$as_echo "#define SUNOS53_SHARED_LIB 1" >>confdefs.h
 
     ;;
  sparc*-sun-solaris2*)
@@ -6183,158 +5648,155 @@ _ACEOF
     ;;
 esac
 if test x"$machdep" = x; then
-{ echo "$as_me:$LINENO: result: $machdep" >&5
-echo "${ECHO_T}$machdep" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $machdep" >&5
+$as_echo "$machdep" >&6; }
    machdep="mach_dep.lo"
 fi
 addobjs="$addobjs $machdep"
 
 
 
-# Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then
-  enableval=$enable_static; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_static=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
-else
-  enable_static=yes
-fi
+case `pwd` in
+  *\ * | *\    *)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
 
 
-# Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
-  enableval=$enable_fast_install; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_fast_install=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
-else
-  enable_fast_install=yes
-fi
 
+macro_version='2.2'
+macro_revision='1.2599'
 
-{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
-echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; }
-if test "${lt_cv_path_SED+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for lt_ac_prog in sed gsed; do
+    for ac_prog in sed gsed; do
     for ac_exec_ext in '' $ac_executable_extensions; do
-      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
-        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
-      fi
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_SED_found && break 3
     done
   done
-done
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f $lt_ac_sed && continue
-  cat /dev/null > conftest.in
-  lt_ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
-  # Check for GNU sed and select it if it is found.
-  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
-    lt_cv_path_SED=$lt_ac_sed
-    break
-  fi
-  while true; do
-    cat conftest.in conftest.in >conftest.tmp
-    mv conftest.tmp conftest.in
-    cp conftest.in conftest.nl
-    echo >>conftest.nl
-    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
-    cmp -s conftest.out conftest.nl || break
-    # 10000 chars as input seems more than enough
-    test $lt_ac_count -gt 10 && break
-    lt_ac_count=`expr $lt_ac_count + 1`
-    if test $lt_ac_count -gt $lt_ac_max; then
-      lt_ac_max=$lt_ac_count
-      lt_cv_path_SED=$lt_ac_sed
-    fi
   done
-done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
 
-SED=$lt_cv_path_SED
-{ echo "$as_me:$LINENO: result: $SED" >&5
-echo "${ECHO_T}$SED" >&6; }
 
-{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # Extract the first word of "grep ggrep" to use in msg output
-if test -z "$GREP"; then
-set dummy grep ggrep; ac_prog_name=$2
-if test "${ac_cv_path_GREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
+  if test -z "$GREP"; then
   ac_path_GREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_prog in grep ggrep; do
-  for ac_exec_ext in '' $ac_executable_extensions; do
-    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-    # Check for GNU ac_path_GREP and select it if it is found.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
 case `"$ac_path_GREP" --version 2>&1` in
 *GNU*)
   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
 *)
   ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  $as_echo_n 0123456789 >"conftest.in"
   while :
   do
     cat "conftest.in" "conftest.in" >"conftest.tmp"
     mv "conftest.tmp" "conftest.in"
     cp "conftest.in" "conftest.nl"
-    echo 'GREP' >> "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
     if test $ac_count -gt ${ac_path_GREP_max-0}; then
       # Best one so far, save it but keep looking for a better one
       ac_cv_path_GREP="$ac_path_GREP"
@@ -6346,77 +5808,61 @@ case `"$ac_path_GREP" --version 2>&1` in
   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
 esac
 
-
-    $ac_path_GREP_found && break 3
+      $ac_path_GREP_found && break 3
+    done
+  done
   done
-done
-
-done
 IFS=$as_save_IFS
-
-
-fi
-
-GREP="$ac_cv_path_GREP"
-if test -z "$GREP"; then
-  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
 else
   ac_cv_path_GREP=$GREP
 fi
 
-
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
  GREP="$ac_cv_path_GREP"
 
 
-{ echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
    then ac_cv_path_EGREP="$GREP -E"
    else
-     # Extract the first word of "egrep" to use in msg output
-if test -z "$EGREP"; then
-set dummy egrep; ac_prog_name=$2
-if test "${ac_cv_path_EGREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+     if test -z "$EGREP"; then
   ac_path_EGREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_prog in egrep; do
-  for ac_exec_ext in '' $ac_executable_extensions; do
-    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-    # Check for GNU ac_path_EGREP and select it if it is found.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
 *GNU*)
   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
 *)
   ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  $as_echo_n 0123456789 >"conftest.in"
   while :
   do
     cat "conftest.in" "conftest.in" >"conftest.tmp"
     mv "conftest.tmp" "conftest.in"
     cp "conftest.in" "conftest.nl"
-    echo 'EGREP' >> "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
       # Best one so far, save it but keep looking for a better one
       ac_cv_path_EGREP="$ac_path_EGREP"
@@ -6428,39 +5874,114 @@ case `"$ac_path_EGREP" --version 2>&1` in
   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
 esac
 
-
-    $ac_path_EGREP_found && break 3
+      $ac_path_EGREP_found && break 3
+    done
+  done
   done
-done
-
-done
 IFS=$as_save_IFS
-
-
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
 fi
 
-EGREP="$ac_cv_path_EGREP"
-if test -z "$EGREP"; then
-  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
+   fi
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if test "${ac_cv_path_FGREP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_cv_path_EGREP=$EGREP
-fi
+  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+   then ac_cv_path_FGREP="$GREP -F"
+   else
+     if test -z "$FGREP"; then
+  ac_path_FGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in fgrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+  # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'FGREP' >> "conftest.nl"
+    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_FGREP="$ac_path_FGREP"
+      ac_path_FGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
 
+      $ac_path_FGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_FGREP"; then
+    as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_FGREP=$FGREP
+fi
 
    fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
 # Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
+if test "${with_gnu_ld+set}" = set; then :
   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
 else
   with_gnu_ld=no
@@ -6469,8 +5990,8 @@ fi
 ac_prog=ld
 if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
-  { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
   case $host in
   *-*-mingw*)
     # gcc leaves a trailing carriage return which upsets mingw
@@ -6483,9 +6004,9 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
     [\\/]* | ?:[\\/]*)
       re_direlt='/[^/][^/]*/\.\./'
       # Canonicalize the pathname of ld
-      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-       ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+       ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
       done
       test -z "$LD" && LD="$ac_prog"
       ;;
@@ -6499,14 +6020,14 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
     ;;
   esac
 elif test "$with_gnu_ld" = yes; then
-  { echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
 else
-  { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
 fi
-if test "${lt_cv_path_LD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test "${lt_cv_path_LD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
@@ -6536,19 +6057,17 @@ fi
 
 LD="$lt_cv_path_LD"
 if test -n "$LD"; then
-  { echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
-{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   # I'd rather use --version here, but apparently some GNU lds only accept -v.
 case `$LD -v 2>&1 </dev/null` in
@@ -6560,40 +6079,23 @@ case `$LD -v 2>&1 </dev/null` in
   ;;
 esac
 fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
 with_gnu_ld=$lt_cv_prog_gnu_ld
 
 
-{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; }
-if test "${lt_cv_ld_reload_flag+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_ld_reload_flag='-r'
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; }
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
-  darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-    else
-      reload_cmds='$LD$reload_flag -o $output$reload_objs'
-    fi
-    ;;
-esac
 
-{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; }
-if test "${lt_cv_path_NM+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test "${lt_cv_path_NM+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$NM"; then
   # Let the user override the test.
@@ -6636,77 +6138,446 @@ else
     done
     IFS="$lt_save_ifs"
   done
-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+  : ${lt_cv_path_NM=no}
 fi
 fi
-{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
-echo "${ECHO_T}$lt_cv_path_NM" >&6; }
-NM="$lt_cv_path_NM"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DUMPBIN"; then
+  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-{ echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
-echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; }
-if test "${lt_cv_deplibs_check_method+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
 
-case $host_os in
-aix4* | aix5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+    test -n "$DUMPBIN" && break
+  done
+fi
+if test -z "$DUMPBIN"; then
+  ac_ct_DUMPBIN=$DUMPBIN
+  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DUMPBIN"; then
+  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-bsdi[45]*)
-  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  ;;
 
-cygwin*)
-  # func_win32_libid is a shell function defined in ltmain.sh
-  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-  lt_cv_file_magic_cmd='func_win32_libid'
-  ;;
+  test -n "$ac_ct_DUMPBIN" && break
+done
 
-mingw* | pw32*)
-  # Base MSYS/MinGW do not provide the 'file' command needed by
-  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
+  if test "x$ac_ct_DUMPBIN" = x; then
+    DUMPBIN=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DUMPBIN=$ac_ct_DUMPBIN
+  fi
+fi
 
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
 
-freebsd* | kfreebsd*-gnu | dragonfly*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if test "${lt_cv_nm_interface+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_nm_interface="BSD nm"
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  (eval echo "\"\$as_me:6269: $ac_compile\"" >&5)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:6272: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:6275: output\"" >&5)
+  cat conftest.out >&5
+  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+    lt_cv_nm_interface="MS dumpbin"
+  fi
+  rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+    i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536      # usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[         ]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      # Make teststring a little bigger before we do anything with it.
+      # a 1K string should be a reasonable start.
+      for i in 1 2 3 4 5 6 7 8 ; do
+        teststring=$teststring$teststring
+      done
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      # If test is not a shell built-in, we'll probably end up computing a
+      # maximum length that is only half of the actual maximum length, but
+      # we can't tell.
+      while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+                = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+             test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on
+      # massive amounts of additional arguments before passing them to the
+      # linker.  It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,, ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if test "${lt_cv_ld_reload_flag+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[45]*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  if ( file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     case $host_cpu in
     i*86 )
       # Not sure whether the presence of OpenBSD here was a mistake.
@@ -6743,7 +6614,7 @@ hpux10.20* | hpux11*)
   esac
   ;;
 
-interix3*)
+interix[3-9]*)
   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
   ;;
@@ -6759,12 +6630,12 @@ irix5* | irix6* | nonstopux*)
   ;;
 
 # This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
 netbsd*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
   else
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
@@ -6777,12 +6648,12 @@ newos6*)
   lt_cv_file_magic_test_file=/usr/lib/libnls.so
   ;;
 
-nto-qnx*)
-  lt_cv_deplibs_check_method=unknown
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
   ;;
 
 openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
   else
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
@@ -6793,10 +6664,18 @@ osf3* | osf4* | osf5*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
 solaris*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
 sysv4 | sysv4.3*)
   case $host_vendor in
   motorola)
@@ -6824,14 +6703,14 @@ sysv4 | sysv4.3*)
   esac
   ;;
 
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+tpf*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 esac
 
 fi
-{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
-echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
 file_magic_cmd=$lt_cv_file_magic_cmd
 deplibs_check_method=$lt_cv_deplibs_check_method
 test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -6839,1467 +6718,382 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
 
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
-# Allow CC to be a program name with arguments.
-compiler=$CC
 
-# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
-  enableval=$enable_libtool_lock;
-fi
 
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *ELF-32*)
-      HPUX_IA64_MODE="32"
-      ;;
-    *ELF-64*)
-      HPUX_IA64_MODE="64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '#line 6882 "configure"' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-   if test "$lt_cv_prog_gnu_ld" = yes; then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -melf32bsmip"
-      ;;
-    *N32*)
-      LD="${LD-ld} -melf32bmipn32"
-      ;;
-    *64-bit*)
-      LD="${LD-ld} -melf64bmip"
-      ;;
-    esac
-   else
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -32"
-      ;;
-    *N32*)
-      LD="${LD-ld} -n32"
-      ;;
-    *64-bit*)
-      LD="${LD-ld} -64"
-      ;;
-    esac
-   fi
-  fi
-  rm -rf conftest*
-  ;;
-
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    case `/usr/bin/file conftest.o` in
-    *32-bit*)
-      case $host in
-        x86_64-*linux*)
-          LD="${LD-ld} -m elf_i386"
-          ;;
-        ppc64-*linux*|powerpc64-*linux*)
-          LD="${LD-ld} -m elf32ppclinux"
-          ;;
-        s390x-*linux*)
-          LD="${LD-ld} -m elf_s390"
-          ;;
-        sparc64-*linux*)
-          LD="${LD-ld} -m elf32_sparc"
-          ;;
-      esac
-      ;;
-    *64-bit*)
-      case $host in
-        x86_64-*linux*)
-          LD="${LD-ld} -m elf_x86_64"
-          ;;
-        ppc*-*linux*|powerpc*-*linux*)
-          LD="${LD-ld} -m elf64ppc"
-          ;;
-        s390*-*linux*)
-          LD="${LD-ld} -m elf64_s390"
-          ;;
-        sparc*-*linux*)
-          LD="${LD-ld} -m elf64_sparc"
-          ;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; }
-if test "${lt_cv_cc_needs_belf+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-     cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  lt_cv_cc_needs_belf=yes
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-       lt_cv_cc_needs_belf=no
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-     ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 fi
-{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; }
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
-  ;;
-sparc*-*solaris*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    case `/usr/bin/file conftest.o` in
-    *64-bit*)
-      case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
-      *)    LD="${LD-ld} -64" ;;
-      esac
-      ;;
-    esac
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_AR="ar"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
-  rm -rf conftest*
-  ;;
+done
+  done
+IFS=$as_save_IFS
 
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
 esac
+    AR=$ac_ct_AR
+  fi
+else
+  AR="$ac_cv_prog_AR"
+fi
 
-need_locks="$enable_libtool_lock"
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  # Broken: fails on valid input.
-continue
-fi
 
-rm -f conftest.err conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
 
-rm -f conftest.err conftest.$ac_ext
 
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
 
-    done
-    ac_cv_prog_CPP=$CPP
 
-fi
-  CPP=$ac_cv_prog_CPP
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_cv_prog_CPP=$CPP
-fi
-{ echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-  # Broken: fails on valid input.
-continue
 fi
-
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
 fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
 else
-  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
 
-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-int
-main ()
-{
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_stdc=yes
+    STRIP=$ac_ct_STRIP
+  fi
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_header_stdc=no
+  STRIP="$ac_cv_prog_STRIP"
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
+test -z "$STRIP" && STRIP=:
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
 
-fi
 
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
 
-fi
 
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-                  (('a' <= (c) && (c) <= 'i') \
-                    || ('j' <= (c) && (c) <= 'r') \
-                    || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-       || toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-( exit $ac_status )
-ac_cv_header_stdc=no
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
 fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
 
 fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
 
+test -z "$RANLIB" && RANLIB=:
 
 
 
 
 
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-                 inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
 
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
 
-       eval "$as_ac_Header=no"
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
 
-fi
 
-done
 
 
 
-for ac_header in dlfcn.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
 
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
-fi
 
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## -------------------------------- ##
-## Report this to Hans.Boehm@hp.com ##
-## -------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
 
-fi
 
-done
 
 
 
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
-echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; }
-if test -z "$CXXCPP"; then
-  if test "${ac_cv_prog_CXXCPP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-      # Double quotes because CXXCPP needs to be expanded
-    for CXXCPP in "$CXX -E" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  # Broken: fails on valid input.
-continue
-fi
 
-rm -f conftest.err conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
 
-rm -f conftest.err conftest.$ac_ext
 
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
 
-    done
-    ac_cv_prog_CXXCPP=$CXXCPP
 
-fi
-  CXXCPP=$ac_cv_prog_CXXCPP
-else
-  ac_cv_prog_CXXCPP=$CXXCPP
-fi
-{ echo "$as_me:$LINENO: result: $CXXCPP" >&5
-echo "${ECHO_T}$CXXCPP" >&6; }
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  # Broken: fails on valid input.
-continue
-fi
 
-rm -f conftest.err conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
 
-rm -f conftest.err conftest.$ac_ext
 
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
-else
-  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
 
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-fi
-
-
-ac_ext=f
-ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
-ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_f77_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$F77"; then
-  ac_cv_prog_F77="$F77" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-F77=$ac_cv_prog_F77
-if test -n "$F77"; then
-  { echo "$as_me:$LINENO: result: $F77" >&5
-echo "${ECHO_T}$F77" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-    test -n "$F77" && break
-  done
-fi
-if test -z "$F77"; then
-  ac_ct_F77=$F77
-  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_F77"; then
-  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_F77="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_F77=$ac_cv_prog_ac_ct_F77
-if test -n "$ac_ct_F77"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
-echo "${ECHO_T}$ac_ct_F77" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  test -n "$ac_ct_F77" && break
-done
-
-  if test "x$ac_ct_F77" = x; then
-    F77=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
-    F77=$ac_ct_F77
-  fi
-fi
-
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-rm -f a.out
-
-# If we don't use `.F' as extension, the preprocessor is not run on the
-# input file.  (Note that this only needs to work for GNU compilers.)
-ac_save_ext=$ac_ext
-ac_ext=F
-{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; }
-if test "${ac_cv_f77_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-      program main
-#ifndef __GNUC__
-       choke me
-#endif
-
-      end
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_f77_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_compiler_gnu=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_compiler_gnu=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_f77_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; }
-ac_ext=$ac_save_ext
-ac_test_FFLAGS=${FFLAGS+set}
-ac_save_FFLAGS=$FFLAGS
-FFLAGS=
-{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
-echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_f77_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  FFLAGS=-g
-cat >conftest.$ac_ext <<_ACEOF
-      program main
-
-      end
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_f77_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_f77_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_prog_f77_g=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
-echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; }
-if test "$ac_test_FFLAGS" = set; then
-  FFLAGS=$ac_save_FFLAGS
-elif test $ac_cv_prog_f77_g = yes; then
-  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
-    FFLAGS="-g -O2"
-  else
-    FFLAGS="-g"
-  fi
-else
-  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
-    FFLAGS="-O2"
-  else
-    FFLAGS=
-  fi
-fi
-
-G77=`test $ac_compiler_gnu = yes && echo yes`
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-
-# find the maximum length of command line arguments
-{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; }
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-    i=0
-  teststring="ABCD"
-
-  case $build_os in
-  msdosdjgpp*)
-    # On DJGPP, this test can blow up pretty badly due to problems in libc
-    # (any single argument exceeding 2000 bytes causes a buffer overrun
-    # during glob expansion).  Even if it were fixed, the result of this
-    # check would be larger than it should be.
-    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-    ;;
-
-  gnu*)
-    # Under GNU Hurd, this test is not required because there is
-    # no limit to the length of command line arguments.
-    # Libtool will interpret -1 as no limit whatsoever
-    lt_cv_sys_max_cmd_len=-1;
-    ;;
-
-  cygwin* | mingw*)
-    # On Win9x/ME, this test blows up -- it succeeds, but takes
-    # about 5 minutes as the teststring grows exponentially.
-    # Worse, since 9x/ME are not pre-emptively multitasking,
-    # you end up with a "frozen" computer, even though with patience
-    # the test eventually succeeds (with a max line length of 256k).
-    # Instead, let's just punt: use the minimum linelength reported by
-    # all of the supported platforms: 8192 (on NT/2K/XP).
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  amigaos*)
-    # On AmigaOS with pdksh, this test takes hours, literally.
-    # So we just punt and use a minimum line length of 8192.
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
-    # This has been around since 386BSD, at least.  Likely further.
-    if test -x /sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
-    elif test -x /usr/sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
-    else
-      lt_cv_sys_max_cmd_len=65536      # usable default for all BSDs
-    fi
-    # And add a safety zone
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    ;;
-
-  interix*)
-    # We know the value 262144 and hardcode it with a safety zone (like BSD)
-    lt_cv_sys_max_cmd_len=196608
-    ;;
-
-  osf*)
-    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
-    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
-    # nice to cause kernel panics so lets avoid the loop below.
-    # First set a reasonable default.
-    lt_cv_sys_max_cmd_len=16384
-    #
-    if test -x /sbin/sysconfig; then
-      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
-        *1*) lt_cv_sys_max_cmd_len=-1 ;;
-      esac
-    fi
-    ;;
-  sco3.2v5*)
-    lt_cv_sys_max_cmd_len=102400
-    ;;
-  sysv5* | sco5v6* | sysv4.2uw2*)
-    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
-    if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[        ]//'`
-    else
-      lt_cv_sys_max_cmd_len=32768
-    fi
-    ;;
-  *)
-    # If test is not a shell built-in, we'll probably end up computing a
-    # maximum length that is only half of the actual maximum length, but
-    # we can't tell.
-    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
-    while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
-              = "XX$teststring") >/dev/null 2>&1 &&
-           new_result=`expr "X$teststring" : ".*" 2>&1` &&
-           lt_cv_sys_max_cmd_len=$new_result &&
-           test $i != 17 # 1/2 MB should be enough
-    do
-      i=`expr $i + 1`
-      teststring=$teststring$teststring
-    done
-    teststring=
-    # Add a significant safety factor because C++ compilers can tack on massive
-    # amounts of additional arguments before passing them to the linker.
-    # It appears as though 1/2 is a usable value.
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
-    ;;
-  esac
-
-fi
-
-if test -n $lt_cv_sys_max_cmd_len ; then
-  { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; }
-else
-  { echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6; }
-fi
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
 
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
+# Allow CC to be a program name with arguments.
+compiler=$CC
 
 
 # Check for command to grab the raw symbol name followed by C symbol from nm.
-{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
-echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; }
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
 
 # These are sane defaults that work on at least a few old systems.
@@ -8311,12 +7105,6 @@ symcode='[BCDEGRST]'
 # Regexp to match symbols that can be accessed directly from C.
 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
 
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-
 # Define system-specific variables.
 case $host_os in
 aix*)
@@ -8325,19 +7113,10 @@ aix*)
 cygwin* | mingw* | pw32*)
   symcode='[ABCDGISTW]'
   ;;
-hpux*) # Its linker distinguishes data from code symbols
+hpux*)
   if test "$host_cpu" = ia64; then
     symcode='[ABCDEGRST]'
   fi
-  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-  ;;
-linux*)
-  if test "$host_cpu" = ia64; then
-    symcode='[ABCDGIRSTW]'
-    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-  fi
   ;;
 irix* | nonstopux*)
   symcode='[BCDEGRST]'
@@ -8362,57 +7141,85 @@ sysv4)
   ;;
 esac
 
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+
 # Handle CRLF in mingw tool chain
 opt_cr=
 case $build_os in
 mingw*)
-  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
   ;;
 esac
 
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
-  symcode='[ABCDGIRSTW]' ;;
-esac
-
-# Try without a prefix undercore, then with it.
+# Try without a prefix underscore, then with it.
 for ac_symprfx in "" "_"; do
 
   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
   symxfrm="\\1 $ac_symprfx\\2 \\2"
 
   # Write the raw and C identifiers.
-  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK '"\
+"     {last_section=section; section=\$ 3};"\
+"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     \$ 0!~/External *\|/{next};"\
+"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+"     {if(hide[section]) next};"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     ' prfx=^$ac_symprfx"
+  else
+    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[     ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  fi
 
   # Check to see that the pipe works correctly.
   pipe_works=no
 
   rm -f conftest*
-  cat > conftest.$ac_ext <<EOF
+  cat > conftest.$ac_ext <<_LT_EOF
 #ifdef __cplusplus
 extern "C" {
 #endif
 char nm_test_var;
-void nm_test_func(){}
+void nm_test_func(void);
+void nm_test_func(void){}
 #ifdef __cplusplus
 }
 #endif
 int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
+_LT_EOF
 
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s "$nlist"; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
        mv -f "$nlist"T "$nlist"
@@ -8421,53 +7228,55 @@ EOF
       fi
 
       # Make sure that we snagged all the symbols we need.
-      if grep ' nm_test_var$' "$nlist" >/dev/null; then
-       if grep ' nm_test_func$' "$nlist" >/dev/null; then
-         cat <<EOF > conftest.$ac_ext
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+       if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+         cat <<_LT_EOF > conftest.$ac_ext
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-EOF
+_LT_EOF
          # Now generate the symbol file.
-         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
 
-         cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
+         cat <<_LT_EOF >> conftest.$ac_ext
 
-/* The mapping between symbol names and symbols. */
+/* The mapping between symbol names and symbols.  */
 const struct {
   const char *name;
-  lt_ptr_t address;
+  void       *address;
 }
-lt_preloaded_symbols[] =
+lt__PROGRAM__LTX_preloaded_symbols[] =
 {
-EOF
-         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
-         cat <<\EOF >> conftest.$ac_ext
-  {0, (lt_ptr_t) 0}
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+         cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
 };
 
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
 #ifdef __cplusplus
 }
 #endif
-EOF
+_LT_EOF
          # Now try linking the two files.
          mv conftest.$ac_objext conftstm.$ac_objext
          lt_save_LIBS="$LIBS"
          lt_save_CFLAGS="$CFLAGS"
          LIBS="conftstm.$ac_objext"
          CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
-         if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext}; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
            pipe_works=yes
          fi
          LIBS="$lt_save_LIBS"
@@ -8485,7 +7294,7 @@ EOF
     echo "$progname: failed program was:" >&5
     cat conftest.$ac_ext >&5
   fi
-  rm -f conftest* conftst*
+  rm -rf conftest* conftst*
 
   # Do not use the global_symbol_pipe unless it works.
   if test "$pipe_works" = yes; then
@@ -8501,573 +7310,646 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then
   lt_cv_sys_global_symbol_to_cdecl=
 fi
 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  { echo "$as_me:$LINENO: result: failed" >&5
-echo "${ECHO_T}failed" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
 else
-  { echo "$as_me:$LINENO: result: ok" >&5
-echo "${ECHO_T}ok" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
 fi
 
-{ echo "$as_me:$LINENO: checking for objdir" >&5
-echo $ECHO_N "checking for objdir... $ECHO_C" >&6; }
-if test "${lt_cv_objdir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
-echo "${ECHO_T}$lt_cv_objdir" >&6; }
-objdir=$lt_cv_objdir
 
 
 
 
 
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+  enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+      *ELF-32*)
+       HPUX_IA64_MODE="32"
+       ;;
+      *ELF-64*)
+       HPUX_IA64_MODE="64"
+       ;;
+    esac
   fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 7372 "configure"' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+      case `/usr/bin/file conftest.$ac_objext` in
+       *32-bit*)
+         LD="${LD-ld} -melf32bsmip"
+         ;;
+       *N32*)
+         LD="${LD-ld} -melf32bmipn32"
+         ;;
+       *64-bit*)
+         LD="${LD-ld} -melf64bmip"
+       ;;
+      esac
+    else
+      case `/usr/bin/file conftest.$ac_objext` in
+       *32-bit*)
+         LD="${LD-ld} -32"
+         ;;
+       *N32*)
+         LD="${LD-ld} -n32"
+         ;;
+       *64-bit*)
+         LD="${LD-ld} -64"
+         ;;
+      esac
+    fi
+  fi
+  rm -rf conftest*
   ;;
-esac
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+       case $host in
+         x86_64-*kfreebsd*-gnu)
+           LD="${LD-ld} -m elf_i386_fbsd"
+           ;;
+         x86_64-*linux*)
+           LD="${LD-ld} -m elf_i386"
+           ;;
+         ppc64-*linux*|powerpc64-*linux*)
+           LD="${LD-ld} -m elf32ppclinux"
+           ;;
+         s390x-*linux*)
+           LD="${LD-ld} -m elf_s390"
+           ;;
+         sparc64-*linux*)
+           LD="${LD-ld} -m elf32_sparc"
+           ;;
+       esac
+       ;;
+      *64-bit*)
+       case $host in
+         x86_64-*kfreebsd*-gnu)
+           LD="${LD-ld} -m elf_x86_64_fbsd"
+           ;;
+         x86_64-*linux*)
+           LD="${LD-ld} -m elf_x86_64"
+           ;;
+         ppc*-*linux*|powerpc*-*linux*)
+           LD="${LD-ld} -m elf64ppc"
+           ;;
+         s390*-*linux*|s390*-*tpf*)
+           LD="${LD-ld} -m elf64_s390"
+           ;;
+         sparc*-*linux*)
+           LD="${LD-ld} -m elf64_sparc"
+           ;;
+       esac
+       ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
 
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if test "${lt_cv_cc_needs_belf+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_cc_needs_belf=yes
+else
+  lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-# Constants:
-rm="rm -f"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)
+       if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+         LD="${LD-ld} -64"
+       fi
+       ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+esac
 
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
+need_locks="$enable_libtool_lock"
 
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  case $host_os in
+    rhapsody* | darwin*)
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
+  if test -n "$DSYMUTIL"; then
+  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AR="${ac_tool_prefix}ar"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  { echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6; }
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
 fi
-if test -z "$ac_cv_prog_AR"; then
-  ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+  ac_ct_DSYMUTIL=$DSYMUTIL
+  # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+  if test -n "$ac_ct_DSYMUTIL"; then
+  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_AR="ar"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6; }
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_AR" = x; then
-    AR="false"
+  if test "x$ac_ct_DSYMUTIL" = x; then
+    DSYMUTIL=":"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    AR=$ac_ct_AR
+    DSYMUTIL=$ac_ct_DSYMUTIL
   fi
 else
-  AR="$ac_cv_prog_AR"
+  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
 fi
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_NMEDIT+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+  if test -n "$NMEDIT"; then
+  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  { echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6; }
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
 fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -z "$ac_cv_prog_NMEDIT"; then
+  ac_ct_NMEDIT=$NMEDIT
+  # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+  if test -n "$ac_ct_NMEDIT"; then
+  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    ac_cv_prog_ac_ct_NMEDIT="nmedit"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_RANLIB" = x; then
-    RANLIB=":"
+  if test "x$ac_ct_NMEDIT" = x; then
+    NMEDIT=":"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    RANLIB=$ac_ct_RANLIB
+    NMEDIT=$ac_ct_NMEDIT
   fi
 else
-  RANLIB="$ac_cv_prog_RANLIB"
+  NMEDIT="$ac_cv_prog_NMEDIT"
 fi
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
 
 
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
 
 
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
 
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$SED" && SED=sed
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$ac_objext" && ac_objext=o
 
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
 
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
-    ;;
-  *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
 
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
 
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  case $MAGIC_CMD in
-[\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/${ac_tool_prefix}file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
-      if test -n "$file_magic_test_file"; then
-       case $deplibs_check_method in
-       "file_magic "*)
-         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-           $EGREP "$file_magic_regex" > /dev/null; then
-           :
-         else
-           cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
-         fi ;;
-       esac
+  lt_cv_apple_cc_single_mod=no
+      if test -z "${LT_MULTI_MODULE}"; then
+       # By default we will add the -single_module flag. You can override
+       # by either setting the environment variable LT_MULTI_MODULE
+       # non-empty at configure time, or by adding -multi_module to the
+       # link flags.
+       echo "int foo(void){return 1;}" > conftest.c
+       $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+         -dynamiclib ${wl}-single_module conftest.c
+       if test -f libconftest.dylib; then
+         lt_cv_apple_cc_single_mod=yes
+         rm -rf libconftest.dylib*
+       fi
+       rm conftest.c
       fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
+int
+main ()
+{
 
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    { echo "$as_me:$LINENO: checking for file" >&5
-echo $ECHO_N "checking for file... $ECHO_C" >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_ld_exported_symbols_list=yes
 else
-  case $MAGIC_CMD in
-[\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/file"
-      if test -n "$file_magic_test_file"; then
-       case $deplibs_check_method in
-       "file_magic "*)
-         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-           $EGREP "$file_magic_regex" > /dev/null; then
-           :
-         else
-           cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
+  lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+       LDFLAGS="$save_LDFLAGS"
 
-EOF
-         fi ;;
-       esac
-      fi
-      break
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+    case $host_os in
+    rhapsody* | darwin1.[012])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*) # darwin 5.x on
+      # if running on 10.5 or later, the deployment target defaults
+      # to the OS version, if on x86, and 10.4, the deployment
+      # target defaults to 10.4. Don't you love it?
+      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+       10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+       10.[012]*)
+         _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+       10.*)
+         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+      _lt_dar_single_mod='$single_module'
     fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    else
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    if test "$DSYMUTIL" != ":"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
 fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
 
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  # Broken: fails on valid input.
+continue
 fi
+rm -f conftest.err conftest.$ac_ext
 
-  else
-    MAGIC_CMD=:
-  fi
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
+rm -f conftest.err conftest.$ac_ext
 
-  fi
-  ;;
-esac
-
-enable_dlopen=no
-enable_win32_dll=no
-
-# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
-  enableval=$enable_libtool_lock;
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
 fi
 
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
+    done
+    ac_cv_prog_CPP=$CPP
 
-# Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then
-  withval=$with_pic; pic_mode="$withval"
+fi
+  CPP=$ac_cv_prog_CPP
 else
-  pic_mode=default
+  ac_cv_prog_CPP=$CPP
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
 
-test -z "$pic_mode" && pic_mode=default
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." "$LINENO" 5; }
+fi
 
-# Use C for the default configuration in the libtool script
-tagname=
-lt_save_CC="$CC"
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -9075,5388 +7957,2670 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-objext=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}\n'
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
 
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+int
+main ()
+{
 
-# Allow CC to be a program name with arguments.
-compiler=$CC
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
 
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
 
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
 
+fi
 
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
 
-lt_prog_compiler_no_builtin_flag=
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
 
-if test "$GCC" = yes; then
-  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
 
+fi
 
-{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
 else
-  lt_cv_prog_compiler_rtti_exceptions=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="-fno-rtti -fno-exceptions"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9145: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:9149: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_rtti_exceptions=yes
-     fi
-   fi
-   $rm conftest*
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+                  (('a' <= (c) && (c) <= 'i') \
+                    || ('j' <= (c) && (c) <= 'r') \
+                    || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
 
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+       || toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
 
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
-    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
 else
-    :
+  ac_cv_header_stdc=no
 fi
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-lt_prog_compiler_wl=
-lt_prog_compiler_pic=
-lt_prog_compiler_static=
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
 
-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
 
-  if test "$GCC" = yes; then
-    lt_prog_compiler_wl='-Wl,'
-    lt_prog_compiler_static='-static'
+fi
 
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static='-Bstatic'
-      fi
-      ;;
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                 inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
-      ;;
+fi
 
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
+done
 
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic='-DDLL_EXPORT'
-      ;;
 
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic='-fno-common'
-      ;;
+for ac_header in dlfcn.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
 
-    interix3*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
+fi
 
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      lt_prog_compiler_can_build_shared=no
-      enable_shared=no
-      ;;
+done
 
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       lt_prog_compiler_pic=-Kconform_pic
-      fi
-      ;;
 
-    hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       lt_prog_compiler_pic='-fPIC'
-       ;;
-      esac
-      ;;
 
-    *)
-      lt_prog_compiler_pic='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      lt_prog_compiler_wl='-Wl,'
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static='-Bstatic'
-      else
-       lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-      darwin*)
-        # PIC is the default on this platform
-        # Common symbols not allowed in MH_DYLIB files
-       case $cc_basename in
-         xlc*)
-         lt_prog_compiler_pic='-qnocommon'
-         lt_prog_compiler_wl='-Wl,'
-         ;;
-       esac
-       ;;
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic='-DDLL_EXPORT'
-      ;;
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-    hpux9* | hpux10* | hpux11*)
-      lt_prog_compiler_wl='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       lt_prog_compiler_pic='+Z'
-       ;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static='${wl}-a ${wl}archive'
-      ;;
 
-    irix5* | irix6* | nonstopux*)
-      lt_prog_compiler_wl='-Wl,'
-      # PIC (with -KPIC) is the default.
-      lt_prog_compiler_static='-non_shared'
-      ;;
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-    newsos6)
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-    linux*)
-      case $cc_basename in
-      icc* | ecc*)
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_pic='-KPIC'
-       lt_prog_compiler_static='-static'
-        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-       # which looks to be a dead project)
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_pic='-fpic'
-       lt_prog_compiler_static='-Bstatic'
-        ;;
-      ccc*)
-        lt_prog_compiler_wl='-Wl,'
-        # All Alpha code is PIC.
-        lt_prog_compiler_static='-non_shared'
-        ;;
-      esac
-      ;;
 
-    osf3* | osf4* | osf5*)
-      lt_prog_compiler_wl='-Wl,'
-      # All OSF/1 code is PIC.
-      lt_prog_compiler_static='-non_shared'
-      ;;
+  test -n "$ac_ct_CXX" && break
+done
 
-    solaris*)
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-       lt_prog_compiler_wl='-Qoption ld ';;
-      *)
-       lt_prog_compiler_wl='-Wl,';;
-      esac
-      ;;
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
 
-    sunos4*)
-      lt_prog_compiler_wl='-Qoption ld '
-      lt_prog_compiler_pic='-PIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    rm -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
 
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-       lt_prog_compiler_pic='-Kconform_pic'
-       lt_prog_compiler_static='-Bstatic'
-      fi
-      ;;
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
 
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 
-    unicos*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_can_build_shared=no
-      ;;
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    uts4*)
-      lt_prog_compiler_pic='-pic'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
+int
+main ()
+{
 
-    *)
-      lt_prog_compiler_can_build_shared=no
-      ;;
-    esac
-  fi
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+else
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic" >&6; }
+int
+main ()
+{
 
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic"; then
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
 
-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_pic_works+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  lt_prog_compiler_pic_works=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9413: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:9417: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_prog_compiler_pic_works=yes
-     fi
-   fi
-   $rm conftest*
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+        CXXFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; }
+int
+main ()
+{
 
-if test x"$lt_prog_compiler_pic_works" = xyes; then
-    case $lt_prog_compiler_pic in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
-     esac
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
 else
-    lt_prog_compiler_pic=
-     lt_prog_compiler_can_build_shared=no
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
 fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic=
-    ;;
-  *)
-    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
-    ;;
-esac
+depcc="$CXX"  am_compiler_list=
 
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_static_works+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  lt_prog_compiler_static_works=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         lt_prog_compiler_static_works=yes
-       fi
-     else
-       lt_prog_compiler_static_works=yes
-     fi
-   fi
-   $rm conftest*
-   LDFLAGS="$save_LDFLAGS"
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
 
-fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; }
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-if test x"$lt_prog_compiler_static_works" = xyes; then
-    :
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
 else
-    lt_prog_compiler_static=
+  am_cv_CXX_dependencies_compiler_type=none
 fi
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
 
-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
 else
-  lt_cv_prog_compiler_c_o=no
-   $rm -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9517: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:9521: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $rm conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-   $rm out/* && rmdir out
-   cd ..
-   rmdir conftest
-   $rm conftest*
-
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
 fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; }
 
 
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  { echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  need_locks=no
-fi
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
 
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
 
-  runpath_var=
-  allow_undefined_flag=
-  enable_shared_with_static_runtimes=no
-  archive_cmds=
-  archive_expsym_cmds=
-  old_archive_From_new_cmds=
-  old_archive_from_expsyms_cmds=
-  export_dynamic_flag_spec=
-  whole_archive_flag_spec=
-  thread_safe_flag_spec=
-  hardcode_libdir_flag_spec=
-  hardcode_libdir_flag_spec_ld=
-  hardcode_libdir_separator=
-  hardcode_direct=no
-  hardcode_minus_L=no
-  hardcode_shlibpath_var=unsupported
-  link_all_deplibs=unknown
-  hardcode_automatic=no
-  module_cmds=
-  module_expsym_cmds=
-  always_export_symbols=no
-  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  include_expsyms=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  extract_expsyms_cmds=
-  # Just being paranoid about ensuring that cc_basename is set.
-  for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
 done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
 
-  case $host_os in
-  cygwin* | mingw* | pw32*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  esac
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
 
-  ld_shlibs=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
 
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
-       whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-       whole_archive_flag_spec=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>/dev/null` in
-      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
 
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix3* | aix4* | aix5*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-       ld_shlibs=no
-       cat <<EOF 1>&2
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
 
-EOF
-      fi
-      ;;
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+_lt_caught_CXX_error=yes; }
+fi
 
-    amigaos*)
-      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)'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can't use
-      # them.
-      ld_shlibs=no
-      ;;
+else
+  _lt_caught_CXX_error=yes
+fi
 
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       allow_undefined_flag=unsupported
-       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-       # support --undefined.  This deserves some investigation.  FIXME
-       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-       ld_shlibs=no
-      fi
-      ;;
 
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
-      # as there is no search path for DLLs.
-      hardcode_libdir_flag_spec='-L$libdir'
-      allow_undefined_flag=unsupported
-      always_export_symbols=no
-      enable_shared_with_static_runtimes=yes
-      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
 
-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-       ld_shlibs=no
-      fi
-      ;;
 
-    interix3*)
-      hardcode_direct=no
-      hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
 
-    linux*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       tmp_addflag=
-       case $cc_basename,$host_cpu in
-       pgcc*)                          # Portland Group C compiler
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag'
-         ;;
-       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag -Mnomain' ;;
-       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
-         tmp_addflag=' -i_dynamic' ;;
-       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
-         tmp_addflag=' -i_dynamic -nofor_main' ;;
-       ifc* | ifort*)                  # Intel Fortran compiler
-         tmp_addflag=' -nofor_main' ;;
-       esac
-       archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+# Set options
 
-       if test $supports_anon_versioning = yes; then
-         archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
-  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-  $echo "local: *; };" >> $output_objdir/$libname.ver~
-         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-       fi
-      else
-       ld_shlibs=no
-      fi
-      ;;
 
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-       wlarc=
-      else
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
 
-    solaris*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-       ld_shlibs=no
-       cat <<EOF 1>&2
+        enable_dlopen=no
 
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
 
-EOF
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       ld_shlibs=no
-      fi
-      ;;
+  enable_win32_dll=no
 
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-       ld_shlibs=no
-       cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-       ;;
-       *)
-         if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-           hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
-           archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
-           archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
-         else
-           ld_shlibs=no
-         fi
-       ;;
-      esac
-      ;;
-
-    sunos4*)
-      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
 
+  # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+  enableval=$enable_static; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
     *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       ld_shlibs=no
-      fi
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_static=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
       ;;
     esac
+else
+  enable_static=yes
+fi
 
-    if test "$ld_shlibs" = no; then
-      runpath_var=
-      hardcode_libdir_flag_spec=
-      export_dynamic_flag_spec=
-      whole_archive_flag_spec=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      allow_undefined_flag=unsupported
-      always_export_symbols=yes
-      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'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      hardcode_minus_L=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-       # Neither direct hardcoding nor static linking is supported with a
-       # broken collect2.
-       hardcode_direct=unsupported
-      fi
-      ;;
-
-    aix4* | aix5*)
-      if test "$host_cpu" = ia64; then
-       # On IA64, the linker does run time linking by default, so we don't
-       # have to do anything special.
-       aix_use_runtimelinking=no
-       exp_sym_flag='-Bexport'
-       no_entry_flag=""
-      else
-       # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
-       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-         export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-       else
-         export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-       fi
-       aix_use_runtimelinking=no
 
-       # Test if we are trying to use run time linking or normal
-       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
-       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
-         for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-           aix_use_runtimelinking=yes
-           break
-         fi
-         done
-         ;;
-       esac
 
-       exp_sym_flag='-bexport'
-       no_entry_flag='-bnoentry'
-      fi
 
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
-      archive_cmds=''
-      hardcode_direct=yes
-      hardcode_libdir_separator=':'
-      link_all_deplibs=yes
 
-      if test "$GCC" = yes; then
-       case $host_os in aix4.[012]|aix4.[012].*)
-       # We only want to do this on AIX 4.2 and lower, the check
-       # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
-         if test -f "$collect2name" && \
-          strings "$collect2name" | grep resolve_lib_name >/dev/null
-         then
-         # We have reworked collect2
-         hardcode_direct=yes
-         else
-         # We have old collect2
-         hardcode_direct=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         hardcode_minus_L=yes
-         hardcode_libdir_flag_spec='-L$libdir'
-         hardcode_libdir_separator=
-         fi
-         ;;
-       esac
-       shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
-       fi
-      else
-       # not using gcc
-       if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-         shared_flag='-G'
-       else
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
-         else
-           shared_flag='${wl}-bM:SRE'
-         fi
-       fi
-      fi
 
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      always_export_symbols=yes
-      if test "$aix_use_runtimelinking" = yes; then
-       # Warning - without using the other runtime loading flags (-brtl),
-       # -berok will link without error, but may produce a broken library.
-       allow_undefined_flag='-berok'
-       # Determine the default libpath from the value encoded in an empty executable.
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
 
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+  withval=$with_pic; pic_mode="$withval"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
+  pic_mode=default
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-       archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-       else
-       if test "$host_cpu" = ia64; then
-         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
-         allow_undefined_flag="-z nodefs"
-         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-       else
-        # Determine the default libpath from the value encoded in an empty executable.
-        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+test -z "$pic_mode" && pic_mode=default
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
 
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
 
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-         # Warning - without using the other run time loading flags,
-         # -berok will link without error, but may produce a broken library.
-         no_undefined_flag=' ${wl}-bernotok'
-         allow_undefined_flag=' ${wl}-berok'
-         # Exported symbols can be pulled into shared objects from archives
-         whole_archive_flag_spec='$convenience'
-         archive_cmds_need_lc=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+  # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+  enableval=$enable_fast_install; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_fast_install=yes
        fi
-      fi
+      done
+      IFS="$lt_save_ifs"
       ;;
+    esac
+else
+  enable_fast_install=yes
+fi
 
-    amigaos*)
-      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)'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      # see comment about different semantics on the GNU ld section
-      ld_shlibs=no
-      ;;
 
-    bsdi[45]*)
-      export_dynamic_flag_spec=-rdynamic
-      ;;
 
-    cygwin* | mingw* | pw32*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec=' '
-      allow_undefined_flag=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_From_new_cmds='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes=yes
-      ;;
 
-    darwin* | rhapsody*)
-      case $host_os in
-        rhapsody* | darwin1.[012])
-         allow_undefined_flag='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[012])
-               allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-      esac
-      archive_cmds_need_lc=no
-      hardcode_direct=no
-      hardcode_automatic=yes
-      hardcode_shlibpath_var=unsupported
-      whole_archive_flag_spec=''
-      link_all_deplibs=yes
-    if test "$GCC" = yes ; then
-       output_verbose_link_cmd='echo'
-        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-         module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         ld_shlibs=no
-          ;;
-      esac
-    fi
-      ;;
 
-    dgux*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_shlibpath_var=no
-      ;;
 
-    freebsd1*)
-      ld_shlibs=no
-      ;;
 
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
 
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      hardcode_shlibpath_var=no
-      ;;
 
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | kfreebsd*-gnu | dragonfly*)
-      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
 
-    hpux9*)
-      if test "$GCC" = yes; then
-       archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-       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'
-      fi
-      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator=:
-      hardcode_direct=yes
 
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L=yes
-      export_dynamic_flag_spec='${wl}-E'
-      ;;
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
 
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator=:
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
-       hardcode_direct=yes
-       export_dynamic_flag_spec='${wl}-E'
 
-       # hardcode_minus_L: Not really in the search PATH,
-       # but as the default location of the library.
-       hardcode_minus_L=yes
-      fi
-      ;;
 
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      else
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator=:
 
-       case $host_cpu in
-       hppa*64*|ia64*)
-         hardcode_libdir_flag_spec_ld='+b $libdir'
-         hardcode_direct=no
-         hardcode_shlibpath_var=no
-         ;;
-       *)
-         hardcode_direct=yes
-         export_dynamic_flag_spec='${wl}-E'
 
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         hardcode_minus_L=yes
-         ;;
-       esac
-      fi
-      ;;
 
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-       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'
-      else
-       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'
-       hardcode_libdir_flag_spec_ld='-rpath $libdir'
-      fi
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      link_all_deplibs=yes
-      ;;
 
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
 
-    newsos6)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=yes
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      hardcode_shlibpath_var=no
-      ;;
 
-    openbsd*)
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-       export_dynamic_flag_spec='${wl}-E'
-      else
-       case $host_os in
-        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-          archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-          hardcode_libdir_flag_spec='-R$libdir'
-          ;;
-        *)
-          archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-          hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-          ;;
-       esac
-      fi
-      ;;
 
-    os2*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      allow_undefined_flag=unsupported
-      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'
-      old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
 
-    osf3*)
-      if test "$GCC" = yes; then
-       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-       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'
-      else
-       allow_undefined_flag=' -expect_unresolved \*'
-       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'
-      fi
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
 
-    osf4* | osf5*)     # as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-       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'
-       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      else
-       allow_undefined_flag=' -expect_unresolved \*'
-       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'
-       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
 
-       # Both c and cxx compiler support -rpath directly
-       hardcode_libdir_flag_spec='-rpath $libdir'
-      fi
-      hardcode_libdir_separator=:
-      ;;
 
-    solaris*)
-      no_undefined_flag=' -z text'
-      if test "$GCC" = yes; then
-       wlarc='${wl}'
-       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
-      else
-       wlarc=''
-       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      fi
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_shlibpath_var=no
-      case $host_os in
-      solaris2.[0-5] | solaris2.[0-5].*) ;;
-      *)
-       # The compiler driver will combine linker options so we
-       # cannot just pass the convience library names through
-       # without $wl, iff we do not link with $LD.
-       # Luckily, gcc supports the same syntax we need for Sun Studio.
-       # Supported since Solaris 2.6 (maybe 2.5.1?)
-       case $wlarc in
-       '')
-         whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
-       *)
-         whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
-       esac ;;
-      esac
-      link_all_deplibs=yes
-      ;;
 
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-       # Use $CC to link under sequent, because it throws in some extra .o
-       # files that make .init and .fini sections work.
-       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      hardcode_shlibpath_var=no
-      ;;
 
-    sysv4)
-      case $host_vendor in
-       sni)
-         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct=yes # is this really true???
-       ;;
-       siemens)
-         ## LD is ld it makes a PLAMLIB
-         ## CC just makes a GrossModule.
-         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-         reload_cmds='$CC -r -o $output$reload_objs'
-         hardcode_direct=no
-        ;;
-       motorola)
-         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
-       ;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      hardcode_shlibpath_var=no
-      ;;
 
-    sysv4.3*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var=no
-      export_dynamic_flag_spec='-Bexport'
-      ;;
 
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_shlibpath_var=no
-       runpath_var=LD_RUN_PATH
-       hardcode_runpath_var=yes
-       ld_shlibs=yes
-      fi
-      ;;
 
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
-      no_undefined_flag='${wl}-z,text'
-      archive_cmds_need_lc=no
-      hardcode_shlibpath_var=no
-      runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-       archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
 
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      no_undefined_flag='${wl}-z,text'
-      allow_undefined_flag='${wl}-z,nodefs'
-      archive_cmds_need_lc=no
-      hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-      hardcode_libdir_separator=':'
-      link_all_deplibs=yes
-      export_dynamic_flag_spec='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-       archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
 
-    uts4*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_shlibpath_var=no
-      ;;
 
-    *)
-      ld_shlibs=no
-      ;;
-    esac
-  fi
 
-{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5
-echo "${ECHO_T}$ld_shlibs" >&6; }
-test "$ld_shlibs" = no && can_build_shared=no
+test -z "$LN_S" && LN_S="ln -s"
 
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
-      $rm conftest*
-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl
-       pic_flag=$lt_prog_compiler_pic
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag
-        allow_undefined_flag=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-        then
-         archive_cmds_need_lc=no
-        else
-         archive_cmds_need_lc=yes
-        fi
-        allow_undefined_flag=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $rm conftest*
-      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
-echo "${ECHO_T}$archive_cmds_need_lc" >&6; }
-      ;;
-    esac
-  fi
-  ;;
-esac
 
-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if test "${lt_cv_objdir+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+  rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
 fi
-need_lib_prefix=unknown
-hardcode_into_libs=no
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
 
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
 
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
 
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
 
-aix4* | aix5*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[01] | aix4.[01].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-          echo ' yes '
-          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
-       :
-      else
-       can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
 
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  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'
-  ;;
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
 
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
 
-bsdi[45]*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
 
-cygwin* | mingw* | pw32*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $rm \$dlpath'
-    shlibpath_overrides_runpath=yes
 
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-      ;;
-    mingw*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    ;;
 
-  *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
 
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
-  else
-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
-  fi
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
 
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
 
-kfreebsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[123]*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
-  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  freebsd*) # from 4.6 on
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
 
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
 
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-   hppa*64*)
-     shrext_cmds='.sl'
-     hardcode_into_libs=yes
-     dynamic_linker="$host_os dld.sl"
-     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-     soname_spec='${libname}${release}${shared_ext}$major'
-     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-     ;;
-   *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
 
-interix3*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
 
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
-       else
-               version_type=irix
-       fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
 
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
 
-# This must be Linux ELF.
-linux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
 
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
   fi
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
   ;;
+esac
 
-knetbsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
 
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
 
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
-nto-qnx*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
 
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-       shlibpath_overrides_runpath=no
-       ;;
-      *)
-       shlibpath_overrides_runpath=yes
-       ;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
 
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
+# Global variables:
+ofile=libtool
+can_build_shared=yes
 
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
 
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
+with_gnu_ld="$lt_cv_prog_gnu_ld"
 
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
 
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
   esac
-  ;;
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
 
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-    shlibpath_overrides_runpath=no
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    shlibpath_overrides_runpath=yes
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-       ;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
   ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+       case $deplibs_check_method in
+       "file_magic "*)
+         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+           $EGREP "$file_magic_regex" > /dev/null; then
+           :
+         else
+           cat <<_LT_EOF 1>&2
 
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
 
-*)
-  dynamic_linker=no
+_LT_EOF
+         fi ;;
+       esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
   ;;
 esac
-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
+fi
 
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" || \
-   test -n "$runpath_var" || \
-   test "X$hardcode_automatic" = "Xyes" ; then
 
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
-     test "$hardcode_minus_L" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action=immediate
-  fi
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action=unsupported
-fi
-{ echo "$as_me:$LINENO: result: $hardcode_action" >&5
-echo "${ECHO_T}$hardcode_action" >&6; }
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+       case $deplibs_check_method in
+       "file_magic "*)
+         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+           $EGREP "$file_magic_regex" > /dev/null; then
+           :
+         else
+           cat <<_LT_EOF 1>&2
 
-if test "$hardcode_action" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+         fi ;;
+       esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
 fi
 
-striplib=
-old_striplib=
-{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
 else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-   darwin*)
-       if test -n "$STRIP" ; then
-         striplib="$STRIP -x"
-         { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-       ;;
-   *)
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-    ;;
-  esac
+
+
+  else
+    MAGIC_CMD=:
+  fi
 fi
 
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
+  fi
+  ;;
+esac
 
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
+# Use C for the default configuration in the libtool script
 
-  mingw* | pw32*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-   ;;
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-  cygwin*)
-    lt_cv_dlopen="dlopen"
-    lt_cv_dlopen_libs=
-   ;;
 
-  darwin*)
-  # if libdl is installed we need to link against it
-    { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+# Source file extension for C test sources.
+ac_ext=c
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_dl_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
 
-       ac_cv_lib_dl_dlopen=no
-fi
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
-if test $ac_cv_lib_dl_dlopen = yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
 
-    lt_cv_dlopen="dyld"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
 
-fi
 
-   ;;
 
-  *)
-    { echo "$as_me:$LINENO: checking for shl_load" >&5
-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; }
-if test "${ac_cv_func_shl_load+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define shl_load innocuous_shl_load
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char shl_load (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef shl_load
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_shl_load || defined __stub___shl_load
-choke me
-#endif
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
-int
-main ()
-{
-return shl_load ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_func_shl_load=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# Allow CC to be a program name with arguments.
+compiler=$CC
 
-       ac_cv_func_shl_load=no
-fi
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
-echo "${ECHO_T}$ac_cv_func_shl_load" >&6; }
-if test $ac_cv_func_shl_load = yes; then
-  lt_cv_dlopen="shl_load"
-else
-  { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load ();
-int
-main ()
-{
-return shl_load ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_dld_shl_load=yes
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  lt_cv_prog_compiler_rtti_exceptions=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:9083: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:9087: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $RM conftest*
 
-       ac_cv_lib_dld_shl_load=no
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
-if test $ac_cv_lib_dld_shl_load = yes; then
-  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
-else
-  { echo "$as_me:$LINENO: checking for dlopen" >&5
-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
-if test "${ac_cv_func_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define dlopen innocuous_dlopen
+    :
+fi
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dlopen (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+fi
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef dlopen
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_dlopen || defined __stub___dlopen
-choke me
-#endif
 
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_func_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_func_dlopen=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
-echo "${ECHO_T}$ac_cv_func_dlopen" >&6; }
-if test $ac_cv_func_dlopen = yes; then
-  lt_cv_dlopen="dlopen"
-else
-  { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_dl_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_dl_dlopen=no
-fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
-if test $ac_cv_lib_dl_dlopen = yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-  { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
-echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; }
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_svld_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
 
-       ac_cv_lib_svld_dlopen=no
-fi
+    amigaos*)
+      if test "$host_cpu" = m68k; then
+        # FIXME: we need at least 68020 code to build shared libraries, but
+        # adding the `-m68020' flag to GCC prevents building anything better,
+        # like `-m68040'.
+        lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+      fi
+      ;;
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; }
-if test $ac_cv_lib_svld_dlopen = yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
-else
-  { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
-echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; }
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dld_link ();
-int
-main ()
-{
-return dld_link ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_dld_dld_link=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
 
-       ac_cv_lib_dld_dld_link=no
-fi
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; }
-if test $ac_cv_lib_dld_dld_link = yes; then
-  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
-fi
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+       # +Z the default
+       ;;
+      *)
+       lt_prog_compiler_pic='-fPIC'
+       ;;
+      esac
+      ;;
 
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
 
-fi
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
 
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
 
-fi
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
 
+    *)
+      lt_prog_compiler_pic='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl='-Wl,'
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static='-Bstatic'
+      else
+       lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
 
-fi
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
 
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+       # +Z the default
+       ;;
+      *)
+       lt_prog_compiler_pic='+Z'
+       ;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
 
-fi
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
 
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      icc* | ecc* | ifort*)
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-KPIC'
+       lt_prog_compiler_static='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+       # which looks to be a dead project)
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-fpic'
+       lt_prog_compiler_static='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      xl*)
+       # IBM XL C 8.0/Fortran 10.1 on PPC
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-qpic'
+       lt_prog_compiler_static='-qstaticlink'
+       ;;
+      *)
+       case `$CC -V 2>&1 | sed 5q` in
+       *Sun\ C*)
+         # Sun C 5.9
+         lt_prog_compiler_pic='-KPIC'
+         lt_prog_compiler_static='-Bstatic'
+         lt_prog_compiler_wl='-Wl,'
+         ;;
+       *Sun\ F*)
+         # Sun Fortran 8.3 passes all unrecognized flags to the linker
+         lt_prog_compiler_pic='-KPIC'
+         lt_prog_compiler_static='-Bstatic'
+         lt_prog_compiler_wl=''
+         ;;
+       esac
+       ;;
+      esac
+      ;;
 
-fi
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
-    ;;
-  esac
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
 
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
-    enable_dlopen=no
-  fi
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
 
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+    rdos*)
+      lt_prog_compiler_static='-non_shared'
+      ;;
 
-    save_LDFLAGS="$LDFLAGS"
-    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+    solaris*)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+       lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+       lt_prog_compiler_wl='-Wl,';;
+      esac
+      ;;
 
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-    { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
-echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; }
-if test "${lt_cv_dlopen_self+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-         if test "$cross_compiling" = yes; then :
-  lt_cv_dlopen_self=cross
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
-#line 11825 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL          RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL                DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL                0
-#  endif
-#endif
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW         DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW       RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW     DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW     0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+       lt_prog_compiler_pic='-Kconform_pic'
+       lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
 
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
 
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
-    exit (status);
-}
-EOF
-  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&5 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
     esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self=no
   fi
-fi
-rm -fr conftest*
-
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self" >&6; }
 
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
-      { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
-echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; }
-if test "${lt_cv_dlopen_self_static+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-         if test "$cross_compiling" = yes; then :
-  lt_cv_dlopen_self_static=cross
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
-#line 11925 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+    ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
+$as_echo "$lt_prog_compiler_pic" >&6; }
 
-#include <stdio.h>
 
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL          RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL                DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL                0
-#  endif
-#endif
 
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW         DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW       RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW     DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW     0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
 
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
 
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
 
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:9401: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:9405: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works=yes
+     fi
+   fi
+   $RM conftest*
 
-    exit (status);
-}
-EOF
-  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&5 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
-    esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self_static=no
-  fi
 fi
-rm -fr conftest*
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
 
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
+else
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
 fi
-{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; }
-    fi
-
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
-
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
 
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
 fi
 
 
-# Report which library types will actually be built
-{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6; }
 
-{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
-test "$can_build_shared" = "no" && enable_shared=no
 
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
 
-aix4* | aix5*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-    ;;
-esac
-{ echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6; }
-
-{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-{ echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6; }
-
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    compiler \
-    CC \
-    LD \
-    lt_prog_compiler_wl \
-    lt_prog_compiler_pic \
-    lt_prog_compiler_static \
-    lt_prog_compiler_no_builtin_flag \
-    export_dynamic_flag_spec \
-    thread_safe_flag_spec \
-    whole_archive_flag_spec \
-    enable_shared_with_static_runtimes \
-    old_archive_cmds \
-    old_archive_from_new_cmds \
-    predep_objects \
-    postdep_objects \
-    predeps \
-    postdeps \
-    compiler_lib_search_path \
-    archive_cmds \
-    archive_expsym_cmds \
-    postinstall_cmds \
-    postuninstall_cmds \
-    old_archive_from_expsyms_cmds \
-    allow_undefined_flag \
-    no_undefined_flag \
-    export_symbols_cmds \
-    hardcode_libdir_flag_spec \
-    hardcode_libdir_flag_spec_ld \
-    hardcode_libdir_separator \
-    hardcode_automatic \
-    module_cmds \
-    module_expsym_cmds \
-    lt_cv_prog_compiler_c_o \
-    exclude_expsyms \
-    include_expsyms; do
-
-    case $var in
-    old_archive_cmds | \
-    old_archive_from_new_cmds | \
-    archive_cmds | \
-    archive_expsym_cmds | \
-    module_cmds | \
-    module_expsym_cmds | \
-    old_archive_from_expsyms_cmds | \
-    export_symbols_cmds | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
-
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
-
-cfgfile="${ofile}T"
-  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
-  $rm -f "$cfgfile"
-  { echo "$as_me:$LINENO: creating $ofile" >&5
-echo "$as_me: creating $ofile" >&6;}
 
-  cat <<__EOF__ >> "$cfgfile"
-#! $SHELL
-
-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
 #
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Check to make sure the static flag actually works.
 #
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
 
-# A sed program that does not truncate output.
-SED=$lt_SED
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
 
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="$SED -e 1s/^X//"
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
 
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
-# The names of the tagged configurations supported by this script.
-available_tags=
 
-# ### BEGIN LIBTOOL CONFIG
 
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
 
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
 
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:9506: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:9510: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
 
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
 
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
 
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
 
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
 
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
 
-# A C compiler.
-LTCC=$lt_LTCC
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:9561: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:9565: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
 
-# A language-specific compiler.
-CC=$lt_compiler
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC
 
-# An ERE matcher.
-EGREP=$lt_EGREP
 
-# The linker used to build libraries.
-LD=$lt_LD
 
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
 
-# A BSD-compatible nm program.
-NM=$lt_NM
 
-# A symbol stripping program
-STRIP=$lt_STRIP
 
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
 
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
 
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
 
-# Used on cygwin: assembler.
-AS="$AS"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
+  runpath_var=
+  allow_undefined_flag=
+  always_export_symbols=no
+  archive_cmds=
+  archive_expsym_cmds=
+  compiler_needs_object=no
+  enable_shared_with_static_runtimes=no
+  export_dynamic_flag_spec=
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  hardcode_automatic=no
+  hardcode_direct=no
+  hardcode_direct_absolute=no
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_flag_spec_ld=
+  hardcode_libdir_separator=
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  inherit_rpath=no
+  link_all_deplibs=unknown
+  module_cmds=
+  module_expsym_cmds=
+  old_archive_from_new_cmds=
+  old_archive_from_expsyms_cmds=
+  thread_safe_flag_spec=
+  whole_archive_flag_spec=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+  extract_expsyms_cmds=
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl
+  ld_shlibs=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
 
-# Object file suffix (normally "o").
-objext="$ac_objext"
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
 
-# Old archive suffix (normally "a").
-libext="$libext"
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+       ld_shlibs=no
+       cat <<_LT_EOF 1>&2
 
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
 
-# Executable file suffix (normally "").
-exeext="$exeext"
+_LT_EOF
+      fi
+      ;;
 
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
+    amigaos*)
+      if test "$host_cpu" = m68k; then
+        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)'
+        hardcode_libdir_flag_spec='-L$libdir'
+        hardcode_minus_L=yes
+      fi
 
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs=no
+      ;;
 
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+       allow_undefined_flag=unsupported
+       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+       # support --undefined.  This deserves some investigation.  FIXME
+       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
 
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
+    cygwin* | mingw* | pw32*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      allow_undefined_flag=unsupported
+      always_export_symbols=no
+      enable_shared_with_static_runtimes=yes
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
 
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+       # If the export-symbols file already is a .def file (1st line
+       # is EXPORTS), use it as is; otherwise, prepend...
+       archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+         cp $export_symbols $output_objdir/$soname.def;
+       else
+         echo EXPORTS > $output_objdir/$soname.def;
+         cat $export_symbols >> $output_objdir/$soname.def;
+       fi~
+       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
 
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
 
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+    gnu* | linux* | tpf* | k*bsd*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+       case $cc_basename in
+         diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
+       esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+        && test "$tmp_diet" = no
+      then
+       tmp_addflag=
+       tmp_sharedflag='-shared'
+       case $cc_basename,$host_cpu in
+        pgcc*)                         # Portland Group C compiler
+         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag'
+         ;;
+       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
+         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag -Mnomain' ;;
+       ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
+         tmp_addflag=' -i_dynamic' ;;
+       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
+         tmp_addflag=' -i_dynamic -nofor_main' ;;
+       ifc* | ifort*)                  # Intel Fortran compiler
+         tmp_addflag=' -nofor_main' ;;
+       xl[cC]*)                        # IBM XL C 8.0 on PPC (deal with xlf below)
+         tmp_sharedflag='-qmkshrobj'
+         tmp_addflag= ;;
+       esac
+       case `$CC -V 2>&1 | sed 5q` in
+       *Sun\ C*)                       # Sun C 5.9
+         whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+         compiler_needs_object=yes
+         tmp_sharedflag='-G' ;;
+       *Sun\ F*)                       # Sun Fortran 8.3
+         tmp_sharedflag='-G' ;;
+       esac
+       archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec
+        if test "x$supports_anon_versioning" = xyes; then
+          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+           cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+           echo "local: *; };" >> $output_objdir/$libname.ver~
+           $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
 
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec
+       case $cc_basename in
+       xlf*)
+         # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+         whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+         hardcode_libdir_flag_spec=
+         hardcode_libdir_flag_spec_ld='-rpath $libdir'
+         archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+         if test "x$supports_anon_versioning" = xyes; then
+           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+             echo "local: *; };" >> $output_objdir/$libname.ver~
+             $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+         fi
+         ;;
+       esac
+      else
+        ld_shlibs=no
+      fi
+      ;;
 
-# Library versioning type.
-version_type=$version_type
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+       wlarc=
+      else
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
 
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+       ld_shlibs=no
+       cat <<_LT_EOF 1>&2
 
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
 
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
 
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+       ld_shlibs=no
+       cat <<_LT_EOF 1>&2
 
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
 
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+_LT_EOF
+       ;;
+       *)
+         # For security reasons, it is highly recommended that you always
+         # use absolute paths for naming shared libraries, and exclude the
+         # DT_RUNPATH tag from executables and libraries.  But doing so
+         # requires that you compile everything twice, which is a pain.
+         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+           hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+           archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+           archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+         else
+           ld_shlibs=no
+         fi
+       ;;
+      esac
+      ;;
 
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
 
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds
-module_expsym_cmds=$lt_module_expsym_cmds
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
+    esac
 
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
+    if test "$ld_shlibs" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      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'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+       # Neither direct hardcoding nor static linking is supported with a
+       # broken collect2.
+       hardcode_direct=unsupported
+      fi
+      ;;
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_predep_objects
+    aix[4-9]*)
+      if test "$host_cpu" = ia64; then
+       # On IA64, the linker does run time linking by default, so we don't
+       # have to do anything special.
+       aix_use_runtimelinking=no
+       exp_sym_flag='-Bexport'
+       no_entry_flag=""
+      else
+       # If we're using GNU nm, then we don't want the "-C" option.
+       # -C means demangle to AIX nm, but means don't demangle with GNU nm
+       if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+         export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+       else
+         export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+       fi
+       aix_use_runtimelinking=no
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects
+       # Test if we are trying to use run time linking or normal
+       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+       # need to do runtime linking.
+       case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+         for ld_flag in $LDFLAGS; do
+         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+           aix_use_runtimelinking=yes
+           break
+         fi
+         done
+         ;;
+       esac
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps
+       exp_sym_flag='-bexport'
+       no_entry_flag='-bnoentry'
+      fi
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_direct_absolute=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      file_list_spec='${wl}-f,'
 
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
+      if test "$GCC" = yes; then
+       case $host_os in aix4.[012]|aix4.[012].*)
+       # We only want to do this on AIX 4.2 and lower, the check
+       # below for broken collect2 doesn't work under 4.3+
+         collect2name=`${CC} -print-prog-name=collect2`
+         if test -f "$collect2name" &&
+          strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+         then
+         # We have reworked collect2
+         :
+         else
+         # We have old collect2
+         hardcode_direct=unsupported
+         # It fails to find uninstalled libraries when the uninstalled
+         # path is not listed in the libpath.  Setting hardcode_minus_L
+         # to unsupported forces relinking
+         hardcode_minus_L=yes
+         hardcode_libdir_flag_spec='-L$libdir'
+         hardcode_libdir_separator=
+         fi
+         ;;
+       esac
+       shared_flag='-shared'
+       if test "$aix_use_runtimelinking" = yes; then
+         shared_flag="$shared_flag "'${wl}-G'
+       fi
+      else
+       # not using gcc
+       if test "$host_cpu" = ia64; then
+       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+       # chokes on -Wl,-G. The following line is correct:
+         shared_flag='-G'
+       else
+         if test "$aix_use_runtimelinking" = yes; then
+           shared_flag='${wl}-G'
+         else
+           shared_flag='${wl}-bM:SRE'
+         fi
+       fi
+      fi
 
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols=yes
+      if test "$aix_use_runtimelinking" = yes; then
+       # Warning - without using the other runtime loading flags (-brtl),
+       # -berok will link without error, but may produce a broken library.
+       allow_undefined_flag='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
+int
+main ()
+{
 
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
 
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+       /^0/ {
+           s/^0  *\(.*\)$/\1/
+           p
+       }
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+       if test "$host_cpu" = ia64; then
+         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+         allow_undefined_flag="-z nodefs"
+         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+       else
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+int
+main ()
+{
 
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
 
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+       /^0/ {
+           s/^0  *\(.*\)$/\1/
+           p
+       }
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+         # Warning - without using the other run time loading flags,
+         # -berok will link without error, but may produce a broken library.
+         no_undefined_flag=' ${wl}-bernotok'
+         allow_undefined_flag=' ${wl}-berok'
+         # Exported symbols can be pulled into shared objects from archives
+         whole_archive_flag_spec='$convenience'
+         archive_cmds_need_lc=yes
+         # This is similar to how AIX traditionally builds its shared libraries.
+         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+       fi
+      fi
+      ;;
 
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
+    amigaos*)
+      if test "$host_cpu" = m68k; then
+        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)'
+        hardcode_libdir_flag_spec='-L$libdir'
+        hardcode_minus_L=yes
+      fi
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
 
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
 
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      allow_undefined_flag=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_from_new_cmds='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes=yes
+      ;;
 
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
+    darwin* | rhapsody*)
 
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+  archive_cmds_need_lc=no
+  hardcode_direct=no
+  hardcode_automatic=yes
+  hardcode_shlibpath_var=unsupported
+  whole_archive_flag_spec=''
+  link_all_deplibs=yes
+  allow_undefined_flag="$_lt_dar_allow_undefined"
+  if test "$GCC" = "yes"; then
+    output_verbose_link_cmd=echo
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator
+  else
+  ld_shlibs=no
+  fi
 
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct
+      ;;
 
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L
+    dgux*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
 
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
+    freebsd1*)
+      ld_shlibs=no
+      ;;
 
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
 
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
 
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
 
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+    hpux9*)
+      if test "$GCC" = yes; then
+       archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+       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'
+      fi
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
 
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
+      ;;
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path"
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+       hardcode_libdir_flag_spec_ld='+b $libdir'
+       hardcode_libdir_separator=:
+       hardcode_direct=yes
+       hardcode_direct_absolute=yes
+       export_dynamic_flag_spec='${wl}-E'
+       # hardcode_minus_L: Not really in the search PATH,
+       # but as the default location of the library.
+       hardcode_minus_L=yes
+      fi
+      ;;
 
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       case $host_cpu in
+       hppa*64*)
+         archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      else
+       case $host_cpu in
+       hppa*64*)
+         archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      fi
+      if test "$with_gnu_ld" = no; then
+       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+       hardcode_libdir_separator=:
 
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds
+       case $host_cpu in
+       hppa*64*|ia64*)
+         hardcode_direct=no
+         hardcode_shlibpath_var=no
+         ;;
+       *)
+         hardcode_direct=yes
+         hardcode_direct_absolute=yes
+         export_dynamic_flag_spec='${wl}-E'
 
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
+         hardcode_minus_L=yes
+         ;;
+       esac
+      fi
+      ;;
 
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms
-
-# ### END LIBTOOL CONFIG
-
-__EOF__
-
-
-  case $host_os in
-  aix3*)
-    cat <<\EOF >> "$cfgfile"
-
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-EOF
-    ;;
-  esac
-
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" || \
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       # Try to use the -exported_symbol ld option, if it does not
+       # work, assume that -exports_file does not work either and
+       # implicitly export all symbols.
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int foo(void) {}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
 
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
-  fi
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        LDFLAGS="$save_LDFLAGS"
+      else
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      inherit_rpath=yes
+      link_all_deplibs=yes
+      ;;
 
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
 
+    *nto* | *qnx*)
+      ;;
 
-# Check whether --with-tags was given.
-if test "${with_tags+set}" = set; then
-  withval=$with_tags; tagnames="$withval"
-fi
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+       hardcode_direct=yes
+       hardcode_shlibpath_var=no
+       hardcode_direct_absolute=yes
+       if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+         export_dynamic_flag_spec='${wl}-E'
+       else
+         case $host_os in
+          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+            hardcode_libdir_flag_spec='-R$libdir'
+            ;;
+          *)
+            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+            ;;
+         esac
+       fi
+      else
+       ld_shlibs=no
+      fi
+      ;;
 
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      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'
+      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
 
-if test -f "$ltmain" && test -n "$tagnames"; then
-  if test ! -f "${ofile}"; then
-    { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
-echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
-  fi
+    osf3*)
+      if test "$GCC" = yes; then
+       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       allow_undefined_flag=' -expect_unresolved \*'
+       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
 
-  if test -z "$LTCC"; then
-    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
-    if test -z "$LTCC"; then
-      { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
-echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
-    else
-      { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
-echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
-    fi
-  fi
-  if test -z "$LTCFLAGS"; then
-    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
-  fi
+    osf4* | osf5*)     # as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+       allow_undefined_flag=' -expect_unresolved \*'
+       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
-  # Extract list of available tagged configurations in $ofile.
-  # Note that this assumes the entire list is on one line.
-  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+       # Both c and cxx compiler support -rpath directly
+       hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_separator=:
+      ;;
 
-  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-  for tagname in $tagnames; do
-    IFS="$lt_save_ifs"
-    # Check whether tagname contains only valid characters
-    case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
-    "") ;;
-    *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
-echo "$as_me: error: invalid tag name: $tagname" >&2;}
-   { (exit 1); exit 1; }; }
+    solaris*)
+      no_undefined_flag=' -z defs'
+      if test "$GCC" = yes; then
+       wlarc='${wl}'
+       archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+         $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+      else
+       case `$CC -V 2>&1` in
+       *"Compilers 5.0"*)
+         wlarc=''
+         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+         ;;
+       *)
+         wlarc='${wl}'
+         archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+         $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+         ;;
+       esac
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+       # The compiler driver will combine and reorder linker options,
+       # but understands `-z linker_flag'.  GCC discards it without `$wl',
+       # but is careful enough not to reorder.
+       # Supported since Solaris 2.6 (maybe 2.5.1?)
+       if test "$GCC" = yes; then
+         whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+       else
+         whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+       fi
        ;;
-    esac
-
-    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
-    then
-      { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
-echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-
-    # Update the list of available tags.
-    if test -n "$tagname"; then
-      echo appending configuration tag \"$tagname\" to $ofile
+      esac
+      link_all_deplibs=yes
+      ;;
 
-      case $tagname in
-      CXX)
-       if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-           ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-           (test "X$CXX" != "Xg++"))) ; then
-         ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+       # Use $CC to link under sequent, because it throws in some extra .o
+       # files that make .init and .fini sections work.
+       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
 
+    sysv4)
+      case $host_vendor in
+       sni)
+         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct=yes # is this really true???
+       ;;
+       siemens)
+         ## LD is ld it makes a PLAMLIB
+         ## CC just makes a GrossModule.
+         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+         reload_cmds='$CC -r -o $output$reload_objs'
+         hardcode_direct=no
+        ;;
+       motorola)
+         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+       ;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
 
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
 
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       hardcode_shlibpath_var=no
+       runpath_var=LD_RUN_PATH
+       hardcode_runpath_var=yes
+       ld_shlibs=yes
+      fi
+      ;;
 
-archive_cmds_need_lc_CXX=no
-allow_undefined_flag_CXX=
-always_export_symbols_CXX=no
-archive_expsym_cmds_CXX=
-export_dynamic_flag_spec_CXX=
-hardcode_direct_CXX=no
-hardcode_libdir_flag_spec_CXX=
-hardcode_libdir_flag_spec_ld_CXX=
-hardcode_libdir_separator_CXX=
-hardcode_minus_L_CXX=no
-hardcode_shlibpath_var_CXX=unsupported
-hardcode_automatic_CXX=no
-module_cmds_CXX=
-module_expsym_cmds_CXX=
-link_all_deplibs_CXX=unknown
-old_archive_cmds_CXX=$old_archive_cmds
-no_undefined_flag_CXX=
-whole_archive_flag_spec_CXX=
-enable_shared_with_static_runtimes_CXX=no
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
 
-# Dependencies to place before and after the object being linked:
-predep_objects_CXX=
-postdep_objects_CXX=
-predeps_CXX=
-postdeps_CXX=
-compiler_lib_search_path_CXX=
+      if test "$GCC" = yes; then
+       archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
 
-# Source file extension for C++ test sources.
-ac_ext=cpp
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-R,$libdir'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+       archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+       export_dynamic_flag_spec='${wl}-Blargedynsym'
+       ;;
+      esac
+    fi
+  fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
 
-# Object file extension for compiled C++ test sources.
-objext=o
-objext_CXX=$objext
 
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
 
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
-
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
-
-
-# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
-lt_save_LD=$LD
-lt_save_GCC=$GCC
-GCC=$GXX
-lt_save_with_gnu_ld=$with_gnu_ld
-lt_save_path_LD=$lt_cv_path_LD
-if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
-  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
-else
-  $as_unset lt_cv_prog_gnu_ld
-fi
-if test -n "${lt_cv_path_LDCXX+set}"; then
-  lt_cv_path_LD=$lt_cv_path_LDCXX
-else
-  $as_unset lt_cv_path_LD
-fi
-test -z "${LDCXX+set}" || LD=$LDCXX
-CC=${CXX-"c++"}
-compiler=$CC
-compiler_CXX=$CC
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
-# We don't want -fno-exception wen compiling C++ code, so set the
-# no_builtin_flag separately
-if test "$GXX" = yes; then
-  lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
-else
-  lt_prog_compiler_no_builtin_flag_CXX=
-fi
-
-if test "$GXX" = yes; then
-  # Set up default GNU C++ configuration
-
-
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
-  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
-  with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [\\/]* | ?:[\\/]*)
-      re_direlt='/[^/][^/]*/\.\./'
-      # Canonicalize the pathname of ld
-      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-       ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  { echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
-else
-  { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
-fi
-if test "${lt_cv_path_LD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some variants of GNU ld only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
-      *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break
-       ;;
-      *)
-       test "$with_gnu_ld" != yes && break
-       ;;
-      esac
-    fi
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  { echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
-{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  lt_cv_prog_gnu_ld=yes
-  ;;
-*)
-  lt_cv_prog_gnu_ld=no
-  ;;
-esac
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-
-  # Check if GNU C++ uses GNU ld as the underlying linker, since the
-  # archiving commands below assume that GNU ld is being used.
-  if test "$with_gnu_ld" = yes; then
-    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-    archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
-    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
-    #     investigate it a little bit more. (MM)
-    wlarc='${wl}'
-
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
-       grep 'no-whole-archive' > /dev/null; then
-      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      whole_archive_flag_spec_CXX=
-    fi
-  else
-    with_gnu_ld=no
-    wlarc=
-
-    # A generic and very simple default shared library creation
-    # command for GNU C++ for the case where it uses the native
-    # linker, instead of GNU ld.  If possible, this setting should
-    # overridden to take advantage of the native linker features on
-    # the platform it is being used on.
-    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-  fi
-
-  # Commands to make compiler produce verbose output that lists
-  # what "hidden" libraries, object files and flags are used when
-  # linking a shared library.
-  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-else
-  GXX=no
-  with_gnu_ld=no
-  wlarc=
-fi
-
-# PORTME: fill in a description of your system's C++ link characteristics
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
-ld_shlibs_CXX=yes
-case $host_os in
-  aix3*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  aix4* | aix5*)
-    if test "$host_cpu" = ia64; then
-      # On IA64, the linker does run time linking by default, so we don't
-      # have to do anything special.
-      aix_use_runtimelinking=no
-      exp_sym_flag='-Bexport'
-      no_entry_flag=""
-    else
-      aix_use_runtimelinking=no
-
-      # Test if we are trying to use run time linking or normal
-      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-      # need to do runtime linking.
-      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
-       for ld_flag in $LDFLAGS; do
-         case $ld_flag in
-         *-brtl*)
-           aix_use_runtimelinking=yes
-           break
-           ;;
-         esac
-       done
-       ;;
-      esac
-
-      exp_sym_flag='-bexport'
-      no_entry_flag='-bnoentry'
-    fi
-
-    # When large executables or shared objects are built, AIX ld can
-    # have problems creating the table of contents.  If linking a library
-    # or program results in "error TOC overflow" add -mminimal-toc to
-    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-    archive_cmds_CXX=''
-    hardcode_direct_CXX=yes
-    hardcode_libdir_separator_CXX=':'
-    link_all_deplibs_CXX=yes
-
-    if test "$GXX" = yes; then
-      case $host_os in aix4.[012]|aix4.[012].*)
-      # We only want to do this on AIX 4.2 and lower, the check
-      # below for broken collect2 doesn't work under 4.3+
-       collect2name=`${CC} -print-prog-name=collect2`
-       if test -f "$collect2name" && \
-          strings "$collect2name" | grep resolve_lib_name >/dev/null
-       then
-         # We have reworked collect2
-         hardcode_direct_CXX=yes
-       else
-         # We have old collect2
-         hardcode_direct_CXX=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         hardcode_minus_L_CXX=yes
-         hardcode_libdir_flag_spec_CXX='-L$libdir'
-         hardcode_libdir_separator_CXX=
-       fi
-       ;;
-      esac
-      shared_flag='-shared'
-      if test "$aix_use_runtimelinking" = yes; then
-       shared_flag="$shared_flag "'${wl}-G'
-      fi
-    else
-      # not using gcc
-      if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-       shared_flag='-G'
-      else
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag='${wl}-G'
-       else
-         shared_flag='${wl}-bM:SRE'
-       fi
-      fi
-    fi
-
-    # It seems that -bexpall does not export symbols beginning with
-    # underscore (_), so it is better to generate a list of symbols to export.
-    always_export_symbols_CXX=yes
-    if test "$aix_use_runtimelinking" = yes; then
-      # Warning - without using the other runtime loading flags (-brtl),
-      # -berok will link without error, but may produce a broken library.
-      allow_undefined_flag_CXX='-berok'
-      # Determine the default libpath from the value encoded in an empty executable.
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_cxx_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
-      hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
-
-      archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-     else
-      if test "$host_cpu" = ia64; then
-       hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
-       allow_undefined_flag_CXX="-z nodefs"
-       archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-      else
-       # Determine the default libpath from the value encoded in an empty executable.
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_cxx_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
-       hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
-       # Warning - without using the other run time loading flags,
-       # -berok will link without error, but may produce a broken library.
-       no_undefined_flag_CXX=' ${wl}-bernotok'
-       allow_undefined_flag_CXX=' ${wl}-berok'
-       # Exported symbols can be pulled into shared objects from archives
-       whole_archive_flag_spec_CXX='$convenience'
-       archive_cmds_need_lc_CXX=yes
-       # This is similar to how AIX traditionally builds its shared libraries.
-       archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-      fi
-    fi
-    ;;
-
-  beos*)
-    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-      allow_undefined_flag_CXX=unsupported
-      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-      # support --undefined.  This deserves some investigation.  FIXME
-      archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-    else
-      ld_shlibs_CXX=no
-    fi
-    ;;
-
-  chorus*)
-    case $cc_basename in
-      *)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-    esac
-    ;;
-
-  cygwin* | mingw* | pw32*)
-    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
-    # as there is no search path for DLLs.
-    hardcode_libdir_flag_spec_CXX='-L$libdir'
-    allow_undefined_flag_CXX=unsupported
-    always_export_symbols_CXX=no
-    enable_shared_with_static_runtimes_CXX=yes
-
-    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-      archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      # If the export-symbols file already is a .def file (1st line
-      # is EXPORTS), use it as is; otherwise, prepend...
-      archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-       cp $export_symbols $output_objdir/$soname.def;
-      else
-       echo EXPORTS > $output_objdir/$soname.def;
-       cat $export_symbols >> $output_objdir/$soname.def;
-      fi~
-      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-    else
-      ld_shlibs_CXX=no
-    fi
-  ;;
-      darwin* | rhapsody*)
-        case $host_os in
-        rhapsody* | darwin1.[012])
-         allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[012])
-               allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-        esac
-      archive_cmds_need_lc_CXX=no
-      hardcode_direct_CXX=no
-      hardcode_automatic_CXX=yes
-      hardcode_shlibpath_var_CXX=unsupported
-      whole_archive_flag_spec_CXX=''
-      link_all_deplibs_CXX=yes
-
-    if test "$GXX" = yes ; then
-      lt_int_apple_cc_single_mod=no
-      output_verbose_link_cmd='echo'
-      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
-       lt_int_apple_cc_single_mod=yes
-      fi
-      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      else
-          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-        fi
-        module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          else
-            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          fi
-            module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-          module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         ld_shlibs_CXX=no
-          ;;
-      esac
-      fi
-        ;;
-
-  dgux*)
-    case $cc_basename in
-      ec++*)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      ghcx*)
-       # Green Hills C++ Compiler
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      *)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-    esac
-    ;;
-  freebsd[12]*)
-    # C++ shared libraries reported to be fairly broken before switch to ELF
-    ld_shlibs_CXX=no
-    ;;
-  freebsd-elf*)
-    archive_cmds_need_lc_CXX=no
-    ;;
-  freebsd* | kfreebsd*-gnu | dragonfly*)
-    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-    # conventions
-    ld_shlibs_CXX=yes
-    ;;
-  gnu*)
-    ;;
-  hpux9*)
-    hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
-    hardcode_libdir_separator_CXX=:
-    export_dynamic_flag_spec_CXX='${wl}-E'
-    hardcode_direct_CXX=yes
-    hardcode_minus_L_CXX=yes # Not in the search PATH,
-                               # but as the default
-                               # location of the library.
-
-    case $cc_basename in
-    CC*)
-      # FIXME: insert proper C++ library support
-      ld_shlibs_CXX=no
-      ;;
-    aCC*)
-      archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      # Commands to make compiler produce verbose output that lists
-      # what "hidden" libraries, object files and flags are used when
-      # linking a shared library.
-      #
-      # There doesn't appear to be a way to prevent this compiler from
-      # explicitly linking system object files so we need to strip them
-      # from the output so that they don't get included in the library
-      # dependencies.
-      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-      ;;
-    *)
-      if test "$GXX" = yes; then
-        archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-        # FIXME: insert proper C++ library support
-        ld_shlibs_CXX=no
-      fi
-      ;;
-    esac
-    ;;
-  hpux10*|hpux11*)
-    if test $with_gnu_ld = no; then
-      hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator_CXX=:
-
-      case $host_cpu in
-      hppa*64*|ia64*)
-       hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
-        ;;
-      *)
-       export_dynamic_flag_spec_CXX='${wl}-E'
-        ;;
-      esac
-    fi
-    case $host_cpu in
-    hppa*64*|ia64*)
-      hardcode_direct_CXX=no
-      hardcode_shlibpath_var_CXX=no
-      ;;
-    *)
-      hardcode_direct_CXX=yes
-      hardcode_minus_L_CXX=yes # Not in the search PATH,
-                                             # but as the default
-                                             # location of the library.
-      ;;
-    esac
-
-    case $cc_basename in
-      CC*)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      aCC*)
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-         ;;
-       *)
-         archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-         ;;
-       esac
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-      *)
-       if test "$GXX" = yes; then
-         if test $with_gnu_ld = no; then
-           case $host_cpu in
-           hppa*64*)
-             archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             ;;
-           ia64*)
-             archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             ;;
-           *)
-             archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             ;;
-           esac
-         fi
-       else
-         # FIXME: insert proper C++ library support
-         ld_shlibs_CXX=no
-       fi
-       ;;
-    esac
-    ;;
-  interix3*)
-    hardcode_direct_CXX=no
-    hardcode_shlibpath_var_CXX=no
-    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-    export_dynamic_flag_spec_CXX='${wl}-E'
-    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-    # Instead, shared libraries are loaded at an image base (0x10000000 by
-    # default) and relocated if they conflict, which is a slow very memory
-    # consuming and fragmenting process.  To avoid this, we pick a random,
-    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-    archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-    archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-    ;;
-  irix5* | irix6*)
-    case $cc_basename in
-      CC*)
-       # SGI C++
-       archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
-       # Archives containing C++ object files must be created using
-       # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
-       # necessary to make sure instantiated templates are included
-       # in the archive.
-       old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
-       ;;
-      *)
-       if test "$GXX" = yes; then
-         if test "$with_gnu_ld" = no; then
-           archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $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'
-         else
-           archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
-         fi
-       fi
-       link_all_deplibs_CXX=yes
-       ;;
-    esac
-    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-    hardcode_libdir_separator_CXX=:
-    ;;
-  linux*)
-    case $cc_basename in
-      KCC*)
-       # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-       # KCC will only create a shared library if the output file
-       # ends with ".so" (or ".sl" for HP-UX), so rename the library
-       # to its proper name (with version) after linking.
-       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-       archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
-       hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
-       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-
-       # Archives containing C++ object files must be created using
-       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
-       old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
-       ;;
-      icpc*)
-       # Intel C++
-       with_gnu_ld=yes
-       # version 8.0 and above of icpc choke on multiply defined symbols
-       # if we add $predep_objects and $postdep_objects, however 7.1 and
-       # earlier do not add the objects themselves.
-       case `$CC -V 2>&1` in
-       *"Version 7."*)
-         archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-         archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-         ;;
-       *)  # Version 8.0 or newer
-         tmp_idyn=
-         case $host_cpu in
-           ia64*) tmp_idyn=' -i_dynamic';;
-         esac
-         archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-         archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-         ;;
-       esac
-       archive_cmds_need_lc_CXX=no
-       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-       whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-       ;;
-      pgCC*)
-        # Portland Group C++ compiler
-       archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-       archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-
-       hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
-       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-       whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-        ;;
-      cxx*)
-       # Compaq C++
-       archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
-       runpath_var=LD_RUN_PATH
-       hardcode_libdir_flag_spec_CXX='-rpath $libdir'
-       hardcode_libdir_separator_CXX=:
-
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-    esac
-    ;;
-  lynxos*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  m88k*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  mvs*)
-    case $cc_basename in
-      cxx*)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      *)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-    esac
-    ;;
-  netbsd*)
-    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-      archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
-      wlarc=
-      hardcode_libdir_flag_spec_CXX='-R$libdir'
-      hardcode_direct_CXX=yes
-      hardcode_shlibpath_var_CXX=no
-    fi
-    # Workaround some broken pre-1.5 toolchains
-    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
-    ;;
-  openbsd2*)
-    # C++ shared libraries are fairly broken
-    ld_shlibs_CXX=no
-    ;;
-  openbsd*)
-    hardcode_direct_CXX=yes
-    hardcode_shlibpath_var_CXX=no
-    archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-      export_dynamic_flag_spec_CXX='${wl}-E'
-      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    fi
-    output_verbose_link_cmd='echo'
-    ;;
-  osf3*)
-    case $cc_basename in
-      KCC*)
-       # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-       # KCC will only create a shared library if the output file
-       # ends with ".so" (or ".sl" for HP-UX), so rename the library
-       # to its proper name (with version) after linking.
-       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
-       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-       hardcode_libdir_separator_CXX=:
-
-       # Archives containing C++ object files must be created using
-       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
-       old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
-
-       ;;
-      RCC*)
-       # Rational C++ 2.4.1
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      cxx*)
-       allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
-       hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-       hardcode_libdir_separator_CXX=:
-
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-      *)
-       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-         allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-         archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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'
-
-         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-         hardcode_libdir_separator_CXX=:
-
-         # Commands to make compiler produce verbose output that lists
-         # what "hidden" libraries, object files and flags are used when
-         # linking a shared library.
-         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-       else
-         # FIXME: insert proper C++ library support
-         ld_shlibs_CXX=no
-       fi
-       ;;
-    esac
-    ;;
-  osf4* | osf5*)
-    case $cc_basename in
-      KCC*)
-       # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-       # KCC will only create a shared library if the output file
-       # ends with ".so" (or ".sl" for HP-UX), so rename the library
-       # to its proper name (with version) after linking.
-       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
-       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-       hardcode_libdir_separator_CXX=:
-
-       # Archives containing C++ object files must be created using
-       # the KAI C++ compiler.
-       old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
-       ;;
-      RCC*)
-       # Rational C++ 2.4.1
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      cxx*)
-       allow_undefined_flag_CXX=' -expect_unresolved \*'
-       archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-         echo "-hidden">> $lib.exp~
-         $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
-         $rm $lib.exp'
-
-       hardcode_libdir_flag_spec_CXX='-rpath $libdir'
-       hardcode_libdir_separator_CXX=:
-
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-      *)
-       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-         allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-        archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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'
-
-         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-         hardcode_libdir_separator_CXX=:
-
-         # Commands to make compiler produce verbose output that lists
-         # what "hidden" libraries, object files and flags are used when
-         # linking a shared library.
-         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-       else
-         # FIXME: insert proper C++ library support
-         ld_shlibs_CXX=no
-       fi
-       ;;
-    esac
-    ;;
-  psos*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  sunos4*)
-    case $cc_basename in
-      CC*)
-       # Sun C++ 4.x
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      lcc*)
-       # Lucid
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      *)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-    esac
-    ;;
-  solaris*)
-    case $cc_basename in
-      CC*)
-       # Sun C++ 4.2, 5.x and Centerline C++
-        archive_cmds_need_lc_CXX=yes
-       no_undefined_flag_CXX=' -zdefs'
-       archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-       archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-       $CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-       hardcode_libdir_flag_spec_CXX='-R$libdir'
-       hardcode_shlibpath_var_CXX=no
-       case $host_os in
-         solaris2.[0-5] | solaris2.[0-5].*) ;;
-         *)
-           # The C++ compiler is used as linker so we must use $wl
-           # flag to pass the commands to the underlying system
-           # linker. We must also pass each convience library through
-           # to the system linker between allextract/defaultextract.
-           # The C++ compiler will combine linker options so we
-           # cannot just pass the convience library names through
-           # without $wl.
-           # Supported since Solaris 2.6 (maybe 2.5.1?)
-           whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
-           ;;
-       esac
-       link_all_deplibs_CXX=yes
-
-       output_verbose_link_cmd='echo'
-
-       # Archives containing C++ object files must be created using
-       # "CC -xar", where "CC" is the Sun C++ compiler.  This is
-       # necessary to make sure instantiated templates are included
-       # in the archive.
-       old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
-       ;;
-      gcx*)
-       # Green Hills C++ Compiler
-       archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
-       # The C++ compiler must be used to create the archive.
-       old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-       ;;
-      *)
-       # GNU C++ compiler with Solaris linker
-       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-         no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
-         if $CC --version | grep -v '^2\.7' > /dev/null; then
-           archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-           archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-               $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
-         else
-           # g++ 2.7 appears to require `-G' NOT `-shared' on this
-           # platform.
-           archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-           archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-               $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
-         fi
-
-         hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
-       fi
-       ;;
-    esac
-    ;;
-  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-    no_undefined_flag_CXX='${wl}-z,text'
-    archive_cmds_need_lc_CXX=no
-    hardcode_shlibpath_var_CXX=no
-    runpath_var='LD_RUN_PATH'
-
-    case $cc_basename in
-      CC*)
-       archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       ;;
-      *)
-       archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       ;;
-    esac
-    ;;
-  sysv5* | sco3.2v5* | sco5v6*)
-    # Note: We can NOT use -z defs as we might desire, because we do not
-    # link with -lc, and that would cause any symbols used from libc to
-    # always be unresolved, which means just about no library would
-    # ever link correctly.  If we're not using GNU ld we use -z text
-    # though, which does catch some bad symbols but isn't as heavy-handed
-    # as -z defs.
-    # For security reasons, it is highly recommended that you always
-    # use absolute paths for naming shared libraries, and exclude the
-    # DT_RUNPATH tag from executables and libraries.  But doing so
-    # requires that you compile everything twice, which is a pain.
-    # So that behaviour is only enabled if SCOABSPATH is set to a
-    # non-empty value in the environment.  Most likely only useful for
-    # creating official distributions of packages.
-    # This is a hack until libtool officially supports absolute path
-    # names for shared libraries.
-    no_undefined_flag_CXX='${wl}-z,text'
-    allow_undefined_flag_CXX='${wl}-z,nodefs'
-    archive_cmds_need_lc_CXX=no
-    hardcode_shlibpath_var_CXX=no
-    hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-    hardcode_libdir_separator_CXX=':'
-    link_all_deplibs_CXX=yes
-    export_dynamic_flag_spec_CXX='${wl}-Bexport'
-    runpath_var='LD_RUN_PATH'
-
-    case $cc_basename in
-      CC*)
-       archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       ;;
-      *)
-       archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       ;;
-    esac
-    ;;
-  tandem*)
-    case $cc_basename in
-      NCC*)
-       # NonStop-UX NCC 3.20
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      *)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-    esac
-    ;;
-  vxworks*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  *)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-esac
-{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
-echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
-test "$ld_shlibs_CXX" = no && can_build_shared=no
-
-GCC_CXX="$GXX"
-LD_CXX="$LD"
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-
-cat > conftest.$ac_ext <<EOF
-class Foo
-{
-public:
-  Foo (void) { a = 0; }
-private:
-  int a;
-};
-EOF
-
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # Parse the compiler output and extract the necessary
-  # objects, libraries and library flags.
-
-  # Sentinel used to keep track of whether or not we are before
-  # the conftest object file.
-  pre_test_object_deps_done=no
-
-  # The `*' in the case matches for architectures that use `case' in
-  # $output_verbose_cmd can trigger glob expansion during the loop
-  # eval without this substitution.
-  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
-
-  for p in `eval $output_verbose_link_cmd`; do
-    case $p in
-
-    -L* | -R* | -l*)
-       # Some compilers place space between "-{L,R}" and the path.
-       # Remove the space.
-       if test $p = "-L" \
-         || test $p = "-R"; then
-        prev=$p
-        continue
-       else
-        prev=
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-        case $p in
-        -L* | -R*)
-          # Internal compiler library paths should come after those
-          # provided the user.  The postdeps already come after the
-          # user supplied libs so there is no need to process them.
-          if test -z "$compiler_lib_search_path_CXX"; then
-            compiler_lib_search_path_CXX="${prev}${p}"
-          else
-            compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
-          fi
-          ;;
-        # The "-l" case would never come before the object being
-        # linked, so don't bother handling this case.
-        esac
-       else
-        if test -z "$postdeps_CXX"; then
-          postdeps_CXX="${prev}${p}"
-        else
-          postdeps_CXX="${postdeps_CXX} ${prev}${p}"
-        fi
-       fi
-       ;;
-
-    *.$objext)
-       # This assumes that the test object file only shows up
-       # once in the compiler output.
-       if test "$p" = "conftest.$objext"; then
-        pre_test_object_deps_done=yes
-        continue
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-        if test -z "$predep_objects_CXX"; then
-          predep_objects_CXX="$p"
-        else
-          predep_objects_CXX="$predep_objects_CXX $p"
-        fi
-       else
-        if test -z "$postdep_objects_CXX"; then
-          postdep_objects_CXX="$p"
-        else
-          postdep_objects_CXX="$postdep_objects_CXX $p"
-        fi
-       fi
-       ;;
-
-    *) ;; # Ignore the rest.
-
-    esac
-  done
-
-  # Clean up.
-  rm -f a.out a.exe
-else
-  echo "libtool.m4: error: problem compiling CXX test program"
-fi
-
-$rm -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-case $host_os in
-interix3*)
-  # Interix 3.5 installs completely hosed .la files for C++, so rather than
-  # hack all around it, let's just trust "g++" to DTRT.
-  predep_objects_CXX=
-  postdep_objects_CXX=
-  postdeps_CXX=
-  ;;
-
-solaris*)
-  case $cc_basename in
-  CC*)
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    postdeps_CXX='-lCstd -lCrun'
-    ;;
-  esac
-  ;;
-esac
-
-
-case " $postdeps_CXX " in
-*" -lc "*) archive_cmds_need_lc_CXX=no ;;
-esac
-
-lt_prog_compiler_wl_CXX=
-lt_prog_compiler_pic_CXX=
-lt_prog_compiler_static_CXX=
-
-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
-
-  # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
-    lt_prog_compiler_wl_CXX='-Wl,'
-    lt_prog_compiler_static_CXX='-static'
-
-    case $host_os in
-    aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static_CXX='-Bstatic'
-      fi
-      ;;
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
-      ;;
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-    mingw* | os2* | pw32*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
-      ;;
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic_CXX='-fno-common'
-      ;;
-    *djgpp*)
-      # DJGPP does not support shared libraries at all
-      lt_prog_compiler_pic_CXX=
-      ;;
-    interix3*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       lt_prog_compiler_pic_CXX=-Kconform_pic
-      fi
-      ;;
-    hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       ;;
-      *)
-       lt_prog_compiler_pic_CXX='-fPIC'
-       ;;
-      esac
-      ;;
-    *)
-      lt_prog_compiler_pic_CXX='-fPIC'
-      ;;
-    esac
-  else
-    case $host_os in
-      aix4* | aix5*)
-       # All AIX code is PIC.
-       if test "$host_cpu" = ia64; then
-         # AIX 5 now supports IA64 processor
-         lt_prog_compiler_static_CXX='-Bstatic'
-       else
-         lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
-       fi
-       ;;
-      chorus*)
-       case $cc_basename in
-       cxch68*)
-         # Green Hills C++ Compiler
-         # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
-         ;;
-       esac
-       ;;
-       darwin*)
-         # PIC is the default on this platform
-         # Common symbols not allowed in MH_DYLIB files
-         case $cc_basename in
-           xlc*)
-           lt_prog_compiler_pic_CXX='-qnocommon'
-           lt_prog_compiler_wl_CXX='-Wl,'
-           ;;
-         esac
-       ;;
-      dgux*)
-       case $cc_basename in
-         ec++*)
-           lt_prog_compiler_pic_CXX='-KPIC'
-           ;;
-         ghcx*)
-           # Green Hills C++ Compiler
-           lt_prog_compiler_pic_CXX='-pic'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      freebsd* | kfreebsd*-gnu | dragonfly*)
-       # FreeBSD uses GNU C++
-       ;;
-      hpux9* | hpux10* | hpux11*)
-       case $cc_basename in
-         CC*)
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
-           if test "$host_cpu" != ia64; then
-             lt_prog_compiler_pic_CXX='+Z'
-           fi
-           ;;
-         aCC*)
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
-           case $host_cpu in
-           hppa*64*|ia64*)
-             # +Z the default
-             ;;
-           *)
-             lt_prog_compiler_pic_CXX='+Z'
-             ;;
-           esac
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      interix*)
-       # This is c89, which is MS Visual C++ (no shared libs)
-       # Anyone wants to do a port?
-       ;;
-      irix5* | irix6* | nonstopux*)
-       case $cc_basename in
-         CC*)
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_static_CXX='-non_shared'
-           # CC pic flag -KPIC is the default.
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      linux*)
-       case $cc_basename in
-         KCC*)
-           # KAI C++ Compiler
-           lt_prog_compiler_wl_CXX='--backend -Wl,'
-           lt_prog_compiler_pic_CXX='-fPIC'
-           ;;
-         icpc* | ecpc*)
-           # Intel C++
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_pic_CXX='-KPIC'
-           lt_prog_compiler_static_CXX='-static'
-           ;;
-         pgCC*)
-           # Portland Group C++ compiler.
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_pic_CXX='-fpic'
-           lt_prog_compiler_static_CXX='-Bstatic'
-           ;;
-         cxx*)
-           # Compaq C++
-           # Make sure the PIC flag is empty.  It appears that all Alpha
-           # Linux and Compaq Tru64 Unix objects are PIC.
-           lt_prog_compiler_pic_CXX=
-           lt_prog_compiler_static_CXX='-non_shared'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      lynxos*)
-       ;;
-      m88k*)
-       ;;
-      mvs*)
-       case $cc_basename in
-         cxx*)
-           lt_prog_compiler_pic_CXX='-W c,exportall'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      netbsd*)
-       ;;
-      osf3* | osf4* | osf5*)
-       case $cc_basename in
-         KCC*)
-           lt_prog_compiler_wl_CXX='--backend -Wl,'
-           ;;
-         RCC*)
-           # Rational C++ 2.4.1
-           lt_prog_compiler_pic_CXX='-pic'
-           ;;
-         cxx*)
-           # Digital/Compaq C++
-           lt_prog_compiler_wl_CXX='-Wl,'
-           # Make sure the PIC flag is empty.  It appears that all Alpha
-           # Linux and Compaq Tru64 Unix objects are PIC.
-           lt_prog_compiler_pic_CXX=
-           lt_prog_compiler_static_CXX='-non_shared'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      psos*)
-       ;;
-      solaris*)
-       case $cc_basename in
-         CC*)
-           # Sun C++ 4.2, 5.x and Centerline C++
-           lt_prog_compiler_pic_CXX='-KPIC'
-           lt_prog_compiler_static_CXX='-Bstatic'
-           lt_prog_compiler_wl_CXX='-Qoption ld '
-           ;;
-         gcx*)
-           # Green Hills C++ Compiler
-           lt_prog_compiler_pic_CXX='-PIC'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      sunos4*)
-       case $cc_basename in
-         CC*)
-           # Sun C++ 4.x
-           lt_prog_compiler_pic_CXX='-pic'
-           lt_prog_compiler_static_CXX='-Bstatic'
-           ;;
-         lcc*)
-           # Lucid
-           lt_prog_compiler_pic_CXX='-pic'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      tandem*)
-       case $cc_basename in
-         NCC*)
-           # NonStop-UX NCC 3.20
-           lt_prog_compiler_pic_CXX='-KPIC'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-       case $cc_basename in
-         CC*)
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_pic_CXX='-KPIC'
-           lt_prog_compiler_static_CXX='-Bstatic'
-           ;;
-       esac
-       ;;
-      vxworks*)
-       ;;
-      *)
-       lt_prog_compiler_can_build_shared_CXX=no
-       ;;
-    esac
-  fi
-
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; }
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic_CXX"; then
-
-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_pic_works_CXX=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14265: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:14269: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_prog_compiler_pic_works_CXX=yes
-     fi
-   fi
-   $rm conftest*
-
-fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; }
-
-if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
-    case $lt_prog_compiler_pic_CXX in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
-     esac
-else
-    lt_prog_compiler_pic_CXX=
-     lt_prog_compiler_can_build_shared_CXX=no
-fi
-
-fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic_CXX=
-    ;;
-  *)
-    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
-    ;;
-esac
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_static_works_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_static_works_CXX=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         lt_prog_compiler_static_works_CXX=yes
-       fi
-     else
-       lt_prog_compiler_static_works_CXX=yes
-     fi
-   fi
-   $rm conftest*
-   LDFLAGS="$save_LDFLAGS"
 
-fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; }
 
-if test x"$lt_prog_compiler_static_works_CXX" = xyes; then
-    :
-else
-    lt_prog_compiler_static_CXX=
-fi
 
 
-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_c_o_CXX=no
-   $rm -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14369: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:14373: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o_CXX=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $rm conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-   $rm out/* && rmdir out
-   cd ..
-   rmdir conftest
-   $rm conftest*
 
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; }
 
 
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  { echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
 
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
 
-  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  case $host_os in
-  aix4* | aix5*)
-    # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-    else
-      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-    fi
-    ;;
-  pw32*)
-    export_symbols_cmds_CXX="$ltdll_cmds"
-  ;;
-  cygwin* | mingw*)
-    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  *)
-    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  esac
 
-{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
-echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
-test "$ld_shlibs_CXX" = no && can_build_shared=no
 
 #
 # Do we need to explicitly link libc?
 #
-case "x$archive_cmds_need_lc_CXX" in
+case "x$archive_cmds_need_lc" in
 x|xyes)
   # Assume -lc should be added
-  archive_cmds_need_lc_CXX=yes
+  archive_cmds_need_lc=yes
 
   if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds_CXX in
+    case $archive_cmds in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
       ;;
@@ -14464,4043 +10628,3316 @@ x|xyes)
       # Test whether the compiler implicitly links with -lc since on some
       # systems, -lgcc has to come before -lc. If gcc already passes -lc
       # to ld, don't add -lc before -lgcc.
-      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
-      $rm conftest*
-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
         soname=conftest
         lib=conftest
         libobjs=conftest.$ac_objext
         deplibs=
-        wl=$lt_prog_compiler_wl_CXX
-       pic_flag=$lt_prog_compiler_pic_CXX
+        wl=$lt_prog_compiler_wl
+       pic_flag=$lt_prog_compiler_pic
         compiler_flags=-v
         linker_flags=-v
         verstring=
         output_objdir=.
         libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
-        allow_undefined_flag_CXX=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+        lt_save_allow_undefined_flag=$allow_undefined_flag
+        allow_undefined_flag=
+        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
         then
-         archive_cmds_need_lc_CXX=no
+         archive_cmds_need_lc=no
         else
-         archive_cmds_need_lc_CXX=yes
+         archive_cmds_need_lc=yes
         fi
-        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+        allow_undefined_flag=$lt_save_allow_undefined_flag
       else
         cat conftest.err 1>&5
       fi
-      $rm conftest*
-      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; }
+      $RM conftest*
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
+$as_echo "$archive_cmds_need_lc" >&6; }
       ;;
     esac
   fi
   ;;
 esac
 
-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-need_lib_prefix=unknown
-hardcode_into_libs=no
 
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
 
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
 
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
 
-aix4* | aix5*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[01] | aix4.[01].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-          echo ' yes '
-          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
-       :
-      else
-       can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
 
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  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'
-  ;;
 
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
 
-bsdi[45]*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
 
-cygwin* | mingw* | pw32*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $rm \$dlpath'
-    shlibpath_overrides_runpath=yes
 
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-      ;;
-    mingw*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    ;;
 
-  *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
 
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
-  else
-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
-  fi
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
 
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
 
-kfreebsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
 
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[123]*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
-  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  freebsd*) # from 4.6 on
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
 
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
 
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-   hppa*64*)
-     shrext_cmds='.sl'
-     hardcode_into_libs=yes
-     dynamic_linker="$host_os dld.sl"
-     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-     soname_spec='${libname}${release}${shared_ext}$major'
-     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-     ;;
-   *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
 
-interix3*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
 
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
-       else
-               version_type=irix
-       fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
 
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
 
-# This must be Linux ELF.
-linux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
 
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-  fi
 
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
 
-knetbsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
 
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
 
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
 
-nto-qnx*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
 
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-       shlibpath_overrides_runpath=no
-       ;;
-      *)
-       shlibpath_overrides_runpath=yes
-       ;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
 
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
 
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
 
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
 
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
 
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
 
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
 
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-    shlibpath_overrides_runpath=no
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    shlibpath_overrides_runpath=yes
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-       ;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
 
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
 
-*)
-  dynamic_linker=no
-  ;;
-esac
-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
 
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
 
-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
-hardcode_action_CXX=
-if test -n "$hardcode_libdir_flag_spec_CXX" || \
-   test -n "$runpath_var_CXX" || \
-   test "X$hardcode_automatic_CXX" = "Xyes" ; then
 
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct_CXX" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
-     test "$hardcode_minus_L_CXX" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action_CXX=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action_CXX=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action_CXX=unsupported
-fi
-{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
-echo "${ECHO_T}$hardcode_action_CXX" >&6; }
 
-if test "$hardcode_action_CXX" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
 
 
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    compiler_CXX \
-    CC_CXX \
-    LD_CXX \
-    lt_prog_compiler_wl_CXX \
-    lt_prog_compiler_pic_CXX \
-    lt_prog_compiler_static_CXX \
-    lt_prog_compiler_no_builtin_flag_CXX \
-    export_dynamic_flag_spec_CXX \
-    thread_safe_flag_spec_CXX \
-    whole_archive_flag_spec_CXX \
-    enable_shared_with_static_runtimes_CXX \
-    old_archive_cmds_CXX \
-    old_archive_from_new_cmds_CXX \
-    predep_objects_CXX \
-    postdep_objects_CXX \
-    predeps_CXX \
-    postdeps_CXX \
-    compiler_lib_search_path_CXX \
-    archive_cmds_CXX \
-    archive_expsym_cmds_CXX \
-    postinstall_cmds_CXX \
-    postuninstall_cmds_CXX \
-    old_archive_from_expsyms_cmds_CXX \
-    allow_undefined_flag_CXX \
-    no_undefined_flag_CXX \
-    export_symbols_cmds_CXX \
-    hardcode_libdir_flag_spec_CXX \
-    hardcode_libdir_flag_spec_ld_CXX \
-    hardcode_libdir_separator_CXX \
-    hardcode_automatic_CXX \
-    module_cmds_CXX \
-    module_expsym_cmds_CXX \
-    lt_cv_prog_compiler_c_o_CXX \
-    exclude_expsyms_CXX \
-    include_expsyms_CXX; do
-
-    case $var in
-    old_archive_cmds_CXX | \
-    old_archive_from_new_cmds_CXX | \
-    archive_cmds_CXX | \
-    archive_expsym_cmds_CXX | \
-    module_cmds_CXX | \
-    module_expsym_cmds_CXX | \
-    old_archive_from_expsyms_cmds_CXX | \
-    export_symbols_cmds_CXX | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
 
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
 
-cfgfile="$ofile"
 
-  cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
 
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
 
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
 
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
 
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_CXX
 
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
 
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
 
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
 
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
 
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
 
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
 
-# A C compiler.
-LTCC=$lt_LTCC
 
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
 
-# A language-specific compiler.
-CC=$lt_compiler_CXX
 
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_CXX
 
-# An ERE matcher.
-EGREP=$lt_EGREP
 
-# The linker used to build libraries.
-LD=$lt_LD_CXX
 
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
 
-# A BSD-compatible nm program.
-NM=$lt_NM
 
-# A symbol stripping program
-STRIP=$lt_STRIP
 
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
 
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
 
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
 
-# Used on cygwin: assembler.
-AS="$AS"
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_CXX
 
-# Object file suffix (normally "o").
-objext="$ac_objext"
 
-# Old archive suffix (normally "a").
-libext="$libext"
 
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
 
-# Executable file suffix (normally "").
-exeext="$exeext"
 
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_CXX
-pic_mode=$pic_mode
 
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
 
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
 
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
 
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
 
-# Do we need a version for libraries?
-need_version=$need_version
 
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
 
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
 
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
 
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_CXX
 
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
 
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
 
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
 
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
 
-# Library versioning type.
-version_type=$version_type
 
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
 
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
 
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
 
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_CXX
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
 
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
 
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_CXX
-archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
 
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds_CXX
-module_expsym_cmds=$lt_module_expsym_cmds_CXX
 
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_predep_objects_CXX
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects_CXX
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_CXX
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_CXX
 
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
 
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
 
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
 
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_CXX
 
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_CXX
 
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
 
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
 
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
 
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
 
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_CXX
 
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
 
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
 
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
 
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
 
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_CXX
 
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_CXX
 
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
 
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic_CXX
 
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
 
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_CXX
 
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_CXX"
 
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_CXX
 
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_CXX
 
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
 
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_CXX
 
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_CXX
 
-# ### END LIBTOOL TAG CONFIG: $tagname
 
-__EOF__
 
 
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[lt_foo]++; }
+  if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[4-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+          echo ' yes '
+          echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+       :
+      else
+       can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  if test "$host_cpu" = m68k; then
+    library_names_spec='$libname.ixlibrary $libname.a'
+    # Create ${libname}_ixlibrary.a entries in /sys/libs.
+    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'
+  else
+    dynamic_linker=no
+  fi
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
   fi
-fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
 
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
 
-CC=$lt_save_CC
-LDCXX=$LD
-LD=$lt_save_LD
-GCC=$lt_save_GCC
-with_gnu_ldcxx=$with_gnu_ld
-with_gnu_ld=$lt_save_with_gnu_ld
-lt_cv_path_LDCXX=$lt_cv_path_LD
-lt_cv_path_LD=$lt_save_path_LD
-lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
-lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
 
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+       if test "$lt_cv_prog_gnu_ld" = yes; then
+               version_type=linux
        else
-         tagname=""
-       fi
-       ;;
-
-      F77)
-       if test -n "$F77" && test "X$F77" != "Xno"; then
-
-ac_ext=f
-ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
-ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_f77_compiler_gnu
-
-
-archive_cmds_need_lc_F77=no
-allow_undefined_flag_F77=
-always_export_symbols_F77=no
-archive_expsym_cmds_F77=
-export_dynamic_flag_spec_F77=
-hardcode_direct_F77=no
-hardcode_libdir_flag_spec_F77=
-hardcode_libdir_flag_spec_ld_F77=
-hardcode_libdir_separator_F77=
-hardcode_minus_L_F77=no
-hardcode_automatic_F77=no
-module_cmds_F77=
-module_expsym_cmds_F77=
-link_all_deplibs_F77=unknown
-old_archive_cmds_F77=$old_archive_cmds
-no_undefined_flag_F77=
-whole_archive_flag_spec_F77=
-enable_shared_with_static_runtimes_F77=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-objext_F77=$objext
+               version_type=irix
+       fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
 
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
 
-# Code to be used in simple link tests
-lt_simple_link_test_code="      program t\n      end\n"
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+int
+main ()
+{
 
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+  shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
 
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
 
-# Allow CC to be a program name with arguments.
-compiler=$CC
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[      ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
 
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
 
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
 
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
 
+*nto* | *qnx*)
+  version_type=qnx
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
 
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${F77-"f77"}
-compiler=$CC
-compiler_F77=$CC
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
   esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
-{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6; }
-
-{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+       shlibpath_overrides_runpath=no
+       ;;
+      *)
+       shlibpath_overrides_runpath=yes
+       ;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
   fi
   ;;
-aix4* | aix5*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
   ;;
-esac
-{ echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6; }
 
-{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-{ echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6; }
+rdos*)
+  dynamic_linker=no
+  ;;
 
-GCC_F77="$G77"
-LD_F77="$LD"
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
 
-lt_prog_compiler_wl_F77=
-lt_prog_compiler_pic_F77=
-lt_prog_compiler_static_F77=
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
 
-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
 
-  if test "$GCC" = yes; then
-    lt_prog_compiler_wl_F77='-Wl,'
-    lt_prog_compiler_static_F77='-static'
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
 
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
     case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static_F77='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
-      ;;
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+       ;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
 
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
 
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
-      ;;
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
 
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic_F77='-fno-common'
-      ;;
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
 
-    interix3*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
 
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      lt_prog_compiler_can_build_shared_F77=no
-      enable_shared=no
-      ;;
 
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       lt_prog_compiler_pic_F77=-Kconform_pic
-      fi
-      ;;
 
-    hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       lt_prog_compiler_pic_F77='-fPIC'
-       ;;
-      esac
-      ;;
 
-    *)
-      lt_prog_compiler_pic_F77='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static_F77='-Bstatic'
-      else
-       lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-      darwin*)
-        # PIC is the default on this platform
-        # Common symbols not allowed in MH_DYLIB files
-       case $cc_basename in
-         xlc*)
-         lt_prog_compiler_pic_F77='-qnocommon'
-         lt_prog_compiler_wl_F77='-Wl,'
-         ;;
-       esac
-       ;;
 
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
-      ;;
 
-    hpux9* | hpux10* | hpux11*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       lt_prog_compiler_pic_F77='+Z'
-       ;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
-      ;;
 
-    irix5* | irix6* | nonstopux*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      # PIC (with -KPIC) is the default.
-      lt_prog_compiler_static_F77='-non_shared'
-      ;;
 
-    newsos6)
-      lt_prog_compiler_pic_F77='-KPIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
 
-    linux*)
-      case $cc_basename in
-      icc* | ecc*)
-       lt_prog_compiler_wl_F77='-Wl,'
-       lt_prog_compiler_pic_F77='-KPIC'
-       lt_prog_compiler_static_F77='-static'
-        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-       # which looks to be a dead project)
-       lt_prog_compiler_wl_F77='-Wl,'
-       lt_prog_compiler_pic_F77='-fpic'
-       lt_prog_compiler_static_F77='-Bstatic'
-        ;;
-      ccc*)
-        lt_prog_compiler_wl_F77='-Wl,'
-        # All Alpha code is PIC.
-        lt_prog_compiler_static_F77='-non_shared'
-        ;;
-      esac
-      ;;
 
-    osf3* | osf4* | osf5*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      # All OSF/1 code is PIC.
-      lt_prog_compiler_static_F77='-non_shared'
-      ;;
 
-    solaris*)
-      lt_prog_compiler_pic_F77='-KPIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-       lt_prog_compiler_wl_F77='-Qoption ld ';;
-      *)
-       lt_prog_compiler_wl_F77='-Wl,';;
-      esac
-      ;;
 
-    sunos4*)
-      lt_prog_compiler_wl_F77='-Qoption ld '
-      lt_prog_compiler_pic_F77='-PIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
 
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      lt_prog_compiler_pic_F77='-KPIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
 
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-       lt_prog_compiler_pic_F77='-Kconform_pic'
-       lt_prog_compiler_static_F77='-Bstatic'
-      fi
-      ;;
 
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      lt_prog_compiler_pic_F77='-KPIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
 
-    unicos*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      lt_prog_compiler_can_build_shared_F77=no
-      ;;
 
-    uts4*)
-      lt_prog_compiler_pic_F77='-pic'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
 
-    *)
-      lt_prog_compiler_can_build_shared_F77=no
-      ;;
-    esac
-  fi
 
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; }
 
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic_F77"; then
 
-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_pic_works_F77=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic_F77"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15939: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:15943: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_prog_compiler_pic_works_F77=yes
-     fi
-   fi
-   $rm conftest*
 
-fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; }
 
-if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
-    case $lt_prog_compiler_pic_F77 in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
-     esac
-else
-    lt_prog_compiler_pic_F77=
-     lt_prog_compiler_can_build_shared_F77=no
-fi
 
-fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic_F77=
-    ;;
-  *)
-    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
-    ;;
-esac
 
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_static_works_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_static_works_F77=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         lt_prog_compiler_static_works_F77=yes
-       fi
-     else
-       lt_prog_compiler_static_works_F77=yes
-     fi
-   fi
-   $rm conftest*
-   LDFLAGS="$save_LDFLAGS"
 
-fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; }
 
-if test x"$lt_prog_compiler_static_works_F77" = xyes; then
-    :
-else
-    lt_prog_compiler_static_F77=
-fi
 
 
-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_c_o_F77=no
-   $rm -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16043: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:16047: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o_F77=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $rm conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-   $rm out/* && rmdir out
-   cd ..
-   rmdir conftest
-   $rm conftest*
 
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; }
 
 
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  { echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
 
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
 
-  runpath_var=
-  allow_undefined_flag_F77=
-  enable_shared_with_static_runtimes_F77=no
-  archive_cmds_F77=
-  archive_expsym_cmds_F77=
-  old_archive_From_new_cmds_F77=
-  old_archive_from_expsyms_cmds_F77=
-  export_dynamic_flag_spec_F77=
-  whole_archive_flag_spec_F77=
-  thread_safe_flag_spec_F77=
-  hardcode_libdir_flag_spec_F77=
-  hardcode_libdir_flag_spec_ld_F77=
-  hardcode_libdir_separator_F77=
-  hardcode_direct_F77=no
-  hardcode_minus_L_F77=no
-  hardcode_shlibpath_var_F77=unsupported
-  link_all_deplibs_F77=unknown
-  hardcode_automatic_F77=no
-  module_cmds_F77=
-  module_expsym_cmds_F77=
-  always_export_symbols_F77=no
-  export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  include_expsyms_F77=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  extract_expsyms_cmds=
-  # Just being paranoid about ensuring that cc_basename is set.
-  for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
-  case $host_os in
-  cygwin* | mingw* | pw32*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  esac
 
-  ld_shlibs_F77=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
 
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec_F77='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
-       whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-       whole_archive_flag_spec_F77=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>/dev/null` in
-      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
 
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix3* | aix4* | aix5*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-       ld_shlibs_F77=no
-       cat <<EOF 1>&2
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
 
-EOF
-      fi
-      ;;
 
-    amigaos*)
-      archive_cmds_F77='$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)'
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_minus_L_F77=yes
 
-      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can't use
-      # them.
-      ld_shlibs_F77=no
-      ;;
 
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       allow_undefined_flag_F77=unsupported
-       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-       # support --undefined.  This deserves some investigation.  FIXME
-       archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-       ld_shlibs_F77=no
-      fi
-      ;;
 
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
-      # as there is no search path for DLLs.
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      allow_undefined_flag_F77=unsupported
-      always_export_symbols_F77=no
-      enable_shared_with_static_runtimes_F77=yes
-      export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
-
-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-        archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-       ld_shlibs_F77=no
-      fi
-      ;;
 
-    interix3*)
-      hardcode_direct_F77=no
-      hardcode_shlibpath_var_F77=no
-      hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec_F77='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
 
-    linux*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       tmp_addflag=
-       case $cc_basename,$host_cpu in
-       pgcc*)                          # Portland Group C compiler
-         whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag'
-         ;;
-       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
-         whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag -Mnomain' ;;
-       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
-         tmp_addflag=' -i_dynamic' ;;
-       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
-         tmp_addflag=' -i_dynamic -nofor_main' ;;
-       ifc* | ifort*)                  # Intel Fortran compiler
-         tmp_addflag=' -nofor_main' ;;
-       esac
-       archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
-       if test $supports_anon_versioning = yes; then
-         archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
-  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-  $echo "local: *; };" >> $output_objdir/$libname.ver~
-         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-       fi
-      else
-       ld_shlibs_F77=no
-      fi
-      ;;
 
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-       wlarc=
-      else
-       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
 
-    solaris*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-       ld_shlibs_F77=no
-       cat <<EOF 1>&2
 
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
 
-EOF
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       ld_shlibs_F77=no
-      fi
-      ;;
 
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-       ld_shlibs_F77=no
-       cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
 
-_LT_EOF
-       ;;
-       *)
-         if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-           hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
-           archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
-           archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
-         else
-           ld_shlibs_F77=no
-         fi
-       ;;
-      esac
-      ;;
 
-    sunos4*)
-      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
 
-    *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       ld_shlibs_F77=no
-      fi
-      ;;
-    esac
 
-    if test "$ld_shlibs_F77" = no; then
-      runpath_var=
-      hardcode_libdir_flag_spec_F77=
-      export_dynamic_flag_spec_F77=
-      whole_archive_flag_spec_F77=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      allow_undefined_flag_F77=unsupported
-      always_export_symbols_F77=yes
-      archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      hardcode_minus_L_F77=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-       # Neither direct hardcoding nor static linking is supported with a
-       # broken collect2.
-       hardcode_direct_F77=unsupported
-      fi
-      ;;
 
-    aix4* | aix5*)
-      if test "$host_cpu" = ia64; then
-       # On IA64, the linker does run time linking by default, so we don't
-       # have to do anything special.
-       aix_use_runtimelinking=no
-       exp_sym_flag='-Bexport'
-       no_entry_flag=""
-      else
-       # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
-       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-         export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-       else
-         export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-       fi
-       aix_use_runtimelinking=no
 
-       # Test if we are trying to use run time linking or normal
-       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
-       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
-         for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-           aix_use_runtimelinking=yes
-           break
-         fi
-         done
-         ;;
-       esac
 
-       exp_sym_flag='-bexport'
-       no_entry_flag='-bnoentry'
-      fi
 
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
-      archive_cmds_F77=''
-      hardcode_direct_F77=yes
-      hardcode_libdir_separator_F77=':'
-      link_all_deplibs_F77=yes
 
-      if test "$GCC" = yes; then
-       case $host_os in aix4.[012]|aix4.[012].*)
-       # We only want to do this on AIX 4.2 and lower, the check
-       # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
-         if test -f "$collect2name" && \
-          strings "$collect2name" | grep resolve_lib_name >/dev/null
-         then
-         # We have reworked collect2
-         hardcode_direct_F77=yes
-         else
-         # We have old collect2
-         hardcode_direct_F77=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         hardcode_minus_L_F77=yes
-         hardcode_libdir_flag_spec_F77='-L$libdir'
-         hardcode_libdir_separator_F77=
-         fi
-         ;;
-       esac
-       shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
-       fi
-      else
-       # not using gcc
-       if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-         shared_flag='-G'
-       else
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
-         else
-           shared_flag='${wl}-bM:SRE'
-         fi
-       fi
-      fi
 
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      always_export_symbols_F77=yes
-      if test "$aix_use_runtimelinking" = yes; then
-       # Warning - without using the other runtime loading flags (-brtl),
-       # -berok will link without error, but may produce a broken library.
-       allow_undefined_flag_F77='-berok'
-       # Determine the default libpath from the value encoded in an empty executable.
-       cat >conftest.$ac_ext <<_ACEOF
-      program main
 
-      end
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_f77_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
 
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
 
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
-       archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-       else
-       if test "$host_cpu" = ia64; then
-         hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
-         allow_undefined_flag_F77="-z nodefs"
-         archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-       else
-        # Determine the default libpath from the value encoded in an empty executable.
-        cat >conftest.$ac_ext <<_ACEOF
-      program main
 
-      end
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_f77_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
 
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
 
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-        hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
-         # Warning - without using the other run time loading flags,
-         # -berok will link without error, but may produce a broken library.
-         no_undefined_flag_F77=' ${wl}-bernotok'
-         allow_undefined_flag_F77=' ${wl}-berok'
-         # Exported symbols can be pulled into shared objects from archives
-         whole_archive_flag_spec_F77='$convenience'
-         archive_cmds_need_lc_F77=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-       fi
-      fi
-      ;;
 
-    amigaos*)
-      archive_cmds_F77='$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)'
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_minus_L_F77=yes
-      # see comment about different semantics on the GNU ld section
-      ld_shlibs_F77=no
-      ;;
 
-    bsdi[45]*)
-      export_dynamic_flag_spec_F77=-rdynamic
-      ;;
 
-    cygwin* | mingw* | pw32*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec_F77=' '
-      allow_undefined_flag_F77=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_From_new_cmds_F77='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes_F77=yes
-      ;;
 
-    darwin* | rhapsody*)
-      case $host_os in
-        rhapsody* | darwin1.[012])
-         allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[012])
-               allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-      esac
-      archive_cmds_need_lc_F77=no
-      hardcode_direct_F77=no
-      hardcode_automatic_F77=yes
-      hardcode_shlibpath_var_F77=unsupported
-      whole_archive_flag_spec_F77=''
-      link_all_deplibs_F77=yes
-    if test "$GCC" = yes ; then
-       output_verbose_link_cmd='echo'
-        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-         module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         ld_shlibs_F77=no
-          ;;
-      esac
-    fi
-      ;;
 
-    dgux*)
-      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_shlibpath_var_F77=no
-      ;;
 
-    freebsd1*)
-      ld_shlibs_F77=no
-      ;;
 
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      hardcode_libdir_flag_spec_F77='-R$libdir'
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
 
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_F77=yes
-      hardcode_minus_L_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
 
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | kfreebsd*-gnu | dragonfly*)
-      archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec_F77='-R$libdir'
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
 
-    hpux9*)
-      if test "$GCC" = yes; then
-       archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-       archive_cmds_F77='$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'
-      fi
-      hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator_F77=:
-      hardcode_direct_F77=yes
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+   test -n "$runpath_var" ||
+   test "X$hardcode_automatic" = "Xyes" ; then
 
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L_F77=yes
-      export_dynamic_flag_spec_F77='${wl}-E'
-      ;;
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
 
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator_F77=:
+if test "$hardcode_action" = relink ||
+   test "$inherit_rpath" = yes; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
 
-       hardcode_direct_F77=yes
-       export_dynamic_flag_spec_F77='${wl}-E'
 
-       # hardcode_minus_L: Not really in the search PATH,
-       # but as the default location of the library.
-       hardcode_minus_L_F77=yes
-      fi
-      ;;
 
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      else
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator_F77=:
 
-       case $host_cpu in
-       hppa*64*|ia64*)
-         hardcode_libdir_flag_spec_ld_F77='+b $libdir'
-         hardcode_direct_F77=no
-         hardcode_shlibpath_var_F77=no
-         ;;
-       *)
-         hardcode_direct_F77=yes
-         export_dynamic_flag_spec_F77='${wl}-E'
 
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         hardcode_minus_L_F77=yes
-         ;;
-       esac
-      fi
-      ;;
 
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-       archive_cmds_F77='$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'
-      else
-       archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
-      fi
-      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_F77=:
-      link_all_deplibs_F77=yes
-      ;;
+  if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
 
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-       archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      hardcode_libdir_flag_spec_F77='-R$libdir'
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
 
-    newsos6)
-      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_F77=yes
-      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_F77=:
-      hardcode_shlibpath_var_F77=no
-      ;;
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+    ;;
 
-    openbsd*)
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-       archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-       hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
-       export_dynamic_flag_spec_F77='${wl}-E'
-      else
-       case $host_os in
-        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-          archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-          hardcode_libdir_flag_spec_F77='-R$libdir'
-          ;;
-        *)
-          archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-          hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
-          ;;
-       esac
-      fi
-      ;;
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+    ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
+else
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
 
-    os2*)
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_minus_L_F77=yes
-      allow_undefined_flag_F77=unsupported
-      archive_cmds_F77='$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'
-      old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
 
-    osf3*)
-      if test "$GCC" = yes; then
-       allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds_F77='$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'
-      else
-       allow_undefined_flag_F77=' -expect_unresolved \*'
-       archive_cmds_F77='$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'
-      fi
-      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_F77=:
-      ;;
+fi
 
-    osf4* | osf5*)     # as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-       allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds_F77='$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'
-       hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-      else
-       allow_undefined_flag_F77=' -expect_unresolved \*'
-       archive_cmds_F77='$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'
-       archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+    ;;
 
-       # Both c and cxx compiler support -rpath directly
-       hardcode_libdir_flag_spec_F77='-rpath $libdir'
-      fi
-      hardcode_libdir_separator_F77=:
-      ;;
+  *)
+    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = x""yes; then :
+  lt_cv_dlopen="shl_load"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    solaris*)
-      no_undefined_flag_F77=' -z text'
-      if test "$GCC" = yes; then
-       wlarc='${wl}'
-       archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
-      else
-       wlarc=''
-       archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      fi
-      hardcode_libdir_flag_spec_F77='-R$libdir'
-      hardcode_shlibpath_var_F77=no
-      case $host_os in
-      solaris2.[0-5] | solaris2.[0-5].*) ;;
-      *)
-       # The compiler driver will combine linker options so we
-       # cannot just pass the convience library names through
-       # without $wl, iff we do not link with $LD.
-       # Luckily, gcc supports the same syntax we need for Sun Studio.
-       # Supported since Solaris 2.6 (maybe 2.5.1?)
-       case $wlarc in
-       '')
-         whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
-       *)
-         whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
-       esac ;;
-      esac
-      link_all_deplibs_F77=yes
-      ;;
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dld_shl_load=yes
+else
+  ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = x""yes; then :
+  lt_cv_dlopen="dlopen"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-       # Use $CC to link under sequent, because it throws in some extra .o
-       # files that make .init and .fini sections work.
-       archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_direct_F77=yes
-      hardcode_minus_L_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
+else
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    sysv4)
-      case $host_vendor in
-       sni)
-         archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct_F77=yes # is this really true???
-       ;;
-       siemens)
-         ## LD is ld it makes a PLAMLIB
-         ## CC just makes a GrossModule.
-         archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-         reload_cmds_F77='$CC -r -o $output$reload_objs'
-         hardcode_direct_F77=no
-        ;;
-       motorola)
-         archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
-       ;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      hardcode_shlibpath_var_F77=no
-      ;;
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_svld_dlopen=yes
+else
+  ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    sysv4.3*)
-      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var_F77=no
-      export_dynamic_flag_spec_F77='-Bexport'
-      ;;
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dld_dld_link=yes
+else
+  ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
 
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_shlibpath_var_F77=no
-       runpath_var=LD_RUN_PATH
-       hardcode_runpath_var=yes
-       ld_shlibs_F77=yes
-      fi
-      ;;
 
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
-      no_undefined_flag_F77='${wl}-z,text'
-      archive_cmds_need_lc_F77=no
-      hardcode_shlibpath_var_F77=no
-      runpath_var='LD_RUN_PATH'
+fi
 
-      if test "$GCC" = yes; then
-       archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
 
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      no_undefined_flag_F77='${wl}-z,text'
-      allow_undefined_flag_F77='${wl}-z,nodefs'
-      archive_cmds_need_lc_F77=no
-      hardcode_shlibpath_var_F77=no
-      hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-      hardcode_libdir_separator_F77=':'
-      link_all_deplibs_F77=yes
-      export_dynamic_flag_spec_F77='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
+fi
 
-      if test "$GCC" = yes; then
-       archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
 
-    uts4*)
-      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_shlibpath_var_F77=no
-      ;;
+fi
 
-    *)
-      ld_shlibs_F77=no
-      ;;
-    esac
-  fi
 
-{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
-echo "${ECHO_T}$ld_shlibs_F77" >&6; }
-test "$ld_shlibs_F77" = no && can_build_shared=no
+fi
 
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc_F77" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc_F77=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds_F77 in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
-      $rm conftest*
-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+fi
 
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl_F77
-       pic_flag=$lt_prog_compiler_pic_F77
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag_F77
-        allow_undefined_flag_F77=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-        then
-         archive_cmds_need_lc_F77=no
-        else
-         archive_cmds_need_lc_F77=yes
-        fi
-        allow_undefined_flag_F77=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $rm conftest*
-      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; }
-      ;;
-    esac
-  fi
-  ;;
-esac
+    ;;
+  esac
 
-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
   else
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+    enable_dlopen=no
   fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-need_lib_prefix=unknown
-hardcode_into_libs=no
+         if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line 11911 "configure"
+#include "confdefs.h"
 
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
 
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
+#include <stdio.h>
 
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL          RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL                DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL                0
+#  endif
+#endif
 
-aix4* | aix5*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW         DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW       RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW     DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW     0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
   else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[01] | aix4.[01].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-          echo ' yes '
-          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
-       :
-      else
-       can_build_shared=no
-      fi
-      ;;
+    puts (dlerror ());
+
+    exit (status);
+}
+_LT_EOF
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
     esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
   fi
-  ;;
+fi
+rm -fr conftest*
 
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  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'
-  ;;
 
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
 
-bsdi[45]*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self_static+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+         if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line 12011 "configure"
+#include "confdefs.h"
 
-cygwin* | mingw* | pw32*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $rm \$dlpath'
-    shlibpath_overrides_runpath=yes
+#include <stdio.h>
 
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-      ;;
-    mingw*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    ;;
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL          RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL                DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL                0
+#  endif
+#endif
 
-  *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW         DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW       RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW     DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW     0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
 
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
   else
-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+    puts (dlerror ());
+
+    exit (status);
+}
+_LT_EOF
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
   fi
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
+fi
+rm -fr conftest*
 
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+    fi
 
-kfreebsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
 
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[123]*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
   esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
-  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  freebsd*) # from 4.6 on
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
   esac
-  ;;
+fi
 
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
 
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+  darwin*)
+    if test -n "$STRIP" ; then
+      striplib="$STRIP -x"
+      old_striplib="$STRIP -S"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
     else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
     fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
-   hppa*64*)
-     shrext_cmds='.sl'
-     hardcode_into_libs=yes
-     dynamic_linker="$host_os dld.sl"
-     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-     soname_spec='${libname}${release}${shared_ext}$major'
-     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-     ;;
-   *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+  *)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
     ;;
   esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
+fi
 
-interix3*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
 
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
-       else
-               version_type=irix
-       fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+
+
+
+
+
+
+
+
+
+
+  # Report which library types will actually be built
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+  test "$can_build_shared" = "no" && enable_shared=no
+
+  # On AIX, shared libraries and static libraries use the same namespace, and
+  # are all built from PIC.
   case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
+  aix3*)
+    test "$enable_shared" = yes && enable_static=no
+    if test -n "$RANLIB"; then
+      archive_cmds="$archive_cmds~\$RANLIB \$lib"
+      postinstall_cmds='$RANLIB $lib'
+    fi
     ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
+
+  aix[4-9]*)
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
+    fi
     ;;
   esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+  # Make sure either enable_shared or enable_static is yes.
+  test "$enable_shared" = yes || enable_static=yes
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
 
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
 
-# This must be Linux ELF.
-linux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-  fi
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+compiler_needs_object_CXX=no
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_direct_absolute_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+inherit_rpath_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
 
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
+# Source file extension for C++ test sources.
+ac_ext=cpp
 
-knetbsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
 
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="int some_variable = 0;"
 
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
+  # Code to be used in simple link tests
+  lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
 
-nto-qnx*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-       shlibpath_overrides_runpath=no
-       ;;
-      *)
-       shlibpath_overrides_runpath=yes
-       ;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
 
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
 
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
 
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
 
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
 
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
 
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-    shlibpath_overrides_runpath=no
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+  # save warnings/boilerplate of simple test code
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC=$CC
+  lt_save_LD=$LD
+  lt_save_GCC=$GCC
+  GCC=$GXX
+  lt_save_with_gnu_ld=$with_gnu_ld
+  lt_save_path_LD=$lt_cv_path_LD
+  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
   else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    shlibpath_overrides_runpath=yes
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-       ;;
-    esac
+    $as_unset lt_cv_prog_gnu_ld
   fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
+  if test -n "${lt_cv_path_LDCXX+set}"; then
+    lt_cv_path_LD=$lt_cv_path_LDCXX
+  else
+    $as_unset lt_cv_path_LD
+  fi
+  test -z "${LDCXX+set}" || LD=$LDCXX
+  CC=${CXX-"c++"}
+  compiler=$CC
+  compiler_CXX=$CC
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
 
-*)
-  dynamic_linker=no
-  ;;
-esac
-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
+  if test -n "$compiler"; then
+    # We don't want -fno-exception when compiling C++ code, so set the
+    # no_builtin_flag separately
+    if test "$GXX" = yes; then
+      lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+    else
+      lt_prog_compiler_no_builtin_flag_CXX=
+    fi
 
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
 
-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
-hardcode_action_F77=
-if test -n "$hardcode_libdir_flag_spec_F77" || \
-   test -n "$runpath_var_F77" || \
-   test "X$hardcode_automatic_F77" = "Xyes" ; then
 
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct_F77" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
-     test "$hardcode_minus_L_F77" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action_F77=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action_F77=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action_F77=unsupported
-fi
-{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
-echo "${ECHO_T}$hardcode_action_F77" >&6; }
 
-if test "$hardcode_action_F77" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
 fi
 
-
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    compiler_F77 \
-    CC_F77 \
-    LD_F77 \
-    lt_prog_compiler_wl_F77 \
-    lt_prog_compiler_pic_F77 \
-    lt_prog_compiler_static_F77 \
-    lt_prog_compiler_no_builtin_flag_F77 \
-    export_dynamic_flag_spec_F77 \
-    thread_safe_flag_spec_F77 \
-    whole_archive_flag_spec_F77 \
-    enable_shared_with_static_runtimes_F77 \
-    old_archive_cmds_F77 \
-    old_archive_from_new_cmds_F77 \
-    predep_objects_F77 \
-    postdep_objects_F77 \
-    predeps_F77 \
-    postdeps_F77 \
-    compiler_lib_search_path_F77 \
-    archive_cmds_F77 \
-    archive_expsym_cmds_F77 \
-    postinstall_cmds_F77 \
-    postuninstall_cmds_F77 \
-    old_archive_from_expsyms_cmds_F77 \
-    allow_undefined_flag_F77 \
-    no_undefined_flag_F77 \
-    export_symbols_cmds_F77 \
-    hardcode_libdir_flag_spec_F77 \
-    hardcode_libdir_flag_spec_ld_F77 \
-    hardcode_libdir_separator_F77 \
-    hardcode_automatic_F77 \
-    module_cmds_F77 \
-    module_expsym_cmds_F77 \
-    lt_cv_prog_compiler_c_o_F77 \
-    exclude_expsyms_F77 \
-    include_expsyms_F77; do
-
-    case $var in
-    old_archive_cmds_F77 | \
-    old_archive_from_new_cmds_F77 | \
-    archive_cmds_F77 | \
-    archive_expsym_cmds_F77 | \
-    module_cmds_F77 | \
-    module_expsym_cmds_F77 | \
-    old_archive_from_expsyms_cmds_F77 | \
-    export_symbols_cmds_F77 | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+       ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
       ;;
-    esac
-  done
-
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
     ;;
   esac
+elif test "$with_gnu_ld" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+       test "$with_gnu_ld" != no && break
+       ;;
+      *)
+       test "$with_gnu_ld" != yes && break
+       ;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
 
-cfgfile="$ofile"
-
-  cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
 
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
 
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_F77
 
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
 
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
 
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
 
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
 
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
+      # Check if GNU C++ uses GNU ld as the underlying linker, since the
+      # archiving commands below assume that GNU ld is being used.
+      if test "$with_gnu_ld" = yes; then
+        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
+        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
 
-# A C compiler.
-LTCC=$lt_LTCC
+        # If archive_cmds runs LD, not CC, wlarc should be empty
+        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+        #     investigate it a little bit more. (MM)
+        wlarc='${wl}'
 
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
+        # ancient GNU ld didn't support --whole-archive et. al.
+        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+         $GREP 'no-whole-archive' > /dev/null; then
+          whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+        else
+          whole_archive_flag_spec_CXX=
+        fi
+      else
+        with_gnu_ld=no
+        wlarc=
+
+        # A generic and very simple default shared library creation
+        # command for GNU C++ for the case where it uses the native
+        # linker, instead of GNU ld.  If possible, this setting should
+        # overridden to take advantage of the native linker features on
+        # the platform it is being used on.
+        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      fi
 
-# A language-specific compiler.
-CC=$lt_compiler_F77
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_F77
+    else
+      GXX=no
+      with_gnu_ld=no
+      wlarc=
+    fi
 
-# An ERE matcher.
-EGREP=$lt_EGREP
+    # PORTME: fill in a description of your system's C++ link characteristics
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+    ld_shlibs_CXX=yes
+    case $host_os in
+      aix3*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+      aix[4-9]*)
+        if test "$host_cpu" = ia64; then
+          # On IA64, the linker does run time linking by default, so we don't
+          # have to do anything special.
+          aix_use_runtimelinking=no
+          exp_sym_flag='-Bexport'
+          no_entry_flag=""
+        else
+          aix_use_runtimelinking=no
+
+          # Test if we are trying to use run time linking or normal
+          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+          # need to do runtime linking.
+          case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+           for ld_flag in $LDFLAGS; do
+             case $ld_flag in
+             *-brtl*)
+               aix_use_runtimelinking=yes
+               break
+               ;;
+             esac
+           done
+           ;;
+          esac
 
-# The linker used to build libraries.
-LD=$lt_LD_F77
+          exp_sym_flag='-bexport'
+          no_entry_flag='-bnoentry'
+        fi
 
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
+        # When large executables or shared objects are built, AIX ld can
+        # have problems creating the table of contents.  If linking a library
+        # or program results in "error TOC overflow" add -mminimal-toc to
+        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+        archive_cmds_CXX=''
+        hardcode_direct_CXX=yes
+        hardcode_direct_absolute_CXX=yes
+        hardcode_libdir_separator_CXX=':'
+        link_all_deplibs_CXX=yes
+        file_list_spec_CXX='${wl}-f,'
+
+        if test "$GXX" = yes; then
+          case $host_os in aix4.[012]|aix4.[012].*)
+          # We only want to do this on AIX 4.2 and lower, the check
+          # below for broken collect2 doesn't work under 4.3+
+         collect2name=`${CC} -print-prog-name=collect2`
+         if test -f "$collect2name" &&
+            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+         then
+           # We have reworked collect2
+           :
+         else
+           # We have old collect2
+           hardcode_direct_CXX=unsupported
+           # It fails to find uninstalled libraries when the uninstalled
+           # path is not listed in the libpath.  Setting hardcode_minus_L
+           # to unsupported forces relinking
+           hardcode_minus_L_CXX=yes
+           hardcode_libdir_flag_spec_CXX='-L$libdir'
+           hardcode_libdir_separator_CXX=
+         fi
+          esac
+          shared_flag='-shared'
+         if test "$aix_use_runtimelinking" = yes; then
+           shared_flag="$shared_flag "'${wl}-G'
+         fi
+        else
+          # not using gcc
+          if test "$host_cpu" = ia64; then
+         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+         # chokes on -Wl,-G. The following line is correct:
+         shared_flag='-G'
+          else
+           if test "$aix_use_runtimelinking" = yes; then
+             shared_flag='${wl}-G'
+           else
+             shared_flag='${wl}-bM:SRE'
+           fi
+          fi
+        fi
 
-# A BSD-compatible nm program.
-NM=$lt_NM
+        # It seems that -bexpall does not export symbols beginning with
+        # underscore (_), so it is better to generate a list of symbols to
+       # export.
+        always_export_symbols_CXX=yes
+        if test "$aix_use_runtimelinking" = yes; then
+          # Warning - without using the other runtime loading flags (-brtl),
+          # -berok will link without error, but may produce a broken library.
+          allow_undefined_flag_CXX='-berok'
+          # Determine the default libpath from the value encoded in an empty
+          # executable.
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-# A symbol stripping program
-STRIP=$lt_STRIP
+int
+main ()
+{
 
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
 
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+       /^0/ {
+           s/^0  *\(.*\)$/\1/
+           p
+       }
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
+          hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
 
-# Used on cygwin: assembler.
-AS="$AS"
+          archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+          if test "$host_cpu" = ia64; then
+           hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+           allow_undefined_flag_CXX="-z nodefs"
+           archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+          else
+           # Determine the default libpath from the value encoded in an
+           # empty executable.
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
+int
+main ()
+{
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_F77
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+       /^0/ {
+           s/^0  *\(.*\)$/\1/
+           p
+       }
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-# Object file suffix (normally "o").
-objext="$ac_objext"
+           hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+           # Warning - without using the other run time loading flags,
+           # -berok will link without error, but may produce a broken library.
+           no_undefined_flag_CXX=' ${wl}-bernotok'
+           allow_undefined_flag_CXX=' ${wl}-berok'
+           # Exported symbols can be pulled into shared objects from archives
+           whole_archive_flag_spec_CXX='$convenience'
+           archive_cmds_need_lc_CXX=yes
+           # This is similar to how AIX traditionally builds its shared
+           # libraries.
+           archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+          fi
+        fi
+        ;;
 
-# Old archive suffix (normally "a").
-libext="$libext"
+      beos*)
+       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+         allow_undefined_flag_CXX=unsupported
+         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+         # support --undefined.  This deserves some investigation.  FIXME
+         archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       else
+         ld_shlibs_CXX=no
+       fi
+       ;;
 
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
+      chorus*)
+        case $cc_basename in
+          *)
+         # FIXME: insert proper C++ library support
+         ld_shlibs_CXX=no
+         ;;
+        esac
+        ;;
 
-# Executable file suffix (normally "").
-exeext="$exeext"
+      cygwin* | mingw* | pw32*)
+        # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+        # as there is no search path for DLLs.
+        hardcode_libdir_flag_spec_CXX='-L$libdir'
+        allow_undefined_flag_CXX=unsupported
+        always_export_symbols_CXX=no
+        enable_shared_with_static_runtimes_CXX=yes
+
+        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+          archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+          # If the export-symbols file already is a .def file (1st line
+          # is EXPORTS), use it as is; otherwise, prepend...
+          archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+           cp $export_symbols $output_objdir/$soname.def;
+          else
+           echo EXPORTS > $output_objdir/$soname.def;
+           cat $export_symbols >> $output_objdir/$soname.def;
+          fi~
+          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        else
+          ld_shlibs_CXX=no
+        fi
+        ;;
+      darwin* | rhapsody*)
 
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_F77
-pic_mode=$pic_mode
 
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
+  archive_cmds_need_lc_CXX=no
+  hardcode_direct_CXX=no
+  hardcode_automatic_CXX=yes
+  hardcode_shlibpath_var_CXX=unsupported
+  whole_archive_flag_spec_CXX=''
+  link_all_deplibs_CXX=yes
+  allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+  if test "$GCC" = "yes"; then
+    output_verbose_link_cmd=echo
+    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+       if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+    fi
 
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
+  else
+  ld_shlibs_CXX=no
+  fi
 
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
+       ;;
 
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
+      dgux*)
+        case $cc_basename in
+          ec++*)
+           # FIXME: insert proper C++ library support
+           ld_shlibs_CXX=no
+           ;;
+          ghcx*)
+           # Green Hills C++ Compiler
+           # FIXME: insert proper C++ library support
+           ld_shlibs_CXX=no
+           ;;
+          *)
+           # FIXME: insert proper C++ library support
+           ld_shlibs_CXX=no
+           ;;
+        esac
+        ;;
 
-# Do we need a version for libraries?
-need_version=$need_version
+      freebsd[12]*)
+        # C++ shared libraries reported to be fairly broken before
+       # switch to ELF
+        ld_shlibs_CXX=no
+        ;;
 
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
+      freebsd-elf*)
+        archive_cmds_need_lc_CXX=no
+        ;;
 
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
+      freebsd* | dragonfly*)
+        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+        # conventions
+        ld_shlibs_CXX=yes
+        ;;
 
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
+      gnu*)
+        ;;
 
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_F77
+      hpux9*)
+        hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator_CXX=:
+        export_dynamic_flag_spec_CXX='${wl}-E'
+        hardcode_direct_CXX=yes
+        hardcode_minus_L_CXX=yes # Not in the search PATH,
+                                            # but as the default
+                                            # location of the library.
+
+        case $cc_basename in
+          CC*)
+            # FIXME: insert proper C++ library support
+            ld_shlibs_CXX=no
+            ;;
+          aCC*)
+            archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            # Commands to make compiler produce verbose output that lists
+            # what "hidden" libraries, object files and flags are used when
+            # linking a shared library.
+            #
+            # There doesn't appear to be a way to prevent this compiler from
+            # explicitly linking system object files so we need to strip them
+            # from the output so that they don't get included in the library
+            # dependencies.
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+            ;;
+          *)
+            if test "$GXX" = yes; then
+              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            else
+              # FIXME: insert proper C++ library support
+              ld_shlibs_CXX=no
+            fi
+            ;;
+        esac
+        ;;
 
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
+      hpux10*|hpux11*)
+        if test $with_gnu_ld = no; then
+         hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+         hardcode_libdir_separator_CXX=:
 
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
+          case $host_cpu in
+            hppa*64*|ia64*)
+              ;;
+            *)
+             export_dynamic_flag_spec_CXX='${wl}-E'
+              ;;
+          esac
+        fi
+        case $host_cpu in
+          hppa*64*|ia64*)
+            hardcode_direct_CXX=no
+            hardcode_shlibpath_var_CXX=no
+            ;;
+          *)
+            hardcode_direct_CXX=yes
+            hardcode_direct_absolute_CXX=yes
+            hardcode_minus_L_CXX=yes # Not in the search PATH,
+                                                # but as the default
+                                                # location of the library.
+            ;;
+        esac
 
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
+        case $cc_basename in
+          CC*)
+           # FIXME: insert proper C++ library support
+           ld_shlibs_CXX=no
+           ;;
+          aCC*)
+           case $host_cpu in
+             hppa*64*)
+               archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+               ;;
+             ia64*)
+               archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+               ;;
+             *)
+               archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+               ;;
+           esac
+           # Commands to make compiler produce verbose output that lists
+           # what "hidden" libraries, object files and flags are used when
+           # linking a shared library.
+           #
+           # There doesn't appear to be a way to prevent this compiler from
+           # explicitly linking system object files so we need to strip them
+           # from the output so that they don't get included in the library
+           # dependencies.
+           output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+           ;;
+          *)
+           if test "$GXX" = yes; then
+             if test $with_gnu_ld = no; then
+               case $host_cpu in
+                 hppa*64*)
+                   archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+                   ;;
+                 ia64*)
+                   archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+                   ;;
+                 *)
+                   archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+                   ;;
+               esac
+             fi
+           else
+             # FIXME: insert proper C++ library support
+             ld_shlibs_CXX=no
+           fi
+           ;;
+        esac
+        ;;
 
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
+      interix[3-9]*)
+       hardcode_direct_CXX=no
+       hardcode_shlibpath_var_CXX=no
+       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+       export_dynamic_flag_spec_CXX='${wl}-E'
+       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+       # Instead, shared libraries are loaded at an image base (0x10000000 by
+       # default) and relocated if they conflict, which is a slow very memory
+       # consuming and fragmenting process.  To avoid this, we pick a random,
+       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+       archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+       archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+       ;;
+      irix5* | irix6*)
+        case $cc_basename in
+          CC*)
+           # SGI C++
+           archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+           # Archives containing C++ object files must be created using
+           # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+           # necessary to make sure instantiated templates are included
+           # in the archive.
+           old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+           ;;
+          *)
+           if test "$GXX" = yes; then
+             if test "$with_gnu_ld" = no; then
+               archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+             else
+               archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+             fi
+           fi
+           link_all_deplibs_CXX=yes
+           ;;
+        esac
+        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        hardcode_libdir_separator_CXX=:
+        inherit_rpath_CXX=yes
+        ;;
 
-# Library versioning type.
-version_type=$version_type
+      linux* | k*bsd*-gnu)
+        case $cc_basename in
+          KCC*)
+           # Kuck and Associates, Inc. (KAI) C++ Compiler
 
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
+           # KCC will only create a shared library if the output file
+           # ends with ".so" (or ".sl" for HP-UX), so rename the library
+           # to its proper name (with version) after linking.
+           archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+           archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+           # Commands to make compiler produce verbose output that lists
+           # what "hidden" libraries, object files and flags are used when
+           # linking a shared library.
+           #
+           # There doesn't appear to be a way to prevent this compiler from
+           # explicitly linking system object files so we need to strip them
+           # from the output so that they don't get included in the library
+           # dependencies.
+           output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+           hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+           export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+           # Archives containing C++ object files must be created using
+           # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+           old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+           ;;
+         icpc* | ecpc* )
+           # Intel C++
+           with_gnu_ld=yes
+           # version 8.0 and above of icpc choke on multiply defined symbols
+           # if we add $predep_objects and $postdep_objects, however 7.1 and
+           # earlier do not add the objects themselves.
+           case `$CC -V 2>&1` in
+             *"Version 7."*)
+               archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+               archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+               ;;
+             *)  # Version 8.0 or newer
+               tmp_idyn=
+               case $host_cpu in
+                 ia64*) tmp_idyn=' -i_dynamic';;
+               esac
+               archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+               archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+               ;;
+           esac
+           archive_cmds_need_lc_CXX=no
+           hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+           export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+           whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+           ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+           case `$CC -V` in
+           *pgCC\ [1-5]* | *pgcpp\ [1-5]*)
+             prelink_cmds_CXX='tpldir=Template.dir~
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+               compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+             old_archive_cmds_CXX='tpldir=Template.dir~
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+               $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+               $RANLIB $oldlib'
+             archive_cmds_CXX='tpldir=Template.dir~
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+             archive_expsym_cmds_CXX='tpldir=Template.dir~
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+             ;;
+           *) # Version 6 will use weak symbols
+             archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+             archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+             ;;
+           esac
 
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
+           hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+           export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+           whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+            ;;
+         cxx*)
+           # Compaq C++
+           archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+           archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
 
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
+           runpath_var=LD_RUN_PATH
+           hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+           hardcode_libdir_separator_CXX=:
 
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_F77
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
+           # Commands to make compiler produce verbose output that lists
+           # what "hidden" libraries, object files and flags are used when
+           # linking a shared library.
+           #
+           # There doesn't appear to be a way to prevent this compiler from
+           # explicitly linking system object files so we need to strip them
+           # from the output so that they don't get included in the library
+           # dependencies.
+           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+           ;;
+         xl*)
+           # IBM XL 8.0 on PPC, with GNU ld
+           hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+           export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+           archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+           if test "x$supports_anon_versioning" = xyes; then
+             archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
+               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+               echo "local: *; };" >> $output_objdir/$libname.ver~
+               $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+           fi
+           ;;
+         *)
+           case `$CC -V 2>&1 | sed 5q` in
+           *Sun\ C*)
+             # Sun C++ 5.9
+             no_undefined_flag_CXX=' -zdefs'
+             archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+             archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+             hardcode_libdir_flag_spec_CXX='-R$libdir'
+             whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+             compiler_needs_object_CXX=yes
+
+             # Not sure whether something based on
+             # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+             # would be better.
+             output_verbose_link_cmd='echo'
+
+             # Archives containing C++ object files must be created using
+             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+             # necessary to make sure instantiated templates are included
+             # in the archive.
+             old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+             ;;
+           esac
+           ;;
+       esac
+       ;;
 
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
+      lynxos*)
+        # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
 
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
+      m88k*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+       ;;
 
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_F77
-archive_expsym_cmds=$lt_archive_expsym_cmds_F77
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
+      mvs*)
+        case $cc_basename in
+          cxx*)
+           # FIXME: insert proper C++ library support
+           ld_shlibs_CXX=no
+           ;;
+         *)
+           # FIXME: insert proper C++ library support
+           ld_shlibs_CXX=no
+           ;;
+       esac
+       ;;
 
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds_F77
-module_expsym_cmds=$lt_module_expsym_cmds_F77
+      netbsd*)
+        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+         archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+         wlarc=
+         hardcode_libdir_flag_spec_CXX='-R$libdir'
+         hardcode_direct_CXX=yes
+         hardcode_shlibpath_var_CXX=no
+       fi
+       # Workaround some broken pre-1.5 toolchains
+       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+       ;;
 
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
+      *nto* | *qnx*)
+        ld_shlibs_CXX=yes
+       ;;
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_predep_objects_F77
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+       ld_shlibs_CXX=no
+       ;;
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects_F77
+      openbsd*)
+       if test -f /usr/libexec/ld.so; then
+         hardcode_direct_CXX=yes
+         hardcode_shlibpath_var_CXX=no
+         hardcode_direct_absolute_CXX=yes
+         archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+         hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+         if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+           archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+           export_dynamic_flag_spec_CXX='${wl}-E'
+           whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+         fi
+         output_verbose_link_cmd=echo
+       else
+         ld_shlibs_CXX=no
+       fi
+       ;;
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_F77
+      osf3* | osf4* | osf5*)
+        case $cc_basename in
+          KCC*)
+           # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+           # KCC will only create a shared library if the output file
+           # ends with ".so" (or ".sl" for HP-UX), so rename the library
+           # to its proper name (with version) after linking.
+           archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+           hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+           hardcode_libdir_separator_CXX=:
+
+           # Archives containing C++ object files must be created using
+           # the KAI C++ compiler.
+           case $host in
+             osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
+             *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
+           esac
+           ;;
+          RCC*)
+           # Rational C++ 2.4.1
+           # FIXME: insert proper C++ library support
+           ld_shlibs_CXX=no
+           ;;
+          cxx*)
+           case $host in
+             osf3*)
+               allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+               archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+               hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+               ;;
+             *)
+               allow_undefined_flag_CXX=' -expect_unresolved \*'
+               archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+               archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+                 echo "-hidden">> $lib.exp~
+                 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+                 $RM $lib.exp'
+               hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+               ;;
+           esac
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_F77
+           hardcode_libdir_separator_CXX=:
 
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_F77
+           # Commands to make compiler produce verbose output that lists
+           # what "hidden" libraries, object files and flags are used when
+           # linking a shared library.
+           #
+           # There doesn't appear to be a way to prevent this compiler from
+           # explicitly linking system object files so we need to strip them
+           # from the output so that they don't get included in the library
+           # dependencies.
+           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+           ;;
+         *)
+           if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+             allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+             case $host in
+               osf3*)
+                 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+                 ;;
+               *)
+                 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+                 ;;
+             esac
+
+             hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+             hardcode_libdir_separator_CXX=:
+
+             # Commands to make compiler produce verbose output that lists
+             # what "hidden" libraries, object files and flags are used when
+             # linking a shared library.
+             output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+           else
+             # FIXME: insert proper C++ library support
+             ld_shlibs_CXX=no
+           fi
+           ;;
+        esac
+        ;;
 
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
+      psos*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
 
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
+      sunos4*)
+        case $cc_basename in
+          CC*)
+           # Sun C++ 4.x
+           # FIXME: insert proper C++ library support
+           ld_shlibs_CXX=no
+           ;;
+          lcc*)
+           # Lucid
+           # FIXME: insert proper C++ library support
+           ld_shlibs_CXX=no
+           ;;
+          *)
+           # FIXME: insert proper C++ library support
+           ld_shlibs_CXX=no
+           ;;
+        esac
+        ;;
 
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_F77
+      solaris*)
+        case $cc_basename in
+          CC*)
+           # Sun C++ 4.2, 5.x and Centerline C++
+            archive_cmds_need_lc_CXX=yes
+           no_undefined_flag_CXX=' -zdefs'
+           archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+           archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+             $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+           hardcode_libdir_flag_spec_CXX='-R$libdir'
+           hardcode_shlibpath_var_CXX=no
+           case $host_os in
+             solaris2.[0-5] | solaris2.[0-5].*) ;;
+             *)
+               # The compiler driver will combine and reorder linker options,
+               # but understands `-z linker_flag'.
+               # Supported since Solaris 2.6 (maybe 2.5.1?)
+               whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+               ;;
+           esac
+           link_all_deplibs_CXX=yes
 
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_F77
+           output_verbose_link_cmd='echo'
 
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
+           # Archives containing C++ object files must be created using
+           # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+           # necessary to make sure instantiated templates are included
+           # in the archive.
+           old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+           ;;
+          gcx*)
+           # Green Hills C++ Compiler
+           archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
+           # The C++ compiler must be used to create the archive.
+           old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+           ;;
+          *)
+           # GNU C++ compiler with Solaris linker
+           if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+             no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+             if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+               archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+               archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+                 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+               # Commands to make compiler produce verbose output that lists
+               # what "hidden" libraries, object files and flags are used when
+               # linking a shared library.
+               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+             else
+               # g++ 2.7 appears to require `-G' NOT `-shared' on this
+               # platform.
+               archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+               archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+                 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+               # Commands to make compiler produce verbose output that lists
+               # what "hidden" libraries, object files and flags are used when
+               # linking a shared library.
+               output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+             fi
+
+             hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+             case $host_os in
+               solaris2.[0-5] | solaris2.[0-5].*) ;;
+               *)
+                 whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+                 ;;
+             esac
+           fi
+           ;;
+        esac
+        ;;
 
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag_CXX='${wl}-z,text'
+      archive_cmds_need_lc_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      runpath_var='LD_RUN_PATH'
 
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+      case $cc_basename in
+        CC*)
+         archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+      esac
+      ;;
 
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+      sysv5* | sco3.2v5* | sco5v6*)
+       # Note: We can NOT use -z defs as we might desire, because we do not
+       # link with -lc, and that would cause any symbols used from libc to
+       # always be unresolved, which means just about no library would
+       # ever link correctly.  If we're not using GNU ld we use -z text
+       # though, which does catch some bad symbols but isn't as heavy-handed
+       # as -z defs.
+       no_undefined_flag_CXX='${wl}-z,text'
+       allow_undefined_flag_CXX='${wl}-z,nodefs'
+       archive_cmds_need_lc_CXX=no
+       hardcode_shlibpath_var_CXX=no
+       hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+       hardcode_libdir_separator_CXX=':'
+       link_all_deplibs_CXX=yes
+       export_dynamic_flag_spec_CXX='${wl}-Bexport'
+       runpath_var='LD_RUN_PATH'
 
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
+       case $cc_basename in
+          CC*)
+           archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           ;;
+         *)
+           archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           ;;
+       esac
+      ;;
 
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
+      tandem*)
+        case $cc_basename in
+          NCC*)
+           # NonStop-UX NCC 3.20
+           # FIXME: insert proper C++ library support
+           ld_shlibs_CXX=no
+           ;;
+          *)
+           # FIXME: insert proper C++ library support
+           ld_shlibs_CXX=no
+           ;;
+        esac
+        ;;
 
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
 
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_F77
+      *)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+    esac
 
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+    test "$ld_shlibs_CXX" = no && can_build_shared=no
 
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
+    GCC_CXX="$GXX"
+    LD_CXX="$LD"
 
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    # Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
 
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
+cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+_LT_EOF
 
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_F77
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
 
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_F77
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
 
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
+  for p in `eval "$output_verbose_link_cmd"`; do
+    case $p in
 
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic_F77
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" ||
+          test $p = "-R"; then
+        prev=$p
+        continue
+       else
+        prev=
+       fi
 
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
+       if test "$pre_test_object_deps_done" = no; then
+        case $p in
+        -L* | -R*)
+          # Internal compiler library paths should come after those
+          # provided the user.  The postdeps already come after the
+          # user supplied libs so there is no need to process them.
+          if test -z "$compiler_lib_search_path_CXX"; then
+            compiler_lib_search_path_CXX="${prev}${p}"
+          else
+            compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+          fi
+          ;;
+        # The "-l" case would never come before the object being
+        # linked, so don't bother handling this case.
+        esac
+       else
+        if test -z "$postdeps_CXX"; then
+          postdeps_CXX="${prev}${p}"
+        else
+          postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+        fi
+       fi
+       ;;
 
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_F77
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+        pre_test_object_deps_done=yes
+        continue
+       fi
 
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+       if test "$pre_test_object_deps_done" = no; then
+        if test -z "$predep_objects_CXX"; then
+          predep_objects_CXX="$p"
+        else
+          predep_objects_CXX="$predep_objects_CXX $p"
+        fi
+       else
+        if test -z "$postdep_objects_CXX"; then
+          postdep_objects_CXX="$p"
+        else
+          postdep_objects_CXX="$postdep_objects_CXX $p"
+        fi
+       fi
+       ;;
 
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+    *) ;; # Ignore the rest.
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_F77"
+    esac
+  done
 
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_F77
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling CXX test program"
+fi
 
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_F77
+$RM -f confest.$objext
 
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  predep_objects_CXX=
+  postdep_objects_CXX=
+  postdeps_CXX=
+  ;;
 
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_F77
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
 
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_F77
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
 
-# ### END LIBTOOL TAG CONFIG: $tagname
+solaris*)
+  case $cc_basename in
+  CC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
 
-__EOF__
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
 
 
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
-  fi
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+ compiler_lib_search_dirs_CXX=
+if test -n "${compiler_lib_search_path_CXX}"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
 fi
 
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-CC="$lt_save_CC"
 
-       else
-         tagname=""
-       fi
-       ;;
 
-      GCJ)
-       if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
 
 
-# Source file extension for Java test sources.
-ac_ext=java
 
-# Object file extension for compiled Java test sources.
-objext=o
-objext_GCJ=$objext
 
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
 
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
 
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
 
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
-# Allow CC to be a program name with arguments.
-compiler=$CC
 
 
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
 
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
 
 
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${GCJ-"gcj"}
-compiler=$CC
-compiler_GCJ=$CC
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
 
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-archive_cmds_need_lc_GCJ=no
 
-old_archive_cmds_GCJ=$old_archive_cmds
 
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
 
-lt_prog_compiler_no_builtin_flag_GCJ=
 
-if test "$GCC" = yes; then
-  lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
 
 
-{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_rtti_exceptions=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="-fno-rtti -fno-exceptions"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18245: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:18249: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_rtti_exceptions=yes
-     fi
-   fi
-   $rm conftest*
 
-fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
 
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
-    lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
-else
-    :
-fi
 
-fi
 
-lt_prog_compiler_wl_GCJ=
-lt_prog_compiler_pic_GCJ=
-lt_prog_compiler_static_GCJ=
+    lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
 
-{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 
-  if test "$GCC" = yes; then
-    lt_prog_compiler_wl_GCJ='-Wl,'
-    lt_prog_compiler_static_GCJ='-static'
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    lt_prog_compiler_wl_CXX='-Wl,'
+    lt_prog_compiler_static_CXX='-static'
 
     case $host_os in
-      aix*)
+    aix*)
       # All AIX code is PIC.
       if test "$host_cpu" = ia64; then
        # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static_GCJ='-Bstatic'
+       lt_prog_compiler_static_CXX='-Bstatic'
       fi
       ;;
-
     amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
+      if test "$host_cpu" = m68k; then
+        # FIXME: we need at least 68020 code to build shared libraries, but
+        # adding the `-m68020' flag to GCC prevents building anything better,
+        # like `-m68040'.
+        lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+      fi
       ;;
-
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
       # PIC is the default for these OSes.
       ;;
-
-    mingw* | pw32* | os2*)
+    mingw* | cygwin* | os2* | pw32*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
       ;;
-
     darwin* | rhapsody*)
       # PIC is the default on this platform
       # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic_GCJ='-fno-common'
+      lt_prog_compiler_pic_CXX='-fno-common'
       ;;
-
-    interix3*)
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      lt_prog_compiler_pic_CXX=
+      ;;
+    interix[3-9]*)
       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
       # Instead, we relocate shared libraries at runtime.
       ;;
-
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      lt_prog_compiler_can_build_shared_GCJ=no
-      enable_shared=no
-      ;;
-
     sysv4*MP*)
       if test -d /usr/nec; then
-       lt_prog_compiler_pic_GCJ=-Kconform_pic
+       lt_prog_compiler_pic_CXX=-Kconform_pic
       fi
       ;;
-
     hpux*)
       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
       # not for PA HP-UX.
       case $host_cpu in
       hppa*64*|ia64*)
-       # +Z the default
        ;;
-      *)
-       lt_prog_compiler_pic_GCJ='-fPIC'
+      *)
+       lt_prog_compiler_pic_CXX='-fPIC'
+       ;;
+      esac
+      ;;
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic_CXX='-fPIC -shared'
+      ;;
+    *)
+      lt_prog_compiler_pic_CXX='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix[4-9]*)
+       # All AIX code is PIC.
+       if test "$host_cpu" = ia64; then
+         # AIX 5 now supports IA64 processor
+         lt_prog_compiler_static_CXX='-Bstatic'
+       else
+         lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+       fi
+       ;;
+      chorus*)
+       case $cc_basename in
+       cxch68*)
+         # Green Hills C++ Compiler
+         # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+         ;;
+       esac
+       ;;
+      dgux*)
+       case $cc_basename in
+         ec++*)
+           lt_prog_compiler_pic_CXX='-KPIC'
+           ;;
+         ghcx*)
+           # Green Hills C++ Compiler
+           lt_prog_compiler_pic_CXX='-pic'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      freebsd* | dragonfly*)
+       # FreeBSD uses GNU C++
+       ;;
+      hpux9* | hpux10* | hpux11*)
+       case $cc_basename in
+         CC*)
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+           if test "$host_cpu" != ia64; then
+             lt_prog_compiler_pic_CXX='+Z'
+           fi
+           ;;
+         aCC*)
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+           case $host_cpu in
+           hppa*64*|ia64*)
+             # +Z the default
+             ;;
+           *)
+             lt_prog_compiler_pic_CXX='+Z'
+             ;;
+           esac
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      interix*)
+       # This is c89, which is MS Visual C++ (no shared libs)
+       # Anyone wants to do a port?
+       ;;
+      irix5* | irix6* | nonstopux*)
+       case $cc_basename in
+         CC*)
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_static_CXX='-non_shared'
+           # CC pic flag -KPIC is the default.
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      linux* | k*bsd*-gnu)
+       case $cc_basename in
+         KCC*)
+           # KAI C++ Compiler
+           lt_prog_compiler_wl_CXX='--backend -Wl,'
+           lt_prog_compiler_pic_CXX='-fPIC'
+           ;;
+         icpc* | ecpc* )
+           # Intel C++
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_pic_CXX='-KPIC'
+           lt_prog_compiler_static_CXX='-static'
+           ;;
+         pgCC* | pgcpp*)
+           # Portland Group C++ compiler
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_pic_CXX='-fpic'
+           lt_prog_compiler_static_CXX='-Bstatic'
+           ;;
+         cxx*)
+           # Compaq C++
+           # Make sure the PIC flag is empty.  It appears that all Alpha
+           # Linux and Compaq Tru64 Unix objects are PIC.
+           lt_prog_compiler_pic_CXX=
+           lt_prog_compiler_static_CXX='-non_shared'
+           ;;
+         xlc* | xlC*)
+           # IBM XL 8.0 on PPC
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_pic_CXX='-qpic'
+           lt_prog_compiler_static_CXX='-qstaticlink'
+           ;;
+         *)
+           case `$CC -V 2>&1 | sed 5q` in
+           *Sun\ C*)
+             # Sun C++ 5.9
+             lt_prog_compiler_pic_CXX='-KPIC'
+             lt_prog_compiler_static_CXX='-Bstatic'
+             lt_prog_compiler_wl_CXX='-Qoption ld '
+             ;;
+           esac
+           ;;
+       esac
+       ;;
+      lynxos*)
        ;;
-      esac
-      ;;
-
-    *)
-      lt_prog_compiler_pic_GCJ='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static_GCJ='-Bstatic'
-      else
-       lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-      darwin*)
-        # PIC is the default on this platform
-        # Common symbols not allowed in MH_DYLIB files
-       case $cc_basename in
-         xlc*)
-         lt_prog_compiler_pic_GCJ='-qnocommon'
-         lt_prog_compiler_wl_GCJ='-Wl,'
-         ;;
-       esac
-       ;;
-
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
+      m88k*)
        ;;
-      *)
-       lt_prog_compiler_pic_GCJ='+Z'
+      mvs*)
+       case $cc_basename in
+         cxx*)
+           lt_prog_compiler_pic_CXX='-W c,exportall'
+           ;;
+         *)
+           ;;
+       esac
        ;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      # PIC (with -KPIC) is the default.
-      lt_prog_compiler_static_GCJ='-non_shared'
-      ;;
-
-    newsos6)
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      ;;
-
-    linux*)
-      case $cc_basename in
-      icc* | ecc*)
-       lt_prog_compiler_wl_GCJ='-Wl,'
-       lt_prog_compiler_pic_GCJ='-KPIC'
-       lt_prog_compiler_static_GCJ='-static'
-        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-       # which looks to be a dead project)
-       lt_prog_compiler_wl_GCJ='-Wl,'
-       lt_prog_compiler_pic_GCJ='-fpic'
-       lt_prog_compiler_static_GCJ='-Bstatic'
-        ;;
-      ccc*)
-        lt_prog_compiler_wl_GCJ='-Wl,'
-        # All Alpha code is PIC.
-        lt_prog_compiler_static_GCJ='-non_shared'
+      netbsd*)
+       ;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        lt_prog_compiler_pic_CXX='-fPIC -shared'
         ;;
-      esac
-      ;;
-
-    osf3* | osf4* | osf5*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      # All OSF/1 code is PIC.
-      lt_prog_compiler_static_GCJ='-non_shared'
-      ;;
-
-    solaris*)
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-       lt_prog_compiler_wl_GCJ='-Qoption ld ';;
+      osf3* | osf4* | osf5*)
+       case $cc_basename in
+         KCC*)
+           lt_prog_compiler_wl_CXX='--backend -Wl,'
+           ;;
+         RCC*)
+           # Rational C++ 2.4.1
+           lt_prog_compiler_pic_CXX='-pic'
+           ;;
+         cxx*)
+           # Digital/Compaq C++
+           lt_prog_compiler_wl_CXX='-Wl,'
+           # Make sure the PIC flag is empty.  It appears that all Alpha
+           # Linux and Compaq Tru64 Unix objects are PIC.
+           lt_prog_compiler_pic_CXX=
+           lt_prog_compiler_static_CXX='-non_shared'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      psos*)
+       ;;
+      solaris*)
+       case $cc_basename in
+         CC*)
+           # Sun C++ 4.2, 5.x and Centerline C++
+           lt_prog_compiler_pic_CXX='-KPIC'
+           lt_prog_compiler_static_CXX='-Bstatic'
+           lt_prog_compiler_wl_CXX='-Qoption ld '
+           ;;
+         gcx*)
+           # Green Hills C++ Compiler
+           lt_prog_compiler_pic_CXX='-PIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      sunos4*)
+       case $cc_basename in
+         CC*)
+           # Sun C++ 4.x
+           lt_prog_compiler_pic_CXX='-pic'
+           lt_prog_compiler_static_CXX='-Bstatic'
+           ;;
+         lcc*)
+           # Lucid
+           lt_prog_compiler_pic_CXX='-pic'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+       case $cc_basename in
+         CC*)
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_pic_CXX='-KPIC'
+           lt_prog_compiler_static_CXX='-Bstatic'
+           ;;
+       esac
+       ;;
+      tandem*)
+       case $cc_basename in
+         NCC*)
+           # NonStop-UX NCC 3.20
+           lt_prog_compiler_pic_CXX='-KPIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      vxworks*)
+       ;;
       *)
-       lt_prog_compiler_wl_GCJ='-Wl,';;
-      esac
-      ;;
-
-    sunos4*)
-      lt_prog_compiler_wl_GCJ='-Qoption ld '
-      lt_prog_compiler_pic_GCJ='-PIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-       lt_prog_compiler_pic_GCJ='-Kconform_pic'
-       lt_prog_compiler_static_GCJ='-Bstatic'
-      fi
-      ;;
-
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      ;;
-
-    unicos*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      lt_prog_compiler_can_build_shared_GCJ=no
-      ;;
-
-    uts4*)
-      lt_prog_compiler_pic_GCJ='-pic'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      ;;
-
-    *)
-      lt_prog_compiler_can_build_shared_GCJ=no
-      ;;
+       lt_prog_compiler_can_build_shared_CXX=no
+       ;;
     esac
   fi
 
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; }
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_CXX=
+    ;;
+  *)
+    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+    ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5
+$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
+
+
 
 #
 # Check to make sure the PIC flag actually works.
 #
-if test -n "$lt_prog_compiler_pic_GCJ"; then
-
-{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_pic_works_GCJ=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
+if test -n "$lt_prog_compiler_pic_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works_CXX=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18513: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13950: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:18517: \$? = $ac_status" >&5
+   echo "$as_me:13954: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_prog_compiler_pic_works_GCJ=yes
+       lt_cv_prog_compiler_pic_works_CXX=yes
      fi
    fi
-   $rm conftest*
+   $RM conftest*
 
 fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
 
-if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
-    case $lt_prog_compiler_pic_GCJ in
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+    case $lt_prog_compiler_pic_CXX in
      "" | " "*) ;;
-     *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
+     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
      esac
 else
-    lt_prog_compiler_pic_GCJ=
-     lt_prog_compiler_can_build_shared_GCJ=no
+    lt_prog_compiler_pic_CXX=
+     lt_prog_compiler_can_build_shared_CXX=no
 fi
 
 fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic_GCJ=
-    ;;
-  *)
-    lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
-    ;;
-esac
+
+
 
 #
 # Check to make sure the static flag actually works.
 #
-wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\"
-{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
-if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  lt_prog_compiler_static_works_GCJ=no
+  lt_cv_prog_compiler_static_works_CXX=no
    save_LDFLAGS="$LDFLAGS"
    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
      # The linker can only warn and ignore the option if not recognized
      # So say no if there are warnings
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&5
-       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
        if diff conftest.exp conftest.er2 >/dev/null; then
-         lt_prog_compiler_static_works_GCJ=yes
+         lt_cv_prog_compiler_static_works_CXX=yes
        fi
      else
-       lt_prog_compiler_static_works_GCJ=yes
+       lt_cv_prog_compiler_static_works_CXX=yes
      fi
    fi
-   $rm conftest*
+   $RM -r conftest*
    LDFLAGS="$save_LDFLAGS"
 
 fi
-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
 
-if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
     :
 else
-    lt_prog_compiler_static_GCJ=
+    lt_prog_compiler_static_CXX=
+fi
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:14049: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:14053: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
 
 
-{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
-if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  lt_cv_prog_compiler_c_o_GCJ=no
-   $rm -r conftest 2>/dev/null
+  lt_cv_prog_compiler_c_o_CXX=no
+   $RM -r conftest 2>/dev/null
    mkdir conftest
    cd conftest
    mkdir out
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
    lt_compiler_flag="-o out/conftest2.$ac_objext"
    # Insert the option either (1) after the last *FLAGS variable, or
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18617: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14101: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:18621: \$? = $ac_status" >&5
+   echo "$as_me:14105: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o_GCJ=yes
+       lt_cv_prog_compiler_c_o_CXX=yes
      fi
    fi
    chmod u+w . 2>&5
-   $rm conftest*
+   $RM conftest*
    # SGI C++ compiler will create directory out/ii_files/ for
    # template instantiation
-   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-   $rm out/* && rmdir out
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
    cd ..
-   rmdir conftest
-   $rm conftest*
+   $RM -r conftest
+   $RM conftest*
 
 fi
-{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
 
 
 hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
   # do not overwrite the value of need_locks provided by the user
-  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
   hard_links=yes
-  $rm conftest*
+  $RM conftest*
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   touch conftest.a
   ln conftest.a conftest.b 2>&5 || hard_links=no
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  { echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
   if test "$hard_links" = no; then
-    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
     need_locks=warn
   fi
 else
   need_locks=no
 fi
 
-{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
 
-  runpath_var=
-  allow_undefined_flag_GCJ=
-  enable_shared_with_static_runtimes_GCJ=no
-  archive_cmds_GCJ=
-  archive_expsym_cmds_GCJ=
-  old_archive_From_new_cmds_GCJ=
-  old_archive_from_expsyms_cmds_GCJ=
-  export_dynamic_flag_spec_GCJ=
-  whole_archive_flag_spec_GCJ=
-  thread_safe_flag_spec_GCJ=
-  hardcode_libdir_flag_spec_GCJ=
-  hardcode_libdir_flag_spec_ld_GCJ=
-  hardcode_libdir_separator_GCJ=
-  hardcode_direct_GCJ=no
-  hardcode_minus_L_GCJ=no
-  hardcode_shlibpath_var_GCJ=unsupported
-  link_all_deplibs_GCJ=unknown
-  hardcode_automatic_GCJ=no
-  module_cmds_GCJ=
-  module_expsym_cmds_GCJ=
-  always_export_symbols_GCJ=no
-  export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  include_expsyms_GCJ=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  extract_expsyms_cmds=
-  # Just being paranoid about ensuring that cc_basename is set.
-  for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
   case $host_os in
-  cygwin* | mingw* | pw32*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
+  aix[4-9]*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    else
+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     fi
     ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
+  pw32*)
+    export_symbols_cmds_CXX="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
   esac
+  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
 
-  ld_shlibs_GCJ=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
-
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
-       whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-       whole_archive_flag_spec_GCJ=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>/dev/null` in
-      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
-
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix3* | aix4* | aix5*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-       ld_shlibs_GCJ=no
-       cat <<EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
-      fi
-      ;;
-
-    amigaos*)
-      archive_cmds_GCJ='$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)'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_minus_L_GCJ=yes
-
-      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can't use
-      # them.
-      ld_shlibs_GCJ=no
-      ;;
-
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       allow_undefined_flag_GCJ=unsupported
-       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-       # support --undefined.  This deserves some investigation.  FIXME
-       archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-       ld_shlibs_GCJ=no
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
-      # as there is no search path for DLLs.
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      allow_undefined_flag_GCJ=unsupported
-      always_export_symbols_GCJ=no
-      enable_shared_with_static_runtimes_GCJ=yes
-      export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
-
-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-        archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-       ld_shlibs_GCJ=no
-      fi
-      ;;
-
-    interix3*)
-      hardcode_direct_GCJ=no
-      hardcode_shlibpath_var_GCJ=no
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec_GCJ='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
-
-    linux*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       tmp_addflag=
-       case $cc_basename,$host_cpu in
-       pgcc*)                          # Portland Group C compiler
-         whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag'
-         ;;
-       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
-         whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag -Mnomain' ;;
-       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
-         tmp_addflag=' -i_dynamic' ;;
-       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
-         tmp_addflag=' -i_dynamic -nofor_main' ;;
-       ifc* | ifort*)                  # Intel Fortran compiler
-         tmp_addflag=' -nofor_main' ;;
-       esac
-       archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
-       if test $supports_anon_versioning = yes; then
-         archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
-  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-  $echo "local: *; };" >> $output_objdir/$libname.ver~
-         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-       fi
-      else
-       ld_shlibs_GCJ=no
-      fi
-      ;;
-
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-       wlarc=
-      else
-       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
-
-    solaris*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-       ld_shlibs_GCJ=no
-       cat <<EOF 1>&2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
 
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
+with_gnu_ld_CXX=$with_gnu_ld
 
-EOF
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       ld_shlibs_GCJ=no
-      fi
-      ;;
 
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-       ld_shlibs_GCJ=no
-       cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
 
-_LT_EOF
-       ;;
-       *)
-         if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-           hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
-           archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
-           archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
-         else
-           ld_shlibs_GCJ=no
-         fi
-       ;;
-      esac
-      ;;
 
-    sunos4*)
-      archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       ld_shlibs_GCJ=no
-      fi
-      ;;
-    esac
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_CXX=yes
 
-    if test "$ld_shlibs_GCJ" = no; then
-      runpath_var=
-      hardcode_libdir_flag_spec_GCJ=
-      export_dynamic_flag_spec_GCJ=
-      whole_archive_flag_spec_GCJ=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      allow_undefined_flag_GCJ=unsupported
-      always_export_symbols_GCJ=yes
-      archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      hardcode_minus_L_GCJ=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-       # Neither direct hardcoding nor static linking is supported with a
-       # broken collect2.
-       hardcode_direct_GCJ=unsupported
-      fi
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_CXX in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
       ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-    aix4* | aix5*)
-      if test "$host_cpu" = ia64; then
-       # On IA64, the linker does run time linking by default, so we don't
-       # have to do anything special.
-       aix_use_runtimelinking=no
-       exp_sym_flag='-Bexport'
-       no_entry_flag=""
+      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_CXX
+       pic_flag=$lt_prog_compiler_pic_CXX
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+        allow_undefined_flag_CXX=
+        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+  (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+        then
+         archive_cmds_need_lc_CXX=no
+        else
+         archive_cmds_need_lc_CXX=yes
+        fi
+        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
       else
-       # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
-       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-         export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-       else
-         export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-       fi
-       aix_use_runtimelinking=no
-
-       # Test if we are trying to use run time linking or normal
-       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
-       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
-         for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-           aix_use_runtimelinking=yes
-           break
-         fi
-         done
-         ;;
-       esac
-
-       exp_sym_flag='-bexport'
-       no_entry_flag='-bnoentry'
+        cat conftest.err 1>&5
       fi
+      $RM conftest*
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5
+$as_echo "$archive_cmds_need_lc_CXX" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
 
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
-      archive_cmds_GCJ=''
-      hardcode_direct_GCJ=yes
-      hardcode_libdir_separator_GCJ=':'
-      link_all_deplibs_GCJ=yes
 
-      if test "$GCC" = yes; then
-       case $host_os in aix4.[012]|aix4.[012].*)
-       # We only want to do this on AIX 4.2 and lower, the check
-       # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
-         if test -f "$collect2name" && \
-          strings "$collect2name" | grep resolve_lib_name >/dev/null
-         then
-         # We have reworked collect2
-         hardcode_direct_GCJ=yes
-         else
-         # We have old collect2
-         hardcode_direct_GCJ=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         hardcode_minus_L_GCJ=yes
-         hardcode_libdir_flag_spec_GCJ='-L$libdir'
-         hardcode_libdir_separator_GCJ=
-         fi
-         ;;
-       esac
-       shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
-       fi
-      else
-       # not using gcc
-       if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-         shared_flag='-G'
-       else
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
-         else
-           shared_flag='${wl}-bM:SRE'
-         fi
-       fi
-      fi
 
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      always_export_symbols_GCJ=yes
-      if test "$aix_use_runtimelinking" = yes; then
-       # Warning - without using the other runtime loading flags (-brtl),
-       # -berok will link without error, but may produce a broken library.
-       allow_undefined_flag_GCJ='-berok'
-       # Determine the default libpath from the value encoded in an empty executable.
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
 
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
 
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-       hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
-       archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-       else
-       if test "$host_cpu" = ia64; then
-         hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
-         allow_undefined_flag_GCJ="-z nodefs"
-         archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-       else
-        # Determine the default libpath from the value encoded in an empty executable.
-        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
 
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
 
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-        hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
-         # Warning - without using the other run time loading flags,
-         # -berok will link without error, but may produce a broken library.
-         no_undefined_flag_GCJ=' ${wl}-bernotok'
-         allow_undefined_flag_GCJ=' ${wl}-berok'
-         # Exported symbols can be pulled into shared objects from archives
-         whole_archive_flag_spec_GCJ='$convenience'
-         archive_cmds_need_lc_GCJ=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-       fi
-      fi
-      ;;
 
-    amigaos*)
-      archive_cmds_GCJ='$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)'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_minus_L_GCJ=yes
-      # see comment about different semantics on the GNU ld section
-      ld_shlibs_GCJ=no
-      ;;
 
-    bsdi[45]*)
-      export_dynamic_flag_spec_GCJ=-rdynamic
-      ;;
 
-    cygwin* | mingw* | pw32*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec_GCJ=' '
-      allow_undefined_flag_GCJ=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_From_new_cmds_GCJ='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes_GCJ=yes
-      ;;
 
-    darwin* | rhapsody*)
-      case $host_os in
-        rhapsody* | darwin1.[012])
-         allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[012])
-               allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-      esac
-      archive_cmds_need_lc_GCJ=no
-      hardcode_direct_GCJ=no
-      hardcode_automatic_GCJ=yes
-      hardcode_shlibpath_var_GCJ=unsupported
-      whole_archive_flag_spec_GCJ=''
-      link_all_deplibs_GCJ=yes
-    if test "$GCC" = yes ; then
-       output_verbose_link_cmd='echo'
-        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-         module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         ld_shlibs_GCJ=no
-          ;;
-      esac
-    fi
-      ;;
 
-    dgux*)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    freebsd1*)
-      ld_shlibs_GCJ=no
-      ;;
 
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_GCJ=yes
-      hardcode_minus_L_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | kfreebsd*-gnu | dragonfly*)
-      archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    hpux9*)
-      if test "$GCC" = yes; then
-       archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-       archive_cmds_GCJ='$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'
-      fi
-      hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
-      hardcode_direct_GCJ=yes
 
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L_GCJ=yes
-      export_dynamic_flag_spec_GCJ='${wl}-E'
-      ;;
 
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator_GCJ=:
 
-       hardcode_direct_GCJ=yes
-       export_dynamic_flag_spec_GCJ='${wl}-E'
 
-       # hardcode_minus_L: Not really in the search PATH,
-       # but as the default location of the library.
-       hardcode_minus_L_GCJ=yes
-      fi
-      ;;
 
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      else
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator_GCJ=:
 
-       case $host_cpu in
-       hppa*64*|ia64*)
-         hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
-         hardcode_direct_GCJ=no
-         hardcode_shlibpath_var_GCJ=no
-         ;;
-       *)
-         hardcode_direct_GCJ=yes
-         export_dynamic_flag_spec_GCJ='${wl}-E'
 
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         hardcode_minus_L_GCJ=yes
-         ;;
-       esac
-      fi
-      ;;
 
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-       archive_cmds_GCJ='$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'
-      else
-       archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
-      fi
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
-      link_all_deplibs_GCJ=yes
-      ;;
 
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-       archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    newsos6)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_GCJ=yes
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    openbsd*)
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-       archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-       hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
-       export_dynamic_flag_spec_GCJ='${wl}-E'
-      else
-       case $host_os in
-        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-          archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-          hardcode_libdir_flag_spec_GCJ='-R$libdir'
-          ;;
-        *)
-          archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-          hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
-          ;;
-       esac
-      fi
-      ;;
 
-    os2*)
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_minus_L_GCJ=yes
-      allow_undefined_flag_GCJ=unsupported
-      archive_cmds_GCJ='$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'
-      old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
 
-    osf3*)
-      if test "$GCC" = yes; then
-       allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds_GCJ='$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'
-      else
-       allow_undefined_flag_GCJ=' -expect_unresolved \*'
-       archive_cmds_GCJ='$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'
-      fi
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
-      ;;
 
-    osf4* | osf5*)     # as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-       allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds_GCJ='$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'
-       hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      else
-       allow_undefined_flag_GCJ=' -expect_unresolved \*'
-       archive_cmds_GCJ='$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'
-       archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
 
-       # Both c and cxx compiler support -rpath directly
-       hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
-      fi
-      hardcode_libdir_separator_GCJ=:
-      ;;
 
-    solaris*)
-      no_undefined_flag_GCJ=' -z text'
-      if test "$GCC" = yes; then
-       wlarc='${wl}'
-       archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
-      else
-       wlarc=''
-       archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      fi
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_shlibpath_var_GCJ=no
-      case $host_os in
-      solaris2.[0-5] | solaris2.[0-5].*) ;;
-      *)
-       # The compiler driver will combine linker options so we
-       # cannot just pass the convience library names through
-       # without $wl, iff we do not link with $LD.
-       # Luckily, gcc supports the same syntax we need for Sun Studio.
-       # Supported since Solaris 2.6 (maybe 2.5.1?)
-       case $wlarc in
-       '')
-         whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
-       *)
-         whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
-       esac ;;
-      esac
-      link_all_deplibs_GCJ=yes
-      ;;
 
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-       # Use $CC to link under sequent, because it throws in some extra .o
-       # files that make .init and .fini sections work.
-       archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_minus_L_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    sysv4)
-      case $host_vendor in
-       sni)
-         archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct_GCJ=yes # is this really true???
-       ;;
-       siemens)
-         ## LD is ld it makes a PLAMLIB
-         ## CC just makes a GrossModule.
-         archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-         reload_cmds_GCJ='$CC -r -o $output$reload_objs'
-         hardcode_direct_GCJ=no
-        ;;
-       motorola)
-         archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
-       ;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    sysv4.3*)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var_GCJ=no
-      export_dynamic_flag_spec_GCJ='-Bexport'
-      ;;
 
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_shlibpath_var_GCJ=no
-       runpath_var=LD_RUN_PATH
-       hardcode_runpath_var=yes
-       ld_shlibs_GCJ=yes
-      fi
-      ;;
 
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
-      no_undefined_flag_GCJ='${wl}-z,text'
-      archive_cmds_need_lc_GCJ=no
-      hardcode_shlibpath_var_GCJ=no
-      runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-       archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
 
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      no_undefined_flag_GCJ='${wl}-z,text'
-      allow_undefined_flag_GCJ='${wl}-z,nodefs'
-      archive_cmds_need_lc_GCJ=no
-      hardcode_shlibpath_var_GCJ=no
-      hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-      hardcode_libdir_separator_GCJ=':'
-      link_all_deplibs_GCJ=yes
-      export_dynamic_flag_spec_GCJ='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-       archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
 
-    uts4*)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    *)
-      ld_shlibs_GCJ=no
-      ;;
-    esac
-  fi
 
-{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
-echo "${ECHO_T}$ld_shlibs_GCJ" >&6; }
-test "$ld_shlibs_GCJ" = no && can_build_shared=no
 
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc_GCJ" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc_GCJ=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds_GCJ in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
-      $rm conftest*
-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl_GCJ
-       pic_flag=$lt_prog_compiler_pic_GCJ
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
-        allow_undefined_flag_GCJ=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-        then
-         archive_cmds_need_lc_GCJ=no
-        else
-         archive_cmds_need_lc_GCJ=yes
-        fi
-        allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $rm conftest*
-      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; }
-      ;;
-    esac
-  fi
-  ;;
-esac
 
-{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
@@ -19702,20 +14333,6 @@ shlibpath_overrides_runpath=unknown
 version_type=none
 dynamic_linker="$host_os ld.so"
 sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
 need_lib_prefix=unknown
 hardcode_into_libs=no
 
@@ -19733,7 +14350,7 @@ aix3*)
   soname_spec='${libname}${release}${shared_ext}$major'
   ;;
 
-aix4* | aix5*)
+aix[4-9]*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -19752,7 +14369,7 @@ aix4* | aix5*)
       aix4 | aix4.[01] | aix4.[01].*)
       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
           echo ' yes '
-          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+          echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
        :
       else
        can_build_shared=no
@@ -19778,9 +14395,13 @@ aix4* | aix5*)
   ;;
 
 amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  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'
+  if test "$host_cpu" = m68k; then
+    library_names_spec='$libname.ixlibrary $libname.a'
+    # Create ${libname}_ixlibrary.a entries in /sys/libs.
+    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'
+  else
+    dynamic_linker=no
+  fi
   ;;
 
 beos*)
@@ -19814,14 +14435,17 @@ cygwin* | mingw* | pw32*)
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
     postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname'
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
       dlpath=$dir/\$dldll~
-       $rm \$dlpath'
+       $RM \$dlpath'
     shlibpath_overrides_runpath=yes
 
     case $host_os in
@@ -19833,17 +14457,17 @@ cygwin* | mingw* | pw32*)
     mingw*)
       # MinGW DLLs use traditional 'lib' prefix
       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
         # It is most probably a Windows format PATH printed by
         # mingw gcc, but we are running on Cygwin. Gcc prints its search
         # path with ; separators, and with drive letters. We can handle the
         # drive letters (cygwin fileutils understands them), so leave them,
         # especially as we might pass files found there to a mingw objdump,
         # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
       else
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
       fi
       ;;
     pw32*)
@@ -19867,17 +14491,12 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
   soname_spec='${libname}${release}${major}$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
-  else
-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
-  fi
+
   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
   ;;
 
@@ -19894,18 +14513,6 @@ freebsd1*)
   dynamic_linker=no
   ;;
 
-kfreebsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -19943,7 +14550,7 @@ freebsd* | dragonfly*)
     shlibpath_overrides_runpath=no
     hardcode_into_libs=yes
     ;;
-  freebsd*) # from 4.6 on
+  *) # from 4.6 on, and DragonFly
     shlibpath_overrides_runpath=yes
     hardcode_into_libs=yes
     ;;
@@ -19982,18 +14589,18 @@ hpux9* | hpux10* | hpux11*)
     fi
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
-   hppa*64*)
-     shrext_cmds='.sl'
-     hardcode_into_libs=yes
-     dynamic_linker="$host_os dld.sl"
-     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-     soname_spec='${libname}${release}${shared_ext}$major'
-     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-     ;;
-   *)
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
     shrext_cmds='.sl'
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
@@ -20006,7 +14613,7 @@ hpux9* | hpux10* | hpux11*)
   postinstall_cmds='chmod 555 $lib'
   ;;
 
-interix3*)
+interix[3-9]*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -20061,7 +14668,7 @@ linux*oldld* | linux*aout* | linux*coff*)
   ;;
 
 # This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -20070,6 +14677,32 @@ linux*)
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
+       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+  shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
@@ -20077,7 +14710,7 @@ linux*)
 
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[      ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
@@ -20090,23 +14723,11 @@ linux*)
   dynamic_linker='GNU/Linux ld.so'
   ;;
 
-knetbsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
 netbsd*)
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
@@ -20127,14 +14748,16 @@ newsos6)
   shlibpath_overrides_runpath=yes
   ;;
 
-nto-qnx*)
-  version_type=linux
+*nto* | *qnx*)
+  version_type=qnx
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
   ;;
 
 openbsd*)
@@ -20143,13 +14766,13 @@ openbsd*)
   need_lib_prefix=no
   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
   case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
   esac
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
     case $host_os in
       openbsd2.[89] | openbsd2.[89].*)
        shlibpath_overrides_runpath=no
@@ -20183,6 +14806,10 @@ osf3* | osf4* | osf5*)
   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
   ;;
 
+rdos*)
+  dynamic_linker=no
+  ;;
+
 solaris*)
   version_type=linux
   need_lib_prefix=no
@@ -20217,7 +14844,6 @@ sysv4 | sysv4.3*)
     sni)
       shlibpath_overrides_runpath=no
       need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
       runpath_var=LD_RUN_PATH
       ;;
     siemens)
@@ -20248,13 +14874,12 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
   if test "$with_gnu_ld" = yes; then
     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-    shlibpath_overrides_runpath=no
   else
     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    shlibpath_overrides_runpath=yes
     case $host_os in
       sco3.2v5*)
         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
@@ -20264,6 +14889,17 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
   sys_lib_dlsearch_path_spec='/usr/lib'
   ;;
 
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
 uts4*)
   version_type=linux
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -20275,8 +14911,8 @@ uts4*)
   dynamic_linker=no
   ;;
 esac
-{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
 test "$dynamic_linker" = no && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
@@ -20284,3091 +14920,3104 @@ if test "$GCC" = yes; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
 
-{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
-hardcode_action_GCJ=
-if test -n "$hardcode_libdir_flag_spec_GCJ" || \
-   test -n "$runpath_var_GCJ" || \
-   test "X$hardcode_automatic_GCJ" = "Xyes" ; then
-
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct_GCJ" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
-     test "$hardcode_minus_L_GCJ" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action_GCJ=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action_GCJ=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action_GCJ=unsupported
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
 fi
-{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
-echo "${ECHO_T}$hardcode_action_GCJ" >&6; }
-
-if test "$hardcode_action_GCJ" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
 fi
 
 
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    compiler_GCJ \
-    CC_GCJ \
-    LD_GCJ \
-    lt_prog_compiler_wl_GCJ \
-    lt_prog_compiler_pic_GCJ \
-    lt_prog_compiler_static_GCJ \
-    lt_prog_compiler_no_builtin_flag_GCJ \
-    export_dynamic_flag_spec_GCJ \
-    thread_safe_flag_spec_GCJ \
-    whole_archive_flag_spec_GCJ \
-    enable_shared_with_static_runtimes_GCJ \
-    old_archive_cmds_GCJ \
-    old_archive_from_new_cmds_GCJ \
-    predep_objects_GCJ \
-    postdep_objects_GCJ \
-    predeps_GCJ \
-    postdeps_GCJ \
-    compiler_lib_search_path_GCJ \
-    archive_cmds_GCJ \
-    archive_expsym_cmds_GCJ \
-    postinstall_cmds_GCJ \
-    postuninstall_cmds_GCJ \
-    old_archive_from_expsyms_cmds_GCJ \
-    allow_undefined_flag_GCJ \
-    no_undefined_flag_GCJ \
-    export_symbols_cmds_GCJ \
-    hardcode_libdir_flag_spec_GCJ \
-    hardcode_libdir_flag_spec_ld_GCJ \
-    hardcode_libdir_separator_GCJ \
-    hardcode_automatic_GCJ \
-    module_cmds_GCJ \
-    module_expsym_cmds_GCJ \
-    lt_cv_prog_compiler_c_o_GCJ \
-    exclude_expsyms_GCJ \
-    include_expsyms_GCJ; do
-
-    case $var in
-    old_archive_cmds_GCJ | \
-    old_archive_from_new_cmds_GCJ | \
-    archive_cmds_GCJ | \
-    archive_expsym_cmds_GCJ | \
-    module_cmds_GCJ | \
-    module_expsym_cmds_GCJ | \
-    old_archive_from_expsyms_cmds_GCJ | \
-    export_symbols_cmds_GCJ | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
 
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
 
-cfgfile="$ofile"
 
-  cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
 
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
 
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
 
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
 
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_GCJ
 
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
 
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
 
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
 
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
 
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
 
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
 
-# A C compiler.
-LTCC=$lt_LTCC
 
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
 
-# A language-specific compiler.
-CC=$lt_compiler_GCJ
 
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_GCJ
 
-# An ERE matcher.
-EGREP=$lt_EGREP
 
-# The linker used to build libraries.
-LD=$lt_LD_GCJ
 
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
 
-# A BSD-compatible nm program.
-NM=$lt_NM
 
-# A symbol stripping program
-STRIP=$lt_STRIP
 
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
 
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
 
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
 
-# Used on cygwin: assembler.
-AS="$AS"
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_GCJ
 
-# Object file suffix (normally "o").
-objext="$ac_objext"
 
-# Old archive suffix (normally "a").
-libext="$libext"
 
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
 
-# Executable file suffix (normally "").
-exeext="$exeext"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" ||
+   test -n "$runpath_var_CXX" ||
+   test "X$hardcode_automatic_CXX" = "Xyes" ; then
 
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_GCJ
-pic_mode=$pic_mode
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct_CXX" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+     test "$hardcode_minus_L_CXX" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_CXX=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_CXX=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_CXX=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
+$as_echo "$hardcode_action_CXX" >&6; }
 
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
+if test "$hardcode_action_CXX" = relink ||
+   test "$inherit_rpath_CXX" = yes; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
 
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
 
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
 
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
 
-# Do we need a version for libraries?
-need_version=$need_version
 
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
 
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
 
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
+  fi # test -n "$compiler"
+
+  CC=$lt_save_CC
+  LDCXX=$LD
+  LD=$lt_save_LD
+  GCC=$lt_save_GCC
+  with_gnu_ld=$lt_save_with_gnu_ld
+  lt_cv_path_LDCXX=$lt_cv_path_LD
+  lt_cv_path_LD=$lt_save_path_LD
+  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
 
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_GCJ
 
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
 
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
 
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
 
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
 
-# Library versioning type.
-version_type=$version_type
 
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
 
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
 
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
 
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_GCJ
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
 
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
+        ac_config_commands="$ac_config_commands libtool"
 
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_GCJ
-archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
 
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds_GCJ
-module_expsym_cmds=$lt_module_expsym_cmds_GCJ
 
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_predep_objects_GCJ
+# Only expand once:
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects_GCJ
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_GCJ
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_GCJ
+#
+# Check for AViiON Machines running DGUX
+# FIXME: Should this be moved down to below the gc-debug processing?
+#
+ac_is_dgux=no
+ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
+  ac_is_dgux=yes;
+fi
 
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
 
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
 
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
+    ## :GOTCHA: we do not check anything but sys/dg_sys_info.h
+if test $ac_is_dgux = yes; then
+    if test "$enable_gc_debug" = "yes"; then
+      CFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
+      CXXFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
+    else
+      CFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
+      CXXFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
+    fi
 
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_GCJ
 
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_GCJ
+fi
 
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
 
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
+# Check whether --with-target-subdir was given.
+if test "${with_target_subdir+set}" = set; then :
+  withval=$with_target_subdir;
+fi
 
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+# Check whether --with-cross-host was given.
+if test "${with_cross_host+set}" = set; then :
+  withval=$with_cross_host;
+fi
 
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
+# automake wants to see AC_EXEEXT.  But we don't need it.  And having
+# it is actually a problem, because the compiler we're passed can't
+# necessarily do a full link.  So we fool automake here.
+if false; then
+  # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
+  # to nothing, so nothing would remain between `then' and `fi' if it
+  # were not for the `:' below.
+  :
 
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
+fi
 
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Solaris gcc optimization fix is necessary" >&5
+$as_echo_n "checking whether Solaris gcc optimization fix is necessary... " >&6; }
+case "$host" in
+ *aix*)
+    if test "$GCC" = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       new_CFLAGS=
+       for i in $CFLAGS; do
+         case "$i" in
+          -O*)
+             ;;
+          *)
+             new_CFLAGS="$new_CFLAGS $i"
+             ;;
+         esac
+       done
+       CFLAGS="$new_CFLAGS"
+    else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    fi
+    ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; } ;;
+esac
 
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_GCJ
 
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
+$as_echo "#define NO_EXECUTE_PERMISSION 1" >>confdefs.h
 
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
 
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
+$as_echo "#define ALL_INTERIOR_POINTERS 1" >>confdefs.h
 
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
 
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_GCJ
 
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_GCJ
+# Check whether --enable-gcj-support was given.
+if test "${enable_gcj_support+set}" = set; then :
+  enableval=$enable_gcj_support;
+fi
 
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
+ if test x"$enable_gcj_support" != xno; then
+  ENABLE_GCJ_SUPPORT_TRUE=
+  ENABLE_GCJ_SUPPORT_FALSE='#'
+else
+  ENABLE_GCJ_SUPPORT_TRUE='#'
+  ENABLE_GCJ_SUPPORT_FALSE=
+fi
 
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic_GCJ
+if test x"$enable_gcj_support" != xno; then
 
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
+$as_echo "#define GC_GCJ_SUPPORT 1" >>confdefs.h
 
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_GCJ
+fi
 
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_GCJ"
 
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_GCJ
 
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_GCJ
+UNWINDLIBS=
+# Check whether --enable-gc-debug was given.
+if test "${enable_gc_debug+set}" = set; then :
+  enableval=$enable_gc_debug;  if test "$enable_gc_debug" = "yes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Should define GC_DEBUG and use debug alloc. in clients.\"" >&5
+$as_echo "$as_me: WARNING: \"Should define GC_DEBUG and use debug alloc. in clients.\"" >&2;}
 
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
+$as_echo "#define KEEP_BACK_PTRS 1" >>confdefs.h
 
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_GCJ
+    keep_back_ptrs=true
 
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_GCJ
+$as_echo "#define DBG_HDRS_ALL 1" >>confdefs.h
 
-# ### END LIBTOOL TAG CONFIG: $tagname
+    case $host in
+      ia64-*-linux* )
+       $as_echo "#define MAKE_BACK_GRAPH 1" >>confdefs.h
 
-__EOF__
+       $as_echo "#define SAVE_CALL_COUNT 8" >>confdefs.h
 
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace in -lunwind" >&5
+$as_echo_n "checking for backtrace in -lunwind... " >&6; }
+if test "${ac_cv_lib_unwind_backtrace+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lunwind  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char backtrace ();
+int
+main ()
+{
+return backtrace ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_unwind_backtrace=yes
 else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
-  fi
+  ac_cv_lib_unwind_backtrace=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_unwind_backtrace" >&5
+$as_echo "$ac_cv_lib_unwind_backtrace" >&6; }
+if test "x$ac_cv_lib_unwind_backtrace" = x""yes; then :
 
+         $as_echo "#define GC_HAVE_BUILTIN_BACKTRACE 1" >>confdefs.h
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+         UNWINDLIBS=-lunwind
+         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Client code may need to link against libunwind.\"" >&5
+$as_echo "$as_me: WARNING: \"Client code may need to link against libunwind.\"" >&2;}
 
-CC="$lt_save_CC"
+fi
 
-       else
-         tagname=""
-       fi
-       ;;
+      ;;
+      x86-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
+       $as_echo "#define MAKE_BACK_GRAPH 1" >>confdefs.h
 
-      RC)
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Client must not use -fomit-frame-pointer.\"" >&5
+$as_echo "$as_me: WARNING: \"Client must not use -fomit-frame-pointer.\"" >&2;}
+       $as_echo "#define SAVE_CALL_COUNT 8" >>confdefs.h
 
+      ;;
+      i345686-*-dgux*)
+       $as_echo "#define MAKE_BACK_GRAPH 1" >>confdefs.h
 
-# Source file extension for RC test sources.
-ac_ext=rc
+      ;;
+    esac
+  fi
+fi
 
-# Object file extension for compiled RC test sources.
-objext=o
-objext_RC=$objext
+ if test x"$keep_back_ptrs" = xtrue; then
+  KEEP_BACK_PTRS_TRUE=
+  KEEP_BACK_PTRS_FALSE='#'
+else
+  KEEP_BACK_PTRS_TRUE='#'
+  KEEP_BACK_PTRS_FALSE=
+fi
 
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
 
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
+# Check whether --enable-java-finalization was given.
+if test "${enable_java_finalization+set}" = set; then :
+  enableval=$enable_java_finalization;
+fi
 
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+if test x"$enable_java_finalization" != xno; then
 
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
+$as_echo "#define JAVA_FINALIZATION 1" >>confdefs.h
 
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+fi
 
-# Allow CC to be a program name with arguments.
-compiler=$CC
+# Check whether --enable-atomic-uncollectable was given.
+if test "${enable_atomic_uncollectable+set}" = set; then :
+  enableval=$enable_atomic_uncollectable;
+fi
 
+if test x"$enable_atomic_uncollectible" != x"no"; then
 
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
+$as_echo "#define ATOMIC_UNCOLLECTABLE 1" >>confdefs.h
 
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
+fi
 
+# Check whether --enable-redirect-malloc was given.
+if test "${enable_redirect_malloc+set}" = set; then :
+  enableval=$enable_redirect_malloc;
+fi
 
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${RC-"windres"}
-compiler=$CC
-compiler_RC=$CC
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-lt_cv_prog_compiler_c_o_RC=yes
-
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    compiler_RC \
-    CC_RC \
-    LD_RC \
-    lt_prog_compiler_wl_RC \
-    lt_prog_compiler_pic_RC \
-    lt_prog_compiler_static_RC \
-    lt_prog_compiler_no_builtin_flag_RC \
-    export_dynamic_flag_spec_RC \
-    thread_safe_flag_spec_RC \
-    whole_archive_flag_spec_RC \
-    enable_shared_with_static_runtimes_RC \
-    old_archive_cmds_RC \
-    old_archive_from_new_cmds_RC \
-    predep_objects_RC \
-    postdep_objects_RC \
-    predeps_RC \
-    postdeps_RC \
-    compiler_lib_search_path_RC \
-    archive_cmds_RC \
-    archive_expsym_cmds_RC \
-    postinstall_cmds_RC \
-    postuninstall_cmds_RC \
-    old_archive_from_expsyms_cmds_RC \
-    allow_undefined_flag_RC \
-    no_undefined_flag_RC \
-    export_symbols_cmds_RC \
-    hardcode_libdir_flag_spec_RC \
-    hardcode_libdir_flag_spec_ld_RC \
-    hardcode_libdir_separator_RC \
-    hardcode_automatic_RC \
-    module_cmds_RC \
-    module_expsym_cmds_RC \
-    lt_cv_prog_compiler_c_o_RC \
-    exclude_expsyms_RC \
-    include_expsyms_RC; do
-
-    case $var in
-    old_archive_cmds_RC | \
-    old_archive_from_new_cmds_RC | \
-    archive_cmds_RC | \
-    archive_expsym_cmds_RC | \
-    module_cmds_RC | \
-    module_expsym_cmds_RC | \
-    old_archive_from_expsyms_cmds_RC | \
-    export_symbols_cmds_RC | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
 
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
+if test "${enable_redirect_malloc}" = yes; then
+    if test "${enable_gc_debug}" = yes; then
 
-cfgfile="$ofile"
+$as_echo "#define REDIRECT_MALLOC GC_debug_malloc_replacement" >>confdefs.h
 
-  cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
 
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+$as_echo "#define REDIRECT_REALLOC GC_debug_realloc_replacement" >>confdefs.h
 
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
 
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
+$as_echo "#define REDIRECT_FREE GC_debug_free" >>confdefs.h
 
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
+    else
+       $as_echo "#define REDIRECT_MALLOC GC_malloc" >>confdefs.h
 
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_RC
+    fi
 
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
+$as_echo "#define GC_USE_DLOPEN_WRAP 1" >>confdefs.h
 
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
+fi
 
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
+# Check whether --enable-large-config was given.
+if test "${enable_large_config+set}" = set; then :
+  enableval=$enable_large_config;
+fi
 
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
 
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
+if test "${enable_large_config}" = yes; then
 
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
+$as_echo "#define LARGE_CONFIG 1" >>confdefs.h
 
-# A C compiler.
-LTCC=$lt_LTCC
+fi
 
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
+if test -n "${with_cross_host}"; then
 
-# A language-specific compiler.
-CC=$lt_compiler_RC
+$as_echo "#define NO_CLOCK 1" >>confdefs.h
 
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_RC
 
-# An ERE matcher.
-EGREP=$lt_EGREP
+$as_echo "#define SMALL_CONFIG 1" >>confdefs.h
 
-# The linker used to build libraries.
-LD=$lt_LD_RC
 
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
+$as_echo "#define NO_DEBUGGING 1" >>confdefs.h
+
+fi
 
-# A BSD-compatible nm program.
-NM=$lt_NM
 
-# A symbol stripping program
-STRIP=$lt_STRIP
 
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
 
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
+# Check whether --enable-gc-assertions was given.
+if test "${enable_gc_assertions+set}" = set; then :
+  enableval=$enable_gc_assertions;
+fi
 
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
+if test "${enable_gc_assertions}" = yes; then
 
-# Used on cygwin: assembler.
-AS="$AS"
+$as_echo "#define GC_ASSERTIONS 1" >>confdefs.h
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
+fi
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
+# Check whether --enable-munmap was given.
+if test "${enable_munmap+set}" = set; then :
+  enableval=$enable_munmap; MUNMAP_THRESHOLD=$enableval;
+   case "$MMAP" in
+      no)
+        as_fn_error "--enable-munmap requires --enable-mmap" "$LINENO" 5
+        ;;
+    esac
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_RC
+fi
 
-# Object file suffix (normally "o").
-objext="$ac_objext"
+if test "${enable_munmap}" != ""; then
 
-# Old archive suffix (normally "a").
-libext="$libext"
+$as_echo "#define USE_MMAP 1" >>confdefs.h
 
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
 
-# Executable file suffix (normally "").
-exeext="$exeext"
+$as_echo "#define USE_MUNMAP 1" >>confdefs.h
 
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_RC
-pic_mode=$pic_mode
+    if test "${MUNMAP_THRESHOLD}" = "yes"; then
+      MUNMAP_THRESHOLD=6
+    fi
 
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
+cat >>confdefs.h <<_ACEOF
+#define MUNMAP_THRESHOLD ${MUNMAP_THRESHOLD}
+_ACEOF
 
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
+fi
 
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
+ if test -z "$with_cross_host"; then
+  USE_LIBDIR_TRUE=
+  USE_LIBDIR_FALSE='#'
+else
+  USE_LIBDIR_TRUE='#'
+  USE_LIBDIR_FALSE=
+fi
 
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
 
-# Do we need a version for libraries?
-need_version=$need_version
 
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
+# Atomic Ops
+# ----------
 
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
+# Do we want to use an external libatomic_ops?  By default use it if it's
+# found.
 
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
+# Check whether --with-libatomic-ops was given.
+if test "${with_libatomic_ops+set}" = set; then :
+  withval=$with_libatomic_ops;
+else
+  with_libatomic_ops=check
+fi
 
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_RC
 
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
+# Check for an external libatomic_ops if the answer was yes or check.  If not
+# found, fail on yes, and convert check to no.
+if test x"$with_libatomic_ops" != xno; then :
+   ac_fn_c_check_header_mongrel "$LINENO" "atomic_ops.h" "ac_cv_header_atomic_ops_h" "$ac_includes_default"
+if test "x$ac_cv_header_atomic_ops_h" = x""yes; then :
 
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
+else
+   if test x"$with_libatomic_ops" != xcheck; then :
+  as_fn_error "A pre-installed libatomic_ops was not found." "$LINENO" 5
+fi
+       with_libatomic_ops=no
+fi
 
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
 
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
+fi
 
-# Library versioning type.
-version_type=$version_type
+# Finally, emit the definitions for bundled or pre-installed AO.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which libatomic_ops to use" >&5
+$as_echo_n "checking which libatomic_ops to use... " >&6; }
 
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
 
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
+if test x"$with_libatomic_ops" != xno; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+    ATOMIC_OPS_LIBS="-latomic_ops"
 
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
+$as_echo "bundled" >&6; }
+    subdirs="$subdirs libatomic_ops"
 
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_RC
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
+fi
+ if test x$with_libatomic_ops = xno -a x"$THREADS" != xnone; then
+  USE_INTERNAL_LIBATOMIC_OPS_TRUE=
+  USE_INTERNAL_LIBATOMIC_OPS_FALSE='#'
+else
+  USE_INTERNAL_LIBATOMIC_OPS_TRUE='#'
+  USE_INTERNAL_LIBATOMIC_OPS_FALSE=
+fi
 
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
+ if test x$with_libatomic_ops = xno -a x$need_atomic_ops_asm = xtrue; then
+  NEED_ATOMIC_OPS_ASM_TRUE=
+  NEED_ATOMIC_OPS_ASM_FALSE='#'
+else
+  NEED_ATOMIC_OPS_ASM_TRUE='#'
+  NEED_ATOMIC_OPS_ASM_FALSE=
+fi
 
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_RC
-archive_expsym_cmds=$lt_archive_expsym_cmds_RC
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
 
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds_RC
-module_expsym_cmds=$lt_module_expsym_cmds_RC
 
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
+ac_config_files="$ac_config_files Makefile bdw-gc.pc"
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_predep_objects_RC
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects_RC
+ac_config_commands="$ac_config_commands default"
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_RC
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_RC
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
 
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_RC
+_ACEOF
 
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
 
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+       "s/'/'\\\\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
 
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_RC
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_RC
+DEFS=-DHAVE_CONFIG_H
 
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
 
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
+LTLIBOBJS=$ac_ltlibobjs
 
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then
+  as_fn_error "conditional \"am__fastdepCCAS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${THREADS_TRUE}" && test -z "${THREADS_FALSE}"; then
+  as_fn_error "conditional \"THREADS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
+  as_fn_error "conditional \"PTHREADS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${DARWIN_THREADS_TRUE}" && test -z "${DARWIN_THREADS_FALSE}"; then
+  as_fn_error "conditional \"DARWIN_THREADS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${WIN32_THREADS_TRUE}" && test -z "${WIN32_THREADS_FALSE}"; then
+  as_fn_error "conditional \"WIN32_THREADS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${OPENBSD_THREADS_TRUE}" && test -z "${OPENBSD_THREADS_FALSE}"; then
+  as_fn_error "conditional \"OPENBSD_THREADS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COMPILER_XLC_TRUE}" && test -z "${COMPILER_XLC_FALSE}"; then
+  as_fn_error "conditional \"COMPILER_XLC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${AVOID_CPP_LIB_TRUE}" && test -z "${AVOID_CPP_LIB_FALSE}"; then
+  as_fn_error "conditional \"AVOID_CPP_LIB\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${CPLUSPLUS_TRUE}" && test -z "${CPLUSPLUS_FALSE}"; then
+  as_fn_error "conditional \"CPLUSPLUS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_GCJ_SUPPORT_TRUE}" && test -z "${ENABLE_GCJ_SUPPORT_FALSE}"; then
+  as_fn_error "conditional \"ENABLE_GCJ_SUPPORT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${KEEP_BACK_PTRS_TRUE}" && test -z "${KEEP_BACK_PTRS_FALSE}"; then
+  as_fn_error "conditional \"KEEP_BACK_PTRS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_LIBDIR_TRUE}" && test -z "${USE_LIBDIR_FALSE}"; then
+  as_fn_error "conditional \"USE_LIBDIR\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_INTERNAL_LIBATOMIC_OPS_TRUE}" && test -z "${USE_INTERNAL_LIBATOMIC_OPS_FALSE}"; then
+  as_fn_error "conditional \"USE_INTERNAL_LIBATOMIC_OPS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${NEED_ATOMIC_OPS_ASM_TRUE}" && test -z "${NEED_ATOMIC_OPS_ASM_FALSE}"; then
+  as_fn_error "conditional \"NEED_ATOMIC_OPS_ASM\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
 
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
 
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
 
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
 
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_RC
 
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
 
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
 
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
 
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""       $as_nl"
 
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_RC
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
 
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_RC
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
 
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
 
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic_RC
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
 
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_RC
 
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with status $?, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$?; test $as_status -eq 0 && as_status=1
+  if test "$3"; then
+    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  fi
+  $as_echo "$as_me: error: $1" >&2
+  as_fn_exit $as_status
+} # as_fn_error
 
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_RC"
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
 
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_RC
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
 
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_RC
 
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
 
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_RC
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
 
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_RC
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
 
-# ### END LIBTOOL TAG CONFIG: $tagname
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
 
-__EOF__
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
 
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
 
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
 else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
   fi
+else
+  as_ln_s='cp -p'
 fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
 
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
-       ;;
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
 
-      *)
-       { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
-echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
-   { (exit 1); exit 1; }; }
-       ;;
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
       esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
 
-      # Append the new tag name to the list of available tags.
-      if test -n "$tagname" ; then
-      available_tags="$available_tags $tagname"
-    fi
-    fi
-  done
-  IFS="$lt_save_ifs"
 
-  # Now substitute the updated list of available tags.
-  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
-    mv "${ofile}T" "$ofile"
-    chmod +x "$ofile"
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
   else
-    rm -f "${ofile}T"
-    { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
-echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
-   { (exit 1); exit 1; }; }
+    as_ls_L_option=
   fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
 fi
+as_executable_p=$as_test_x
 
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
 
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by gc $as_me 7.2alpha4, which was
+generated by GNU Autoconf 2.64.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
 
-# Prevent multiple expansion
+_ACEOF
 
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
 
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
 
 
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
 
+_ACEOF
 
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
 
+Usage: $0 [OPTION]... [TAG]...
 
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
 
+Configuration files:
+$config_files
 
+Configuration headers:
+$config_headers
 
+Configuration commands:
+$config_commands
 
+Report bugs to <Hans.Boehm@hp.com>."
 
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_version="\\
+gc config.status 7.2alpha4
+configured by $0, generated by GNU Autoconf 2.64,
+  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
+Copyright (C) 2009 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
 
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
 
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
 
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    as_fn_error "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
 
+  # This is an error.
+  -*) as_fn_error "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
 
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
 
+  esac
+  shift
+done
 
-#
-# Check for AViiON Machines running DGUX
-# FIXME: Should this be moved down to below the gc-debug processing?
-#
-ac_is_dgux=no
-if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
-echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
-echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
-echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <sys/dg_sys_info.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ac_configure_extra_args=
 
-       ac_header_compiler=no
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
-echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/dg_sys_info.h>
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
 fi
 
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: sys/dg_sys_info.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: sys/dg_sys_info.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## -------------------------------- ##
-## Report this to Hans.Boehm@hp.com ##
-## -------------------------------- ##
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
 _ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
-echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
-echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
+  $as_echo "$ac_log"
+} >&5
 
-fi
-if test $ac_cv_header_sys_dg_sys_info_h = yes; then
-  ac_is_dgux=yes;
-fi
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
 
 
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
-    ## :GOTCHA: we do not check anything but sys/dg_sys_info.h
-if test $ac_is_dgux = yes; then
-    if test "$enable_gc_debug" = "yes"; then
-      CFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
-      CXXFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
-    else
-      CFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
-      CXXFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
-    fi
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`'
+predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`'
+LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+DSYMUTIL \
+NMEDIT \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib \
+compiler_lib_search_dirs \
+predep_objects \
+postdep_objects \
+predeps \
+postdeps \
+compiler_lib_search_path \
+LD_CXX \
+compiler_CXX \
+lt_prog_compiler_no_builtin_flag_CXX \
+lt_prog_compiler_wl_CXX \
+lt_prog_compiler_pic_CXX \
+lt_prog_compiler_static_CXX \
+lt_cv_prog_compiler_c_o_CXX \
+export_dynamic_flag_spec_CXX \
+whole_archive_flag_spec_CXX \
+compiler_needs_object_CXX \
+with_gnu_ld_CXX \
+allow_undefined_flag_CXX \
+no_undefined_flag_CXX \
+hardcode_libdir_flag_spec_CXX \
+hardcode_libdir_flag_spec_ld_CXX \
+hardcode_libdir_separator_CXX \
+fix_srcfile_path_CXX \
+exclude_expsyms_CXX \
+include_expsyms_CXX \
+file_list_spec_CXX \
+compiler_lib_search_dirs_CXX \
+predep_objects_CXX \
+postdep_objects_CXX \
+predeps_CXX \
+postdeps_CXX \
+compiler_lib_search_path_CXX; do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
 
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec \
+old_archive_cmds_CXX \
+old_archive_from_new_cmds_CXX \
+old_archive_from_expsyms_cmds_CXX \
+archive_cmds_CXX \
+archive_expsym_cmds_CXX \
+module_cmds_CXX \
+module_expsym_cmds_CXX \
+export_symbols_cmds_CXX \
+prelink_cmds_CXX; do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
 
-fi
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"')  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+  ;;
+esac
 
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
 
-# Check whether --with-target-subdir was given.
-if test "${with_target_subdir+set}" = set; then
-  withval=$with_target_subdir;
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
 fi
 
 
-# Check whether --with-cross-host was given.
-if test "${with_cross_host+set}" = set; then
-  withval=$with_cross_host;
-fi
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'
 
 
-# automake wants to see AC_EXEEXT.  But we don't need it.  And having
-# it is actually a problem, because the compiler we're passed can't
-# necessarily do a full link.  So we fool automake here.
-if false; then
-  # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
-  # to nothing, so nothing would remain between `then' and `fi' if it
-  # were not for the `:' below.
-  :
 
-fi
 
-{ echo "$as_me:$LINENO: checking whether Solaris gcc optimization fix is necessary" >&5
-echo $ECHO_N "checking whether Solaris gcc optimization fix is necessary... $ECHO_C" >&6; }
-case "$host" in
- *aix*)
-    if test "$GCC" = yes; then
-       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       new_CFLAGS=
-       for i in $CFLAGS; do
-         case "$i" in
-          -O*)
-             ;;
-          *)
-             new_CFLAGS="$new_CFLAGS $i"
-             ;;
-         esac
-       done
-       CFLAGS="$new_CFLAGS"
-    else
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-    fi
-    ;;
- *) { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; } ;;
-esac
 
-cat >>confdefs.h <<\_ACEOF
-#define NO_EXECUTE_PERMISSION 1
-_ACEOF
+ srcdir="${srcdir}"
+    host=${host}
+    CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+    CC="${CC}"
+    DEFS="$DEFS"
 
-cat >>confdefs.h <<\_ACEOF
-#define ALL_INTERIOR_POINTERS 1
 _ACEOF
 
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "include/private/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/private/config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "bdw-gc.pc") CONFIG_FILES="$CONFIG_FILES bdw-gc.pc" ;;
+    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
 
-# Check whether --enable-gcj-support was given.
-if test "${enable_gcj_support+set}" = set; then
-  enableval=$enable_gcj_support;
-fi
-
+  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
 
 
-if test x"$enable_gcj_support" != xno; then
-  ENABLE_GCJ_SUPPORT_TRUE=
-  ENABLE_GCJ_SUPPORT_FALSE='#'
-else
-  ENABLE_GCJ_SUPPORT_TRUE='#'
-  ENABLE_GCJ_SUPPORT_FALSE=
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
 fi
 
-if test x"$enable_gcj_support" != xno; then
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
 
-cat >>confdefs.h <<\_ACEOF
-#define GC_GCJ_SUPPORT 1
-_ACEOF
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
 
-fi
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
 
 
-UNWINDLIBS=
-# Check whether --enable-gc-debug was given.
-if test "${enable_gc_debug+set}" = set; then
-  enableval=$enable_gc_debug;  if test "$enable_gc_debug" = "yes"; then
-    { echo "$as_me:$LINENO: WARNING: \"Should define GC_DEBUG and use debug alloc. in clients.\"" >&5
-echo "$as_me: WARNING: \"Should define GC_DEBUG and use debug alloc. in clients.\"" >&2;}
-    cat >>confdefs.h <<\_ACEOF
-#define KEEP_BACK_PTRS 1
-_ACEOF
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
 
-    cat >>confdefs.h <<\_ACEOF
-#define DBG_HDRS_ALL 1
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
 _ACEOF
 
-    case $host in
-      ia64-*-linux* )
-       cat >>confdefs.h <<\_ACEOF
-#define MAKE_BACK_GRAPH 1
-_ACEOF
 
-       cat >>confdefs.h <<\_ACEOF
-#define SAVE_CALL_COUNT 8
-_ACEOF
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
 
-        { echo "$as_me:$LINENO: checking for backtrace in -lunwind" >&5
-echo $ECHO_N "checking for backtrace in -lunwind... $ECHO_C" >&6; }
-if test "${ac_cv_lib_unwind_backtrace+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lunwind  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\).*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\).*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = "\a"
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char backtrace ();
-int
-main ()
+}
 {
-return backtrace ();
-  ;
-  return 0;
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
 }
+
+_ACAWK
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_unwind_backtrace=yes
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+  || as_fn_error "could not setup config files machinery" "$LINENO" 5
+_ACEOF
 
-       ac_cv_lib_unwind_backtrace=no
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[         ]*VPATH[        ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[    ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[      ]*$//
+}'
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_unwind_backtrace" >&5
-echo "${ECHO_T}$ac_cv_lib_unwind_backtrace" >&6; }
-if test $ac_cv_lib_unwind_backtrace = yes; then
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
 
-         cat >>confdefs.h <<\_ACEOF
-#define GC_HAVE_BUILTIN_BACKTRACE 1
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
 _ACEOF
 
-         UNWINDLIBS=-lunwind
-         { echo "$as_me:$LINENO: WARNING: \"Client code may need to link against libunwind.\"" >&5
-echo "$as_me: WARNING: \"Client code may need to link against libunwind.\"" >&2;}
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
 
-fi
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_t"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
 
-      ;;
-      x86-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
-       cat >>confdefs.h <<\_ACEOF
-#define MAKE_BACK_GRAPH 1
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[    ]*#[    ]*define[       ][      ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = "\a"
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
 _ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
 
-       { echo "$as_me:$LINENO: WARNING: \"Client must not use -fomit-frame-pointer.\"" >&5
-echo "$as_me: WARNING: \"Client must not use -fomit-frame-pointer.\"" >&2;}
-       cat >>confdefs.h <<\_ACEOF
-#define SAVE_CALL_COUNT 8
-_ACEOF
 
-      ;;
-      i345686-*-dgux*)
-       cat >>confdefs.h <<\_ACEOF
-#define MAKE_BACK_GRAPH 1
-_ACEOF
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
 
-      ;;
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+        # (if the path is not absolute).  The absolute path cannot be DOS-style,
+        # because $ac_f cannot contain `:'.
+        test -f "$ac_f" ||
+          case $ac_f in
+          [\\/$]*) false;;
+          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+          esac ||
+          as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+         $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+       `' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
     esac
-  fi
-fi
 
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin" \
+      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
 
-# Check whether --enable-java-finalization was given.
-if test "${enable_java_finalization+set}" = set; then
-  enableval=$enable_java_finalization;
-fi
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ac_file" : 'X\(//\)[^/]' \| \
+        X"$ac_file" : 'X\(//\)$' \| \
+        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
 
-if test x"$enable_java_finalization" != xno; then
-    cat >>confdefs.h <<\_ACEOF
-#define JAVA_FINALIZATION 1
-_ACEOF
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
 
-fi
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
 
-# Check whether --enable-atomic-uncollectable was given.
-if test "${enable_atomic_uncollectable+set}" = set; then
-  enableval=$enable_atomic_uncollectable;
-fi
 
-if test x"$enable_atomic_uncollectible" != x"no"; then
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
 
-cat >>confdefs.h <<\_ACEOF
-#define ATOMIC_UNCOLLECTABLE 1
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
 _ACEOF
 
-fi
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
 
-# Check whether --enable-redirect-malloc was given.
-if test "${enable_redirect_malloc+set}" = set; then
-  enableval=$enable_redirect_malloc;
-fi
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+  || as_fn_error "could not create $ac_file" "$LINENO" 5
 
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&2;}
 
-if test "${enable_redirect_malloc}" = yes; then
-    if test "${enable_gc_debug}" = yes; then
-       cat >>confdefs.h <<\_ACEOF
-#define REDIRECT_MALLOC GC_debug_malloc_replacement
-_ACEOF
+  rm -f "$tmp/stdin"
+  case $ac_file in
+  -) cat "$tmp/out" && rm -f "$tmp/out";;
+  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+    } >"$tmp/config.h" \
+      || as_fn_error "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f "$ac_file"
+      mv "$tmp/config.h" "$ac_file" \
+       || as_fn_error "could not create $ac_file" "$LINENO" 5
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error "could not create -" "$LINENO" 5
+  fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$_am_arg" : 'X\(//\)[^/]' \| \
+        X"$_am_arg" : 'X\(//\)$' \| \
+        X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
 
-       cat >>confdefs.h <<\_ACEOF
-#define REDIRECT_REALLOC GC_debug_realloc_replacement
-_ACEOF
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || # Autoconf 2.62 quotes --file arguments for eval, but not when files
+# are listed without --file.  Let's play safe and only enable the eval
+# if we detect the quoting.
+case $CONFIG_FILES in
+*\'*) eval set x "$CONFIG_FILES" ;;
+*)   set x $CONFIG_FILES ;;
+esac
+shift
+for mf
+do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # Grep'ing the whole file is not good either: AIX grep has a line
+  # limit of 2048, but all sed's we know have understand at least 4000.
+  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+    dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$mf" : 'X\(//\)[^/]' \| \
+        X"$mf" : 'X\(//\)$' \| \
+        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$file" : 'X\(//\)[^/]' \| \
+        X"$file" : 'X\(//\)$' \| \
+        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+    as_dir=$dirpart/$fdir; as_fn_mkdir_p
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+    "libtool":C)
 
-       cat >>confdefs.h <<\_ACEOF
-#define REDIRECT_FREE GC_debug_free
-_ACEOF
+    # See if we are running on zsh, and set the options which allow our
+    # commands through without removal of \ escapes.
+    if test -n "${ZSH_VERSION+set}" ; then
+      setopt NO_GLOB_SUBST
+    fi
 
-    else
-       cat >>confdefs.h <<\_ACEOF
-#define REDIRECT_MALLOC GC_malloc
-_ACEOF
+    cfgfile="${ofile}T"
+    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+    $RM "$cfgfile"
 
-    fi
-    cat >>confdefs.h <<\_ACEOF
-#define GC_USE_DLOPEN_WRAP 1
-_ACEOF
+    cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
 
-fi
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
-# Check whether --enable-large-config was given.
-if test "${enable_large_config+set}" = set; then
-  enableval=$enable_large_config;
-fi
 
+# The names of the tagged configurations supported by this script.
+available_tags="CXX "
 
-if test "${enable_large_config}" = yes; then
+# ### BEGIN LIBTOOL CONFIG
 
-cat >>confdefs.h <<\_ACEOF
-#define LARGE_CONFIG 1
-_ACEOF
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
 
-fi
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
 
-if test -n "${with_cross_host}"; then
-   cat >>confdefs.h <<\_ACEOF
-#define NO_CLOCK 1
-_ACEOF
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
 
-   cat >>confdefs.h <<\_ACEOF
-#define SMALL_CONFIG 1
-_ACEOF
+# What type of objects to build.
+pic_mode=$pic_mode
 
-   cat >>confdefs.h <<\_ACEOF
-#define NO_DEBUGGING 1
-_ACEOF
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
 
-fi
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
 
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
 
+# A sed program that does not truncate output.
+SED=$lt_SED
 
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
 
-# Check whether --enable-gc-assertions was given.
-if test "${enable_gc_assertions+set}" = set; then
-  enableval=$enable_gc_assertions;
-fi
+# A grep program that handles long lines.
+GREP=$lt_GREP
 
-if test "${enable_gc_assertions}" = yes; then
-    cat >>confdefs.h <<\_ACEOF
-#define GC_ASSERTIONS 1
-_ACEOF
+# An ERE matcher.
+EGREP=$lt_EGREP
 
-fi
+# A literal string matcher.
+FGREP=$lt_FGREP
 
-# Check whether --enable-munmap was given.
-if test "${enable_munmap+set}" = set; then
-  enableval=$enable_munmap; MUNMAP_THRESHOLD=$enableval;
-   case "$MMAP" in
-      no)
-        { { echo "$as_me:$LINENO: error: --enable-munmap requires --enable-mmap" >&5
-echo "$as_me: error: --enable-munmap requires --enable-mmap" >&2;}
-   { (exit 1); exit 1; }; }
-        ;;
-    esac
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
 
-fi
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
 
-if test "${enable_munmap}" != ""; then
-    cat >>confdefs.h <<\_ACEOF
-#define USE_MMAP 1
-_ACEOF
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
 
-    cat >>confdefs.h <<\_ACEOF
-#define USE_MUNMAP 1
-_ACEOF
+# Object file suffix (normally "o").
+objext=$ac_objext
 
-    if test "${MUNMAP_THRESHOLD}" = "yes"; then
-      MUNMAP_THRESHOLD=6
-    fi
-    cat >>confdefs.h <<_ACEOF
-#define MUNMAP_THRESHOLD ${MUNMAP_THRESHOLD}
-_ACEOF
+# Executable file suffix (normally "").
+exeext=$exeext
 
-fi
+# whether the shell understands "unset".
+lt_unset=$lt_unset
 
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
 
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
 
-if test -z "$with_cross_host"; then
-  USE_LIBDIR_TRUE=
-  USE_LIBDIR_FALSE='#'
-else
-  USE_LIBDIR_TRUE='#'
-  USE_LIBDIR_FALSE=
-fi
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
 
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
 
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
 
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
 
-atomic_ops_libs=-latomic_ops
-if test "${ac_cv_header_atomic_ops_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for atomic_ops.h" >&5
-echo $ECHO_N "checking for atomic_ops.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_atomic_ops_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_atomic_ops_h" >&5
-echo "${ECHO_T}$ac_cv_header_atomic_ops_h" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking atomic_ops.h usability" >&5
-echo $ECHO_N "checking atomic_ops.h usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <atomic_ops.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# A symbol stripping program.
+STRIP=$lt_STRIP
 
-       ac_header_compiler=no
-fi
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+# A C compiler.
+LTCC=$lt_CC
 
-# Is the header present?
-{ echo "$as_me:$LINENO: checking atomic_ops.h presence" >&5
-echo $ECHO_N "checking atomic_ops.h presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <atomic_ops.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
 
-  ac_header_preproc=no
-fi
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: atomic_ops.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: atomic_ops.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: atomic_ops.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: atomic_ops.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: atomic_ops.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: atomic_ops.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: atomic_ops.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: atomic_ops.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: atomic_ops.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: atomic_ops.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: atomic_ops.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: atomic_ops.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: atomic_ops.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: atomic_ops.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: atomic_ops.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: atomic_ops.h: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## -------------------------------- ##
-## Report this to Hans.Boehm@hp.com ##
-## -------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for atomic_ops.h" >&5
-echo $ECHO_N "checking for atomic_ops.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_atomic_ops_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_atomic_ops_h=$ac_header_preproc
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_atomic_ops_h" >&5
-echo "${ECHO_T}$ac_cv_header_atomic_ops_h" >&6; }
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
-fi
-if test $ac_cv_header_atomic_ops_h = yes; then
-   { echo "$as_me:$LINENO: Using pre-installed libatomic_ops" >&5
-echo "$as_me: Using pre-installed libatomic_ops" >&6;}
-else
-   ao_dir=
-    for candidate in ${srcdir}/libatomic_ops*; do
-       case $candidate in
-           *.tar.gz)
-               ;;
-           *install)
-                               ;;
-           *)
-               if test -e "$candidate"; then
-                   ao_dir="$candidate"
-               fi
-               ;;
-       esac
-    done
-    if test -z "$ao_dir"; then
-       { { echo "$as_me:$LINENO: error: Missig libatomic_ops." >&5
-echo "$as_me: error: Missig libatomic_ops." >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-    ao_version="${ao_dir#*libatomic_ops-}"
-    { echo "$as_me:$LINENO: Using internal version of libatomic_ops" >&5
-echo "$as_me: Using internal version of libatomic_ops" >&6;}
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
 
-        test -e libatomic_ops \
-       || ln -s ${ao_dir} libatomic_ops
-    subdirs="$subdirs libatomic_ops"
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
 
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
 
-        test -e atomic_ops.c \
-       || ln -s libatomic_ops/src/atomic_ops.c \
-                atomic_ops.c
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
 
-    test -e atomic_ops_sysdeps.S \
-       || ln -s libatomic_ops/src/atomic_ops_sysdeps.S \
-                atomic_ops_sysdeps.S
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
 
-            GC_CFLAGS="${GC_CFLAGS} -I libatomic_ops/src"
-    maybe_libatomic_ops="libatomic_ops"
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
 
-fi
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
 
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
 
+# Old archive suffix (normally "a").
+libext=$libext
 
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
 
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
 
-if test -n "$maybe_libatomic_ops" -a "$THREADS" != "none"; then
-  USE_INTERNAL_LIBATOMIC_OPS_TRUE=
-  USE_INTERNAL_LIBATOMIC_OPS_FALSE='#'
-else
-  USE_INTERNAL_LIBATOMIC_OPS_TRUE='#'
-  USE_INTERNAL_LIBATOMIC_OPS_FALSE=
-fi
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
 
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
 
+# Do we need a version for libraries?
+need_version=$need_version
 
-if test -n "$maybe_libatomic_ops" -a x$need_atomic_ops_asm = xtrue; then
-  NEED_ATOMIC_OPS_ASM_TRUE=
-  NEED_ATOMIC_OPS_ASM_FALSE='#'
-else
-  NEED_ATOMIC_OPS_ASM_TRUE='#'
-  NEED_ATOMIC_OPS_ASM_FALSE=
-fi
+# Library versioning type.
+version_type=$version_type
 
+# Shared library runtime path variable.
+runpath_var=$runpath_var
 
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
 
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
-ac_config_files="$ac_config_files Makefile bdw-gc.pc"
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
 
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
 
-ac_config_commands="$ac_config_commands default"
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
 
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
 
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
 
-_ACEOF
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
 
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
 
-  (set) 2>&1 |
-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes (double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \).
-      sed -n \
-       "s/'/'\\\\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-  if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
-      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
-echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
-  else
-    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  fi
-fi
-rm -f confcache
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
 
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then branch to the quote section.  Otherwise,
-# look for a macro that doesn't take arguments.
-ac_script='
-t clear
-:clear
-s/^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
-t quote
-s/^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
-t quote
-b any
-:quote
-s/[     `~#$^&*(){}\\|;'\''"<>?]/\\&/g
-s/\[/\\&/g
-s/\]/\\&/g
-s/\$/$$/g
-H
-:any
-${
-       g
-       s/^\n//
-       s/\n/ /g
-       p
-}
-'
-DEFS=`sed -n "$ac_script" confdefs.h`
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
 
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`echo "$ac_i" | sed "$ac_script"`
-  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
-  #    will be set to the directory where LIBOBJS objects are built.
-  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
 
-LTLIBOBJS=$ac_ltlibobjs
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
 
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
 
-if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${THREADS_TRUE}" && test -z "${THREADS_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"THREADS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"THREADS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"PTHREADS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"PTHREADS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${DARWIN_THREADS_TRUE}" && test -z "${DARWIN_THREADS_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"DARWIN_THREADS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"DARWIN_THREADS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${WIN32_THREADS_TRUE}" && test -z "${WIN32_THREADS_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"WIN32_THREADS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"WIN32_THREADS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${COMPILER_XLC_TRUE}" && test -z "${COMPILER_XLC_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"COMPILER_XLC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"COMPILER_XLC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${AVOID_CPP_LIB_TRUE}" && test -z "${AVOID_CPP_LIB_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"AVOID_CPP_LIB\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AVOID_CPP_LIB\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${CPLUSPLUS_TRUE}" && test -z "${CPLUSPLUS_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"CPLUSPLUS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"CPLUSPLUS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${ENABLE_GCJ_SUPPORT_TRUE}" && test -z "${ENABLE_GCJ_SUPPORT_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"ENABLE_GCJ_SUPPORT\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"ENABLE_GCJ_SUPPORT\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${USE_LIBDIR_TRUE}" && test -z "${USE_LIBDIR_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"USE_LIBDIR\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"USE_LIBDIR\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${USE_INTERNAL_LIBATOMIC_OPS_TRUE}" && test -z "${USE_INTERNAL_LIBATOMIC_OPS_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"USE_INTERNAL_LIBATOMIC_OPS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"USE_INTERNAL_LIBATOMIC_OPS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${NEED_ATOMIC_OPS_ASM_TRUE}" && test -z "${NEED_ATOMIC_OPS_ASM_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"NEED_ATOMIC_OPS_ASM\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"NEED_ATOMIC_OPS_ASM\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
 
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
+# The linker used to build libraries.
+LD=$lt_LD
 
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
+# A language specific compiler.
+CC=$lt_compiler
 
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
 
-fi
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
 
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
 
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
 
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
 
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
 
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
 
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
 
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-as_nl='
-'
-IFS=" ""       $as_nl"
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
 
-# Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
 
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
-fi
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
 
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
 
-# NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-  fi
-done
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
 
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
 
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
 
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
 
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
 
-# CDPATH.
-$as_unset CDPATH
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking.  This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
 
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
 
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
 
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
 
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
 
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
 
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
 
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
 
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
 
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s='ln -s'
-  # ... but there are two gotchas:
-  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-  # In both cases, we have to default to `cp -p'.
-  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
 
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-       case $1 in
-        -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
 
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
 
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
 
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
 
-exec 6>&1
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
 
-# Save the log message, to keep $[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by gc $as_me 7.2alpha3, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
 
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
 
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects
+postdep_objects=$lt_postdep_objects
+predeps=$lt_predeps
+postdeps=$lt_postdeps
 
-_ACEOF
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
 
-cat >>$CONFIG_STATUS <<_ACEOF
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_commands="$ac_config_commands"
+# ### END LIBTOOL CONFIG
 
-_ACEOF
+_LT_EOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
+  case $host_os in
+  aix3*)
+    cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+_LT_EOF
+    ;;
+  esac
 
-Usage: $0 [OPTIONS] [FILE]...
 
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-  -q, --quiet      do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-  --file=FILE[:TEMPLATE]
-                  instantiate the configuration file FILE
+ltmain="$ac_aux_dir/ltmain.sh"
 
-Configuration files:
-$config_files
 
-Configuration commands:
-$config_commands
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  case $xsi_shell in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+}
 
-Report bugs to <bug-autoconf@gnu.org>."
+# func_basename file
+func_basename ()
+{
+  func_basename_result="${1##*/}"
+}
 
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-gc config.status 7.2alpha3
-configured by $0, generated by GNU Autoconf 2.61,
-  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+  func_basename_result="${1##*/}"
+}
 
-Copyright (C) 2006 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+  # positional parameters, so assign one to ordinary parameter first.
+  func_stripname_result=${3}
+  func_stripname_result=${func_stripname_result#"${1}"}
+  func_stripname_result=${func_stripname_result%"${2}"}
+}
 
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-_ACEOF
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=${1%%=*}
+  func_opt_split_arg=${1#*=}
+}
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value.  By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=*)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  *)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
+# func_lo2o object
+func_lo2o ()
+{
+  case ${1} in
+    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+    *)    func_lo2o_result=${1} ;;
+  esac
+}
+_LT_EOF
     ;;
+  *) # Bourne compatible functions.
+    cat << \_LT_EOF >> "$cfgfile"
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  # Extract subdirectory from the argument.
+  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+  if test "X$func_dirname_result" = "X${1}"; then
+    func_dirname_result="${3}"
+  else
+    func_dirname_result="$func_dirname_result${2}"
+  fi
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  # Extract subdirectory from the argument.
+  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+  if test "X$func_dirname_result" = "X${1}"; then
+    func_dirname_result="${3}"
+  else
+    func_dirname_result="$func_dirname_result${2}"
+  fi
+  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+  case ${2} in
+    .*) func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+    *)  func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
   esac
+}
 
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    echo "$ac_cs_version"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
-    ac_need_defaults=false;;
-  --he | --h |  --help | --hel | -h )
-    echo "$ac_cs_usage"; exit ;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
 
-  # This is an error.
-  -*) { echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; } ;;
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
 
-  *) ac_config_targets="$ac_config_targets $1"
-     ac_need_defaults=false ;;
+# func_lo2o object
+func_lo2o ()
+{
+  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+_LT_EOF
+esac
+
+case $lt_shell_append in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$1+=\$2"
+}
+_LT_EOF
+    ;;
+  *)
+    cat << \_LT_EOF >> "$cfgfile"
 
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$1=\$$1\$2"
+}
+_LT_EOF
+    ;;
   esac
-  shift
-done
 
-ac_configure_extra_args=
 
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
+  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
 
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
-  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
-  CONFIG_SHELL=$SHELL
-  export CONFIG_SHELL
-  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
+  mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
 
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  echo "$ac_log"
-} >&5
 
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
- srcdir=${srcdir}
-    host=${host}
-    CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-    CC="${CC}"
-    DEFS="$DEFS"
+    cat <<_LT_EOF >> "$ofile"
 
-_ACEOF
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+# The linker used to build libraries.
+LD=$lt_LD_CXX
 
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "bdw-gc.pc") CONFIG_FILES="$CONFIG_FILES bdw-gc.pc" ;;
-    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_CXX
 
-  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-   { (exit 1); exit 1; }; };;
-  esac
-done
+# A language specific compiler.
+CC=$lt_compiler_CXX
 
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_CXX
 
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
 
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp=
-  trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
 
-{
-  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=./conf$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
-} ||
-{
-   echo "$me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
 
-#
-# Set up the sed scripts for CONFIG_FILES section.
-#
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
 
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "$CONFIG_FILES"; then
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
 
-_ACEOF
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
 
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
 
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
 
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  cat >conf$$subs.sed <<_ACEOF
-SHELL!$SHELL$ac_delim
-PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
-PACKAGE_NAME!$PACKAGE_NAME$ac_delim
-PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
-PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
-PACKAGE_STRING!$PACKAGE_STRING$ac_delim
-PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
-exec_prefix!$exec_prefix$ac_delim
-prefix!$prefix$ac_delim
-program_transform_name!$program_transform_name$ac_delim
-bindir!$bindir$ac_delim
-sbindir!$sbindir$ac_delim
-libexecdir!$libexecdir$ac_delim
-datarootdir!$datarootdir$ac_delim
-datadir!$datadir$ac_delim
-sysconfdir!$sysconfdir$ac_delim
-sharedstatedir!$sharedstatedir$ac_delim
-localstatedir!$localstatedir$ac_delim
-includedir!$includedir$ac_delim
-oldincludedir!$oldincludedir$ac_delim
-docdir!$docdir$ac_delim
-infodir!$infodir$ac_delim
-htmldir!$htmldir$ac_delim
-dvidir!$dvidir$ac_delim
-pdfdir!$pdfdir$ac_delim
-psdir!$psdir$ac_delim
-libdir!$libdir$ac_delim
-localedir!$localedir$ac_delim
-mandir!$mandir$ac_delim
-DEFS!$DEFS$ac_delim
-ECHO_C!$ECHO_C$ac_delim
-ECHO_N!$ECHO_N$ac_delim
-ECHO_T!$ECHO_T$ac_delim
-LIBS!$LIBS$ac_delim
-build_alias!$build_alias$ac_delim
-host_alias!$host_alias$ac_delim
-target_alias!$target_alias$ac_delim
-build!$build$ac_delim
-build_cpu!$build_cpu$ac_delim
-build_vendor!$build_vendor$ac_delim
-build_os!$build_os$ac_delim
-host!$host$ac_delim
-host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
-host_os!$host_os$ac_delim
-target!$target$ac_delim
-target_cpu!$target_cpu$ac_delim
-target_vendor!$target_vendor$ac_delim
-target_os!$target_os$ac_delim
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-CYGPATH_W!$CYGPATH_W$ac_delim
-PACKAGE!$PACKAGE$ac_delim
-VERSION!$VERSION$ac_delim
-ACLOCAL!$ACLOCAL$ac_delim
-AUTOCONF!$AUTOCONF$ac_delim
-AUTOMAKE!$AUTOMAKE$ac_delim
-AUTOHEADER!$AUTOHEADER$ac_delim
-MAKEINFO!$MAKEINFO$ac_delim
-install_sh!$install_sh$ac_delim
-STRIP!$STRIP$ac_delim
-INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
-mkdir_p!$mkdir_p$ac_delim
-AWK!$AWK$ac_delim
-SET_MAKE!$SET_MAKE$ac_delim
-am__leading_dot!$am__leading_dot$ac_delim
-AMTAR!$AMTAR$ac_delim
-am__tar!$am__tar$ac_delim
-am__untar!$am__untar$ac_delim
-MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim
-MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim
-MAINT!$MAINT$ac_delim
-GC_VERSION!$GC_VERSION$ac_delim
-CC!$CC$ac_delim
-CFLAGS!$CFLAGS$ac_delim
-LDFLAGS!$LDFLAGS$ac_delim
-CPPFLAGS!$CPPFLAGS$ac_delim
-ac_ct_CC!$ac_ct_CC$ac_delim
-EXEEXT!$EXEEXT$ac_delim
-OBJEXT!$OBJEXT$ac_delim
-DEPDIR!$DEPDIR$ac_delim
-am__include!$am__include$ac_delim
-am__quote!$am__quote$ac_delim
-AMDEP_TRUE!$AMDEP_TRUE$ac_delim
-AMDEP_FALSE!$AMDEP_FALSE$ac_delim
-AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
-CCDEPMODE!$CCDEPMODE$ac_delim
-am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
-am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
-CXX!$CXX$ac_delim
-CXXFLAGS!$CXXFLAGS$ac_delim
-ac_ct_CXX!$ac_ct_CXX$ac_delim
-CXXDEPMODE!$CXXDEPMODE$ac_delim
-am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
-am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
-CCAS!$CCAS$ac_delim
-_ACEOF
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
-    break
-  elif $ac_last_try; then
-    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_CXX
 
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
-  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
-  ac_eof=`expr $ac_eof + 1`
-fi
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
 
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-CEOF$ac_eof
-_ACEOF
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
 
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
 
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  cat >conf$$subs.sed <<_ACEOF
-CCASFLAGS!$CCASFLAGS$ac_delim
-AR!$AR$ac_delim
-RANLIB!$RANLIB$ac_delim
-GC_CFLAGS!$GC_CFLAGS$ac_delim
-THREADDLLIBS!$THREADDLLIBS$ac_delim
-THREADS_TRUE!$THREADS_TRUE$ac_delim
-THREADS_FALSE!$THREADS_FALSE$ac_delim
-PTHREADS_TRUE!$PTHREADS_TRUE$ac_delim
-PTHREADS_FALSE!$PTHREADS_FALSE$ac_delim
-DARWIN_THREADS_TRUE!$DARWIN_THREADS_TRUE$ac_delim
-DARWIN_THREADS_FALSE!$DARWIN_THREADS_FALSE$ac_delim
-WIN32_THREADS_TRUE!$WIN32_THREADS_TRUE$ac_delim
-WIN32_THREADS_FALSE!$WIN32_THREADS_FALSE$ac_delim
-COMPILER_XLC_TRUE!$COMPILER_XLC_TRUE$ac_delim
-COMPILER_XLC_FALSE!$COMPILER_XLC_FALSE$ac_delim
-AVOID_CPP_LIB_TRUE!$AVOID_CPP_LIB_TRUE$ac_delim
-AVOID_CPP_LIB_FALSE!$AVOID_CPP_LIB_FALSE$ac_delim
-extra_ldflags_libgc!$extra_ldflags_libgc$ac_delim
-EXTRA_TEST_LIBS!$EXTRA_TEST_LIBS$ac_delim
-target_all!$target_all$ac_delim
-CPLUSPLUS_TRUE!$CPLUSPLUS_TRUE$ac_delim
-CPLUSPLUS_FALSE!$CPLUSPLUS_FALSE$ac_delim
-INCLUDES!$INCLUDES$ac_delim
-CXXINCLUDES!$CXXINCLUDES$ac_delim
-addobjs!$addobjs$ac_delim
-addlibs!$addlibs$ac_delim
-GREP!$GREP$ac_delim
-EGREP!$EGREP$ac_delim
-LN_S!$LN_S$ac_delim
-ECHO!$ECHO$ac_delim
-CPP!$CPP$ac_delim
-CXXCPP!$CXXCPP$ac_delim
-F77!$F77$ac_delim
-FFLAGS!$FFLAGS$ac_delim
-ac_ct_F77!$ac_ct_F77$ac_delim
-LIBTOOL!$LIBTOOL$ac_delim
-ENABLE_GCJ_SUPPORT_TRUE!$ENABLE_GCJ_SUPPORT_TRUE$ac_delim
-ENABLE_GCJ_SUPPORT_FALSE!$ENABLE_GCJ_SUPPORT_FALSE$ac_delim
-UNWINDLIBS!$UNWINDLIBS$ac_delim
-USE_LIBDIR_TRUE!$USE_LIBDIR_TRUE$ac_delim
-USE_LIBDIR_FALSE!$USE_LIBDIR_FALSE$ac_delim
-subdirs!$subdirs$ac_delim
-USE_INTERNAL_LIBATOMIC_OPS_TRUE!$USE_INTERNAL_LIBATOMIC_OPS_TRUE$ac_delim
-USE_INTERNAL_LIBATOMIC_OPS_FALSE!$USE_INTERNAL_LIBATOMIC_OPS_FALSE$ac_delim
-NEED_ATOMIC_OPS_ASM_TRUE!$NEED_ATOMIC_OPS_ASM_TRUE$ac_delim
-NEED_ATOMIC_OPS_ASM_FALSE!$NEED_ATOMIC_OPS_ASM_FALSE$ac_delim
-atomic_ops_libs!$atomic_ops_libs$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-LTLIBOBJS!$LTLIBOBJS$ac_delim
-_ACEOF
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 49; then
-    break
-  elif $ac_last_try; then
-    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_CXX
 
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
-  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
-  ac_eof=`expr $ac_eof + 1`
-fi
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
 
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
-_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
-_ACEOF
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
 
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[         ]*VPATH[        ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[    ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[      ]*$//
-}'
-fi
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking.  This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-fi # test -n "$CONFIG_FILES"
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
 
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_CXX
 
-for ac_tag in  :F $CONFIG_FILES      :C $CONFIG_COMMANDS
-do
-  case $ac_tag in
-  :[FHLC]) ac_mode=$ac_tag; continue;;
-  esac
-  case $ac_mode$ac_tag in
-  :[FHL]*:*);;
-  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
-echo "$as_me: error: Invalid tag $ac_tag." >&2;}
-   { (exit 1); exit 1; }; };;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_CXX
 
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$tmp/stdin";;
-      *) # Look for the file first in the build tree, then in the source tree
-        # (if the path is not absolute).  The absolute path cannot be DOS-style,
-        # because $ac_f cannot contain `:'.
-        test -f "$ac_f" ||
-          case $ac_f in
-          [\\/$]*) false;;
-          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
-          esac ||
-          { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-echo "$as_me: error: cannot find input file: $ac_f" >&2;}
-   { (exit 1); exit 1; }; };;
-      esac
-      ac_file_inputs="$ac_file_inputs $ac_f"
-    done
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
 
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
-    # use $as_me), people would be surprised to read:
-    #    /* config.h.  Generated by config.status.  */
-    configure_input="Generated from "`IFS=:
-         echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
-    if test x"$ac_file" != x-; then
-      configure_input="$ac_file.  $configure_input"
-      { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-    fi
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
 
-    case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin";;
-    esac
-    ;;
-  esac
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_CXX
 
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$ac_file" : 'X\(//\)[^/]' \| \
-        X"$ac_file" : 'X\(//\)$' \| \
-        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  { as_dir="$ac_dir"
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_dir" : 'X\(//\)[^/]' \| \
-        X"$as_dir" : 'X\(//\)$' \| \
-        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-  ac_builddir=.
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_CXX
 
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
 
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path_CXX
 
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
 
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
 
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
-  esac
-_ACEOF
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
 
-case `sed -n '/datarootdir/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-' $ac_file_inputs` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-  ac_datarootdir_hack='
-  s&@datadir@&$datadir&g
-  s&@docdir@&$docdir&g
-  s&@infodir@&$infodir&g
-  s&@localedir@&$localedir&g
-  s&@mandir@&$mandir&g
-    s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_CXX
 
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF
-  sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-$ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_CXX
 
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
-  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
-echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
 
-  rm -f "$tmp/stdin"
-  case $ac_file in
-  -) cat "$tmp/out"; rm -f "$tmp/out";;
-  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
-  esac
- ;;
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
 
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_CXX
+postdep_objects=$lt_postdep_objects_CXX
+predeps=$lt_predeps_CXX
+postdeps=$lt_postdeps_CXX
 
-  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
- ;;
-  esac
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
 
+# ### END LIBTOOL TAG CONFIG: CXX
+_LT_EOF
 
-  case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$mf" : 'X\(//\)[^/]' \| \
-        X"$mf" : 'X\(//\)$' \| \
-        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$mf" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$file" : 'X\(//\)[^/]' \| \
-        X"$file" : 'X\(//\)$' \| \
-        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-    { as_dir=$dirpart/$fdir
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_dir" : 'X\(//\)[^/]' \| \
-        X"$as_dir" : 'X\(//\)$' \| \
-        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
-  done
-done
  ;;
 
   esac
 done # for ac_tag
 
 
-{ (exit 0); exit 0; }
+as_fn_exit 0
 _ACEOF
-chmod +x $CONFIG_STATUS
 ac_clean_files=$ac_clean_files_save
 
+test $ac_write_fail = 0 ||
+  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
 
 # configure is writing to config.log, and then calls config.status.
 # config.status does its own redirection, appending to config.log.
@@ -23388,7 +18037,7 @@ if test "$no_create" != yes; then
   exec 5>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
-  $ac_cs_success || { (exit 1); exit 1; }
+  $ac_cs_success || as_fn_exit $?
 fi
 
 #
@@ -23396,7 +18045,8 @@ fi
 #
 if test "$no_recursion" != yes; then
 
-  # Remove --cache-file and --srcdir arguments so they do not pile up.
+  # Remove --cache-file, --srcdir, and --disable-option-checking arguments
+  # so they do not pile up.
   ac_sub_configure_args=
   ac_prev=
   eval "set x $ac_configure_args"
@@ -23425,11 +18075,13 @@ if test "$no_recursion" != yes; then
       ac_prev=prefix ;;
     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
       ;;
+    --disable-option-checking)
+      ;;
     *)
       case $ac_arg in
-      *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+      *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
       esac
-      ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
+      as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
     esac
   done
 
@@ -23437,7 +18089,7 @@ if test "$no_recursion" != yes; then
   # in subdir configurations.
   ac_arg="--prefix=$prefix"
   case $ac_arg in
-  *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+  *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
   esac
   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
 
@@ -23446,6 +18098,10 @@ if test "$no_recursion" != yes; then
     ac_sub_configure_args="--silent $ac_sub_configure_args"
   fi
 
+  # Always prepend --disable-option-checking to silence warnings, since
+  # different subdirs can have different --enable and --with options.
+  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
+
   ac_popdir=`pwd`
   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
 
@@ -23454,57 +18110,17 @@ if test "$no_recursion" != yes; then
     test -d "$srcdir/$ac_dir" || continue
 
     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
-    echo "$as_me:$LINENO: $ac_msg" >&5
-    echo "$ac_msg" >&6
-    { as_dir="$ac_dir"
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_dir" : 'X\(//\)[^/]' \| \
-        X"$as_dir" : 'X\(//\)$' \| \
-        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
+    $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
+    $as_echo "$ac_msg" >&6
+    as_dir="$ac_dir"; as_fn_mkdir_p
     ac_builddir=.
 
 case "$ac_dir" in
 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
 *)
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
   # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
   case $ac_top_builddir_sub in
   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -23543,8 +18159,8 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
       # This should be Cygnus configure.
       ac_sub_configure=$ac_aux_dir/configure
     else
-      { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
-echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
+$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
       ac_sub_configure=
     fi
 
@@ -23557,17 +18173,19 @@ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
        ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
       esac
 
-      { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+      { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
       # The eval makes quoting arguments work.
       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
           --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
-       { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
-echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
-   { (exit 1); exit 1; }; }
+       as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
     fi
 
     cd "$ac_popdir"
   done
 fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
 
index 8bb800ffc1faf4d5e5931d62e144c43d3a706c5c..70406b02e6beac35d642025ec27f6095ea86550b 100644 (file)
@@ -1,8 +1,8 @@
 # Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
-# 
+#
 # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
 # OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
-# 
+#
 # Permission is hereby granted to use or copy this program
 # for any purpose,  provided the above notices are retained on all copies.
 # Permission to modify the code and to distribute modified code is granted,
@@ -17,14 +17,16 @@ dnl Process this file with autoconf to produce configure.
 # Initialization
 # ==============
 
-AC_INIT(gc,7.2alpha3,Hans.Boehm@hp.com) 
+AC_INIT(gc,7.2alpha4,Hans.Boehm@hp.com)
     ## version must conform to [0-9]+[.][0-9]+(alpha[0-9]+)?
 AC_CONFIG_SRCDIR(gcj_mlc.c)
-AC_CANONICAL_TARGET 
+AC_CONFIG_MACRO_DIR([m4])
+AC_CANONICAL_TARGET
 AC_PREREQ(2.53)
-AC_REVISION($Revision: 1.44 $)
+AC_REVISION($Revision: 1.58 $)
 GC_SET_VERSION
-AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects nostdinc])
+AM_INIT_AUTOMAKE([foreign dist-bzip2 nostdinc])
+AM_CONFIG_HEADER([include/private/config.h])
 AM_MAINTAINER_MODE
 
 AC_SUBST(PACKAGE)
@@ -68,7 +70,32 @@ AC_ARG_ENABLE(parallel-mark,
 AC_ARG_ENABLE(cplusplus,
     [AC_HELP_STRING([--enable-cplusplus], [install C++ support])])
 
-INCLUDES=-I${srcdir}/include
+dnl Features which may be selected in the following thread-detection switch.
+AH_TEMPLATE([PARALLEL_MARK], [Define to enable parallel marking.])
+AH_TEMPLATE([THREAD_LOCAL_ALLOC],
+           [Define to enable thread-local allocation optimisation.])
+AH_TEMPLATE([USE_COMPILER_TLS],
+           [Define to use of compiler-support for thread-local variables.])
+
+dnl Thread selection macros.
+AH_TEMPLATE([GC_THREADS],          [Define to support threads.])
+AH_TEMPLATE([GC_AIX_THREADS],       [Define to support IBM AIX threads.])
+AH_TEMPLATE([GC_DARWIN_THREADS],    [Define to support Darwin pthreads.])
+AH_TEMPLATE([GC_FREEBSD_THREADS],   [Define to support FreeBSD pthreads.])
+AH_TEMPLATE([GC_GNU_THREADS],       [Define to support GNU pthreads.])
+AH_TEMPLATE([GC_HPUX_THREADS],      [Define to support HP/UX 11 pthreads.])
+AH_TEMPLATE([GC_IRIX_THREADS],      [Define to support Irix pthreads.])
+AH_TEMPLATE([GC_LINUX_THREADS],     [Define to support pthreads on Linux.])
+AH_TEMPLATE([GC_NETBSD_THREADS],    [Define to support NetBSD pthreads.])
+AH_TEMPLATE([GC_OPENBSD_THREADS],   [Define to support OpenBSD pthreads.])
+AH_TEMPLATE([GC_OSF1_THREADS],      [Define to support Tru64 pthreads.])
+AH_TEMPLATE([GC_SOLARIS_THREADS],   [Define to support Solaris pthreads.])
+AH_TEMPLATE([GC_WIN32_THREADS],     [Define to support win32 threads.])
+
+dnl System header feature requests.
+AH_TEMPLATE([_POSIX_C_SOURCE], [The POSIX feature macro.])
+AH_TEMPLATE([_PTHREADS], [Indicates the use of pthreads (NetBSD).])
+
 THREADDLLIBS=
 need_atomic_ops_asm=false
 ## Libraries needed to support dynamic loading and/or threads.
@@ -87,7 +114,7 @@ case "$THREADS" in
          AC_DEFINE(PARALLEL_MARK)
        fi
        AC_DEFINE(THREAD_LOCAL_ALLOC)
-       AC_MSG_WARN("Explict GC_INIT() calls may be required.");
+       AC_MSG_WARN("Explicit GC_INIT() calls may be required.");
        ;;
      *-*-linux*)
        AC_DEFINE(GC_LINUX_THREADS)
@@ -105,14 +132,20 @@ case "$THREADS" in
          AC_DEFINE(PARALLEL_MARK)
        fi
        AC_DEFINE(THREAD_LOCAL_ALLOC)
-       AC_MSG_WARN("Explict GC_INIT() calls may be required.");
+       AC_MSG_WARN("Explicit GC_INIT() calls may be required.");
        THREADDLLIBS="-lpthread -lrt"
        # HPUX needs REENTRANT for the _r calls.
-       AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads])
+       AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads.])
        ;;
      *-*-hpux10*)
        AC_MSG_WARN("Only HP-UX 11 POSIX threads are supported.")
        ;;
+     *-*-openbsd*)
+        AC_DEFINE(GC_OPENBSD_THREADS)
+        THREADDLLIBS=-pthread
+        INCLUDES="$INCLUDES -pthread"
+        openbsd_threads=true
+        ;;
      *-*-freebsd*)
        AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
        AC_DEFINE(GC_FREEBSD_THREADS)
@@ -154,14 +187,20 @@ case "$THREADS" in
        AC_DEFINE(GC_IRIX_THREADS)
        ;;
      *-*-cygwin*)
-       AC_DEFINE(GC_WIN32_THREADS)
+       AC_DEFINE(GC_THREADS)
+        if test "${enable_parallel_mark}" = yes; then
+         AC_DEFINE(PARALLEL_MARK)
+       fi
        AC_DEFINE(THREAD_LOCAL_ALLOC)
+       # Cygwin doesn't have a real libpthread, so Libtool can't link
+       # against it.
+       THREADDLLIBS=""
        win32_threads=true
        ;;
      *-*-darwin*)
        AC_DEFINE(GC_DARWIN_THREADS)
        AC_DEFINE(THREAD_LOCAL_ALLOC)
-       AC_MSG_WARN("Explict GC_INIT() calls may be required.");
+       AC_MSG_WARN("Explicit GC_INIT() calls may be required.");
        # Parallel-mark is currently unreliable on Darwin; ignore request
        # if test "${enable_parallel_mark}" = yes; then
        #   AC_DEFINE(PARALLEL_MARK)
@@ -173,7 +212,7 @@ case "$THREADS" in
         if test "${enable_parallel_mark}" = yes; then
          AC_DEFINE(PARALLEL_MARK)
          AC_DEFINE(THREAD_LOCAL_ALLOC)
-         AC_MSG_WARN("Explict GC_INIT() calls may be required.");
+         AC_MSG_WARN("Explicit GC_INIT() calls may be required.");
          # May want to enable it in other cases, too.
          # Measurements havent yet been done.
        fi
@@ -186,10 +225,14 @@ case "$THREADS" in
     esac
     ;;
  win32)
-    AC_DEFINE(GC_WIN32_THREADS)
+    AC_DEFINE(GC_THREADS)
+    if test "${enable_parallel_mark}" = yes; then
+      AC_DEFINE(PARALLEL_MARK)
+      AC_DEFINE(THREAD_LOCAL_ALLOC)
+    fi
     win32_threads=true
-    dnl Wine getenv may not return NULL for missing entry
-    AC_DEFINE(NO_GETENV)
+    AC_DEFINE([EMPTY_GETENV_RESULTS], [1],
+             [Wine getenv may not return NULL for missing entry.])
     ;;
  dgux386)
     THREADS=dgux386
@@ -200,9 +243,11 @@ case "$THREADS" in
         AC_DEFINE(PARALLEL_MARK)
     fi
     AC_DEFINE(THREAD_LOCAL_ALLOC)
-    AC_MSG_WARN("Explict GC_INIT() calls may be required.");
-    AC_DEFINE(GC_DGUX386_THREADS)
-    AC_DEFINE(DGUX_THREADS)
+    AC_MSG_WARN("Explicit GC_INIT() calls may be required.");
+    AC_DEFINE([GC_DGUX386_THREADS], 1,
+             [Define to enable support for DB/UX threads on i386.])
+    AC_DEFINE([DGUX_THREADS], 1,
+             [Define to enable support for DB/UX threads.])
     # Enable _POSIX4A_DRAFT10_SOURCE with flag -pthread
     INCLUDES="-pthread $INCLUDES"
     ;;
@@ -224,8 +269,9 @@ AM_CONDITIONAL(THREADS, test x$THREADS != xnone)
 AM_CONDITIONAL(PTHREADS, test x$THREADS = xposix)
 AM_CONDITIONAL(DARWIN_THREADS, test x$darwin_threads = xtrue)
 AM_CONDITIONAL(WIN32_THREADS, test x$win32_threads = xtrue)
+AM_CONDITIONAL(OPENBSD_THREADS, test x$openbsd_threads = xtrue)
 
-case "$host" in 
+case "$host" in
    powerpc-*-darwin*)
       powerpc_darwin=true
       ;;
@@ -289,13 +335,14 @@ AC_MSG_RESULT($compiler_xlc)
 AM_CONDITIONAL(COMPILER_XLC,test $compiler_xlc = yes)
 if test $compiler_xlc = yes -a "$powerpc_darwin" = true; then
   # the darwin stack-frame-walking code is completely broken on xlc
-  AC_DEFINE(DARWIN_DONT_PARSE_STACK)
+  AC_DEFINE([DARWIN_DONT_PARSE_STACK], 1, [See doc/README.macros.])
 fi
 
 # We never want libdl on darwin. It is a fake libdl that just ends up making
-# dyld calls anyway
+# dyld calls anyway.  The same applies to Cygwin.
 case "$host" in
   *-*-darwin*) ;;
+  *-*-cygwin*) ;;
   *)
     AC_CHECK_LIB(dl, dlopen, THREADDLLIBS="$THREADDLLIBS -ldl")
     ;;
@@ -340,7 +387,7 @@ case "$TARGET_ECOS" in
    no)
       ;;
    *)
-      AC_DEFINE(ECOS)
+      AC_DEFINE([ECOS], 1, [Define to enable eCos target support.])
       CXXINCLUDES="-I${TARGET_ECOS}/include"
       addobjs="$addobjs ecos.lo"
       ;;
@@ -370,7 +417,7 @@ AC_MSG_RESULT($enable_shared)
 
 # Configuration of machine-dependent code
 #
-AC_MSG_CHECKING(which machine-dependent code should be used) 
+AC_MSG_CHECKING(which machine-dependent code should be used)
 machdep=
 case "$host" in
  alpha-*-openbsd*)
@@ -383,20 +430,19 @@ case "$host" in
     machdep="mach_dep.lo"
     ;;
  i?86-*-solaris2.[[89]] | i?86-*-solaris2.1?)
-    AC_DEFINE(SOLARIS25_PROC_VDB_BUG_FIXED)
+    AC_DEFINE([SOLARIS25_PROC_VDB_BUG_FIXED], 1,
+             [See the comment in gcconfig.h.])
     ;;
  mipstx39-*-elf*)
     machdep="mach_dep.lo"
-    AC_DEFINE(STACKBASE, __stackbase)
-    AC_DEFINE(DATASTART_IS_ETEXT)
     ;;
  mips-dec-ultrix*)
     machdep="mach-dep.lo"
     ;;
  mips-nec-sysv*|mips-unknown-sysv*)
     ;;
- mips*-*-linux*) 
-    ;; 
+ mips*-*-linux*)
+    ;;
  mips-*-*)
     machdep="mach_dep.lo"
     dnl AC_DEFINE(NO_EXECUTE_PERMISSION)
@@ -412,9 +458,13 @@ case "$host" in
  sparc64-*-netbsd*)
     machdep="mach_dep.lo sparc_mach_dep.lo"
     ;;
+ sparc*-*-openbsd*)
+    machdep="mach_dep.lo sparc_mach_dep.lo"
+    ;;
  sparc-sun-solaris2.3)
     machdep="mach_dep.lo sparc_mach_dep.lo"
-    AC_DEFINE(SUNOS53_SHARED_LIB)
+    AC_DEFINE(SUNOS53_SHARED_LIB, 1,
+             [Define to work around a Solaris 5.3 bug (see dyn_load.c).])
     ;;
  sparc*-sun-solaris2*)
     machdep="mach_dep.lo sparc_mach_dep.lo"
@@ -500,8 +550,10 @@ esac
 
 dnl Include defines that have become de facto standard.
 dnl ALL_INTERIOR_POINTERS can be overridden in startup code.
-AC_DEFINE(NO_EXECUTE_PERMISSION)
-AC_DEFINE(ALL_INTERIOR_POINTERS)
+AC_DEFINE([NO_EXECUTE_PERMISSION], [1],
+         [Define to allow the collector to disable execute permission of heap objects.])
+AC_DEFINE([ALL_INTERIOR_POINTERS], [1],
+         [Define to recognise all pointers to the interior of objects.])
 
 
 dnl Interface Selection
@@ -515,20 +567,29 @@ AC_ARG_ENABLE(gcj-support,
 AM_CONDITIONAL(ENABLE_GCJ_SUPPORT,
     [test x"$enable_gcj_support" != xno])
 if test x"$enable_gcj_support" != xno; then
-    AC_DEFINE(GC_GCJ_SUPPORT, 1, [Define to include support for gcj])
+    AC_DEFINE(GC_GCJ_SUPPORT, 1, [Define to include support for gcj.])
 fi
 
 dnl Debugging
 dnl ---------
 
+AH_TEMPLATE([GC_HAVE_BUILTIN_BACKTRACE],
+           [Define if backtrace information is supported.])
+AH_TEMPLATE([MAKE_BACK_GRAPH], [See doc/README.macros.])
+AH_TEMPLATE([SAVE_CALL_COUNT],
+           [The number of caller frames saved when allocating with the
+            debugging API.])
 UNWINDLIBS=
 AC_ARG_ENABLE(gc-debug,
 [AC_HELP_STRING([--enable-gc-debug],
     [include full support for pointer backtracing etc.])],
 [ if test "$enable_gc_debug" = "yes"; then
     AC_MSG_WARN("Should define GC_DEBUG and use debug alloc. in clients.")
-    AC_DEFINE(KEEP_BACK_PTRS)
-    AC_DEFINE(DBG_HDRS_ALL)
+    AC_DEFINE([KEEP_BACK_PTRS], 1,
+             [Define to save back-pointers in debugging headers.])
+    keep_back_ptrs=true
+    AC_DEFINE([DBG_HDRS_ALL], 1,
+             [Define to force debug headers on all objects.])
     case $host in
       ia64-*-linux* )
        AC_DEFINE(MAKE_BACK_GRAPH)
@@ -549,12 +610,13 @@ AC_ARG_ENABLE(gc-debug,
       ;;
     esac ]
   fi)
+AM_CONDITIONAL([KEEP_BACK_PTRS], [test x"$keep_back_ptrs" = xtrue])
 
 AC_ARG_ENABLE(java-finalization,
     [AC_HELP_STRING([--disable-java-finalization],
        [Disable support for java finalization.])])
 if test x"$enable_java_finalization" != xno; then
-    AC_DEFINE(JAVA_FINALIZATION)
+    AC_DEFINE([JAVA_FINALIZATION], 1, [See doc/README.macros.])
 fi
 
 AC_ARG_ENABLE(atomic-uncollectable,
@@ -571,13 +633,16 @@ AC_ARG_ENABLE(redirect-malloc,
 
 if test "${enable_redirect_malloc}" = yes; then
     if test "${enable_gc_debug}" = yes; then
-       AC_DEFINE(REDIRECT_MALLOC, GC_debug_malloc_replacement)
-       AC_DEFINE(REDIRECT_REALLOC, GC_debug_realloc_replacement)
-       AC_DEFINE(REDIRECT_FREE, GC_debug_free)
+       AC_DEFINE([REDIRECT_MALLOC], GC_debug_malloc_replacement,
+                 [If defined, redirect malloc to this function.])
+       AC_DEFINE([REDIRECT_REALLOC], GC_debug_realloc_replacement,
+                 [If defined, redirect GC_realloc to this function.])
+       AC_DEFINE([REDIRECT_FREE], GC_debug_free,
+                 [If defined, redirect free to this function.])
     else
        AC_DEFINE(REDIRECT_MALLOC, GC_malloc)
     fi
-    AC_DEFINE(GC_USE_DLOPEN_WRAP)
+    AC_DEFINE([GC_USE_DLOPEN_WRAP], 1, [See doc/README.macros.])
 fi
 
 AC_ARG_ENABLE(large-config,
@@ -585,16 +650,18 @@ AC_ARG_ENABLE(large-config,
        [Optimize for large (> 100 MB) heap or root set])])
 
 if test "${enable_large_config}" = yes; then
-    AC_DEFINE(LARGE_CONFIG, 1, [Define to optimize for large heaps or root sets])
+    AC_DEFINE(LARGE_CONFIG, 1, [Define to optimize for large heaps or root sets.])
 fi
 
 dnl This is something of a hack.  When cross-compiling we turn off
 dnl some functionality.  We also enable the "small" configuration.
 dnl These is only correct when targetting an embedded system.  FIXME.
 if test -n "${with_cross_host}"; then
-   AC_DEFINE(NO_CLOCK)
-   AC_DEFINE(SMALL_CONFIG)
-   AC_DEFINE(NO_DEBUGGING)
+   AC_DEFINE([NO_CLOCK], 1, [Define to not use system clock (cross compiling).])
+   AC_DEFINE([SMALL_CONFIG], 1,
+            [Define to tune the collector for small heap sizes.])
+   AC_DEFINE([NO_DEBUGGING], 1,
+            [Disable debugging, like GC_dump and its callees.])
 fi
 
 
@@ -604,7 +671,7 @@ AC_ARG_ENABLE(gc-assertions,
     [AC_HELP_STRING([--enable-gc-assertions],
        [collector-internal assertion checking])])
 if test "${enable_gc_assertions}" = yes; then
-    AC_DEFINE(GC_ASSERTIONS)
+    AC_DEFINE([GC_ASSERTIONS], 1, [Define to enable internal debug assertions.])
 fi
 
 AC_ARG_ENABLE(munmap,
@@ -618,68 +685,52 @@ AC_ARG_ENABLE(munmap,
     esac]
    )
 if test "${enable_munmap}" != ""; then
-    AC_DEFINE(USE_MMAP)
-    AC_DEFINE(USE_MUNMAP)
+    AC_DEFINE([USE_MMAP], 1,
+             [Define to use mmap instead of sbrk to expand the heap.])
+    AC_DEFINE([USE_MUNMAP], 1,
+             [Define to return memory to OS with munmap calls
+              (see doc/README.macros).])
     if test "${MUNMAP_THRESHOLD}" = "yes"; then
       MUNMAP_THRESHOLD=6
     fi
-    AC_DEFINE_UNQUOTED(MUNMAP_THRESHOLD, ${MUNMAP_THRESHOLD})
+    AC_DEFINE_UNQUOTED([MUNMAP_THRESHOLD], [${MUNMAP_THRESHOLD}],
+       [Number of GC cycles to wait before unmapping an unused block.])
 fi
 
 AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
 
 
-dnl Atomic Ops
-dnl ----------
-
-atomic_ops_libs=-latomic_ops
-AC_CHECK_HEADER(atomic_ops.h,
-  [ AC_MSG_NOTICE([Using pre-installed libatomic_ops]) ],
-  [ ao_dir=
-    for candidate in ${srcdir}/libatomic_ops*; do
-       case $candidate in
-           *.tar.gz)
-               ;;
-           *install)
-               dnl generated by alternate Makefile.
-               ;;
-           *)
-               if test -e "$candidate"; then
-                   ao_dir="$candidate"
-               fi
-               ;;
-       esac
-    done
-    if test -z "$ao_dir"; then
-       AC_MSG_ERROR([Missig libatomic_ops.])
-    fi
-    ao_version="${ao_dir#*libatomic_ops-}"
-    AC_MSG_NOTICE([Using internal version of libatomic_ops])
-
-    dnl Automake does not accept shell variables in AC_CONFIG_SUBDIRS
-    test -e libatomic_ops \
-       || ln -s ${ao_dir} libatomic_ops
-    AC_CONFIG_SUBDIRS(libatomic_ops)
-
-    dnl Also copy the source files to be linked in.
-    test -e atomic_ops.c \
-       || ln -s libatomic_ops/src/atomic_ops.c \
-                atomic_ops.c
-
-    test -e atomic_ops_sysdeps.S \
-       || ln -s libatomic_ops/src/atomic_ops_sysdeps.S \
-                atomic_ops_sysdeps.S
-
-    dnl This gets the source include files, which is often close enough.
-    dnl It also makes atomic_ops_sysdeps.S assemble.
-    GC_CFLAGS="${GC_CFLAGS} -I libatomic_ops/src"
-    maybe_libatomic_ops="libatomic_ops"
+# Atomic Ops
+# ----------
+
+# Do we want to use an external libatomic_ops?  By default use it if it's
+# found.
+AC_ARG_WITH([libatomic-ops],
+    [AS_HELP_STRING([--with-libatomic-ops[=yes|no|check]],
+                   [Use a pre-installed libatomic_ops? (default: check)])],
+    [], [with_libatomic_ops=check])
+
+# Check for an external libatomic_ops if the answer was yes or check.  If not
+# found, fail on yes, and convert check to no.
+AS_IF([test x"$with_libatomic_ops" != xno],
+  [ AC_CHECK_HEADER([atomic_ops.h], [],
+      [ AS_IF([test x"$with_libatomic_ops" != xcheck],
+             [AC_MSG_ERROR([A pre-installed libatomic_ops was not found.])])
+       with_libatomic_ops=no ]) ])
+
+# Finally, emit the definitions for bundled or pre-installed AO.
+AC_MSG_CHECKING([which libatomic_ops to use])
+AS_IF([test x"$with_libatomic_ops" != xno],
+  [ AC_MSG_RESULT([pre-installed])
+    ATOMIC_OPS_LIBS="-latomic_ops"
+    AC_SUBST([ATOMIC_OPS_LIBS]) ],
+  [ AC_MSG_RESULT([bundled])
+    AC_CONFIG_SUBDIRS([libatomic_ops])
   ])
-
-AM_CONDITIONAL(USE_INTERNAL_LIBATOMIC_OPS,
-               test -n "$maybe_libatomic_ops" -a "$THREADS" != "none")
-AM_CONDITIONAL(NEED_ATOMIC_OPS_ASM, test -n "$maybe_libatomic_ops" -a x$need_atomic_ops_asm = xtrue)
-AC_SUBST(atomic_ops_libs)
+AM_CONDITIONAL([USE_INTERNAL_LIBATOMIC_OPS],
+    [test x$with_libatomic_ops = xno -a x"$THREADS" != xnone])
+AM_CONDITIONAL([NEED_ATOMIC_OPS_ASM],
+    [test x$with_libatomic_ops = xno -a x$need_atomic_ops_asm = xtrue])
 
 dnl Produce the Files
 dnl -----------------
@@ -687,7 +738,7 @@ dnl -----------------
 AC_CONFIG_FILES([Makefile bdw-gc.pc])
 
 AC_CONFIG_COMMANDS([default],,
-  [ srcdir=${srcdir}
+  [ srcdir="${srcdir}"
     host=${host}
     CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
     CC="${CC}"
index 6a0e31a71093bc7db6617f75c49c12c26245c1a0..932579f147d982e63beb305bbbee0362bae2a6c6 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 P=`pwd`/libatomic_ops-install
-cd libatomic_ops-*[0-9]
+cd libatomic_ops
 ./configure --prefix=$P
index b935146a0c59534acd81ff5f406525358a987652..468fe65a7ff44f3ea01a0a314f1e9a726d6407ad 100644 (file)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
+ * Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
+ * All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
 #include "private/pthread_support.h"
 
 /* This probably needs more porting work to ppc64. */
 # endif
 #endif
 
+#ifdef DARWIN_DONT_PARSE_STACK
+
+GC_INNER void GC_push_all_stacks(void)
+{
+  int i;
+  kern_return_t r;
+  GC_thread p;
+  pthread_t me;
+  ptr_t lo, hi;
+  word total_size = 0;
+  GC_THREAD_STATE_T state;
+  /* MACHINE_THREAD_STATE_COUNT doesn't seem to be defined everywhere.  */
+  /* Hence we use our own version.                                      */
+  mach_msg_type_number_t thread_state_count = GC_MACH_THREAD_STATE_COUNT;
+
+  me = pthread_self();
+  if (!GC_thr_initialized)
+    GC_thr_init();
+
+  for(i = 0; i < THREAD_TABLE_SZ; i++) {
+    for(p = GC_threads[i]; p != 0; p = p->next) {
+      if(p->flags & FINISHED) continue;
+      if(pthread_equal(p->id, me)) {
+        lo = GC_approx_sp();
+      } else {
+        /* Get the thread state (registers, etc) */
+        r = thread_get_state(p->stop_info.mach_thread, GC_MACH_THREAD_STATE,
+                             (natural_t*)&state, &thread_state_count);
+
+#       ifdef DEBUG_THREADS
+          GC_printf("thread_get_state return value = %d\n", r);
+#       endif
+
+        if(r != KERN_SUCCESS)
+          ABORT("thread_get_state failed");
+
+#       if defined(I386)
+          lo = (void*)state . THREAD_FLD (esp);
+          GC_push_one(state . THREAD_FLD (eax));
+          GC_push_one(state . THREAD_FLD (ebx));
+          GC_push_one(state . THREAD_FLD (ecx));
+          GC_push_one(state . THREAD_FLD (edx));
+          GC_push_one(state . THREAD_FLD (edi));
+          GC_push_one(state . THREAD_FLD (esi));
+          GC_push_one(state . THREAD_FLD (ebp));
+
+#       elif defined(X86_64)
+          lo = (void*)state . THREAD_FLD (rsp);
+          GC_push_one(state . THREAD_FLD (rax));
+          GC_push_one(state . THREAD_FLD (rbx));
+          GC_push_one(state . THREAD_FLD (rcx));
+          GC_push_one(state . THREAD_FLD (rdx));
+          GC_push_one(state . THREAD_FLD (rdi));
+          GC_push_one(state . THREAD_FLD (rsi));
+          GC_push_one(state . THREAD_FLD (rbp));
+          GC_push_one(state . THREAD_FLD (rsp));
+          GC_push_one(state . THREAD_FLD (r8));
+          GC_push_one(state . THREAD_FLD (r9));
+          GC_push_one(state . THREAD_FLD (r10));
+          GC_push_one(state . THREAD_FLD (r11));
+          GC_push_one(state . THREAD_FLD (r12));
+          GC_push_one(state . THREAD_FLD (r13));
+          GC_push_one(state . THREAD_FLD (r14));
+          GC_push_one(state . THREAD_FLD (r15));
+          GC_push_one(state . THREAD_FLD (rip));
+          GC_push_one(state . THREAD_FLD (rflags));
+          GC_push_one(state . THREAD_FLD (cs));
+          GC_push_one(state . THREAD_FLD (fs));
+          GC_push_one(state . THREAD_FLD (gs));
+
+#       elif defined(POWERPC)
+          lo = (void*)(state . THREAD_FLD (r1) - PPC_RED_ZONE_SIZE);
+
+          GC_push_one(state . THREAD_FLD (r0));
+          GC_push_one(state . THREAD_FLD (r2));
+          GC_push_one(state . THREAD_FLD (r3));
+          GC_push_one(state . THREAD_FLD (r4));
+          GC_push_one(state . THREAD_FLD (r5));
+          GC_push_one(state . THREAD_FLD (r6));
+          GC_push_one(state . THREAD_FLD (r7));
+          GC_push_one(state . THREAD_FLD (r8));
+          GC_push_one(state . THREAD_FLD (r9));
+          GC_push_one(state . THREAD_FLD (r10));
+          GC_push_one(state . THREAD_FLD (r11));
+          GC_push_one(state . THREAD_FLD (r12));
+          GC_push_one(state . THREAD_FLD (r13));
+          GC_push_one(state . THREAD_FLD (r14));
+          GC_push_one(state . THREAD_FLD (r15));
+          GC_push_one(state . THREAD_FLD (r16));
+          GC_push_one(state . THREAD_FLD (r17));
+          GC_push_one(state . THREAD_FLD (r18));
+          GC_push_one(state . THREAD_FLD (r19));
+          GC_push_one(state . THREAD_FLD (r20));
+          GC_push_one(state . THREAD_FLD (r21));
+          GC_push_one(state . THREAD_FLD (r22));
+          GC_push_one(state . THREAD_FLD (r23));
+          GC_push_one(state . THREAD_FLD (r24));
+          GC_push_one(state . THREAD_FLD (r25));
+          GC_push_one(state . THREAD_FLD (r26));
+          GC_push_one(state . THREAD_FLD (r27));
+          GC_push_one(state . THREAD_FLD (r28));
+          GC_push_one(state . THREAD_FLD (r29));
+          GC_push_one(state . THREAD_FLD (r30));
+          GC_push_one(state . THREAD_FLD (r31));
+
+#       elif defined(ARM32)
+          lo = (void*)state.__sp;
+
+          GC_push_one(state.__r[0]);
+          GC_push_one(state.__r[1]);
+          GC_push_one(state.__r[2]);
+          GC_push_one(state.__r[3]);
+          GC_push_one(state.__r[4]);
+          GC_push_one(state.__r[5]);
+          GC_push_one(state.__r[6]);
+          GC_push_one(state.__r[7]);
+          GC_push_one(state.__r[8]);
+          GC_push_one(state.__r[9]);
+          GC_push_one(state.__r[10]);
+          GC_push_one(state.__r[11]);
+          GC_push_one(state.__r[12]);
+          /* GC_push_one(state.__sp); */
+          GC_push_one(state.__lr);
+          GC_push_one(state.__pc);
+          GC_push_one(state.__cpsr);
+
+#       else
+#         error FIXME for non-x86 || ppc || arm architectures
+#       endif
+      } /* p != me */
+      if(p->flags & MAIN_THREAD)
+        hi = GC_stackbottom;
+      else
+        hi = p->stack_end;
+#     ifdef DEBUG_THREADS
+        GC_printf("Darwin: Stack for thread 0x%lx = [%p,%p)\n",
+                  (unsigned long) p -> id, lo, hi);
+#     endif
+      GC_push_all_stack_frames(lo, hi, p -> activation_frame);
+      total_size += hi - lo; /* lo <= hi */
+    } /* for(p=GC_threads[i]...) */
+  } /* for(i=0;i<THREAD_TABLE_SZ...) */
+  GC_total_stacksize = total_size;
+}
+
+#else /* !DARWIN_DONT_PARSE_STACK; Use FindTopOfStack() */
+
 typedef struct StackFrame {
-  unsigned long        savedSP;
-  unsigned long        savedCR;
-  unsigned long        savedLR;
-  unsigned long        reserved[2];
-  unsigned long        savedRTOC;
+  unsigned long savedSP;
+  unsigned long savedCR;
+  unsigned long savedLR;
+  unsigned long reserved[2];
+  unsigned long savedRTOC;
 } StackFrame;
 
-unsigned long FindTopOfStack(unsigned long stack_start)
+static unsigned long FindTopOfStack(unsigned long stack_start)
 {
-  StackFrame   *frame;
+  StackFrame    *frame;
 
   if (stack_start == 0) {
 # ifdef POWERPC
 #   if CPP_WORDSZ == 32
-      __asm__ volatile("lwz    %0,0(r1)" : "=r" (frame));
+      __asm__ volatile("lwz     %0,0(r1)" : "=r" (frame));
 #   else
-      __asm__ volatile("ld     %0,0(r1)" : "=r" (frame));
+      __asm__ volatile("ld      %0,0(r1)" : "=r" (frame));
 #   endif
 # endif
   } else {
@@ -68,164 +232,17 @@ unsigned long FindTopOfStack(unsigned long stack_start)
 # ifdef DEBUG_THREADS
     /* GC_printf("FindTopOfStack finish at sp = %p\n", frame); */
 # endif
-
   return (unsigned long)frame;
 }
 
-void GC_thr_init(void);
-
-#ifdef DARWIN_DONT_PARSE_STACK
-
-void GC_push_all_stacks(void)
-{
-  int i;
-  kern_return_t r;
-  GC_thread p;
-  pthread_t me;
-  ptr_t lo, hi;
-  GC_THREAD_STATE_T state;
-  /* MACHINE_THREAD_STATE_COUNT doesn't seem to be defined everywhere. */
-  /* Hence we use our own version.                                     */
-  mach_msg_type_number_t thread_state_count = GC_MACH_THREAD_STATE_COUNT;
-
-  me = pthread_self();
-  if (!GC_thr_initialized)
-    GC_thr_init();
-
-  for(i = 0; i < THREAD_TABLE_SZ; i++) {
-    for(p = GC_threads[i]; p != 0; p = p->next) {
-      if(p->flags & FINISHED) continue;
-      if(pthread_equal(p->id, me)) {
-       lo = GC_approx_sp();
-      } else {
-       /* Get the thread state (registers, etc) */
-       r = thread_get_state(p->stop_info.mach_thread, GC_MACH_THREAD_STATE,
-                            (natural_t*)&state, &thread_state_count);
-
-#       ifdef DEBUG_THREADS
-         GC_printf("thread_get_state return value = %d\n", r);
-#      endif
-
-       if(r != KERN_SUCCESS)
-         ABORT("thread_get_state failed");
-
-#       if defined(I386)
-         lo = (void*)state . THREAD_FLD (esp);
-         GC_push_one(state . THREAD_FLD (eax));
-         GC_push_one(state . THREAD_FLD (ebx));
-         GC_push_one(state . THREAD_FLD (ecx));
-         GC_push_one(state . THREAD_FLD (edx));
-         GC_push_one(state . THREAD_FLD (edi));
-         GC_push_one(state . THREAD_FLD (esi));
-         GC_push_one(state . THREAD_FLD (ebp));
-
-#       elif defined(X86_64)
-         lo = (void*)state . THREAD_FLD (rsp);
-         GC_push_one(state . THREAD_FLD (rax));
-         GC_push_one(state . THREAD_FLD (rbx));
-         GC_push_one(state . THREAD_FLD (rcx));
-         GC_push_one(state . THREAD_FLD (rdx));
-         GC_push_one(state . THREAD_FLD (rdi));
-         GC_push_one(state . THREAD_FLD (rsi));
-         GC_push_one(state . THREAD_FLD (rbp));
-         GC_push_one(state . THREAD_FLD (rsp));
-         GC_push_one(state . THREAD_FLD (r8));
-         GC_push_one(state . THREAD_FLD (r9));
-         GC_push_one(state . THREAD_FLD (r10));
-         GC_push_one(state . THREAD_FLD (r11));
-         GC_push_one(state . THREAD_FLD (r12));
-         GC_push_one(state . THREAD_FLD (r13));
-         GC_push_one(state . THREAD_FLD (r14));
-         GC_push_one(state . THREAD_FLD (r15));
-         GC_push_one(state . THREAD_FLD (rip));
-         GC_push_one(state . THREAD_FLD (rflags));
-         GC_push_one(state . THREAD_FLD (cs));
-         GC_push_one(state . THREAD_FLD (fs));
-         GC_push_one(state . THREAD_FLD (gs));
-
-#       elif defined(POWERPC)
-         lo = (void*)(state . THREAD_FLD (r1) - PPC_RED_ZONE_SIZE);
-
-         GC_push_one(state . THREAD_FLD (r0));
-         GC_push_one(state . THREAD_FLD (r2));
-         GC_push_one(state . THREAD_FLD (r3));
-         GC_push_one(state . THREAD_FLD (r4));
-         GC_push_one(state . THREAD_FLD (r5));
-         GC_push_one(state . THREAD_FLD (r6));
-         GC_push_one(state . THREAD_FLD (r7));
-         GC_push_one(state . THREAD_FLD (r8));
-         GC_push_one(state . THREAD_FLD (r9));
-         GC_push_one(state . THREAD_FLD (r10));
-         GC_push_one(state . THREAD_FLD (r11));
-         GC_push_one(state . THREAD_FLD (r12));
-         GC_push_one(state . THREAD_FLD (r13));
-         GC_push_one(state . THREAD_FLD (r14));
-         GC_push_one(state . THREAD_FLD (r15));
-         GC_push_one(state . THREAD_FLD (r16));
-         GC_push_one(state . THREAD_FLD (r17));
-         GC_push_one(state . THREAD_FLD (r18));
-         GC_push_one(state . THREAD_FLD (r19));
-         GC_push_one(state . THREAD_FLD (r20));
-         GC_push_one(state . THREAD_FLD (r21));
-         GC_push_one(state . THREAD_FLD (r22));
-         GC_push_one(state . THREAD_FLD (r23));
-         GC_push_one(state . THREAD_FLD (r24));
-         GC_push_one(state . THREAD_FLD (r25));
-         GC_push_one(state . THREAD_FLD (r26));
-         GC_push_one(state . THREAD_FLD (r27));
-         GC_push_one(state . THREAD_FLD (r28));
-         GC_push_one(state . THREAD_FLD (r29));
-         GC_push_one(state . THREAD_FLD (r30));
-         GC_push_one(state . THREAD_FLD (r31));
-
-#      elif defined(ARM32)
-         lo = (void*)state.__sp;
-
-         GC_push_one(state.__r[0]);
-         GC_push_one(state.__r[1]);
-         GC_push_one(state.__r[2]);
-         GC_push_one(state.__r[3]);
-         GC_push_one(state.__r[4]);
-         GC_push_one(state.__r[5]);
-         GC_push_one(state.__r[6]);
-         GC_push_one(state.__r[7]);
-         GC_push_one(state.__r[8]);
-         GC_push_one(state.__r[9]);
-         GC_push_one(state.__r[10]);
-         GC_push_one(state.__r[11]);
-         GC_push_one(state.__r[12]);
-         /* GC_push_one(state.__sp); */
-         GC_push_one(state.__lr);
-         GC_push_one(state.__pc);
-         GC_push_one(state.__cpsr);
-
-#      else
-#        error FIXME for non-x86 || ppc || arm architectures
-#      endif
-      } /* p != me */
-      if(p->flags & MAIN_THREAD)
-       hi = GC_stackbottom;
-      else
-       hi = p->stack_end;
-#     if DEBUG_THREADS
-        GC_printf("Darwin: Stack for thread 0x%lx = [%lx,%lx)\n",
-                 (unsigned long) p -> id, (unsigned long) lo,
-                 (unsigned long) hi);
-#     endif
-      GC_push_all_stack(lo, hi);
-    } /* for(p=GC_threads[i]...) */
-  } /* for(i=0;i<THREAD_TABLE_SZ...) */
-}
-
-#else /* !DARWIN_DONT_PARSE_STACK; Use FindTopOfStack() */
-
-void GC_push_all_stacks(void)
+GC_INNER void GC_push_all_stacks(void)
 {
   unsigned int i;
   task_t my_task;
   kern_return_t r;
   mach_port_t me;
   ptr_t lo, hi;
+  word total_size = 0;
   thread_act_array_t act_list = 0;
   mach_msg_type_number_t listcount = 0;
 
@@ -245,163 +262,166 @@ void GC_push_all_stacks(void)
     } else {
 #     if defined(POWERPC)
         GC_THREAD_STATE_T info;
-       mach_msg_type_number_t outCount = THREAD_STATE_MAX;
-       r = thread_get_state(thread, GC_MACH_THREAD_STATE, (natural_t *)&info,
-                            &outCount);
-       if(r != KERN_SUCCESS)
-         ABORT("task_get_state failed");
-
-       lo = (void*)(info . THREAD_FLD (r1) - PPC_RED_ZONE_SIZE);
-       hi = (ptr_t)FindTopOfStack(info . THREAD_FLD (r1));
-
-       GC_push_one(info . THREAD_FLD (r0));
-       GC_push_one(info . THREAD_FLD (r2));
-       GC_push_one(info . THREAD_FLD (r3));
-       GC_push_one(info . THREAD_FLD (r4));
-       GC_push_one(info . THREAD_FLD (r5));
-       GC_push_one(info . THREAD_FLD (r6));
-       GC_push_one(info . THREAD_FLD (r7));
-       GC_push_one(info . THREAD_FLD (r8));
-       GC_push_one(info . THREAD_FLD (r9));
-       GC_push_one(info . THREAD_FLD (r10));
-       GC_push_one(info . THREAD_FLD (r11));
-       GC_push_one(info . THREAD_FLD (r12));
-       GC_push_one(info . THREAD_FLD (r13));
-       GC_push_one(info . THREAD_FLD (r14));
-       GC_push_one(info . THREAD_FLD (r15));
-       GC_push_one(info . THREAD_FLD (r16));
-       GC_push_one(info . THREAD_FLD (r17));
-       GC_push_one(info . THREAD_FLD (r18));
-       GC_push_one(info . THREAD_FLD (r19));
-       GC_push_one(info . THREAD_FLD (r20));
-       GC_push_one(info . THREAD_FLD (r21));
-       GC_push_one(info . THREAD_FLD (r22));
-       GC_push_one(info . THREAD_FLD (r23));
-       GC_push_one(info . THREAD_FLD (r24));
-       GC_push_one(info . THREAD_FLD (r25));
-       GC_push_one(info . THREAD_FLD (r26));
-       GC_push_one(info . THREAD_FLD (r27));
-       GC_push_one(info . THREAD_FLD (r28));
-       GC_push_one(info . THREAD_FLD (r29));
-       GC_push_one(info . THREAD_FLD (r30));
-       GC_push_one(info . THREAD_FLD (r31));
+        mach_msg_type_number_t outCount = THREAD_STATE_MAX;
+        r = thread_get_state(thread, GC_MACH_THREAD_STATE, (natural_t *)&info,
+                             &outCount);
+        if(r != KERN_SUCCESS)
+          ABORT("task_get_state failed");
+
+        lo = (void*)(info . THREAD_FLD (r1) - PPC_RED_ZONE_SIZE);
+        hi = (ptr_t)FindTopOfStack(info . THREAD_FLD (r1));
+
+        GC_push_one(info . THREAD_FLD (r0));
+        GC_push_one(info . THREAD_FLD (r2));
+        GC_push_one(info . THREAD_FLD (r3));
+        GC_push_one(info . THREAD_FLD (r4));
+        GC_push_one(info . THREAD_FLD (r5));
+        GC_push_one(info . THREAD_FLD (r6));
+        GC_push_one(info . THREAD_FLD (r7));
+        GC_push_one(info . THREAD_FLD (r8));
+        GC_push_one(info . THREAD_FLD (r9));
+        GC_push_one(info . THREAD_FLD (r10));
+        GC_push_one(info . THREAD_FLD (r11));
+        GC_push_one(info . THREAD_FLD (r12));
+        GC_push_one(info . THREAD_FLD (r13));
+        GC_push_one(info . THREAD_FLD (r14));
+        GC_push_one(info . THREAD_FLD (r15));
+        GC_push_one(info . THREAD_FLD (r16));
+        GC_push_one(info . THREAD_FLD (r17));
+        GC_push_one(info . THREAD_FLD (r18));
+        GC_push_one(info . THREAD_FLD (r19));
+        GC_push_one(info . THREAD_FLD (r20));
+        GC_push_one(info . THREAD_FLD (r21));
+        GC_push_one(info . THREAD_FLD (r22));
+        GC_push_one(info . THREAD_FLD (r23));
+        GC_push_one(info . THREAD_FLD (r24));
+        GC_push_one(info . THREAD_FLD (r25));
+        GC_push_one(info . THREAD_FLD (r26));
+        GC_push_one(info . THREAD_FLD (r27));
+        GC_push_one(info . THREAD_FLD (r28));
+        GC_push_one(info . THREAD_FLD (r29));
+        GC_push_one(info . THREAD_FLD (r30));
+        GC_push_one(info . THREAD_FLD (r31));
 
 #     elif defined(I386)
-       /* FIXME: Remove after testing: */
-       WARN("This is completely untested and likely will not work\n", 0);
-       GC_THREAD_STATE_T info;
-       mach_msg_type_number_t outCount = THREAD_STATE_MAX;
-       r = thread_get_state(thread, GC_MACH_THREAD_STATE, (natural_t *)&info,
-                            &outCount);
-       if(r != KERN_SUCCESS)
-         ABORT("task_get_state failed");
-
-       lo = (void*)info . THREAD_FLD (esp);
-       hi = (ptr_t)FindTopOfStack(info . THREAD_FLD (esp));
-
-       GC_push_one(info . THREAD_FLD (eax));
-       GC_push_one(info . THREAD_FLD (ebx));
-       GC_push_one(info . THREAD_FLD (ecx));
-       GC_push_one(info . THREAD_FLD (edx));
-       GC_push_one(info . THREAD_FLD (edi));
-       GC_push_one(info . THREAD_FLD (esi));
-       /* GC_push_one(info . THREAD_FLD (ebp));  */
-       /* GC_push_one(info . THREAD_FLD (esp));  */
-       GC_push_one(info . THREAD_FLD (ss));
-       GC_push_one(info . THREAD_FLD (eip));
-       GC_push_one(info . THREAD_FLD (cs));
-       GC_push_one(info . THREAD_FLD (ds));
-       GC_push_one(info . THREAD_FLD (es));
-       GC_push_one(info . THREAD_FLD (fs));
-       GC_push_one(info . THREAD_FLD (gs));
+        /* FIXME: Remove after testing: */
+        WARN("This is completely untested and likely will not work\n", 0);
+        GC_THREAD_STATE_T info;
+        mach_msg_type_number_t outCount = THREAD_STATE_MAX;
+        r = thread_get_state(thread, GC_MACH_THREAD_STATE, (natural_t *)&info,
+                             &outCount);
+        if(r != KERN_SUCCESS)
+          ABORT("task_get_state failed");
+
+        lo = (void*)info . THREAD_FLD (esp);
+        hi = (ptr_t)FindTopOfStack(info . THREAD_FLD (esp));
+
+        GC_push_one(info . THREAD_FLD (eax));
+        GC_push_one(info . THREAD_FLD (ebx));
+        GC_push_one(info . THREAD_FLD (ecx));
+        GC_push_one(info . THREAD_FLD (edx));
+        GC_push_one(info . THREAD_FLD (edi));
+        GC_push_one(info . THREAD_FLD (esi));
+        /* GC_push_one(info . THREAD_FLD (ebp));  */
+        /* GC_push_one(info . THREAD_FLD (esp));  */
+        GC_push_one(info . THREAD_FLD (ss));
+        GC_push_one(info . THREAD_FLD (eip));
+        GC_push_one(info . THREAD_FLD (cs));
+        GC_push_one(info . THREAD_FLD (ds));
+        GC_push_one(info . THREAD_FLD (es));
+        GC_push_one(info . THREAD_FLD (fs));
+        GC_push_one(info . THREAD_FLD (gs));
 
 #     elif defined(X86_64)
-       GC_THREAD_STATE_T info;
-       mach_msg_type_number_t outCount = THREAD_STATE_MAX;
-       r = thread_get_state(thread, GC_MACH_THREAD_STATE, (natural_t *)&info,
-                            &outCount);
-       if(r != KERN_SUCCESS)
-         ABORT("task_get_state failed");
-
-       lo = (void*)info . THREAD_FLD (rsp);
-       hi = (ptr_t)FindTopOfStack(info . THREAD_FLD (rsp));
-
-       GC_push_one(info . THREAD_FLD (rax));
-       GC_push_one(info . THREAD_FLD (rbx));
-       GC_push_one(info . THREAD_FLD (rcx));
-       GC_push_one(info . THREAD_FLD (rdx));
-       GC_push_one(info . THREAD_FLD (rdi));
-       GC_push_one(info . THREAD_FLD (rsi));
-       GC_push_one(info . THREAD_FLD (rbp));
-       GC_push_one(info . THREAD_FLD (rsp));
-       GC_push_one(info . THREAD_FLD (r8));
-       GC_push_one(info . THREAD_FLD (r9));
-       GC_push_one(info . THREAD_FLD (r10));
-       GC_push_one(info . THREAD_FLD (r11));
-       GC_push_one(info . THREAD_FLD (r12));
-       GC_push_one(info . THREAD_FLD (r13));
-       GC_push_one(info . THREAD_FLD (r14));
-       GC_push_one(info . THREAD_FLD (r15));
-       GC_push_one(info . THREAD_FLD (rip));
-       GC_push_one(info . THREAD_FLD (rflags));
-       GC_push_one(info . THREAD_FLD (cs));
-       GC_push_one(info . THREAD_FLD (fs));
-       GC_push_one(info . THREAD_FLD (gs));
+        GC_THREAD_STATE_T info;
+        mach_msg_type_number_t outCount = THREAD_STATE_MAX;
+        r = thread_get_state(thread, GC_MACH_THREAD_STATE, (natural_t *)&info,
+                             &outCount);
+        if(r != KERN_SUCCESS)
+          ABORT("task_get_state failed");
+
+        lo = (void*)info . THREAD_FLD (rsp);
+        hi = (ptr_t)FindTopOfStack(info . THREAD_FLD (rsp));
+
+        GC_push_one(info . THREAD_FLD (rax));
+        GC_push_one(info . THREAD_FLD (rbx));
+        GC_push_one(info . THREAD_FLD (rcx));
+        GC_push_one(info . THREAD_FLD (rdx));
+        GC_push_one(info . THREAD_FLD (rdi));
+        GC_push_one(info . THREAD_FLD (rsi));
+        GC_push_one(info . THREAD_FLD (rbp));
+        GC_push_one(info . THREAD_FLD (rsp));
+        GC_push_one(info . THREAD_FLD (r8));
+        GC_push_one(info . THREAD_FLD (r9));
+        GC_push_one(info . THREAD_FLD (r10));
+        GC_push_one(info . THREAD_FLD (r11));
+        GC_push_one(info . THREAD_FLD (r12));
+        GC_push_one(info . THREAD_FLD (r13));
+        GC_push_one(info . THREAD_FLD (r14));
+        GC_push_one(info . THREAD_FLD (r15));
+        GC_push_one(info . THREAD_FLD (rip));
+        GC_push_one(info . THREAD_FLD (rflags));
+        GC_push_one(info . THREAD_FLD (cs));
+        GC_push_one(info . THREAD_FLD (fs));
+        GC_push_one(info . THREAD_FLD (gs));
 
 #      elif defined(ARM32)
-       GC_THREAD_STATE_T info;
-       mach_msg_type_number_t outCount = THREAD_STATE_MAX;
-       r = thread_get_state(thread, GC_MACH_THREAD_STATE, (natural_t *)&info,
-                            &outCount);
-       if(r != KERN_SUCCESS)
-         ABORT("task_get_state failed");
-
-       hi = (ptr_t)FindTopOfStack(info . __sp);
-
-       lo = (void*)info.__sp;
-
-       GC_push_one(info.__r[0]);
-       GC_push_one(info.__r[1]);
-       GC_push_one(info.__r[2]);
-       GC_push_one(info.__r[3]);
-       GC_push_one(info.__r[4]);
-       GC_push_one(info.__r[5]);
-       GC_push_one(info.__r[6]);
-       GC_push_one(info.__r[7]);
-       GC_push_one(info.__r[8]);
-       GC_push_one(info.__r[9]);
-       GC_push_one(info.__r[10]);
-       GC_push_one(info.__r[11]);
-       GC_push_one(info.__r[12]);
-       /* GC_push_one(info.__sp); */
-       GC_push_one(info.__lr);
-       GC_push_one(info.__pc);
-       GC_push_one(info.__cpsr);
+        GC_THREAD_STATE_T info;
+        mach_msg_type_number_t outCount = THREAD_STATE_MAX;
+        r = thread_get_state(thread, GC_MACH_THREAD_STATE, (natural_t *)&info,
+                             &outCount);
+        if(r != KERN_SUCCESS)
+          ABORT("task_get_state failed");
+
+        hi = (ptr_t)FindTopOfStack(info . __sp);
+
+        lo = (void*)info.__sp;
+
+        GC_push_one(info.__r[0]);
+        GC_push_one(info.__r[1]);
+        GC_push_one(info.__r[2]);
+        GC_push_one(info.__r[3]);
+        GC_push_one(info.__r[4]);
+        GC_push_one(info.__r[5]);
+        GC_push_one(info.__r[6]);
+        GC_push_one(info.__r[7]);
+        GC_push_one(info.__r[8]);
+        GC_push_one(info.__r[9]);
+        GC_push_one(info.__r[10]);
+        GC_push_one(info.__r[11]);
+        GC_push_one(info.__r[12]);
+        /* GC_push_one(info.__sp); */
+        GC_push_one(info.__lr);
+        GC_push_one(info.__pc);
+        GC_push_one(info.__cpsr);
 
 #     else
-#      error FIXME for non-x86 || ppc || arm architectures
+#       error FIXME for non-x86 || ppc || arm architectures
 #     endif
       }
-#     if DEBUG_THREADS
+#     ifdef DEBUG_THREADS
         GC_printf("Darwin: Stack for thread 0x%lx = [%p,%p)\n",
-                 (unsigned long) thread, lo, hi);
+                  (unsigned long) thread, lo, hi);
 #     endif
+      /* FIXME: use GC_push_all_stack_frames. */
       GC_push_all_stack(lo, hi);
       mach_port_deallocate(my_task, thread);
-    } /* for(p=GC_threads[i]...) */
+      total_size += hi - lo; /* lo <= hi */
+    } /* for(i=0; ...) */
     vm_deallocate(my_task, (vm_address_t)act_list,
-                 sizeof(thread_t) * listcount);
+                  sizeof(thread_t) * listcount);
     mach_port_deallocate(my_task, me);
+    GC_total_stacksize = total_size;
 }
 #endif /* !DARWIN_DONT_PARSE_STACK */
 
-static mach_port_t GC_mach_handler_thread;
-static int GC_use_mach_handler_thread = 0;
+STATIC mach_port_t GC_mach_handler_thread = 0;
+STATIC int GC_use_mach_handler_thread = 0;
 
 static struct GC_mach_thread GC_mach_threads[THREAD_TABLE_SZ];
-static int GC_mach_threads_count;
+STATIC int GC_mach_threads_count = 0;
 
-void GC_stop_init(void)
+GC_INNER void GC_stop_init(void)
 {
   int i;
 
@@ -414,7 +434,7 @@ void GC_stop_init(void)
 
 /* returns true if there's a thread in act_list that wasn't in old_list */
 STATIC int GC_suspend_thread_list(thread_act_array_t act_list, int count,
-                                 thread_act_array_t old_list, int old_count)
+                                  thread_act_array_t old_list, int old_count)
 {
   mach_port_t my_thread = mach_thread_self();
   int i, j;
@@ -423,7 +443,7 @@ STATIC int GC_suspend_thread_list(thread_act_array_t act_list, int count,
 
   for(i = 0; i < count; i++) {
     thread_act_t thread = act_list[i];
-#   if DEBUG_THREADS
+#   ifdef DEBUG_THREADS
       GC_printf("Attempting to suspend thread %p\n", thread);
 #   endif
     /* find the current thread in the old list */
@@ -431,8 +451,8 @@ STATIC int GC_suspend_thread_list(thread_act_array_t act_list, int count,
     for(j = 0; j < old_count; j++) {
       thread_act_t old_thread = old_list[j];
       if (old_thread == thread) {
-       found = 1;
-       break;
+        found = 1;
+        break;
       }
     }
     if (!found) {
@@ -444,48 +464,48 @@ STATIC int GC_suspend_thread_list(thread_act_array_t act_list, int count,
     }
 
     if (thread != my_thread
-       && (!GC_use_mach_handler_thread
-           || (GC_use_mach_handler_thread
-               && GC_mach_handler_thread != thread))) {
+        && (!GC_use_mach_handler_thread
+            || (GC_use_mach_handler_thread
+                && GC_mach_handler_thread != thread))) {
       struct thread_basic_info info;
       mach_msg_type_number_t outCount = THREAD_INFO_MAX;
       kern_return_t kern_result = thread_info(thread, THREAD_BASIC_INFO,
-                               (thread_info_t)&info, &outCount);
+                                (thread_info_t)&info, &outCount);
       if(kern_result != KERN_SUCCESS) {
-       /* the thread may have quit since the thread_threads () call
-        * we mark already_suspended so it's not dealt with anymore later
-        */
-       if (!found) {
-         GC_mach_threads[GC_mach_threads_count].already_suspended = TRUE;
-         GC_mach_threads_count++;
-       }
-       continue;
+        /* the thread may have quit since the thread_threads () call
+         * we mark already_suspended so it's not dealt with anymore later
+         */
+        if (!found) {
+          GC_mach_threads[GC_mach_threads_count].already_suspended = TRUE;
+          GC_mach_threads_count++;
+        }
+        continue;
       }
-#     if DEBUG_THREADS
+#     ifdef DEBUG_THREADS
         GC_printf("Thread state for 0x%lx = %d\n", (unsigned long)thread,
-                 info.run_state);
+                  info.run_state);
 #     endif
       if (!found) {
-       GC_mach_threads[GC_mach_threads_count].already_suspended
-         = info.suspend_count;
+        GC_mach_threads[GC_mach_threads_count].already_suspended
+          = info.suspend_count;
       }
       if (info.suspend_count)
-       continue;
+        continue;
 
-#     if DEBUG_THREADS
+#     ifdef DEBUG_THREADS
         GC_printf("Suspending 0x%lx\n", (unsigned long)thread);
 #     endif
       /* Suspend the thread */
       kern_result = thread_suspend(thread);
       if(kern_result != KERN_SUCCESS) {
-       /* the thread may have quit since the thread_threads () call
-        * we mark already_suspended so it's not dealt with anymore later
-        */
-       if (!found) {
-         GC_mach_threads[GC_mach_threads_count].already_suspended = TRUE;
-         GC_mach_threads_count++;
-       }
-       continue;
+        /* the thread may have quit since the thread_threads () call
+         * we mark already_suspended so it's not dealt with anymore later
+         */
+        if (!found) {
+          GC_mach_threads[GC_mach_threads_count].already_suspended = TRUE;
+          GC_mach_threads_count++;
+        }
+        continue;
       }
     }
     if (!found) GC_mach_threads_count++;
@@ -494,9 +514,13 @@ STATIC int GC_suspend_thread_list(thread_act_array_t act_list, int count,
   return changed;
 }
 
+#ifdef MPROTECT_VDB
+  GC_INNER void GC_mprotect_stop(void);
+  GC_INNER void GC_mprotect_resume(void);
+#endif
 
-/* Caller holds allocation lock.       */
-void GC_stop_world(void)
+/* Caller holds allocation lock.        */
+GC_INNER void GC_stop_world(void)
 {
     unsigned int i, changes;
     task_t my_task = current_task();
@@ -505,23 +529,23 @@ void GC_stop_world(void)
     thread_act_array_t act_list, prev_list;
     mach_msg_type_number_t listcount, prevcount;
 
-#   if DEBUG_THREADS
+#   ifdef DEBUG_THREADS
       GC_printf("Stopping the world from 0x%lx\n",
-               (unsigned long)mach_thread_self());
+                (unsigned long)mach_thread_self());
 #   endif
 
     /* clear out the mach threads list table */
     GC_stop_init();
 
     /* Make sure all free list construction has stopped before we start. */
-    /* No new construction can start, since free list construction is  */
-    /* required to acquire and release the GC lock before it starts,   */
-    /* and we have the lock.                                           */
+    /* No new construction can start, since free list construction is   */
+    /* required to acquire and release the GC lock before it starts,    */
+    /* and we have the lock.                                            */
 #   ifdef PARALLEL_MARK
       if (GC_parallel) {
-       GC_acquire_mark_lock();
-       GC_ASSERT(GC_fl_builder_count == 0);
-       /* We should have previously waited for it to become zero. */
+        GC_acquire_mark_lock();
+        GC_ASSERT(GC_fl_builder_count == 0);
+        /* We should have previously waited for it to become zero. */
       }
 #   endif /* PARALLEL_MARK */
 
@@ -543,19 +567,19 @@ void GC_stop_world(void)
       kern_result = task_threads(my_task, &act_list, &listcount);
 
       if(kern_result == KERN_SUCCESS) {
-       result = GC_suspend_thread_list(act_list, listcount, prev_list,
-                                       prevcount);
-       changes = result;
-
-       if(prev_list != NULL) {
-         for(i = 0; i < prevcount; i++)
-           mach_port_deallocate(my_task, prev_list[i]);
-
-         vm_deallocate(my_task, (vm_address_t)prev_list,
-                       sizeof(thread_t) * prevcount);
-       }
-       prev_list = act_list;
-       prevcount = listcount;
+        result = GC_suspend_thread_list(act_list, listcount, prev_list,
+                                        prevcount);
+        changes = result;
+
+        if(prev_list != NULL) {
+          for(i = 0; i < prevcount; i++)
+            mach_port_deallocate(my_task, prev_list[i]);
+
+          vm_deallocate(my_task, (vm_address_t)prev_list,
+                        sizeof(thread_t) * prevcount);
+        }
+        prev_list = act_list;
+        prevcount = listcount;
       }
     } while (changes);
     GC_ASSERT(prev_list != 0);
@@ -563,29 +587,28 @@ void GC_stop_world(void)
       mach_port_deallocate(my_task, prev_list[i]);
 
     vm_deallocate(my_task, (vm_address_t)act_list,
-                 sizeof(thread_t) * listcount);
+                  sizeof(thread_t) * listcount);
 
 #   ifdef MPROTECT_VDB
       if(GC_incremental) {
-       extern void GC_mprotect_stop();
-       GC_mprotect_stop();
+        GC_mprotect_stop();
       }
 #   endif
 
 #   ifdef PARALLEL_MARK
       if (GC_parallel)
-       GC_release_mark_lock();
+        GC_release_mark_lock();
 #   endif
-#   if DEBUG_THREADS
+#   ifdef DEBUG_THREADS
       GC_printf("World stopped from 0x%lx\n", (unsigned long)my_thread);
 #   endif
 
     mach_port_deallocate(my_task, my_thread);
 }
 
-/* Caller holds allocation lock, and has held it continuously since    */
-/* the world stopped.                                                  */
-void GC_start_world(void)
+/* Caller holds allocation lock, and has held it continuously since     */
+/* the world stopped.                                                   */
+GC_INNER void GC_start_world(void)
 {
   task_t my_task = current_task();
   mach_port_t my_thread = mach_thread_self();
@@ -597,14 +620,13 @@ void GC_start_world(void)
   struct thread_basic_info info;
   mach_msg_type_number_t outCount = THREAD_INFO_MAX;
 
-#   if DEBUG_THREADS
+#   ifdef DEBUG_THREADS
       GC_printf("World starting\n");
 #   endif
 
 #   ifdef MPROTECT_VDB
       if(GC_incremental) {
-       extern void GC_mprotect_resume();
-       GC_mprotect_resume();
+        GC_mprotect_resume();
       }
 #   endif
 
@@ -612,45 +634,45 @@ void GC_start_world(void)
     for(i = 0; i < listcount; i++) {
       thread_act_t thread = act_list[i];
       if (thread != my_thread
-         && (!GC_use_mach_handler_thread
-             || (GC_use_mach_handler_thread
-                 && GC_mach_handler_thread != thread))) {
-       for(j = 0; j < GC_mach_threads_count; j++) {
-         if (thread == GC_mach_threads[j].thread) {
-           if (GC_mach_threads[j].already_suspended) {
-#             if DEBUG_THREADS
-               GC_printf("Not resuming already suspended thread %p\n", thread);
+          && (!GC_use_mach_handler_thread
+              || (GC_use_mach_handler_thread
+                  && GC_mach_handler_thread != thread))) {
+        for(j = 0; j < GC_mach_threads_count; j++) {
+          if (thread == GC_mach_threads[j].thread) {
+            if (GC_mach_threads[j].already_suspended) {
+#             ifdef DEBUG_THREADS
+                GC_printf("Not resuming already suspended thread %p\n", thread);
 #             endif
-             continue;
-           }
-           kern_result = thread_info(thread, THREAD_BASIC_INFO,
-                                     (thread_info_t)&info, &outCount);
-           if(kern_result != KERN_SUCCESS)
-             ABORT("thread_info failed");
-#           if DEBUG_THREADS
-             GC_printf("Thread state for 0x%lx = %d\n", (unsigned long)thread,
-                        info.run_state);
-             GC_printf("Resuming 0x%lx\n", (unsigned long)thread);
+              continue;
+            }
+            kern_result = thread_info(thread, THREAD_BASIC_INFO,
+                                      (thread_info_t)&info, &outCount);
+            if(kern_result != KERN_SUCCESS)
+              ABORT("thread_info failed");
+#           ifdef DEBUG_THREADS
+              GC_printf("Thread state for 0x%lx = %d\n", (unsigned long)thread,
+                         info.run_state);
+              GC_printf("Resuming 0x%lx\n", (unsigned long)thread);
 #           endif
-           /* Resume the thread */
-           kern_result = thread_resume(thread);
-           if(kern_result != KERN_SUCCESS)
-             ABORT("thread_resume failed");
-         }
-       }
+            /* Resume the thread */
+            kern_result = thread_resume(thread);
+            if(kern_result != KERN_SUCCESS)
+              ABORT("thread_resume failed");
+          }
+        }
       }
       mach_port_deallocate(my_task, thread);
     }
     vm_deallocate(my_task, (vm_address_t)act_list,
-                 sizeof(thread_t) * listcount);
+                  sizeof(thread_t) * listcount);
 
     mach_port_deallocate(my_task, my_thread);
-#   if DEBUG_THREADS
+#   ifdef DEBUG_THREADS
       GC_printf("World started\n");
 #   endif
 }
 
-void GC_darwin_register_mach_handler_thread(mach_port_t thread)
+GC_INNER void GC_darwin_register_mach_handler_thread(mach_port_t thread)
 {
   GC_mach_handler_thread = thread;
   GC_use_mach_handler_thread = 1;
index 85d82b892dc173cec2d6822e5dd75747b8c9e643..1a7d0f2a9171d6012d997d32a2bf6ebd8ab917f1 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1995 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1997 by Silicon Graphics.  All rights reserved.
  * modified is included with the above copyright notice.
  */
 
-#include <errno.h>
-#include <string.h>
 #include "private/dbg_mlc.h"
 
-void GC_default_print_heap_obj_proc(ptr_t p);
-GC_API void GC_CALL GC_register_finalizer_no_order
-       (void * obj, GC_finalization_proc fn, void * cd,
-        GC_finalization_proc *ofn, void * *ocd);
+#ifndef MSWINCE
+# include <errno.h>
+#endif
+#include <string.h>
+
+GC_INNER void GC_default_print_heap_obj_proc(ptr_t p);
 
+GC_API void GC_CALL GC_register_finalizer_no_order(void * obj,
+                                GC_finalization_proc fn, void * cd,
+                                GC_finalization_proc *ofn, void * *ocd);
 
 #ifndef SHORT_DBG_HDRS
-/* Check whether object with base pointer p has debugging info */ 
-/* p is assumed to point to a legitimate object in our part    */
-/* of the heap.                                                        */
-/* This excludes the check as to whether the back pointer is   */
-/* odd, which is added by the GC_HAS_DEBUG_INFO macro.         */
-/* Note that if DBG_HDRS_ALL is set, uncollectable objects     */
-/* on free lists may not have debug information set.  Thus it's        */
-/* not always safe to return TRUE, even if the client does     */
-/* its part.                                                   */
-GC_bool GC_has_other_debug_info(ptr_t p)
-{
-    register oh * ohdr = (oh *)p;
-    register ptr_t body = (ptr_t)(ohdr + 1);
-    register word sz = GC_size((ptr_t) ohdr);
-    
+  /* Check whether object with base pointer p has debugging info  */
+  /* p is assumed to point to a legitimate object in our part     */
+  /* of the heap.                                                 */
+  /* This excludes the check as to whether the back pointer is    */
+  /* odd, which is added by the GC_HAS_DEBUG_INFO macro.          */
+  /* Note that if DBG_HDRS_ALL is set, uncollectable objects      */
+  /* on free lists may not have debug information set.  Thus it's */
+  /* not always safe to return TRUE, even if the client does      */
+  /* its part.                                                    */
+  GC_INNER GC_bool GC_has_other_debug_info(ptr_t p)
+  {
+    oh * ohdr = (oh *)p;
+    ptr_t body = (ptr_t)(ohdr + 1);
+    word sz = GC_size((ptr_t) ohdr);
+
     if (HBLKPTR((ptr_t)ohdr) != HBLKPTR((ptr_t)body)
         || sz < DEBUG_BYTES + EXTRA_BYTES) {
         return(FALSE);
     }
     if (ohdr -> oh_sz == sz) {
-       /* Object may have had debug info, but has been deallocated     */
-       return(FALSE);
+        /* Object may have had debug info, but has been deallocated     */
+        return(FALSE);
     }
     if (ohdr -> oh_sf == (START_FLAG ^ (word)body)) return(TRUE);
     if (((word *)ohdr)[BYTES_TO_WORDS(sz)-1] == (END_FLAG ^ (word)body)) {
         return(TRUE);
     }
     return(FALSE);
-}
+  }
 #endif
 
 #ifdef KEEP_BACK_PTRS
@@ -69,52 +72,54 @@ GC_bool GC_has_other_debug_info(ptr_t p)
 # endif
 
   /* Store back pointer to source in dest, if that appears to be possible. */
-  /* This is not completely safe, since we may mistakenly conclude that           */
-  /* dest has a debugging wrapper.  But the error probability is very     */
-  /* small, and this shouldn't be used in production code.                */
+  /* This is not completely safe, since we may mistakenly conclude that    */
+  /* dest has a debugging wrapper.  But the error probability is very      */
+  /* small, and this shouldn't be used in production code.                 */
   /* We assume that dest is the real base pointer.  Source will usually    */
-  /* be a pointer to the interior of an object.                                   */
-  void GC_store_back_pointer(ptr_t source, ptr_t dest)
+  /* be a pointer to the interior of an object.                            */
+  GC_INNER void GC_store_back_pointer(ptr_t source, ptr_t dest)
   {
     if (GC_HAS_DEBUG_INFO(dest)) {
       ((oh *)dest) -> oh_back_ptr = HIDE_BACK_PTR(source);
     }
   }
 
-  void GC_marked_for_finalization(ptr_t dest) {
+  GC_INNER void GC_marked_for_finalization(ptr_t dest)
+  {
     GC_store_back_pointer(MARKED_FOR_FINALIZATION, dest);
   }
 
-  /* Store information about the object referencing dest in *base_p    */
-  /* and *offset_p.                                                    */
-  /*   source is root ==> *base_p = address, *offset_p = 0             */
-  /*   source is heap object ==> *base_p != 0, *offset_p = offset      */
-  /*   Returns 1 on success, 0 if source couldn't be determined.       */
-  /* Dest can be any address within a heap object.                     */
-  GC_ref_kind GC_get_back_ptr_info(void *dest, void **base_p, size_t *offset_p)
+  /* Store information about the object referencing dest in *base_p     */
+  /* and *offset_p.                                                     */
+  /*   source is root ==> *base_p = address, *offset_p = 0              */
+  /*   source is heap object ==> *base_p != 0, *offset_p = offset       */
+  /*   Returns 1 on success, 0 if source couldn't be determined.        */
+  /* Dest can be any address within a heap object.                      */
+  GC_API GC_ref_kind GC_CALL GC_get_back_ptr_info(void *dest, void **base_p,
+                                                size_t *offset_p)
   {
     oh * hdr = (oh *)GC_base(dest);
     ptr_t bp;
     ptr_t bp_base;
     if (!GC_HAS_DEBUG_INFO((ptr_t) hdr)) return GC_NO_SPACE;
-    bp = REVEAL_POINTER(hdr -> oh_back_ptr);
+    bp = GC_REVEAL_POINTER(hdr -> oh_back_ptr);
     if (MARKED_FOR_FINALIZATION == bp) return GC_FINALIZER_REFD;
     if (MARKED_FROM_REGISTER == bp) return GC_REFD_FROM_REG;
     if (NOT_MARKED == bp) return GC_UNREFERENCED;
 #   if ALIGNMENT == 1
-      /* Heuristically try to fix off by 1 errors we introduced by     */
-      /* insisting on even addresses.                                  */
+      /* Heuristically try to fix off by 1 errors we introduced by      */
+      /* insisting on even addresses.                                   */
       {
-       ptr_t alternate_ptr = bp + 1;
-       ptr_t target = *(ptr_t *)bp;
-       ptr_t alternate_target = *(ptr_t *)alternate_ptr;
-
-       if (alternate_target >= GC_least_plausible_heap_addr
-           && alternate_target <= GC_greatest_plausible_heap_addr
-           && (target < GC_least_plausible_heap_addr
-               || target > GC_greatest_plausible_heap_addr)) {
-           bp = alternate_ptr;
-       }
+        ptr_t alternate_ptr = bp + 1;
+        ptr_t target = *(ptr_t *)bp;
+        ptr_t alternate_target = *(ptr_t *)alternate_ptr;
+
+        if (alternate_target >= GC_least_plausible_heap_addr
+            && alternate_target <= GC_greatest_plausible_heap_addr
+            && (target < GC_least_plausible_heap_addr
+                || target > GC_greatest_plausible_heap_addr)) {
+            bp = alternate_ptr;
+        }
       }
 #   endif
     bp_base = GC_base(bp);
@@ -130,28 +135,28 @@ GC_bool GC_has_other_debug_info(ptr_t p)
     }
   }
 
-  /* Generate a random heap address.           */
-  /* The resulting address is in the heap, but */
-  /* not necessarily inside a valid object.    */
-  void *GC_generate_random_heap_address(void)
+  /* Generate a random heap address.            */
+  /* The resulting address is in the heap, but  */
+  /* not necessarily inside a valid object.     */
+  GC_API void * GC_CALL GC_generate_random_heap_address(void)
   {
     size_t i;
     word heap_offset = RANDOM();
     if (GC_heapsize > RAND_MAX) {
-       heap_offset *= RAND_MAX;
-       heap_offset += RANDOM();
+        heap_offset *= RAND_MAX;
+        heap_offset += RANDOM();
     }
     heap_offset %= GC_heapsize;
-       /* This doesn't yield a uniform distribution, especially if     */
-        /* e.g. RAND_MAX = 1.5* GC_heapsize.  But for typical cases,   */
-        /* it's not too bad.                                           */
+        /* This doesn't yield a uniform distribution, especially if     */
+        /* e.g. RAND_MAX = 1.5* GC_heapsize.  But for typical cases,    */
+        /* it's not too bad.                                            */
     for (i = 0; i < GC_n_heap_sects; ++ i) {
-       size_t size = GC_heap_sects[i].hs_bytes;
-       if (heap_offset < size) {
-           return GC_heap_sects[i].hs_start + heap_offset;
-       } else {
-           heap_offset -= size;
-       }
+        size_t size = GC_heap_sects[i].hs_bytes;
+        if (heap_offset < size) {
+            return GC_heap_sects[i].hs_start + heap_offset;
+        } else {
+            heap_offset -= size;
+        }
     }
     ABORT("GC_generate_random_heap_address: size inconsistency");
     /*NOTREACHED*/
@@ -159,21 +164,21 @@ GC_bool GC_has_other_debug_info(ptr_t p)
   }
 
   /* Generate a random address inside a valid marked heap object. */
-  void *GC_generate_random_valid_address(void)
+  GC_API void * GC_CALL GC_generate_random_valid_address(void)
   {
     ptr_t result;
     ptr_t base;
     for (;;) {
-       result = GC_generate_random_heap_address();
-       base = GC_base(result);
-       if (0 == base) continue;
-       if (!GC_is_marked(base)) continue;
-       return result;
+        result = GC_generate_random_heap_address();
+        base = GC_base(result);
+        if (0 == base) continue;
+        if (!GC_is_marked(base)) continue;
+        return result;
     }
   }
 
   /* Print back trace for p */
-  void GC_print_backtrace(void *p)
+  GC_API void GC_CALL GC_print_backtrace(void *p)
   {
     void *current = p;
     int i;
@@ -186,66 +191,71 @@ GC_bool GC_has_other_debug_info(ptr_t p)
     for (i = 0; ; ++i) {
       source = GC_get_back_ptr_info(current, &base, &offset);
       if (GC_UNREFERENCED == source) {
-       GC_err_printf("Reference could not be found\n");
-       goto out;
+        GC_err_printf("Reference could not be found\n");
+        goto out;
       }
       if (GC_NO_SPACE == source) {
-       GC_err_printf("No debug info in object: Can't find reference\n");
-       goto out;
+        GC_err_printf("No debug info in object: Can't find reference\n");
+        goto out;
       }
       GC_err_printf("Reachable via %d levels of pointers from ", i);
       switch(source) {
-       case GC_REFD_FROM_ROOT:
-         GC_err_printf("root at %p\n\n", base);
-         goto out;
-       case GC_REFD_FROM_REG:
-         GC_err_printf("root in register\n\n");
-         goto out;
-       case GC_FINALIZER_REFD:
-         GC_err_printf("list of finalizable objects\n\n");
-         goto out;
-       case GC_REFD_FROM_HEAP:
-         GC_err_printf("offset %ld in object:\n", (unsigned long)offset);
-         /* Take GC_base(base) to get real base, i.e. header. */
-         GC_print_heap_obj(GC_base(base));
-         GC_err_printf("\n");
-         break;
-       default:
-         GC_err_printf("INTERNAL ERROR: UNEXPECTED SOURCE!!!!\n");
-         goto out;
+        case GC_REFD_FROM_ROOT:
+          GC_err_printf("root at %p\n\n", base);
+          goto out;
+        case GC_REFD_FROM_REG:
+          GC_err_printf("root in register\n\n");
+          goto out;
+        case GC_FINALIZER_REFD:
+          GC_err_printf("list of finalizable objects\n\n");
+          goto out;
+        case GC_REFD_FROM_HEAP:
+          GC_err_printf("offset %ld in object:\n", (unsigned long)offset);
+          /* Take GC_base(base) to get real base, i.e. header. */
+          GC_print_heap_obj(GC_base(base));
+          GC_err_printf("\n");
+          break;
+        default:
+          GC_err_printf("INTERNAL ERROR: UNEXPECTED SOURCE!!!!\n");
+          goto out;
       }
       current = base;
     }
     out:;
   }
 
-  /* Force a garbage collection and generate a backtrace from a        */
-  /* random heap address.                                      */
-  void GC_generate_random_backtrace_no_gc(void)
+  /* Force a garbage collection and generate a backtrace from a */
+  /* random heap address.                                       */
+  GC_INNER void GC_generate_random_backtrace_no_gc(void)
   {
     void * current;
     current = GC_generate_random_valid_address();
     GC_printf("\n****Chose address %p in object\n", current);
     GC_print_backtrace(current);
   }
-    
-  void GC_generate_random_backtrace(void)
+
+  GC_API void GC_CALL GC_generate_random_backtrace(void)
   {
-    GC_gcollect();
+    if (GC_try_to_collect(GC_never_stop_func) == 0) {
+      GC_err_printf("Cannot generate a backtrace: "
+                    "garbage collection is disabled!\n");
+      return;
+    }
     GC_generate_random_backtrace_no_gc();
   }
-    
+
 #endif /* KEEP_BACK_PTRS */
 
 # define CROSSES_HBLK(p, sz) \
-       (((word)(p + sizeof(oh) + sz - 1) ^ (word)p) >= HBLKSIZE)
+        (((word)(p + sizeof(oh) + sz - 1) ^ (word)p) >= HBLKSIZE)
 /* Store debugging info into p.  Return displaced pointer. */
-/* Assumes we don't hold allocation lock.                 */
-ptr_t GC_store_debug_info(ptr_t p, word sz, const char *string, word integer)
+/* Assumes we don't hold allocation lock.                  */
+GC_INNER ptr_t GC_store_debug_info(ptr_t p, word sz, const char *string,
+                                   word integer)
 {
-    register word * result = (word *)((oh *)p + 1);
+    word * result = (word *)((oh *)p + 1);
     DCL_LOCK_STATE;
-    
+
     LOCK();
     GC_ASSERT(GC_size(p) >= sizeof(oh) + sz);
     GC_ASSERT(!(SMALL_OBJ(sz) && CROSSES_HBLK(p, sz)));
@@ -268,13 +278,13 @@ ptr_t GC_store_debug_info(ptr_t p, word sz, const char *string, word integer)
 }
 
 #ifdef DBG_HDRS_ALL
-/* Store debugging info into p.  Return displaced pointer.        */
-/* This version assumes we do hold the allocation lock.                   */
+/* Store debugging info into p.  Return displaced pointer.         */
+/* This version assumes we do hold the allocation lock.            */
 STATIC ptr_t GC_store_debug_info_inner(ptr_t p, word sz, char *string,
-                                      word integer)
+                                       word integer)
 {
-    register word * result = (word *)((oh *)p + 1);
-    
+    word * result = (word *)((oh *)p + 1);
+
     GC_ASSERT(GC_size(p) >= sizeof(oh) + sz);
     GC_ASSERT(!(SMALL_OBJ(sz) && CROSSES_HBLK(p, sz)));
 #   ifdef KEEP_BACK_PTRS
@@ -296,13 +306,13 @@ STATIC ptr_t GC_store_debug_info_inner(ptr_t p, word sz, char *string,
 #endif
 
 #ifndef SHORT_DBG_HDRS
-/* Check the object with debugging info at ohdr                */
-/* return NIL if it's OK.  Else return clobbered       */
-/* address.                                            */
-STATIC ptr_t GC_check_annotated_obj(oh *ohdr)
-{
-    register ptr_t body = (ptr_t)(ohdr + 1);
-    register word gc_sz = GC_size((ptr_t)ohdr);
+  /* Check the object with debugging info at ohdr       */
+  /* return NIL if it's OK.  Else return clobbered      */
+  /* address.                                           */
+  STATIC ptr_t GC_check_annotated_obj(oh *ohdr)
+  {
+    ptr_t body = (ptr_t)(ohdr + 1);
+    word gc_sz = GC_size((ptr_t)ohdr);
     if (ohdr -> oh_sz + DEBUG_BYTES > gc_sz) {
         return((ptr_t)(&(ohdr -> oh_sz)));
     }
@@ -314,21 +324,22 @@ STATIC ptr_t GC_check_annotated_obj(oh *ohdr)
     }
     if (((word *)body)[SIMPLE_ROUNDED_UP_WORDS(ohdr -> oh_sz)]
         != (END_FLAG ^ (word)body)) {
-        return((ptr_t)((word *)body + SIMPLE_ROUNDED_UP_WORDS(ohdr -> oh_sz)));
+        return((ptr_t)((word *)body + SIMPLE_ROUNDED_UP_WORDS(ohdr->oh_sz)));
     }
     return(0);
-}
+  }
 #endif /* !SHORT_DBG_HDRS */
 
-static GC_describe_type_fn GC_describe_type_fns[MAXOBJKINDS] = {0};
+STATIC GC_describe_type_fn GC_describe_type_fns[MAXOBJKINDS] = {0};
 
-void GC_CALL GC_register_describe_type_fn(int kind, GC_describe_type_fn fn)
+GC_API void GC_CALL GC_register_describe_type_fn(int kind,
+                                                 GC_describe_type_fn fn)
 {
   GC_describe_type_fns[kind] = fn;
 }
 
-/* Print a type description for the object whose client-visible address        */
-/* is p.                                                               */
+/* Print a type description for the object whose client-visible address */
+/* is p.                                                                */
 STATIC void GC_print_type(ptr_t p)
 {
     hdr * hhdr = GC_find_header(p);
@@ -336,44 +347,44 @@ STATIC void GC_print_type(ptr_t p)
     int kind = hhdr -> hb_obj_kind;
 
     if (0 != GC_describe_type_fns[kind] && GC_is_marked(GC_base(p))) {
-       /* This should preclude free list objects except with   */
-       /* thread-local allocation.                             */
-       buffer[GC_TYPE_DESCR_LEN] = 0;
-       (GC_describe_type_fns[kind])(p, buffer);
-       GC_ASSERT(buffer[GC_TYPE_DESCR_LEN] == 0);
-       GC_err_puts(buffer);
+        /* This should preclude free list objects except with   */
+        /* thread-local allocation.                             */
+        buffer[GC_TYPE_DESCR_LEN] = 0;
+        (GC_describe_type_fns[kind])(p, buffer);
+        GC_ASSERT(buffer[GC_TYPE_DESCR_LEN] == 0);
+        GC_err_puts(buffer);
     } else {
-       switch(kind) {
-         case PTRFREE:
-           GC_err_puts("PTRFREE");
-           break;
-         case NORMAL:
-           GC_err_puts("NORMAL");
-           break;
-         case UNCOLLECTABLE:
-           GC_err_puts("UNCOLLECTABLE");
-           break;
-#        ifdef ATOMIC_UNCOLLECTABLE
-           case AUNCOLLECTABLE:
-             GC_err_puts("ATOMIC UNCOLLECTABLE");
-             break;
-#        endif
-         case STUBBORN:
-           GC_err_puts("STUBBORN");
-           break;
-         default:
-           GC_err_printf("kind %d, descr 0x%lx", kind,
-                         (unsigned long)(hhdr -> hb_descr));
-       }
+        switch(kind) {
+          case PTRFREE:
+            GC_err_puts("PTRFREE");
+            break;
+          case NORMAL:
+            GC_err_puts("NORMAL");
+            break;
+          case UNCOLLECTABLE:
+            GC_err_puts("UNCOLLECTABLE");
+            break;
+#         ifdef ATOMIC_UNCOLLECTABLE
+            case AUNCOLLECTABLE:
+              GC_err_puts("ATOMIC UNCOLLECTABLE");
+              break;
+#         endif
+          case STUBBORN:
+            GC_err_puts("STUBBORN");
+            break;
+          default:
+            GC_err_printf("kind %d, descr 0x%lx", kind,
+                          (unsigned long)(hhdr -> hb_descr));
+        }
     }
 }
 
-    
-
-void GC_print_obj(ptr_t p)
+/* Print a human-readable description of the object to stderr. p points */
+/* to somewhere inside an object with the debugging info.               */
+STATIC void GC_print_obj(ptr_t p)
 {
-    register oh * ohdr = (oh *)GC_base(p);
-    
+    oh * ohdr = (oh *)GC_base(p);
+
     GC_ASSERT(I_DONT_HOLD_LOCK());
     GC_err_printf("%p (", ((ptr_t)ohdr + sizeof(oh)));
     GC_err_puts(ohdr -> oh_string);
@@ -381,7 +392,7 @@ void GC_print_obj(ptr_t p)
       GC_err_printf(":%ld, ", (unsigned long)(ohdr -> oh_int));
 #   else
       GC_err_printf(":%ld, sz=%ld, ", (unsigned long)(ohdr -> oh_int),
-                                       (unsigned long)(ohdr -> oh_sz));
+                                        (unsigned long)(ohdr -> oh_sz));
 #   endif
     GC_print_type((ptr_t)(ohdr + 1));
     GC_err_puts(")\n");
@@ -392,38 +403,38 @@ STATIC void GC_debug_print_heap_obj_proc(ptr_t p)
 {
     GC_ASSERT(I_DONT_HOLD_LOCK());
     if (GC_HAS_DEBUG_INFO(p)) {
-       GC_print_obj(p);
+        GC_print_obj(p);
     } else {
-       GC_default_print_heap_obj_proc(p);
+        GC_default_print_heap_obj_proc(p);
     }
 }
 
 #ifndef SHORT_DBG_HDRS
-/* Use GC_err_printf and friends to print a description of the object  */
-/* whose client-visible address is p, and which was smashed at         */
-/* clobbered_addr.                                                     */
-STATIC void GC_print_smashed_obj(ptr_t p, ptr_t clobbered_addr)
-{
-    register oh * ohdr = (oh *)GC_base(p);
-    
+  /* Use GC_err_printf and friends to print a description of the object */
+  /* whose client-visible address is p, and which was smashed at        */
+  /* clobbered_addr.                                                    */
+  STATIC void GC_print_smashed_obj(ptr_t p, ptr_t clobbered_addr)
+  {
+    oh * ohdr = (oh *)GC_base(p);
+
     GC_ASSERT(I_DONT_HOLD_LOCK());
     if (clobbered_addr <= (ptr_t)(&(ohdr -> oh_sz))
         || ohdr -> oh_string == 0) {
-       GC_err_printf(
-               "%p in or near object at %p(<smashed>, appr. sz = %lu)\n",
-               clobbered_addr, p,
-               (unsigned long)(GC_size((ptr_t)ohdr) - DEBUG_BYTES));
+        GC_err_printf(
+                "%p in or near object at %p(<smashed>, appr. sz = %lu)\n",
+                clobbered_addr, p,
+                (unsigned long)(GC_size((ptr_t)ohdr) - DEBUG_BYTES));
     } else {
-       GC_err_printf("%p in or near object at %p(%s:%lu, sz=%lu)\n",
-               clobbered_addr, p,
-               (word)(ohdr -> oh_string) < HBLKSIZE ? "(smashed string)" :
-               ohdr -> oh_string[0] == '\0' ? "EMPTY(smashed?)" :
-                                               ohdr -> oh_string,
-               (unsigned long)(ohdr -> oh_int),
-               (unsigned long)(ohdr -> oh_sz));
+        GC_err_printf("%p in or near object at %p(%s:%lu, sz=%lu)\n",
+                clobbered_addr, p,
+                (word)(ohdr -> oh_string) < HBLKSIZE ? "(smashed string)" :
+                ohdr -> oh_string[0] == '\0' ? "EMPTY(smashed?)" :
+                                                ohdr -> oh_string,
+                (unsigned long)(ohdr -> oh_int),
+                (unsigned long)(ohdr -> oh_sz));
         PRINT_CALL_CHAIN(ohdr);
     }
-}
+  }
 #endif
 
 #ifndef SHORT_DBG_HDRS
@@ -433,7 +444,7 @@ STATIC void GC_print_smashed_obj(ptr_t p, ptr_t clobbered_addr)
   STATIC void GC_do_nothing(void) {}
 #endif
 
-void GC_start_debugging(void)
+GC_INNER void GC_start_debugging(void)
 {
 #   ifndef SHORT_DBG_HDRS
       GC_check_heap = GC_check_heap_proc;
@@ -458,110 +469,111 @@ GC_API void GC_CALL GC_debug_register_displacement(size_t offset)
 GC_API void * GC_CALL GC_debug_malloc(size_t lb, GC_EXTRA_PARAMS)
 {
     void * result = GC_malloc(lb + DEBUG_BYTES);
-    
+
     if (result == 0) {
         GC_err_printf("GC_debug_malloc(%lu) returning NIL (",
-                     (unsigned long) lb);
+                      (unsigned long) lb);
         GC_err_puts(s);
         GC_err_printf(":%ld)\n", (unsigned long)i);
         return(0);
     }
     if (!GC_debugging_started) {
-       GC_start_debugging();
+        GC_start_debugging();
     }
     ADD_CALL_CHAIN(result, ra);
     return (GC_store_debug_info(result, (word)lb, s, (word)i));
 }
 
 GC_API void * GC_CALL GC_debug_malloc_ignore_off_page(size_t lb,
-                                               GC_EXTRA_PARAMS)
+                                                      GC_EXTRA_PARAMS)
 {
     void * result = GC_malloc_ignore_off_page(lb + DEBUG_BYTES);
-    
+
     if (result == 0) {
         GC_err_printf("GC_debug_malloc_ignore_off_page(%lu) returning NIL (",
-                      (unsigned long) lb);
+                       (unsigned long) lb);
         GC_err_puts(s);
         GC_err_printf(":%lu)\n", (unsigned long)i);
         return(0);
     }
     if (!GC_debugging_started) {
-       GC_start_debugging();
+        GC_start_debugging();
     }
     ADD_CALL_CHAIN(result, ra);
     return (GC_store_debug_info(result, (word)lb, s, (word)i));
 }
 
 GC_API void * GC_CALL GC_debug_malloc_atomic_ignore_off_page(size_t lb,
-                                                       GC_EXTRA_PARAMS)
+                                                             GC_EXTRA_PARAMS)
 {
     void * result = GC_malloc_atomic_ignore_off_page(lb + DEBUG_BYTES);
-    
+
     if (result == 0) {
         GC_err_printf("GC_debug_malloc_atomic_ignore_off_page(%lu)"
-                      " returning NIL (", (unsigned long) lb);
+                       " returning NIL (", (unsigned long) lb);
         GC_err_puts(s);
         GC_err_printf(":%lu)\n", (unsigned long)i);
         return(0);
     }
     if (!GC_debugging_started) {
-       GC_start_debugging();
+        GC_start_debugging();
     }
     ADD_CALL_CHAIN(result, ra);
     return (GC_store_debug_info(result, (word)lb, s, (word)i));
 }
 
-# ifdef DBG_HDRS_ALL
-/* 
- * An allocation function for internal use.
- * Normally internally allocated objects do not have debug information.
- * But in this case, we need to make sure that all objects have debug
- * headers.
- * We assume debugging was started in collector initialization,
- * and we already hold the GC lock.
- */
-  void * GC_debug_generic_malloc_inner(size_t lb, int k)
+#ifdef DBG_HDRS_ALL
+  /*
  * An allocation function for internal use.
  * Normally internally allocated objects do not have debug information.
  * But in this case, we need to make sure that all objects have debug
  * headers.
  * We assume debugging was started in collector initialization,
  * and we already hold the GC lock.
  */
+  GC_INNER void * GC_debug_generic_malloc_inner(size_t lb, int k)
   {
     void * result = GC_generic_malloc_inner(lb + DEBUG_BYTES, k);
-    
+
     if (result == 0) {
         GC_err_printf("GC internal allocation (%lu bytes) returning NIL\n",
-                      (unsigned long) lb);
+                       (unsigned long) lb);
         return(0);
     }
     ADD_CALL_CHAIN(result, GC_RETURN_ADDR);
     return (GC_store_debug_info_inner(result, (word)lb, "INTERNAL", (word)0));
   }
 
-  void * GC_debug_generic_malloc_inner_ignore_off_page(size_t lb, int k)
+  GC_INNER void * GC_debug_generic_malloc_inner_ignore_off_page(size_t lb,
+                                                                int k)
   {
     void * result = GC_generic_malloc_inner_ignore_off_page(
-                                               lb + DEBUG_BYTES, k);
-    
+                                                lb + DEBUG_BYTES, k);
+
     if (result == 0) {
         GC_err_printf("GC internal allocation (%lu bytes) returning NIL\n",
-                      (unsigned long) lb);
+                       (unsigned long) lb);
         return(0);
     }
     ADD_CALL_CHAIN(result, GC_RETURN_ADDR);
     return (GC_store_debug_info_inner(result, (word)lb, "INTERNAL", (word)0));
   }
-# endif
+#endif
 
 #ifdef STUBBORN_ALLOC
 GC_API void * GC_CALL GC_debug_malloc_stubborn(size_t lb, GC_EXTRA_PARAMS)
 {
     void * result = GC_malloc_stubborn(lb + DEBUG_BYTES);
-    
+
     if (result == 0) {
         GC_err_printf("GC_debug_malloc(%lu) returning NIL (",
-                     (unsigned long) lb);
+                      (unsigned long) lb);
         GC_err_puts(s);
         GC_err_printf(":%lu)\n", (unsigned long)i);
         return(0);
     }
     if (!GC_debugging_started) {
-       GC_start_debugging();
+        GC_start_debugging();
     }
     ADD_CALL_CHAIN(result, ra);
     return (GC_store_debug_info(result, (word)lb, s, (word)i));
@@ -571,7 +583,7 @@ GC_API void GC_CALL GC_debug_change_stubborn(void *p)
 {
     void * q = GC_base(p);
     hdr * hhdr;
-    
+
     if (q == 0) {
         GC_err_printf("Bad argument: %p to GC_debug_change_stubborn\n", p);
         ABORT("GC_debug_change_stubborn: bad arg");
@@ -586,9 +598,9 @@ GC_API void GC_CALL GC_debug_change_stubborn(void *p)
 
 GC_API void GC_CALL GC_debug_end_stubborn_change(void *p)
 {
-    register void * q = GC_base(p);
-    register hdr * hhdr;
-    
+    void * q = GC_base(p);
+    hdr * hhdr;
+
     if (q == 0) {
         GC_err_printf("Bad argument: %p to GC_debug_end_stubborn_change\n", p);
         ABORT("GC_debug_end_stubborn_change: bad arg");
@@ -609,24 +621,20 @@ GC_API void * GC_CALL GC_debug_malloc_stubborn(size_t lb, GC_EXTRA_PARAMS)
 }
 
 /*ARGSUSED*/
-GC_API void GC_CALL GC_debug_change_stubborn(void *p)
-{
-}
+GC_API void GC_CALL GC_debug_change_stubborn(void *p) {}
 
 /*ARGSUSED*/
-GC_API void GC_CALL GC_debug_end_stubborn_change(void *p)
-{
-}
+GC_API void GC_CALL GC_debug_end_stubborn_change(void *p) {}
 
 #endif /* !STUBBORN_ALLOC */
 
 GC_API void * GC_CALL GC_debug_malloc_atomic(size_t lb, GC_EXTRA_PARAMS)
 {
     void * result = GC_malloc_atomic(lb + DEBUG_BYTES);
-    
+
     if (result == 0) {
         GC_err_printf("GC_debug_malloc_atomic(%lu) returning NIL (",
-                     (unsigned long) lb);
+                      (unsigned long) lb);
         GC_err_puts(s);
         GC_err_printf(":%lu)\n", (unsigned long)i);
         return(0);
@@ -641,23 +649,33 @@ GC_API void * GC_CALL GC_debug_malloc_atomic(size_t lb, GC_EXTRA_PARAMS)
 GC_API char * GC_CALL GC_debug_strdup(const char *str, GC_EXTRA_PARAMS)
 {
     char *copy;
+    size_t lb;
     if (str == NULL) return NULL;
-    copy = GC_debug_malloc_atomic(strlen(str) + 1, OPT_RA s, i);
+    lb = strlen(str) + 1;
+    copy = GC_debug_malloc_atomic(lb, OPT_RA s, i);
     if (copy == NULL) {
-      errno = ENOMEM;
+#     ifndef MSWINCE
+        errno = ENOMEM;
+#     endif
       return NULL;
     }
-    strcpy(copy, str);
+#   ifndef MSWINCE
+      strcpy(copy, str);
+#   else
+      /* strcpy() is deprecated in WinCE */
+      memcpy(copy, str, lb);
+#   endif
     return copy;
 }
 
-GC_API void * GC_CALL GC_debug_malloc_uncollectable(size_t lb, GC_EXTRA_PARAMS)
+GC_API void * GC_CALL GC_debug_malloc_uncollectable(size_t lb,
+                                                    GC_EXTRA_PARAMS)
 {
     void * result = GC_malloc_uncollectable(lb + UNCOLLECTABLE_DEBUG_BYTES);
-    
+
     if (result == 0) {
         GC_err_printf("GC_debug_malloc_uncollectable(%lu) returning NIL (",
-                     (unsigned long) lb);
+                      (unsigned long) lb);
         GC_err_puts(s);
         GC_err_printf(":%lu)\n", (unsigned long)i);
         return(0);
@@ -670,14 +688,14 @@ GC_API void * GC_CALL GC_debug_malloc_uncollectable(size_t lb, GC_EXTRA_PARAMS)
 }
 
 #ifdef ATOMIC_UNCOLLECTABLE
-void * GC_debug_malloc_atomic_uncollectable(size_t lb, GC_EXTRA_PARAMS)
-{
+  void * GC_debug_malloc_atomic_uncollectable(size_t lb, GC_EXTRA_PARAMS)
+  {
     void * result =
-       GC_malloc_atomic_uncollectable(lb + UNCOLLECTABLE_DEBUG_BYTES);
-    
+        GC_malloc_atomic_uncollectable(lb + UNCOLLECTABLE_DEBUG_BYTES);
+
     if (result == 0) {
         GC_err_printf(
-               "GC_debug_malloc_atomic_uncollectable(%lu) returning NIL (",
+                "GC_debug_malloc_atomic_uncollectable(%lu) returning NIL (",
                 (unsigned long) lb);
         GC_err_puts(s);
         GC_err_printf(":%lu)\n", (unsigned long)i);
@@ -688,7 +706,7 @@ void * GC_debug_malloc_atomic_uncollectable(size_t lb, GC_EXTRA_PARAMS)
     }
     ADD_CALL_CHAIN(result, ra);
     return (GC_store_debug_info(result, (word)lb, s, (word)i));
-}
+  }
 #endif /* ATOMIC_UNCOLLECTABLE */
 
 GC_API void GC_CALL GC_debug_free(void * p)
@@ -697,7 +715,7 @@ GC_API void GC_CALL GC_debug_free(void * p)
 #   ifndef SHORT_DBG_HDRS
       ptr_t clobbered;
 #   endif
-    
+
     if (0 == p) return;
     base = GC_base(p);
     if (base == 0) {
@@ -706,7 +724,7 @@ GC_API void GC_CALL GC_debug_free(void * p)
     }
     if ((ptr_t)p - (ptr_t)base != sizeof(oh)) {
         GC_err_printf(
-                "GC_debug_free called on pointer %p w/o debugging info\n", p);
+                 "GC_debug_free called on pointer %p w/o debugging info\n", p);
     } else {
 #     ifndef SHORT_DBG_HDRS
         clobbered = GC_check_annotated_obj((oh *)base);
@@ -726,36 +744,33 @@ GC_API void GC_CALL GC_debug_free(void * p)
     if (GC_find_leak) {
         GC_free(base);
     } else {
-       hdr * hhdr = HDR(p);
-       GC_bool uncollectable = FALSE;
+        hdr * hhdr = HDR(p);
+        GC_bool uncollectable = FALSE;
 
         if (hhdr ->  hb_obj_kind == UNCOLLECTABLE) {
-           uncollectable = TRUE;
-       }
-#      ifdef ATOMIC_UNCOLLECTABLE
-           if (hhdr ->  hb_obj_kind == AUNCOLLECTABLE) {
-                   uncollectable = TRUE;
-           }
-#      endif
-       if (uncollectable) {
-           GC_free(base);
-       } else {
-           size_t i;
-           size_t obj_sz = BYTES_TO_WORDS(hhdr -> hb_sz - sizeof(oh));
-
-           for (i = 0; i < obj_sz; ++i) ((word *)p)[i] = 0xdeadbeef;
-           GC_ASSERT((word *)p + i == (word *)(base + hhdr -> hb_sz));
-       }
+            uncollectable = TRUE;
+        }
+#       ifdef ATOMIC_UNCOLLECTABLE
+            if (hhdr ->  hb_obj_kind == AUNCOLLECTABLE) {
+                    uncollectable = TRUE;
+            }
+#       endif
+        if (uncollectable) {
+            GC_free(base);
+        } else {
+            size_t i;
+            size_t obj_sz = BYTES_TO_WORDS(hhdr -> hb_sz - sizeof(oh));
+
+            for (i = 0; i < obj_sz; ++i) ((word *)p)[i] = 0xdeadbeef;
+            GC_ASSERT((word *)p + i == (word *)(base + hhdr -> hb_sz));
+        }
     } /* !GC_find_leak */
 }
 
-#ifdef THREADS
-
-extern void GC_free_inner(void * p);
-
-/* Used internally; we assume it's called correctly.   */
-void GC_debug_free_inner(void * p)
-{
+#if defined(THREADS) && defined(DBG_HDRS_ALL)
+  /* Used internally; we assume it's called correctly.    */
+  GC_INNER void GC_debug_free_inner(void * p)
+  {
     ptr_t base = GC_base(p);
     GC_ASSERT((ptr_t)p - (ptr_t)base == sizeof(oh));
 #   ifndef SHORT_DBG_HDRS
@@ -763,7 +778,7 @@ void GC_debug_free_inner(void * p)
         ((oh *)base) -> oh_sz = GC_size(base);
 #   endif
     GC_free_inner(base);
-}
+  }
 #endif
 
 GC_API void * GC_CALL GC_debug_realloc(void * p, size_t lb, GC_EXTRA_PARAMS)
@@ -776,7 +791,7 @@ GC_API void * GC_CALL GC_debug_realloc(void * p, size_t lb, GC_EXTRA_PARAMS)
     size_t copy_sz = lb;
     size_t old_sz;
     hdr * hhdr;
-    
+
     if (p == 0) return(GC_debug_malloc(lb, OPT_RA s, i));
     base = GC_base(p);
     if (base == 0) {
@@ -802,12 +817,12 @@ GC_API void * GC_CALL GC_debug_realloc(void * p, size_t lb, GC_EXTRA_PARAMS)
         result = GC_debug_malloc_atomic(lb, OPT_RA s, i);
         break;
       case UNCOLLECTABLE:
-       result = GC_debug_malloc_uncollectable(lb, OPT_RA s, i);
-       break;
+        result = GC_debug_malloc_uncollectable(lb, OPT_RA s, i);
+        break;
 #    ifdef ATOMIC_UNCOLLECTABLE
       case AUNCOLLECTABLE:
-       result = GC_debug_malloc_atomic_uncollectable(lb, OPT_RA s, i);
-       break;
+        result = GC_debug_malloc_atomic_uncollectable(lb, OPT_RA s, i);
+        break;
 #    endif
       default:
         result = NULL; /* initialized to prevent warning. */
@@ -826,32 +841,32 @@ GC_API void * GC_CALL GC_debug_realloc(void * p, size_t lb, GC_EXTRA_PARAMS)
 #   endif
     if (old_sz < copy_sz) copy_sz = old_sz;
     if (result == 0) return(0);
-    BCOPY(p, result,  copy_sz);
+    BCOPY(p, result, copy_sz);
     GC_debug_free(p);
     return(result);
 }
 
 #ifndef SHORT_DBG_HDRS
 
-/* List of smashed objects.  We defer printing these, since we can't   */
-/* always print them nicely with the allocation lock held.             */
-/* We put them here instead of in GC_arrays, since it may be useful to */
-/* be able to look at them with the debugger.                          */
+/* List of smashed objects.  We defer printing these, since we can't    */
+/* always print them nicely with the allocation lock held.              */
+/* We put them here instead of in GC_arrays, since it may be useful to  */
+/* be able to look at them with the debugger.                           */
 #define MAX_SMASHED 20
-ptr_t GC_smashed[MAX_SMASHED];
-unsigned GC_n_smashed = 0;
+STATIC ptr_t GC_smashed[MAX_SMASHED] = {0};
+STATIC unsigned GC_n_smashed = 0;
 
 STATIC void GC_add_smashed(ptr_t smashed)
 {
     GC_ASSERT(GC_is_marked(GC_base(smashed)));
     GC_smashed[GC_n_smashed] = smashed;
     if (GC_n_smashed < MAX_SMASHED - 1) ++GC_n_smashed;
-      /* In case of overflow, we keep the first MAX_SMASHED-1  */
-      /* entries plus the last one.                            */
+      /* In case of overflow, we keep the first MAX_SMASHED-1   */
+      /* entries plus the last one.                             */
     GC_have_errors = TRUE;
 }
 
-/* Print all objects on the list.  Clear the list.     */
+/* Print all objects on the list.  Clear the list.      */
 STATIC void GC_print_all_smashed_proc(void)
 {
     unsigned i;
@@ -861,14 +876,14 @@ STATIC void GC_print_all_smashed_proc(void)
     GC_err_printf("GC_check_heap_block: found smashed heap objects:\n");
     for (i = 0; i < GC_n_smashed; ++i) {
         GC_print_smashed_obj((ptr_t)GC_base(GC_smashed[i]) + sizeof(oh),
-                            GC_smashed[i]);
-       GC_smashed[i] = 0;
+                             GC_smashed[i]);
+        GC_smashed[i] = 0;
     }
     GC_n_smashed = 0;
 }
 
-/* Check all marked objects in the given block for validity    */
-/* Avoid GC_apply_to_each_object for performance reasons.      */
+/* Check all marked objects in the given block for validity     */
+/* Avoid GC_apply_to_each_object for performance reasons.       */
 /*ARGSUSED*/
 STATIC void GC_check_heap_block(struct hblk *hbp, word dummy)
 {
@@ -876,35 +891,34 @@ STATIC void GC_check_heap_block(struct hblk *hbp, word dummy)
     size_t sz = hhdr -> hb_sz;
     size_t bit_no;
     char *p, *plim;
-    
+
     p = hbp->hb_body;
     bit_no = 0;
     if (sz > MAXOBJBYTES) {
-       plim = p;
+        plim = p;
     } else {
-       plim = hbp->hb_body + HBLKSIZE - sz;
+        plim = hbp->hb_body + HBLKSIZE - sz;
     }
     /* go through all words in block */
-       while( p <= plim ) {
-           if( mark_bit_from_hdr(hhdr, bit_no)
-               && GC_HAS_DEBUG_INFO((ptr_t)p)) {
-               ptr_t clobbered = GC_check_annotated_obj((oh *)p);
-               
-               if (clobbered != 0) GC_add_smashed(clobbered);
-           }
-           bit_no += MARK_BIT_OFFSET(sz);
-           p += sz;
-       }
+        while( p <= plim ) {
+            if( mark_bit_from_hdr(hhdr, bit_no)
+                && GC_HAS_DEBUG_INFO((ptr_t)p)) {
+                ptr_t clobbered = GC_check_annotated_obj((oh *)p);
+
+                if (clobbered != 0) GC_add_smashed(clobbered);
+            }
+            bit_no += MARK_BIT_OFFSET(sz);
+            p += sz;
+        }
 }
 
-
-/* This assumes that all accessible objects are marked, and that       */
-/* I hold the allocation lock. Normally called by collector.           */
+/* This assumes that all accessible objects are marked, and that        */
+/* I hold the allocation lock.  Normally called by collector.           */
 STATIC void GC_check_heap_proc(void)
 {
 #   ifndef SMALL_CONFIG
       GC_STATIC_ASSERT((sizeof(oh) & (GRANULE_BYTES - 1)) == 0);
-      /* FIXME: Should we check for twice that alignment?      */
+      /* FIXME: Should we check for twice that alignment?       */
 #   endif
     GC_apply_to_all_blocks(GC_check_heap_block, (word)0);
 }
@@ -916,37 +930,45 @@ struct closure {
     void * cl_data;
 };
 
-void * GC_make_closure(GC_finalization_proc fn, void * data)
+STATIC void * GC_make_closure(GC_finalization_proc fn, void * data)
 {
     struct closure * result =
 #   ifdef DBG_HDRS_ALL
       (struct closure *) GC_debug_malloc(sizeof (struct closure),
-                                        GC_EXTRAS);
+                                         GC_EXTRAS);
 #   else
       (struct closure *) GC_malloc(sizeof (struct closure));
 #   endif
-    
+
     result -> cl_fn = fn;
     result -> cl_data = data;
     return((void *)result);
 }
 
-void GC_CALLBACK GC_debug_invoke_finalizer(void * obj, void * data)
+/* An auxiliary fns to make finalization work correctly with displaced  */
+/* pointers introduced by the debugging allocators.                     */
+STATIC void GC_CALLBACK GC_debug_invoke_finalizer(void * obj, void * data)
 {
-    register struct closure * cl = (struct closure *) data;
-    
+    struct closure * cl = (struct closure *) data;
     (*(cl -> cl_fn))((void *)((char *)obj + sizeof(oh)), cl -> cl_data);
-} 
+}
+
+/* Special finalizer_proc value to detect GC_register_finalizer() failure. */
+#define OFN_UNSET (GC_finalization_proc)(signed_word)-1
 
-/* Set ofn and ocd to reflect the values we got back.  */
-static void store_old (void *obj, GC_finalization_proc my_old_fn,
-                      struct closure *my_old_cd, GC_finalization_proc *ofn,
-                      void **ocd)
+/* Set ofn and ocd to reflect the values we got back.   */
+static void store_old(void *obj, GC_finalization_proc my_old_fn,
+                      struct closure *my_old_cd, GC_finalization_proc *ofn,
+                      void **ocd)
 {
     if (0 != my_old_fn) {
+      if (my_old_fn == OFN_UNSET) {
+        /* register_finalizer() failed; (*ofn) and (*ocd) are unchanged. */
+        return;
+      }
       if (my_old_fn != GC_debug_invoke_finalizer) {
         GC_err_printf("Debuggable object at %p had non-debug finalizer.\n",
-                     obj);
+                      obj);
         /* This should probably be fatal. */
       } else {
         if (ofn) *ofn = my_old_cd -> cl_fn;
@@ -959,98 +981,118 @@ static void store_old (void *obj, GC_finalization_proc my_old_fn,
 }
 
 GC_API void GC_CALL GC_debug_register_finalizer(void * obj,
-                                       GC_finalization_proc fn,
-                                       void * cd, GC_finalization_proc *ofn,
-                                       void * *ocd)
+                                        GC_finalization_proc fn,
+                                        void * cd, GC_finalization_proc *ofn,
+                                        void * *ocd)
 {
-    GC_finalization_proc my_old_fn;
+    GC_finalization_proc my_old_fn = OFN_UNSET;
     void * my_old_cd;
     ptr_t base = GC_base(obj);
-    if (0 == base) return;
+    if (0 == base) {
+        /* We won't collect it, hence finalizer wouldn't be run. */
+        if (ocd) *ocd = 0;
+        if (ofn) *ofn = 0;
+        return;
+    }
     if ((ptr_t)obj - base != sizeof(oh)) {
         GC_err_printf(
-           "GC_debug_register_finalizer called with non-base-pointer %p\n",
-           obj);
+            "GC_debug_register_finalizer called with non-base-pointer %p\n",
+            obj);
     }
     if (0 == fn) {
       GC_register_finalizer(base, 0, 0, &my_old_fn, &my_old_cd);
     } else {
       GC_register_finalizer(base, GC_debug_invoke_finalizer,
-                           GC_make_closure(fn,cd), &my_old_fn, &my_old_cd);
+                            GC_make_closure(fn,cd), &my_old_fn, &my_old_cd);
     }
     store_old(obj, my_old_fn, (struct closure *)my_old_cd, ofn, ocd);
 }
 
 GC_API void GC_CALL GC_debug_register_finalizer_no_order
-                                   (void * obj, GC_finalization_proc fn,
-                                    void * cd, GC_finalization_proc *ofn,
-                                    void * *ocd)
+                                    (void * obj, GC_finalization_proc fn,
+                                     void * cd, GC_finalization_proc *ofn,
+                                     void * *ocd)
 {
-    GC_finalization_proc my_old_fn;
+    GC_finalization_proc my_old_fn = OFN_UNSET;
     void * my_old_cd;
     ptr_t base = GC_base(obj);
-    if (0 == base) return;
+    if (0 == base) {
+        /* We won't collect it, hence finalizer wouldn't be run. */
+        if (ocd) *ocd = 0;
+        if (ofn) *ofn = 0;
+        return;
+    }
     if ((ptr_t)obj - base != sizeof(oh)) {
         GC_err_printf(
-         "GC_debug_register_finalizer_no_order called with "
-         "non-base-pointer %p\n",
-         obj);
+          "GC_debug_register_finalizer_no_order called with "
+          "non-base-pointer %p\n",
+          obj);
     }
     if (0 == fn) {
       GC_register_finalizer_no_order(base, 0, 0, &my_old_fn, &my_old_cd);
     } else {
       GC_register_finalizer_no_order(base, GC_debug_invoke_finalizer,
-                                    GC_make_closure(fn,cd), &my_old_fn,
-                                    &my_old_cd);
+                                     GC_make_closure(fn,cd), &my_old_fn,
+                                     &my_old_cd);
     }
     store_old(obj, my_old_fn, (struct closure *)my_old_cd, ofn, ocd);
 }
 
 GC_API void GC_CALL GC_debug_register_finalizer_unreachable
-                                   (void * obj, GC_finalization_proc fn,
-                                    void * cd, GC_finalization_proc *ofn,
-                                    void * *ocd)
+                                    (void * obj, GC_finalization_proc fn,
+                                     void * cd, GC_finalization_proc *ofn,
+                                     void * *ocd)
 {
-    GC_finalization_proc my_old_fn;
+    GC_finalization_proc my_old_fn = OFN_UNSET;
     void * my_old_cd;
     ptr_t base = GC_base(obj);
-    if (0 == base) return;
+    if (0 == base) {
+        /* We won't collect it, hence finalizer wouldn't be run. */
+        if (ocd) *ocd = 0;
+        if (ofn) *ofn = 0;
+        return;
+    }
     if ((ptr_t)obj - base != sizeof(oh)) {
         GC_err_printf(
-           "GC_debug_register_finalizer_unreachable called with "
-           "non-base-pointer %p\n",
-           obj);
+            "GC_debug_register_finalizer_unreachable called with "
+            "non-base-pointer %p\n",
+            obj);
     }
     if (0 == fn) {
       GC_register_finalizer_unreachable(base, 0, 0, &my_old_fn, &my_old_cd);
     } else {
       GC_register_finalizer_unreachable(base, GC_debug_invoke_finalizer,
-                                       GC_make_closure(fn,cd), &my_old_fn,
-                                       &my_old_cd);
+                                        GC_make_closure(fn,cd), &my_old_fn,
+                                        &my_old_cd);
     }
     store_old(obj, my_old_fn, (struct closure *)my_old_cd, ofn, ocd);
 }
 
 GC_API void GC_CALL GC_debug_register_finalizer_ignore_self
-                                   (void * obj, GC_finalization_proc fn,
-                                    void * cd, GC_finalization_proc *ofn,
-                                    void * *ocd)
+                                    (void * obj, GC_finalization_proc fn,
+                                     void * cd, GC_finalization_proc *ofn,
+                                     void * *ocd)
 {
-    GC_finalization_proc my_old_fn;
+    GC_finalization_proc my_old_fn = OFN_UNSET;
     void * my_old_cd;
     ptr_t base = GC_base(obj);
-    if (0 == base) return;
+    if (0 == base) {
+        /* We won't collect it, hence finalizer wouldn't be run. */
+        if (ocd) *ocd = 0;
+        if (ofn) *ofn = 0;
+        return;
+    }
     if ((ptr_t)obj - base != sizeof(oh)) {
         GC_err_printf(
-           "GC_debug_register_finalizer_ignore_self called with "
-           "non-base-pointer %p\n", obj);
+            "GC_debug_register_finalizer_ignore_self called with "
+            "non-base-pointer %p\n", obj);
     }
     if (0 == fn) {
       GC_register_finalizer_ignore_self(base, 0, 0, &my_old_fn, &my_old_cd);
     } else {
       GC_register_finalizer_ignore_self(base, GC_debug_invoke_finalizer,
-                                    GC_make_closure(fn,cd), &my_old_fn,
-                                    &my_old_cd);
+                                        GC_make_closure(fn,cd), &my_old_fn,
+                                        &my_old_cd);
     }
     store_old(obj, my_old_fn, (struct closure *)my_old_cd, ofn, ocd);
 }
index 3480ce4e96d431f9d70162fd1cd79366c714996b..e5f9736c7239301c765e2d7abefb9bb9b9237ac5 100755 (executable)
@@ -1,7 +1,10 @@
 #! /bin/sh
-
 # depcomp - compile a program generating dependencies as side-effects
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+scriptversion=2007-03-29.01
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
+# Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,8 +18,8 @@
 
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 
 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
 
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
   echo "depcomp: Variables source, object and depmode must be set" 1>&2
   exit 1
 fi
-# `libtool' can also be set to `yes' or `no'.
-
-if test -z "$depfile"; then
-   base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
-   dir=`echo "$object" | sed 's,/.*$,/,'`
-   if test "$dir" = "$object"; then
-      dir=
-   fi
-   # FIXME: should be _deps on DOS.
-   depfile="$dir.deps/$base"
-fi
 
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
 
 rm -f "$tmpdepfile"
@@ -66,7 +92,20 @@ gcc3)
 ## gcc 3 implements dependency tracking that does exactly what
 ## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
 ## it if -MD -MP comes after the -MF stuff.  Hmm.
-  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
   stat=$?
   if test $stat -eq 0; then :
   else
@@ -172,31 +211,43 @@ sgi)
 
 aix)
   # The C for AIX Compiler uses -M and outputs the dependencies
-  # in a .u file.  This file always lives in the current directory.
-  # Also, the AIX compiler puts `$object:' at the start of each line;
-  # $object doesn't have directory information.
-  stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
-  tmpdepfile="$stripped.u"
-  outname="$stripped.o"
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
   if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
     "$@" -Wc,-M
   else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
     "$@" -M
   fi
-
   stat=$?
+
   if test $stat -eq 0; then :
   else
-    rm -f "$tmpdepfile"
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
     exit $stat
   fi
 
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
   if test -f "$tmpdepfile"; then
     # Each line is of the form `foo.o: dependent.h'.
     # Do two passes, one to just change these to
     # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
-    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    # That's a tab and a space in the [].
+    sed -e 's,^.*\.[a-z]*:[     ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
@@ -206,38 +257,136 @@ aix)
   rm -f "$tmpdepfile"
   ;;
 
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
 tru64)
    # The Tru64 compiler uses -MD to generate dependencies as a side
    # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put 
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
    # dependencies in `foo.d' instead, so we check for that too.
    # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
 
-   base=`echo "$object" | sed -e 's/\.o$//' -e 's/\.lo$//'`
-   tmpdepfile1="$base.o.d"
-   tmpdepfile2="$base.d"
    if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mechanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
       "$@" -Wc,-MD
    else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
       "$@" -MD
    fi
 
    stat=$?
    if test $stat -eq 0; then :
    else
-      rm -f "$tmpdepfile1" "$tmpdepfile2"
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
       exit $stat
    fi
 
-   if test -f "$tmpdepfile1"; then
-      tmpdepfile="$tmpdepfile1"
-   else
-      tmpdepfile="$tmpdepfile2"
-   fi
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
    if test -f "$tmpdepfile"; then
       sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a space and a tab in the [].
-      sed -e 's,^.*\.[a-z]*:[  ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
    else
       echo "#dummy" > "$depfile"
    fi
@@ -250,34 +399,42 @@ tru64)
 
 dashmstdout)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
-  test -z "$dashmflag" && dashmflag=-M
-  ( IFS=" "
-    case " $* " in
-    *" --mode=compile "*) # this is libtool, let us make it quiet
-      for arg
-      do # cycle over the arguments
-        case "$arg" in
-       "--mode=compile")
-         # insert --quiet before "--mode=compile"
-         set fnord "$@" --quiet
-         shift # fnord
-         ;;
-       esac
-       set fnord "$@" "$arg"
-       shift # fnord
-       shift # "$arg"
-      done
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
       ;;
     esac
-    "$@" $dashmflag | sed 's:^[^:]*\:[         ]*:'"$object"'\: :' > "$tmpdepfile"
-  ) &
-  proc=$!
-  "$@"
-  stat=$?
-  wait "$proc"
-  if test "$stat" != 0; then exit $stat; fi
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
   rm -f "$depfile"
   cat < "$tmpdepfile" > "$depfile"
   tr ' ' '
@@ -295,33 +452,37 @@ dashXmstdout)
   ;;
 
 makedepend)
-  # X makedepend
-  (
-    shift
-    cleared=no
-    for arg in "$@"; do
-      case $cleared in no)
-        set ""; shift
-       cleared=yes
-      esac
-      case "$arg" in
-        -D*|-I*)
-         set fnord "$@" "$arg"; shift;;
-       -*)
-         ;;
-       *)
-         set fnord "$@" "$arg"; shift;;
-      esac
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
     done
-    obj_suffix="`echo $object | sed 's/^.*\././'`"
-    touch "$tmpdepfile"
-    ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
-  ) &
-  proc=$!
-  "$@"
-  stat=$?
-  wait "$proc"
-  if test "$stat" != 0; then exit $stat; fi
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
   rm -f "$depfile"
   cat < "$tmpdepfile" > "$depfile"
   sed '1,2d' "$tmpdepfile" | tr ' ' '
@@ -334,35 +495,40 @@ makedepend)
 
 cpp)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
-  ( IFS=" "
-    case " $* " in
-    *" --mode=compile "*)
-      for arg
-      do # cycle over the arguments
-        case $arg in
-       "--mode=compile")
-         # insert --quiet before "--mode=compile"
-         set fnord "$@" --quiet
-         shift # fnord
-         ;;
-       esac
-       set fnord "$@" "$arg"
-       shift # fnord
-       shift # "$arg"
-      done
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
       ;;
     esac
-    "$@" -E |
-    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
     sed '$ s: \\$::' > "$tmpdepfile"
-  ) &
-  proc=$!
-  "$@"
-  stat=$?
-  wait "$proc"
-  if test "$stat" != 0; then exit $stat; fi
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
   cat < "$tmpdepfile" >> "$depfile"
@@ -372,49 +538,27 @@ cpp)
 
 msvisualcpp)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o,
+  # always write the preprocessed file to stdout, regardless of -o,
   # because we must use -o when running libtool.
-  ( IFS=" "
-    case " $* " in
-    *" --mode=compile "*)
-      for arg
-      do # cycle over the arguments
-        case $arg in
-       "--mode=compile")
-         # insert --quiet before "--mode=compile"
-         set fnord "$@" --quiet
-         shift # fnord
-         ;;
-       esac
-       set fnord "$@" "$arg"
-       shift # fnord
-       shift # "$arg"
-      done
-      ;;
-    esac
-    for arg
-    do
-      case "$arg" in
-      "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
        set fnord "$@"
        shift
        shift
        ;;
-      *)
+    *)
        set fnord "$@" "$arg"
        shift
        shift
        ;;
-      esac
-    done
-    "$@" -E |
-    sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
-  ) &
-  proc=$!
-  "$@"
-  stat=$?
-  wait "$proc"
-  if test "$stat" != 0; then exit $stat; fi
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
   . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
@@ -434,3 +578,12 @@ none)
 esac
 
 exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
index 36a926a475f911417572973367c8b17fd132314b..40efc73c6986e5d39c17709968daf9f74d0925fc 100644 (file)
@@ -36,7 +36,7 @@ Public License, but is not needed by, nor linked into the collector library.
 It is included here only becuase the atomic_ops distribution is, for
 simplicity, included in its entirety.
 
-This is version 7.2alpha3 of a conservative garbage collector for C and C++.
+This is version 7.2alpha4 of a conservative garbage collector for C and C++.
 
 You might find a more recent version of this at
 
@@ -118,7 +118,7 @@ introduced leaks, the amount of unreclaimed memory typically stays
 bounded.
 
   In the following, an "object" is defined to be a region of memory allocated
-by the routines described below.  
+by the routines described below.
 
   Any objects not intended to be collected must be pointed to either
 from other such accessible objects, or from the registers,
@@ -219,7 +219,7 @@ use up to about 30MB of memory.  (The multi-threaded version will use more.
 to build and test the "cord" string library.)
 
   Makefile.direct will generate a library gc.a which you should link against.
-Typing "make cords" will add the cord library to gc.a.  
+Typing "make cords" will add the cord library to gc.a.
 
   The GNU style build process understands the usual targets.  "Make check"
 runs a number of tests.  "Make install" installs at least libgc, and libcord.
@@ -280,9 +280,9 @@ THE C INTERFACE TO THE ALLOCATOR
   The following routines are intended to be directly called by the user.
 Note that usually only GC_malloc is necessary.  GC_clear_roots and GC_add_roots
 calls may be required if the collector has to trace from nonstandard places
-(e.g. from dynamic library data areas on a machine on which the 
+(e.g. from dynamic library data areas on a machine on which the
 collector doesn't already understand them.)  On some machines, it may
-be desirable to set GC_stacktop to a good approximation of the stack base. 
+be desirable to set GC_stacktop to a good approximation of the stack base.
 (This enhances code portability on HP PA machines, since there is no
 good way for the collector to compute this value.)  Client code may include
 "gc.h", which defines all of the following, plus many others.
@@ -332,17 +332,17 @@ good way for the collector to compute this value.)  Client code may include
       program startup.)
 
 6)  GC_malloc_ignore_off_page(bytes)
-       - identical to GC_malloc, but the client promises to keep a pointer to
-         the somewhere within the first 256 bytes of the object while it is
-         live.  (This pointer should nortmally be declared volatile to prevent
-         interference from compiler optimizations.)  This is the recommended
-         way to allocate anything that is likely to be larger than 100Kbytes
-         or so.  (GC_malloc may result in failure to reclaim such objects.)
+        - identical to GC_malloc, but the client promises to keep a pointer to
+          the somewhere within the first 256 bytes of the object while it is
+          live.  (This pointer should nortmally be declared volatile to prevent
+          interference from compiler optimizations.)  This is the recommended
+          way to allocate anything that is likely to be larger than 100Kbytes
+          or so.  (GC_malloc may result in failure to reclaim such objects.)
 
 7)  GC_set_warn_proc(proc)
-       - Can be used to redirect warnings from the collector.  Such warnings
-         should be rare, and should not be ignored during code development.
-      
+        - Can be used to redirect warnings from the collector.  Such warnings
+          should be rare, and should not be ignored during code development.
+
 8) GC_enable_incremental()
     - Enables generational and incremental collection.  Useful for large
       heaps on machines that provide access to page dirty information.
@@ -354,7 +354,7 @@ good way for the collector to compute this value.)  Client code may include
 9) Several routines to allow for registration of finalization code.
    User supplied finalization code may be invoked when an object becomes
    unreachable.  To call (*f)(obj, x) when obj becomes inaccessible, use
-       GC_register_finalizer(obj, f, x, 0, 0);
+        GC_register_finalizer(obj, f, x, 0, 0);
    For more sophisticated uses, and for finalization ordering issues,
    see gc.h.
 
@@ -370,7 +370,7 @@ in excessive memory consumption.
 
   Some additional tuning is possible through the parameters defined
 near the top of gc_priv.h.
-  
+
   If only GC_malloc is intended to be used, it might be appropriate to define:
 
 #define malloc(n) GC_malloc(n)
@@ -477,7 +477,7 @@ in the header, see the definition of the type oh in debug_malloc.c)
 
 INCREMENTAL/GENERATIONAL COLLECTION:
 
-The collector normally interrupts client code for the duration of 
+The collector normally interrupts client code for the duration of
 a garbage collection mark phase.  This may be unacceptable if interactive
 response is needed for programs with large heaps.  The collector
 can also run in a "generational" mode, in which it usually attempts to
@@ -519,14 +519,14 @@ objects.  Stubborn objects are treated less efficiently than pointerfree
 A rough rule of thumb is that, in the absence of VM information, garbage
 collection pauses are proportional to the amount of pointerful storage
 plus the amount of modified "stubborn" storage that is reachable during
-the collection.  
+the collection.
 
 Initial allocation of stubborn objects takes longer than allocation
 of other objects, since other data structures need to be maintained.
 
 We recommend against random use of stubborn objects in client
 code, since bugs caused by inappropriate writes to stubborn objects
-are likely to be very infrequently observed and hard to trace.  
+are likely to be very infrequently observed and hard to trace.
 However, their use may be appropriate in a few carefully written
 library routines that do not make the objects themselves available
 for writing by client code.
@@ -553,4 +553,3 @@ may help in some cases.
   Please address bug reports to boehm@acm.org.  If you are
 contemplating a major addition, you might also send mail to ask whether
 it's already been done (or whether we tried and discarded it).
-
index 0b8785174c62db165bb51a08cc00f96ef81d70cc..8960b942b9f5970afbddb26340263e049f24c907 100644 (file)
@@ -6,10 +6,10 @@
      You need the GCC-3.0.3 rev (DG/UX) compiler to build this tree.
      This compiler has the new "dgux386" threads package implemented.
      It also supports the switch "-pthread" needed to link correctly
-     the DG/UX's -lrte -lthread with -lgcc and the system's -lc. 
+     the DG/UX's -lrte -lthread with -lgcc and the system's -lc.
      Finally we support parralleli-mark for the SMP DG/UX machines.
      To build the garbage collector do:
-      
+
       ./configure --enable-parallel-mark
       make
       make gctest
      Alternatively you can do a configuration
 
       ./configure --enable-parallel-mark --disable-shared
-  
+
      to build only the static version of libgc.
-  
+
      To enable debugging messages please do:
-     1) Add the "--enable-gc-debug" flag during configuration. 
+     1) Add the "--enable-gc-debug" flag during configuration.
      2) Edit the file linux-threads.c and uncommnect the line:
 
-     /* #define DEBUG_THREADS 1 */ to ---> 
+     /* #define DEBUG_THREADS 1 */ to --->
 
      #define DEBUG_THREADS 1
 
      Then give "make" as usual.
-    
+
      In a machine with 4 CPUs (my own machine) the option parallel
      mark (aka --enable-parallel-mark) makes a BIG difference.
 
@@ -51,8 +51,8 @@ Note (HB):
      problems with stylistic corrections made by me.
 
 
---- ltconfig.ORIG      Mon Jan 28 20:22:18 2002
-+++ ltconfig   Mon Jan 28 20:44:00 2002
+--- ltconfig.ORIG       Mon Jan 28 20:22:18 2002
++++ ltconfig    Mon Jan 28 20:44:00 2002
 @@ -689,6 +689,11 @@
         pic_flag=-Kconform_pic
      fi
@@ -68,7 +68,7 @@ Note (HB):
 @@ -718,6 +723,12 @@
      # We can build DLLs from non-PIC.
      ;;
+
 +  dgux*)
 +    pic_flag='-KPIC'
 +    link_static='-Bstatic'
@@ -81,7 +81,7 @@ Note (HB):
 @@ -1154,6 +1165,22 @@
      fi
      ;;
+
 +  dgux*)
 +    ld_shlibs=yes
 +    # For both C/C++ ommit the deplibs. This is because we relying on the fact
@@ -103,7 +103,7 @@ Note (HB):
      # no search path for DLLs.
 @@ -1497,7 +1524,7 @@
      ;;
+
    dgux*)
 -    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
 +    archive_cmds='$CC -shared -h $soname -o $lib $libobjs $linkopts'
@@ -112,7 +112,7 @@ Note (HB):
      ;;
 @@ -2092,12 +2119,17 @@
    ;;
+
  dgux*)
 -  version_type=linux
 +  version_type=dgux
@@ -129,87 +129,87 @@ Note (HB):
 +  hardcode_shlibpath_var=no
 +  ac_cv_archive_cmds_needs_lc=no
    ;;
+
  sysv4*MP*)
 
 
---- ltmain.sh.ORIG     Mon Jan 28 20:31:18 2002
-+++ ltmain.sh  Tue Jan 29 00:11:29 2002
+--- ltmain.sh.ORIG      Mon Jan 28 20:31:18 2002
++++ ltmain.sh   Tue Jan 29 00:11:29 2002
 @@ -1072,11 +1072,38 @@
-       esac
-       ;;
+        esac
+        ;;
+
 +      -thread*)
-+      # DG/UX GCC 2.95.x, 3.x.x rev (DG/UX) links -lthread
-+      # with the switch -threads
-+      if test "$arg" = "-threads"; then
-+        case "$host" in
-+        i[3456]86-*-dgux*)
-+          deplibs="$deplibs $arg"
-+          continue
-+          ;;
-+        esac
-+      fi
-+      ;;
++       # DG/UX GCC 2.95.x, 3.x.x rev (DG/UX) links -lthread
++       # with the switch -threads
++       if test "$arg" = "-threads"; then
++         case "$host" in
++         i[3456]86-*-dgux*)
++           deplibs="$deplibs $arg"
++           continue
++           ;;
++         esac
++       fi
++       ;;
 +
 +      -pthread*)
-+      # DG/UX GCC 2.95.x, 3.x.x rev (DG/UX) links -lthread
-+      # with the switch -pthread
-+      if test "$arg" = "-pthread"; then
-+        case "$host" in
-+        i[3456]86-*-dgux*)
-+          deplibs="$deplibs $arg"
-+          continue
-+          ;;
-+        esac
-+      fi
-+      ;;
++       # DG/UX GCC 2.95.x, 3.x.x rev (DG/UX) links -lthread
++       # with the switch -pthread
++       if test "$arg" = "-pthread"; then
++         case "$host" in
++         i[3456]86-*-dgux*)
++           deplibs="$deplibs $arg"
++           continue
++           ;;
++         esac
++       fi
++       ;;
 +
        -l*)
-       if test "$arg" = "-lc"; then
-         case "$host" in
--        *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
-+        *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos* | i[3456]86-*-dgux*)
-           # These systems don't actually have c library (as such)
-+          # It is wrong in DG/UX to add -lc when creating shared/dynamic objs/libs
-           continue
-           ;;
-         esac
+        if test "$arg" = "-lc"; then
+          case "$host" in
+-         *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
++         *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos* | i[3456]86-*-dgux*)
+            # These systems don't actually have c library (as such)
++           # It is wrong in DG/UX to add -lc when creating shared/dynamic objs/libs
+            continue
+            ;;
+          esac
 @@ -1248,6 +1275,12 @@
-         temp_deplibs=
-         for deplib in $dependency_libs; do
-           case "$deplib" in
-+          -thread*)
-+               temp_deplibs="$temp_deplibs $deplib"
-+               ;;
-+          -pthread)
-+               temp_deplibs="$temp_deplibs $deplib"
-+               ;;
-           -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
-                case " $rpath $xrpath " in
-                *" $temp_xrpath "*) ;;
+          temp_deplibs=
+          for deplib in $dependency_libs; do
+            case "$deplib" in
++           -thread*)
++                temp_deplibs="$temp_deplibs $deplib"
++                ;;
++           -pthread)
++                temp_deplibs="$temp_deplibs $deplib"
++                ;;
+            -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+                 case " $rpath $xrpath " in
+                 *" $temp_xrpath "*) ;;
 @@ -1709,6 +1742,13 @@
-         done
-         ;;
-+      dgux)
-+        # Leave mostly blank for DG/UX
-+        major=
-+        versuffix=".$current.$revision";
-+        verstring=
-+        ;;
+          done
+          ;;
+
++       dgux)
++         # Leave mostly blank for DG/UX
++         major=
++         versuffix=".$current.$revision";
++         verstring=
++         ;;
 +
-       linux)
-         major=.`expr $current - $age`
-         versuffix="$major.$age.$revision"
+        linux)
+          major=.`expr $current - $age`
+          versuffix="$major.$age.$revision"
 @@ -1792,8 +1832,9 @@
-       dependency_libs="$deplibs"
-       case "$host" in
--      *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
-+      *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos* | i[3456]86-*-dgux*)
-         # these systems don't actually have a c library (as such)!
-+        # It is wrong in DG/UX to add -lc when creating shared/dynamic objs/libs
-         ;;
-       *)
-         # Add libc to deplibs on all other systems.
+
+        dependency_libs="$deplibs"
+        case "$host" in
+-       *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
++       *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos* | i[3456]86-*-dgux*)
+          # these systems don't actually have a c library (as such)!
++         # It is wrong in DG/UX to add -lc when creating shared/dynamic objs/libs
+          ;;
+        *)
+          # Add libc to deplibs on all other systems.
index 6c8ba55aa7793dc1bf79102a07861fdb1e33bd87..f8640becf202fce0359ca462e07a79d478e74346 100644 (file)
@@ -37,7 +37,7 @@ some, please let me know.)
 
 Note that the distribution comes with a "Makefile" which will be overwritten
 by "configure" with one that is not at all equiavelent to the original.  The
-distribution contains a copy of the original "Makefile" in "Makefile.direct". 
+distribution contains a copy of the original "Makefile" in "Makefile.direct".
 
 Important options to configure:
 
@@ -48,7 +48,7 @@ Important options to configure:
   --enable-threads=TYPE   choose threading package
   --enable-parallel-mark  parallelize marking and free list construction
   --enable-gc-debug (--enable-full-debug before about 7.0)
-                         include full support for pointer backtracing etc.
+                          include full support for pointer backtracing etc.
 
 
 Unless --prefix is set (or --exec-prefix or one of the more obscure options),
@@ -57,5 +57,3 @@ would typically require the "make install" to be run as root.
 
 Most commonly --enable-threads=posix or will be needed.  --enable-parallel-mark
 is recommended for multiprocessors if it is supported on the platform.
-
-
index a5e110e36551ddb26440479a923f65b53b68a064..189ad0784d404474bc121addbb7235f95ad267ea 100644 (file)
@@ -2,152 +2,163 @@ The garbage collector looks at a number of environment variables which are
 then used to affect its operation.  These are examined only on Un*x-like
 platforms and win32.
 
-GC_INITIAL_HEAP_SIZE=<bytes> - Initial heap size in bytes.  May speed up
-                               process start-up.
+GC_INITIAL_HEAP_SIZE=<bytes> -  Initial heap size in bytes.  May speed up
+                                process start-up.
 
 GC_MAXIMUM_HEAP_SIZE=<bytes> - Maximum collected heap size.
 
 GC_LOOP_ON_ABORT - Causes the collector abort routine to enter a tight loop.
-                  This may make it easier to debug, such a process, especially
-                  for multithreaded platforms that don't produce usable core
-                  files, or if a core file would be too large.  On some
-                  platforms, this also causes SIGSEGV to be caught and
-                  result in an infinite loop in a handler, allowing
-                  similar debugging techniques.
+                   This may make it easier to debug, such a process, especially
+                   for multithreaded platforms that don't produce usable core
+                   files, or if a core file would be too large.  On some
+                   platforms, this also causes SIGSEGV to be caught and
+                   result in an infinite loop in a handler, allowing
+                   similar debugging techniques.
 
-GC_PRINT_STATS - Turn on GC logging.  Not functional with -DSMALL_CONFIG.
+GC_PRINT_STATS - Turn on GC logging.  Not functional with SMALL_CONFIG.
 
 GC_LOG_FILE - The name of the log file.  Stderr by default.
 
 GC_PRINT_VERBOSE_STATS - Turn on even more logging.
 
 GC_DUMP_REGULARLY - Generate a GC debugging dump GC_dump() on startup
-                   and during every collection.  Very verbose.  Useful
-                   if you have a bug to report, but please include only the
-                   last complete dump.
+                    and during every collection.  Very verbose.  Useful
+                    if you have a bug to report, but please include only the
+                    last complete dump.
 
 GC_BACKTRACES=<n> - Generate n random backtraces (for heap profiling) after
-                   each GC.  Collector must have been built with
-                   KEEP_BACK_PTRS.  This won't generate useful output unless
-                   most objects in the heap were allocated through debug
-                   allocators.  This is intended to be only a statistical
-                   sample;  individual traces may be erroneous due to
-                   concurrent heap mutation.
+                    each GC.  Collector must have been built with
+                    KEEP_BACK_PTRS.  This won't generate useful output unless
+                    most objects in the heap were allocated through debug
+                    allocators.  This is intended to be only a statistical
+                    sample;  individual traces may be erroneous due to
+                    concurrent heap mutation.
 
 GC_PRINT_ADDRESS_MAP - Linux only.  Dump /proc/self/maps, i.e. various address
-                      maps for the process, to stderr on every GC.  Useful for
-                      mapping root addresses to source for deciphering leak
-                      reports.
+                       maps for the process, to stderr on every GC.  Useful for
+                       mapping root addresses to source for deciphering leak
+                       reports.
 
 GC_NPROCS=<n> - Linux w/threads only.  Explicitly sets the number of processors
-               that the GC should expect to use.  Note that setting this to 1
-               when multiple processors are available will preserve
-               correctness, but may lead to really horrible performance,
-               since the lock implementation will immediately yield without
-               first spinning.
+                that the GC should expect to use.  Note that setting this to 1
+                when multiple processors are available will preserve
+                correctness, but may lead to really horrible performance,
+                since the lock implementation will immediately yield without
+                first spinning.
 
 GC_MARKERS=<n> - Only if compiled with PARALLEL_MARK.  Set the number
-               of marker threads.  This is normally set to the number of
-               processors.  It is safer to adjust GC_MARKERS than GC_NPROCS,
-               since GC_MARKERS has no impact on the lock implementation.
+                of marker threads.  This is normally set to the number of
+                processors.  It is safer to adjust GC_MARKERS than GC_NPROCS,
+                since GC_MARKERS has no impact on the lock implementation.
 
 GC_NO_BLACKLIST_WARNING - Prevents the collector from issuing
-               warnings about allocations of very large blocks.
-               Deprecated.  Use GC_LARGE_ALLOC_WARN_INTERVAL instead.
+                warnings about allocations of very large blocks.
+                Deprecated.  Use GC_LARGE_ALLOC_WARN_INTERVAL instead.
 
 GC_LARGE_ALLOC_WARN_INTERVAL=<n> - Print every nth warning about very large
-               block allocations, starting with the nth one.  Small values
-               of n are generally benign, in that a bounded number of
-               such warnings generally indicate at most a bounded leak.
-               For best results it should be set at 1 during testing.
-               Default is 5.  Very large numbers effectively disable the
-               warning.
+                block allocations, starting with the nth one.  Small values
+                of n are generally benign, in that a bounded number of
+                such warnings generally indicate at most a bounded leak.
+                For best results it should be set at 1 during testing.
+                Default is 5.  Very large numbers effectively disable the
+                warning.
 
 GC_IGNORE_GCJ_INFO - Ignore the type descriptors implicitly supplied by
-                    GC_gcj_malloc and friends.  This is useful for debugging
-                    descriptor generation problems, and possibly for
-                    temporarily working around such problems.  It forces a
-                    fully conservative scan of all heap objects except
-                    those known to be pointerfree, and may thus have other
-                    adverse effects.
+                     GC_gcj_malloc and friends.  This is useful for debugging
+                     descriptor generation problems, and possibly for
+                     temporarily working around such problems.  It forces a
+                     fully conservative scan of all heap objects except
+                     those known to be pointerfree, and may thus have other
+                     adverse effects.
 
 GC_PRINT_BACK_HEIGHT - Print max length of chain through unreachable objects
-                    ending in a reachable one.  If this number remains
-                    bounded, then the program is "GC robust".  This ensures
-                    that a fixed number of misidentified pointers can only
-                    result in a bounded space leak.  This currently only
-                    works if debugging allocation is used throughout.
-                    It increases GC space and time requirements appreciably.
-                    This feature is still somewhat experimental, and requires
-                    that the collector have been built with MAKE_BACK_GRAPH
-                    defined.  For details, see Boehm, "Bounding Space Usage
-                    of Conservative Garbage Collectors", POPL 2001, or
-                    http://lib.hpl.hp.com/techpubs/2001/HPL-2001-251.html .
+                     ending in a reachable one.  If this number remains
+                     bounded, then the program is "GC robust".  This ensures
+                     that a fixed number of misidentified pointers can only
+                     result in a bounded space leak.  This currently only
+                     works if debugging allocation is used throughout.
+                     It increases GC space and time requirements appreciably.
+                     This feature is still somewhat experimental, and requires
+                     that the collector have been built with MAKE_BACK_GRAPH
+                     defined.  For details, see Boehm, "Bounding Space Usage
+                     of Conservative Garbage Collectors", POPL 2001, or
+                     http://lib.hpl.hp.com/techpubs/2001/HPL-2001-251.html .
 
 GC_RETRY_SIGNALS, GC_NO_RETRY_SIGNALS - Try to compensate for lost
-                    thread suspend signals in linux_threads.c.  On by
-                    default for GC_OSF1_THREADS, off otherwise.  Note 
-                    that this does not work around a possible loss of
-                    thread restart signals.  This seems to be necessary for
-                    some versions of Tru64.  Since we've previously seen
-                    similar issues on some other operating systems, it
-                    was turned into a runtime flag to enable last-minute
-                    work-arounds.
+                     thread suspend signals in linux_threads.c.  On by
+                     default for GC_OSF1_THREADS, off otherwise.  Note
+                     that this does not work around a possible loss of
+                     thread restart signals.  This seems to be necessary for
+                     some versions of Tru64.  Since we've previously seen
+                     similar issues on some other operating systems, it
+                     was turned into a runtime flag to enable last-minute
+                     work-arounds.
 
 GC_USE_GETWRITEWATCH=<n> - Only if MPROTECT_VDB and GWW_VDB are both defined
-                    (Win32 only).  Explicitly specify which strategy of
-                    keeping track of dirtied pages should be used.
-                    If n=0 then GetWriteWatch() is not used (falling back to
-                    protecting pages and catching memory faults strategy)
-                    else the collector tries to use GetWriteWatch-based
-                    strategy (GWW_VDB) first if available.
+                     (Win32 only).  Explicitly specify which strategy of
+                     keeping track of dirtied pages should be used.
+                     If n=0 then GetWriteWatch() is not used (falling back to
+                     protecting pages and catching memory faults strategy)
+                     else the collector tries to use GetWriteWatch-based
+                     strategy (GWW_VDB) first if available.
 
 GC_DISABLE_INCREMENTAL - Ignore runtime requests to enable incremental GC.
-                    Useful for debugging.
+                     Useful for debugging.
 
 The following turn on runtime flags that are also program settable.  Checked
 only during initialization.  We expect that they will usually be set through
 other means, but this may help with debugging and testing:
 
 GC_ENABLE_INCREMENTAL - Turn on incremental collection at startup.  Note that,
-                    depending on platform and collector configuration, this
-                    may involve write protecting pieces of the heap to
-                    track modifications.  These pieces may include pointerfree
-                    objects or not.  Although this is intended to be
-                    transparent, it may cause unintended system call failures.
-                    Use with caution.
+                     depending on platform and collector configuration, this
+                     may involve write protecting pieces of the heap to
+                     track modifications.  These pieces may include pointerfree
+                     objects or not.  Although this is intended to be
+                     transparent, it may cause unintended system call failures.
+                     Use with caution.
 
 GC_PAUSE_TIME_TARGET - Set the desired garbage collector pause time in msecs.
-                    This only has an effect if incremental collection is
-                    enabled.  If a collection requires appreciably more time
-                    than this, the client will be restarted, and the collector
-                    will need to do additional work to compensate.  The
-                    special value "999999" indicates that pause time is
-                    unlimited, and the incremental collector will behave
-                    completely like a simple generational collector.  If
-                    the collector is configured for parallel marking, and
-                    run on a multiprocessor, incremental collection should
-                    only be used with unlimited pause time.
+                     This only has an effect if incremental collection is
+                     enabled.  If a collection requires appreciably more time
+                     than this, the client will be restarted, and the collector
+                     will need to do additional work to compensate.  The
+                     special value "999999" indicates that pause time is
+                     unlimited, and the incremental collector will behave
+                     completely like a simple generational collector.  If
+                     the collector is configured for parallel marking, and
+                     run on a multiprocessor, incremental collection should
+                     only be used with unlimited pause time.
 
 GC_FULL_FREQUENCY - Set the desired number of partial collections between full
-                 collections.  Matters only if GC_incremental is set.
+                  collections.  Matters only if GC_incremental is set.
 
 GC_FREE_SPACE_DIVISOR - Set GC_free_space_divisor to the indicated value.
                       Setting it to larger values decreases space consumption
-                     and increases GC frequency.
+                      and increases GC frequency.
+
+GC_UNMAP_THRESHOLD - Set the desired memory blocks unmapping threshold (the
+                   number of sequential garbage collections for which
+                   a candidate block for unmapping should remain free).  The
+                   special value "0" completely disables unmapping.
+
+GC_FORCE_UNMAP_ON_GCOLLECT - Turn "unmap as much as possible on explicit GC"
+                mode on (overrides the default value).  Has no effect on
+                implicitly-initiated garbage collections.  Has no effect if
+                memory unmapping is disabled (or not compiled in) or if the
+                unmapping threshold is 1.
 
 GC_FIND_LEAK - Turns on GC_find_leak and thus leak detection.  Forces a
-              collection at program termination to detect leaks that would
-              otherwise occur after the last GC.
+               collection at program termination to detect leaks that would
+               otherwise occur after the last GC.
 
 GC_ALL_INTERIOR_POINTERS - Turns on GC_all_interior_pointers and thus interior
-                          pointer recognition.
+                           pointer recognition.
 
 GC_DONT_GC - Turns off garbage collection.  Use cautiously.
 
 GC_TRACE=addr - Intended for collector debugging.  Requires that the collector
-               have been built with ENABLE_TRACE defined.  Causes the debugger
-               to log information about the tracing of address ranges
-               containing addr.  Typically addr is the address that contains
-               a pointer to an object that mysteriously failed to get marked.
-               Addr must be specified as a hexadecimal integer.
+                have been built with ENABLE_TRACE defined.  Causes the debugger
+                to log information about the tracing of address ranges
+                containing addr.  Typically addr is the address that contains
+                a pointer to an object that mysteriously failed to get marked.
+                Addr must be specified as a hexadecimal integer.
index 1481c375cdb51bbcfea1b2909718ef1f7c0f0ae7..2ca74d468a81093edfb25789ad970ee621b85f03 100644 (file)
@@ -1,7 +1,7 @@
 The collector uses a large amount of conditional compilation in order to
 deal with platform dependencies.  This violates a number of known coding
 standards.  On the other hand, it seems to be the only practical way to
-support this many platforms without excessive code duplication. 
+support this many platforms without excessive code duplication.
 
 A few guidelines have mostly been followed in order to keep this manageable:
 
@@ -14,79 +14,484 @@ In my opinion, it's still well worth it, for the same reason that we indent
 ordinary "if" statements.
 
 2) Whenever possible, tests are performed on the macros defined in gcconfig.h
-instead of directly testing patform-specific predefined macros.  This makes it
-relatively easy to adapt to new compilers with a different set of predefined
-macros.  Currently these macros generally identify platforms instead of
-features.  In many cases, this is a mistake.
+instead of directly testing platform-specific predefined macros.  This makes
+it relatively easy to adapt to new compilers with a different set of
+predefined macros.  Currently these macros generally identify platforms
+instead of features.  In many cases, this is a mistake.
 
 Many of the tested configuration macros are at least somewhat defined in
 either include/private/gcconfig.h or in Makefile.direct.  Here is an attempt
-at defining some of the remainder:  (Thanks to Walter Bright for suggesting
+at documenting these macros:  (Thanks to Walter Bright for suggesting
 this.  This is a work in progress)
 
-MACRO          EXPLANATION
------          -----------
+MACRO           EXPLANATION
+-----           -----------
 
-GC_DEBUG       Tested by gc.h.  Causes all-upper-case macros to
-               expand to calls to debug versions of collector routines.
+GC_DEBUG        Tested by gc.h.  Causes all-upper-case macros to
+                expand to calls to debug versions of collector routines.
 
-GC_NO_THREAD_REDIRECTS Tested by gc.h.  Prevents redirection of thread
-               creation routines etc. to GC_ versions.  Requires the
-               programmer to explicitly handle thread registration.
+GC_NO_THREAD_REDIRECTS  Tested by gc.h.  Prevents redirection of thread
+                creation routines etc. to GC_ versions.  Requires the
+                programmer to explicitly handle thread registration.
 
-GC_NO_THREAD_DECLS Tested by gc.h. MS Windows only.  Do not declare
-               Windows thread creation routines and do not include windows.h.  
+GC_NO_THREAD_DECLS      Tested by gc.h.  MS Windows only.  Do not declare
+                Windows thread creation routines and do not include windows.h.
 
-__DMC__        Always #define'd by the Digital Mars compiler. Expands
-               to the compiler version number in hex, i.e. 0x810 is
-               version 8.1b0
+GC_UNDERSCORE_STDCALL   Tested by gc.h.  Explicitly prefix exported/imported
+                WINAPI (__stdcall) symbols with '_' (underscore).  Could be
+                used with MinGW (for x86) compiler (in conjunction with
+                GC_DLL) to follow MS conventions for __stdcall symbols naming.
 
 _ENABLE_ARRAYNEW
-               #define'd by the Digital Mars C++ compiler when
-               operator new[] and delete[] are separately
-               overloadable. Used in gc_cpp.h.
-
-_MSC_VER       Expands to the Visual C++ compiler version.  Assumed to
-               not be defined for other compilers (at least if they behave
-               appreciably differently).
-
-_DLL           Defined by Visual C++ if dynamic libraries are being built
-               or used.  Used to test whether __declspec(dllimport) or
-               __declspec(dllexport) needs to be added to declarations
-               to support the case in which the collector is in a dll.
-
-GC_DLL         User-settable macro that forces the effect of _DLL.  Set
-               by gc.h if _DLL is defined and GC_NOT_DLL is undefined.
-               This is the macro that is tested internally to determine
-               whether the GC is in its own dynamic library.  May need
-               to be set by clients before including gc.h.  Note that
-               inside the GC implementation it indicates that the
-               collector is in its own dynamic library, should export
-               its symbols, etc.  But in clients it indicates that the
-               GC resides in a different DLL, its entry points should
-               be referenced accordingly, and precautions may need to
-               be taken to properly deal with statically allocated 
-               variables in the main program.  Used only for MS Windows.
-
-GC_NOT_DLL     User-settable macro that overrides _DLL, e.g. if dynamic
-               libraries are used, but the collector is in a static library.
-
-__STDC__       Assumed to be defined only by compilers that understand
-               prototypes and other C89 features.  Its value is generally
-               not used, since we are fine with most nonconforming extensions.
-
-SUNOS5SIGS     Solaris-like signal handling.  This is probably misnamed,
-               since it really doesn't guarantee much more than Posix.
-               Currently set only for Solaris2.X, HPUX, and DRSNX.  Should
-               probably be set for some other platforms.
-
-PCR            Set if the collector is being built as part of the Xerox
-               Portable Common Runtime.
+                #define'd by the Digital Mars C++ compiler when
+                operator new[] and delete[] are separately
+                overloadable. Used in gc_cpp.h.
+
+_DLL            Tested by gc_config_macros.h. Defined by Visual C++ if runtime
+                dynamic libraries are in use.  Used (only if none of GC_DLL,
+                GC_NOT_DLL, __GNUC__ are defined) to test whether
+                __declspec(dllimport) needs to be added to declarations
+                to support the case in which the collector is in a DLL.
+
+GC_DLL          Defined by user if dynamic libraries are being built
+                or used.  Also set by gc.h if _DLL is defined (except for
+                mingw) while GC_NOT_DLL and __GNUC__ are both undefined.
+                This is the macro that is tested internally to determine
+                whether the GC is in its own dynamic library.  May need
+                to be set by clients before including gc.h.  Note that
+                inside the GC implementation it indicates that the
+                collector is in its own dynamic library, should export
+                its symbols, etc.  But in clients it indicates that the
+                GC resides in a different DLL, its entry points should
+                be referenced accordingly, and precautions may need to
+                be taken to properly deal with statically allocated
+                variables in the main program.  Used for MS Windows.
+                Also used by GCC v4+ (only when the dynamic shared library
+                is being built) to hide internally used symbols.
+
+GC_NOT_DLL      User-settable macro that overrides _DLL, e.g. if runtime
+                dynamic libraries are used, but the collector is in a static
+                library.  Tested by gc_config_macros.h.
+
+
+These define arguments influence the collector configuration:
+FIND_LEAK causes GC_find_leak to be initially set.
+  This causes the collector to assume that all inaccessible
+  objects should have been explicitly deallocated, and reports exceptions.
+  Finalization and the test program are not usable in this mode.
+
+SUNOS5SIGS      Solaris-like signal handling.  This is probably misnamed,
+                since it really doesn't guarantee much more than Posix.
+                Currently set only for Solaris2.X, HPUX, and DRSNX.  Should
+                probably be set for some other platforms.
+
+PCR             Set if the collector is being built as part of the Xerox
+                Portable Common Runtime.
 
 USE_COMPILER_TLS  Assume the existence of __thread-style thread-local
-               storage.  Set automatically for thread-local allocation with
-               the HP/UX vendor compiler.  Usable with gcc on sufficiently
-               up-to-date ELF platforms.
+                storage.  Set automatically for thread-local allocation with
+                the HP/UX vendor compiler.  Usable with gcc on sufficiently
+                up-to-date ELF platforms.
+
+IMPORTANT: Any of the _THREADS options must normally also be defined in
+  the client before including gc.h.  This redefines thread primitives to
+  invoke the GC_ versions instead.  Alternatively, linker-based symbol
+  interception can be used on a few platforms.
+
+GC_THREADS      Should set the appropriate one of the below macros,
+  except GC_WIN32_PTHREADS, which must be set explicitly.  Tested by gc.h.
+
+GC_SOLARIS_THREADS      Enables support for Solaris pthreads.
+  Must also define _REENTRANT.
+
+GC_IRIX_THREADS         Enables support for Irix pthreads.  See README.sgi.
+
+GC_HPUX_THREADS         Enables support for HP/UX 11 pthreads.
+  Also requires _REENTRANT or _POSIX_C_SOURCE=199506L. See README.hp.
+
+GC_LINUX_THREADS        Enables support for Xavier Leroy's Linux threads
+  or NPTL threads. See README.linux.  _REENTRANT may also be required.
+
+GC_OSF1_THREADS         Enables support for Tru64 pthreads.
+
+GC_FREEBSD_THREADS      Enables support for FreeBSD pthreads.
+  Appeared to run into some underlying thread problems.
+
+GC_NETBSD_THREADS       Enables support for NetBSD pthreads.
+
+GC_OPENBSD_THREADS      Enables support for OpenBSD pthreads.
+
+GC_DARWIN_THREADS       Enables support for Mac OS X pthreads.
+
+GC_AIX_THREADS  Enables support for IBM AIX threads.
+
+GC_DGUX386_THREADS      Enables support for DB/UX on I386 threads.
+  See README.DGUX386.  (Probably has not been tested recently.)
+
+GC_WIN32_THREADS        Enables support for win32 threads.  That makes sense
+  for this Makefile only under Cygwin.
+
+GC_WIN32_PTHREADS       Enables support for Ming32 pthreads.  This cannot be
+  enabled automatically by GC_THREADS, which would assume Win32 native
+  threads.
+
+PTW32_STATIC_LIB        Causes the static version of the Mingw pthreads
+  library to be used.  Requires GC_WIN32_PTHREADS.
+
+GC_PTHREADS_PARAMARK    Causes pthread-based parallel mark implementation
+  to be used even if GC_WIN32_PTHREADS is undefined.  (Useful for WinCE.)
+
+ALL_INTERIOR_POINTERS   Allows all pointers to the interior of objects to be
+  recognized.  (See gc_priv.h for consequences.)  Alternatively,
+  GC_all_interior_pointers can be set at process initialization time.
+
+SMALL_CONFIG    Tries to tune the collector for small heap sizes,
+  usually causing it to use less space in such situations.
+  Incremental collection no longer works in this case.
+
+GC_DISABLE_INCREMENTAL  Turn off the incremental collection support.
+
+NO_INCREMENTAL  Causes the gctest program to not invoke the incremental
+  collector.  This has no impact on the generated library, only on the test
+  program.  (This is often useful for debugging failures unrelated to
+  incremental GC.)
+
+LARGE_CONFIG    Tunes the collector for unusually large heaps.
+  Necessary for heaps larger than about 4 GiB on most (64-bit) machines.
+  Recommended for heaps larger than about 500 MiB.  Not recommended for
+  embedded systems.
+
+DONT_ADD_BYTE_AT_END    Meaningful only with ALL_INTERIOR_POINTERS or
+  GC_all_interior_pointers = 1.  Normally ALL_INTERIOR_POINTERS
+  causes all objects to be padded so that pointers just past the end of
+  an object can be recognized.  This can be expensive.  (The padding
+  is normally more than one byte due to alignment constraints.)
+  DONT_ADD_BYTE_AT_END disables the padding.
+
+NO_EXECUTE_PERMISSION   May cause some or all of the heap to not
+  have execute permission, i.e. it may be impossible to execute
+  code from the heap.  Currently this only affects the incremental
+  collector on UNIX machines.  It may greatly improve its performance,
+  since this may avoid some expensive cache synchronization.
+
+GC_NO_OPERATOR_NEW_ARRAY        Declares that the C++ compiler does not
+  support the  new syntax "operator new[]" for allocating and deleting arrays.
+  See gc_cpp.h for details.  No effect on the C part of the collector.
+  This is defined implicitly in a few environments.  Must also be defined
+  by clients that use gc_cpp.h.
+
+REDIRECT_MALLOC=<X>     Causes malloc to be defined as alias for X.
+  Unless the following macros are defined, realloc is also redirected
+  to GC_realloc, and free is redirected to GC_free.
+  Calloc and strdup are redefined in terms of the new malloc.  X should
+  be either GC_malloc or GC_malloc_uncollectable, or
+  GC_debug_malloc_replacement.  (The latter invokes GC_debug_malloc
+  with dummy source location information, but still results in
+  properly remembered call stacks on Linux/X86 and Solaris/SPARC.
+  It requires that the following two macros also be used.)
+  The former is occasionally useful for working around leaks in code
+  you don't want to (or can't) look at.  It may not work for
+  existing code, but it often does.  Neither works on all platforms,
+  since some ports use malloc or calloc to obtain system memory.
+  (Probably works for UNIX, and win32.)  If you build with DBG_HDRS_ALL,
+  you should only use GC_debug_malloc_replacement as a malloc
+  replacement.
+
+REDIRECT_REALLOC=<X>    Causes GC_realloc to be redirected to X.
+  The canonical use is REDIRECT_REALLOC=GC_debug_realloc_replacement,
+  together with REDIRECT_MALLOC=GC_debug_malloc_replacement to
+  generate leak reports with call stacks for both malloc and realloc.
+  This also requires REDIRECT_FREE.
+
+REDIRECT_FREE=<X>       Causes free to be redirected to X.  The canonical use
+  is REDIRECT_FREE=GC_debug_free.
+
+IGNORE_FREE     Turns calls to free into a no-op.  Only useful with
+  REDIRECT_MALLOC.
+
+NO_DEBUGGING    Removes GC_dump and the debugging routines it calls.
+  Reduces code size slightly at the expense of debuggability.
+
+DEBUG_THREADS   Turn on printing additional thread-support debugging
+  information.
+
+JAVA_FINALIZATION       Makes it somewhat safer to finalize objects out of
+  order by specifying a nonstandard finalization mark procedure  (see
+  finalize.c).  Objects reachable from finalizable objects will be marked
+  in a separate post-pass, and hence their memory won't be reclaimed.
+  Not recommended unless you are implementing a language that specifies
+  these semantics.  Since 5.0, determines only the initial value
+  of GC_java_finalization variable.
+
+FINALIZE_ON_DEMAND      Causes finalizers to be run only in response
+  to explicit GC_invoke_finalizers() calls.
+  In 5.0 this became runtime adjustable, and this only determines the
+  initial value of GC_finalize_on_demand.
+
+ATOMIC_UNCOLLECTABLE    Includes code for GC_malloc_atomic_uncollectable.
+  This is useful if either the vendor malloc implementation is poor,
+  or if REDIRECT_MALLOC is used.
+
+MARK_BIT_PER_GRANULE    Requests that a mark bit (or often byte)
+  be allocated for each allocation granule, as opposed to each object.
+  This often improves speed, possibly at some cost in space and/or
+  cache footprint.  Normally it is best to let this decision be
+  made automatically depending on platform.
+
+MARK_BIT_PER_OBJ        Requests that a mark bit be allocated for each
+  object instead of allocation granule.  The opposite of
+  MARK_BIT_PER_GRANULE.
+
+HBLKSIZE=<ddd>  Explicitly sets the heap block size (where ddd is a power of
+  2 between 512 and 16384).  Each heap block is devoted to a single size and
+  kind of object.  For the incremental collector it makes sense to match
+  the most likely page size.  Otherwise large values result in more
+  fragmentation, but generally better performance for large heaps.
+
+USE_MMAP        Use MMAP instead of sbrk to get new memory.
+  Works for Linux, FreeBSD, Cygwin, Solaris and Irix.
+
+USE_MUNMAP      Causes memory to be returned to the OS under the right
+  circumstances.  This currently disables VM-based incremental collection
+  (except for Win32 with GetWriteWatch() available).
+  Works under some Unix, Linux and Windows versions.
+  Requires USE_MMAP except for Windows.
+
+MUNMAP_THRESHOLD=<value>        Set the desired memory blocks unmapping
+  threshold (the number of sequential garbage collections for which
+  a candidate block for unmapping should remain free).
+
+GC_FORCE_UNMAP_ON_GCOLLECT      Set "unmap as much as possible on explicit GC"
+  mode on by default.  The mode could be changed at run-time.  Has no effect
+  unless unmapping is turned on.  Has no effect on implicitly-initiated
+  garbage collections.
+
+MMAP_STACKS (for Solaris threads)       Use mmap from /dev/zero rather than
+  GC_scratch_alloc() to get stack memory.
+
+PRINT_BLACK_LIST        Whenever a black list entry is added, i.e. whenever
+  the garbage collector detects a value that looks almost, but not quite,
+  like a pointer, print both the address containing the value, and the
+  value of the near-bogus-pointer.  Can be used to identify regions of
+  memory that are likely to contribute misidentified pointers.
+
+KEEP_BACK_PTRS  Add code to save back pointers in debugging headers
+  for objects allocated with the debugging allocator.  If all objects
+  through GC_MALLOC with GC_DEBUG defined, this allows the client
+  to determine how particular or randomly chosen objects are reachable
+  for debugging/profiling purposes.  The gc_backptr.h interface is
+  implemented only if this is defined.
+
+GC_ASSERTIONS   Enable some internal GC assertion checking.  Currently
+  this facility is only used in a few places.  It is intended primarily
+  for debugging of the garbage collector itself, but could also...
+
+DBG_HDRS_ALL    Make sure that all objects have debug headers.  Increases
+  the reliability (from 99.9999% to 100% mod. bugs) of some of the debugging
+  code (especially KEEP_BACK_PTRS).  Makes SHORT_DBG_HDRS possible.
+  Assumes that all client allocation is done through debugging allocators.
+
+SHORT_DBG_HDRS  Assume that all objects have debug headers.  Shorten
+  the headers to minimize object size, at the expense of checking for
+  writes past the end of an object.  This is intended for environments
+  in which most client code is written in a "safe" language, such as
+  Scheme or Java.  Assumes that all client allocation is done using
+  the GC_debug_ functions, or through the macros that expand to these,
+  or by redirecting malloc to GC_debug_malloc_replacement.
+  (Also eliminates the field for the requested object size.)
+  Occasionally could be useful for debugging of client code.  Slows down the
+  collector somewhat, but not drastically.
+
+SAVE_CALL_COUNT=<n>     Set the number of call frames saved with objects
+  allocated through the debugging interface.  Affects the amount of
+  information generated in leak reports.  Only matters on platforms
+  on which we can quickly generate call stacks, currently Linux/(X86 & SPARC)
+  and Solaris/SPARC and platforms that provide execinfo.h.
+  Default is zero.  On X86, client
+  code should NOT be compiled with -fomit-frame-pointer.
+
+SAVE_CALL_NARGS=<n>     Set the number of functions arguments to be saved
+  with each call frame.  Default is zero.  Ignored if we don't know how to
+  retrieve arguments on the platform.
+
+CHECKSUMS       Reports on erroneously clear dirty bits, and unexpectedly
+  altered stubborn objects, at substantial performance cost.  Use only for
+  debugging of the incremental collector.  Not compatible with USE_MUNMAP
+  or threads.
+
+GC_GCJ_SUPPORT  Includes support for gcj (and possibly other systems
+  that include a pointer to a type descriptor in each allocated object).
+  Building this way requires an ANSI C compiler.
+
+USE_I686_PREFETCH       Causes the collector to issue Pentium III style
+  prefetch instructions.  No effect except on X86 Linux platforms.
+  Assumes a very recent gcc-compatible compiler and assembler.
+  (Gas prefetcht0 support was added around May 1999.)
+  Empirically the code appears to still run correctly on Pentium II
+  processors, though with no performance benefit.  May not run on other
+  X86 processors?  In some cases this improves performance by
+  15% or so.
+
+USE_3DNOW_PREFETCH      Causes the collector to issue AMD 3DNow style
+  prefetch instructions.  Same restrictions as USE_I686_PREFETCH.
+  Minimally tested.  Didn't appear to be an obvious win on a K6-2/500.
+
+USE_PPC_PREFETCH        Causes the collector to issue PowerPC style
+  prefetch instructions.  No effect except on PowerPC OS X platforms.
+  Performance impact untested.
+
+GC_USE_LD_WRAP  In combination with the old flags listed in README.linux
+  causes the collector some system and pthread calls in a more transparent
+  fashion than the usual macro-based approach.  Requires GNU ld, and
+  currently probably works only with Linux.
+
+GC_USE_DLOPEN_WRAP      Causes the collector to redefine malloc and
+  intercepted pthread routines with their real names, and causes it to use
+  dlopen and dlsym to refer to the original versions.  This makes it possible
+  to build an LD_PRELOADable malloc replacement library.
+
+THREAD_LOCAL_ALLOC      Defines GC_malloc(), GC_malloc_atomic() and
+  GC_gcj_malloc() to use a per-thread set of free-lists. These then allocate
+  in a way that usually does not involve acquisition of a global lock.
+  Recommended for multiprocessors.  Requires explicit GC_INIT() call, unless
+  REDIRECT_MALLOC is defined and GC_malloc is used first.
+
+USE_COMPILER_TLS        Causes thread local allocation to use
+  the compiler-supported "__thread" thread-local variables.  This is the
+  default in HP/UX.  It may help performance on recent Linux installations.
+  (It failed for me on RedHat 8, but appears to work on RedHat 9.)
+
+PARALLEL_MARK   Allows the marker to run in multiple threads.  Recommended
+  for multiprocessors.
+
+DONT_USE_SIGNALANDWAIT (Win32 only)     Use an alternate implementation for
+  marker threads (if PARALLEL_MARK defined) synchronization routines based
+  on InterlockedExchange() (instead of AO_fetch_and_add()) and on multiple
+  event objects (one per each marker instead of that based on Win32
+  SignalObjectAndWait() using a single event object).  This is the default
+  for WinCE.
+
+GC_WINMAIN_REDIRECT (Win32 only)        Redirect (rename) an application
+  WinMain to GC_WinMain; implement the "real" WinMain which starts a new
+  thread to call GC_WinMain after initializing the GC.  Useful for WinCE.
+  Incompatible with GC_DLL.
+
+GC_REGISTER_MEM_PRIVATE (Win32 only)    Force to register MEM_PRIVATE R/W
+  sections as data roots.  Might be needed for some WinCE 6.0+ custom builds.
+  (May result in numerous "Data Abort" messages logged to WinCE debugging
+  console.)  Incompatible with GCC toolchains for WinCE.
+
+NO_GETENV       Prevents the collector from looking at environment variables.
+  These may otherwise alter its configuration, or turn off GC altogether.
+  I don't know of a reason to disable this, except possibly if the resulting
+  process runs as a privileged user.  (This is on by default for WinCE.)
+
+EMPTY_GETENV_RESULTS    Define to workaround a reputed Wine bug in getenv
+  (getenv() may return an empty string instead of NULL for a missing entry).
+
+USE_GLOBAL_ALLOC (Win32 only)   Use GlobalAlloc() instead of VirtualAlloc()
+  to allocate the heap.  May be needed to work around a Windows NT/2000 issue.
+  Incompatible with USE_MUNMAP.  See README.win32 for details.
+
+MAKE_BACK_GRAPH         Enable GC_PRINT_BACK_HEIGHT environment variable.
+  See README.environment for details.  Experimental. Limited platform
+  support.  Implies DBG_HDRS_ALL.  All allocation should be done using
+  the debug interface.
+
+STUBBORN_ALLOC  Allows allocation of "hard to change" objects, and thus
+  makes incremental collection easier.  Was enabled by default until 6.0.
+  Rarely used, to my knowledge.
+
+HANDLE_FORK     Attempts to make GC_malloc() work in a child process fork()'ed
+  from a multithreaded parent.  Currently only supported by pthread_support.c.
+  (Similar code should work on Solaris or Irix, but it hasn't been tried.)
+
+TEST_WITH_SYSTEM_MALLOC         Causes gctest to allocate (and leak) large
+  chunks of memory with the standard system malloc.  This will cause the root
+  set and collected heap to grow significantly if malloc'ed memory is somehow
+  getting traced by the collector.  This has no impact on the generated
+  library; it only affects the test.
+
+POINTER_MASK=<0x...>    Causes candidate pointers to be AND'ed with the given
+  mask before being considered.  If either this or the following macro is
+  defined, it will be assumed that all pointers stored in the heap need to be
+  processed this way.  Stack and register pointers will be considered both
+  with and without processing.  These macros are normally needed only to
+  support systems that use high-order pointer tags.  EXPERIMENTAL.
+
+POINTER_SHIFT=<n>       Causes the collector to left shift candidate pointers
+  by the indicated amount before trying to interpret them.  Applied after
+  POINTER_MASK. EXPERIMENTAL.  See also the preceding macro.
+
+ENABLE_TRACE    Enables the GC_TRACE=addr environment setting to do its job.
+  By default this is not supported in order to keep the marker as fast as
+  possible.
+
+DARWIN_DONT_PARSE_STACK         Causes the Darwin port to discover thread
+  stack bounds in the same way as other pthread ports, without trying to
+  walk the frames onthe stack.  This is recommended only as a fallback for
+  applications that don't support proper stack unwinding.
+
+USE_PROC_FOR_LIBRARIES  Causes the Linux collector to treat writable
+  memory mappings (as reported by /proc) as roots, if it doesn't have
+  other information about them.  It no longer traverses dynamic loader
+  data structures to find dynamic library static data.  This may be
+  required for applications that store pointers in mmapped segments without
+  informing the collector.  But it typically performs poorly, especially
+  since it will scan inactive but cached NPTL thread stacks completely.
+
+NO_PROC_STAT    Causes the collector to avoid relying on Linux
+  "/proc/self/stat".
+
+NO_GETCONTEXT   Causes the collector to not assume the existence of the
+  getcontext() function on linux-like platforms.  This currently happens
+  implicitly on Darwin, Hurd, or ARM or MIPS hardware.  It is explicitly
+  needed for some old versions of FreeBSD.
+
+STATIC=static   Causes various GC_ symbols that could logically be declared
+  static to be declared (this is the default if NO_DEBUGGING is specified).
+  Reduces the number of visible symbols (letting the optimizer do its work
+  better), which is probably cleaner, but may make some kinds of debugging
+  and profiling harder.
+
+GC_DLL  Build dynamic-link library (or dynamic shared object).  For Unix this
+  causes the exported symbols to have 'default' visibility (ignored unless
+  GCC v4+) and the internal ones to have 'hidden' visibility.
+
+DONT_USE_USER32_DLL (Win32 only)        Don't use "user32" DLL import library
+  (containing MessageBox() entry); useful for a static GC library.
+
+GC_PREFER_MPROTECT_VDB  Choose MPROTECT_VDB manually in case of multiple
+  virtual dirty bit strategies are implemented (at present useful on Win32
+  to force MPROTECT_VDB strategy instead of the default GWW_VDB one).
+
+GC_NO_DLLMAIN (Win32+DLL only)  Exclude DllMain-based thread registration
+  support.
+
+GC_IGNORE_GCJ_INFO      Disable GCJ-style type information (useful for
+  debugging on WinCE).
+
+GC_PRINT_VERBOSE_STATS  Permanently turn on verbose logging (useful for
+  debugging and profiling on WinCE).
+
+GC_DONT_EXPAND  Don't expand the heap unless explicitly requested or forced to.
+
+GC_INITIAL_HEAP_SIZE=<value>    Set the desired default initial heap size
+  in bytes.
+
+GC_FREE_SPACE_DIVISOR=<value>   Set alternate default GC_free_space_divisor
+  value.
 
+GC_TIME_LIMIT=<milliseconds>    Set alternate default GC_time_limit value
+  (setting this to GC_TIME_UNLIMITED will essentially disable incremental
+  collection while leaving generational collection enabled).
 
+GC_FULL_FREQ=<value>    Set alternate default number of partial collections
+  between full collections (matters only if incremental collection is on).
 
+NO_CANCEL_SAFE (Posix platforms with threads only)      Don't bother trying
+  to make the collector safe for thread cancellation; cancellation is not
+  used.  (Note that if cancellation is used anyway, threads may end up
+  getting cancelled in unexpected places.)  Even without this option,
+  PTHREAD_CANCEL_ASYNCHRONOUS is never safe with the collector.  (We could
+  argue about its safety without the collector.)
index 73620342f397fac556c6e33f26dccd7f8232cb6e..f91410633c872572bce52d393d9dc78b2075b49f 100644 (file)
@@ -20,9 +20,9 @@ You may want to reverse this decisions if you use -DREDIRECT_MALLOC=...
 
 SOLARIS THREADS:
 
-The collector must be compiled with -DGC_SOLARIS_THREADS (thr_ functions)
-or -DGC_THREADS to be thread safe.  This assumes use of the pthread_
-interface.  Old style Solaris threads are no longer supported.
+The collector must be compiled with -DGC_THREADS to be thread safe.
+This assumes use of the pthread_ interface.  Old style Solaris threads
+are no longer supported.
 
 It is also essential that gc.h be included in files that call thr_create,
 thr_join, thr_suspend, thr_continue, or dlopen.  Gc.h macro defines
index 7f963b97a36229aaedaf869c1cf669d21cee17e4..47699e1fdbb1a27f021b07d499c27c819d047f0f 100644 (file)
@@ -7,7 +7,7 @@ broken in the meantime.  Patches are appreciated.
 For historical reasons,
 the collector test program "gctest" is linked as a GUI application,
 but does not open any windows.  Its output normally appears in the file
-"gctest.exe.log".  It may be started from the file manager.  The hour glass
+"gctest.gc.log".  It may be started from the file manager.  The hour glass
 cursor may appear as long as it's running.  If it is started from the
 command line, it will usually run in the background.  Wait a few
 minutes (a few seconds on a modern machine) before you check the output.
@@ -186,7 +186,7 @@ to the collector DLL still exists, but requires that both
 We generally recommend avoiding this if possible, since it seems to
 be less than 100% reliable.
 
-Use NT_THREADS_MAKEFILE (a.k.a gc.mak) instead of NT_MAKEFILE
+Use gc.mak (a.k.a NT_THREADS_MAKEFILE) instead of NT_MAKEFILE
 to build a version that supports both kinds of thread tracking.
 To build the garbage collector
 test with VC++ from the command line, use
@@ -201,10 +201,9 @@ enabled before any additional threads are created.
 
 Since 6.3alpha2, threads are also better supported in static library builds
 with Microsoft tools (use NT_STATIC_THREADS_MAKEFILE) and with the GNU
-tools.  In all cases,the collector must be built with GC_WIN32_THREADS
-defined, even if the Cygwin pthreads interface is used.
+tools.  The collector must be built with GC_THREADS defined.
 (NT_STATIC_THREADS_MAKEFILE does this implicitly.  Under Cygwin,
-./configure --enable-threads=posix defines GC_WIN32_THREADS.)
+./configure --enable-threads=posix should be used.)
 
 For the normal, non-dll-based thread tracking to work properly,
 threads should be created with GC_CreateThread or GC_beginthreadex,
@@ -229,4 +228,3 @@ explicitly set GC_WIN32_PTHREADS.  Use -DPTW32_STATIC_LIB for the static
 threads library.  Note that the DEBUG_WIN32_PTHREADS support in
 win32_threads.c is currently broken and looking for someone to debug it.
 (This information and the port came from Romano Paolo Tenca).
-
index 2225fd4ca12810363676e03787432857715bd405..416f0348cf25a3979a9a5ff265700a701c48488b 100644 (file)
@@ -1,14 +1,14 @@
 64-bit Windows on AMD64/Intel EM64T is somewhat supported in the 7.0
-and later release.  A collector can be built with Microsoft Visual C++ 2005.
-The resulting test programs have been known to work at least once.
+and later release.  A collector can be built with Microsoft Visual C++ 2005
+or with mingw-w64 gcc.
 More testing would clearly be helpful.
 
 NT_X64_STATIC_THREADS_MAKEFILE has been used in
 this environment.  Copy this file to MAKEFILE, and then type "nmake"
 in a Visual C++ command line window to build the static library
-and the usual test programs.  To verify that the colllector is
+and the usual test programs.  To verify that the collector is
 at least somewhat functional, run gctest.exe.  This should create
-gctest.exe.log after a few seconds.
+gctest.gc.log after a few seconds.
 
 This process is completely analogous to NT_STATIC_THREADS_MAKEFILE
 for the 32-bit version.
@@ -20,3 +20,7 @@ in some cases.  The C tests seemed OK.
 
 Note that currently a few warnings are still generated by default,
 and a number of others have been explicitly turned off in the makefile.
+
+VC++ note: to suppress warnings use -D_CRT_SECURE_NO_DEPRECATE.
+
+gcc note: -fno-strict-aliasing should be used if optimizing.
index 6ca3eee6735ef9c786475613f3f58167e3f34764..5448cfc90b368e32fcdab4d2f675ce629af6ef74 100644 (file)
@@ -210,7 +210,7 @@ On pthread platforms, you will of course also have to link with
 and compile with any thread-safety options required by your compiler.
 On some platforms, you may also need to link with <TT>-ldl</tt>
 or <TT>-lrt</tt>.
-Looking at threadlibs.c in the GC build directory
+Looking at threadlibs.c in the GC "extra" directory
 should give you the appropriate
 list if a plain <TT>-lpthread</tt> doesn't work.
 </font>
index b46ba0401e644c82a4dc55e2b169972ce9b4facc..ee50807bdc5860f2dc5519c51f61d24be4cd5f85 100644 (file)
@@ -15,6 +15,8 @@
  * Heavily modified by Hans Boehm and others
  */
 
+#include "private/gc_priv.h"
+
 /*
  * This is incredibly OS specific code for tracking down data sections in
  * dynamic libraries.  There appears to be no way of doing this quickly
  * None of this is safe with dlclose and incremental collection.
  * But then not much of anything is safe in the presence of dlclose.
  */
-#if (defined(__linux__) || defined(__GLIBC__) || defined(__GNU__)) \
-     && !defined(_GNU_SOURCE)
-    /* Can't test LINUX, since this must be defined before other includes */
-#   define _GNU_SOURCE
-#endif
+
 #if !defined(MACOS) && !defined(_WIN32_WCE)
-#  include <sys/types.h>
+# include <sys/types.h>
 #endif
-#include "private/gc_priv.h"
 
 /* BTL: avoid circular redefinition of dlopen if GC_SOLARIS_THREADS defined */
+# undef GC_MUST_RESTORE_REDEFINED_DLOPEN
 # if (defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS)) \
       && defined(dlopen) && !defined(GC_USE_LD_WRAP)
     /* To support threads in Solaris, gc.h interposes on dlopen by       */
     /* real system dlopen() in their implementation. We first remove     */
     /* gc.h's dlopen definition and restore it later, after GC_dlopen(). */
 #   undef dlopen
-#   define GC_must_restore_redefined_dlopen
-# else
-#   undef GC_must_restore_redefined_dlopen
+#   define GC_MUST_RESTORE_REDEFINED_DLOPEN
 # endif
 
+/* A user-supplied routine (custom filter) that might be called to      */
+/* determine whether a DSO really needs to be scanned by the GC.        */
+/* 0 means no filter installed.  May be unused on some platforms.       */
+/* FIXME: Add filter support for more platforms.                        */
+STATIC GC_has_static_roots_func GC_has_static_roots = 0;
+
 #if (defined(DYNAMIC_LOADING) || defined(MSWIN32) || defined(MSWINCE)) \
     && !defined(PCR)
+
 #if !defined(SOLARISDL) && !defined(IRIX5) && \
     !defined(MSWIN32) && !defined(MSWINCE) && \
     !(defined(ALPHA) && defined(OSF1)) && \
     !defined(HPUX) && !(defined(LINUX) && defined(__ELF__)) && \
     !defined(AIX) && !defined(SCO_ELF) && !defined(DGUX) && \
     !(defined(FREEBSD) && defined(__ELF__)) && \
+    !(defined(OPENBSD) && (defined(__ELF__) || defined(M68K))) && \
     !(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \
     !defined(DARWIN) && !defined(CYGWIN32)
  --> We only know how to find data segments of dynamic libraries for the
 #   define ELFSIZE ARCH_ELFSIZE
 #endif
 
-#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
-    (defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
-    (defined(NETBSD) && defined(__ELF__)) || defined(HURD)
-#   include <stddef.h>
+#if defined(SCO_ELF) || defined(DGUX) || defined(HURD) \
+    || (defined(__ELF__) && (defined(LINUX) || defined(FREEBSD) \
+                             || defined(NETBSD) || defined(OPENBSD)))
+# include <stddef.h>
+# if !defined(OPENBSD)
+    /* FIXME: Why we exclude it for OpenBSD? */
 #   include <elf.h>
-#   include <link.h>
+# endif
+# include <link.h>
 #endif
 
 /* Newer versions of GNU/Linux define this macro.  We
 #      else
 #        define ElfW(type) Elf64_##type
 #      endif
-#    elif defined(NETBSD)
+#    elif defined(NETBSD) || defined(OPENBSD)
 #      if ELFSIZE == 32
 #        define ElfW(type) Elf32_##type
 #      else
     Elf32_Dyn _DYNAMIC;
 #endif
 
-static struct link_map *
+STATIC struct link_map *
 GC_FirstDLOpenedLinkMap(void)
 {
     extern ElfW(Dyn) _DYNAMIC;
@@ -123,19 +130,19 @@ GC_FirstDLOpenedLinkMap(void)
     struct r_debug *r;
     static struct link_map * cachedResult = 0;
     static ElfW(Dyn) *dynStructureAddr = 0;
-                       /* BTL: added to avoid Solaris 5.3 ld.so _DYNAMIC bug */
+                /* BTL: added to avoid Solaris 5.3 ld.so _DYNAMIC bug   */
 
 #   ifdef SUNOS53_SHARED_LIB
-       /* BTL: Avoid the Solaris 5.3 bug that _DYNAMIC isn't being set */
-       /* up properly in dynamically linked .so's. This means we have  */
-       /* to use its value in the set of original object files loaded  */
-       /* at program startup.                                          */
-       if( dynStructureAddr == 0 ) {
-         void* startupSyms = dlopen(0, RTLD_LAZY);
-         dynStructureAddr = (ElfW(Dyn)*)dlsym(startupSyms, "_DYNAMIC");
-       }
+        /* BTL: Avoid the Solaris 5.3 bug that _DYNAMIC isn't being set */
+        /* up properly in dynamically linked .so's. This means we have  */
+        /* to use its value in the set of original object files loaded  */
+        /* at program startup.                                          */
+        if( dynStructureAddr == 0 ) {
+          void* startupSyms = dlopen(0, RTLD_LAZY);
+          dynStructureAddr = (ElfW(Dyn)*)dlsym(startupSyms, "_DYNAMIC");
+        }
 #   else
-       dynStructureAddr = &_DYNAMIC;
+        dynStructureAddr = &_DYNAMIC;
 #   endif
 
     if( dynStructureAddr == 0) {
@@ -158,32 +165,32 @@ GC_FirstDLOpenedLinkMap(void)
 #endif /* SOLARISDL ... */
 
 /* BTL: added to fix circular dlopen definition if GC_SOLARIS_THREADS defined */
-# if defined(GC_must_restore_redefined_dlopen)
+# ifdef GC_MUST_RESTORE_REDEFINED_DLOPEN
 #   define dlopen GC_dlopen
 # endif
 
 # if defined(SOLARISDL)
-/* Add dynamic library data sections to the root set.          */
+/* Add dynamic library data sections to the root set.           */
 # if !defined(PCR) && !defined(GC_SOLARIS_THREADS) && defined(THREADS)
-       --> fix mutual exclusion with dlopen
+        --> fix mutual exclusion with dlopen
 # endif
 
 # ifndef USE_PROC_FOR_LIBRARIES
-void GC_register_dynamic_libraries(void)
+GC_INNER void GC_register_dynamic_libraries(void)
 {
   struct link_map *lm = GC_FirstDLOpenedLinkMap();
-  
+
 
   for (lm = GC_FirstDLOpenedLinkMap();
        lm != (struct link_map *) 0;  lm = lm->l_next)
     {
-       ElfW(Ehdr) * e;
+        ElfW(Ehdr) * e;
         ElfW(Phdr) * p;
         unsigned long offset;
         char * start;
-        register int i;
-        
-       e = (ElfW(Ehdr) *) lm->l_addr;
+        int i;
+
+        e = (ElfW(Ehdr) *) lm->l_addr;
         p = ((ElfW(Phdr) *)(((char *)(e)) + e->e_phoff));
         offset = ((unsigned long)(lm->l_addr));
         for( i = 0; i < (int)(e->e_phnum); ((i++),(p++)) ) {
@@ -202,17 +209,16 @@ void GC_register_dynamic_libraries(void)
             default:
               break;
           }
-       }
+        }
     }
 }
 
 # endif /* !USE_PROC ... */
 # endif /* SOLARISDL */
 
-#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
-    (defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
-    (defined(NETBSD) && defined(__ELF__)) || defined(HURD)
-
+#if defined(SCO_ELF) || defined(DGUX) || defined(HURD) \
+    || (defined(__ELF__) && (defined(LINUX) || defined(FREEBSD) \
+                             || defined(NETBSD) || defined(OPENBSD)))
 
 #ifdef USE_PROC_FOR_LIBRARIES
 
@@ -224,22 +230,17 @@ void GC_register_dynamic_libraries(void)
 
 #define MAPS_BUF_SIZE (32*1024)
 
-extern ssize_t GC_repeat_read(int fd, char *buf, size_t count);
-       /* Repeatedly read until buffer is filled, or EOF is encountered */
-       /* Defined in os_dep.c.                                          */
+GC_INNER char *GC_parse_map_entry(char *buf_ptr, ptr_t *start, ptr_t *end,
+                                  char **prot, unsigned int *maj_dev,
+                                  char **mapping_name);
+GC_INNER char *GC_get_maps(void); /* from os_dep.c */
 
-char *GC_parse_map_entry(char *buf_ptr, ptr_t *start, ptr_t *end,
-                         char **prot, unsigned int *maj_dev,
-                        char **mapping_name);
-char *GC_get_maps(void);
-       /* From os_dep.c        */
-
-/* Sort an array of HeapSects by start address.                                */
-/* Unfortunately at least some versions of                             */
+/* Sort an array of HeapSects by start address.                         */
+/* Unfortunately at least some versions of                              */
 /* Linux qsort end up calling malloc by way of sysconf, and hence can't */
-/* be used in the collector.  Hence we roll our own.  Should be                */
-/* reasonably fast if the array is already mostly sorted, as we expect */
-/* it to be.                                                           */
+/* be used in the collector.  Hence we roll our own.  Should be         */
+/* reasonably fast if the array is already mostly sorted, as we expect  */
+/* it to be.                                                            */
 static void sort_heap_sects(struct HeapSect *base, size_t number_of_elements)
 {
     signed_word n = (signed_word)number_of_elements;
@@ -248,22 +249,26 @@ static void sort_heap_sects(struct HeapSect *base, size_t number_of_elements)
 
     while (nsorted < n) {
       while (nsorted < n &&
-            base[nsorted-1].hs_start < base[nsorted].hs_start)
+             base[nsorted-1].hs_start < base[nsorted].hs_start)
           ++nsorted;
       if (nsorted == n) break;
       GC_ASSERT(base[nsorted-1].hs_start > base[nsorted].hs_start);
       i = nsorted - 1;
       while (i >= 0 && base[i].hs_start > base[i+1].hs_start) {
         struct HeapSect tmp = base[i];
-       base[i] = base[i+1];
-       base[i+1] = tmp;
-       --i;
+        base[i] = base[i+1];
+        base[i+1] = tmp;
+        --i;
       }
       GC_ASSERT(base[nsorted-1].hs_start < base[nsorted].hs_start);
       ++nsorted;
     }
 }
 
+#ifdef THREADS
+  GC_INNER GC_bool GC_segment_is_thread_stack(ptr_t lo, ptr_t hi);
+#endif
+
 STATIC word GC_register_map_entries(char *maps)
 {
     char *prot;
@@ -279,104 +284,105 @@ STATIC word GC_register_map_entries(char *maps)
     sort_heap_sects(GC_our_memory, GC_n_memory);
     least_ha = GC_our_memory[0].hs_start;
     greatest_ha = GC_our_memory[GC_n_memory-1].hs_start
-                 + GC_our_memory[GC_n_memory-1].hs_bytes;
+                  + GC_our_memory[GC_n_memory-1].hs_bytes;
 
     for (;;) {
-        buf_ptr = GC_parse_map_entry(buf_ptr, &start, &end, &prot, &maj_dev, 0);
-       if (buf_ptr == NULL) return 1;
-       if (prot[1] == 'w') {
-           /* This is a writable mapping.  Add it to           */
-           /* the root set unless it is already otherwise      */
-           /* accounted for.                                   */
-           if (start <= GC_stackbottom && end >= GC_stackbottom) {
-               /* Stack mapping; discard       */
-               continue;
-           }
-#          ifdef THREADS
-             /* This may fail, since a thread may already be           */
-             /* unregistered, but its thread stack may still be there. */
-             /* That can fail because the stack may disappear while    */
-             /* we're marking.  Thus the marker is, and has to be      */
-             /* prepared to recover from segmentation faults.          */
-
-             if (GC_segment_is_thread_stack(start, end)) continue;
-
-             /* FIXME: NPTL squirrels                                  */
-             /* away pointers in pieces of the stack segment that we   */
-             /* don't scan.  We work around this                       */
-             /* by treating anything allocated by libpthread as        */
-             /* uncollectable, as we do in some other cases.           */
-             /* A specifically identified problem is that              */ 
-             /* thread stacks contain pointers to dynamic thread       */
-             /* vectors, which may be reused due to thread caching.    */
-             /* They may not be marked if the thread is still live.    */
-             /* This specific instance should be addressed by          */
-             /* INCLUDE_LINUX_THREAD_DESCR, but that doesn't quite     */
-             /* seem to suffice.                                       */
-             /* We currently trace entire thread stacks, if they are   */
-             /* are currently cached but unused.  This is              */
-             /* very suboptimal for performance reasons.               */
-#          endif
-           /* We no longer exclude the main data segment.              */
-           if (end <= least_ha || start >= greatest_ha) {
-             /* The easy case; just trace entire segment */
-             GC_add_roots_inner((char *)start, (char *)end, TRUE);
-             continue;
-           }
-           /* Add sections that dont belong to us. */
-             i = 0;
-             while (GC_our_memory[i].hs_start + GC_our_memory[i].hs_bytes
-                    < start)
-                 ++i;
-             GC_ASSERT(i < GC_n_memory);
-             if (GC_our_memory[i].hs_start <= start) {
-                 start = GC_our_memory[i].hs_start
-                         + GC_our_memory[i].hs_bytes;
-                 ++i;
-             }
-             while (i < GC_n_memory && GC_our_memory[i].hs_start < end
-                    && start < end) {
-                 if ((char *)start < GC_our_memory[i].hs_start)
-                   GC_add_roots_inner((char *)start,
-                                      GC_our_memory[i].hs_start, TRUE);
-                 start = GC_our_memory[i].hs_start
-                         + GC_our_memory[i].hs_bytes;
-                 ++i;
-             }
-             if (start < end)
-                 GC_add_roots_inner((char *)start, (char *)end, TRUE);
-       }
+        buf_ptr = GC_parse_map_entry(buf_ptr, &start, &end, &prot,
+                                     &maj_dev, 0);
+        if (buf_ptr == NULL) return 1;
+        if (prot[1] == 'w') {
+            /* This is a writable mapping.  Add it to           */
+            /* the root set unless it is already otherwise      */
+            /* accounted for.                                   */
+            if (start <= GC_stackbottom && end >= GC_stackbottom) {
+                /* Stack mapping; discard       */
+                continue;
+            }
+#           ifdef THREADS
+              /* This may fail, since a thread may already be           */
+              /* unregistered, but its thread stack may still be there. */
+              /* That can fail because the stack may disappear while    */
+              /* we're marking.  Thus the marker is, and has to be      */
+              /* prepared to recover from segmentation faults.          */
+
+              if (GC_segment_is_thread_stack(start, end)) continue;
+
+              /* FIXME: NPTL squirrels                                  */
+              /* away pointers in pieces of the stack segment that we   */
+              /* don't scan.  We work around this                       */
+              /* by treating anything allocated by libpthread as        */
+              /* uncollectable, as we do in some other cases.           */
+              /* A specifically identified problem is that              */
+              /* thread stacks contain pointers to dynamic thread       */
+              /* vectors, which may be reused due to thread caching.    */
+              /* They may not be marked if the thread is still live.    */
+              /* This specific instance should be addressed by          */
+              /* INCLUDE_LINUX_THREAD_DESCR, but that doesn't quite     */
+              /* seem to suffice.                                       */
+              /* We currently trace entire thread stacks, if they are   */
+              /* are currently cached but unused.  This is              */
+              /* very suboptimal for performance reasons.               */
+#           endif
+            /* We no longer exclude the main data segment.              */
+            if (end <= least_ha || start >= greatest_ha) {
+              /* The easy case; just trace entire segment */
+              GC_add_roots_inner((char *)start, (char *)end, TRUE);
+              continue;
+            }
+            /* Add sections that don't belong to us. */
+              i = 0;
+              while (GC_our_memory[i].hs_start + GC_our_memory[i].hs_bytes
+                     < start)
+                  ++i;
+              GC_ASSERT(i < GC_n_memory);
+              if (GC_our_memory[i].hs_start <= start) {
+                  start = GC_our_memory[i].hs_start
+                          + GC_our_memory[i].hs_bytes;
+                  ++i;
+              }
+              while (i < GC_n_memory && GC_our_memory[i].hs_start < end
+                     && start < end) {
+                  if ((char *)start < GC_our_memory[i].hs_start)
+                    GC_add_roots_inner((char *)start,
+                                       GC_our_memory[i].hs_start, TRUE);
+                  start = GC_our_memory[i].hs_start
+                          + GC_our_memory[i].hs_bytes;
+                  ++i;
+              }
+              if (start < end)
+                  GC_add_roots_inner((char *)start, (char *)end, TRUE);
+        }
     }
     return 1;
 }
 
-void GC_register_dynamic_libraries(void)
+GC_INNER void GC_register_dynamic_libraries(void)
 {
     if (!GC_register_map_entries(GC_get_maps()))
         ABORT("Failed to read /proc for library registration.");
 }
 
 /* We now take care of the main data segment ourselves: */
-GC_bool GC_register_main_static_data(void)
+GC_INNER GC_bool GC_register_main_static_data(void)
 {
     return FALSE;
 }
-  
+
 # define HAVE_REGISTER_MAIN_STATIC_DATA
 
 #endif /* USE_PROC_FOR_LIBRARIES */
 
 #if !defined(USE_PROC_FOR_LIBRARIES)
-/* The following is the preferred way to walk dynamic libraries        */
-/* For glibc 2.2.4+.  Unfortunately, it doesn't work for older */
-/* versions.  Thanks to Jakub Jelinek for most of the code.    */
+/* The following is the preferred way to walk dynamic libraries */
+/* For glibc 2.2.4+.  Unfortunately, it doesn't work for older  */
+/* versions.  Thanks to Jakub Jelinek for most of the code.     */
 
 # if (defined(LINUX) || defined (__GLIBC__)) /* Are others OK here, too? */ \
      && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
-         || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) 
-/* We have the header files for a glibc that includes dl_iterate_phdr. */
+         || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
+/* We have the header files for a glibc that includes dl_iterate_phdr.  */
 /* It may still not be available in the library on the target system.   */
-/* Thus we also treat it as a weak symbol.                             */
+/* Thus we also treat it as a weak symbol.                              */
 #define HAVE_DL_ITERATE_PHDR
 #pragma weak dl_iterate_phdr
 #endif
@@ -391,12 +397,12 @@ GC_bool GC_register_main_static_data(void)
 
 # ifdef PT_GNU_RELRO
 
-/* Instead of registering PT_LOAD sections directly, we keep them      */
-/* in a temporary list, and filter them by excluding PT_GNU_RELRO      */
-/* segments.  Processing PT_GNU_RELRO sections with                    */
-/* GC_exclude_static_roots instead would be superficially cleaner.  But        */
-/* it runs into trouble if a client registers an overlapping segment,  */
-/* which unfortunately seems quite possible.                           */
+/* Instead of registering PT_LOAD sections directly, we keep them       */
+/* in a temporary list, and filter them by excluding PT_GNU_RELRO       */
+/* segments.  Processing PT_GNU_RELRO sections with                     */
+/* GC_exclude_static_roots instead would be superficially cleaner.  But */
+/* it runs into trouble if a client registers an overlapping segment,   */
+/* which unfortunately seems quite possible.                            */
 
 #define MAX_LOAD_SEGS MAX_ROOT_SETS
 
@@ -404,7 +410,7 @@ static struct load_segment {
   ptr_t start;
   ptr_t end;
   /* Room for a second segment if we remove a RELRO segment */
-  /* from the middle.                                      */
+  /* from the middle.                                       */
   ptr_t start2;
   ptr_t end2;
 } load_segs[MAX_LOAD_SEGS];
@@ -413,14 +419,8 @@ static int n_load_segs;
 
 # endif /* PT_GNU_RELRO */
 
-/* A user-supplied routine that is called to determine if a DSO must
-   be scanned by the gc.  */
-static int (GC_CALLBACK * GC_has_static_roots)(const char *, void *, size_t);
-
-static int GC_register_dynlib_callback(info, size, ptr)
-     struct dl_phdr_info * info;
-     size_t size;
-     void * ptr;
+STATIC int GC_register_dynlib_callback(struct dl_phdr_info * info,
+                                       size_t size, void * ptr)
 {
   const ElfW(Phdr) * p;
   ptr_t start, end;
@@ -436,69 +436,69 @@ static int GC_register_dynlib_callback(info, size, ptr)
     switch( p->p_type ) {
 #     ifdef PT_GNU_RELRO
         case PT_GNU_RELRO:
-       /* This entry is known to be constant and will eventually be remapped
-          read-only.  However, the address range covered by this entry is
-          typically a subset of a previously encountered `LOAD' segment, so
-          we need to exclude it.  */
-       {
-           int j;
-
-           start = ((ptr_t)(p->p_vaddr)) + info->dlpi_addr;
-           end = start + p->p_memsz;
-           for (j = n_load_segs; --j >= 0; ) {
-             if (start >= load_segs[j].start && start < load_segs[j].end) {
-               if (load_segs[j].start2 != 0) {
-                 WARN("More than one GNU_RELRO segment per load seg\n",0);
-               } else {
-                 GC_ASSERT(end <= load_segs[j].end);
-                 /* Remove from the existing load segment */
-                 load_segs[j].end2 = load_segs[j].end;
-                 load_segs[j].end = start;
-                 load_segs[j].start2 = end;
-               }
-               break;
-             }
-             if (j == 0) WARN("Failed to find PT_GNU_RELRO segment"
-                              " inside PT_LOAD region", 0);
-           }
-       }
-
-       break;
+        /* This entry is known to be constant and will eventually be remapped
+           read-only.  However, the address range covered by this entry is
+           typically a subset of a previously encountered `LOAD' segment, so
+           we need to exclude it.  */
+        {
+            int j;
+
+            start = ((ptr_t)(p->p_vaddr)) + info->dlpi_addr;
+            end = start + p->p_memsz;
+            for (j = n_load_segs; --j >= 0; ) {
+              if (start >= load_segs[j].start && start < load_segs[j].end) {
+                if (load_segs[j].start2 != 0) {
+                  WARN("More than one GNU_RELRO segment per load seg\n",0);
+                } else {
+                  GC_ASSERT(end <= load_segs[j].end);
+                  /* Remove from the existing load segment */
+                  load_segs[j].end2 = load_segs[j].end;
+                  load_segs[j].end = start;
+                  load_segs[j].start2 = end;
+                }
+                break;
+              }
+              if (j == 0) WARN("Failed to find PT_GNU_RELRO segment"
+                               " inside PT_LOAD region", 0);
+            }
+        }
+
+        break;
 #     endif
 
       case PT_LOAD:
-       {
-         if( !(p->p_flags & PF_W) ) break;
-         start = ((char *)(p->p_vaddr)) + info->dlpi_addr;
-         end = start + p->p_memsz;
-
-         if (GC_has_static_roots
-             && !GC_has_static_roots(info->dlpi_name, start, p->p_memsz))
-           break;
+        {
+          GC_has_static_roots_func callback = GC_has_static_roots;
+          if( !(p->p_flags & PF_W) ) break;
+          start = ((char *)(p->p_vaddr)) + info->dlpi_addr;
+          end = start + p->p_memsz;
+
+          if (callback != 0 && !callback(info->dlpi_name, start, p->p_memsz))
+            break;
 #         ifdef PT_GNU_RELRO
-           if (n_load_segs >= MAX_LOAD_SEGS) ABORT("Too many PT_LOAD segs");
-           load_segs[n_load_segs].start = start;
-           load_segs[n_load_segs].end = end;
-           load_segs[n_load_segs].start2 = 0;
-           load_segs[n_load_segs].end2 = 0;
-           ++n_load_segs;
-#        else
-           GC_add_roots_inner(start, end, TRUE);
+            if (n_load_segs >= MAX_LOAD_SEGS) ABORT("Too many PT_LOAD segs");
+            load_segs[n_load_segs].start = start;
+            load_segs[n_load_segs].end = end;
+            load_segs[n_load_segs].start2 = 0;
+            load_segs[n_load_segs].end2 = 0;
+            ++n_load_segs;
+#         else
+            GC_add_roots_inner(start, end, TRUE);
 #         endif /* PT_GNU_RELRO */
-       }
+        }
       break;
       default:
-       break;
+        break;
     }
   }
 
-  * (int *)ptr = 1;    /* Signal that we were called */
+  * (int *)ptr = 1;     /* Signal that we were called */
   return 0;
-}     
+}
 
 /* Return TRUE if we succeed, FALSE if dl_iterate_phdr wasn't there. */
 
-GC_bool GC_register_dynamic_libraries_dl_iterate_phdr(void)
+STATIC GC_bool GC_register_dynamic_libraries_dl_iterate_phdr(void)
 {
   if (dl_iterate_phdr) {
     int did_something = 0;
@@ -506,30 +506,30 @@ GC_bool GC_register_dynamic_libraries_dl_iterate_phdr(void)
 #   ifdef PT_GNU_RELRO
         static GC_bool excluded_segs = FALSE;
         n_load_segs = 0;
-       if (!excluded_segs) {
-          GC_exclude_static_roots((ptr_t)load_segs,
-                                 (ptr_t)load_segs + sizeof(load_segs));
-         excluded_segs = TRUE;
+        if (!excluded_segs) {
+          GC_exclude_static_roots_inner((ptr_t)load_segs,
+                                        (ptr_t)load_segs + sizeof(load_segs));
+          excluded_segs = TRUE;
         }
 #   endif
     dl_iterate_phdr(GC_register_dynlib_callback, &did_something);
     if (did_something) {
 #     ifdef PT_GNU_RELRO
-       size_t i;
-
-       for (i = 0; i < n_load_segs; ++i) {
-         if (load_segs[i].end > load_segs[i].start) {
-           GC_add_roots_inner(load_segs[i].start, load_segs[i].end, TRUE);
-         }
-         if (load_segs[i].end2 > load_segs[i].start2) {
-           GC_add_roots_inner(load_segs[i].start2, load_segs[i].end2, TRUE);
-         }
+        size_t i;
+
+        for (i = 0; i < n_load_segs; ++i) {
+          if (load_segs[i].end > load_segs[i].start) {
+            GC_add_roots_inner(load_segs[i].start, load_segs[i].end, TRUE);
+          }
+          if (load_segs[i].end2 > load_segs[i].start2) {
+            GC_add_roots_inner(load_segs[i].start2, load_segs[i].end2, TRUE);
+          }
         }
 #     endif
     } else {
-       /* dl_iterate_phdr may forget the static data segment in        */
-       /* statically linked executables.                               */
-       GC_add_roots_inner(DATASTART, (char *)(DATAEND), TRUE);
+        /* dl_iterate_phdr may forget the static data segment in        */
+        /* statically linked executables.                               */
+        GC_add_roots_inner(DATASTART, (char *)(DATAEND), TRUE);
 #       if defined(DATASTART2)
           GC_add_roots_inner(DATASTART2, (char *)(DATAEND2), TRUE);
 #       endif
@@ -542,7 +542,7 @@ GC_bool GC_register_dynamic_libraries_dl_iterate_phdr(void)
 }
 
 /* Do we need to separately register the main static data segment? */
-GC_bool GC_register_main_static_data(void)
+GC_INNER GC_bool GC_register_main_static_data(void)
 {
   return (dl_iterate_phdr == 0);
 }
@@ -552,14 +552,14 @@ GC_bool GC_register_main_static_data(void)
 # else /* !LINUX || version(glibc) < 2.2.4 */
 
 /* Dynamic loading code for Linux running ELF. Somewhat tested on
- * Linux/x86, untested but hopefully should work on Linux/Alpha. 
+ * Linux/x86, untested but hopefully should work on Linux/Alpha.
  * This code was derived from the Solaris/ELF support. Thanks to
  * whatever kind soul wrote that.  - Patrick Bridges */
 
 /* This doesn't necessarily work in all cases, e.g. with preloaded
- * dynamic libraries.                                          */
+ * dynamic libraries.                                           */
 
-#if defined(NETBSD)
+#if defined(NETBSD) || defined(OPENBSD)
 #  include <sys/exec_elf.h>
 /* for compatibility with 1.4.x */
 #  ifndef DT_DEBUG
@@ -583,7 +583,7 @@ GC_bool GC_register_main_static_data(void)
 #endif
 extern ElfW(Dyn) _DYNAMIC[];
 
-static struct link_map *
+STATIC struct link_map *
 GC_FirstDLOpenedLinkMap(void)
 {
     ElfW(Dyn) *dp;
@@ -606,28 +606,26 @@ GC_FirstDLOpenedLinkMap(void)
     return cachedResult;
 }
 
-
-void GC_register_dynamic_libraries(void)
+GC_INNER void GC_register_dynamic_libraries(void)
 {
   struct link_map *lm;
-  
 
 # ifdef HAVE_DL_ITERATE_PHDR
     if (GC_register_dynamic_libraries_dl_iterate_phdr()) {
-       return;
+        return;
     }
 # endif
   lm = GC_FirstDLOpenedLinkMap();
   for (lm = GC_FirstDLOpenedLinkMap();
        lm != (struct link_map *) 0;  lm = lm->l_next)
     {
-       ElfW(Ehdr) * e;
+        ElfW(Ehdr) * e;
         ElfW(Phdr) * p;
         unsigned long offset;
         char * start;
-        register int i;
-        
-       e = (ElfW(Ehdr) *) lm->l_addr;
+        int i;
+
+        e = (ElfW(Ehdr) *) lm->l_addr;
         p = ((ElfW(Phdr) *)(((char *)(e)) + e->e_phoff));
         offset = ((unsigned long)(lm->l_addr));
         for( i = 0; i < (int)(e->e_phnum); ((i++),(p++)) ) {
@@ -642,7 +640,7 @@ void GC_register_dynamic_libraries(void)
             default:
               break;
           }
-       }
+        }
     }
 }
 
@@ -662,21 +660,20 @@ void GC_register_dynamic_libraries(void)
 # define IRIX6
 #endif
 
-extern void * GC_roots_present(ptr_t);
-       /* The type is a lie, since the real type doesn't make sense here, */
-       /* and we only test for NULL.                                      */
-
+GC_INNER void * GC_roots_present(ptr_t);
+        /* The type is a lie, since the real type doesn't make sense here, */
+        /* and we only test for NULL.                                      */
 
-/* We use /proc to track down all parts of the address space that are  */
-/* mapped by the process, and throw out regions we know we shouldn't   */
-/* worry about.  This may also work under other SVR4 variants.         */
-void GC_register_dynamic_libraries(void)
+/* We use /proc to track down all parts of the address space that are   */
+/* mapped by the process, and throw out regions we know we shouldn't    */
+/* worry about.  This may also work under other SVR4 variants.          */
+GC_INNER void GC_register_dynamic_libraries(void)
 {
     static int fd = -1;
     char buf[30];
     static prmap_t * addr_map = 0;
-    static int current_sz = 0; /* Number of records currently in addr_map */
-    static int needed_sz;      /* Required size of addr_map            */
+    static int current_sz = 0;  /* Number of records currently in addr_map */
+    static int needed_sz;       /* Required size of addr_map            */
     int i;
     long flags;
     ptr_t start;
@@ -690,178 +687,184 @@ void GC_register_dynamic_libraries(void)
 
     if (fd < 0) {
       sprintf(buf, "/proc/%ld", (long)getpid());
-       /* The above generates a lint complaint, since pid_t varies.    */
-       /* It's unclear how to improve this.                            */
+        /* The above generates a lint complaint, since pid_t varies.    */
+        /* It's unclear how to improve this.                            */
       fd = open(buf, O_RDONLY);
       if (fd < 0) {
-       ABORT("/proc open failed");
+        ABORT("/proc open failed");
       }
     }
     if (ioctl(fd, PIOCNMAP, &needed_sz) < 0) {
-       GC_err_printf("fd = %d, errno = %d\n", fd, errno);
-       ABORT("/proc PIOCNMAP ioctl failed");
+        GC_err_printf("fd = %d, errno = %d\n", fd, errno);
+        ABORT("/proc PIOCNMAP ioctl failed");
     }
     if (needed_sz >= current_sz) {
         current_sz = needed_sz * 2 + 1;
-                       /* Expansion, plus room for 0 record */
-        addr_map = (prmap_t *)GC_scratch_alloc((word)
-                                               (current_sz * sizeof(prmap_t)));
+                        /* Expansion, plus room for 0 record */
+        addr_map = (prmap_t *)GC_scratch_alloc(
+                                (word)current_sz * sizeof(prmap_t));
     }
     if (ioctl(fd, PIOCMAP, addr_map) < 0) {
         GC_err_printf("fd = %d, errno = %d, needed_sz = %d, addr_map = %p\n",
                         fd, errno, needed_sz, addr_map);
-       ABORT("/proc PIOCMAP ioctl failed");
+        ABORT("/proc PIOCMAP ioctl failed");
     };
     if (GC_n_heap_sects > 0) {
-       heap_end = GC_heap_sects[GC_n_heap_sects-1].hs_start
-                       + GC_heap_sects[GC_n_heap_sects-1].hs_bytes;
-       if (heap_end < GC_scratch_last_end_ptr) heap_end = GC_scratch_last_end_ptr; 
+        heap_end = GC_heap_sects[GC_n_heap_sects-1].hs_start
+                        + GC_heap_sects[GC_n_heap_sects-1].hs_bytes;
+        if (heap_end < GC_scratch_last_end_ptr) heap_end = GC_scratch_last_end_ptr;
     }
     for (i = 0; i < needed_sz; i++) {
         flags = addr_map[i].pr_mflags;
-       if ((flags & (MA_BREAK | MA_STACK | MA_PHYS
-                     | MA_FETCHOP | MA_NOTCACHED)) != 0) goto irrelevant;
+        if ((flags & (MA_BREAK | MA_STACK | MA_PHYS
+                      | MA_FETCHOP | MA_NOTCACHED)) != 0) goto irrelevant;
         if ((flags & (MA_READ | MA_WRITE)) != (MA_READ | MA_WRITE))
             goto irrelevant;
-          /* The latter test is empirically useless in very old Irix   */
-         /* versions.  Other than the                                  */
-          /* main data and stack segments, everything appears to be    */
-          /* mapped readable, writable, executable, and shared(!!).    */
-          /* This makes no sense to me.        - HB                            */
+          /* The latter test is empirically useless in very old Irix    */
+          /* versions.  Other than the                                  */
+          /* main data and stack segments, everything appears to be     */
+          /* mapped readable, writable, executable, and shared(!!).     */
+          /* This makes no sense to me. - HB                            */
         start = (ptr_t)(addr_map[i].pr_vaddr);
         if (GC_roots_present(start)) goto irrelevant;
         if (start < heap_end && start >= heap_start)
-               goto irrelevant;
-#      ifdef MMAP_STACKS
-         if (GC_is_thread_stack(start)) goto irrelevant;
-#      endif /* MMAP_STACKS */
+                goto irrelevant;
+#       ifdef MMAP_STACKS
+          if (GC_is_thread_stack(start)) goto irrelevant;
+#       endif /* MMAP_STACKS */
 
         limit = start + addr_map[i].pr_size;
-       /* The following seemed to be necessary for very old versions   */
-       /* of Irix, but it has been reported to discard relevant        */
-       /* segments under Irix 6.5.                                     */
-#      ifndef IRIX6
-         if (addr_map[i].pr_off == 0 && strncmp(start, ELFMAG, 4) == 0) {
-           /* Discard text segments, i.e. 0-offset mappings against    */
-           /* executable files which appear to have ELF headers.       */
-           caddr_t arg;
-           int obj;
-#          define MAP_IRR_SZ 10
-           static ptr_t map_irr[MAP_IRR_SZ];
-                                       /* Known irrelevant map entries */
-           static int n_irr = 0;
-           struct stat buf;
-           register int i;
-           
-           for (i = 0; i < n_irr; i++) {
-               if (map_irr[i] == start) goto irrelevant;
-           }
-           arg = (caddr_t)start;
-           obj = ioctl(fd, PIOCOPENM, &arg);
-           if (obj >= 0) {
-               fstat(obj, &buf);
-               close(obj);
-               if ((buf.st_mode & 0111) != 0) {
-                   if (n_irr < MAP_IRR_SZ) {
-                       map_irr[n_irr++] = start;
-                   }
-                   goto irrelevant;
-               }
-           }
-         }
-#      endif /* !IRIX6 */
+        /* The following seemed to be necessary for very old versions   */
+        /* of Irix, but it has been reported to discard relevant        */
+        /* segments under Irix 6.5.                                     */
+#       ifndef IRIX6
+          if (addr_map[i].pr_off == 0 && strncmp(start, ELFMAG, 4) == 0) {
+            /* Discard text segments, i.e. 0-offset mappings against    */
+            /* executable files which appear to have ELF headers.       */
+            caddr_t arg;
+            int obj;
+#           define MAP_IRR_SZ 10
+            static ptr_t map_irr[MAP_IRR_SZ];
+                                        /* Known irrelevant map entries */
+            static int n_irr = 0;
+            struct stat buf;
+            register int j;
+
+            for (j = 0; j < n_irr; j++) {
+                if (map_irr[j] == start) goto irrelevant;
+            }
+            arg = (caddr_t)start;
+            obj = ioctl(fd, PIOCOPENM, &arg);
+            if (obj >= 0) {
+                fstat(obj, &buf);
+                close(obj);
+                if ((buf.st_mode & 0111) != 0) {
+                    if (n_irr < MAP_IRR_SZ) {
+                        map_irr[n_irr++] = start;
+                    }
+                    goto irrelevant;
+                }
+            }
+          }
+#       endif /* !IRIX6 */
         GC_add_roots_inner(start, limit, TRUE);
       irrelevant: ;
     }
-    /* Dont keep cached descriptor, for now.  Some kernels don't like us */
-    /* to keep a /proc file descriptor around during kill -9.           */
-       if (close(fd) < 0) ABORT("Couldnt close /proc file");
-       fd = -1;
+    /* Don't keep cached descriptor, for now.  Some kernels don't like us */
+    /* to keep a /proc file descriptor around during kill -9.             */
+        if (close(fd) < 0) ABORT("Couldn't close /proc file");
+        fd = -1;
 }
 
 # endif /* USE_PROC || IRIX5 */
 
 # if defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32)
 
-# define WIN32_LEAN_AND_MEAN
+# ifndef WIN32_LEAN_AND_MEAN
+#   define WIN32_LEAN_AND_MEAN 1
+# endif
 # define NOSERVICE
 # include <windows.h>
 # include <stdlib.h>
 
-  /* We traverse the entire address space and register all segments    */
-  /* that could possibly have been written to.                         */
-  
-  extern GC_bool GC_is_heap_base (ptr_t p);
+  /* We traverse the entire address space and register all segments     */
+  /* that could possibly have been written to.                          */
+
+  GC_INNER GC_bool GC_is_heap_base(ptr_t p);
 
 # ifdef GC_WIN32_THREADS
-    extern void GC_get_next_stack(char *start, char * limit, char **lo,
-                                 char **hi);
+    GC_INNER void GC_get_next_stack(char *start, char * limit, char **lo,
+                                    char **hi);
 
-    void GC_cond_add_roots(char *base, char * limit)
+    STATIC void GC_cond_add_roots(char *base, char * limit)
     {
       char * curr_base = base;
       char * next_stack_lo;
       char * next_stack_hi;
-   
+
       if (base == limit) return;
       for(;;) {
-         GC_get_next_stack(curr_base, limit, &next_stack_lo, &next_stack_hi);
-         if (next_stack_lo >= limit) break;
-         if (next_stack_lo > curr_base)
-           GC_add_roots_inner(curr_base, next_stack_lo, TRUE);
-         curr_base = next_stack_hi;
+          GC_get_next_stack(curr_base, limit, &next_stack_lo, &next_stack_hi);
+          if (next_stack_lo >= limit) break;
+          if (next_stack_lo > curr_base)
+            GC_add_roots_inner(curr_base, next_stack_lo, TRUE);
+          curr_base = next_stack_hi;
       }
       if (curr_base < limit) GC_add_roots_inner(curr_base, limit, TRUE);
     }
 # else
-    void GC_cond_add_roots(char *base, char * limit)
+    STATIC void GC_cond_add_roots(char *base, char * limit)
     {
       char dummy;
       char * stack_top
-        = (char *) ((word)(&dummy) & ~(GC_sysinfo.dwAllocationGranularity-1));
+         = (char *) ((word)(&dummy) & ~(GC_sysinfo.dwAllocationGranularity-1));
       if (base == limit) return;
       if (limit > stack_top && base < GC_stackbottom) {
-         /* Part of the stack; ignore it. */
-         return;
+          /* Part of the stack; ignore it. */
+          return;
       }
       GC_add_roots_inner(base, limit, TRUE);
     }
 # endif
 
-# ifdef MSWINCE
-  /* Do we need to separately register the main static data segment? */
-  GC_bool GC_register_main_static_data(void)
+#ifdef DYNAMIC_LOADING
+  /* GC_register_main_static_data is not needed unless DYNAMIC_LOADING. */
+  GC_INNER GC_bool GC_register_main_static_data(void)
   {
-    return FALSE;
+#   ifdef MSWINCE
+      /* Do we need to separately register the main static data segment? */
+      return FALSE;
+#   else
+      return GC_no_win32_dlls;
+#   endif
   }
-# else /* win32 */
-  extern GC_bool GC_no_win32_dlls;
+#endif /* DYNAMIC_LOADING */
 
-  GC_bool GC_register_main_static_data(void)
-  {
-    return GC_no_win32_dlls;
-  }
-# endif /* win32 */
-  
-# define HAVE_REGISTER_MAIN_STATIC_DATA
+#define HAVE_REGISTER_MAIN_STATIC_DATA
 
 # ifdef DEBUG_VIRTUALQUERY
   void GC_dump_meminfo(MEMORY_BASIC_INFORMATION *buf)
   {
-    GC_printf("BaseAddress = %lx, AllocationBase = %lx, RegionSize = %lx(%lu)\n",
-              buf -> BaseAddress, buf -> AllocationBase, buf -> RegionSize,
-              buf -> RegionSize);
-    GC_printf("\tAllocationProtect = %lx, State = %lx, Protect = %lx, "
-              "Type = %lx\n",
-              buf -> AllocationProtect, buf -> State, buf -> Protect,
-              buf -> Type);
+    GC_printf("BaseAddress = 0x%lx, AllocationBase = 0x%lx,"
+              " RegionSize = 0x%lx(%lu)\n", buf -> BaseAddress,
+              buf -> AllocationBase, buf -> RegionSize, buf -> RegionSize);
+    GC_printf("\tAllocationProtect = 0x%lx, State = 0x%lx, Protect = 0x%lx, "
+              "Type = 0x%lx\n", buf -> AllocationProtect, buf -> State,
+              buf -> Protect, buf -> Type);
   }
 # endif /* DEBUG_VIRTUALQUERY */
 
-  extern GC_bool GC_wnt;  /* Is Windows NT derivative.         */
-                         /* Defined and set in os_dep.c.       */
+# ifdef MSWINCE
+    /* FIXME: Should we really need to scan MEM_PRIVATE sections?       */
+    /* For now, we don't add MEM_PRIVATE sections to the data roots for */
+    /* WinCE because otherwise SEGV fault sometimes happens to occur in */
+    /* GC_mark_from() (and, even if we use WRAP_MARK_SOME, WinCE prints */
+    /* a "Data Abort" message to the debugging console).                */
+    /* To workaround that, use -DGC_REGISTER_MEM_PRIVATE.               */
+#   define GC_wnt TRUE
+# endif
 
-  void GC_register_dynamic_libraries(void)
+  GC_INNER void GC_register_dynamic_libraries(void)
   {
     MEMORY_BASIC_INFORMATION buf;
     size_t result;
@@ -874,46 +877,47 @@ void GC_register_dynamic_libraries(void)
       if (GC_no_win32_dlls) return;
 #   endif
     base = limit = p = GC_sysinfo.lpMinimumApplicationAddress;
-#   if defined(MSWINCE) && !defined(_WIN32_WCE_EMULATION)
-      /* Only the first 32 MB of address space belongs to the current process */
-      while (p < (LPVOID)0x02000000) {
-        result = VirtualQuery(p, &buf, sizeof(buf));
-       if (result == 0) {
-           /* Page is free; advance to the next possible allocation base */
-           new_limit = (char *)
-               (((DWORD) p + GC_sysinfo.dwAllocationGranularity)
-                & ~(GC_sysinfo.dwAllocationGranularity-1));
-       } else
-#   else
-      while (p < GC_sysinfo.lpMaximumApplicationAddress) {
+    while (p < GC_sysinfo.lpMaximumApplicationAddress) {
         result = VirtualQuery(p, &buf, sizeof(buf));
-#   endif
-       {
-           if (result != sizeof(buf)) {
-               ABORT("Weird VirtualQuery result");
-           }
-           new_limit = (char *)p + buf.RegionSize;
-           protect = buf.Protect;
-           if (buf.State == MEM_COMMIT
-               && (protect == PAGE_EXECUTE_READWRITE
-                   || protect == PAGE_READWRITE)
-               && !GC_is_heap_base(buf.AllocationBase)
-               /* There is some evidence that we cannot always
-                * ignore MEM_PRIVATE sections under Windows ME
-                * and predecessors.  Hence we now also check for
-                * that case.   */
-               && (buf.Type == MEM_IMAGE ||
-                   (!GC_wnt && buf.Type == MEM_PRIVATE))) {
-#              ifdef DEBUG_VIRTUALQUERY
-                 GC_dump_meminfo(&buf);
-#              endif
-               if ((char *)p != limit) {
-                   GC_cond_add_roots(base, limit);
-                   base = p;
-               }
-               limit = new_limit;
-           }
-       }
+#       ifdef MSWINCE
+          if (result == 0) {
+            /* Page is free; advance to the next possible allocation base */
+            new_limit = (char *)
+                (((DWORD) p + GC_sysinfo.dwAllocationGranularity)
+                 & ~(GC_sysinfo.dwAllocationGranularity-1));
+          } else
+#       endif
+        /* else */ {
+            if (result != sizeof(buf)) {
+                ABORT("Weird VirtualQuery result");
+            }
+            new_limit = (char *)p + buf.RegionSize;
+            protect = buf.Protect;
+            if (buf.State == MEM_COMMIT
+                && (protect == PAGE_EXECUTE_READWRITE
+                    || protect == PAGE_READWRITE)
+                && (buf.Type == MEM_IMAGE
+#                   ifdef GC_REGISTER_MEM_PRIVATE
+                      || (protect == PAGE_READWRITE && buf.Type == MEM_PRIVATE)
+#                   else
+                      /* There is some evidence that we cannot always   */
+                      /* ignore MEM_PRIVATE sections under Windows ME   */
+                      /* and predecessors.  Hence we now also check for */
+                      /* that case.                                     */
+                      || (!GC_wnt && buf.Type == MEM_PRIVATE)
+#                   endif
+                   )
+                && !GC_is_heap_base(buf.AllocationBase)) {
+#               ifdef DEBUG_VIRTUALQUERY
+                  GC_dump_meminfo(&buf);
+#               endif
+                if ((char *)p != limit) {
+                    GC_cond_add_roots(base, limit);
+                    base = p;
+                }
+                limit = new_limit;
+            }
+        }
         if (p > (LPVOID)new_limit /* overflow */) break;
         p = (LPVOID)new_limit;
     }
@@ -921,12 +925,12 @@ void GC_register_dynamic_libraries(void)
   }
 
 #endif /* MSWIN32 || MSWINCE || CYGWIN32 */
-  
+
 #if defined(ALPHA) && defined(OSF1)
 
 #include <loader.h>
 
-void GC_register_dynamic_libraries(void)
+GC_INNER void GC_register_dynamic_libraries(void)
 {
   int status;
   ldr_process_t mypid;
@@ -935,17 +939,17 @@ void GC_register_dynamic_libraries(void)
     ldr_module_t moduleid = LDR_NULL_MODULE;
     ldr_module_info_t moduleinfo;
     size_t moduleinfosize = sizeof(moduleinfo);
-    size_t modulereturnsize;    
+    size_t modulereturnsize;
 
   /* region */
-    ldr_region_t region; 
+    ldr_region_t region;
     ldr_region_info_t regioninfo;
     size_t regioninfosize = sizeof(regioninfo);
     size_t regionreturnsize;
 
   /* Obtain id of this process */
     mypid = ldr_my_process();
-  
+
   /* For each module */
     while (TRUE) {
 
@@ -975,7 +979,7 @@ void GC_register_dynamic_libraries(void)
 
       /* Get the module information */
         status = ldr_inq_module(mypid, moduleid, &moduleinfo,
-                                moduleinfosize, &modulereturnsize); 
+                                moduleinfosize, &modulereturnsize);
         if (status != 0 )
             ABORT("ldr_inq_module failed");
 
@@ -987,7 +991,7 @@ void GC_register_dynamic_libraries(void)
           GC_printf("---Module---\n");
           GC_printf("Module ID            = %16ld\n", moduleinfo.lmi_modid);
           GC_printf("Count of regions     = %16d\n", moduleinfo.lmi_nregion);
-          GC_printf("flags for module     = %16lx\n", moduleinfo.lmi_flags); 
+          GC_printf("flags for module     = %16lx\n", moduleinfo.lmi_flags);
           GC_printf("pathname of module   = \"%s\"\n", moduleinfo.lmi_name);
 #     endif
 
@@ -1007,7 +1011,7 @@ void GC_register_dynamic_libraries(void)
 #         ifdef DL_VERBOSE
               GC_printf("--- Region ---\n");
               GC_printf("Region number    = %16ld\n",
-                       regioninfo.lri_region_no);
+                        regioninfo.lri_region_no);
               GC_printf("Protection flags = %016x\n",  regioninfo.lri_prot);
               GC_printf("Virtual address  = %16p\n",   regioninfo.lri_vaddr);
               GC_printf("Mapped address   = %16p\n",   regioninfo.lri_mapaddr);
@@ -1034,7 +1038,7 @@ void GC_register_dynamic_libraries(void)
 extern char *sys_errlist[];
 extern int sys_nerr;
 
-void GC_register_dynamic_libraries()
+GC_INNER void GC_register_dynamic_libraries(void)
 {
   int status;
   int index = 1; /* Ordinal position in shared library search list */
@@ -1048,11 +1052,11 @@ void GC_register_dynamic_libraries()
 
       /* Check if this is the end of the list or if some error occured */
         if (status != 0) {
-#       ifdef GC_HPUX_THREADS
-          /* I've seen errno values of 0.  The man page is not clear   */
-          /* as to whether errno should get set on a -1 return.        */
-          break;
-#       else
+#        ifdef GC_HPUX_THREADS
+           /* I've seen errno values of 0.  The man page is not clear   */
+           /* as to whether errno should get set on a -1 return.        */
+           break;
+#        else
           if (errno == EINVAL) {
               break; /* Moved past end of shared library list --> finished */
           } else {
@@ -1060,10 +1064,10 @@ void GC_register_dynamic_libraries()
                     GC_printf("dynamic_load: %s\n", sys_errlist[errno]);
               } else {
                     GC_printf("dynamic_load: %d\n", errno);
-             }
+              }
               ABORT("shl_get failed");
           }
-#       endif
+#        endif
         }
 
 #     ifdef DL_VERBOSE
@@ -1071,7 +1075,7 @@ void GC_register_dynamic_libraries()
           GC_printf("\tfilename        = \"%s\"\n", shl_desc->filename);
           GC_printf("\tindex           = %d\n", index);
           GC_printf("\thandle          = %08x\n",
-                                       (unsigned long) shl_desc->handle);
+                                        (unsigned long) shl_desc->handle);
           GC_printf("\ttext seg. start = %08x\n", shl_desc->tstart);
           GC_printf("\ttext seg. end   = %08x\n", shl_desc->tend);
           GC_printf("\tdata seg. start = %08x\n", shl_desc->dstart);
@@ -1081,7 +1085,7 @@ void GC_register_dynamic_libraries()
 
       /* register shared library's data segment as a garbage collection root */
         GC_add_roots_inner((char *) shl_desc->dstart,
-                          (char *) shl_desc->dend, TRUE);
+                           (char *) shl_desc->dend, TRUE);
 
         index++;
     }
@@ -1089,41 +1093,41 @@ void GC_register_dynamic_libraries()
 #endif /* HPUX */
 
 #ifdef AIX
-#pragma alloca
-#include <sys/ldr.h>
-#include <sys/errno.h>
-void GC_register_dynamic_libraries(void)
-{
-       int len;
-       char *ldibuf;
-       int ldibuflen;
-       struct ld_info *ldi;
-
-       ldibuf = alloca(ldibuflen = 8192);
-
-       while ( (len = loadquery(L_GETINFO,ldibuf,ldibuflen)) < 0) {
-               if (errno != ENOMEM) {
-                       ABORT("loadquery failed");
-               }
-               ldibuf = alloca(ldibuflen *= 2);
-       }
-
-       ldi = (struct ld_info *)ldibuf;
-       while (ldi) {
-               len = ldi->ldinfo_next;
-               GC_add_roots_inner(
-                               ldi->ldinfo_dataorg,
-                               (ptr_t)(unsigned long)ldi->ldinfo_dataorg
-                               + ldi->ldinfo_datasize,
-                               TRUE);
-               ldi = len ? (struct ld_info *)((char *)ldi + len) : 0;
-       }
-}
+# pragma alloca
+# include <sys/ldr.h>
+# include <sys/errno.h>
+  GC_INNER void GC_register_dynamic_libraries(void)
+  {
+        int len;
+        char *ldibuf;
+        int ldibuflen;
+        struct ld_info *ldi;
+
+        ldibuf = alloca(ldibuflen = 8192);
+
+        while ( (len = loadquery(L_GETINFO,ldibuf,ldibuflen)) < 0) {
+                if (errno != ENOMEM) {
+                        ABORT("loadquery failed");
+                }
+                ldibuf = alloca(ldibuflen *= 2);
+        }
+
+        ldi = (struct ld_info *)ldibuf;
+        while (ldi) {
+                len = ldi->ldinfo_next;
+                GC_add_roots_inner(
+                                ldi->ldinfo_dataorg,
+                                (ptr_t)(unsigned long)ldi->ldinfo_dataorg
+                                + ldi->ldinfo_datasize,
+                                TRUE);
+                ldi = len ? (struct ld_info *)((char *)ldi + len) : 0;
+        }
+  }
 #endif /* AIX */
 
 #ifdef DARWIN
 
-/* __private_extern__ hack required for pre-3.4 gcc versions.  */
+/* __private_extern__ hack required for pre-3.4 gcc versions.   */
 #ifndef __private_extern__
 # define __private_extern__ extern
 # include <mach-o/dyld.h>
@@ -1135,7 +1139,7 @@ void GC_register_dynamic_libraries(void)
 
 /*#define DARWIN_DEBUG*/
 
-const static struct { 
+STATIC const struct {
         const char *seg;
         const char *sect;
 } GC_dyld_sections[] = {
@@ -1143,34 +1147,47 @@ const static struct {
         { SEG_DATA, SECT_BSS },
         { SEG_DATA, SECT_COMMON }
 };
-    
-#ifdef DARWIN_DEBUG
-static const char *GC_dyld_name_for_hdr(const struct GC_MACH_HEADER *hdr) {
-    unsigned long i,c;
+
+STATIC const char *GC_dyld_name_for_hdr(const struct GC_MACH_HEADER *hdr)
+{
+    unsigned long i, c;
     c = _dyld_image_count();
-    for(i=0;i<c;i++) if(_dyld_get_image_header(i) == hdr)
+    for (i = 0; i < c; i++)
+      if ((const struct GC_MACH_HEADER *)_dyld_get_image_header(i) == hdr)
         return _dyld_get_image_name(i);
     return NULL;
 }
-#endif
-        
+
 /* This should never be called by a thread holding the lock */
-static void GC_dyld_image_add(const struct GC_MACH_HEADER *hdr, intptr_t slide)
+STATIC void GC_dyld_image_add(const struct GC_MACH_HEADER *hdr, intptr_t slide)
 {
     unsigned long start,end,i;
     const struct GC_MACH_SECTION *sec;
+    const char *name;
+    GC_has_static_roots_func callback = GC_has_static_roots;
+    DCL_LOCK_STATE;
     if (GC_no_dls) return;
+#   ifdef DARWIN_DEBUG
+      name = GC_dyld_name_for_hdr(hdr);
+#   else
+      name = callback != 0 ? GC_dyld_name_for_hdr(hdr) : NULL;
+#   endif
     for(i=0;i<sizeof(GC_dyld_sections)/sizeof(GC_dyld_sections[0]);i++) {
       sec = GC_GETSECTBYNAME(hdr, GC_dyld_sections[i].seg,
-                            GC_dyld_sections[i].sect);
-      if(sec == NULL || sec->size == 0) continue;
+                             GC_dyld_sections[i].sect);
+      if(sec == NULL || sec->size < sizeof(word)) continue;
       start = slide + sec->addr;
       end = start + sec->size;
-#   ifdef DARWIN_DEBUG
-      GC_printf("Adding section at %p-%p (%lu bytes) from image %s\n",
-               start,end,sec->size,GC_dyld_name_for_hdr(hdr));
-#   endif
-      GC_add_roots((char*)start,(char*)end);
+      LOCK();
+      /* The user callback is called holding the lock   */
+      if (callback == 0 || callback(name, (void*)start, (size_t)sec->size)) {
+#       ifdef DARWIN_DEBUG
+          GC_printf("Adding section at %p-%p (%lu bytes) from image %s\n",
+                    start,end,sec->size,name);
+#       endif
+        GC_add_roots_inner((ptr_t)start, (ptr_t)end, FALSE);
+      }
+      UNLOCK();
     }
 #   ifdef DARWIN_DEBUG
        GC_print_static_roots();
@@ -1178,30 +1195,31 @@ static void GC_dyld_image_add(const struct GC_MACH_HEADER *hdr, intptr_t slide)
 }
 
 /* This should never be called by a thread holding the lock */
-static void GC_dyld_image_remove(const struct GC_MACH_HEADER *hdr,
-                                intptr_t slide)
+STATIC void GC_dyld_image_remove(const struct GC_MACH_HEADER *hdr,
+                                 intptr_t slide)
 {
     unsigned long start,end,i;
     const struct GC_MACH_SECTION *sec;
     for(i=0;i<sizeof(GC_dyld_sections)/sizeof(GC_dyld_sections[0]);i++) {
       sec = GC_GETSECTBYNAME(hdr, GC_dyld_sections[i].seg,
-                            GC_dyld_sections[i].sect);
+                             GC_dyld_sections[i].sect);
       if(sec == NULL || sec->size == 0) continue;
       start = slide + sec->addr;
       end = start + sec->size;
 #   ifdef DARWIN_DEBUG
       GC_printf("Removing section at %p-%p (%lu bytes) from image %s\n",
-               start,end,sec->size,GC_dyld_name_for_hdr(hdr));
+                start,end,sec->size,GC_dyld_name_for_hdr(hdr));
 #   endif
       GC_remove_roots((char*)start,(char*)end);
     }
 #   ifdef DARWIN_DEBUG
-       GC_print_static_roots();
+        GC_print_static_roots();
 #   endif
 }
 
-void GC_register_dynamic_libraries() {
-    /* Currently does nothing. The callbacks are setup by GC_init_dyld() 
+GC_INNER void GC_register_dynamic_libraries(void)
+{
+    /* Currently does nothing. The callbacks are setup by GC_init_dyld()
     The dyld library takes it from there. */
 }
 
@@ -1210,41 +1228,43 @@ void GC_register_dynamic_libraries() {
    Because of this we MUST setup callbacks BEFORE we ever stop the world.
    This should be called BEFORE any thread in created and WITHOUT the
    allocation lock held. */
-   
-void GC_init_dyld() {
+
+GC_INNER void GC_init_dyld(void)
+{
   static GC_bool initialized = FALSE;
-  char *bind_fully_env = NULL;
-  
+
   if(initialized) return;
-  
+
 #   ifdef DARWIN_DEBUG
       GC_printf("Registering dyld callbacks...\n");
 #   endif
-  
+
   /* Apple's Documentation:
-     When you call _dyld_register_func_for_add_image, the dynamic linker runtime
-     calls the specified callback (func) once for each of the images that is
-     currently loaded into the program. When a new image is added to the program,
-     your callback is called again with the mach_header for the new image, and the     
-     virtual memory slide amount of the new image. 
-     
-     This WILL properly register already linked libraries and libraries 
-     linked in the future
+     When you call _dyld_register_func_for_add_image, the dynamic linker
+     runtime calls the specified callback (func) once for each of the images
+     that is currently loaded into the program. When a new image is added to
+     the program, your callback is called again with the mach_header for the
+     new image, and the virtual memory slide amount of the new image.
+
+     This WILL properly register already linked libraries and libraries
+     linked in the future.
   */
-  
+
     _dyld_register_func_for_add_image(GC_dyld_image_add);
     _dyld_register_func_for_remove_image(GC_dyld_image_remove);
+        /* Ignore 2 compiler warnings here: passing argument 1 of       */
+        /* '_dyld_register_func_for_add/remove_image' from incompatible */
+        /* pointer type.                                                */
+
 
     /* Set this early to avoid reentrancy issues. */
     initialized = TRUE;
 
-    bind_fully_env = getenv("DYLD_BIND_AT_LAUNCH");
-    
-    if (bind_fully_env == NULL) {
-#   ifdef DARWIN_DEBUG
-      GC_printf("Forcing full bind of GC code...\n");
-#   endif
-      
+    if (GETENV("DYLD_BIND_AT_LAUNCH") == 0) {
+#     ifdef DARWIN_DEBUG
+        GC_printf("Forcing full bind of GC code...\n");
+#     endif
+      /* FIXME: '_dyld_bind_fully_image_containing_address' is deprecated. */
       if(!_dyld_bind_fully_image_containing_address((unsigned long*)GC_malloc))
         ABORT("_dyld_bind_fully_image_containing_address failed");
     }
@@ -1252,7 +1272,7 @@ void GC_init_dyld() {
 }
 
 #define HAVE_REGISTER_MAIN_STATIC_DATA
-GC_bool GC_register_main_static_data(void)
+GC_INNER GC_bool GC_register_main_static_data(void)
 {
   /* Already done through dyld callbacks */
   return FALSE;
@@ -1264,24 +1284,24 @@ GC_bool GC_register_main_static_data(void)
 
 #ifdef PCR
 
-#   include "il/PCR_IL.h"
-#   include "th/PCR_ThCtl.h"
-#   include "mm/PCR_MM.h"
+# include "il/PCR_IL.h"
+# include "th/PCR_ThCtl.h"
+# include "mm/PCR_MM.h"
 
-void GC_register_dynamic_libraries(void)
-{
-    /* Add new static data areas of dynamically loaded modules.        */
+  GC_INNER void GC_register_dynamic_libraries(void)
+  {
+    /* Add new static data areas of dynamically loaded modules. */
         {
           PCR_IL_LoadedFile * p = PCR_IL_GetLastLoadedFile();
           PCR_IL_LoadedSegment * q;
-          
+
           /* Skip uncommitted files */
           while (p != NIL && !(p -> lf_commitPoint)) {
-              /* The loading of this file has not yet been committed   */
-              /* Hence its description could be inconsistent.                  */
-              /* Furthermore, it hasn't yet been run.  Hence its data  */
-              /* segments can't possibly reference heap allocated      */
-              /* objects.                                              */
+              /* The loading of this file has not yet been committed    */
+              /* Hence its description could be inconsistent.           */
+              /* Furthermore, it hasn't yet been run.  Hence its data   */
+              /* segments can't possibly reference heap allocated       */
+              /* objects.                                               */
               p = p -> lf_prev;
           }
           for (; p != NIL; p = p -> lf_prev) {
@@ -1289,39 +1309,34 @@ void GC_register_dynamic_libraries(void)
               if ((q -> ls_flags & PCR_IL_SegFlags_Traced_MASK)
                   == PCR_IL_SegFlags_Traced_on) {
                 GC_add_roots_inner
-                       ((char *)(q -> ls_addr), 
-                        (char *)(q -> ls_addr) + q -> ls_bytes,
-                        TRUE);
+                        ((char *)(q -> ls_addr),
+                         (char *)(q -> ls_addr) + q -> ls_bytes,
+                         TRUE);
               }
             }
           }
         }
-}
-
+  }
 
 #else /* !PCR */
 
-void GC_register_dynamic_libraries(){}
+GC_INNER void GC_register_dynamic_libraries(void) {}
 
 #endif /* !PCR */
 
 #endif /* !DYNAMIC_LOADING */
 
 #ifndef HAVE_REGISTER_MAIN_STATIC_DATA
-
-/* Do we need to separately register the main static data segment? */
-GC_bool GC_register_main_static_data(void)
-{
-  return TRUE;
-}
+  /* Do we need to separately register the main static data segment? */
+  GC_INNER GC_bool GC_register_main_static_data(void)
+  {
+    return TRUE;
+  }
+#endif /* HAVE_REGISTER_MAIN_STATIC_DATA */
 
 /* Register a routine to filter dynamic library registration.  */
-GC_API void GC_CALL GC_register_has_static_roots_callback
-  (int (GC_CALLBACK * callback)(const char *, void *, size_t)) {
-# ifdef HAVE_DL_ITERATE_PHDR
+GC_API void GC_CALL GC_register_has_static_roots_callback(
+                                        GC_has_static_roots_func callback)
+{
     GC_has_static_roots = callback;
-# endif
 }
-
-#endif /* HAVE_REGISTER_MAIN_STATIC_DATA */
-
diff --git a/src/mm/boehm-gc/extra/AmigaOS.c b/src/mm/boehm-gc/extra/AmigaOS.c
new file mode 100644 (file)
index 0000000..d171503
--- /dev/null
@@ -0,0 +1,623 @@
+
+
+/******************************************************************
+
+  AmigaOS-spesific routines for GC.
+  This file is normally included from os_dep.c
+
+******************************************************************/
+
+
+#if !defined(GC_AMIGA_DEF) && !defined(GC_AMIGA_SB) && !defined(GC_AMIGA_DS) && !defined(GC_AMIGA_AM)
+# include "gc_priv.h"
+# include <stdio.h>
+# include <signal.h>
+# define GC_AMIGA_DEF
+# define GC_AMIGA_SB
+# define GC_AMIGA_DS
+# define GC_AMIGA_AM
+#endif
+
+
+#ifdef GC_AMIGA_DEF
+
+# ifndef __GNUC__
+#   include <exec/exec.h>
+# endif
+# include <proto/exec.h>
+# include <proto/dos.h>
+# include <dos/dosextens.h>
+# include <workbench/startup.h>
+
+#endif
+
+
+
+
+#ifdef GC_AMIGA_SB
+
+/******************************************************************
+   Find the base of the stack.
+******************************************************************/
+
+ptr_t GC_get_main_stack_base()
+{
+    struct Process *proc = (struct Process*)SysBase->ThisTask;
+    /* Reference: Amiga Guru Book Pages: 42,567,574 */
+    if (proc->pr_Task.tc_Node.ln_Type==NT_PROCESS
+        && proc->pr_CLI != NULL) {
+       /* first ULONG is StackSize */
+       /*longPtr = proc->pr_ReturnAddr;
+       size = longPtr[0];*/
+
+       return (char *)proc->pr_ReturnAddr + sizeof(ULONG);
+    } else {
+       return (char *)proc->pr_Task.tc_SPUpper;
+    }
+}
+
+#if 0 /* old version */
+ptr_t GC_get_stack_base()
+{
+    extern struct WBStartup *_WBenchMsg;
+    extern long __base;
+    extern long __stack;
+    struct Task *task;
+    struct Process *proc;
+    struct CommandLineInterface *cli;
+    long size;
+
+    if ((task = FindTask(0)) == 0) {
+       GC_err_puts("Cannot find own task structure\n");
+       ABORT("task missing");
+    }
+    proc = (struct Process *)task;
+    cli = BADDR(proc->pr_CLI);
+
+    if (_WBenchMsg != 0 || cli == 0) {
+       size = (char *)task->tc_SPUpper - (char *)task->tc_SPLower;
+    } else {
+       size = cli->cli_DefaultStack * 4;
+    }
+    return (ptr_t)(__base + GC_max(size, __stack));
+}
+#endif
+
+
+#endif
+
+
+#ifdef GC_AMIGA_DS
+/******************************************************************
+   Register data segments.
+******************************************************************/
+
+   void GC_register_data_segments()
+   {
+     struct Process    *proc;
+     struct CommandLineInterface *cli;
+     BPTR myseglist;
+     ULONG *data;
+     int       num;
+
+
+#    ifdef __GNUC__
+        ULONG dataSegSize;
+        GC_bool found_segment = FALSE;
+       extern char __data_size[];
+
+       dataSegSize=__data_size+8;
+       /* Can`t find the Location of __data_size, because
+           it`s possible that is it, inside the segment. */
+
+#     endif
+
+       proc= (struct Process*)SysBase->ThisTask;
+
+       /* Reference: Amiga Guru Book Pages: 538ff,565,573
+                    and XOper.asm */
+       if (proc->pr_Task.tc_Node.ln_Type==NT_PROCESS) {
+         if (proc->pr_CLI == NULL) {
+           myseglist = proc->pr_SegList;
+         } else {
+           /* ProcLoaded       'Loaded as a command: '*/
+           cli = BADDR(proc->pr_CLI);
+           myseglist = cli->cli_Module;
+         }
+       } else {
+         ABORT("Not a Process.");
+       }
+
+       if (myseglist == NULL) {
+           ABORT("Arrrgh.. can't find segments, aborting");
+       }
+
+       /* xoper hunks Shell Process */
+
+       num=0;
+        for (data = (ULONG *)BADDR(myseglist); data != NULL;
+             data = (ULONG *)BADDR(data[0])) {
+         if (((ULONG) GC_register_data_segments < (ULONG) &data[1]) ||
+             ((ULONG) GC_register_data_segments > (ULONG) &data[1] + data[-1])) {
+#             ifdef __GNUC__
+               if (dataSegSize == data[-1]) {
+                 found_segment = TRUE;
+               }
+#            endif
+             GC_add_roots_inner((char *)&data[1],
+                                ((char *)&data[1]) + data[-1], FALSE);
+          }
+          ++num;
+        } /* for */
+#      ifdef __GNUC__
+          if (!found_segment) {
+            ABORT("Can`t find correct Segments.\nSolution: Use an newer version of ixemul.library");
+          }
+#      endif
+  }
+
+#if 0 /* old version */
+  void GC_register_data_segments()
+  {
+    extern struct WBStartup *_WBenchMsg;
+    struct Process     *proc;
+    struct CommandLineInterface *cli;
+    BPTR myseglist;
+    ULONG *data;
+
+    if ( _WBenchMsg != 0 ) {
+       if ((myseglist = _WBenchMsg->sm_Segment) == 0) {
+           GC_err_puts("No seglist from workbench\n");
+           return;
+       }
+    } else {
+       if ((proc = (struct Process *)FindTask(0)) == 0) {
+           GC_err_puts("Cannot find process structure\n");
+           return;
+       }
+       if ((cli = BADDR(proc->pr_CLI)) == 0) {
+           GC_err_puts("No CLI\n");
+           return;
+       }
+       if ((myseglist = cli->cli_Module) == 0) {
+           GC_err_puts("No seglist from CLI\n");
+           return;
+       }
+    }
+
+    for (data = (ULONG *)BADDR(myseglist); data != 0;
+         data = (ULONG *)BADDR(data[0])) {
+#        ifdef AMIGA_SKIP_SEG
+           if (((ULONG) GC_register_data_segments < (ULONG) &data[1]) ||
+           ((ULONG) GC_register_data_segments > (ULONG) &data[1] + data[-1])) {
+#       else
+          {
+#       endif /* AMIGA_SKIP_SEG */
+          GC_add_roots_inner((char *)&data[1],
+                            ((char *)&data[1]) + data[-1], FALSE);
+         }
+    }
+  }
+#endif /* old version */
+
+
+#endif
+
+
+
+#ifdef GC_AMIGA_AM
+
+#ifndef GC_AMIGA_FASTALLOC
+
+void *GC_amiga_allocwrapper(size_t size,void *(*AllocFunction)(size_t size2)){
+       return (*AllocFunction)(size);
+}
+
+void *(*GC_amiga_allocwrapper_do)(size_t size,void *(*AllocFunction)(size_t size2))
+       =GC_amiga_allocwrapper;
+
+#else
+
+
+
+
+void *GC_amiga_allocwrapper_firsttime(size_t size,void *(*AllocFunction)(size_t size2));
+
+void *(*GC_amiga_allocwrapper_do)(size_t size,void *(*AllocFunction)(size_t size2))
+       =GC_amiga_allocwrapper_firsttime;
+
+
+/******************************************************************
+   Amiga-spesific routines to obtain memory, and force GC to give
+   back fast-mem whenever possible.
+       These hacks makes gc-programs go many times faster when
+   the amiga is low on memory, and are therefore strictly necesarry.
+
+   -Kjetil S. Matheussen, 2000.
+******************************************************************/
+
+
+
+/* List-header for all allocated memory. */
+
+struct GC_Amiga_AllocedMemoryHeader{
+       ULONG size;
+       struct GC_Amiga_AllocedMemoryHeader *next;
+};
+struct GC_Amiga_AllocedMemoryHeader *GC_AMIGAMEM=(struct GC_Amiga_AllocedMemoryHeader *)(int)~(NULL);
+
+
+
+/* Type of memory. Once in the execution of a program, this might change to MEMF_ANY|MEMF_CLEAR */
+
+ULONG GC_AMIGA_MEMF = MEMF_FAST | MEMF_CLEAR;
+
+
+/* Prevents GC_amiga_get_mem from allocating memory if this one is TRUE. */
+#ifndef GC_AMIGA_ONLYFAST
+BOOL GC_amiga_dontalloc=FALSE;
+#endif
+
+#ifdef GC_AMIGA_PRINTSTATS
+int succ=0,succ2=0;
+int nsucc=0,nsucc2=0;
+int nullretries=0;
+int numcollects=0;
+int chipa=0;
+int allochip=0;
+int allocfast=0;
+int cur0=0;
+int cur1=0;
+int cur10=0;
+int cur50=0;
+int cur150=0;
+int cur151=0;
+int ncur0=0;
+int ncur1=0;
+int ncur10=0;
+int ncur50=0;
+int ncur150=0;
+int ncur151=0;
+#endif
+
+/* Free everything at program-end. */
+
+void GC_amiga_free_all_mem(void){
+       struct GC_Amiga_AllocedMemoryHeader *gc_am=(struct GC_Amiga_AllocedMemoryHeader *)(~(int)(GC_AMIGAMEM));
+       struct GC_Amiga_AllocedMemoryHeader *temp;
+
+#ifdef GC_AMIGA_PRINTSTATS
+       printf("\n\n"
+               "%d bytes of chip-mem, and %d bytes of fast-mem where allocated from the OS.\n",
+               allochip,allocfast
+       );
+       printf(
+               "%d bytes of chip-mem were returned from the GC_AMIGA_FASTALLOC supported allocating functions.\n",
+               chipa
+       );
+       printf("\n");
+       printf("GC_gcollect was called %d times to avoid returning NULL or start allocating with the MEMF_ANY flag.\n",numcollects);
+       printf("%d of them was a success. (the others had to use allocation from the OS.)\n",nullretries);
+       printf("\n");
+       printf("Succeded forcing %d gc-allocations (%d bytes) of chip-mem to be fast-mem.\n",succ,succ2);
+       printf("Failed forcing %d gc-allocations (%d bytes) of chip-mem to be fast-mem.\n",nsucc,nsucc2);
+       printf("\n");
+       printf(
+               "Number of retries before succeding a chip->fast force:\n"
+               "0: %d, 1: %d, 2-9: %d, 10-49: %d, 50-149: %d, >150: %d\n",
+               cur0,cur1,cur10,cur50,cur150,cur151
+       );
+       printf(
+               "Number of retries before giving up a chip->fast force:\n"
+               "0: %d, 1: %d, 2-9: %d, 10-49: %d, 50-149: %d, >150: %d\n",
+               ncur0,ncur1,ncur10,ncur50,ncur150,ncur151
+       );
+#endif
+
+       while(gc_am!=NULL){
+               temp=gc_am->next;
+               FreeMem(gc_am,gc_am->size);
+               gc_am=(struct GC_Amiga_AllocedMemoryHeader *)(~(int)(temp));
+       }
+}
+
+#ifndef GC_AMIGA_ONLYFAST
+
+/* All memory with address lower than this one is chip-mem. */
+
+char *chipmax;
+
+
+/*
+ * Allways set to the last size of memory tried to be allocated.
+ * Needed to ensure allocation when the size is bigger than 100000.
+ *
+ */
+size_t latestsize;
+
+#endif
+
+
+/*
+ * The actual function that is called with the GET_MEM macro.
+ *
+ */
+
+void *GC_amiga_get_mem(size_t size){
+       struct GC_Amiga_AllocedMemoryHeader *gc_am;
+
+#ifndef GC_AMIGA_ONLYFAST
+       if(GC_amiga_dontalloc==TRUE){
+//             printf("rejected, size: %d, latestsize: %d\n",size,latestsize);
+               return NULL;
+       }
+
+       // We really don't want to use chip-mem, but if we must, then as little as possible.
+       if(GC_AMIGA_MEMF==(MEMF_ANY|MEMF_CLEAR) && size>100000 && latestsize<50000) return NULL;
+#endif
+
+       gc_am=AllocMem((ULONG)(size + sizeof(struct GC_Amiga_AllocedMemoryHeader)),GC_AMIGA_MEMF);
+       if(gc_am==NULL) return NULL;
+
+       gc_am->next=GC_AMIGAMEM;
+       gc_am->size=size + sizeof(struct GC_Amiga_AllocedMemoryHeader);
+       GC_AMIGAMEM=(struct GC_Amiga_AllocedMemoryHeader *)(~(int)(gc_am));
+
+//     printf("Allocated %d (%d) bytes at address: %x. Latest: %d\n",size,tot,gc_am,latestsize);
+
+#ifdef GC_AMIGA_PRINTSTATS
+       if((char *)gc_am<chipmax){
+               allochip+=size;
+       }else{
+               allocfast+=size;
+       }
+#endif
+
+       return gc_am+1;
+
+}
+
+
+
+
+#ifndef GC_AMIGA_ONLYFAST
+
+/* Tries very hard to force GC to find fast-mem to return. Done recursively
+ * to hold the rejected memory-pointers reachable from the collector in an
+ * easy way.
+ *
+ */
+#ifdef GC_AMIGA_RETRY
+void *GC_amiga_rec_alloc(size_t size,void *(*AllocFunction)(size_t size2),const int rec){
+       void *ret;
+
+       ret=(*AllocFunction)(size);
+
+#ifdef GC_AMIGA_PRINTSTATS
+       if((char *)ret>chipmax || ret==NULL){
+               if(ret==NULL){
+                       nsucc++;
+                       nsucc2+=size;
+                       if(rec==0) ncur0++;
+                       if(rec==1) ncur1++;
+                       if(rec>1 && rec<10) ncur10++;
+                       if(rec>=10 && rec<50) ncur50++;
+                       if(rec>=50 && rec<150) ncur150++;
+                       if(rec>=150) ncur151++;
+               }else{
+                       succ++;
+                       succ2+=size;
+                       if(rec==0) cur0++;
+                       if(rec==1) cur1++;
+                       if(rec>1 && rec<10) cur10++;
+                       if(rec>=10 && rec<50) cur50++;
+                       if(rec>=50 && rec<150) cur150++;
+                       if(rec>=150) cur151++;
+               }
+       }
+#endif
+
+       if (((char *)ret)<=chipmax && ret!=NULL && (rec<(size>500000?9:size/5000))){
+               ret=GC_amiga_rec_alloc(size,AllocFunction,rec+1);
+//             GC_free(ret2);
+       }
+
+       return ret;
+}
+#endif
+
+
+/* The allocating-functions defined inside the amiga-blocks in gc.h is called
+ * via these functions.
+ */
+
+
+void *GC_amiga_allocwrapper_any(size_t size,void *(*AllocFunction)(size_t size2)){
+       void *ret,*ret2;
+
+       GC_amiga_dontalloc=TRUE;        // Pretty tough thing to do, but its indeed necesarry.
+       latestsize=size;
+
+       ret=(*AllocFunction)(size);
+
+       if(((char *)ret) <= chipmax){
+               if(ret==NULL){
+                       //Give GC access to allocate memory.
+#ifdef GC_AMIGA_GC
+                       if(!GC_dont_gc){
+                               GC_gcollect();
+#ifdef GC_AMIGA_PRINTSTATS
+                               numcollects++;
+#endif
+                               ret=(*AllocFunction)(size);
+                       }
+#endif
+                       if(ret==NULL){
+                               GC_amiga_dontalloc=FALSE;
+                               ret=(*AllocFunction)(size);
+                               if(ret==NULL){
+                                       WARN("Out of Memory!  Returning NIL!\n", 0);
+                               }
+                       }
+#ifdef GC_AMIGA_PRINTSTATS
+                       else{
+                               nullretries++;
+                       }
+                       if(ret!=NULL && (char *)ret<=chipmax) chipa+=size;
+#endif
+               }
+#ifdef GC_AMIGA_RETRY
+               else{
+                       /* We got chip-mem. Better try again and again and again etc., we might get fast-mem sooner or later... */
+                       /* Using gctest to check the effectiviness of doing this, does seldom give a very good result. */
+                       /* However, real programs doesn't normally rapidly allocate and deallocate. */
+//                     printf("trying to force... %d bytes... ",size);
+                       if(
+                               AllocFunction!=GC_malloc_uncollectable
+#ifdef ATOMIC_UNCOLLECTABLE
+                               && AllocFunction!=GC_malloc_atomic_uncollectable
+#endif
+                       ){
+                               ret2=GC_amiga_rec_alloc(size,AllocFunction,0);
+                       }else{
+                               ret2=(*AllocFunction)(size);
+#ifdef GC_AMIGA_PRINTSTATS
+                               if((char *)ret2<chipmax || ret2==NULL){
+                                       nsucc++;
+                                       nsucc2+=size;
+                                       ncur0++;
+                               }else{
+                                       succ++;
+                                       succ2+=size;
+                                       cur0++;
+                               }
+#endif
+                       }
+                       if(((char *)ret2)>chipmax){
+//                             printf("Succeeded.\n");
+                               GC_free(ret);
+                               ret=ret2;
+                       }else{
+                               GC_free(ret2);
+//                             printf("But did not succeed.\n");
+                       }
+               }
+#endif
+       }
+
+       GC_amiga_dontalloc=FALSE;
+
+       return ret;
+}
+
+
+
+void (*GC_amiga_toany)(void)=NULL;
+
+void GC_amiga_set_toany(void (*func)(void)){
+       GC_amiga_toany=func;
+}
+
+#endif // !GC_AMIGA_ONLYFAST
+
+
+void *GC_amiga_allocwrapper_fast(size_t size,void *(*AllocFunction)(size_t size2)){
+       void *ret;
+
+       ret=(*AllocFunction)(size);
+
+       if(ret==NULL){
+               // Enable chip-mem allocation.
+//             printf("ret==NULL\n");
+#ifdef GC_AMIGA_GC
+               if(!GC_dont_gc){
+                       GC_gcollect();
+#ifdef GC_AMIGA_PRINTSTATS
+                       numcollects++;
+#endif
+                       ret=(*AllocFunction)(size);
+               }
+#endif
+               if(ret==NULL){
+#ifndef GC_AMIGA_ONLYFAST
+                       GC_AMIGA_MEMF=MEMF_ANY | MEMF_CLEAR;
+                       if(GC_amiga_toany!=NULL) (*GC_amiga_toany)();
+                       GC_amiga_allocwrapper_do=GC_amiga_allocwrapper_any;
+                       return GC_amiga_allocwrapper_any(size,AllocFunction);
+#endif
+               }
+#ifdef GC_AMIGA_PRINTSTATS
+               else{
+                       nullretries++;
+               }
+#endif
+       }
+
+       return ret;
+}
+
+void *GC_amiga_allocwrapper_firsttime(size_t size,void *(*AllocFunction)(size_t size2)){
+       atexit(&GC_amiga_free_all_mem);
+       chipmax=(char *)SysBase->MaxLocMem;             // For people still having SysBase in chip-mem, this might speed up a bit.
+       GC_amiga_allocwrapper_do=GC_amiga_allocwrapper_fast;
+       return GC_amiga_allocwrapper_fast(size,AllocFunction);
+}
+
+
+#endif //GC_AMIGA_FASTALLOC
+
+
+
+/*
+ * The wrapped realloc function.
+ *
+ */
+void *GC_amiga_realloc(void *old_object,size_t new_size_in_bytes){
+#ifndef GC_AMIGA_FASTALLOC
+       return GC_realloc(old_object,new_size_in_bytes);
+#else
+       void *ret;
+       latestsize=new_size_in_bytes;
+       ret=GC_realloc(old_object,new_size_in_bytes);
+       if(ret==NULL && GC_AMIGA_MEMF==(MEMF_FAST | MEMF_CLEAR)){
+               /* Out of fast-mem. */
+#ifdef GC_AMIGA_GC
+               if(!GC_dont_gc){
+                       GC_gcollect();
+#ifdef GC_AMIGA_PRINTSTATS
+                       numcollects++;
+#endif
+                       ret=GC_realloc(old_object,new_size_in_bytes);
+               }
+#endif
+               if(ret==NULL){
+#ifndef GC_AMIGA_ONLYFAST
+                       GC_AMIGA_MEMF=MEMF_ANY | MEMF_CLEAR;
+                       if(GC_amiga_toany!=NULL) (*GC_amiga_toany)();
+                       GC_amiga_allocwrapper_do=GC_amiga_allocwrapper_any;
+                       ret=GC_realloc(old_object,new_size_in_bytes);
+#endif
+               }
+#ifdef GC_AMIGA_PRINTSTATS
+               else{
+                       nullretries++;
+               }
+#endif
+       }
+       if(ret==NULL){
+               WARN("Out of Memory!  Returning NIL!\n", 0);
+       }
+#ifdef GC_AMIGA_PRINTSTATS
+       if(((char *)ret)<chipmax && ret!=NULL){
+               chipa+=new_size_in_bytes;
+       }
+#endif
+       return ret;
+#endif
+}
+
+#endif //GC_AMIGA_AM
+
+
diff --git a/src/mm/boehm-gc/extra/MacOS.c b/src/mm/boehm-gc/extra/MacOS.c
new file mode 100644 (file)
index 0000000..b56bea7
--- /dev/null
@@ -0,0 +1,156 @@
+/*
+       MacOS.c
+       
+       Some routines for the Macintosh OS port of the Hans-J. Boehm, Alan J. Demers
+       garbage collector.
+       
+       <Revision History>
+       
+       11/22/94  pcb  StripAddress the temporary memory handle for 24-bit mode.
+       11/30/94  pcb  Tracking all memory usage so we can deallocate it all at once.
+       02/10/96  pcb  Added routine to perform a final collection when
+unloading shared library.
+       
+       by Patrick C. Beard.
+ */
+/* Boehm, February 15, 1996 2:55 pm PST */
+
+#include <Resources.h>
+#include <Memory.h>
+#include <LowMem.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "gc.h"
+#include "gc_priv.h"
+
+// use 'CODE' resource 0 to get exact location of the beginning of global space.
+
+typedef struct {
+       unsigned long aboveA5;
+       unsigned long belowA5;
+       unsigned long JTSize;
+       unsigned long JTOffset;
+} *CodeZeroPtr, **CodeZeroHandle;
+
+void* GC_MacGetDataStart()
+{
+       CodeZeroHandle code0 = (CodeZeroHandle)GetResource('CODE', 0);
+       if (code0) {
+               long belowA5Size = (**code0).belowA5;
+               ReleaseResource((Handle)code0);
+               return (LMGetCurrentA5() - belowA5Size);
+       }
+       fprintf(stderr, "Couldn't load the jump table.");
+       exit(-1);
+       return 0;
+}
+
+/* track the use of temporary memory so it can be freed all at once. */
+
+typedef struct TemporaryMemoryBlock TemporaryMemoryBlock, **TemporaryMemoryHandle;
+
+struct TemporaryMemoryBlock {
+       TemporaryMemoryHandle nextBlock;
+       char data[];
+};
+
+static TemporaryMemoryHandle theTemporaryMemory = NULL;
+static Boolean firstTime = true;
+
+void GC_MacFreeTemporaryMemory(void);
+
+Ptr GC_MacTemporaryNewPtr(size_t size, Boolean clearMemory)
+{
+       static Boolean firstTime = true;
+       OSErr result;
+       TemporaryMemoryHandle tempMemBlock;
+       Ptr tempPtr = nil;
+
+       tempMemBlock = (TemporaryMemoryHandle)TempNewHandle(size + sizeof(TemporaryMemoryBlock), &result);
+       if (tempMemBlock && result == noErr) {
+               HLockHi((Handle)tempMemBlock);
+               tempPtr = (**tempMemBlock).data;
+               if (clearMemory) memset(tempPtr, 0, size);
+               tempPtr = StripAddress(tempPtr);
+
+               // keep track of the allocated blocks.
+               (**tempMemBlock).nextBlock = theTemporaryMemory;
+               theTemporaryMemory = tempMemBlock;
+       }
+       
+#     if !defined(SHARED_LIBRARY_BUILD)
+       // install an exit routine to clean up the memory used at the end.
+       if (firstTime) {
+               atexit(&GC_MacFreeTemporaryMemory);
+               firstTime = false;
+       }
+#     endif
+       
+       return tempPtr;
+}
+
+extern word GC_fo_entries; 
+
+static void perform_final_collection()
+{
+  unsigned i;
+  word last_fo_entries = 0;
+  
+  /* adjust the stack bottom, because CFM calls us from another stack
+     location. */
+     GC_stackbottom = (ptr_t)&i;
+
+  /* try to collect and finalize everything in sight */
+    for (i = 0; i < 2 || GC_fo_entries < last_fo_entries; i++) {
+        last_fo_entries = GC_fo_entries;
+        GC_gcollect();
+    }
+}
+
+
+void GC_MacFreeTemporaryMemory()
+{
+# if defined(SHARED_LIBRARY_BUILD)
+    /* if possible, collect all memory, and invoke all finalizers. */
+      perform_final_collection();
+# endif
+
+    if (theTemporaryMemory != NULL) {
+       long totalMemoryUsed = 0;
+       TemporaryMemoryHandle tempMemBlock = theTemporaryMemory;
+       while (tempMemBlock != NULL) {
+               TemporaryMemoryHandle nextBlock = (**tempMemBlock).nextBlock;
+               totalMemoryUsed += GetHandleSize((Handle)tempMemBlock);
+               DisposeHandle((Handle)tempMemBlock);
+               tempMemBlock = nextBlock;
+       }
+       theTemporaryMemory = NULL;
+
+#       if !defined(SHARED_LIBRARY_BUILD)
+         if (GC_print_stats) {
+            fprintf(stdout, "[total memory used:  %ld bytes.]\n",
+                  totalMemoryUsed);
+            fprintf(stdout, "[total collections:  %ld.]\n", GC_gc_no);
+         }
+#       endif
+    }
+}
+
+#if __option(far_data)
+
+  void* GC_MacGetDataEnd()
+  {
+       CodeZeroHandle code0 = (CodeZeroHandle)GetResource('CODE', 0);
+       if (code0) {
+               long aboveA5Size = (**code0).aboveA5;
+               ReleaseResource((Handle)code0);
+               return (LMGetCurrentA5() + aboveA5Size);
+       }
+       fprintf(stderr, "Couldn't load the jump table.");
+       exit(-1);
+       return 0;
+  }
+
+#endif /* __option(far_data) */
diff --git a/src/mm/boehm-gc/extra/add_gc_prefix.c b/src/mm/boehm-gc/extra/add_gc_prefix.c
new file mode 100644 (file)
index 0000000..a7fd4fc
--- /dev/null
@@ -0,0 +1,20 @@
+# include <stdio.h>
+# include <gc.h>
+int main(argc, argv, envp)
+int argc;
+char ** argv;
+char ** envp;
+{
+    int i;
+    
+    for (i = 1; i < argc; i++) {
+      if (GC_ALPHA_VERSION == GC_NOT_ALPHA) {
+       printf("gc%d.%d/%s ", GC_VERSION_MAJOR, GC_VERSION_MINOR, argv[i]);
+      } else {
+       printf("gc%d.%dalpha%d/%s ", GC_VERSION_MAJOR,
+              GC_VERSION_MINOR, GC_ALPHA_VERSION, argv[i]);
+      }
+    }
+    return(0);
+}
diff --git a/src/mm/boehm-gc/extra/gc.c b/src/mm/boehm-gc/extra/gc.c
new file mode 100644 (file)
index 0000000..08def0c
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
+ * Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
+ * All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
+/* This file could be used for the following purposes:          */
+/* - get the complete GC as a single link object file (module); */
+/* - enable more compiler optimizations.                        */
+
+/* Tip: to get the highest level of compiler optimizations, the typical */
+/* compiler options (GCC) to use are:                                   */
+/* -O3 -fno-strict-aliasing -march=native -Wall -fprofile-generate/use  */
+
+/* This file is not well tested (for now). */
+
+
+#define GC_INNER STATIC
+#define GC_EXTERN GC_INNER
+                /* STATIC is defined in gcconfig.h. */
+
+/* Small files go first... */
+#include "../backgraph.c"
+#include "../blacklst.c"
+#include "../checksums.c"
+#include "../gcj_mlc.c"
+#include "../headers.c"
+#include "../malloc.c"
+#include "../new_hblk.c"
+#include "../obj_map.c"
+#include "../ptr_chck.c"
+#include "../stubborn.c"
+
+#include "../allchblk.c"
+#include "../alloc.c"
+#include "../dbg_mlc.c"
+#include "../finalize.c"
+#include "../mallocx.c"
+#include "../mark.c"
+#include "../mark_rts.c"
+#include "../reclaim.c"
+#include "../typd_mlc.c"
+
+#include "../misc.c"
+#include "../os_dep.c"
+#include "../thread_local_alloc.c"
+
+/* Most platform-specific files go here... */
+#include "../darwin_stop_world.c"
+#include "../dyn_load.c"
+#include "../gc_dlopen.c"
+#include "../mach_dep.c"
+#include "../pcr_interface.c"
+#include "../pthread_stop_world.c"
+#include "../pthread_support.c"
+#include "../specific.c"
+#include "../win32_threads.c"
+
+/* real_malloc.c, extra/MacOS.c, extra/msvc_dbg.c are not included. */
diff --git a/src/mm/boehm-gc/extra/gcname.c b/src/mm/boehm-gc/extra/gcname.c
new file mode 100644 (file)
index 0000000..55b7c9f
--- /dev/null
@@ -0,0 +1,13 @@
+#include <stdio.h>
+#include <gc.h>
+
+int main()
+{
+    if (GC_ALPHA_VERSION == GC_NOT_ALPHA) {
+       printf("gc%d.%d", GC_VERSION_MAJOR, GC_VERSION_MINOR);
+    } else {
+       printf("gc%d.%dalpha%d", GC_VERSION_MAJOR,
+                                GC_VERSION_MINOR, GC_ALPHA_VERSION);
+    }
+    return 0;
+}
diff --git a/src/mm/boehm-gc/extra/if_mach.c b/src/mm/boehm-gc/extra/if_mach.c
new file mode 100644 (file)
index 0000000..d6e0a70
--- /dev/null
@@ -0,0 +1,25 @@
+/* Conditionally execute a command based on machine and OS from gcconfig.h */
+
+# include "private/gcconfig.h"
+# include <stdio.h>
+# include <string.h>
+# include <unistd.h>
+
+int main(int argc, char **argv, char **envp)
+{
+    if (argc < 4) goto Usage;
+    if (strcmp(MACH_TYPE, argv[1]) != 0) return(0);
+    if (strcmp(OS_TYPE, "") != 0 && strcmp(argv[2], "") != 0
+        && strcmp(OS_TYPE, argv[2]) != 0) return(0);
+    fprintf(stderr, "^^^^Starting command^^^^\n");
+    fflush(stdout);
+    execvp(argv[3], argv+3);
+    perror("Couldn't execute");
+    
+Usage:
+    fprintf(stderr, "Usage: %s mach_type os_type command\n", argv[0]);
+    fprintf(stderr, "Currently mach_type = %s, os_type = %s\n",
+           MACH_TYPE, OS_TYPE);
+    return(1);
+}
+
diff --git a/src/mm/boehm-gc/extra/if_not_there.c b/src/mm/boehm-gc/extra/if_not_there.c
new file mode 100644 (file)
index 0000000..7af6fba
--- /dev/null
@@ -0,0 +1,38 @@
+/* Conditionally execute a command based if the file argv[1] doesn't exist */
+/* Except for execvp, we stick to ANSI C.                                 */
+# include "private/gcconfig.h"
+# include <stdio.h>
+# include <stdlib.h>
+# include <unistd.h>
+#ifdef __DJGPP__
+#include <dirent.h>
+#endif /* __DJGPP__ */
+
+int main(int argc, char **argv, char **envp)
+{
+    FILE * f;
+#ifdef __DJGPP__
+    DIR * d;
+#endif /* __DJGPP__ */
+    if (argc < 3) goto Usage;
+    if ((f = fopen(argv[1], "rb")) != 0
+        || (f = fopen(argv[1], "r")) != 0) {
+        fclose(f);
+        return(0);
+    }
+#ifdef __DJGPP__
+    if ((d = opendir(argv[1])) != 0) {
+           closedir(d);
+           return(0);
+    }
+#endif
+    printf("^^^^Starting command^^^^\n");
+    fflush(stdout);
+    execvp(argv[2], argv+2);
+    exit(1);
+    
+Usage:
+    fprintf(stderr, "Usage: %s file_name command\n", argv[0]);
+    return(1);
+}
+
diff --git a/src/mm/boehm-gc/extra/msvc_dbg.c b/src/mm/boehm-gc/extra/msvc_dbg.c
new file mode 100644 (file)
index 0000000..2420a44
--- /dev/null
@@ -0,0 +1,353 @@
+/*
+  Copyright (c) 2004 Andrei Polushin
+
+  Permission is hereby granted, free of charge,  to any person obtaining a copy
+  of this software and associated documentation files (the "Software"), to deal
+  in the Software without restriction,  including without limitation the rights
+  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+  copies of the Software, and to permit persons to whom the Software is
+  furnished to do so, subject to the following conditions:
+
+  The above copyright notice and this permission notice shall be included in
+  all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+  THE SOFTWARE.
+*/
+#ifndef _M_AMD64
+
+/* X86_64 is ccurrently missing some meachine-dependent code below. */
+
+#include "private/msvc_dbg.h"
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+
+#pragma pack(push, 8)
+#include <imagehlp.h>
+#pragma pack(pop)
+
+#pragma comment(lib, "dbghelp.lib")
+#pragma optimize("gy", off)
+
+#ifdef _WIN64
+       typedef ULONG_PTR ULONG_ADDR;
+#else
+       typedef ULONG     ULONG_ADDR;
+#endif
+
+static HANDLE GetSymHandle()
+{
+       static HANDLE symHandle = NULL;
+       if (!symHandle) {
+               BOOL bRet = SymInitialize(symHandle = GetCurrentProcess(), NULL, FALSE);
+               if (bRet) {
+                       DWORD dwOptions = SymGetOptions();
+                       dwOptions &= ~SYMOPT_UNDNAME;
+                       dwOptions |= SYMOPT_LOAD_LINES;
+                       SymSetOptions(dwOptions);
+               }
+       }
+       return symHandle;
+}
+
+static void* CALLBACK FunctionTableAccess(HANDLE hProcess, ULONG_ADDR dwAddrBase)
+{
+       return SymFunctionTableAccess(hProcess, dwAddrBase);
+}
+
+static ULONG_ADDR CALLBACK GetModuleBase(HANDLE hProcess, ULONG_ADDR dwAddress)
+{
+       MEMORY_BASIC_INFORMATION memoryInfo;
+       ULONG_ADDR dwAddrBase = SymGetModuleBase(hProcess, dwAddress);
+       if (dwAddrBase) {
+               return dwAddrBase;
+       }
+       if (VirtualQueryEx(hProcess, (void*)(ULONG_PTR)dwAddress, &memoryInfo, sizeof(memoryInfo))) {
+               char filePath[_MAX_PATH];
+               char curDir[_MAX_PATH];
+               char exePath[_MAX_PATH];
+               DWORD size = GetModuleFileNameA((HINSTANCE)memoryInfo.AllocationBase, filePath, sizeof(filePath));
+
+               // Save and restore current directory around SymLoadModule, see KB article Q189780
+               GetCurrentDirectoryA(sizeof(curDir), curDir);
+               GetModuleFileNameA(NULL, exePath, sizeof(exePath));
+#if defined(_MSC_VER) && _MSC_VER == 1200
+               /* use strcat for VC6 */
+               strcat(exePath, "\\..");
+#else
+               strcat_s(exePath, sizeof(exePath), "\\..");
+#endif /* _MSC_VER >= 1200 */
+               SetCurrentDirectoryA(exePath);
+#ifdef _DEBUG
+               GetCurrentDirectoryA(sizeof(exePath), exePath);
+#endif
+               SymLoadModule(hProcess, NULL, size ? filePath : NULL, NULL, (ULONG_ADDR)(ULONG_PTR)memoryInfo.AllocationBase, 0);
+               SetCurrentDirectoryA(curDir);
+       }
+       return (ULONG_ADDR)(ULONG_PTR)memoryInfo.AllocationBase;
+}
+
+static ULONG_ADDR CheckAddress(void* address)
+{
+       ULONG_ADDR dwAddress = (ULONG_ADDR)(ULONG_PTR)address;
+       GetModuleBase(GetSymHandle(), dwAddress);
+       return dwAddress;
+}
+
+size_t GetStackFrames(size_t skip, void* frames[], size_t maxFrames)
+{
+       HANDLE hProcess = GetSymHandle();
+       HANDLE hThread = GetCurrentThread();
+       CONTEXT context;
+       context.ContextFlags = CONTEXT_FULL;
+       if (!GetThreadContext(hThread, &context)) {
+               return 0;
+       }
+       // GetThreadContext might return invalid context for the current thread
+#if defined(_M_IX86)
+    __asm mov context.Ebp, ebp
+#endif
+       return GetStackFramesFromContext(hProcess, hThread, &context, skip + 1, frames, maxFrames);
+}
+
+size_t GetStackFramesFromContext(HANDLE hProcess, HANDLE hThread, CONTEXT* context, size_t skip, void* frames[], size_t maxFrames)
+{
+       size_t frameIndex;
+       DWORD machineType;
+       STACKFRAME stackFrame = { 0 };
+       stackFrame.AddrPC.Mode      = AddrModeFlat;
+#if defined(_M_IX86)
+       machineType                 = IMAGE_FILE_MACHINE_I386;
+       stackFrame.AddrPC.Offset    = context->Eip;
+       stackFrame.AddrStack.Mode   = AddrModeFlat;
+       stackFrame.AddrStack.Offset = context->Esp;
+       stackFrame.AddrFrame.Mode   = AddrModeFlat;
+       stackFrame.AddrFrame.Offset = context->Ebp;
+#elif defined(_M_MRX000)
+       machineType                 = IMAGE_FILE_MACHINE_R4000;
+       stackFrame.AddrPC.Offset    = context->Fir;
+#elif defined(_M_ALPHA)
+       machineType                 = IMAGE_FILE_MACHINE_ALPHA;
+       stackFrame.AddrPC.Offset    = (unsigned long)context->Fir;
+#elif defined(_M_PPC)
+       machineType                 = IMAGE_FILE_MACHINE_POWERPC;
+       stackFrame.AddrPC.Offset    = context->Iar;
+#elif defined(_M_IA64)
+       machineType                 = IMAGE_FILE_MACHINE_IA64;
+       stackFrame.AddrPC.Offset    = context->StIIP;
+#elif defined(_M_ALPHA64)
+       machineType                 = IMAGE_FILE_MACHINE_ALPHA64;
+       stackFrame.AddrPC.Offset    = context->Fir;
+#else
+#error Unknown CPU
+#endif
+       for (frameIndex = 0; frameIndex < maxFrames; ) {
+               BOOL bRet = StackWalk(machineType, hProcess, hThread, &stackFrame, &context, NULL, FunctionTableAccess, GetModuleBase, NULL);
+               if (!bRet) {
+                       break;
+               }
+               if (skip) {
+                       skip--;
+               } else {
+                       frames[frameIndex++] = (void*)(ULONG_PTR)stackFrame.AddrPC.Offset;
+               }
+       }
+       return frameIndex;
+}
+
+size_t GetModuleNameFromAddress(void* address, char* moduleName, size_t size)
+{
+       if (size) *moduleName = 0;
+       {
+               const char* sourceName;
+               IMAGEHLP_MODULE moduleInfo = { sizeof (moduleInfo) };
+               if (!SymGetModuleInfo(GetSymHandle(), CheckAddress(address), &moduleInfo)) {
+                       return 0;
+               }
+               sourceName = strrchr(moduleInfo.ImageName, '\\');
+               if (sourceName) {
+                       sourceName++;
+               } else {
+                       sourceName = moduleInfo.ImageName;
+               }
+               if (size) {
+                       strncpy(moduleName, sourceName, size)[size - 1] = 0;
+               }
+               return strlen(sourceName);
+       }
+}
+
+size_t GetModuleNameFromStack(size_t skip, char* moduleName, size_t size)
+{
+       void* address = NULL;
+       GetStackFrames(skip + 1, &address, 1);
+       if (address) {
+               return GetModuleNameFromAddress(address, moduleName, size);
+       }
+       return 0;
+}
+
+size_t GetSymbolNameFromAddress(void* address, char* symbolName, size_t size, size_t* offsetBytes)
+{
+       if (size) *symbolName = 0;
+       if (offsetBytes) *offsetBytes = 0;
+       __try {
+               ULONG_ADDR dwOffset = 0;
+               union {
+                       IMAGEHLP_SYMBOL sym;
+                       char symNameBuffer[sizeof(IMAGEHLP_SYMBOL) + MAX_SYM_NAME];
+               } u;
+               u.sym.SizeOfStruct  = sizeof(u.sym);
+               u.sym.MaxNameLength = sizeof(u.symNameBuffer) - sizeof(u.sym);
+
+               if (!SymGetSymFromAddr(GetSymHandle(), CheckAddress(address), &dwOffset, &u.sym)) {
+                       return 0;
+               } else {
+                       const char* sourceName = u.sym.Name;
+                       char undName[1024];
+                       if (UnDecorateSymbolName(u.sym.Name, undName, sizeof(undName), UNDNAME_NO_MS_KEYWORDS | UNDNAME_NO_ACCESS_SPECIFIERS)) {
+                               sourceName = undName;
+                       } else if (SymUnDName(&u.sym, undName, sizeof(undName))) {
+                               sourceName = undName;
+                       }
+                       if (offsetBytes) {
+                               *offsetBytes = dwOffset;
+                       }
+                       if (size) {
+                               strncpy(symbolName, sourceName, size)[size - 1] = 0;
+                       }
+                       return strlen(sourceName);
+               }
+       } __except (EXCEPTION_EXECUTE_HANDLER) {
+               SetLastError(GetExceptionCode());
+       }
+       return 0;
+}
+
+size_t GetSymbolNameFromStack(size_t skip, char* symbolName, size_t size, size_t* offsetBytes)
+{
+       void* address = NULL;
+       GetStackFrames(skip + 1, &address, 1);
+       if (address) {
+               return GetSymbolNameFromAddress(address, symbolName, size, offsetBytes);
+       }
+       return 0;
+}
+
+size_t GetFileLineFromAddress(void* address, char* fileName, size_t size, size_t* lineNumber, size_t* offsetBytes)
+{
+       if (size) *fileName = 0;
+       if (lineNumber) *lineNumber = 0;
+       if (offsetBytes) *offsetBytes = 0;
+       {
+               char* sourceName;
+               IMAGEHLP_LINE line = { sizeof (line) };
+               ULONG_PTR dwOffset = 0;
+               if (!SymGetLineFromAddr(GetSymHandle(), CheckAddress(address), &dwOffset, &line)) {
+                       return 0;
+               }
+               if (lineNumber) {
+                       *lineNumber = line.LineNumber;
+               }
+               if (offsetBytes) {
+                       *offsetBytes = dwOffset;
+               }
+               sourceName = line.FileName;
+               // TODO: resolve relative filenames, found in 'source directories' registered with MSVC IDE.
+               if (size) {
+                       strncpy(fileName, sourceName, size)[size - 1] = 0;
+               }
+               return strlen(sourceName);
+       }
+}
+
+size_t GetFileLineFromStack(size_t skip, char* fileName, size_t size, size_t* lineNumber, size_t* offsetBytes)
+{
+       void* address = NULL;
+       GetStackFrames(skip + 1, &address, 1);
+       if (address) {
+               return GetFileLineFromAddress(address, fileName, size, lineNumber, offsetBytes);
+       }
+       return 0;
+}
+
+size_t GetDescriptionFromAddress(void* address, const char* format, char* buffer, size_t size)
+{
+       char*const begin = buffer;
+       char*const end = buffer + size;
+       size_t line_number = 0;
+       char   str[128];
+
+       if (size) {
+               *buffer = 0;
+       }
+       buffer += GetFileLineFromAddress(address, buffer, size, &line_number, NULL);
+       size = end < buffer ? 0 : end - buffer;
+
+       if (line_number) {
+               wsprintf(str, "(%d) : ", line_number);
+               if (size) {
+                       strncpy(buffer, str, size)[size - 1] = 0;
+               }
+               buffer += strlen(str);
+               size = end < buffer ? 0 : end - buffer;
+       }
+
+       if (size) {
+               strncpy(buffer, "at ", size)[size - 1] = 0;
+       }
+       buffer += strlen("at ");
+       size = end < buffer ? 0 : end - buffer;
+
+       buffer += GetSymbolNameFromAddress(address, buffer, size, NULL);
+       size = end < buffer ? 0 : end - buffer;
+
+       if (size) {
+               strncpy(buffer, " in ", size)[size - 1] = 0;
+       }
+       buffer += strlen(" in ");
+       size = end < buffer ? 0 : end - buffer;
+       
+       buffer += GetModuleNameFromAddress(address, buffer, size);
+       size = end < buffer ? 0 : end - buffer;
+       
+       return buffer - begin;
+}
+
+size_t GetDescriptionFromStack(void*const frames[], size_t count, const char* format, char* description[], size_t size)
+{
+       char*const begin = (char*)description;
+       char*const end = begin + size;
+       char* buffer = begin + (count + 1) * sizeof(char*);
+       size_t i;
+       for (i = 0; i < count; ++i) {
+               if (description) description[i] = buffer;
+               size = end < buffer ? 0 : end - buffer;
+               buffer += 1 + GetDescriptionFromAddress(frames[i], NULL, buffer, size);
+       }
+       if (description) description[count] = NULL;
+       return buffer - begin;
+}
+
+/* Compatibility with <execinfo.h> */
+
+int backtrace(void* addresses[], int count)
+{
+       return GetStackFrames(1, addresses, count);
+}
+
+char** backtrace_symbols(void*const* addresses, int count)
+{
+       size_t size = GetDescriptionFromStack(addresses, count, NULL, NULL, 0);
+       char** symbols = (char**)malloc(size);
+       GetDescriptionFromStack(addresses, count, NULL, symbols, size);
+       return symbols;
+}
+
+#endif /* !_M_AMD64 */
diff --git a/src/mm/boehm-gc/extra/setjmp_t.c b/src/mm/boehm-gc/extra/setjmp_t.c
new file mode 100644 (file)
index 0000000..5a171df
--- /dev/null
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+/* Check whether setjmp actually saves registers in jmp_buf. */
+/* If it doesn't, the generic mark_regs code won't work.     */
+/* Compilers vary as to whether they will put x in a        */
+/* (callee-save) register without -O.  The code is          */
+/* contrived such that any decent compiler should put x in   */
+/* a callee-save register with -O.  Thus it is is           */
+/* recommended that this be run optimized.  (If the machine  */
+/* has no callee-save registers, then the generic code is    */
+/* safe, but this will not be noticed by this piece of       */
+/* code.)  This test appears to be far from perfect.        */
+#include <stdio.h>
+#include <setjmp.h>
+#include <string.h>
+#include "private/gc_priv.h"
+
+#ifdef OS2
+/* GETPAGESIZE() is set to getpagesize() by default, but that  */
+/* doesn't really exist, and the collector doesn't need it.    */
+#define INCL_DOSFILEMGR
+#define INCL_DOSMISC
+#define INCL_DOSERRORS
+#include <os2.h>
+
+int
+getpagesize()
+{
+    ULONG result[1];
+    
+    if (DosQuerySysInfo(QSV_PAGE_SIZE, QSV_PAGE_SIZE,
+                       (void *)result, sizeof(ULONG)) != NO_ERROR) {
+       fprintf(stderr, "DosQuerySysInfo failed\n");
+       result[0] = 4096;
+    }
+    return((int)(result[0]));
+}
+#endif
+
+struct {char a_a; char * a_b;} a;
+
+int * nested_sp()
+{
+    int dummy;
+    
+    return(&dummy);
+}
+
+int main()
+{
+       int dummy;
+       long ps = GETPAGESIZE();
+       jmp_buf b;
+       register int x = (int)strlen("a");  /* 1, slightly disguised */
+       static int y = 0;
+
+       printf("This appears to be a %s running %s\n", MACH_TYPE, OS_TYPE);
+       if (nested_sp() < &dummy) {
+         printf("Stack appears to grow down, which is the default.\n");
+         printf("A good guess for STACKBOTTOM on this machine is 0x%lx.\n",
+                ((unsigned long)(&dummy) + ps) & ~(ps-1));
+       } else {
+         printf("Stack appears to grow up.\n");
+         printf("Define STACK_GROWS_UP in gc_private.h\n");
+         printf("A good guess for STACKBOTTOM on this machine is 0x%lx.\n",
+                ((unsigned long)(&dummy) + ps) & ~(ps-1));
+       }
+       printf("Note that this may vary between machines of ostensibly\n");
+       printf("the same architecture (e.g. Sun 3/50s and 3/80s).\n");
+       printf("On many machines the value is not fixed.\n");
+       printf("A good guess for ALIGNMENT on this machine is %ld.\n",
+              (unsigned long)(&(a.a_b))-(unsigned long)(&a));
+       
+       printf("The following is a very dubious test of one root marking"
+              " strategy.\n");
+       printf("Results may not be accurate/useful:\n");
+       /* Encourage the compiler to keep x in a callee-save register */
+       x = 2*x-1;
+       printf("");
+       x = 2*x-1;
+       setjmp(b);
+       if (y == 1) {
+           if (x == 2) {
+               printf("Setjmp-based generic mark_regs code probably wont work.\n");
+               printf("But we rarely try that anymore.  If you have getcontect()\n");
+               printf("this probably doesn't matter.\n");
+           } else if (x == 1) {
+               printf("Setjmp-based register marking code may work.\n");
+           } else {
+               printf("Very strange setjmp implementation.\n");
+           }
+       }
+       y++;
+       x = 2;
+       if (y == 1) longjmp(b,1);
+       printf("Some GC internal configuration stuff: \n");
+       printf("\tWORDSZ = %d, ALIGNMENT = %d, GC_GRANULE_BYTES = %d\n",
+              WORDSZ, ALIGNMENT, GC_GRANULE_BYTES);
+       printf("\tUsing one mark ");
+#       if defined(USE_MARK_BYTES)
+         printf("byte");
+#      elif defined(USE_MARK_BITS)
+         printf("bit");
+#       endif
+       printf(" per ");
+#       if defined(MARK_BIT_PER_OBJ)
+         printf("object.\n");
+#      elif defined(MARK_BIT_PER_GRANULE)
+         printf("granule.\n");
+#      endif
+#      ifdef THREAD_LOCAL_ALLOC
+         printf("Thread local allocation enabled.\n");
+#      endif
+#      ifdef PARALLEL_MARK
+         printf("Parallel marking enabled.\n");
+#      endif
+       return(0);
+}
+
+int g(x)
+int x;
+{
+       return(x);
+}
diff --git a/src/mm/boehm-gc/extra/threadlibs.c b/src/mm/boehm-gc/extra/threadlibs.c
new file mode 100644 (file)
index 0000000..b14b8a7
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
+ * Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
+ * All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
+# include "gc_config_macros.h"
+# include "private/gcconfig.h"
+
+# include <stdio.h>
+
+int main(void)
+{
+#   if defined(GC_USE_LD_WRAP)
+        printf("-Wl,--wrap -Wl,dlopen "
+               "-Wl,--wrap -Wl,pthread_create -Wl,--wrap -Wl,pthread_join "
+               "-Wl,--wrap -Wl,pthread_detach "
+               "-Wl,--wrap -Wl,pthread_sigmask -Wl,--wrap -Wl,sleep\n");
+#   endif
+#   if defined(GC_LINUX_THREADS) || defined(GC_IRIX_THREADS) \
+        || defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS) \
+        || defined(GC_GNU_THREADS)
+#       ifdef GC_USE_DLOPEN_WRAP
+          printf("-ldl ");
+#       endif
+        printf("-lpthread\n");
+#   endif
+#   if defined(GC_OPENBSD_THREADS)
+        printf("-pthread\n");
+#   endif
+#   if defined(GC_FREEBSD_THREADS)
+#       ifdef GC_USE_DLOPEN_WRAP
+          printf("-ldl ");
+#       endif
+#       if (__FREEBSD_version >= 500000)
+          printf("-lpthread\n");
+#       else
+          printf("-pthread\n");
+#       endif
+#   endif
+#   if defined(GC_NETBSD_THREADS)
+          printf("-lpthread -lrt\n");
+#   endif
+
+#   if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS)
+        printf("-lpthread -lrt\n");
+#   endif
+#   if defined(GC_SOLARIS_THREADS)
+        printf("-lthread -lposix4\n");
+                /* Is this right for recent versions? */
+#   endif
+#   if defined(GC_WIN32_THREADS) && defined(CYGWIN32)
+        printf("-lpthread\n");
+#   endif
+#   if defined(GC_WIN32_PTHREADS)
+#      ifdef PTW32_STATIC_LIB
+         /* assume suffix s for static version of the win32 pthread library */
+         printf("-lpthreadGC2s -lws2_32\n");
+#      else
+         printf("-lpthreadGC2\n");
+#      endif
+#   endif
+#   if defined(GC_OSF1_THREADS)
+        printf("-pthread -lrt"); /* DOB: must be -pthread, not -lpthread */
+#   endif
+    /* You need GCC 3.0.3 to build this one!            */
+    /* DG/UX native gcc doesn't know what "-pthread" is */
+#   if defined(GC_DGUX386_THREADS)
+        printf("-ldl -pthread\n");
+#   endif
+    return 0;
+}
index 4e6d56778425c4ab24fe0ac1a7b47ead3b7810de..04521c19ccd2435ab7826b08718726c92bdd9d34 100644 (file)
  * provided the above notices are retained, and a notice that the code was
  * modified is included with the above copyright notice.
  */
-/* Boehm, February 1, 1996 1:19 pm PST */
-# define I_HIDE_POINTERS
-# include "private/gc_pmark.h"
-
-# ifdef FINALIZE_ON_DEMAND
-    int GC_finalize_on_demand = 1;
-# else
-    int GC_finalize_on_demand = 0;
-# endif
-
-# ifdef JAVA_FINALIZATION
-    int GC_java_finalization = 1;
-# else
-    int GC_java_finalization = 0;
-# endif
-
-/* Type of mark procedure used for marking from finalizable object.    */
-/* This procedure normally does not mark the object, only its          */
-/* descendents.                                                                */
+
+#include "private/gc_pmark.h"
+
+#ifdef FINALIZE_ON_DEMAND
+  int GC_finalize_on_demand = 1;
+#else
+  int GC_finalize_on_demand = 0;
+#endif
+
+#ifdef JAVA_FINALIZATION
+  int GC_java_finalization = 1;
+#else
+  int GC_java_finalization = 0;
+#endif
+
+/* Type of mark procedure used for marking from finalizable object.     */
+/* This procedure normally does not mark the object, only its           */
+/* descendents.                                                         */
 typedef void (* finalization_mark_proc)(ptr_t /* finalizable_obj_ptr */);
 
-# define HASH3(addr,size,log_size) \
-    ((((word)(addr) >> 3) ^ ((word)(addr) >> (3+(log_size)))) \
-    & ((size) - 1))
+#define HASH3(addr,size,log_size) \
+        ((((word)(addr) >> 3) ^ ((word)(addr) >> (3 + (log_size)))) \
+         & ((size) - 1))
 #define HASH2(addr,log_size) HASH3(addr, 1 << log_size, log_size)
 
 struct hash_chain_entry {
@@ -47,58 +46,58 @@ struct hash_chain_entry {
 static struct disappearing_link {
     struct hash_chain_entry prolog;
 #   define dl_hidden_link prolog.hidden_key
-                               /* Field to be cleared.         */
+                                /* Field to be cleared.         */
 #   define dl_next(x) (struct disappearing_link *)((x) -> prolog.next)
-#   define dl_set_next(x,y) (x) -> prolog.next = (struct hash_chain_entry *)(y)
+#   define dl_set_next(x,y) (x)->prolog.next = (struct hash_chain_entry *)(y)
 
-    word dl_hidden_obj;                /* Pointer to object base       */
+    word dl_hidden_obj;         /* Pointer to object base       */
 } **dl_head = 0;
 
 static signed_word log_dl_table_size = -1;
-                       /* Binary log of                                */
-                       /* current size of array pointed to by dl_head. */
-                       /* -1 ==> size is 0.                            */
+                        /* Binary log of                                */
+                        /* current size of array pointed to by dl_head. */
+                        /* -1 ==> size is 0.                            */
 
 STATIC word GC_dl_entries = 0;
-                       /* Number of entries currently in disappearing  */
-                       /* link table.                                  */
+                        /* Number of entries currently in disappearing  */
+                        /* link table.                                  */
 
 static struct finalizable_object {
     struct hash_chain_entry prolog;
 #   define fo_hidden_base prolog.hidden_key
-                               /* Pointer to object base.      */
-                               /* No longer hidden once object */
-                               /* is on finalize_now queue.    */
+                                /* Pointer to object base.      */
+                                /* No longer hidden once object */
+                                /* is on finalize_now queue.    */
 #   define fo_next(x) (struct finalizable_object *)((x) -> prolog.next)
-#   define fo_set_next(x,y) (x) -> prolog.next = (struct hash_chain_entry *)(y)
-    GC_finalization_proc fo_fn;        /* Finalizer.                   */
+#   define fo_set_next(x,y) (x)->prolog.next = (struct hash_chain_entry *)(y)
+    GC_finalization_proc fo_fn; /* Finalizer.                   */
     ptr_t fo_client_data;
-    word fo_object_size;       /* In bytes.                    */
-    finalization_mark_proc fo_mark_proc;       /* Mark-through procedure */
+    word fo_object_size;        /* In bytes.                    */
+    finalization_mark_proc fo_mark_proc;        /* Mark-through procedure */
 } **fo_head = 0;
 
 STATIC struct finalizable_object * GC_finalize_now = 0;
-       /* List of objects that should be finalized now.        */
+        /* List of objects that should be finalized now.        */
 
 static signed_word log_fo_table_size = -1;
 
-word GC_fo_entries = 0;
+word GC_fo_entries = 0; /* used also in extra/MacOS.c */
 
-void GC_push_finalizer_structures(void)
+GC_INNER void GC_push_finalizer_structures(void)
 {
     GC_push_all((ptr_t)(&dl_head), (ptr_t)(&dl_head) + sizeof(word));
     GC_push_all((ptr_t)(&fo_head), (ptr_t)(&fo_head) + sizeof(word));
     GC_push_all((ptr_t)(&GC_finalize_now),
-               (ptr_t)(&GC_finalize_now) + sizeof(word));
+                (ptr_t)(&GC_finalize_now) + sizeof(word));
 }
 
-/* Double the size of a hash table. *size_ptr is the log of its current        */
-/* size.  May be a no-op.                                              */
-/* *table is a pointer to an array of hash headers.  If we succeed, we */
-/* update both *table and *log_size_ptr.                               */
-/* Lock is held.                                                       */
+/* Double the size of a hash table. *size_ptr is the log of its current */
+/* size.  May be a no-op.                                               */
+/* *table is a pointer to an array of hash headers.  If we succeed, we  */
+/* update both *table and *log_size_ptr.                                */
+/* Lock is held.                                                        */
 STATIC void GC_grow_table(struct hash_chain_entry ***table,
-                         signed_word *log_size_ptr)
+                          signed_word *log_size_ptr)
 {
     register word i;
     register struct hash_chain_entry *p;
@@ -108,23 +107,23 @@ STATIC void GC_grow_table(struct hash_chain_entry ***table,
     word new_size = (word)1 << log_new_size;
     /* FIXME: Power of 2 size often gets rounded up to one more page. */
     struct hash_chain_entry **new_table = (struct hash_chain_entry **)
-       GC_INTERNAL_MALLOC_IGNORE_OFF_PAGE(
-               (size_t)new_size * sizeof(struct hash_chain_entry *), NORMAL);
-    
+        GC_INTERNAL_MALLOC_IGNORE_OFF_PAGE(
+                (size_t)new_size * sizeof(struct hash_chain_entry *), NORMAL);
+
     if (new_table == 0) {
-       if (*table == 0) {
-           ABORT("Insufficient space for initial table allocation");
-       } else {
-           return;
-       }
+        if (*table == 0) {
+            ABORT("Insufficient space for initial table allocation");
+        } else {
+            return;
+        }
     }
     for (i = 0; i < old_size; i++) {
       p = (*table)[i];
       while (p != 0) {
-        ptr_t real_key = (ptr_t)REVEAL_POINTER(p -> hidden_key);
+        ptr_t real_key = GC_REVEAL_POINTER(p -> hidden_key);
         struct hash_chain_entry *next = p -> next;
         size_t new_hash = HASH3(real_key, new_size, log_new_size);
-        
+
         p -> next = new_table[new_hash];
         new_table[new_hash] = p;
         p = next;
@@ -137,71 +136,77 @@ STATIC void GC_grow_table(struct hash_chain_entry ***table,
 GC_API int GC_CALL GC_register_disappearing_link(void * * link)
 {
     ptr_t base;
-    
+
     base = (ptr_t)GC_base((void *)link);
     if (base == 0)
-       ABORT("Bad arg to GC_register_disappearing_link");
+        ABORT("Bad arg to GC_register_disappearing_link");
     return(GC_general_register_disappearing_link(link, base));
 }
 
 GC_API int GC_CALL GC_general_register_disappearing_link(void * * link,
-                                                       void * obj)
+                                                         void * obj)
 {
     struct disappearing_link *curr_dl;
     size_t index;
     struct disappearing_link * new_dl;
     DCL_LOCK_STATE;
-    
+
     if (((word)link & (ALIGNMENT-1)) || link == NULL)
-       ABORT("Bad arg to GC_general_register_disappearing_link");
-#   ifdef THREADS
-       LOCK();
-#   endif
+        ABORT("Bad arg to GC_general_register_disappearing_link");
+    LOCK();
     GC_ASSERT(obj != NULL && GC_base(obj) == obj);
     if (log_dl_table_size == -1
         || GC_dl_entries > ((word)1 << log_dl_table_size)) {
-       GC_grow_table((struct hash_chain_entry ***)(&dl_head),
-                     &log_dl_table_size);
-       if (GC_print_stats) {
-           GC_log_printf("Grew dl table to %u entries\n",
-                     (1 << (unsigned)log_dl_table_size));
-       }
+        GC_grow_table((struct hash_chain_entry ***)(&dl_head),
+                      &log_dl_table_size);
+        if (GC_print_stats) {
+            GC_log_printf("Grew dl table to %u entries\n",
+                      (1 << (unsigned)log_dl_table_size));
+        }
     }
     index = HASH2(link, log_dl_table_size);
     for (curr_dl = dl_head[index]; curr_dl != 0; curr_dl = dl_next(curr_dl)) {
-        if (curr_dl -> dl_hidden_link == HIDE_POINTER(link)) {
-            curr_dl -> dl_hidden_obj = HIDE_POINTER(obj);
-#          ifdef THREADS
-                UNLOCK();
-#          endif
-            return(1);
+        if (curr_dl -> dl_hidden_link == GC_HIDE_POINTER(link)) {
+            curr_dl -> dl_hidden_obj = GC_HIDE_POINTER(obj);
+            UNLOCK();
+            return GC_DUPLICATE;
         }
     }
     new_dl = (struct disappearing_link *)
-       GC_INTERNAL_MALLOC(sizeof(struct disappearing_link),NORMAL);
+        GC_INTERNAL_MALLOC(sizeof(struct disappearing_link),NORMAL);
     if (0 == new_dl) {
-#     ifdef THREADS
-       UNLOCK();
-#     endif
+      GC_oom_func oom_fn = GC_oom_fn;
+      UNLOCK();
       new_dl = (struct disappearing_link *)
-             GC_oom_fn(sizeof(struct disappearing_link));
+                (*oom_fn)(sizeof(struct disappearing_link));
       if (0 == new_dl) {
-       return(2);
+        return GC_NO_MEMORY;
       }
       /* It's not likely we'll make it here, but ... */
-#     ifdef THREADS
-       LOCK();
-#     endif
+      LOCK();
+      /* Recalculate index since the table may grow.    */
+      index = HASH2(link, log_dl_table_size);
+      /* Check again that our disappearing link not in the table. */
+      for (curr_dl = dl_head[index]; curr_dl != 0;
+           curr_dl = dl_next(curr_dl)) {
+        if (curr_dl -> dl_hidden_link == GC_HIDE_POINTER(link)) {
+          curr_dl -> dl_hidden_obj = GC_HIDE_POINTER(obj);
+          UNLOCK();
+#         ifndef DBG_HDRS_ALL
+            /* Free unused new_dl returned by GC_oom_fn() */
+            GC_free((void *)new_dl);
+#         endif
+          return GC_DUPLICATE;
+        }
+      }
     }
-    new_dl -> dl_hidden_obj = HIDE_POINTER(obj);
-    new_dl -> dl_hidden_link = HIDE_POINTER(link);
+    new_dl -> dl_hidden_obj = GC_HIDE_POINTER(obj);
+    new_dl -> dl_hidden_link = GC_HIDE_POINTER(link);
     dl_set_next(new_dl, dl_head[index]);
     dl_head[index] = new_dl;
     GC_dl_entries++;
-#   ifdef THREADS
-        UNLOCK();
-#   endif
-    return(0);
+    UNLOCK();
+    return GC_SUCCESS;
 }
 
 GC_API int GC_CALL GC_unregister_disappearing_link(void * * link)
@@ -209,14 +214,14 @@ GC_API int GC_CALL GC_unregister_disappearing_link(void * * link)
     struct disappearing_link *curr_dl, *prev_dl;
     size_t index;
     DCL_LOCK_STATE;
-    
+
     if (((word)link & (ALIGNMENT-1)) != 0) return(0); /* Nothing to do. */
 
     LOCK();
     index = HASH2(link, log_dl_table_size);
     prev_dl = 0; curr_dl = dl_head[index];
     while (curr_dl != 0) {
-        if (curr_dl -> dl_hidden_link == HIDE_POINTER(link)) {
+        if (curr_dl -> dl_hidden_link == GC_HIDE_POINTER(link)) {
             if (prev_dl == 0) {
                 dl_head[index] = dl_next(curr_dl);
             } else {
@@ -224,11 +229,11 @@ GC_API int GC_CALL GC_unregister_disappearing_link(void * * link)
             }
             GC_dl_entries--;
             UNLOCK();
-#          ifdef DBG_HDRS_ALL
-             dl_set_next(curr_dl, 0);
-#          else
+#           ifdef DBG_HDRS_ALL
+              dl_set_next(curr_dl, 0);
+#           else
               GC_free((void *)curr_dl);
-#          endif
+#           endif
             return(1);
         }
         prev_dl = curr_dl;
@@ -238,19 +243,19 @@ GC_API int GC_CALL GC_unregister_disappearing_link(void * * link)
     return(0);
 }
 
-/* Possible finalization_marker procedures.  Note that mark stack      */
-/* overflow is handled by the caller, and is not a disaster.           */
+/* Possible finalization_marker procedures.  Note that mark stack       */
+/* overflow is handled by the caller, and is not a disaster.            */
 STATIC void GC_normal_finalize_mark_proc(ptr_t p)
 {
     hdr * hhdr = HDR(p);
-    
+
     PUSH_OBJ(p, hhdr, GC_mark_stack_top,
-            &(GC_mark_stack[GC_mark_stack_size]));
+             &(GC_mark_stack[GC_mark_stack_size]));
 }
 
-/* This only pays very partial attention to the mark descriptor.       */
-/* It does the right thing for normal and atomic objects, and treats   */
-/* most others as normal.                                              */
+/* This only pays very partial attention to the mark descriptor.        */
+/* It does the right thing for normal and atomic objects, and treats    */
+/* most others as normal.                                               */
 STATIC void GC_ignore_self_finalize_mark_proc(ptr_t p)
 {
     hdr * hhdr = HDR(p);
@@ -259,150 +264,154 @@ STATIC void GC_ignore_self_finalize_mark_proc(ptr_t p)
     word r;
     ptr_t scan_limit;
     ptr_t target_limit = p + hhdr -> hb_sz - 1;
-    
+
     if ((descr & GC_DS_TAGS) == GC_DS_LENGTH) {
        scan_limit = p + descr - sizeof(word);
     } else {
        scan_limit = target_limit + 1 - sizeof(word);
     }
     for (q = p; q <= scan_limit; q += ALIGNMENT) {
-       r = *(word *)q;
-       if ((ptr_t)r < p || (ptr_t)r > target_limit) {
-           GC_PUSH_ONE_HEAP(r, q);
-       }
+        r = *(word *)q;
+        if ((ptr_t)r < p || (ptr_t)r > target_limit) {
+            GC_PUSH_ONE_HEAP(r, q);
+        }
     }
 }
 
 /*ARGSUSED*/
-STATIC void GC_null_finalize_mark_proc(ptr_t p)
-{
-}
+STATIC void GC_null_finalize_mark_proc(ptr_t p) {}
 
-/* Possible finalization_marker procedures.  Note that mark stack      */
-/* overflow is handled by the caller, and is not a disaster.           */
+/* Possible finalization_marker procedures.  Note that mark stack       */
+/* overflow is handled by the caller, and is not a disaster.            */
 
-/* GC_unreachable_finalize_mark_proc is an alias for normal marking,   */
-/* but it is explicitly tested for, and triggers different             */
-/* behavior.  Objects registered in this way are not finalized         */
-/* if they are reachable by other finalizable objects, even if those   */
-/* other objects specify no ordering.                                  */
+/* GC_unreachable_finalize_mark_proc is an alias for normal marking,    */
+/* but it is explicitly tested for, and triggers different              */
+/* behavior.  Objects registered in this way are not finalized          */
+/* if they are reachable by other finalizable objects, even if those    */
+/* other objects specify no ordering.                                   */
 STATIC void GC_unreachable_finalize_mark_proc(ptr_t p)
 {
     GC_normal_finalize_mark_proc(p);
 }
 
-
-
-/* Register a finalization function.  See gc.h for details.    */
-/* The last parameter is a procedure that determines           */
-/* marking for finalization ordering.  Any objects marked      */
-/* by that procedure will be guaranteed to not have been       */
-/* finalized when this finalizer is invoked.                   */
+/* Register a finalization function.  See gc.h for details.     */
+/* The last parameter is a procedure that determines            */
+/* marking for finalization ordering.  Any objects marked       */
+/* by that procedure will be guaranteed to not have been        */
+/* finalized when this finalizer is invoked.                    */
 STATIC void GC_register_finalizer_inner(void * obj,
-                                       GC_finalization_proc fn, void *cd,
-                                       GC_finalization_proc *ofn, void **ocd,
-                                       finalization_mark_proc mp)
+                                        GC_finalization_proc fn, void *cd,
+                                        GC_finalization_proc *ofn, void **ocd,
+                                        finalization_mark_proc mp)
 {
     ptr_t base;
     struct finalizable_object * curr_fo, * prev_fo;
     size_t index;
-    struct finalizable_object *new_fo;
-    hdr *hhdr;
+    struct finalizable_object *new_fo = 0;
+    hdr *hhdr = NULL; /* initialized to prevent warning. */
+    GC_oom_func oom_fn;
     DCL_LOCK_STATE;
 
-#   ifdef THREADS
-       LOCK();
-#   endif
+    LOCK();
     if (log_fo_table_size == -1
         || GC_fo_entries > ((word)1 << log_fo_table_size)) {
-       GC_grow_table((struct hash_chain_entry ***)(&fo_head),
-                     &log_fo_table_size);
-       if (GC_print_stats) {
-           GC_log_printf("Grew fo table to %u entries\n",
-                         (1 << (unsigned)log_fo_table_size));
-       }
+        GC_grow_table((struct hash_chain_entry ***)(&fo_head),
+                      &log_fo_table_size);
+        if (GC_print_stats) {
+            GC_log_printf("Grew fo table to %u entries\n",
+                          (1 << (unsigned)log_fo_table_size));
+        }
     }
-    /* in the THREADS case we hold allocation lock.            */
+    /* in the THREADS case we hold allocation lock.             */
     base = (ptr_t)obj;
-    index = HASH2(base, log_fo_table_size);
-    prev_fo = 0; curr_fo = fo_head[index];
-    while (curr_fo != 0) {
+    for (;;) {
+      index = HASH2(base, log_fo_table_size);
+      prev_fo = 0; curr_fo = fo_head[index];
+      while (curr_fo != 0) {
         GC_ASSERT(GC_size(curr_fo) >= sizeof(struct finalizable_object));
-        if (curr_fo -> fo_hidden_base == HIDE_POINTER(base)) {
-            /* Interruption by a signal in the middle of this  */
-            /* should be safe.  The client may see only *ocd   */
-            /* updated, but we'll declare that to be his       */
-            /* problem.                                                */
-            if (ocd) *ocd = (void *) (curr_fo -> fo_client_data);
-            if (ofn) *ofn = curr_fo -> fo_fn;
-            /* Delete the structure for base. */
-                if (prev_fo == 0) {
-                  fo_head[index] = fo_next(curr_fo);
-                } else {
-                  fo_set_next(prev_fo, fo_next(curr_fo));
-                }
-            if (fn == 0) {
-                GC_fo_entries--;
-                  /* May not happen if we get a signal.  But a high    */
-                  /* estimate will only make the table larger than     */
-                  /* necessary.                                                */
-#              if !defined(THREADS) && !defined(DBG_HDRS_ALL)
-                  GC_free((void *)curr_fo);
-#              endif
+        if (curr_fo -> fo_hidden_base == GC_HIDE_POINTER(base)) {
+          /* Interruption by a signal in the middle of this     */
+          /* should be safe.  The client may see only *ocd      */
+          /* updated, but we'll declare that to be his problem. */
+          if (ocd) *ocd = (void *) (curr_fo -> fo_client_data);
+          if (ofn) *ofn = curr_fo -> fo_fn;
+          /* Delete the structure for base. */
+          if (prev_fo == 0) {
+            fo_head[index] = fo_next(curr_fo);
+          } else {
+            fo_set_next(prev_fo, fo_next(curr_fo));
+          }
+          if (fn == 0) {
+            GC_fo_entries--;
+            /* May not happen if we get a signal.  But a high   */
+            /* estimate will only make the table larger than    */
+            /* necessary.                                       */
+#           if !defined(THREADS) && !defined(DBG_HDRS_ALL)
+              GC_free((void *)curr_fo);
+#           endif
+          } else {
+            curr_fo -> fo_fn = fn;
+            curr_fo -> fo_client_data = (ptr_t)cd;
+            curr_fo -> fo_mark_proc = mp;
+            /* Reinsert it.  We deleted it first to maintain    */
+            /* consistency in the event of a signal.            */
+            if (prev_fo == 0) {
+              fo_head[index] = curr_fo;
             } else {
-                curr_fo -> fo_fn = fn;
-                curr_fo -> fo_client_data = (ptr_t)cd;
-                curr_fo -> fo_mark_proc = mp;
-               /* Reinsert it.  We deleted it first to maintain        */
-               /* consistency in the event of a signal.                */
-               if (prev_fo == 0) {
-                  fo_head[index] = curr_fo;
-                } else {
-                  fo_set_next(prev_fo, curr_fo);
-                }
+              fo_set_next(prev_fo, curr_fo);
             }
-#          ifdef THREADS
-                UNLOCK();
-#          endif
-            return;
+          }
+          UNLOCK();
+#         ifndef DBG_HDRS_ALL
+            if (EXPECT(new_fo != 0, FALSE)) {
+              /* Free unused new_fo returned by GC_oom_fn() */
+              GC_free((void *)new_fo);
+            }
+#         endif
+          return;
         }
         prev_fo = curr_fo;
         curr_fo = fo_next(curr_fo);
-    }
-    if (ofn) *ofn = 0;
-    if (ocd) *ocd = 0;
-    if (fn == 0) {
-#      ifdef THREADS
-            UNLOCK();
-#      endif
+      }
+      if (EXPECT(new_fo != 0, FALSE)) {
+        /* new_fo is returned GC_oom_fn(), so fn != 0 and hhdr != 0.    */
+        break;
+      }
+      if (fn == 0) {
+        if (ocd) *ocd = 0;
+        if (ofn) *ofn = 0;
+        UNLOCK();
         return;
-    }
-    GET_HDR(base, hhdr);
-    if (0 == hhdr) {
-      /* We won't collect it, hence finalizer wouldn't be run. */
-#     ifdef THREADS
-          UNLOCK();
-#     endif
-      return;
-    }
-    new_fo = (struct finalizable_object *)
-       GC_INTERNAL_MALLOC(sizeof(struct finalizable_object),NORMAL);
-    if (EXPECT(0 == new_fo, FALSE)) {
-#     ifdef THREADS
-       UNLOCK();
-#     endif
+      }
+      GET_HDR(base, hhdr);
+      if (EXPECT(0 == hhdr, FALSE)) {
+        /* We won't collect it, hence finalizer wouldn't be run. */
+        if (ocd) *ocd = 0;
+        if (ofn) *ofn = 0;
+        UNLOCK();
+        return;
+      }
       new_fo = (struct finalizable_object *)
-             GC_oom_fn(sizeof(struct finalizable_object));
+        GC_INTERNAL_MALLOC(sizeof(struct finalizable_object),NORMAL);
+      if (EXPECT(new_fo != 0, TRUE))
+        break;
+      oom_fn = GC_oom_fn;
+      UNLOCK();
+      new_fo = (struct finalizable_object *)
+                (*oom_fn)(sizeof(struct finalizable_object));
       if (0 == new_fo) {
-       return;
+        /* No enough memory.  *ocd and *ofn remains unchanged.  */
+        return;
       }
       /* It's not likely we'll make it here, but ... */
-#     ifdef THREADS
-       LOCK();
-#     endif
+      LOCK();
+      /* Recalculate index since the table may grow and         */
+      /* check again that our finalizer is not in the table.    */
     }
     GC_ASSERT(GC_size(new_fo) >= sizeof(struct finalizable_object));
-    new_fo -> fo_hidden_base = (word)HIDE_POINTER(base);
+    if (ocd) *ocd = 0;
+    if (ofn) *ofn = 0;
+    new_fo -> fo_hidden_base = GC_HIDE_POINTER(base);
     new_fo -> fo_fn = fn;
     new_fo -> fo_client_data = (ptr_t)cd;
     new_fo -> fo_object_size = hhdr -> hb_sz;
@@ -410,51 +419,49 @@ STATIC void GC_register_finalizer_inner(void * obj,
     fo_set_next(new_fo, fo_head[index]);
     GC_fo_entries++;
     fo_head[index] = new_fo;
-#   ifdef THREADS
-        UNLOCK();
-#   endif
+    UNLOCK();
 }
 
 GC_API void GC_CALL GC_register_finalizer(void * obj,
-                                 GC_finalization_proc fn, void * cd,
-                                 GC_finalization_proc *ofn, void ** ocd)
+                                  GC_finalization_proc fn, void * cd,
+                                  GC_finalization_proc *ofn, void ** ocd)
 {
     GC_register_finalizer_inner(obj, fn, cd, ofn,
-                               ocd, GC_normal_finalize_mark_proc);
+                                ocd, GC_normal_finalize_mark_proc);
 }
 
 GC_API void GC_CALL GC_register_finalizer_ignore_self(void * obj,
-                              GC_finalization_proc fn, void * cd,
-                              GC_finalization_proc *ofn, void ** ocd)
+                               GC_finalization_proc fn, void * cd,
+                               GC_finalization_proc *ofn, void ** ocd)
 {
     GC_register_finalizer_inner(obj, fn, cd, ofn,
-                               ocd, GC_ignore_self_finalize_mark_proc);
+                                ocd, GC_ignore_self_finalize_mark_proc);
 }
 
 GC_API void GC_CALL GC_register_finalizer_no_order(void * obj,
-                              GC_finalization_proc fn, void * cd,
-                              GC_finalization_proc *ofn, void ** ocd)
+                               GC_finalization_proc fn, void * cd,
+                               GC_finalization_proc *ofn, void ** ocd)
 {
     GC_register_finalizer_inner(obj, fn, cd, ofn,
-                               ocd, GC_null_finalize_mark_proc);
+                                ocd, GC_null_finalize_mark_proc);
 }
 
 static GC_bool need_unreachable_finalization = FALSE;
-       /* Avoid the work if this isn't used.   */
+        /* Avoid the work if this isn't used.   */
 
 GC_API void GC_CALL GC_register_finalizer_unreachable(void * obj,
-                              GC_finalization_proc fn, void * cd,
-                              GC_finalization_proc *ofn, void ** ocd)
+                               GC_finalization_proc fn, void * cd,
+                               GC_finalization_proc *ofn, void ** ocd)
 {
     need_unreachable_finalization = TRUE;
     GC_ASSERT(GC_java_finalization);
     GC_register_finalizer_inner(obj, fn, cd, ofn,
-                               ocd, GC_unreachable_finalize_mark_proc);
+                                ocd, GC_unreachable_finalize_mark_proc);
 }
 
 #ifndef NO_DEBUGGING
-void GC_dump_finalization(void)
-{
+  void GC_dump_finalization(void)
+  {
     struct disappearing_link * curr_dl;
     struct finalizable_object * curr_fo;
     ptr_t real_ptr, real_link;
@@ -465,25 +472,59 @@ void GC_dump_finalization(void)
     GC_printf("Disappearing links:\n");
     for (i = 0; i < dl_size; i++) {
       for (curr_dl = dl_head[i]; curr_dl != 0; curr_dl = dl_next(curr_dl)) {
-        real_ptr = (ptr_t)REVEAL_POINTER(curr_dl -> dl_hidden_obj);
-        real_link = (ptr_t)REVEAL_POINTER(curr_dl -> dl_hidden_link);
+        real_ptr = GC_REVEAL_POINTER(curr_dl -> dl_hidden_obj);
+        real_link = GC_REVEAL_POINTER(curr_dl -> dl_hidden_link);
         GC_printf("Object: %p, Link:%p\n", real_ptr, real_link);
       }
     }
     GC_printf("Finalizers:\n");
     for (i = 0; i < fo_size; i++) {
       for (curr_fo = fo_head[i]; curr_fo != 0; curr_fo = fo_next(curr_fo)) {
-        real_ptr = (ptr_t)REVEAL_POINTER(curr_fo -> fo_hidden_base);
+        real_ptr = GC_REVEAL_POINTER(curr_fo -> fo_hidden_base);
         GC_printf("Finalizable object: %p\n", real_ptr);
       }
     }
-}
+  }
+#endif
+
+#ifndef SMALL_CONFIG
+  STATIC word GC_old_dl_entries = 0; /* for stats printing */
 #endif
 
-/* Called with held lock (but the world is running).                   */
-/* Cause disappearing links to disappear and unreachable objects to be */
-/* enqueued for finalization.                                          */
-void GC_finalize(void)
+#ifdef THREADS
+  /* Defined in pthread_support.c or win32_threads.c.  Called with the  */
+  /* allocation lock held.                                              */
+  GC_INNER void GC_reset_finalizer_nested(void);
+  GC_INNER unsigned *GC_check_finalizer_nested(void);
+#else
+  /* Global variables to minimize the level of recursion when a client  */
+  /* finalizer allocates memory.                                        */
+  STATIC unsigned GC_finalizer_nested = 0;
+  STATIC unsigned GC_finalizer_skipped = 0;
+
+  /* Checks and updates the level of finalizers recursion.              */
+  /* Returns NULL if GC_invoke_finalizers() should not be called by the */
+  /* collector (to minimize the risk of a deep finalizers recursion),   */
+  /* otherwise returns a pointer to GC_finalizer_nested.                */
+  STATIC unsigned *GC_check_finalizer_nested(void)
+  {
+    unsigned nesting_level = GC_finalizer_nested;
+    if (nesting_level) {
+      /* We are inside another GC_invoke_finalizers().          */
+      /* Skip some implicitly-called GC_invoke_finalizers()     */
+      /* depending on the nesting (recursion) level.            */
+      if (++GC_finalizer_skipped < (1U << nesting_level)) return NULL;
+      GC_finalizer_skipped = 0;
+    }
+    GC_finalizer_nested = nesting_level + 1;
+    return &GC_finalizer_nested;
+  }
+#endif /* THREADS */
+
+/* Called with held lock (but the world is running).                    */
+/* Cause disappearing links to disappear and unreachable objects to be  */
+/* enqueued for finalization.                                           */
+GC_INNER void GC_finalize(void)
 {
     struct disappearing_link * curr_dl, * prev_dl, * next_dl;
     struct finalizable_object * curr_fo, * prev_fo, * next_fo;
@@ -491,14 +532,19 @@ void GC_finalize(void)
     size_t i;
     size_t dl_size = (log_dl_table_size == -1 ) ? 0 : (1 << log_dl_table_size);
     size_t fo_size = (log_fo_table_size == -1 ) ? 0 : (1 << log_fo_table_size);
-    
+
+#   ifndef SMALL_CONFIG
+      /* Save current GC_dl_entries value for stats printing */
+      GC_old_dl_entries = GC_dl_entries;
+#   endif
+
   /* Make disappearing links disappear */
     for (i = 0; i < dl_size; i++) {
       curr_dl = dl_head[i];
       prev_dl = 0;
       while (curr_dl != 0) {
-        real_ptr = (ptr_t)REVEAL_POINTER(curr_dl -> dl_hidden_obj);
-        real_link = (ptr_t)REVEAL_POINTER(curr_dl -> dl_hidden_link);
+        real_ptr = GC_REVEAL_POINTER(curr_dl -> dl_hidden_obj);
+        real_link = GC_REVEAL_POINTER(curr_dl -> dl_hidden_link);
         if (!GC_is_marked(real_ptr)) {
             *(word *)real_link = 0;
             next_dl = dl_next(curr_dl);
@@ -516,15 +562,15 @@ void GC_finalize(void)
         }
       }
     }
-  /* Mark all objects reachable via chains of 1 or more pointers       */
-  /* from finalizable objects.                                         */
+  /* Mark all objects reachable via chains of 1 or more pointers        */
+  /* from finalizable objects.                                          */
     GC_ASSERT(GC_mark_state == MS_NONE);
     for (i = 0; i < fo_size; i++) {
       for (curr_fo = fo_head[i]; curr_fo != 0; curr_fo = fo_next(curr_fo)) {
         GC_ASSERT(GC_size(curr_fo) >= sizeof(struct finalizable_object));
-        real_ptr = (ptr_t)REVEAL_POINTER(curr_fo -> fo_hidden_base);
+        real_ptr = GC_REVEAL_POINTER(curr_fo -> fo_hidden_base);
         if (!GC_is_marked(real_ptr)) {
-           GC_MARKED_FOR_FINALIZATION(real_ptr);
+            GC_MARKED_FOR_FINALIZATION(real_ptr);
             GC_MARK_FO(real_ptr, curr_fo -> fo_mark_proc);
             if (GC_is_marked(real_ptr)) {
                 WARN("Finalization cycle involving %p\n", real_ptr);
@@ -532,18 +578,18 @@ void GC_finalize(void)
         }
       }
     }
-  /* Enqueue for finalization all objects that are still               */
-  /* unreachable.                                                      */
+  /* Enqueue for finalization all objects that are still                */
+  /* unreachable.                                                       */
     GC_bytes_finalized = 0;
     for (i = 0; i < fo_size; i++) {
       curr_fo = fo_head[i];
       prev_fo = 0;
       while (curr_fo != 0) {
-        real_ptr = (ptr_t)REVEAL_POINTER(curr_fo -> fo_hidden_base);
+        real_ptr = GC_REVEAL_POINTER(curr_fo -> fo_hidden_base);
         if (!GC_is_marked(real_ptr)) {
-           if (!GC_java_finalization) {
+            if (!GC_java_finalization) {
               GC_set_mark_bit(real_ptr);
-           }
+            }
             /* Delete from hash table */
               next_fo = fo_next(curr_fo);
               if (prev_fo == 0) {
@@ -552,17 +598,17 @@ void GC_finalize(void)
                 fo_set_next(prev_fo, next_fo);
               }
               GC_fo_entries--;
-            /* Add to list of objects awaiting finalization.   */
+            /* Add to list of objects awaiting finalization.    */
               fo_set_next(curr_fo, GC_finalize_now);
               GC_finalize_now = curr_fo;
-              /* unhide object pointer so any future collections will  */
-              /* see it.                                               */
-              curr_fo -> fo_hidden_base = 
-                       (word) REVEAL_POINTER(curr_fo -> fo_hidden_base);
+              /* unhide object pointer so any future collections will   */
+              /* see it.                                                */
+              curr_fo -> fo_hidden_base =
+                        (word)GC_REVEAL_POINTER(curr_fo -> fo_hidden_base);
               GC_bytes_finalized +=
-                       curr_fo -> fo_object_size
-                       + sizeof(struct finalizable_object);
-           GC_ASSERT(GC_is_marked(GC_base((ptr_t)curr_fo)));
+                        curr_fo -> fo_object_size
+                        + sizeof(struct finalizable_object);
+            GC_ASSERT(GC_is_marked(GC_base((ptr_t)curr_fo)));
             curr_fo = next_fo;
         } else {
             prev_fo = curr_fo;
@@ -574,17 +620,17 @@ void GC_finalize(void)
   if (GC_java_finalization) {
     /* make sure we mark everything reachable from objects finalized
        using the no_order mark_proc */
-      for (curr_fo = GC_finalize_now; 
-        curr_fo != NULL; curr_fo = fo_next(curr_fo)) {
-       real_ptr = (ptr_t)curr_fo -> fo_hidden_base;
-       if (!GC_is_marked(real_ptr)) {
-           if (curr_fo -> fo_mark_proc == GC_null_finalize_mark_proc) {
-               GC_MARK_FO(real_ptr, GC_normal_finalize_mark_proc);
-           }
-           if (curr_fo -> fo_mark_proc != GC_unreachable_finalize_mark_proc) {
-               GC_set_mark_bit(real_ptr);
-           }
-       }
+      for (curr_fo = GC_finalize_now;
+         curr_fo != NULL; curr_fo = fo_next(curr_fo)) {
+        real_ptr = (ptr_t)curr_fo -> fo_hidden_base;
+        if (!GC_is_marked(real_ptr)) {
+            if (curr_fo -> fo_mark_proc == GC_null_finalize_mark_proc) {
+                GC_MARK_FO(real_ptr, GC_normal_finalize_mark_proc);
+            }
+            if (curr_fo -> fo_mark_proc != GC_unreachable_finalize_mark_proc) {
+                GC_set_mark_bit(real_ptr);
+            }
+        }
       }
 
     /* now revive finalize-when-unreachable objects reachable from
@@ -593,31 +639,31 @@ void GC_finalize(void)
         curr_fo = GC_finalize_now;
         prev_fo = 0;
         while (curr_fo != 0) {
-         next_fo = fo_next(curr_fo);
-         if (curr_fo -> fo_mark_proc == GC_unreachable_finalize_mark_proc) {
-           real_ptr = (ptr_t)curr_fo -> fo_hidden_base;
-           if (!GC_is_marked(real_ptr)) {
-             GC_set_mark_bit(real_ptr);
-           } else {
-             if (prev_fo == 0)
-               GC_finalize_now = next_fo;
-             else
-               fo_set_next(prev_fo, next_fo);
+          next_fo = fo_next(curr_fo);
+          if (curr_fo -> fo_mark_proc == GC_unreachable_finalize_mark_proc) {
+            real_ptr = (ptr_t)curr_fo -> fo_hidden_base;
+            if (!GC_is_marked(real_ptr)) {
+              GC_set_mark_bit(real_ptr);
+            } else {
+              if (prev_fo == 0)
+                GC_finalize_now = next_fo;
+              else
+                fo_set_next(prev_fo, next_fo);
 
               curr_fo -> fo_hidden_base =
-                       (word) HIDE_POINTER(curr_fo -> fo_hidden_base);
+                                GC_HIDE_POINTER(curr_fo -> fo_hidden_base);
               GC_bytes_finalized -=
-                       curr_fo -> fo_object_size + sizeof(struct finalizable_object);
-
-             i = HASH2(real_ptr, log_fo_table_size);
-             fo_set_next (curr_fo, fo_head[i]);
-             GC_fo_entries++;
-             fo_head[i] = curr_fo;
-             curr_fo = prev_fo;
-           }
-         }
-         prev_fo = curr_fo;
-         curr_fo = next_fo;
+                  curr_fo->fo_object_size + sizeof(struct finalizable_object);
+
+              i = HASH2(real_ptr, log_fo_table_size);
+              fo_set_next (curr_fo, fo_head[i]);
+              GC_fo_entries++;
+              fo_head[i] = curr_fo;
+              curr_fo = prev_fo;
+            }
+          }
+          prev_fo = curr_fo;
+          curr_fo = next_fo;
         }
       }
   }
@@ -627,7 +673,7 @@ void GC_finalize(void)
       curr_dl = dl_head[i];
       prev_dl = 0;
       while (curr_dl != 0) {
-        real_link = GC_base((ptr_t)REVEAL_POINTER(curr_dl -> dl_hidden_link));
+        real_link = GC_base(GC_REVEAL_POINTER(curr_dl -> dl_hidden_link));
         if (real_link != 0 && !GC_is_marked(real_link)) {
             next_dl = dl_next(curr_dl);
             if (prev_dl == 0) {
@@ -644,28 +690,37 @@ void GC_finalize(void)
         }
       }
     }
+  if (GC_fail_count) {
+    /* Don't prevent running finalizers if there has been an allocation */
+    /* failure recently.                                                */
+#   ifdef THREADS
+      GC_reset_finalizer_nested();
+#   else
+      GC_finalizer_nested = 0;
+#   endif
+  }
 }
 
 #ifndef JAVA_FINALIZATION_NOT_NEEDED
 
-/* Enqueue all remaining finalizers to be run - Assumes lock is held.  */
-STATIC void GC_enqueue_all_finalizers(void)
-{
+  /* Enqueue all remaining finalizers to be run - Assumes lock is held. */
+  STATIC void GC_enqueue_all_finalizers(void)
+  {
     struct finalizable_object * curr_fo, * prev_fo, * next_fo;
     ptr_t real_ptr;
     register int i;
     int fo_size;
-    
+
     fo_size = (log_fo_table_size == -1 ) ? 0 : (1 << log_fo_table_size);
     GC_bytes_finalized = 0;
     for (i = 0; i < fo_size; i++) {
         curr_fo = fo_head[i];
         prev_fo = 0;
       while (curr_fo != 0) {
-          real_ptr = (ptr_t)REVEAL_POINTER(curr_fo -> fo_hidden_base);
+          real_ptr = GC_REVEAL_POINTER(curr_fo -> fo_hidden_base);
           GC_MARK_FO(real_ptr, GC_normal_finalize_mark_proc);
           GC_set_mark_bit(real_ptr);
+
           /* Delete from hash table */
           next_fo = fo_next(curr_fo);
           if (prev_fo == 0) {
@@ -675,40 +730,37 @@ STATIC void GC_enqueue_all_finalizers(void)
           }
           GC_fo_entries--;
 
-          /* Add to list of objects awaiting finalization.     */
+          /* Add to list of objects awaiting finalization.      */
           fo_set_next(curr_fo, GC_finalize_now);
           GC_finalize_now = curr_fo;
 
-          /* unhide object pointer so any future collections will      */
-          /* see it.                                           */
-          curr_fo -> fo_hidden_base = 
-                       (word) REVEAL_POINTER(curr_fo -> fo_hidden_base);
-
+          /* unhide object pointer so any future collections will       */
+          /* see it.                                            */
+          curr_fo -> fo_hidden_base =
+                        (word)GC_REVEAL_POINTER(curr_fo -> fo_hidden_base);
           GC_bytes_finalized +=
-               curr_fo -> fo_object_size + sizeof(struct finalizable_object);
+                curr_fo -> fo_object_size + sizeof(struct finalizable_object);
           curr_fo = next_fo;
         }
     }
+  }
 
-    return;
-}
-
-/* Invoke all remaining finalizers that haven't yet been run. 
- * This is needed for strict compliance with the Java standard, 
- * which can make the runtime guarantee that all finalizers are run.
- * Unfortunately, the Java standard implies we have to keep running
- * finalizers until there are no more left, a potential infinite loop.
- * YUCK.
- * Note that this is even more dangerous than the usual Java
- * finalizers, in that objects reachable from static variables
- * may have been finalized when these finalizers are run.
- * Finalizers run at this point must be prepared to deal with a
- * mostly broken world.
- * This routine is externally callable, so is called without 
- * the allocation lock. 
- */
-GC_API void GC_CALL GC_finalize_all(void)
-{
+  /* Invoke all remaining finalizers that haven't yet been run.
+   * This is needed for strict compliance with the Java standard,
+   * which can make the runtime guarantee that all finalizers are run.
+   * Unfortunately, the Java standard implies we have to keep running
+   * finalizers until there are no more left, a potential infinite loop.
+   * YUCK.
+   * Note that this is even more dangerous than the usual Java
+   * finalizers, in that objects reachable from static variables
+   * may have been finalized when these finalizers are run.
+   * Finalizers run at this point must be prepared to deal with a
+   * mostly broken world.
+   * This routine is externally callable, so is called without
+   * the allocation lock.
+   */
+  GC_API void GC_CALL GC_finalize_all(void)
+  {
     DCL_LOCK_STATE;
 
     LOCK();
@@ -716,127 +768,151 @@ GC_API void GC_CALL GC_finalize_all(void)
       GC_enqueue_all_finalizers();
       UNLOCK();
       GC_invoke_finalizers();
-      /* Running the finalizers in this thread is arguably not a good  */
-      /* idea when we should be notifying another thread to run them.  */
-      /* But otherwise we don't have a great way to wait for them to   */
-      /* run.                                                          */
+      /* Running the finalizers in this thread is arguably not a good   */
+      /* idea when we should be notifying another thread to run them.   */
+      /* But otherwise we don't have a great way to wait for them to    */
+      /* run.                                                           */
       LOCK();
     }
     UNLOCK();
-}
-#endif
+  }
 
-/* Returns true if it is worth calling GC_invoke_finalizers. (Useful if        */
-/* finalizers can only be called from some kind of `safe state' and    */
-/* getting into that safe state is expensive.)                         */
+#endif /* !JAVA_FINALIZATION_NOT_NEEDED */
+
+/* Returns true if it is worth calling GC_invoke_finalizers. (Useful if */
+/* finalizers can only be called from some kind of `safe state' and     */
+/* getting into that safe state is expensive.)                          */
 GC_API int GC_CALL GC_should_invoke_finalizers(void)
 {
     return GC_finalize_now != 0;
 }
 
-/* Invoke finalizers for all objects that are ready to be finalized.   */
-/* Should be called without allocation lock.                           */
+/* Invoke finalizers for all objects that are ready to be finalized.    */
+/* Should be called without allocation lock.                            */
 GC_API int GC_CALL GC_invoke_finalizers(void)
 {
     struct finalizable_object * curr_fo;
     int count = 0;
     word bytes_freed_before = 0; /* initialized to prevent warning. */
     DCL_LOCK_STATE;
-    
+
     while (GC_finalize_now != 0) {
-#      ifdef THREADS
-           LOCK();
-#      endif
-       if (count == 0) {
-           bytes_freed_before = GC_bytes_freed;
-           /* Don't do this outside, since we need the lock. */
-       }
-       curr_fo = GC_finalize_now;
-#      ifdef THREADS
-           if (curr_fo != 0) GC_finalize_now = fo_next(curr_fo);
-           UNLOCK();
-           if (curr_fo == 0) break;
-#      else
-           GC_finalize_now = fo_next(curr_fo);
-#      endif
-       fo_set_next(curr_fo, 0);
-       (*(curr_fo -> fo_fn))((ptr_t)(curr_fo -> fo_hidden_base),
-                             curr_fo -> fo_client_data);
-       curr_fo -> fo_client_data = 0;
-       ++count;
-#      ifdef UNDEFINED
-           /* This is probably a bad idea.  It throws off accounting if */
-           /* nearly all objects are finalizable.  O.w. it shouldn't    */
-           /* matter.                                                   */
-           GC_free((void *)curr_fo);
-#      endif
+#       ifdef THREADS
+            LOCK();
+#       endif
+        if (count == 0) {
+            bytes_freed_before = GC_bytes_freed;
+            /* Don't do this outside, since we need the lock. */
+        }
+        curr_fo = GC_finalize_now;
+#       ifdef THREADS
+            if (curr_fo != 0) GC_finalize_now = fo_next(curr_fo);
+            UNLOCK();
+            if (curr_fo == 0) break;
+#       else
+            GC_finalize_now = fo_next(curr_fo);
+#       endif
+        fo_set_next(curr_fo, 0);
+        (*(curr_fo -> fo_fn))((ptr_t)(curr_fo -> fo_hidden_base),
+                              curr_fo -> fo_client_data);
+        curr_fo -> fo_client_data = 0;
+        ++count;
+#       ifdef UNDEFINED
+            /* This is probably a bad idea.  It throws off accounting if */
+            /* nearly all objects are finalizable.  O.w. it shouldn't    */
+            /* matter.                                                   */
+            GC_free((void *)curr_fo);
+#       endif
     }
     /* bytes_freed_before is initialized whenever count != 0 */
     if (count != 0 && bytes_freed_before != GC_bytes_freed) {
         LOCK();
-       GC_finalizer_bytes_freed += (GC_bytes_freed - bytes_freed_before);
-       UNLOCK();
+        GC_finalizer_bytes_freed += (GC_bytes_freed - bytes_freed_before);
+        UNLOCK();
     }
     return count;
 }
 
+/* All accesses to it should be synchronized to avoid data races.       */
 GC_finalizer_notifier_proc GC_finalizer_notifier =
-       (GC_finalizer_notifier_proc)0;
+        (GC_finalizer_notifier_proc)0;
 
 static GC_word last_finalizer_notification = 0;
 
-void GC_notify_or_invoke_finalizers(void)
+GC_INNER void GC_notify_or_invoke_finalizers(void)
 {
-    /* This is a convenient place to generate backtraces if appropriate, */
-    /* since that code is not callable with the allocation lock.        */
+    GC_finalizer_notifier_proc notifier_fn = 0;
 #   if defined(KEEP_BACK_PTRS) || defined(MAKE_BACK_GRAPH)
-      static word last_back_trace_gc_no = 1;   /* Skip first one. */
+      static word last_back_trace_gc_no = 1;    /* Skip first one. */
+#   elif defined(THREADS)
+      /* Quick check (while unlocked) for an empty finalization queue.  */
+      if (GC_finalize_now == 0) return;
+#   endif
+    LOCK();
 
+    /* This is a convenient place to generate backtraces if appropriate, */
+    /* since that code is not callable with the allocation lock.         */
+#   if defined(KEEP_BACK_PTRS) || defined(MAKE_BACK_GRAPH)
       if (GC_gc_no > last_back_trace_gc_no) {
-#      ifdef KEEP_BACK_PTRS
-         long i;
-         LOCK();
-         /* Stops when GC_gc_no wraps; that's OK.      */
-         last_back_trace_gc_no = (word)(-1);  /* disable others. */
-         for (i = 0; i < GC_backtraces; ++i) {
-             /* FIXME: This tolerates concurrent heap mutation,        */
-             /* which may cause occasional mysterious results.         */
-             /* We need to release the GC lock, since GC_print_callers */
-             /* acquires it.  It probably shouldn't.                   */
-             UNLOCK();
-             GC_generate_random_backtrace_no_gc();
-             LOCK();
-         }
-         last_back_trace_gc_no = GC_gc_no;
-         UNLOCK();
-#      endif
+#       ifdef KEEP_BACK_PTRS
+          long i;
+          /* Stops when GC_gc_no wraps; that's OK.      */
+          last_back_trace_gc_no = (word)(-1);  /* disable others. */
+          for (i = 0; i < GC_backtraces; ++i) {
+              /* FIXME: This tolerates concurrent heap mutation,        */
+              /* which may cause occasional mysterious results.         */
+              /* We need to release the GC lock, since GC_print_callers */
+              /* acquires it.  It probably shouldn't.                   */
+              UNLOCK();
+              GC_generate_random_backtrace_no_gc();
+              LOCK();
+          }
+          last_back_trace_gc_no = GC_gc_no;
+#       endif
 #       ifdef MAKE_BACK_GRAPH
-         if (GC_print_back_height)
+          if (GC_print_back_height) {
+            UNLOCK();
             GC_print_back_graph_stats();
-#      endif
+            LOCK();
+          }
+#       endif
       }
 #   endif
-    if (GC_finalize_now == 0) return;
+    if (GC_finalize_now == 0) {
+      UNLOCK();
+      return;
+    }
+
     if (!GC_finalize_on_demand) {
-       (void) GC_invoke_finalizers();
-#      ifndef THREADS
-         GC_ASSERT(GC_finalize_now == 0);
-#      endif   /* Otherwise GC can run concurrently and add more */
-       return;
+      unsigned *pnested = GC_check_finalizer_nested();
+      UNLOCK();
+      /* Skip GC_invoke_finalizers() if nested */
+      if (pnested != NULL) {
+        (void) GC_invoke_finalizers();
+        *pnested = 0; /* Reset since no more finalizers. */
+#       ifndef THREADS
+          GC_ASSERT(GC_finalize_now == 0);
+#       endif   /* Otherwise GC can run concurrently and add more */
+      }
+      return;
     }
-    if (GC_finalizer_notifier != (GC_finalizer_notifier_proc)0
-       && last_finalizer_notification != GC_gc_no) {
-       last_finalizer_notification = GC_gc_no;
-       GC_finalizer_notifier();
+
+    /* These variables require synchronization to avoid data races.     */
+    if (last_finalizer_notification != GC_gc_no) {
+        last_finalizer_notification = GC_gc_no;
+        notifier_fn = GC_finalizer_notifier;
     }
+    UNLOCK();
+    if (notifier_fn != 0)
+        (*notifier_fn)(); /* Invoke the notifier */
 }
 
 GC_API void * GC_CALL GC_call_with_alloc_lock(GC_fn_type fn,
-                                       void * client_data)
+                                              void * client_data)
 {
     void * result;
     DCL_LOCK_STATE;
-    
+
 #   ifdef THREADS
       LOCK();
       /* FIXME - This looks wrong!! */
@@ -852,17 +928,18 @@ GC_API void * GC_CALL GC_call_with_alloc_lock(GC_fn_type fn,
     return(result);
 }
 
-#if !defined(NO_DEBUGGING)
-
-void GC_print_finalization_stats(void)
-{
+#ifndef SMALL_CONFIG
+  GC_INNER void GC_print_finalization_stats(void)
+  {
     struct finalizable_object *fo = GC_finalize_now;
-    unsigned ready = 0;
+    unsigned long ready = 0;
 
-    GC_printf("%u finalization table entries; %u disappearing links\n",
-              (unsigned)GC_fo_entries, (unsigned)GC_dl_entries);
+    GC_log_printf(
+        "%lu finalization table entries; %lu disappearing links alive\n",
+        (unsigned long)GC_fo_entries, (unsigned long)GC_dl_entries);
     for (; 0 != fo; fo = fo_next(fo)) ++ready;
-    GC_printf("%u objects are eligible for immediate finalization\n", ready);
-}
-
-#endif /* NO_DEBUGGING */
+    GC_log_printf("%lu objects are eligible for immediate finalization; "
+                  "%ld links cleared\n",
+                  ready, (long)GC_old_dl_entries - (long)GC_dl_entries);
+  }
+#endif /* SMALL_CONFIG */
index 5c02c9023c5627cfb46d9ebec1db1a507e863362..22ee90929ff7ea8633922a3733d3daff993075e3 100644 (file)
@@ -5,7 +5,6 @@
 # TARGTYPE "Win32 (x86) Application" 0x0101
 # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
 
-AO_VERSION=1.2
 !IF "$(CFG)" == ""
 CFG=gctest - Win32 Release
 !MESSAGE No configuration specified.  Defaulting to cord - Win32 Debug.
@@ -117,11 +116,11 @@ CLEAN :
 
 CPP=cl.exe
 # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I include /D "NDEBUG" /D "GC_BUILD" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "GC_WIN32_THREADS" /FR /YX /c
-CPP_PROJ=/nologo /MD /W3 /GX /O2 /I include /D "NDEBUG" /D "GC_BUILD" /D\
- "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D\
"GC_WIN32_THREADS" /FR"$(INTDIR)/" /Fp"$(INTDIR)/gc.pch" \
- /Ilibatomic_ops-$(AO_VERSION)/src /YX /Fo"$(INTDIR)/" /c 
+# ADD CPP /nologo /MD /W3 /GX /O2 /I include /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "GC_THREADS" /FR /YX /c
+CPP_PROJ=/nologo /MD /W3 /GX /O2 /I include /D "NDEBUG" /D\
+ "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "GC_THREADS" \
+ /FR"$(INTDIR)/" /Fp"$(INTDIR)/gc.pch" \
+ /Ilibatomic_ops/src /YX /Fo"$(INTDIR)/" /c 
 CPP_OBJS=.\Release/
 CPP_SBRS=.\Release/
 
@@ -304,12 +303,12 @@ CLEAN :
 
 CPP=cl.exe
 # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I include /D "_DEBUG" /D "GC_BUILD" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "GC_WIN32_THREADS" /FR /YX /c
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I include /D "_DEBUG" /D "GC_BUILD"\
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I include /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "GC_THREADS" /FR /YX /c
+CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I include /D "_DEBUG"\
  /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" \
- /D "GC_ASSERTIONS" /D "__STDC__" /D\
"GC_WIN32_THREADS" /FR"$(INTDIR)/" /Fp"$(INTDIR)/gc.pch" /YX /Fo"$(INTDIR)/"\
- /Ilibatomic_ops-$(AO_VERSION)/src /Fd"$(INTDIR)/" /c 
+ /D "GC_ASSERTIONS" /D "GC_THREADS" \
+ /FR"$(INTDIR)/" /Fp"$(INTDIR)/gc.pch" /YX /Fo"$(INTDIR)/"\
+ /Ilibatomic_ops/src /Fd"$(INTDIR)/" /c 
 CPP_OBJS=.\Debug/
 CPP_SBRS=.\Debug/
 
@@ -441,10 +440,10 @@ test.c : tests\test.c
 
 CPP=cl.exe
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I include /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "GC_WIN32_THREADS" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I include /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "GC_THREADS" /YX /c
 CPP_PROJ=/nologo /MD /W3 /GX /O2 /I include /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D\
- "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "GC_WIN32_THREADS"\
- /Ilibatomic_ops-$(AO_VERSION)/src /Fp"$(INTDIR)/gctest.pch" \
+ "ALL_INTERIOR_POINTERS" /D "GC_THREADS" \
+ /Ilibatomic_ops/src /Fp"$(INTDIR)/gctest.pch" \
  /YX /Fo"$(INTDIR)/" /c 
 CPP_OBJS=.\gctest\Release/
 CPP_SBRS=.\.
@@ -528,10 +527,10 @@ CLEAN :
 
 CPP=cl.exe
 # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "GC_WIN32_THREADS" /FR /YX /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /D "GC_THREADS" /FR /YX /c
 CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I include /D "_DEBUG" /D "WIN32" /D "_WINDOWS"\
- /D "ALL_INTERIOR_POINTERS" /D "__STDC__" /D "GC_WIN32_THREADS" /FR"$(INTDIR)/"\
- /Ilibatomic_ops-$(AO_VERSION)/src /Fp"$(INTDIR)/gctest.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c 
+ /D "ALL_INTERIOR_POINTERS" /D "GC_THREADS" /FR"$(INTDIR)/"\
+ /Ilibatomic_ops/src /Fp"$(INTDIR)/gctest.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c 
 CPP_OBJS=.\gctest\Debug/
 CPP_SBRS=.\gctest\Debug/
 
@@ -621,7 +620,7 @@ CPP=cl.exe
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
 # ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /YX /c
 CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "." /I include /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D\
- /Ilibatomic_ops-$(AO_VERSION)/src "ALL_INTERIOR_POINTERS" /Fp"$(INTDIR)/cord.pch" /YX /Fo"$(INTDIR)/" /c 
+ /Ilibatomic_ops/src "ALL_INTERIOR_POINTERS" /Fp"$(INTDIR)/cord.pch" /YX /Fo"$(INTDIR)/" /c 
 CPP_OBJS=.\cord\Release/
 CPP_SBRS=.\.
 
@@ -714,7 +713,7 @@ CPP=cl.exe
 # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /YX /c
 CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /I include /D "_DEBUG" /D "WIN32" /D\
  "_WINDOWS" /D "ALL_INTERIOR_POINTERS" /Fp"$(INTDIR)/cord.pch" /YX\
- /Ilibatomic_ops-$(AO_VERSION)/src /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c 
+ /Ilibatomic_ops/src /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c 
 CPP_OBJS=.\cord\Debug/
 CPP_SBRS=.\.
 
@@ -1880,7 +1879,7 @@ NODEP_CPP_WIN32=\
 ################################################################################
 # Begin Source File
 
-SOURCE=.\msvc_dbg.c
+SOURCE=.\extra\msvc_dbg.c
 
 !IF  "$(CFG)" == "gc - Win32 Release"
 
index f46388c9f3ad0fff3f8df006528fc0fdc8df40b8..40153cb8696a735a6c2fd9183de3325f380d9d28 100644 (file)
@@ -1,15 +1,16 @@
-/*************************************************************************
-Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
-THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
-OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
-    Last modified on Sat Nov 19 19:31:14 PST 1994 by ellis
-                  on Sat Jun  8 15:10:00 PST 1994 by boehm
-
-Permission is hereby granted to copy this code for any purpose,
-provided the above notices are retained on all copies.
+/*
+ * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
*     Last modified on Sat Nov 19 19:31:14 PST 1994 by ellis
+ *
+ * Permission is hereby granted to copy this code for any purpose,
+ * provided the above notices are retained on all copies.
+ */
 
+/*************************************************************************
 This implementation module for gc_c++.h provides an implementation of
 the global operators "new" and "delete" that calls the Boehm
 allocator.  All objects allocated by this implementation will be
@@ -23,19 +24,27 @@ Authors: John R. Ellis and Jesse Hull
 
 **************************************************************************/
 
-#include <gc_cpp.h>
+# ifdef HAVE_CONFIG_H
+#   include "private/config.h"
+# endif
+
+# ifndef GC_BUILD
+#   define GC_BUILD
+# endif
+
+#include "gc_cpp.h"
 
 void* operator new( size_t size ) {
     return GC_MALLOC_UNCOLLECTABLE( size );}
-  
+
 void operator delete( void* obj ) {
     GC_FREE( obj );}
-  
+
 #ifdef GC_OPERATOR_NEW_ARRAY
 
 void* operator new[]( size_t size ) {
     return GC_MALLOC_UNCOLLECTABLE( size );}
-  
+
 void operator delete[]( void* obj ) {
     GC_FREE( obj );}
 
@@ -45,14 +54,14 @@ void operator delete[]( void* obj ) {
 
 // This new operator is used by VC++ in case of Debug builds !
 void* operator new( size_t size,
-                         int ,//nBlockUse,
-                         const char * szFileName,
-                         int nLine )
+                          int ,//nBlockUse,
+                          const char * szFileName,
+                          int nLine )
 {
 #ifndef GC_DEBUG
-       return GC_malloc_uncollectable( size );
+        return GC_malloc_uncollectable( size );
 #else
-       return GC_debug_malloc_uncollectable(size, szFileName, nLine);
+        return GC_debug_malloc_uncollectable(size, szFileName, nLine);
 #endif
 }
 
@@ -65,4 +74,3 @@ void* operator new[](size_t size, int nBlockUse, const char* szFileName, int nLi
 #endif
 
 #endif /* _MSC_VER */
-
index d0a26e164cbdee8cd5b31b3ab363904cac24f44f..3e0b1a39378ac5afda6fa2659b68e0a29be5c8c2 100644 (file)
@@ -16,6 +16,8 @@
  * Heavily modified by Hans Boehm and others
  */
 
+#include "private/gc_priv.h"
+
 /*
  * This used to be in dyn_load.c.  It was extracted into a separate file
  * to avoid having to link against libdl.{a,so} if the client doesn't call
  * library. -HB
  */
 
-#include "private/gc_priv.h"
-
-# if (defined(GC_PTHREADS) && !defined(GC_DARWIN_THREADS)) && !defined(GC_WIN32_PTHREADS)\
-      || defined(GC_SOLARIS_THREADS)
+# if defined(GC_PTHREADS) && !defined(GC_DARWIN_THREADS) \
+     && !defined(GC_WIN32_PTHREADS)
 
+# undef GC_MUST_RESTORE_REDEFINED_DLOPEN
 # if defined(dlopen) && !defined(GC_USE_LD_WRAP)
     /* To support various threads pkgs, gc.h interposes on dlopen by     */
     /* defining "dlopen" to be "GC_dlopen", which is implemented below.  */
     /* real system dlopen() in their implementation. We first remove     */
     /* gc.h's dlopen definition and restore it later, after GC_dlopen(). */
 #   undef dlopen
+#   define GC_MUST_RESTORE_REDEFINED_DLOPEN
 # endif
 
-  GC_bool GC_collection_in_progress(void);
-
-  /* Make sure we're not in the middle of a collection, and make       */
-  /* sure we don't start any.  Returns previous value of GC_dont_gc.   */
-  /* This is invoked prior to a dlopen call to avoid synchronization   */
-  /* issues.  We can't just acquire the allocation lock, since startup         */
-  /* code in dlopen may try to allocate.                               */
-  /* This solution risks heap growth in the presence of many dlopen    */
-  /* calls in either a multithreaded environment, or if the library    */
-  /* initialization code allocates substantial amounts of GC'ed memory.        */
-  /* But I don't know of a better solution.                            */
+  /* Make sure we're not in the middle of a collection, and make        */
+  /* sure we don't start any.   Returns previous value of GC_dont_gc.   */
+  /* This is invoked prior to a dlopen call to avoid synchronization    */
+  /* issues.  We can't just acquire the allocation lock, since startup  */
+  /* code in dlopen may try to allocate.                                */
+  /* This solution risks heap growth in the presence of many dlopen     */
+  /* calls in either a multithreaded environment, or if the library     */
+  /* initialization code allocates substantial amounts of GC'ed memory. */
+  /* But I don't know of a better solution.                             */
   static void disable_gc_for_dlopen(void)
   {
     LOCK();
     while (GC_incremental && GC_collection_in_progress()) {
-       GC_collect_a_little_inner(1000);
+        GC_collect_a_little_inner(1000);
     }
     ++GC_dont_gc;
     UNLOCK();
   }
 
-  /* Redefine dlopen to guarantee mutual exclusion with        */
-  /* GC_register_dynamic_libraries.                    */
-  /* Should probably happen for other operating        systems, too. */
+  /* Redefine dlopen to guarantee mutual exclusion with */
+  /* GC_register_dynamic_libraries.                     */
+  /* Should probably happen for other operating systems, too. */
 
 #include <dlfcn.h>
 
+/* This is similar to WRAP/REAL_FUNC() in pthread_support.c. */
 #ifdef GC_USE_LD_WRAP
-  void * __wrap_dlopen(const char *path, int mode)
+#   define WRAP_DLFUNC(f) __wrap_##f
+#   define REAL_DLFUNC(f) __real_##f
 #else
-  void * GC_dlopen(const char *path, int mode)
+#   define WRAP_DLFUNC(f) GC_##f
+#   define REAL_DLFUNC(f) f
 #endif
+
+GC_API void * WRAP_DLFUNC(dlopen)(const char *path, int mode)
 {
     void * result;
-    
+
 #   ifndef USE_PROC_FOR_LIBRARIES
       disable_gc_for_dlopen();
 #   endif
-#   ifdef GC_USE_LD_WRAP
-      result = (void *)__real_dlopen(path, mode);
-#   else
-      result = dlopen(path, mode);
-#   endif
+    result = (void *)REAL_DLFUNC(dlopen)(path, mode);
 #   ifndef USE_PROC_FOR_LIBRARIES
       GC_enable(); /* undoes disable_gc_for_dlopen */
 #   endif
     return(result);
 }
-# endif  /* GC_PTHREADS || GC_SOLARIS_THREADS ... */
 
+#ifdef GC_USE_LD_WRAP
+  /* Define GC_ function as an alias for the plain one, which will be   */
+  /* intercepted.  This allows files which include gc.h, and hence      */
+  /* generate references to the GC_ symbol, to see the right symbol.    */
+  GC_API int GC_dlopen(const char *path, int mode)
+  {
+    return dlopen(path, mode);
+  }
+#endif /* Linker-based interception. */
 
+# ifdef GC_MUST_RESTORE_REDEFINED_DLOPEN
+#   define dlopen GC_dlopen
+# endif
 
+#endif  /* GC_PTHREADS */
index 6441ca2e9d849021fc5543d6dc38477ab8d18865..6077a03d5f4928c5763cb05d2b9ea629ed8dd0ed 100644 (file)
@@ -12,7 +12,6 @@
  * modified is included with the above copyright notice.
  *
  */
-/* Boehm, July 31, 1995 5:02 pm PDT */
 
 #include "private/gc_pmark.h"  /* includes gc_priv.h */
 
 #include "gc_gcj.h"
 #include "private/dbg_mlc.h"
 
-GC_bool GC_gcj_malloc_initialized = FALSE;
+GC_INNER GC_bool GC_gcj_malloc_initialized = FALSE;
 
-int GC_gcj_kind;       /* Object kind for objects with descriptors     */
-                       /* in "vtable".                                 */
-int GC_gcj_debug_kind; /* The kind of objects that is always marked    */
-                       /* with a mark proc call.                       */
+int GC_gcj_kind = 0;    /* Object kind for objects with descriptors     */
+                        /* in "vtable".                                 */
+int GC_gcj_debug_kind = 0;
+                        /* The kind of objects that is always marked    */
+                        /* with a mark proc call.                       */
 
-ptr_t * GC_gcjobjfreelist;
-ptr_t * GC_gcjdebugobjfreelist;
+GC_INNER ptr_t * GC_gcjobjfreelist = NULL;
+
+STATIC ptr_t * GC_gcjdebugobjfreelist = NULL;
+
+/*ARGSUSED*/
+STATIC struct GC_ms_entry * GC_gcj_fake_mark_proc(word * addr,
+                                        struct GC_ms_entry *mark_stack_ptr,
+                                        struct GC_ms_entry *mark_stack_limit,
+                                        word env)
+{
+    ABORT("No client gcj mark proc is specified");
+    return mark_stack_ptr;
+}
 
 /* Caller does not hold allocation lock. */
 GC_API void GC_CALL GC_init_gcj_malloc(int mp_index,
-                               void * /* really GC_mark_proc */mp)
+                                       void * /* really GC_mark_proc */mp)
 {
     GC_bool ignore_gcj_info;
     DCL_LOCK_STATE;
 
-    GC_init(); /* In case it's not already done.       */
+    if (mp == 0)        /* In case GC_DS_PROC is unused.        */
+      mp = (void *)(word)GC_gcj_fake_mark_proc;
+
+    GC_init();  /* In case it's not already done.       */
     LOCK();
     if (GC_gcj_malloc_initialized) {
       UNLOCK();
       return;
     }
     GC_gcj_malloc_initialized = TRUE;
-    ignore_gcj_info = (0 != GETENV("GC_IGNORE_GCJ_INFO"));
+#   ifdef GC_IGNORE_GCJ_INFO
+      /* This is useful for debugging on platforms with missing getenv(). */
+      ignore_gcj_info = 1;
+#   else
+      ignore_gcj_info = (0 != GETENV("GC_IGNORE_GCJ_INFO"));
+#   endif
     if (GC_print_stats && ignore_gcj_info) {
         GC_log_printf("Gcj-style type information is disabled!\n");
     }
     GC_ASSERT(GC_mark_procs[mp_index] == (GC_mark_proc)0); /* unused */
     GC_mark_procs[mp_index] = (GC_mark_proc)(word)mp;
     if ((unsigned)mp_index >= GC_n_mark_procs)
-       ABORT("GC_init_gcj_malloc: bad index");
+        ABORT("GC_init_gcj_malloc: bad index");
     /* Set up object kind gcj-style indirect descriptor. */
       GC_gcjobjfreelist = (ptr_t *)GC_new_free_list_inner();
       if (ignore_gcj_info) {
-       /* Use a simple length-based descriptor, thus forcing a fully   */
-       /* conservative scan.                                           */
-       GC_gcj_kind = GC_new_kind_inner((void **)GC_gcjobjfreelist,
-                                       (0 | GC_DS_LENGTH),
-                                       TRUE, TRUE);
+        /* Use a simple length-based descriptor, thus forcing a fully   */
+        /* conservative scan.                                           */
+        GC_gcj_kind = GC_new_kind_inner((void **)GC_gcjobjfreelist,
+                                        (0 | GC_DS_LENGTH),
+                                        TRUE, TRUE);
       } else {
-       GC_gcj_kind = GC_new_kind_inner(
-                       (void **)GC_gcjobjfreelist,
-                       (((word)(-(signed_word)MARK_DESCR_OFFSET
-                                - GC_INDIR_PER_OBJ_BIAS))
-                        | GC_DS_PER_OBJECT),
-                       FALSE, TRUE);
+        GC_gcj_kind = GC_new_kind_inner(
+                        (void **)GC_gcjobjfreelist,
+                        (((word)(-(signed_word)MARK_DESCR_OFFSET
+                                 - GC_INDIR_PER_OBJ_BIAS))
+                         | GC_DS_PER_OBJECT),
+                        FALSE, TRUE);
       }
-    /* Set up object kind for objects that require mark proc call.     */
+    /* Set up object kind for objects that require mark proc call.      */
       if (ignore_gcj_info) {
-       GC_gcj_debug_kind = GC_gcj_kind;
+        GC_gcj_debug_kind = GC_gcj_kind;
         GC_gcjdebugobjfreelist = GC_gcjobjfreelist;
       } else {
         GC_gcjdebugobjfreelist = (ptr_t *)GC_new_free_list_inner();
-       GC_gcj_debug_kind = GC_new_kind_inner(
-                               (void **)GC_gcjdebugobjfreelist,
-                               GC_MAKE_PROC(mp_index,
-                                            1 /* allocated with debug info */),
-                               FALSE, TRUE);
+        GC_gcj_debug_kind = GC_new_kind_inner(
+                                (void **)GC_gcjdebugobjfreelist,
+                                GC_MAKE_PROC(mp_index,
+                                             1 /* allocated with debug info */),
+                                FALSE, TRUE);
       }
     UNLOCK();
 }
 
-void * GC_clear_stack(void *);
+#define GENERAL_MALLOC_INNER(lb,k) \
+    GC_clear_stack(GC_generic_malloc_inner(lb, k))
 
-#define GENERAL_MALLOC(lb,k) \
-    GC_clear_stack(GC_generic_malloc_inner((word)lb, k))
-    
-#define GENERAL_MALLOC_IOP(lb,k) \
+#define GENERAL_MALLOC_INNER_IOP(lb,k) \
     GC_clear_stack(GC_generic_malloc_inner_ignore_off_page(lb, k))
 
-/* We need a mechanism to release the lock and invoke finalizers.      */
-/* We don't really have an opportunity to do this on a rarely executed */
-/* path on which the lock is not held.  Thus we check at a             */
-/* rarely executed point at which it is safe to release the lock.      */
-/* We do this even where we could just call GC_INVOKE_FINALIZERS,      */
-/* since it's probably cheaper and certainly more uniform.             */
-/* FIXME - Consider doing the same elsewhere?                          */
+/* We need a mechanism to release the lock and invoke finalizers.       */
+/* We don't really have an opportunity to do this on a rarely executed  */
+/* path on which the lock is not held.  Thus we check at a              */
+/* rarely executed point at which it is safe to release the lock.       */
+/* We do this even where we could just call GC_INVOKE_FINALIZERS,       */
+/* since it's probably cheaper and certainly more uniform.              */
+/* FIXME - Consider doing the same elsewhere?                           */
 static void maybe_finalize(void)
 {
    static word last_finalized_no = 0;
@@ -126,18 +143,19 @@ static void maybe_finalize(void)
    if (!GC_is_initialized) return;
    UNLOCK();
    GC_INVOKE_FINALIZERS();
-   last_finalized_no = GC_gc_no;
    LOCK();
+   last_finalized_no = GC_gc_no;
 }
 
-/* Allocate an object, clear it, and store the pointer to the  */
-/* type structure (vtable in gcj).                             */
+/* Allocate an object, clear it, and store the pointer to the   */
+/* type structure (vtable in gcj).                              */
 /* This adds a byte at the end of the object if GC_malloc would.*/
 #ifdef THREAD_LOCAL_ALLOC
-  void * GC_core_gcj_malloc(size_t lb, void * ptr_to_struct_containing_descr)
+  GC_INNER void * GC_core_gcj_malloc(size_t lb,
+                                     void * ptr_to_struct_containing_descr)
 #else
   GC_API void * GC_CALL GC_gcj_malloc(size_t lb,
-                               void * ptr_to_struct_containing_descr)
+                                      void * ptr_to_struct_containing_descr)
 #endif
 {
     ptr_t op;
@@ -146,72 +164,75 @@ static void maybe_finalize(void)
     DCL_LOCK_STATE;
 
     if(SMALL_OBJ(lb)) {
-       lg = GC_size_map[lb];
-       opp = &(GC_gcjobjfreelist[lg]);
-       LOCK();
-       op = *opp;
+        lg = GC_size_map[lb];
+        opp = &(GC_gcjobjfreelist[lg]);
+        LOCK();
+        op = *opp;
         if(EXPECT(op == 0, 0)) {
-           maybe_finalize();
-            op = (ptr_t)GENERAL_MALLOC((word)lb, GC_gcj_kind);
-           if (0 == op) {
-               UNLOCK();
-               return(GC_oom_fn(lb));
-           }
+            maybe_finalize();
+            op = (ptr_t)GENERAL_MALLOC_INNER((word)lb, GC_gcj_kind);
+            if (0 == op) {
+                GC_oom_func oom_fn = GC_oom_fn;
+                UNLOCK();
+                return((*oom_fn)(lb));
+            }
         } else {
             *opp = obj_link(op);
             GC_bytes_allocd += GRANULES_TO_BYTES(lg);
         }
-       *(void **)op = ptr_to_struct_containing_descr;
-       GC_ASSERT(((void **)op)[1] == 0);
-       UNLOCK();
+        *(void **)op = ptr_to_struct_containing_descr;
+        GC_ASSERT(((void **)op)[1] == 0);
+        UNLOCK();
     } else {
-       LOCK();
-       maybe_finalize();
-       op = (ptr_t)GENERAL_MALLOC((word)lb, GC_gcj_kind);
-       if (0 == op) {
-           UNLOCK();
-           return(GC_oom_fn(lb));
-       }
-       *(void **)op = ptr_to_struct_containing_descr;
-       UNLOCK();
+        LOCK();
+        maybe_finalize();
+        op = (ptr_t)GENERAL_MALLOC_INNER((word)lb, GC_gcj_kind);
+        if (0 == op) {
+            GC_oom_func oom_fn = GC_oom_fn;
+            UNLOCK();
+            return((*oom_fn)(lb));
+        }
+        *(void **)op = ptr_to_struct_containing_descr;
+        UNLOCK();
     }
     return((void *) op);
 }
 
-void GC_start_debugging(void);
+GC_INNER void GC_start_debugging(void);
 
-/* Similar to GC_gcj_malloc, but add debug info.  This is allocated    */
-/* with GC_gcj_debug_kind.                                             */
+/* Similar to GC_gcj_malloc, but add debug info.  This is allocated     */
+/* with GC_gcj_debug_kind.                                              */
 GC_API void * GC_CALL GC_debug_gcj_malloc(size_t lb,
-               void * ptr_to_struct_containing_descr, GC_EXTRA_PARAMS)
+                void * ptr_to_struct_containing_descr, GC_EXTRA_PARAMS)
 {
     void * result;
 
-    /* We're careful to avoid extra calls, which could          */
-    /* confuse the backtrace.                                  */
+    /* We're careful to avoid extra calls, which could           */
+    /* confuse the backtrace.                                   */
     LOCK();
     maybe_finalize();
     result = GC_generic_malloc_inner(lb + DEBUG_BYTES, GC_gcj_debug_kind);
     if (result == 0) {
-       UNLOCK();
+        GC_oom_func oom_fn = GC_oom_fn;
+        UNLOCK();
         GC_err_printf("GC_debug_gcj_malloc(%ld, %p) returning NIL (",
-                     (unsigned long)lb, ptr_to_struct_containing_descr);
+                      (unsigned long)lb, ptr_to_struct_containing_descr);
         GC_err_puts(s);
         GC_err_printf(":%d)\n", i);
-        return(GC_oom_fn(lb));
+        return((*oom_fn)(lb));
     }
     *((void **)((ptr_t)result + sizeof(oh))) = ptr_to_struct_containing_descr;
     UNLOCK();
     if (!GC_debugging_started) {
-       GC_start_debugging();
+        GC_start_debugging();
     }
     ADD_CALL_CHAIN(result, ra);
     return (GC_store_debug_info(result, (word)lb, s, (word)i));
 }
 
-/* There is no THREAD_LOCAL_ALLOC for GC_gcj_malloc_ignore_off_page(). */
+/* There is no THREAD_LOCAL_ALLOC for GC_gcj_malloc_ignore_off_page().  */
 GC_API void * GC_CALL GC_gcj_malloc_ignore_off_page(size_t lb,
-                                    void * ptr_to_struct_containing_descr) 
+                                     void * ptr_to_struct_containing_descr)
 {
     ptr_t op;
     ptr_t * opp;
@@ -219,37 +240,34 @@ GC_API void * GC_CALL GC_gcj_malloc_ignore_off_page(size_t lb,
     DCL_LOCK_STATE;
 
     if(SMALL_OBJ(lb)) {
-       lg = GC_size_map[lb];
-       opp = &(GC_gcjobjfreelist[lg]);
-       LOCK();
+        lg = GC_size_map[lb];
+        opp = &(GC_gcjobjfreelist[lg]);
+        LOCK();
         if( (op = *opp) == 0 ) {
-           maybe_finalize();
-            op = (ptr_t)GENERAL_MALLOC_IOP(lb, GC_gcj_kind);
-           if (0 == op) {
-               UNLOCK();
-               return(GC_oom_fn(lb));
-           }
+            maybe_finalize();
+            op = (ptr_t)GENERAL_MALLOC_INNER_IOP(lb, GC_gcj_kind);
+            if (0 == op) {
+                GC_oom_func oom_fn = GC_oom_fn;
+                UNLOCK();
+                return((*oom_fn)(lb));
+            }
         } else {
             *opp = obj_link(op);
             GC_bytes_allocd += GRANULES_TO_BYTES(lg);
         }
     } else {
-       LOCK();
-       maybe_finalize();
-        op = (ptr_t)GENERAL_MALLOC_IOP(lb, GC_gcj_kind);
-       if (0 == op) {
-           UNLOCK();
-           return(GC_oom_fn(lb));
-       }
+        LOCK();
+        maybe_finalize();
+        op = (ptr_t)GENERAL_MALLOC_INNER_IOP(lb, GC_gcj_kind);
+        if (0 == op) {
+            GC_oom_func oom_fn = GC_oom_fn;
+            UNLOCK();
+            return((*oom_fn)(lb));
+        }
     }
     *(void **)op = ptr_to_struct_containing_descr;
     UNLOCK();
     return((void *) op);
 }
 
-#else
-
-extern int GC_quiet;
-       /* ANSI C doesn't allow translation units to be empty.  */
-
 #endif  /* GC_GCJ_SUPPORT */
diff --git a/src/mm/boehm-gc/gcname.c b/src/mm/boehm-gc/gcname.c
deleted file mode 100644 (file)
index 55b7c9f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <stdio.h>
-#include <gc.h>
-
-int main()
-{
-    if (GC_ALPHA_VERSION == GC_NOT_ALPHA) {
-       printf("gc%d.%d", GC_VERSION_MAJOR, GC_VERSION_MINOR);
-    } else {
-       printf("gc%d.%dalpha%d", GC_VERSION_MAJOR,
-                                GC_VERSION_MINOR, GC_ALPHA_VERSION);
-    }
-    return 0;
-}
index 774cf8d43a061e2dd38e8963db523d95bee12704..1f8a7c973d9d67ba302abaa3c2ed32759596e4c7 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
@@ -12,7 +12,9 @@
  * provided the above notices are retained, and a notice that the code was
  * modified is included with the above copyright notice.
  */
+
+#include "private/gc_priv.h"
+
 /*
  * This implements:
  * 1. allocation of heap block headers
  * Access speed is crucial.  We implement an index structure based on a 2
  * level tree.
  */
-# include "private/gc_priv.h"
 
 STATIC bottom_index * GC_all_bottom_indices = 0;
-                               /* Pointer to first (lowest addr) */
-                               /* bottom_index.                  */
+                                /* Pointer to first (lowest addr) */
+                                /* bottom_index.                  */
 
 STATIC bottom_index * GC_all_bottom_indices_end = 0;
-                               /* Pointer to last (highest addr) */
-                               /* bottom_index.                  */
+                                /* Pointer to last (highest addr) */
+                                /* bottom_index.                  */
+
 /* Non-macro version of header location routine */
-hdr * GC_find_header(ptr_t h)
+GC_INNER hdr * GC_find_header(ptr_t h)
 {
 #   ifdef HASH_TL
-       hdr * result;
-       GET_HDR(h, result);
-       return(result);
+        hdr * result;
+        GET_HDR(h, result);
+        return(result);
 #   else
-       return(HDR_INNER(h));
+        return(HDR_INNER(h));
 #   endif
 }
 
-/* Handle a header cache miss.  Returns a pointer to the       */
-/* header corresponding to p, if p can possibly be a valid     */
-/* object pointer, and 0 otherwise.                            */
-/* GUARANTEED to return 0 for a pointer past the first page    */
-/* of an object unless both GC_all_interior_pointers is set    */
-/* and p is in fact a valid object pointer.                    */
-/* Never returns a pointer to a free hblk.                     */
+/* Handle a header cache miss.  Returns a pointer to the        */
+/* header corresponding to p, if p can possibly be a valid      */
+/* object pointer, and 0 otherwise.                             */
+/* GUARANTEED to return 0 for a pointer past the first page     */
+/* of an object unless both GC_all_interior_pointers is set     */
+/* and p is in fact a valid object pointer.                     */
+/* Never returns a pointer to a free hblk.                      */
+GC_INNER hdr *
 #ifdef PRINT_BLACK_LIST
-  hdr * GC_header_cache_miss(ptr_t p, hdr_cache_entry *hce, ptr_t source)
+  GC_header_cache_miss(ptr_t p, hdr_cache_entry *hce, ptr_t source)
 #else
-  hdr * GC_header_cache_miss(ptr_t p, hdr_cache_entry *hce)
+  GC_header_cache_miss(ptr_t p, hdr_cache_entry *hce)
 #endif
 {
   hdr *hhdr;
@@ -63,34 +64,34 @@ hdr * GC_find_header(ptr_t h)
   if (IS_FORWARDING_ADDR_OR_NIL(hhdr)) {
     if (GC_all_interior_pointers) {
       if (hhdr != 0) {
-       ptr_t current = p;
-           
-       current = (ptr_t)HBLKPTR(current);
-       do {
-           current = current - HBLKSIZE*(word)hhdr;
-           hhdr = HDR(current);
-       } while(IS_FORWARDING_ADDR_OR_NIL(hhdr));
-       /* current points to near the start of the large object */
-       if (hhdr -> hb_flags & IGNORE_OFF_PAGE)
-           return 0;
-       if (HBLK_IS_FREE(hhdr)
-           || p - current >= (ptrdiff_t)(hhdr->hb_sz)) {
-           GC_ADD_TO_BLACK_LIST_NORMAL(p, source);
-           /* Pointer past the end of the block */
-           return 0;
-       }
+        ptr_t current = p;
+
+        current = (ptr_t)HBLKPTR(current);
+        do {
+            current = current - HBLKSIZE*(word)hhdr;
+            hhdr = HDR(current);
+        } while(IS_FORWARDING_ADDR_OR_NIL(hhdr));
+        /* current points to near the start of the large object */
+        if (hhdr -> hb_flags & IGNORE_OFF_PAGE)
+            return 0;
+        if (HBLK_IS_FREE(hhdr)
+            || p - current >= (ptrdiff_t)(hhdr->hb_sz)) {
+            GC_ADD_TO_BLACK_LIST_NORMAL(p, source);
+            /* Pointer past the end of the block */
+            return 0;
+        }
       } else {
-       GC_ADD_TO_BLACK_LIST_NORMAL(p, source);
-       /* And return zero: */
+        GC_ADD_TO_BLACK_LIST_NORMAL(p, source);
+        /* And return zero: */
       }
       GC_ASSERT(hhdr == 0 || !HBLK_IS_FREE(hhdr));
       return hhdr;
-      /* Pointers past the first page are probably too rare    */
-      /* to add them to the cache.  We don't.                  */
-      /* And correctness relies on the fact that we don't.     */
+      /* Pointers past the first page are probably too rare     */
+      /* to add them to the cache.  We don't.                   */
+      /* And correctness relies on the fact that we don't.      */
     } else {
       if (hhdr == 0) {
-       GC_ADD_TO_BLACK_LIST_NORMAL(p, source);
+        GC_ADD_TO_BLACK_LIST_NORMAL(p, source);
       }
       return 0;
     }
@@ -100,21 +101,21 @@ hdr * GC_find_header(ptr_t h)
       return 0;
     } else {
       hce -> block_addr = (word)(p) >> LOG_HBLKSIZE;
-      hce -> hce_hdr = hhdr; 
+      hce -> hce_hdr = hhdr;
       return hhdr;
     }
-  } 
+  }
 }
+
 /* Routines to dynamically allocate collector data structures that will */
-/* never be freed.                                                      */
+/* never be freed.                                                       */
+
 static ptr_t scratch_free_ptr = 0;
+
 /* GC_scratch_last_end_ptr is end point of last obtained scratch area.  */
-/* GC_scratch_end_ptr is end point of current scratch area.            */
-ptr_t GC_scratch_alloc(size_t bytes)
+/* GC_scratch_end_ptr is end point of current scratch area.             */
+
+GC_INNER ptr_t GC_scratch_alloc(size_t bytes)
 {
     register ptr_t result = scratch_free_ptr;
 
@@ -126,34 +127,34 @@ ptr_t GC_scratch_alloc(size_t bytes)
     }
     {
         word bytes_to_get = MINHINCR * HBLKSIZE;
-         
+
         if (bytes_to_get <= bytes) {
           /* Undo the damage, and get memory directly */
-           bytes_to_get = bytes;
-#          ifdef USE_MMAP
-               bytes_to_get += GC_page_size - 1;
-               bytes_to_get &= ~(GC_page_size - 1);
-#          endif
-           result = (ptr_t)GET_MEM(bytes_to_get);
-           GC_add_to_our_memory(result, bytes_to_get);
+            bytes_to_get = bytes;
+#           ifdef USE_MMAP
+                bytes_to_get += GC_page_size - 1;
+                bytes_to_get &= ~(GC_page_size - 1);
+#           endif
+            result = (ptr_t)GET_MEM(bytes_to_get);
+            GC_add_to_our_memory(result, bytes_to_get);
             scratch_free_ptr -= bytes;
-           GC_scratch_last_end_ptr = result + bytes;
+            GC_scratch_last_end_ptr = result + bytes;
             return(result);
         }
         result = (ptr_t)GET_MEM(bytes_to_get);
         GC_add_to_our_memory(result, bytes_to_get);
         if (result == 0) {
-           if (GC_print_stats)
+            if (GC_print_stats)
                 GC_printf("Out of memory - trying to allocate less\n");
             scratch_free_ptr -= bytes;
-           bytes_to_get = bytes;
-#          ifdef USE_MMAP
-               bytes_to_get += GC_page_size - 1;
-               bytes_to_get &= ~(GC_page_size - 1);
-#          endif
+            bytes_to_get = bytes;
+#           ifdef USE_MMAP
+                bytes_to_get += GC_page_size - 1;
+                bytes_to_get &= ~(GC_page_size - 1);
+#           endif
             result = (ptr_t)GET_MEM(bytes_to_get);
             GC_add_to_our_memory(result, bytes_to_get);
-           return result;
+            return result;
         }
         scratch_free_ptr = result;
         GC_scratch_end_ptr = scratch_free_ptr + bytes_to_get;
@@ -168,7 +169,7 @@ static hdr * hdr_free_list = 0;
 static hdr * alloc_hdr(void)
 {
     register hdr * result;
-    
+
     if (hdr_free_list == 0) {
         result = (hdr *) GC_scratch_alloc((word)(sizeof(hdr)));
     } else {
@@ -178,21 +179,22 @@ static hdr * alloc_hdr(void)
     return(result);
 }
 
-static void free_hdr(hdr * hhdr)
+GC_INLINE void free_hdr(hdr * hhdr)
 {
     hhdr -> hb_next = (struct hblk *) hdr_free_list;
     hdr_free_list = hhdr;
 }
 
 #ifdef COUNT_HDR_CACHE_HITS
+  /* Used for debugging/profiling (the symbols are externally visible). */
   word GC_hdr_cache_hits = 0;
   word GC_hdr_cache_misses = 0;
 #endif
-void GC_init_headers(void)
+
+GC_INNER void GC_init_headers(void)
 {
     register unsigned i;
-    
+
     GC_all_nils = (bottom_index *)GC_scratch_alloc((word)sizeof(bottom_index));
     BZERO(GC_all_nils, sizeof(bottom_index));
     for (i = 0; i < TOP_SZ; i++) {
@@ -201,7 +203,7 @@ void GC_init_headers(void)
 }
 
 /* Make sure that there is a bottom level index block for address addr  */
-/* Return FALSE on failure.                                            */
+/* Return FALSE on failure.                                             */
 static GC_bool get_index(word addr)
 {
     word hi = (word)(addr) >> (LOG_BOTTOM_SZ + LOG_HBLKSIZE);
@@ -209,11 +211,11 @@ static GC_bool get_index(word addr)
     bottom_index * p;
     bottom_index ** prev;
     bottom_index *pi;
-    
+
 #   ifdef HASH_TL
       word i = TL_HASH(hi);
       bottom_index * old;
-      
+
       old = p = GC_top_index[i];
       while(p != GC_all_nils) {
           if (p -> key == hi) return(TRUE);
@@ -233,45 +235,45 @@ static GC_bool get_index(word addr)
 #   endif
     r -> key = hi;
     /* Add it to the list of bottom indices */
-      prev = &GC_all_bottom_indices;   /* pointer to p */
-      pi = 0;                          /* bottom_index preceding p */
+      prev = &GC_all_bottom_indices;    /* pointer to p */
+      pi = 0;                           /* bottom_index preceding p */
       while ((p = *prev) != 0 && p -> key < hi) {
-       pi = p;
-       prev = &(p -> asc_link);
+        pi = p;
+        prev = &(p -> asc_link);
       }
       r -> desc_link = pi;
       if (0 == p) {
-       GC_all_bottom_indices_end = r;
+        GC_all_bottom_indices_end = r;
       } else {
-       p -> desc_link = r;
+        p -> desc_link = r;
       }
       r -> asc_link = p;
       *prev = r;
     return(TRUE);
 }
 
-/* Install a header for block h.       */
-/* The header is uninitialized.                */
-/* Returns the header or 0 on failure. */
-struct hblkhdr * GC_install_header(struct hblk *h)
+/* Install a header for block h.        */
+/* The header is uninitialized.         */
+/* Returns the header or 0 on failure.  */
+GC_INNER struct hblkhdr * GC_install_header(struct hblk *h)
 {
     hdr * result;
-    
+
     if (!get_index((word) h)) return(0);
     result = alloc_hdr();
     SET_HDR(h, result);
 #   ifdef USE_MUNMAP
-       result -> hb_last_reclaimed = (unsigned short)GC_gc_no;
+        result -> hb_last_reclaimed = (unsigned short)GC_gc_no;
 #   endif
     return(result);
 }
 
 /* Set up forwarding counts for block h of size sz */
-GC_bool GC_install_counts(struct hblk *h, size_t sz/* bytes */)
+GC_INNER GC_bool GC_install_counts(struct hblk *h, size_t sz/* bytes */)
 {
     struct hblk * hbp;
     word i;
-    
+
     for (hbp = h; (char *)hbp < (char *)h + sz; hbp += BOTTOM_SZ) {
         if (!get_index((word) hbp)) return(FALSE);
     }
@@ -284,20 +286,18 @@ GC_bool GC_install_counts(struct hblk *h, size_t sz/* bytes */)
 }
 
 /* Remove the header for block h */
-void GC_remove_header(struct hblk *h)
+GC_INNER void GC_remove_header(struct hblk *h)
 {
-    hdr ** ha;
-    
+    hdr **ha;
     GET_HDR_ADDR(h, ha);
     free_hdr(*ha);
     *ha = 0;
 }
 
 /* Remove forwarding counts for h */
-void GC_remove_counts(struct hblk *h, size_t sz/* bytes */)
+GC_INNER void GC_remove_counts(struct hblk *h, size_t sz/* bytes */)
 {
     register struct hblk * hbp;
-    
     for (hbp = h+1; (char *)hbp < (char *)h + sz; hbp += 1) {
         SET_HDR(hbp, 0);
     }
@@ -306,19 +306,19 @@ void GC_remove_counts(struct hblk *h, size_t sz/* bytes */)
 /* Apply fn to all allocated blocks */
 /*VARARGS1*/
 void GC_apply_to_all_blocks(void (*fn)(struct hblk *h, word client_data),
-                           word client_data)
+                            word client_data)
 {
     signed_word j;
     bottom_index * index_p;
-    
+
     for (index_p = GC_all_bottom_indices; index_p != 0;
          index_p = index_p -> asc_link) {
         for (j = BOTTOM_SZ-1; j >= 0;) {
             if (!IS_FORWARDING_ADDR_OR_NIL(index_p->index[j])) {
                 if (!HBLK_IS_FREE(index_p->index[j])) {
                     (*fn)(((struct hblk *)
-                             (((index_p->key << LOG_BOTTOM_SZ) + (word)j)
-                              << LOG_HBLKSIZE)),
+                              (((index_p->key << LOG_BOTTOM_SZ) + (word)j)
+                               << LOG_HBLKSIZE)),
                           client_data);
                 }
                 j--;
@@ -331,13 +331,13 @@ void GC_apply_to_all_blocks(void (*fn)(struct hblk *h, word client_data),
      }
 }
 
-/* Get the next valid block whose address is at least h        */
-/* Return 0 if there is none.                          */
-struct hblk * GC_next_used_block(struct hblk *h)
+/* Get the next valid block whose address is at least h */
+/* Return 0 if there is none.                           */
+GC_INNER struct hblk * GC_next_used_block(struct hblk *h)
 {
     register bottom_index * bi;
     register word j = ((word)h >> LOG_HBLKSIZE) & (BOTTOM_SZ-1);
-    
+
     GET_BI(h, bi);
     if (bi == GC_all_nils) {
         register word hi = (word)h >> (LOG_BOTTOM_SZ + LOG_HBLKSIZE);
@@ -347,14 +347,14 @@ struct hblk * GC_next_used_block(struct hblk *h)
     }
     while(bi != 0) {
         while (j < BOTTOM_SZ) {
-           hdr * hhdr = bi -> index[j];
+            hdr * hhdr = bi -> index[j];
             if (IS_FORWARDING_ADDR_OR_NIL(hhdr)) {
                 j++;
             } else {
                 if (!HBLK_IS_FREE(hhdr)) {
                     return((struct hblk *)
-                             (((bi -> key << LOG_BOTTOM_SZ) + j)
-                              << LOG_HBLKSIZE));
+                              (((bi -> key << LOG_BOTTOM_SZ) + j)
+                               << LOG_HBLKSIZE));
                 } else {
                     j += divHBLKSZ(hhdr -> hb_sz);
                 }
@@ -366,14 +366,14 @@ struct hblk * GC_next_used_block(struct hblk *h)
     return(0);
 }
 
-/* Get the last (highest address) block whose address is       */
-/* at most h.  Return 0 if there is none.                      */
-/* Unlike the above, this may return a free block.             */
-struct hblk * GC_prev_block(struct hblk *h)
+/* Get the last (highest address) block whose address is        */
+/* at most h.  Return 0 if there is none.                       */
+/* Unlike the above, this may return a free block.              */
+GC_INNER struct hblk * GC_prev_block(struct hblk *h)
 {
     register bottom_index * bi;
     register signed_word j = ((word)h >> LOG_HBLKSIZE) & (BOTTOM_SZ-1);
-    
+
     GET_BI(h, bi);
     if (bi == GC_all_nils) {
         register word hi = (word)h >> (LOG_BOTTOM_SZ + LOG_HBLKSIZE);
@@ -383,15 +383,15 @@ struct hblk * GC_prev_block(struct hblk *h)
     }
     while(bi != 0) {
         while (j >= 0) {
-           hdr * hhdr = bi -> index[j];
-           if (0 == hhdr) {
-               --j;
+            hdr * hhdr = bi -> index[j];
+            if (0 == hhdr) {
+                --j;
             } else if (IS_FORWARDING_ADDR_OR_NIL(hhdr)) {
                 j -= (signed_word)hhdr;
             } else {
                 return((struct hblk *)
                           (((bi -> key << LOG_BOTTOM_SZ) + j)
-                              << LOG_HBLKSIZE));
+                               << LOG_HBLKSIZE));
             }
         }
         j = BOTTOM_SZ - 1;
diff --git a/src/mm/boehm-gc/if_mach.c b/src/mm/boehm-gc/if_mach.c
deleted file mode 100644 (file)
index d6e0a70..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Conditionally execute a command based on machine and OS from gcconfig.h */
-
-# include "private/gcconfig.h"
-# include <stdio.h>
-# include <string.h>
-# include <unistd.h>
-
-int main(int argc, char **argv, char **envp)
-{
-    if (argc < 4) goto Usage;
-    if (strcmp(MACH_TYPE, argv[1]) != 0) return(0);
-    if (strcmp(OS_TYPE, "") != 0 && strcmp(argv[2], "") != 0
-        && strcmp(OS_TYPE, argv[2]) != 0) return(0);
-    fprintf(stderr, "^^^^Starting command^^^^\n");
-    fflush(stdout);
-    execvp(argv[3], argv+3);
-    perror("Couldn't execute");
-    
-Usage:
-    fprintf(stderr, "Usage: %s mach_type os_type command\n", argv[0]);
-    fprintf(stderr, "Currently mach_type = %s, os_type = %s\n",
-           MACH_TYPE, OS_TYPE);
-    return(1);
-}
-
diff --git a/src/mm/boehm-gc/if_not_there.c b/src/mm/boehm-gc/if_not_there.c
deleted file mode 100644 (file)
index 7af6fba..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Conditionally execute a command based if the file argv[1] doesn't exist */
-/* Except for execvp, we stick to ANSI C.                                 */
-# include "private/gcconfig.h"
-# include <stdio.h>
-# include <stdlib.h>
-# include <unistd.h>
-#ifdef __DJGPP__
-#include <dirent.h>
-#endif /* __DJGPP__ */
-
-int main(int argc, char **argv, char **envp)
-{
-    FILE * f;
-#ifdef __DJGPP__
-    DIR * d;
-#endif /* __DJGPP__ */
-    if (argc < 3) goto Usage;
-    if ((f = fopen(argv[1], "rb")) != 0
-        || (f = fopen(argv[1], "r")) != 0) {
-        fclose(f);
-        return(0);
-    }
-#ifdef __DJGPP__
-    if ((d = opendir(argv[1])) != 0) {
-           closedir(d);
-           return(0);
-    }
-#endif
-    printf("^^^^Starting command^^^^\n");
-    fflush(stdout);
-    execvp(argv[2], argv+2);
-    exit(1);
-    
-Usage:
-    fprintf(stderr, "Usage: %s file_name command\n", argv[0]);
-    return(1);
-}
-
index c62b14859e5d05fcaed51a3a5e3e02ba75005330..006f5821faa21f8452a7421f0b2f2f26e82f9896 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1995 by Xerox Corporation.  All rights reserved.
  * Copyright 1996-1999 by Silicon Graphics.  All rights reserved.
  * Everything else is best ignored unless you encounter performance
  * problems.
  */
-#ifndef _GC_H
 
-# define _GC_H
+#ifndef GC_H
+#define GC_H
 
-# include "gc_version.h"
-       /* Define version numbers here to allow test on build machine   */
-       /* for cross-builds.  Note that this defines the header         */
-       /* version number, which may or may not match that of the       */
-       /* dynamic library.  The GC_version variable can be used        */
-       /* to obtain the latter.                                        */
+#include "gc_version.h"
+        /* Define version numbers here to allow test on build machine   */
+        /* for cross-builds.  Note that this defines the header         */
+        /* version number, which may or may not match that of the       */
+        /* dynamic library.  GC_get_version() can be used to obtain     */
+        /* the latter.                                                  */
 
-# include "gc_config_macros.h"
+#include "gc_config_macros.h"
 
-# ifdef __cplusplus
-    extern "C" {
-# endif
+#ifdef __cplusplus
+  extern "C" {
+#endif
 
 
-/* Define word and signed_word to be unsigned and signed types of the  */
-/* size as char * or void *.  There seems to be no way to do this      */
-/* even semi-portably.  The following is probably no better/worse      */
-/* than almost anything else.                                          */
-/* The ANSI standard suggests that size_t and ptrdiff_t might be       */
-/* better choices.  But those had incorrect definitions on some older  */
-/* systems.  Notably "typedef int size_t" is WRONG.                    */
-#ifndef _WIN64
+/* Define word and signed_word to be unsigned and signed types of the   */
+/* size as char * or void *.  There seems to be no way to do this       */
+/* even semi-portably.  The following is probably no better/worse       */
+/* than almost anything else.                                           */
+/* The ANSI standard suggests that size_t and ptrdiff_t might be        */
+/* better choices.  But those had incorrect definitions on some older   */
+/* systems.  Notably "typedef int size_t" is WRONG.                     */
+#ifdef _WIN64
+# ifdef __int64
+    typedef unsigned __int64 GC_word;
+    typedef __int64 GC_signed_word;
+# else
+    typedef unsigned long long GC_word;
+    typedef long long GC_signed_word;
+# endif
+#else
   typedef unsigned long GC_word;
   typedef long GC_signed_word;
-#else
-#ifdef __int64
-  typedef unsigned __int64 GC_word;
-  typedef __int64 GC_signed_word;
-#else
-  typedef unsigned long long GC_word;
-  typedef long long GC_signed_word;
-#endif
 #endif
 
+/* Get the GC library version. The returned value is in the form:       */
+/* ((version_major<<16) | (version_minor<<8) | alpha_version).          */
+GC_API unsigned GC_CALL GC_get_version(void);
+
 /* Public read-only variables */
-/* Getter procedures are supplied in some cases and preferred for new  */
-/* code.                                                               */
+/* The supplied getter functions are preferred for new code.            */
 
-GC_API GC_word GC_gc_no;/* Counter incremented per collection.         */
-                       /* Includes empty GCs at startup.               */
+GC_API GC_word GC_gc_no;/* Counter incremented per collection.          */
+                        /* Includes empty GCs at startup.               */
 GC_API GC_word GC_CALL GC_get_gc_no(void);
-
-GC_API int GC_parallel;        /* GC is parallelized for performance on        */
-                       /* multiprocessors.  Currently set only         */
-                       /* implicitly if collector is built with        */
-                       /* -DPARALLEL_MARK and if either:               */
-                       /*  Env variable GC_NPROC is set to > 1, or     */
-                       /*  GC_NPROC is not set and this is an MP.      */
-                       /* If GC_parallel is set, incremental           */
-                       /* collection is only partially functional,     */
-                       /* and may not be desirable.                    */
+                        /* GC_get_gc_no() uses no synchronization, so   */
+                        /* it requires GC_call_with_alloc_lock() to     */
+                        /* avoid data races on multiprocessors.         */
+
+GC_API int GC_parallel; /* GC is parallelized for performance on        */
+                        /* multiprocessors.  Currently set only         */
+                        /* implicitly if collector is built with        */
+                        /* PARALLEL_MARK defined and if either:         */
+                        /*  Env variable GC_NPROC is set to > 1, or     */
+                        /*  GC_NPROC is not set and this is an MP.      */
+                        /* If GC_parallel is set, incremental           */
+                        /* collection is only partially functional,     */
+                        /* and may not be desirable.                    */
 GC_API int GC_CALL GC_get_parallel(void);
-                       
+
 
 /* Public R/W variables */
+/* The supplied setter and getter functions are preferred for new code. */
 
 typedef void * (GC_CALLBACK * GC_oom_func)(size_t /* bytes_requested */);
 GC_API GC_oom_func GC_oom_fn;
-                       /* When there is insufficient memory to satisfy */
-                       /* an allocation request, we return             */
-                       /* (*GC_oom_fn)().  By default this just        */
-                       /* returns 0.                                   */
-                       /* If it returns, it must return 0 or a valid   */
-                       /* pointer to a previously allocated heap       */
-                       /* object.                                      */
+                        /* When there is insufficient memory to satisfy */
+                        /* an allocation request, we return             */
+                        /* (*GC_oom_fn)(size).  By default this just    */
+                        /* returns NULL.                                */
+                        /* If it returns, it must return 0 or a valid   */
+                        /* pointer to a previously allocated heap       */
+                        /* object.  GC_oom_fn must not be 0.            */
+                        /* Both the supplied setter and the getter      */
+                        /* acquire the GC lock (to avoid data races).   */
 GC_API void GC_CALL GC_set_oom_fn(GC_oom_func);
 GC_API GC_oom_func GC_CALL GC_get_oom_fn(void);
 
 GC_API int GC_find_leak;
-                       /* Do not actually garbage collect, but simply  */
-                       /* report inaccessible memory that was not      */
-                       /* deallocated with GC_free.  Initial value     */
-                       /* is determined by FIND_LEAK macro.            */
+                        /* Do not actually garbage collect, but simply  */
+                        /* report inaccessible memory that was not      */
+                        /* deallocated with GC_free.  Initial value     */
+                        /* is determined by FIND_LEAK macro.            */
+                        /* The setter and getter are unsynchronized, so */
+                        /* GC_call_with_alloc_lock() is required to     */
+                        /* avoid data races (if the value is modified   */
+                        /* after the GC is put to multi-threaded mode). */
 GC_API void GC_CALL GC_set_find_leak(int);
 GC_API int GC_CALL GC_get_find_leak(void);
 
 GC_API int GC_all_interior_pointers;
-                       /* Arrange for pointers to object interiors to  */
-                       /* be recognized as valid.  May not be changed  */
-                       /* after GC initialization.                     */
-                       /* Initial value is determined by               */
-                       /* -DALL_INTERIOR_POINTERS.                     */
-                       /* Unless DONT_ADD_BYTE_AT_END is defined, this */
-                       /* also affects whether sizes are increased by  */
-                       /* at least a byte to allow "off the end"       */
-                       /* pointer recognition.                         */
-                       /* MUST BE 0 or 1.                              */
+                        /* Arrange for pointers to object interiors to  */
+                        /* be recognized as valid.  May not be changed  */
+                        /* after GC initialization.  The initial value  */
+                        /* depends on whether the GC is built with      */
+                        /* ALL_INTERIOR_POINTERS macro defined or not.  */
+                        /* Unless DONT_ADD_BYTE_AT_END is defined, this */
+                        /* also affects whether sizes are increased by  */
+                        /* at least a byte to allow "off the end"       */
+                        /* pointer recognition.                         */
+                        /* MUST BE 0 or 1.                              */
 GC_API void GC_CALL GC_set_all_interior_pointers(int);
 GC_API int GC_CALL GC_get_all_interior_pointers(void);
 
 GC_API int GC_finalize_on_demand;
-                       /* If nonzero, finalizers will only be run in   */
-                       /* response to an explicit GC_invoke_finalizers */
-                       /* call.  The default is determined by whether  */
-                       /* the FINALIZE_ON_DEMAND macro is defined      */
-                       /* when the collector is built.                 */
+                        /* If nonzero, finalizers will only be run in   */
+                        /* response to an explicit GC_invoke_finalizers */
+                        /* call.  The default is determined by whether  */
+                        /* the FINALIZE_ON_DEMAND macro is defined      */
+                        /* when the collector is built.                 */
+                        /* The setter and getter are unsynchronized, so */
+                        /* GC_call_with_alloc_lock() is required to     */
+                        /* avoid data races (if the value is modified   */
+                        /* after the GC is put to multi-threaded mode). */
 GC_API void GC_CALL GC_set_finalize_on_demand(int);
 GC_API int GC_CALL GC_get_finalize_on_demand(void);
 
 GC_API int GC_java_finalization;
-                       /* Mark objects reachable from finalizable      */
-                       /* objects in a separate post-pass.  This makes */
-                       /* it a bit safer to use non-topologically-     */
-                       /* ordered finalization.  Default value is      */
-                       /* determined by JAVA_FINALIZATION macro.       */
-                       /* Enables register_finalizer_unreachable to    */
-                       /* work correctly.                              */
+                        /* Mark objects reachable from finalizable      */
+                        /* objects in a separate post-pass.  This makes */
+                        /* it a bit safer to use non-topologically-     */
+                        /* ordered finalization.  Default value is      */
+                        /* determined by JAVA_FINALIZATION macro.       */
+                        /* Enables register_finalizer_unreachable to    */
+                        /* work correctly.                              */
+                        /* The setter and getter are unsynchronized, so */
+                        /* GC_call_with_alloc_lock() is required to     */
+                        /* avoid data races (if the value is modified   */
+                        /* after the GC is put to multi-threaded mode). */
 GC_API void GC_CALL GC_set_java_finalization(int);
 GC_API int GC_CALL GC_get_java_finalization(void);
 
 typedef void (GC_CALLBACK * GC_finalizer_notifier_proc)(void);
 GC_API GC_finalizer_notifier_proc GC_finalizer_notifier;
-                       /* Invoked by the collector when there are      */
-                       /* objects to be finalized.  Invoked at most    */
-                       /* once per GC cycle.  Never invoked unless     */
-                       /* GC_finalize_on_demand is set.                */
-                       /* Typically this will notify a finalization    */
-                       /* thread, which will call GC_invoke_finalizers */
-                       /* in response.                                 */
+                        /* Invoked by the collector when there are      */
+                        /* objects to be finalized.  Invoked at most    */
+                        /* once per GC cycle.  Never invoked unless     */
+                        /* GC_finalize_on_demand is set.                */
+                        /* Typically this will notify a finalization    */
+                        /* thread, which will call GC_invoke_finalizers */
+                        /* in response.  May be 0 (means no notifier).  */
+                        /* Both the supplied setter and the getter      */
+                        /* acquire the GC lock (to avoid data races).   */
 GC_API void GC_CALL GC_set_finalizer_notifier(GC_finalizer_notifier_proc);
 GC_API GC_finalizer_notifier_proc GC_CALL GC_get_finalizer_notifier(void);
 
-GC_API int GC_dont_gc; /* != 0 ==> Dont collect.  In versions 6.2a1+,  */
-                       /* this overrides explicit GC_gcollect() calls. */
-                       /* Used as a counter, so that nested enabling   */
-                       /* and disabling work correctly.  Should        */
-                       /* normally be updated with GC_enable() and     */
-                       /* GC_disable() calls.                          */
-                       /* Direct assignment to GC_dont_gc is           */
-                       /* deprecated.                                  */
+GC_API int GC_dont_gc;  /* != 0 ==> Don't collect.  In versions 6.2a1+, */
+                        /* this overrides explicit GC_gcollect() calls. */
+                        /* Used as a counter, so that nested enabling   */
+                        /* and disabling work correctly.  Should        */
+                        /* normally be updated with GC_enable() and     */
+                        /* GC_disable() calls.                          */
+                        /* Direct assignment to GC_dont_gc is           */
+                        /* deprecated.                                  */
 
 GC_API int GC_dont_expand;
-                       /* Dont expand heap unless explicitly requested */
-                       /* or forced to.                                */
+                        /* Don't expand the heap unless explicitly      */
+                        /* requested or forced to.  The setter and      */
+                        /* getter are unsynchronized, so                */
+                        /* GC_call_with_alloc_lock() is required to     */
+                        /* avoid data races (if the value is modified   */
+                        /* after the GC is put to multi-threaded mode). */
 GC_API void GC_CALL GC_set_dont_expand(int);
 GC_API int GC_CALL GC_get_dont_expand(void);
 
 GC_API int GC_use_entire_heap;
-               /* Causes the non-incremental collector to use the      */
-               /* entire heap before collecting.  This was the only    */
-               /* option for GC versions < 5.0.  This sometimes        */
-               /* results in more large block fragmentation, since     */
-               /* very large blocks will tend to get broken up         */
-               /* during each GC cycle.  It is likely to result in a   */
-               /* larger working set, but lower collection             */
-               /* frequencies, and hence fewer instructions executed   */
-               /* in the collector.                                    */
-
-GC_API int GC_full_freq;    /* Number of partial collections between   */
-                           /* full collections.  Matters only if       */
-                           /* GC_incremental is set.                   */
-                           /* Full collections are also triggered if   */
-                           /* the collector detects a substantial      */
-                           /* increase in the number of in-use heap    */
-                           /* blocks.  Values in the tens are now      */
-                           /* perfectly reasonable, unlike for         */
-                           /* earlier GC versions.                     */
+                /* Causes the non-incremental collector to use the      */
+                /* entire heap before collecting.  This was the only    */
+                /* option for GC versions < 5.0.  This sometimes        */
+                /* results in more large block fragmentation, since     */
+                /* very large blocks will tend to get broken up         */
+                /* during each GC cycle.  It is likely to result in a   */
+                /* larger working set, but lower collection             */
+                /* frequencies, and hence fewer instructions executed   */
+                /* in the collector.                                    */
+
+GC_API int GC_full_freq;    /* Number of partial collections between    */
+                            /* full collections.  Matters only if       */
+                            /* GC_incremental is set.                   */
+                            /* Full collections are also triggered if   */
+                            /* the collector detects a substantial      */
+                            /* increase in the number of in-use heap    */
+                            /* blocks.  Values in the tens are now      */
+                            /* perfectly reasonable, unlike for         */
+                            /* earlier GC versions.                     */
+                        /* The setter and getter are unsynchronized, so */
+                        /* GC_call_with_alloc_lock() is required to     */
+                        /* avoid data races (if the value is modified   */
+                        /* after the GC is put to multi-threaded mode). */
 GC_API void GC_CALL GC_set_full_freq(int);
 GC_API int GC_CALL GC_get_full_freq(void);
-                       
+
 GC_API GC_word GC_non_gc_bytes;
-                       /* Bytes not considered candidates for collection. */
-                       /* Used only to control scheduling of collections. */
-                       /* Updated by GC_malloc_uncollectable and GC_free. */
-                       /* Wizards only.                                   */
+                        /* Bytes not considered candidates for          */
+                        /* collection.  Used only to control scheduling */
+                        /* of collections.  Updated by                  */
+                        /* GC_malloc_uncollectable and GC_free.         */
+                        /* Wizards only.                                */
+                        /* The setter and getter are unsynchronized, so */
+                        /* GC_call_with_alloc_lock() is required to     */
+                        /* avoid data races (if the value is modified   */
+                        /* after the GC is put to multi-threaded mode). */
 GC_API void GC_CALL GC_set_non_gc_bytes(GC_word);
 GC_API GC_word GC_CALL GC_get_non_gc_bytes(void);
 
 GC_API int GC_no_dls;
-                       /* Don't register dynamic library data segments. */
-                       /* Wizards only.  Should be used only if the     */
-                       /* application explicitly registers all roots.   */
-                       /* In Microsoft Windows environments, this will  */
-                       /* usually also prevent registration of the      */
-                       /* main data segment as part of the root set.    */
+                        /* Don't register dynamic library data segments. */
+                        /* Wizards only.  Should be used only if the     */
+                        /* application explicitly registers all roots.   */
+                        /* In Microsoft Windows environments, this will  */
+                        /* usually also prevent registration of the      */
+                        /* main data segment as part of the root set.    */
+                        /* The setter and getter are unsynchronized, so  */
+                        /* GC_call_with_alloc_lock() is required to      */
+                        /* avoid data races (if the value is modified    */
+                        /* after the GC is put to multi-threaded mode).  */
 GC_API void GC_CALL GC_set_no_dls(int);
 GC_API int GC_CALL GC_get_no_dls(void);
 
 GC_API GC_word GC_free_space_divisor;
-                       /* We try to make sure that we allocate at      */
-                       /* least N/GC_free_space_divisor bytes between  */
-                       /* collections, where N is twice the number     */
-                       /* of traced bytes, plus the number of untraced */
-                       /* bytes (bytes in "atomic" objects), plus      */
-                       /* a rough estimate of the root set size.       */
-                       /* N approximates GC tracing work per GC.       */
-                       /* Initially, GC_free_space_divisor = 3.        */
-                       /* Increasing its value will use less space     */
-                       /* but more collection time.  Decreasing it     */
-                       /* will appreciably decrease collection time    */
-                       /* at the expense of space.                     */
+                        /* We try to make sure that we allocate at      */
+                        /* least N/GC_free_space_divisor bytes between  */
+                        /* collections, where N is twice the number     */
+                        /* of traced bytes, plus the number of untraced */
+                        /* bytes (bytes in "atomic" objects), plus      */
+                        /* a rough estimate of the root set size.       */
+                        /* N approximates GC tracing work per GC.       */
+                        /* Initially, GC_free_space_divisor = 3.        */
+                        /* Increasing its value will use less space     */
+                        /* but more collection time.  Decreasing it     */
+                        /* will appreciably decrease collection time    */
+                        /* at the expense of space.                     */
+                        /* The setter and getter are unsynchronized, so */
+                        /* GC_call_with_alloc_lock() is required to     */
+                        /* avoid data races (if the value is modified   */
+                        /* after the GC is put to multi-threaded mode). */
 GC_API void GC_CALL GC_set_free_space_divisor(GC_word);
 GC_API GC_word GC_CALL GC_get_free_space_divisor(void);
 
 GC_API GC_word GC_max_retries;
-                       /* The maximum number of GCs attempted before   */
-                       /* reporting out of memory after heap           */
-                       /* expansion fails.  Initially 0.               */
+                        /* The maximum number of GCs attempted before   */
+                        /* reporting out of memory after heap           */
+                        /* expansion fails.  Initially 0.               */
+                        /* The setter and getter are unsynchronized, so */
+                        /* GC_call_with_alloc_lock() is required to     */
+                        /* avoid data races (if the value is modified   */
+                        /* after the GC is put to multi-threaded mode). */
 GC_API void GC_CALL GC_set_max_retries(GC_word);
 GC_API GC_word GC_CALL GC_get_max_retries(void);
-                       
-
-GC_API char *GC_stackbottom;    /* Cool end of user stack.             */
-                               /* May be set in the client prior to    */
-                               /* calling any GC_ routines.  This      */
-                               /* avoids some overhead, and            */
-                               /* potentially some signals that can    */
-                               /* confuse debuggers.  Otherwise the    */
-                               /* collector attempts to set it         */
-                               /* automatically.                       */
-                               /* For multithreaded code, this is the  */
-                               /* cold end of the stack for the        */
-                               /* primordial thread.                   */      
-                               
-GC_API int GC_dont_precollect;  /* Don't collect as part of            */
-                               /* initialization.  Should be set only  */
-                               /* if the client wants a chance to      */
-                               /* manually initialize the root set     */
-                               /* before the first collection.         */
-                               /* Interferes with blacklisting.        */
-                               /* Wizards only.                        */
+
+
+GC_API char *GC_stackbottom;    /* Cool end of user stack.              */
+                                /* May be set in the client prior to    */
+                                /* calling any GC_ routines.  This      */
+                                /* avoids some overhead, and            */
+                                /* potentially some signals that can    */
+                                /* confuse debuggers.  Otherwise the    */
+                                /* collector attempts to set it         */
+                                /* automatically.                       */
+                                /* For multithreaded code, this is the  */
+                                /* cold end of the stack for the        */
+                                /* primordial thread.                   */
+
+GC_API int GC_dont_precollect;  /* Don't collect as part of             */
+                                /* initialization.  Should be set only  */
+                                /* if the client wants a chance to      */
+                                /* manually initialize the root set     */
+                                /* before the first collection.         */
+                                /* Interferes with blacklisting.        */
+                                /* Wizards only.                        */
+                        /* The setter and getter are unsynchronized, so */
+                        /* GC_call_with_alloc_lock() is required to     */
+                        /* avoid data races (if the value is modified   */
+                        /* after the GC is put to multi-threaded mode). */
 GC_API void GC_CALL GC_set_dont_precollect(int);
 GC_API int GC_CALL GC_get_dont_precollect(void);
 
 GC_API unsigned long GC_time_limit;
-                               /* If incremental collection is enabled, */
-                               /* We try to terminate collections       */
-                               /* after this many milliseconds.  Not a  */
-                               /* hard time bound.  Setting this to     */
-                               /* GC_TIME_UNLIMITED will essentially    */
-                               /* disable incremental collection while  */
-                               /* leaving generational collection       */
-                               /* enabled.                              */
-#      define GC_TIME_UNLIMITED 999999
-                               /* Setting GC_time_limit to this value   */
-                               /* will disable the "pause time exceeded"*/
-                               /* tests.                                */
+                               /* If incremental collection is enabled, */
+                               /* We try to terminate collections       */
+                               /* after this many milliseconds.  Not a  */
+                               /* hard time bound.  Setting this to     */
+                               /* GC_TIME_UNLIMITED will essentially    */
+                               /* disable incremental collection while  */
+                               /* leaving generational collection       */
+                               /* enabled.                              */
+#define GC_TIME_UNLIMITED 999999
+                               /* Setting GC_time_limit to this value   */
+                               /* will disable the "pause time exceeded"*/
+                               /* tests.                                */
+                        /* The setter and getter are unsynchronized, so */
+                        /* GC_call_with_alloc_lock() is required to     */
+                        /* avoid data races (if the value is modified   */
+                        /* after the GC is put to multi-threaded mode). */
 GC_API void GC_CALL GC_set_time_limit(unsigned long);
 GC_API unsigned long GC_CALL GC_get_time_limit(void);
 
 /* Public procedures */
 
-/* Initialize the collector.  Portable clients should call GC_INIT() from
- * the main program instead.
- */
+/* Initialize the collector.  Portable clients should call GC_INIT()    */
+/* from the main program instead.                                       */
 GC_API void GC_CALL GC_init(void);
 
-/*
- * general purpose allocation routines, with roughly malloc calling conv.
- * The atomic versions promise that no relevant pointers are contained
- * in the object.  The non-atomic versions guarantee that the new object
- * is cleared.  GC_malloc_stubborn promises that no changes to the object
- * will occur after GC_end_stubborn_change has been called on the
- * result of GC_malloc_stubborn. GC_malloc_uncollectable allocates an object
- * that is scanned for pointers to collectable objects, but is not itself
- * collectable.  The object is scanned even if it does not appear to
- * be reachable.  GC_malloc_uncollectable and GC_free called on the resulting
- * object implicitly update GC_non_gc_bytes appropriately.
- *
- * Note that the GC_malloc_stubborn support doesn't really
- * exist anymore.  MANUAL_VDB provides comparable functionality.
- */
-GC_API void * GC_CALL GC_malloc(size_t size_in_bytes);
-GC_API void * GC_CALL GC_malloc_atomic(size_t size_in_bytes);
-GC_API char * GC_CALL GC_strdup (const char *str);
-GC_API void * GC_CALL GC_malloc_uncollectable(size_t size_in_bytes);
-GC_API void * GC_CALL GC_malloc_stubborn(size_t size_in_bytes);
-
-/* GC_memalign() is not well tested.   */
-GC_API void * GC_CALL GC_memalign(size_t align, size_t lb);
-
-/* The following is only defined if the library has been suitably      */
-/* compiled:                                                           */
-GC_API void * GC_CALL GC_malloc_atomic_uncollectable(size_t size_in_bytes);
+/* General purpose allocation routines, with roughly malloc calling     */
+/* conv.  The atomic versions promise that no relevant pointers are     */
+/* contained in the object.  The non-atomic versions guarantee that the */
+/* new object is cleared.  GC_malloc_stubborn promises that no changes  */
+/* to the object will occur after GC_end_stubborn_change has been       */
+/* called on the result of GC_malloc_stubborn.  GC_malloc_uncollectable */
+/* allocates an object that is scanned for pointers to collectable      */
+/* objects, but is not itself collectable.  The object is scanned even  */
+/* if it does not appear to be reachable.  GC_malloc_uncollectable and  */
+/* GC_free called on the resulting object implicitly update             */
+/* GC_non_gc_bytes appropriately.                                       */
+/* Note that the GC_malloc_stubborn support doesn't really exist        */
+/* anymore.  MANUAL_VDB provides comparable functionality.              */
+GC_API void * GC_CALL GC_malloc(size_t /* size_in_bytes */)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1);
+GC_API void * GC_CALL GC_malloc_atomic(size_t /* size_in_bytes */)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1);
+GC_API char * GC_CALL GC_strdup(const char *) GC_ATTR_MALLOC;
+GC_API void * GC_CALL GC_malloc_uncollectable(size_t /* size_in_bytes */)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1);
+GC_API void * GC_CALL GC_malloc_stubborn(size_t /* size_in_bytes */)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1);
+
+/* GC_memalign() is not well tested.                                    */
+GC_API void * GC_CALL GC_memalign(size_t /* align */, size_t /* lb */)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(2);
+
+/* The following is only defined if the library has been suitably       */
+/* compiled:                                                            */
+GC_API void * GC_CALL GC_malloc_atomic_uncollectable(
+                                                size_t /* size_in_bytes */)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1);
 
 /* Explicitly deallocate an object.  Dangerous if used incorrectly.     */
-/* Requires a pointer to the base of an object.                                */
+/* Requires a pointer to the base of an object.                         */
 /* If the argument is stubborn, it should not be changeable when freed. */
-/* An object should not be enabled for finalization when it is         */
-/* explicitly deallocated.                                             */
-/* GC_free(0) is a no-op, as required by ANSI C for free.              */
-GC_API void GC_CALL GC_free(void * object_addr);
-
-/*
- * Stubborn objects may be changed only if the collector is explicitly informed.
- * The collector is implicitly informed of coming change when such
- * an object is first allocated.  The following routines inform the
- * collector that an object will no longer be changed, or that it will
- * once again be changed.  Only non-NULL pointer stores into the object
- * are considered to be changes.  The argument to GC_end_stubborn_change
- * must be exactly the value returned by GC_malloc_stubborn or passed to
- * GC_change_stubborn.  (In the second case it may be an interior pointer
- * within 512 bytes of the beginning of the objects.)
- * There is a performance penalty for allowing more than
- * one stubborn object to be changed at once, but it is acceptable to
- * do so.  The same applies to dropping stubborn objects that are still
- * changeable.
- */
+/* An object should not be enabled for finalization when it is          */
+/* explicitly deallocated.                                              */
+/* GC_free(0) is a no-op, as required by ANSI C for free.               */
+GC_API void GC_CALL GC_free(void *);
+
+/* Stubborn objects may be changed only if the collector is explicitly  */
+/* informed.  The collector is implicitly informed of coming change     */
+/* when such an object is first allocated.  The following routines      */
+/* inform the collector that an object will no longer be changed, or    */
+/* that it will once again be changed.  Only non-NULL pointer stores    */
+/* into the object are considered to be changes.  The argument to       */
+/* GC_end_stubborn_change must be exactly the value returned by         */
+/* GC_malloc_stubborn or passed to GC_change_stubborn.  (In the second  */
+/* case, it may be an interior pointer within 512 bytes of the          */
+/* beginning of the objects.)  There is a performance penalty for       */
+/* allowing more than one stubborn object to be changed at once, but it */
+/* is acceptable to do so.  The same applies to dropping stubborn       */
+/* objects that are still changeable.                                   */
 GC_API void GC_CALL GC_change_stubborn(void *);
 GC_API void GC_CALL GC_end_stubborn_change(void *);
 
-/* Return a pointer to the base (lowest address) of an object given    */
-/* a pointer to a location within the object.                          */
-/* I.e. map an interior pointer to the corresponding bas pointer.      */
-/* Note that with debugging allocation, this returns a pointer to the  */
-/* actual base of the object, i.e. the debug information, not to       */
-/* the base of the user object.                                                */
-/* Return 0 if displaced_pointer doesn't point to within a valid       */
-/* object.                                                             */
-/* Note that a deallocated object in the garbage collected heap                */
-/* may be considered valid, even if it has been deallocated with       */
-/* GC_free.                                                            */
-GC_API void * GC_CALL GC_base(void * displaced_pointer);
-
-/* Given a pointer to the base of an object, return its size in bytes. */
-/* The returned size may be slightly larger than what was originally   */
-/* requested.                                                          */
-GC_API size_t GC_CALL GC_size(void * object_addr);
-
-/* For compatibility with C library.  This is occasionally faster than */
-/* a malloc followed by a bcopy.  But if you rely on that, either here */
-/* or with the standard C library, your code is broken.  In my         */
-/* opinion, it shouldn't have been invented, but now we're stuck. -HB  */
-/* The resulting object has the same kind as the original.             */
-/* If the argument is stubborn, the result will have changes enabled.  */
-/* It is an error to have changes enabled for the original object.     */
-/* Follows ANSI conventions for NULL old_object.                       */
-GC_API void * GC_CALL GC_realloc(void * old_object, size_t new_size_in_bytes);
-                                  
-/* Explicitly increase the heap size.  */
+/* Return a pointer to the base (lowest address) of an object given     */
+/* a pointer to a location within the object.                           */
+/* I.e. map an interior pointer to the corresponding bas pointer.       */
+/* Note that with debugging allocation, this returns a pointer to the   */
+/* actual base of the object, i.e. the debug information, not to        */
+/* the base of the user object.                                         */
+/* Return 0 if displaced_pointer doesn't point to within a valid        */
+/* object.                                                              */
+/* Note that a deallocated object in the garbage collected heap         */
+/* may be considered valid, even if it has been deallocated with        */
+/* GC_free.                                                             */
+GC_API void * GC_CALL GC_base(void * /* displaced_pointer */);
+
+/* Given a pointer to the base of an object, return its size in bytes.  */
+/* The returned size may be slightly larger than what was originally    */
+/* requested.                                                           */
+GC_API size_t GC_CALL GC_size(const void * /* object_addr */);
+
+/* For compatibility with C library.  This is occasionally faster than  */
+/* a malloc followed by a bcopy.  But if you rely on that, either here  */
+/* or with the standard C library, your code is broken.  In my          */
+/* opinion, it shouldn't have been invented, but now we're stuck. -HB   */
+/* The resulting object has the same kind as the original.              */
+/* If the argument is stubborn, the result will have changes enabled.   */
+/* It is an error to have changes enabled for the original object.      */
+/* Follows ANSI conventions for NULL old_object.                        */
+GC_API void * GC_CALL GC_realloc(void * /* old_object */,
+                                 size_t /* new_size_in_bytes */)
+                        /* 'realloc' attr */ GC_ATTR_ALLOC_SIZE(2);
+
+/* Explicitly increase the heap size.   */
 /* Returns 0 on failure, 1 on success.  */
-GC_API int GC_CALL GC_expand_hp(size_t number_of_bytes);
+GC_API int GC_CALL GC_expand_hp(size_t /* number_of_bytes */);
 
-/* Limit the heap size to n bytes.  Useful when you're debugging,      */
-/* especially on systems that don't handle running out of memory well. */
-/* n == 0 ==> unbounded.  This is the default.                         */
-GC_API void GC_CALL GC_set_max_heap_size(GC_word n);
+/* Limit the heap size to n bytes.  Useful when you're debugging,       */
+/* especially on systems that don't handle running out of memory well.  */
+/* n == 0 ==> unbounded.  This is the default.                          */
+GC_API void GC_CALL GC_set_max_heap_size(GC_word /* n */);
 
-/* Inform the collector that a certain section of statically allocated */
-/* memory contains no pointers to garbage collected memory.  Thus it   */
+/* Inform the collector that a certain section of statically allocated  */
+/* memory contains no pointers to garbage collected memory.  Thus it    */
 /* need not be scanned.  This is sometimes important if the application */
-/* maps large read/write files into the address space, which could be  */
-/* mistaken for dynamic library data segments on some systems.         */
-GC_API void GC_CALL GC_exclude_static_roots(void * low_address,
-                                   void * high_address_plus_1);
-
-/* Clear the set of root segments.  Wizards only. */
+/* maps large read/write files into the address space, which could be   */
+/* mistaken for dynamic library data segments on some systems.          */
+/* The section (referred to by low_address) must be pointer-aligned.    */
+/* low_address must not be greater than high_address_plus_1.            */
+GC_API void GC_CALL GC_exclude_static_roots(void * /* low_address */,
+                                        void * /* high_address_plus_1 */);
+
+/* Clear the set of root segments.  Wizards only.                       */
 GC_API void GC_CALL GC_clear_roots(void);
 
-/* Add a root segment.  Wizards only. */
-GC_API void GC_CALL GC_add_roots(void * low_address,
-                               void * high_address_plus_1);
+/* Add a root segment.  Wizards only.                                   */
+/* The segment (referred to by low_address) must be pointer-aligned.    */
+/* low_address must not be greater than high_address_plus_1.            */
+GC_API void GC_CALL GC_add_roots(void * /* low_address */,
+                                 void * /* high_address_plus_1 */);
 
-/* Remove a root segment.  Wizards only. */
-GC_API void GC_CALL GC_remove_roots(void * low_address,
-                               void * high_address_plus_1);
+/* Remove a root segment.  Wizards only.                                */
+/* May be unimplemented on some platforms.                              */
+GC_API void GC_CALL GC_remove_roots(void * /* low_address */,
+                                    void * /* high_address_plus_1 */);
 
-/* Add a displacement to the set of those considered valid by the      */
+/* Add a displacement to the set of those considered valid by the       */
 /* collector.  GC_register_displacement(n) means that if p was returned */
-/* by GC_malloc, then (char *)p + n will be considered to be a valid   */
-/* pointer to p.  N must be small and less than the size of p.         */
-/* (All pointers to the interior of objects from the stack are         */
-/* considered valid in any case.  This applies to heap objects and     */
-/* static data.)                                                       */
-/* Preferably, this should be called before any other GC procedures.   */
-/* Calling it later adds to the probability of excess memory           */
-/* retention.                                                          */
-/* This is a no-op if the collector has recognition of                 */
-/* arbitrary interior pointers enabled, which is now the default.      */
-GC_API void GC_CALL GC_register_displacement(size_t n);
-
-/* The following version should be used if any debugging allocation is */
-/* being done.                                                         */
-GC_API void GC_CALL GC_debug_register_displacement(size_t n);
-
-/* Explicitly trigger a full, world-stop collection.   */
+/* by GC_malloc, then (char *)p + n will be considered to be a valid    */
+/* pointer to p.  N must be small and less than the size of p.          */
+/* (All pointers to the interior of objects from the stack are          */
+/* considered valid in any case.  This applies to heap objects and      */
+/* static data.)                                                        */
+/* Preferably, this should be called before any other GC procedures.    */
+/* Calling it later adds to the probability of excess memory            */
+/* retention.                                                           */
+/* This is a no-op if the collector has recognition of                  */
+/* arbitrary interior pointers enabled, which is now the default.       */
+GC_API void GC_CALL GC_register_displacement(size_t /* n */);
+
+/* The following version should be used if any debugging allocation is  */
+/* being done.                                                          */
+GC_API void GC_CALL GC_debug_register_displacement(size_t /* n */);
+
+/* Explicitly trigger a full, world-stop collection.    */
 GC_API void GC_CALL GC_gcollect(void);
 
-/* Trigger a full world-stopped collection.  Abort the collection if   */
-/* and when stop_func returns a nonzero value.  Stop_func will be      */
-/* called frequently, and should be reasonably fast.  This works even  */
-/* if virtual dirty bits, and hence incremental collection is not      */
-/* available for this architecture.  Collections can be aborted faster */
-/* than normal pause times for incremental collection.  However,       */
-/* aborted collections do no useful work; the next collection needs    */
-/* to start from the beginning.                                                */
-/* Return 0 if the collection was aborted, 1 if it succeeded.          */
+/* Same as above but ignores the default stop_func setting and tries to */
+/* unmap as much memory as possible (regardless of the corresponding    */
+/* switch setting).  The recommended usage: on receiving a system       */
+/* low-memory event; before retrying a system call failed because of    */
+/* the system is running out of resources.                              */
+GC_API void GC_CALL GC_gcollect_and_unmap(void);
+
+/* Trigger a full world-stopped collection.  Abort the collection if    */
+/* and when stop_func returns a nonzero value.  Stop_func will be       */
+/* called frequently, and should be reasonably fast.  (stop_func is     */
+/* called with the allocation lock held and the world might be stopped; */
+/* it's not allowed for stop_func to manipulate pointers to the garbage */
+/* collected heap or call most of GC functions.)  This works even       */
+/* if virtual dirty bits, and hence incremental collection is not       */
+/* available for this architecture.  Collections can be aborted faster  */
+/* than normal pause times for incremental collection.  However,        */
+/* aborted collections do no useful work; the next collection needs     */
+/* to start from the beginning.  stop_func must not be 0.               */
+/* GC_try_to_collect() returns 0 if the collection was aborted (or the  */
+/* collections are disabled), 1 if it succeeded.                        */
 typedef int (GC_CALLBACK * GC_stop_func)(void);
-GC_API int GC_CALL GC_try_to_collect(GC_stop_func stop_func);
-
-/* Return the number of bytes in the heap.  Excludes collector private */
-/* data structures.  Excludes the unmapped memory (retuned to the OS). */
-/* Includes empty blocks and fragmentation loss.  Includes some pages  */
-/* that were allocated but never written.                              */
+GC_API int GC_CALL GC_try_to_collect(GC_stop_func /* stop_func */);
+
+/* Set and get the default stop_func.  The default stop_func is used by */
+/* GC_gcollect() and by implicitly trigged collections (except for the  */
+/* case when handling out of memory).  Must not be 0.                   */
+GC_API void GC_CALL GC_set_stop_func(GC_stop_func /* stop_func */);
+GC_API GC_stop_func GC_CALL GC_get_stop_func(void);
+
+/* Return the number of bytes in the heap.  Excludes collector private  */
+/* data structures.  Excludes the unmapped memory (retuned to the OS).  */
+/* Includes empty blocks and fragmentation loss.  Includes some pages   */
+/* that were allocated but never written.                               */
 GC_API size_t GC_CALL GC_get_heap_size(void);
 
-/* Return a lower bound on the number of free bytes in the heap                */
-/* (excluding the unmapped memory space).                              */
+/* Return a lower bound on the number of free bytes in the heap         */
+/* (excluding the unmapped memory space).                               */
 GC_API size_t GC_CALL GC_get_free_bytes(void);
 
-/* Return the size (in bytes) of the unmapped memory (which is returned        */
-/* to the OS but could be remapped back by the collector later unless  */
-/* the OS runs out of system/virtual memory).                          */
+/* Return the size (in bytes) of the unmapped memory (which is returned */
+/* to the OS but could be remapped back by the collector later unless   */
+/* the OS runs out of system/virtual memory).                           */
 GC_API size_t GC_CALL GC_get_unmapped_bytes(void);
 
-/* Return the number of bytes allocated since the last collection.     */
+/* Return the number of bytes allocated since the last collection.      */
 GC_API size_t GC_CALL GC_get_bytes_since_gc(void);
 
-/* Return the total number of bytes allocated in this process.         */
-/* Never decreases, except due to wrapping.                            */
+/* Return the total number of bytes allocated in this process.          */
+/* Never decreases, except due to wrapping.                             */
 GC_API size_t GC_CALL GC_get_total_bytes(void);
 
-/* Disable garbage collection.  Even GC_gcollect calls will be                 */
-/* ineffective.                                                                */
+/* Return the signal number used by the garbage collector to suspend    */
+/* threads on POSIX systems.  Return -1 otherwise.  Exported only if    */
+/* the library has been compiled with threads support (GC_THREADS).     */
+GC_API int GC_CALL GC_get_suspend_signal(void);
+
+/* Disable garbage collection.  Even GC_gcollect calls will be          */
+/* ineffective.                                                         */
 GC_API void GC_CALL GC_disable(void);
 
-/* Re-enable garbage collection.  GC_disable() and GC_enable() calls   */
-/* nest.  Garbage collection is enabled if the number of calls to both */
-/* both functions is equal.                                            */
+/* Re-enable garbage collection.  GC_disable() and GC_enable() calls    */
+/* nest.  Garbage collection is enabled if the number of calls to both  */
+/* both functions is equal.                                             */
 GC_API void GC_CALL GC_enable(void);
 
-/* Enable incremental/generational collection. */
-/* Not advisable unless dirty bits are                 */
-/* available or most heap objects are          */
-/* pointer-free (atomic) or immutable.         */
-/* Don't use in leak finding mode.             */
-/* Ignored if GC_dont_gc is true.              */
-/* Only the generational piece of this is      */
-/* functional if GC_parallel is TRUE           */
-/* or if GC_time_limit is GC_TIME_UNLIMITED.   */
-/* Causes thread-local variant of GC_gcj_malloc() to revert to */
-/* locked allocation.  Must be called before any such          */
-/* GC_gcj_malloc() calls.                                      */
-/* For best performance, should be called as early as possible.        */
-/* On some platforms, calling it later may have adverse effects.*/
-/* Safe to call before GC_INIT().  Includes a GC_init() call.  */
+/* Enable incremental/generational collection.  Not advisable unless    */
+/* dirty bits are available or most heap objects are pointer-free       */
+/* (atomic) or immutable.  Don't use in leak finding mode.  Ignored if  */
+/* GC_dont_gc is true.  Only the generational piece of this is          */
+/* functional if GC_parallel is TRUE or if GC_time_limit is             */
+/* GC_TIME_UNLIMITED.  Causes thread-local variant of GC_gcj_malloc()   */
+/* to revert to locked allocation.  Must be called before any such      */
+/* GC_gcj_malloc() calls.  For best performance, should be called as    */
+/* early as possible.  On some platforms, calling it later may have     */
+/* adverse effects.                                                     */
+/* Safe to call before GC_INIT().  Includes a  GC_init() call.          */
 GC_API void GC_CALL GC_enable_incremental(void);
 
-/* Does incremental mode write-protect pages?  Returns zero or */
-/* more of the following, or'ed together:                      */
-#define GC_PROTECTS_POINTER_HEAP  1 /* May protect non-atomic objs.    */
+/* Does incremental mode write-protect pages?  Returns zero or  */
+/* more of the following, or'ed together:                       */
+#define GC_PROTECTS_POINTER_HEAP  1 /* May protect non-atomic objs.     */
 #define GC_PROTECTS_PTRFREE_HEAP  2
-#define GC_PROTECTS_STATIC_DATA   4 /* Currently never.                        */
-#define GC_PROTECTS_STACK        8 /* Probably impractical.            */
+#define GC_PROTECTS_STATIC_DATA   4 /* Currently never.                 */
+#define GC_PROTECTS_STACK         8 /* Probably impractical.            */
 
 #define GC_PROTECTS_NONE 0
 GC_API int GC_CALL GC_incremental_protection_needs(void);
 
-/* Perform some garbage collection work, if appropriate.       */
-/* Return 0 if there is no more work to be done.               */
-/* Typically performs an amount of work corresponding roughly  */
-/* to marking from one page.  May do more work if further      */
-/* progress requires it, e.g. if incremental collection is     */
-/* disabled.  It is reasonable to call this in a wait loop     */
-/* until it returns 0.                                         */
+/* Perform some garbage collection work, if appropriate.        */
+/* Return 0 if there is no more work to be done.                */
+/* Typically performs an amount of work corresponding roughly   */
+/* to marking from one page.  May do more work if further       */
+/* progress requires it, e.g. if incremental collection is      */
+/* disabled.  It is reasonable to call this in a wait loop      */
+/* until it returns 0.                                          */
 GC_API int GC_CALL GC_collect_a_little(void);
 
-/* Allocate an object of size lb bytes.  The client guarantees that    */
-/* as long as the object is live, it will be referenced by a pointer   */
-/* that points to somewhere within the first 256 bytes of the object.  */
-/* (This should normally be declared volatile to prevent the compiler  */
-/* from invalidating this assertion.)  This routine is only useful     */
-/* if a large array is being allocated.  It reduces the chance of      */
-/* accidentally retaining such an array as a result of scanning an     */
-/* integer that happens to be an address inside the array.  (Actually, */
-/* it reduces the chance of the allocator not finding space for such   */
-/* an array, since it will try hard to avoid introducing such a false  */
+/* Allocate an object of size lb bytes.  The client guarantees that     */
+/* as long as the object is live, it will be referenced by a pointer    */
+/* that points to somewhere within the first 256 bytes of the object.   */
+/* (This should normally be declared volatile to prevent the compiler   */
+/* from invalidating this assertion.)  This routine is only useful      */
+/* if a large array is being allocated.  It reduces the chance of       */
+/* accidentally retaining such an array as a result of scanning an      */
+/* integer that happens to be an address inside the array.  (Actually,  */
+/* it reduces the chance of the allocator not finding space for such    */
+/* an array, since it will try hard to avoid introducing such a false   */
 /* reference.)  On a SunOS 4.X or MS Windows system this is recommended */
-/* for arrays likely to be larger than 100K or so.  For other systems, */
-/* or if the collector is not configured to recognize all interior     */
-/* pointers, the threshold is normally much higher.                    */
-GC_API void * GC_CALL GC_malloc_ignore_off_page(size_t lb);
-GC_API void * GC_CALL GC_malloc_atomic_ignore_off_page(size_t lb);
+/* for arrays likely to be larger than 100K or so.  For other systems,  */
+/* or if the collector is not configured to recognize all interior      */
+/* pointers, the threshold is normally much higher.                     */
+GC_API void * GC_CALL GC_malloc_ignore_off_page(size_t /* lb */)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1);
+GC_API void * GC_CALL GC_malloc_atomic_ignore_off_page(size_t /* lb */)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1);
 
 #if defined(__sgi) && !defined(__GNUC__) && _COMPILER_VERSION >= 720
-#   define GC_ADD_CALLER
-#   define GC_RETURN_ADDR (GC_word)__return_address
+# define GC_ADD_CALLER
+# define GC_RETURN_ADDR (GC_word)__return_address
 #endif
 
 #if defined(__linux__) || defined(__GLIBC__)
 # include <features.h>
 # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
-     && !defined(__ia64__) && !defined(__UCLIBC__)
-#   ifndef GC_HAVE_BUILTIN_BACKTRACE
-#     define GC_HAVE_BUILTIN_BACKTRACE
-#   endif
+        && !defined(__ia64__) && !defined(__UCLIBC__) \
+        && !defined(GC_HAVE_BUILTIN_BACKTRACE)
+#   define GC_HAVE_BUILTIN_BACKTRACE
 # endif
 # if defined(__i386__) || defined(__x86_64__)
 #   define GC_CAN_SAVE_CALL_STACKS
 # endif
 #endif
 
-#if defined(_MSC_VER) && _MSC_VER >= 1200 /* version 12.0+ (MSVC 6.0+)  */ \
-    && !defined(_AMD64_)
-# ifndef GC_HAVE_NO_BUILTIN_BACKTRACE
-#   define GC_HAVE_BUILTIN_BACKTRACE
-# endif
+#if defined(_MSC_VER) && _MSC_VER >= 1200 /* version 12.0+ (MSVC 6.0+) */ \
+        && !defined(_AMD64_) && !defined(GC_HAVE_NO_BUILTIN_BACKTRACE) \
+        && !defined(_WIN32_WCE) && !defined(GC_HAVE_BUILTIN_BACKTRACE)
+# define GC_HAVE_BUILTIN_BACKTRACE
 #endif
 
 #if defined(GC_HAVE_BUILTIN_BACKTRACE) && !defined(GC_CAN_SAVE_CALL_STACKS)
@@ -535,22 +617,23 @@ GC_API void * GC_CALL GC_malloc_atomic_ignore_off_page(size_t lb);
 #endif
 
 #if defined(__sparc__)
-#   define GC_CAN_SAVE_CALL_STACKS
+# define GC_CAN_SAVE_CALL_STACKS
 #endif
 
-/* If we're on an a platform on which we can't save call stacks, but   */
-/* gcc is normally used, we go ahead and define GC_ADD_CALLER.         */
-/* We make this decision independent of whether gcc is actually being  */
-/* used, in order to keep the interface consistent, and allow mixing   */
-/* of compilers.                                                       */
-/* This may also be desirable if it is possible but expensive to       */
-/* retrieve the call chain.                                            */
+/* If we're on an a platform on which we can't save call stacks, but    */
+/* gcc is normally used, we go ahead and define GC_ADD_CALLER.          */
+/* We make this decision independent of whether gcc is actually being   */
+/* used, in order to keep the interface consistent, and allow mixing    */
+/* of compilers.                                                        */
+/* This may also be desirable if it is possible but expensive to        */
+/* retrieve the call chain.                                             */
 #if (defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) \
-     || defined(__FreeBSD__) || defined(__DragonFly__)) & !defined(GC_CAN_SAVE_CALL_STACKS)
+     || defined(__FreeBSD__) || defined(__DragonFly__)) \
+    && !defined(GC_CAN_SAVE_CALL_STACKS)
 # define GC_ADD_CALLER
-# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) 
+# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
     /* gcc knows how to retrieve return address, but we don't know */
-    /* how to generate call stacks.                               */
+    /* how to generate call stacks.                                */
 #   define GC_RETURN_ADDR (GC_word)__builtin_return_address(0)
 # else
     /* Just pass 0 for gcc compatibility. */
@@ -559,668 +642,805 @@ GC_API void * GC_CALL GC_malloc_atomic_ignore_off_page(size_t lb);
 #endif
 
 #ifdef GC_ADD_CALLER
-#  define GC_EXTRAS GC_RETURN_ADDR, __FILE__, __LINE__
-#  define GC_EXTRA_PARAMS GC_word ra, const char * s, int i
+# define GC_EXTRAS GC_RETURN_ADDR, __FILE__, __LINE__
+# define GC_EXTRA_PARAMS GC_word ra, const char * s, int i
 #else
-#  define GC_EXTRAS __FILE__, __LINE__
-#  define GC_EXTRA_PARAMS const char * s, int i
+# define GC_EXTRAS __FILE__, __LINE__
+# define GC_EXTRA_PARAMS const char * s, int i
 #endif
 
-/* Debugging (annotated) allocation.  GC_gcollect will check           */
-/* objects allocated in this way for overwrites, etc.                  */
-GC_API void * GC_CALL GC_debug_malloc(size_t size_in_bytes, GC_EXTRA_PARAMS);
-GC_API void * GC_CALL GC_debug_malloc_atomic
-       (size_t size_in_bytes, GC_EXTRA_PARAMS);
-GC_API char * GC_CALL GC_debug_strdup(const char *str, GC_EXTRA_PARAMS);
-GC_API void * GC_CALL GC_debug_malloc_uncollectable
-       (size_t size_in_bytes, GC_EXTRA_PARAMS);
-GC_API void * GC_CALL GC_debug_malloc_stubborn
-       (size_t size_in_bytes, GC_EXTRA_PARAMS);
-GC_API void * GC_CALL GC_debug_malloc_ignore_off_page
-       (size_t size_in_bytes, GC_EXTRA_PARAMS);
-GC_API void * GC_CALL GC_debug_malloc_atomic_ignore_off_page
-       (size_t size_in_bytes, GC_EXTRA_PARAMS);
-GC_API void GC_CALL GC_debug_free (void * object_addr);
-GC_API void * GC_CALL GC_debug_realloc
-       (void * old_object, size_t new_size_in_bytes, GC_EXTRA_PARAMS);
+/* Debugging (annotated) allocation.  GC_gcollect will check            */
+/* objects allocated in this way for overwrites, etc.                   */
+GC_API void * GC_CALL GC_debug_malloc(size_t /* size_in_bytes */,
+                                      GC_EXTRA_PARAMS)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1);
+GC_API void * GC_CALL GC_debug_malloc_atomic(size_t /* size_in_bytes */,
+                                             GC_EXTRA_PARAMS)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1);
+GC_API char * GC_CALL GC_debug_strdup(const char *,
+                                      GC_EXTRA_PARAMS) GC_ATTR_MALLOC;
+GC_API void * GC_CALL GC_debug_malloc_uncollectable(
+                        size_t /* size_in_bytes */, GC_EXTRA_PARAMS)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1);
+GC_API void * GC_CALL GC_debug_malloc_stubborn(size_t /* size_in_bytes */,
+                                               GC_EXTRA_PARAMS)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1);
+GC_API void * GC_CALL GC_debug_malloc_ignore_off_page(
+                        size_t /* size_in_bytes */, GC_EXTRA_PARAMS)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1);
+GC_API void * GC_CALL GC_debug_malloc_atomic_ignore_off_page(
+                        size_t /* size_in_bytes */, GC_EXTRA_PARAMS)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1);
+GC_API void GC_CALL GC_debug_free(void *);
+GC_API void * GC_CALL GC_debug_realloc(void * /* old_object */,
+                        size_t /* new_size_in_bytes */, GC_EXTRA_PARAMS)
+                        /* 'realloc' attr */ GC_ATTR_ALLOC_SIZE(2);
 GC_API void GC_CALL GC_debug_change_stubborn(void *);
 GC_API void GC_CALL GC_debug_end_stubborn_change(void *);
 
-/* Routines that allocate objects with debug information (like the     */
-/* above), but just fill in dummy file and line number information.    */
-/* Thus they can serve as drop-in malloc/realloc replacements.  This   */
-/* can be useful for two reasons:                                      */
-/* 1) It allows the collector to be built with DBG_HDRS_ALL defined    */
-/*    even if some allocation calls come from 3rd party libraries      */
-/*    that can't be recompiled.                                                */
-/* 2) On some platforms, the file and line information is redundant,   */
-/*    since it can be reconstructed from a stack trace.  On such       */
-/*    platforms it may be more convenient not to recompile, e.g. for   */
-/*    leak detection.  This can be accomplished by instructing the     */
-/*    linker to replace malloc/realloc with these.                     */
-GC_API void * GC_CALL GC_debug_malloc_replacement (size_t size_in_bytes);
-GC_API void * GC_CALL GC_debug_realloc_replacement
-             (void * object_addr, size_t size_in_bytes);
-                                
-# ifdef GC_DEBUG
-#   define GC_MALLOC(sz) GC_debug_malloc(sz, GC_EXTRAS)
-#   define GC_MALLOC_ATOMIC(sz) GC_debug_malloc_atomic(sz, GC_EXTRAS)
-#   define GC_STRDUP(s) GC_debug_strdup((s), GC_EXTRAS)
-#   define GC_MALLOC_UNCOLLECTABLE(sz) \
-                       GC_debug_malloc_uncollectable(sz, GC_EXTRAS)
-#   define GC_MALLOC_IGNORE_OFF_PAGE(sz) \
-                       GC_debug_malloc_ignore_off_page(sz, GC_EXTRAS)
-#   define GC_MALLOC_ATOMIC_IGNORE_OFF_PAGE(sz) \
-                       GC_debug_malloc_atomic_ignore_off_page(sz, GC_EXTRAS)
-#   define GC_REALLOC(old, sz) GC_debug_realloc(old, sz, GC_EXTRAS)
-#   define GC_FREE(p) GC_debug_free(p)
-#   define GC_REGISTER_FINALIZER(p, f, d, of, od) \
-       GC_debug_register_finalizer(p, f, d, of, od)
-#   define GC_REGISTER_FINALIZER_IGNORE_SELF(p, f, d, of, od) \
-       GC_debug_register_finalizer_ignore_self(p, f, d, of, od)
-#   define GC_REGISTER_FINALIZER_NO_ORDER(p, f, d, of, od) \
-       GC_debug_register_finalizer_no_order(p, f, d, of, od)
-#   define GC_REGISTER_FINALIZER_UNREACHABLE(p, f, d, of, od) \
-       GC_debug_register_finalizer_unreachable(p, f, d, of, od)
-#   define GC_MALLOC_STUBBORN(sz) GC_debug_malloc_stubborn(sz, GC_EXTRAS);
-#   define GC_CHANGE_STUBBORN(p) GC_debug_change_stubborn(p)
-#   define GC_END_STUBBORN_CHANGE(p) GC_debug_end_stubborn_change(p)
-#   define GC_GENERAL_REGISTER_DISAPPEARING_LINK(link, obj) \
-       GC_general_register_disappearing_link(link, GC_base(obj))
-#   define GC_REGISTER_DISPLACEMENT(n) GC_debug_register_displacement(n)
-# else
-#   define GC_MALLOC(sz) GC_malloc(sz)
-#   define GC_MALLOC_ATOMIC(sz) GC_malloc_atomic(sz)
-#   define GC_STRDUP(s) GC_strdup(s)
-#   define GC_MALLOC_UNCOLLECTABLE(sz) GC_malloc_uncollectable(sz)
-#   define GC_MALLOC_IGNORE_OFF_PAGE(sz) \
-                       GC_malloc_ignore_off_page(sz)
-#   define GC_MALLOC_ATOMIC_IGNORE_OFF_PAGE(sz) \
-                       GC_malloc_atomic_ignore_off_page(sz)
-#   define GC_REALLOC(old, sz) GC_realloc(old, sz)
-#   define GC_FREE(p) GC_free(p)
-#   define GC_REGISTER_FINALIZER(p, f, d, of, od) \
-       GC_register_finalizer(p, f, d, of, od)
-#   define GC_REGISTER_FINALIZER_IGNORE_SELF(p, f, d, of, od) \
-       GC_register_finalizer_ignore_self(p, f, d, of, od)
-#   define GC_REGISTER_FINALIZER_NO_ORDER(p, f, d, of, od) \
-       GC_register_finalizer_no_order(p, f, d, of, od)
-#   define GC_REGISTER_FINALIZER_UNREACHABLE(p, f, d, of, od) \
-       GC_register_finalizer_unreachable(p, f, d, of, od)
-#   define GC_MALLOC_STUBBORN(sz) GC_malloc_stubborn(sz)
-#   define GC_CHANGE_STUBBORN(p) GC_change_stubborn(p)
-#   define GC_END_STUBBORN_CHANGE(p) GC_end_stubborn_change(p)
-#   define GC_GENERAL_REGISTER_DISAPPEARING_LINK(link, obj) \
-       GC_general_register_disappearing_link(link, obj)
-#   define GC_REGISTER_DISPLACEMENT(n) GC_register_displacement(n)
-# endif
-/* The following are included because they are often convenient, and   */
-/* reduce the chance for a misspecified size argument.  But calls may  */
-/* expand to something syntactically incorrect if t is a complicated   */
-/* type expression.                                                    */
-# define GC_NEW(t) (t *)GC_MALLOC(sizeof (t))
-# define GC_NEW_ATOMIC(t) (t *)GC_MALLOC_ATOMIC(sizeof (t))
-# define GC_NEW_STUBBORN(t) (t *)GC_MALLOC_STUBBORN(sizeof (t))
-# define GC_NEW_UNCOLLECTABLE(t) (t *)GC_MALLOC_UNCOLLECTABLE(sizeof (t))
-
-/* Finalization.  Some of these primitives are grossly unsafe.         */
-/* The idea is to make them both cheap, and sufficient to build                */
-/* a safer layer, closer to Modula-3, Java, or PCedar finalization.    */
-/* The interface represents my conclusions from a long discussion      */
-/* with Alan Demers, Dan Greene, Carl Hauser, Barry Hayes,             */
-/* Christian Jacobi, and Russ Atkinson.  It's not perfect, and         */
-/* probably nobody else agrees with it.            Hans-J. Boehm  3/13/92      */
-typedef void (GC_CALLBACK * GC_finalization_proc) (void * obj,
-                                               void * client_data);
-
-GC_API void GC_CALL GC_register_finalizer(void * obj, GC_finalization_proc fn,
-                                 void * cd, GC_finalization_proc *ofn,
-                                 void * *ocd);
-GC_API void GC_CALL GC_debug_register_finalizer
-                (void * obj, GC_finalization_proc fn, void * cd,
-                 GC_finalization_proc *ofn, void * *ocd);
-       /* When obj is no longer accessible, invoke             */
-       /* (*fn)(obj, cd).  If a and b are inaccessible, and    */
-       /* a points to b (after disappearing links have been    */
-       /* made to disappear), then only a will be              */
-       /* finalized.  (If this does not create any new         */
-       /* pointers to b, then b will be finalized after the    */
-       /* next collection.)  Any finalizable object that       */
-       /* is reachable from itself by following one or more    */
-       /* pointers will not be finalized (or collected).       */
-       /* Thus cycles involving finalizable objects should     */
-       /* be avoided, or broken by disappearing links.         */
-       /* All but the last finalizer registered for an object  */
-       /* is ignored.                                          */
-       /* Finalization may be removed by passing 0 as fn.      */
-       /* Finalizers are implicitly unregistered when they are */
-       /* enqueued for finalization (i.e. become ready to be   */
-       /* finalized).                                          */
-       /* The old finalizer and client data are stored in      */
-       /* *ofn and *ocd.  (ofn and/or ocd may be NULL.         */
-       /* The allocation lock is held while *ofn and *ocd are  */
-       /* updated.  In case of error (no memory to register    */
-       /* new finalizer), *ofn and *ocd remain unchanged.)     */
-       /* Fn is never invoked on an accessible object,         */
-       /* provided hidden pointers are converted to real       */
-       /* pointers only if the allocation lock is held, and    */
-       /* such conversions are not performed by finalization   */
-       /* routines.                                            */
-       /* If GC_register_finalizer is aborted as a result of   */
-       /* a signal, the object may be left with no             */
-       /* finalization, even if neither the old nor new        */
-       /* finalizer were NULL.                                 */
-       /* Obj should be the starting address of an object      */
-       /* allocated by GC_malloc or friends. Obj may also be   */
-       /* NULL or point to something outside GC heap (in this  */
-       /* case, fn is ignored, *ofn and *ocd are set to NULL). */
-       /* Note that any garbage collectable object referenced  */
-       /* by cd will be considered accessible until the        */
-       /* finalizer is invoked.                                */
-
-/* Another versions of the above follow.  It ignores           */
-/* self-cycles, i.e. pointers from a finalizable object to     */
-/* itself.  There is a stylistic argument that this is wrong,  */
-/* but it's unavoidable for C++, since the compiler may                */
-/* silently introduce these.  It's also benign in that specific        */
-/* case.  And it helps if finalizable objects are split to     */
-/* avoid cycles.                                               */
-/* Note that cd will still be viewed as accessible, even if it */
-/* refers to the object itself.                                        */
-GC_API void GC_CALL GC_register_finalizer_ignore_self
-               (void * obj, GC_finalization_proc fn, void * cd,
-                GC_finalization_proc *ofn, void * *ocd);
-GC_API void GC_CALL GC_debug_register_finalizer_ignore_self
-               (void * obj, GC_finalization_proc fn, void * cd,
-                GC_finalization_proc *ofn, void * *ocd);
+/* Routines that allocate objects with debug information (like the      */
+/* above), but just fill in dummy file and line number information.     */
+/* Thus they can serve as drop-in malloc/realloc replacements.  This    */
+/* can be useful for two reasons:                                       */
+/* 1) It allows the collector to be built with DBG_HDRS_ALL defined     */
+/*    even if some allocation calls come from 3rd party libraries       */
+/*    that can't be recompiled.                                         */
+/* 2) On some platforms, the file and line information is redundant,    */
+/*    since it can be reconstructed from a stack trace.  On such        */
+/*    platforms it may be more convenient not to recompile, e.g. for    */
+/*    leak detection.  This can be accomplished by instructing the      */
+/*    linker to replace malloc/realloc with these.                      */
+GC_API void * GC_CALL GC_debug_malloc_replacement(size_t /* size_in_bytes */)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1);
+GC_API void * GC_CALL GC_debug_realloc_replacement(void * /* object_addr */,
+                                                   size_t /* size_in_bytes */)
+                        /* 'realloc' attr */ GC_ATTR_ALLOC_SIZE(2);
+
+#ifdef GC_DEBUG
+# define GC_MALLOC(sz) GC_debug_malloc(sz, GC_EXTRAS)
+# define GC_MALLOC_ATOMIC(sz) GC_debug_malloc_atomic(sz, GC_EXTRAS)
+# define GC_STRDUP(s) GC_debug_strdup((s), GC_EXTRAS)
+# define GC_MALLOC_UNCOLLECTABLE(sz) \
+                        GC_debug_malloc_uncollectable(sz, GC_EXTRAS)
+# define GC_MALLOC_IGNORE_OFF_PAGE(sz) \
+                        GC_debug_malloc_ignore_off_page(sz, GC_EXTRAS)
+# define GC_MALLOC_ATOMIC_IGNORE_OFF_PAGE(sz) \
+                        GC_debug_malloc_atomic_ignore_off_page(sz, GC_EXTRAS)
+# define GC_REALLOC(old, sz) GC_debug_realloc(old, sz, GC_EXTRAS)
+# define GC_FREE(p) GC_debug_free(p)
+# define GC_REGISTER_FINALIZER(p, f, d, of, od) \
+      GC_debug_register_finalizer(p, f, d, of, od)
+# define GC_REGISTER_FINALIZER_IGNORE_SELF(p, f, d, of, od) \
+      GC_debug_register_finalizer_ignore_self(p, f, d, of, od)
+# define GC_REGISTER_FINALIZER_NO_ORDER(p, f, d, of, od) \
+      GC_debug_register_finalizer_no_order(p, f, d, of, od)
+# define GC_REGISTER_FINALIZER_UNREACHABLE(p, f, d, of, od) \
+      GC_debug_register_finalizer_unreachable(p, f, d, of, od)
+# define GC_MALLOC_STUBBORN(sz) GC_debug_malloc_stubborn(sz, GC_EXTRAS);
+# define GC_CHANGE_STUBBORN(p) GC_debug_change_stubborn(p)
+# define GC_END_STUBBORN_CHANGE(p) GC_debug_end_stubborn_change(p)
+# define GC_GENERAL_REGISTER_DISAPPEARING_LINK(link, obj) \
+      GC_general_register_disappearing_link(link, GC_base(obj))
+# define GC_REGISTER_DISPLACEMENT(n) GC_debug_register_displacement(n)
+#else
+# define GC_MALLOC(sz) GC_malloc(sz)
+# define GC_MALLOC_ATOMIC(sz) GC_malloc_atomic(sz)
+# define GC_STRDUP(s) GC_strdup(s)
+# define GC_MALLOC_UNCOLLECTABLE(sz) GC_malloc_uncollectable(sz)
+# define GC_MALLOC_IGNORE_OFF_PAGE(sz) \
+                        GC_malloc_ignore_off_page(sz)
+# define GC_MALLOC_ATOMIC_IGNORE_OFF_PAGE(sz) \
+                        GC_malloc_atomic_ignore_off_page(sz)
+# define GC_REALLOC(old, sz) GC_realloc(old, sz)
+# define GC_FREE(p) GC_free(p)
+# define GC_REGISTER_FINALIZER(p, f, d, of, od) \
+      GC_register_finalizer(p, f, d, of, od)
+# define GC_REGISTER_FINALIZER_IGNORE_SELF(p, f, d, of, od) \
+      GC_register_finalizer_ignore_self(p, f, d, of, od)
+# define GC_REGISTER_FINALIZER_NO_ORDER(p, f, d, of, od) \
+      GC_register_finalizer_no_order(p, f, d, of, od)
+# define GC_REGISTER_FINALIZER_UNREACHABLE(p, f, d, of, od) \
+      GC_register_finalizer_unreachable(p, f, d, of, od)
+# define GC_MALLOC_STUBBORN(sz) GC_malloc_stubborn(sz)
+# define GC_CHANGE_STUBBORN(p) GC_change_stubborn(p)
+# define GC_END_STUBBORN_CHANGE(p) GC_end_stubborn_change(p)
+# define GC_GENERAL_REGISTER_DISAPPEARING_LINK(link, obj) \
+      GC_general_register_disappearing_link(link, obj)
+# define GC_REGISTER_DISPLACEMENT(n) GC_register_displacement(n)
+#endif
+
+/* The following are included because they are often convenient, and    */
+/* reduce the chance for a misspecified size argument.  But calls may   */
+/* expand to something syntactically incorrect if t is a complicated    */
+/* type expression.                                                     */
+#define GC_NEW(t) (t *)GC_MALLOC(sizeof (t))
+#define GC_NEW_ATOMIC(t) (t *)GC_MALLOC_ATOMIC(sizeof (t))
+#define GC_NEW_STUBBORN(t) (t *)GC_MALLOC_STUBBORN(sizeof (t))
+#define GC_NEW_UNCOLLECTABLE(t) (t *)GC_MALLOC_UNCOLLECTABLE(sizeof (t))
+
+/* Finalization.  Some of these primitives are grossly unsafe.          */
+/* The idea is to make them both cheap, and sufficient to build         */
+/* a safer layer, closer to Modula-3, Java, or PCedar finalization.     */
+/* The interface represents my conclusions from a long discussion       */
+/* with Alan Demers, Dan Greene, Carl Hauser, Barry Hayes,              */
+/* Christian Jacobi, and Russ Atkinson.  It's not perfect, and          */
+/* probably nobody else agrees with it.     Hans-J. Boehm  3/13/92      */
+typedef void (GC_CALLBACK * GC_finalization_proc)(void * /* obj */,
+                                                  void * /* client_data */);
+
+GC_API void GC_CALL GC_register_finalizer(void * /* obj */,
+                        GC_finalization_proc /* fn */, void * /* cd */,
+                        GC_finalization_proc * /* ofn */, void ** /* ocd */);
+GC_API void GC_CALL GC_debug_register_finalizer(void * /* obj */,
+                        GC_finalization_proc /* fn */, void * /* cd */,
+                        GC_finalization_proc * /* ofn */, void ** /* ocd */);
+        /* When obj is no longer accessible, invoke             */
+        /* (*fn)(obj, cd).  If a and b are inaccessible, and    */
+        /* a points to b (after disappearing links have been    */
+        /* made to disappear), then only a will be              */
+        /* finalized.  (If this does not create any new         */
+        /* pointers to b, then b will be finalized after the    */
+        /* next collection.)  Any finalizable object that       */
+        /* is reachable from itself by following one or more    */
+        /* pointers will not be finalized (or collected).       */
+        /* Thus cycles involving finalizable objects should     */
+        /* be avoided, or broken by disappearing links.         */
+        /* All but the last finalizer registered for an object  */
+        /* is ignored.                                          */
+        /* Finalization may be removed by passing 0 as fn.      */
+        /* Finalizers are implicitly unregistered when they are */
+        /* enqueued for finalization (i.e. become ready to be   */
+        /* finalized).                                          */
+        /* The old finalizer and client data are stored in      */
+        /* *ofn and *ocd.  (ofn and/or ocd may be NULL.         */
+        /* The allocation lock is held while *ofn and *ocd are  */
+        /* updated.  In case of error (no memory to register    */
+        /* new finalizer), *ofn and *ocd remain unchanged.)     */
+        /* Fn is never invoked on an accessible object,         */
+        /* provided hidden pointers are converted to real       */
+        /* pointers only if the allocation lock is held, and    */
+        /* such conversions are not performed by finalization   */
+        /* routines.                                            */
+        /* If GC_register_finalizer is aborted as a result of   */
+        /* a signal, the object may be left with no             */
+        /* finalization, even if neither the old nor new        */
+        /* finalizer were NULL.                                 */
+        /* Obj should be the starting address of an object      */
+        /* allocated by GC_malloc or friends. Obj may also be   */
+        /* NULL or point to something outside GC heap (in this  */
+        /* case, fn is ignored, *ofn and *ocd are set to NULL). */
+        /* Note that any garbage collectable object referenced  */
+        /* by cd will be considered accessible until the        */
+        /* finalizer is invoked.                                */
+
+/* Another versions of the above follow.  It ignores            */
+/* self-cycles, i.e. pointers from a finalizable object to      */
+/* itself.  There is a stylistic argument that this is wrong,   */
+/* but it's unavoidable for C++, since the compiler may         */
+/* silently introduce these.  It's also benign in that specific */
+/* case.  And it helps if finalizable objects are split to      */
+/* avoid cycles.                                                */
+/* Note that cd will still be viewed as accessible, even if it  */
+/* refers to the object itself.                                 */
+GC_API void GC_CALL GC_register_finalizer_ignore_self(void * /* obj */,
+                        GC_finalization_proc /* fn */, void * /* cd */,
+                        GC_finalization_proc * /* ofn */, void ** /* ocd */);
+GC_API void GC_CALL GC_debug_register_finalizer_ignore_self(void * /* obj */,
+                        GC_finalization_proc /* fn */, void * /* cd */,
+                        GC_finalization_proc * /* ofn */, void ** /* ocd */);
 
 /* Another version of the above.  It ignores all cycles.        */
 /* It should probably only be used by Java implementations.     */
-/* Note that cd will still be viewed as accessible, even if it */
-/* refers to the object itself.                                        */
-GC_API void GC_CALL GC_register_finalizer_no_order
-               (void * obj, GC_finalization_proc fn, void * cd,
-                GC_finalization_proc *ofn, void * *ocd);
-GC_API void GC_CALL GC_debug_register_finalizer_no_order
-               (void * obj, GC_finalization_proc fn, void * cd,
-                GC_finalization_proc *ofn, void * *ocd);
+/* Note that cd will still be viewed as accessible, even if it  */
+/* refers to the object itself.                                 */
+GC_API void GC_CALL GC_register_finalizer_no_order(void * /* obj */,
+                        GC_finalization_proc /* fn */, void * /* cd */,
+                        GC_finalization_proc * /* ofn */, void ** /* ocd */);
+GC_API void GC_CALL GC_debug_register_finalizer_no_order(void * /* obj */,
+                        GC_finalization_proc /* fn */, void * /* cd */,
+                        GC_finalization_proc * /* ofn */, void ** /* ocd */);
 
 /* This is a special finalizer that is useful when an object's  */
 /* finalizer must be run when the object is known to be no      */
 /* longer reachable, not even from other finalizable objects.   */
-/* It behaves like "normal" finalization, except that the      */
-/* finalizer is not run while the object is reachable from     */
-/* other objects specifying unordered finalization.            */
-/* Effectively it allows an object referenced, possibly                */
+/* It behaves like "normal" finalization, except that the       */
+/* finalizer is not run while the object is reachable from      */
+/* other objects specifying unordered finalization.             */
+/* Effectively it allows an object referenced, possibly         */
 /* indirectly, from an unordered finalizable object to override */
-/* the unordered finalization request.                         */
+/* the unordered finalization request.                          */
 /* This can be used in combination with finalizer_no_order so   */
 /* as to release resources that must not be released while an   */
 /* object can still be brought back to life by other            */
 /* finalizers.                                                  */
-/* Only works if GC_java_finalization is set.  Probably only   */
-/* of interest when implementing a language that requires      */
-/* unordered finalization (e.g. Java, C#).                     */
-GC_API void GC_CALL GC_register_finalizer_unreachable
-                (void * obj, GC_finalization_proc fn, void * cd,
-                 GC_finalization_proc *ofn, void * *ocd);
-GC_API void GC_CALL GC_debug_register_finalizer_unreachable
-                (void * obj, GC_finalization_proc fn, void * cd,
-                 GC_finalization_proc *ofn, void * *ocd);
-
-/* The following routine may be used to break cycles between   */
-/* finalizable objects, thus causing cyclic finalizable                */
-/* objects to be finalized in the correct order.  Standard     */
-/* use involves calling GC_register_disappearing_link(&p),     */
-/* where p is a pointer that is not followed by finalization   */
-/* code, and should not be considered in determining           */
-/* finalization order.                                         */
-GC_API int GC_CALL GC_register_disappearing_link(void * * link );
-       /* Link should point to a field of a heap allocated     */
-       /* object obj.  *link will be cleared when obj is       */
-       /* found to be inaccessible.  This happens BEFORE any   */
-       /* finalization code is invoked, and BEFORE any         */
-       /* decisions about finalization order are made.         */
-       /* This is useful in telling the finalizer that         */
-       /* some pointers are not essential for proper           */
-       /* finalization.  This may avoid finalization cycles.   */
-       /* Note that obj may be resurrected by another          */
-       /* finalizer, and thus the clearing of *link may        */
-       /* be visible to non-finalization code.                 */
-       /* There's an argument that an arbitrary action should  */
-       /* be allowed here, instead of just clearing a pointer. */
-       /* But this causes problems if that action alters, or   */
-       /* examines connectivity.                               */
-       /* Returns 1 if link was already registered, 0 if       */
-       /* registration succeeded, 2 if it failed for lack of   */
-       /* memory, and GC_oom_fn did not handle the problem.    */
-       /* Only exists for backward compatibility.  See below:  */
-       
-GC_API int GC_CALL GC_general_register_disappearing_link (void * * link,
-                                                       void * obj);
-       /* A slight generalization of the above. *link is       */
-       /* cleared when obj first becomes inaccessible.  This   */
-       /* can be used to implement weak pointers easily and    */
-       /* safely. Typically link will point to a location      */
-       /* holding a disguised pointer to obj.  (A pointer      */
-       /* inside an "atomic" object is effectively             */
-       /* disguised.)   In this way soft                       */
-       /* pointers are broken before any object                */
-       /* reachable from them are finalized.  Each link        */
-       /* May be registered only once, i.e. with one obj       */
-       /* value.  This was added after a long email discussion */
-       /* with John Ellis.                                     */
-       /* Obj must be a pointer to the first word of an object */
-       /* we allocated.  It is unsafe to explicitly deallocate */
-       /* the object containing link.  Explicitly deallocating */
-       /* obj may or may not cause link to eventually be       */
-       /* cleared.                                             */
-       /* This can be used to implement certain types of       */
-       /* weak pointers.  Note however that this generally     */
-       /* requires that the allocation lock is held (see       */
-       /* GC_call_with_alloc_lock() below) when the disguised  */
-       /* pointer is accessed.  Otherwise a strong pointer     */
-       /* could be recreated between the time the collector    */
-       /* decides to reclaim the object and the link is        */
-       /* cleared.                                             */
-
-GC_API int GC_CALL GC_unregister_disappearing_link (void * * link);
-       /* Undoes a registration by either of the above two     */
-       /* routines.  Returns 0 if link was not actually        */
-       /* registered (otherwise returns 1).                    */
-
-/* Returns !=0 if GC_invoke_finalizers has something to do.    */
+/* Only works if GC_java_finalization is set.  Probably only    */
+/* of interest when implementing a language that requires       */
+/* unordered finalization (e.g. Java, C#).                      */
+GC_API void GC_CALL GC_register_finalizer_unreachable(void * /* obj */,
+                        GC_finalization_proc /* fn */, void * /* cd */,
+                        GC_finalization_proc * /* ofn */, void ** /* ocd */);
+GC_API void GC_CALL GC_debug_register_finalizer_unreachable(void * /* obj */,
+                        GC_finalization_proc /* fn */, void * /* cd */,
+                        GC_finalization_proc * /* ofn */, void ** /* ocd */);
+
+#define GC_NO_MEMORY 2  /* Failure due to lack of memory.       */
+
+/* The following routine may be used to break cycles between    */
+/* finalizable objects, thus causing cyclic finalizable         */
+/* objects to be finalized in the correct order.  Standard      */
+/* use involves calling GC_register_disappearing_link(&p),      */
+/* where p is a pointer that is not followed by finalization    */
+/* code, and should not be considered in determining            */
+/* finalization order.                                          */
+GC_API int GC_CALL GC_register_disappearing_link(void ** /* link */);
+        /* Link should point to a field of a heap allocated     */
+        /* object obj.  *link will be cleared when obj is       */
+        /* found to be inaccessible.  This happens BEFORE any   */
+        /* finalization code is invoked, and BEFORE any         */
+        /* decisions about finalization order are made.         */
+        /* This is useful in telling the finalizer that         */
+        /* some pointers are not essential for proper           */
+        /* finalization.  This may avoid finalization cycles.   */
+        /* Note that obj may be resurrected by another          */
+        /* finalizer, and thus the clearing of *link may        */
+        /* be visible to non-finalization code.                 */
+        /* There's an argument that an arbitrary action should  */
+        /* be allowed here, instead of just clearing a pointer. */
+        /* But this causes problems if that action alters, or   */
+        /* examines connectivity.  Returns GC_DUPLICATE if link */
+        /* was already registered, GC_SUCCESS if registration   */
+        /* succeeded, GC_NO_MEMORY if it failed for lack of     */
+        /* memory, and GC_oom_fn did not handle the problem.    */
+        /* Only exists for backward compatibility.  See below:  */
+
+GC_API int GC_CALL GC_general_register_disappearing_link(void ** /* link */,
+                                                         void * /* obj */);
+        /* A slight generalization of the above. *link is       */
+        /* cleared when obj first becomes inaccessible.  This   */
+        /* can be used to implement weak pointers easily and    */
+        /* safely. Typically link will point to a location      */
+        /* holding a disguised pointer to obj.  (A pointer      */
+        /* inside an "atomic" object is effectively disguised.) */
+        /* In this way, weak pointers are broken before any     */
+        /* object reachable from them gets finalized.           */
+        /* Each link may be registered only with one obj value, */
+        /* i.e. all objects but the last one (link registered   */
+        /* with) are ignored.  This was added after a long      */
+        /* email discussion with John Ellis.                    */
+        /* link must be non-NULL (and be properly aligned).     */
+        /* obj must be a pointer to the first word of an object */
+        /* allocated by GC_malloc or friends.  It is unsafe to  */
+        /* explicitly deallocate the object containing link.    */
+        /* Explicit deallocation of obj may or may not cause    */
+        /* link to eventually be cleared.                       */
+        /* This function can be used to implement certain types */
+        /* of weak pointers.  Note, however, this generally     */
+        /* requires that the allocation lock is held (see       */
+        /* GC_call_with_alloc_lock() below) when the disguised  */
+        /* pointer is accessed.  Otherwise a strong pointer     */
+        /* could be recreated between the time the collector    */
+        /* decides to reclaim the object and the link is        */
+        /* cleared.  Returns GC_SUCCESS if registration         */
+        /* succeeded (a new link is registered), GC_DUPLICATE   */
+        /* if link was already registered (with some object),   */
+        /* GC_NO_MEMORY if registration failed for lack of      */
+        /* memory (and GC_oom_fn did not handle the problem).   */
+
+GC_API int GC_CALL GC_unregister_disappearing_link(void ** /* link */);
+        /* Undoes a registration by either of the above two     */
+        /* routines.  Returns 0 if link was not actually        */
+        /* registered (otherwise returns 1).                    */
+
+/* Returns !=0 if GC_invoke_finalizers has something to do.     */
 GC_API int GC_CALL GC_should_invoke_finalizers(void);
 
 GC_API int GC_CALL GC_invoke_finalizers(void);
-       /* Run finalizers for all objects that are ready to     */
-       /* be finalized.  Return the number of finalizers       */
-       /* that were run.  Normally this is also called         */
-       /* implicitly during some allocations.  If              */
-       /* GC_finalize_on_demand is nonzero, it must be called  */
-       /* explicitly.                                          */
-
-/* Explicitly tell the collector that an object is reachable   */
-/* at a particular program point.  This prevents the argument  */
-/* pointer from being optimized away, even it is otherwise no  */
-/* longer needed.  It should have no visible effect in the     */
-/* absence of finalizers or disappearing links.  But it may be */
-/* needed to prevent finalizers from running while the         */
-/* associated external resource is still in use.               */
-/* The function is sometimes called keep_alive in other                */
-/* settings.                                                   */
-# if defined(__GNUC__) && !defined(__INTEL_COMPILER)
-#   define GC_reachable_here(ptr) \
-    __asm__ volatile(" " : : "X"(ptr) : "memory");
-# else
-    GC_API void GC_CALL GC_noop1(GC_word x);
-#   define GC_reachable_here(ptr) GC_noop1((GC_word)(ptr));
+        /* Run finalizers for all objects that are ready to     */
+        /* be finalized.  Return the number of finalizers       */
+        /* that were run.  Normally this is also called         */
+        /* implicitly during some allocations.  If              */
+        /* GC_finalize_on_demand is nonzero, it must be called  */
+        /* explicitly.                                          */
+
+/* Explicitly tell the collector that an object is reachable    */
+/* at a particular program point.  This prevents the argument   */
+/* pointer from being optimized away, even it is otherwise no   */
+/* longer needed.  It should have no visible effect in the      */
+/* absence of finalizers or disappearing links.  But it may be  */
+/* needed to prevent finalizers from running while the          */
+/* associated external resource is still in use.                */
+/* The function is sometimes called keep_alive in other         */
+/* settings.                                                    */
+#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
+# define GC_reachable_here(ptr) \
+  __asm__ volatile(" " : : "X"(ptr) : "memory");
+#else
+  GC_API void GC_CALL GC_noop1(GC_word);
+# define GC_reachable_here(ptr) GC_noop1((GC_word)(ptr));
 #endif
 
-/* GC_set_warn_proc can be used to redirect or filter warning messages.        */
-/* p may not be a NULL pointer.                                                */
-typedef void (GC_CALLBACK * GC_warn_proc) (char *msg, GC_word arg);
-GC_API void GC_CALL GC_set_warn_proc(GC_warn_proc p);
-/* GC_get_warn_proc returns the current warn_proc.                     */
+/* GC_set_warn_proc can be used to redirect or filter warning messages. */
+/* p may not be a NULL pointer.  Both the setter and the getter acquire */
+/* the GC lock (to avoid data races).                                   */
+typedef void (GC_CALLBACK * GC_warn_proc)(char * /* msg */,
+                                          GC_word /* arg */);
+GC_API void GC_CALL GC_set_warn_proc(GC_warn_proc /* p */);
+/* GC_get_warn_proc returns the current warn_proc.                      */
 GC_API GC_warn_proc GC_CALL GC_get_warn_proc(void);
 
-    /* GC_ignore_warn_proc may be used as an argument for    */
-    /* GC_set_warn_proc() to suppress all warnings (unless   */
-    /* statistics printing is turned on).                   */
-GC_API void GC_CALLBACK GC_ignore_warn_proc(char *msg, GC_word arg);
-
-/* The following is intended to be used by a higher level      */
-/* (e.g. Java-like) finalization facility.  It is expected     */
-/* that finalization code will arrange for hidden pointers to  */
-/* disappear.  Otherwise objects can be accessed after they    */
-/* have been collected.                                                */
-/* Note that putting pointers in atomic objects or in          */
-/* nonpointer slots of "typed" objects is equivalent to        */
-/* disguising them in this way, and may have other advantages. */
-# if defined(I_HIDE_POINTERS) || defined(GC_I_HIDE_POINTERS)
-    typedef GC_word GC_hidden_pointer;
-#   define HIDE_POINTER(p) (~(GC_hidden_pointer)(p))
-#   define REVEAL_POINTER(p) ((void *)(HIDE_POINTER(p)))
-    /* Converting a hidden pointer to a real pointer requires verifying        */
-    /* that the object still exists.  This involves acquiring the      */
-    /* allocator lock to avoid a race with the collector.              */
-# endif /* I_HIDE_POINTERS */
-
-typedef void * (GC_CALLBACK * GC_fn_type) (void * client_data);
-GC_API void * GC_CALL GC_call_with_alloc_lock (GC_fn_type fn,
-                                               void * client_data);
-
-/* These routines are intended to explicitly notify the collector      */
-/* of new threads.  Often this is unnecessary because thread creation  */
-/* is implicitly intercepted by the collector, using header-file       */
-/* defines, or linker-based interception.  In the long run the intent  */
-/* is to always make redundant registration safe.  In the short run,   */
-/* this is being implemented a platform at a time.                     */
-/* The interface is complicated by the fact that we probably will not  */
-/* ever be able to automatically determine the stack base for thread   */
-/* stacks on all platforms.                                            */
-
-/* Structure representing the base of a thread stack.  On most         */
-/* platforms this contains just a single address.                      */
+    /* GC_ignore_warn_proc may be used as an argument for       */
+    /* GC_set_warn_proc() to suppress all warnings (unless      */
+    /* statistics printing is turned on).                       */
+GC_API void GC_CALLBACK GC_ignore_warn_proc(char *, GC_word);
+
+/* The following is intended to be used by a higher level       */
+/* (e.g. Java-like) finalization facility.  It is expected      */
+/* that finalization code will arrange for hidden pointers to   */
+/* disappear.  Otherwise objects can be accessed after they     */
+/* have been collected.                                         */
+/* Note that putting pointers in atomic objects or in           */
+/* nonpointer slots of "typed" objects is equivalent to         */
+/* disguising them in this way, and may have other advantages.  */
+#if defined(I_HIDE_POINTERS) || defined(GC_I_HIDE_POINTERS)
+  typedef GC_word GC_hidden_pointer;
+# define HIDE_POINTER(p) (~(GC_hidden_pointer)(p))
+# define REVEAL_POINTER(p) ((void *)HIDE_POINTER(p))
+  /* Converting a hidden pointer to a real pointer requires verifying   */
+  /* that the object still exists.  This involves acquiring the         */
+  /* allocator lock to avoid a race with the collector.                 */
+#endif /* I_HIDE_POINTERS */
+
+/* The GC-prefixed symbols are preferred for new code (I_HIDE_POINTERS, */
+/* HIDE_POINTER and REVEAL_POINTER remain for compatibility).           */
+#ifdef GC_I_HIDE_POINTERS
+# define GC_HIDE_POINTER(p) HIDE_POINTER(p)
+# define GC_REVEAL_POINTER(p) REVEAL_POINTER(p)
+#endif
+
+typedef void * (GC_CALLBACK * GC_fn_type)(void * /* client_data */);
+GC_API void * GC_CALL GC_call_with_alloc_lock(GC_fn_type /* fn */,
+                                                void * /* client_data */);
+
+/* These routines are intended to explicitly notify the collector       */
+/* of new threads.  Often this is unnecessary because thread creation   */
+/* is implicitly intercepted by the collector, using header-file        */
+/* defines, or linker-based interception.  In the long run the intent   */
+/* is to always make redundant registration safe.  In the short run,    */
+/* this is being implemented a platform at a time.                      */
+/* The interface is complicated by the fact that we probably will not   */
+/* ever be able to automatically determine the stack base for thread    */
+/* stacks on all platforms.                                             */
+
+/* Structure representing the base of a thread stack.  On most          */
+/* platforms this contains just a single address.                       */
 struct GC_stack_base {
-       void * mem_base;        /* Base of memory stack.        */
-#      if defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
-         void * reg_base;      /* Base of separate register stack.     */
-#      endif
+  void * mem_base; /* Base of memory stack. */
+# if defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
+    void * reg_base; /* Base of separate register stack. */
+# endif
 };
 
-typedef void * (GC_CALLBACK * GC_stack_base_func)(struct GC_stack_base *sb,
-                                               void *arg);
-
-/* Call a function with a stack base structure corresponding to                */
-/* somewhere in the GC_call_with_stack_base frame.  This often can     */
-/* be used to provide a sufficiently accurate stack base.  And we      */
-/* implement it everywhere.                                            */
-GC_API void * GC_CALL GC_call_with_stack_base(GC_stack_base_func fn,
-                                               void *arg);
-
-/* Explicitly enable GC_register_my_thread() invocation.               */
-/* Done implicitly if a GC thread-creation function is called (or      */
-/* DllMain-based thread registration is enabled).  Otherwise, it must  */
-/* be called from the main (or any previously registered) thread       */
-/* between the collector initialization and the first explicit         */
-/* registering of a thread (it should be called as late as possible).  */
-GC_API void GC_CALL GC_allow_register_threads(void);
+typedef void * (GC_CALLBACK * GC_stack_base_func)(
+                struct GC_stack_base * /* sb */, void * /* arg */);
+
+/* Call a function with a stack base structure corresponding to         */
+/* somewhere in the GC_call_with_stack_base frame.  This often can      */
+/* be used to provide a sufficiently accurate stack base.  And we       */
+/* implement it everywhere.                                             */
+GC_API void * GC_CALL GC_call_with_stack_base(GC_stack_base_func /* fn */,
+                                              void * /* arg */);
 
-/* Register the current thread, with the indicated stack base, as      */
-/* a new thread whose stack(s) should be traced by the GC.  If it      */
-/* is not implicitly called by the GC, this must be called before a    */
-/* thread can allocate garbage collected memory, or assign pointers    */
-/* to the garbage collected heap.  Once registered, a thread will be   */
-/* stopped during garbage collections.                                 */
-/* This call must be previously enabled (see above).                   */
-/* This should never be called from the main thread, where it is       */
-/* always done implicitly.  This is normally done implicitly if GC_    */
-/* functions are called to create the thread, e.g. by defining         */
-/* GC_THREADS and including gc.h (which redefines some system          */
-/* functions) before calling the system thread creation function.      */
-/* It is also always done implicitly under win32 with DllMain-based    */
-/* thread registration enabled.  Except in this latter case, explicit  */
-/* calls are normally required for threads created by third-party      */
-/* libraries.                                                          */
 #define GC_SUCCESS 0
-#define GC_DUPLICATE 1 /* Was already registered.      */
-#define GC_NO_THREADS 2        /* No thread support in GC.     */
-#define GC_UNIMPLEMENTED 3     /* Not yet implemented on this platform. */
-GC_API int GC_CALL GC_register_my_thread(struct GC_stack_base *);
-
-/* Unregister the current thread.  Only an explicity registered thread */
-/* (i.e. for which GC_register_my_thread() returns GC_SUCCESS) is      */
-/* allowed (and required) to call this function.  The thread may no    */
-/* longer allocate garbage collected memory or manipulate pointers to  */
-/* the garbage collected heap after making this call.                  */
-/* Specifically, if it wants to return or otherwise communicate a      */
-/* pointer to the garbage-collected heap to another thread, it must    */
-/* do this before calling GC_unregister_my_thread, most probably       */
-/* by saving it in a global data structure.                            */
+#define GC_DUPLICATE 1          /* Was already registered.              */
+#define GC_NO_THREADS 2         /* No thread support in GC.             */
+        /* GC_NO_THREADS is not returned by any GC func anymore.        */
+#define GC_UNIMPLEMENTED 3 /* Not yet implemented on this platform.     */
+
+/* GC_allow_register_threads(), GC_register_my_thread() and             */
+/* GC_unregister_my_thread() are exported only if the library has been  */
+/* compiled with threads support (GC_THREADS).                          */
+
+/* Explicitly enable GC_register_my_thread() invocation.                */
+/* Done implicitly if a GC thread-creation function is called (or       */
+/* DllMain-based thread registration is enabled).  Otherwise, it must   */
+/* be called from the main (or any previously registered) thread        */
+/* between the collector initialization and the first explicit          */
+/* registering of a thread (it should be called as late as possible).   */
+GC_API void GC_CALL GC_allow_register_threads(void);
+
+/* Register the current thread, with the indicated stack base, as       */
+/* a new thread whose stack(s) should be traced by the GC.  If it       */
+/* is not implicitly called by the GC, this must be called before a     */
+/* thread can allocate garbage collected memory, or assign pointers     */
+/* to the garbage collected heap.  Once registered, a thread will be    */
+/* stopped during garbage collections.                                  */
+/* This call must be previously enabled (see above).                    */
+/* This should never be called from the main thread, where it is        */
+/* always done implicitly.  This is normally done implicitly if GC_     */
+/* functions are called to create the thread, e.g. by defining          */
+/* GC_THREADS and including gc.h (which redefines some system           */
+/* functions) before calling the system thread creation function.       */
+/* It is also always done implicitly under win32 with DllMain-based     */
+/* thread registration enabled.  Except in this latter case, explicit   */
+/* calls are normally required for threads created by third-party       */
+/* libraries.                                                           */
+GC_API int GC_CALL GC_register_my_thread(const struct GC_stack_base *);
+
+/* Unregister the current thread.  Only an explicity registered thread  */
+/* (i.e. for which GC_register_my_thread() returns GC_SUCCESS) is       */
+/* allowed (and required) to call this function.  The thread may no     */
+/* longer allocate garbage collected memory or manipulate pointers to   */
+/* the garbage collected heap after making this call.                   */
+/* Specifically, if it wants to return or otherwise communicate a       */
+/* pointer to the garbage-collected heap to another thread, it must     */
+/* do this before calling GC_unregister_my_thread, most probably        */
+/* by saving it in a global data structure.  Must not be called inside  */
+/* a GC callback function (except for GC_call_with_stack_base() one).   */
 GC_API int GC_CALL GC_unregister_my_thread(void);
 
-/* Attempt to fill in the GC_stack_base structure with the stack base  */
-/* for this thread.  This appears to be required to implement anything */
-/* like the JNI AttachCurrentThread in an environment in which new     */
-/* threads are not automatically registered with the collector.                */
-/* It is also unfortunately hard to implement well on many platforms.  */
-/* Returns GC_SUCCESS or GC_UNIMPLEMENTED.                             */
+/* Wrapper for functions that are likely to block (or, at least, do not */
+/* allocate garbage collected memory and/or manipulate pointers to the  */
+/* garbage collected heap) for an appreciable length of time.  While fn */
+/* is running, the collector is said to be in the "inactive" state for  */
+/* the current thread (this means that the thread is not suspended and  */
+/* the thread's stack frames "belonging" to the functions in the        */
+/* "inactive" state are not scanned during garbage collections).  It is */
+/* allowed for fn to call GC_call_with_gc_active() (even recursively),  */
+/* thus temporarily toggling the collector's state back to "active".    */
+GC_API void * GC_CALL GC_do_blocking(GC_fn_type /* fn */,
+                                     void * /* client_data */);
+
+/* Call a function switching to the "active" state of the collector for */
+/* the current thread (i.e. the user function is allowed to call any    */
+/* GC function and/or manipulate pointers to the garbage collected      */
+/* heap).  GC_call_with_gc_active() has the functionality opposite to   */
+/* GC_do_blocking() one.  It is assumed that the collector is already   */
+/* initialized and the current thread is registered.  fn may toggle     */
+/* the collector thread's state temporarily to "inactive" one by using  */
+/* GC_do_blocking.  GC_call_with_gc_active() often can be used to       */
+/* provide a sufficiently accurate stack base.                          */
+GC_API void * GC_CALL GC_call_with_gc_active(GC_fn_type /* fn */,
+                                             void * /* client_data */);
+
+/* Attempt to fill in the GC_stack_base structure with the stack base   */
+/* for this thread.  This appears to be required to implement anything  */
+/* like the JNI AttachCurrentThread in an environment in which new      */
+/* threads are not automatically registered with the collector.         */
+/* It is also unfortunately hard to implement well on many platforms.   */
+/* Returns GC_SUCCESS or GC_UNIMPLEMENTED.                              */
 GC_API int GC_CALL GC_get_stack_base(struct GC_stack_base *);
 
-/* The following routines are primarily intended for use with a        */
-/* preprocessor which inserts calls to check C pointer arithmetic.     */
-/* They indicate failure by invoking the corresponding _print_proc.    */
-
-/* Check that p and q point to the same object.                */
-/* Fail conspicuously if they don't.                           */
-/* Returns the first argument.                                 */
-/* Succeeds if neither p nor q points to the heap.             */
-/* May succeed if both p and q point to between heap objects.  */
-GC_API void * GC_CALL GC_same_obj (void * p, void * q);
-
-/* Checked pointer pre- and post- increment operations.  Note that     */
-/* the second argument is in units of bytes, not multiples of the      */
-/* object size.  This should either be invoked from a macro, or the    */
-/* call should be automatically generated.                             */
-GC_API void * GC_CALL GC_pre_incr (void * *p, ptrdiff_t how_much);
-GC_API void * GC_CALL GC_post_incr (void * *p, ptrdiff_t how_much);
-
-/* Check that p is visible                                             */
-/* to the collector as a possibly pointer containing location.         */
-/* If it isn't fail conspicuously.                                     */
-/* Returns the argument in all cases.  May erroneously succeed         */
-/* in hard cases.  (This is intended for debugging use with            */
-/* untyped allocations.  The idea is that it should be possible, though        */
-/* slow, to add such a call to all indirect pointer stores.)           */
-/* Currently useless for multithreaded worlds.                         */
-GC_API void * GC_CALL GC_is_visible (void * p);
-
-/* Check that if p is a pointer to a heap page, then it points to      */
-/* a valid displacement within a heap object.                          */
-/* Fail conspicuously if this property does not hold.                  */
-/* Uninteresting with GC_all_interior_pointers.                                */
-/* Always returns its argument.                                                */
-GC_API void * GC_CALL GC_is_valid_displacement (void * p);
-
-/* Explicitly dump the GC state.  This is most often called from the   */
-/* debugger, or by setting the GC_DUMP_REGULARLY environment variable, */
-/* but it may be useful to call it from client code during debugging.  */
-/* Defined only if the library has been compiled without NO_DEBUGGING. */
+/* The following routines are primarily intended for use with a         */
+/* preprocessor which inserts calls to check C pointer arithmetic.      */
+/* They indicate failure by invoking the corresponding _print_proc.     */
+
+/* Check that p and q point to the same object.                 */
+/* Fail conspicuously if they don't.                            */
+/* Returns the first argument.                                  */
+/* Succeeds if neither p nor q points to the heap.              */
+/* May succeed if both p and q point to between heap objects.   */
+GC_API void * GC_CALL GC_same_obj(void * /* p */, void * /* q */);
+
+/* Checked pointer pre- and post- increment operations.  Note that      */
+/* the second argument is in units of bytes, not multiples of the       */
+/* object size.  This should either be invoked from a macro, or the     */
+/* call should be automatically generated.                              */
+GC_API void * GC_CALL GC_pre_incr(void **, ptrdiff_t /* how_much */);
+GC_API void * GC_CALL GC_post_incr(void **, ptrdiff_t /* how_much */);
+
+/* Check that p is visible                                              */
+/* to the collector as a possibly pointer containing location.          */
+/* If it isn't fail conspicuously.                                      */
+/* Returns the argument in all cases.  May erroneously succeed          */
+/* in hard cases.  (This is intended for debugging use with             */
+/* untyped allocations.  The idea is that it should be possible, though */
+/* slow, to add such a call to all indirect pointer stores.)            */
+/* Currently useless for multithreaded worlds.                          */
+GC_API void * GC_CALL GC_is_visible(void * /* p */);
+
+/* Check that if p is a pointer to a heap page, then it points to       */
+/* a valid displacement within a heap object.                           */
+/* Fail conspicuously if this property does not hold.                   */
+/* Uninteresting with GC_all_interior_pointers.                         */
+/* Always returns its argument.                                         */
+GC_API void * GC_CALL GC_is_valid_displacement(void * /* p */);
+
+/* Explicitly dump the GC state.  This is most often called from the    */
+/* debugger, or by setting the GC_DUMP_REGULARLY environment variable,  */
+/* but it may be useful to call it from client code during debugging.   */
+/* Defined only if the library has been compiled without NO_DEBUGGING.  */
 GC_API void GC_CALL GC_dump(void);
 
-/* Safer, but slow, pointer addition.  Probably useful mainly with     */
-/* a preprocessor.  Useful only for heap pointers.                     */
-/* Only the macros without trailing digits are meant to be used                */
-/* by clients.  These are designed to model the available C pointer    */
-/* arithmetic expressions.                                             */
-/* Even then, these are probably more useful as                        */
-/* documentation than as part of the API.                              */
-/* Note that GC_PTR_ADD evaluates the first argument more than once.   */
+/* Safer, but slow, pointer addition.  Probably useful mainly with      */
+/* a preprocessor.  Useful only for heap pointers.                      */
+/* Only the macros without trailing digits are meant to be used         */
+/* by clients.  These are designed to model the available C pointer     */
+/* arithmetic expressions.                                              */
+/* Even then, these are probably more useful as                         */
+/* documentation than as part of the API.                               */
+/* Note that GC_PTR_ADD evaluates the first argument more than once.    */
 #if defined(GC_DEBUG) && defined(__GNUC__)
-#   define GC_PTR_ADD3(x, n, type_of_result) \
-       ((type_of_result)GC_same_obj((x)+(n), (x)))
-#   define GC_PRE_INCR3(x, n, type_of_result) \
-       ((type_of_result)GC_pre_incr((void **)(&(x)), (n)*sizeof(*x)))
-#   define GC_POST_INCR3(x, n, type_of_result) \
-       ((type_of_result)GC_post_incr((void **)(&(x)), (n)*sizeof(*x)))
-#   define GC_PTR_ADD(x, n) \
-           GC_PTR_ADD3(x, n, typeof(x))
-#   define GC_PRE_INCR(x, n) \
-           GC_PRE_INCR3(x, n, typeof(x))
-#   define GC_POST_INCR(x) \
-           GC_POST_INCR3(x, 1, typeof(x))
-#   define GC_POST_DECR(x) \
-           GC_POST_INCR3(x, -1, typeof(x))
-#else  /* !GC_DEBUG || !__GNUC__ */
-       /* We can't do this right without typeof, which ANSI    */
-       /* decided was not sufficiently useful.  Without it     */
-       /* we resort to the non-debug version.                  */
-       /* FIXME: This should eventually support C++0x decltype */
-#   define GC_PTR_ADD(x, n) ((x)+(n))
-#   define GC_PRE_INCR(x, n) ((x) += (n))
-#   define GC_POST_INCR(x) ((x)++)
-#   define GC_POST_DECR(x) ((x)--)
-#endif
-
-/* Safer assignment of a pointer to a non-stack location.      */
+# define GC_PTR_ADD3(x, n, type_of_result) \
+        ((type_of_result)GC_same_obj((x)+(n), (x)))
+# define GC_PRE_INCR3(x, n, type_of_result) \
+        ((type_of_result)GC_pre_incr((void **)(&(x)), (n)*sizeof(*x)))
+# define GC_POST_INCR3(x, n, type_of_result) \
+        ((type_of_result)GC_post_incr((void **)(&(x)), (n)*sizeof(*x)))
+# define GC_PTR_ADD(x, n) GC_PTR_ADD3(x, n, typeof(x))
+# define GC_PRE_INCR(x, n) GC_PRE_INCR3(x, n, typeof(x))
+# define GC_POST_INCR(x) GC_POST_INCR3(x, 1, typeof(x))
+# define GC_POST_DECR(x) GC_POST_INCR3(x, -1, typeof(x))
+#else /* !GC_DEBUG || !__GNUC__ */
+  /* We can't do this right without typeof, which ANSI decided was not    */
+  /* sufficiently useful.  Without it we resort to the non-debug version. */
+  /* FIXME: This should eventually support C++0x decltype.                */
+# define GC_PTR_ADD(x, n) ((x)+(n))
+# define GC_PRE_INCR(x, n) ((x) += (n))
+# define GC_POST_INCR(x) ((x)++)
+# define GC_POST_DECR(x) ((x)--)
+#endif /* !GC_DEBUG || !__GNUC__ */
+
+/* Safer assignment of a pointer to a non-stack location.       */
 #ifdef GC_DEBUG
-#   define GC_PTR_STORE(p, q) \
-       (*(void **)GC_is_visible(p) = GC_is_valid_displacement(q))
-#else /* !GC_DEBUG */
-#   define GC_PTR_STORE(p, q) (*(p) = (q))
+# define GC_PTR_STORE(p, q) \
+        (*(void **)GC_is_visible(p) = GC_is_valid_displacement(q))
+#else
+# define GC_PTR_STORE(p, q) (*(p) = (q))
 #endif
 
 /* Functions called to report pointer checking errors */
-GC_API void (GC_CALLBACK * GC_same_obj_print_proc) (void * p, void * q);
-
-GC_API void (GC_CALLBACK * GC_is_valid_displacement_print_proc) (void * p);
-
-GC_API void (GC_CALLBACK * GC_is_visible_print_proc) (void * p);
-
-
-/* For pthread support, we generally need to intercept a number of     */
-/* thread library calls.  We do that here by macro defining them.      */
-
-#if !defined(GC_USE_LD_WRAP) && !defined(GC_NO_THREAD_REDIRECTS) \
-    && defined(GC_PTHREADS)
+GC_API void (GC_CALLBACK * GC_same_obj_print_proc)(void * /* p */,
+                                                   void * /* q */);
+GC_API void (GC_CALLBACK * GC_is_valid_displacement_print_proc)(void *);
+GC_API void (GC_CALLBACK * GC_is_visible_print_proc)(void *);
+
+#ifdef GC_PTHREADS
+  /* For pthread support, we generally need to intercept a number of    */
+  /* thread library calls.  We do that here by macro defining them.     */
 # include "gc_pthread_redirects.h"
 #endif
 
-# if defined(PCR) || defined(GC_SOLARIS_THREADS) || \
-     defined(GC_PTHREADS) || defined(GC_WIN32_THREADS)
-       /* Any flavor of threads.       */
-/* This returns a list of objects, linked through their first          */
-/* word.  Its use can greatly reduce lock contention problems, since   */
-/* the allocation lock can be acquired and released many fewer times.  */
-GC_API void * GC_CALL GC_malloc_many(size_t lb);
-#define GC_NEXT(p) (*(void * *)(p))    /* Retrieve the next element    */
-                                       /* in returned list.            */
+/* This returns a list of objects, linked through their first word.     */
+/* Its use can greatly reduce lock contention problems, since the       */
+/* allocation lock can be acquired and released many fewer times.       */
+/* Exported only if the library has been compiled with threads support. */
+GC_API void * GC_CALL GC_malloc_many(size_t /* lb */);
+#define GC_NEXT(p) (*(void * *)(p))     /* Retrieve the next element    */
+                                        /* in returned list.            */
+
+/* A filter function to control the scanning of dynamic libraries.      */
+/* If implemented, called by GC before registering a dynamic library    */
+/* (discovered by GC) section as a static data root (called only as     */
+/* a last reason not to register).  The filename of the library, the    */
+/* address and the length of the memory region (section) are passed.    */
+/* This routine should return nonzero if that region should be scanned. */
+/* Always called with the allocation lock held.  Depending on the       */
+/* platform, might be called with the "world" stopped.                  */
+typedef int (GC_CALLBACK * GC_has_static_roots_func)(
+                                        const char * /* dlpi_name */,
+                                        void * /* section_start */,
+                                        size_t /* section_size */);
+
+/* Register a new callback (a user-supplied filter) to control the      */
+/* scanning of dynamic libraries.  Replaces any previously registered   */
+/* callback.  May be 0 (means no filtering).  May be unused on some     */
+/* platforms (if the filtering is unimplemented or inappropriate).      */
+GC_API void GC_CALL GC_register_has_static_roots_callback(
+                                        GC_has_static_roots_func);
+
+#if defined(GC_WIN32_THREADS) && !defined(GC_PTHREADS)
+
+# ifndef GC_NO_THREAD_DECLS
+
+#   ifdef __cplusplus
+      } /* Including windows.h in an extern "C" context no longer works. */
+#   endif
 
-#endif /* THREADS */
+#   if !defined(_WIN32_WCE) && !defined(__CEGCC__)
+#     include <process.h> /* For _beginthreadex, _endthreadex */
+#   endif
 
-/* Register a callback to control the scanning of dynamic libraries.
-   When the GC scans the static data of a dynamic library, it will
-   first call a user-supplied routine with filename of the library and
-   the address and length of the memory region.  This routine should
-   return nonzero if that region should be scanned.  */
-GC_API void GC_CALL GC_register_has_static_roots_callback
-  (int (GC_CALLBACK * callback)(const char *, void *, size_t));
+#   include <windows.h>
 
+#   ifdef __cplusplus
+      extern "C" {
+#   endif
 
-#if defined(GC_WIN32_THREADS) && !defined(__CYGWIN32__) \
-       && !defined(__CYGWIN__) \
-       && !defined(GC_PTHREADS)
+#   ifdef GC_UNDERSCORE_STDCALL
+      /* Explicitly prefix exported/imported WINAPI (__stdcall) symbols */
+      /* with '_' (underscore).  Might be useful if MinGW/x86 is used.  */
+#     define GC_CreateThread _GC_CreateThread
+#     define GC_ExitThread _GC_ExitThread
+#   endif
 
-#ifndef GC_NO_THREAD_DECLS
+    /* All threads must be created using GC_CreateThread or             */
+    /* GC_beginthreadex, or must explicitly call GC_register_my_thread  */
+    /* (and call GC_unregister_my_thread before thread termination), so */
+    /* that they will be recorded in the thread table.  For backward    */
+    /* compatibility, it is possible to build the GC with GC_DLL        */
+    /* defined, and to call GC_use_DllMain().  This implicitly          */
+    /* registers all created threads, but appears to be less robust.    */
+    /* Currently the collector expects all threads to fall through and  */
+    /* terminate normally, or call GC_endthreadex() or GC_ExitThread,   */
+    /* so that the thread is properly unregistered.                     */
+    GC_API HANDLE WINAPI GC_CreateThread(
+                LPSECURITY_ATTRIBUTES /* lpThreadAttributes */,
+                DWORD /* dwStackSize */,
+                LPTHREAD_START_ROUTINE /* lpStartAddress */,
+                LPVOID /* lpParameter */, DWORD /* dwCreationFlags */,
+                LPDWORD /* lpThreadId */);
+
+    GC_API void WINAPI GC_ExitThread(DWORD /* dwExitCode */);
+
+#   if !defined(_WIN32_WCE) && !defined(__CEGCC__)
+#     if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED) \
+                && !defined(UINTPTR_MAX)
+        typedef GC_word GC_uintptr_t;
+#     else
+        typedef uintptr_t GC_uintptr_t;
+#     endif
+
+      GC_API GC_uintptr_t GC_CALL GC_beginthreadex(
+                        void * /* security */, unsigned /* stack_size */,
+                        unsigned (__stdcall *)(void *),
+                        void * /* arglist */, unsigned /* initflag */,
+                        unsigned * /* thrdaddr */);
+
+      GC_API void GC_CALL GC_endthreadex(unsigned /* retval */);
+#   endif /* !_WIN32_WCE */
+
+# endif /* !GC_NO_THREAD_DECLS */
+
+# ifdef GC_WINMAIN_REDIRECT
+    /* win32_threads.c implements the real WinMain(), which will start  */
+    /* a new thread to call GC_WinMain() after initializing the garbage */
+    /* collector.                                                       */
+#   define WinMain GC_WinMain
+# endif
 
-#ifdef __cplusplus
-    }  /* Including windows.h in an extern "C" context no longer works. */
-#endif
+  /* Use implicit thread registration via DllMain.  Deprecated.  Must   */
+  /* be called before GC_INIT() and other GC routines.  Should be       */
+  /* avoided if GC_beginthreadex() or GC_CreateThread() could be called */
+  /* instead.                                                           */
+  GC_API void GC_CALL GC_use_DllMain(void);
 
-# if !defined(_WIN32_WCE)
-#   include <process.h>        /* For _beginthreadex, _endthreadex */
-# endif
+# ifndef GC_NO_THREAD_REDIRECTS
+#   define CreateThread GC_CreateThread
+#   define ExitThread GC_ExitThread
+#   undef _beginthreadex
+#   define _beginthreadex GC_beginthreadex
+#   undef _endthreadex
+#   define _endthreadex GC_endthreadex
+/* #define _beginthread { > "Please use _beginthreadex instead of _beginthread" < } */
+# endif /* !GC_NO_THREAD_REDIRECTS */
 
-# include <windows.h>
+#endif /* GC_WIN32_THREADS */
+
+/* Public setter and getter for switching "unmap as much as possible"   */
+/* mode on(1) and off(0).  Has no effect unless unmapping is turned on. */
+/* Has no effect on implicitly-initiated garbage collections.  Initial  */
+/* value is controlled by GC_FORCE_UNMAP_ON_GCOLLECT.                   */
+GC_API void GC_CALL GC_set_force_unmap_on_gcollect(int);
+GC_API int GC_CALL GC_get_force_unmap_on_gcollect(void);
+
+ /* Fully portable code should call GC_INIT() from the main program     */
+ /* before making any other GC_ calls.  On most platforms this is a     */
+ /* no-op and the collector self-initializes.  But a number of          */
+ /* platforms make that too hard.                                       */
+ /* A GC_INIT call is required if the collector is built with           */
+ /* THREAD_LOCAL_ALLOC defined and the initial allocation call is not   */
+ /* to GC_malloc() or GC_malloc_atomic().                               */
+
+#ifdef __CYGWIN32__
+  /* Similarly gnu-win32 DLLs need explicit initialization from the     */
+  /* main program, as does AIX.                                         */
+  extern int _data_start__[], _data_end__[], _bss_start__[], _bss_end__[];
+# define GC_DATASTART (_data_start__ < _bss_start__ ? \
+                       (void *)_data_start__ : (void *)_bss_start__)
+# define GC_DATAEND (_data_end__ > _bss_end__ ? \
+                     (void *)_data_end__ : (void *)_bss_end__)
+# define GC_INIT_CONF_ROOTS GC_add_roots(GC_DATASTART, GC_DATAEND); \
+                                 GC_gcollect() /* For blacklisting. */
+        /* Required at least if GC is in dll.  And doesn't hurt. */
+#elif defined(_AIX)
+  extern int _data[], _end[];
+# define GC_DATASTART ((void *)((ulong)_data))
+# define GC_DATAEND ((void *)((ulong)_end))
+# define GC_INIT_CONF_ROOTS GC_add_roots(GC_DATASTART, GC_DATAEND)
+#else
+# define GC_INIT_CONF_ROOTS /* empty */
+#endif
 
-#ifdef __cplusplus
-    extern "C" {
+#ifdef GC_DONT_EXPAND
+  /* Set GC_dont_expand to TRUE at start-up */
+# define GC_INIT_CONF_DONT_EXPAND GC_set_dont_expand(1)
+#else
+# define GC_INIT_CONF_DONT_EXPAND /* empty */
 #endif
-  /*
-   * All threads must be created using GC_CreateThread or GC_beginthreadex,
-   * or must explicitly call GC_register_my_thread
-   * (and call GC_unregister_my_thread before thread termination),
-   * so that they will be recorded in the thread table.
-   * For backwards compatibility, it is possible to build the GC
-   * with GC_DLL defined, and to call GC_use_DllMain().
-   * This implicitly registers all created threads, but appears to be
-   * less robust.
-   *
-   * Currently the collector expects all threads to fall through and
-   * terminate normally, or call GC_endthreadex() or GC_ExitThread,
-   * so that the thread is properly unregistered.
-   */
-   GC_API HANDLE WINAPI GC_CreateThread(
-      LPSECURITY_ATTRIBUTES lpThreadAttributes,
-      DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
-      LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId );
 
-#  if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED) \
-        && !defined(UINTPTR_MAX)
-     typedef GC_word GC_uintptr_t;
-#  else
-     typedef uintptr_t GC_uintptr_t;
-#  endif
+#ifdef GC_FORCE_UNMAP_ON_GCOLLECT
+  /* Turn on "unmap as much as possible on explicit GC" mode at start-up */
+# define GC_INIT_CONF_FORCE_UNMAP_ON_GCOLLECT \
+                GC_set_force_unmap_on_gcollect(1)
+#else
+# define GC_INIT_CONF_FORCE_UNMAP_ON_GCOLLECT /* empty */
+#endif
 
-   GC_API GC_uintptr_t GC_CALL GC_beginthreadex(
-     void *security, unsigned stack_size,
-     unsigned ( __stdcall *start_address )( void * ),
-     void *arglist, unsigned initflag, unsigned *thrdaddr);
+#ifdef GC_MAX_RETRIES
+  /* Set GC_max_retries to the desired value at start-up */
+# define GC_INIT_CONF_MAX_RETRIES GC_set_max_retries(GC_MAX_RETRIES)
+#else
+# define GC_INIT_CONF_MAX_RETRIES /* empty */
+#endif
 
-   GC_API void GC_CALL GC_endthreadex(unsigned retval);
+#ifdef GC_FREE_SPACE_DIVISOR
+  /* Set GC_free_space_divisor to the desired value at start-up */
+# define GC_INIT_CONF_FREE_SPACE_DIVISOR \
+                GC_set_free_space_divisor(GC_FREE_SPACE_DIVISOR)
+#else
+# define GC_INIT_CONF_FREE_SPACE_DIVISOR /* empty */
+#endif
 
-   GC_API void WINAPI GC_ExitThread(DWORD dwExitCode);
+#ifdef GC_FULL_FREQ
+  /* Set GC_full_freq to the desired value at start-up */
+# define GC_INIT_CONF_FULL_FREQ GC_set_full_freq(GC_FULL_FREQ)
+#else
+# define GC_INIT_CONF_FULL_FREQ /* empty */
+#endif
 
-# if defined(_WIN32_WCE)
-  /*
-   * win32_threads.c implements the real WinMain, which will start a new thread
-   * to call GC_WinMain after initializing the garbage collector.
-   */
-  GC_API int WINAPI GC_WinMain(
-      HINSTANCE hInstance,
-      HINSTANCE hPrevInstance,
-      LPWSTR lpCmdLine,
-      int nCmdShow );
-#  ifndef GC_BUILD
-#    define WinMain GC_WinMain
-#  endif
-# endif /* defined(_WIN32_WCE) */
-#endif /* !GC_NO_THREAD_DECLS */
+#ifdef GC_TIME_LIMIT
+  /* Set GC_time_limit to the desired value at start-up */
+# define GC_INIT_CONF_TIME_LIMIT GC_set_time_limit(GC_TIME_LIMIT)
+#else
+# define GC_INIT_CONF_TIME_LIMIT /* empty */
+#endif
 
-  /*
-   * Use implicit thread registration via DllMain.
-   * Must be called before GC_INIT and other GC routines.
-   * Should be avoided if GC_beginthreadex and friends can be called
-   * instead.
-   */
-GC_API void GC_CALL GC_use_DllMain(void);
+#ifdef GC_MAXIMUM_HEAP_SIZE
+  /* Limit the heap size to the desired value (useful for debugging).   */
+  /* The limit could be overridden either at the program start-up by    */
+  /* the similar environment variable or anytime later by the           */
+  /* corresponding API function call.                                   */
+# define GC_INIT_CONF_MAXIMUM_HEAP_SIZE \
+                GC_set_max_heap_size(GC_MAXIMUM_HEAP_SIZE)
+#else
+# define GC_INIT_CONF_MAXIMUM_HEAP_SIZE /* empty */
+#endif
 
-# ifndef GC_NO_THREAD_REDIRECTS
-#   define CreateThread GC_CreateThread
-#   define ExitThread GC_ExitThread
-#   undef _beginthreadex
-#   define _beginthreadex GC_beginthreadex
-#   undef _endthreadex
-#   define _endthreadex GC_endthreadex
-/* #   define _beginthread { > "Please use _beginthreadex instead of _beginthread" < } */
-# endif /* !GC_NO_THREAD_REDIRECTS */
+#ifdef GC_IGNORE_WARN
+  /* Turn off all warnings at start-up (after GC initialization) */
+# define GC_INIT_CONF_IGNORE_WARN GC_set_warn_proc(GC_ignore_warn_proc)
+#else
+# define GC_INIT_CONF_IGNORE_WARN /* empty */
+#endif
 
-#endif /* defined(GC_WIN32_THREADS)  && !cygwin */
-
- /*
-  * Fully portable code should call GC_INIT() from the main program
-  * before making any other GC_ calls.  On most platforms this is a
-  * no-op and the collector self-initializes.  But a number of platforms
-  * make that too hard.
-  * A GC_INIT call is required if the collector is built with THREAD_LOCAL_ALLOC
-  * defined and the initial allocation call is not to GC_malloc() or
-  * GC_malloc_atomic().
-  */
-#if defined(__CYGWIN32__) || defined (_AIX)
-    /*
-     * Similarly gnu-win32 DLLs need explicit initialization from
-     * the main program, as does AIX.
-     */
-#   ifdef __CYGWIN32__
-      extern int _data_start__[];
-      extern int _data_end__[];
-      extern int _bss_start__[];
-      extern int _bss_end__[];
-#     define GC_MAX(x,y) ((x) > (y) ? (x) : (y))
-#     define GC_MIN(x,y) ((x) < (y) ? (x) : (y))
-#     define GC_DATASTART ((void *) GC_MIN(_data_start__, _bss_start__))
-#     define GC_DATAEND         ((void *) GC_MAX(_data_end__, _bss_end__))
-#     define GC_INIT() { GC_add_roots(GC_DATASTART, GC_DATAEND); \
-                          GC_gcollect(); /* For blacklisting. */}
-       /* Required at least if GC is in dll.  And doesn't hurt. */
-#   endif
-#   if defined(_AIX)
-      extern int _data[], _end[];
-#     define GC_DATASTART ((void *)((ulong)_data))
-#     define GC_DATAEND ((void *)((ulong)_end))
-#     define GC_INIT() { GC_add_roots(GC_DATASTART, GC_DATAEND); }
-#   endif
+#ifdef GC_INITIAL_HEAP_SIZE
+  /* Set heap size to the desired value at start-up */
+# define GC_INIT_CONF_INITIAL_HEAP_SIZE \
+                { size_t heap_size = GC_get_heap_size(); \
+                  if (heap_size < (GC_INITIAL_HEAP_SIZE)) \
+                    (void)GC_expand_hp((GC_INITIAL_HEAP_SIZE) - heap_size); }
 #else
-#   define GC_INIT() { GC_init(); }
+# define GC_INIT_CONF_INITIAL_HEAP_SIZE /* empty */
 #endif
 
-  /* win32S may not free all resources on process exit.  */
-  /* This explicitly deallocates the heap.              */
+#define GC_INIT() { GC_INIT_CONF_DONT_EXPAND; /* pre-init */ \
+                    GC_INIT_CONF_FORCE_UNMAP_ON_GCOLLECT; \
+                    GC_INIT_CONF_MAX_RETRIES; \
+                    GC_INIT_CONF_FREE_SPACE_DIVISOR; \
+                    GC_INIT_CONF_FULL_FREQ; \
+                    GC_INIT_CONF_TIME_LIMIT; \
+                    GC_INIT_CONF_MAXIMUM_HEAP_SIZE; \
+                    GC_init(); /* real GC initialization */ \
+                    GC_INIT_CONF_ROOTS; /* post-init */ \
+                    GC_INIT_CONF_IGNORE_WARN; \
+                    GC_INIT_CONF_INITIAL_HEAP_SIZE; }
+
+/* win32S may not free all resources on process exit.   */
+/* This explicitly deallocates the heap.                */
 GC_API void GC_CALL GC_win32_free_heap(void);
 
-#if ( defined(_AMIGA) && !defined(GC_AMIGA_MAKINGLIB) )
-  /* Allocation really goes through GC_amiga_allocwrapper_do */
+#if defined(_AMIGA) && !defined(GC_AMIGA_MAKINGLIB)
+  /* Allocation really goes through GC_amiga_allocwrapper_do    */
 # include "gc_amiga_redirects.h"
 #endif
 
@@ -1230,7 +1450,7 @@ GC_API void GC_CALL GC_win32_free_heap(void);
    */
 
 #ifdef __cplusplus
-    }  /* end of extern "C" */
+  }  /* end of extern "C" */
 #endif
 
-#endif /* _GC_H */
+#endif /* GC_H */
index c33c24954fd7616bcd8ff4c019d3a7316705f52d..086fac4b3db3a8cbb0ac88cc9a5871ba39cb55de 100644 (file)
 #include <new> // for placement new
 
 #if defined(__GNUC__)
-#  define GC_ATTR_UNUSED __attribute__((unused))
+#  define GC_ATTR_UNUSED __attribute__((__unused__))
 #else
 #  define GC_ATTR_UNUSED
 #endif
 
 /* First some helpers to allow us to dispatch on whether or not a type
- * is known to be pointerfree.
+ * is known to be pointer-free.
  * These are private, except that the client may invoke the
  * GC_DECLARE_PTRFREE macro.
  */
@@ -79,10 +79,10 @@ GC_DECLARE_PTRFREE(unsigned long);
 GC_DECLARE_PTRFREE(float);
 GC_DECLARE_PTRFREE(double);
 GC_DECLARE_PTRFREE(long double);
-/* The client may want to add others.  */
+/* The client may want to add others.   */
 
-// In the following GC_Tp is GC_true_type iff we are allocating a
-// pointerfree object.
+// In the following GC_Tp is GC_true_type if we are allocating a
+// pointer-free object.
 template <class GC_Tp>
 inline void * GC_selective_alloc(size_t n, GC_Tp, bool ignore_off_page) {
     return ignore_off_page?GC_MALLOC_IGNORE_OFF_PAGE(n):GC_MALLOC(n);
@@ -128,8 +128,8 @@ public:
   GC_Tp* allocate(size_type GC_n, const void* = 0) {
     GC_type_traits<GC_Tp> traits;
     return static_cast<GC_Tp *>
-           (GC_selective_alloc(GC_n * sizeof(GC_Tp),
-                               traits.GC_is_ptr_free, false));
+            (GC_selective_alloc(GC_n * sizeof(GC_Tp),
+                                traits.GC_is_ptr_free, false));
   }
 
   // __p is not permitted to be a null pointer.
@@ -193,7 +193,7 @@ public:
   // MSVC++ 6.0 do not support member templates
   template <class GC_Tp1>
     gc_allocator_ignore_off_page(const gc_allocator_ignore_off_page<GC_Tp1>&)
-       throw() {}
+        throw() {}
 # endif
   ~gc_allocator_ignore_off_page() throw() {}
 
@@ -205,8 +205,8 @@ public:
   GC_Tp* allocate(size_type GC_n, const void* = 0) {
     GC_type_traits<GC_Tp> traits;
     return static_cast<GC_Tp *>
-           (GC_selective_alloc(GC_n * sizeof(GC_Tp),
-                               traits.GC_is_ptr_free, true));
+            (GC_selective_alloc(GC_n * sizeof(GC_Tp),
+                                traits.GC_is_ptr_free, true));
   }
 
   // __p is not permitted to be a null pointer.
@@ -272,7 +272,7 @@ public:
 # if !(GC_NO_MEMBER_TEMPLATES || 0 < _MSC_VER && _MSC_VER <= 1200)
   // MSVC++ 6.0 do not support member templates
   template <class GC_Tp1> traceable_allocator
-         (const traceable_allocator<GC_Tp1>&) throw() {}
+          (const traceable_allocator<GC_Tp1>&) throw() {}
 # endif
   ~traceable_allocator() throw() {}
 
index 5899496e0fe59db1065ca13d3b681abffdba8499..6256f41668944307622c1d8aaf802215ed4c2a71 100644 (file)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
+ * Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
+ * All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
 /*
  * This is a simple API to implement pointer back tracing, i.e.
  * to answer questions such as "who is pointing to this" or
 
 #ifndef GC_BACKPTR_H
 #define GC_BACKPTR_H
+
+#ifndef GC_H
+# include "gc.h"
+#endif
+
+#ifdef __cplusplus
+  extern "C" {
+#endif
+
 /* Store information about the object referencing dest in *base_p     */
 /* and *offset_p.                                                     */
-/* If multiple objects or roots point to dest, the one reported              */
+/* If multiple objects or roots point to dest, the one reported       */
 /* will be the last on used by the garbage collector to trace the     */
-/* object.                                                           */
-/*   source is root ==> *base_p = address, *offset_p = 0             */
+/* object.                                                            */
+/*   source is root ==> *base_p = address, *offset_p = 0              */
 /*   source is heap object ==> *base_p != 0, *offset_p = offset       */
 /*   Returns 1 on success, 0 if source couldn't be determined.        */
 /* Dest can be any address within a heap object.                      */
-typedef enum {  GC_UNREFERENCED, /* No reference info available.       */
-               GC_NO_SPACE,    /* Dest not allocated with debug alloc  */
-               GC_REFD_FROM_ROOT, /* Referenced directly by root *base_p */
-               GC_REFD_FROM_REG,  /* Referenced from a register, i.e.  */
-                                  /* a root without an address.        */
-               GC_REFD_FROM_HEAP, /* Referenced from another heap obj. */
-               GC_FINALIZER_REFD /* Finalizable and hence accessible.  */
+typedef enum {
+    GC_UNREFERENCED,    /* No reference info available.         */
+    GC_NO_SPACE,        /* Dest not allocated with debug alloc. */
+    GC_REFD_FROM_ROOT,  /* Referenced directly by root *base_p. */
+    GC_REFD_FROM_REG,   /* Referenced from a register, i.e.     */
+                        /* a root without an address.           */
+    GC_REFD_FROM_HEAP,  /* Referenced from another heap obj.    */
+    GC_FINALIZER_REFD   /* Finalizable and hence accessible.    */
 } GC_ref_kind;
 
-GC_ref_kind GC_get_back_ptr_info(void *dest, void **base_p, size_t *offset_p);
+GC_API GC_ref_kind GC_CALL GC_get_back_ptr_info(void * /* dest */,
+                                                void ** /* base_p */,
+                                                size_t * /* offset_p */);
 
 /* Generate a random heap address.            */
 /* The resulting address is in the heap, but  */
 /* not necessarily inside a valid object.     */
-void * GC_generate_random_heap_address(void);
+GC_API void * GC_CALL GC_generate_random_heap_address(void);
 
 /* Generate a random address inside a valid marked heap object. */
-void * GC_generate_random_valid_address(void);
+GC_API void * GC_CALL GC_generate_random_valid_address(void);
+
+/* Force a garbage collection and generate a backtrace from a   */
+/* random heap address.                                         */
+/* This uses the GC logging mechanism (GC_printf) to produce    */
+/* output.  It can often be called from a debugger.  The        */
+/* source in dbg_mlc.c also serves as a sample client.          */
+GC_API void GC_CALL GC_generate_random_backtrace(void);
 
-/* Force a garbage collection and generate a backtrace from a */
-/* random heap address.                                       */
-/* This uses the GC logging mechanism (GC_printf) to produce  */
-/* output.  It can often be called from a debugger.  The      */
-/* source in dbg_mlc.c also serves as a sample client.       */
-void GC_generate_random_backtrace(void);
+/* Print a backtrace from a specific address.  Used by the      */
+/* above.  The client should call GC_gcollect() immediately     */
+/* before invocation.                                           */
+GC_API void GC_CALL GC_print_backtrace(void *);
 
-/* Print a backtrace from a specific address.  Used by the     */
-/* above.  The client should call GC_gcollect() immediately    */
-/* before invocation.                                          */
-void GC_print_backtrace(void *);
+#ifdef __cplusplus
+  } /* end of extern "C" */
+#endif
 
 #endif /* GC_BACKPTR_H */
index ac56b7198db6e4edff7ef7e7c2e5acee7fff7353..4686954ff9cebdf42687e34931f3e00ba9cb422f 100644 (file)
@@ -1,14 +1,31 @@
+/*
+ * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
+ * Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
+ * All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
 /*
  * This should never be included directly.  It is included only from gc.h.
  * We separate it only to make gc.h more suitable as documentation.
- * 
+ *
  * Some tests for old macros.  These violate our namespace rules and will
  * disappear shortly.  Use the GC_ names.
  */
 #if defined(SOLARIS_THREADS) || defined(_SOLARIS_THREADS) \
     || defined(_SOLARIS_PTHREADS) || defined(GC_SOLARIS_PTHREADS)
-  /* We no longer support old style Solaris threads.           */
-  /* GC_SOLARIS_THREADS now means pthreads.                    */
+  /* We no longer support old style Solaris threads.            */
+  /* GC_SOLARIS_THREADS now means pthreads.                     */
 # ifndef GC_SOLARIS_THREADS
 #   define GC_SOLARIS_THREADS
 # endif
 #if defined(IRIX_THREADS)
 # define GC_IRIX_THREADS
 #endif
-#if defined(DGUX_THREADS)
-# if !defined(GC_DGUX386_THREADS)
-#  define GC_DGUX386_THREADS
-# endif
+#if defined(DGUX_THREADS) && !defined(GC_DGUX386_THREADS)
+# define GC_DGUX386_THREADS
 #endif
 #if defined(AIX_THREADS)
 # define GC_AIX_THREADS
 # define GC_USE_LD_WRAP
 #endif
 
-#if !defined(_PTHREADS) && defined(GC_NETBSD_THREADS)
-# define _PTHREADS
-#endif
-
-#if defined(GC_DGUX386_THREADS) && !defined(_POSIX4A_DRAFT10_SOURCE)
-# define _POSIX4A_DRAFT10_SOURCE 1
-#endif
-
-# if defined(GC_SOLARIS_THREADS) || defined(GC_FREEBSD_THREADS) || \
-       defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) || \
-       defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \
-       defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \
-        defined(GC_AIX_THREADS) || defined(GC_NETBSD_THREADS) || \
-        (defined(GC_WIN32_THREADS) && defined(__CYGWIN32__)) || \
-       defined(GC_GNU_THREADS)
-#   define GC_PTHREADS
-# endif
-
-#if defined(GC_WIN32_PTHREADS)
-#   define GC_WIN32_THREADS
-#   define GC_PTHREADS
+#if defined(GC_WIN32_PTHREADS) && !defined(GC_WIN32_THREADS)
+  /* Using pthreads-w32 library. */
+# define GC_WIN32_THREADS
 #endif
 
-#if defined(GC_THREADS) && !defined(GC_PTHREADS)
+#if defined(GC_AIX_THREADS) || defined(GC_DARWIN_THREADS) \
+    || defined(GC_DGUX386_THREADS) || defined(GC_FREEBSD_THREADS) \
+    || defined(GC_GNU_THREADS) || defined(GC_HPUX_THREADS) \
+    || defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) \
+    || defined(GC_NETBSD_THREADS) || defined(GC_OPENBSD_THREADS) \
+    || defined(GC_OSF1_THREADS) || defined(GC_SOLARIS_THREADS) \
+    || defined(GC_WIN32_THREADS)
+# ifndef GC_THREADS
+#   define GC_THREADS
+# endif
+#elif defined(GC_THREADS)
 # if defined(__linux__)
 #   define GC_LINUX_THREADS
-#   define GC_PTHREADS
 # endif
 # if !defined(__linux__) && (defined(_PA_RISC1_1) || defined(_PA_RISC2_0) \
-                         || defined(hppa) || defined(__HPPA)) \
-                        || (defined(__ia64) && defined(_HPUX_SOURCE))
+                             || defined(hppa) || defined(__HPPA)) \
+     || (defined(__ia64) && defined(_HPUX_SOURCE))
 #   define GC_HPUX_THREADS
-#   define GC_PTHREADS
 # endif
 # if !defined(__linux__) && (defined(__alpha) || defined(__alpha__))
 #   define GC_OSF1_THREADS
-#   define GC_PTHREADS
 # endif
 # if defined(__mips) && !defined(__linux__)
 #   define GC_IRIX_THREADS
-#   define GC_PTHREADS
 # endif
 # if defined(__sparc) && !defined(__linux__) \
      || defined(sun) && (defined(i386) || defined(__i386__) \
-                       || defined(__amd64__))
+                         || defined(__amd64__))
 #   define GC_SOLARIS_THREADS
-#   define GC_PTHREADS
-# endif
-# if defined(__APPLE__) && defined(__MACH__)
+# elif defined(__APPLE__) && defined(__MACH__)
 #   define GC_DARWIN_THREADS
-#   define GC_PTHREADS
-# endif
-# if !defined(GC_PTHREADS) && (defined(__FreeBSD__) || defined(__DragonFly__))
-#   define GC_FREEBSD_THREADS
-#   define GC_PTHREADS
-# endif
-# if !defined(GC_PTHREADS) && defined(__NetBSD__)
-#   define GC_NETBSD_THREADS
-#   define GC_PTHREADS
+# elif defined(__OpenBSD__)
+#   define GC_OPENBSD_THREADS
+# elif !defined(GC_LINUX_THREADS) && !defined(GC_HPUX_THREADS) \
+       && !defined(GC_OSF1_THREADS) && !defined(GC_IRIX_THREADS)
+    /* FIXME: Should we really need for FreeBSD and NetBSD to check     */
+    /* that no other GC_xxx_THREADS macro is set?                       */
+#   if defined(__FreeBSD__) || defined(__DragonFly__)
+#     define GC_FREEBSD_THREADS
+#   elif defined(__NetBSD__)
+#     define GC_NETBSD_THREADS
+#   endif
 # endif
 # if defined(DGUX) && (defined(i386) || defined(__i386__))
 #   define GC_DGUX386_THREADS
-#   define GC_PTHREADS
 # endif
 # if defined(_AIX)
 #   define GC_AIX_THREADS
-#   define GC_PTHREADS
+# endif
+# if (defined(_WIN32) || defined(_MSC_VER) || defined(__BORLANDC__) \
+      || defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__CEGCC__) \
+      || defined(_WIN32_WCE) || defined(__MINGW32__)) \
+     && !defined(GC_WIN32_THREADS)
+    /* Either posix or native Win32 threads. */
+#   define GC_WIN32_THREADS
 # endif
 #endif /* GC_THREADS */
 
-#if !defined(_REENTRANT) && (defined(GC_SOLARIS_THREADS) \
-                            || defined(GC_HPUX_THREADS) \
-                            || defined(GC_AIX_THREADS) \
-                            || defined(GC_LINUX_THREADS) \
-                            || defined(GC_NETBSD_THREADS) \
-                            || defined(GC_GNU_THREADS))
-# define _REENTRANT
-       /* Better late than never.  This fails if system headers that   */
-       /* depend on this were previously included.                     */
+#undef GC_PTHREADS
+#if (!defined(GC_WIN32_THREADS) || defined(GC_WIN32_PTHREADS) \
+     || defined(__CYGWIN32__) || defined(__CYGWIN__)) && defined(GC_THREADS)
+  /* Posix threads. */
+# define GC_PTHREADS
 #endif
 
-#if defined(GC_THREADS) && !defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS) \
-    && (defined(_WIN32) || defined(_MSC_VER) || defined(__CYGWIN__) \
-     || defined(__MINGW32__) || defined(__BORLANDC__) \
-     || defined(_WIN32_WCE))
-# define GC_WIN32_THREADS
-# if defined(__CYGWIN__)
-#   define GC_PTHREADS
-# endif
+#if !defined(_PTHREADS) && defined(GC_NETBSD_THREADS)
+# define _PTHREADS
 #endif
 
-# define __GC
-# ifndef _WIN32_WCE
-#   include <stddef.h>
-#   if defined(__MINGW32__)
-#     include <stdint.h>
-      /* We mention uintptr_t.                                     */
-      /* Perhaps this should be included in pure msft environments  */
-      /* as well?                                                  */
-#   endif
-# else /* ! _WIN32_WCE */
-/* Yet more kludges for WinCE */
-#   include <stdlib.h>         /* size_t is defined here */
-    typedef long ptrdiff_t;    /* ptrdiff_t is not defined */
-# endif
+#if defined(GC_DGUX386_THREADS) && !defined(_POSIX4A_DRAFT10_SOURCE)
+# define _POSIX4A_DRAFT10_SOURCE 1
+#endif
 
-#if defined(_DLL) && !defined(GC_NOT_DLL) && !defined(GC_DLL)
-# define GC_DLL
+#if !defined(_REENTRANT) && defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS)
+  /* Better late than never.  This fails if system headers that depend  */
+  /* on this were previously included.                                  */
+# define _REENTRANT
 #endif
 
-#if defined(__MINGW32__) && defined(GC_DLL)
-# ifdef GC_BUILD
-#   define GC_API __declspec(dllexport)
-# else
-#   define GC_API __declspec(dllimport)
+#define __GC
+#if !defined(_WIN32_WCE) || defined(__GNUC__)
+# include <stddef.h>
+# if defined(__MINGW32__) && !defined(_WIN32_WCE)
+#   include <stdint.h>
+    /* We mention uintptr_t.                                            */
+    /* Perhaps this should be included in pure msft environments        */
+    /* as well?                                                         */
+# endif
+#else /* ! _WIN32_WCE */
+  /* Yet more kludges for WinCE */
+# include <stdlib.h> /* size_t is defined here */
+# ifndef _PTRDIFF_T_DEFINED
+    /* ptrdiff_t is not defined */
+#   define _PTRDIFF_T_DEFINED
+    typedef long ptrdiff_t;
 # endif
 #endif
 
-#if (defined(__DMC__) || defined(_MSC_VER) || defined(__BORLANDC__)) \
-    && defined(GC_DLL)
-# ifdef GC_BUILD
-#   define GC_API extern __declspec(dllexport)
-# else
-#   define GC_API __declspec(dllimport)
-# endif
+#if defined(_DLL) && !defined(GC_NOT_DLL) && !defined(GC_DLL) \
+        && !defined(__GNUC__)
+# define GC_DLL
 #endif
 
-#if defined(__WATCOMC__) && defined(GC_DLL)
-# ifdef GC_BUILD
-#   define GC_API extern __declspec(dllexport)
-# else
-#   define GC_API extern __declspec(dllimport)
+#if defined(GC_DLL) && !defined(GC_API)
+
+# if defined(__MINGW32__) || defined(__CEGCC__)
+#   ifdef GC_BUILD
+#     define GC_API __declspec(dllexport)
+#   else
+#     define GC_API __declspec(dllimport)
+#   endif
+
+# elif defined(_MSC_VER) || defined(__DMC__) || defined(__BORLANDC__) \
+        || defined(__CYGWIN__)
+#   ifdef GC_BUILD
+#     define GC_API extern __declspec(dllexport)
+#   else
+#     define GC_API __declspec(dllimport)
+#   endif
+
+# elif defined(__WATCOMC__)
+#   ifdef GC_BUILD
+#     define GC_API extern __declspec(dllexport)
+#   else
+#     define GC_API extern __declspec(dllimport)
+#   endif
+
+# elif defined(__GNUC__)
+    /* Only matters if used in conjunction with -fvisibility=hidden option. */
+#   if __GNUC__ >= 4 && defined(GC_BUILD)
+#     define GC_API extern __attribute__((__visibility__("default")))
+#   endif
+
 # endif
-#endif
+#endif /* GC_DLL */
 
 #ifndef GC_API
 # define GC_API extern
 #ifndef GC_CALLBACK
 # define GC_CALLBACK GC_CALL
 #endif
+
+#ifndef GC_ATTR_MALLOC
+  /* 'malloc' attribute should be used for all malloc-like functions    */
+  /* (to tell the compiler that a function may be treated as if any     */
+  /* non-NULL pointer it returns cannot alias any other pointer valid   */
+  /* when the function returns).  If the client code violates this rule */
+  /* by using custom GC_oom_func then define GC_OOM_FUNC_RETURNS_ALIAS. */
+# if !defined(GC_OOM_FUNC_RETURNS_ALIAS) && defined(__GNUC__) \
+        && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
+#   define GC_ATTR_MALLOC __attribute__((__malloc__))
+# else
+#   define GC_ATTR_MALLOC
+# endif
+#endif
+
+#ifndef GC_ATTR_ALLOC_SIZE
+  /* 'alloc_size' attribute improves __builtin_object_size correctness. */
+  /* Only single-argument form of 'alloc_size' attribute is used.       */
+# if defined(__GNUC__) && (__GNUC__ > 4 \
+        || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3 && !defined(__ICC)))
+#   define GC_ATTR_ALLOC_SIZE(argnum) __attribute__((__alloc_size__(argnum)))
+# else
+#   define GC_ATTR_ALLOC_SIZE(argnum)
+# endif
+#endif
index 4a5bc7cb95ff7d4a94ae43d060d14f0145a7b4fe..a1eabe3df56906eb28ec8f6735bc73355798337d 100644 (file)
@@ -1,21 +1,23 @@
+/*
+ * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program for any
+ * purpose, provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is
+ * granted, provided the above notices are retained, and a notice that
+ * the code was modified is included with the above copyright notice.
+ */
+
 #ifndef GC_CPP_H
 #define GC_CPP_H
-/****************************************************************************
-Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
-THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
-OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
-Permission is hereby granted to use or copy this program for any
-purpose, provided the above notices are retained on all copies.
-Permission to modify the code and to distribute modified code is
-granted, provided the above notices are retained, and a notice that
-the code was modified is included with the above copyright notice.
-****************************************************************************
 
+/****************************************************************************
 C++ Interface to the Boehm Collector
 
-    John R. Ellis and Jesse Hull 
+    John R. Ellis and Jesse Hull
 
 This interface provides access to the Boehm collector.  It provides
 basic facilities similar to those described in "Safe, Efficient
@@ -34,7 +36,7 @@ Objects allocated with the built-in "::operator new" are uncollectable.
 Objects derived from class "gc" are collectable.  For example:
 
     class A: public gc {...};
-    A* a = new A;       // a is collectable. 
+    A* a = new A;       // a is collectable.
 
 Collectable instances of non-class types can be allocated using the GC
 (or UseGC) placement:
@@ -149,9 +151,9 @@ by UseGC.  GC is an alias for UseGC, unless GC_NAME_CONFLICT is defined.
 #if ! defined( GC_NO_OPERATOR_NEW_ARRAY ) \
     && !defined(_ENABLE_ARRAYNEW) /* Digimars */ \
     && (defined(__BORLANDC__) && (__BORLANDC__ < 0x450) \
-       || (defined(__GNUC__) && \
-           (__GNUC__ < 2 || __GNUC__ == 2 && __GNUC_MINOR__ < 6)) \
-       || (defined(__WATCOMC__) && __WATCOMC__ < 1050))
+        || (defined(__GNUC__) && \
+            (__GNUC__ < 2 || __GNUC__ == 2 && __GNUC_MINOR__ < 6)) \
+        || (defined(__WATCOMC__) && __WATCOMC__ < 1050))
 #   define GC_NO_OPERATOR_NEW_ARRAY
 #endif
 
@@ -167,7 +169,7 @@ by UseGC.  GC is an alias for UseGC, unless GC_NAME_CONFLICT is defined.
 
 enum GCPlacement {UseGC,
 #ifndef GC_NAME_CONFLICT
-                 GC=UseGC,
+                  GC=UseGC,
 #endif
                   NoGC, PointerFreeGC};
 
@@ -175,12 +177,12 @@ class gc {public:
     inline void* operator new( size_t size );
     inline void* operator new( size_t size, GCPlacement gcp );
     inline void* operator new( size_t size, void *p );
-       /* Must be redefined here, since the other overloadings */
-       /* hide the global definition.                          */
+        /* Must be redefined here, since the other overloadings */
+        /* hide the global definition.                          */
     inline void operator delete( void* obj );
 #   ifdef GC_PLACEMENT_DELETE
       inline void operator delete( void*, GCPlacement );
-       /* called if construction fails.        */
+        /* called if construction fails.        */
       inline void operator delete( void*, void* );
 #   endif
 
@@ -194,9 +196,9 @@ class gc {public:
       inline void operator delete[]( void*, void* );
 #   endif
 #endif /* GC_OPERATOR_NEW_ARRAY */
-    };    
+    };
     /*
-    Instances of classes derived from "gc" will be allocated in the 
+    Instances of classes derived from "gc" will be allocated in the
     collected heap by default, unless an explicit NoGC placement is
     specified. */
 
@@ -222,8 +224,8 @@ extern "C" {
 # pragma warning(disable:4291)
 #endif
 
-inline void* operator new( 
-    size_t size, 
+inline void* operator new(
+    size_t size,
     GCPlacement gcp,
     GCCleanUpFunc cleanup = 0,
     void* clientData = 0 );
@@ -250,11 +252,11 @@ inline void* operator new(
   *  undefined, which is what seems to happen on VC++ 6 for some reason
   *  if we define a multi-argument operator new[].
   *  There seems to be no way to redirect new in this environment without
-  *  including this everywhere. 
+  *  including this everywhere.
   */
 #if _MSC_VER > 1020
  void *operator new[]( size_t size );
+
  void operator delete[](void* obj);
 #endif
 
@@ -264,16 +266,16 @@ inline void* operator new(
 
  // This new operator is used by VC++ in case of Debug builds !
  void* operator new(  size_t size,
-                     int ,//nBlockUse,
-                     const char * szFileName,
-                     int nLine );
+                      int ,//nBlockUse,
+                      const char * szFileName,
+                      int nLine );
 #endif /* _MSC_VER */
 
 
 #ifdef GC_OPERATOR_NEW_ARRAY
 
 inline void* operator new[](
-    size_t size, 
+    size_t size,
     GCPlacement gcp,
     GCCleanUpFunc cleanup = 0,
     void* clientData = 0 );
@@ -290,12 +292,12 @@ Inline implementation
 
 inline void* gc::operator new( size_t size ) {
     return GC_MALLOC( size );}
-    
+
 inline void* gc::operator new( size_t size, GCPlacement gcp ) {
-    if (gcp == UseGC) 
+    if (gcp == UseGC)
         return GC_MALLOC( size );
     else if (gcp == PointerFreeGC)
-       return GC_MALLOC_ATOMIC( size );
+        return GC_MALLOC_ATOMIC( size );
     else
         return GC_MALLOC_UNCOLLECTABLE( size );}
 
@@ -304,7 +306,7 @@ inline void* gc::operator new( size_t size, void *p ) {
 
 inline void gc::operator delete( void* obj ) {
     GC_FREE( obj );}
-    
+
 #ifdef GC_PLACEMENT_DELETE
   inline void gc::operator delete( void*, void* ) {}
 
@@ -317,7 +319,7 @@ inline void gc::operator delete( void* obj ) {
 
 inline void* gc::operator new[]( size_t size ) {
     return gc::operator new( size );}
-    
+
 inline void* gc::operator new[]( size_t size, GCPlacement gcp ) {
     return gc::operator new( size, gcp );}
 
@@ -334,7 +336,7 @@ inline void gc::operator delete[]( void* obj ) {
     gc::operator delete(p); }
 
 #endif
-    
+
 #endif /* GC_OPERATOR_NEW_ARRAY */
 
 
@@ -350,14 +352,14 @@ inline gc_cleanup::gc_cleanup() {
     void* base = GC_base( (void *) this );
     if (0 != base)  {
       // Don't call the debug version, since this is a real base address.
-      GC_register_finalizer_ignore_self( 
-        base, (GC_finalization_proc)cleanup, (void*) ((char*) this - (char*) base), 
+      GC_register_finalizer_ignore_self(
+        base, (GC_finalization_proc)cleanup, (void*) ((char*) this - (char*) base),
         &oldProc, &oldData );
       if (0 != oldProc) {
         GC_register_finalizer_ignore_self( base, oldProc, oldData, 0, 0 );}}}
 
-inline void* operator new( 
-    size_t size, 
+inline void* operator new(
+    size_t size,
     GCPlacement gcp,
     GCCleanUpFunc cleanup,
     void* clientData )
@@ -366,18 +368,18 @@ inline void* operator new(
 
     if (gcp == UseGC) {
         obj = GC_MALLOC( size );
-        if (cleanup != 0) 
-            GC_REGISTER_FINALIZER_IGNORE_SELF( 
+        if (cleanup != 0)
+            GC_REGISTER_FINALIZER_IGNORE_SELF(
                 obj, cleanup, clientData, 0, 0 );}
     else if (gcp == PointerFreeGC) {
         obj = GC_MALLOC_ATOMIC( size );}
     else {
         obj = GC_MALLOC_UNCOLLECTABLE( size );};
     return obj;}
-        
+
 # ifdef GC_PLACEMENT_DELETE
-inline void operator delete ( 
-    void *p, 
+inline void operator delete (
+    void *p,
     GCPlacement gcp,
     GCCleanUpFunc cleanup,
     void* clientData )
@@ -388,8 +390,8 @@ inline void operator delete (
 
 #ifdef GC_OPERATOR_NEW_ARRAY
 
-inline void* operator new[]( 
-    size_t size, 
+inline void* operator new[](
+    size_t size,
     GCPlacement gcp,
     GCCleanUpFunc cleanup,
     void* clientData )
@@ -398,6 +400,4 @@ inline void* operator new[](
 
 #endif /* GC_OPERATOR_NEW_ARRAY */
 
-
 #endif /* GC_CPP_H */
-
index 9bce311d539cb3729e4e5ef230af99fb50269500..78658785d8557aa127f885ac2b6a80f46ffa971a 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1995 by Xerox Corporation.  All rights reserved.
  * Copyright 1996-1999 by Silicon Graphics.  All rights reserved.
  */
 
 #ifndef GC_GCJ_H
-
 #define GC_GCJ_H
 
-       /* Gcj keeps GC descriptor as second word of vtable.    This    */
-       /* probably needs to be adjusted for other clients.             */
-       /* We currently assume that this offset is such that:           */
-       /*      - all objects of this kind are large enough to have     */
-       /*        a value at that offset, and                           */
-       /*      - it is not zero.                                       */
-       /* These assumptions allow objects on the free list to be       */
-       /* marked normally.                                             */
-
-#ifndef _GC_H
-#   include "gc.h"
+        /* Gcj keeps GC descriptor as second word of vtable.    This    */
+        /* probably needs to be adjusted for other clients.             */
+        /* We currently assume that this offset is such that:           */
+        /*      - all objects of this kind are large enough to have     */
+        /*        a value at that offset, and                           */
+        /*      - it is not zero.                                       */
+        /* These assumptions allow objects on the free list to be       */
+        /* marked normally.                                             */
+
+#ifndef GC_H
+# include "gc.h"
 #endif
 
-# ifdef __cplusplus
-    extern "C" {
-# endif
+#ifdef __cplusplus
+  extern "C" {
+#endif
 
-/* The following allocators signal an out of memory condition with     */
-/* return GC_oom_fn(bytes);                                            */
+/* The following allocators signal an out of memory condition with      */
+/* return GC_oom_fn(bytes);                                             */
 
-/* The following function must be called before the gcj allocators     */
-/* can be invoked.                                                     */
-/* mp_index and mp are the index and mark_proc (see gc_mark.h)         */
-/* respectively for the allocated objects.  Mark_proc will be          */
-/* used to build the descriptor for objects allocated through the      */
-/* debugging interface.  The mark_proc will be invoked on all such     */
-/* objects with an "environment" value of 1.  The client may choose    */
+/* The following function must be called before the gcj allocators      */
+/* can be invoked.                                                      */
+/* mp_index and mp are the index and mark_proc (see gc_mark.h)          */
+/* respectively for the allocated objects.  Mark_proc will be           */
+/* used to build the descriptor for objects allocated through the       */
+/* debugging interface.  The mark_proc will be invoked on all such      */
+/* objects with an "environment" value of 1.  The client may choose     */
 /* to use the same mark_proc for some of its generated mark descriptors.*/
-/* In that case, it should use a different "environment" value to      */
-/* detect the presence or absence of the debug header.                 */
-/* Mp is really of type mark_proc, as defined in gc_mark.h.  We don't  */
-/* want to include that here for namespace pollution reasons.          */
-/* Passing in mp_index here instead of having GC_init_gcj_malloc()     */
-/* internally call GC_new_proc() is quite ugly, but in typical usage   */
-/* scenarios a compiler also has to know about mp_index, so            */
-/* generating it dynamically is not acceptable.  Mp_index will         */
-/* typically be an integer < RESERVED_MARK_PROCS, so that it doesn't   */
-/* collide with GC_new_proc allocated indices.  If the application     */
-/* needs no other reserved indices, zero                               */
-/* (GC_GCJ_RESERVED_MARK_PROC_INDEX in gc_mark.h) is an obvious choice.        */ 
-GC_API void GC_CALL GC_init_gcj_malloc(int mp_index,
-                               void * /* really mark_proc */mp);
-
-/* Allocate an object, clear it, and store the pointer to the  */
-/* type structure (vtable in gcj).                             */
+/* In that case, it should use a different "environment" value to       */
+/* detect the presence or absence of the debug header.                  */
+/* Mp is really of type mark_proc, as defined in gc_mark.h.  We don't   */
+/* want to include that here for namespace pollution reasons.           */
+/* Passing in mp_index here instead of having GC_init_gcj_malloc()      */
+/* internally call GC_new_proc() is quite ugly, but in typical usage    */
+/* scenarios a compiler also has to know about mp_index, so             */
+/* generating it dynamically is not acceptable.  Mp_index will          */
+/* typically be an integer < RESERVED_MARK_PROCS, so that it doesn't    */
+/* collide with GC_new_proc allocated indices.  If the application      */
+/* needs no other reserved indices, zero                                */
+/* (GC_GCJ_RESERVED_MARK_PROC_INDEX in gc_mark.h) is an obvious choice. */
+GC_API void GC_CALL GC_init_gcj_malloc(int /* mp_index */,
+                                void * /* really mark_proc */ /* mp */);
+
+/* Allocate an object, clear it, and store the pointer to the   */
+/* type structure (vtable in gcj).                              */
 /* This adds a byte at the end of the object if GC_malloc would.*/
-GC_API void * GC_CALL GC_gcj_malloc(size_t lb,
-                               void * ptr_to_struct_containing_descr);
-/* The debug versions allocate such that the specified mark_proc       */
-/* is always invoked.                                                  */
-GC_API void * GC_CALL GC_debug_gcj_malloc(size_t lb,
-                                 void * ptr_to_struct_containing_descr,
-                                 GC_EXTRA_PARAMS);
-
-/* Similar to GC_gcj_malloc, but assumes that a pointer to near the    */
-/* beginning of the resulting object is always maintained.             */
-GC_API void  * GC_CALL GC_gcj_malloc_ignore_off_page(size_t lb,
-                               void * ptr_to_struct_containing_descr);
-
-/* The kind numbers of normal and debug gcj objects.           */
-/* Useful only for debug support, we hope.                     */
+GC_API void * GC_CALL GC_gcj_malloc(size_t /* lb */,
+                                void * /* ptr_to_struct_containing_descr */)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1);
+/* The debug versions allocate such that the specified mark_proc        */
+/* is always invoked.                                                   */
+GC_API void * GC_CALL GC_debug_gcj_malloc(size_t /* lb */,
+                                  void * /* ptr_to_struct_containing_descr */,
+                                  GC_EXTRA_PARAMS)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1);
+
+/* Similar to GC_gcj_malloc, but assumes that a pointer to near the     */
+/* beginning of the resulting object is always maintained.              */
+GC_API void  * GC_CALL GC_gcj_malloc_ignore_off_page(size_t /* lb */,
+                                void * /* ptr_to_struct_containing_descr */)
+                        GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1);
+
+/* The kind numbers of normal and debug gcj objects.            */
+/* Useful only for debug support, we hope.                      */
 GC_API int GC_gcj_kind;
 
 GC_API int GC_gcj_debug_kind;
 
-# ifdef GC_DEBUG
-#   define GC_GCJ_MALLOC(s,d) GC_debug_gcj_malloc(s,d,GC_EXTRAS)
-#   define GC_GCJ_MALLOC_IGNORE_OFF_PAGE(s,d) GC_debug_gcj_malloc(s,d,GC_EXTRAS)
-# else
-#   define GC_GCJ_MALLOC(s,d) GC_gcj_malloc(s,d)
-#   define GC_GCJ_MALLOC_IGNORE_OFF_PAGE(s,d) \
-       GC_gcj_malloc_ignore_off_page(s,d)
-# endif
+#ifdef GC_DEBUG
+# define GC_GCJ_MALLOC(s,d) GC_debug_gcj_malloc(s,d,GC_EXTRAS)
+# define GC_GCJ_MALLOC_IGNORE_OFF_PAGE(s,d) GC_debug_gcj_malloc(s,d,GC_EXTRAS)
+#else
+# define GC_GCJ_MALLOC(s,d) GC_gcj_malloc(s,d)
+# define GC_GCJ_MALLOC_IGNORE_OFF_PAGE(s,d) GC_gcj_malloc_ignore_off_page(s,d)
+#endif
 
-# ifdef __cplusplus
-    }  /* end of extern "C" */
-# endif
+#ifdef __cplusplus
+  } /* end of extern "C" */
+#endif
 
 #endif /* GC_GCJ_H */
index 5b5e51a3a117ca0f8982431eb1d09e6cb921f668..312ed61bbdc707756d51f000a79ad0dd02adf0f8 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1995 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 2005 Hewlett-Packard Development Company, L.P.
  * provided the above notices are retained, and a notice that the code was
  * modified is included with the above copyright notice.
  */
-/* WARNING:                                                            */
-/* Note that for these routines, it is the clients responsibility to   */
+
+#ifndef GC_INLINE_H
+#define GC_INLINE_H
+
+/* WARNING:                                                             */
+/* Note that for these routines, it is the clients responsibility to    */
 /* add the extra byte at the end to deal with one-past-the-end pointers.*/
-/* In the standard collector configuration, the collector assumes that */
-/* such a byte has been added, and hence does not trace the last word  */
-/* in the resulting object.                                            */
-/* This is not an issue if the collector is compiled with              */
-/* -DDONT_ADD_BYTE_AT_END, or if GC_all_interior_pointers is not set.  */
-/* This interface is most useful for compilers that generate C.                */
-/* It is also used internally for thread-local allocation.             */
-/* Manual use is hereby discouraged.                                   */
+/* In the standard collector configuration, the collector assumes that  */
+/* such a byte has been added, and hence does not trace the last word   */
+/* in the resulting object.                                             */
+/* This is not an issue if the collector is compiled with               */
+/* DONT_ADD_BYTE_AT_END, or if GC_all_interior_pointers is not set.     */
+/* This interface is most useful for compilers that generate C.         */
+/* It is also used internally for thread-local allocation.              */
+/* Manual use is hereby discouraged.                                    */
 
 #include "gc.h"
 #include "gc_tiny_fl.h"
 # define GC_EXPECT(expr, outcome) (expr)
 #endif /* __GNUC__ */
 
-/* The ultimately general inline allocation macro.  Allocate an object */
+#ifndef GC_ASSERT
+# define GC_ASSERT(expr) /* empty */
+#endif
+
+/* Store a pointer to a list of newly allocated objects of kind k and   */
+/* size lb in *result.  The caller must make sure that *result is       */
+/* traced even if objects are ptrfree.                                  */
+GC_API void GC_CALL GC_generic_malloc_many(size_t /* lb */, int /* k */,
+                                           void ** /* result */);
+
+/* The ultimately general inline allocation macro.  Allocate an object  */
 /* of size granules, putting the resulting pointer in result.  Tiny_fl  */
-/* is a "tiny" free list array, which will be used first, if the size  */
-/* is appropriate.  If granules is too large, we allocate with                 */
-/* default_expr instead.  If we need to refill the free list, we use   */
-/* GC_generic_malloc_many with the indicated kind.                     */
-/* Tiny_fl should be an array of GC_TINY_FREELISTS void * pointers.    */
-/* If num_direct is nonzero, and the individual free list pointers     */
-/* are initialized to (void *)1, then we allocate numdirect granules   */
-/* directly using gmalloc before putting multiple objects into the     */
-/* tiny_fl entry.  If num_direct is zero, then the free lists may also */
-/* be initialized to (void *)0.                                                */
-/* Note that we use the zeroth free list to hold objects 1 granule in  */
-/* size that are used to satisfy size 0 allocation requests.           */
-/* We rely on much of this hopefully getting optimized away in the     */
-/* num_direct = 0 case.                                                        */
-/* Particularly if granules is constant, this should generate a small  */
-/* amount of code.                                                     */
+/* is a "tiny" free list array, which will be used first, if the size   */
+/* is appropriate.  If granules is too large, we allocate with          */
+/* default_expr instead.  If we need to refill the free list, we use    */
+/* GC_generic_malloc_many with the indicated kind.                      */
+/* Tiny_fl should be an array of GC_TINY_FREELISTS void * pointers.     */
+/* If num_direct is nonzero, and the individual free list pointers      */
+/* are initialized to (void *)1, then we allocate numdirect granules    */
+/* directly using gmalloc before putting multiple objects into the      */
+/* tiny_fl entry.  If num_direct is zero, then the free lists may also  */
+/* be initialized to (void *)0.                                         */
+/* Note that we use the zeroth free list to hold objects 1 granule in   */
+/* size that are used to satisfy size 0 allocation requests.            */
+/* We rely on much of this hopefully getting optimized away in the      */
+/* num_direct = 0 case.                                                 */
+/* Particularly if granules is constant, this should generate a small   */
+/* amount of code.                                                      */
 # define GC_FAST_MALLOC_GRANS(result,granules,tiny_fl,num_direct,\
-                             kind,default_expr,init) \
+                              kind,default_expr,init) \
 { \
     if (GC_EXPECT((granules) >= GC_TINY_FREELISTS,0)) { \
         result = (default_expr); \
     } else { \
-       void **my_fl = (tiny_fl) + (granules); \
+        void **my_fl = (tiny_fl) + (granules); \
         void *my_entry=*my_fl; \
-       void *next; \
+        void *next; \
  \
-       while (GC_EXPECT((GC_word)my_entry \
-                       <= (num_direct) + GC_TINY_FREELISTS + 1, 0)) { \
-           /* Entry contains counter or NULL */ \
-           if ((GC_word)my_entry - 1 < (num_direct)) { \
-               /* Small counter value, not NULL */ \
+        while (GC_EXPECT((GC_word)my_entry \
+                        <= (num_direct) + GC_TINY_FREELISTS + 1, 0)) { \
+            /* Entry contains counter or NULL */ \
+            if ((GC_word)my_entry - 1 < (num_direct)) { \
+                /* Small counter value, not NULL */ \
                 *my_fl = (char *)my_entry + (granules) + 1; \
                 result = (default_expr); \
-               goto out; \
+                goto out; \
             } else { \
-               /* Large counter or NULL */ \
+                /* Large counter or NULL */ \
                 GC_generic_malloc_many(((granules) == 0? GC_GRANULE_BYTES : \
-                                         GC_RAW_BYTES_FROM_INDEX(granules)), \
-                                      kind, my_fl); \
-               my_entry = *my_fl; \
+                                        GC_RAW_BYTES_FROM_INDEX(granules)), \
+                                       kind, my_fl); \
+                my_entry = *my_fl; \
                 if (my_entry == 0) { \
-                   result = GC_oom_fn((granules)*GC_GRANULE_BYTES); \
-                   goto out; \
-               } \
-           } \
+                    result = (*GC_get_oom_fn())((granules)*GC_GRANULE_BYTES); \
+                    goto out; \
+                } \
+            } \
         } \
         next = *(void **)(my_entry); \
         result = (void *)my_entry; \
         *my_fl = next; \
-       init; \
+        init; \
         PREFETCH_FOR_WRITE(next); \
         GC_ASSERT(GC_size(result) >= (granules)*GC_GRANULE_BYTES); \
         GC_ASSERT((kind) == PTRFREE || ((GC_word *)result)[1] == 0); \
 }
 
 # define GC_WORDS_TO_WHOLE_GRANULES(n) \
-       GC_WORDS_TO_GRANULES((n) + GC_GRANULE_WORDS - 1)
+        GC_WORDS_TO_GRANULES((n) + GC_GRANULE_WORDS - 1)
 
-/* Allocate n words (NOT BYTES).  X is made to point to the result.    */
-/* This should really only be used if GC_all_interior_pointers is      */
-/* not set, or DONT_ADD_BYTE_AT_END is set.  See above.                        */
-/* The semantics changed in version 7.0; we no longer lock, and                */
-/* the caller is responsible for supplying a cleared tiny_fl           */
-/* free list array.  For single-threaded applications, this may be     */
-/* a global array.                                                     */
+/* Allocate n words (NOT BYTES).  X is made to point to the result.     */
+/* This should really only be used if GC_all_interior_pointers is       */
+/* not set, or DONT_ADD_BYTE_AT_END is set.  See above.                 */
+/* The semantics changed in version 7.0; we no longer lock, and         */
+/* the caller is responsible for supplying a cleared tiny_fl            */
+/* free list array.  For single-threaded applications, this may be      */
+/* a global array.                                                      */
 # define GC_MALLOC_WORDS(result,n,tiny_fl) \
-{      \
+{       \
     size_t grans = GC_WORDS_TO_WHOLE_GRANULES(n); \
     GC_FAST_MALLOC_GRANS(result, grans, tiny_fl, 0, \
-                        NORMAL, GC_malloc(grans*GC_GRANULE_BYTES), \
-                        *(void **)result = 0); \
+                         NORMAL, GC_malloc(grans*GC_GRANULE_BYTES), \
+                         *(void **)result = 0); \
 }
 
 # define GC_MALLOC_ATOMIC_WORDS(result,n,tiny_fl) \
-{      \
+{       \
     size_t grans = GC_WORDS_TO_WHOLE_GRANULES(n); \
     GC_FAST_MALLOC_GRANS(result, grans, tiny_fl, 0, \
-                        PTRFREE, GC_malloc_atomic(grans*GC_GRANULE_BYTES), \
-                        (void)0 /* no initialization */); \
+                         PTRFREE, GC_malloc_atomic(grans*GC_GRANULE_BYTES), \
+                         (void)0 /* no initialization */); \
 }
 
-
 /* And once more for two word initialized objects: */
 # define GC_CONS(result, first, second, tiny_fl) \
-{      \
+{       \
     size_t grans = GC_WORDS_TO_WHOLE_GRANULES(2); \
     GC_FAST_MALLOC_GRANS(result, grans, tiny_fl, 0, \
-                        NORMAL, GC_malloc(grans*GC_GRANULE_BYTES), \
-                        *(void **)result = (void *)(first)); \
-    ((void **)(result))[1] = (void *)(second); \
+                         NORMAL, GC_malloc(grans*GC_GRANULE_BYTES), \
+                         *(void **)result = (void *)(first)); \
+    ((void **)(result))[1] = (void *)(second);  \
 }
+
+#endif /* !GC_INLINE_H */
index 71e62dbe286af51eefdcd6f2f6538d36252c314b..e3a09a52a6ba7118567b03053a7f2bf859aa2b49 100644 (file)
  * clients that provide detailed heap layout information to the collector.
  * This interface should not be used by normal C or C++ clients.
  * It will be useful to runtimes for other languages.
- * 
+ *
  * This is an experts-only interface!  There are many ways to break the
  * collector in subtle ways by using this functionality.
  */
 #ifndef GC_MARK_H
-# define GC_MARK_H
-
-# ifndef GC_H
-#   include "gc.h"
-# endif
-
-/* A client supplied mark procedure.  Returns new mark stack pointer.  */
-/* Primary effect should be to push new entries on the mark stack.     */
-/* Mark stack pointer values are passed and returned explicitly.       */
-/* Global variables describing mark stack are not necessarily valid.   */
-/* (This usually saves a few cycles by keeping things in registers.)   */
-/* Assumed to scan about GC_PROC_BYTES on average.  If it needs to do  */
-/* much more work than that, it should do it in smaller pieces by      */
-/* pushing itself back on the mark stack.                              */
-/* Note that it should always do some work (defined as marking some    */
-/* objects) before pushing more than one entry on the mark stack.      */
-/* This is required to ensure termination in the event of mark stack   */
-/* overflows.                                                          */
+#define GC_MARK_H
+
+#ifndef GC_H
+# include "gc.h"
+#endif
+
+#ifdef __cplusplus
+  extern "C" {
+#endif
+
+/* A client supplied mark procedure.  Returns new mark stack pointer.   */
+/* Primary effect should be to push new entries on the mark stack.      */
+/* Mark stack pointer values are passed and returned explicitly.        */
+/* Global variables describing mark stack are not necessarily valid.    */
+/* (This usually saves a few cycles by keeping things in registers.)    */
+/* Assumed to scan about GC_PROC_BYTES on average.  If it needs to do   */
+/* much more work than that, it should do it in smaller pieces by       */
+/* pushing itself back on the mark stack.                               */
+/* Note that it should always do some work (defined as marking some     */
+/* objects) before pushing more than one entry on the mark stack.       */
+/* This is required to ensure termination in the event of mark stack    */
+/* overflows.                                                           */
 /* This procedure is always called with at least one empty entry on the */
-/* mark stack.                                                         */
-/* Currently we require that mark procedures look for pointers in a    */
-/* subset of the places the conservative marker would.  It must be safe        */
-/* to invoke the normal mark procedure instead.                                */
+/* mark stack.                                                          */
+/* Currently we require that mark procedures look for pointers in a     */
+/* subset of the places the conservative marker would.  It must be safe */
+/* to invoke the normal mark procedure instead.                         */
 /* WARNING: Such a mark procedure may be invoked on an unused object    */
-/* residing on a free list.  Such objects are cleared, except for a    */
-/* free list link field in the first word.  Thus mark procedures may   */
-/* not count on the presence of a type descriptor, and must handle this        */
-/* case correctly somehow.                                             */
-# define GC_PROC_BYTES 100
+/* residing on a free list.  Such objects are cleared, except for a     */
+/* free list link field in the first word.  Thus mark procedures may    */
+/* not count on the presence of a type descriptor, and must handle this */
+/* case correctly somehow.                                              */
+#define GC_PROC_BYTES 100
 struct GC_ms_entry;
-typedef struct GC_ms_entry * (*GC_mark_proc) (
-               GC_word * addr, struct GC_ms_entry * mark_stack_ptr,
-               struct GC_ms_entry * mark_stack_limit, GC_word env);
+typedef struct GC_ms_entry * (*GC_mark_proc)(GC_word * /* addr */,
+                                struct GC_ms_entry * /* mark_stack_ptr */,
+                                struct GC_ms_entry * /* mark_stack_limit */,
+                                GC_word /* env */);
 
-# define GC_LOG_MAX_MARK_PROCS 6
-# define GC_MAX_MARK_PROCS (1 << GC_LOG_MAX_MARK_PROCS)
+#define GC_LOG_MAX_MARK_PROCS 6
+#define GC_MAX_MARK_PROCS (1 << GC_LOG_MAX_MARK_PROCS)
 
-/* In a few cases it's necessary to assign statically known indices to */
-/* certain mark procs.  Thus we reserve a few for well known clients.  */
-/* (This is necessary if mark descriptors are compiler generated.)     */
+/* In a few cases it's necessary to assign statically known indices to  */
+/* certain mark procs.  Thus we reserve a few for well known clients.   */
+/* (This is necessary if mark descriptors are compiler generated.)      */
 #define GC_RESERVED_MARK_PROCS 8
-#   define GC_GCJ_RESERVED_MARK_PROC_INDEX 0
+#define GC_GCJ_RESERVED_MARK_PROC_INDEX 0
 
-/* Object descriptors on mark stack or in objects.  Low order two      */
-/* bits are tags distinguishing among the following 4 possibilities    */
-/* for the high order 30 bits.                                         */
+/* Object descriptors on mark stack or in objects.  Low order two       */
+/* bits are tags distinguishing among the following 4 possibilities     */
+/* for the high order 30 bits.                                          */
 #define GC_DS_TAG_BITS 2
 #define GC_DS_TAGS   ((1 << GC_DS_TAG_BITS) - 1)
-#define GC_DS_LENGTH 0 /* The entire word is a length in bytes that    */
-                       /* must be a multiple of 4.                     */
-#define GC_DS_BITMAP 1 /* 30 (62) bits are a bitmap describing pointer */
-                       /* fields.  The msb is 1 if the first word      */
-                       /* is a pointer.                                */
-                       /* (This unconventional ordering sometimes      */
-                       /* makes the marker slightly faster.)           */
-                       /* Zeroes indicate definite nonpointers.  Ones  */
-                       /* indicate possible pointers.                  */
-                       /* Only usable if pointers are word aligned.    */
+#define GC_DS_LENGTH 0  /* The entire word is a length in bytes that    */
+                        /* must be a multiple of 4.                     */
+#define GC_DS_BITMAP 1  /* 30 (62) bits are a bitmap describing pointer */
+                        /* fields.  The msb is 1 if the first word      */
+                        /* is a pointer.                                */
+                        /* (This unconventional ordering sometimes      */
+                        /* makes the marker slightly faster.)           */
+                        /* Zeroes indicate definite nonpointers.  Ones  */
+                        /* indicate possible pointers.                  */
+                        /* Only usable if pointers are word aligned.    */
 #define GC_DS_PROC   2
-                       /* The objects referenced by this object can be */
-                       /* pushed on the mark stack by invoking         */
-                       /* PROC(descr).  ENV(descr) is passed as the    */
-                       /* last argument.                               */
-#   define GC_MAKE_PROC(proc_index, env) \
-           (((((env) << GC_LOG_MAX_MARK_PROCS) \
-              | (proc_index)) << GC_DS_TAG_BITS) | GC_DS_PROC)
-#define GC_DS_PER_OBJECT 3  /* The real descriptor is at the           */
-                       /* byte displacement from the beginning of the  */
-                       /* object given by descr & ~DS_TAGS             */
-                       /* If the descriptor is negative, the real      */
-                       /* descriptor is at (*<object_start>) -         */
-                       /* (descr & ~DS_TAGS) - GC_INDIR_PER_OBJ_BIAS   */
-                       /* The latter alternative can be used if each   */
-                       /* object contains a type descriptor in the     */
-                       /* first word.                                  */
-                       /* Note that in multithreaded environments      */
-                       /* per object descriptors must be located in    */
-                       /* either the first two or last two words of    */
-                       /* the object, since only those are guaranteed  */
-                       /* to be cleared while the allocation lock is   */
-                       /* held.                                        */
+                        /* The objects referenced by this object can be */
+                        /* pushed on the mark stack by invoking         */
+                        /* PROC(descr).  ENV(descr) is passed as the    */
+                        /* last argument.                               */
+#define GC_MAKE_PROC(proc_index, env) \
+            (((((env) << GC_LOG_MAX_MARK_PROCS) \
+               | (proc_index)) << GC_DS_TAG_BITS) | GC_DS_PROC)
+#define GC_DS_PER_OBJECT 3  /* The real descriptor is at the            */
+                        /* byte displacement from the beginning of the  */
+                        /* object given by descr & ~DS_TAGS             */
+                        /* If the descriptor is negative, the real      */
+                        /* descriptor is at (*<object_start>) -         */
+                        /* (descr & ~DS_TAGS) - GC_INDIR_PER_OBJ_BIAS   */
+                        /* The latter alternative can be used if each   */
+                        /* object contains a type descriptor in the     */
+                        /* first word.                                  */
+                        /* Note that in multithreaded environments      */
+                        /* per object descriptors must be located in    */
+                        /* either the first two or last two words of    */
+                        /* the object, since only those are guaranteed  */
+                        /* to be cleared while the allocation lock is   */
+                        /* held.                                        */
 #define GC_INDIR_PER_OBJ_BIAS 0x10
-                       
-extern void * GC_least_plausible_heap_addr;
-extern void * GC_greatest_plausible_heap_addr;
-                       /* Bounds on the heap.  Guaranteed valid        */
-                       /* Likely to include future heap expansion.     */
-                       /* Hence usually includes not-yet-mapped        */
-                       /* memory.                                      */
-
-/* Handle nested references in a custom mark procedure.                        */
-/* Check if obj is a valid object. If so, ensure that it is marked.    */
-/* If it was not previously marked, push its contents onto the mark    */
-/* stack for future scanning.  The object will then be scanned using   */
-/* its mark descriptor.                                                */
-/* Returns the new mark stack pointer.                                 */
-/* Handles mark stack overflows correctly.                             */
-/* Since this marks first, it makes progress even if there are mark    */
-/* stack overflows.                                                    */
-/* Src is the address of the pointer to obj, which is used only                */
-/* for back pointer-based heap debugging.                              */
-/* It is strongly recommended that most objects be handled without mark        */
-/* procedures, e.g. with bitmap descriptors, and that mark procedures  */
-/* be reserved for exceptional cases.  That will ensure that           */
-/* performance of this call is not extremely performance critical.     */
-/* (Otherwise we would need to inline GC_mark_and_push completely,     */
-/* which would tie the client code to a fixed collector version.)      */
-/* Note that mark procedures should explicitly call FIXUP_POINTER()    */
-/* if required.                                                                */
-struct GC_ms_entry *GC_mark_and_push(void * obj,
-                                    struct GC_ms_entry * mark_stack_ptr,
-                                    struct GC_ms_entry * mark_stack_limit,
-                                    void * *src);
+
+GC_API void * GC_least_plausible_heap_addr;
+GC_API void * GC_greatest_plausible_heap_addr;
+                        /* Bounds on the heap.  Guaranteed valid        */
+                        /* Likely to include future heap expansion.     */
+                        /* Hence usually includes not-yet-mapped        */
+                        /* memory.                                      */
+
+/* Handle nested references in a custom mark procedure.                 */
+/* Check if obj is a valid object. If so, ensure that it is marked.     */
+/* If it was not previously marked, push its contents onto the mark     */
+/* stack for future scanning.  The object will then be scanned using    */
+/* its mark descriptor.                                                 */
+/* Returns the new mark stack pointer.                                  */
+/* Handles mark stack overflows correctly.                              */
+/* Since this marks first, it makes progress even if there are mark     */
+/* stack overflows.                                                     */
+/* Src is the address of the pointer to obj, which is used only         */
+/* for back pointer-based heap debugging.                               */
+/* It is strongly recommended that most objects be handled without mark */
+/* procedures, e.g. with bitmap descriptors, and that mark procedures   */
+/* be reserved for exceptional cases.  That will ensure that            */
+/* performance of this call is not extremely performance critical.      */
+/* (Otherwise we would need to inline GC_mark_and_push completely,      */
+/* which would tie the client code to a fixed collector version.)       */
+/* Note that mark procedures should explicitly call FIXUP_POINTER()     */
+/* if required.                                                         */
+GC_API struct GC_ms_entry * GC_CALL GC_mark_and_push(void * /* obj */,
+                                struct GC_ms_entry * /* mark_stack_ptr */,
+                                struct GC_ms_entry * /* mark_stack_limit */,
+                                void ** /* src */);
 
 #define GC_MARK_AND_PUSH(obj, msp, lim, src) \
-       (((GC_word)obj >= (GC_word)GC_least_plausible_heap_addr && \
-         (GC_word)obj <= (GC_word)GC_greatest_plausible_heap_addr)? \
-         GC_mark_and_push(obj, msp, lim, src) : \
-         msp)
+          ((GC_word)(obj) >= (GC_word)GC_least_plausible_heap_addr && \
+           (GC_word)(obj) <= (GC_word)GC_greatest_plausible_heap_addr ? \
+           GC_mark_and_push(obj, msp, lim, src) : (msp))
 
-extern size_t GC_debug_header_size;
+GC_API size_t GC_debug_header_size;
        /* The size of the header added to objects allocated through    */
        /* the GC_debug routines.                                       */
        /* Defined as a variable so that client mark procedures don't   */
        /* need to be recompiled for collector version changes.         */
 #define GC_USR_PTR_FROM_BASE(p) ((void *)((char *)(p) + GC_debug_header_size))
 
-/* And some routines to support creation of new "kinds", e.g. with     */
-/* custom mark procedures, by language runtimes.                       */
-/* The _inner versions assume the caller holds the allocation lock.    */
+/* And some routines to support creation of new "kinds", e.g. with      */
+/* custom mark procedures, by language runtimes.                        */
+/* The _inner versions assume the caller holds the allocation lock.     */
 
-/* Return a new free list array.       */
-void ** GC_new_free_list(void);
-void ** GC_new_free_list_inner(void);
+/* Return a new free list array.        */
+GC_API void ** GC_CALL GC_new_free_list(void);
+GC_API void ** GC_CALL GC_new_free_list_inner(void);
 
 /* Return a new kind, as specified. */
-unsigned GC_new_kind(void **free_list, GC_word mark_descriptor_template,
-               int add_size_to_descriptor, int clear_new_objects);
-               /* The last two parameters must be zero or one. */
-unsigned GC_new_kind_inner(void **free_list,
-                     GC_word mark_descriptor_template,
-                     int add_size_to_descriptor,
-                     int clear_new_objects);
-
-/* Return a new mark procedure identifier, suitable for use as */
-/* the first argument in GC_MAKE_PROC.                         */
-unsigned GC_new_proc(GC_mark_proc);
-unsigned GC_new_proc_inner(GC_mark_proc);
-
-/* Allocate an object of a given kind.  Note that in multithreaded     */
-/* contexts, this is usually unsafe for kinds that have the descriptor */
-/* in the object itself, since there is otherwise a window in which    */
-/* the descriptor is not correct.  Even in the single-threaded case,   */
-/* we need to be sure that cleared objects on a free list don't                */
-/* cause a GC crash if they are accidentally traced.                   */
-void * GC_generic_malloc(size_t lb, int k);
-
-typedef void (GC_CALLBACK * GC_describe_type_fn) (void *p, char *out_buf);
-                               /* A procedure which                    */
-                               /* produces a human-readable            */
-                               /* description of the "type" of object  */
-                               /* p into the buffer out_buf of length  */
-                               /* GC_TYPE_DESCR_LEN.  This is used by  */
-                               /* the debug support when printing      */
-                               /* objects.                             */ 
-                               /* These functions should be as robust  */
-                               /* as possible, though we do avoid      */
-                               /* invoking them on objects on the      */
-                               /* global free list.                    */
-#      define GC_TYPE_DESCR_LEN 40
-
-void GC_CALL GC_register_describe_type_fn(int kind, GC_describe_type_fn knd);
-                               /* Register a describe_type function    */
-                               /* to be used when printing objects     */
-                               /* of a particular kind.                */
-
-#endif  /* GC_MARK_H */
-
+GC_API unsigned GC_CALL GC_new_kind(void ** /* free_list */,
+                                    GC_word /* mark_descriptor_template */,
+                                    int /* add_size_to_descriptor */,
+                                    int /* clear_new_objects */);
+                /* The last two parameters must be zero or one. */
+GC_API unsigned GC_CALL GC_new_kind_inner(void ** /* free_list */,
+                                    GC_word /* mark_descriptor_template */,
+                                    int /* add_size_to_descriptor */,
+                                    int /* clear_new_objects */);
+
+/* Return a new mark procedure identifier, suitable for use as  */
+/* the first argument in GC_MAKE_PROC.                          */
+GC_API unsigned GC_CALL GC_new_proc(GC_mark_proc);
+GC_API unsigned GC_CALL GC_new_proc_inner(GC_mark_proc);
+
+/* Allocate an object of a given kind.  Note that in multithreaded      */
+/* contexts, this is usually unsafe for kinds that have the descriptor  */
+/* in the object itself, since there is otherwise a window in which     */
+/* the descriptor is not correct.  Even in the single-threaded case,    */
+/* we need to be sure that cleared objects on a free list don't         */
+/* cause a GC crash if they are accidentally traced.                    */
+GC_API void * GC_CALL GC_generic_malloc(size_t /* lb */, int /* k */);
+
+typedef void (GC_CALLBACK * GC_describe_type_fn)(void * /* p */,
+                                                 char * /* out_buf */);
+                                /* A procedure which                    */
+                                /* produces a human-readable            */
+                                /* description of the "type" of object  */
+                                /* p into the buffer out_buf of length  */
+                                /* GC_TYPE_DESCR_LEN.  This is used by  */
+                                /* the debug support when printing      */
+                                /* objects.                             */
+                                /* These functions should be as robust  */
+                                /* as possible, though we do avoid      */
+                                /* invoking them on objects on the      */
+                                /* global free list.                    */
+#define GC_TYPE_DESCR_LEN 40
+
+GC_API void GC_CALL GC_register_describe_type_fn(int /* kind */,
+                                                 GC_describe_type_fn);
+                                /* Register a describe_type function    */
+                                /* to be used when printing objects     */
+                                /* of a particular kind.                */
+
+/* See gc.h for the description of these "inner" functions.             */
+GC_API size_t GC_CALL GC_get_heap_size_inner(void);
+GC_API size_t GC_CALL GC_get_free_bytes_inner(void);
+
+#ifdef __cplusplus
+  } /* end of extern "C" */
+#endif
+
+#endif /* GC_MARK_H */
index 8925c852e7ac726f2e36c77ca3ba2a23f2fec12a..7e1162b62139bfb28f9cb3f454f37399f8db0b6c 100644 (file)
@@ -1,62 +1,71 @@
-/* Our pthread support normally needs to intercept a number of thread  */
-/* calls.  We arrange to do that here, if appropriate.                 */
+/*
+ * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
+ * Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
+ * All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
 
-#ifndef GC_PTHREAD_REDIRECTS_H
+/* Our pthread support normally needs to intercept a number of thread   */
+/* calls.  We arrange to do that here, if appropriate.                  */
 
-#define GC_PTHREAD_REDIRECTS_H
+/* Included from gc.h only.  Included only if GC_PTHREADS.              */
 
-#if !defined(GC_USE_LD_WRAP) && defined(GC_PTHREADS)
-/* We need to intercept calls to many of the threads primitives, so     */
-/* that we can locate thread stacks and stop the world.                  */
-/* Note also that the collector cannot always see thread specific data.  */
-/* Thread specific data should generally consist of pointers to          */
-/* uncollectable objects (allocated with GC_malloc_uncollectable,        */
-/* not the system malloc), which are deallocated using the destructor    */
-/* facility in thr_keycreate.  Alternatively, keep a redundant pointer   */
-/* to thread specific data on the thread stack.                         */
+/* We need to intercept calls to many of the threads primitives, so     */
+/* that we can locate thread stacks and stop the world.                 */
+/* Note also that the collector cannot always see thread specific data. */
+/* Thread specific data should generally consist of pointers to         */
+/* uncollectable objects (allocated with GC_malloc_uncollectable,       */
+/* not the system malloc), which are deallocated using the destructor   */
+/* facility in thr_keycreate.  Alternatively, keep a redundant pointer  */
+/* to thread specific data on the thread stack.                         */
 
-# include <pthread.h>
+#include <pthread.h>
+
+#ifndef GC_DARWIN_THREADS
 # include <signal.h>
+# include <dlfcn.h>
 
-# ifndef GC_DARWIN_THREADS
-#   include <dlfcn.h>
+# ifndef GC_OPENBSD_THREADS
+    GC_API int GC_pthread_sigmask(int /* how */, const sigset_t *,
+                                  sigset_t * /* oset */);
 # endif
-
-  int GC_pthread_create(pthread_t *new_thread,
-                        const pthread_attr_t *attr,
-                       void *(*start_routine)(void *), void *arg);
-#ifndef GC_DARWIN_THREADS
-    int GC_pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);
-    void *GC_dlopen(const char *path, int mode);
+  GC_API void *GC_dlopen(const char * /* path */, int /* mode */);
 #endif
-  int GC_pthread_join(pthread_t thread, void **retval);
-  int GC_pthread_detach(pthread_t thread);
-
-#if defined(GC_OSF1_THREADS) \
-    && defined(_PTHREAD_USE_MANGLED_NAMES_) && !defined(_PTHREAD_USE_PTDNAM_)
-/* Unless the compiler supports #pragma extern_prefix, the Tru64 UNIX
-   <pthread.h> redefines some POSIX thread functions to use mangled names.
-   If so, undef them before redefining. */
+
+GC_API int GC_pthread_create(pthread_t *, const pthread_attr_t *,
+                             void *(*)(void *), void * /* arg */);
+GC_API int GC_pthread_join(pthread_t, void ** /* retval */);
+GC_API int GC_pthread_detach(pthread_t);
+
+#if !defined(GC_NO_THREAD_REDIRECTS) && !defined(GC_USE_LD_WRAP)
+  /* Unless the compiler supports #pragma extern_prefix, the Tru64    */
+  /* UNIX <pthread.h> redefines some POSIX thread functions to use    */
+  /* mangled names.  Anyway, it's safe to undef them before           */
+  /* redefining.                                                      */
 # undef pthread_create
 # undef pthread_join
 # undef pthread_detach
-#endif
 
 # define pthread_create GC_pthread_create
 # define pthread_join GC_pthread_join
 # define pthread_detach GC_pthread_detach
 
-#ifndef GC_DARWIN_THREADS
-# ifdef pthread_sigmask
-#  undef pthread_sigmask
-# endif         /* pthread_sigmask */
-# define pthread_sigmask GC_pthread_sigmask
-# ifdef dlopen
-#  undef dlopen
+# ifndef GC_DARWIN_THREADS
+#   ifndef GC_OPENBSD_THREADS
+#     undef pthread_sigmask
+#     define pthread_sigmask GC_pthread_sigmask
+#   endif
+#   undef dlopen
+#   define dlopen GC_dlopen
 # endif
-# define dlopen GC_dlopen
-#endif
-
-#endif /* GC_PTHREADS && !GC_USE_LD_WRAP */
-
-#endif /* GC_PTHREAD_REDIRECTS_H */
+#endif /* !GC_NO_THREAD_REDIRECTS */
index 323d9a990bebc46fcc487a631ae1ce0637f6792d..10111cdb9bf513e2bd559451cbefffcdb7de75e7 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright 1996 Silicon Graphics.  All rights reserved.
  * of the collector, and is not linked in unless referenced.
  * This does not currently support GC_DEBUG in any interesting way.
  */
-/* Boehm, May 19, 1994 2:13 pm PDT */
 
-#ifndef _GC_TYPED_H
-# define _GC_TYPED_H
-# ifndef _GC_H
-#   include "gc.h"
-# endif
+#ifndef GC_TYPED_H
+#define GC_TYPED_H
+
+#ifndef GC_H
+# include "gc.h"
+#endif
 
 #ifdef __cplusplus
   extern "C" {
 #endif
+
 typedef GC_word * GC_bitmap;
-       /* The least significant bit of the first word is one if        */
-       /* the first word in the object may be a pointer.               */
-       
-# define GC_WORDSZ (8*sizeof(GC_word))
-# define GC_get_bit(bm, index) \
-               (((bm)[index/GC_WORDSZ] >> (index%GC_WORDSZ)) & 1)
-# define GC_set_bit(bm, index) \
-               (bm)[index/GC_WORDSZ] |= ((GC_word)1 << (index%GC_WORDSZ))
-# define GC_WORD_OFFSET(t, f) (offsetof(t,f)/sizeof(GC_word))
-# define GC_WORD_LEN(t) (sizeof(t)/ sizeof(GC_word))
-# define GC_BITMAP_SIZE(t) ((GC_WORD_LEN(t) + GC_WORDSZ-1)/GC_WORDSZ)
+        /* The least significant bit of the first word is one if        */
+        /* the first word in the object may be a pointer.               */
+
+#define GC_WORDSZ (8 * sizeof(GC_word))
+#define GC_get_bit(bm, index) \
+                (((bm)[index / GC_WORDSZ] >> (index % GC_WORDSZ)) & 1)
+#define GC_set_bit(bm, index) \
+                (bm)[index / GC_WORDSZ] |= ((GC_word)1 << (index % GC_WORDSZ))
+#define GC_WORD_OFFSET(t, f) (offsetof(t,f) / sizeof(GC_word))
+#define GC_WORD_LEN(t) (sizeof(t) / sizeof(GC_word))
+#define GC_BITMAP_SIZE(t) ((GC_WORD_LEN(t) + GC_WORDSZ - 1) / GC_WORDSZ)
 
 typedef GC_word GC_descr;
 
-GC_API GC_descr GC_CALL GC_make_descriptor(GC_bitmap bm, size_t len);
-               /* Return a type descriptor for the object whose layout */
-               /* is described by the argument.                        */
-               /* The least significant bit of the first word is one   */
-               /* if the first word in the object may be a pointer.    */
-               /* The second argument specifies the number of          */
-               /* meaningful bits in the bitmap.  The actual object    */
-               /* may be larger (but not smaller).  Any additional     */
-               /* words in the object are assumed not to contain       */
-               /* pointers.                                            */
-               /* Returns a conservative approximation in the          */
-               /* (unlikely) case of insufficient memory to build      */
-               /* the descriptor.  Calls to GC_make_descriptor         */
-               /* may consume some amount of a finite resource.  This  */
-               /* is intended to be called once per type, not once     */
-               /* per allocation.                                      */
+GC_API GC_descr GC_CALL GC_make_descriptor(GC_bitmap /* bm */,
+                                           size_t /* len */);
+                /* Return a type descriptor for the object whose layout */
+                /* is described by the argument.                        */
+                /* The least significant bit of the first word is one   */
+                /* if the first word in the object may be a pointer.    */
+                /* The second argument specifies the number of          */
+                /* meaningful bits in the bitmap.  The actual object    */
+                /* may be larger (but not smaller).  Any additional     */
+                /* words in the object are assumed not to contain       */
+                /* pointers.                                            */
+                /* Returns a conservative approximation in the          */
+                /* (unlikely) case of insufficient memory to build      */
+                /* the descriptor.  Calls to GC_make_descriptor         */
+                /* may consume some amount of a finite resource.  This  */
+                /* is intended to be called once per type, not once     */
+                /* per allocation.                                      */
 
-/* It is possible to generate a descriptor for a C type T with */
-/* word aligned pointer fields f1, f2, ... as follows:                 */
-/*                                                                     */
+/* It is possible to generate a descriptor for a C type T with  */
+/* word aligned pointer fields f1, f2, ... as follows:                  */
+/*                                                                      */
 /* GC_descr T_descr;                                                    */
-/* GC_word T_bitmap[GC_BITMAP_SIZE(T)] = {0};                          */
-/* GC_set_bit(T_bitmap, GC_WORD_OFFSET(T,f1));                         */
-/* GC_set_bit(T_bitmap, GC_WORD_OFFSET(T,f2));                         */
-/* ...                                                                 */
-/* T_descr = GC_make_descriptor(T_bitmap, GC_WORD_LEN(T));             */
+/* GC_word T_bitmap[GC_BITMAP_SIZE(T)] = {0};                           */
+/* GC_set_bit(T_bitmap, GC_WORD_OFFSET(T,f1));                          */
+/* GC_set_bit(T_bitmap, GC_WORD_OFFSET(T,f2));                          */
+/* ...                                                                  */
+/* T_descr = GC_make_descriptor(T_bitmap, GC_WORD_LEN(T));              */
+
+GC_API void * GC_CALL GC_malloc_explicitly_typed(size_t /* size_in_bytes */,
+                                                 GC_descr /* d */);
+                /* Allocate an object whose layout is described by d.   */
+                /* The resulting object MAY NOT BE PASSED TO REALLOC.   */
+                /* The returned object is cleared.                      */
 
-GC_API void * GC_CALL GC_malloc_explicitly_typed(size_t size_in_bytes,
-                                               GC_descr d);
-               /* Allocate an object whose layout is described by d.   */
-               /* The resulting object MAY NOT BE PASSED TO REALLOC.   */
-               /* The returned object is cleared.                      */
+GC_API void * GC_CALL GC_malloc_explicitly_typed_ignore_off_page(
+                                        size_t /* size_in_bytes */,
+                                        GC_descr /* d */);
 
-GC_API void * GC_CALL GC_malloc_explicitly_typed_ignore_off_page
-                        (size_t size_in_bytes, GC_descr d);
-               
-GC_API void * GC_CALL GC_calloc_explicitly_typed(size_t nelements,
-                                        size_t element_size_in_bytes,
-                                        GC_descr d);
-       /* Allocate an array of nelements elements, each of the */
-       /* given size, and with the given descriptor.           */
-       /* The element size must be a multiple of the byte      */
-       /* alignment required for pointers.  E.g. on a 32-bit   */
-       /* machine with 16-bit aligned pointers, size_in_bytes  */
-       /* must be a multiple of 2.                             */
-       /* Returned object is cleared.                          */
+GC_API void * GC_CALL GC_calloc_explicitly_typed(size_t /* nelements */,
+                                        size_t /* element_size_in_bytes */,
+                                        GC_descr /* d */);
+        /* Allocate an array of nelements elements, each of the */
+        /* given size, and with the given descriptor.           */
+        /* The element size must be a multiple of the byte      */
+        /* alignment required for pointers.  E.g. on a 32-bit   */
+        /* machine with 16-bit aligned pointers, size_in_bytes  */
+        /* must be a multiple of 2.                             */
+        /* Returned object is cleared.                          */
 
 #ifdef GC_DEBUG
-#   define GC_MALLOC_EXPLICITLY_TYPED(bytes, d) GC_MALLOC(bytes)
-#   define GC_CALLOC_EXPLICITLY_TYPED(n, bytes, d) GC_MALLOC(n*bytes)
+# define GC_MALLOC_EXPLICITLY_TYPED(bytes, d) GC_MALLOC(bytes)
+# define GC_CALLOC_EXPLICITLY_TYPED(n, bytes, d) GC_MALLOC(n * bytes)
 #else
-#  define GC_MALLOC_EXPLICITLY_TYPED(bytes, d) \
-       GC_malloc_explicitly_typed(bytes, d)
-#  define GC_CALLOC_EXPLICITLY_TYPED(n, bytes, d) \
-       GC_calloc_explicitly_typed(n, bytes, d)
-#endif /* !GC_DEBUG */
+# define GC_MALLOC_EXPLICITLY_TYPED(bytes, d) \
+                        GC_malloc_explicitly_typed(bytes, d)
+# define GC_CALLOC_EXPLICITLY_TYPED(n, bytes, d) \
+                        GC_calloc_explicitly_typed(n, bytes, d)
+#endif
 
 #ifdef __cplusplus
   } /* matches extern "C" */
 #endif
 
-#endif /* _GC_TYPED_H */
-
+#endif /* GC_TYPED_H */
index cc6c7d1df13d6a0365fa089bfb0ca248ba98198c..0cc767b60168acc5956ec20b250f6f6bc60f9b5a 100644 (file)
@@ -1,9 +1,26 @@
-/* The version here should match that in configure/configure.ac        */
-/* Eventually this one may become unnecessary.  For now we need        */
-/* it to keep the old-style build process working.             */
+/*
+ * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
+ * Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
+ * All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
+/* The version here should match that in configure/configure.ac */
+/* Eventually this one may become unnecessary.  For now we need */
+/* it to keep the old-style build process working.              */
 #define GC_TMP_VERSION_MAJOR 7
 #define GC_TMP_VERSION_MINOR 2
-#define GC_TMP_ALPHA_VERSION 3
+#define GC_TMP_ALPHA_VERSION 4
 
 #ifndef GC_NOT_ALPHA
 #   define GC_NOT_ALPHA 0xff
@@ -14,7 +31,7 @@
      GC_TMP_VERSION_MINOR != GC_VERSION_MINOR || \
      defined(GC_ALPHA_VERSION) != (GC_TMP_ALPHA_VERSION != GC_NOT_ALPHA) || \
      defined(GC_ALPHA_VERSION) && GC_TMP_ALPHA_VERSION != GC_ALPHA_VERSION
-#   error Inconsistent version info.  Check README, version.h, and configure.ac.
+#   error Inconsistent version info.  Check doc/README, include/gc_version.h, and configure.ac.
 # endif
 #else
 # define GC_VERSION_MAJOR GC_TMP_VERSION_MAJOR
index 43f3bac6c8b4150d4577089318863787f6e7a687..99eaf9ad8716daefcaf705e8115a97eab0c41e95 100644 (file)
@@ -1,15 +1,32 @@
-# ifndef _GC_H
-#   include "gc.h"
-# endif
+/*
+ * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
+ * Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
+ * All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
+#ifndef GC_H
+# include "gc.h"
+#endif
 
-# ifdef __cplusplus
-    extern "C" {
-# endif
+#ifdef __cplusplus
+  extern "C" {
+#endif
 
 /*
- * Invoke all remaining finalizers that haven't yet been run, or
- * repeatedly notify that there are finalizers to be run.
- * This is needed for strict compliance with the Java standard, 
+ * Invoke all remaining finalizers that haven't yet been run.  (Since the
+ * notifier is not called, this should be called from a separate thread.)
+ * This function is needed for strict compliance with the Java standard,
  * which can make the runtime guarantee that all finalizers are run.
  * This is problematic for several reasons:
  * 1) It means that finalizers, and all methods called by them,
@@ -23,6 +40,6 @@
  */
 GC_API void GC_CALL GC_finalize_all(void);
 
-# ifdef __cplusplus
-    }  /* end of extern "C" */
-# endif
+#ifdef __cplusplus
+  } /* end of extern "C" */
+#endif
index 4b695fee9754513aa7440bbb64921470f14b711a..4612aeb6ab0e72e564826747989e70b45cedfa40 100644 (file)
 // with g++ 2.7.2 and earlier.
 //
 // Unlike its predecessor, this one simply defines
-//     gc_alloc
-//     single_client_gc_alloc
-//     traceable_alloc
-//     single_client_traceable_alloc
+//      gc_alloc
+//      single_client_gc_alloc
+//      traceable_alloc
+//      single_client_traceable_alloc
 //
 // It does not redefine alloc.  Nor does it change the default allocator,
 // though the user may wish to do so.  (The argument against changing
 #endif
 #endif
 
-/* A hack to deal with gcc 3.1.  If you are using gcc3.1 and later,    */
-/* you should probably really use gc_allocator.h instead.              */
+/* A hack to deal with gcc 3.1.  If you are using gcc3.1 and later,     */
+/* you should probably really use gc_allocator.h instead.               */
 #if defined (__GNUC__) && \
     (__GNUC__ > 3 || (__GNUC__ == 3 && (__GNUC_MINOR__ >= 1)))
 # define simple_alloc __simple_alloc
 #endif
 
-
-
 #define GC_ALLOC_H
 
 #include <stddef.h>
 // This should eventually be factored out into another include file.
 
 extern "C" {
-    extern void ** const GC_objfreelist_ptr;
-    extern void ** const GC_aobjfreelist_ptr;
-    extern void ** const GC_uobjfreelist_ptr;
-    extern void ** const GC_auobjfreelist_ptr;
+    GC_API void ** const GC_objfreelist_ptr;
+    GC_API void ** const GC_aobjfreelist_ptr;
+    GC_API void ** const GC_uobjfreelist_ptr;
+    GC_API void ** const GC_auobjfreelist_ptr;
 
-    extern void GC_incr_bytes_allocd(size_t bytes);
-    extern void GC_incr_mem_freed(size_t words); /* FIXME: use bytes */
+    GC_API void GC_CALL GC_incr_bytes_allocd(size_t bytes);
+    GC_API void GC_CALL GC_incr_bytes_freed(size_t bytes);
 
-    extern char * GC_generic_malloc_words_small(size_t word, int kind);
-               /* FIXME: Doesn't exist anymore.        */
+    GC_API char * GC_CALL GC_generic_malloc_words_small(size_t word, int kind);
+                /* FIXME: Doesn't exist anymore.        */
 }
 
 // Object kinds; must match PTRFREE, NORMAL, UNCOLLECTABLE, and
@@ -173,7 +171,7 @@ void * GC_aux_template<dummy>::GC_out_of_line_malloc(size_t nwords, int kind)
     GC_incr_bytes_allocd(GC_bytes_recently_allocd);
     GC_bytes_recently_allocd = 0;
 
-    GC_incr_mem_freed(GC_bytes_per_word(GC_bytes_recently_freed));
+    GC_incr_bytes_freed(GC_bytes_recently_freed);
     GC_bytes_recently_freed = 0;
 
     return GC_generic_malloc_words_small(nwords, kind);
@@ -188,66 +186,66 @@ typedef GC_aux_template<0> GC_aux;
 template <int dummy>
 class single_client_gc_alloc_template {
     public:
-       static void * allocate(size_t n)
+        static void * allocate(size_t n)
         {
-           size_t nwords = GC_round_up(n);
-           void ** flh;
-           void * op;
-
-           if (n > GC_max_fast_bytes) return GC_malloc(n);
-           flh = GC_objfreelist_ptr + nwords;
-           if (0 == (op = *flh)) {
-               return GC_aux::GC_out_of_line_malloc(nwords, GC_NORMAL);
-           }
-           *flh = GC_obj_link(op);
-           GC_aux::GC_bytes_recently_allocd += nwords * GC_bytes_per_word;
-           return op;
+            size_t nwords = GC_round_up(n);
+            void ** flh;
+            void * op;
+
+            if (n > GC_max_fast_bytes) return GC_malloc(n);
+            flh = GC_objfreelist_ptr + nwords;
+            if (0 == (op = *flh)) {
+                return GC_aux::GC_out_of_line_malloc(nwords, GC_NORMAL);
+            }
+            *flh = GC_obj_link(op);
+            GC_aux::GC_bytes_recently_allocd += nwords * GC_bytes_per_word;
+            return op;
         }
-       static void * ptr_free_allocate(size_t n)
+        static void * ptr_free_allocate(size_t n)
         {
-           size_t nwords = GC_round_up(n);
-           void ** flh;
-           void * op;
-
-           if (n > GC_max_fast_bytes) return GC_malloc_atomic(n);
-           flh = GC_aobjfreelist_ptr + nwords;
-           if (0 == (op = *flh)) {
-               return GC_aux::GC_out_of_line_malloc(nwords, GC_PTRFREE);
-           }
-           *flh = GC_obj_link(op);
-           GC_aux::GC_bytes_recently_allocd += nwords * GC_bytes_per_word;
-           return op;
+            size_t nwords = GC_round_up(n);
+            void ** flh;
+            void * op;
+
+            if (n > GC_max_fast_bytes) return GC_malloc_atomic(n);
+            flh = GC_aobjfreelist_ptr + nwords;
+            if (0 == (op = *flh)) {
+                return GC_aux::GC_out_of_line_malloc(nwords, GC_PTRFREE);
+            }
+            *flh = GC_obj_link(op);
+            GC_aux::GC_bytes_recently_allocd += nwords * GC_bytes_per_word;
+            return op;
         }
-       static void deallocate(void *p, size_t n)
-       {
+        static void deallocate(void *p, size_t n)
+        {
             size_t nwords = GC_round_up(n);
             void ** flh;
-          
-           if (n > GC_max_fast_bytes)  {
-               GC_free(p);
-           } else {
-               flh = GC_objfreelist_ptr + nwords;
-               GC_obj_link(p) = *flh;
-               memset(reinterpret_cast<char *>(p) + GC_bytes_per_word, 0,
-                      GC_bytes_per_word * (nwords - 1));
-               *flh = p;
-               GC_aux::GC_bytes_recently_freed += nwords * GC_bytes_per_word;
-           }
-       }
-       static void ptr_free_deallocate(void *p, size_t n)
-       {
+
+            if (n > GC_max_fast_bytes)  {
+                GC_free(p);
+            } else {
+                flh = GC_objfreelist_ptr + nwords;
+                GC_obj_link(p) = *flh;
+                memset(reinterpret_cast<char *>(p) + GC_bytes_per_word, 0,
+                       GC_bytes_per_word * (nwords - 1));
+                *flh = p;
+                GC_aux::GC_bytes_recently_freed += nwords * GC_bytes_per_word;
+            }
+        }
+        static void ptr_free_deallocate(void *p, size_t n)
+        {
             size_t nwords = GC_round_up(n);
             void ** flh;
-          
-           if (n > GC_max_fast_bytes) {
-               GC_free(p);
-           } else {
-               flh = GC_aobjfreelist_ptr + nwords;
-               GC_obj_link(p) = *flh;
-               *flh = p;
-               GC_aux::GC_bytes_recently_freed += nwords * GC_bytes_per_word;
-           }
-       }
+
+            if (n > GC_max_fast_bytes) {
+                GC_free(p);
+            } else {
+                flh = GC_aobjfreelist_ptr + nwords;
+                GC_obj_link(p) = *flh;
+                *flh = p;
+                GC_aux::GC_bytes_recently_freed += nwords * GC_bytes_per_word;
+            }
+        }
 };
 
 typedef single_client_gc_alloc_template<0> single_client_gc_alloc;
@@ -256,68 +254,68 @@ typedef single_client_gc_alloc_template<0> single_client_gc_alloc;
 template <int dummy>
 class single_client_traceable_alloc_template {
     public:
-       static void * allocate(size_t n)
+        static void * allocate(size_t n)
         {
-           size_t nwords = GC_round_up_uncollectable(n);
-           void ** flh;
-           void * op;
-
-           if (n > GC_max_fast_bytes) return GC_malloc_uncollectable(n);
-           flh = GC_uobjfreelist_ptr + nwords;
-           if (0 == (op = *flh)) {
-               return GC_aux::GC_out_of_line_malloc(nwords, GC_UNCOLLECTABLE);
-           }
-           *flh = GC_obj_link(op);
-           GC_aux::GC_uncollectable_bytes_recently_allocd +=
-                                       nwords * GC_bytes_per_word;
-           return op;
+            size_t nwords = GC_round_up_uncollectable(n);
+            void ** flh;
+            void * op;
+
+            if (n > GC_max_fast_bytes) return GC_malloc_uncollectable(n);
+            flh = GC_uobjfreelist_ptr + nwords;
+            if (0 == (op = *flh)) {
+                return GC_aux::GC_out_of_line_malloc(nwords, GC_UNCOLLECTABLE);
+            }
+            *flh = GC_obj_link(op);
+            GC_aux::GC_uncollectable_bytes_recently_allocd +=
+                                        nwords * GC_bytes_per_word;
+            return op;
         }
-       static void * ptr_free_allocate(size_t n)
+        static void * ptr_free_allocate(size_t n)
         {
-           size_t nwords = GC_round_up_uncollectable(n);
-           void ** flh;
-           void * op;
-
-           if (n > GC_max_fast_bytes) return GC_malloc_atomic_uncollectable(n);
-           flh = GC_auobjfreelist_ptr + nwords;
-           if (0 == (op = *flh)) {
-               return GC_aux::GC_out_of_line_malloc(nwords, GC_AUNCOLLECTABLE);
-           }
-           *flh = GC_obj_link(op);
-           GC_aux::GC_uncollectable_bytes_recently_allocd +=
-                                       nwords * GC_bytes_per_word;
-           return op;
+            size_t nwords = GC_round_up_uncollectable(n);
+            void ** flh;
+            void * op;
+
+            if (n > GC_max_fast_bytes) return GC_malloc_atomic_uncollectable(n);
+            flh = GC_auobjfreelist_ptr + nwords;
+            if (0 == (op = *flh)) {
+                return GC_aux::GC_out_of_line_malloc(nwords, GC_AUNCOLLECTABLE);
+            }
+            *flh = GC_obj_link(op);
+            GC_aux::GC_uncollectable_bytes_recently_allocd +=
+                                        nwords * GC_bytes_per_word;
+            return op;
         }
-       static void deallocate(void *p, size_t n)
-       {
+        static void deallocate(void *p, size_t n)
+        {
             size_t nwords = GC_round_up_uncollectable(n);
             void ** flh;
-          
-           if (n > GC_max_fast_bytes)  {
-               GC_free(p);
-           } else {
-               flh = GC_uobjfreelist_ptr + nwords;
-               GC_obj_link(p) = *flh;
-               *flh = p;
-               GC_aux::GC_uncollectable_bytes_recently_freed +=
-                               nwords * GC_bytes_per_word;
-           }
-       }
-       static void ptr_free_deallocate(void *p, size_t n)
-       {
+
+            if (n > GC_max_fast_bytes)  {
+                GC_free(p);
+            } else {
+                flh = GC_uobjfreelist_ptr + nwords;
+                GC_obj_link(p) = *flh;
+                *flh = p;
+                GC_aux::GC_uncollectable_bytes_recently_freed +=
+                                nwords * GC_bytes_per_word;
+            }
+        }
+        static void ptr_free_deallocate(void *p, size_t n)
+        {
             size_t nwords = GC_round_up_uncollectable(n);
             void ** flh;
-          
-           if (n > GC_max_fast_bytes) {
-               GC_free(p);
-           } else {
-               flh = GC_auobjfreelist_ptr + nwords;
-               GC_obj_link(p) = *flh;
-               *flh = p;
-               GC_aux::GC_uncollectable_bytes_recently_freed +=
-                               nwords * GC_bytes_per_word;
-           }
-       }
+
+            if (n > GC_max_fast_bytes) {
+                GC_free(p);
+            } else {
+                flh = GC_auobjfreelist_ptr + nwords;
+                GC_obj_link(p) = *flh;
+                *flh = p;
+                GC_aux::GC_uncollectable_bytes_recently_freed +=
+                                nwords * GC_bytes_per_word;
+            }
+        }
 };
 
 typedef single_client_traceable_alloc_template<0> single_client_traceable_alloc;
@@ -325,11 +323,11 @@ typedef single_client_traceable_alloc_template<0> single_client_traceable_alloc;
 template < int dummy >
 class gc_alloc_template {
     public:
-       static void * allocate(size_t n) { return GC_malloc(n); }
-       static void * ptr_free_allocate(size_t n)
-               { return GC_malloc_atomic(n); }
-       static void deallocate(void *, size_t) { }
-       static void ptr_free_deallocate(void *, size_t) { }
+        static void * allocate(size_t n) { return GC_malloc(n); }
+        static void * ptr_free_allocate(size_t n)
+                { return GC_malloc_atomic(n); }
+        static void deallocate(void *, size_t) { }
+        static void ptr_free_deallocate(void *, size_t) { }
 };
 
 typedef gc_alloc_template < 0 > gc_alloc;
@@ -337,11 +335,11 @@ typedef gc_alloc_template < 0 > gc_alloc;
 template < int dummy >
 class traceable_alloc_template {
     public:
-       static void * allocate(size_t n) { return GC_malloc_uncollectable(n); }
-       static void * ptr_free_allocate(size_t n)
-               { return GC_malloc_atomic_uncollectable(n); }
-       static void deallocate(void *p, size_t) { GC_free(p); }
-       static void ptr_free_deallocate(void *p, size_t) { GC_free(p); }
+        static void * allocate(size_t n) { return GC_malloc_uncollectable(n); }
+        static void * ptr_free_allocate(size_t n)
+                { return GC_malloc_atomic_uncollectable(n); }
+        static void deallocate(void *p, size_t) { GC_free(p); }
+        static void ptr_free_deallocate(void *p, size_t) { GC_free(p); }
 };
 
 typedef traceable_alloc_template < 0 > traceable_alloc;
@@ -351,45 +349,46 @@ typedef traceable_alloc_template < 0 > traceable_alloc;
 // even approximate that.  The following approximation should work for
 // SGI compilers, and recent versions of g++.
 
-# define __GC_SPECIALIZE(T,alloc) \
-class simple_alloc<T, alloc> { \
-public: \
+// GC_SPECIALIZE() is used internally.
+#define GC_SPECIALIZE(T,alloc) \
+  class simple_alloc<T, alloc> { \
+  public: \
     static T *allocate(size_t n) \
-       { return 0 == n? 0 : \
-                        reinterpret_cast<T*>(alloc::ptr_free_allocate(n * sizeof (T))); } \
+        { return 0 == n? 0 : \
+            reinterpret_cast<T*>(alloc::ptr_free_allocate(n * sizeof(T))); } \
     static T *allocate(void) \
-       { return reinterpret_cast<T*>(alloc::ptr_free_allocate(sizeof (T))); } \
+        { return reinterpret_cast<T*>(alloc::ptr_free_allocate(sizeof(T))); } \
     static void deallocate(T *p, size_t n) \
-       { if (0 != n) alloc::ptr_free_deallocate(p, n * sizeof (T)); } \
+        { if (0 != n) alloc::ptr_free_deallocate(p, n * sizeof(T)); } \
     static void deallocate(T *p) \
-       { alloc::ptr_free_deallocate(p, sizeof (T)); } \
-};
+        { alloc::ptr_free_deallocate(p, sizeof(T)); } \
+  };
 
 __STL_BEGIN_NAMESPACE
 
-__GC_SPECIALIZE(char, gc_alloc)
-__GC_SPECIALIZE(int, gc_alloc)
-__GC_SPECIALIZE(unsigned, gc_alloc)
-__GC_SPECIALIZE(float, gc_alloc)
-__GC_SPECIALIZE(double, gc_alloc)
-
-__GC_SPECIALIZE(char, traceable_alloc)
-__GC_SPECIALIZE(int, traceable_alloc)
-__GC_SPECIALIZE(unsigned, traceable_alloc)
-__GC_SPECIALIZE(float, traceable_alloc)
-__GC_SPECIALIZE(double, traceable_alloc)
-
-__GC_SPECIALIZE(char, single_client_gc_alloc)
-__GC_SPECIALIZE(int, single_client_gc_alloc)
-__GC_SPECIALIZE(unsigned, single_client_gc_alloc)
-__GC_SPECIALIZE(float, single_client_gc_alloc)
-__GC_SPECIALIZE(double, single_client_gc_alloc)
-
-__GC_SPECIALIZE(char, single_client_traceable_alloc)
-__GC_SPECIALIZE(int, single_client_traceable_alloc)
-__GC_SPECIALIZE(unsigned, single_client_traceable_alloc)
-__GC_SPECIALIZE(float, single_client_traceable_alloc)
-__GC_SPECIALIZE(double, single_client_traceable_alloc)
+GC_SPECIALIZE(char, gc_alloc)
+GC_SPECIALIZE(int, gc_alloc)
+GC_SPECIALIZE(unsigned, gc_alloc)
+GC_SPECIALIZE(float, gc_alloc)
+GC_SPECIALIZE(double, gc_alloc)
+
+GC_SPECIALIZE(char, traceable_alloc)
+GC_SPECIALIZE(int, traceable_alloc)
+GC_SPECIALIZE(unsigned, traceable_alloc)
+GC_SPECIALIZE(float, traceable_alloc)
+GC_SPECIALIZE(double, traceable_alloc)
+
+GC_SPECIALIZE(char, single_client_gc_alloc)
+GC_SPECIALIZE(int, single_client_gc_alloc)
+GC_SPECIALIZE(unsigned, single_client_gc_alloc)
+GC_SPECIALIZE(float, single_client_gc_alloc)
+GC_SPECIALIZE(double, single_client_gc_alloc)
+
+GC_SPECIALIZE(char, single_client_traceable_alloc)
+GC_SPECIALIZE(int, single_client_traceable_alloc)
+GC_SPECIALIZE(unsigned, single_client_traceable_alloc)
+GC_SPECIALIZE(float, single_client_traceable_alloc)
+GC_SPECIALIZE(double, single_client_traceable_alloc)
 
 __STL_END_NAMESPACE
 
index 9baceebea1dc140b531850b2af6cf318ea2b3fd8..379a7f7112ddef1c2b72cd22c2a3c8078f672316 100644 (file)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
+ * Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
+ * All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
 #ifndef GC_DARWIN_SEMAPHORE_H
 #define GC_DARWIN_SEMAPHORE_H
 
@@ -11,7 +28,7 @@
    safe. This isn't a problem because signals aren't used to
    suspend threads on darwin.
 */
-   
+
 typedef struct {
     pthread_mutex_t mutex;
     pthread_cond_t cond;
@@ -23,7 +40,7 @@ static int sem_init(sem_t *sem, int pshared, int value) {
     if(pshared)
         ABORT("sem_init with pshared set");
     sem->value = value;
-    
+
     ret = pthread_mutex_init(&sem->mutex,NULL);
     if(ret < 0) return -1;
     ret = pthread_cond_init(&sem->cond,NULL);
@@ -52,7 +69,7 @@ static int sem_wait(sem_t *sem) {
     }
     sem->value--;
     if(pthread_mutex_unlock(&sem->mutex) < 0)
-        return -1;    
+        return -1;
     return 0;
 }
 
index f6f5314ee315a5410cade12e06a7045214bfda05..d726df55b46670c3e8a0f8b6305868089270cdb5 100644 (file)
@@ -1,15 +1,32 @@
+/*
+ * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
+ * Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
+ * All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
 #ifndef GC_DARWIN_STOP_WORLD_H
 #define GC_DARWIN_STOP_WORLD_H
 
 #if !defined(GC_DARWIN_THREADS)
-#error darwin_stop_world.h included without GC_DARWIN_THREADS defined
+# error darwin_stop_world.h included without GC_DARWIN_THREADS defined
 #endif
 
 #include <mach/mach.h>
 #include <mach/thread_act.h>
 
 struct thread_stop_info {
-    mach_port_t mach_thread;
+  mach_port_t mach_thread;
 };
 
 struct GC_mach_thread {
@@ -17,6 +34,4 @@ struct GC_mach_thread {
   int already_suspended;
 };
 
-void GC_darwin_register_mach_handler_thread(mach_port_t thread);
-
 #endif
index 34443270d2f33d05ead7955e636fb4cbb83b5a11..45dc1812492c71d20a281885e5a1daf4ee749aa4 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1995 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1997 by Silicon Graphics.  All rights reserved.
  */
 
 #ifndef _DBG_MLC_H
-
 #define _DBG_MLC_H
 
-# define I_HIDE_POINTERS
 # include "gc_priv.h"
 # ifdef KEEP_BACK_PTRS
 #   include "gc_backptr.h"
 # endif
 
-#ifndef HIDE_POINTER
-  /* Gc.h was previously included, and hence the I_HIDE_POINTERS       */
-  /* definition had no effect.  Repeat the gc.h definitions here to    */
-  /* get them anyway.                                                  */
-    typedef GC_word GC_hidden_pointer;
-#   define HIDE_POINTER(p) (~(GC_hidden_pointer)(p))
-#   define REVEAL_POINTER(p) ((void *)(HIDE_POINTER(p)))
-#endif /* HIDE_POINTER */
-
 # define START_FLAG ((word)0xfedcedcb)
 # define END_FLAG ((word)0xbcdecdef)
-       /* Stored both one past the end of user object, and one before  */
-       /* the end of the object as seen by the allocator.              */
+        /* Stored both one past the end of user object, and one before  */
+        /* the end of the object as seen by the allocator.              */
 
 # if defined(KEEP_BACK_PTRS) || defined(PRINT_BLACK_LIST) \
      || defined(MAKE_BACK_GRAPH)
-    /* Pointer "source"s that aren't real locations.   */
-    /* Used in oh_back_ptr fields and as "source"      */
-    /* argument to some marking functions.             */
-#      define NOT_MARKED (ptr_t)(0)
-#      define MARKED_FOR_FINALIZATION ((ptr_t)(word)2)
-           /* Object was marked because it is finalizable.     */
-#      define MARKED_FROM_REGISTER ((ptr_t)(word)4)
-           /* Object was marked from a register.  Hence the    */
-           /* source of the reference doesn't have an address. */
+    /* Pointer "source"s that aren't real locations.    */
+    /* Used in oh_back_ptr fields and as "source"       */
+    /* argument to some marking functions.              */
+#       define NOT_MARKED (ptr_t)(0)
+#       define MARKED_FOR_FINALIZATION ((ptr_t)(word)2)
+            /* Object was marked because it is finalizable.     */
+#       define MARKED_FROM_REGISTER ((ptr_t)(word)4)
+            /* Object was marked from a register.  Hence the    */
+            /* source of the reference doesn't have an address. */
 # endif /* KEEP_BACK_PTRS || PRINT_BLACK_LIST */
 
 /* Object header */
 typedef struct {
 #   if defined(KEEP_BACK_PTRS) || defined(MAKE_BACK_GRAPH)
-       /* We potentially keep two different kinds of back      */
-       /* pointers.  KEEP_BACK_PTRS stores a single back       */
-       /* pointer in each reachable object to allow reporting  */
-       /* of why an object was retained.  MAKE_BACK_GRAPH      */
-       /* builds a graph containing the inverse of all         */
-       /* "points-to" edges including those involving          */
-       /* objects that have just become unreachable. This      */
-       /* allows detection of growing chains of unreachable    */
-       /* objects.  It may be possible to eventually combine   */
-       /* both, but for now we keep them separate.  Both       */
-       /* kinds of back pointers are hidden using the          */
-       /* following macros.  In both cases, the plain version  */
-       /* is constrained to have an least significant bit of 1,*/
-       /* to allow it to be distinguished from a free list     */
-       /* link.  This means the plain version must have an     */
-       /* lsb of 0.                                            */
-       /* Note that blocks dropped by black-listing will       */
-       /* also have the lsb clear once debugging has           */
-       /* started.                                             */
-       /* We're careful never to overwrite a value with lsb 0. */
+        /* We potentially keep two different kinds of back      */
+        /* pointers.  KEEP_BACK_PTRS stores a single back       */
+        /* pointer in each reachable object to allow reporting  */
+        /* of why an object was retained.  MAKE_BACK_GRAPH      */
+        /* builds a graph containing the inverse of all         */
+        /* "points-to" edges including those involving          */
+        /* objects that have just become unreachable. This      */
+        /* allows detection of growing chains of unreachable    */
+        /* objects.  It may be possible to eventually combine   */
+        /* both, but for now we keep them separate.  Both       */
+        /* kinds of back pointers are hidden using the          */
+        /* following macros.  In both cases, the plain version  */
+        /* is constrained to have an least significant bit of 1,*/
+        /* to allow it to be distinguished from a free list     */
+        /* link.  This means the plain version must have an     */
+        /* lsb of 0.                                            */
+        /* Note that blocks dropped by black-listing will       */
+        /* also have the lsb clear once debugging has           */
+        /* started.                                             */
+        /* We're careful never to overwrite a value with lsb 0. */
 #       if ALIGNMENT == 1
-         /* Fudge back pointer to be even.  */
-#        define HIDE_BACK_PTR(p) HIDE_POINTER(~1 & (GC_word)(p))
-#      else
-#        define HIDE_BACK_PTR(p) HIDE_POINTER(p)
-#      endif
-       
+          /* Fudge back pointer to be even.  */
+#         define HIDE_BACK_PTR(p) GC_HIDE_POINTER(~1 & (GC_word)(p))
+#       else
+#         define HIDE_BACK_PTR(p) GC_HIDE_POINTER(p)
+#       endif
+
 #       ifdef KEEP_BACK_PTRS
-         GC_hidden_pointer oh_back_ptr;
-#      endif
-#      ifdef MAKE_BACK_GRAPH
-         GC_hidden_pointer oh_bg_ptr;
-#      endif
-#      if defined(KEEP_BACK_PTRS) != defined(MAKE_BACK_GRAPH)
-         /* Keep double-pointer-sized alignment.       */
-         word oh_dummy;
-#      endif
+          GC_hidden_pointer oh_back_ptr;
+#       endif
+#       ifdef MAKE_BACK_GRAPH
+          GC_hidden_pointer oh_bg_ptr;
+#       endif
+#       if defined(KEEP_BACK_PTRS) != defined(MAKE_BACK_GRAPH)
+          /* Keep double-pointer-sized alignment.       */
+          word oh_dummy;
+#       endif
 #   endif
-    const char * oh_string;    /* object descriptor string     */
-    word oh_int;               /* object descriptor integers   */
+    const char * oh_string;     /* object descriptor string     */
+    word oh_int;                /* object descriptor integers   */
 #   ifdef NEED_CALLINFO
       struct callinfo oh_ci[NFRAMES];
 #   endif
 #   ifndef SHORT_DBG_HDRS
-      word oh_sz;                      /* Original malloc arg.         */
-      word oh_sf;                      /* start flag */
+      word oh_sz;                       /* Original malloc arg.         */
+      word oh_sf;                       /* start flag */
 #   endif /* SHORT_DBG_HDRS */
 } oh;
-/* The size of the above structure is assumed not to de-align things,  */
-/* and to be a multiple of the word length.                            */
+/* The size of the above structure is assumed not to de-align things,   */
+/* and to be a multiple of the word length.                             */
 
 #ifdef SHORT_DBG_HDRS
 #   define DEBUG_BYTES (sizeof (oh))
 #   define UNCOLLECTABLE_DEBUG_BYTES DEBUG_BYTES
 #else
-    /* Add space for END_FLAG, but use any extra space that was already        */
-    /* added to catch off-the-end pointers.                            */
-    /* For uncollectable objects, the extra byte is not added.         */
+    /* Add space for END_FLAG, but use any extra space that was already */
+    /* added to catch off-the-end pointers.                             */
+    /* For uncollectable objects, the extra byte is not added.          */
 #   define UNCOLLECTABLE_DEBUG_BYTES (sizeof (oh) + sizeof (word))
 #   define DEBUG_BYTES (UNCOLLECTABLE_DEBUG_BYTES - EXTRA_BYTES)
 #endif
 
-/* Round bytes to words without adding extra byte at end.      */
+/* Round bytes to words without adding extra byte at end.       */
 #define SIMPLE_ROUNDED_UP_WORDS(n) BYTES_TO_WORDS((n) + WORDS_TO_BYTES(1) - 1)
 
-/* ADD_CALL_CHAIN stores a (partial) call chain into an object */
-/* header.  It may be called with or without the allocation    */
-/* lock.                                                       */
-/* PRINT_CALL_CHAIN prints the call chain stored in an object  */
-/* to stderr.  It requires that we do not hold the lock.       */
+/* ADD_CALL_CHAIN stores a (partial) call chain into an object  */
+/* header.  It may be called with or without the allocation     */
+/* lock.                                                        */
+/* PRINT_CALL_CHAIN prints the call chain stored in an object   */
+/* to stderr.  It requires that we do not hold the lock.        */
 #if defined(SAVE_CALL_CHAIN)
     struct callinfo;
-    void GC_save_callers(struct callinfo info[NFRAMES]);
-    void GC_print_callers(struct callinfo info[NFRAMES]);
+    GC_INNER void GC_save_callers(struct callinfo info[NFRAMES]);
+    GC_INNER void GC_print_callers(struct callinfo info[NFRAMES]);
 #   define ADD_CALL_CHAIN(base, ra) GC_save_callers(((oh *)(base)) -> oh_ci)
 #   define PRINT_CALL_CHAIN(base) GC_print_callers(((oh *)(base)) -> oh_ci)
 #elif defined(GC_ADD_CALLER)
     struct callinfo;
-    void GC_print_callers(struct callinfo info[NFRAMES]);
+    GC_INNER void GC_print_callers(struct callinfo info[NFRAMES]);
 #   define ADD_CALL_CHAIN(base, ra) ((oh *)(base)) -> oh_ci[0].ci_pc = (ra)
 #   define PRINT_CALL_CHAIN(base) GC_print_callers(((oh *)(base)) -> oh_ci)
 #else
@@ -155,24 +144,25 @@ typedef struct {
 # endif
 
 
-/* Check whether object with base pointer p has debugging info */ 
-/* p is assumed to point to a legitimate object in our part    */
-/* of the heap.                                                        */
+/* Check whether object with base pointer p has debugging info  */
+/* p is assumed to point to a legitimate object in our part     */
+/* of the heap.                                                 */
 #ifdef SHORT_DBG_HDRS
 # define GC_has_other_debug_info(p) TRUE
 #else
-  GC_bool GC_has_other_debug_info(ptr_t p);
+  GC_INNER GC_bool GC_has_other_debug_info(ptr_t p);
 #endif
 
 #if defined(KEEP_BACK_PTRS) || defined(MAKE_BACK_GRAPH)
 # define GC_HAS_DEBUG_INFO(p) \
-       ((*((word *)p) & 1) && GC_has_other_debug_info(p))
+        ((*((word *)p) & 1) && GC_has_other_debug_info(p))
 #else
 # define GC_HAS_DEBUG_INFO(p) GC_has_other_debug_info(p)
 #endif
 
 /* Store debugging info into p.  Return displaced pointer. */
-/* Assumes we don't hold allocation lock.                 */
-ptr_t GC_store_debug_info(ptr_t p, word sz, const char *str, word integer);
+/* Assumes we don't hold allocation lock.                  */
+GC_INNER ptr_t GC_store_debug_info(ptr_t p, word sz, const char *str,
+                                   word integer);
 
 #endif /* _DBG_MLC_H */
index 0e4c927dbda244b759232de49ae9ab562d237c33..c5cf27f47f186bbaf12e87266c44783cd06bd2c5 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  *
@@ -17,7 +17,7 @@
 typedef struct hblkhdr hdr;
 
 # if CPP_WORDSZ != 32 && CPP_WORDSZ < 36
-       --> Get a real machine.
+        --> Get a real machine.
 # endif
 
 /*
@@ -39,10 +39,10 @@ typedef struct hblkhdr hdr;
 #   define HASH_TL
 # endif
 
-/* Define appropriate out-degrees for each of the two tree levels      */
+/* Define appropriate out-degrees for each of the two tree levels       */
 # ifdef SMALL_CONFIG
 #   define LOG_BOTTOM_SZ 11
-       /* Keep top index size reasonable with smaller blocks. */
+        /* Keep top index size reasonable with smaller blocks. */
 # else
 #   define LOG_BOTTOM_SZ 10
 # endif
@@ -57,7 +57,7 @@ typedef struct hblkhdr hdr;
 /* #define COUNT_HDR_CACHE_HITS  */
 
 # ifdef COUNT_HDR_CACHE_HITS
-    extern word GC_hdr_cache_hits;
+    extern word GC_hdr_cache_hits; /* used for debugging/profiling */
     extern word GC_hdr_cache_misses;
 #   define HC_HIT() ++GC_hdr_cache_hits
 #   define HC_MISS() ++GC_hdr_cache_misses
@@ -67,98 +67,99 @@ typedef struct hblkhdr hdr;
 # endif
 
   typedef struct hce {
-    word block_addr;   /* right shifted by LOG_HBLKSIZE */
+    word block_addr;    /* right shifted by LOG_HBLKSIZE */
     hdr * hce_hdr;
   } hdr_cache_entry;
 
 # define HDR_CACHE_SIZE 8  /* power of 2 */
 
 # define DECLARE_HDR_CACHE \
-       hdr_cache_entry hdr_cache[HDR_CACHE_SIZE]
+        hdr_cache_entry hdr_cache[HDR_CACHE_SIZE]
 
 # define INIT_HDR_CACHE BZERO(hdr_cache, sizeof(hdr_cache))
 
 # define HCE(h) hdr_cache + (((word)(h) >> LOG_HBLKSIZE) & (HDR_CACHE_SIZE-1))
 
 # define HCE_VALID_FOR(hce,h) ((hce) -> block_addr == \
-                               ((word)(h) >> LOG_HBLKSIZE))
+                                ((word)(h) >> LOG_HBLKSIZE))
 
 # define HCE_HDR(h) ((hce) -> hce_hdr)
 
 #ifdef PRINT_BLACK_LIST
-  hdr * GC_header_cache_miss(ptr_t p, hdr_cache_entry *hce, ptr_t source);
+  GC_INNER hdr * GC_header_cache_miss(ptr_t p, hdr_cache_entry *hce,
+                                      ptr_t source);
 # define HEADER_CACHE_MISS(p, hce, source) \
-         GC_header_cache_miss(p, hce, source)
+          GC_header_cache_miss(p, hce, source)
 #else
-  hdr * GC_header_cache_miss(ptr_t p, hdr_cache_entry *hce);
+  GC_INNER hdr * GC_header_cache_miss(ptr_t p, hdr_cache_entry *hce);
 # define HEADER_CACHE_MISS(p, hce, source) GC_header_cache_miss(p, hce)
 #endif
 
-/* Set hhdr to the header for p.  Analogous to GET_HDR below,          */
-/* except that in the case of large objects, it                                */
-/* gets the header for the object beginning, if GC_all_interior_ptrs   */
-/* is set.                                                             */
-/* Returns zero if p points to somewhere other than the first page     */
-/* of an object, and it is not a valid pointer to the object.          */
+/* Set hhdr to the header for p.  Analogous to GET_HDR below,           */
+/* except that in the case of large objects, it                         */
+/* gets the header for the object beginning, if GC_all_interior_ptrs    */
+/* is set.                                                              */
+/* Returns zero if p points to somewhere other than the first page      */
+/* of an object, and it is not a valid pointer to the object.           */
 # define HC_GET_HDR(p, hhdr, source, exit_label) \
-       { \
-         hdr_cache_entry * hce = HCE(p); \
-         if (EXPECT(HCE_VALID_FOR(hce, p), 1)) { \
-           HC_HIT(); \
-           hhdr = hce -> hce_hdr; \
-         } else { \
-           hhdr = HEADER_CACHE_MISS(p, hce, source); \
-           if (0 == hhdr) goto exit_label; \
-         } \
-       }
+        { \
+          hdr_cache_entry * hce = HCE(p); \
+          if (EXPECT(HCE_VALID_FOR(hce, p), 1)) { \
+            HC_HIT(); \
+            hhdr = hce -> hce_hdr; \
+          } else { \
+            hhdr = HEADER_CACHE_MISS(p, hce, source); \
+            if (0 == hhdr) goto exit_label; \
+          } \
+        }
 
 typedef struct bi {
     hdr * index[BOTTOM_SZ];
-       /*
-        * The bottom level index contains one of three kinds of values:
-        * 0 means we're not responsible for this block,
-        *   or this is a block other than the first one in a free block.
-        * 1 < (long)X <= MAX_JUMP means the block starts at least
-        *        X * HBLKSIZE bytes before the current address.
-        * A valid pointer points to a hdr structure. (The above can't be
-        * valid pointers due to the GET_MEM return convention.)
-        */
-    struct bi * asc_link;      /* All indices are linked in    */
-                               /* ascending order...           */
-    struct bi * desc_link;     /* ... and in descending order. */
-    word key;                  /* high order address bits.     */
+        /*
+         * The bottom level index contains one of three kinds of values:
+         * 0 means we're not responsible for this block,
+         *   or this is a block other than the first one in a free block.
+         * 1 < (long)X <= MAX_JUMP means the block starts at least
+         *        X * HBLKSIZE bytes before the current address.
+         * A valid pointer points to a hdr structure. (The above can't be
+         * valid pointers due to the GET_MEM return convention.)
+         */
+    struct bi * asc_link;       /* All indices are linked in    */
+                                /* ascending order...           */
+    struct bi * desc_link;      /* ... and in descending order. */
+    word key;                   /* high order address bits.     */
 # ifdef HASH_TL
-    struct bi * hash_link;     /* Hash chain link.             */
+    struct bi * hash_link;      /* Hash chain link.             */
 # endif
 } bottom_index;
 
-/* extern bottom_index GC_all_nils; - really part of GC_arrays */
+/* bottom_index GC_all_nils; - really part of GC_arrays */
 
 /* extern bottom_index * GC_top_index []; - really part of GC_arrays */
-                               /* Each entry points to a bottom_index. */
-                               /* On a 32 bit machine, it points to    */
-                               /* the index for a set of high order    */
-                               /* bits equal to the index.  For longer */
-                               /* addresses, we hash the high order    */
-                               /* bits to compute the index in         */
-                               /* GC_top_index, and each entry points  */
-                               /* to a hash chain.                     */
-                               /* The last entry in each chain is      */
-                               /* GC_all_nils.                         */
+                                /* Each entry points to a bottom_index. */
+                                /* On a 32 bit machine, it points to    */
+                                /* the index for a set of high order    */
+                                /* bits equal to the index.  For longer */
+                                /* addresses, we hash the high order    */
+                                /* bits to compute the index in         */
+                                /* GC_top_index, and each entry points  */
+                                /* to a hash chain.                     */
+                                /* The last entry in each chain is      */
+                                /* GC_all_nils.                         */
 
 
 # define MAX_JUMP (HBLKSIZE - 1)
 
 # define HDR_FROM_BI(bi, p) \
-               ((bi)->index[((word)(p) >> LOG_HBLKSIZE) & (BOTTOM_SZ - 1)])
+                ((bi)->index[((word)(p) >> LOG_HBLKSIZE) & (BOTTOM_SZ - 1)])
 # ifndef HASH_TL
 #   define BI(p) (GC_top_index \
-               [(word)(p) >> (LOG_BOTTOM_SZ + LOG_HBLKSIZE)])
+                [(word)(p) >> (LOG_BOTTOM_SZ + LOG_HBLKSIZE)])
 #   define HDR_INNER(p) HDR_FROM_BI(BI(p),p)
 #   ifdef SMALL_CONFIG
-#      define HDR(p) GC_find_header((ptr_t)(p))
+#       define HDR(p) GC_find_header((ptr_t)(p))
 #   else
-#      define HDR(p) HDR_INNER(p)
+#       define HDR(p) HDR_INNER(p)
 #   endif
 #   define GET_BI(p, bottom_indx) (bottom_indx) = BI(p)
 #   define GET_HDR(p, hhdr) (hhdr) = HDR(p)
@@ -169,34 +170,34 @@ typedef struct bi {
 #   define TL_HASH(hi) ((hi) & (TOP_SZ - 1))
 /*  Set bottom_indx to point to the bottom index for address p */
 #   define GET_BI(p, bottom_indx) \
-       { \
-           register word hi = \
-               (word)(p) >> (LOG_BOTTOM_SZ + LOG_HBLKSIZE); \
-           register bottom_index * _bi = GC_top_index[TL_HASH(hi)]; \
-           \
-           while (_bi -> key != hi && _bi != GC_all_nils) \
-               _bi = _bi -> hash_link; \
-           (bottom_indx) = _bi; \
-       }
+        { \
+            register word hi = \
+                (word)(p) >> (LOG_BOTTOM_SZ + LOG_HBLKSIZE); \
+            register bottom_index * _bi = GC_top_index[TL_HASH(hi)]; \
+            \
+            while (_bi -> key != hi && _bi != GC_all_nils) \
+                _bi = _bi -> hash_link; \
+            (bottom_indx) = _bi; \
+        }
 #   define GET_HDR_ADDR(p, ha) \
-       { \
-           register bottom_index * bi; \
-           \
-           GET_BI(p, bi);      \
-           (ha) = &(HDR_FROM_BI(bi, p)); \
-       }
+        { \
+            register bottom_index * bi; \
+            \
+            GET_BI(p, bi);      \
+            (ha) = &(HDR_FROM_BI(bi, p)); \
+        }
 #   define GET_HDR(p, hhdr) { register hdr ** _ha; GET_HDR_ADDR(p, _ha); \
-                             (hhdr) = *_ha; }
+                              (hhdr) = *_ha; }
 #   define SET_HDR(p, hhdr) { register hdr ** _ha; GET_HDR_ADDR(p, _ha); \
-                             *_ha = (hhdr); }
+                              *_ha = (hhdr); }
 #   define HDR(p) GC_find_header((ptr_t)(p))
 # endif
-                           
-/* Is the result a forwarding address to someplace closer to the       */
-/* beginning of the block or NIL?                                      */
+
+/* Is the result a forwarding address to someplace closer to the        */
+/* beginning of the block or NIL?                                       */
 # define IS_FORWARDING_ADDR_OR_NIL(hhdr) ((size_t) (hhdr) <= MAX_JUMP)
 
 /* Get an HBLKSIZE aligned address closer to the beginning of the block */
-/* h.  Assumes hhdr == HDR(h) and IS_FORWARDING_ADDR(hhdr).            */
+/* h.  Assumes hhdr == HDR(h) and IS_FORWARDING_ADDR(hhdr).             */
 # define FORWARDED_ADDR(h, hhdr) ((struct hblk *)(h) - (size_t)(hhdr))
 # endif /*  GC_HEADERS_H */
index 467c1a536a440b2ac583cdeff02cb8158d5ee761..0a8162c326bf2b5f9ca50bf57fcc2cf127b62055 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
  * DCL_LOCK_STATE declares any local variables needed by LOCK and UNLOCK.
  *
  * Note that I_HOLD_LOCK and I_DONT_HOLD_LOCK are used only positively
- * in assertions, and may return TRUE in the "dont know" case.
- */  
+ * in assertions, and may return TRUE in the "don't know" case.
+ */
 # ifdef THREADS
-#  include <atomic_ops.h>
+
+#  if defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS)
+#    include "atomic_ops.h"
+#  endif
 
    GC_API void GC_CALL GC_noop1(word);
 #  ifdef PCR
 #    include <base/PCR_Base.h>
 #    include <th/PCR_Th.h>
-     extern PCR_Th_ML GC_allocate_ml;
+     GC_EXTERN PCR_Th_ML GC_allocate_ml;
 #    define DCL_LOCK_STATE \
-        PCR_ERes GC_fastLockRes; PCR_sigset_t GC_old_sig_mask
+         PCR_ERes GC_fastLockRes; PCR_sigset_t GC_old_sig_mask
 #    define UNCOND_LOCK() PCR_Th_ML_Acquire(&GC_allocate_ml)
 #    define UNCOND_UNLOCK() PCR_Th_ML_Release(&GC_allocate_ml)
 #  endif
 #  if defined(GC_WIN32_THREADS) && !defined(USE_PTHREAD_LOCKS)
 #    include <windows.h>
 #    define NO_THREAD (DWORD)(-1)
-     extern DWORD GC_lock_holder;
-     GC_API CRITICAL_SECTION GC_allocate_ml;
+     GC_EXTERN DWORD GC_lock_holder;
+     GC_EXTERN CRITICAL_SECTION GC_allocate_ml;
 #    ifdef GC_ASSERTIONS
 #        define UNCOND_LOCK() \
-               { EnterCriticalSection(&GC_allocate_ml); \
-                 SET_LOCK_HOLDER(); }
+                { EnterCriticalSection(&GC_allocate_ml); \
+                  SET_LOCK_HOLDER(); }
 #        define UNCOND_UNLOCK() \
-               { GC_ASSERT(I_HOLD_LOCK()); UNSET_LOCK_HOLDER(); \
-                 LeaveCriticalSection(&GC_allocate_ml); }
+                { GC_ASSERT(I_HOLD_LOCK()); UNSET_LOCK_HOLDER(); \
+                  LeaveCriticalSection(&GC_allocate_ml); }
 #    else
 #      define UNCOND_LOCK() EnterCriticalSection(&GC_allocate_ml);
 #      define UNCOND_UNLOCK() LeaveCriticalSection(&GC_allocate_ml);
 #    define SET_LOCK_HOLDER() GC_lock_holder = GetCurrentThreadId()
 #    define UNSET_LOCK_HOLDER() GC_lock_holder = NO_THREAD
 #    define I_HOLD_LOCK() (!GC_need_to_lock \
-                          || GC_lock_holder == GetCurrentThreadId())
+                           || GC_lock_holder == GetCurrentThreadId())
 #    define I_DONT_HOLD_LOCK() (!GC_need_to_lock \
-                          || GC_lock_holder != GetCurrentThreadId())
+                           || GC_lock_holder != GetCurrentThreadId())
 #  elif defined(GC_PTHREADS)
 #    include <pthread.h>
-     
-     /* Posix allows pthread_t to be a struct, though it rarely is.    */
-     /* Unfortunately, we need to use a pthread_t to index a data      */
-     /* structure.  It also helps if comparisons don't involve a       */
-     /* function call.  Hence we introduce platform-dependent macros   */
-     /* to compare pthread_t ids and to map them to integers.          */
-     /* the mapping to integers does not need to result in different   */
-     /* integers for each thread, though that should be true as much   */
-     /* as possible.                                                   */
+
+     /* Posix allows pthread_t to be a struct, though it rarely is.     */
+     /* Unfortunately, we need to use a pthread_t to index a data       */
+     /* structure.  It also helps if comparisons don't involve a        */
+     /* function call.  Hence we introduce platform-dependent macros    */
+     /* to compare pthread_t ids and to map them to integers.           */
+     /* the mapping to integers does not need to result in different    */
+     /* integers for each thread, though that should be true as much    */
+     /* as possible.                                                    */
      /* Refine to exclude platforms on which pthread_t is struct */
 #    if !defined(GC_WIN32_PTHREADS)
 #      define NUMERIC_THREAD_ID(id) ((unsigned long)(id))
 #      define NUMERIC_THREAD_ID_UNIQUE
 #    else
 #      if defined(GC_WIN32_PTHREADS)
-#       define NUMERIC_THREAD_ID(id) ((unsigned long)(id.p))
-        /* Using documented internal details of win32_pthread library. */
-        /* Faster than pthread_equal(). Should not change with         */
-        /* future versions of win32_pthread library.                   */
-#       define THREAD_EQUAL(id1, id2) ((id1.p == id2.p) && (id1.x == id2.x))
+#        define NUMERIC_THREAD_ID(id) ((unsigned long)(id.p))
+         /* Using documented internal details of win32_pthread library. */
+         /* Faster than pthread_equal(). Should not change with         */
+         /* future versions of win32_pthread library.                   */
+#        define THREAD_EQUAL(id1, id2) ((id1.p == id2.p) && (id1.x == id2.x))
 #        undef NUMERIC_THREAD_ID_UNIQUE
 #      else
-        /* Generic definitions that always work, but will result in    */
-        /* poor performance and weak assertion checking.               */
-#       define NUMERIC_THREAD_ID(id) 1l
-#       define THREAD_EQUAL(id1, id2) pthread_equal(id1, id2)
+         /* Generic definitions that always work, but will result in    */
+         /* poor performance and weak assertion checking.               */
+#        define NUMERIC_THREAD_ID(id) 1l
+#        define THREAD_EQUAL(id1, id2) pthread_equal(id1, id2)
 #        undef NUMERIC_THREAD_ID_UNIQUE
 #      endif
 #    endif
 #    define NO_THREAD ((unsigned long)(-1l))
-               /* != NUMERIC_THREAD_ID(pthread_self()) for any thread */
+                /* != NUMERIC_THREAD_ID(pthread_self()) for any thread */
 
 #    if !defined(THREAD_LOCAL_ALLOC) && !defined(USE_PTHREAD_LOCKS)
-      /* In the THREAD_LOCAL_ALLOC case, the allocation lock tends to  */
-      /* be held for long periods, if it is held at all.  Thus spinning        */
-      /* and sleeping for fixed periods are likely to result in        */
+      /* In the THREAD_LOCAL_ALLOC case, the allocation lock tends to   */
+      /* be held for long periods, if it is held at all.  Thus spinning */
+      /* and sleeping for fixed periods are likely to result in         */
       /* significant wasted time.  We thus rely mostly on queued locks. */
 #     define USE_SPIN_LOCK
-      extern volatile AO_TS_t GC_allocate_lock;
-      extern void GC_lock(void);
-       /* Allocation lock holder.  Only set if acquired by client through */
-       /* GC_call_with_alloc_lock.                                        */
+      GC_EXTERN volatile AO_TS_t GC_allocate_lock;
+      GC_INNER void GC_lock(void);
+        /* Allocation lock holder.  Only set if acquired by client through */
+        /* GC_call_with_alloc_lock.                                        */
 #     ifdef GC_ASSERTIONS
 #        define UNCOND_LOCK() \
-               { if (AO_test_and_set_acquire(&GC_allocate_lock) == AO_TS_SET) \
-                       GC_lock(); \
-                 SET_LOCK_HOLDER(); }
+                { if (AO_test_and_set_acquire(&GC_allocate_lock) == AO_TS_SET) \
+                        GC_lock(); \
+                  SET_LOCK_HOLDER(); }
 #        define UNCOND_UNLOCK() \
-               { GC_ASSERT(I_HOLD_LOCK()); UNSET_LOCK_HOLDER(); \
-                 AO_CLEAR(&GC_allocate_lock); }
+                { GC_ASSERT(I_HOLD_LOCK()); UNSET_LOCK_HOLDER(); \
+                  AO_CLEAR(&GC_allocate_lock); }
 #     else
 #        define UNCOND_LOCK() \
-               { if (AO_test_and_set_acquire(&GC_allocate_lock) == AO_TS_SET) \
-                       GC_lock(); }
+                { if (AO_test_and_set_acquire(&GC_allocate_lock) == AO_TS_SET) \
+                        GC_lock(); }
 #        define UNCOND_UNLOCK() \
-               AO_CLEAR(&GC_allocate_lock)
+                AO_CLEAR(&GC_allocate_lock)
 #     endif /* !GC_ASSERTIONS */
 #    else /* THREAD_LOCAL_ALLOC  || USE_PTHREAD_LOCKS */
 #      ifndef USE_PTHREAD_LOCKS
 #    endif /* THREAD_LOCAL_ALLOC || USE_PTHREAD_LOCK */
 #    ifdef USE_PTHREAD_LOCKS
 #      include <pthread.h>
-       extern pthread_mutex_t GC_allocate_ml;
+       GC_EXTERN pthread_mutex_t GC_allocate_ml;
 #      ifdef GC_ASSERTIONS
 #        define UNCOND_LOCK() \
-               { GC_lock(); \
-                 SET_LOCK_HOLDER(); }
+                { GC_lock(); \
+                  SET_LOCK_HOLDER(); }
 #        define UNCOND_UNLOCK() \
-               { GC_ASSERT(I_HOLD_LOCK()); UNSET_LOCK_HOLDER(); \
-                 pthread_mutex_unlock(&GC_allocate_ml); }
+                { GC_ASSERT(I_HOLD_LOCK()); UNSET_LOCK_HOLDER(); \
+                  pthread_mutex_unlock(&GC_allocate_ml); }
 #      else /* !GC_ASSERTIONS */
 #        if defined(NO_PTHREAD_TRYLOCK)
 #          define UNCOND_LOCK() GC_lock();
 #        else /* !defined(NO_PTHREAD_TRYLOCK) */
 #        define UNCOND_LOCK() \
-          { if (0 != pthread_mutex_trylock(&GC_allocate_ml)) GC_lock(); }
+           { if (0 != pthread_mutex_trylock(&GC_allocate_ml)) GC_lock(); }
 #        endif
 #        define UNCOND_UNLOCK() pthread_mutex_unlock(&GC_allocate_ml)
 #      endif /* !GC_ASSERTIONS */
 #    endif /* USE_PTHREAD_LOCKS */
 #    define SET_LOCK_HOLDER() \
-               GC_lock_holder = NUMERIC_THREAD_ID(pthread_self())
+                GC_lock_holder = NUMERIC_THREAD_ID(pthread_self())
 #    define UNSET_LOCK_HOLDER() GC_lock_holder = NO_THREAD
 #    define I_HOLD_LOCK() \
-               (!GC_need_to_lock || \
-                GC_lock_holder == NUMERIC_THREAD_ID(pthread_self()))
+                (!GC_need_to_lock || \
+                 GC_lock_holder == NUMERIC_THREAD_ID(pthread_self()))
 #    ifndef NUMERIC_THREAD_ID_UNIQUE
 #      define I_DONT_HOLD_LOCK() 1  /* Conservatively say yes */
 #    else
 #      define I_DONT_HOLD_LOCK() \
-               (!GC_need_to_lock \
-                || GC_lock_holder != NUMERIC_THREAD_ID(pthread_self()))
+                (!GC_need_to_lock \
+                 || GC_lock_holder != NUMERIC_THREAD_ID(pthread_self()))
 #    endif
-     extern volatile GC_bool GC_collecting;
+     GC_EXTERN volatile GC_bool GC_collecting;
 #    define ENTER_GC() GC_collecting = 1;
 #    define EXIT_GC() GC_collecting = 0;
-     extern void GC_lock(void);
-     extern unsigned long GC_lock_holder;
+     GC_INNER void GC_lock(void);
+     GC_EXTERN unsigned long GC_lock_holder;
 #    ifdef GC_ASSERTIONS
-      extern unsigned long GC_mark_lock_holder;
+       GC_EXTERN unsigned long GC_mark_lock_holder;
 #    endif
 #  endif /* GC_PTHREADS with linux_threads.c implementation */
 
 #   define UNSET_LOCK_HOLDER()
 #   define I_HOLD_LOCK() TRUE
 #   define I_DONT_HOLD_LOCK() TRUE
-                       /* Used only in positive assertions or to test whether  */
-                       /* we still need to acquire the lock.  TRUE works in    */
-                       /* either case.                                         */
+                /* Used only in positive assertions or to test whether  */
+                /* we still need to acquire the lock.  TRUE works in    */
+                /* either case.                                         */
 # endif /* !THREADS */
 
-#if defined(UNCOND_LOCK) && !defined(LOCK) 
-     GC_API GC_bool GC_need_to_lock;
-               /* At least two thread running; need to lock.   */
+#if defined(UNCOND_LOCK) && !defined(LOCK)
+     GC_EXTERN GC_bool GC_need_to_lock;
+                /* At least two thread running; need to lock.   */
 #    define LOCK() if (GC_need_to_lock) { UNCOND_LOCK(); }
 #    define UNLOCK() if (GC_need_to_lock) { UNCOND_UNLOCK(); }
 #endif
index cbc799bc76c9374bcfe9f269ee5a5c22fa89d44e..c0232cc48722f1bc92a0391b3b6df1f898a0f203 100644 (file)
 /*
  * Declarations of mark stack.  Needed by marker and client supplied mark
  * routines.  Transitively include gc_priv.h.
- * (Note that gc_priv.h should not be included before this, since this
- * includes dbg_mlc.h, which wants to include gc_priv.h AFTER defining
- * I_HIDE_POINTERS.)
  */
 #ifndef GC_PMARK_H
-# define GC_PMARK_H
+#define GC_PMARK_H
 
-# if defined(KEEP_BACK_PTRS) || defined(PRINT_BLACK_LIST)
-#   include "dbg_mlc.h"
-# endif
-# ifndef GC_MARK_H
-#   include "../gc_mark.h"
-# endif
-# ifndef GC_PRIVATE_H
-#   include "gc_priv.h"
+#ifdef HAVE_CONFIG_H
+# include "private/config.h"
+#endif
+
+#ifndef GC_BUILD
+# define GC_BUILD
+#endif
+
+#if defined(KEEP_BACK_PTRS) || defined(PRINT_BLACK_LIST)
+# include "dbg_mlc.h"
+#endif
+
+#ifndef GC_MARK_H
+# ifndef GC_H
+#   define GC_I_HIDE_POINTERS /* to get GC_HIDE_POINTER() and friends */
 # endif
+# include "../gc_mark.h"
+#endif
 
-/* The real declarations of the following is in gc_priv.h, so that     */
-/* we can avoid scanning the following table.                          */
+#ifndef GC_PRIVATE_H
+# include "gc_priv.h"
+#endif
+
+/* The real declarations of the following is in gc_priv.h, so that      */
+/* we can avoid scanning the following table.                           */
 /*
-extern mark_proc GC_mark_procs[MAX_MARK_PROCS];
+mark_proc GC_mark_procs[MAX_MARK_PROCS];
 */
 
 #ifndef MARK_DESCR_OFFSET
-#  define MARK_DESCR_OFFSET    sizeof(word)
+# define MARK_DESCR_OFFSET sizeof(word)
 #endif
 
 /*
  * Mark descriptor stuff that should remain private for now, mostly
  * because it's hard to export WORDSZ without including gcconfig.h.
  */
-# define BITMAP_BITS (WORDSZ - GC_DS_TAG_BITS)
-# define PROC(descr) \
-       (GC_mark_procs[((descr) >> GC_DS_TAG_BITS) & (GC_MAX_MARK_PROCS-1)])
-# define ENV(descr) \
-       ((descr) >> (GC_DS_TAG_BITS + GC_LOG_MAX_MARK_PROCS))
-# define MAX_ENV \
-       (((word)1 << (WORDSZ - GC_DS_TAG_BITS - GC_LOG_MAX_MARK_PROCS)) - 1)
-
+#define BITMAP_BITS (WORDSZ - GC_DS_TAG_BITS)
+#define PROC(descr) \
+      (GC_mark_procs[((descr) >> GC_DS_TAG_BITS) & (GC_MAX_MARK_PROCS-1)])
+#define ENV(descr) \
+      ((descr) >> (GC_DS_TAG_BITS + GC_LOG_MAX_MARK_PROCS))
+#define MAX_ENV \
+      (((word)1 << (WORDSZ - GC_DS_TAG_BITS - GC_LOG_MAX_MARK_PROCS)) - 1)
 
-extern unsigned GC_n_mark_procs;
+GC_EXTERN unsigned GC_n_mark_procs;
 
-/* Number of mark stack entries to discard on overflow.        */
+/* Number of mark stack entries to discard on overflow. */
 #define GC_MARK_STACK_DISCARDS (INITIAL_MARK_STACK_SIZE/8)
 
 typedef struct GC_ms_entry {
-    ptr_t mse_start;   /* First word of object, word aligned  */
-    GC_word mse_descr; /* Descriptor; low order two bits are tags,     */
-                       /* as described in gc_mark.h.                   */
+    ptr_t mse_start;    /* First word of object, word aligned.  */
+    GC_word mse_descr;  /* Descriptor; low order two bits are tags,     */
+                        /* as described in gc_mark.h.                   */
 } mse;
 
-extern size_t GC_mark_stack_size;
+GC_EXTERN size_t GC_mark_stack_size;
 
-extern mse * GC_mark_stack_limit;
+GC_EXTERN mse * GC_mark_stack_limit;
 
 #ifdef PARALLEL_MARK
-  extern mse * volatile GC_mark_stack_top;
+  GC_EXTERN mse * volatile GC_mark_stack_top;
 #else
-  extern mse * GC_mark_stack_top;
+  GC_EXTERN mse * GC_mark_stack_top;
 #endif
 
-extern mse * GC_mark_stack;
+GC_EXTERN mse * GC_mark_stack;
 
 #ifdef PARALLEL_MARK
     /*
@@ -87,19 +96,19 @@ extern mse * GC_mark_stack;
      * This works roughly as follows:
      *  The main mark stack never shrinks, but it can grow.
      *
-     * The initiating threads holds the GC lock, and sets GC_help_wanted.
-     *  
+     *  The initiating threads holds the GC lock, and sets GC_help_wanted.
+     *
      *  Other threads:
      *     1) update helper_count (while holding mark_lock.)
-     *    2) allocate a local mark stack
+     *     2) allocate a local mark stack
      *     repeatedly:
-     *         3) Steal a global mark stack entry by atomically replacing
-     *            its descriptor with 0.
-     *         4) Copy it to the local stack.
-     *         5) Mark on the local stack until it is empty, or
-     *            it may be profitable to copy it back.
-     *         6) If necessary, copy local stack to global one,
-     *            holding mark lock.
+     *          3) Steal a global mark stack entry by atomically replacing
+     *             its descriptor with 0.
+     *          4) Copy it to the local stack.
+     *          5) Mark on the local stack until it is empty, or
+     *             it may be profitable to copy it back.
+     *          6) If necessary, copy local stack to global one,
+     *             holding mark lock.
      *    7) Stop when the global mark stack is empty.
      *    8) decrement helper_count (holding mark_lock).
      *
@@ -108,7 +117,7 @@ extern mse * GC_mark_stack;
      * also less performant, way.
      */
 
-    /* GC_mark_stack_top is protected by mark lock.    */
+    /* GC_mark_stack_top is protected by mark lock.     */
 
     /*
      * GC_notify_all_marker() is used when GC_help_wanted is first set,
@@ -120,15 +129,11 @@ extern mse * GC_mark_stack;
      */
 #endif /* PARALLEL_MARK */
 
-/* Return a pointer to within 1st page of object.      */
-/* Set *new_hdr_p to corr. hdr.                                */
-ptr_t GC_find_start(ptr_t current, hdr *hhdr, hdr **new_hdr_p);
-
-mse * GC_signal_mark_stack_overflow(mse *msp);
+GC_INNER mse * GC_signal_mark_stack_overflow(mse *msp);
 
-/* Push the object obj with corresponding heap block header hhdr onto  */
-/* the mark stack.                                                     */
-# define PUSH_OBJ(obj, hhdr, mark_stack_top, mark_stack_limit) \
+/* Push the object obj with corresponding heap block header hhdr onto   */
+/* the mark stack.                                                      */
+#define PUSH_OBJ(obj, hhdr, mark_stack_top, mark_stack_limit) \
 { \
     register word _descr = (hhdr) -> hb_descr; \
         \
@@ -143,28 +148,28 @@ mse * GC_signal_mark_stack_overflow(mse *msp);
     } \
 }
 
-/* Push the contents of current onto the mark stack if it is a valid   */
-/* ptr to a currently unmarked object.  Mark it.                       */
-/* If we assumed a standard-conforming compiler, we could probably     */
-/* generate the exit_label transparently.                              */
-# define PUSH_CONTENTS(current, mark_stack_top, mark_stack_limit, \
-                      source, exit_label) \
+/* Push the contents of current onto the mark stack if it is a valid    */
+/* ptr to a currently unmarked object.  Mark it.                        */
+/* If we assumed a standard-conforming compiler, we could probably      */
+/* generate the exit_label transparently.                               */
+#define PUSH_CONTENTS(current, mark_stack_top, mark_stack_limit, \
+                      source, exit_label) \
 { \
     hdr * my_hhdr; \
  \
     HC_GET_HDR(current, my_hhdr, source, exit_label); \
     PUSH_CONTENTS_HDR(current, mark_stack_top, mark_stack_limit, \
-                 source, exit_label, my_hhdr, TRUE);   \
+                  source, exit_label, my_hhdr, TRUE);   \
 exit_label: ; \
 }
 
-/* Set mark bit, exit if it was already set.   */
+/* Set mark bit, exit if it was already set.    */
 
-# ifdef USE_MARK_BITS
-#   ifdef PARALLEL_MARK
-      /* The following may fail to exit even if the bit was already set.    */
-      /* For our uses, that's benign:                                       */
-#     define OR_WORD_EXIT_IF_SET(addr, bits, exit_label) \
+#ifdef USE_MARK_BITS
+# ifdef PARALLEL_MARK
+    /* The following may fail to exit even if the bit was already set.  */
+    /* For our uses, that's benign:                                     */
+#   define OR_WORD_EXIT_IF_SET(addr, bits, exit_label) \
         { \
           if (!(*(addr) & (bits))) { \
             AO_or((AO_t *)(addr), (bits)); \
@@ -172,132 +177,131 @@ exit_label: ; \
             goto exit_label; \
           } \
         }
-#   else
-#     define OR_WORD_EXIT_IF_SET(addr, bits, exit_label) \
+# else
+#   define OR_WORD_EXIT_IF_SET(addr, bits, exit_label) \
         { \
            word old = *(addr); \
            word my_bits = (bits); \
            if (old & my_bits) goto exit_label; \
            *(addr) = (old | my_bits); \
          }
-#   endif /* !PARALLEL_MARK */
-#   define SET_MARK_BIT_EXIT_IF_SET(hhdr,bit_no,exit_label) \
+# endif /* !PARALLEL_MARK */
+# define SET_MARK_BIT_EXIT_IF_SET(hhdr,bit_no,exit_label) \
     { \
         word * mark_word_addr = hhdr -> hb_marks + divWORDSZ(bit_no); \
       \
         OR_WORD_EXIT_IF_SET(mark_word_addr, (word)1 << modWORDSZ(bit_no), \
                             exit_label); \
     }
-# endif
-
+#endif
 
-# if defined(I386) && defined(__GNUC__)
-#  define LONG_MULT(hprod, lprod, x, y) { \
-       asm("mull %2" : "=a"(lprod), "=d"(hprod) : "g"(y), "0"(x)); \
-   }
-# else /* No in-line X86 assembly code */
-#  define LONG_MULT(hprod, lprod, x, y) { \
-       unsigned long long prod = (unsigned long long)x \
-                                 * (unsigned long long)y; \
-       hprod = prod >> 32;  \
-       lprod = (unsigned32)prod;  \
-   }
-# endif
+#if defined(I386) && defined(__GNUC__)
+# define LONG_MULT(hprod, lprod, x, y) { \
+        asm("mull %2" : "=a"(lprod), "=d"(hprod) : "g"(y), "0"(x)); \
+  }
+#else /* No in-line X86 assembly code */
+# define LONG_MULT(hprod, lprod, x, y) { \
+        unsigned long long prod = (unsigned long long)x \
+                                  * (unsigned long long)y; \
+        hprod = prod >> 32;  \
+        lprod = (unsigned32)prod;  \
+  }
+#endif
 
 #ifdef USE_MARK_BYTES
-  /* There is a race here, and we may set                              */
-  /* the bit twice in the concurrent case.  This can result in the     */
-  /* object being pushed twice.  But that's only a performance issue.  */
+  /* There is a race here, and we may set                               */
+  /* the bit twice in the concurrent case.  This can result in the      */
+  /* object being pushed twice.  But that's only a performance issue.   */
 # define SET_MARK_BIT_EXIT_IF_SET(hhdr,bit_no,exit_label) \
     { \
         char * mark_byte_addr = (char *)hhdr -> hb_marks + (bit_no); \
         char mark_byte = *mark_byte_addr; \
           \
-       if (mark_byte) goto exit_label; \
-       *mark_byte_addr = 1;  \
-    } 
+        if (mark_byte) goto exit_label; \
+        *mark_byte_addr = 1;  \
+    }
 #endif /* USE_MARK_BYTES */
 
 #ifdef PARALLEL_MARK
 # define INCR_MARKS(hhdr) \
-       AO_store(&(hhdr -> hb_n_marks), AO_load(&(hhdr -> hb_n_marks))+1);
+        AO_store(&(hhdr -> hb_n_marks), AO_load(&(hhdr -> hb_n_marks))+1);
 #else
 # define INCR_MARKS(hhdr) ++(hhdr -> hb_n_marks)
 #endif
 
 #ifdef ENABLE_TRACE
 # define TRACE(source, cmd) \
-       if (GC_trace_addr != 0 && (ptr_t)(source) == GC_trace_addr) cmd
+        if (GC_trace_addr != 0 && (ptr_t)(source) == GC_trace_addr) cmd
 # define TRACE_TARGET(target, cmd) \
-       if (GC_trace_addr != 0 && (target) == *(ptr_t *)GC_trace_addr) cmd
+        if (GC_trace_addr != 0 && (target) == *(ptr_t *)GC_trace_addr) cmd
 #else
 # define TRACE(source, cmd)
 # define TRACE_TARGET(source, cmd)
 #endif
-/* If the mark bit corresponding to current is not set, set it, and    */
-/* push the contents of the object on the mark stack.  Current points  */
-/* to the beginning of the object.  We rely on the fact that the       */
-/* preceding header calculation will succeed for a pointer past the    */
-/* first page of an object, only if it is in fact a valid pointer      */
-/* to the object.  Thus we can omit the otherwise necessary tests      */
-/* here.  Note in particular that the "displ" value is the displacement        */
-/* from the beginning of the heap block, which may itself be in the    */
-/* interior of a large object.                                         */
+
+/* If the mark bit corresponding to current is not set, set it, and     */
+/* push the contents of the object on the mark stack.  Current points   */
+/* to the beginning of the object.  We rely on the fact that the        */
+/* preceding header calculation will succeed for a pointer past the     */
+/* first page of an object, only if it is in fact a valid pointer       */
+/* to the object.  Thus we can omit the otherwise necessary tests       */
+/* here.  Note in particular that the "displ" value is the displacement */
+/* from the beginning of the heap block, which may itself be in the     */
+/* interior of a large object.                                          */
 #ifdef MARK_BIT_PER_GRANULE
 # define PUSH_CONTENTS_HDR(current, mark_stack_top, mark_stack_limit, \
-                          source, exit_label, hhdr, do_offset_check) \
+                           source, exit_label, hhdr, do_offset_check) \
 { \
     size_t displ = HBLKDISPL(current); /* Displacement in block; in bytes. */\
-    /* displ is always within range.  If current doesn't point to      */ \
-    /* first block, then we are in the all_interior_pointers case, and */ \
-    /* it is safe to use any displacement value.                       */ \
+    /* displ is always within range.  If current doesn't point to       */ \
+    /* first block, then we are in the all_interior_pointers case, and  */ \
+    /* it is safe to use any displacement value.                        */ \
     size_t gran_displ = BYTES_TO_GRANULES(displ); \
-    size_t gran_offset = hhdr -> hb_map[gran_displ];   \
+    size_t gran_offset = hhdr -> hb_map[gran_displ];    \
     size_t byte_offset = displ & (GRANULE_BYTES - 1); \
     ptr_t base = current;  \
     /* The following always fails for large block references. */ \
     if (EXPECT((gran_offset | byte_offset) != 0, FALSE))  { \
-       if (hhdr -> hb_large_block) { \
-         /* gran_offset is bogus.      */ \
-         size_t obj_displ; \
-         base = (ptr_t)(hhdr -> hb_block); \
-         obj_displ = (ptr_t)(current) - base;  \
-         if (obj_displ != displ) { \
-           GC_ASSERT(obj_displ < hhdr -> hb_sz); \
-           /* Must be in all_interior_pointer case, not first block */ \
-           /* already did validity check on cache miss.             */ \
-           ; \
-         } else { \
-           if (do_offset_check && !GC_valid_offsets[obj_displ]) { \
-             GC_ADD_TO_BLACK_LIST_NORMAL(current, source); \
-             goto exit_label; \
-           } \
-         } \
-         gran_displ = 0; \
-         GC_ASSERT(hhdr -> hb_sz > HBLKSIZE || \
-                   hhdr -> hb_block == HBLKPTR(current)); \
-         GC_ASSERT((ptr_t)(hhdr -> hb_block) <= (ptr_t) current); \
-       } else { \
-         size_t obj_displ = GRANULES_TO_BYTES(gran_offset) \
-                            + byte_offset; \
-         if (do_offset_check && !GC_valid_offsets[obj_displ]) { \
-           GC_ADD_TO_BLACK_LIST_NORMAL(current, source); \
-           goto exit_label; \
-         } \
-         gran_displ -= gran_offset; \
-         base -= obj_displ; \
-       } \
+        if (hhdr -> hb_large_block) { \
+          /* gran_offset is bogus.      */ \
+          size_t obj_displ; \
+          base = (ptr_t)(hhdr -> hb_block); \
+          obj_displ = (ptr_t)(current) - base;  \
+          if (obj_displ != displ) { \
+            GC_ASSERT(obj_displ < hhdr -> hb_sz); \
+            /* Must be in all_interior_pointer case, not first block */ \
+            /* already did validity check on cache miss.             */ \
+          } else { \
+            if (do_offset_check && !GC_valid_offsets[obj_displ]) { \
+              GC_ADD_TO_BLACK_LIST_NORMAL(current, source); \
+              goto exit_label; \
+            } \
+          } \
+          gran_displ = 0; \
+          GC_ASSERT(hhdr -> hb_sz > HBLKSIZE || \
+                    hhdr -> hb_block == HBLKPTR(current)); \
+          GC_ASSERT((ptr_t)(hhdr -> hb_block) <= (ptr_t) current); \
+        } else { \
+          size_t obj_displ = GRANULES_TO_BYTES(gran_offset) \
+                             + byte_offset; \
+          if (do_offset_check && !GC_valid_offsets[obj_displ]) { \
+            GC_ADD_TO_BLACK_LIST_NORMAL(current, source); \
+            goto exit_label; \
+          } \
+          gran_displ -= gran_offset; \
+          base -= obj_displ; \
+        } \
     } \
     GC_ASSERT(hhdr == GC_find_header(base)); \
     GC_ASSERT(gran_displ % BYTES_TO_GRANULES(hhdr -> hb_sz) == 0); \
     TRACE(source, GC_log_printf("GC:%u: passed validity tests\n", \
-                               (unsigned)GC_gc_no)); \
+                                (unsigned)GC_gc_no)); \
     SET_MARK_BIT_EXIT_IF_SET(hhdr, gran_displ, exit_label); \
     TRACE(source, GC_log_printf("GC:%u: previously unmarked\n", \
-                               (unsigned)GC_gc_no)); \
+                                (unsigned)GC_gc_no)); \
     TRACE_TARGET(base, \
-       GC_log_printf("GC:%u: marking %p from %p instead\n", (unsigned)GC_gc_no, \
-                     base, source)); \
+        GC_log_printf("GC:%u: marking %p from %p instead\n", \
+                      (unsigned)GC_gc_no, base, source)); \
     INCR_MARKS(hhdr); \
     GC_STORE_BACK_PTR((ptr_t)source, base); \
     PUSH_OBJ(base, hhdr, mark_stack_top, mark_stack_limit); \
@@ -306,7 +310,7 @@ exit_label: ; \
 
 #ifdef MARK_BIT_PER_OBJ
 # define PUSH_CONTENTS_HDR(current, mark_stack_top, mark_stack_limit, \
-                          source, exit_label, hhdr, do_offset_check) \
+                           source, exit_label, hhdr, do_offset_check) \
 { \
     size_t displ = HBLKDISPL(current); /* Displacement in block; in bytes. */\
     unsigned32 low_prod, high_prod; \
@@ -315,48 +319,47 @@ exit_label: ; \
     LONG_MULT(high_prod, low_prod, displ, inv_sz); \
     /* product is > and within sz_in_bytes of displ * sz_in_bytes * 2**32 */ \
     if (EXPECT(low_prod >> 16 != 0, FALSE))  { \
-           FIXME: fails if offset is a multiple of HBLKSIZE which becomes 0 \
-       if (inv_sz == LARGE_INV_SZ) { \
-         size_t obj_displ; \
-         base = (ptr_t)(hhdr -> hb_block); \
-         obj_displ = (ptr_t)(current) - base;  \
-         if (obj_displ != displ) { \
-           GC_ASSERT(obj_displ < hhdr -> hb_sz); \
-           /* Must be in all_interior_pointer case, not first block */ \
-           /* already did validity check on cache miss.             */ \
-           ; \
-         } else { \
-           if (do_offset_check && !GC_valid_offsets[obj_displ]) { \
-             GC_ADD_TO_BLACK_LIST_NORMAL(current, source); \
-             goto exit_label; \
-           } \
-         } \
-         GC_ASSERT(hhdr -> hb_sz > HBLKSIZE || \
-                   hhdr -> hb_block == HBLKPTR(current)); \
-         GC_ASSERT((ptr_t)(hhdr -> hb_block) < (ptr_t) current); \
-       } else { \
-         /* Accurate enough if HBLKSIZE <= 2**15.      */ \
-         GC_STATIC_ASSERT(HBLKSIZE <= (1 << 15)); \
-         size_t obj_displ = (((low_prod >> 16) + 1) * (hhdr -> hb_sz)) >> 16; \
-         if (do_offset_check && !GC_valid_offsets[obj_displ]) { \
-           GC_ADD_TO_BLACK_LIST_NORMAL(current, source); \
-           goto exit_label; \
-         } \
-         base -= obj_displ; \
-       } \
+            FIXME: fails if offset is a multiple of HBLKSIZE which becomes 0 \
+        if (inv_sz == LARGE_INV_SZ) { \
+          size_t obj_displ; \
+          base = (ptr_t)(hhdr -> hb_block); \
+          obj_displ = (ptr_t)(current) - base;  \
+          if (obj_displ != displ) { \
+            GC_ASSERT(obj_displ < hhdr -> hb_sz); \
+            /* Must be in all_interior_pointer case, not first block */ \
+            /* already did validity check on cache miss.             */ \
+          } else { \
+            if (do_offset_check && !GC_valid_offsets[obj_displ]) { \
+              GC_ADD_TO_BLACK_LIST_NORMAL(current, source); \
+              goto exit_label; \
+            } \
+          } \
+          GC_ASSERT(hhdr -> hb_sz > HBLKSIZE || \
+                    hhdr -> hb_block == HBLKPTR(current)); \
+          GC_ASSERT((ptr_t)(hhdr -> hb_block) < (ptr_t) current); \
+        } else { \
+          /* Accurate enough if HBLKSIZE <= 2**15.      */ \
+          GC_STATIC_ASSERT(HBLKSIZE <= (1 << 15)); \
+          size_t obj_displ = (((low_prod >> 16) + 1) * (hhdr->hb_sz)) >> 16; \
+          if (do_offset_check && !GC_valid_offsets[obj_displ]) { \
+            GC_ADD_TO_BLACK_LIST_NORMAL(current, source); \
+            goto exit_label; \
+          } \
+          base -= obj_displ; \
+        } \
     } \
-    /* May get here for pointer to start of block not at       */ \
+    /* May get here for pointer to start of block not at        */ \
     /* beginning of object.  If so, it's valid, and we're fine. */ \
     GC_ASSERT(high_prod >= 0 && high_prod <= HBLK_OBJS(hhdr -> hb_sz)); \
     TRACE(source, GC_log_printf("GC:%u: passed validity tests\n", \
-                               (unsigned)GC_gc_no)); \
+                                (unsigned)GC_gc_no)); \
     SET_MARK_BIT_EXIT_IF_SET(hhdr, high_prod, exit_label); \
     TRACE(source, GC_log_printf("GC:%u: previously unmarked\n", \
-                               (unsigned)GC_gc_no)); \
+                                (unsigned)GC_gc_no)); \
     TRACE_TARGET(base, \
-       GC_log_printf("GC:%u: marking %p from %p instead\n", \
-                     (unsigned)GC_gc_no, \
-                     base, source)); \
+        GC_log_printf("GC:%u: marking %p from %p instead\n", \
+                      (unsigned)GC_gc_no, \
+                      base, source)); \
     INCR_MARKS(hhdr); \
     GC_STORE_BACK_PTR((ptr_t)source, base); \
     PUSH_OBJ(base, hhdr, mark_stack_top, mark_stack_limit); \
@@ -364,11 +367,11 @@ exit_label: ; \
 #endif /* MARK_BIT_PER_OBJ */
 
 #if defined(PRINT_BLACK_LIST) || defined(KEEP_BACK_PTRS)
-#   define PUSH_ONE_CHECKED_STACK(p, source) \
-       GC_mark_and_push_stack((ptr_t)(p), (ptr_t)(source))
+# define PUSH_ONE_CHECKED_STACK(p, source) \
+        GC_mark_and_push_stack((ptr_t)(p), (ptr_t)(source))
 #else
-#   define PUSH_ONE_CHECKED_STACK(p, source) \
-       GC_mark_and_push_stack((ptr_t)(p))
+# define PUSH_ONE_CHECKED_STACK(p, source) \
+        GC_mark_and_push_stack((ptr_t)(p))
 #endif
 
 /*
@@ -379,61 +382,61 @@ exit_label: ; \
  * if the mark stack overflows.
  */
 
-# if NEED_FIXUP_POINTER
-    /* Try both the raw version and the fixed up one.  */
-#   define GC_PUSH_ONE_STACK(p, source) \
-      if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr    \
-        && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {      \
-        PUSH_ONE_CHECKED_STACK(p, source);     \
+#if NEED_FIXUP_POINTER
+    /* Try both the raw version and the fixed up one.   */
+# define GC_PUSH_ONE_STACK(p, source) \
+      if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr     \
+         && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {      \
+         PUSH_ONE_CHECKED_STACK(p, source);     \
       } \
       FIXUP_POINTER(p); \
-      if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr    \
-        && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {      \
-        PUSH_ONE_CHECKED_STACK(p, source);     \
+      if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr     \
+         && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {      \
+         PUSH_ONE_CHECKED_STACK(p, source);     \
       }
-# else /* !NEED_FIXUP_POINTER */
-#   define GC_PUSH_ONE_STACK(p, source) \
-      if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr    \
-        && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {      \
-        PUSH_ONE_CHECKED_STACK(p, source);     \
+#else /* !NEED_FIXUP_POINTER */
+# define GC_PUSH_ONE_STACK(p, source) \
+      if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr     \
+         && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {      \
+         PUSH_ONE_CHECKED_STACK(p, source);     \
       }
-# endif
+#endif
 
 
 /*
  * As above, but interior pointer recognition as for
  * normal heap pointers.
  */
-# define GC_PUSH_ONE_HEAP(p,source) \
+#define GC_PUSH_ONE_HEAP(p,source) \
     FIXUP_POINTER(p); \
-    if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr      \
-        && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {      \
-           GC_mark_stack_top = GC_mark_and_push( \
-                           (void *)(p), GC_mark_stack_top, \
-                           GC_mark_stack_limit, (void * *)(source)); \
+    if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr       \
+         && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {      \
+            GC_mark_stack_top = GC_mark_and_push( \
+                            (void *)(p), GC_mark_stack_top, \
+                            GC_mark_stack_limit, (void * *)(source)); \
     }
 
-/* Mark starting at mark stack entry top (incl.) down to       */
-/* mark stack entry bottom (incl.).  Stop after performing     */
-/* about one page worth of work.  Return the new mark stack    */
-/* top entry.                                                  */
-mse * GC_mark_from(mse * top, mse * bottom, mse *limit);
+/* Mark starting at mark stack entry top (incl.) down to        */
+/* mark stack entry bottom (incl.).  Stop after performing      */
+/* about one page worth of work.  Return the new mark stack     */
+/* top entry.                                                   */
+GC_INNER mse * GC_mark_from(mse * top, mse * bottom, mse *limit);
 
 #define MARK_FROM_MARK_STACK() \
-       GC_mark_stack_top = GC_mark_from(GC_mark_stack_top, \
-                                        GC_mark_stack, \
-                                        GC_mark_stack + GC_mark_stack_size);
+        GC_mark_stack_top = GC_mark_from(GC_mark_stack_top, \
+                                         GC_mark_stack, \
+                                         GC_mark_stack + GC_mark_stack_size);
 
 /*
  * Mark from one finalizable object using the specified
- * mark proc. May not mark the object pointed to by 
+ * mark proc. May not mark the object pointed to by
  * real_ptr. That is the job of the caller, if appropriate.
  * Note that this is called with the mutator running, but
  * with us holding the allocation lock.  This is safe only if the
  * mutator needs the allocation lock to reveal hidden pointers.
  * FIXME: Why do we need the GC_mark_state test below?
  */
-# define GC_MARK_FO(real_ptr, mark_proc) \
+#define GC_MARK_FO(real_ptr, mark_proc) \
 { \
     (*(mark_proc))(real_ptr); \
     while (!GC_mark_stack_empty()) MARK_FROM_MARK_STACK(); \
@@ -443,51 +446,49 @@ mse * GC_mark_from(mse * top, mse * bottom, mse *limit);
     } \
 }
 
-extern GC_bool GC_mark_stack_too_small;
-                               /* We need a larger mark stack.  May be */
-                               /* set by client supplied mark routines.*/
+GC_EXTERN GC_bool GC_mark_stack_too_small;
+                                /* We need a larger mark stack.  May be */
+                                /* set by client supplied mark routines.*/
 
-typedef int mark_state_t;      /* Current state of marking, as follows:*/
-                               /* Used to remember where we are during */
-                               /* concurrent marking.                  */
+typedef int mark_state_t;       /* Current state of marking, as follows:*/
+                                /* Used to remember where we are during */
+                                /* concurrent marking.                  */
 
-                               /* We say something is dirty if it was  */
-                               /* written since the last time we       */
-                               /* retrieved dirty bits.  We say it's   */
-                               /* grungy if it was marked dirty in the */
-                               /* last set of bits we retrieved.       */
-                               
-                               /* Invariant I: all roots and marked    */
-                               /* objects p are either dirty, or point */
-                               /* to objects q that are either marked  */
-                               /* or a pointer to q appears in a range */
-                               /* on the mark stack.                   */
+                                /* We say something is dirty if it was  */
+                                /* written since the last time we       */
+                                /* retrieved dirty bits.  We say it's   */
+                                /* grungy if it was marked dirty in the */
+                                /* last set of bits we retrieved.       */
 
-# define MS_NONE 0             /* No marking in progress. I holds.     */
-                               /* Mark stack is empty.                 */
+                                /* Invariant I: all roots and marked    */
+                                /* objects p are either dirty, or point */
+                                /* to objects q that are either marked  */
+                                /* or a pointer to q appears in a range */
+                                /* on the mark stack.                   */
 
-# define MS_PUSH_RESCUERS 1    /* Rescuing objects are currently       */
-                               /* being pushed.  I holds, except       */
-                               /* that grungy roots may point to       */
-                               /* unmarked objects, as may marked      */
-                               /* grungy objects above scan_ptr.       */
+#define MS_NONE 0               /* No marking in progress. I holds.     */
+                                /* Mark stack is empty.                 */
 
-# define MS_PUSH_UNCOLLECTABLE 2
-                               /* I holds, except that marked          */
-                               /* uncollectable objects above scan_ptr */
-                               /* may point to unmarked objects.       */
-                               /* Roots may point to unmarked objects  */
+#define MS_PUSH_RESCUERS 1      /* Rescuing objects are currently       */
+                                /* being pushed.  I holds, except       */
+                                /* that grungy roots may point to       */
+                                /* unmarked objects, as may marked      */
+                                /* grungy objects above scan_ptr.       */
 
-# define MS_ROOTS_PUSHED 3     /* I holds, mark stack may be nonempty  */
+#define MS_PUSH_UNCOLLECTABLE 2 /* I holds, except that marked          */
+                                /* uncollectable objects above scan_ptr */
+                                /* may point to unmarked objects.       */
+                                /* Roots may point to unmarked objects  */
 
-# define MS_PARTIALLY_INVALID 4        /* I may not hold, e.g. because of M.S. */
-                               /* overflow.  However marked heap       */
-                               /* objects below scan_ptr point to      */
-                               /* marked or stacked objects.           */
+#define MS_ROOTS_PUSHED 3       /* I holds, mark stack may be nonempty  */
 
-# define MS_INVALID 5          /* I may not hold.                      */
+#define MS_PARTIALLY_INVALID 4  /* I may not hold, e.g. because of M.S. */
+                                /* overflow.  However marked heap       */
+                                /* objects below scan_ptr point to      */
+                                /* marked or stacked objects.           */
 
-extern mark_state_t GC_mark_state;
+#define MS_INVALID 5            /* I may not hold.                      */
 
-#endif  /* GC_PMARK_H */
+GC_EXTERN mark_state_t GC_mark_state;
 
+#endif  /* GC_PMARK_H */
index 520c791083c9bf4b85887c6a16c0206e04b507cd..71f6b7a04a5b475d661c8c2cad0e55f8cc01c164 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
  * provided the above notices are retained, and a notice that the code was
  * modified is included with the above copyright notice.
  */
 
-# ifndef GC_PRIVATE_H
-# define GC_PRIVATE_H
+#ifndef GC_PRIVATE_H
+#define GC_PRIVATE_H
+
+#ifdef HAVE_CONFIG_H
+# include "private/config.h"
+#endif
+
+#ifndef GC_BUILD
+# define GC_BUILD
+#endif
+
+#if (defined(__linux__) || defined(__GLIBC__) || defined(__GNU__)) \
+    && !defined(_GNU_SOURCE)
+  /* Can't test LINUX, since this must be defined before other includes. */
+# define _GNU_SOURCE
+#endif
 
-# include <stdlib.h>
-# if !(defined( sony_news ) )
-#   include <stddef.h>
+#if (defined(DGUX) && defined(GC_THREADS) || defined(DGUX386_THREADS) \
+     || defined(GC_DGUX386_THREADS)) && !defined(_USING_POSIX4A_DRAFT10)
+# define _USING_POSIX4A_DRAFT10 1
+#endif
+
+# if defined(NO_DEBUGGING) && !defined(GC_ASSERTIONS) && !defined(NDEBUG)
+    /* To turn off assertion checking (in atomic_ops.h). */
+#   define NDEBUG 1
 # endif
 
+#ifndef GC_H
+# define GC_I_HIDE_POINTERS /* to get GC_HIDE_POINTER() and friends */
+# include "../gc.h"
+#endif
+
+#include <stdlib.h>
+#if !defined(sony_news)
+# include <stddef.h>
+#endif
+
 #ifdef DGUX
-#   include <sys/types.h>
-#   include <sys/time.h>
-#   include <sys/resource.h>
+# include <sys/types.h>
+# include <sys/time.h>
+# include <sys/resource.h>
 #endif /* DGUX */
 
 #ifdef BSD_TIME
-#   include <sys/types.h>
-#   include <sys/time.h>
-#   include <sys/resource.h>
+# include <sys/types.h>
+# include <sys/time.h>
+# include <sys/resource.h>
 #endif /* BSD_TIME */
 
 #ifdef PARALLEL_MARK
-#   define AO_REQUIRE_CAS
-#endif
-
-#ifndef _GC_H
-#   include "../gc.h"
+# define AO_REQUIRE_CAS
+# if !defined(__GNUC__) && !defined(AO_ASSUME_WINDOWS98)
+#   define AO_ASSUME_WINDOWS98
+# endif
 #endif
 
 #ifndef GC_TINY_FL_H
-#   include "../gc_tiny_fl.h"
+# include "../gc_tiny_fl.h"
 #endif
 
 #ifndef GC_MARK_H
-#   include "../gc_mark.h"
+# include "../gc_mark.h"
 #endif
 
 typedef GC_word word;
@@ -57,21 +84,52 @@ typedef GC_signed_word signed_word;
 typedef unsigned int unsigned32;
 
 typedef int GC_bool;
-# define TRUE 1
-# define FALSE 0
+#define TRUE 1
+#define FALSE 0
 
-typedef char * ptr_t;  /* A generic pointer to which we can add        */
-                       /* byte displacements and which can be used     */
-                       /* for address comparisons.                     */
+typedef char * ptr_t;   /* A generic pointer to which we can add        */
+                        /* byte displacements and which can be used     */
+                        /* for address comparisons.                     */
 
-# ifndef GCCONFIG_H
-#   include "gcconfig.h"
-# endif
+#ifndef GCCONFIG_H
+# include "gcconfig.h"
+#endif
 
-# ifndef HEADERS_H
-#   include "gc_hdrs.h"
+#ifndef GC_INNER
+  /* This tagging macro must be used at the start of every variable     */
+  /* definition which is declared with GC_EXTERN.  Should be also used  */
+  /* for the GC-scope function definitions and prototypes.  Must not be */
+  /* used in gcconfig.h.  Shouldn't be used for the debugging-only      */
+  /* functions.  Currently, not used for the functions declared in or   */
+  /* called from the "dated" source files (pcr_interface.c, specific.c  */
+  /* and in the "extra" folder).                                        */
+# if defined(GC_DLL) && defined(__GNUC__) && !defined(MSWIN32) \
+        && !defined(MSWINCE)
+#   if __GNUC__ >= 4
+      /* See the corresponding GC_API definition. */
+#     define GC_INNER __attribute__((__visibility__("hidden")))
+#   else
+      /* The attribute is unsupported. */
+#     define GC_INNER /* empty */
+#   endif
+# else
+#   define GC_INNER /* empty */
 # endif
 
+# define GC_EXTERN extern GC_INNER
+  /* Used only for the GC-scope variables (prefixed with "GC_")         */
+  /* declared in the header files.  Must not be used for thread-local   */
+  /* variables.  Must not be used in gcconfig.h.  Shouldn't be used for */
+  /* the debugging-only or profiling-only variables.  Currently, not    */
+  /* used for the variables accessed from the "dated" source files      */
+  /* (pcr_interface.c, specific.c/h, and in the "extra" folder).        */
+  /* The corresponding variable definition must start with GC_INNER.    */
+#endif /* !GC_INNER */
+
+#ifndef HEADERS_H
+# include "gc_hdrs.h"
+#endif
+
 #if __GNUC__ >= 3
 # define EXPECT(expr, outcome) __builtin_expect(expr,outcome)
   /* Equivalent to (expr), but predict that usually (expr)==outcome. */
@@ -79,21 +137,28 @@ typedef char * ptr_t;      /* A generic pointer to which we can add        */
 # define EXPECT(expr, outcome) (expr)
 #endif /* __GNUC__ */
 
-#if __GNUC__ >= 3
-# define INLINE inline
+#if defined(_MSC_VER) || defined(__INTEL_COMPILER) || defined(__DMC__) \
+        || defined(__WATCOMC__)
+# define GC_INLINE static __inline
+#elif (__GNUC__ >= 3) || defined(__sun)
+# define GC_INLINE static inline
 #else
-# define INLINE
-#endif /* __GNUC__ */
+# define GC_INLINE static
+#endif
 
-# ifndef GC_LOCKS_H
-#   include "gc_locks.h"
-# endif
+#ifndef GC_API_PRIV
+# define GC_API_PRIV GC_API
+#endif
+
+#ifndef GC_LOCKS_H
+# include "gc_locks.h"
+#endif
 
 # ifdef STACK_GROWS_DOWN
 #   define COOLER_THAN >
 #   define HOTTER_THAN <
 #   define MAKE_COOLER(x,y) if ((x)+(y) > (x)) {(x) += (y);} \
-                           else {(x) = (ptr_t)ONES;}
+                            else {(x) = (ptr_t)ONES;}
 #   define MAKE_HOTTER(x,y) (x) -= (y)
 # else
 #   define COOLER_THAN <
@@ -123,37 +188,37 @@ typedef char * ptr_t;     /* A generic pointer to which we can add        */
 /*********************************/
 
 /* #define STUBBORN_ALLOC */
-                   /* Enable stubborn allocation, and thus a limited   */
-                   /* form of incremental collection w/o dirty bits.   */
+                    /* Enable stubborn allocation, and thus a limited   */
+                    /* form of incremental collection w/o dirty bits.   */
 
 /* #define ALL_INTERIOR_POINTERS */
-                   /* Forces all pointers into the interior of an      */
-                   /* object to be considered valid.  Also causes the  */
-                   /* sizes of all objects to be inflated by at least  */
-                   /* one byte.  This should suffice to guarantee      */
-                   /* that in the presence of a compiler that does     */
-                   /* not perform garbage-collector-unsafe             */
-                   /* optimizations, all portable, strictly ANSI       */
-                   /* conforming C programs should be safely usable    */
-                   /* with malloc replaced by GC_malloc and free       */
-                   /* calls removed.  There are several disadvantages: */
-                   /* 1. There are probably no interesting, portable,  */
-                   /*    strictly ANSI conforming C programs.          */
-                   /* 2. This option makes it hard for the collector   */
-                   /*    to allocate space that is not ``pointed to''  */
-                   /*    by integers, etc.  Under SunOS 4.X with a     */
-                   /*    statically linked libc, we empirically        */
-                   /*    observed that it would be difficult to        */
-                   /*    allocate individual objects larger than 100K. */
-                   /*    Even if only smaller objects are allocated,   */
-                   /*    more swap space is likely to be needed.       */
-                   /*    Fortunately, much of this will never be       */
-                   /*    touched.                                      */
-                   /* If you can easily avoid using this option, do.   */
-                   /* If not, try to keep individual objects small.    */
-                   /* This is now really controlled at startup,        */
-                   /* through GC_all_interior_pointers.                */
-                   
+                    /* Forces all pointers into the interior of an      */
+                    /* object to be considered valid.  Also causes the  */
+                    /* sizes of all objects to be inflated by at least  */
+                    /* one byte.  This should suffice to guarantee      */
+                    /* that in the presence of a compiler that does     */
+                    /* not perform garbage-collector-unsafe             */
+                    /* optimizations, all portable, strictly ANSI       */
+                    /* conforming C programs should be safely usable    */
+                    /* with malloc replaced by GC_malloc and free       */
+                    /* calls removed.  There are several disadvantages: */
+                    /* 1. There are probably no interesting, portable,  */
+                    /*    strictly ANSI conforming C programs.          */
+                    /* 2. This option makes it hard for the collector   */
+                    /*    to allocate space that is not ``pointed to''  */
+                    /*    by integers, etc.  Under SunOS 4.X with a     */
+                    /*    statically linked libc, we empirically        */
+                    /*    observed that it would be difficult to        */
+                    /*    allocate individual objects larger than 100K. */
+                    /*    Even if only smaller objects are allocated,   */
+                    /*    more swap space is likely to be needed.       */
+                    /*    Fortunately, much of this will never be       */
+                    /*    touched.                                      */
+                    /* If you can easily avoid using this option, do.   */
+                    /* If not, try to keep individual objects small.    */
+                    /* This is now really controlled at startup,        */
+                    /* through GC_all_interior_pointers.                */
+
 
 #define GC_INVOKE_FINALIZERS() GC_notify_or_invoke_finalizers()
 
@@ -167,8 +232,8 @@ typedef char * ptr_t;       /* A generic pointer to which we can add        */
 
 
 # ifndef LARGE_CONFIG
-#   define MINHINCR 16  /* Minimum heap increment, in blocks of HBLKSIZE  */
-                        /* Must be multiple of largest page size.         */
+#   define MINHINCR 16   /* Minimum heap increment, in blocks of HBLKSIZE  */
+                         /* Must be multiple of largest page size.         */
 #   define MAXHINCR 2048 /* Maximum heap increment, in blocks              */
 # else
 #   define MINHINCR 64
@@ -176,50 +241,47 @@ typedef char * ptr_t;     /* A generic pointer to which we can add        */
 # endif
 
 # define BL_LIMIT GC_black_list_spacing
-                          /* If we need a block of N bytes, and we have */
-                          /* a block of N + BL_LIMIT bytes available,   */
-                          /* and N > BL_LIMIT,                          */
-                          /* but all possible positions in it are       */
-                          /* blacklisted, we just use it anyway (and    */
-                          /* print a warning, if warnings are enabled). */
-                          /* This risks subsequently leaking the block  */
-                          /* due to a false reference.  But not using   */
-                          /* the block risks unreasonable immediate     */
-                          /* heap growth.                               */
+                           /* If we need a block of N bytes, and we have */
+                           /* a block of N + BL_LIMIT bytes available,   */
+                           /* and N > BL_LIMIT,                          */
+                           /* but all possible positions in it are       */
+                           /* blacklisted, we just use it anyway (and    */
+                           /* print a warning, if warnings are enabled). */
+                           /* This risks subsequently leaking the block  */
+                           /* due to a false reference.  But not using   */
+                           /* the block risks unreasonable immediate     */
+                           /* heap growth.                               */
 
 /*********************************/
 /*                               */
-/* Stack saving for debugging   */
+/* Stack saving for debugging    */
 /*                               */
 /*********************************/
 
 #ifdef NEED_CALLINFO
     struct callinfo {
-       word ci_pc;     /* Caller, not callee, pc       */
-#      if NARGS > 0
-           word ci_arg[NARGS]; /* bit-wise complement to avoid retention */
-#      endif
-#      if (NFRAMES * (NARGS + 1)) % 2 == 1
-           /* Likely alignment problem. */
-           word ci_dummy;
-#      endif
+        word ci_pc;     /* Caller, not callee, pc       */
+#       if NARGS > 0
+            word ci_arg[NARGS]; /* bit-wise complement to avoid retention */
+#       endif
+#       if (NFRAMES * (NARGS + 1)) % 2 == 1
+            /* Likely alignment problem. */
+            word ci_dummy;
+#       endif
     };
 #endif
 
 #ifdef SAVE_CALL_CHAIN
-
-/* Fill in the pc and argument information for up to NFRAMES of my     */
-/* callers.  Ignore my frame and my callers frame.                     */
-void GC_save_callers(struct callinfo info[NFRAMES]);
-  
-void GC_print_callers(struct callinfo info[NFRAMES]);
-
+  /* Fill in the pc and argument information for up to NFRAMES of my    */
+  /* callers.  Ignore my frame and my callers frame.                    */
+  GC_INNER void GC_save_callers(struct callinfo info[NFRAMES]);
+  GC_INNER void GC_print_callers(struct callinfo info[NFRAMES]);
 #endif
 
 
 /*********************************/
 /*                               */
-/* OS interface routines        */
+/* OS interface routines         */
 /*                               */
 /*********************************/
 
@@ -229,10 +291,10 @@ void GC_print_callers(struct callinfo info[NFRAMES]);
 #   undef MS_TIME_DIFF
 #   define CLOCK_TYPE struct timeval
 #   define GET_TIME(x) { struct rusage rusage; \
-                        getrusage (RUSAGE_SELF,  &rusage); \
-                        x = rusage.ru_utime; }
+                         getrusage (RUSAGE_SELF,  &rusage); \
+                         x = rusage.ru_utime; }
 #   define MS_TIME_DIFF(a,b) \
-               ((unsigned long)((double) (a.tv_sec - b.tv_sec) * 1000.0 \
+                ((unsigned long)((double) (a.tv_sec - b.tv_sec) * 1000.0 \
                                + (double) (a.tv_usec - b.tv_usec) / 1000.0))
 #else /* !BSD_TIME */
 # if defined(MSWIN32) || defined(MSWINCE)
@@ -244,7 +306,7 @@ void GC_print_callers(struct callinfo info[NFRAMES]);
 # else /* !MSWIN32, !MSWINCE, !BSD_TIME */
 #   include <time.h>
 #   if !defined(__STDC__) && defined(SPARC) && defined(SUNOS4)
-      clock_t clock(void);     /* Not in time.h, where it belongs      */
+      clock_t clock(void);      /* Not in time.h, where it belongs      */
 #   endif
 #   if defined(FREEBSD) && !defined(CLOCKS_PER_SEC)
 #     include <machine/limits.h>
@@ -257,7 +319,7 @@ void GC_print_callers(struct callinfo info[NFRAMES]);
  * CLOCKS_PER_SEC be defined.  But at least under SunOS4.1.1, it isn't.
  * Also note that the combination of ANSI C and POSIX is incredibly gross
  * here. The type clock_t is used by both clock() and times().  But on
- * some machines these use different notions of a clock tick,  CLOCKS_PER_SEC
+ * some machines these use different notions of a clock tick, CLOCKS_PER_SEC
  * seems to apply only to clock.  Hence we use it here.  On many machines,
  * including SunOS, clock actually uses units of microseconds (which are
  * not really clock ticks).
@@ -266,11 +328,11 @@ void GC_print_callers(struct callinfo info[NFRAMES]);
 #   define CLOCK_TYPE clock_t
 #   define GET_TIME(x) x = clock()
 #   define MS_TIME_DIFF(a,b) ((unsigned long) \
-               (1000.0*(double)((a)-(b))/(double)CLOCKS_PER_SEC))
+                (1000.0*(double)((a)-(b))/(double)CLOCKS_PER_SEC))
 # endif /* !MSWIN32 */
 #endif /* !BSD_TIME */
 
-/* We use bzero and bcopy internally.  They may not be available.      */
+/* We use bzero and bcopy internally.  They may not be available.       */
 # if defined(SPARC) && defined(SUNOS4)
 #   define BCOPY_EXISTS
 # endif
@@ -307,21 +369,22 @@ void GC_print_callers(struct callinfo info[NFRAMES]);
 # ifdef PCR
 #     include "th/PCR_ThCtl.h"
 #     define STOP_WORLD() \
-       PCR_ThCtl_SetExclusiveMode(PCR_ThCtl_ExclusiveMode_stopNormal, \
-                                  PCR_allSigsBlocked, \
-                                  PCR_waitForever)
+        PCR_ThCtl_SetExclusiveMode(PCR_ThCtl_ExclusiveMode_stopNormal, \
+                                   PCR_allSigsBlocked, \
+                                   PCR_waitForever)
 #     define START_WORLD() \
-       PCR_ThCtl_SetExclusiveMode(PCR_ThCtl_ExclusiveMode_null, \
-                                  PCR_allSigsBlocked, \
-                                  PCR_waitForever);
+        PCR_ThCtl_SetExclusiveMode(PCR_ThCtl_ExclusiveMode_null, \
+                                   PCR_allSigsBlocked, \
+                                   PCR_waitForever);
 # else
 #   if defined(GC_WIN32_THREADS) || defined(GC_PTHREADS)
-      void GC_stop_world(void);
-      void GC_start_world(void);
+      GC_INNER void GC_stop_world(void);
+      GC_INNER void GC_start_world(void);
 #     define STOP_WORLD() GC_stop_world()
 #     define START_WORLD() GC_start_world()
 #   else
-#     define STOP_WORLD()
+        /* Just do a sanity check: we are not inside GC_do_blocking().  */
+#     define STOP_WORLD() GC_ASSERT(GC_blocked_sp == NULL)
 #     define START_WORLD()
 #   endif
 # endif
@@ -330,14 +393,23 @@ void GC_print_callers(struct callinfo info[NFRAMES]);
 # ifdef PCR
 #   define ABORT(s) PCR_Base_Panic(s)
 # else
+#   if defined(MSWINCE) && !defined(DebugBreak) \
+       && (!defined(UNDER_CE) || (defined(__MINGW32CE__) && !defined(ARM32)))
+      /* This simplifies linking for WinCE (and, probably, doesn't      */
+      /* hurt debugging much); use -DDebugBreak=DebugBreak to override  */
+      /* this behavior if really needed.  This is also a workaround for */
+      /* x86mingw32ce toolchain (if it is still declaring DebugBreak()  */
+      /* instead of defining it as a macro).                            */
+#     define DebugBreak() _exit(-1) /* there is no abort() in WinCE */
+#   endif
 #   ifdef SMALL_CONFIG
-#      if defined(MSWIN32) || defined(MSWINCE)
-#          define ABORT(msg) DebugBreak()
-#      else
-#          define ABORT(msg) abort()
-#      endif
+#       if defined(MSWIN32) || defined(MSWINCE)
+#           define ABORT(msg) DebugBreak()
+#       else
+#           define ABORT(msg) abort()
+#       endif
 #   else
-       GC_API void GC_abort(const char * msg);
+        GC_API_PRIV void GC_abort(const char * msg);
 #       define ABORT(msg) GC_abort(msg)
 #   endif
 # endif
@@ -349,21 +421,42 @@ void GC_print_callers(struct callinfo info[NFRAMES]);
 #   define EXIT() (void)exit(1)
 # endif
 
-/* Print warning message, e.g. almost out of memory.   */
-# define WARN(msg,arg) (*GC_current_warn_proc)("GC Warning: " msg, (GC_word)(arg))
-extern GC_warn_proc GC_current_warn_proc;
+/* Print warning message, e.g. almost out of memory.    */
+#define WARN(msg, arg) (*GC_current_warn_proc)("GC Warning: " msg, \
+                                               (GC_word)(arg))
+GC_EXTERN GC_warn_proc GC_current_warn_proc;
+
+/* Print format type macro for signed_word.  Currently used for WARN()  */
+/* only.  This could be of use on Win64 but commented out since Win64   */
+/* is only a little-endian architecture (for now) and the WARN format   */
+/* string is, possibly, processed on the client side, so non-standard   */
+/* print type modifiers should be avoided (if possible).                */
+#if defined(_MSC_VER) && defined(_WIN64) && !defined(GC_PRIdPTR)
+/* #define GC_PRIdPTR "I64d" */
+#endif
+
+#if !defined(GC_PRIdPTR) && (defined(_LLP64) || defined(__LLP64__) \
+        || defined(_WIN64))
+/* #include <inttypes.h> */
+/* #define GC_PRIdPTR PRIdPTR */
+#endif
+
+#ifndef GC_PRIdPTR
+  /* Assume sizeof(void *) == sizeof(long) (or a little-endian machine) */
+# define GC_PRIdPTR "ld"
+#endif
 
 /* Get environment entry */
 #if !defined(NO_GETENV)
 #   if defined(EMPTY_GETENV_RESULTS)
-       /* Workaround for a reputed Wine bug.   */
-       static inline char * fixed_getenv(const char *name)
-       {
-         char * tmp = getenv(name);
-         if (tmp == 0 || strlen(tmp) == 0)
-           return 0;
-         return tmp;
-       }
+        /* Workaround for a reputed Wine bug.   */
+        GC_INLINE char * fixed_getenv(const char *name)
+        {
+          char * tmp = getenv(name);
+          if (tmp == 0 || strlen(tmp) == 0)
+            return 0;
+          return tmp;
+        }
 #       define GETENV(name) fixed_getenv(name)
 #   else
 #       define GETENV(name) getenv(name)
@@ -373,55 +466,55 @@ extern GC_warn_proc GC_current_warn_proc;
 #endif
 
 #if defined(DARWIN)
-#      if defined(POWERPC)
-#              if CPP_WORDSZ == 32
+#       if defined(POWERPC)
+#               if CPP_WORDSZ == 32
 #                 define GC_THREAD_STATE_T ppc_thread_state_t
-#                define GC_MACH_THREAD_STATE PPC_THREAD_STATE
-#                define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT
-#                define GC_MACH_HEADER mach_header
-#                define GC_MACH_SECTION section
+#                 define GC_MACH_THREAD_STATE PPC_THREAD_STATE
+#                 define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT
+#                 define GC_MACH_HEADER mach_header
+#                 define GC_MACH_SECTION section
 #                 define GC_GETSECTBYNAME getsectbynamefromheader
-#              else
+#               else
 #                 define GC_THREAD_STATE_T ppc_thread_state64_t
-#                define GC_MACH_THREAD_STATE PPC_THREAD_STATE64
-#                define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE64_COUNT
-#                define GC_MACH_HEADER mach_header_64
-#                define GC_MACH_SECTION section_64
+#                 define GC_MACH_THREAD_STATE PPC_THREAD_STATE64
+#                 define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE64_COUNT
+#                 define GC_MACH_HEADER mach_header_64
+#                 define GC_MACH_SECTION section_64
 #                 define GC_GETSECTBYNAME getsectbynamefromheader_64
-#              endif
-#      elif defined(I386) || defined(X86_64)
+#               endif
+#       elif defined(I386) || defined(X86_64)
 #               if CPP_WORDSZ == 32
-#                define GC_THREAD_STATE_T x86_thread_state32_t
-#                define GC_MACH_THREAD_STATE x86_THREAD_STATE32
-#                define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE32_COUNT
-#                define GC_MACH_HEADER mach_header
-#                define GC_MACH_SECTION section
+#                 define GC_THREAD_STATE_T x86_thread_state32_t
+#                 define GC_MACH_THREAD_STATE x86_THREAD_STATE32
+#                 define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE32_COUNT
+#                 define GC_MACH_HEADER mach_header
+#                 define GC_MACH_SECTION section
 #                 define GC_GETSECTBYNAME getsectbynamefromheader
 #               else
-#                define GC_THREAD_STATE_T x86_thread_state64_t
-#                define GC_MACH_THREAD_STATE x86_THREAD_STATE64
-#                define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE64_COUNT
-#                define GC_MACH_HEADER mach_header_64
-#                define GC_MACH_SECTION section_64
+#                 define GC_THREAD_STATE_T x86_thread_state64_t
+#                 define GC_MACH_THREAD_STATE x86_THREAD_STATE64
+#                 define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE64_COUNT
+#                 define GC_MACH_HEADER mach_header_64
+#                 define GC_MACH_SECTION section_64
 #                 define GC_GETSECTBYNAME getsectbynamefromheader_64
 #               endif
-#      else
-#              if defined(ARM32)
-#                define GC_THREAD_STATE_T arm_thread_state_t
-#              else
-#                error define GC_THREAD_STATE_T
-#              endif
-#              define GC_MACH_THREAD_STATE MACHINE_THREAD_STATE
-#              define GC_MACH_THREAD_STATE_COUNT MACHINE_THREAD_STATE_COUNT
-#      endif
+#       else
+#               if defined(ARM32)
+#                 define GC_THREAD_STATE_T arm_thread_state_t
+#               else
+#                 error define GC_THREAD_STATE_T
+#               endif
+#               define GC_MACH_THREAD_STATE MACHINE_THREAD_STATE
+#               define GC_MACH_THREAD_STATE_COUNT MACHINE_THREAD_STATE_COUNT
+#       endif
 /* Try to work out the right way to access thread state structure members.
    The structure has changed its definition in different Darwin versions.
    This now defaults to the (older) names without __, thus hopefully,
    not breaking any existing Makefile.direct builds.  */
 #       if defined (HAS_PPC_THREAD_STATE___R0) \
-         || defined (HAS_PPC_THREAD_STATE64___R0) \
-         || defined (HAS_X86_THREAD_STATE32___EAX) \
-         || defined (HAS_X86_THREAD_STATE64___RAX)
+          || defined (HAS_PPC_THREAD_STATE64___R0) \
+          || defined (HAS_X86_THREAD_STATE32___EAX) \
+          || defined (HAS_X86_THREAD_STATE64___RAX)
 #         define THREAD_FLD(x) __ ## x
 #       else
 #         define THREAD_FLD(x) x
@@ -438,9 +531,9 @@ extern GC_warn_proc GC_current_warn_proc;
 #  define WORDS_TO_BYTES(x)   ((x)<<2)
 #  define BYTES_TO_WORDS(x)   ((x)>>2)
 #  define LOGWL               ((word)5)    /* log[2] of CPP_WORDSZ */
-#  define modWORDSZ(n) ((n) & 0x1f)        /* n mod size of word           */
+#  define modWORDSZ(n) ((n) & 0x1f)        /* n mod size of word            */
 #  if ALIGNMENT != 4
-#      define UNALIGNED
+#       define UNALIGNED_PTRS
 #  endif
 #endif
 
@@ -448,17 +541,17 @@ extern GC_warn_proc GC_current_warn_proc;
 #  define WORDS_TO_BYTES(x)   ((x)<<3)
 #  define BYTES_TO_WORDS(x)   ((x)>>3)
 #  define LOGWL               ((word)6)    /* log[2] of CPP_WORDSZ */
-#  define modWORDSZ(n) ((n) & 0x3f)        /* n mod size of word           */
+#  define modWORDSZ(n) ((n) & 0x3f)        /* n mod size of word            */
 #  if ALIGNMENT != 8
-#      define UNALIGNED
+#       define UNALIGNED_PTRS
 #  endif
 #endif
 
-/* The first TINY_FREELISTS free lists correspond to the first */
-/* TINY_FREELISTS multiples of GRANULE_BYTES, i.e. we keep     */
-/* separate free lists for each multiple of GRANULE_BYTES      */
-/* up to (TINY_FREELISTS-1) * GRANULE_BYTES.  After that they  */
-/* may be spread out further.                                  */
+/* The first TINY_FREELISTS free lists correspond to the first  */
+/* TINY_FREELISTS multiples of GRANULE_BYTES, i.e. we keep      */
+/* separate free lists for each multiple of GRANULE_BYTES       */
+/* up to (TINY_FREELISTS-1) * GRANULE_BYTES.  After that they   */
+/* may be spread out further.                                   */
 #include "../gc_tiny_fl.h"
 #define GRANULE_BYTES GC_GRANULE_BYTES
 #define TINY_FREELISTS GC_TINY_FREELISTS
@@ -467,7 +560,7 @@ extern GC_warn_proc GC_current_warn_proc;
 #define SIGNB  ((word)1 << (WORDSZ-1))
 #define BYTES_PER_WORD      ((word)(sizeof (word)))
 #define ONES                ((word)(signed_word)(-1))
-#define divWORDSZ(n) ((n) >> LOGWL)       /* divide n by size of word      */
+#define divWORDSZ(n) ((n) >> LOGWL)     /* divide n by size of word */
 
 #if GRANULE_BYTES == 8
 # define BYTES_TO_GRANULES(n) ((n)>>3)
@@ -499,13 +592,13 @@ extern GC_warn_proc GC_current_warn_proc;
 /*                   */
 /*********************/
 
-/*  Heap block size, bytes. Should be power of 2.              */
-/* Incremental GC with MPROTECT_VDB currently requires the     */
-/* page size to be a multiple of HBLKSIZE.  Since most modern  */
-/* architectures support variable page sizes down to 4K, and   */
-/* X86 is generally 4K, we now default to 4K, except for       */
-/*   Alpha: Seems to be used with 8K pages.                    */
-/*   SMALL_CONFIG: Want less block-level fragmentation.                */
+/*  Heap block size, bytes. Should be power of 2.               */
+/* Incremental GC with MPROTECT_VDB currently requires the      */
+/* page size to be a multiple of HBLKSIZE.  Since most modern   */
+/* architectures support variable page sizes down to 4K, and    */
+/* X86 is generally 4K, we now default to 4K, except for        */
+/*   Alpha: Seems to be used with 8K pages.                     */
+/*   SMALL_CONFIG: Want less block-level fragmentation.         */
 
 #ifndef HBLKSIZE
 # ifdef SMALL_CONFIG
@@ -547,9 +640,9 @@ extern GC_warn_proc GC_current_warn_proc;
 # define HBLKSIZE ((size_t)CPP_HBLKSIZE)
 
 
-/*  max size objects supported by freelist (larger objects are */
+/*  max size objects supported by freelist (larger objects are  */
 /*  allocated directly with allchblk(), by rounding to the next */
-/*  multiple of HBLKSIZE.                                      */
+/*  multiple of HBLKSIZE.                                       */
 
 #define CPP_MAXOBJBYTES (CPP_HBLKSIZE/2)
 #define MAXOBJBYTES ((size_t)CPP_MAXOBJBYTES)
@@ -557,41 +650,40 @@ extern GC_warn_proc GC_current_warn_proc;
 #define MAXOBJWORDS ((size_t)CPP_MAXOBJWORDS)
 #define CPP_MAXOBJGRANULES BYTES_TO_GRANULES(CPP_MAXOBJBYTES)
 #define MAXOBJGRANULES ((size_t)CPP_MAXOBJGRANULES)
-               
+
 # define divHBLKSZ(n) ((n) >> LOG_HBLKSIZE)
 
 # define HBLK_PTR_DIFF(p,q) divHBLKSZ((ptr_t)p - (ptr_t)q)
-       /* Equivalent to subtracting 2 hblk pointers.   */
-       /* We do it this way because a compiler should  */
-       /* find it hard to use an integer division      */
-       /* instead of a shift.  The bundled SunOS 4.1   */
-       /* o.w. sometimes pessimizes the subtraction to */
-       /* involve a call to .div.                      */
+        /* Equivalent to subtracting 2 hblk pointers.   */
+        /* We do it this way because a compiler should  */
+        /* find it hard to use an integer division      */
+        /* instead of a shift.  The bundled SunOS 4.1   */
+        /* o.w. sometimes pessimizes the subtraction to */
+        /* involve a call to .div.                      */
+
 # define modHBLKSZ(n) ((n) & (HBLKSIZE-1))
+
 # define HBLKPTR(objptr) ((struct hblk *)(((word) (objptr)) & ~(HBLKSIZE-1)))
 
 # define HBLKDISPL(objptr) (((size_t) (objptr)) & (HBLKSIZE-1))
 
 /* Round up byte allocation requests to integral number of words, etc. */
 # define ROUNDED_UP_GRANULES(n) \
-       BYTES_TO_GRANULES((n) + (GRANULE_BYTES - 1 + EXTRA_BYTES))
+        BYTES_TO_GRANULES((n) + (GRANULE_BYTES - 1 + EXTRA_BYTES))
 # if MAX_EXTRA_BYTES == 0
 #  define SMALL_OBJ(bytes) EXPECT((bytes) <= (MAXOBJBYTES), 1)
 # else
 #  define SMALL_OBJ(bytes) \
-           (EXPECT((bytes) <= (MAXOBJBYTES - MAX_EXTRA_BYTES), 1) || \
-            (bytes) <= (MAXOBJBYTES - EXTRA_BYTES))
-       /* This really just tests bytes <= MAXOBJBYTES - EXTRA_BYTES.   */
-       /* But we try to avoid looking up EXTRA_BYTES.                  */
+            (EXPECT((bytes) <= (MAXOBJBYTES - MAX_EXTRA_BYTES), 1) || \
+             (bytes) <= (MAXOBJBYTES - EXTRA_BYTES))
+        /* This really just tests bytes <= MAXOBJBYTES - EXTRA_BYTES.   */
+        /* But we try to avoid looking up EXTRA_BYTES.                  */
 # endif
 # define ADD_SLOP(bytes) ((bytes) + EXTRA_BYTES)
 # ifndef MIN_WORDS
-#  define MIN_WORDS 2  /* FIXME: obsolete */
+#  define MIN_WORDS 2   /* FIXME: obsolete */
 # endif
 
-
 /*
  * Hash table representation of sets of pages.
  * Implements a map from aligned HBLKSIZE chunks of the address space to one
@@ -600,32 +692,32 @@ extern GC_warn_proc GC_current_warn_proc;
  * addresses are represented by a single location.
  * Used by black-listing code, and perhaps by dirty bit maintenance code.
  */
+
 # ifdef LARGE_CONFIG
 #   if CPP_WORDSZ == 32
-#    define LOG_PHT_ENTRIES  20 /* Collisions likely at 1M blocks,     */
-                               /* which is >= 4GB.  Each table takes   */
-                               /* 128KB, some of which may never be    */
-                               /* touched.                             */
+#    define LOG_PHT_ENTRIES  20 /* Collisions likely at 1M blocks,      */
+                                /* which is >= 4GB.  Each table takes   */
+                                /* 128KB, some of which may never be    */
+                                /* touched.                             */
 #   else
-#    define LOG_PHT_ENTRIES  21 /* Collisions likely at 2M blocks,     */
-                               /* which is >= 8GB.  Each table takes   */
-                               /* 256KB, some of which may never be    */
-                               /* touched.                             */
+#    define LOG_PHT_ENTRIES  21 /* Collisions likely at 2M blocks,      */
+                                /* which is >= 8GB.  Each table takes   */
+                                /* 256KB, some of which may never be    */
+                                /* touched.                             */
 #   endif
 # else
 #   ifdef SMALL_CONFIG
-#     define LOG_PHT_ENTRIES  15 /* Collisions are likely if heap grows        */
-                                /* to more than 32K hblks = 128MB.     */
-                                /* Each hash table occupies 4K bytes.  */
+#     define LOG_PHT_ENTRIES  15 /* Collisions are likely if heap grows */
+                                 /* to more than 32K hblks = 128MB.     */
+                                 /* Each hash table occupies 4K bytes.  */
 #   else /* default "medium" configuration */
-#     define LOG_PHT_ENTRIES  18 /* Collisions are likely if heap grows        */
-                                /* to more than 256K hblks >= 1GB.     */
-                                /* Each hash table occupies 32K bytes. */
-                                /* Even for somewhat smaller heaps,    */
-                                /* say half that, collisions may be an */
-                                /* issue because we blacklist          */
-                                /* addresses outside the heap.         */
+#     define LOG_PHT_ENTRIES  18 /* Collisions are likely if heap grows */
+                                 /* to more than 256K hblks >= 1GB.     */
+                                 /* Each hash table occupies 32K bytes. */
+                                 /* Even for somewhat smaller heaps,    */
+                                 /* say half that, collisions may be an */
+                                 /* issue because we blacklist          */
+                                 /* addresses outside the heap.         */
 #   endif
 # endif
 # define PHT_ENTRIES ((word)1 << LOG_PHT_ENTRIES)
@@ -635,16 +727,15 @@ typedef word page_hash_table[PHT_SIZE];
 # define PHT_HASH(addr) ((((word)(addr)) >> LOG_HBLKSIZE) & (PHT_ENTRIES - 1))
 
 # define get_pht_entry_from_index(bl, index) \
-               (((bl)[divWORDSZ(index)] >> modWORDSZ(index)) & 1)
+                (((bl)[divWORDSZ(index)] >> modWORDSZ(index)) & 1)
 # define set_pht_entry_from_index(bl, index) \
-               (bl)[divWORDSZ(index)] |= (word)1 << modWORDSZ(index)
+                (bl)[divWORDSZ(index)] |= (word)1 << modWORDSZ(index)
 # define clear_pht_entry_from_index(bl, index) \
-               (bl)[divWORDSZ(index)] &= ~((word)1 << modWORDSZ(index))
-/* And a dumb but thread-safe version of set_pht_entry_from_index.     */
-/* This sets (many) extra bits.                                                */
+                (bl)[divWORDSZ(index)] &= ~((word)1 << modWORDSZ(index))
+/* And a dumb but thread-safe version of set_pht_entry_from_index.      */
+/* This sets (many) extra bits.                                         */
 # define set_pht_entry_from_index_safe(bl, index) \
-               (bl)[divWORDSZ(index)] = ONES
-       
+                (bl)[divWORDSZ(index)] = ONES
 
 
 /********************************************/
@@ -657,113 +748,116 @@ typedef word page_hash_table[PHT_SIZE];
 #define HBLKMASK   (HBLKSIZE-1)
 
 #define MARK_BITS_PER_HBLK (HBLKSIZE/GRANULE_BYTES)
-          /* upper bound                                    */
-          /* We allocate 1 bit per allocation granule.      */
-          /* If MARK_BIT_PER_GRANULE is defined, we use     */
-          /* every nth bit, where n is the number of        */
-          /* allocation granules per object.  If            */
-          /* MARK_BIT_PER_OBJ is defined, we only use the   */
-          /* initial group of mark bits, and it is safe     */
-          /* to allocate smaller header for large objects.  */
+           /* upper bound                                    */
+           /* We allocate 1 bit per allocation granule.      */
+           /* If MARK_BIT_PER_GRANULE is defined, we use     */
+           /* every nth bit, where n is the number of        */
+           /* allocation granules per object.  If            */
+           /* MARK_BIT_PER_OBJ is defined, we only use the   */
+           /* initial group of mark bits, and it is safe     */
+           /* to allocate smaller header for large objects.  */
 
 # ifdef USE_MARK_BYTES
 #   define MARK_BITS_SZ (MARK_BITS_PER_HBLK + 1)
-       /* Unlike the other case, this is in units of bytes.            */
-       /* Since we force doubleword alignment, we need at most one     */
-       /* mark bit per 2 words.  But we do allocate and set one        */
-       /* extra mark bit to avoid an explicit check for the            */
-       /* partial object at the end of each block.                     */
+        /* Unlike the other case, this is in units of bytes.            */
+        /* Since we force doubleword alignment, we need at most one     */
+        /* mark bit per 2 words.  But we do allocate and set one        */
+        /* extra mark bit to avoid an explicit check for the            */
+        /* partial object at the end of each block.                     */
 # else
 #   define MARK_BITS_SZ (MARK_BITS_PER_HBLK/CPP_WORDSZ + 1)
 # endif
 
 #ifdef PARALLEL_MARK
-# include <atomic_ops.h>
+# include "atomic_ops.h"
   typedef AO_t counter_t;
 #else
   typedef size_t counter_t;
+# if defined(THREADS) && defined(MPROTECT_VDB)
+#   include "atomic_ops.h"
+# endif
 #endif
 
 /* We maintain layout maps for heap blocks containing objects of a given */
-/* size.  Each entry in this map describes a byte offset and has the    */
-/* following type.                                                      */
+/* size.  Each entry in this map describes a byte offset and has the     */
+/* following type.                                                       */
 struct hblkhdr {
-    struct hblk * hb_next;     /* Link field for hblk free list         */
-                               /* and for lists of chunks waiting to be */
-                               /* reclaimed.                            */
-    struct hblk * hb_prev;     /* Backwards link for free list.        */
-    struct hblk * hb_block;    /* The corresponding block.             */
+    struct hblk * hb_next;      /* Link field for hblk free list         */
+                                /* and for lists of chunks waiting to be */
+                                /* reclaimed.                            */
+    struct hblk * hb_prev;      /* Backwards link for free list.        */
+    struct hblk * hb_block;     /* The corresponding block.             */
     unsigned char hb_obj_kind;
-                        /* Kind of objects in the block.  Each kind    */
-                        /* identifies a mark procedure and a set of    */
-                        /* list headers.  Sometimes called regions.    */
+                         /* Kind of objects in the block.  Each kind    */
+                         /* identifies a mark procedure and a set of    */
+                         /* list headers.  Sometimes called regions.    */
     unsigned char hb_flags;
-#      define IGNORE_OFF_PAGE  1       /* Ignore pointers that do not  */
-                                       /* point to the first page of   */
-                                       /* this object.                 */
-#      define WAS_UNMAPPED 2   /* This is a free block, which has      */
-                               /* been unmapped from the address       */
-                               /* space.                               */
-                               /* GC_remap must be invoked on it       */
-                               /* before it can be reallocated.        */
-                               /* Only set with USE_MUNMAP.            */
-#      define FREE_BLK 4       /* Block is free, i.e. not in use.      */
+#       define IGNORE_OFF_PAGE  1       /* Ignore pointers that do not  */
+                                        /* point to the first page of   */
+                                        /* this object.                 */
+#       define WAS_UNMAPPED 2   /* This is a free block, which has      */
+                                /* been unmapped from the address       */
+                                /* space.                               */
+                                /* GC_remap must be invoked on it       */
+                                /* before it can be reallocated.        */
+                                /* Only set with USE_MUNMAP.            */
+#       define FREE_BLK 4       /* Block is free, i.e. not in use.      */
     unsigned short hb_last_reclaimed;
-                               /* Value of GC_gc_no when block was     */
-                               /* last allocated or swept. May wrap.   */
-                               /* For a free block, this is maintained */
-                               /* only for USE_MUNMAP, and indicates   */
-                               /* when the header was allocated, or    */
-                               /* when the size of the block last      */
-                               /* changed.                             */
+                                /* Value of GC_gc_no when block was     */
+                                /* last allocated or swept. May wrap.   */
+                                /* For a free block, this is maintained */
+                                /* only for USE_MUNMAP, and indicates   */
+                                /* when the header was allocated, or    */
+                                /* when the size of the block last      */
+                                /* changed.                             */
     size_t hb_sz;  /* If in use, size in bytes, of objects in the block. */
-                  /* if free, the size in bytes of the whole block      */
-                  /* We assume that this is convertible to signed_word  */
-                  /* without generating a negative result.  We avoid    */
-                  /* generating free blocks larger than that.           */
-    word hb_descr;             /* object descriptor for marking.  See  */
-                               /* mark.h.                              */
+                   /* if free, the size in bytes of the whole block      */
+                   /* We assume that this is convertible to signed_word  */
+                   /* without generating a negative result.  We avoid    */
+                   /* generating free blocks larger than that.           */
+    word hb_descr;              /* object descriptor for marking.  See  */
+                                /* mark.h.                              */
 #   ifdef MARK_BIT_PER_OBJ
-      unsigned32 hb_inv_sz;    /* A good upper bound for 2**32/hb_sz.  */
-                               /* For large objects, we use            */
-                               /* LARGE_INV_SZ.                        */
+      unsigned32 hb_inv_sz;     /* A good upper bound for 2**32/hb_sz.  */
+                                /* For large objects, we use            */
+                                /* LARGE_INV_SZ.                        */
 #     define LARGE_INV_SZ (1 << 16)
 #   else
       unsigned char hb_large_block;
-      short * hb_map;          /* Essentially a table of remainders    */
-                               /* mod BYTES_TO_GRANULES(hb_sz), except */
-                               /* for large blocks.  See GC_obj_map.   */
+      short * hb_map;           /* Essentially a table of remainders    */
+                                /* mod BYTES_TO_GRANULES(hb_sz), except */
+                                /* for large blocks.  See GC_obj_map.   */
 #   endif
-    counter_t hb_n_marks;      /* Number of set mark bits, excluding   */
-                               /* the one always set at the end.       */
-                               /* Currently it is concurrently         */
-                               /* updated and hence only approximate.  */
-                               /* But a zero value does guarantee that */
-                               /* the block contains no marked         */
-                               /* objects.                             */
-                               /* Ensuring this property means that we */
-                               /* never decrement it to zero during a  */
-                               /* collection, and hence the count may  */
-                               /* be one too high.  Due to concurrent  */
-                               /* updates, an arbitrary number of      */
-                               /* increments, but not all of them (!)  */
-                               /* may be lost, hence it may in theory  */
-                               /* be much too low.                     */
-                               /* The count may also be too high if    */
-                               /* multiple mark threads mark the       */
-                               /* same object due to a race.           */
-                               /* Without parallel marking, the count  */
-                               /* is accurate.                         */
+    counter_t hb_n_marks;       /* Number of set mark bits, excluding   */
+                                /* the one always set at the end.       */
+                                /* Currently it is concurrently         */
+                                /* updated and hence only approximate.  */
+                                /* But a zero value does guarantee that */
+                                /* the block contains no marked         */
+                                /* objects.                             */
+                                /* Ensuring this property means that we */
+                                /* never decrement it to zero during a  */
+                                /* collection, and hence the count may  */
+                                /* be one too high.  Due to concurrent  */
+                                /* updates, an arbitrary number of      */
+                                /* increments, but not all of them (!)  */
+                                /* may be lost, hence it may in theory  */
+                                /* be much too low.                     */
+                                /* The count may also be too high if    */
+                                /* multiple mark threads mark the       */
+                                /* same object due to a race.           */
+                                /* Without parallel marking, the count  */
+                                /* is accurate.                         */
 #   ifdef USE_MARK_BYTES
       union {
         char _hb_marks[MARK_BITS_SZ];
-                           /* The i'th byte is 1 if the object         */
-                           /* starting at granule i or object i is     */
-                           /* marked, 0 o.w.                           */
-                           /* The mark bit for the "one past the       */
-                           /* end" object is always set to avoid a     */
-                           /* special case test in the marker.         */
-       word dummy;     /* Force word alignment of mark bytes. */
+                            /* The i'th byte is 1 if the object         */
+                            /* starting at granule i or object i is     */
+                            /* marked, 0 o.w.                           */
+                            /* The mark bit for the "one past the       */
+                            /* end" object is always set to avoid a     */
+                            /* special case test in the marker.         */
+        word dummy;     /* Force word alignment of mark bytes. */
       } _mark_byte_union;
 #     define hb_marks _mark_byte_union._hb_marks
 #   else
@@ -771,15 +865,15 @@ struct hblkhdr {
 #   endif /* !USE_MARK_BYTES */
 };
 
-# define ANY_INDEX 23  /* "Random" mark bit index for assertions */
+# define ANY_INDEX 23   /* "Random" mark bit index for assertions */
 
 /*  heap block body */
 
 # define HBLK_WORDS (HBLKSIZE/sizeof(word))
 # define HBLK_GRANULES (HBLKSIZE/GRANULE_BYTES)
 
-/* The number of objects in a block dedicated to a certain size.       */
-/* may erroneously yield zero (instead of one) for large objects.      */
+/* The number of objects in a block dedicated to a certain size.        */
+/* may erroneously yield zero (instead of one) for large objects.       */
 # define HBLK_OBJS(sz_in_bytes) (HBLKSIZE/(sz_in_bytes))
 
 struct hblk {
@@ -789,8 +883,8 @@ struct hblk {
 # define HBLK_IS_FREE(hdr) (((hdr) -> hb_flags & FREE_BLK) != 0)
 
 # define OBJ_SZ_TO_BLOCKS(sz) divHBLKSZ((sz) + HBLKSIZE-1)
-    /* Size of block (in units of HBLKSIZE) needed to hold objects of  */
-    /* given sz (in bytes).                                            */
+    /* Size of block (in units of HBLKSIZE) needed to hold objects of   */
+    /* given sz (in bytes).                                             */
 
 /* Object free list link */
 # define obj_link(p) (*(void  **)(p))
@@ -798,10 +892,10 @@ struct hblk {
 # define LOG_MAX_MARK_PROCS 6
 # define MAX_MARK_PROCS (1 << LOG_MAX_MARK_PROCS)
 
-/* Root sets.  Logically private to mark_rts.c.  But we don't want the */
-/* tables scanned, so we put them here.                                        */
-/* MAX_ROOT_SETS is the maximum number of ranges that can be   */
-/* registered as static roots.                                         */
+/* Root sets.  Logically private to mark_rts.c.  But we don't want the  */
+/* tables scanned, so we put them here.                                 */
+/* MAX_ROOT_SETS is the maximum number of ranges that can be    */
+/* registered as static roots.                                  */
 # ifdef LARGE_CONFIG
 #   define MAX_ROOT_SETS 8192
 # else
@@ -813,7 +907,7 @@ struct hblk {
 # endif
 
 # define MAX_EXCLUSIONS (MAX_ROOT_SETS/4)
-/* Maximum number of segments that can be excluded from root sets.     */
+/* Maximum number of segments that can be excluded from root sets.      */
 
 /*
  * Data structure for excluded static roots.
@@ -823,208 +917,212 @@ struct exclusion {
     ptr_t e_end;
 };
 
-/* Data structure for list of root sets.                               */
-/* We keep a hash table, so that we can filter out duplicate additions.        */
-/* Under Win32, we need to do a better job of filtering overlaps, so   */
-/* we resort to sequential search, and pay the price.                  */
+/* Data structure for list of root sets.                                */
+/* We keep a hash table, so that we can filter out duplicate additions. */
+/* Under Win32, we need to do a better job of filtering overlaps, so    */
+/* we resort to sequential search, and pay the price.                   */
 struct roots {
-       ptr_t r_start;
-       ptr_t r_end;
-#      if !defined(MSWIN32) && !defined(MSWINCE)
-         struct roots * r_next;
-#      endif
-       GC_bool r_tmp;
-               /* Delete before registering new dynamic libraries */
+        ptr_t r_start;/* multiple of word size */
+        ptr_t r_end;  /* multiple of word size and greater than r_start */
+#       if !defined(MSWIN32) && !defined(MSWINCE)
+          struct roots * r_next;
+#       endif
+        GC_bool r_tmp;
+                /* Delete before registering new dynamic libraries */
 };
 
 #if !defined(MSWIN32) && !defined(MSWINCE)
-    /* Size of hash table index to roots.      */
+    /* Size of hash table index to roots.       */
 #   define LOG_RT_SIZE 6
 #   define RT_SIZE (1 << LOG_RT_SIZE) /* Power of 2, may be != MAX_ROOT_SETS */
 #endif
 
-/* Lists of all heap blocks and free lists     */
-/* as well as other random data structures     */
-/* that should not be scanned by the           */
-/* collector.                                  */
-/* These are grouped together in a struct      */
-/* so that they can be easily skipped by the   */
-/* GC_mark routine.                            */
-/* The ordering is weird to make GC_malloc     */
-/* faster by keeping the important fields      */
-/* sufficiently close together that a          */
-/* single load of a base register will do.     */
-/* Scalars that could easily appear to         */
-/* be pointers are also put here.              */
-/* The main fields should precede any          */
-/* conditionally included fields, so that      */
-/* gc_inl.h will work even if a different set  */
-/* of macros is defined when the client is     */
-/* compiled.                                   */
+/* Lists of all heap blocks and free lists      */
+/* as well as other random data structures      */
+/* that should not be scanned by the            */
+/* collector.                                   */
+/* These are grouped together in a struct       */
+/* so that they can be easily skipped by the    */
+/* GC_mark routine.                             */
+/* The ordering is weird to make GC_malloc      */
+/* faster by keeping the important fields       */
+/* sufficiently close together that a           */
+/* single load of a base register will do.      */
+/* Scalars that could easily appear to          */
+/* be pointers are also put here.               */
+/* The main fields should precede any           */
+/* conditionally included fields, so that       */
+/* gc_inl.h will work even if a different set   */
+/* of macros is defined when the client is      */
+/* compiled.                                    */
 
 struct _GC_arrays {
-  word _heapsize;              /* Heap size in bytes.                  */
+  word _heapsize;               /* Heap size in bytes.                  */
   word _max_heapsize;
-  word _requested_heapsize;    /* Heap size due to explicit expansion */
+  word _requested_heapsize;     /* Heap size due to explicit expansion */
   ptr_t _last_heap_addr;
   ptr_t _prev_heap_addr;
   word _large_free_bytes;
-       /* Total bytes contained in blocks on large object free */
-       /* list.                                                */
+        /* Total bytes contained in blocks on large object free */
+        /* list.                                                */
   word _large_allocd_bytes;
-       /* Total number of bytes in allocated large objects blocks.     */
-       /* For the purposes of this counter and the next one only, a    */
-       /* large object is one that occupies a block of at least        */
-       /* 2*HBLKSIZE.                                                  */
+        /* Total number of bytes in allocated large objects blocks.     */
+        /* For the purposes of this counter and the next one only, a    */
+        /* large object is one that occupies a block of at least        */
+        /* 2*HBLKSIZE.                                                  */
   word _max_large_allocd_bytes;
-       /* Maximum number of bytes that were ever allocated in          */
-       /* large object blocks.  This is used to help decide when it    */
-       /* is safe to split up a large block.                           */
+        /* Maximum number of bytes that were ever allocated in          */
+        /* large object blocks.  This is used to help decide when it    */
+        /* is safe to split up a large block.                           */
   word _bytes_allocd_before_gc;
-               /* Number of words allocated before this        */
-               /* collection cycle.                            */
+                /* Number of words allocated before this        */
+                /* collection cycle.                            */
 # ifndef SEPARATE_GLOBALS
     word _bytes_allocd;
-       /* Number of words allocated during this collection cycle */
+        /* Number of words allocated during this collection cycle */
 # endif
   word _bytes_dropped;
-       /* Number of black-listed bytes dropped during GC cycle */
-       /* as a result of repeated scanning during allocation   */
-       /* attempts.  These are treated largely as allocated,   */
-       /* even though they are not useful to the client.       */
+        /* Number of black-listed bytes dropped during GC cycle */
+        /* as a result of repeated scanning during allocation   */
+        /* attempts.  These are treated largely as allocated,   */
+        /* even though they are not useful to the client.       */
   word _bytes_finalized;
-       /* Approximate number of bytes in objects (and headers) */
-       /* that became ready for finalization in the last       */
-       /* collection.                                          */
+        /* Approximate number of bytes in objects (and headers) */
+        /* that became ready for finalization in the last       */
+        /* collection.                                          */
   word _non_gc_bytes_at_gc;
-       /* Number of explicitly managed bytes of storage        */
-       /* at last collection.                                  */
+        /* Number of explicitly managed bytes of storage        */
+        /* at last collection.                                  */
   word _bytes_freed;
-       /* Number of explicitly deallocated bytes of memory     */
-       /* since last collection.                               */
+        /* Number of explicitly deallocated bytes of memory     */
+        /* since last collection.                               */
   word _finalizer_bytes_freed;
-       /* Bytes of memory explicitly deallocated while         */
-       /* finalizers were running.  Used to approximate mem.   */
-       /* explicitly deallocated by finalizers.                */
+        /* Bytes of memory explicitly deallocated while         */
+        /* finalizers were running.  Used to approximate mem.   */
+        /* explicitly deallocated by finalizers.                */
   ptr_t _scratch_end_ptr;
   ptr_t _scratch_last_end_ptr;
-       /* Used by headers.c, and can easily appear to point to */
-       /* heap.                                                */
+        /* Used by headers.c, and can easily appear to point to */
+        /* heap.                                                */
   GC_mark_proc _mark_procs[MAX_MARK_PROCS];
-       /* Table of user-defined mark procedures.  There is     */
-       /* a small number of these, which can be referenced     */
-       /* by DS_PROC mark descriptors.  See gc_mark.h.         */
+        /* Table of user-defined mark procedures.  There is     */
+        /* a small number of these, which can be referenced     */
+        /* by DS_PROC mark descriptors.  See gc_mark.h.         */
 
 # ifndef SEPARATE_GLOBALS
     void *_objfreelist[MAXOBJGRANULES+1];
-                         /* free list for objects */
+                          /* free list for objects */
     void *_aobjfreelist[MAXOBJGRANULES+1];
-                         /* free list for atomic objs  */
+                          /* free list for atomic objs  */
 # endif
 
   void *_uobjfreelist[MAXOBJGRANULES+1];
-                         /* uncollectable but traced objs      */
-                         /* objects on this and auobjfreelist  */
-                         /* are always marked, except during   */
-                         /* garbage collections.               */
+                          /* uncollectable but traced objs      */
+                          /* objects on this and auobjfreelist  */
+                          /* are always marked, except during   */
+                          /* garbage collections.               */
 # ifdef ATOMIC_UNCOLLECTABLE
     void *_auobjfreelist[MAXOBJGRANULES+1];
 # endif
-                         /* uncollectable but traced objs      */
+                          /* uncollectable but traced objs      */
 
     word _composite_in_use;
-               /* Number of words in accessible composite      */
-               /* objects.                                     */
+                /* Number of words in accessible composite      */
+                /* objects.                                     */
     word _atomic_in_use;
-               /* Number of words in accessible atomic         */
-               /* objects.                                     */
+                /* Number of words in accessible atomic         */
+                /* objects.                                     */
 # ifdef USE_MUNMAP
     word _unmapped_bytes;
 # endif
 
     size_t _size_map[MAXOBJBYTES+1];
-       /* Number of granules to allocate when asked for a certain      */
-       /* number of bytes.                                             */
+        /* Number of granules to allocate when asked for a certain      */
+        /* number of bytes.                                             */
 
 # ifdef STUBBORN_ALLOC
     ptr_t _sobjfreelist[MAXOBJGRANULES+1];
 # endif
-                         /* free list for immutable objects    */
+                          /* free list for immutable objects    */
 # ifdef MARK_BIT_PER_GRANULE
     short * _obj_map[MAXOBJGRANULES+1];
                        /* If not NIL, then a pointer to a map of valid  */
-                      /* object addresses.                             */
-                      /* _obj_map[sz_in_granules][i] is                */
-                      /* i % sz_in_granules.                           */
-                      /* This is now used purely to replace a          */
-                      /* division in the marker by a table lookup.     */
-                      /* _obj_map[0] is used for large objects and     */
-                      /* contains all nonzero entries.  This gets us   */
-                      /* out of the marker fast path without an extra  */
-                      /* test.                                         */
+                       /* object addresses.                             */
+                       /* _obj_map[sz_in_granules][i] is                */
+                       /* i % sz_in_granules.                           */
+                       /* This is now used purely to replace a          */
+                       /* division in the marker by a table lookup.     */
+                       /* _obj_map[0] is used for large objects and     */
+                       /* contains all nonzero entries.  This gets us   */
+                       /* out of the marker fast path without an extra  */
+                       /* test.                                         */
 #   define MAP_LEN BYTES_TO_GRANULES(HBLKSIZE)
 # endif
 #   define VALID_OFFSET_SZ HBLKSIZE
   char _valid_offsets[VALID_OFFSET_SZ];
-                               /* GC_valid_offsets[i] == TRUE ==> i    */
-                               /* is registered as a displacement.     */
+                                /* GC_valid_offsets[i] == TRUE ==> i    */
+                                /* is registered as a displacement.     */
   char _modws_valid_offsets[sizeof(word)];
-                               /* GC_valid_offsets[i] ==>                */
-                               /* GC_modws_valid_offsets[i%sizeof(word)] */
+                                /* GC_valid_offsets[i] ==>                */
+                                /* GC_modws_valid_offsets[i%sizeof(word)] */
 # ifdef STUBBORN_ALLOC
     page_hash_table _changed_pages;
-        /* Stubborn object pages that were changes since last call to  */
-       /* GC_read_changed.                                             */
+        /* Stubborn object pages that were changes since last call to   */
+        /* GC_read_changed.                                             */
     page_hash_table _prev_changed_pages;
-        /* Stubborn object pages that were changes before last call to */
-       /* GC_read_changed.                                             */
+        /* Stubborn object pages that were changes before last call to  */
+        /* GC_read_changed.                                             */
 # endif
 # if defined(PROC_VDB) || defined(MPROTECT_VDB) || \
      defined(GWW_VDB) || defined(MANUAL_VDB)
-    page_hash_table _grungy_pages; /* Pages that were dirty at last       */
-                                    /* GC_read_dirty.                     */
+    page_hash_table _grungy_pages; /* Pages that were dirty at last     */
+                                   /* GC_read_dirty.                    */
 # endif
 # if defined(MPROTECT_VDB) || defined(MANUAL_VDB)
-    volatile page_hash_table _dirty_pages;     
-                       /* Pages dirtied since last GC_read_dirty. */
+    volatile page_hash_table _dirty_pages;
+                        /* Pages dirtied since last GC_read_dirty. */
 # endif
 # if defined(PROC_VDB) || defined(GWW_VDB)
-    page_hash_table _written_pages;    /* Pages ever dirtied   */
+    page_hash_table _written_pages;     /* Pages ever dirtied   */
 # endif
+
+#ifndef MAX_HEAP_SECTS
 # ifdef LARGE_CONFIG
 #   if CPP_WORDSZ > 32
-#     define MAX_HEAP_SECTS 8192       /* overflows at roughly 128 GB     */
+#     define MAX_HEAP_SECTS 8192        /* overflows at roughly 128 GB     */
 #   else
-#     define MAX_HEAP_SECTS 768                /* Separately added heap sections. */
+#     define MAX_HEAP_SECTS 768         /* Separately added heap sections. */
 #   endif
 # else
 #   ifdef SMALL_CONFIG
-#     define MAX_HEAP_SECTS 128                /* Roughly 256MB (128*2048*1K)  */
+#     define MAX_HEAP_SECTS 128         /* Roughly 256MB (128*2048*1K)  */
 #   else
 #     if CPP_WORDSZ > 32
-#       define MAX_HEAP_SECTS 1024     /* Roughly 8GB                   */
+#       define MAX_HEAP_SECTS 1024      /* Roughly 8GB                   */
 #     else
-#       define MAX_HEAP_SECTS 512      /* Roughly 4GB                   */
+#       define MAX_HEAP_SECTS 512       /* Roughly 4GB                   */
 #     endif
 #   endif
 # endif
+#endif /* !MAX_HEAP_SECTS */
+
   struct HeapSect {
       ptr_t hs_start; size_t hs_bytes;
-  } _heap_sects[MAX_HEAP_SECTS];       /* Heap segments potentially    */
-                                       /* client objects.              */
+  } _heap_sects[MAX_HEAP_SECTS];        /* Heap segments potentially    */
+                                        /* client objects.              */
 # if defined(USE_PROC_FOR_LIBRARIES)
      struct HeapSect _our_memory[MAX_HEAP_SECTS];
-                                       /* All GET_MEM allocated        */
-                                       /* memory.  Includes block      */
-                                       /* headers and the like.        */
+                                        /* All GET_MEM allocated        */
+                                        /* memory.  Includes block      */
+                                        /* headers and the like.        */
 # endif
 # if defined(MSWIN32) || defined(MSWINCE)
     ptr_t _heap_bases[MAX_HEAP_SECTS];
-               /* Start address of memory regions obtained from kernel. */
+                /* Start address of memory regions obtained from kernel. */
 # endif
 # ifdef MSWINCE
     word _heap_lengths[MAX_HEAP_SECTS];
-               /* Committed lengths of memory regions obtained from kernel. */
+                /* Committed lengths of memory regions obtained from kernel. */
 # endif
   struct roots _static_roots[MAX_ROOT_SETS];
 # if !defined(MSWIN32) && !defined(MSWINCE)
@@ -1038,16 +1136,16 @@ struct _GC_arrays {
   ptr_t _trace_addr;
 #endif
 #ifdef SAVE_CALL_CHAIN
-  struct callinfo _last_stack[NFRAMES];        /* Stack at last garbage collection.*/
-                                       /* Useful for debugging mysterious  */
-                                       /* object disappearances.           */
-                                       /* In the multithreaded case, we    */
-                                       /* currently only save the calling  */
-                                       /* stack.                           */
+  struct callinfo _last_stack[NFRAMES]; /* Stack at last garbage collection.*/
+                                        /* Useful for debugging mysterious  */
+                                        /* object disappearances.           */
+                                        /* In the multithreaded case, we    */
+                                        /* currently only save the calling  */
+                                        /* stack.                           */
 #endif
 };
 
-GC_API GC_FAR struct _GC_arrays GC_arrays; 
+GC_API_PRIV GC_FAR struct _GC_arrays GC_arrays;
 
 # ifndef SEPARATE_GLOBALS
 #   define GC_objfreelist GC_arrays._objfreelist
@@ -1131,41 +1229,41 @@ GC_API GC_FAR struct _GC_arrays GC_arrays;
 /* Object kinds: */
 # define MAXOBJKINDS 16
 
-extern struct obj_kind {
-   void **ok_freelist; /* Array of free listheaders for this kind of object */
-                       /* Point either to GC_arrays or to storage allocated */
-                       /* with GC_scratch_alloc.                            */
+GC_EXTERN struct obj_kind {
+   void **ok_freelist;  /* Array of free listheaders for this kind of object */
+                        /* Point either to GC_arrays or to storage allocated */
+                        /* with GC_scratch_alloc.                            */
    struct hblk **ok_reclaim_list;
-                       /* List headers for lists of blocks waiting to be */
-                       /* swept.                                         */
-                       /* Indexed by object size in granules.            */
-   word ok_descriptor;  /* Descriptor template for objects in this     */
-                       /* block.                                       */
+                        /* List headers for lists of blocks waiting to be */
+                        /* swept.                                         */
+                        /* Indexed by object size in granules.            */
+   word ok_descriptor;  /* Descriptor template for objects in this      */
+                        /* block.                                       */
    GC_bool ok_relocate_descr;
-                       /* Add object size in bytes to descriptor       */
-                       /* template to obtain descriptor.  Otherwise    */
-                       /* template is used as is.                      */
+                        /* Add object size in bytes to descriptor       */
+                        /* template to obtain descriptor.  Otherwise    */
+                        /* template is used as is.                      */
    GC_bool ok_init;   /* Clear objects before putting them on the free list. */
 } GC_obj_kinds[MAXOBJKINDS];
 
 # define beginGC_obj_kinds ((ptr_t)(&GC_obj_kinds))
 # define endGC_obj_kinds (beginGC_obj_kinds + (sizeof GC_obj_kinds))
 
-/* Variables that used to be in GC_arrays, but need to be accessed by  */
-/* inline allocation code.  If they were in GC_arrays, the inlined     */
-/* allocation code would include GC_arrays offsets (as it did), which  */
-/* introduce maintenance problems.                                     */
+/* Variables that used to be in GC_arrays, but need to be accessed by   */
+/* inline allocation code.  If they were in GC_arrays, the inlined      */
+/* allocation code would include GC_arrays offsets (as it did), which   */
+/* introduce maintenance problems.                                      */
 
 #ifdef SEPARATE_GLOBALS
-  word GC_bytes_allocd;
-       /* Number of words allocated during this collection cycle */
-  ptr_t GC_objfreelist[MAXOBJGRANULES+1];
-                         /* free list for NORMAL objects */
+  extern word GC_bytes_allocd;
+        /* Number of words allocated during this collection cycle */
+  extern ptr_t GC_objfreelist[MAXOBJGRANULES+1];
+                          /* free list for NORMAL objects */
 # define beginGC_objfreelist ((ptr_t)(&GC_objfreelist))
 # define endGC_objfreelist (beginGC_objfreelist + sizeof(GC_objfreelist))
 
-  ptr_t GC_aobjfreelist[MAXOBJGRANULES+1];
-                         /* free list for atomic (PTRFREE) objs        */
+  extern ptr_t GC_aobjfreelist[MAXOBJGRANULES+1];
+                          /* free list for atomic (PTRFREE) objs        */
 # define beginGC_aobjfreelist ((ptr_t)(&GC_aobjfreelist))
 # define endGC_aobjfreelist (beginGC_aobjfreelist + sizeof(GC_aobjfreelist))
 #endif
@@ -1183,74 +1281,86 @@ extern struct obj_kind {
 #   define IS_UNCOLLECTABLE(k) ((k) == UNCOLLECTABLE)
 # endif
 
-extern unsigned GC_n_kinds;
-
-GC_API word GC_fo_entries;
+GC_EXTERN unsigned GC_n_kinds;
 
-extern word GC_n_heap_sects;   /* Number of separately added heap      */
-                               /* sections.                            */
+GC_EXTERN word GC_n_heap_sects; /* Number of separately added heap      */
+                                /* sections.                            */
 
 #ifdef USE_PROC_FOR_LIBRARIES
-  extern word GC_n_memory;     /* Number of GET_MEM allocated memory   */
-                               /* sections.                            */
+  GC_EXTERN word GC_n_memory;   /* Number of GET_MEM allocated memory   */
+                                /* sections.                            */
 #endif
 
-extern word GC_page_size;
+GC_EXTERN word GC_page_size;
 
-# if defined(MSWIN32) || defined(MSWINCE)
+#if defined(MSWIN32) || defined(MSWINCE)
   struct _SYSTEM_INFO;
-  extern struct _SYSTEM_INFO GC_sysinfo;
-  extern word GC_n_heap_bases; /* See GC_heap_bases.   */
-# endif
-
-extern word GC_total_stack_black_listed;
-                       /* Number of bytes on stack blacklist.  */
-
-extern word GC_black_list_spacing;
-                       /* Average number of bytes between blacklisted  */
-                       /* blocks. Approximate.                         */
-                       /* Counts only blocks that are                  */
-                       /* "stack-blacklisted", i.e. that are           */
-                       /* problematic in the interior of an object.    */
-
-extern struct hblk * GC_hblkfreelist[];
-                               /* List of completely empty heap blocks */
-                               /* Linked through hb_next field of      */
-                               /* header structure associated with     */
-                               /* block.                               */
+  GC_EXTERN struct _SYSTEM_INFO GC_sysinfo;
+#endif
 
-extern GC_bool GC_objects_are_marked;  /* There are marked objects in  */
-                                       /* the heap.                    */
+GC_EXTERN word GC_black_list_spacing;
+                        /* Average number of bytes between blacklisted  */
+                        /* blocks. Approximate.                         */
+                        /* Counts only blocks that are                  */
+                        /* "stack-blacklisted", i.e. that are           */
+                        /* problematic in the interior of an object.    */
 
-#ifndef SMALL_CONFIG
-  extern GC_bool GC_incremental;
-                       /* Using incremental/generational collection. */
-# define TRUE_INCREMENTAL \
-       (GC_incremental && GC_time_limit != GC_TIME_UNLIMITED)
-       /* True incremental, not just generational, mode */
-#else
+#ifdef GC_DISABLE_INCREMENTAL
 # define GC_incremental FALSE
-                       /* Hopefully allow optimizer to remove some code. */
+                        /* Hopefully allow optimizer to remove some code. */
 # define TRUE_INCREMENTAL FALSE
-#endif
+#else
+  GC_EXTERN GC_bool GC_incremental;
+                        /* Using incremental/generational collection. */
+# define TRUE_INCREMENTAL \
+        (GC_incremental && GC_time_limit != GC_TIME_UNLIMITED)
+        /* True incremental, not just generational, mode */
+#endif /* !GC_DISABLE_INCREMENTAL */
 
-extern GC_bool GC_dirty_maintained;
-                               /* Dirty bits are being maintained,     */
-                               /* either for incremental collection,   */
-                               /* or to limit the root set.            */
+GC_EXTERN GC_bool GC_dirty_maintained;
+                                /* Dirty bits are being maintained,     */
+                                /* either for incremental collection,   */
+                                /* or to limit the root set.            */
 
-extern word GC_root_size;      /* Total size of registered root sections */
+GC_EXTERN word GC_root_size; /* Total size of registered root sections. */
 
-extern GC_bool GC_debugging_started;   /* GC_debug_malloc has been called. */ 
+GC_EXTERN GC_bool GC_debugging_started;
+                                /* GC_debug_malloc has been called.     */
 
-extern long GC_large_alloc_warn_interval;
-       /* Interval between unsuppressed warnings.      */
+/* This is used by GC_do_blocking[_inner]().            */
+struct blocking_data {
+    GC_fn_type fn;
+    void * client_data; /* and result */
+};
 
-extern long GC_large_alloc_warn_suppressed;
-       /* Number of warnings suppressed so far.        */
+/* This is used by GC_call_with_gc_active(), GC_push_all_stack_frames(). */
+struct GC_activation_frame_s {
+  ptr_t saved_stack_ptr;
+#ifdef IA64
+    ptr_t saved_backing_store_ptr;
+    ptr_t backing_store_end;
+#endif
+  struct GC_activation_frame_s *prev;
+};
 
 #ifdef THREADS
-  extern GC_bool GC_world_stopped;
+/* Process all activation "frames" - scan entire stack except for       */
+/* frames belonging to the user functions invoked by GC_do_blocking().  */
+  GC_INNER void GC_push_all_stack_frames(ptr_t lo, ptr_t hi,
+                        struct GC_activation_frame_s *activation_frame);
+  GC_EXTERN word GC_total_stacksize; /* updated on every push_all_stacks */
+#else
+  GC_EXTERN ptr_t GC_blocked_sp;
+  GC_EXTERN struct GC_activation_frame_s *GC_activation_frame;
+                        /* Points to the "frame" data held in stack by  */
+                        /* the innermost GC_call_with_gc_active().      */
+                        /* NULL if no such "frame" active.              */
+#endif /* !THREADS */
+
+#ifdef IA64
+  /* Similar to GC_push_all_stack_frames() but for IA-64 registers store. */
+  GC_INNER void GC_push_all_register_frames(ptr_t bs_lo, ptr_t bs_hi,
+                   int eager, struct GC_activation_frame_s *activation_frame);
 #endif
 
 /*  Marks are in a reserved area in                          */
@@ -1258,11 +1368,11 @@ extern long GC_large_alloc_warn_suppressed;
 /*  with it. Only those corresponding to the beginning of an */
 /*  object are used.                                         */
 
-/* Set mark bit correctly, even if mark bits may be concurrently       */
-/* accessed.                                                           */
+/* Set mark bit correctly, even if mark bits may be concurrently        */
+/* accessed.                                                            */
 #ifdef PARALLEL_MARK
 # define OR_WORD(addr, bits) \
-       { AO_or((volatile AO_t *)(addr), (AO_t)bits); }
+        { AO_or((volatile AO_t *)(addr), (AO_t)bits); }
 #else
 # define OR_WORD(addr, bits) *(addr) |= (bits)
 #endif
@@ -1282,370 +1392,318 @@ extern long GC_large_alloc_warn_suppressed;
 # define clear_mark_bit_from_hdr(hhdr,n) ((hhdr)->hb_marks[n]) = 0
 #else /* !USE_MARK_BYTES */
 # define mark_bit_from_hdr(hhdr,n) (((hhdr)->hb_marks[divWORDSZ(n)] \
-                           >> (modWORDSZ(n))) & (word)1)
+                            >> (modWORDSZ(n))) & (word)1)
 # define set_mark_bit_from_hdr(hhdr,n) \
-                           OR_WORD((hhdr)->hb_marks+divWORDSZ(n), \
-                                   (word)1 << modWORDSZ(n))
+                            OR_WORD((hhdr)->hb_marks+divWORDSZ(n), \
+                                    (word)1 << modWORDSZ(n))
 # define clear_mark_bit_from_hdr(hhdr,n) (hhdr)->hb_marks[divWORDSZ(n)] \
-                               &= ~((word)1 << modWORDSZ(n))
+                                &= ~((word)1 << modWORDSZ(n))
 #endif /* !USE_MARK_BYTES */
 
 #ifdef MARK_BIT_PER_OBJ
 #  define MARK_BIT_NO(offset, sz) (((unsigned)(offset))/(sz))
-       /* Get the mark bit index corresponding to the given byte       */
-       /* offset and size (in bytes).                                  */
+        /* Get the mark bit index corresponding to the given byte       */
+        /* offset and size (in bytes).                                  */
 #  define MARK_BIT_OFFSET(sz) 1
-       /* Spacing between useful mark bits.                            */
+        /* Spacing between useful mark bits.                            */
 #  define IF_PER_OBJ(x) x
 #  define FINAL_MARK_BIT(sz) ((sz) > MAXOBJBYTES? 1 : HBLK_OBJS(sz))
-       /* Position of final, always set, mark bit.                     */
+        /* Position of final, always set, mark bit.                     */
 #else /* MARK_BIT_PER_GRANULE */
 #  define MARK_BIT_NO(offset, sz) BYTES_TO_GRANULES((unsigned)(offset))
 #  define MARK_BIT_OFFSET(sz) BYTES_TO_GRANULES(sz)
 #  define IF_PER_OBJ(x)
 #  define FINAL_MARK_BIT(sz) \
-       ((sz) > MAXOBJBYTES? MARK_BITS_PER_HBLK \
-                       : BYTES_TO_GRANULES(sz * HBLK_OBJS(sz)))
+        ((sz) > MAXOBJBYTES? MARK_BITS_PER_HBLK \
+                        : BYTES_TO_GRANULES((sz) * HBLK_OBJS(sz)))
 #endif
 
 /* Important internal collector routines */
 
-ptr_t GC_approx_sp(void);
-  
-GC_bool GC_should_collect(void);
-  
-void GC_apply_to_all_blocks(void (*fn) (struct hblk *h, word client_data),
-                           word client_data);
-                       /* Invoke fn(hbp, client_data) for each         */
-                       /* allocated heap block.                        */
-struct hblk * GC_next_used_block(struct hblk * h);
-                       /* Return first in-use block >= h       */
-struct hblk * GC_prev_block(struct hblk * h);
-                       /* Return last block <= h.  Returned block      */
-                       /* is managed by GC, but may or may not be in   */
-                       /* use.                                         */
-void GC_mark_init(void);
-void GC_clear_marks(void);     /* Clear mark bits for all heap objects. */
-void GC_invalidate_mark_state(void);
-                                       /* Tell the marker that marked     */
-                                       /* objects may point to unmarked   */
-                                       /* ones, and roots may point to    */
-                                       /* unmarked objects.               */
-                                       /* Reset mark stack.               */
-GC_bool GC_mark_stack_empty(void);
-GC_bool GC_mark_some(ptr_t cold_gc_frame);
-                       /* Perform about one pages worth of marking     */
-                       /* work of whatever kind is needed.  Returns    */
-                       /* quickly if no collection is in progress.     */
-                       /* Return TRUE if mark phase finished.          */
-void GC_initiate_gc(void);
-                               /* initiate collection.                 */
-                               /* If the mark state is invalid, this   */
-                               /* becomes full collection.  Otherwise  */
-                               /* it's partial.                        */
-void GC_push_all(ptr_t bottom, ptr_t top);
-                               /* Push everything in a range           */
-                               /* onto mark stack.                     */
-void GC_push_selected(ptr_t bottom, ptr_t top,
-                     int (*dirty_fn) (struct hblk *h),
-                     void (*push_fn) (ptr_t bottom, ptr_t top) );
-                                 /* Push all pages h in [b,t) s.t.     */
-                                 /* select_fn(h) != 0 onto mark stack. */
-#ifndef SMALL_CONFIG
-  void GC_push_conditional (ptr_t b, ptr_t t, GC_bool all);
+GC_INNER ptr_t GC_approx_sp(void);
+
+GC_INNER GC_bool GC_should_collect(void);
+
+void GC_apply_to_all_blocks(void (*fn)(struct hblk *h, word client_data),
+                            word client_data);
+                        /* Invoke fn(hbp, client_data) for each         */
+                        /* allocated heap block.                        */
+GC_INNER struct hblk * GC_next_used_block(struct hblk * h);
+                        /* Return first in-use block >= h       */
+GC_INNER struct hblk * GC_prev_block(struct hblk * h);
+                        /* Return last block <= h.  Returned block      */
+                        /* is managed by GC, but may or may not be in   */
+                        /* use.                                         */
+GC_INNER void GC_mark_init(void);
+GC_INNER void GC_clear_marks(void);
+                        /* Clear mark bits for all heap objects.        */
+GC_INNER void GC_invalidate_mark_state(void);
+                                /* Tell the marker that marked          */
+                                /* objects may point to unmarked        */
+                                /* ones, and roots may point to         */
+                                /* unmarked objects.  Reset mark stack. */
+GC_INNER GC_bool GC_mark_stack_empty(void);
+GC_INNER GC_bool GC_mark_some(ptr_t cold_gc_frame);
+                        /* Perform about one pages worth of marking     */
+                        /* work of whatever kind is needed.  Returns    */
+                        /* quickly if no collection is in progress.     */
+                        /* Return TRUE if mark phase finished.          */
+GC_INNER void GC_initiate_gc(void);
+                                /* initiate collection.                 */
+                                /* If the mark state is invalid, this   */
+                                /* becomes full collection.  Otherwise  */
+                                /* it's partial.                        */
+
+GC_INNER GC_bool GC_collection_in_progress(void);
+                        /* Collection is in progress, or was abandoned. */
+
+GC_INNER void GC_push_all(ptr_t bottom, ptr_t top);
+                                /* Push everything in a range           */
+                                /* onto mark stack.                     */
+#ifndef GC_DISABLE_INCREMENTAL
+  GC_INNER void GC_push_conditional(ptr_t b, ptr_t t, GC_bool all);
 #else
 # define GC_push_conditional(b, t, all) GC_push_all(b, t)
 #endif
-                                /* Do either of the above, depending   */
-                               /* on the third arg.                    */
-void GC_push_all_stack (ptr_t b, ptr_t t);
-                                   /* As above, but consider           */
-                                   /*  interior pointers as valid      */
-void GC_push_all_eager (ptr_t b, ptr_t t);
-                                   /* Same as GC_push_all_stack, but   */
-                                   /* ensures that stack is scanned    */
-                                   /* immediately, not just scheduled  */
-                                   /* for scanning.                    */
-#ifndef THREADS
-  void GC_push_all_stack_partially_eager(ptr_t bottom, ptr_t top,
-                                        ptr_t cold_gc_frame);
-                       /* Similar to GC_push_all_eager, but only the   */
-                       /* part hotter than cold_gc_frame is scanned    */
-                       /* immediately.  Needed to ensure that callee-  */
-                       /* save registers are not missed.               */
-#else
-  /* In the threads case, we push part of the current thread stack     */
+                                /* Do either of the above, depending    */
+                                /* on the third arg.                    */
+GC_INNER void GC_push_all_stack(ptr_t b, ptr_t t);
+                                    /* As above, but consider           */
+                                    /*  interior pointers as valid      */
+GC_INNER void GC_push_all_eager(ptr_t b, ptr_t t);
+                                    /* Same as GC_push_all_stack, but   */
+                                    /* ensures that stack is scanned    */
+                                    /* immediately, not just scheduled  */
+                                    /* for scanning.                    */
+
+  /* In the threads case, we push part of the current thread stack      */
   /* with GC_push_all_eager when we push the registers.  This gets the  */
-  /* callee-save registers that may disappear.  The remainder of the   */
-  /* stacks are scheduled for scanning in *GC_push_other_roots, which  */
-  /* is thread-package-specific.                                       */
-#endif
-void GC_push_roots(GC_bool all, ptr_t cold_gc_frame);
-                       /* Push all or dirty roots.     */
-extern void (*GC_push_other_roots)(void);
-                       /* Push system or application specific roots    */
-                       /* onto the mark stack.  In some environments   */
-                       /* (e.g. threads environments) this is          */
-                       /* predefined to be non-zero.  A client         */
-                       /* supplied replacement should also call the    */
-                       /* original function.                           */
-
-       extern void GC_push_finalizer_structures(void);
-       extern void GC_push_stubborn_structures (void);
-#      ifdef THREADS
-         extern void GC_push_thread_structures (void);
-#      endif
-       extern void (*GC_push_typed_structures) (void);
-                       /* A pointer such that we can avoid linking in  */
-                       /* the typed allocation support if unused.      */
-extern void (*GC_start_call_back) (void);
-                       /* Called at start of full collections.         */
-                       /* Not called if 0.  Called with allocation     */
-                       /* lock held.                                   */
-                       /* 0 by default.                                */
-
-void GC_push_regs(void);
-
-void GC_with_callee_saves_pushed(void (*fn)(ptr_t, void *),
-                                ptr_t arg);
-
-# if defined(SPARC) || defined(IA64)
-  /* Cause all stacked registers to be saved in memory.  Return a      */
-  /* pointer to the top of the corresponding memory stack.             */
+  /* callee-save registers that may disappear.  The remainder of the    */
+  /* stacks are scheduled for scanning in *GC_push_other_roots, which   */
+  /* is thread-package-specific.                                        */
+
+GC_INNER void GC_push_roots(GC_bool all, ptr_t cold_gc_frame);
+                                        /* Push all or dirty roots.     */
+
+GC_EXTERN void (*GC_push_other_roots)(void);
+                        /* Push system or application specific roots    */
+                        /* onto the mark stack.  In some environments   */
+                        /* (e.g. threads environments) this is          */
+                        /* predefined to be non-zero.  A client         */
+                        /* supplied replacement should also call the    */
+                        /* original function.                           */
+
+GC_INNER void GC_push_finalizer_structures(void);
+#ifdef THREADS
+  void GC_push_thread_structures(void);
+#endif
+GC_EXTERN void (*GC_push_typed_structures)(void);
+                        /* A pointer such that we can avoid linking in  */
+                        /* the typed allocation support if unused.      */
+
+GC_INNER void GC_with_callee_saves_pushed(void (*fn)(ptr_t, void *),
+                                          ptr_t arg);
+
+#if defined(SPARC) || defined(IA64)
+  /* Cause all stacked registers to be saved in memory.  Return a       */
+  /* pointer to the top of the corresponding memory stack.              */
   ptr_t GC_save_regs_in_stack(void);
-# endif
-                       /* Push register contents onto mark stack.      */
-                       /* If NURSERY is defined, the default push      */
-                       /* action can be overridden with GC_push_proc   */
+#endif
+                        /* Push register contents onto mark stack.      */
 
-# ifdef NURSERY
-    extern void (*GC_push_proc)(ptr_t);
-# endif
-# if defined(MSWIN32) || defined(MSWINCE)
+#if defined(MSWIN32) || defined(MSWINCE)
   void __cdecl GC_push_one(word p);
-# else
+#else
   void GC_push_one(word p);
-                             /* If p points to an object, mark it    */
+                              /* If p points to an object, mark it    */
                               /* and push contents on the mark stack  */
-                             /* Pointer recognition test always      */
-                             /* accepts interior pointers, i.e. this */
-                             /* is appropriate for pointers found on */
-                             /* stack.                               */
-# endif
-# if defined(PRINT_BLACK_LIST) || defined(KEEP_BACK_PTRS)
-  void GC_mark_and_push_stack(ptr_t p, ptr_t source);
-                               /* Ditto, omits plausibility test       */
-# else
-  void GC_mark_and_push_stack(ptr_t p);
-# endif
-void GC_push_marked(struct hblk * h, hdr * hhdr);
-               /* Push contents of all marked objects in h onto        */
-               /* mark stack.                                          */
-#ifdef SMALL_CONFIG
-# define GC_push_next_marked_dirty(h) GC_push_next_marked(h)
+                              /* Pointer recognition test always      */
+                              /* accepts interior pointers, i.e. this */
+                              /* is appropriate for pointers found on */
+                              /* stack.                               */
+#endif
+
+#if defined(PRINT_BLACK_LIST) || defined(KEEP_BACK_PTRS)
+  GC_INNER void GC_mark_and_push_stack(ptr_t p, ptr_t source);
+                                /* Ditto, omits plausibility test       */
 #else
-  struct hblk * GC_push_next_marked_dirty(struct hblk * h);
-               /* Invoke GC_push_marked on next dirty block above h.   */
-               /* Return a pointer just past the end of this block.    */
-#endif /* !SMALL_CONFIG */
-struct hblk * GC_push_next_marked(struct hblk * h);
-               /* Ditto, but also mark from clean pages.       */
-struct hblk * GC_push_next_marked_uncollectable(struct hblk * h);
-               /* Ditto, but mark only from uncollectable pages.       */
-void GC_clear_hdr_marks(hdr * hhdr);
-                                   /* Clear the mark bits in a header */
-void GC_set_hdr_marks(hdr * hhdr);
-                                   /* Set the mark bits in a header */
-void GC_set_fl_marks(ptr_t p);
-                                   /* Set all mark bits associated with */
-                                   /* a free list.                      */
+  GC_INNER void GC_mark_and_push_stack(ptr_t p);
+#endif
+
+GC_INNER void GC_clear_hdr_marks(hdr * hhdr);
+                                    /* Clear the mark bits in a header */
+GC_INNER void GC_set_hdr_marks(hdr * hhdr);
+                                    /* Set the mark bits in a header */
+GC_INNER void GC_set_fl_marks(ptr_t p);
+                                    /* Set all mark bits associated with */
+                                    /* a free list.                      */
 #ifdef GC_ASSERTIONS
   void GC_check_fl_marks(ptr_t p);
-                                   /* Check that  all mark bits        */
-                                   /* associated with a free list are  */
-                                   /* set.  Abort if not.              */
+                                    /* Check that all mark bits         */
+                                    /* associated with a free list are  */
+                                    /* set.  Abort if not.              */
 #endif
 void GC_add_roots_inner(ptr_t b, ptr_t e, GC_bool tmp);
-void GC_remove_roots_inner(ptr_t b, ptr_t e);
-GC_bool GC_is_static_root(ptr_t p);
-               /* Is the address p in one of the registered static     */
-               /* root sections?                                       */
-# if defined(MSWIN32) || defined(_WIN32_WCE_EMULATION)
-GC_bool GC_is_tmp_root(ptr_t p);
-               /* Is the address p in one of the temporary static      */
-               /* root sections?                                       */
-# endif
-void GC_register_dynamic_libraries(void);
-               /* Add dynamic library data sections to the root set. */
-void GC_cond_register_dynamic_libraries(void);
-               /* Remove and reregister dynamic libraries if we're     */
-               /* configured to do that at each GC.                    */
-
-GC_bool GC_register_main_static_data(void);
-               /* We need to register the main data segment.  Returns  */
-               /* TRUE unless this is done implicitly as part of       */
-               /* dynamic library registration.                        */
-  
+GC_INNER void GC_exclude_static_roots_inner(void *start, void *finish);
+GC_INNER void GC_register_dynamic_libraries(void);
+                /* Add dynamic library data sections to the root set. */
+GC_INNER void GC_cond_register_dynamic_libraries(void);
+                /* Remove and reregister dynamic libraries if we're     */
+                /* configured to do that at each GC.                    */
+
 /* Machine dependent startup routines */
-ptr_t GC_get_main_stack_base(void);    /* Cold end of stack */
+ptr_t GC_get_main_stack_base(void);     /* Cold end of stack.           */
 #ifdef IA64
-  ptr_t GC_get_register_stack_base(void);
-                                       /* Cold end of register stack.  */
+  GC_INNER ptr_t GC_get_register_stack_base(void);
+                                        /* Cold end of register stack.  */
 #endif
 void GC_register_data_segments(void);
-  
+
+#ifdef THREADS
+  GC_INNER void GC_thr_init(void);
+  GC_INNER void GC_init_parallel(void);
+#else
+  GC_INNER GC_bool GC_is_static_root(ptr_t p);
+                /* Is the address p in one of the registered static     */
+                /* root sections?                                       */
+#endif
+
 /* Black listing: */
-void GC_bl_init(void);
+GC_INNER void GC_bl_init(void);
 # ifdef PRINT_BLACK_LIST
-      void GC_add_to_black_list_normal(word p, ptr_t source);
-                       /* Register bits as a possible future false     */
-                       /* reference from the heap or static data       */
+      GC_INNER void GC_add_to_black_list_normal(word p, ptr_t source);
+                        /* Register bits as a possible future false     */
+                        /* reference from the heap or static data       */
 #     define GC_ADD_TO_BLACK_LIST_NORMAL(bits, source) \
-               if (GC_all_interior_pointers) { \
-                 GC_add_to_black_list_stack((word)(bits), (source)); \
-               } else { \
-                 GC_add_to_black_list_normal((word)(bits), (source)); \
-               }
+                if (GC_all_interior_pointers) { \
+                  GC_add_to_black_list_stack((word)(bits), (source)); \
+                } else { \
+                  GC_add_to_black_list_normal((word)(bits), (source)); \
+                }
 # else
-      void GC_add_to_black_list_normal(word p);
+      GC_INNER void GC_add_to_black_list_normal(word p);
 #     define GC_ADD_TO_BLACK_LIST_NORMAL(bits, source) \
-               if (GC_all_interior_pointers) { \
-                 GC_add_to_black_list_stack((word)(bits)); \
-               } else { \
-                 GC_add_to_black_list_normal((word)(bits)); \
-               }
+                if (GC_all_interior_pointers) { \
+                  GC_add_to_black_list_stack((word)(bits)); \
+                } else { \
+                  GC_add_to_black_list_normal((word)(bits)); \
+                }
 # endif
 
 # ifdef PRINT_BLACK_LIST
-    void GC_add_to_black_list_stack(word p, ptr_t source);
+    GC_INNER void GC_add_to_black_list_stack(word p, ptr_t source);
 #   define GC_ADD_TO_BLACK_LIST_STACK(bits, source) \
-           GC_add_to_black_list_stack((word)(bits), (source))
+            GC_add_to_black_list_stack((word)(bits), (source))
 # else
-    void GC_add_to_black_list_stack(word p);
+    GC_INNER void GC_add_to_black_list_stack(word p);
 #   define GC_ADD_TO_BLACK_LIST_STACK(bits, source) \
-           GC_add_to_black_list_stack((word)(bits))
-# endif
-struct hblk * GC_is_black_listed(struct hblk * h, word len);
-                       /* If there are likely to be false references   */
-                       /* to a block starting at h of the indicated    */
-                       /* length, then return the next plausible       */
-                       /* starting location for h that might avoid     */
-                       /* these false references.                      */
-void GC_promote_black_lists(void);
-                       /* Declare an end to a black listing phase.     */
-void GC_unpromote_black_lists(void);
-                       /* Approximately undo the effect of the above.  */
-                       /* This actually loses some information, but    */
-                       /* only in a reasonably safe way.               */
-word GC_number_stack_black_listed(struct hblk *start, struct hblk *endp1);
-                       /* Return the number of (stack) blacklisted     */
-                       /* blocks in the range for statistical          */
-                       /* purposes.                                    */
-                       
-ptr_t GC_scratch_alloc(size_t bytes);
-                               /* GC internal memory allocation for    */
-                               /* small objects.  Deallocation is not  */
-                               /* possible.                            */
-       
-/* Heap block layout maps: */                  
-GC_bool GC_add_map_entry(size_t sz);
-                               /* Add a heap block map for objects of  */
-                               /* size sz to obj_map.                  */
-                               /* Return FALSE on failure.             */
-void GC_register_displacement_inner(size_t offset);
-                               /* Version of GC_register_displacement  */
-                               /* that assumes lock is already held.   */
-
-void GC_initialize_offsets(void);
-                               /* Initialize GC_valid_offsets,         */
-                               /* depending on current                 */
-                               /* GC_all_interior_pointers settings.   */
-  
-/*  hblk allocation: */                
-void GC_new_hblk(size_t size_in_granules, int kind);
-                               /* Allocate a new heap block, and build */
-                               /* a free list in it.                   */                              
-
-ptr_t GC_build_fl(struct hblk *h, size_t words, GC_bool clear, ptr_t list);
-                               /* Build a free list for objects of     */
-                               /* size sz in block h.  Append list to  */
-                               /* end of the free lists.  Possibly     */
-                               /* clear objects on the list.  Normally */
-                               /* called by GC_new_hblk, but also      */
-                               /* called explicitly without GC lock.   */
-
-struct hblk * GC_allochblk (size_t size_in_bytes, int kind,
-                           unsigned flags);
-                               /* Allocate a heap block, inform        */
-                               /* the marker that block is valid       */
-                               /* for objects of indicated size.       */
-
-ptr_t GC_alloc_large (size_t lb, int k, unsigned flags);
-                       /* Allocate a large block of size lb bytes.     */
-                       /* The block is not cleared.                    */
-                       /* Flags is 0 or IGNORE_OFF_PAGE.               */
-                       /* Calls GC_allchblk to do the actual           */
-                       /* allocation, but also triggers GC and/or      */
-                       /* heap expansion as appropriate.               */
-                       /* Does not update GC_bytes_allocd, but does    */
-                       /* other accounting.                            */
-
-ptr_t GC_alloc_large_and_clear(size_t lb, int k, unsigned flags);
-                       /* As above, but clear block if appropriate     */
-                       /* for kind k.                                  */
-
-void GC_freehblk(struct hblk * p);
-                               /* Deallocate a heap block and mark it  */
-                               /* as invalid.                          */
-                               
+            GC_add_to_black_list_stack((word)(bits))
+# endif
+GC_INNER struct hblk * GC_is_black_listed(struct hblk * h, word len);
+                        /* If there are likely to be false references   */
+                        /* to a block starting at h of the indicated    */
+                        /* length, then return the next plausible       */
+                        /* starting location for h that might avoid     */
+                        /* these false references.                      */
+GC_INNER void GC_promote_black_lists(void);
+                        /* Declare an end to a black listing phase.     */
+GC_INNER void GC_unpromote_black_lists(void);
+                        /* Approximately undo the effect of the above.  */
+                        /* This actually loses some information, but    */
+                        /* only in a reasonably safe way.               */
+
+GC_INNER ptr_t GC_scratch_alloc(size_t bytes);
+                                /* GC internal memory allocation for    */
+                                /* small objects.  Deallocation is not  */
+                                /* possible.                            */
+
+/* Heap block layout maps: */
+GC_INNER GC_bool GC_add_map_entry(size_t sz);
+                                /* Add a heap block map for objects of  */
+                                /* size sz to obj_map.                  */
+                                /* Return FALSE on failure.             */
+GC_INNER void GC_register_displacement_inner(size_t offset);
+                                /* Version of GC_register_displacement  */
+                                /* that assumes lock is already held.   */
+
+GC_INNER void GC_initialize_offsets(void);
+                                /* Initialize GC_valid_offsets,         */
+                                /* depending on current                 */
+                                /* GC_all_interior_pointers settings.   */
+
+/*  hblk allocation: */
+GC_INNER void GC_new_hblk(size_t size_in_granules, int kind);
+                                /* Allocate a new heap block, and build */
+                                /* a free list in it.                   */
+
+GC_INNER ptr_t GC_build_fl(struct hblk *h, size_t words, GC_bool clear,
+                           ptr_t list);
+                                /* Build a free list for objects of     */
+                                /* size sz in block h.  Append list to  */
+                                /* end of the free lists.  Possibly     */
+                                /* clear objects on the list.  Normally */
+                                /* called by GC_new_hblk, but also      */
+                                /* called explicitly without GC lock.   */
+
+GC_INNER struct hblk * GC_allochblk(size_t size_in_bytes, int kind,
+                                    unsigned flags);
+                                /* Allocate a heap block, inform        */
+                                /* the marker that block is valid       */
+                                /* for objects of indicated size.       */
+
+GC_INNER ptr_t GC_alloc_large(size_t lb, int k, unsigned flags);
+                        /* Allocate a large block of size lb bytes.     */
+                        /* The block is not cleared.                    */
+                        /* Flags is 0 or IGNORE_OFF_PAGE.               */
+                        /* Calls GC_allchblk to do the actual           */
+                        /* allocation, but also triggers GC and/or      */
+                        /* heap expansion as appropriate.               */
+                        /* Does not update GC_bytes_allocd, but does    */
+                        /* other accounting.                            */
+
+GC_INNER void GC_freehblk(struct hblk * p);
+                                /* Deallocate a heap block and mark it  */
+                                /* as invalid.                          */
+
 /*  Misc GC: */
-void GC_init_inner(void);
-GC_bool GC_expand_hp_inner(word n);
-void GC_start_reclaim(int abort_if_found);
-                               /* Restore unmarked objects to free     */
-                               /* lists, or (if abort_if_found is      */
-                               /* TRUE) report them.                   */
-                               /* Sweeping of small object pages is    */
-                               /* largely deferred.                    */
-void GC_continue_reclaim(size_t sz, int kind);
-                               /* Sweep pages of the given size and    */
-                               /* kind, as long as possible, and       */
-                               /* as long as the corr. free list is    */
-                               /* empty.  Sz is in granules.           */
-void GC_reclaim_or_delete_all(void);
-                               /* Arrange for all reclaim lists to be  */
-                               /* empty.  Judiciously choose between   */
-                               /* sweeping and discarding each page.   */
-GC_bool GC_reclaim_all(GC_stop_func stop_func, GC_bool ignore_old);
-                               /* Reclaim all blocks.  Abort (in a     */
-                               /* consistent state) if f returns TRUE. */
-ptr_t GC_reclaim_generic(struct hblk * hbp, hdr *hhdr, size_t sz,
-                        GC_bool init, ptr_t list, signed_word *count);
-                               /* Rebuild free list in hbp with        */
-                               /* header hhdr, with objects of size sz */
-                               /* bytes.  Add list to the end of the   */
-                               /* free list.  Add the number of        */
-                               /* reclaimed bytes to *count.           */
-GC_bool GC_block_empty(hdr * hhdr);
-                               /* Block completely unmarked?   */
-GC_bool GC_CALLBACK GC_never_stop_func(void);
-                               /* Returns FALSE.               */
-GC_bool GC_try_to_collect_inner(GC_stop_func f);
-
-                               /* Collect; caller must have acquired   */
-                               /* lock.  Collection is aborted if f    */
-                               /* returns TRUE.  Returns TRUE if it    */
-                               /* completes successfully.              */
+GC_INNER GC_bool GC_expand_hp_inner(word n);
+GC_INNER void GC_start_reclaim(int abort_if_found);
+                                /* Restore unmarked objects to free     */
+                                /* lists, or (if abort_if_found is      */
+                                /* TRUE) report them.                   */
+                                /* Sweeping of small object pages is    */
+                                /* largely deferred.                    */
+GC_INNER void GC_continue_reclaim(size_t sz, int kind);
+                                /* Sweep pages of the given size and    */
+                                /* kind, as long as possible, and       */
+                                /* as long as the corr. free list is    */
+                                /* empty.  Sz is in granules.           */
+
+GC_INNER GC_bool GC_reclaim_all(GC_stop_func stop_func, GC_bool ignore_old);
+                                /* Reclaim all blocks.  Abort (in a     */
+                                /* consistent state) if f returns TRUE. */
+GC_INNER ptr_t GC_reclaim_generic(struct hblk * hbp, hdr *hhdr, size_t sz,
+                                  GC_bool init, ptr_t list,
+                                  signed_word *count);
+                                /* Rebuild free list in hbp with        */
+                                /* header hhdr, with objects of size sz */
+                                /* bytes.  Add list to the end of the   */
+                                /* free list.  Add the number of        */
+                                /* reclaimed bytes to *count.           */
+GC_INNER GC_bool GC_block_empty(hdr * hhdr);
+                                /* Block completely unmarked?   */
+GC_INNER int GC_CALLBACK GC_never_stop_func(void);
+                                /* Always returns 0 (FALSE).            */
+GC_INNER GC_bool GC_try_to_collect_inner(GC_stop_func f);
+
+                                /* Collect; caller must have acquired   */
+                                /* lock.  Collection is aborted if f    */
+                                /* returns TRUE.  Returns TRUE if it    */
+                                /* completes successfully.              */
 # define GC_gcollect_inner() \
-       (void) GC_try_to_collect_inner(GC_never_stop_func)
-GC_bool GC_collect_or_expand(word needed_blocks, GC_bool ignore_off_page);
-                               /* Collect or expand heap in an attempt */
-                               /* make the indicated number of free    */
-                               /* blocks available.  Should be called  */
-                               /* until the blocks are available or    */
-                               /* until it fails by returning FALSE.   */
+                (void)GC_try_to_collect_inner(GC_never_stop_func)
 
-extern GC_bool GC_is_initialized;      /* GC_init() has been run.      */
+GC_EXTERN GC_bool GC_is_initialized; /* GC_init() has been run. */
 
 #if defined(MSWIN32) || defined(MSWINCE)
   void GC_deinit(void);
@@ -1653,169 +1711,169 @@ extern GC_bool GC_is_initialized;     /* GC_init() has been run.      */
                                 /* GC_init                              */
 #endif
 
-void GC_collect_a_little_inner(int n);
-                               /* Do n units worth of garbage          */
-                               /* collection work, if appropriate.     */
-                               /* A unit is an amount appropriate for  */
-                               /* HBLKSIZE bytes of allocation.        */
+GC_INNER void GC_collect_a_little_inner(int n);
+                                /* Do n units worth of garbage          */
+                                /* collection work, if appropriate.     */
+                                /* A unit is an amount appropriate for  */
+                                /* HBLKSIZE bytes of allocation.        */
 /* void * GC_generic_malloc(size_t lb, int k); */
-                               /* Allocate an object of the given      */
-                               /* kind.  By default, there are only    */
-                               /* a few kinds: composite(pointerfree), */
-                               /* atomic, uncollectable, etc.          */
-                               /* We claim it's possible for clever    */
-                               /* client code that understands GC      */
-                               /* internals to add more, e.g. to       */
-                               /* communicate object layout info       */
-                               /* to the collector.                    */
-                               /* The actual decl is in gc_mark.h.     */
-void * GC_generic_malloc_ignore_off_page(size_t b, int k);
-                               /* As above, but pointers past the      */
-                               /* first page of the resulting object   */
-                               /* are ignored.                         */
-void * GC_generic_malloc_inner(size_t lb, int k);
-                               /* Ditto, but I already hold lock, etc. */
-void * GC_generic_malloc_inner_ignore_off_page(size_t lb, int k);
-                               /* Allocate an object, where            */
-                               /* the client guarantees that there     */
-                               /* will always be a pointer to the      */
-                               /* beginning of the object while the    */
-                               /* object is live.                      */
-void GC_generic_malloc_many(size_t lb, int k, void **result);
-                               /* Store a pointer to a list of newly   */
-                               /* allocated objects of kind k and size */
-                               /* lb in *result.                       */
-                               /* Caler must make sure that *result is */
-                               /* traced even if objects are ptrfree.  */
-ptr_t GC_allocobj(size_t sz, int kind);
-                               /* Make the indicated                   */
-                               /* free list nonempty, and return its   */
-                               /* head.  Sz is in granules.            */
-
-/* Allocation routines that bypass the thread local cache.     */
-/* Used internally.                                            */
+                                /* Allocate an object of the given      */
+                                /* kind.  By default, there are only    */
+                                /* a few kinds: composite(pointerfree), */
+                                /* atomic, uncollectable, etc.          */
+                                /* We claim it's possible for clever    */
+                                /* client code that understands GC      */
+                                /* internals to add more, e.g. to       */
+                                /* communicate object layout info       */
+                                /* to the collector.                    */
+                                /* The actual decl is in gc_mark.h.     */
+GC_INNER void * GC_generic_malloc_ignore_off_page(size_t b, int k);
+                                /* As above, but pointers past the      */
+                                /* first page of the resulting object   */
+                                /* are ignored.                         */
+GC_INNER void * GC_generic_malloc_inner(size_t lb, int k);
+                                /* Ditto, but I already hold lock, etc. */
+GC_INNER void * GC_generic_malloc_inner_ignore_off_page(size_t lb, int k);
+                                /* Allocate an object, where            */
+                                /* the client guarantees that there     */
+                                /* will always be a pointer to the      */
+                                /* beginning of the object while the    */
+                                /* object is live.                      */
+
+GC_INNER ptr_t GC_allocobj(size_t sz, int kind);
+                                /* Make the indicated                   */
+                                /* free list nonempty, and return its   */
+                                /* head.  Sz is in granules.            */
+
+GC_INNER void * GC_clear_stack(void *);
+                                /* in misc.c, behaves like identity.    */
+
+/* We make the GC_clear_stack() call a tail one, hoping to get more of  */
+/* the stack.                                                           */
+#define GENERAL_MALLOC(lb,k) \
+    GC_clear_stack(GC_generic_malloc(lb, k))
+#define GENERAL_MALLOC_IOP(lb,k) \
+    GC_clear_stack(GC_generic_malloc_ignore_off_page(lb, k))
+
+/* Allocation routines that bypass the thread local cache.      */
 #ifdef THREAD_LOCAL_ALLOC
-  void * GC_core_malloc(size_t);
-  void * GC_core_malloc_atomic(size_t);
+  GC_INNER void * GC_core_malloc(size_t);
+  GC_INNER void * GC_core_malloc_atomic(size_t);
 # ifdef GC_GCJ_SUPPORT
-    void *GC_core_gcj_malloc(size_t, void *); 
+    GC_INNER void * GC_core_gcj_malloc(size_t, void *);
 # endif
 #endif /* THREAD_LOCAL_ALLOC */
 
-void GC_free_inner(void * p);
-void GC_debug_free_inner(void * p);
-  
-void GC_init_headers(void);
-struct hblkhdr * GC_install_header(struct hblk *h);
-                               /* Install a header for block h.        */
-                               /* Return 0 on failure, or the header   */
-                               /* otherwise.                           */
-GC_bool GC_install_counts(struct hblk * h, size_t sz);
-                               /* Set up forwarding counts for block   */
-                               /* h of size sz.                        */
-                               /* Return FALSE on failure.             */
-void GC_remove_header(struct hblk * h);
-                               /* Remove the header for block h.       */
-void GC_remove_counts(struct hblk * h, size_t sz);
-                               /* Remove forwarding counts for h.      */
-hdr * GC_find_header(ptr_t h); /* Debugging only.              */
-  
-void GC_finalize(void);
-                       /* Perform all indicated finalization actions   */
-                       /* on unmarked objects.                         */
-                       /* Unreachable finalizable objects are enqueued */
-                       /* for processing by GC_invoke_finalizers.      */
-                       /* Invoked with lock.                           */
-
-void GC_notify_or_invoke_finalizers(void);
-                       /* If GC_finalize_on_demand is not set, invoke  */
-                       /* eligible finalizers. Otherwise:              */
-                       /* Call *GC_finalizer_notifier if there are     */
-                       /* finalizers to be run, and we haven't called  */
-                       /* this procedure yet this GC cycle.            */
-
-GC_API void * GC_make_closure(GC_finalization_proc fn, void * data);
-GC_API void GC_CALLBACK GC_debug_invoke_finalizer(void * obj, void * data);
-                       /* Auxiliary fns to make finalization work      */
-                       /* correctly with displaced pointers introduced */
-                       /* by the debugging allocators.                 */
-                       
-void GC_add_to_heap(struct hblk *p, size_t bytes);
-                       /* Add a HBLKSIZE aligned chunk to the heap.    */
+GC_INNER void GC_init_headers(void);
+GC_INNER struct hblkhdr * GC_install_header(struct hblk *h);
+                                /* Install a header for block h.        */
+                                /* Return 0 on failure, or the header   */
+                                /* otherwise.                           */
+GC_INNER GC_bool GC_install_counts(struct hblk * h, size_t sz);
+                                /* Set up forwarding counts for block   */
+                                /* h of size sz.                        */
+                                /* Return FALSE on failure.             */
+GC_INNER void GC_remove_header(struct hblk * h);
+                                /* Remove the header for block h.       */
+GC_INNER void GC_remove_counts(struct hblk * h, size_t sz);
+                                /* Remove forwarding counts for h.      */
+GC_INNER hdr * GC_find_header(ptr_t h);
+
+GC_INNER void GC_finalize(void);
+                        /* Perform all indicated finalization actions   */
+                        /* on unmarked objects.                         */
+                        /* Unreachable finalizable objects are enqueued */
+                        /* for processing by GC_invoke_finalizers.      */
+                        /* Invoked with lock.                           */
+
+GC_INNER void GC_notify_or_invoke_finalizers(void);
+                        /* If GC_finalize_on_demand is not set, invoke  */
+                        /* eligible finalizers. Otherwise:              */
+                        /* Call *GC_finalizer_notifier if there are     */
+                        /* finalizers to be run, and we haven't called  */
+                        /* this procedure yet this GC cycle.            */
+
+GC_INNER void GC_add_to_heap(struct hblk *p, size_t bytes);
+                        /* Add a HBLKSIZE aligned chunk to the heap.    */
 
 #ifdef USE_PROC_FOR_LIBRARIES
-  void GC_add_to_our_memory(ptr_t p, size_t bytes);
-                       /* Add a chunk to GC_our_memory.        */
-                       /* If p == 0, do nothing.               */
+  GC_INNER void GC_add_to_our_memory(ptr_t p, size_t bytes);
+                        /* Add a chunk to GC_our_memory.        */
+                        /* If p == 0, do nothing.               */
 #else
 # define GC_add_to_our_memory(p, bytes)
 #endif
-  
-void GC_print_obj(ptr_t p);
-                       /* P points to somewhere inside an object with  */
-                       /* debugging info.  Print a human readable      */
-                       /* description of the object to stderr.         */
-extern void (*GC_check_heap)(void);
-                       /* Check that all objects in the heap with      */
-                       /* debugging info are intact.                   */
-                       /* Add any that are not to GC_smashed list.     */
-extern void (*GC_print_all_smashed) (void);
-                       /* Print GC_smashed if it's not empty.          */
-                       /* Clear GC_smashed list.                       */
-extern void GC_print_all_errors (void);
-                       /* Print smashed and leaked objects, if any.    */
-                       /* Clear the lists of such objects.             */
-extern void (*GC_print_heap_obj) (ptr_t p);
-                       /* If possible print s followed by a more       */
-                       /* detailed description of the object           */
-                       /* referred to by p.                            */
+
+GC_INNER void GC_print_all_errors(void);
+                        /* Print smashed and leaked objects, if any.    */
+                        /* Clear the lists of such objects.             */
+
+GC_EXTERN void (*GC_check_heap)(void);
+                        /* Check that all objects in the heap with      */
+                        /* debugging info are intact.                   */
+                        /* Add any that are not to GC_smashed list.     */
+GC_EXTERN void (*GC_print_all_smashed)(void);
+                        /* Print GC_smashed if it's not empty.          */
+                        /* Clear GC_smashed list.                       */
+GC_EXTERN void (*GC_print_heap_obj)(ptr_t p);
+                        /* If possible print s followed by a more       */
+                        /* detailed description of the object           */
+                        /* referred to by p.                            */
+
 #if defined(LINUX) && defined(__ELF__) && !defined(SMALL_CONFIG)
-  void GC_print_address_map (void);
-                       /* Print an address map of the process.         */
+  void GC_print_address_map(void);
+                        /* Print an address map of the process.         */
 #endif
 
-extern GC_bool GC_have_errors;  /* We saw a smashed or leaked object.  */
-                               /* Call error printing routine          */
-                               /* occasionally.                        */
+GC_EXTERN GC_bool GC_have_errors; /* We saw a smashed or leaked object. */
+                                  /* Call error printing routine        */
+                                  /* occasionally.                      */
 
 #ifndef SMALL_CONFIG
-  extern int GC_print_stats;   /* Nonzero generates basic GC log.      */
-                               /* VERBOSE generates add'l messages.    */
+  /* GC_print_stats should be visible outside the GC in some cases.     */
+  extern int GC_print_stats;    /* Nonzero generates basic GC log.      */
+                                /* VERBOSE generates add'l messages.    */
 #else
 # define GC_print_stats 0
-       /* Will this keep the message character strings from the executable? */
-       /* It should ...                                                     */
+  /* Will this remove the message character strings from the executable? */
+  /* With a particular level of optimizations, it should...              */
 #endif
 #define VERBOSE 2
 
 #ifndef NO_DEBUGGING
-  extern GC_bool GC_dump_regularly;  /* Generate regular debugging dumps. */
+  GC_EXTERN GC_bool GC_dump_regularly;
+                                /* Generate regular debugging dumps.    */
 # define COND_DUMP if (GC_dump_regularly) GC_dump();
 #else
 # define COND_DUMP
 #endif
 
 #ifdef KEEP_BACK_PTRS
-  extern long GC_backtraces;
-  void GC_generate_random_backtrace_no_gc(void);
+  GC_EXTERN long GC_backtraces;
+  GC_INNER void GC_generate_random_backtrace_no_gc(void);
 #endif
 
-extern GC_bool GC_print_back_height;
+GC_EXTERN GC_bool GC_print_back_height;
 
 #ifdef MAKE_BACK_GRAPH
   void GC_print_back_graph_stats(void);
 #endif
 
-/* Macros used for collector internal allocation.      */
-/* These assume the collector lock is held.            */
+#ifdef THREADS
+  GC_INNER void GC_free_inner(void * p);
+#endif
+
+/* Macros used for collector internal allocation.       */
+/* These assume the collector lock is held.             */
 #ifdef DBG_HDRS_ALL
-    extern void * GC_debug_generic_malloc_inner(size_t lb, int k);
-    extern void * GC_debug_generic_malloc_inner_ignore_off_page(size_t lb,
-                                                               int k);
+    GC_INNER void * GC_debug_generic_malloc_inner(size_t lb, int k);
+    GC_INNER void * GC_debug_generic_malloc_inner_ignore_off_page(size_t lb,
+                                                                  int k);
 #   define GC_INTERNAL_MALLOC GC_debug_generic_malloc_inner
 #   define GC_INTERNAL_MALLOC_IGNORE_OFF_PAGE \
-                GC_debug_generic_malloc_inner_ignore_off_page
+                 GC_debug_generic_malloc_inner_ignore_off_page
 #   ifdef THREADS
+        GC_INNER void GC_debug_free_inner(void * p);
 #       define GC_INTERNAL_FREE GC_debug_free_inner
 #   else
 #       define GC_INTERNAL_FREE GC_debug_free
@@ -1823,7 +1881,7 @@ extern GC_bool GC_print_back_height;
 #else
 #   define GC_INTERNAL_MALLOC GC_generic_malloc_inner
 #   define GC_INTERNAL_MALLOC_IGNORE_OFF_PAGE \
-                GC_generic_malloc_inner_ignore_off_page
+                 GC_generic_malloc_inner_ignore_off_page
 #   ifdef THREADS
 #       define GC_INTERNAL_FREE GC_free_inner
 #   else
@@ -1831,59 +1889,58 @@ extern GC_bool GC_print_back_height;
 #   endif
 #endif
 
-/* Memory unmapping: */
 #ifdef USE_MUNMAP
-  void GC_unmap_old(void);
-  void GC_merge_unmapped(void);
-  void GC_unmap(ptr_t start, size_t bytes);
-  void GC_remap(ptr_t start, size_t bytes);
-  void GC_unmap_gap(ptr_t start1, size_t bytes1, ptr_t start2, size_t bytes2);
-#endif
-
-/* Virtual dirty bit implementation:           */
-/* Each implementation exports the following:  */
-void GC_read_dirty(void);
-                       /* Retrieve dirty bits. */
-GC_bool GC_page_was_dirty(struct hblk *h);
-                       /* Read retrieved dirty bits.   */
-GC_bool GC_page_was_ever_dirty(struct hblk *h);
-                       /* Could the page contain valid heap pointers?  */
-void GC_remove_protection(struct hblk *h, word nblocks,
-                         GC_bool pointerfree);
-                       /* h is about to be written or allocated.  Ensure   */
-                       /* that it's not write protected by the virtual     */
-                       /* dirty bit implementation.                        */
-                       
-void GC_dirty_init(void);
-  
+  /* Memory unmapping: */
+  GC_INNER void GC_unmap_old(void);
+  GC_INNER void GC_merge_unmapped(void);
+  GC_INNER void GC_unmap(ptr_t start, size_t bytes);
+  GC_INNER void GC_remap(ptr_t start, size_t bytes);
+  GC_INNER void GC_unmap_gap(ptr_t start1, size_t bytes1, ptr_t start2,
+                             size_t bytes2);
+#endif
+
+/* Virtual dirty bit implementation:            */
+/* Each implementation exports the following:   */
+GC_INNER void GC_read_dirty(void);
+                        /* Retrieve dirty bits. */
+GC_INNER GC_bool GC_page_was_dirty(struct hblk *h);
+                        /* Read retrieved dirty bits.   */
+GC_INNER void GC_remove_protection(struct hblk *h, word nblocks,
+                                   GC_bool pointerfree);
+                        /* h is about to be written or allocated.  Ensure   */
+                        /* that it's not write protected by the virtual     */
+                        /* dirty bit implementation.                        */
+
+GC_INNER void GC_dirty_init(void);
+
 /* Slow/general mark bit manipulation: */
-GC_API GC_bool GC_is_marked(ptr_t p);
-void GC_clear_mark_bit(ptr_t p);
-void GC_set_mark_bit(ptr_t p);
-  
+GC_API_PRIV GC_bool GC_is_marked(ptr_t p);
+GC_INNER void GC_clear_mark_bit(ptr_t p);
+GC_INNER void GC_set_mark_bit(ptr_t p);
+
 /* Stubborn objects: */
-void GC_read_changed(void);    /* Analogous to GC_read_dirty */
+void GC_read_changed(void); /* Analogous to GC_read_dirty */
 GC_bool GC_page_was_changed(struct hblk * h);
-                               /* Analogous to GC_page_was_dirty */
+                                /* Analogous to GC_page_was_dirty */
 void GC_clean_changing_list(void);
-                               /* Collect obsolete changing list entries */
+                                /* Collect obsolete changing list entries */
 void GC_stubborn_init(void);
-  
+
 /* Debugging print routines: */
 void GC_print_block_list(void);
 void GC_print_hblkfreelist(void);
 void GC_print_heap_sects(void);
 void GC_print_static_roots(void);
-void GC_print_finalization_stats(void);
+GC_INNER void GC_print_finalization_stats(void);
 /* void GC_dump(void); - declared in gc.h */
 
 #ifdef KEEP_BACK_PTRS
-   void GC_store_back_pointer(ptr_t source, ptr_t dest);
-   void GC_marked_for_finalization(ptr_t dest);
+   GC_INNER void GC_store_back_pointer(ptr_t source, ptr_t dest);
+   GC_INNER void GC_marked_for_finalization(ptr_t dest);
 #  define GC_STORE_BACK_PTR(source, dest) GC_store_back_pointer(source, dest)
 #  define GC_MARKED_FOR_FINALIZATION(dest) GC_marked_for_finalization(dest)
 #else
-#  define GC_STORE_BACK_PTR(source, dest) 
+#  define GC_STORE_BACK_PTR(source, dest)
 #  define GC_MARKED_FOR_FINALIZATION(dest)
 #endif
 
@@ -1892,102 +1949,171 @@ void GC_print_finalization_stats(void);
     void GC_noop(void*, ...);
 # else
 #   ifdef __DMC__
-      GC_API void GC_noop(...);
+      void GC_noop(...);
 #   else
-      GC_API void GC_noop();
+      void GC_noop();
 #   endif
 # endif
 
 GC_API void GC_CALL GC_noop1(word);
 
-/* Logging and diagnostic output:      */
-GC_API void GC_printf (const char * format, ...);
-                       /* A version of printf that doesn't allocate,   */
-                       /* 1K total output length.                      */
-                       /* (We use sprintf.  Hopefully that doesn't     */
-                       /* allocate for long arguments.)                */
-GC_API void GC_err_printf(const char * format, ...);
-GC_API void GC_log_printf(const char * format, ...);
+#ifndef GC_ATTR_FORMAT_PRINTF
+# if defined(__GNUC__) && __GNUC__ >= 3
+#   define GC_ATTR_FORMAT_PRINTF(spec_argnum, first_checked) \
+        __attribute__((__format__(__printf__, spec_argnum, first_checked)))
+# else
+#   define GC_ATTR_FORMAT_PRINTF(spec_argnum, first_checked)
+# endif
+#endif
+
+/* Logging and diagnostic output:       */
+GC_API_PRIV void GC_printf(const char * format, ...)
+                        GC_ATTR_FORMAT_PRINTF(1, 2);
+                        /* A version of printf that doesn't allocate,   */
+                        /* 1K total output length.                      */
+                        /* (We use sprintf.  Hopefully that doesn't     */
+                        /* allocate for long arguments.)                */
+GC_API_PRIV void GC_err_printf(const char * format, ...)
+                        GC_ATTR_FORMAT_PRINTF(1, 2);
+GC_API_PRIV void GC_log_printf(const char * format, ...)
+                        GC_ATTR_FORMAT_PRINTF(1, 2);
 void GC_err_puts(const char *s);
-                       /* Write s to stderr, don't buffer, don't add   */
-                       /* newlines, don't ...                          */
+                        /* Write s to stderr, don't buffer, don't add   */
+                        /* newlines, don't ...                          */
 
 #if defined(LINUX) && !defined(SMALL_CONFIG)
-  void GC_err_write(const char *buf, size_t len);
-                       /* Write buf to stderr, don't buffer, don't add */
-                       /* newlines, don't ...                          */
+  GC_INNER void GC_err_write(const char *buf, size_t len);
+                        /* Write buf to stderr, don't buffer, don't add */
+                        /* newlines, don't ...                          */
 #endif
 
+GC_EXTERN unsigned GC_fail_count;
+                        /* How many consecutive GC/expansion failures?  */
+                        /* Reset by GC_allochblk(); defined in alloc.c. */
+
+GC_EXTERN long GC_large_alloc_warn_interval; /* defined in misc.c */
+
+GC_EXTERN signed_word GC_bytes_found;
+                /* Number of reclaimed bytes after garbage collection;  */
+                /* protected by GC lock; defined in reclaim.c.          */
+
+#ifdef USE_MUNMAP
+  GC_EXTERN int GC_unmap_threshold; /* defined in allchblk.c */
+  GC_EXTERN GC_bool GC_force_unmap_on_gcollect; /* defined in misc.c */
+#endif
+
+#ifdef MSWIN32
+  GC_EXTERN GC_bool GC_no_win32_dlls; /* defined in os_dep.c */
+  GC_EXTERN GC_bool GC_wnt;     /* Is Windows NT derivative;    */
+                                /* defined and set in os_dep.c. */
+#endif
+
+#ifdef THREADS
+# if defined(MSWIN32) || defined(MSWINCE)
+    GC_EXTERN CRITICAL_SECTION GC_write_cs; /* defined in misc.c */
+#   ifdef GC_ASSERTIONS
+      GC_EXTERN GC_bool GC_write_disabled;
+                                /* defined in win32_threads.c;  */
+                                /* protected by GC_write_cs.    */
+
+#   endif
+# endif
+# ifdef MPROTECT_VDB
+    GC_EXTERN volatile AO_TS_t GC_fault_handler_lock;
+                                        /* defined in os_dep.c */
+# endif
+# ifdef MSWINCE
+    GC_EXTERN GC_bool GC_dont_query_stack_min;
+                                /* Defined and set in os_dep.c. */
+# endif
+#elif defined(IA64)
+  GC_EXTERN ptr_t GC_save_regs_ret_val; /* defined in mach_dep.c. */
+                        /* Previously set to backing store pointer.     */
+#endif /* !THREADS */
+
+#ifdef THREAD_LOCAL_ALLOC
+  GC_EXTERN GC_bool GC_world_stopped; /* defined in alloc.c */
+#endif
+
+#ifdef GC_GCJ_SUPPORT
+  GC_EXTERN GC_bool GC_gcj_malloc_initialized; /* defined in gcj_mlc.c */
+  GC_EXTERN ptr_t * GC_gcjobjfreelist;
+#endif
 
 # ifdef GC_ASSERTIONS
-#      define GC_ASSERT(expr) if(!(expr)) {\
-               GC_err_printf("Assertion failure: %s:%ld\n", \
-                               __FILE__, (unsigned long)__LINE__); \
-               ABORT("assertion failure"); }
-# else 
-#      define GC_ASSERT(expr)
+#       define GC_ASSERT(expr) if(!(expr)) {\
+                GC_err_printf("Assertion failure: %s:%ld\n", \
+                                __FILE__, (unsigned long)__LINE__); \
+                ABORT("assertion failure"); }
+# else
+#       define GC_ASSERT(expr)
 # endif
 
-/* Check a compile time assertion at compile time.  The error  */
-/* message for failure is a bit baroque, but ...               */
+/* Check a compile time assertion at compile time.  The error   */
+/* message for failure is a bit baroque, but ...                */
 #if defined(mips) && !defined(__GNUC__)
-/* DOB: MIPSPro C gets an internal error taking the sizeof an array type. 
+/* DOB: MIPSPro C gets an internal error taking the sizeof an array type.
    This code works correctly (ugliness is to avoid "unused var" warnings) */
-# define GC_STATIC_ASSERT(expr) do { if (0) { char j[(expr)? 1 : -1]; j[0]='\0'; j[0]=j[0]; } } while(0)
+# define GC_STATIC_ASSERT(expr) \
+    do { if (0) { char j[(expr)? 1 : -1]; j[0]='\0'; j[0]=j[0]; } } while(0)
 #else
 # define GC_STATIC_ASSERT(expr) (void)sizeof(char[(expr)? 1 : -1])
 #endif
 
 # if defined(PARALLEL_MARK)
-    /* We need additional synchronization facilities from the thread   */
-    /* support.  We believe these are less performance critical                */
-    /* than the main garbage collector lock; standard pthreads-based   */
-    /* implementations should be sufficient.                           */
-
-    /* The mark lock and condition variable.  If the GC lock is also   */
-    /* acquired, the GC lock must be acquired first.  The mark lock is */
-    /* used to both protect some variables used by the parallel                */
-    /* marker, and to protect GC_fl_builder_count, below.              */
-    /* GC_notify_all_marker() is called when                           */ 
-    /* the state of the parallel marker changes                                */
-    /* in some significant way (see gc_mark.h for details).  The       */
-    /* latter set of events includes incrementing GC_mark_no.          */
-    /* GC_notify_all_builder() is called when GC_fl_builder_count      */
-    /* reaches 0.                                                      */
-
-     void GC_acquire_mark_lock(void);
-     void GC_release_mark_lock(void);
-     void GC_notify_all_builder(void);
-     void GC_wait_for_reclaim(void);
-
-     extern word GC_fl_builder_count;  /* Protected by mark lock.      */
-
-     void GC_notify_all_marker(void);
-     void GC_wait_marker(void);
-     extern word GC_mark_no;           /* Protected by mark lock.      */
-
-     extern void GC_help_marker(word my_mark_no);
-               /* Try to help out parallel marker for mark cycle       */
-               /* my_mark_no.  Returns if the mark cycle finishes or   */
-               /* was already done, or there was nothing to do for     */
-               /* some other reason.                                   */
+    /* We need additional synchronization facilities from the thread    */
+    /* support.  We believe these are less performance critical         */
+    /* than the main garbage collector lock; standard pthreads-based    */
+    /* implementations should be sufficient.                            */
+
+    GC_EXTERN long GC_markers;  /* Number of mark threads we would like */
+                                /* to have.  Includes the initiating    */
+                                /* thread.  Defined in mark.c.          */
+
+    /* The mark lock and condition variable.  If the GC lock is also    */
+    /* acquired, the GC lock must be acquired first.  The mark lock is  */
+    /* used to both protect some variables used by the parallel         */
+    /* marker, and to protect GC_fl_builder_count, below.               */
+    /* GC_notify_all_marker() is called when                            */
+    /* the state of the parallel marker changes                         */
+    /* in some significant way (see gc_mark.h for details).  The        */
+    /* latter set of events includes incrementing GC_mark_no.           */
+    /* GC_notify_all_builder() is called when GC_fl_builder_count       */
+    /* reaches 0.                                                       */
+
+    GC_INNER void GC_acquire_mark_lock(void);
+    GC_INNER void GC_release_mark_lock(void);
+    GC_INNER void GC_notify_all_builder(void);
+    GC_INNER void GC_wait_for_reclaim(void);
+
+    GC_EXTERN word GC_fl_builder_count;   /* Protected by mark lock.    */
+
+    GC_INNER void GC_notify_all_marker(void);
+    GC_INNER void GC_wait_marker(void);
+    GC_EXTERN word GC_mark_no;            /* Protected by mark lock.    */
+
+    GC_INNER void GC_help_marker(word my_mark_no);
+                /* Try to help out parallel marker for mark cycle       */
+                /* my_mark_no.  Returns if the mark cycle finishes or   */
+                /* was already done, or there was nothing to do for     */
+                /* some other reason.                                   */
 # endif /* PARALLEL_MARK */
 
 # if defined(GC_PTHREADS)
-  /* We define the thread suspension signal here, so that we can refer */
-  /* to it in the dirty bit implementation, if necessary.  Ideally we  */
+  /* We define the thread suspension signal here, so that we can refer  */
+  /* to it in the dirty bit implementation, if necessary.  Ideally we   */
   /* would allocate a (real-time ?) signal using the standard mechanism.*/
-  /* unfortunately, there is no standard mechanism.  (There is one     */
-  /* in Linux glibc, but it's not exported.)  Thus we continue to use  */
-  /* the same hard-coded signals we've always used.                    */
+  /* unfortunately, there is no standard mechanism.  (There is one      */
+  /* in Linux glibc, but it's not exported.)  Thus we continue to use   */
+  /* the same hard-coded signals we've always used.                     */
 #  if !defined(SIG_SUSPEND)
 #   if defined(GC_LINUX_THREADS) || defined(GC_DGUX386_THREADS)
 #    if defined(SPARC) && !defined(SIGPWR)
        /* SPARC/Linux doesn't properly define SIGPWR in <signal.h>.
-        * It is aliased to SIGLOST in asm/signal.h, though.            */
+        * It is aliased to SIGLOST in asm/signal.h, though.             */
 #      define SIG_SUSPEND SIGLOST
 #    else
-       /* Linuxthreads itself uses SIGUSR1 and SIGUSR2.                        */
+       /* Linuxthreads itself uses SIGUSR1 and SIGUSR2.                 */
 #      define SIG_SUSPEND SIGPWR
 #    endif
 #   else  /* !GC_LINUX_THREADS */
@@ -1995,23 +2121,23 @@ void GC_err_puts(const char *s);
 #       define SIG_SUSPEND _SIGRTMIN + 6
 #     else
 #       define SIG_SUSPEND SIGRTMIN + 6
-#     endif       
+#     endif
 #   endif
 #  endif /* !SIG_SUSPEND */
-  
+
 # endif
-     
-/* Some macros for setjmp that works across signal handlers    */
-/* were possible, and a couple of routines to facilitate       */
-/* catching accesses to bad addresses when that's              */
-/* possible/needed.                                            */
+
+/* Some macros for setjmp that works across signal handlers     */
+/* were possible, and a couple of routines to facilitate        */
+/* catching accesses to bad addresses when that's               */
+/* possible/needed.                                             */
 #if defined(UNIX_LIKE) || (defined(NEED_FIND_LIMIT) && defined(CYGWIN32))
 # include <setjmp.h>
 # if defined(SUNOS5SIGS) && !defined(FREEBSD)
 #  include <sys/siginfo.h>
 # endif
-  /* Define SETJMP and friends to be the version that restores */
-  /* the signal mask.                                          */
+  /* Define SETJMP and friends to be the version that restores  */
+  /* the signal mask.                                           */
 # define SETJMP(env) sigsetjmp(env, 1)
 # define LONGJMP(env, val) siglongjmp(env, val)
 # define JMP_BUF sigjmp_buf
@@ -2025,8 +2151,8 @@ void GC_err_puts(const char *s);
 # define JMP_BUF jmp_buf
 #endif
 
-/* Do we need the GC_find_limit machinery to find the end of a         */
-/* data segment.                                               */
+/* Do we need the GC_find_limit machinery to find the end of a  */
+/* data segment.                                                */
 # if defined(HEURISTIC2) || defined(SEARCH_FOR_DATA_START)
 #   define NEED_FIND_LIMIT
 # endif
@@ -2050,7 +2176,7 @@ void GC_err_puts(const char *s);
 
 #if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__) \
     && !defined(NEED_FIND_LIMIT)
-   /* Used by GC_init_netbsd_elf() in os_dep.c.        */
+   /* Used by GC_init_netbsd_elf() in os_dep.c. */
 #  define NEED_FIND_LIMIT
 #endif
 
@@ -2063,13 +2189,42 @@ void GC_err_puts(const char *s);
      defined(USE_PROC_FOR_LIBRARIES) && defined(THREADS)
 JMP_BUF GC_jmp_buf;
 
-/* Set up a handler for address faults which will longjmp to   */
-/* GC_jmp_buf;                                                 */
-extern void GC_setup_temporary_fault_handler(void);
-
-/* Undo the effect of GC_setup_temporary_fault_handler.                */
-extern void GC_reset_fault_handler(void);
-
-# endif /* Need to handle address faults.      */
+/* Set up a handler for address faults which will longjmp to    */
+/* GC_jmp_buf;                                                  */
+GC_INNER void GC_setup_temporary_fault_handler(void);
+
+/* Undo the effect of GC_setup_temporary_fault_handler.         */
+GC_INNER void GC_reset_fault_handler(void);
+
+# endif /* Need to handle address faults.       */
+
+/* Some convenience macros for cancellation support. */
+# if defined(CANCEL_SAFE)
+#   if defined(GC_ASSERTIONS) && (defined(USE_COMPILER_TLS) \
+       || (defined(LINUX) && !defined(ARM32) \
+                && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) \
+       || defined(HPUX) /* and probably others ... */))
+      extern __thread unsigned char GC_cancel_disable_count;
+#     define NEED_CANCEL_DISABLE_COUNT
+#     define INCR_CANCEL_DISABLE() ++GC_cancel_disable_count
+#     define DECR_CANCEL_DISABLE() --GC_cancel_disable_count
+#     define ASSERT_CANCEL_DISABLED() GC_ASSERT(GC_cancel_disable_count > 0)
+#   else
+#     define INCR_CANCEL_DISABLE()
+#     define DECR_CANCEL_DISABLE()
+#     define ASSERT_CANCEL_DISABLED()
+#   endif /* GC_ASSERTIONS & ... */
+#   define DISABLE_CANCEL(state) \
+        { pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &state); \
+          INCR_CANCEL_DISABLE(); }
+#   define RESTORE_CANCEL(state) \
+        { ASSERT_CANCEL_DISABLED(); \
+          pthread_setcancelstate(state, NULL); \
+          DECR_CANCEL_DISABLE(); }
+# else /* !CANCEL_SAFE */
+#   define DISABLE_CANCEL(state)
+#   define RESTORE_CANCEL(state)
+#   define ASSERT_CANCEL_DISABLED()
+# endif /* !CANCEL_SAFE */
 
 # endif /* GC_PRIVATE_H */
index e8c261d69674f7f09382e87a5aed12444ef565cf..ace5472df9d9b65fc302ad4f94b3694b9287f451 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
  * case, a few declarations relying on types declared in gc_priv.h will be
  * omitted.
  */
+
 #ifndef GCCONFIG_H
 
 # define GCCONFIG_H
 
 # ifndef GC_PRIVATE_H
-    /* Fake ptr_t declaration, just to avoid compilation errors.       */
-    /* This avoids many instances if "ifndef GC_PRIVATE_H" below.      */
+    /* Fake ptr_t declaration, just to avoid compilation errors.        */
+    /* This avoids many instances if "ifndef GC_PRIVATE_H" below.       */
     typedef struct GC_undefined_struct * ptr_t;
-#   include <stddef.h> /* For size_t etc. */
+#   include <stddef.h>  /* For size_t etc. */
 # endif
 
-/* Machine dependent parameters.  Some tuning parameters can be found  */
-/* near the top of gc_private.h.                                       */
+/* Machine dependent parameters.  Some tuning parameters can be found   */
+/* near the top of gc_private.h.                                        */
 
 /* Machine specific parts contributed by various people.  See README file. */
 
@@ -69,7 +69,8 @@
 /* Determine the machine type: */
 # if defined(__arm__) || defined(__thumb__)
 #    define ARM32
-#    if !defined(LINUX) && !defined(NETBSD) && !defined(DARWIN)
+#    if !defined(LINUX) && !defined(NETBSD) && !defined(OPENBSD) \
+        && !defined(DARWIN) && !defined(_WIN32) && !defined(__CEGCC__)
 #      define NOSYS
 #      define mach_type_known
 #    endif
@@ -81,6 +82,7 @@
 #    error M68K based HP machines no longer supported.
 # endif
 # if defined(OPENBSD) && defined(m68k)
+     /* FIXME: Should we remove this case? */
 #    define M68K
 #    define mach_type_known
 # endif
 #    define SPARC
 #    define mach_type_known
 # endif
+# if defined(OPENBSD) && defined(__arm__)
+#    define ARM32
+#    define mach_type_known
+# endif
+# if defined(OPENBSD) && defined(__sh__)
+#    define SH
+#    define mach_type_known
+# endif
 # if defined(NETBSD) && (defined(m68k) || defined(__m68k__))
 #    define M68K
 #    define mach_type_known
 #    define SH
 #    define mach_type_known
 # endif
-# if defined(vax)
+# if defined(vax) || defined(__vax__)
 #    define VAX
 #    ifdef ultrix
-#      define ULTRIX
+#       define ULTRIX
 #    else
-#      define BSD
+#       define BSD
 #    endif
 #    define mach_type_known
 # endif
 #    if defined(nec_ews) || defined(_nec_ews)
 #      define EWS4800
 #    endif
-#    if !defined(LINUX) && !defined(EWS4800) && !defined(NETBSD)
+#    if !defined(LINUX) && !defined(EWS4800) && !defined(NETBSD) \
+        && !defined(OPENBSD)
 #      if defined(ultrix) || defined(__ultrix)
-#       define ULTRIX
+#        define ULTRIX
 #      else
-#       define IRIX5   /* or IRIX 6.X */
+#        define IRIX5   /* or IRIX 6.X */
 #      endif
 #    endif /* !LINUX */
 #    if defined(__NetBSD__) && defined(__MIPSEL__)
 #   define mach_type_known
 # endif
 # if defined(_M_XENIX) && defined(_M_SYSV) && defined(_M_I386)
-       /* The above test may need refinement   */
+        /* The above test may need refinement   */
 #   define I386
 #   if defined(_SCO_ELF)
 #     define SCO_ELF
 # if defined(_PA_RISC1_0) || defined(_PA_RISC1_1) || defined(_PA_RISC2_0) \
      || defined(hppa) || defined(__hppa__)
 #   define HP_PA
-#   if !defined(LINUX) && !defined(HPUX)
+#   if !defined(LINUX) && !defined(HPUX) && !defined(OPENBSD)
 #     define HPUX
 #   endif
 #   define mach_type_known
 #    define BEOS
 #    define mach_type_known
 # endif
+# if defined(OPENBSD) && defined(__amd64__)
+#    define X86_64
+#    define mach_type_known
+# endif
 # if defined(LINUX) && (defined(i386) || defined(__i386__))
 #    define I386
 #    define mach_type_known
 # endif
 # if defined(LINUX) && defined(__cris__)
 #    ifndef CRIS
-#      define CRIS
+#       define CRIS
 #    endif
 #    define mach_type_known
 # endif
 # if defined(LINUX) && (defined(powerpc) || defined(__powerpc__) || \
-                       defined(powerpc64) || defined(__powerpc64__))
+                        defined(powerpc64) || defined(__powerpc64__))
 #    define POWERPC
 #    define mach_type_known
 # endif
 # if defined(__alpha) || defined(__alpha__)
 #   define ALPHA
 #   if !defined(LINUX) && !defined(NETBSD) && !defined(OPENBSD) && !defined(FREEBSD)
-#     define OSF1      /* a.k.a Digital Unix */
+#     define OSF1       /* a.k.a Digital Unix */
 #   endif
 #   define mach_type_known
 # endif
 # if defined(_AMIGA) && !defined(AMIGA)
 #   define AMIGA
 # endif
-# ifdef AMIGA 
+# ifdef AMIGA
 #   define M68K
 #   define mach_type_known
 # endif
 #   define MACOS
 #   define mach_type_known
 # endif
+# if defined(__OpenBSD__) && defined(__powerpc__)
+#   define POWERPC
+#   define OPENBSD
+#   define mach_type_known
+# endif
 # if defined(DARWIN)
 #   if defined(__ppc__)  || defined(__ppc64__)
 #    define POWERPC
     /* DGUX defined */
 #   define mach_type_known
 # endif
-# if defined(_WIN32_WCE)
+# if defined(_WIN32_WCE) || defined(__CEGCC__) || defined(__MINGW32CE__)
     /* SH3, SH4, MIPS already defined for corresponding architectures */
 #   if defined(SH3) || defined(SH4)
 #     define SH
 #   endif
-#   if defined(x86)
+#   if defined(x86) || defined(__i386__)
 #     define I386
 #   endif
-#   if defined(ARM)
+#   if defined(_M_ARM) || defined(ARM) || defined(_ARM_)
 #     define ARM32
 #   endif
 #   define MSWINCE
 #   if (defined(_MSDOS) || defined(_MSC_VER)) && (_M_IX86 >= 300) \
         || defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__CYGWIN__)
 #     if defined(__LP64__) || defined(_WIN64)
-#      define X86_64
+#       define X86_64
 #     else
 #       define I386
 #     endif
-#     define MSWIN32   /* or Win64 */
+#     define MSWIN32    /* or Win64 */
 #     define mach_type_known
 #   endif
 #   if defined(_MSC_VER) && defined(_M_IA64)
 #     define IA64
-#     define MSWIN32   /* Really win64, but we don't treat 64-bit      */
-                       /* variants as a different platform.            */
+#     define MSWIN32    /* Really win64, but we don't treat 64-bit      */
+                        /* variants as a different platform.            */
 #   endif
 # endif
 # if defined(__DJGPP__)
 # endif
 # if defined(__pj__)
 #   error PicoJava no longer supported
-    /* The implementation had problems, and I haven't heard of users   */
-    /* in ages.  If you want it resurrected, let me know.              */
+    /* The implementation had problems, and I haven't heard of users    */
+    /* in ages.  If you want it resurrected, let me know.               */
 # endif
 # if defined(__embedded__) && defined(PPC)
 #   define POWERPC
 # endif
 # if defined(__GNU__)
 #   if defined(__i386__)
-/* The Debian Hurd running on generic PC */  
+/* The Debian Hurd running on generic PC */
 #     define  HURD
 #     define  I386
 #     define  mach_type_known
-#    endif 
+#    endif
 # endif
 # if defined(__TANDEM)
     /* Nonstop S-series */
 
 /* Feel free to add more clauses here */
 
-/* Or manually define the machine type here.  A machine type is        */
-/* characterized by the architecture.  Some                            */
-/* machine types are further subdivided by OS.                         */
-/* Macros such as LINUX, FREEBSD, etc. distinguish them.               */
-/* SYSV on an M68K actually means A/UX.                                        */
+/* Or manually define the machine type here.  A machine type is         */
+/* characterized by the architecture.  Some                             */
+/* machine types are further subdivided by OS.                          */
+/* Macros such as LINUX, FREEBSD, etc. distinguish them.                */
+/* SYSV on an M68K actually means A/UX.                                 */
 /* The distinction in these cases is usually the stack starting address */
 # ifndef mach_type_known
 #   error "The collector has not been ported to this machine/OS combination."
 # endif
-                   /* Mapping is: M68K       ==> Motorola 680X0        */
-                   /*             (NEXT, and SYSV (A/UX),              */
-                   /*             MACOS and AMIGA variants)            */
-                   /*             I386       ==> Intel 386             */
-                   /*              (SEQUENT, OS2, SCO, LINUX, NETBSD,  */
-                   /*               FREEBSD, THREE86BSD, MSWIN32,      */
-                   /*               BSDI,SOLARIS, NEXT, other variants)        */
-                    /*             NS32K      ==> Encore Multimax      */
-                    /*             MIPS       ==> R2000 through R14K   */
-                    /*                 (many variants)                 */
-                    /*            VAX        ==> DEC VAX               */
-                    /*                 (BSD, ULTRIX variants)          */
-                    /*            HP_PA      ==> HP9000/700 & /800     */
-                    /*                           HP/UX, LINUX          */
-                   /*             SPARC      ==> SPARC v7/v8/v9        */
-                   /*                  (SOLARIS, LINUX, DRSNX variants)        */
-                   /*             ALPHA      ==> DEC Alpha             */
-                   /*                  (OSF1 and LINUX variants)       */
-                   /*             M88K       ==> Motorola 88XX0        */
-                   /*                  (CX_UX and DGUX)                */
-                   /*             S370       ==> 370-like machine      */
-                   /*                  running Amdahl UTS4             */
+                    /* Mapping is: M68K       ==> Motorola 680X0        */
+                    /*             (NEXT, and SYSV (A/UX),              */
+                    /*             MACOS and AMIGA variants)            */
+                    /*             I386       ==> Intel 386             */
+                    /*              (SEQUENT, OS2, SCO, LINUX, NETBSD,  */
+                    /*               FREEBSD, THREE86BSD, MSWIN32,      */
+                    /*               BSDI,SOLARIS, NEXT, other variants)        */
+                    /*             NS32K      ==> Encore Multimax       */
+                    /*             MIPS       ==> R2000 through R14K    */
+                    /*                  (many variants)                 */
+                    /*             VAX        ==> DEC VAX               */
+                    /*                  (BSD, ULTRIX variants)          */
+                    /*             HP_PA      ==> HP9000/700 & /800     */
+                    /*                            HP/UX, LINUX          */
+                    /*             SPARC      ==> SPARC v7/v8/v9        */
+                    /*                  (SOLARIS, LINUX, DRSNX variants)        */
+                    /*             ALPHA      ==> DEC Alpha             */
+                    /*                  (OSF1 and LINUX variants)       */
+                    /*             M88K       ==> Motorola 88XX0        */
+                    /*                  (CX_UX and DGUX)                */
+                    /*             S370       ==> 370-like machine      */
+                    /*                  running Amdahl UTS4             */
                     /*             S390       ==> 390-like machine      */
-                   /*                  running LINUX                   */
-                   /*             ARM32      ==> Intel StrongARM       */
-                   /*             IA64       ==> Intel IPF             */
-                   /*                            (e.g. Itanium)        */
-                   /*                  (LINUX and HPUX)                */
-                   /*             SH         ==> Hitachi SuperH        */
-                   /*                  (LINUX & MSWINCE)               */
-                   /*             X86_64     ==> AMD x86-64            */
-                   /*             POWERPC    ==> IBM/Apple PowerPC     */
-                   /*                  (MACOS(<=9),DARWIN(incl.MACOSX),*/
-                   /*                   LINUX, NETBSD, AIX, NOSYS      */
-                   /*                   variants)                      */
-                   /*                  Handles 32 and 64-bit variants. */
-                   /*             CRIS       ==> Axis Etrax            */
-                   /*             M32R       ==> Renesas M32R          */
+                    /*                  running LINUX                   */
+                    /*             ARM32      ==> Intel StrongARM       */
+                    /*             IA64       ==> Intel IPF             */
+                    /*                            (e.g. Itanium)        */
+                    /*                  (LINUX and HPUX)                */
+                    /*             SH         ==> Hitachi SuperH        */
+                    /*                  (LINUX & MSWINCE)               */
+                    /*             X86_64     ==> AMD x86-64            */
+                    /*             POWERPC    ==> IBM/Apple PowerPC     */
+                    /*                  (MACOS(<=9),DARWIN(incl.MACOSX),*/
+                    /*                   LINUX, NETBSD, AIX, NOSYS      */
+                    /*                   variants)                      */
+                    /*                  Handles 32 and 64-bit variants. */
+                    /*             CRIS       ==> Axis Etrax            */
+                    /*             M32R       ==> Renesas M32R          */
 
 
 /*
  * For each machine, the following should:
  * 1) define STACK_GROWS_UP if the stack grows toward higher addresses, and
  * 2) define exactly one of
- *     STACKBOTTOM (should be defined to be an expression)
- *     LINUX_STACKBOTTOM
- *     HEURISTIC1
- *     HEURISTIC2
+ *      STACKBOTTOM (should be defined to be an expression)
+ *      LINUX_STACKBOTTOM
+ *      HEURISTIC1
+ *      HEURISTIC2
  * If STACKBOTTOM is defined, then it's value will be used directly as the
  * stack base.  If LINUX_STACKBOTTOM is defined, then it will be determined
  * with a method appropriate for most Linux systems.  Currently we look
  * If either of the last two macros are defined, then STACKBOTTOM is computed
  * during collector startup using one of the following two heuristics:
  * HEURISTIC1:  Take an address inside GC_init's frame, and round it up to
- *             the next multiple of STACK_GRAN.
+ *              the next multiple of STACK_GRAN.
  * HEURISTIC2:  Take an address inside GC_init's frame, increment it repeatedly
- *             in small steps (decrement if STACK_GROWS_UP), and read the value
- *             at each location.  Remember the value when the first
- *             Segmentation violation or Bus error is signaled.  Round that
- *             to the nearest plausible page boundary, and use that instead
- *             of STACKBOTTOM.
+ *              in small steps (decrement if STACK_GROWS_UP), and read the value
+ *              at each location.  Remember the value when the first
+ *              Segmentation violation or Bus error is signaled.  Round that
+ *              to the nearest plausible page boundary, and use that instead
+ *              of STACKBOTTOM.
  *
  * Gustavo Rodriguez-Rivera points out that on most (all?) Unix machines,
  * the value of environ is a pointer that can serve as STACKBOTTOM.
  *    the original main program.  The new main program would read something
  *    like (provided real_main() is not inlined by the compiler):
  *
- *             # include "gc_private.h"
+ *              # include "gc_private.h"
  *
- *             main(argc, argv, envp)
- *             int argc;
- *             char **argv, **envp;
- *             {
- *                 int dummy;
+ *              main(argc, argv, envp)
+ *              int argc;
+ *              char **argv, **envp;
+ *              {
+ *                  int dummy;
  *
- *                 GC_stackbottom = (ptr_t)(&dummy);
- *                 return(real_main(argc, argv, envp));
- *             }
+ *                  GC_stackbottom = (ptr_t)(&dummy);
+ *                  return(real_main(argc, argv, envp));
+ *              }
  *
  *
  * Each architecture may also define the style of virtual dirty bit
  * to push the relevant registers onto the stack.
  */
 # if defined(__GNUC__) && ((__GNUC__ >= 3) || \
-                          (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)) \
-                      && !defined(__INTEL_COMPILER) && !defined(__PATHCC__)
+                           (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)) \
+                       && !defined(__INTEL_COMPILER) && !defined(__PATHCC__)
 #   define HAVE_BUILTIN_UNWIND_INIT
 # endif
 
 #   define MACH_TYPE "M68K"
 #   define ALIGNMENT 2
 #   ifdef OPENBSD
-#      define OS_TYPE "OPENBSD"
-#      define HEURISTIC2
-#      ifdef __ELF__
-#        define DATASTART GC_data_start
-#        define DYNAMIC_LOADING
-#      else
-         extern char etext[];
-#        define DATASTART ((ptr_t)(etext))
+        /* FIXME: Should we remove this case? */
+#       define OS_TYPE "OPENBSD"
+#       define HEURISTIC2
+#       ifdef __ELF__
+#         define DATASTART GC_data_start
+#         define DYNAMIC_LOADING
+#       else
+          extern char etext[];
+#         define DATASTART ((ptr_t)(etext))
 #       endif
 #   endif
 #   ifdef NETBSD
-#      define OS_TYPE "NETBSD"
-#      define HEURISTIC2
-#      ifdef __ELF__
-#        define DATASTART GC_data_start
-#        define DYNAMIC_LOADING
-#      else
-         extern char etext[];
-#        define DATASTART ((ptr_t)(etext))
+#       define OS_TYPE "NETBSD"
+#       define HEURISTIC2
+#       ifdef __ELF__
+#         define DATASTART GC_data_start
+#         define DYNAMIC_LOADING
+#       else
+          extern char etext[];
+#         define DATASTART ((ptr_t)(etext))
 #       endif
 #   endif
 #   ifdef LINUX
 #       define MPROTECT_VDB
 #       ifdef __ELF__
 #            define DYNAMIC_LOADING
-#           include <features.h>
-#           if defined(__GLIBC__)&& __GLIBC__>=2
+#            include <features.h>
+#            if defined(__GLIBC__)&& __GLIBC__>=2
 #              define SEARCH_FOR_DATA_START
-#           else /* !GLIBC2 */
+#            else /* !GLIBC2 */
                extern char **__environ;
 #              define DATASTART ((ptr_t)(&__environ))
                              /* hideous kludge: __environ is the first */
                              /* would include .rodata, which may       */
                              /* contain large read-only data tables    */
                              /* that we'd rather not scan.             */
-#           endif /* !GLIBC2 */
+#            endif /* !GLIBC2 */
              extern int _end[];
 #            define DATAEND (ptr_t)(_end)
 #       else
 #       endif
 #   endif
 #   ifdef AMIGA
-#      define OS_TYPE "AMIGA"
-               /* STACKBOTTOM and DATASTART handled specially  */
-               /* in os_dep.c                                  */
-#      define DATAEND  /* not needed */
-#      define GETPAGESIZE() 4096
+#       define OS_TYPE "AMIGA"
+                /* STACKBOTTOM and DATASTART handled specially  */
+                /* in os_dep.c                                  */
+#       define DATAEND  /* not needed */
+#       define GETPAGESIZE() 4096
 #   endif
 #   ifdef MACOS
 #     ifndef __LOWMEM__
 #     include <LowMem.h>
 #     endif
 #     define OS_TYPE "MACOS"
-                       /* see os_dep.c for details of global data segments. */
+                        /* see os_dep.c for details of global data segments. */
 #     define STACKBOTTOM ((ptr_t) LMGetCurStackBase())
-#     define DATAEND   /* not needed */
+#     define DATAEND    /* not needed */
 #     define GETPAGESIZE() 4096
 #   endif
 #   ifdef NEXT
-#      define OS_TYPE "NEXT"
-#      define DATASTART ((ptr_t) get_etext())
-#      define STACKBOTTOM ((ptr_t) 0x4000000)
-#      define DATAEND  /* not needed */
+#       define OS_TYPE "NEXT"
+#       define DATASTART ((ptr_t) get_etext())
+#       define STACKBOTTOM ((ptr_t) 0x4000000)
+#       define DATAEND  /* not needed */
 #   endif
 # endif
 
 # if defined(POWERPC)
 #   define MACH_TYPE "POWERPC"
 #   ifdef MACOS
-#     define ALIGNMENT 2  /* Still necessary?  Could it be 4?  */
+#     define ALIGNMENT 2  /* Still necessary?  Could it be 4?   */
 #     ifndef __LOWMEM__
 #     include <LowMem.h>
 #     endif
 #     define OS_TYPE "MACOS"
-                       /* see os_dep.c for details of global data segments. */
+                        /* see os_dep.c for details of global data segments. */
 #     define STACKBOTTOM ((ptr_t) LMGetCurStackBase())
 #     define DATAEND  /* not needed */
 #   endif
 #       define ALIGNMENT 4
 #     endif
 #     define OS_TYPE "LINUX"
-      /* HEURISTIC1 has been reliably reported to fail for a 32-bit    */
-      /* executable on a 64 bit kernel.                                        */
+      /* HEURISTIC1 has been reliably reported to fail for a 32-bit     */
+      /* executable on a 64 bit kernel.                                 */
 #     define LINUX_STACKBOTTOM
 #     define DYNAMIC_LOADING
 #     define SEARCH_FOR_DATA_START
 #       define STACKBOTTOM ((ptr_t) 0xc0000000)
 #     endif
       /* XXX: see get_end(3), get_etext() and get_end() should not be used.
-        These aren't used when dyld support is enabled (it is by default) */
+         These aren't used when dyld support is enabled (it is by default) */
 #     define DATASTART ((ptr_t) get_etext())
-#     define DATAEND   ((ptr_t) get_end())
-#     define USE_MMAP
+#     define DATAEND    ((ptr_t) get_end())
+#     ifndef USE_MMAP
+#       define USE_MMAP
+#     endif
 #     define USE_MMAP_ANON
 #     ifdef GC_DARWIN_THREADS
 #       define MPROTECT_VDB
 #     include <unistd.h>
 #     define GETPAGESIZE() getpagesize()
 #     if defined(USE_PPC_PREFETCH) && defined(__GNUC__)
-       /* The performance impact of prefetches is untested */
-#      define PREFETCH(x) \
-         __asm__ __volatile__ ("dcbt 0,%0" : : "r" ((const void *) (x)))
-#      define PREFETCH_FOR_WRITE(x) \
-         __asm__ __volatile__ ("dcbtst 0,%0" : : "r" ((const void *) (x)))
+        /* The performance impact of prefetches is untested */
+#       define PREFETCH(x) \
+          __asm__ __volatile__ ("dcbt 0,%0" : : "r" ((const void *) (x)))
+#       define PREFETCH_FOR_WRITE(x) \
+          __asm__ __volatile__ ("dcbtst 0,%0" : : "r" ((const void *) (x)))
 #     endif
       /* There seems to be some issues with trylock hanging on darwin. This
-        should be looked into some more */
+         should be looked into some more */
 #     define NO_PTHREAD_TRYLOCK
 #   endif
+#   ifdef OPENBSD
+#     define OS_TYPE "OPENBSD"
+#     define ALIGNMENT 4
+#     ifdef GC_OPENBSD_THREADS
+#      define UTHREAD_SP_OFFSET 268
+#     else
+#       include <sys/param.h>
+#       include <uvm/uvm_extern.h>
+#       define STACKBOTTOM USRSTACK
+#     endif
+      extern int __data_start[];
+#     define DATASTART ((ptr_t)__data_start)
+      extern char _end[];
+#     define DATAEND ((ptr_t)(&_end))
+#     define DYNAMIC_LOADING
+#   endif
 #   ifdef FREEBSD
 #       define ALIGNMENT 4
 #       define OS_TYPE "FREEBSD"
 #   endif
 #   ifdef AIX
 #     define OS_TYPE "AIX"
-#     undef ALIGNMENT /* in case it's defined  */
+#     undef ALIGNMENT /* in case it's defined   */
 #     ifdef IA64
 #       undef IA64
           /* DOB: some AIX installs stupidly define IA64 in */
-          /* /usr/include/sys/systemcfg.h                  */
+          /* /usr/include/sys/systemcfg.h                   */
 #     endif
 #     ifdef __64BIT__
 #       define ALIGNMENT 8
 #       define CPP_WORDSZ 32
 #       define STACKBOTTOM ((ptr_t)((ulong)&errno))
 #     endif
-#     define USE_MMAP
+#     ifndef USE_MMAP
+#       define USE_MMAP
+#     endif
 #     define USE_MMAP_ANON
-       /* From AIX linker man page:
-       _text Specifies the first location of the program.
-       _etext Specifies the first location after the program.
-       _data Specifies the first location of the data.
-       _edata Specifies the first location after the initialized data
-       _end or end Specifies the first location after all data.
-       */
+        /* From AIX linker man page:
+        _text Specifies the first location of the program.
+        _etext Specifies the first location after the program.
+        _data Specifies the first location of the data.
+        _edata Specifies the first location after the initialized data
+        _end or end Specifies the first location after all data.
+        */
       extern int _data[], _end[];
 #     define DATASTART ((ptr_t)((ulong)_data))
 #     define DATAEND ((ptr_t)((ulong)_end))
       extern int errno;
 #     define DYNAMIC_LOADING
-       /* For really old versions of AIX, this may have to be removed. */
+        /* For really old versions of AIX, this may have to be removed. */
 #   endif
 
 #   ifdef NOSYS
       extern void __end[], __dso_handle[];
 #     define DATASTART (__dso_handle)  /* OK, that's ugly.  */
 #     define DATAEND (ptr_t)(__end)
-       /* Stack starts at 0xE0000000 for the simulator.  */
+        /* Stack starts at 0xE0000000 for the simulator.  */
 #     undef STACK_GRAN
 #     define STACK_GRAN 0x10000000
 #     define HEURISTIC1
 
 # ifdef VAX
 #   define MACH_TYPE "VAX"
-#   define ALIGNMENT 4 /* Pointers are longword aligned by 4.2 C compiler */
+#   define ALIGNMENT 4  /* Pointers are longword aligned by 4.2 C compiler */
     extern char etext[];
 #   define DATASTART ((ptr_t)(etext))
 #   ifdef BSD
-#      define OS_TYPE "BSD"
-#      define HEURISTIC1
-                       /* HEURISTIC2 may be OK, but it's hard to test. */
+#       define OS_TYPE "BSD"
+#       define HEURISTIC1
+                        /* HEURISTIC2 may be OK, but it's hard to test. */
 #   endif
 #   ifdef ULTRIX
-#      define OS_TYPE "ULTRIX"
-#      define STACKBOTTOM ((ptr_t) 0x7fffc800)
+#       define OS_TYPE "ULTRIX"
+#       define STACKBOTTOM ((ptr_t) 0x7fffc800)
 #   endif
 # endif
 
 #     define CPP_WORDSZ 64
 #     define ELF_CLASS ELFCLASS64
 #   else
-#     define ALIGNMENT 4       /* Required by hardware */
+#     define ALIGNMENT 4        /* Required by hardware */
 #     define CPP_WORDSZ 32
 #   endif
-    /* Don't define USE_ASM_PUSH_REGS.  We do use an asm helper, but   */
-    /* not to push the registers on the mark stack.                    */
+    /* Don't define USE_ASM_PUSH_REGS.  We do use an asm helper, but    */
+    /* not to push the registers on the mark stack.                     */
 #   ifdef SOLARIS
-#      define OS_TYPE "SOLARIS"
-       extern int _etext[];
-       extern int _end[];
-       extern ptr_t GC_SysVGetDataStart(size_t, ptr_t);
+#       define OS_TYPE "SOLARIS"
+        extern int _etext[];
+        extern int _end[];
+        ptr_t GC_SysVGetDataStart(size_t, ptr_t);
 #       define DATASTART GC_SysVGetDataStart(0x10000, (ptr_t)_etext)
-#      define DATAEND (ptr_t)(_end)
-#      if !defined(USE_MMAP) && defined(REDIRECT_MALLOC)
-#          define USE_MMAP
-           /* Otherwise we now use calloc.  Mmap may result in the     */
-           /* heap interleaved with thread stacks, which can result in */
-           /* excessive blacklisting.  Sbrk is unusable since it       */
-           /* doesn't interact correctly with the system malloc.       */
-#      endif
+#       define DATAEND (ptr_t)(_end)
+#       if !defined(USE_MMAP) && defined(REDIRECT_MALLOC)
+#         define USE_MMAP
+            /* Otherwise we now use calloc.  Mmap may result in the     */
+            /* heap interleaved with thread stacks, which can result in */
+            /* excessive blacklisting.  Sbrk is unusable since it       */
+            /* doesn't interact correctly with the system malloc.       */
+#       endif
 #       ifdef USE_MMAP
 #         define HEAP_START (ptr_t)0x40000000
 #       else
-#        define HEAP_START DATAEND
+#         define HEAP_START DATAEND
 #       endif
-#      define PROC_VDB
-/*     HEURISTIC1 reportedly no longer works under 2.7.                */
-/*     HEURISTIC2 probably works, but this appears to be preferable.   */
-/*     Apparently USRSTACK is defined to be USERLIMIT, but in some     */
-/*     installations that's undefined.  We work around this with a     */
-/*     gross hack:                                                     */
+#       define PROC_VDB
+/*      HEURISTIC1 reportedly no longer works under 2.7.                */
+/*      HEURISTIC2 probably works, but this appears to be preferable.   */
+/*      Apparently USRSTACK is defined to be USERLIMIT, but in some     */
+/*      installations that's undefined.  We work around this with a     */
+/*      gross hack:                                                     */
 #       include <sys/vmparam.h>
-#      ifdef USERLIMIT
-         /* This should work everywhere, but doesn't.  */
-#        define STACKBOTTOM ((ptr_t) USRSTACK)
+#       ifdef USERLIMIT
+          /* This should work everywhere, but doesn't.  */
+#         define STACKBOTTOM ((ptr_t) USRSTACK)
 #       else
-#        define HEURISTIC2
+#         define HEURISTIC2
 #       endif
-#      include <unistd.h>
+#       include <unistd.h>
 #       define GETPAGESIZE()  sysconf(_SC_PAGESIZE)
-               /* getpagesize() appeared to be missing from at least one */
-               /* Solaris 5.4 installation.  Weird.                      */
-#      define DYNAMIC_LOADING
+                /* getpagesize() appeared to be missing from at least one */
+                /* Solaris 5.4 installation.  Weird.                      */
+#       define DYNAMIC_LOADING
 #   endif
 #   ifdef DRSNX
-#      define OS_TYPE "DRSNX"
-       extern ptr_t GC_SysVGetDataStart(size_t, ptr_t);
-       extern int etext[];
+#       define OS_TYPE "DRSNX"
+        ptr_t GC_SysVGetDataStart(size_t, ptr_t);
+        extern int etext[];
 #       define DATASTART GC_SysVGetDataStart(0x10000, (ptr_t)etext)
-#      define MPROTECT_VDB
+#       define MPROTECT_VDB
 #       define STACKBOTTOM ((ptr_t) 0xdfff0000)
-#      define DYNAMIC_LOADING
+#       define DYNAMIC_LOADING
 #   endif
 #   ifdef LINUX
 #     define OS_TYPE "LINUX"
       extern int _etext[];
 #     define DATAEND (ptr_t)(_end)
 #     define SVR4
-      extern ptr_t GC_SysVGetDataStart(size_t, ptr_t);
+      ptr_t GC_SysVGetDataStart(size_t, ptr_t);
 #     ifdef __arch64__
-#      define DATASTART GC_SysVGetDataStart(0x100000, (ptr_t)_etext)
+#       define DATASTART GC_SysVGetDataStart(0x100000, (ptr_t)_etext)
 #     else
 #       define DATASTART GC_SysVGetDataStart(0x10000, (ptr_t)_etext)
 #     endif
 #   endif
 #   ifdef OPENBSD
 #     define OS_TYPE "OPENBSD"
-#     define STACKBOTTOM ((ptr_t) 0xf8000000)
-      extern int etext[];
-#     define DATASTART ((ptr_t)(etext))
+#     ifdef GC_OPENBSD_THREADS
+#      define UTHREAD_SP_OFFSET 232
+#     else
+#       include <sys/param.h>
+#       include <uvm/uvm_extern.h>
+#       define STACKBOTTOM USRSTACK
+#     endif
+      extern int __data_start[];
+#     define DATASTART ((ptr_t)__data_start)
+      extern char _end[];
+#     define DATAEND ((ptr_t)(&_end))
+#     define DYNAMIC_LOADING
 #   endif
 #   ifdef NETBSD
 #     define OS_TYPE "NETBSD"
 #     define HEURISTIC2
 #     ifdef __ELF__
-#      define DATASTART GC_data_start
-#      define DYNAMIC_LOADING
+#       define DATASTART GC_data_start
+#       define DYNAMIC_LOADING
 #     else
-       extern char etext[];
-#      define DATASTART ((ptr_t)(etext))
+        extern char etext[];
+#       define DATASTART ((ptr_t)(etext))
 #     endif
 #   endif
 #   ifdef FREEBSD
-#      define OS_TYPE "FREEBSD"
-#      define SIG_SUSPEND SIGUSR1
-#      define SIG_THR_RESTART SIGUSR2
-#      define FREEBSD_STACKBOTTOM
-#      ifdef __ELF__
-#          define DYNAMIC_LOADING
-#      endif
-       extern char etext[];
-       extern char edata[];
-       extern char end[];
-#      define NEED_FIND_LIMIT
-#      define DATASTART ((ptr_t)(&etext))
-#      define DATAEND (GC_find_limit (DATASTART, TRUE))
-#      define DATASTART2 ((ptr_t)(&edata))
-#      define DATAEND2 ((ptr_t)(&end))
+#       define OS_TYPE "FREEBSD"
+#       define SIG_SUSPEND SIGUSR1
+#       define SIG_THR_RESTART SIGUSR2
+#       define FREEBSD_STACKBOTTOM
+#       ifdef __ELF__
+#           define DYNAMIC_LOADING
+#       endif
+        extern char etext[];
+        extern char edata[];
+        extern char end[];
+#       define NEED_FIND_LIMIT
+#       define DATASTART ((ptr_t)(&etext))
+#       define DATAEND (GC_find_limit (DATASTART, TRUE))
+#       define DATASTART2 ((ptr_t)(&edata))
+#       define DATAEND2 ((ptr_t)(&end))
 #   endif
 # endif
 
 #   else
 #     define CPP_WORDSZ 32
 #     define ALIGNMENT 4
-                       /* Appears to hold for all "32 bit" compilers   */
-                       /* except Borland.  The -a4 option fixes        */
-                       /* Borland.                                     */
+                        /* Appears to hold for all "32 bit" compilers   */
+                        /* except Borland.  The -a4 option fixes        */
+                        /* Borland.                                     */
                         /* Ivan Demakov: For Watcom the option is -zp4. */
 #   endif
 #   ifdef SEQUENT
-#      define OS_TYPE "SEQUENT"
-       extern int etext[];
+#       define OS_TYPE "SEQUENT"
+        extern int etext[];
 #       define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
-#       define STACKBOTTOM ((ptr_t) 0x3ffff000) 
+#       define STACKBOTTOM ((ptr_t) 0x3ffff000)
 #   endif
 #   ifdef BEOS
 #     define OS_TYPE "BEOS"
 #     define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
 #   endif
 #   ifdef SOLARIS
-#      define OS_TYPE "SOLARIS"
+#       define OS_TYPE "SOLARIS"
         extern int _etext[], _end[];
-       extern ptr_t GC_SysVGetDataStart(size_t, ptr_t);
+        ptr_t GC_SysVGetDataStart(size_t, ptr_t);
 #       define DATASTART GC_SysVGetDataStart(0x1000, (ptr_t)_etext)
-#      define DATAEND (ptr_t)(_end)
-/*     # define STACKBOTTOM ((ptr_t)(_start)) worked through 2.7,      */
-/*      but reportedly breaks under 2.8.  It appears that the stack    */
-/*     base is a property of the executable, so this should not break  */
-/*     old executables.                                                */
-/*     HEURISTIC2 probably works, but this appears to be preferable.   */
+#       define DATAEND (ptr_t)(_end)
+/*      # define STACKBOTTOM ((ptr_t)(_start)) worked through 2.7,      */
+/*      but reportedly breaks under 2.8.  It appears that the stack     */
+/*      base is a property of the executable, so this should not break  */
+/*      old executables.                                                */
+/*      HEURISTIC2 probably works, but this appears to be preferable.   */
 #       include <sys/vm.h>
-#      define STACKBOTTOM ((ptr_t) USRSTACK)
+#       define STACKBOTTOM ((ptr_t) USRSTACK)
 /* At least in Solaris 2.5, PROC_VDB gives wrong values for dirty bits. */
-/* It appears to be fixed in 2.8 and 2.9.                              */
-#      ifdef SOLARIS25_PROC_VDB_BUG_FIXED
-#        define PROC_VDB
-#      endif
-#      define DYNAMIC_LOADING
-#      if !defined(USE_MMAP) && defined(REDIRECT_MALLOC)
-#          define USE_MMAP
-           /* Otherwise we now use calloc.  Mmap may result in the     */
-           /* heap interleaved with thread stacks, which can result in */
-           /* excessive blacklisting.  Sbrk is unusable since it       */
-           /* doesn't interact correctly with the system malloc.       */
-#      endif
+/* It appears to be fixed in 2.8 and 2.9.                               */
+#       ifdef SOLARIS25_PROC_VDB_BUG_FIXED
+#         define PROC_VDB
+#       endif
+#       define DYNAMIC_LOADING
+#       if !defined(USE_MMAP) && defined(REDIRECT_MALLOC)
+#         define USE_MMAP
+            /* Otherwise we now use calloc.  Mmap may result in the     */
+            /* heap interleaved with thread stacks, which can result in */
+            /* excessive blacklisting.  Sbrk is unusable since it       */
+            /* doesn't interact correctly with the system malloc.       */
+#       endif
 #       ifdef USE_MMAP
 #         define HEAP_START (ptr_t)0x40000000
 #       else
-#        define HEAP_START DATAEND
+#         define HEAP_START DATAEND
 #       endif
 #   endif
 #   ifdef SCO
-#      define OS_TYPE "SCO"
-       extern int etext[];
-#      define DATASTART ((ptr_t)((((word) (etext)) + 0x3fffff) \
-                                 & ~0x3fffff) \
-                                +((word)etext & 0xfff))
-#      define STACKBOTTOM ((ptr_t) 0x7ffffffc)
+#       define OS_TYPE "SCO"
+        extern int etext[];
+#       define DATASTART ((ptr_t)((((word) (etext)) + 0x3fffff) \
+                                  & ~0x3fffff) \
+                                 +((word)etext & 0xfff))
+#       define STACKBOTTOM ((ptr_t) 0x7ffffffc)
 #   endif
 #   ifdef SCO_ELF
 #       define OS_TYPE "SCO_ELF"
 #       define DATASTART ((ptr_t)(etext))
 #       define STACKBOTTOM ((ptr_t) 0x08048000)
 #       define DYNAMIC_LOADING
-#      define ELF_CLASS ELFCLASS32
+#       define ELF_CLASS ELFCLASS32
 #   endif
 #   ifdef DGUX
-#      define OS_TYPE "DGUX"
-       extern int _etext, _end;
-       extern ptr_t GC_SysVGetDataStart(size_t, ptr_t);
-#      define DATASTART GC_SysVGetDataStart(0x1000, (ptr_t)(&_etext))
-#      define DATAEND (ptr_t)(&_end)
-#      define STACK_GROWS_DOWN
-#      define HEURISTIC2
-#      include <unistd.h>
-#      define GETPAGESIZE()  sysconf(_SC_PAGESIZE)
-#      define DYNAMIC_LOADING
-#      ifndef USE_MMAP
-#        define USE_MMAP
-#      endif /* USE_MMAP */
-#      define MAP_FAILED (void *) ((word)-1)
-#      ifdef USE_MMAP
-#        define HEAP_START (ptr_t)0x40000000
-#      else /* USE_MMAP */
-#        define HEAP_START DATAEND
-#      endif /* USE_MMAP */
+#       define OS_TYPE "DGUX"
+        extern int _etext, _end;
+        ptr_t GC_SysVGetDataStart(size_t, ptr_t);
+#       define DATASTART GC_SysVGetDataStart(0x1000, (ptr_t)(&_etext))
+#       define DATAEND (ptr_t)(&_end)
+#       define STACK_GROWS_DOWN
+#       define HEURISTIC2
+#       include <unistd.h>
+#       define GETPAGESIZE()  sysconf(_SC_PAGESIZE)
+#       define DYNAMIC_LOADING
+#       ifndef USE_MMAP
+#         define USE_MMAP
+#       endif
+#       define MAP_FAILED (void *) ((word)-1)
+#       ifdef USE_MMAP
+#         define HEAP_START (ptr_t)0x40000000
+#       else /* USE_MMAP */
+#         define HEAP_START DATAEND
+#       endif /* USE_MMAP */
 #   endif /* DGUX */
 
 #   ifdef LINUX
-#      define OS_TYPE "LINUX"
+#       define OS_TYPE "LINUX"
 #       define LINUX_STACKBOTTOM
-#      if 0
-#        define HEURISTIC1
+#       if 0
+#         define HEURISTIC1
 #         undef STACK_GRAN
 #         define STACK_GRAN 0x10000000
-         /* STACKBOTTOM is usually 0xc0000000, but this changes with   */
-         /* different kernel configurations.  In particular, systems   */
-         /* with 2GB physical memory will usually move the user        */
-         /* address space limit, and hence initial SP to 0x80000000.   */
+          /* STACKBOTTOM is usually 0xc0000000, but this changes with   */
+          /* different kernel configurations.  In particular, systems   */
+          /* with 2GB physical memory will usually move the user        */
+          /* address space limit, and hence initial SP to 0x80000000.   */
 #       endif
 #       if !defined(GC_LINUX_THREADS) || !defined(REDIRECT_MALLOC)
-#          define MPROTECT_VDB
-#      else
-           /* We seem to get random errors in incremental mode,        */
-           /* possibly because Linux threads is itself a malloc client */
-           /* and can't deal with the signals.                         */
-#      endif
-#      define HEAP_START (ptr_t)0x1000
-               /* This encourages mmap to give us low addresses,       */
-               /* thus allowing the heap to grow to ~3GB               */
+#           define MPROTECT_VDB
+#       else
+            /* We seem to get random errors in incremental mode,        */
+            /* possibly because Linux threads is itself a malloc client */
+            /* and can't deal with the signals.                         */
+#       endif
+#       define HEAP_START (ptr_t)0x1000
+                /* This encourages mmap to give us low addresses,       */
+                /* thus allowing the heap to grow to ~3GB               */
 #       ifdef __ELF__
 #            define DYNAMIC_LOADING
-#           ifdef UNDEFINED    /* includes ro data */
-              extern int _etext[];
+#            ifdef UNDEFINED    /* includes ro data */
+               extern int _etext[];
 #              define DATASTART ((ptr_t)((((word) (_etext)) + 0xfff) & ~0xfff))
-#           endif
-#           include <features.h>
-#           if defined(__GLIBC__) && __GLIBC__ >= 2
-#               define SEARCH_FOR_DATA_START
-#           else
-                extern char **__environ;
+#            endif
+#            include <features.h>
+#            if defined(__GLIBC__) && __GLIBC__ >= 2
+#                define SEARCH_FOR_DATA_START
+#            else
+                 extern char **__environ;
 #                define DATASTART ((ptr_t)(&__environ))
-                             /* hideous kludge: __environ is the first */
-                             /* word in crt0.o, and delimits the start */
-                             /* of the data segment, no matter which   */
-                             /* ld options were passed through.        */
-                             /* We could use _etext instead, but that  */
-                             /* would include .rodata, which may       */
-                             /* contain large read-only data tables    */
-                             /* that we'd rather not scan.             */
-#           endif
-            extern int _end[];
-#           define DATAEND (ptr_t)(_end)
-#      else
-            extern int etext[];
+                              /* hideous kludge: __environ is the first */
+                              /* word in crt0.o, and delimits the start */
+                              /* of the data segment, no matter which   */
+                              /* ld options were passed through.        */
+                              /* We could use _etext instead, but that  */
+                              /* would include .rodata, which may       */
+                              /* contain large read-only data tables    */
+                              /* that we'd rather not scan.             */
+#            endif
+             extern int _end[];
+#            define DATAEND (ptr_t)(_end)
+#       else
+             extern int etext[];
 #            define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
 #       endif
-#      ifdef USE_I686_PREFETCH
-         /* FIXME: Thus should use __builtin_prefetch, but we'll leave that    */
-         /* for the next rtelease.                                             */
-#        define PREFETCH(x) \
-           __asm__ __volatile__ ("     prefetchnta     %0": : "m"(*(char *)(x)))
-           /* Empirically prefetcht0 is much more effective at reducing        */
-           /* cache miss stalls for the targeted load instructions.  But it    */
-           /* seems to interfere enough with other cache traffic that the net  */
-           /* result is worse than prefetchnta.                                */
-#         if 0 
-           /* Using prefetches for write seems to have a slight negative       */
-           /* impact on performance, at least for a PIII/500.                  */
-#          define PREFETCH_FOR_WRITE(x) \
-             __asm__ __volatile__ ("   prefetcht0      %0": : "m"(*(char *)(x)))
-#        endif
-#      endif
-#      ifdef USE_3DNOW_PREFETCH
-#        define PREFETCH(x) \
-           __asm__ __volatile__ ("     prefetch        %0": : "m"(*(char *)(x)))
-#        define PREFETCH_FOR_WRITE(x) \
-           __asm__ __volatile__ ("     prefetchw       %0": : "m"(*(char *)(x)))
-#      endif
+#       ifdef USE_I686_PREFETCH
+          /* FIXME: Thus should use __builtin_prefetch, but we'll leave that    */
+          /* for the next rtelease.                                             */
+#         define PREFETCH(x) \
+            __asm__ __volatile__ ("     prefetchnta     %0": : "m"(*(char *)(x)))
+            /* Empirically prefetcht0 is much more effective at reducing        */
+            /* cache miss stalls for the targeted load instructions.  But it    */
+            /* seems to interfere enough with other cache traffic that the net  */
+            /* result is worse than prefetchnta.                                */
+#         if 0
+            /* Using prefetches for write seems to have a slight negative       */
+            /* impact on performance, at least for a PIII/500.                  */
+#           define PREFETCH_FOR_WRITE(x) \
+              __asm__ __volatile__ ("   prefetcht0      %0": : "m"(*(char *)(x)))
+#         endif
+#       endif
+#       ifdef USE_3DNOW_PREFETCH
+#         define PREFETCH(x) \
+            __asm__ __volatile__ ("     prefetch        %0": : "m"(*(char *)(x)))
+#         define PREFETCH_FOR_WRITE(x) \
+            __asm__ __volatile__ ("     prefetchw       %0": : "m"(*(char *)(x)))
+#       endif
 #   endif
 #   ifdef CYGWIN32
 #       define OS_TYPE "CYGWIN32"
 #       define DATASTART ((ptr_t)GC_DATASTART)  /* From gc.h */
-#       define DATAEND  ((ptr_t)GC_DATAEND)
-#      undef STACK_GRAN
+#       define DATAEND   ((ptr_t)GC_DATAEND)
+#       undef STACK_GRAN
 #       define STACK_GRAN 0x10000
 #       define HEURISTIC1
 #       ifdef USE_MMAP
 #       endif
 #   endif
 #   ifdef OS2
-#      define OS_TYPE "OS2"
-               /* STACKBOTTOM and DATASTART are handled specially in   */
-               /* os_dep.c. OS2 actually has the right                 */
-               /* system call!                                         */
-#      define DATAEND  /* not needed */
+#       define OS_TYPE "OS2"
+                /* STACKBOTTOM and DATASTART are handled specially in   */
+                /* os_dep.c. OS2 actually has the right                 */
+                /* system call!                                         */
+#       define DATAEND  /* not needed */
 #   endif
 #   ifdef MSWIN32
-#      define OS_TYPE "MSWIN32"
-               /* STACKBOTTOM and DATASTART are handled specially in   */
-               /* os_dep.c.                                            */
-#      define MPROTECT_VDB
+#       define OS_TYPE "MSWIN32"
+                /* STACKBOTTOM and DATASTART are handled specially in   */
+                /* os_dep.c.                                            */
+#       define MPROTECT_VDB
 #       define GWW_VDB
 #       define DATAEND  /* not needed */
 #   endif
 #   ifdef MSWINCE
-#      define OS_TYPE "MSWINCE"
+#       define OS_TYPE "MSWINCE"
 #       define DATAEND  /* not needed */
 #   endif
 #   ifdef DJGPP
 /* #       define STACKBOTTOM ((ptr_t)((word) _stubinfo + _stubinfo->size \
                                                      + _stklen)) */
 #       define STACKBOTTOM ((ptr_t)((word) __djgpp_stack_limit + _stklen))
-               /* This may not be right.  */
+                /* This may not be right.  */
 #   endif
 #   ifdef OPENBSD
-#      define OS_TYPE "OPENBSD"
+#       define OS_TYPE "OPENBSD"
+#       ifdef GC_OPENBSD_THREADS
+#         define UTHREAD_SP_OFFSET 176
+#       else
+#         include <sys/param.h>
+#         include <uvm/uvm_extern.h>
+#         define STACKBOTTOM USRSTACK
+#       endif
+        extern int __data_start[];
+#       define DATASTART ((ptr_t)__data_start)
+        extern char _end[];
+#       define DATAEND ((ptr_t)(&_end))
+#       define DYNAMIC_LOADING
 #   endif
 #   ifdef FREEBSD
-#      define OS_TYPE "FREEBSD"
-#      ifndef GC_FREEBSD_THREADS
-#          define MPROTECT_VDB
-#      endif
-#      ifdef __GLIBC__
-#          define SIG_SUSPEND          (32+6)
-#          define SIG_THR_RESTART      (32+5)
-           extern int _end[];
-#          define DATAEND (ptr_t)(_end)
-#      else
-#          define SIG_SUSPEND SIGUSR1
-#          define SIG_THR_RESTART SIGUSR2
-#      endif
-#      define FREEBSD_STACKBOTTOM
-#      ifdef __ELF__
-#          define DYNAMIC_LOADING
-#      endif
-       extern char etext[];
-       extern char * GC_FreeBSDGetDataStart(size_t, ptr_t);
-#      define DATASTART GC_FreeBSDGetDataStart(0x1000, (ptr_t)etext)
+#       define OS_TYPE "FREEBSD"
+#       ifndef GC_FREEBSD_THREADS
+#           define MPROTECT_VDB
+#       endif
+#       ifdef __GLIBC__
+#           define SIG_SUSPEND          (32+6)
+#           define SIG_THR_RESTART      (32+5)
+            extern int _end[];
+#           define DATAEND (ptr_t)(_end)
+#       else
+#           define SIG_SUSPEND SIGUSR1
+#           define SIG_THR_RESTART SIGUSR2
+#       endif
+#       define FREEBSD_STACKBOTTOM
+#       ifdef __ELF__
+#           define DYNAMIC_LOADING
+#       endif
+        extern char etext[];
+        char * GC_FreeBSDGetDataStart(size_t, ptr_t);
+#       define DATASTART GC_FreeBSDGetDataStart(0x1000, (ptr_t)etext)
 #   endif
 #   ifdef NETBSD
-#      define OS_TYPE "NETBSD"
-#      ifdef __ELF__
-#          define DYNAMIC_LOADING
-#      endif
+#       define OS_TYPE "NETBSD"
+#       ifdef __ELF__
+#           define DYNAMIC_LOADING
+#       endif
 #   endif
 #   ifdef THREE86BSD
-#      define OS_TYPE "THREE86BSD"
+#       define OS_TYPE "THREE86BSD"
 #   endif
 #   ifdef BSDI
-#      define OS_TYPE "BSDI"
+#       define OS_TYPE "BSDI"
 #   endif
-#   if defined(OPENBSD) || defined(NETBSD) \
-        || defined(THREE86BSD) || defined(BSDI)
-#      define HEURISTIC2
-       extern char etext[];
-#      define DATASTART ((ptr_t)(etext))
+#   if defined(NETBSD) || defined(THREE86BSD) || defined(BSDI)
+#       define HEURISTIC2
+        extern char etext[];
+#       define DATASTART ((ptr_t)(etext))
 #   endif
 #   ifdef NEXT
-#      define OS_TYPE "NEXT"
-#      define DATASTART ((ptr_t) get_etext())
-#      define STACKBOTTOM ((ptr_t)0xc0000000)
-#      define DATAEND  /* not needed */
+#       define OS_TYPE "NEXT"
+#       define DATASTART ((ptr_t) get_etext())
+#       define STACKBOTTOM ((ptr_t)0xc0000000)
+#       define DATAEND  /* not needed */
 #   endif
 #   ifdef DOS4GW
 #     define OS_TYPE "DOS4GW"
 #     define DARWIN_DONT_PARSE_STACK
 #     define DYNAMIC_LOADING
       /* XXX: see get_end(3), get_etext() and get_end() should not be used.
-        These aren't used when dyld support is enabled (it is by default) */
+         These aren't used when dyld support is enabled (it is by default) */
 #     define DATASTART ((ptr_t) get_etext())
-#     define DATAEND   ((ptr_t) get_end())
+#     define DATAEND    ((ptr_t) get_end())
 #     define STACKBOTTOM ((ptr_t) 0xc0000000)
-#     define USE_MMAP
+#     ifndef USE_MMAP
+#       define USE_MMAP
+#     endif
 #     define USE_MMAP_ANON
 #     ifdef GC_DARWIN_THREADS
 #       define MPROTECT_VDB
 #     include <unistd.h>
 #     define GETPAGESIZE() getpagesize()
       /* There seems to be some issues with trylock hanging on darwin. This
-        should be looked into some more */
+         should be looked into some more */
 #      define NO_PTHREAD_TRYLOCK
 #   endif /* DARWIN */
 # endif
 #   define ALIGNMENT 4
     extern char **environ;
 #   define DATASTART ((ptr_t)(&environ))
-                             /* hideous kludge: environ is the first   */
-                             /* word in crt0.o, and delimits the start */
-                             /* of the data segment, no matter which   */
-                             /* ld options were passed through.        */
+                              /* hideous kludge: environ is the first   */
+                              /* word in crt0.o, and delimits the start */
+                              /* of the data segment, no matter which   */
+                              /* ld options were passed through.        */
 #   define STACKBOTTOM ((ptr_t) 0xfffff000) /* for Encore */
 # endif
 
 #      define OS_TYPE "EWS4800"
 #   endif
 #   ifdef ULTRIX
-#      define HEURISTIC2
+#       define HEURISTIC2
 #       define DATASTART (ptr_t)0x10000000
-                             /* Could probably be slightly higher since */
-                             /* startup code allocates lots of stuff.   */
-#      define OS_TYPE "ULTRIX"
+                              /* Could probably be slightly higher since */
+                              /* startup code allocates lots of stuff.   */
+#       define OS_TYPE "ULTRIX"
 #       define ALIGNMENT 4
 #   endif
 #   ifdef IRIX5
-#      define HEURISTIC2
+#       define HEURISTIC2
         extern int _fdata[];
 #       define DATASTART ((ptr_t)(_fdata))
 #       ifdef USE_MMAP
 #         define HEAP_START (ptr_t)0x30000000
 #       else
-#        define HEAP_START DATASTART
+#         define HEAP_START DATASTART
 #       endif
-                             /* Lowest plausible heap address.         */
-                             /* In the MMAP case, we map there.        */
-                             /* In either case it is used to identify  */
-                             /* heap sections so they're not           */
-                             /* considered as roots.                   */
-#      define OS_TYPE "IRIX5"
+                              /* Lowest plausible heap address.         */
+                              /* In the MMAP case, we map there.        */
+                              /* In either case it is used to identify  */
+                              /* heap sections so they're not           */
+                              /* considered as roots.                   */
+#       define OS_TYPE "IRIX5"
 /*#       define MPROTECT_VDB DOB: this should work, but there is evidence */
-/*             of recent breakage.                                        */
+/*              of recent breakage.                                        */
 #       ifdef _MIPS_SZPTR
-#        define CPP_WORDSZ _MIPS_SZPTR
-#        define ALIGNMENT (_MIPS_SZPTR/8)
-#      else
+#         define CPP_WORDSZ _MIPS_SZPTR
+#         define ALIGNMENT (_MIPS_SZPTR/8)
+#       else
 #         define ALIGNMENT 4
-#      endif
-#      define DYNAMIC_LOADING
+#       endif
+#       define DYNAMIC_LOADING
 #   endif
 #   ifdef MSWINCE
 #       define OS_TYPE "MSWINCE"
 #       define STACKBOTTOM ((ptr_t) 0x7ffff000)
 #     endif /* _ELF_ */
 #  endif
+#  ifdef OPENBSD
+#    define OS_TYPE "OPENBSD"
+#    define ALIGNMENT 4
+#    ifdef GC_OPENBSD_THREADS
+#      define UTHREAD_SP_OFFSET 808
+#    else
+#      include <sys/param.h>
+#      include <uvm/uvm_extern.h>
+#      define STACKBOTTOM USRSTACK
+#    endif
+     extern int _fdata[];
+#    define DATASTART ((ptr_t)_fdata)
+     extern char _end[];
+#    define DATAEND ((ptr_t)(&_end))
+#    define DYNAMIC_LOADING
+#  endif
 #  if defined(NONSTOP)
 #    define CPP_WORDSZ 32
 #    define OS_TYPE "NONSTOP"
 #     define CPP_WORDSZ 32
 #     define ALIGNMENT 4
 #   endif
-#   if !defined(GC_HPUX_THREADS) && !defined(GC_LINUX_THREADS)
+#   if !defined(GC_HPUX_THREADS) && !defined(GC_LINUX_THREADS) \
+       && !defined(OPENBSD)
 #     ifndef LINUX /* For now. */
 #       define MPROTECT_VDB
 #     endif
 #   else
 #     ifdef PARALLEL_MARK
-#      define USE_MARK_BYTES
-               /* Minimize compare-and-swap usage.             */
+#       define USE_MARK_BYTES
+                /* Minimize compare-and-swap usage.             */
 #     endif
 #   endif
 #   define STACK_GROWS_UP
       extern int __data_start[];
 #     define DATASTART ((ptr_t)(__data_start))
 #     if 0
-       /* The following appears to work for 7xx systems running HP/UX  */
-       /* 9.xx Furthermore, it might result in much faster             */
-       /* collections than HEURISTIC2, which may involve scanning      */
-       /* segments that directly precede the stack.  It is not the     */
-       /* default, since it may not work on older machine/OS           */
-       /* combinations. (Thanks to Raymond X.T. Nijssen for uncovering */
-       /* this.)                                                       */
+        /* The following appears to work for 7xx systems running HP/UX  */
+        /* 9.xx Furthermore, it might result in much faster             */
+        /* collections than HEURISTIC2, which may involve scanning      */
+        /* segments that directly precede the stack.  It is not the     */
+        /* default, since it may not work on older machine/OS           */
+        /* combinations. (Thanks to Raymond X.T. Nijssen for uncovering */
+        /* this.)                                                       */
 #       define STACKBOTTOM ((ptr_t) 0x7b033000)  /* from /etc/conf/h/param.h */
 #     else
-       /* Gustavo Rodriguez-Rivera suggested changing HEURISTIC2       */
-       /* to this.  Note that the GC must be initialized before the    */
-       /* first putenv call.                                           */
-       extern char ** environ;
+        /* Gustavo Rodriguez-Rivera suggested changing HEURISTIC2       */
+        /* to this.  Note that the GC must be initialized before the    */
+        /* first putenv call.                                           */
+        extern char ** environ;
 #       define STACKBOTTOM ((ptr_t)environ)
 #     endif
 #     define DYNAMIC_LOADING
       extern int _end[];
 #     define DATAEND (ptr_t)(&_end)
 #   endif /* LINUX */
+#  ifdef OPENBSD
+#     define OS_TYPE "OPENBSD"
+#     ifdef GC_OPENBSD_THREADS
+#       define UTHREAD_SP_OFFSET 520
+#     else
+#       include <sys/param.h>
+#       include <uvm/uvm_extern.h>
+#       define STACKBOTTOM USRSTACK
+#     endif
+      extern int __data_start[];
+#     define DATASTART ((ptr_t)__data_start)
+      extern char _end[];
+#     define DATAEND ((ptr_t)(&_end))
+#     define DYNAMIC_LOADING
+#  endif
 # endif /* HP_PA */
 
 # ifdef ALPHA
 #   define ALIGNMENT 8
 #   define CPP_WORDSZ 64
 #   ifdef NETBSD
-#      define OS_TYPE "NETBSD"
-#      define HEURISTIC2
-#      define DATASTART GC_data_start
-#      define ELFCLASS32 32
-#      define ELFCLASS64 64
-#      define ELF_CLASS ELFCLASS64
+#       define OS_TYPE "NETBSD"
+#       define HEURISTIC2
+#       define DATASTART GC_data_start
+#       define ELFCLASS32 32
+#       define ELFCLASS64 64
+#       define ELF_CLASS ELFCLASS64
 #       define DYNAMIC_LOADING
 #   endif
 #   ifdef OPENBSD
-#      define OS_TYPE "OPENBSD"
-#      define HEURISTIC2
-#      ifdef __ELF__   /* since OpenBSD/Alpha 2.9 */
-#         define DATASTART GC_data_start
-#         define ELFCLASS32 32
-#         define ELFCLASS64 64
-#         define ELF_CLASS ELFCLASS64
-#       else           /* ECOFF, until OpenBSD/Alpha 2.7 */
-#         define DATASTART ((ptr_t) 0x140000000)
-#      endif
+#       define OS_TYPE "OPENBSD"
+#       define ELF_CLASS ELFCLASS64
+#       ifdef GC_OPENBSD_THREADS
+#         define UTHREAD_SP_OFFSET 816
+#       else
+#         include <sys/param.h>
+#         include <uvm/uvm_extern.h>
+#         define STACKBOTTOM USRSTACK
+#       endif
+        extern int __data_start[];
+#       define DATASTART ((ptr_t)__data_start)
+        extern char _end[];
+#       define DATAEND ((ptr_t)(&_end))
+#       define DYNAMIC_LOADING
 #   endif
 #   ifdef FREEBSD
-#      define OS_TYPE "FREEBSD"
+#       define OS_TYPE "FREEBSD"
 /* MPROTECT_VDB is not yet supported at all on FreeBSD/alpha. */
-#      define SIG_SUSPEND SIGUSR1
-#      define SIG_THR_RESTART SIGUSR2
-#      define FREEBSD_STACKBOTTOM
-#      ifdef __ELF__
-#          define DYNAMIC_LOADING
-#      endif
+#       define SIG_SUSPEND SIGUSR1
+#       define SIG_THR_RESTART SIGUSR2
+#       define FREEBSD_STACKBOTTOM
+#       ifdef __ELF__
+#           define DYNAMIC_LOADING
+#       endif
 /* Handle unmapped hole alpha*-*-freebsd[45]* puts between etext and edata. */
-       extern char etext[];
-       extern char edata[];
-       extern char end[];
-#      define NEED_FIND_LIMIT
-#      define DATASTART ((ptr_t)(&etext))
-#      define DATAEND (GC_find_limit (DATASTART, TRUE))
-#      define DATASTART2 ((ptr_t)(&edata))
-#      define DATAEND2 ((ptr_t)(&end))
+        extern char etext[];
+        extern char edata[];
+        extern char end[];
+#       define NEED_FIND_LIMIT
+#       define DATASTART ((ptr_t)(&etext))
+#       define DATAEND (GC_find_limit (DATASTART, TRUE))
+#       define DATASTART2 ((ptr_t)(&edata))
+#       define DATAEND2 ((ptr_t)(&end))
 #   endif
 #   ifdef OSF1
-#      define OS_TYPE "OSF1"
-#      define DATASTART ((ptr_t) 0x140000000)
-       extern int _end[];
-#      define DATAEND ((ptr_t) &_end)
-       extern char ** environ;
-       /* round up from the value of environ to the nearest page boundary */
-       /* Probably breaks if putenv is called before collector            */
-       /* initialization.                                                 */
-#      define STACKBOTTOM ((ptr_t)(((word)(environ) | (getpagesize()-1))+1))
-/* #           define HEURISTIC2 */
-       /* Normally HEURISTIC2 is too conservative, since               */
-       /* the text segment immediately follows the stack.              */
-       /* Hence we give an upper pound.                                */
-       /* This is currently unused, since we disabled HEURISTIC2       */
-       extern int __start[];
-#      define HEURISTIC2_LIMIT ((ptr_t)((word)(__start) & ~(getpagesize()-1)))
-#      ifndef GC_OSF1_THREADS
-         /* Unresolved signal issues with threads.     */
-#        define MPROTECT_VDB
+#       define OS_TYPE "OSF1"
+#       define DATASTART ((ptr_t) 0x140000000)
+        extern int _end[];
+#       define DATAEND ((ptr_t) &_end)
+        extern char ** environ;
+        /* round up from the value of environ to the nearest page boundary */
+        /* Probably breaks if putenv is called before collector            */
+        /* initialization.                                                 */
+#       define STACKBOTTOM ((ptr_t)(((word)(environ) | (getpagesize()-1))+1))
+/* #    define HEURISTIC2 */
+        /* Normally HEURISTIC2 is too conservative, since               */
+        /* the text segment immediately follows the stack.              */
+        /* Hence we give an upper pound.                                */
+        /* This is currently unused, since we disabled HEURISTIC2       */
+        extern int __start[];
+#       define HEURISTIC2_LIMIT ((ptr_t)((word)(__start) & ~(getpagesize()-1)))
+#       ifndef GC_OSF1_THREADS
+          /* Unresolved signal issues with threads.     */
+#         define MPROTECT_VDB
 #       endif
-#      define DYNAMIC_LOADING
+#       define DYNAMIC_LOADING
 #   endif
 #   ifdef LINUX
 #       define OS_TYPE "LINUX"
 #       define LINUX_STACKBOTTOM
 #       ifdef __ELF__
-#        define SEARCH_FOR_DATA_START
+#         define SEARCH_FOR_DATA_START
 #         define DYNAMIC_LOADING
 #       else
 #           define DATASTART ((ptr_t) 0x140000000)
 #       endif
-       extern int _end[];
-#      define DATAEND (ptr_t)(_end)
-#      define MPROTECT_VDB
-               /* Has only been superficially tested.  May not */
-               /* work on all versions.                        */
+        extern int _end[];
+#       define DATAEND (ptr_t)(_end)
+#       define MPROTECT_VDB
+                /* Has only been superficially tested.  May not */
+                /* work on all versions.                        */
 #   endif
 # endif
 
 # ifdef IA64
 #   define MACH_TYPE "IA64"
 #   ifdef HPUX
-#      ifdef _ILP32
-#        define CPP_WORDSZ 32
-           /* Requires 8 byte alignment for malloc */
-#        define ALIGNMENT 4
+#       ifdef _ILP32
+#         define CPP_WORDSZ 32
+            /* Requires 8 byte alignment for malloc */
+#         define ALIGNMENT 4
 #       else
-#        ifndef _LP64
-               ---> unknown ABI
+#         ifndef _LP64
+                ---> unknown ABI
 #         endif
-#        define CPP_WORDSZ 64
-           /* Requires 16 byte alignment for malloc */
+#         define CPP_WORDSZ 64
+            /* Requires 16 byte alignment for malloc */
 #         define ALIGNMENT 8
 #       endif
-#       define OS_TYPE "HPUX"  
+#       define OS_TYPE "HPUX"
         extern int __data_start[];
 #       define DATASTART ((ptr_t)(__data_start))
-        /* Gustavo Rodriguez-Rivera suggested changing HEURISTIC2      */
-        /* to this.  Note that the GC must be initialized before the   */
-       /* first putenv call.                                           */
-       extern char ** environ;
+        /* Gustavo Rodriguez-Rivera suggested changing HEURISTIC2       */
+        /* to this.  Note that the GC must be initialized before the    */
+        /* first putenv call.                                           */
+        extern char ** environ;
 #       define STACKBOTTOM ((ptr_t)environ)
 #       define HPUX_STACKBOTTOM
 #       define DYNAMIC_LOADING
 #       include <unistd.h>
 #       define GETPAGESIZE() sysconf(_SC_PAGE_SIZE)
-       /* The following was empirically determined, and is probably    */
-       /* not very robust.                                             */
-       /* Note that the backing store base seems to be at a nice       */
-       /* address minus one page.                                      */
-#      define BACKING_STORE_DISPLACEMENT 0x1000000
-#      define BACKING_STORE_ALIGNMENT 0x1000
-       extern ptr_t GC_register_stackbottom;
-#      define BACKING_STORE_BASE GC_register_stackbottom
-       /* Known to be wrong for recent HP/UX versions!!!       */
+        /* The following was empirically determined, and is probably    */
+        /* not very robust.                                             */
+        /* Note that the backing store base seems to be at a nice       */
+        /* address minus one page.                                      */
+#       define BACKING_STORE_DISPLACEMENT 0x1000000
+#       define BACKING_STORE_ALIGNMENT 0x1000
+        extern ptr_t GC_register_stackbottom;
+#       define BACKING_STORE_BASE GC_register_stackbottom
+        /* Known to be wrong for recent HP/UX versions!!!       */
 #   endif
 #   ifdef LINUX
-#      define CPP_WORDSZ 64
-#      define ALIGNMENT 8
+#       define CPP_WORDSZ 64
+#       define ALIGNMENT 8
 #       define OS_TYPE "LINUX"
-       /* The following works on NUE and older kernels:        */
-/* #       define STACKBOTTOM ((ptr_t) 0xa000000000000000l)    */
-       /* This does not work on NUE:                           */
+        /* The following works on NUE and older kernels:        */
+/* #       define STACKBOTTOM ((ptr_t) 0xa000000000000000l)     */
+        /* This does not work on NUE:                           */
 #       define LINUX_STACKBOTTOM
-       /* We also need the base address of the register stack  */
-       /* backing store.  This is computed in                  */
-       /* GC_linux_register_stack_base based on the following  */
-       /* constants:                                           */
+        /* We also need the base address of the register stack  */
+        /* backing store.  This is computed in                  */
+        /* GC_linux_register_stack_base based on the following  */
+        /* constants:                                           */
 #       define BACKING_STORE_ALIGNMENT 0x100000
 #       define BACKING_STORE_DISPLACEMENT 0x80000000
-       extern ptr_t GC_register_stackbottom;
-#      define BACKING_STORE_BASE GC_register_stackbottom
-#      define SEARCH_FOR_DATA_START
-#      ifdef __GNUC__
+        extern ptr_t GC_register_stackbottom;
+#       define BACKING_STORE_BASE GC_register_stackbottom
+#       define SEARCH_FOR_DATA_START
+#       ifdef __GNUC__
 #         define DYNAMIC_LOADING
-#      else
-         /* In the Intel compiler environment, we seem to end up with  */
-         /* statically linked executables and an undefined reference   */
-         /* to _DYNAMIC                                                */
-#      endif
-#      define MPROTECT_VDB
-               /* Requires Linux 2.3.47 or later.      */
-       extern int _end[];
-#      define DATAEND (ptr_t)(_end)
+#       else
+          /* In the Intel compiler environment, we seem to end up with  */
+          /* statically linked executables and an undefined reference   */
+          /* to _DYNAMIC                                                */
+#       endif
+#       define MPROTECT_VDB
+                /* Requires Linux 2.3.47 or later.      */
+        extern int _end[];
+#       define DATAEND (ptr_t)(_end)
 #       ifdef __GNUC__
-#        ifndef __INTEL_COMPILER
-#          define PREFETCH(x) \
-             __asm__ ("        lfetch  [%0]": : "r"(x))
-#          define PREFETCH_FOR_WRITE(x) \
-             __asm__ ("        lfetch.excl     [%0]": : "r"(x))
-#          define CLEAR_DOUBLE(x) \
-             __asm__ ("        stf.spill       [%0]=f0": : "r"((void *)(x)))
-#        else
+#         ifndef __INTEL_COMPILER
+#           define PREFETCH(x) \
+              __asm__ ("        lfetch  [%0]": : "r"(x))
+#           define PREFETCH_FOR_WRITE(x) \
+              __asm__ ("        lfetch.excl     [%0]": : "r"(x))
+#           define CLEAR_DOUBLE(x) \
+              __asm__ ("        stf.spill       [%0]=f0": : "r"((void *)(x)))
+#         else
 #           include <ia64intrin.h>
-#          define PREFETCH(x) \
-             __lfetch(__lfhint_none, (x))
-#          define PREFETCH_FOR_WRITE(x) \
-             __lfetch(__lfhint_nta,  (x))
-#          define CLEAR_DOUBLE(x) \
-             __stf_spill((void *)(x), 0)
-#        endif // __INTEL_COMPILER
+#           define PREFETCH(x) \
+              __lfetch(__lfhint_none, (x))
+#           define PREFETCH_FOR_WRITE(x) \
+              __lfetch(__lfhint_nta,  (x))
+#           define CLEAR_DOUBLE(x) \
+              __stf_spill((void *)(x), 0)
+#         endif /* __INTEL_COMPILER */
 #       endif
 #   endif
 #   ifdef MSWIN32
-      /* FIXME: This is a very partial guess.  There is no port, yet.  */
+      /* FIXME: This is a very partial guess.  There is no port, yet.   */
 #     define OS_TYPE "MSWIN32"
-               /* STACKBOTTOM and DATASTART are handled specially in   */
-               /* os_dep.c.                                            */
+                /* STACKBOTTOM and DATASTART are handled specially in   */
+                /* os_dep.c.                                            */
 #     define DATAEND  /* not needed */
 #     if defined(_WIN64)
 #       define CPP_WORDSZ 64
 #     else
-#       define CPP_WORDSZ 32   /* Is this possible?    */
+#       define CPP_WORDSZ 32   /* Is this possible?     */
 #     endif
 #     define ALIGNMENT 8
 #   endif
 #   define ALIGNMENT 4
     extern int etext[];
 #   ifdef CX_UX
-#      define OS_TYPE "CX_UX"
+#       define OS_TYPE "CX_UX"
 #       define DATASTART ((((word)etext + 0x3fffff) & ~0x3fffff) + 0x10000)
 #   endif
 #   ifdef  DGUX
-#      define OS_TYPE "DGUX"
-       extern ptr_t GC_SysVGetDataStart(size_t, ptr_t);
+#       define OS_TYPE "DGUX"
+        ptr_t GC_SysVGetDataStart(size_t, ptr_t);
 #       define DATASTART GC_SysVGetDataStart(0x10000, (ptr_t)etext)
 #   endif
 #   define STACKBOTTOM ((char*)0xf0000000) /* determined empirically */
 # endif
 
 # ifdef S370
-    /* If this still works, and if anyone cares, this should probably  */
-    /* be moved to the S390 category.                                  */
+    /* If this still works, and if anyone cares, this should probably   */
+    /* be moved to the S390 category.                                   */
 #   define MACH_TYPE "S370"
-#   define ALIGNMENT 4 /* Required by hardware */
+#   define ALIGNMENT 4  /* Required by hardware */
 #   ifdef UTS4
 #       define OS_TYPE "UTS4"
-       extern int etext[];
-       extern int _etext[];
-       extern int _end[];
-       extern ptr_t GC_SysVGetDataStart(size_t, ptr_t);
+        extern int etext[];
+        extern int _etext[];
+        extern int _end[];
+        ptr_t GC_SysVGetDataStart(size_t, ptr_t);
 #       define DATASTART GC_SysVGetDataStart(0x10000, (ptr_t)_etext)
-#      define DATAEND (ptr_t)(_end)
-#      define HEURISTIC2
+#       define DATAEND (ptr_t)(_end)
+#       define HEURISTIC2
 #   endif
 # endif
 
 #       define OS_TYPE "LINUX"
 #       define LINUX_STACKBOTTOM
 #       define DYNAMIC_LOADING
-       extern int __data_start[];
+        extern int __data_start[];
 #       define DATASTART ((ptr_t)(__data_start))
     extern int _end[];
 #   define DATAEND (ptr_t)(_end)
 #   ifdef NETBSD
 #       define OS_TYPE "NETBSD"
 #       define HEURISTIC2
-#      ifdef __ELF__
+#       ifdef __ELF__
 #          define DATASTART GC_data_start
-#         define DYNAMIC_LOADING
-#      else
+#          define DYNAMIC_LOADING
+#       else
            extern char etext[];
 #          define DATASTART ((ptr_t)(etext))
-#      endif
+#       endif
 #   endif
 #   ifdef LINUX
 #       define OS_TYPE "LINUX"
 #       define STACK_GRAN 0x10000000
 #       ifdef __ELF__
 #            define DYNAMIC_LOADING
-#           include <features.h>
-#           if defined(__GLIBC__) && __GLIBC__ >= 2 \
-               || defined(PLATFORM_ANDROID)
-#               define SEARCH_FOR_DATA_START
-#           else
-                extern char **__environ;
+#            include <features.h>
+#            if defined(__GLIBC__) && __GLIBC__ >= 2 \
+                || defined(PLATFORM_ANDROID)
+#                define SEARCH_FOR_DATA_START
+#            else
+                 extern char **__environ;
 #                define DATASTART ((ptr_t)(&__environ))
-                             /* hideous kludge: __environ is the first */
-                             /* word in crt0.o, and delimits the start */
-                             /* of the data segment, no matter which   */
-                             /* ld options were passed through.        */
-                             /* We could use _etext instead, but that  */
-                             /* would include .rodata, which may       */
-                             /* contain large read-only data tables    */
-                             /* that we'd rather not scan.             */
-#           endif
-            extern int _end[];
-#           define DATAEND (ptr_t)(_end)
-#      else
-            extern int etext[];
+                              /* hideous kludge: __environ is the first */
+                              /* word in crt0.o, and delimits the start */
+                              /* of the data segment, no matter which   */
+                              /* ld options were passed through.        */
+                              /* We could use _etext instead, but that  */
+                              /* would include .rodata, which may       */
+                              /* contain large read-only data tables    */
+                              /* that we'd rather not scan.             */
+#            endif
+             extern int _end[];
+#            define DATAEND (ptr_t)(_end)
+#       else
+             extern int etext[];
 #            define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
 #       endif
 #   endif
       /* iPhone */
 #     define OS_TYPE "DARWIN"
 #     define DATASTART ((ptr_t) get_etext())
-#     define DATAEND   ((ptr_t) get_end())
+#     define DATAEND    ((ptr_t) get_end())
 /* #define STACKBOTTOM ((ptr_t) 0x30000000) */ /* FIXME: Is this needed? */
 #     define HEURISTIC1
-#     define USE_MMAP
+#     ifndef USE_MMAP
+#       define USE_MMAP
+#     endif
 #     define USE_MMAP_ANON
 #   endif
+#   ifdef OPENBSD
+#     define ALIGNMENT 4
+#     define OS_TYPE "OPENBSD"
+#     ifdef GC_OPENBSD_THREADS
+#       define UTHREAD_SP_OFFSET 176
+#     else
+#       include <sys/param.h>
+#       include <uvm/uvm_extern.h>
+#       define STACKBOTTOM USRSTACK
+#     endif
+      extern int __data_start[];
+#     define DATASTART ((ptr_t)__data_start)
+      extern char _end[];
+#     define DATAEND ((ptr_t)(&_end))
+#     define DYNAMIC_LOADING
+#   endif
 #   ifdef NOSYS
       /* __data_start is usually defined in the target linker script.  */
       extern int __data_start[];
 #   define DATAEND (ptr_t)(_end)
 # endif
 
-# ifdef SH
+# if defined(SH) && !defined(SH4)
 #   define MACH_TYPE "SH"
 #   define ALIGNMENT 4
 #   ifdef MSWINCE
 #      define DATASTART GC_data_start
 #      define DYNAMIC_LOADING
 #   endif
+#   ifdef OPENBSD
+#      define OS_TYPE "OPENBSD"
+#      ifdef GC_OPENBSD_THREADS
+#        define UTHREAD_SP_OFFSET 332
+#      else
+#        include <sys/param.h>
+#        include <uvm/uvm_extern.h>
+#        define STACKBOTTOM USRSTACK
+#      endif
+       extern int __data_start[];
+#      define DATASTART ((ptr_t)__data_start)
+       extern char _end[];
+#      define DATAEND ((ptr_t)(&_end))
+#      define DYNAMIC_LOADING
+#   endif
 # endif
+
 # ifdef SH4
 #   define MACH_TYPE "SH4"
 #   define OS_TYPE "MSWINCE"
 #     define HBLKSIZE 4096
 #   endif
 #   define CACHE_LINE_SIZE 64
+#   ifdef OPENBSD
+#       define OS_TYPE "OPENBSD"
+#       define ELF_CLASS ELFCLASS64
+#       ifdef GC_OPENBSD_THREADS
+#         define UTHREAD_SP_OFFSET 400
+#       else
+#         include <sys/param.h>
+#         include <uvm/uvm_extern.h>
+#         define STACKBOTTOM USRSTACK
+#       endif
+        extern int __data_start[];
+#       define DATASTART ((ptr_t)__data_start)
+        extern char _end[];
+#       define DATAEND ((ptr_t)(&_end))
+#       define DYNAMIC_LOADING
+#   endif
 #   ifdef LINUX
-#      define OS_TYPE "LINUX"
+#       define OS_TYPE "LINUX"
 #       define LINUX_STACKBOTTOM
 #       if !defined(GC_LINUX_THREADS) || !defined(REDIRECT_MALLOC)
-#          define MPROTECT_VDB
-#      else
-           /* We seem to get random errors in incremental mode,        */
-           /* possibly because Linux threads is itself a malloc client */
-           /* and can't deal with the signals.                         */
-#      endif
+#           define MPROTECT_VDB
+#       else
+            /* We seem to get random errors in incremental mode,        */
+            /* possibly because Linux threads is itself a malloc client */
+            /* and can't deal with the signals.                         */
+#       endif
 #       ifdef __ELF__
 #            define DYNAMIC_LOADING
-#           ifdef UNDEFINED    /* includes ro data */
-              extern int _etext[];
+#            ifdef UNDEFINED    /* includes ro data */
+               extern int _etext[];
 #              define DATASTART ((ptr_t)((((word) (_etext)) + 0xfff) & ~0xfff))
-#           endif
-#           include <features.h>
-#           define SEARCH_FOR_DATA_START
-            extern int _end[];
-#           define DATAEND (ptr_t)(_end)
-#      else
-            extern int etext[];
+#            endif
+#            include <features.h>
+#            define SEARCH_FOR_DATA_START
+             extern int _end[];
+#            define DATAEND (ptr_t)(_end)
+#       else
+             extern int etext[];
 #            define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
 #       endif
 #       if defined(__GNUC__) && __GNUC__ >= 3
-#          define PREFETCH(x) __builtin_prefetch((x), 0, 0)
-#          define PREFETCH_FOR_WRITE(x) __builtin_prefetch((x), 1)
-#      endif
+#           define PREFETCH(x) __builtin_prefetch((x), 0, 0)
+#           define PREFETCH_FOR_WRITE(x) __builtin_prefetch((x), 1)
+#       endif
 #   endif
 #   ifdef DARWIN
 #     define OS_TYPE "DARWIN"
 #     define DARWIN_DONT_PARSE_STACK
 #     define DYNAMIC_LOADING
       /* XXX: see get_end(3), get_etext() and get_end() should not be used.
-        These aren't used when dyld support is enabled (it is by default) */
+         These aren't used when dyld support is enabled (it is by default) */
 #     define DATASTART ((ptr_t) get_etext())
-#     define DATAEND   ((ptr_t) get_end())
+#     define DATAEND    ((ptr_t) get_end())
 #     define STACKBOTTOM ((ptr_t) 0x7fff5fc00000)
-#     define USE_MMAP
+#     ifndef USE_MMAP
+#       define USE_MMAP
+#     endif
 #     define USE_MMAP_ANON
 #     ifdef GC_DARWIN_THREADS
 #       define MPROTECT_VDB
 #     include <unistd.h>
 #     define GETPAGESIZE() getpagesize()
       /* There seems to be some issues with trylock hanging on darwin. This
-        should be looked into some more */
+         should be looked into some more */
 #     define NO_PTHREAD_TRYLOCK
 #   endif
 #   ifdef FREEBSD
-#      define OS_TYPE "FREEBSD"
-#      ifndef GC_FREEBSD_THREADS
-#          define MPROTECT_VDB
-#      endif
-#      ifdef __GLIBC__
-#          define SIG_SUSPEND          (32+6)
-#          define SIG_THR_RESTART      (32+5)
-           extern int _end[];
-#          define DATAEND (ptr_t)(_end)
-#      else
-#          define SIG_SUSPEND SIGUSR1
-#          define SIG_THR_RESTART SIGUSR2
-#      endif
-#      define FREEBSD_STACKBOTTOM
-#      ifdef __ELF__
-#          define DYNAMIC_LOADING
-#      endif
-       extern char etext[];
+#       define OS_TYPE "FREEBSD"
+#       ifndef GC_FREEBSD_THREADS
+#           define MPROTECT_VDB
+#       endif
+#       ifdef __GLIBC__
+#           define SIG_SUSPEND          (32+6)
+#           define SIG_THR_RESTART      (32+5)
+            extern int _end[];
+#           define DATAEND (ptr_t)(_end)
+#       else
+#           define SIG_SUSPEND SIGUSR1
+#           define SIG_THR_RESTART SIGUSR2
+#       endif
+#       define FREEBSD_STACKBOTTOM
+#       ifdef __ELF__
+#           define DYNAMIC_LOADING
+#       endif
+        extern char etext[];
         ptr_t GC_FreeBSDGetDataStart(size_t max_page_size, ptr_t etext_addr);
-#      define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext)
+#       define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext)
 #   endif
 #   ifdef NETBSD
-#      define OS_TYPE "NETBSD"
-#      ifdef __ELF__
-#          define DYNAMIC_LOADING
-#      endif
-#      define HEURISTIC2
-       extern char etext[];
-#      define SEARCH_FOR_DATA_START
+#       define OS_TYPE "NETBSD"
+#       ifdef __ELF__
+#           define DYNAMIC_LOADING
+#       endif
+#       define HEURISTIC2
+        extern char etext[];
+#       define SEARCH_FOR_DATA_START
 #   endif
 #   ifdef SOLARIS
-#      define OS_TYPE "SOLARIS"
-#      define ELF_CLASS ELFCLASS64
+#       define OS_TYPE "SOLARIS"
+#       define ELF_CLASS ELFCLASS64
         extern int _etext[], _end[];
-       extern ptr_t GC_SysVGetDataStart(size_t, ptr_t);
+        ptr_t GC_SysVGetDataStart(size_t, ptr_t);
 #       define DATASTART GC_SysVGetDataStart(0x1000, (ptr_t)_etext)
-#      define DATAEND (ptr_t)(_end)
-/*     # define STACKBOTTOM ((ptr_t)(_start)) worked through 2.7,      */
-/*      but reportedly breaks under 2.8.  It appears that the stack    */
-/*     base is a property of the executable, so this should not break  */
-/*     old executables.                                                */
-/*     HEURISTIC2 probably works, but this appears to be preferable.   */
-/*     Apparently USRSTACK is defined to be USERLIMIT, but in some     */
-/*     installations that's undefined.  We work around this with a     */
-/*     gross hack:                                                     */
+#       define DATAEND (ptr_t)(_end)
+/*      # define STACKBOTTOM ((ptr_t)(_start)) worked through 2.7,      */
+/*      but reportedly breaks under 2.8.  It appears that the stack     */
+/*      base is a property of the executable, so this should not break  */
+/*      old executables.                                                */
+/*      HEURISTIC2 probably works, but this appears to be preferable.   */
+/*      Apparently USRSTACK is defined to be USERLIMIT, but in some     */
+/*      installations that's undefined.  We work around this with a     */
+/*      gross hack:                                                     */
 #       include <sys/vmparam.h>
-#      ifdef USERLIMIT
-         /* This should work everywhere, but doesn't.  */
-#        define STACKBOTTOM ((ptr_t) USRSTACK)
+#       ifdef USERLIMIT
+          /* This should work everywhere, but doesn't.  */
+#         define STACKBOTTOM ((ptr_t) USRSTACK)
 #       else
-#        define HEURISTIC2
+#         define HEURISTIC2
 #       endif
 /* At least in Solaris 2.5, PROC_VDB gives wrong values for dirty bits. */
-/* It appears to be fixed in 2.8 and 2.9.                              */
-#      ifdef SOLARIS25_PROC_VDB_BUG_FIXED
-#        define PROC_VDB
-#      endif
-#      define DYNAMIC_LOADING
-#      if !defined(USE_MMAP) && defined(REDIRECT_MALLOC)
-#          define USE_MMAP
-           /* Otherwise we now use calloc.  Mmap may result in the     */
-           /* heap interleaved with thread stacks, which can result in */
-           /* excessive blacklisting.  Sbrk is unusable since it       */
-           /* doesn't interact correctly with the system malloc.       */
-#      endif
+/* It appears to be fixed in 2.8 and 2.9.                               */
+#       ifdef SOLARIS25_PROC_VDB_BUG_FIXED
+#         define PROC_VDB
+#       endif
+#       define DYNAMIC_LOADING
+#       if !defined(USE_MMAP) && defined(REDIRECT_MALLOC)
+#         define USE_MMAP
+            /* Otherwise we now use calloc.  Mmap may result in the     */
+            /* heap interleaved with thread stacks, which can result in */
+            /* excessive blacklisting.  Sbrk is unusable since it       */
+            /* doesn't interact correctly with the system malloc.       */
+#       endif
 #       ifdef USE_MMAP
 #         define HEAP_START (ptr_t)0x40000000
 #       else
-#        define HEAP_START DATAEND
+#         define HEAP_START DATAEND
 #       endif
 #   endif
 #   ifdef MSWIN32
-#      define OS_TYPE "MSWIN32"
-               /* STACKBOTTOM and DATASTART are handled specially in   */
-               /* os_dep.c.                                            */
-#      define MPROTECT_VDB
+#       define OS_TYPE "MSWIN32"
+                /* STACKBOTTOM and DATASTART are handled specially in   */
+                /* os_dep.c.                                            */
+#       define MPROTECT_VDB
 #       define GWW_VDB
 #       define DATAEND  /* not needed */
 #   endif
 
 #if defined(LINUX_STACKBOTTOM) && defined(NO_PROC_STAT) \
     && !defined(USE_LIBC_PRIVATES)
-    /* This combination will fail, since we have no way to get */
-    /* the stack base. Use HEURISTIC2 instead.                 */
+    /* This combination will fail, since we have no way to get  */
+    /* the stack base.  Use HEURISTIC2 instead.                 */
 #   undef LINUX_STACKBOTTOM
 #   define HEURISTIC2
-    /* This may still fail on some architectures like IA64.    */
-    /* We tried ...                                            */
+    /* This may still fail on some architectures like IA64.     */
+    /* We tried ...                                             */
 #endif
 
 #if defined(LINUX) && defined(USE_MMAP)
-    /* The kernel may do a somewhat better job merging mappings etc.   */
-    /* with anonymous mappings.                                                */
+    /* The kernel may do a somewhat better job merging mappings etc.    */
+    /* with anonymous mappings.                                         */
 #   define USE_MMAP_ANON
 #endif
 
 #if defined(GC_LINUX_THREADS) && defined(REDIRECT_MALLOC)
-    /* Nptl allocates thread stacks with mmap, which is fine.  But it  */
-    /* keeps a cache of thread stacks.  Thread stacks contain the      */
-    /* thread control blocks.  These in turn contain a pointer to      */
-    /* (sizeof (void *) from the beginning of) the dtv for thread-local        */
-    /* storage, which is calloc allocated.  If we don't scan the cached        */
-    /* thread stacks, we appear to lose the dtv.  This tends to                */
-    /* result in something that looks like a bogus dtv count, which    */
-    /* tends to result in a memset call on a block that is way too     */
-    /* large.  Sometimes we're lucky and the process just dies ...     */
-    /* There seems to be a similar issue with some other memory        */
-    /* allocated by the dynamic loader.                                        */
-    /* This should be avoidable by either:                             */
-    /* - Defining USE_PROC_FOR_LIBRARIES here.                         */
-    /*   That performs very poorly, precisely because we end up        */
-    /*   scanning cached stacks.                                       */
-    /* - Have calloc look at its callers.                              */
-    /*   In spite of the fact that it is gross and disgusting.         */
-    /* In fact neither seems to suffice, probably in part because      */
-    /* even with USE_PROC_FOR_LIBRARIES, we don't scan parts of stack  */
-    /* segments that appear to be out of bounds.  Thus we actually     */
-    /* do both, which seems to yield the best results.                 */
+    /* Nptl allocates thread stacks with mmap, which is fine.  But it   */
+    /* keeps a cache of thread stacks.  Thread stacks contain the       */
+    /* thread control blocks.  These in turn contain a pointer to       */
+    /* (sizeof (void *) from the beginning of) the dtv for thread-local */
+    /* storage, which is calloc allocated.  If we don't scan the cached */
+    /* thread stacks, we appear to lose the dtv.  This tends to         */
+    /* result in something that looks like a bogus dtv count, which     */
+    /* tends to result in a memset call on a block that is way too      */
+    /* large.  Sometimes we're lucky and the process just dies ...      */
+    /* There seems to be a similar issue with some other memory         */
+    /* allocated by the dynamic loader.                                 */
+    /* This should be avoidable by either:                              */
+    /* - Defining USE_PROC_FOR_LIBRARIES here.                          */
+    /*   That performs very poorly, precisely because we end up         */
+    /*   scanning cached stacks.                                        */
+    /* - Have calloc look at its callers.                               */
+    /*   In spite of the fact that it is gross and disgusting.          */
+    /* In fact neither seems to suffice, probably in part because       */
+    /* even with USE_PROC_FOR_LIBRARIES, we don't scan parts of stack   */
+    /* segments that appear to be out of bounds.  Thus we actually      */
+    /* do both, which seems to yield the best results.                  */
 
 #   define USE_PROC_FOR_LIBRARIES
 #endif
 # ifndef GETPAGESIZE
 #   if defined(SOLARIS) || defined(IRIX5) || defined(LINUX) \
        || defined(NETBSD) || defined(FREEBSD) || defined(HPUX)
-#      include <unistd.h>
+#       include <unistd.h>
 #   endif
 #   define GETPAGESIZE() getpagesize()
 # endif
 
 # if defined(SOLARIS) || defined(DRSNX) || defined(UTS4)
-           /* OS has SVR4 generic features.            */
-           /* Probably others also qualify.            */
+            /* OS has SVR4 generic features.            */
+            /* Probably others also qualify.            */
 #   define SVR4
 # endif
 
 # if defined(SOLARIS) || defined(DRSNX)
-           /* OS has SOLARIS style semi-undocumented interface */
-           /* to dynamic loader.                               */
+            /* OS has SOLARIS style semi-undocumented interface */
+            /* to dynamic loader.                               */
 #   define SOLARISDL
-           /* OS has SOLARIS style signal handlers.            */
+            /* OS has SOLARIS style signal handlers.            */
 #   define SUNOS5SIGS
 # endif
 
 # endif
 
 # if defined(SVR4) || defined(LINUX) || defined(IRIX5) || defined(HPUX) \
-           || defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \
-           || defined(DGUX) || defined(BSD) \
-           || defined(AIX) || defined(DARWIN) || defined(OSF1) \
-           || defined(HURD)
-#   define UNIX_LIKE   /* Basic Unix-like system calls work.   */
+            || defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \
+            || defined(DGUX) || defined(BSD) \
+            || defined(AIX) || defined(DARWIN) || defined(OSF1) \
+            || defined(HURD)
+#   define UNIX_LIKE   /* Basic Unix-like system calls work.    */
 # endif
 
 # if CPP_WORDSZ != 32 && CPP_WORDSZ != 64
-          -> bad word size
+           -> bad word size
+# endif
+
+# ifndef ALIGNMENT
+    --> undefined ALIGNMENT
 # endif
 
 # ifdef PCR
 #   define PCR_VDB
 # endif
 
-# ifdef SMALL_CONFIG
-       /* Presumably not worth the space it takes. */
-#   undef PROC_VDB
+# if !defined(STACKBOTTOM) && (defined(ECOS) || defined(NOSYS))
+#   error --> undefined STACKBOTTOM
+# endif
+
+# if defined(SMALL_CONFIG) && !defined(GC_DISABLE_INCREMENTAL)
+        /* Presumably not worth the space it takes. */
+#   define GC_DISABLE_INCREMENTAL
+# endif
+
+# ifdef GC_DISABLE_INCREMENTAL
+#   undef GWW_VDB
 #   undef MPROTECT_VDB
+#   undef PCR_VDB
+#   undef PROC_VDB
+# endif
+
+# ifdef USE_GLOBAL_ALLOC
+    /* Cannot pass MEM_WRITE_WATCH to GlobalAlloc().    */
+#   undef GWW_VDB
 # endif
 
 # ifdef USE_MUNMAP
-    /* FIXME: Remove this undef if possible.   */
+    /* FIXME: Remove this undef if possible.    */
 #   undef MPROTECT_VDB  /* Can't deal with address space holes. */
 # endif
 
 # if defined(PARALLEL_MARK)
-    /* FIXME: Remove this undef if possible.   */
-#   undef MPROTECT_VDB  /* For now.    */
+    /* FIXME: Remove this undef if possible.    */
+#   undef MPROTECT_VDB  /* For now.     */
 # endif
 
 # if defined(MPROTECT_VDB) && defined(GC_PREFER_MPROTECT_VDB)
 # endif
 
 # ifndef CACHE_LINE_SIZE
-#   define CACHE_LINE_SIZE 32  /* Wild guess   */
+#   define CACHE_LINE_SIZE 32   /* Wild guess   */
 # endif
 
 # ifndef STATIC
 
 # if defined(LINUX) || defined(HURD) || defined(__GLIBC__)
 #   define REGISTER_LIBRARIES_EARLY
-    /* We sometimes use dl_iterate_phdr, which may acquire an internal */
-    /* lock.  This isn't safe after the world has stopped.  So we must */
-    /* call GC_register_dynamic_libraries before stopping the world.   */
-    /* For performance reasons, this may be beneficial on other                */
-    /* platforms as well, though it should be avoided in win32.                */
+    /* We sometimes use dl_iterate_phdr, which may acquire an internal  */
+    /* lock.  This isn't safe after the world has stopped.  So we must  */
+    /* call GC_register_dynamic_libraries before stopping the world.    */
+    /* For performance reasons, this may be beneficial on other         */
+    /* platforms as well, though it should be avoided in win32.         */
 # endif /* LINUX */
 
 # if defined(SEARCH_FOR_DATA_START)
 
 # ifndef CLEAR_DOUBLE
 #   define CLEAR_DOUBLE(x) \
-               ((word*)x)[0] = 0; \
-               ((word*)x)[1] = 0;
+                ((word*)x)[0] = 0; \
+                ((word*)x)[1] = 0;
 # endif /* CLEAR_DOUBLE */
 
 # if defined(GC_LINUX_THREADS) && defined(REDIRECT_MALLOC) \
      && !defined(INCLUDE_LINUX_THREAD_DESCR)
-    /* Will not work, since libc and the dynamic loader use thread     */
-    /* locals, sometimes as the only reference.                                */
+    /* Will not work, since libc and the dynamic loader use thread      */
+    /* locals, sometimes as the only reference.                         */
 #   define INCLUDE_LINUX_THREAD_DESCR
 # endif
 
 # if defined(GC_IRIX_THREADS) && !defined(IRIX5)
-       --> inconsistent configuration
+        --> inconsistent configuration
 # endif
 # if defined(GC_LINUX_THREADS) && !defined(LINUX)
-       --> inconsistent configuration
+        --> inconsistent configuration
 # endif
 # if defined(GC_NETBSD_THREADS) && !defined(NETBSD)
-       --> inconsistent configuration
+        --> inconsistent configuration
 # endif
 # if defined(GC_FREEBSD_THREADS) && !defined(FREEBSD)
-       --> inconsistent configuration
+        --> inconsistent configuration
 # endif
 # if defined(GC_SOLARIS_THREADS) && !defined(SOLARIS)
-       --> inconsistent configuration
+        --> inconsistent configuration
 # endif
 # if defined(GC_HPUX_THREADS) && !defined(HPUX)
-       --> inconsistent configuration
+        --> inconsistent configuration
 # endif
 # if defined(GC_AIX_THREADS) && !defined(_AIX)
-       --> inconsistent configuration
+        --> inconsistent configuration
 # endif
 # if defined(GC_GNU_THREADS) && !defined(HURD)
-       --> inconsistent configuration
+        --> inconsistent configuration
 # endif
-# if defined(GC_WIN32_THREADS) && !defined(MSWIN32) && !defined(CYGWIN32)
-       --> inconsistent configuration
+# if defined(GC_WIN32_THREADS) && !defined(MSWIN32) && !defined(CYGWIN32) \
+        && !defined(MSWINCE)
+        --> inconsistent configuration
 # endif
 
 # if defined(PCR) || defined(GC_WIN32_THREADS) || defined(GC_PTHREADS)
 #   define THREADS
 # endif
 
+# if defined(UNIX_LIKE) && defined(THREADS) && !defined(NO_CANCEL_SAFE)
+    /* Make the code cancellation-safe.  This basically means that we   */
+    /* ensure that cancellation requests are ignored while we are in    */
+    /* the collector.  This applies only to Posix deferred cancellation;*/
+    /* we don't handle Posix asynchronous cancellation.                 */
+    /* Note that this only works if pthread_setcancelstate is           */
+    /* async-signal-safe, at least in the absence of asynchronous       */
+    /* cancellation.  This appears to be true for the glibc version,    */
+    /* though it is not documented.  Without that assumption, there     */
+    /* seems to be no way to safely wait in a signal handler, which     */
+    /* we need to do for thread suspension.                             */
+    /* Also note that little other code appears to be cancellation-safe.*/
+    /* Hence it may make sense to turn this off for performance.        */
+#   define CANCEL_SAFE
+#   define IF_CANCEL(x) x
+# else
+#   define IF_CANCEL(x)
+# endif
+
 # if !defined(USE_MARK_BITS) && !defined(USE_MARK_BYTES)
 #   if defined(THREADS) && defined(PARALLEL_MARK)
 #     define USE_MARK_BYTES
 #   endif
 # endif
 
-# if defined(MSWINCE)
+# if defined(MSWINCE) && !defined(__CEGCC__) && !defined(NO_GETENV)
 #   define NO_GETENV
 # endif
 
+# if (defined(NO_GETENV) || defined(MSWINCE)) && !defined(NO_GETENV_WIN32)
+#   define NO_GETENV_WIN32
+# endif
+
 # ifndef STRTOULL
 #   if defined(_WIN64) && !defined(__GNUC__)
 #     define STRTOULL _strtoui64
 #   elif defined(_LLP64) || defined(__LLP64__) || defined(_WIN64)
 #     define STRTOULL strtoull
 #   else
-       /* strtoul() fits since sizeof(long) >= sizeof(word).           */
+        /* strtoul() fits since sizeof(long) >= sizeof(word).           */
 #     define STRTOULL strtoul
 #   endif
 # endif
 
 # if defined(SPARC)
-#   define ASM_CLEAR_CODE      /* Stack clearing is crucial, and we    */
-                               /* include assembly code to do it well. */
+#   define ASM_CLEAR_CODE       /* Stack clearing is crucial, and we    */
+                                /* include assembly code to do it well. */
 # endif
 
-  /* Can we save call chain in objects for debugging?                  */
-  /* SET NFRAMES (# of saved frames) and NARGS (#of args for each      */
-  /* frame) to reasonable values for the platform.                     */
-  /* Set SAVE_CALL_CHAIN if we can.  SAVE_CALL_COUNT can be specified  */
-  /* at build time, though we feel free to adjust it slightly.         */
-  /* Define NEED_CALLINFO if we either save the call stack or          */
-  /* GC_ADD_CALLER is defined.                                         */
-  /* GC_CAN_SAVE_CALL_STACKS is set in gc.h.                           */
+  /* Can we save call chain in objects for debugging?                   */
+  /* SET NFRAMES (# of saved frames) and NARGS (#of args for each       */
+  /* frame) to reasonable values for the platform.                      */
+  /* Set SAVE_CALL_CHAIN if we can.  SAVE_CALL_COUNT can be specified   */
+  /* at build time, though we feel free to adjust it slightly.          */
+  /* Define NEED_CALLINFO if we either save the call stack or           */
+  /* GC_ADD_CALLER is defined.                                          */
+  /* GC_CAN_SAVE_CALL_STACKS is set in gc.h.                            */
 
 #if defined(SPARC)
 # define CAN_SAVE_CALL_ARGS
 #endif
 #if (defined(I386) || defined(X86_64)) && (defined(LINUX) || defined(__GLIBC__))
-           /* SAVE_CALL_CHAIN is supported if the code is compiled to save     */
-           /* frame pointers by default, i.e. no -fomit-frame-pointer flag.    */
+            /* SAVE_CALL_CHAIN is supported if the code is compiled to save     */
+            /* frame pointers by default, i.e. no -fomit-frame-pointer flag.    */
 # define CAN_SAVE_CALL_ARGS
 #endif
 
 # if defined(SAVE_CALL_COUNT) && !defined(GC_ADD_CALLER) \
-            && defined(GC_CAN_SAVE_CALL_STACKS)
-#   define SAVE_CALL_CHAIN 
+             && defined(GC_CAN_SAVE_CALL_STACKS)
+#   define SAVE_CALL_CHAIN
 # endif
 # ifdef SAVE_CALL_CHAIN
 #   if defined(SAVE_CALL_NARGS) && defined(CAN_SAVE_CALL_ARGS)
 #     define NARGS SAVE_CALL_NARGS
 #   else
-#     define NARGS 0   /* Number of arguments to save for each call.   */
+#     define NARGS 0    /* Number of arguments to save for each call.   */
 #   endif
 # endif
 # ifdef SAVE_CALL_CHAIN
 #   ifndef SAVE_CALL_COUNT
-#     define NFRAMES 6 /* Number of frames to save. Even for           */
-                       /* alignment reasons.                           */
+#     define NFRAMES 6  /* Number of frames to save. Even for           */
+                        /* alignment reasons.                           */
 #   else
 #     define NFRAMES ((SAVE_CALL_COUNT + 1) & ~1)
 #   endif
 # endif
 
 # if !defined(MARK_BIT_PER_GRANULE) && !defined(MARK_BIT_PER_OBJ)
-#   define MARK_BIT_PER_GRANULE        /* Usually faster */
+#   define MARK_BIT_PER_GRANULE /* Usually faster */
 # endif
 
-/* Some static sanity tests.   */
+/* Some static sanity tests.    */
 # if defined(MARK_BIT_PER_GRANULE) && defined(MARK_BIT_PER_OBJ)
 #   error Define only one of MARK_BIT_PER_GRANULE and MARK_BIT_PER_OBJ.
 # endif
 # endif
 
 #ifdef GC_PRIVATE_H
-       /* This relies on some type definitions from gc_priv.h, from    */
-        /* where it's normally included.                               */
-       /*                                                              */
-       /* How to get heap memory from the OS:                          */
-       /* Note that sbrk()-like allocation is preferred, since it      */
-       /* usually makes it possible to merge consecutively allocated   */
-       /* chunks.  It also avoids unintended recursion with            */
-       /* -DREDIRECT_MALLOC.                                           */
-       /* GET_MEM() returns a HLKSIZE aligned chunk.                   */
-       /* 0 is taken to mean failure.                                  */
-       /* In the case os USE_MMAP, the argument must also be a         */
-       /* physical page size.                                          */
-       /* GET_MEM is currently not assumed to retrieve 0 filled space, */
-       /* though we should perhaps take advantage of the case in which */
-       /* does.                                                        */
-       struct hblk;    /* See gc_priv.h.       */
+        /* This relies on some type definitions from gc_priv.h, from    */
+        /* where it's normally included.                                */
+        /*                                                              */
+        /* How to get heap memory from the OS:                          */
+        /* Note that sbrk()-like allocation is preferred, since it      */
+        /* usually makes it possible to merge consecutively allocated   */
+        /* chunks.  It also avoids unintended recursion with            */
+        /* REDIRECT_MALLOC macro defined.                               */
+        /* GET_MEM() returns a HLKSIZE aligned chunk.                   */
+        /* 0 is taken to mean failure.                                  */
+        /* In the case os USE_MMAP, the argument must also be a         */
+        /* physical page size.                                          */
+        /* GET_MEM is currently not assumed to retrieve 0 filled space, */
+        /* though we should perhaps take advantage of the case in which */
+        /* does.                                                        */
+        struct hblk;    /* See gc_priv.h.       */
 # if defined(PCR)
     char * real_malloc(size_t bytes);
 #   define GET_MEM(bytes) HBLKPTR(real_malloc((size_t)bytes + GC_page_size) \
-                                         + GC_page_size-1)
+                                          + GC_page_size-1)
 # elif defined(OS2)
     void * os2_alloc(size_t bytes);
 #   define GET_MEM(bytes) HBLKPTR((ptr_t)os2_alloc((size_t)bytes \
-                                           + GC_page_size) \
-                                           + GC_page_size-1)
+                                            + GC_page_size) \
+                                            + GC_page_size-1)
 # elif defined(NEXT) || defined(DOS4GW) || defined(NONSTOP) || \
-                (defined(AMIGA) && !defined(GC_AMIGA_FASTALLOC)) || \
-                (defined(SOLARIS) && !defined(USE_MMAP))
+                 (defined(AMIGA) && !defined(GC_AMIGA_FASTALLOC)) || \
+                 (defined(SOLARIS) && !defined(USE_MMAP))
 #   define GET_MEM(bytes) HBLKPTR((size_t) calloc(1, (size_t)bytes + GC_page_size) \
-                                                    + GC_page_size-1)
+                                                     + GC_page_size-1)
 # elif defined(MSWIN32)
     ptr_t GC_win32_get_mem(GC_word bytes);
 #   define GET_MEM(bytes) (struct hblk *)GC_win32_get_mem(bytes)
 # elif defined(MACOS)
 #   if defined(USE_TEMPORARY_MEMORY)
-      extern Ptr GC_MacTemporaryNewPtr(size_t size, Boolean clearMemory);
+      Ptr GC_MacTemporaryNewPtr(size_t size, Boolean clearMemory);
 #     define GET_MEM(bytes) HBLKPTR( \
-                           GC_MacTemporaryNewPtr(bytes + GC_page_size, true) \
-                           + GC_page_size-1)
+                            GC_MacTemporaryNewPtr(bytes + GC_page_size, true) \
+                            + GC_page_size-1)
 #   else
 #     define GET_MEM(bytes) HBLKPTR( \
-                               NewPtrClear(bytes + GC_page_size) + GC_page_size-1)
+                                NewPtrClear(bytes + GC_page_size) + GC_page_size-1)
 #   endif
 # elif defined(MSWINCE)
     ptr_t GC_wince_get_mem(GC_word bytes);
 #   define GET_MEM(bytes) (struct hblk *)GC_wince_get_mem(bytes)
 # elif defined(AMIGA) && defined(GC_AMIGA_FASTALLOC)
-    extern void *GC_amiga_get_mem(size_t size);
+    void *GC_amiga_get_mem(size_t size);
 #   define GET_MEM(bytes) HBLKPTR((size_t) \
-                         GC_amiga_get_mem((size_t)bytes + GC_page_size) \
-                         + GC_page_size-1)
+                          GC_amiga_get_mem((size_t)bytes + GC_page_size) \
+                          + GC_page_size-1)
 # else
     ptr_t GC_unix_get_mem(GC_word bytes);
 #   define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes)
index 6f9197a1f6f103615d59040c0b0a728726b95da3..6690c58e4377171f4260d4e80c4c5a75d826cec7 100644 (file)
@@ -1,11 +1,31 @@
+/*
+ * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
+ * Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
+ * All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
 #ifndef GC_PTHREAD_STOP_WORLD_H
 #define GC_PTHREAD_STOP_WORLD_H
 
 struct thread_stop_info {
-    word last_stop_count;      /* GC_last_stop_count value when thread */
-                               /* last successfully handled a suspend  */
-                               /* signal.                              */
-    ptr_t stack_ptr;           /* Valid only when stopped.             */
+#   ifndef GC_OPENBSD_THREADS
+      word last_stop_count;     /* GC_last_stop_count value when thread */
+                                /* last successfully handled a suspend  */
+                                /* signal.                              */
+#   endif
+
+    ptr_t stack_ptr;            /* Valid only when stopped.             */
 };
-    
+
 #endif
index 43248bfdc7376a03fcccb473c8a3f7c80f38e558..df7a482e20afb050e6c1352bcf1705b7f6598d7c 100644 (file)
@@ -1,10 +1,27 @@
+/*
+ * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
+ * Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
+ * All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
 #ifndef GC_PTHREAD_SUPPORT_H
 #define GC_PTHREAD_SUPPORT_H
 
 # include "private/gc_priv.h"
 
 # if defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS)
-     
+
 #if defined(GC_DARWIN_THREADS)
 # include "private/darwin_stop_world.h"
 #else
 
 /* We use the allocation lock to protect thread-related data structures. */
 
-/* The set of all known threads.  We intercept thread creation and     */
-/* joins.                                                              */
-/* Protected by allocation/GC lock.                                    */
-/* Some of this should be declared volatile, but that's inconsistent   */
-/* with some library routine declarations.                             */
+/* The set of all known threads.  We intercept thread creation and      */
+/* joins.                                                               */
+/* Protected by allocation/GC lock.                                     */
+/* Some of this should be declared volatile, but that's inconsistent    */
+/* with some library routine declarations.                              */
 typedef struct GC_Thread_Rep {
-    struct GC_Thread_Rep * next;  /* More recently allocated threads   */
-                                 /* with a given pthread id come       */
-                                 /* first.  (All but the first are     */
-                                 /* guaranteed to be dead, but we may  */
-                                 /* not yet have registered the join.) */
+    struct GC_Thread_Rep * next;  /* More recently allocated threads    */
+                                  /* with a given pthread id come       */
+                                  /* first.  (All but the first are     */
+                                  /* guaranteed to be dead, but we may  */
+                                  /* not yet have registered the join.) */
     pthread_t id;
     /* Extra bookkeeping information the stopping code uses */
     struct thread_stop_info stop_info;
-    
+
     short flags;
-#      define FINISHED 1       /* Thread has exited.   */
-#      define DETACHED 2       /* Thread is treated as detached.       */
-                               /* Thread may really be detached, or    */
-                               /* it may have have been explicitly     */
-                               /* registered, in which case we can     */
-                               /* deallocate its GC_Thread_Rep once    */
-                               /* it unregisters itself, since it      */
-                               /* may not return a GC pointer.         */
-#      define MAIN_THREAD 4    /* True for the original thread only.   */
-    short thread_blocked;      /* Protected by GC lock.                */
-                               /* Treated as a boolean value.  If set, */
-                               /* thread will acquire GC lock before   */
-                               /* doing any pointer manipulations, and */
-                               /* has set its sp value.  Thus it does  */
-                               /* not need to be sent a signal to stop */
-                               /* it.                                  */
-    ptr_t stack_end;           /* Cold end of the stack (except for    */
-                               /* main thread).                        */
+#       define FINISHED 1       /* Thread has exited.   */
+#       define DETACHED 2       /* Thread is treated as detached.       */
+                                /* Thread may really be detached, or    */
+                                /* it may have have been explicitly     */
+                                /* registered, in which case we can     */
+                                /* deallocate its GC_Thread_Rep once    */
+                                /* it unregisters itself, since it      */
+                                /* may not return a GC pointer.         */
+#       define MAIN_THREAD 4    /* True for the original thread only.   */
+    short thread_blocked;       /* Protected by GC lock.                */
+                                /* Treated as a boolean value.  If set, */
+                                /* thread will acquire GC lock before   */
+                                /* doing any pointer manipulations, and */
+                                /* has set its sp value.  Thus it does  */
+                                /* not need to be sent a signal to stop */
+                                /* it.                                  */
+    ptr_t stack_end;            /* Cold end of the stack (except for    */
+                                /* main thread).                        */
 #   ifdef IA64
-       ptr_t backing_store_end;
-       ptr_t backing_store_ptr;
+        ptr_t backing_store_end;
+        ptr_t backing_store_ptr;
 #   endif
-    void * status;             /* The value returned from the thread.  */
-                               /* Used only to avoid premature         */
-                               /* reclamation of any data it might     */
-                               /* reference.                           */
-                               /* This is unfortunately also the       */
-                               /* reason we need to intercept join     */
-                               /* and detach.                          */
+
+    struct GC_activation_frame_s *activation_frame;
+                        /* Points to the "frame" data held in stack by  */
+                        /* the innermost GC_call_with_gc_active() of    */
+                        /* this thread.  May be NULL.                   */
+
+    void * status;              /* The value returned from the thread.  */
+                                /* Used only to avoid premature         */
+                                /* reclamation of any data it might     */
+                                /* reference.                           */
+                                /* This is unfortunately also the       */
+                                /* reason we need to intercept join     */
+                                /* and detach.                          */
+
+    unsigned finalizer_nested;
+    unsigned finalizer_skipped; /* Used by GC_check_finalizer_nested()  */
+                                /* to minimize the level of recursion   */
+                                /* when a client finalizer allocates    */
+                                /* memory (initially both are 0).       */
+
 #   ifdef THREAD_LOCAL_ALLOC
         struct thread_local_freelists tlfs;
 #   endif
 } * GC_thread;
 
-# define THREAD_TABLE_SZ 256   /* Must be power of 2   */
-extern volatile GC_thread GC_threads[THREAD_TABLE_SZ];
+# define THREAD_TABLE_SZ 256    /* Must be power of 2   */
+GC_EXTERN volatile GC_thread GC_threads[THREAD_TABLE_SZ];
 
-extern GC_bool GC_thr_initialized;
+GC_EXTERN GC_bool GC_thr_initialized;
 
-GC_thread GC_lookup_thread(pthread_t id);
+GC_INNER GC_thread GC_lookup_thread(pthread_t id);
 
-void GC_stop_init(void);
+GC_INNER void GC_stop_init(void);
 
-extern GC_bool GC_in_thread_creation;
-       /* We may currently be in thread creation or destruction.       */
-       /* Only set to TRUE while allocation lock is held.              */
-       /* When set, it is OK to run GC from unknown thread.            */
+GC_EXTERN GC_bool GC_in_thread_creation;
+        /* We may currently be in thread creation or destruction.       */
+        /* Only set to TRUE while allocation lock is held.              */
+        /* When set, it is OK to run GC from unknown thread.            */
 
 #endif /* GC_PTHREADS && !GC_SOLARIS_THREADS.... etc */
 #endif /* GC_PTHREAD_SUPPORT_H */
index 32b6a3e5fe6024013f1415441e8da1046cd17f94..0886adcbae6d0eb005e0a6135dbb7bc0a54d4989 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) 2000-2005 by Hewlett-Packard Company.  All rights reserved.
  *
  * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
  * modified is included with the above copyright notice.
  */
 
-/* Included indirectly from a thread-library-specific file.    */
-/* This is the interface for thread-local allocation, whose    */
-/* implementation is mostly thread-library-independent.                */
-/* Here we describe only the interface that needs to be known  */
-/* and invoked from the thread support layer;  the actual      */
-/* implementation also exports GC_malloc and friends, which    */
-/* are declared in gc.h.                                       */
+/* Included indirectly from a thread-library-specific file.     */
+/* This is the interface for thread-local allocation, whose     */
+/* implementation is mostly thread-library-independent.         */
+/* Here we describe only the interface that needs to be known   */
+/* and invoked from the thread support layer;  the actual       */
+/* implementation also exports GC_malloc and friends, which     */
+/* are declared in gc.h.                                        */
+
+#ifndef GC_THREAD_LOCAL_ALLOC_H
+#define GC_THREAD_LOCAL_ALLOC_H
 
 #include "private/gc_priv.h"
 
@@ -25,8 +28,7 @@
 
 #include "gc_inline.h"
 
-
-# if defined USE_HPUX_TLS
+# if defined(USE_HPUX_TLS)
 #   error USE_HPUX_TLS macro was replaced by USE_COMPILER_TLS
 # endif
 
      !defined(USE_WIN32_COMPILER_TLS) && !defined(USE_COMPILER_TLS) && \
      !defined(USE_CUSTOM_SPECIFIC)
 #   if defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32)
-#     if defined(__GNUC__)  /* Fixed for versions past 2.95? */
+#     if defined(__GNUC__)  /* Fixed for versions past 2.95? */ \
+         || defined(MSWINCE)
 #       define USE_WIN32_SPECIFIC
 #     else
 #       define USE_WIN32_COMPILER_TLS
 #     endif /* !GNU */
 #   elif defined(LINUX) && !defined(ARM32) && \
-                (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >=3))
+                 (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >=3))
 #     define USE_COMPILER_TLS
 #   elif (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \
          defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)) || \
-        defined(GC_NETBSD_THREADS)
+         defined(GC_NETBSD_THREADS)
 #     define USE_PTHREAD_SPECIFIC
 #   elif defined(GC_HPUX_THREADS)
 #     ifdef __GNUC__
 #      define USE_PTHREAD_SPECIFIC
-         /* Empirically, as of gcc 3.3, USE_COMPILER_TLS doesn't work. */
+         /* Empirically, as of gcc 3.3, USE_COMPILER_TLS doesn't work.  */
 #     else
 #      define USE_COMPILER_TLS
 #     endif
 #   else
-#     define USE_CUSTOM_SPECIFIC  /* Use our own.      */
+#     define USE_CUSTOM_SPECIFIC  /* Use our own.       */
 #   endif
 # endif
 
 # include <stdlib.h>
 
-/* One of these should be declared as the tlfs field in the    */
-/* structure pointed to by a GC_thread.                                */
+/* One of these should be declared as the tlfs field in the     */
+/* structure pointed to by a GC_thread.                         */
 typedef struct thread_local_freelists {
 #   ifdef THREAD_LOCAL_ALLOC
-       void * ptrfree_freelists[TINY_FREELISTS];
-       void * normal_freelists[TINY_FREELISTS];
-#      ifdef GC_GCJ_SUPPORT
-         void * gcj_freelists[TINY_FREELISTS];
-#        define ERROR_FL ((void *)(word)-1)
-               /* Value used for gcj_freelist[-1]; allocation is       */
-               /* erroneous.                                           */
-#      endif
-               /* Free lists contain either a pointer or a small count */
-               /* reflecting the number of granules allocated at that  */
-               /* size.                                                */
-               /* 0 ==> thread-local allocation in use, free list      */
-               /*       empty.                                         */
-               /* > 0, <= DIRECT_GRANULES ==> Using global allocation, */
-               /*       too few objects of this size have been         */
-               /*       allocated by this thread.                      */
-               /* >= HBLKSIZE  => pointer to nonempty free list.       */
-               /* > DIRECT_GRANULES, < HBLKSIZE ==> transition to      */
-               /*    local alloc, equivalent to 0.                     */
-#      define DIRECT_GRANULES (HBLKSIZE/GRANULE_BYTES)
-               /* Don't use local free lists for up to this much       */
-               /* allocation.                                          */
+        void * ptrfree_freelists[TINY_FREELISTS];
+        void * normal_freelists[TINY_FREELISTS];
+#       ifdef GC_GCJ_SUPPORT
+          void * gcj_freelists[TINY_FREELISTS];
+#         define ERROR_FL ((void *)(word)-1)
+                /* Value used for gcj_freelist[-1]; allocation is       */
+                /* erroneous.                                           */
+#       endif
+                /* Free lists contain either a pointer or a small count */
+                /* reflecting the number of granules allocated at that  */
+                /* size.                                                */
+                /* 0 ==> thread-local allocation in use, free list      */
+                /*       empty.                                         */
+                /* > 0, <= DIRECT_GRANULES ==> Using global allocation, */
+                /*       too few objects of this size have been         */
+                /*       allocated by this thread.                      */
+                /* >= HBLKSIZE  => pointer to nonempty free list.       */
+                /* > DIRECT_GRANULES, < HBLKSIZE ==> transition to      */
+                /*    local alloc, equivalent to 0.                     */
+#       define DIRECT_GRANULES (HBLKSIZE/GRANULE_BYTES)
+                /* Don't use local free lists for up to this much       */
+                /* allocation.                                          */
 
 #   endif
 } *GC_tlfs;
@@ -106,14 +109,15 @@ typedef struct thread_local_freelists {
 #   include <windows.h>
 #   define GC_getspecific TlsGetValue
 #   define GC_setspecific(key, v) !TlsSetValue(key, v)
-       /* We assume 0 == success, msft does the opposite.      */
+        /* We assume 0 == success, msft does the opposite.      */
+#   ifndef TLS_OUT_OF_INDEXES
+      /* this is currently missing in WinCE */
+#     define TLS_OUT_OF_INDEXES (DWORD)0xFFFFFFFF
+#   endif
 #   define GC_key_create(key, d)  \
-       ((d) != 0? (ABORT("Destructor unsupported by TlsAlloc"),0) \
-                : ((*(key) = TlsAlloc()) == TLS_OUT_OF_INDEXES? \
-                      (ABORT("Out of tls"), 0): \
-                      0))
+        ((d) != 0 || (*(key) = TlsAlloc()) == TLS_OUT_OF_INDEXES ? -1 : 0)
 #   define GC_remove_specific(key)  /* No need for cleanup on thread exit. */
-       /* Need TlsFree on process exit/detach ? */
+        /* Need TlsFree on process exit/detach ? */
     typedef DWORD GC_key_t;
 # elif defined(USE_CUSTOM_SPECIFIC)
 #   include "private/specific.h"
@@ -122,20 +126,20 @@ typedef struct thread_local_freelists {
 # endif
 
 
-/* Each thread structure must be initialized.  */
-/* This call must be made from the new thread. */
-/* Caller holds allocation lock.               */
-void GC_init_thread_local(GC_tlfs p);
+/* Each thread structure must be initialized.   */
+/* This call must be made from the new thread.  */
+/* Caller holds allocation lock.                */
+GC_INNER void GC_init_thread_local(GC_tlfs p);
 
-/* Called when a thread is unregistered, or exits.     */
-/* We hold the allocator lock.                         */
-void GC_destroy_thread_local(GC_tlfs p);
+/* Called when a thread is unregistered, or exits.      */
+/* We hold the allocator lock.                          */
+GC_INNER void GC_destroy_thread_local(GC_tlfs p);
 
-/* The thread support layer must arrange to mark thread-local  */
-/* free lists explicitly, since the link field is often        */
-/* invisible to the marker.  It knows how to find all threads; */
-/* we take care of an individual thread freelist structure.    */
-void GC_mark_thread_local_fls_for(GC_tlfs p);
+/* The thread support layer must arrange to mark thread-local   */
+/* free lists explicitly, since the link field is often         */
+/* invisible to the marker.  It knows how to find all threads;  */
+/* we take care of an individual thread freelist structure.     */
+GC_INNER void GC_mark_thread_local_fls_for(GC_tlfs p);
 
 extern
 #if defined(USE_COMPILER_TLS)
@@ -145,10 +149,12 @@ extern
 #endif
 GC_key_t GC_thread_key;
 
-/* This is set up by the thread_local_alloc implementation.  But the   */
-/* thread support layer calls GC_remove_specific(GC_thread_key)                */
-/* before a thread exits.                                              */
+/* This is set up by the thread_local_alloc implementation.  But the    */
+/* thread support layer calls GC_remove_specific(GC_thread_key)         */
+/* before a thread exits.                                               */
 /* And the thread support layer makes sure that GC_thread_key is traced,*/
-/* if necessary.                                                       */
+/* if necessary.                                                        */
 
 #endif /* THREAD_LOCAL_ALLOC */
+
+#endif /* GC_THREAD_LOCAL_ALLOC_H */
index 398a88e1421823561abbf2d48ca8f263babc04d9..a5897de6ea7f74f83fd793474bb4738d32884719 100755 (executable)
 #!/bin/sh
-#
 # install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
+
+scriptversion=2006-12-25.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
-# Copyright 1991 by the Massachusetts Institute of Technology
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
 #
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
+#
+# FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
 # `make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
 
+nl='
+'
+IFS=" ""       $nl"
 
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-       -c) instcmd="$cpprog"
-           shift
-           continue;;
-
-       -d) dir_arg=true
-           shift
-           continue;;
-
-       -m) chmodcmd="$chmodprog $2"
-           shift
-           shift
-           continue;;
-
-       -o) chowncmd="$chownprog $2"
-           shift
-           shift
-           continue;;
-
-       -g) chgrpcmd="$chgrpprog $2"
-           shift
-           shift
-           continue;;
-
-       -s) stripcmd="$stripprog"
-           shift
-           continue;;
-
-       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
-           shift
-           continue;;
-
-       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-           shift
-           continue;;
-
-       *)  if [ x"$src" = x ]
-           then
-               src=$1
-           else
-               # this colon is to work around a 386BSD /bin/sh bug
-               :
-               dst=$1
-           fi
-           shift
-           continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-       echo "install:  no input file specified"
-       exit 1
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
 else
-       :
+  doit_exec=$doit
 fi
 
-if [ x"$dir_arg" != x ]; then
-       dst=$src
-       src=""
-       
-       if [ -d $dst ]; then
-               instcmd=:
-               chmodcmd=""
-       else
-               instcmd=$mkdirprog
-       fi
-else
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
 
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
+src=
+dst=
+dir_arg=
+dst_arg=
 
-       if [ -f $src -o -d $src ]
-       then
-               :
-       else
-               echo "install:  $src does not exist"
-               exit 1
-       fi
-       
-       if [ x"$dst" = x ]
-       then
-               echo "install:  no destination specified"
-               exit 1
-       else
-               :
-       fi
+copy_on_change=false
+no_target_directory=
 
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
 
-       if [ -d $dst ]
-       then
-               dst="$dst"/`basename $src`
-       else
-               :
-       fi
-fi
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
 
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
 
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
 
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-       '
-IFS="${IFS-${defaultIFS}}"
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
 
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
 
-pathcomp=''
+    -C) copy_on_change=true;;
 
-while [ $# -ne 0 ] ; do
-       pathcomp="${pathcomp}${1}"
-       shift
+    -d) dir_arg=true;;
 
-       if [ ! -d "${pathcomp}" ] ;
-        then
-               $mkdirprog "${pathcomp}"
-       else
-               :
-       fi
+    -g) chgrpcmd="$chgrpprog $2"
+       shift;;
 
-       pathcomp="${pathcomp}/"
-done
-fi
+    --help) echo "$usage"; exit $?;;
 
-if [ x"$dir_arg" != x ]
-then
-       $doit $instcmd $dst &&
+    -m) mode=$2
+       case $mode in
+         *' '* | *'    '* | *'
+'*       | *'*'* | *'?'* | *'['*)
+           echo "$0: invalid mode: $mode" >&2
+           exit 1;;
+       esac
+       shift;;
 
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
-else
+    -o) chowncmd="$chownprog $2"
+       shift;;
 
-# If we're going to rename the final executable, determine the name now.
+    -s) stripcmd=$stripprog;;
 
-       if [ x"$transformarg" = x ] 
-       then
-               dstfile=`basename $dst`
-       else
-               dstfile=`basename $dst $transformbasename | 
-                       sed $transformarg`$transformbasename
-       fi
+    -t) dst_arg=$2
+       shift;;
 
-# don't allow the sed command to completely eliminate the filename
+    -T) no_target_directory=true;;
 
-       if [ x"$dstfile" = x ] 
-       then
-               dstfile=`basename $dst`
-       else
-               :
-       fi
-
-# Make a temp file name in the proper directory.
+    --version) echo "$0 $scriptversion"; exit $?;;
 
-       dsttmp=$dstdir/#inst.$$#
+    --)        shift
+       break;;
 
-# Move or copy the file name to the temp name
+    -*)        echo "$0: invalid option: $1" >&2
+       exit 1;;
 
-       $doit $instcmd $src $dsttmp &&
-
-       trap "rm -f ${dsttmp}" 0 &&
+    *)  break;;
+  esac
+  shift
+done
 
-# and set any options; do chmod last to preserve setuid bits
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
 
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
 
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
 
-# Now rename the file to the real destination.
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
 
-       $doit $rmcmd -f $dstdir/$dstfile &&
-       $doit $mvcmd $dsttmp $dstdir/$dstfile 
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+       echo "$0: $dst_arg: Is a directory" >&2
+       exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+       (dirname "$dst") 2>/dev/null ||
+       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+            X"$dst" : 'X\(//\)[^/]' \| \
+            X"$dst" : 'X\(//\)$' \| \
+            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+       echo X"$dst" |
+           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)[^/].*/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\).*/{
+                  s//\1/
+                  q
+                }
+                s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+       # Create intermediate dirs using mode 755 as modified by the umask.
+       # This is like FreeBSD 'install' as of 1997-10-28.
+       umask=`umask`
+       case $stripcmd.$umask in
+         # Optimize common cases.
+         *[2367][2367]) mkdir_umask=$umask;;
+         .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+         *[0-7])
+           mkdir_umask=`expr $umask + 22 \
+             - $umask % 100 % 40 + $umask % 20 \
+             - $umask % 10 % 4 + $umask % 2
+           `;;
+         *) mkdir_umask=$umask,go-w;;
+       esac
+
+       # With -d, create the new directory with the user-specified mode.
+       # Otherwise, rely on $mkdir_umask.
+       if test -n "$dir_arg"; then
+         mkdir_mode=-m$mode
+       else
+         mkdir_mode=
+       fi
 
-fi &&
+       posix_mkdir=false
+       case $umask in
+         *[123567][0-7][0-7])
+           # POSIX mkdir -p sets u+wx bits regardless of umask, which
+           # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+           ;;
+         *)
+           tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+           trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+           if (umask $mkdir_umask &&
+               exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+           then
+             if test -z "$dir_arg" || {
+                  # Check for POSIX incompatibilities with -m.
+                  # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                  # other-writeable bit of parent directory when it shouldn't.
+                  # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                  ls_ld_tmpdir=`ls -ld "$tmpdir"`
+                  case $ls_ld_tmpdir in
+                    d????-?r-*) different_mode=700;;
+                    d????-?--*) different_mode=755;;
+                    *) false;;
+                  esac &&
+                  $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+                    ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+                    test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                  }
+                }
+             then posix_mkdir=:
+             fi
+             rmdir "$tmpdir/d" "$tmpdir"
+           else
+             # Remove any dirs left behind by ancient mkdir implementations.
+             rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+           fi
+           trap '' 0;;
+       esac;;
+    esac
 
+    if
+      $posix_mkdir && (
+       umask $mkdir_umask &&
+       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+       /*) prefix='/';;
+       -*) prefix='./';;
+       *)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+       test -z "$d" && continue
+
+       prefix=$prefix$d
+       if test -d "$prefix"; then
+         prefixes=
+       else
+         if $posix_mkdir; then
+           (umask=$mkdir_umask &&
+            $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+           # Don't fail if two instances are running concurrently.
+           test -d "$prefix" || exit 1
+         else
+           case $prefix in
+             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+             *) qprefix=$prefix;;
+           esac
+           prefixes="$prefixes '$qprefix'"
+         fi
+       fi
+       prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+       # Don't fail if two instances are running concurrently.
+       (umask $mkdir_umask &&
+        eval "\$doit_exec \$mkdirprog $prefixes") ||
+         test -d "$dstdir" || exit 1
+       obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"    2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+       # Now remove or move aside any old file at destination location.
+       # We try this two ways since rm can't unlink itself on some
+       # systems and the destination file might be busy for other
+       # reasons.  In this case, the final cleanup might fail but the new
+       # file should still install successfully.
+       {
+         test ! -f "$dst" ||
+         $doit $rmcmd -f "$dst" 2>/dev/null ||
+         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+         } ||
+         { echo "$0: cannot unlink or rename $dst" >&2
+           (exit 1); exit 1
+         }
+       } &&
+
+       # Now rename the file to the real destination.
+       $doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
 
-exit 0
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/AUTHORS b/src/mm/boehm-gc/libatomic_ops-1.2/AUTHORS
deleted file mode 100644 (file)
index b770890..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-Originally written by Hans Boehm, with some platform-dependent code
-imported from the Boehm-Demers-Weiser GC, where it was contributed
-by many others.
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/COPYING b/src/mm/boehm-gc/libatomic_ops-1.2/COPYING
deleted file mode 100644 (file)
index d60c31a..0000000
+++ /dev/null
@@ -1,340 +0,0 @@
-                   GNU GENERAL PUBLIC LICENSE
-                      Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                           Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-\f
-                   GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-\f
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-\f
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-\f
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-                           NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-                    END OF TERMS AND CONDITIONS
-\f
-           How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year  name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/ChangeLog b/src/mm/boehm-gc/libatomic_ops-1.2/ChangeLog
deleted file mode 100644 (file)
index 561a631..0000000
+++ /dev/null
@@ -1,363 +0,0 @@
-2009-09-09 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Patrick Marlier)
-       * src/atomic_ops/sysdeps/gcc/sparc.h (NO_SPARC_V9):
-       Renamed to AO_NO_SPARC_V9.
-
-2009-09-01 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Patrick Marlier)
-       * src/atomic_ops/sysdeps/gcc/sparc.h (AO_test_and_set_full): Use
-       AO_TS_VAL_t for "oldval" (for 64-bit support).
-       * src/atomic_ops/sysdeps/gcc/sparc.h (AO_compare_and_swap_full):
-       New function implemented.
-       
-2009-08-12 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
-       (diff107_cvs, resembling diff78 and diff88_cvs)
-
-       * src/atomic_ops/sysdeps/sunc/x86.h: New file.
-        * src/atomic_ops/sysdeps/sunc/x86_64.h: Ditto.
-        * src/atomic_ops.h (AO_INLINE): Support inlining for DigitalMars,
-        Watcom, Sun C.
-        * src/atomic_ops.h (AO_compiler_barrier): Use intrinsic-based
-        implementation for VC++ v8+ (include <intrin.h> before it unless
-        WinCE target); use asm-based barrier implementation for Borland,
-        DigitalMars and Watcom.
-        * src/atomic_ops.h: Fix comment (for x86_64).
-        * src/atomic_ops.h: Include specialized x86.h and x86_64.h arch
-        headers for Sun C (if not AO_USE_PTHREAD_DEFS).
-        * src/atomic_ops.h: Include VC-specific arch headers for Borland,
-        DigitalMars and Watcom (Win32 target only).
-
-2009-05-27 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
-       (diff87_cvs, resembling diff29, diff68, diff78 partly)
-       * doc/README.txt: Remove outdated info about Windows support.
-       * src/atomic_ops/generalize.h (AO_nop_full): Replace
-       K&R-style function definition with ANSI C one.
-       * src/atomic_ops/sysdeps/armcc/arm_v6.h (AO_nop_full): Ditto.
-       * src/atomic_ops/sysdeps/gcc/alpha.h (AO_nop_full, AO_nop_write):
-       Ditto.
-       * src/atomic_ops/sysdeps/gcc/arm.h (AO_nop_full): Ditto.
-       * src/atomic_ops/sysdeps/gcc/ia64.h (AO_nop_full): Ditto.
-       * src/atomic_ops/sysdeps/gcc/mips.h (AO_nop_full): Ditto.
-       * src/atomic_ops/sysdeps/gcc/powerpc.h (AO_nop_full, AO_lwsync): Ditto.
-       * src/atomic_ops/sysdeps/gcc/x86.h (AO_nop_full): Ditto.
-       * src/atomic_ops/sysdeps/generic_pthread.h (AO_nop_full): Ditto.
-       * src/atomic_ops/sysdeps/hpc/ia64.h (AO_nop_full): Ditto.
-       * src/atomic_ops/sysdeps/icc/ia64.h (AO_nop_full): Ditto.
-       * src/atomic_ops/sysdeps/ordered.h (AO_nop_full): Ditto.
-       * src/atomic_ops/sysdeps/ordered_except_wr.h (AO_nop_write): Ditto.
-       * src/atomic_ops/sysdeps/read_ordered.h (AO_nop_read): Ditto.
-       * src/atomic_ops/sysdeps/test_and_set_t_is_ao_t.h (AO_TS_val): Fix
-       comment.
-       
-2009-02-24 Hans Boehm <Hans.Boehm@hp.com> (Really primarily Earl Chew)
-       * src/atomic_ops/sysdeps/gcc/powerpc.h: Add index,
-       update modifiers to asms, refine clobbers to "cr0", use
-       cr0 instead of cr7, add explicit AO_fetch_and_add,
-       add UNTESTED 64 bit support.
-
-2008-11-10 Hans Boehm <Hans.Boehm@hp.com> (Really Joerg Wagner)
-       * src/atomic_ops/sysdeps/armcc/arm_v6.h: Compute
-       AO_compare_and_swap value differently, add
-       AO_compare_double_and_swap_double, some indentation fixes.
-       * src/atomic_ops/sysdeps/gcc/arm.h: Make gcc asm code more
-       robust and minimize clobbers, Add AO_compare_double_and_swap_double.
-
-2008-11-06 Hans Boehm <Hans.Boehm@hp.com>
-       * INSTALL: Add some platform-specific documentation.
-       * src/Makefile.msft: Fix copyright notice.
-
-2008-10-21 Hans Boehm <Hans.Boehm@hp.com>  (really Ivan Maidanski)
-       * src/atomic_ops/sysdeps/aligned_atomic_load_store.h: Fix comments.
-       * src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h: Fix comments.
-       * src/atomic_ops/sysdeps/all_atomic_load_store.h: Fix comments.
-       * src/atomic_ops/sysdeps/atomic_load_store.h: Fix comments.
-       * src/atomic_ops/sysdeps/char_atomic_load_store.h: Fix comments.
-       * src/atomic_ops/sysdeps/gcc/arm.h: Fix comments.
-       * src/atomic_ops/sysdeps/gcc/x86.h: Fix comments.
-       * src/atomic_ops/sysdeps/gcc/x86_64.h: Fix comments.
-       * src/atomic_ops/sysdeps/hpc/hppa.h: Fix comments.
-       * src/atomic_ops/sysdeps/hpc/ia64.h: Fix comments.
-       * src/atomic_ops/sysdeps/int_aligned_atomic_load_store.h: Fix comments.
-       * src/atomic_ops/sysdeps/int_atomic_load_store.h: Fix comments.
-       * src/atomic_ops/sysdeps/short_aligned_atomic_load_store.h: Fix comments.
-       * src/atomic_ops/sysdeps/short_atomic_load_store.h: Fix comments.
-       * src/atomic_ops.c: Fix comments.
-       * src/atomic_ops.h: Fix comments.
-       * src/atomic_ops_stack.c: Fix comments.
-       * src/atomic_ops_stack.h: Fix comments.
-       
-2008-10-20 Hans Boehm <Hans.Boehm@hp.com>  (really Andrew Agno)
-       * src/atomic_ops/sysdeps/gcc/x86_64.h (AO_int_fetch_and_add_full):
-       fix return type.
-
-2008-08-21 Hans Boehm <Hans.Boehm@hp.com>
-       * config.guess, config.sub, configure: Regenerate/replace.
-       Use autoconf 2.61, automake 1.9.6.
-       
-2008-08-19 Hans Boehm <Hans.Boehm@hp.com> (really Thiemo Seufer)
-       * src/atomic_ops/sysdeps/gcc/powerpc.h: Add %U1 (update) to lwz
-       instruction.
-
-2008-08-19 Hans Boehm <Hans.Boehm@hp.com> (really Sebastian Siewior)
-       * src/atomic_ops/sysdeps/gcc/powerpc.h: Consider __NO_LWSYNC__.
-
-2008-07-24 Hans Boehm <Hans.Boehm@hp.com> (really Ivan Maidanski)
-       * src/atomic_ops/sysdeps/ao_t_is_int.h, src/atomic_ops.h:
-       Add parentheses around addr arg for various functions.
-
-2008-07-18 Hans Boehm <Hans.Boehm@hp.com>
-       * src/atomic_ops/sysdeps/gcc/powerpc.h:
-       Add const to first parameter of load calls (forgot one).
-
-2008-07-18 Hans Boehm <Hans.Boehm@hp.com>
-       * doc/README.txt, src/atomic_ops/generalize.h,
-       src/atomic_ops/generalize-small.template,
-       src/atomic_ops/generalize-small.h,
-       src/atomic_ops/sysdeps/acquire_release_volatile.h,
-       src/atomic_ops/sysdeps/char_acquire_release_volatile.h,
-       src/atomic_ops/sysdeps/int_acquire_release_volatile.h,
-       src/atomic_ops/sysdeps/short_acquire_release_volatile.h,
-       src/atomic_ops/sysdeps/aligned_atomic_load_store.h,
-       src/atomic_ops/sysdeps/int_aligned_atomic_load_store.h,
-       src/atomic_ops/sysdeps/short_aligned_atomic_load_store.h,
-       src/atomic_ops/sysdeps/ao_t_is_int.h,
-       src/atomic_ops/sysdeps/atomic_load_store.h,
-       src/atomic_ops/sysdeps/char_atomic_load_store.h,
-       src/atomic_ops/sysdeps/int_atomic_load_store.h,
-       src/atomic_ops/sysdeps/short_atomic_load_store.h,
-       src/atomic_ops/sysdeps/generic_pthread.h,
-       src/atomic_ops/sysdeps/read_ordered.h,
-       src/atomic_ops/sysdeps/sysdeps/armcc/arm_v6.h,
-       src/atomic_ops/sysdeps/gcc/arm.h,
-       src/atomic_ops/sysdeps/icc/ia64.h,
-       src/atomic_ops/sysdeps/ibmc/powerpc.h:
-       Add const to first parameter of load calls.
-
-2008-07-10 Hans Boehm <Hans.Boehm@hp.com>
-       * src/atomic_ops/sysdeps/gcc/m68k.h: Remove SMP-unsafe
-       AO_or_full, and let it be autogenerated instead.
-       
-2008-07-03 Hans Boehm <Hans.Boehm@hp.com> (Really Thiemo Seufer)
-       * src/atomic_ops/sysdeps/gcc/mips.h: Really add mips support,
-       fixing a merge accident.
-
-2008-05-30 Hans Boehm <Hans.Boehm@hp.com> (Really from various Debian
-       contributors)
-       * doc/Makefile.in, src/Makefile.in, src/atomic_ops/Makefile.in:
-       Regenerate.
-
-2008-05-30 Hans Boehm <Hans.Boehm@hp.com> (Really from various Debian
-       contributors)
-       * src/atomic_ops.h, src/atomic_ops/sysdeps/Makefile.am,
-       src/atomic_ops/sysdeps/gcc/mips.h: Add mips support.
-       * src/atomic_ops/sysdeps/gcc/m68k.h: Make test_and_set work
-       on char, align AO_t.  Add cas, or.
-       * src/atomic_ops/sysdeps/gcc/s390.h: Fix include paths.
-       * src/atomic_ops/generalize.h: Fix AO_compare_and_swap_double_acquire.
-       * Makefile.in, aclocal.m4, src/atomic_ops/sysdeps/Makefile.in,
-       tests/Makefile.in: Regenerate.
-
-2008-02-11 Hans Boehm <Hans.Boehm@hp.com>
-          (Really Ian Wienand & Debian maintainers)
-       * src/atomic_ops/sysdeps/gcc/x86.h
-       (AO_compare_double_and_swap_double_full): Correctly account for
-       ebx usage with PIC.
-
-2008-01-09 Hans Boehm <Hans.Boehm@hp.com>
-       * src/atomic_ops/sysdeps/standard_ao_double_t.h: Let
-       double_ptr_storage default to long long; define everywhere.
-
-2008-01-08 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Joerg Wagner)
-       * src/atomic_ops/sysdeps/msftc/x86.h: Conditionally add
-       compare_double_and_swap_double.
-
-2008-01-06 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Joerg Wagner)
-       * src/atomic_ops/generalize.h: Add test_and_set generalizations,
-       Add AO_double_compare_and_swap generalizations.
-       * src/atomic_ops/sysdeps/armcc/arm_v6.h: New file.
-       * src/atomic_ops/sysdeps/gcc/arm.h: Handle V6 and V7.
-       * src/atomic_ops/sysdeps/gcc/x86.h,
-       src/atomic_ops/sysdeps/{gcc,msftc}/x86_64.h: Conditionally add
-       compare_double_and_swap_double, commented out for msftc.
-       * src/atomic_ops/sysdeps/standard_ao_double_t.h:  Add
-       double_ptr_storage field.
-
-2008-01-03 Hans Boehm <Hans.Boehm@hp.com>
-       (Merge from separate atomic_ops tree)
-       * src/atomic_ops/sysdeps/gcc/x86.h: Define correct macro for
-       double-width cas, and fix its implementation.
-       * doc/README.txt: Clarify use of _full.  Add more warnings about
-       data dependencies.
-
-2008-01-02 Hans Boehm <Hans.Boehm@hp.com>
-       * src/atomic_ops/sysdeps/gcc/powerpc.h (AO_load_acquire): Add
-       %X1 modifier to support indexed addressing.
-
-2007-07-23 Hans Boehm <Hans.Boehm@hp.com> (really Jim Marshall)
-       * src/atomic_ops/sysdeps/msftc/x86.h (_InterlockedExchangeAdd): Define
-       for VC++6.
-
-2007-07-05  Andreas Tobler  <a.tobler@schweiz.org>
-       * src/atomic_ops.h: Check for __powerpc64__ and __ppc64__ to include
-       powerpc.h.
-
-2007-06-26 Hans Boehm <Hans.Boehm@hp.com> (really Luca Barbato)
-        * src/atomic_ops/sysdeps/gcc/powerpc.h (AO_load_acquire): Add
-       64-bit version.
-
-2007-06-13 Hans Boehm <Hans.Boehm@hp.com>
-        * src/atomic_ops.h: include stddef.h
-
-2007-06-06 Hans Boehm <Hans.Boehm@hp.com>
-       * src/atomic_ops/sysdeps/msftc/x86_64.h: New file.
-       * src/atomic_ops.h: Add test for msftc/x86_64.h.
-       * src/atomic_ops/sysdeps/msftc/x86.h: Complain for _WIN64.
-       * src/atomic_ops/sysdeps/Makefile.am: Add x86_64.h.
-       * src/atomic_ops/sysdeps/Makefile.in: Regenerate.
-       * src/atomic_ops/sysdeps/aligned_atomic_load_store.h,
-         src/atomic_ops/sysdeps/int_aligned_atomic_load_store.h,
-         src/atomic_ops/sysdeps/short_aligned_atomic_load_store.h:
-         Replace unsigned long cast with size_t.
-
-2007-05-17 Hans Boehm <Hans.Boehm@hp.com>
-       * src/atomic_ops/sysdeps/gcc/hppa.h (AO_test_and_set_full):
-       Add cast for return.
-
-2007-05-14 Hans Boehm <Hans.Boehm@hp.com>
-       doc/README.txt: Update to reflect C++0x effort.
-
-2007-05-07  Hans Boehm <Hans.Boehm@hp.com> (with help from Philipp Zambelli)
-       * src/atomic_ops/sysdeps/msftc/x86.h: Don't just assume that mfence
-       is present.
-       * src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set_full): Correct
-       oldval type.
-
-2006-11-09 Earl Chew (Agilent)
-       * msftc/x86.h: Follow Microsoft documentation and include
-       windows.h.
-
-[1.2 release]
-
-2006-07-11 Hans Boehm <Hans.Boehm@hp.com>
-       * src/atomic_ops/sysdeps/hpc/ia64.h: Fix typos.
-       
-2006-03-28 Earl Chew (Agilent)
-       * src/atomic_ops/sysdeps/gcc/powerpc.h: Remove unused variable cr.
-       * src/atomic_ops/sysdeps/msftc/x86.h:
-       Use new intrinsics available in MSVC 2003 and MSVC 2005.
-       Use inline assembler to generate mfence and byte sized xchg
-       Use correct prototype for InterlockedCompareExchange.
-       * src/atomic_ops.h: Add test for __PPC__ .
-       * tests/run_parallel.inc: Add simple VxWorks support. 
-       * tests/test_atomic.c, tests/test_atomic_include.h: Add prototypes
-       to silence compiler warnings.
-
-2006-1-13 Hans Boehm <Hans.Boehm@hp.com>
-       *src/atomic_ops/sysdeps/gcc/powerpc.h: Beginnings of 64 bit support.
-       *src/atomic_ops/sysdeps/gcc/x86.h: Use "=q" for AO_test_and_set_full.
-
-2005-11-4 Hans Boehm <Hans.Boehm@hp.com>
-       *src/atomic_ops/sysdeps/gcc/ia64.h: Include
-       all_acquire_release_volatile.h, instead of just the pointer-sized
-       version.
-       *src/atomic_ops/sysdeps/gcc/ia64.h: Include
-       all_acquire_release_volatile.h and all_atomic_load_store.h,
-       instead of just the pointer-sized versions.
-
-[1.1 release]
-
-2005-09-27 Hans Boehm <Hans.Boehm@hp.com>
-       *src/atomic_ops.h: Define AO_CAN_EMUL_CAS for arm.
-       *src/atomic_ops/sysdeps/read_ordered.h: New file, extracted from
-       ordered_except_wr.h.
-       *src/atomic_ops/sysdeps/ordered_except_wr.h: include read_ordered.h
-       instead of duplicating it.
-       *src/atomic_ops/sysdeps/gcc/arm.h: Include read_ordered.h.
-
-2005-09-16 Hans Boehm <Hans.Boehm@hp.com>
-       *src/atomic_ops/sysdeps/gcc/arm.h: Replace the AO_test_and_set
-       definition with one that might actually work.  (Thanks to Kazu
-       Hirata and Paul Brook.)
-
-2005-08-01 Hans Boehm <Hans.Boehm@hp.com>
-       *src/atomic_ops/Makefile.am: Change function naming from "byte" to
-       "char" (again).
-
-[1.0 release]
-
-2005-03-21 Hans Boehm <Hans.Boehm@hp.com>
-       Fix various acquire_release_volatile.h files to reflect the fact
-       that both icc and gcc seem to reorder ordinary memory accesses around
-       volatile accesses early in the compilation. Modify the acquire
-       release test to catch this problem (with high probablity, and only on
-       a multiprocessor).
-
-2005-03        Hans Boehm <Hans.Boehm@hp.com>
-       Fixes for recently introduced bugs.  Update x86 and x86-64 assembly
-       syntax to deal with complaints by some recent gcc versions.
-       
-2005-02        Hans Boehm <Hans.Boehm@hp.com>
-       Added libatomic_ops_gpl library with support for mostly
-       lock-free stack and malloc().
-
-2005-01 Ian Wienand <ianw@gelato.unsw.edu.au>, Al Stone <ahs3@debian.org>,
-       Hans Boehm <Hans.Boehm@hp.com>
-       Use autoconf, automake, starting with code from Debian package.
-       Don't use libtool.
-
-2005-01        Hans Boehm <Hans.Boehm@hp.com>
-       * test_and_set_t_is_ao_t.h, test_and_set_t_is_char.h, others:
-       Change most platforms to use byte-wide test-and-set locations.
-       
-2005-01        Hans Boehm <Hans.Boehm@hp.com>
-       * ao_t_is_int.h: Add to trivially support int-wide operations
-       on platforms with int-sized pointers.
-
-2004-12        Hans Boehm <Hans.Boehm@hp.com>
-       * gcc/powerpc.h: First serious attempt to support PowerPC (with
-       help from Maged Michael and others).
-
-2004-12        Hans Boehm <Hans.Boehm@hp.com>
-       * sunc/sparc.[hS]: Added minimal supprt for the Sun SPARC compiler.
-       * atomic_ops_sysdeps.S: Add support for platforms that require
-       out-of-line assmebly code.
-
-2004-10 Hans Boehm <Hans.Boehm@hp.com>
-       More work on char, short, int sized data.  Add both
-       compare_double_and_swap_double and compare_and_swap_double.
-       Typically each platform will provide at most one of these.
-
-2004-07-02 Ranko Zivojnovic
-       Replace both instances of AO_HAVE_NOP_FULL with AO_HAVE_nop_full.
-
-2004-06 Hans Boehm <Hans.Boehm@hp.com>
-       Start to add atomic_ops primitives for different sized data.
-
-2003-12-18  Hans Boehm  <Hans.Boehm@hp.com>
-       * atomic_ops/sysdeps/acquire_release_volatile.h, atomic_ops.h:
-       Fix support for ecc on IA64.  Remove compiler_barrier workaround
-       for gcc 3.4 and later.
-
-2003-12-17  Hans Boehm  <Hans.Boehm@hp.com>
-       * atomic_ops/sysdeps/hpc/{ia64.h,hppa.h},
-       atomic_ops/sysdeps/msftc/x86.h, Makefile, Makefile.atomic_ops,
-       Makefile.atomic_ops.msft, atomic_ops.h: Add initial support
-       for atomic_ops for VC++/Windows/X86 and HP/UX with the HP
-       compiler on PA_RISC and IA64.
-
-2003-12-09  Hans Boehm  <Hans.Boehm@hp.com>
-
-       * many: Install under "atomic_ops" instead of "ao".
-       Change atomic_ops include file structure.  Auxiliary include
-       files are all under include/atomic_ops.
-       Fix (hopefully) "make dist" in atomic_ops distribution.
-       Renamed various types to end in _t, though the old versions
-       are still defined for backward compatibility.
-
-2003-12-08  Carlos O'Donell  <carlos@baldric.uwo.ca>
-
-       * ao_sysdeps/gcc/hppa.h: Define AO_CLEAR macro. Change 
-       AO_pa_clearable_loc type. Add __ldcw, and __ldcw_align
-       helper macros. AO_test_and_set_full uses helper macros.
-
-
-Started sometime after version 0.4 release.  Currently the format is
-informal.  Eventually should become more GNU-like.
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/INSTALL b/src/mm/boehm-gc/libatomic_ops-1.2/INSTALL
deleted file mode 100644 (file)
index 2e2cea9..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-The configuration and build scripts for this package were generated by
-automake/autoconf.  "configure --prefix=<install dir>; make; make install"
-in this directory should work.
-
-Note that much of the content of this library is in the header files.
-
-However two small libraries are built and installed:
-
-- libatomic_ops.a is a support library, which is not needed on some platforms.
-  This is intended to be usable, under some mild restrictions, in free or
-  proprietary code, as are all the header files.  See doc/LICENSING.txt.
-- libatomic_ops_gpl.a contains some higher level facilities.  This code is
-  currently covered by the GPL.  The contents currently correspond to
-  the headers atomic_ops_stack.h and atomic_ops_malloc.h.
-
-Platform specific notes:
-
-Win32/64: src/Makefile.msft contains a very simple Makefile for building
-and running tests and building the gpl library.  The core atomic_ops
-implementation is entirely in header files.
-
-HP-UX/PA-RISC: aCC -Ae won't work as a C compiler, since it doesn't support
-inline assembly code.  Use cc.
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/Makefile.am b/src/mm/boehm-gc/libatomic_ops-1.2/Makefile.am
deleted file mode 100644 (file)
index da64dc2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-SUBDIRS = src doc tests
-
-#distclean-local:
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/Makefile.in b/src/mm/boehm-gc/libatomic_ops-1.2/Makefile.in
deleted file mode 100644 (file)
index 7c3b964..0000000
+++ /dev/null
@@ -1,581 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
-       ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \
-       install-sh missing mkinstalldirs
-subdir = .
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-       $(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/src/config.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-       html-recursive info-recursive install-data-recursive \
-       install-exec-recursive install-info-recursive \
-       install-recursive installcheck-recursive installdirs-recursive \
-       pdf-recursive ps-recursive uninstall-info-recursive \
-       uninstall-recursive
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
-DIST_ARCHIVES = $(distdir).tar.gz
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCAS = @CCAS@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GREP = @GREP@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-NEED_ASM_FALSE = @NEED_ASM_FALSE@
-NEED_ASM_TRUE = @NEED_ASM_TRUE@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PICFLAG = @PICFLAG@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-ac_ct_CC = @ac_ct_CC@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-SUBDIRS = src doc tests
-all: all-recursive
-
-.SUFFIXES:
-am--refresh:
-       @:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-       @for dep in $?; do \
-         case '$(am__configure_deps)' in \
-           *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
-             cd $(srcdir) && $(AUTOMAKE) --gnu  \
-               && exit 0; \
-             exit 1;; \
-         esac; \
-       done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-       @case '$?' in \
-         *config.status*) \
-           echo ' $(SHELL) ./config.status'; \
-           $(SHELL) ./config.status;; \
-         *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
-       esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       $(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-       cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-uninstall-info-am:
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
-       dot_seen=no; \
-       target=`echo $@ | sed s/-recursive//`; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         echo "Making $$target in $$subdir"; \
-         if test "$$subdir" = "."; then \
-           dot_seen=yes; \
-           local_target="$$target-am"; \
-         else \
-           local_target="$$target"; \
-         fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-         || eval $$failcom; \
-       done; \
-       if test "$$dot_seen" = "no"; then \
-         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-       fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
-       dot_seen=no; \
-       case "$@" in \
-         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-         *) list='$(SUBDIRS)' ;; \
-       esac; \
-       rev=''; for subdir in $$list; do \
-         if test "$$subdir" = "."; then :; else \
-           rev="$$subdir $$rev"; \
-         fi; \
-       done; \
-       rev="$$rev ."; \
-       target=`echo $@ | sed s/-recursive//`; \
-       for subdir in $$rev; do \
-         echo "Making $$target in $$subdir"; \
-         if test "$$subdir" = "."; then \
-           local_target="$$target-am"; \
-         else \
-           local_target="$$target"; \
-         fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-         || eval $$failcom; \
-       done && test -z "$$fail"
-tags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-       done
-ctags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-       done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-         include_option=--etags-include; \
-         empty_fix=.; \
-       else \
-         include_option=--include; \
-         empty_fix=; \
-       fi; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         if test "$$subdir" = .; then :; else \
-           test ! -f $$subdir/TAGS || \
-             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
-         fi; \
-       done; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-         test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
-       fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
-         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
-
-GTAGS:
-       here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-       $(am__remove_distdir)
-       mkdir $(distdir)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
-         if test -d $$d/$$file; then \
-           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-           fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-         else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
-           || exit 1; \
-         fi; \
-       done
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-         if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(mkdir_p) "$(distdir)/$$subdir" \
-           || exit 1; \
-           distdir=`$(am__cd) $(distdir) && pwd`; \
-           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-           (cd $$subdir && \
-             $(MAKE) $(AM_MAKEFLAGS) \
-               top_distdir="$$top_distdir" \
-               distdir="$$distdir/$$subdir" \
-               distdir) \
-             || exit 1; \
-         fi; \
-       done
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
-         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r $(distdir)
-dist-gzip: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       $(am__remove_distdir)
-
-dist-bzip2: distdir
-       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-       $(am__remove_distdir)
-
-dist-tarZ: distdir
-       tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-       $(am__remove_distdir)
-
-dist-shar: distdir
-       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-       $(am__remove_distdir)
-
-dist-zip: distdir
-       -rm -f $(distdir).zip
-       zip -rq $(distdir).zip $(distdir)
-       $(am__remove_distdir)
-
-dist dist-all: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       $(am__remove_distdir)
-
-# This target untars the dist file and tries a VPATH configuration.  Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
-       case '$(DIST_ARCHIVES)' in \
-       *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
-       *.tar.bz2*) \
-         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
-       *.tar.Z*) \
-         uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
-       *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
-       *.zip*) \
-         unzip $(distdir).zip ;;\
-       esac
-       chmod -R a-w $(distdir); chmod a+w $(distdir)
-       mkdir $(distdir)/_build
-       mkdir $(distdir)/_inst
-       chmod a-w $(distdir)
-       dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
-         && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-         && cd $(distdir)/_build \
-         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
-           $(DISTCHECK_CONFIGURE_FLAGS) \
-         && $(MAKE) $(AM_MAKEFLAGS) \
-         && $(MAKE) $(AM_MAKEFLAGS) dvi \
-         && $(MAKE) $(AM_MAKEFLAGS) check \
-         && $(MAKE) $(AM_MAKEFLAGS) install \
-         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
-         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
-         && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
-               distuninstallcheck \
-         && chmod -R a-w "$$dc_install_base" \
-         && ({ \
-              (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
-              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
-              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
-              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
-                   distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
-             } || { rm -rf "$$dc_destdir"; exit 1; }) \
-         && rm -rf "$$dc_destdir" \
-         && $(MAKE) $(AM_MAKEFLAGS) dist \
-         && rm -rf $(DIST_ARCHIVES) \
-         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
-       $(am__remove_distdir)
-       @(echo "$(distdir) archives ready for distribution: "; \
-         list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-         sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
-distuninstallcheck:
-       @cd $(distuninstallcheck_dir) \
-       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
-          || { echo "ERROR: files left after uninstall:" ; \
-               if test -n "$(DESTDIR)"; then \
-                 echo "  (check DESTDIR support)"; \
-               fi ; \
-               $(distuninstallcheck_listfiles) ; \
-               exit 1; } >&2
-distcleancheck: distclean
-       @if test '$(srcdir)' = . ; then \
-         echo "ERROR: distcleancheck can only run from a VPATH build" ; \
-         exit 1 ; \
-       fi
-       @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
-         || { echo "ERROR: files left in build directory after distclean:" ; \
-              $(distcleancheck_listfiles) ; \
-              exit 1; } >&2
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-recursive
-       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-       -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-       -rm -rf $(top_srcdir)/autom4te.cache
-       -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
-       check-am clean clean-generic clean-recursive ctags \
-       ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
-       dist-tarZ dist-zip distcheck distclean distclean-generic \
-       distclean-recursive distclean-tags distcleancheck distdir \
-       distuninstallcheck dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am install-exec \
-       install-exec-am install-info install-info-am install-man \
-       install-strip installcheck installcheck-am installdirs \
-       installdirs-am maintainer-clean maintainer-clean-generic \
-       maintainer-clean-recursive mostlyclean mostlyclean-generic \
-       mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-       uninstall uninstall-am uninstall-info-am
-
-
-#distclean-local:
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/NEWS b/src/mm/boehm-gc/libatomic_ops-1.2/NEWS
deleted file mode 100644 (file)
index 8b13789..0000000
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/README b/src/mm/boehm-gc/libatomic_ops-1.2/README
deleted file mode 100644 (file)
index 81aa8b7..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-This package provides semi-portable access to hardware provided
-atomic memory operations.  These might allow you to write code:
-
-- That does more interesting things in signal handlers.
-- Makes more effective use of multiprocessors by allowing you to write
-  clever lock-free code.  Note that such code is very difficult to get
-  right, and will unavoidably be less portable than lock-based code.  It
-  ia also not always faster than lock-based code.  But it may occasionally
-  be a large performance win.
-- To experiment with new and much better thread programming paradigms, etc.
-
-For details and licensing restrictions see the files in the doc
-subdirectory.
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/aclocal.m4 b/src/mm/boehm-gc/libatomic_ops-1.2/aclocal.m4
deleted file mode 100644 (file)
index aa04659..0000000
+++ /dev/null
@@ -1,883 +0,0 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005  Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-        [AM_AUTOMAKE_VERSION([1.9.6])])
-
-# Figure out how to run the assembler.                      -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_PROG_AS
-# ----------
-AC_DEFUN([AM_PROG_AS],
-[# By default we simply use the C compiler to build assembly code.
-AC_REQUIRE([AC_PROG_CC])
-test "${CCAS+set}" = set || CCAS=$CC
-test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
-AC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
-AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
-])
-
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL                                            -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 7
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
-else
-  $1_TRUE='#'
-  $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_$1_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    case $depmode in
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    none) break ;;
-    esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_$1_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
-])
-
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-#serial 3
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
-  done
-done
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
-# Do all the work for Automake.                             -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 12
-
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
-dnl Autoconf wants to disallow AM_ names.  We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-])
-])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $1 | $1:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Check to see how 'make' treats includes.                 -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake.  There are at least two reasons why we must not
-# use `-m 0755':
-#   - it causes special bits like SGID to be ignored,
-#   - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out.  Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
-AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
-  else
-    mkdir_p='$(install_sh) -d'
-  fi
-fi
-AC_SUBST([mkdir_p])])
-
-# Helper functions for option handling.                     -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Check how to create a tarball.                            -*- Autoconf -*-
-
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-#     tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-#     $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
-
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
-
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
-
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/compile b/src/mm/boehm-gc/libatomic_ops-1.2/compile
deleted file mode 100755 (executable)
index 1b1d232..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
-
-scriptversion=2005-05-14.22
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
-# Written by Tom Tromey <tromey@cygnus.com>.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case $1 in
-  '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
-  -h | --h*)
-    cat <<\EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
-
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "compile $scriptversion"
-    exit $?
-    ;;
-esac
-
-ofile=
-cfile=
-eat=
-
-for arg
-do
-  if test -n "$eat"; then
-    eat=
-  else
-    case $1 in
-      -o)
-       # configure might choose to run compile as `compile cc -o foo foo.c'.
-       # So we strip `-o arg' only if arg is an object.
-       eat=1
-       case $2 in
-         *.o | *.obj)
-           ofile=$2
-           ;;
-         *)
-           set x "$@" -o "$2"
-           shift
-           ;;
-       esac
-       ;;
-      *.c)
-       cfile=$1
-       set x "$@" "$1"
-       shift
-       ;;
-      *)
-       set x "$@" "$1"
-       shift
-       ;;
-    esac
-  fi
-  shift
-done
-
-if test -z "$ofile" || test -z "$cfile"; then
-  # If no `-o' option was seen then we might have been invoked from a
-  # pattern rule where we don't need one.  That is ok -- this is a
-  # normal compilation that the losing compiler can handle.  If no
-  # `.c' file was seen then we are probably linking.  That is also
-  # ok.
-  exec "$@"
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
-
-# Create the lock directory.
-# Note: use `[/.-]' here to ensure that we don't use the same name
-# that we are using for the .o file.  Also, base the name on the expected
-# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
-while true; do
-  if mkdir "$lockdir" >/dev/null 2>&1; then
-    break
-  fi
-  sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir '$lockdir'; exit 1" 1 2 15
-
-# Run the compile.
-"$@"
-ret=$?
-
-if test -f "$cofile"; then
-  mv "$cofile" "$ofile"
-elif test -f "${cofile}bj"; then
-  mv "${cofile}bj" "$ofile"
-fi
-
-rmdir "$lockdir"
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/config.guess b/src/mm/boehm-gc/libatomic_ops-1.2/config.guess
deleted file mode 100755 (executable)
index 278f9e9..0000000
+++ /dev/null
@@ -1,1516 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
-
-timestamp='2007-07-22'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )        # Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-       for c in cc gcc c89 c99 ; do
-         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-            CC_FOR_BUILD="$c"; break ;
-         fi ;
-       done ;
-       if test x"$CC_FOR_BUILD" = x ; then
-         CC_FOR_BUILD=no_compiler_found ;
-       fi
-       ;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-       PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-       # NetBSD (nbsd) targets should (where applicable) match one or
-       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-       # switched to ELF, *-*-netbsd* would select the old
-       # object file format.  This provides both forward
-       # compatibility and a consistent mechanism for selecting the
-       # object file format.
-       #
-       # Note: NetBSD doesn't particularly care about the vendor
-       # portion of the name.  We always set it to "unknown".
-       sysctl="sysctl -n hw.machine_arch"
-       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-       case "${UNAME_MACHINE_ARCH}" in
-           armeb) machine=armeb-unknown ;;
-           arm*) machine=arm-unknown ;;
-           sh3el) machine=shl-unknown ;;
-           sh3eb) machine=sh-unknown ;;
-           sh5el) machine=sh5le-unknown ;;
-           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-       esac
-       # The Operating System including object format, if it has switched
-       # to ELF recently, or will in the future.
-       case "${UNAME_MACHINE_ARCH}" in
-           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-               eval $set_cc_for_build
-               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-                       | grep __ELF__ >/dev/null
-               then
-                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-                   # Return netbsd for either.  FIX?
-                   os=netbsd
-               else
-                   os=netbsdelf
-               fi
-               ;;
-           *)
-               os=netbsd
-               ;;
-       esac
-       # The OS release
-       # Debian GNU/NetBSD machines have a different userland, and
-       # thus, need a distinct triplet. However, they do not need
-       # kernel version information, so it can be replaced with a
-       # suitable tag, in the style of linux-gnu.
-       case "${UNAME_VERSION}" in
-           Debian*)
-               release='-gnu'
-               ;;
-           *)
-               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-               ;;
-       esac
-       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-       # contains redundant information, the shorter form:
-       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-       echo "${machine}-${os}${release}"
-       exit ;;
-    *:OpenBSD:*:*)
-       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-       exit ;;
-    *:ekkoBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-       exit ;;
-    *:SolidBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-       exit ;;
-    macppc:MirBSD:*:*)
-       echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-       exit ;;
-    *:MirBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-       exit ;;
-    alpha:OSF1:*:*)
-       case $UNAME_RELEASE in
-       *4.0)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-               ;;
-       *5.*)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-               ;;
-       esac
-       # According to Compaq, /usr/sbin/psrinfo has been available on
-       # OSF/1 and Tru64 systems produced since 1995.  I hope that
-       # covers most systems running today.  This code pipes the CPU
-       # types through head -n 1, so we only detect the type of CPU 0.
-       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-       case "$ALPHA_CPU_TYPE" in
-           "EV4 (21064)")
-               UNAME_MACHINE="alpha" ;;
-           "EV4.5 (21064)")
-               UNAME_MACHINE="alpha" ;;
-           "LCA4 (21066/21068)")
-               UNAME_MACHINE="alpha" ;;
-           "EV5 (21164)")
-               UNAME_MACHINE="alphaev5" ;;
-           "EV5.6 (21164A)")
-               UNAME_MACHINE="alphaev56" ;;
-           "EV5.6 (21164PC)")
-               UNAME_MACHINE="alphapca56" ;;
-           "EV5.7 (21164PC)")
-               UNAME_MACHINE="alphapca57" ;;
-           "EV6 (21264)")
-               UNAME_MACHINE="alphaev6" ;;
-           "EV6.7 (21264A)")
-               UNAME_MACHINE="alphaev67" ;;
-           "EV6.8CB (21264C)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.8AL (21264B)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.8CX (21264D)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.9A (21264/EV69A)")
-               UNAME_MACHINE="alphaev69" ;;
-           "EV7 (21364)")
-               UNAME_MACHINE="alphaev7" ;;
-           "EV7.9 (21364A)")
-               UNAME_MACHINE="alphaev79" ;;
-       esac
-       # A Pn.n version is a patched version.
-       # A Vn.n version is a released version.
-       # A Tn.n version is a released field test version.
-       # A Xn.n version is an unreleased experimental baselevel.
-       # 1.2 uses "1.2" for uname -r.
-       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       exit ;;
-    Alpha\ *:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # Should we change UNAME_MACHINE based on the output of uname instead
-       # of the specific Alpha model?
-       echo alpha-pc-interix
-       exit ;;
-    21064:Windows_NT:50:3)
-       echo alpha-dec-winnt3.5
-       exit ;;
-    Amiga*:UNIX_System_V:4.0:*)
-       echo m68k-unknown-sysv4
-       exit ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-amigaos
-       exit ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-morphos
-       exit ;;
-    *:OS/390:*:*)
-       echo i370-ibm-openedition
-       exit ;;
-    *:z/VM:*:*)
-       echo s390-ibm-zvmoe
-       exit ;;
-    *:OS400:*:*)
-        echo powerpc-ibm-os400
-       exit ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-       echo arm-acorn-riscix${UNAME_RELEASE}
-       exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
-       echo arm-unknown-riscos
-       exit ;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-       echo hppa1.1-hitachi-hiuxmpp
-       exit ;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-       if test "`(/bin/universe) 2>/dev/null`" = att ; then
-               echo pyramid-pyramid-sysv3
-       else
-               echo pyramid-pyramid-bsd
-       fi
-       exit ;;
-    NILE*:*:*:dcosx)
-       echo pyramid-pyramid-svr4
-       exit ;;
-    DRS?6000:unix:4.0:6*)
-       echo sparc-icl-nx6
-       exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-       case `/usr/bin/uname -p` in
-           sparc) echo sparc-icl-nx7; exit ;;
-       esac ;;
-    sun4H:SunOS:5.*:*)
-       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:6*:*)
-       # According to config.sub, this is the proper way to canonicalize
-       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-       # it's likely to be more like Solaris than SunOS4.
-       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:*:*)
-       case "`/usr/bin/arch -k`" in
-           Series*|S4*)
-               UNAME_RELEASE=`uname -v`
-               ;;
-       esac
-       # Japanese Language versions have a version number like `4.1.3-JL'.
-       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-       exit ;;
-    sun3*:SunOS:*:*)
-       echo m68k-sun-sunos${UNAME_RELEASE}
-       exit ;;
-    sun*:*:4.2BSD:*)
-       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-       case "`/bin/arch`" in
-           sun3)
-               echo m68k-sun-sunos${UNAME_RELEASE}
-               ;;
-           sun4)
-               echo sparc-sun-sunos${UNAME_RELEASE}
-               ;;
-       esac
-       exit ;;
-    aushp:SunOS:*:*)
-       echo sparc-auspex-sunos${UNAME_RELEASE}
-       exit ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-       echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
-    m68k:machten:*:*)
-       echo m68k-apple-machten${UNAME_RELEASE}
-       exit ;;
-    powerpc:machten:*:*)
-       echo powerpc-apple-machten${UNAME_RELEASE}
-       exit ;;
-    RISC*:Mach:*:*)
-       echo mips-dec-mach_bsd4.3
-       exit ;;
-    RISC*:ULTRIX:*:*)
-       echo mips-dec-ultrix${UNAME_RELEASE}
-       exit ;;
-    VAX*:ULTRIX*:*:*)
-       echo vax-dec-ultrix${UNAME_RELEASE}
-       exit ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-       echo clipper-intergraph-clix${UNAME_RELEASE}
-       exit ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-       int main (int argc, char *argv[]) {
-#else
-       int main (argc, argv) int argc; char *argv[]; {
-#endif
-       #if defined (host_mips) && defined (MIPSEB)
-       #if defined (SYSTYPE_SYSV)
-         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_SVR4)
-         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-       #endif
-       #endif
-         exit (-1);
-       }
-EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c &&
-         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-         SYSTEM_NAME=`$dummy $dummyarg` &&
-           { echo "$SYSTEM_NAME"; exit; }
-       echo mips-mips-riscos${UNAME_RELEASE}
-       exit ;;
-    Motorola:PowerMAX_OS:*:*)
-       echo powerpc-motorola-powermax
-       exit ;;
-    Motorola:*:4.3:PL8-*)
-       echo powerpc-harris-powermax
-       exit ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-       echo powerpc-harris-powermax
-       exit ;;
-    Night_Hawk:Power_UNIX:*:*)
-       echo powerpc-harris-powerunix
-       exit ;;
-    m88k:CX/UX:7*:*)
-       echo m88k-harris-cxux7
-       exit ;;
-    m88k:*:4*:R4*)
-       echo m88k-motorola-sysv4
-       exit ;;
-    m88k:*:3*:R3*)
-       echo m88k-motorola-sysv3
-       exit ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-       then
-           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-              [ ${TARGET_BINARY_INTERFACE}x = x ]
-           then
-               echo m88k-dg-dgux${UNAME_RELEASE}
-           else
-               echo m88k-dg-dguxbcs${UNAME_RELEASE}
-           fi
-       else
-           echo i586-dg-dgux${UNAME_RELEASE}
-       fi
-       exit ;;
-    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
-       echo m88k-dolphin-sysv3
-       exit ;;
-    M88*:*:R3*:*)
-       # Delta 88k system running SVR3
-       echo m88k-motorola-sysv3
-       exit ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-       echo m88k-tektronix-sysv3
-       exit ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-       echo m68k-tektronix-bsd
-       exit ;;
-    *:IRIX*:*:*)
-       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-       exit ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-       echo i386-ibm-aix
-       exit ;;
-    ia64:AIX:*:*)
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
-       else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-       fi
-       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-       exit ;;
-    *:AIX:2:3)
-       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-               eval $set_cc_for_build
-               sed 's/^                //' << EOF >$dummy.c
-               #include <sys/systemcfg.h>
-
-               main()
-                       {
-                       if (!__power_pc())
-                               exit(1);
-                       puts("powerpc-ibm-aix3.2.5");
-                       exit(0);
-                       }
-EOF
-               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-               then
-                       echo "$SYSTEM_NAME"
-               else
-                       echo rs6000-ibm-aix3.2.5
-               fi
-       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-               echo rs6000-ibm-aix3.2.4
-       else
-               echo rs6000-ibm-aix3.2
-       fi
-       exit ;;
-    *:AIX:*:[45])
-       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-               IBM_ARCH=rs6000
-       else
-               IBM_ARCH=powerpc
-       fi
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
-       else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-       fi
-       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-       exit ;;
-    *:AIX:*:*)
-       echo rs6000-ibm-aix
-       exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-       echo romp-ibm-bsd4.4
-       exit ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-       exit ;;                             # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-       echo rs6000-bull-bosx
-       exit ;;
-    DPX/2?00:B.O.S.:*:*)
-       echo m68k-bull-sysv3
-       exit ;;
-    9000/[34]??:4.3bsd:1.*:*)
-       echo m68k-hp-bsd
-       exit ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-       echo m68k-hp-bsd4.4
-       exit ;;
-    9000/[34678]??:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       case "${UNAME_MACHINE}" in
-           9000/31? )            HP_ARCH=m68000 ;;
-           9000/[34]?? )         HP_ARCH=m68k ;;
-           9000/[678][0-9][0-9])
-               if [ -x /usr/bin/getconf ]; then
-                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
-                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
-               fi
-               if [ "${HP_ARCH}" = "" ]; then
-                   eval $set_cc_for_build
-                   sed 's/^              //' << EOF >$dummy.c
-
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-               {
-               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-               case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-                   switch (bits)
-                       {
-                       case 64: puts ("hppa2.0w"); break;
-                       case 32: puts ("hppa2.0n"); break;
-                       default: puts ("hppa2.0"); break;
-                       } break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-                   puts ("hppa2.0"); break;
-              #endif
-               default: puts ("hppa1.0"); break;
-               }
-                  exit (0);
-              }
-EOF
-                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-                   test -z "$HP_ARCH" && HP_ARCH=hppa
-               fi ;;
-       esac
-       if [ ${HP_ARCH} = "hppa2.0w" ]
-       then
-           eval $set_cc_for_build
-
-           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-           # generating 64-bit code.  GNU and HP use different nomenclature:
-           #
-           # $ CC_FOR_BUILD=cc ./config.guess
-           # => hppa2.0w-hp-hpux11.23
-           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-           # => hppa64-hp-hpux11.23
-
-           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep __LP64__ >/dev/null
-           then
-               HP_ARCH="hppa2.0w"
-           else
-               HP_ARCH="hppa64"
-           fi
-       fi
-       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-       exit ;;
-    ia64:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       echo ia64-hp-hpux${HPUX_REV}
-       exit ;;
-    3050*:HI-UX:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <unistd.h>
-       int
-       main ()
-       {
-         long cpu = sysconf (_SC_CPU_VERSION);
-         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-            results, however.  */
-         if (CPU_IS_PA_RISC (cpu))
-           {
-             switch (cpu)
-               {
-                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-                 default: puts ("hppa-hitachi-hiuxwe2"); break;
-               }
-           }
-         else if (CPU_IS_HP_MC68K (cpu))
-           puts ("m68k-hitachi-hiuxwe2");
-         else puts ("unknown-hitachi-hiuxwe2");
-         exit (0);
-       }
-EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-               { echo "$SYSTEM_NAME"; exit; }
-       echo unknown-hitachi-hiuxwe2
-       exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-       echo hppa1.1-hp-bsd
-       exit ;;
-    9000/8??:4.3bsd:*:*)
-       echo hppa1.0-hp-bsd
-       exit ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-       echo hppa1.0-hp-mpeix
-       exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-       echo hppa1.1-hp-osf
-       exit ;;
-    hp8??:OSF1:*:*)
-       echo hppa1.0-hp-osf
-       exit ;;
-    i*86:OSF1:*:*)
-       if [ -x /usr/sbin/sysversion ] ; then
-           echo ${UNAME_MACHINE}-unknown-osf1mk
-       else
-           echo ${UNAME_MACHINE}-unknown-osf1
-       fi
-       exit ;;
-    parisc*:Lites*:*:*)
-       echo hppa1.1-hp-lites
-       exit ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-       echo c1-convex-bsd
-        exit ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-        exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-       echo c34-convex-bsd
-        exit ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-       echo c38-convex-bsd
-        exit ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-       echo c4-convex-bsd
-        exit ;;
-    CRAY*Y-MP:*:*:*)
-       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*[A-Z]90:*:*:*)
-       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-             -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*TS:*:*:*)
-       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*T3E:*:*:*)
-       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*SV1:*:*:*)
-       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    *:UNICOS/mp:*:*)
-       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
-    5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-       exit ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-       exit ;;
-    sparc*:BSD/OS:*:*)
-       echo sparc-unknown-bsdi${UNAME_RELEASE}
-       exit ;;
-    *:BSD/OS:*:*)
-       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-       exit ;;
-    *:FreeBSD:*:*)
-       case ${UNAME_MACHINE} in
-           pc98)
-               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-           amd64)
-               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-           *)
-               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-       esac
-       exit ;;
-    i*:CYGWIN*:*)
-       echo ${UNAME_MACHINE}-pc-cygwin
-       exit ;;
-    *:MINGW*:*)
-       echo ${UNAME_MACHINE}-pc-mingw32
-       exit ;;
-    i*:windows32*:*)
-       # uname -m includes "-pc" on this system.
-       echo ${UNAME_MACHINE}-mingw32
-       exit ;;
-    i*:PW*:*)
-       echo ${UNAME_MACHINE}-pc-pw32
-       exit ;;
-    *:Interix*:[3456]*)
-       case ${UNAME_MACHINE} in
-           x86)
-               echo i586-pc-interix${UNAME_RELEASE}
-               exit ;;
-           EM64T | authenticamd)
-               echo x86_64-unknown-interix${UNAME_RELEASE}
-               exit ;;
-       esac ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-       echo i${UNAME_MACHINE}-pc-mks
-       exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-       # UNAME_MACHINE based on the output of uname instead of i386?
-       echo i586-pc-interix
-       exit ;;
-    i*:UWIN*:*)
-       echo ${UNAME_MACHINE}-pc-uwin
-       exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-       echo x86_64-unknown-cygwin
-       exit ;;
-    p*:CYGWIN*:*)
-       echo powerpcle-unknown-cygwin
-       exit ;;
-    prep*:SunOS:5.*:*)
-       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    *:GNU:*:*)
-       # the GNU system
-       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-       exit ;;
-    *:GNU/*:*:*)
-       # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-       exit ;;
-    i*86:Minix:*:*)
-       echo ${UNAME_MACHINE}-pc-minix
-       exit ;;
-    arm*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    avr32*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    cris:Linux:*:*)
-       echo cris-axis-linux-gnu
-       exit ;;
-    crisv32:Linux:*:*)
-       echo crisv32-axis-linux-gnu
-       exit ;;
-    frv:Linux:*:*)
-       echo frv-unknown-linux-gnu
-       exit ;;
-    ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    m32r*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    m68*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    mips:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips
-       #undef mipsel
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mipsel
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    mips64:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips64
-       #undef mips64el
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mips64el
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips64
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    or32:Linux:*:*)
-       echo or32-unknown-linux-gnu
-       exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
-       exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
-       exit ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-       exit ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-       # Look for CPU level
-       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-gnu ;;
-         PA8*) echo hppa2.0-unknown-linux-gnu ;;
-         *)    echo hppa-unknown-linux-gnu ;;
-       esac
-       exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
-       exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-ibm-linux
-       exit ;;
-    sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    sh*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    vax:Linux:*:*)
-       echo ${UNAME_MACHINE}-dec-linux-gnu
-       exit ;;
-    x86_64:Linux:*:*)
-       echo x86_64-unknown-linux-gnu
-       exit ;;
-    xtensa:Linux:*:*)
-       echo xtensa-unknown-linux-gnu
-       exit ;;
-    i*86:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us. cd to the root directory to prevent
-       # problems with other programs or directories called `ld' in the path.
-       # Set LC_ALL=C to ensure ld outputs messages in English.
-       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-                        | sed -ne '/supported targets:/!d
-                                   s/[         ][      ]*/ /g
-                                   s/.*supported targets: *//
-                                   s/ .*//
-                                   p'`
-        case "$ld_supported_targets" in
-         elf32-i386)
-               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-               ;;
-         a.out-i386-linux)
-               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit ;;
-         coff-i386)
-               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-               exit ;;
-         "")
-               # Either a pre-BFD a.out linker (linux-gnuoldld) or
-               # one that does not give us useful --help.
-               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-               exit ;;
-       esac
-       # Determine whether the default compiler is a.out or elf
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #ifdef __ELF__
-       # ifdef __GLIBC__
-       #  if __GLIBC__ >= 2
-       LIBC=gnu
-       #  else
-       LIBC=gnulibc1
-       #  endif
-       # else
-       LIBC=gnulibc1
-       # endif
-       #else
-       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-       LIBC=gnu
-       #else
-       LIBC=gnuaout
-       #endif
-       #endif
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^LIBC/{
-               s: ::g
-               p
-           }'`"
-       test x"${LIBC}" != x && {
-               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-               exit
-       }
-       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-       ;;
-    i*86:DYNIX/ptx:4*:*)
-       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-       # earlier versions are messed up and put the nodename in both
-       # sysname and nodename.
-       echo i386-sequent-sysv4
-       exit ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
-       # I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
-       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-       exit ;;
-    i*86:OS/2:*:*)
-       # If we were able to find `uname', then EMX Unix compatibility
-       # is probably installed.
-       echo ${UNAME_MACHINE}-pc-os2-emx
-       exit ;;
-    i*86:XTS-300:*:STOP)
-       echo ${UNAME_MACHINE}-unknown-stop
-       exit ;;
-    i*86:atheos:*:*)
-       echo ${UNAME_MACHINE}-unknown-atheos
-       exit ;;
-    i*86:syllable:*:*)
-       echo ${UNAME_MACHINE}-pc-syllable
-       exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-       echo i386-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    i*86:*DOS:*:*)
-       echo ${UNAME_MACHINE}-pc-msdosdjgpp
-       exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-       else
-               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-       fi
-       exit ;;
-    i*86:*:5:[678]*)
-       # UnixWare 7.x, OpenUNIX and OpenServer 6.
-       case `/bin/uname -X | grep "^Machine"` in
-           *486*)           UNAME_MACHINE=i486 ;;
-           *Pentium)        UNAME_MACHINE=i586 ;;
-           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-       esac
-       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-       exit ;;
-    i*86:*:3.2:*)
-       if test -f /usr/options/cb.name; then
-               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-       elif /bin/uname -X 2>/dev/null >/dev/null ; then
-               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-                       && UNAME_MACHINE=i586
-               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-                       && UNAME_MACHINE=i686
-               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-                       && UNAME_MACHINE=i686
-               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-       else
-               echo ${UNAME_MACHINE}-pc-sysv32
-       fi
-       exit ;;
-    pc:*:*:*)
-       # Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-       echo i386-pc-msdosdjgpp
-        exit ;;
-    Intel:Mach:3*:*)
-       echo i386-pc-mach3
-       exit ;;
-    paragon:*:*:*)
-       echo i860-intel-osf1
-       exit ;;
-    i860:*:4.*:*) # i860-SVR4
-       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-       else # Add other i860-SVR4 vendors below as they are discovered.
-         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-       fi
-       exit ;;
-    mini*:CTIX:SYS*5:*)
-       # "miniframe"
-       echo m68010-convergent-sysv
-       exit ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-       echo m68k-convergent-sysv
-       exit ;;
-    M680?0:D-NIX:5.3:*)
-       echo m68k-diab-dnix
-       exit ;;
-    M68*:*:R3V[5678]*:*)
-       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-       OS_REL=''
-       test -r /etc/.relid \
-       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-       echo m68k-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    mc68030:UNIX_System_V:4.*:*)
-       echo m68k-atari-sysv4
-       exit ;;
-    TSUNAMI:LynxOS:2.*:*)
-       echo sparc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    rs6000:LynxOS:2.*:*)
-       echo rs6000-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-       echo powerpc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    SM[BE]S:UNIX_SV:*:*)
-       echo mips-dde-sysv${UNAME_RELEASE}
-       exit ;;
-    RM*:ReliantUNIX-*:*:*)
-       echo mips-sni-sysv4
-       exit ;;
-    RM*:SINIX-*:*:*)
-       echo mips-sni-sysv4
-       exit ;;
-    *:SINIX-*:*:*)
-       if uname -p 2>/dev/null >/dev/null ; then
-               UNAME_MACHINE=`(uname -p) 2>/dev/null`
-               echo ${UNAME_MACHINE}-sni-sysv4
-       else
-               echo ns32k-sni-sysv
-       fi
-       exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
-    *:UNIX_System_V:4*:FTX*)
-       # From Gerald Hewes <hewes@openmarket.com>.
-       # How about differentiating between stratus architectures? -djm
-       echo hppa1.1-stratus-sysv4
-       exit ;;
-    *:*:*:FTX*)
-       # From seanf@swdc.stratus.com.
-       echo i860-stratus-sysv4
-       exit ;;
-    i*86:VOS:*:*)
-       # From Paul.Green@stratus.com.
-       echo ${UNAME_MACHINE}-stratus-vos
-       exit ;;
-    *:VOS:*:*)
-       # From Paul.Green@stratus.com.
-       echo hppa1.1-stratus-vos
-       exit ;;
-    mc68*:A/UX:*:*)
-       echo m68k-apple-aux${UNAME_RELEASE}
-       exit ;;
-    news*:NEWS-OS:6*:*)
-       echo mips-sony-newsos6
-       exit ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-       if [ -d /usr/nec ]; then
-               echo mips-nec-sysv${UNAME_RELEASE}
-       else
-               echo mips-unknown-sysv${UNAME_RELEASE}
-       fi
-        exit ;;
-    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
-       echo powerpc-be-beos
-       exit ;;
-    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
-       echo powerpc-apple-beos
-       exit ;;
-    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
-       echo i586-pc-beos
-       exit ;;
-    SX-4:SUPER-UX:*:*)
-       echo sx4-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-5:SUPER-UX:*:*)
-       echo sx5-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-6:SUPER-UX:*:*)
-       echo sx6-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-7:SUPER-UX:*:*)
-       echo sx7-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-8:SUPER-UX:*:*)
-       echo sx8-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-8R:SUPER-UX:*:*)
-       echo sx8r-nec-superux${UNAME_RELEASE}
-       exit ;;
-    Power*:Rhapsody:*:*)
-       echo powerpc-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
-    *:Rhapsody:*:*)
-       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
-    *:Darwin:*:*)
-       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-       case $UNAME_PROCESSOR in
-           unknown) UNAME_PROCESSOR=powerpc ;;
-       esac
-       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-       exit ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-       UNAME_PROCESSOR=`uname -p`
-       if test "$UNAME_PROCESSOR" = "x86"; then
-               UNAME_PROCESSOR=i386
-               UNAME_MACHINE=pc
-       fi
-       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-       exit ;;
-    *:QNX:*:4*)
-       echo i386-pc-qnx
-       exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-       echo nse-tandem-nsk${UNAME_RELEASE}
-       exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-       echo nsr-tandem-nsk${UNAME_RELEASE}
-       exit ;;
-    *:NonStop-UX:*:*)
-       echo mips-compaq-nonstopux
-       exit ;;
-    BS2000:POSIX*:*:*)
-       echo bs2000-siemens-sysv
-       exit ;;
-    DS/*:UNIX_System_V:*:*)
-       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-       exit ;;
-    *:Plan9:*:*)
-       # "uname -m" is not consistent, so use $cputype instead. 386
-       # is converted to i386 for consistency with other x86
-       # operating systems.
-       if test "$cputype" = "386"; then
-           UNAME_MACHINE=i386
-       else
-           UNAME_MACHINE="$cputype"
-       fi
-       echo ${UNAME_MACHINE}-unknown-plan9
-       exit ;;
-    *:TOPS-10:*:*)
-       echo pdp10-unknown-tops10
-       exit ;;
-    *:TENEX:*:*)
-       echo pdp10-unknown-tenex
-       exit ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-       echo pdp10-dec-tops20
-       exit ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-       echo pdp10-xkl-tops20
-       exit ;;
-    *:TOPS-20:*:*)
-       echo pdp10-unknown-tops20
-       exit ;;
-    *:ITS:*:*)
-       echo pdp10-unknown-its
-       exit ;;
-    SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
-       exit ;;
-    *:DragonFly:*:*)
-       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-       exit ;;
-    *:*VMS:*:*)
-       UNAME_MACHINE=`(uname -p) 2>/dev/null`
-       case "${UNAME_MACHINE}" in
-           A*) echo alpha-dec-vms ; exit ;;
-           I*) echo ia64-dec-vms ; exit ;;
-           V*) echo vax-dec-vms ; exit ;;
-       esac ;;
-    *:XENIX:*:SysV)
-       echo i386-pc-xenix
-       exit ;;
-    i*86:skyos:*:*)
-       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-       exit ;;
-    i*86:rdos:*:*)
-       echo ${UNAME_MACHINE}-pc-rdos
-       exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-         ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-       printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-       printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-       { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-       echo c1-convex-bsd
-       exit ;;
-    c2*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-       exit ;;
-    c34*)
-       echo c34-convex-bsd
-       exit ;;
-    c38*)
-       echo c38-convex-bsd
-       exit ;;
-    c4*)
-       echo c4-convex-bsd
-       exit ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/config.sub b/src/mm/boehm-gc/libatomic_ops-1.2/config.sub
deleted file mode 100755 (executable)
index 1761d8b..0000000
+++ /dev/null
@@ -1,1626 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
-
-timestamp='2007-06-28'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )        # Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit ;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-       -sun*os*)
-               # Prevent following clause from handling this invalid input.
-               ;;
-       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray)
-               os=
-               basic_machine=$1
-               ;;
-       -sim | -cisco | -oki | -wec | -winbond)
-               os=
-               basic_machine=$1
-               ;;
-       -scout)
-               ;;
-       -wrs)
-               os=-vxworks
-               basic_machine=$1
-               ;;
-       -chorusos*)
-               os=-chorusos
-               basic_machine=$1
-               ;;
-       -chorusrdb)
-               os=-chorusrdb
-               basic_machine=$1
-               ;;
-       -hiux*)
-               os=-hiuxwe2
-               ;;
-       -sco6)
-               os=-sco5v6
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco5)
-               os=-sco3.2v5
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco4)
-               os=-sco3.2v4
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2.[4-9]*)
-               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2v[4-9]*)
-               # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco5v6*)
-               # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco*)
-               os=-sco3.2v2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -udk*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -isc)
-               os=-isc2.2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -clix*)
-               basic_machine=clipper-intergraph
-               ;;
-       -isc*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -lynx*)
-               os=-lynxos
-               ;;
-       -ptx*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-               ;;
-       -windowsnt*)
-               os=`echo $os | sed -e 's/windowsnt/winnt/'`
-               ;;
-       -psos*)
-               os=-psos
-               ;;
-       -mint | -mint[0-9]*)
-               basic_machine=m68k-atari
-               os=-mint
-               ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-       # Recognize the basic CPU types without company name.
-       # Some are omitted here because they have special meanings below.
-       1750a | 580 \
-       | a29k \
-       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-       | am33_2.0 \
-       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-       | bfin \
-       | c4x | clipper \
-       | d10v | d30v | dlx | dsp16xx \
-       | fido | fr30 | frv \
-       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-       | i370 | i860 | i960 | ia64 \
-       | ip2k | iq2000 \
-       | m32c | m32r | m32rle | m68000 | m68k | m88k \
-       | maxq | mb | microblaze | mcore | mep \
-       | mips | mipsbe | mipseb | mipsel | mipsle \
-       | mips16 \
-       | mips64 | mips64el \
-       | mips64vr | mips64vrel \
-       | mips64orion | mips64orionel \
-       | mips64vr4100 | mips64vr4100el \
-       | mips64vr4300 | mips64vr4300el \
-       | mips64vr5000 | mips64vr5000el \
-       | mips64vr5900 | mips64vr5900el \
-       | mipsisa32 | mipsisa32el \
-       | mipsisa32r2 | mipsisa32r2el \
-       | mipsisa64 | mipsisa64el \
-       | mipsisa64r2 | mipsisa64r2el \
-       | mipsisa64sb1 | mipsisa64sb1el \
-       | mipsisa64sr71k | mipsisa64sr71kel \
-       | mipstx39 | mipstx39el \
-       | mn10200 | mn10300 \
-       | mt \
-       | msp430 \
-       | nios | nios2 \
-       | ns16k | ns32k \
-       | or32 \
-       | pdp10 | pdp11 | pj | pjl \
-       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
-       | pyramid \
-       | score \
-       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
-       | sh64 | sh64le \
-       | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
-       | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-       | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
-       | v850 | v850e \
-       | we32k \
-       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-       | z8k)
-               basic_machine=$basic_machine-unknown
-               ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
-               # Motorola 68HC11/12.
-               basic_machine=$basic_machine-unknown
-               os=-none
-               ;;
-       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-               ;;
-       ms1)
-               basic_machine=mt-unknown
-               ;;
-
-       # We use `pc' rather than `unknown'
-       # because (1) that's what they normally are, and
-       # (2) the word "unknown" tends to confuse beginning users.
-       i*86 | x86_64)
-         basic_machine=$basic_machine-pc
-         ;;
-       # Object if more than one company name word.
-       *-*-*)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-       # Recognize the basic CPU types with company name.
-       580-* \
-       | a29k-* \
-       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-       | avr-* | avr32-* \
-       | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-       | clipper-* | craynv-* | cydra-* \
-       | d10v-* | d30v-* | dlx-* \
-       | elxsi-* \
-       | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
-       | h8300-* | h8500-* \
-       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-       | i*86-* | i860-* | i960-* | ia64-* \
-       | ip2k-* | iq2000-* \
-       | m32c-* | m32r-* | m32rle-* \
-       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* \
-       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-       | mips16-* \
-       | mips64-* | mips64el-* \
-       | mips64vr-* | mips64vrel-* \
-       | mips64orion-* | mips64orionel-* \
-       | mips64vr4100-* | mips64vr4100el-* \
-       | mips64vr4300-* | mips64vr4300el-* \
-       | mips64vr5000-* | mips64vr5000el-* \
-       | mips64vr5900-* | mips64vr5900el-* \
-       | mipsisa32-* | mipsisa32el-* \
-       | mipsisa32r2-* | mipsisa32r2el-* \
-       | mipsisa64-* | mipsisa64el-* \
-       | mipsisa64r2-* | mipsisa64r2el-* \
-       | mipsisa64sb1-* | mipsisa64sb1el-* \
-       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
-       | mipstx39-* | mipstx39el-* \
-       | mmix-* \
-       | mt-* \
-       | msp430-* \
-       | nios-* | nios2-* \
-       | none-* | np1-* | ns16k-* | ns32k-* \
-       | orion-* \
-       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
-       | pyramid-* \
-       | romp-* | rs6000-* \
-       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
-       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-       | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-       | sparclite-* \
-       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-       | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-       | tron-* \
-       | v850-* | v850e-* | vax-* \
-       | we32k-* \
-       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
-       | xstormy16-* | xtensa-* \
-       | ymp-* \
-       | z8k-*)
-               ;;
-       # Recognize the various machine names and aliases which stand
-       # for a CPU type and a company and sometimes even an OS.
-       386bsd)
-               basic_machine=i386-unknown
-               os=-bsd
-               ;;
-       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-               basic_machine=m68000-att
-               ;;
-       3b*)
-               basic_machine=we32k-att
-               ;;
-       a29khif)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       abacus)
-               basic_machine=abacus-unknown
-               ;;
-       adobe68k)
-               basic_machine=m68010-adobe
-               os=-scout
-               ;;
-       alliant | fx80)
-               basic_machine=fx80-alliant
-               ;;
-       altos | altos3068)
-               basic_machine=m68k-altos
-               ;;
-       am29k)
-               basic_machine=a29k-none
-               os=-bsd
-               ;;
-       amd64)
-               basic_machine=x86_64-pc
-               ;;
-       amd64-*)
-               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       amdahl)
-               basic_machine=580-amdahl
-               os=-sysv
-               ;;
-       amiga | amiga-*)
-               basic_machine=m68k-unknown
-               ;;
-       amigaos | amigados)
-               basic_machine=m68k-unknown
-               os=-amigaos
-               ;;
-       amigaunix | amix)
-               basic_machine=m68k-unknown
-               os=-sysv4
-               ;;
-       apollo68)
-               basic_machine=m68k-apollo
-               os=-sysv
-               ;;
-       apollo68bsd)
-               basic_machine=m68k-apollo
-               os=-bsd
-               ;;
-       aux)
-               basic_machine=m68k-apple
-               os=-aux
-               ;;
-       balance)
-               basic_machine=ns32k-sequent
-               os=-dynix
-               ;;
-       c90)
-               basic_machine=c90-cray
-               os=-unicos
-               ;;
-       convex-c1)
-               basic_machine=c1-convex
-               os=-bsd
-               ;;
-       convex-c2)
-               basic_machine=c2-convex
-               os=-bsd
-               ;;
-       convex-c32)
-               basic_machine=c32-convex
-               os=-bsd
-               ;;
-       convex-c34)
-               basic_machine=c34-convex
-               os=-bsd
-               ;;
-       convex-c38)
-               basic_machine=c38-convex
-               os=-bsd
-               ;;
-       cray | j90)
-               basic_machine=j90-cray
-               os=-unicos
-               ;;
-       craynv)
-               basic_machine=craynv-cray
-               os=-unicosmp
-               ;;
-       cr16)
-               basic_machine=cr16-unknown
-               os=-elf
-               ;;
-       crds | unos)
-               basic_machine=m68k-crds
-               ;;
-       crisv32 | crisv32-* | etraxfs*)
-               basic_machine=crisv32-axis
-               ;;
-       cris | cris-* | etrax*)
-               basic_machine=cris-axis
-               ;;
-       crx)
-               basic_machine=crx-unknown
-               os=-elf
-               ;;
-       da30 | da30-*)
-               basic_machine=m68k-da30
-               ;;
-       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-               basic_machine=mips-dec
-               ;;
-       decsystem10* | dec10*)
-               basic_machine=pdp10-dec
-               os=-tops10
-               ;;
-       decsystem20* | dec20*)
-               basic_machine=pdp10-dec
-               os=-tops20
-               ;;
-       delta | 3300 | motorola-3300 | motorola-delta \
-             | 3300-motorola | delta-motorola)
-               basic_machine=m68k-motorola
-               ;;
-       delta88)
-               basic_machine=m88k-motorola
-               os=-sysv3
-               ;;
-       djgpp)
-               basic_machine=i586-pc
-               os=-msdosdjgpp
-               ;;
-       dpx20 | dpx20-*)
-               basic_machine=rs6000-bull
-               os=-bosx
-               ;;
-       dpx2* | dpx2*-bull)
-               basic_machine=m68k-bull
-               os=-sysv3
-               ;;
-       ebmon29k)
-               basic_machine=a29k-amd
-               os=-ebmon
-               ;;
-       elxsi)
-               basic_machine=elxsi-elxsi
-               os=-bsd
-               ;;
-       encore | umax | mmax)
-               basic_machine=ns32k-encore
-               ;;
-       es1800 | OSE68k | ose68k | ose | OSE)
-               basic_machine=m68k-ericsson
-               os=-ose
-               ;;
-       fx2800)
-               basic_machine=i860-alliant
-               ;;
-       genix)
-               basic_machine=ns32k-ns
-               ;;
-       gmicro)
-               basic_machine=tron-gmicro
-               os=-sysv
-               ;;
-       go32)
-               basic_machine=i386-pc
-               os=-go32
-               ;;
-       h3050r* | hiux*)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       h8300hms)
-               basic_machine=h8300-hitachi
-               os=-hms
-               ;;
-       h8300xray)
-               basic_machine=h8300-hitachi
-               os=-xray
-               ;;
-       h8500hms)
-               basic_machine=h8500-hitachi
-               os=-hms
-               ;;
-       harris)
-               basic_machine=m88k-harris
-               os=-sysv3
-               ;;
-       hp300-*)
-               basic_machine=m68k-hp
-               ;;
-       hp300bsd)
-               basic_machine=m68k-hp
-               os=-bsd
-               ;;
-       hp300hpux)
-               basic_machine=m68k-hp
-               os=-hpux
-               ;;
-       hp3k9[0-9][0-9] | hp9[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hp9k2[0-9][0-9] | hp9k31[0-9])
-               basic_machine=m68000-hp
-               ;;
-       hp9k3[2-9][0-9])
-               basic_machine=m68k-hp
-               ;;
-       hp9k6[0-9][0-9] | hp6[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hp9k7[0-79][0-9] | hp7[0-79][0-9])
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k78[0-9] | hp78[0-9])
-               # FIXME: really hppa2.0-hp
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-               # FIXME: really hppa2.0-hp
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][13679] | hp8[0-9][13679])
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][0-9] | hp8[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hppa-next)
-               os=-nextstep3
-               ;;
-       hppaosf)
-               basic_machine=hppa1.1-hp
-               os=-osf
-               ;;
-       hppro)
-               basic_machine=hppa1.1-hp
-               os=-proelf
-               ;;
-       i370-ibm* | ibm*)
-               basic_machine=i370-ibm
-               ;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-       i*86v32)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv32
-               ;;
-       i*86v4*)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv4
-               ;;
-       i*86v)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv
-               ;;
-       i*86sol2)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-solaris2
-               ;;
-       i386mach)
-               basic_machine=i386-mach
-               os=-mach
-               ;;
-       i386-vsta | vsta)
-               basic_machine=i386-unknown
-               os=-vsta
-               ;;
-       iris | iris4d)
-               basic_machine=mips-sgi
-               case $os in
-                   -irix*)
-                       ;;
-                   *)
-                       os=-irix4
-                       ;;
-               esac
-               ;;
-       isi68 | isi)
-               basic_machine=m68k-isi
-               os=-sysv
-               ;;
-       m88k-omron*)
-               basic_machine=m88k-omron
-               ;;
-       magnum | m3230)
-               basic_machine=mips-mips
-               os=-sysv
-               ;;
-       merlin)
-               basic_machine=ns32k-utek
-               os=-sysv
-               ;;
-       mingw32)
-               basic_machine=i386-pc
-               os=-mingw32
-               ;;
-       mingw32ce)
-               basic_machine=arm-unknown
-               os=-mingw32ce
-               ;;
-       miniframe)
-               basic_machine=m68000-convergent
-               ;;
-       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-               basic_machine=m68k-atari
-               os=-mint
-               ;;
-       mips3*-*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-               ;;
-       mips3*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-               ;;
-       monitor)
-               basic_machine=m68k-rom68k
-               os=-coff
-               ;;
-       morphos)
-               basic_machine=powerpc-unknown
-               os=-morphos
-               ;;
-       msdos)
-               basic_machine=i386-pc
-               os=-msdos
-               ;;
-       ms1-*)
-               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-               ;;
-       mvs)
-               basic_machine=i370-ibm
-               os=-mvs
-               ;;
-       ncr3000)
-               basic_machine=i486-ncr
-               os=-sysv4
-               ;;
-       netbsd386)
-               basic_machine=i386-unknown
-               os=-netbsd
-               ;;
-       netwinder)
-               basic_machine=armv4l-rebel
-               os=-linux
-               ;;
-       news | news700 | news800 | news900)
-               basic_machine=m68k-sony
-               os=-newsos
-               ;;
-       news1000)
-               basic_machine=m68030-sony
-               os=-newsos
-               ;;
-       news-3600 | risc-news)
-               basic_machine=mips-sony
-               os=-newsos
-               ;;
-       necv70)
-               basic_machine=v70-nec
-               os=-sysv
-               ;;
-       next | m*-next )
-               basic_machine=m68k-next
-               case $os in
-                   -nextstep* )
-                       ;;
-                   -ns2*)
-                     os=-nextstep2
-                       ;;
-                   *)
-                     os=-nextstep3
-                       ;;
-               esac
-               ;;
-       nh3000)
-               basic_machine=m68k-harris
-               os=-cxux
-               ;;
-       nh[45]000)
-               basic_machine=m88k-harris
-               os=-cxux
-               ;;
-       nindy960)
-               basic_machine=i960-intel
-               os=-nindy
-               ;;
-       mon960)
-               basic_machine=i960-intel
-               os=-mon960
-               ;;
-       nonstopux)
-               basic_machine=mips-compaq
-               os=-nonstopux
-               ;;
-       np1)
-               basic_machine=np1-gould
-               ;;
-       nsr-tandem)
-               basic_machine=nsr-tandem
-               ;;
-       op50n-* | op60c-*)
-               basic_machine=hppa1.1-oki
-               os=-proelf
-               ;;
-       openrisc | openrisc-*)
-               basic_machine=or32-unknown
-               ;;
-       os400)
-               basic_machine=powerpc-ibm
-               os=-os400
-               ;;
-       OSE68000 | ose68000)
-               basic_machine=m68000-ericsson
-               os=-ose
-               ;;
-       os68k)
-               basic_machine=m68k-none
-               os=-os68k
-               ;;
-       pa-hitachi)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       paragon)
-               basic_machine=i860-intel
-               os=-osf
-               ;;
-       pbd)
-               basic_machine=sparc-tti
-               ;;
-       pbb)
-               basic_machine=m68k-tti
-               ;;
-       pc532 | pc532-*)
-               basic_machine=ns32k-pc532
-               ;;
-       pc98)
-               basic_machine=i386-pc
-               ;;
-       pc98-*)
-               basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentium | p5 | k5 | k6 | nexgen | viac3)
-               basic_machine=i586-pc
-               ;;
-       pentiumpro | p6 | 6x86 | athlon | athlon_*)
-               basic_machine=i686-pc
-               ;;
-       pentiumii | pentium2 | pentiumiii | pentium3)
-               basic_machine=i686-pc
-               ;;
-       pentium4)
-               basic_machine=i786-pc
-               ;;
-       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumpro-* | p6-* | 6x86-* | athlon-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentium4-*)
-               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pn)
-               basic_machine=pn-gould
-               ;;
-       power)  basic_machine=power-ibm
-               ;;
-       ppc)    basic_machine=powerpc-unknown
-               ;;
-       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppcle | powerpclittle | ppc-le | powerpc-little)
-               basic_machine=powerpcle-unknown
-               ;;
-       ppcle-* | powerpclittle-*)
-               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppc64)  basic_machine=powerpc64-unknown
-               ;;
-       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-               basic_machine=powerpc64le-unknown
-               ;;
-       ppc64le-* | powerpc64little-*)
-               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ps2)
-               basic_machine=i386-ibm
-               ;;
-       pw32)
-               basic_machine=i586-unknown
-               os=-pw32
-               ;;
-       rdos)
-               basic_machine=i386-pc
-               os=-rdos
-               ;;
-       rom68k)
-               basic_machine=m68k-rom68k
-               os=-coff
-               ;;
-       rm[46]00)
-               basic_machine=mips-siemens
-               ;;
-       rtpc | rtpc-*)
-               basic_machine=romp-ibm
-               ;;
-       s390 | s390-*)
-               basic_machine=s390-ibm
-               ;;
-       s390x | s390x-*)
-               basic_machine=s390x-ibm
-               ;;
-       sa29200)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       sb1)
-               basic_machine=mipsisa64sb1-unknown
-               ;;
-       sb1el)
-               basic_machine=mipsisa64sb1el-unknown
-               ;;
-       sde)
-               basic_machine=mipsisa32-sde
-               os=-elf
-               ;;
-       sei)
-               basic_machine=mips-sei
-               os=-seiux
-               ;;
-       sequent)
-               basic_machine=i386-sequent
-               ;;
-       sh)
-               basic_machine=sh-hitachi
-               os=-hms
-               ;;
-       sh5el)
-               basic_machine=sh5le-unknown
-               ;;
-       sh64)
-               basic_machine=sh64-unknown
-               ;;
-       sparclite-wrs | simso-wrs)
-               basic_machine=sparclite-wrs
-               os=-vxworks
-               ;;
-       sps7)
-               basic_machine=m68k-bull
-               os=-sysv2
-               ;;
-       spur)
-               basic_machine=spur-unknown
-               ;;
-       st2000)
-               basic_machine=m68k-tandem
-               ;;
-       stratus)
-               basic_machine=i860-stratus
-               os=-sysv4
-               ;;
-       sun2)
-               basic_machine=m68000-sun
-               ;;
-       sun2os3)
-               basic_machine=m68000-sun
-               os=-sunos3
-               ;;
-       sun2os4)
-               basic_machine=m68000-sun
-               os=-sunos4
-               ;;
-       sun3os3)
-               basic_machine=m68k-sun
-               os=-sunos3
-               ;;
-       sun3os4)
-               basic_machine=m68k-sun
-               os=-sunos4
-               ;;
-       sun4os3)
-               basic_machine=sparc-sun
-               os=-sunos3
-               ;;
-       sun4os4)
-               basic_machine=sparc-sun
-               os=-sunos4
-               ;;
-       sun4sol2)
-               basic_machine=sparc-sun
-               os=-solaris2
-               ;;
-       sun3 | sun3-*)
-               basic_machine=m68k-sun
-               ;;
-       sun4)
-               basic_machine=sparc-sun
-               ;;
-       sun386 | sun386i | roadrunner)
-               basic_machine=i386-sun
-               ;;
-       sv1)
-               basic_machine=sv1-cray
-               os=-unicos
-               ;;
-       symmetry)
-               basic_machine=i386-sequent
-               os=-dynix
-               ;;
-       t3e)
-               basic_machine=alphaev5-cray
-               os=-unicos
-               ;;
-       t90)
-               basic_machine=t90-cray
-               os=-unicos
-               ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
-               ;;
-       tx39)
-               basic_machine=mipstx39-unknown
-               ;;
-       tx39el)
-               basic_machine=mipstx39el-unknown
-               ;;
-       toad1)
-               basic_machine=pdp10-xkl
-               os=-tops20
-               ;;
-       tower | tower-32)
-               basic_machine=m68k-ncr
-               ;;
-       tpf)
-               basic_machine=s390x-ibm
-               os=-tpf
-               ;;
-       udi29k)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       ultra3)
-               basic_machine=a29k-nyu
-               os=-sym1
-               ;;
-       v810 | necv810)
-               basic_machine=v810-nec
-               os=-none
-               ;;
-       vaxv)
-               basic_machine=vax-dec
-               os=-sysv
-               ;;
-       vms)
-               basic_machine=vax-dec
-               os=-vms
-               ;;
-       vpp*|vx|vx-*)
-               basic_machine=f301-fujitsu
-               ;;
-       vxworks960)
-               basic_machine=i960-wrs
-               os=-vxworks
-               ;;
-       vxworks68)
-               basic_machine=m68k-wrs
-               os=-vxworks
-               ;;
-       vxworks29k)
-               basic_machine=a29k-wrs
-               os=-vxworks
-               ;;
-       w65*)
-               basic_machine=w65-wdc
-               os=-none
-               ;;
-       w89k-*)
-               basic_machine=hppa1.1-winbond
-               os=-proelf
-               ;;
-       xbox)
-               basic_machine=i686-pc
-               os=-mingw32
-               ;;
-       xps | xps100)
-               basic_machine=xps100-honeywell
-               ;;
-       ymp)
-               basic_machine=ymp-cray
-               os=-unicos
-               ;;
-       z8k-*-coff)
-               basic_machine=z8k-unknown
-               os=-sim
-               ;;
-       none)
-               basic_machine=none-none
-               os=-none
-               ;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-       w89k)
-               basic_machine=hppa1.1-winbond
-               ;;
-       op50n)
-               basic_machine=hppa1.1-oki
-               ;;
-       op60c)
-               basic_machine=hppa1.1-oki
-               ;;
-       romp)
-               basic_machine=romp-ibm
-               ;;
-       mmix)
-               basic_machine=mmix-knuth
-               ;;
-       rs6000)
-               basic_machine=rs6000-ibm
-               ;;
-       vax)
-               basic_machine=vax-dec
-               ;;
-       pdp10)
-               # there are many clones, so DEC is not a safe bet
-               basic_machine=pdp10-unknown
-               ;;
-       pdp11)
-               basic_machine=pdp11-dec
-               ;;
-       we32k)
-               basic_machine=we32k-att
-               ;;
-       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
-               basic_machine=sh-unknown
-               ;;
-       sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-               basic_machine=sparc-sun
-               ;;
-       cydra)
-               basic_machine=cydra-cydrome
-               ;;
-       orion)
-               basic_machine=orion-highlevel
-               ;;
-       orion105)
-               basic_machine=clipper-highlevel
-               ;;
-       mac | mpw | mac-mpw)
-               basic_machine=m68k-apple
-               ;;
-       pmac | pmac-mpw)
-               basic_machine=powerpc-apple
-               ;;
-       *-unknown)
-               # Make sure to match an already-canonicalized machine name.
-               ;;
-       *)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-       *-digital*)
-               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-               ;;
-       *-commodore*)
-               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-               ;;
-       *)
-               ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-       # -solaris* is a basic system type, with this one exception.
-       -solaris1 | -solaris1.*)
-               os=`echo $os | sed -e 's|solaris1|sunos4|'`
-               ;;
-       -solaris)
-               os=-solaris2
-               ;;
-       -svr4*)
-               os=-sysv4
-               ;;
-       -unixware*)
-               os=-sysv4.2uw
-               ;;
-       -gnu/linux*)
-               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-               ;;
-       # First accept the basic system types.
-       # The portable systems comes first.
-       # Each alternative MUST END IN A *, to match a version number.
-       # -sysv* is not here because it comes later, after sysvr4.
-       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* \
-             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-             | -openbsd* | -solidbsd* \
-             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* \
-             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
-             | -uxpv* | -beos* | -mpeix* | -udk* \
-             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
-       # Remember, each alternative MUST END IN *, to match a version number.
-               ;;
-       -qnx*)
-               case $basic_machine in
-                   x86-* | i*86-*)
-                       ;;
-                   *)
-                       os=-nto$os
-                       ;;
-               esac
-               ;;
-       -nto-qnx*)
-               ;;
-       -nto*)
-               os=`echo $os | sed -e 's|nto|nto-qnx|'`
-               ;;
-       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
-             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-               ;;
-       -mac*)
-               os=`echo $os | sed -e 's|mac|macos|'`
-               ;;
-       -linux-dietlibc)
-               os=-linux-dietlibc
-               ;;
-       -linux*)
-               os=`echo $os | sed -e 's|linux|linux-gnu|'`
-               ;;
-       -sunos5*)
-               os=`echo $os | sed -e 's|sunos5|solaris2|'`
-               ;;
-       -sunos6*)
-               os=`echo $os | sed -e 's|sunos6|solaris3|'`
-               ;;
-       -opened*)
-               os=-openedition
-               ;;
-        -os400*)
-               os=-os400
-               ;;
-       -wince*)
-               os=-wince
-               ;;
-       -osfrose*)
-               os=-osfrose
-               ;;
-       -osf*)
-               os=-osf
-               ;;
-       -utek*)
-               os=-bsd
-               ;;
-       -dynix*)
-               os=-bsd
-               ;;
-       -acis*)
-               os=-aos
-               ;;
-       -atheos*)
-               os=-atheos
-               ;;
-       -syllable*)
-               os=-syllable
-               ;;
-       -386bsd)
-               os=-bsd
-               ;;
-       -ctix* | -uts*)
-               os=-sysv
-               ;;
-       -nova*)
-               os=-rtmk-nova
-               ;;
-       -ns2 )
-               os=-nextstep2
-               ;;
-       -nsk*)
-               os=-nsk
-               ;;
-       # Preserve the version number of sinix5.
-       -sinix5.*)
-               os=`echo $os | sed -e 's|sinix|sysv|'`
-               ;;
-       -sinix*)
-               os=-sysv4
-               ;;
-        -tpf*)
-               os=-tpf
-               ;;
-       -triton*)
-               os=-sysv3
-               ;;
-       -oss*)
-               os=-sysv3
-               ;;
-       -svr4)
-               os=-sysv4
-               ;;
-       -svr3)
-               os=-sysv3
-               ;;
-       -sysvr4)
-               os=-sysv4
-               ;;
-       # This must come after -sysvr4.
-       -sysv*)
-               ;;
-       -ose*)
-               os=-ose
-               ;;
-       -es1800*)
-               os=-ose
-               ;;
-       -xenix)
-               os=-xenix
-               ;;
-       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-               os=-mint
-               ;;
-       -aros*)
-               os=-aros
-               ;;
-       -kaos*)
-               os=-kaos
-               ;;
-       -zvmoe)
-               os=-zvmoe
-               ;;
-       -none)
-               ;;
-       *)
-               # Get rid of the `-' at the beginning of $os.
-               os=`echo $os | sed 's/[^-]*-//'`
-               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-        score-*)
-               os=-elf
-               ;;
-        spu-*)
-               os=-elf
-               ;;
-       *-acorn)
-               os=-riscix1.2
-               ;;
-       arm*-rebel)
-               os=-linux
-               ;;
-       arm*-semi)
-               os=-aout
-               ;;
-        c4x-* | tic4x-*)
-               os=-coff
-               ;;
-       # This must come before the *-dec entry.
-       pdp10-*)
-               os=-tops20
-               ;;
-       pdp11-*)
-               os=-none
-               ;;
-       *-dec | vax-*)
-               os=-ultrix4.2
-               ;;
-       m68*-apollo)
-               os=-domain
-               ;;
-       i386-sun)
-               os=-sunos4.0.2
-               ;;
-       m68000-sun)
-               os=-sunos3
-               # This also exists in the configure program, but was not the
-               # default.
-               # os=-sunos4
-               ;;
-       m68*-cisco)
-               os=-aout
-               ;;
-        mep-*)
-               os=-elf
-               ;;
-       mips*-cisco)
-               os=-elf
-               ;;
-       mips*-*)
-               os=-elf
-               ;;
-       or32-*)
-               os=-coff
-               ;;
-       *-tti)  # must be before sparc entry or we get the wrong os.
-               os=-sysv3
-               ;;
-       sparc-* | *-sun)
-               os=-sunos4.1.1
-               ;;
-       *-be)
-               os=-beos
-               ;;
-       *-haiku)
-               os=-haiku
-               ;;
-       *-ibm)
-               os=-aix
-               ;;
-       *-knuth)
-               os=-mmixware
-               ;;
-       *-wec)
-               os=-proelf
-               ;;
-       *-winbond)
-               os=-proelf
-               ;;
-       *-oki)
-               os=-proelf
-               ;;
-       *-hp)
-               os=-hpux
-               ;;
-       *-hitachi)
-               os=-hiux
-               ;;
-       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-               os=-sysv
-               ;;
-       *-cbm)
-               os=-amigaos
-               ;;
-       *-dg)
-               os=-dgux
-               ;;
-       *-dolphin)
-               os=-sysv3
-               ;;
-       m68k-ccur)
-               os=-rtu
-               ;;
-       m88k-omron*)
-               os=-luna
-               ;;
-       *-next )
-               os=-nextstep
-               ;;
-       *-sequent)
-               os=-ptx
-               ;;
-       *-crds)
-               os=-unos
-               ;;
-       *-ns)
-               os=-genix
-               ;;
-       i370-*)
-               os=-mvs
-               ;;
-       *-next)
-               os=-nextstep3
-               ;;
-       *-gould)
-               os=-sysv
-               ;;
-       *-highlevel)
-               os=-bsd
-               ;;
-       *-encore)
-               os=-bsd
-               ;;
-       *-sgi)
-               os=-irix
-               ;;
-       *-siemens)
-               os=-sysv4
-               ;;
-       *-masscomp)
-               os=-rtu
-               ;;
-       f30[01]-fujitsu | f700-fujitsu)
-               os=-uxpv
-               ;;
-       *-rom68k)
-               os=-coff
-               ;;
-       *-*bug)
-               os=-coff
-               ;;
-       *-apple)
-               os=-macos
-               ;;
-       *-atari*)
-               os=-mint
-               ;;
-       *)
-               os=-none
-               ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-       *-unknown)
-               case $os in
-                       -riscix*)
-                               vendor=acorn
-                               ;;
-                       -sunos*)
-                               vendor=sun
-                               ;;
-                       -aix*)
-                               vendor=ibm
-                               ;;
-                       -beos*)
-                               vendor=be
-                               ;;
-                       -hpux*)
-                               vendor=hp
-                               ;;
-                       -mpeix*)
-                               vendor=hp
-                               ;;
-                       -hiux*)
-                               vendor=hitachi
-                               ;;
-                       -unos*)
-                               vendor=crds
-                               ;;
-                       -dgux*)
-                               vendor=dg
-                               ;;
-                       -luna*)
-                               vendor=omron
-                               ;;
-                       -genix*)
-                               vendor=ns
-                               ;;
-                       -mvs* | -opened*)
-                               vendor=ibm
-                               ;;
-                       -os400*)
-                               vendor=ibm
-                               ;;
-                       -ptx*)
-                               vendor=sequent
-                               ;;
-                       -tpf*)
-                               vendor=ibm
-                               ;;
-                       -vxsim* | -vxworks* | -windiss*)
-                               vendor=wrs
-                               ;;
-                       -aux*)
-                               vendor=apple
-                               ;;
-                       -hms*)
-                               vendor=hitachi
-                               ;;
-                       -mpw* | -macos*)
-                               vendor=apple
-                               ;;
-                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-                               vendor=atari
-                               ;;
-                       -vos*)
-                               vendor=stratus
-                               ;;
-               esac
-               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-               ;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/configure b/src/mm/boehm-gc/libatomic_ops-1.2/configure
deleted file mode 100755 (executable)
index db69bba..0000000
+++ /dev/null
@@ -1,6184 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for libatomic_ops 1.2.
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-as_nl='
-'
-IFS=" ""       $as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-  fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-fi
-
-  if test $as_have_required = yes &&    (eval ":
-(as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=\$LINENO
-  as_lineno_2=\$LINENO
-  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
-  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
-  :
-else
-  as_candidate_shells=
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  case $as_dir in
-        /*)
-          for as_base in sh bash ksh sh5; do
-            as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
-          done;;
-       esac
-done
-IFS=$as_save_IFS
-
-
-      for as_shell in $as_candidate_shells $SHELL; do
-        # Try only shells that exist, to save several forks.
-        if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-               { ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
-  CONFIG_SHELL=$as_shell
-              as_have_required=yes
-              if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
-  (exit $1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
-  break
-fi
-
-fi
-
-      done
-
-      if test "x$CONFIG_SHELL" != x; then
-  for as_var in BASH_ENV ENV
-        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-        done
-        export CONFIG_SHELL
-        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
-    if test $as_have_required = no; then
-  echo This script requires a shell more modern than all the
-      echo shells that I found on your system.  Please install a
-      echo modern shell, or manually run the script under such a
-      echo shell if you do have one.
-      { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
-
-
-(eval "as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell autoconf@gnu.org about your system,
-  echo including any error possibly output before this
-  echo message
-}
-
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s='ln -s'
-  # ... but there are two gotchas:
-  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-  # In both cases, we have to default to `cp -p'.
-  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-       case $1 in
-        -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Identity of this package.
-PACKAGE_NAME='libatomic_ops'
-PACKAGE_TARNAME='libatomic_ops'
-PACKAGE_VERSION='1.2'
-PACKAGE_STRING='libatomic_ops 1.2'
-PACKAGE_BUGREPORT=''
-
-ac_unique_file="src/atomic_ops.c"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-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
-datarootdir
-datadir
-sysconfdir
-sharedstatedir
-localstatedir
-includedir
-oldincludedir
-docdir
-infodir
-htmldir
-dvidir
-pdfdir
-psdir
-libdir
-localedir
-mandir
-DEFS
-ECHO_C
-ECHO_N
-ECHO_T
-LIBS
-build_alias
-host_alias
-target_alias
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-target
-target_cpu
-target_vendor
-target_os
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-CYGPATH_W
-PACKAGE
-VERSION
-ACLOCAL
-AUTOCONF
-AUTOMAKE
-AUTOHEADER
-MAKEINFO
-install_sh
-STRIP
-INSTALL_STRIP_PROGRAM
-mkdir_p
-AWK
-SET_MAKE
-am__leading_dot
-AMTAR
-am__tar
-am__untar
-RANLIB
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
-DEPDIR
-am__include
-am__quote
-AMDEP_TRUE
-AMDEP_FALSE
-AMDEPBACKSLASH
-CCDEPMODE
-am__fastdepCC_TRUE
-am__fastdepCC_FALSE
-CCAS
-CCASFLAGS
-CPP
-GREP
-EGREP
-PICFLAG
-NEED_ASM_TRUE
-NEED_ASM_FALSE
-LIBOBJS
-LTLIBOBJS'
-ac_subst_files=''
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CCAS
-CCASFLAGS
-CPP'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval $ac_prev=\$ac_option
-    ac_prev=
-    continue
-  fi
-
-  case $ac_option in
-  *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)   ac_optarg=yes ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_dashdash$ac_option in
-  --)
-    ac_dashdash=yes ;;
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
-    datadir=$ac_optarg ;;
-
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
-  | --dataroo | --dataro | --datar)
-    ac_prev=datarootdir ;;
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
-    datarootdir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
-    eval enable_$ac_feature=no ;;
-
-  -docdir | --docdir | --docdi | --doc | --do)
-    ac_prev=docdir ;;
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
-    docdir=$ac_optarg ;;
-
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
-    dvidir=$ac_optarg ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
-    eval enable_$ac_feature=\$ac_optarg ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
-  | --ht=*)
-    htmldir=$ac_optarg ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
-
-  -localedir | --localedir | --localedi | --localed | --locale)
-    ac_prev=localedir ;;
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
-    localedir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst | --locals)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
-    ac_prev=pdfdir ;;
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
-    pdfdir=$ac_optarg ;;
-
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
-    psdir=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
-    eval with_$ac_package=\$ac_optarg ;;
-
-  -without-* | --without-*)
-    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
-    eval with_$ac_package=no ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries=$ac_optarg ;;
-
-  -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; }
-    ;;
-
-  *=*)
-    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
-   { (exit 1); exit 1; }; }
-    eval $ac_envvar=\$ac_optarg
-    export $ac_envvar ;;
-
-  *)
-    # FIXME: should be removed in autoconf 3.0.
-    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
-    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute directory names.
-for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
-               datadir sysconfdir sharedstatedir localstatedir includedir \
-               oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-               libdir localedir mandir
-do
-  eval ac_val=\$$ac_var
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* )  continue;;
-    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
-  esac
-  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; }
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
-  if test "x$build_alias" = x; then
-    cross_compiling=maybe
-    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  { echo "$as_me: error: Working directory cannot be determined" >&2
-   { (exit 1); exit 1; }; }
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  { echo "$as_me: error: pwd does not report name of working directory" >&2
-   { (exit 1); exit 1; }; }
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then the parent directory.
-  ac_confdir=`$as_dirname -- "$0" ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$0" : 'X\(//\)[^/]' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$0" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  srcdir=$ac_confdir
-  if test ! -r "$srcdir/$ac_unique_file"; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
-  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
-       cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
-   { (exit 1); exit 1; }; }
-       pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
-  srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_env_${ac_var}_value=\$${ac_var}
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # Omit some internal or obsolete options to make the list less imposing.
-  # This message is too long to be a string in the A/UX 3.1 sh.
-  cat <<_ACEOF
-\`configure' configures libatomic_ops 1.2 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --help=short        display options specific to this package
-      --help=recursive    display the short help of all the included packages
-  -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
-      --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=config.cache'
-  -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                         [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                         [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
-  --bindir=DIR           user executables [EPREFIX/bin]
-  --sbindir=DIR          system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR       program executables [EPREFIX/libexec]
-  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
-  --libdir=DIR           object code libraries [EPREFIX/lib]
-  --includedir=DIR       C header files [PREFIX/include]
-  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
-  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR          info documentation [DATAROOTDIR/info]
-  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
-  --mandir=DIR           man documentation [DATAROOTDIR/man]
-  --docdir=DIR           documentation root [DATAROOTDIR/doc/libatomic_ops]
-  --htmldir=DIR          html documentation [DOCDIR]
-  --dvidir=DIR           dvi documentation [DOCDIR]
-  --pdfdir=DIR           pdf documentation [DOCDIR]
-  --psdir=DIR            ps documentation [DOCDIR]
-_ACEOF
-
-  cat <<\_ACEOF
-
-Program names:
-  --program-prefix=PREFIX            prepend PREFIX to installed program names
-  --program-suffix=SUFFIX            append SUFFIX to installed program names
-  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
-
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-  --target=TARGET   configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-  case $ac_init_help in
-     short | recursive ) echo "Configuration of libatomic_ops 1.2:";;
-   esac
-  cat <<\_ACEOF
-
-Optional Features:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
-              you have headers in a nonstandard directory <include dir>
-  CCAS        assembler compiler command (defaults to CC)
-  CCASFLAGS   assembler compiler flags (defaults to CFLAGS)
-  CPP         C preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
-  # If there are subdirs, report their specific --help.
-  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d "$ac_dir" || continue
-    ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
-    else
-      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
-  done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
-  cat <<\_ACEOF
-libatomic_ops configure 1.2
-generated by GNU Autoconf 2.61
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
-  exit
-fi
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by libatomic_ops $as_me 1.2, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
-    2)
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-       ac_must_keep_next=false # Got value, back to normal.
-      else
-       case $ac_arg in
-         *=* | --config-cache | -C | -disable-* | --disable-* \
-         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-         | -with-* | --with-* | -without-* | --without-* | --x)
-           case "$ac_configure_args0 " in
-             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-           esac
-           ;;
-         -* ) ac_must_keep_next=true ;;
-       esac
-      fi
-      ac_configure_args="$ac_configure_args '$ac_arg'"
-      ;;
-    esac
-  done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-       "s/'\''/'\''\\\\'\'''\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
-
-    cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=\$$ac_var
-      case $ac_val in
-      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
-      echo
-      for ac_var in $ac_subst_files
-      do
-       eval ac_val=\$$ac_var
-       case $ac_val in
-       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-       esac
-       echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
-      echo
-      cat confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      echo "$as_me: caught signal $ac_signal"
-    echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core *.core core.conftest.* &&
-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -n "$CONFIG_SITE"; then
-  set x "$CONFIG_SITE"
-elif test "x$prefix" != xNONE; then
-  set x "$prefix/share/config.site" "$prefix/etc/config.site"
-else
-  set x "$ac_default_prefix/share/config.site" \
-       "$ac_default_prefix/etc/config.site"
-fi
-shift
-for ac_site_file
-do
-  if test -r "$ac_site_file"; then
-    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special
-  # files actually), so we avoid doing that.
-  if test -f "$cache_file"; then
-    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
-    esac
-  fi
-else
-  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-       { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-       { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
-echo "$as_me:   former value:  $ac_old_val" >&2;}
-       { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
-echo "$as_me:   current value: $ac_new_val" >&2;}
-       ac_cache_corrupted=:
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
-  if test -f "$ac_dir/install-sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f "$ac_dir/install.sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  elif test -f "$ac_dir/shtool"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
-
-{ echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
-if test "${ac_cv_build+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
-if test "${ac_cv_host+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
-if test "${ac_cv_target+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "x$target_alias" = x; then
-  ac_cv_target=$ac_cv_host
-else
-  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
-echo "$as_me: error: invalid value of canonical target" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-
-am__api_version="1.9"
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
-  ./ | .// | /cC/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
-         if test $ac_prog = install &&
-           grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-           # AIX install.  It has an incompatible calling convention.
-           :
-         elif test $ac_prog = install &&
-           grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-           # program-specific install script used by HP pwplus--don't use.
-           :
-         else
-           ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-           break 3
-         fi
-       fi
-      done
-    done
-    ;;
-esac
-done
-IFS=$as_save_IFS
-
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$*" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$*" != "X $srcdir/configure conftest.file" \
-      && test "$*" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&2;}
-   { (exit 1); exit 1; }; }
-   fi
-
-   test "$2" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-test "$program_prefix" != NONE &&
-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.  echo might interpret backslashes.
-# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm -f conftest.sed
-
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
-  else
-    mkdir_p='$(install_sh) -d'
-  fi
-fi
-
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AWK="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-       @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-  SET_MAKE=
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-
-
-# Define the identity of the package.
- PACKAGE='libatomic_ops'
- VERSION='1.2'
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  { echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-  if test "x$ac_ct_RANLIB" = x; then
-    RANLIB=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
-    RANLIB=$ac_ct_RANLIB
-  fi
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-
-ac_config_headers="$ac_config_headers src/config.h"
-
-
-# Checks for programs.
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  fi
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-#
-# List of possible output files, starting from the most likely.
-# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
-# only as a last resort.  b.out is created by i960 compilers.
-ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
-#
-# The IRIX 6 linker writes into existing files which may not be
-# executable, retaining their permissions.  Remove them first so a
-# subsequent execution test works.
-ac_rmfiles=
-for ac_file in $ac_files
-do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-if { (ac_try="$ac_link_default"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link_default") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile.  We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
-       ;;
-    [ab].out )
-       # We found the default executable, but exeext='' is most
-       # certainly right.
-       break;;
-    *.* )
-        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
-       then :; else
-          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-       fi
-       # We set ac_cv_exeext here because the later test for it is not
-       # safe: cross compilers may not add the suffix if given an `-o'
-       # argument, so we may need to know it at that point already.
-       # Even if this section looks crufty: it has the advantage of
-       # actually working.
-       break;;
-    * )
-       break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
-  ac_file=''
-fi
-
-{ echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6; }
-if test -z "$ac_file"; then
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
-  if { ac_try='./$ac_file'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-       cross_compiling=yes
-    else
-       { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-  fi
-fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6; }
-
-{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-         break;;
-    * ) break;;
-  esac
-done
-else
-  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
-if test "${ac_cv_objext+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_compiler_gnu=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_compiler_gnu=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       CFLAGS=""
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_c_werror_flag=$ac_save_c_werror_flag
-        CFLAGS="-g"
-        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_c89=$ac_arg
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6; } ;;
-  xno)
-    { echo "$as_me:$LINENO: result: unsupported" >&5
-echo "${ECHO_T}unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
-fi
-
-
-{ echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
-  enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
-
-
-if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
-
-
-
-
-depcc="$CC"   am_compiler_list=
-
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    case $depmode in
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    none) break ;;
-    esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CC_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
-
-
-if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
-else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
-fi
-
-
-# By default we simply use the C compiler to build assembly code.
-
-test "${CCAS+set}" = set || CCAS=$CC
-test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
-
-
-
-
-# Checks for functions.
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-{ echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
-else
-  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # Extract the first word of "grep ggrep" to use in msg output
-if test -z "$GREP"; then
-set dummy grep ggrep; ac_prog_name=$2
-if test "${ac_cv_path_GREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_path_GREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in grep ggrep; do
-  for ac_exec_ext in '' $ac_executable_extensions; do
-    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-    # Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-
-    $ac_path_GREP_found && break 3
-  done
-done
-
-done
-IFS=$as_save_IFS
-
-
-fi
-
-GREP="$ac_cv_path_GREP"
-if test -z "$GREP"; then
-  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     # Extract the first word of "egrep" to use in msg output
-if test -z "$EGREP"; then
-set dummy egrep; ac_prog_name=$2
-if test "${ac_cv_path_EGREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_path_EGREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in egrep; do
-  for ac_exec_ext in '' $ac_executable_extensions; do
-    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-    # Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-
-    $ac_path_EGREP_found && break 3
-  done
-done
-
-done
-IFS=$as_save_IFS
-
-
-fi
-
-EGREP="$ac_cv_path_EGREP"
-if test -z "$EGREP"; then
-  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-else
-  ac_cv_path_EGREP=$EGREP
-fi
-
-
-   fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_stdc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_header_stdc=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-                  (('a' <= (c) && (c) <= 'i') \
-                    || ('j' <= (c) && (c) <= 'r') \
-                    || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-       || toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-                 inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-for ac_header in stdlib.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_func in getpagesize
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-{ echo "$as_me:$LINENO: checking for working mmap" >&5
-echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
-if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_func_mmap_fixed_mapped=no
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-/* malloc might have been renamed as rpl_malloc. */
-#undef malloc
-
-/* Thanks to Mike Haertel and Jim Avera for this test.
-   Here is a matrix of mmap possibilities:
-       mmap private not fixed
-       mmap private fixed at somewhere currently unmapped
-       mmap private fixed at somewhere already mapped
-       mmap shared not fixed
-       mmap shared fixed at somewhere currently unmapped
-       mmap shared fixed at somewhere already mapped
-   For private mappings, we should verify that changes cannot be read()
-   back from the file, nor mmap's back from the file at a different
-   address.  (There have been systems where private was not correctly
-   implemented like the infamous i386 svr4.0, and systems where the
-   VM page cache was not coherent with the file system buffer cache
-   like early versions of FreeBSD and possibly contemporary NetBSD.)
-   For shared mappings, we should conversely verify that changes get
-   propagated back to all the places they're supposed to be.
-
-   Grep wants private fixed already mapped.
-   The main things grep needs to know about mmap are:
-   * does it exist and is it safe to write into the mmap'd area
-   * how to use it (BSD variants)  */
-
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
-char *malloc ();
-#endif
-
-/* This mess was copied from the GNU getpagesize.h.  */
-#ifndef HAVE_GETPAGESIZE
-/* Assume that all systems that can run configure have sys/param.h.  */
-# ifndef HAVE_SYS_PARAM_H
-#  define HAVE_SYS_PARAM_H 1
-# endif
-
-# ifdef _SC_PAGESIZE
-#  define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-#  ifdef HAVE_SYS_PARAM_H
-#   include <sys/param.h>
-#   ifdef EXEC_PAGESIZE
-#    define getpagesize() EXEC_PAGESIZE
-#   else /* no EXEC_PAGESIZE */
-#    ifdef NBPG
-#     define getpagesize() NBPG * CLSIZE
-#     ifndef CLSIZE
-#      define CLSIZE 1
-#     endif /* no CLSIZE */
-#    else /* no NBPG */
-#     ifdef NBPC
-#      define getpagesize() NBPC
-#     else /* no NBPC */
-#      ifdef PAGESIZE
-#       define getpagesize() PAGESIZE
-#      endif /* PAGESIZE */
-#     endif /* no NBPC */
-#    endif /* no NBPG */
-#   endif /* no EXEC_PAGESIZE */
-#  else /* no HAVE_SYS_PARAM_H */
-#   define getpagesize() 8192  /* punt totally */
-#  endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
-
-int
-main ()
-{
-  char *data, *data2, *data3;
-  int i, pagesize;
-  int fd;
-
-  pagesize = getpagesize ();
-
-  /* First, make a file with some known garbage in it. */
-  data = (char *) malloc (pagesize);
-  if (!data)
-    return 1;
-  for (i = 0; i < pagesize; ++i)
-    *(data + i) = rand ();
-  umask (0);
-  fd = creat ("conftest.mmap", 0600);
-  if (fd < 0)
-    return 1;
-  if (write (fd, data, pagesize) != pagesize)
-    return 1;
-  close (fd);
-
-  /* Next, try to mmap the file at a fixed address which already has
-     something else allocated at it.  If we can, also make sure that
-     we see the same garbage.  */
-  fd = open ("conftest.mmap", O_RDWR);
-  if (fd < 0)
-    return 1;
-  data2 = (char *) malloc (2 * pagesize);
-  if (!data2)
-    return 1;
-  data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
-  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
-                    MAP_PRIVATE | MAP_FIXED, fd, 0L))
-    return 1;
-  for (i = 0; i < pagesize; ++i)
-    if (*(data + i) != *(data2 + i))
-      return 1;
-
-  /* Finally, make sure that changes to the mapped area do not
-     percolate back to the file as seen by read().  (This is a bug on
-     some variants of i386 svr4.0.)  */
-  for (i = 0; i < pagesize; ++i)
-    *(data2 + i) = *(data2 + i) + 1;
-  data3 = (char *) malloc (pagesize);
-  if (!data3)
-    return 1;
-  if (read (fd, data3, pagesize) != pagesize)
-    return 1;
-  for (i = 0; i < pagesize; ++i)
-    if (*(data + i) != *(data3 + i))
-      return 1;
-  close (fd);
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_mmap_fixed_mapped=yes
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
-echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MMAP 1
-_ACEOF
-
-fi
-rm -f conftest.mmap
-
-
-# Checks for header files.
-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_stdc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_header_stdc=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-                  (('a' <= (c) && (c) <= 'i') \
-                    || ('j' <= (c) && (c) <= 'r') \
-                    || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-       || toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# AC_CHECK_HEADERS([ ])
-
-# Determine PIC flag, adjust default CFLAGS
-need_asm=false
-PICFLAG=
-{ echo "$as_me:$LINENO: checking Determining PIC compiler flag" >&5
-echo $ECHO_N "checking Determining PIC compiler flag... $ECHO_C" >&6; }
-if test "$GCC" = yes; then
-  { echo "$as_me:$LINENO: result: -fPIC" >&5
-echo "${ECHO_T}-fPIC" >&6; }
-  PICFLAG=-fPIC
-else
-  case "$host" in
-    *-*-hpux*)
-      { echo "$as_me:$LINENO: result: \"+Z\"" >&5
-echo "${ECHO_T}\"+Z\"" >&6; }
-      PICFLAG="+Z"
-      if test "$GCC" != yes; then
-        CFLAGS="$CFLAGS +O2 -mt"
-      fi
-      ;;
-    *-*-solaris*)
-      { echo "$as_me:$LINENO: result: -Kpic" >&5
-echo "${ECHO_T}-Kpic" >&6; }
-      PICFLAG=-Kpic
-      if test "$GCC" != yes; then
-        CFLAGS="$CFLAGS -O"
-        need_asm=true
-      fi
-      ;;
-    *-*-linux*)
-      { echo "$as_me:$LINENO: result: -fPIC" >&5
-echo "${ECHO_T}-fPIC" >&6; }
-      PICFLAG=-fPIC
-      # Any Linux compiler had better be gcc compatible.
-      ;;
-    *)
-      { echo "$as_me:$LINENO: result: \"<none>\"" >&5
-echo "${ECHO_T}\"<none>\"" >&6; }
-      ;;
-  esac
-fi
-CFLAGS="$CFLAGS -DNDEBUG"
-
-
-
-
-
-
-if test x$need_asm = xtrue; then
-  NEED_ASM_TRUE=
-  NEED_ASM_FALSE='#'
-else
-  NEED_ASM_TRUE='#'
-  NEED_ASM_FALSE=
-fi
-
-
-ac_config_files="$ac_config_files Makefile src/Makefile src/atomic_ops/Makefile src/atomic_ops/sysdeps/Makefile doc/Makefile tests/Makefile"
-
-ac_config_commands="$ac_config_commands default"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-
-  (set) 2>&1 |
-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes (double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \).
-      sed -n \
-       "s/'/'\\\\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-  if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
-      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
-echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
-  else
-    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`echo "$ac_i" | sed "$ac_script"`
-  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
-  #    will be set to the directory where LIBOBJS objects are built.
-  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${NEED_ASM_TRUE}" && test -z "${NEED_ASM_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"NEED_ASM\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"NEED_ASM\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-as_nl='
-'
-IFS=" ""       $as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-  fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s='ln -s'
-  # ... but there are two gotchas:
-  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-  # In both cases, we have to default to `cp -p'.
-  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-       case $1 in
-        -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-
-# Save the log message, to keep $[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by libatomic_ops $as_me 1.2, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-  -q, --quiet      do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-  --file=FILE[:TEMPLATE]
-                  instantiate the configuration file FILE
-  --header=FILE[:TEMPLATE]
-                  instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration commands:
-$config_commands
-
-Report bugs to <bug-autoconf@gnu.org>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-libatomic_ops config.status 1.2
-configured by $0, generated by GNU Autoconf 2.61,
-  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2006 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value.  By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=*)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  *)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    echo "$ac_cs_version"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
-    ac_need_defaults=false;;
-  --he | --h)
-    # Conflict between --help and --header
-    { echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    echo "$ac_cs_usage"; exit ;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
-
-  # This is an error.
-  -*) { echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; } ;;
-
-  *) ac_config_targets="$ac_config_targets $1"
-     ac_need_defaults=false ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
-  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
-  CONFIG_SHELL=$SHELL
-  export CONFIG_SHELL
-  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-PICFLAG=${PICFLAG}
-CC=${CC}
-DEFS=${DEFS}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
-    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
-    "src/atomic_ops/Makefile") CONFIG_FILES="$CONFIG_FILES src/atomic_ops/Makefile" ;;
-    "src/atomic_ops/sysdeps/Makefile") CONFIG_FILES="$CONFIG_FILES src/atomic_ops/sysdeps/Makefile" ;;
-    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
-    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
-    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
-
-  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-   { (exit 1); exit 1; }; };;
-  esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp=
-  trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
-  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=./conf$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
-} ||
-{
-   echo "$me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
-
-#
-# Set up the sed scripts for CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "$CONFIG_FILES"; then
-
-_ACEOF
-
-
-
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  cat >conf$$subs.sed <<_ACEOF
-SHELL!$SHELL$ac_delim
-PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
-PACKAGE_NAME!$PACKAGE_NAME$ac_delim
-PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
-PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
-PACKAGE_STRING!$PACKAGE_STRING$ac_delim
-PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
-exec_prefix!$exec_prefix$ac_delim
-prefix!$prefix$ac_delim
-program_transform_name!$program_transform_name$ac_delim
-bindir!$bindir$ac_delim
-sbindir!$sbindir$ac_delim
-libexecdir!$libexecdir$ac_delim
-datarootdir!$datarootdir$ac_delim
-datadir!$datadir$ac_delim
-sysconfdir!$sysconfdir$ac_delim
-sharedstatedir!$sharedstatedir$ac_delim
-localstatedir!$localstatedir$ac_delim
-includedir!$includedir$ac_delim
-oldincludedir!$oldincludedir$ac_delim
-docdir!$docdir$ac_delim
-infodir!$infodir$ac_delim
-htmldir!$htmldir$ac_delim
-dvidir!$dvidir$ac_delim
-pdfdir!$pdfdir$ac_delim
-psdir!$psdir$ac_delim
-libdir!$libdir$ac_delim
-localedir!$localedir$ac_delim
-mandir!$mandir$ac_delim
-DEFS!$DEFS$ac_delim
-ECHO_C!$ECHO_C$ac_delim
-ECHO_N!$ECHO_N$ac_delim
-ECHO_T!$ECHO_T$ac_delim
-LIBS!$LIBS$ac_delim
-build_alias!$build_alias$ac_delim
-host_alias!$host_alias$ac_delim
-target_alias!$target_alias$ac_delim
-build!$build$ac_delim
-build_cpu!$build_cpu$ac_delim
-build_vendor!$build_vendor$ac_delim
-build_os!$build_os$ac_delim
-host!$host$ac_delim
-host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
-host_os!$host_os$ac_delim
-target!$target$ac_delim
-target_cpu!$target_cpu$ac_delim
-target_vendor!$target_vendor$ac_delim
-target_os!$target_os$ac_delim
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-CYGPATH_W!$CYGPATH_W$ac_delim
-PACKAGE!$PACKAGE$ac_delim
-VERSION!$VERSION$ac_delim
-ACLOCAL!$ACLOCAL$ac_delim
-AUTOCONF!$AUTOCONF$ac_delim
-AUTOMAKE!$AUTOMAKE$ac_delim
-AUTOHEADER!$AUTOHEADER$ac_delim
-MAKEINFO!$MAKEINFO$ac_delim
-install_sh!$install_sh$ac_delim
-STRIP!$STRIP$ac_delim
-INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
-mkdir_p!$mkdir_p$ac_delim
-AWK!$AWK$ac_delim
-SET_MAKE!$SET_MAKE$ac_delim
-am__leading_dot!$am__leading_dot$ac_delim
-AMTAR!$AMTAR$ac_delim
-am__tar!$am__tar$ac_delim
-am__untar!$am__untar$ac_delim
-RANLIB!$RANLIB$ac_delim
-CC!$CC$ac_delim
-CFLAGS!$CFLAGS$ac_delim
-LDFLAGS!$LDFLAGS$ac_delim
-CPPFLAGS!$CPPFLAGS$ac_delim
-ac_ct_CC!$ac_ct_CC$ac_delim
-EXEEXT!$EXEEXT$ac_delim
-OBJEXT!$OBJEXT$ac_delim
-DEPDIR!$DEPDIR$ac_delim
-am__include!$am__include$ac_delim
-am__quote!$am__quote$ac_delim
-AMDEP_TRUE!$AMDEP_TRUE$ac_delim
-AMDEP_FALSE!$AMDEP_FALSE$ac_delim
-AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
-CCDEPMODE!$CCDEPMODE$ac_delim
-am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
-am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
-CCAS!$CCAS$ac_delim
-CCASFLAGS!$CCASFLAGS$ac_delim
-CPP!$CPP$ac_delim
-GREP!$GREP$ac_delim
-EGREP!$EGREP$ac_delim
-PICFLAG!$PICFLAG$ac_delim
-NEED_ASM_TRUE!$NEED_ASM_TRUE$ac_delim
-NEED_ASM_FALSE!$NEED_ASM_FALSE$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-LTLIBOBJS!$LTLIBOBJS$ac_delim
-_ACEOF
-
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
-    break
-  elif $ac_last_try; then
-    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
-  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
-  ac_eof=`expr $ac_eof + 1`
-fi
-
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-CEOF$ac_eof
-_ACEOF
-
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[         ]*VPATH[        ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[    ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[      ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-fi # test -n "$CONFIG_FILES"
-
-
-for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
-do
-  case $ac_tag in
-  :[FHLC]) ac_mode=$ac_tag; continue;;
-  esac
-  case $ac_mode$ac_tag in
-  :[FHL]*:*);;
-  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
-echo "$as_me: error: Invalid tag $ac_tag." >&2;}
-   { (exit 1); exit 1; }; };;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$tmp/stdin";;
-      *) # Look for the file first in the build tree, then in the source tree
-        # (if the path is not absolute).  The absolute path cannot be DOS-style,
-        # because $ac_f cannot contain `:'.
-        test -f "$ac_f" ||
-          case $ac_f in
-          [\\/$]*) false;;
-          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
-          esac ||
-          { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-echo "$as_me: error: cannot find input file: $ac_f" >&2;}
-   { (exit 1); exit 1; }; };;
-      esac
-      ac_file_inputs="$ac_file_inputs $ac_f"
-    done
-
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
-    # use $as_me), people would be surprised to read:
-    #    /* config.h.  Generated by config.status.  */
-    configure_input="Generated from "`IFS=:
-         echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
-    if test x"$ac_file" != x-; then
-      configure_input="$ac_file.  $configure_input"
-      { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-    fi
-
-    case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin";;
-    esac
-    ;;
-  esac
-
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$ac_file" : 'X\(//\)[^/]' \| \
-        X"$ac_file" : 'X\(//\)$' \| \
-        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  { as_dir="$ac_dir"
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_dir" : 'X\(//\)[^/]' \| \
-        X"$as_dir" : 'X\(//\)$' \| \
-        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-  ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
-
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
-  esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-
-case `sed -n '/datarootdir/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-' $ac_file_inputs` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-  ac_datarootdir_hack='
-  s&@datadir@&$datadir&g
-  s&@docdir@&$docdir&g
-  s&@infodir@&$infodir&g
-  s&@localedir@&$localedir&g
-  s&@mandir@&$mandir&g
-    s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF
-  sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-$ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed 's/|#_!!_#|//g' >$tmp/out
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
-  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
-echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
-
-  rm -f "$tmp/stdin"
-  case $ac_file in
-  -) cat "$tmp/out"; rm -f "$tmp/out";;
-  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
-  esac
- ;;
-  :H)
-  #
-  # CONFIG_HEADER
-  #
-_ACEOF
-
-# Transform confdefs.h into a sed script `conftest.defines', that
-# substitutes the proper values into config.h.in to produce config.h.
-rm -f conftest.defines conftest.tail
-# First, append a space to every undef/define line, to ease matching.
-echo 's/$/ /' >conftest.defines
-# Then, protect against being on the right side of a sed subst, or in
-# an unquoted here document, in config.status.  If some macros were
-# called several times there might be several #defines for the same
-# symbol, which is useless.  But do not sort them, since the last
-# AC_DEFINE must be honored.
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
-# NAME is the cpp macro being defined, VALUE is the value it is being given.
-# PARAMS is the parameter list in the macro definition--in most cases, it's
-# just an empty string.
-ac_dA='s,^\\([  #]*\\)[^        ]*\\([  ]*'
-ac_dB='\\)[     (].*,\\1define\\2'
-ac_dC=' '
-ac_dD=' ,'
-
-uniq confdefs.h |
-  sed -n '
-       t rset
-       :rset
-       s/^[     ]*#[    ]*define[       ][      ]*//
-       t ok
-       d
-       :ok
-       s/[\\&,]/\\&/g
-       s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
-       s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
-  ' >>conftest.defines
-
-# Remove the space that was appended to ease matching.
-# Then replace #undef with comments.  This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-# (The regexp can be short, since the line contains either #define or #undef.)
-echo 's/ $//
-s,^[    #]*u.*,/* & */,' >>conftest.defines
-
-# Break up conftest.defines:
-ac_max_sed_lines=50
-
-# First sed command is:         sed -f defines.sed $ac_file_inputs >"$tmp/out1"
-# Second one is:        sed -f defines.sed "$tmp/out1" >"$tmp/out2"
-# Third one will be:    sed -f defines.sed "$tmp/out2" >"$tmp/out1"
-# et cetera.
-ac_in='$ac_file_inputs'
-ac_out='"$tmp/out1"'
-ac_nxt='"$tmp/out2"'
-
-while :
-do
-  # Write a here document:
-    cat >>$CONFIG_STATUS <<_ACEOF
-    # First, check the format of the line:
-    cat >"\$tmp/defines.sed" <<\\CEOF
-/^[     ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
-/^[     ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
-b
-:def
-_ACEOF
-  sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
-  echo 'CEOF
-    sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
-  ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
-  sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
-  grep . conftest.tail >/dev/null || break
-  rm -f conftest.defines
-  mv conftest.tail conftest.defines
-done
-rm -f conftest.defines conftest.tail
-
-echo "ac_result=$ac_in" >>$CONFIG_STATUS
-cat >>$CONFIG_STATUS <<\_ACEOF
-  if test x"$ac_file" != x-; then
-    echo "/* $configure_input  */" >"$tmp/config.h"
-    cat "$ac_result" >>"$tmp/config.h"
-    if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
-      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      rm -f $ac_file
-      mv "$tmp/config.h" $ac_file
-    fi
-  else
-    echo "/* $configure_input  */"
-    cat "$ac_result"
-  fi
-  rm -f "$tmp/out12"
-# Compute $ac_file's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $ac_file | $ac_file:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
-$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X$ac_file : 'X\(//\)[^/]' \| \
-        X$ac_file : 'X\(//\)$' \| \
-        X$ac_file : 'X\(/\)' \| . 2>/dev/null ||
-echo X$ac_file |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`/stamp-h$_am_stamp_count
- ;;
-
-  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
- ;;
-  esac
-
-
-  case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$mf" : 'X\(//\)[^/]' \| \
-        X"$mf" : 'X\(//\)$' \| \
-        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$mf" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$file" : 'X\(//\)[^/]' \| \
-        X"$file" : 'X\(//\)$' \| \
-        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-    { as_dir=$dirpart/$fdir
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_dir" : 'X\(//\)[^/]' \| \
-        X"$as_dir" : 'X\(//\)$' \| \
-        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
-  done
-done
- ;;
-    "default":C)  ;;
-
-  esac
-done # for ac_tag
-
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  exec 5>>config.log
-  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
-  # would make configure fail if this is the last instruction.
-  $ac_cs_success || { (exit 1); exit 1; }
-fi
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/configure.ac b/src/mm/boehm-gc/libatomic_ops-1.2/configure.ac
deleted file mode 100644 (file)
index 3d0efe7..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-# Process this file with autoconf to produce a configure script.
-AC_INIT([libatomic_ops],[1.2])
-AC_CANONICAL_TARGET([])
-AC_CONFIG_SRCDIR(src/atomic_ops.c)
-AM_INIT_AUTOMAKE
-AC_PROG_RANLIB
-
-AM_CONFIG_HEADER(src/config.h)
-
-# Checks for programs.
-AC_PROG_CC
-AM_PROG_AS
-
-# Checks for functions.
-AC_FUNC_MMAP
-
-# Checks for header files.
-AC_HEADER_STDC
-# AC_CHECK_HEADERS([ ])
-
-# Determine PIC flag, adjust default CFLAGS
-need_asm=false
-PICFLAG=
-AC_MSG_CHECKING(Determining PIC compiler flag)
-if test "$GCC" = yes; then
-  AC_MSG_RESULT(-fPIC)
-  PICFLAG=-fPIC
-else
-  case "$host" in
-    *-*-hpux*)
-      AC_MSG_RESULT("+Z")
-      PICFLAG="+Z"
-      if test "$GCC" != yes; then
-        CFLAGS="$CFLAGS +O2 -mt"
-      fi
-      ;;
-    *-*-solaris*)
-      AC_MSG_RESULT(-Kpic)
-      PICFLAG=-Kpic
-      if test "$GCC" != yes; then
-        CFLAGS="$CFLAGS -O"
-        need_asm=true
-      fi
-      ;;
-    *-*-linux*)
-      AC_MSG_RESULT(-fPIC)
-      PICFLAG=-fPIC
-      # Any Linux compiler had better be gcc compatible.
-      ;;
-    *)
-      AC_MSG_RESULT("<none>")
-      ;;
-  esac
-fi
-CFLAGS="$CFLAGS -DNDEBUG"
-
-AC_SUBST(PICFLAG)
-AC_SUBST(DEFS)
-
-AM_CONDITIONAL(NEED_ASM, test x$need_asm = xtrue)
-
-AC_CONFIG_FILES([Makefile src/Makefile src/atomic_ops/Makefile src/atomic_ops/sysdeps/Makefile doc/Makefile tests/Makefile])
-AC_CONFIG_COMMANDS([default],[[]],[[PICFLAG=${PICFLAG}
-CC=${CC}
-DEFS=${DEFS}]])
-AC_OUTPUT
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/depcomp b/src/mm/boehm-gc/libatomic_ops-1.2/depcomp
deleted file mode 100755 (executable)
index 04701da..0000000
+++ /dev/null
@@ -1,530 +0,0 @@
-#! /bin/sh
-# depcomp - compile a program generating dependencies as side-effects
-
-scriptversion=2005-07-09.11
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
-
-case $1 in
-  '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
-  -h | --h*)
-    cat <<\EOF
-Usage: depcomp [--help] [--version] PROGRAM [ARGS]
-
-Run PROGRAMS ARGS to compile a file, generating dependencies
-as side-effects.
-
-Environment variables:
-  depmode     Dependency tracking mode.
-  source      Source file read by `PROGRAMS ARGS'.
-  object      Object file output by `PROGRAMS ARGS'.
-  DEPDIR      directory where to store dependencies.
-  depfile     Dependency file to output.
-  tmpdepfile  Temporary file to use when outputing dependencies.
-  libtool     Whether libtool is used (yes/no).
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "depcomp $scriptversion"
-    exit $?
-    ;;
-esac
-
-if test -z "$depmode" || test -z "$source" || test -z "$object"; then
-  echo "depcomp: Variables source, object and depmode must be set" 1>&2
-  exit 1
-fi
-
-# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
-depfile=${depfile-`echo "$object" |
-  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
-tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
-
-rm -f "$tmpdepfile"
-
-# Some modes work just like other modes, but use different flags.  We
-# parameterize here, but still list the modes in the big case below,
-# to make depend.m4 easier to write.  Note that we *cannot* use a case
-# here, because this file can only contain one case statement.
-if test "$depmode" = hp; then
-  # HP compiler uses -M and no extra arg.
-  gccflag=-M
-  depmode=gcc
-fi
-
-if test "$depmode" = dashXmstdout; then
-   # This is just like dashmstdout with a different argument.
-   dashmflag=-xM
-   depmode=dashmstdout
-fi
-
-case "$depmode" in
-gcc3)
-## gcc 3 implements dependency tracking that does exactly what
-## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
-## it if -MD -MP comes after the -MF stuff.  Hmm.
-  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  mv "$tmpdepfile" "$depfile"
-  ;;
-
-gcc)
-## There are various ways to get dependency output from gcc.  Here's
-## why we pick this rather obscure method:
-## - Don't want to use -MD because we'd like the dependencies to end
-##   up in a subdir.  Having to rename by hand is ugly.
-##   (We might end up doing this anyway to support other compilers.)
-## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-##   -MM, not -M (despite what the docs say).
-## - Using -M directly means running the compiler twice (even worse
-##   than renaming).
-  if test -z "$gccflag"; then
-    gccflag=-MD,
-  fi
-  "$@" -Wp,"$gccflag$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
-  sed -e 's/^[^:]*: / /' \
-      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
-## The problem is that when a header file which appears in a .P file
-## is deleted, the dependency causes make to die (because there is
-## typically no way to rebuild the header).  We avoid this by adding
-## dummy dependencies for each header file.  Too bad gcc doesn't do
-## this for us directly.
-  tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'.  On the theory
-## that the space means something, we add a space to the output as
-## well.
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-hp)
-  # This case exists only to let depend.m4 do its work.  It works by
-  # looking at the text of this script.  This case will never be run,
-  # since it is checked for above.
-  exit 1
-  ;;
-
-sgi)
-  if test "$libtool" = yes; then
-    "$@" "-Wp,-MDupdate,$tmpdepfile"
-  else
-    "$@" -MDupdate "$tmpdepfile"
-  fi
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-
-  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
-    echo "$object : \\" > "$depfile"
-
-    # Clip off the initial element (the dependent).  Don't try to be
-    # clever and replace this with sed code, as IRIX sed won't handle
-    # lines with more than a fixed number of characters (4096 in
-    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
-    # the IRIX cc adds comments like `#:fec' to the end of the
-    # dependency line.
-    tr ' ' '
-' < "$tmpdepfile" \
-    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> $depfile
-    echo >> $depfile
-
-    # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
-   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> $depfile
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-aix)
-  # The C for AIX Compiler uses -M and outputs the dependencies
-  # in a .u file.  In older versions, this file always lives in the
-  # current directory.  Also, the AIX compiler puts `$object:' at the
-  # start of each line; $object doesn't have directory information.
-  # Version 6 uses the directory in both cases.
-  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
-  tmpdepfile="$stripped.u"
-  if test "$libtool" = yes; then
-    "$@" -Wc,-M
-  else
-    "$@" -M
-  fi
-  stat=$?
-
-  if test -f "$tmpdepfile"; then :
-  else
-    stripped=`echo "$stripped" | sed 's,^.*/,,'`
-    tmpdepfile="$stripped.u"
-  fi
-
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-
-  if test -f "$tmpdepfile"; then
-    outname="$stripped.o"
-    # Each line is of the form `foo.o: dependent.h'.
-    # Do two passes, one to just change these to
-    # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
-    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-icc)
-  # Intel's C compiler understands `-MD -MF file'.  However on
-  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
-  # ICC 7.0 will fill foo.d with something like
-  #    foo.o: sub/foo.c
-  #    foo.o: sub/foo.h
-  # which is wrong.  We want:
-  #    sub/foo.o: sub/foo.c
-  #    sub/foo.o: sub/foo.h
-  #    sub/foo.c:
-  #    sub/foo.h:
-  # ICC 7.1 will output
-  #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using \ :
-  #    foo.o: sub/foo.c ... \
-  #     sub/foo.h ... \
-  #     ...
-
-  "$@" -MD -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-  # Each line is of the form `foo.o: dependent.h',
-  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
-  # Do two passes, one to just change these to
-  # `$object: dependent.h' and one to simply `dependent.h:'.
-  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
-  # Some versions of the HPUX 10.20 sed can't process this invocation
-  # correctly.  Breaking it into two sed invocations is a workaround.
-  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
-    sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-tru64)
-   # The Tru64 compiler uses -MD to generate dependencies as a side
-   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
-   # dependencies in `foo.d' instead, so we check for that too.
-   # Subdirectories are respected.
-   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-   test "x$dir" = "x$object" && dir=
-   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
-   if test "$libtool" = yes; then
-      # With Tru64 cc, shared objects can also be used to make a
-      # static library.  This mecanism is used in libtool 1.4 series to
-      # handle both shared and static libraries in a single compilation.
-      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
-      #
-      # With libtool 1.5 this exception was removed, and libtool now
-      # generates 2 separate objects for the 2 libraries.  These two
-      # compilations output dependencies in in $dir.libs/$base.o.d and
-      # in $dir$base.o.d.  We have to check for both files, because
-      # one of the two compilations can be disabled.  We should prefer
-      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
-      # automatically cleaned when .libs/ is deleted, while ignoring
-      # the former would cause a distcleancheck panic.
-      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
-      tmpdepfile2=$dir$base.o.d          # libtool 1.5
-      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
-      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
-      "$@" -Wc,-MD
-   else
-      tmpdepfile1=$dir$base.o.d
-      tmpdepfile2=$dir$base.d
-      tmpdepfile3=$dir$base.d
-      tmpdepfile4=$dir$base.d
-      "$@" -MD
-   fi
-
-   stat=$?
-   if test $stat -eq 0; then :
-   else
-      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-      exit $stat
-   fi
-
-   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-   do
-     test -f "$tmpdepfile" && break
-   done
-   if test -f "$tmpdepfile"; then
-      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a tab and a space in the [].
-      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-   else
-      echo "#dummy" > "$depfile"
-   fi
-   rm -f "$tmpdepfile"
-   ;;
-
-#nosideeffect)
-  # This comment above is used by automake to tell side-effect
-  # dependency tracking mechanisms from slower ones.
-
-dashmstdout)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout, regardless of -o.
-  "$@" || exit $?
-
-  # Remove the call to Libtool.
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-
-  # Remove `-o $object'.
-  IFS=" "
-  for arg
-  do
-    case $arg in
-    -o)
-      shift
-      ;;
-    $object)
-      shift
-      ;;
-    *)
-      set fnord "$@" "$arg"
-      shift # fnord
-      shift # $arg
-      ;;
-    esac
-  done
-
-  test -z "$dashmflag" && dashmflag=-M
-  # Require at least two characters before searching for `:'
-  # in the target name.  This is to cope with DOS-style filenames:
-  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
-  "$@" $dashmflag |
-    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
-  rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-dashXmstdout)
-  # This case only exists to satisfy depend.m4.  It is never actually
-  # run, as this mode is specially recognized in the preamble.
-  exit 1
-  ;;
-
-makedepend)
-  "$@" || exit $?
-  # Remove any Libtool call
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-  # X makedepend
-  shift
-  cleared=no
-  for arg in "$@"; do
-    case $cleared in
-    no)
-      set ""; shift
-      cleared=yes ;;
-    esac
-    case "$arg" in
-    -D*|-I*)
-      set fnord "$@" "$arg"; shift ;;
-    # Strip any option that makedepend may not understand.  Remove
-    # the object too, otherwise makedepend will parse it as a source file.
-    -*|$object)
-      ;;
-    *)
-      set fnord "$@" "$arg"; shift ;;
-    esac
-  done
-  obj_suffix="`echo $object | sed 's/^.*\././'`"
-  touch "$tmpdepfile"
-  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
-  rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile" "$tmpdepfile".bak
-  ;;
-
-cpp)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout.
-  "$@" || exit $?
-
-  # Remove the call to Libtool.
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-
-  # Remove `-o $object'.
-  IFS=" "
-  for arg
-  do
-    case $arg in
-    -o)
-      shift
-      ;;
-    $object)
-      shift
-      ;;
-    *)
-      set fnord "$@" "$arg"
-      shift # fnord
-      shift # $arg
-      ;;
-    esac
-  done
-
-  "$@" -E |
-    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
-    sed '$ s: \\$::' > "$tmpdepfile"
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  cat < "$tmpdepfile" >> "$depfile"
-  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-msvisualcpp)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
-  "$@" || exit $?
-  IFS=" "
-  for arg
-  do
-    case "$arg" in
-    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
-       set fnord "$@"
-       shift
-       shift
-       ;;
-    *)
-       set fnord "$@" "$arg"
-       shift
-       shift
-       ;;
-    esac
-  done
-  "$@" -E |
-  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
-  echo "       " >> "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-none)
-  exec "$@"
-  ;;
-
-*)
-  echo "Unknown depmode $depmode" 1>&2
-  exit 1
-  ;;
-esac
-
-exit 0
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/doc/COPYING b/src/mm/boehm-gc/libatomic_ops-1.2/doc/COPYING
deleted file mode 100644 (file)
index d60c31a..0000000
+++ /dev/null
@@ -1,340 +0,0 @@
-                   GNU GENERAL PUBLIC LICENSE
-                      Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                           Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-\f
-                   GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-\f
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-\f
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-\f
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-                           NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-                    END OF TERMS AND CONDITIONS
-\f
-           How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year  name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/doc/LICENSING.txt b/src/mm/boehm-gc/libatomic_ops-1.2/doc/LICENSING.txt
deleted file mode 100644 (file)
index 1ae0e93..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-Our intent is to make it easy to use libatomic_ops, in
-both free and proprietary software.  Hence most code that we expect to be
-linked into a client application is covered by an MIT-style license.
-
-A few library routines are covered by the GNU General Public License.
-These are put into a separate library, libatomic_ops_gpl.a .
-
-The low-level part of the library is mostly covered by the following
-license:
-
-----------------------------------------
-
-Copyright (c) ...
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE. 
-
---------------------------------
-
-A few files in the sysdeps directory were inherited in part from the
-Boehm-Demers-Weiser conservative garbage collector, and are covered by
-its license, which is similar in spirit:
-
---------------------------------
-
-Copyright (c) ...
-
-THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
-OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
-
-Permission is hereby granted to use or copy this program
-for any purpose,  provided the above notices are retained on all copies.
-Permission to modify the code and to distribute modified code is granted,
-provided the above notices are retained, and a notice that the code was
-modified is included with the above copyright notice.
-
-----------------------------------
-
-A few files are covered by the GNU General Public License.  (See file
-"COPYING".) This applies only to test code, sample applications,
-and the libatomic_ops_gpl portion of the library.
-Thus libatomic_ops_gpl should generally not be linked into proprietary code.
-(This distinction was motivated by patent considerations.)
-
-It is possible that the license of the GPL pieces may be changed for
-future versions to make them more consistent with the rest of the package.
-If you submit patches, and have strong preferences about licensing, please
-express them.
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/doc/Makefile.am b/src/mm/boehm-gc/libatomic_ops-1.2/doc/Makefile.am
deleted file mode 100644 (file)
index ce212d0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# installed documentation
-#
-dist_pkgdata_DATA=COPYING LICENSING.txt README.txt COPYING README_stack.txt README_malloc.txt README_win32.txt
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/doc/Makefile.in b/src/mm/boehm-gc/libatomic_ops-1.2/doc/Makefile.in
deleted file mode 100644 (file)
index c2166a4..0000000
+++ /dev/null
@@ -1,335 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = doc
-DIST_COMMON = $(dist_pkgdata_DATA) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in COPYING
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-       $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/src/config.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(pkgdatadir)"
-dist_pkgdataDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(dist_pkgdata_DATA)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCAS = @CCAS@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GREP = @GREP@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-NEED_ASM_FALSE = @NEED_ASM_FALSE@
-NEED_ASM_TRUE = @NEED_ASM_TRUE@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PICFLAG = @PICFLAG@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-ac_ct_CC = @ac_ct_CC@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-
-# installed documentation
-#
-dist_pkgdata_DATA = COPYING LICENSING.txt README.txt COPYING README_stack.txt README_malloc.txt README_win32.txt
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-       @for dep in $?; do \
-         case '$(am__configure_deps)' in \
-           *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
-             exit 1;; \
-         esac; \
-       done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  doc/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  doc/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-       @case '$?' in \
-         *config.status*) \
-           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-         *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-       esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-uninstall-info-am:
-install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)"
-       @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(dist_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
-         $(dist_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
-       done
-
-uninstall-dist_pkgdataDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
-         rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
-       done
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
-         if test -d $$d/$$file; then \
-           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-           fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-         else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
-           || exit 1; \
-         fi; \
-       done
-check-am: all-am
-check: check-am
-all-am: Makefile $(DATA)
-installdirs:
-       for dir in "$(DESTDIR)$(pkgdatadir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
-       done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-am
-       -rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am: install-dist_pkgdataDATA
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-       -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-dist_pkgdataDATA uninstall-info-am
-
-.PHONY: all all-am check check-am clean clean-generic distclean \
-       distclean-generic distdir dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am \
-       install-dist_pkgdataDATA install-exec install-exec-am \
-       install-info install-info-am install-man install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
-       pdf-am ps ps-am uninstall uninstall-am \
-       uninstall-dist_pkgdataDATA uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/doc/README.txt b/src/mm/boehm-gc/libatomic_ops-1.2/doc/README.txt
deleted file mode 100644 (file)
index 29c8597..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-Usage:
-
-0) If possible, do this on a multiprocessor, especially if you are planning
-on modifying or enhancing the package.  It will work on a uniprocessor,
-but the tests are much more likely to pass in the presence of serious problems.
-
-1) Type ./configure --prefix=<install dir>; make; make check
-in the directory containing unpacked source.  The usual GNU build machinery
-is used, except that only static, but position-independent, libraries
-are normally built.  On Windows, read README_win32.txt instead.
-
-2) Applications should include atomic_ops.h.  Nearly all operations
-are implemented by header files included from it.  It is sometimes
-necessary, and always recommended to also link against libatomic_ops.a.
-To use the almost non-blocking stack or malloc implementations,
-see the corresponding README files, and also link against libatomic_gpl.a
-before linking against libatomic_ops.a.
-
-OVERVIEW:
-Atomic_ops.h defines a large collection of operations, each one of which is
-a combination of an (optional) atomic memory operation, and a memory barrier.
-Also defines associated feature-test macros to determine whether a particular
-operation is available on the current target hardware (either directly or
-by synthesis).  This is an attempt to replace various existing files with
-similar goals, since they usually do not handle differences in memory
-barrier styles with sufficient generality.
-
-If this is included after defining AO_REQUIRE_CAS, then the package
-will make an attempt to emulate compare-and-swap in a way that (at least
-on Linux) should still be async-signal-safe.  As a result, most other
-atomic operations will then be defined using the compare-and-swap
-emulation.  This emulation is slow, since it needs to disable signals.
-And it needs to block in case of contention.  If you care about performance
-on a platform that can't directly provide compare-and-swap, there are
-probably better alternatives.  But this allows easy ports to some such
-platforms (e.g. PA_RISC).  The option is ignored if compare-and-swap
-can be implemented directly.
-
-If atomic_ops.h is included after defining AO_USE_PTHREAD_DEFS, then all
-atomic operations will be emulated with pthread locking.  This is NOT
-async-signal-safe.  And it is slow.  It is intended primarily for debugging
-of the atomic_ops package itself.
-
-Note that the implementation reflects our understanding of real processor
-behavior.  This occasionally diverges from the documented behavior.  (E.g.
-the documented X86 behavior seems to be weak enough that it is impractical
-to use.  Current real implementations appear to be much better behaved.)
-We of course are in no position to guarantee that future processors
-(even HPs) will continue to behave this way, though we hope they will.
-
-This is a work in progress.  Corrections/additions for other platforms are
-greatly appreciated.  It passes rudimentary tests on X86, Itanium, and
-Alpha.
-
-OPERATIONS:
-
-Most operations operate on values of type AO_t, which are unsigned integers
-whose size matches that of pointers on the given architecture.  Exceptions
-are:
-
-- AO_test_and_set operates on AO_TS_t, which is whatever size the hardware
-supports with good performance.  In some cases this is the length of a cache
-line.  In some cases it is a byte.  In many cases it is equivalent to AO_t.
-
-- A few operations are implemented on smaller or larger size integers.
-Such operations are indicated by the appropriate prefix:
-
-AO_char_... Operates on unsigned char values.
-AO_short_... Operates on unsigned short values.
-AO_int_... Operates on unsigned int values.
-
-(Currently a very limited selection of these is implemented.  We're
-working on it.)
-
-The defined operations are all of the form AO_[<size>_]<op><barrier>(<args>).
-
-The <op> component specifies an atomic memory operation.  It may be
-one of the following, where the corresponding argument and result types
-are also specified:
-
-void nop()
-       No atomic operation.  The barrier may still be useful.
-AO_t load(const volatile AO_t * addr)
-       Atomic load of *addr.
-void store(volatile AO_t * addr, AO_t new_val)
-       Atomically store new_val to *addr.
-AO_t fetch_and_add(volatile AO_t *addr, AO_t incr)
-       Atomically add incr to *addr, and return the original value of *addr.
-AO_t fetch_and_add1(volatile AO_t *addr)
-       Equivalent to AO_fetch_and_add(addr, 1).
-AO_t fetch_and_sub1(volatile AO_t *addr)
-       Equivalent to AO_fetch_and_add(addr, (AO_t)(-1)).
-void or(volatile AO_t *addr, AO_t incr)
-       Atomically or incr into *addr.
-int compare_and_swap(volatile AO_t * addr, AO_t old_val, AO_t new_val)
-       Atomically compare *addr to old_val, and replace *addr by new_val
-       if the first comparison succeeds.  Returns nonzero if the comparison
-       succeeded and *addr was updated.
-AO_TS_VAL_t test_and_set(volatile AO_TS_t * addr)
-       Atomically read the binary value at *addr, and set it.  AO_TS_VAL_t
-       is an enumeration type which includes the two values AO_TS_SET and
-       and AO_TS_CLEAR.  An AO_TS_t location is capable of holding an
-       AO_TS_VAL_t, but may be much larger, as dictated by hardware
-       constraints.  Test_and_set logically sets the value to AO_TS_SET.
-       It may be reset to AO_TS_CLEAR with the AO_CLEAR(AO_TS_t *) macro.
-       AO_TS_t locations should be initialized to AO_TS_INITIALIZER.
-       The values of AO_TS_SET and AO_TS_CLEAR are hardware dependent.
-       (On PA-RISC, AO_TS_SET is zero!)
-
-Test_and_set is a more limited version of compare_and_swap.  Its only
-advantage is that it is more easily implementable on some hardware.  It
-should thus be used if only binary test-and-set functionality is needed.
-
-If available, we also provide compare_and_swap operations that operate
-on wider values.  Since standard data types for double width values
-may not be available, these explicitly take pairs of arguments for the
-new and/or old value.  Unfortunately, there are two common variants,
-neither of which can easily and efficiently emulate the other.
-The first performs a comparison against the entire value being replaced,
-where the second replaces a double-width replacement, but performs
-a single-width comparison:
-
-int compare_double_and_swap_double(volatile AO_double_t * addr,
-                                  AO_t old_val1, AO_t old_val2,
-                                  AO_t new_val1, AO_t new_val2);
-
-int compare_and_swap_double(volatile AO_double_t * addr,
-                           AO_t old_val1,
-                           AO_t new_val1, AO_t new_val2);
-
-where AO_double_t is a structure containing AO_val1 and AO_val2 fields,
-both of type AO_t.  For compare_and_swap_double, we compare against
-the val1 field.  AO_double_t exists only if AO_HAVE_double_t
-is defined.
-
-ORDERING CONSTRAINTS:
-
-Each operation name also includes a suffix that specifies the associated
-ordering semantics.  The ordering constraint limits reordering of this
-operation with repsect to other atomic operations and ordinary memory
-references.  The current implementation assumes that all memory references
-are to ordinary cacheable memory; the ordering guarantee is with respect
-to other threads or processes, not I/O devices.  (Whether or not this
-distinction is important is platform-dependent.)
-
-Ordering suffixes are one of the following:
-
-<none>: No memory barrier.  A plain AO_nop() really does nothing.
-_release: Earlier operations must become visible to other threads
-         before the atomic operation.
-_acquire: Later operations must become visible after this operation.
-_read: Subsequent reads must become visible after reads included in
-       the atomic operation or preceding it.  Rarely useful for clients?
-_write: Earlier writes become visible before writes during or after
-        the atomic operation.  Rarely useful for clients?
-_full: Ordered with respect to both earlier and later memops.
-       AO_store_full or AO_nop_full are the normal ways to force a store
-       to be ordered with respect to a later load.
-_release_write: Ordered with respect to earlier writes.  This is
-               normally implemented as either a _write or _release
-               barrier.
-_dd_acquire_read: Ordered with respect to later reads that are data
-              dependent on this one.  This is needed on
-              a pointer read, which is later dereferenced to read a
-              second value, with the expectation that the second
-              read is ordered after the first one.  On most architectures,
-              this is equivalent to no barrier.  (This is very
-              hard to define precisely.  It should probably be avoided.
-              A major problem is that optimizers tend to try to
-              eliminate dependencies from the generated code, since
-              dependencies force the hardware to execute the code
-              serially.)
-_release_read: Ordered with respect to earlier reads.  Useful for
-              implementing read locks.  Can be implemented as _release,
-              but not as _read, since _read groups the current operation
-              with the earlier ones.
-
-We assume that if a store is data-dependent on an a previous load, then
-the two are always implicitly ordered.
-
-It is possible to test whether AO_<op><barrier> is available on the
-current platform by checking whether AO_HAVE_<op>_<barrier> is defined
-as a macro.
-
-Note that we generally don't implement operations that are either
-meaningless (e.g. AO_nop_acquire, AO_nop_release) or which appear to
-have no clear use (e.g. AO_load_release, AO_store_acquire, AO_load_write,
-AO_store_read).  On some platforms (e.g. PA-RISC) many operations
-will remain undefined unless AO_REQUIRE_CAS is defined before including
-the package.
-
-When typed in the package build directory, the following command
-will print operations that are unimplemented on the platform:
-
-make test_atomic; ./test_atomic
-
-The following command generates a file "list_atomic.i" containing the
-macro expansions of all implemented operations on the platform:
-
-make list_atomic.i
-
-Future directions:
-
-It currently appears that something roughly analogous to this is very likely
-to become part of the C++0x standard.  That effort has pointed out a number
-of issues that we expect to address there.  Since some of the solutions
-really require compiler support, they may not be completely addressed here.
-
-Known issues include:
-
-We should be more precise in defining the semantics of the ordering
-constraints, and if and how we can guarantee sequential consistency.
-
-Dd_acquire_read is very hard or impossible to define in a way that cannot
-be invalidated by reasonably standard compiler transformations.
-
-There is probably no good reason to provide operations on standard
-integer types, since those may have the wrong alignment constraints.
-
-
-Example:
-
-If you want to initialize an object, and then "publish" a pointer to it
-in a global location p, such that other threads reading the new value of
-p are guaranteed to see an initialized object, it suffices to use
-AO_release_write(p, ...) to write the pointer to the object, and to
-retrieve it in other threads with AO_acquire_read(p).
-
-Platform notes:
-
-All X86: We quietly assume 486 or better.
-
-Microsoft compilers:
-Define AO_ASSUME_WINDOWS98 to get access to hardware compare-and-swap
-functionality.  This relies on the InterlockedCompareExchange() function
-which was apparently not supported in Windows95.  (There may be a better
-way to get access to this.)
-
-Gcc on x86:
-Define AO_USE_PENTIUM4_INSTRS to use the Pentium 4 mfence instruction.
-Currently this is appears to be of marginal benefit.
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/doc/README_malloc.txt b/src/mm/boehm-gc/libatomic_ops-1.2/doc/README_malloc.txt
deleted file mode 100644 (file)
index 680b3e2..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-The libatomic_ops_gpl includes a simple almost-lock-free malloc implementation.
-
-This is intended as a safe way to allocate memory from a signal handler,
-or to allocate memory in the context of a library that does not know what
-thread library it will be used with.  In either case locking is impossible.
-
-Note that the operations are only guaranteed to be 1-lock-free, i.e. a
-single blocked thread will not prevent progress, but multiple blocked
-threads may.  To safely use these operations in a signal handler,
-the handler should be non-reentrant, i.e. it should not be interruptable
-by another handler using these operations.  Furthermore use outside
-of signal handlers in a multithreaded application should be protected
-by a lock, so that at most one invocation may be interrupted by a signal.
-The header will define the macro "AO_MALLOC_IS_LOCK_FREE" on platforms
-on which malloc is completely lock-free, and hence these restrictions
-do not apply.
-
-In the presence of threads, but absence of contention, the time performance
-of this package should be as good, or slightly better than, most system
-malloc implementations.  Its space performance
-is theoretically optimal (to within a constant factor), but probably
-quite poor in practice.  In particular, no attempt is made to
-coalesce free small memory blocks.  Something like Doug Lea's malloc is
-likely to use significantly less memory for complex applications.
-
-Perfomance on platforms without an efficient compare-and-swap implementation
-will be poor.
-
-This package was not designed for processor-scalability in the face of
-high allocation rates.  If all threads happen to allocate different-sized
-objects, you might get lucky.  Otherwise expect contention and false-sharing
-problems.  If this is an issue, something like Maged Michael's algorithm
-(PLDI 2004) would be technically a far better choice.  If you are concerned
-only with scalablity, and not signal-safety, you might also consider
-using Hoard instead.  We have seen a factor of 3 to 4 slowdown from the
-standard glibc malloc implementation with contention, even when the
-performance without contention was faster.  (To make the implementation
-more scalable, one would need to replicate at least the free list headers,
-so that concurrent access is possible without cache conflicts.)
-
-Unfortunately there is no portable async-signal-safe way to obtain large
-chunks of memory from the OS.  Based on reading of the source code,
-mmap-based allocation appears safe under Linux, and probably BSD variants.
-It is probably unsafe for operating systems built on Mach, such as
-Apple's Darwin.  Without use of mmap, the allocator is
-limited to a fixed size, statically preallocated heap (2MB by default),
-and will fail to allocate objects above a certain size (just under 64K
-by default).  Use of mmap to circumvent these limitations requires an
-explicit call.
-
-The entire interface to the AO_malloc package currently consists of:
-
-#include <atomic_ops_malloc.h> /* includes atomic_ops.h */
-
-void *AO_malloc(size_t sz);
-void AO_free(void *p);
-void AO_malloc_enable_mmap(void);
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/doc/README_stack.txt b/src/mm/boehm-gc/libatomic_ops-1.2/doc/README_stack.txt
deleted file mode 100644 (file)
index 98ff87c..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-Note that the AO_stack implementation is licensed under the GPL,
-unlike the lower level routines.
-
-The header file atomic_ops_stack.h defines a linked stack abstraction.
-Stacks may be accessed by multiple concurrent threads.  The implementation
-is 1-lock-free, i.e. it will continue to make progress if at most one
-thread becomes inactive while operating on the data structure.
-
-(The implementation can be built to be N-lock-free for any given N.  But that
-seems to rarely be useful, especially since larger N involve some slowdown.)
-
-This makes it safe to access these data structures from non-reentrant
-signal handlers, provided at most one non-signal-handler thread is
-accessing the data structure at once.  This latter condition can be
-ensured by acquiring an ordinary lock around the non-hndler accesses
-to the data structure.
-
-For details see:
-
-Hans-J. Boehm, "An Almost Non-Blocking Stack", PODC 2004,
-http://portal.acm.org/citation.cfm?doid=1011767.1011774, or
-http://www.hpl.hp.com/techreports/2004/HPL-2004-105.html
-(This is not exactly the implementation described there, since the
-interface was cleaned up in the interim.  But it should perform
-very similarly.)
-
-We use a fully lock-free implementation when the underlying hardware
-makes that less expensive, i.e. when we have a double-wide compare-and-swap
-operation available.  (The fully lock-free implementation uses an AO_t-
-sized version count, and assumes it does not wrap during the time any
-given operation is active.  This seems reasonably safe on 32-bit hardware,
-and very safe on 64-bit hardware.) If a fully lock-free implementation
-is used, the macro AO_STACK_IS_LOCK_FREE will be defined.
-
-The implementation is interesting only because it allows reuse of
-existing nodes.  This is necessary, for example, to implement a memory
-allocator.
-
-Since we want to leave the precise stack node type up to the client,
-we insist only that each stack node contains a link field of type AO_t.
-When a new node is pushed on the stack, the push operation expects to be
-passed the pointer to this link field, which will then be overwritten by
-this link field.  Similarly, the pop operation returns a pointer to the
-link field of the object that previously was on the top of the stack.
-
-The cleanest way to use these routines is probably to define the stack node
-type with an initial AO_t link field, so that the conversion between the
-link-field pointer and the stack element pointer is just a compile-time
-cast.  But other possibilities exist.  (This would be cleaner in C++ with
-templates.)
-
-A stack is represented by an AO_stack_t structure.  (This is normally
-2 or 3 times the size of a pointer.)  It may be statically initialized
-by setting it to AO_STACK_INITIALIZER, or dynamically initialized to
-an empty stack with AO_stack_init.  There are only three operations for
-accessing stacks:
-
-void AO_stack_init(AO_stack_t *list);
-void AO_stack_push_release(AO_stack_t *list, AO_t *new_element);
-AO_t * AO_stack_pop_acquire(volatile AO_stack_t *list);
-
-We require that the objects pushed as list elements remain addressable
-as long as any push or pop operation are in progress.  (It is OK for an object
-to be "pop"ped off a stack and "deallocated" with a concurrent "pop" on
-the same stack still in progress, but only if "deallocation" leaves the
-object addressable.  The second "pop" may still read the object, but
-the value it reads will not matter.)
-
-We require that the headers (AO_stack objects) remain allocated and
-valid as long as any operations on them are still in-flight.
-
-We also provide macros AO_REAL_HEAD_PTR that converts an AO_stack_t
-to a pointer to the link field in the next element, and AO_REAL_NEXT_PTR
-that converts a link field to a real, dereferencable, pointer to the link field
-in the next element.  This is intended only for debugging, or to traverse
-the list after modification has ceased.  There is otherwise no guarantee that
-walking a stack using this macro will produce any kind of consistent
-picture of the data structure.
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/doc/README_win32.txt b/src/mm/boehm-gc/libatomic_ops-1.2/doc/README_win32.txt
deleted file mode 100644 (file)
index 0fe6f88..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-Most of the atomic_ops functionality is available under Win32 with
-the Microsoft tools, but the build process currently is considerably more
-primitive than on Linux/Unix platforms.
-
-To build:
-
-1) Go to the src directory in the distribution.
-2) Make sure the Microsoft command-line tools (e.g. nmake) are available.
-3) Run "nmake -f Makefile.msft".  This should run some tests, which
-may print warnings about the types of the "Interlocked" functions.
-I haven't been able to make all versions of VC++ happy.  If you know
-how to, please send a patch.
-4) To compile applications, you will need to retain or copy the following
-pieces from the resulting src directory contents:
-       "atomic_ops.h" - Header file defining low-level primitives.  This
-                        includes files from:
-       "atomic_ops"- Subdirectory containing implementation header files.
-       "atomic_ops_stack.h" - Header file describing almost lock-free stack.
-       "atomic_ops_malloc.h" - Header file describing almost lock-free malloc.
-       "libatomic_ops_gpl.lib" - Library containing implementation of the
-                                 above two.  The atomic_ops.h implementation
-                                 is entirely in the header files in Win32.
-
-Most clients of atomic_ops.h will need to define AO_ASSUME_WINDOWS98 before
-including it.  Compare_and_swap is otherwise not available.
-
-Note that the library is covered by the GNU General Public License, while
-the top 2 of these pieces allow use in proprietary code.
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/install-sh b/src/mm/boehm-gc/libatomic_ops-1.2/install-sh
deleted file mode 100755 (executable)
index 4d4a951..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2005-05-14.22
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-chmodcmd="$chmodprog 0755"
-chowncmd=
-chgrpcmd=
-stripcmd=
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=
-dst=
-dir_arg=
-dstarg=
-no_target_directory=
-
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
-   or: $0 [OPTION]... SRCFILES... DIRECTORY
-   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
-   or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
--c         (ignored)
--d         create directories instead of installing files.
--g GROUP   $chgrpprog installed files to GROUP.
--m MODE    $chmodprog installed files to MODE.
--o USER    $chownprog installed files to USER.
--s         $stripprog installed files.
--t DIRECTORY  install into DIRECTORY.
--T         report an error if DSTFILE is a directory.
---help     display this help and exit.
---version  display version info and exit.
-
-Environment variables override the default commands:
-  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
-"
-
-while test -n "$1"; do
-  case $1 in
-    -c) shift
-        continue;;
-
-    -d) dir_arg=true
-        shift
-        continue;;
-
-    -g) chgrpcmd="$chgrpprog $2"
-        shift
-        shift
-        continue;;
-
-    --help) echo "$usage"; exit $?;;
-
-    -m) chmodcmd="$chmodprog $2"
-        shift
-        shift
-        continue;;
-
-    -o) chowncmd="$chownprog $2"
-        shift
-        shift
-        continue;;
-
-    -s) stripcmd=$stripprog
-        shift
-        continue;;
-
-    -t) dstarg=$2
-       shift
-       shift
-       continue;;
-
-    -T) no_target_directory=true
-       shift
-       continue;;
-
-    --version) echo "$0 $scriptversion"; exit $?;;
-
-    *)  # When -d is used, all remaining arguments are directories to create.
-       # When -t is used, the destination is already specified.
-       test -n "$dir_arg$dstarg" && break
-        # Otherwise, the last argument is the destination.  Remove it from $@.
-       for arg
-       do
-          if test -n "$dstarg"; then
-           # $@ is not empty: it contains at least $arg.
-           set fnord "$@" "$dstarg"
-           shift # fnord
-         fi
-         shift # arg
-         dstarg=$arg
-       done
-       break;;
-  esac
-done
-
-if test -z "$1"; then
-  if test -z "$dir_arg"; then
-    echo "$0: no input file specified." >&2
-    exit 1
-  fi
-  # It's OK to call `install-sh -d' without argument.
-  # This can happen when creating conditional directories.
-  exit 0
-fi
-
-for src
-do
-  # Protect names starting with `-'.
-  case $src in
-    -*) src=./$src ;;
-  esac
-
-  if test -n "$dir_arg"; then
-    dst=$src
-    src=
-
-    if test -d "$dst"; then
-      mkdircmd=:
-      chmodcmd=
-    else
-      mkdircmd=$mkdirprog
-    fi
-  else
-    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
-    # might cause directories to be created, which would be especially bad
-    # if $src (and thus $dsttmp) contains '*'.
-    if test ! -f "$src" && test ! -d "$src"; then
-      echo "$0: $src does not exist." >&2
-      exit 1
-    fi
-
-    if test -z "$dstarg"; then
-      echo "$0: no destination specified." >&2
-      exit 1
-    fi
-
-    dst=$dstarg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst ;;
-    esac
-
-    # If destination is a directory, append the input filename; won't work
-    # if double slashes aren't ignored.
-    if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-       echo "$0: $dstarg: Is a directory" >&2
-       exit 1
-      fi
-      dst=$dst/`basename "$src"`
-    fi
-  fi
-
-  # This sed command emulates the dirname command.
-  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
-
-  # Make sure that the destination directory exists.
-
-  # Skip lots of stat calls in the usual case.
-  if test ! -d "$dstdir"; then
-    defaultIFS='
-        '
-    IFS="${IFS-$defaultIFS}"
-
-    oIFS=$IFS
-    # Some sh's can't handle IFS=/ for some reason.
-    IFS='%'
-    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-    shift
-    IFS=$oIFS
-
-    pathcomp=
-
-    while test $# -ne 0 ; do
-      pathcomp=$pathcomp$1
-      shift
-      if test ! -d "$pathcomp"; then
-        $mkdirprog "$pathcomp"
-       # mkdir can fail with a `File exist' error in case several
-       # install-sh are creating the directory concurrently.  This
-       # is OK.
-       test -d "$pathcomp" || exit
-      fi
-      pathcomp=$pathcomp/
-    done
-  fi
-
-  if test -n "$dir_arg"; then
-    $doit $mkdircmd "$dst" \
-      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
-  else
-    dstfile=`basename "$dst"`
-
-    # Make a couple of temp file names in the proper directory.
-    dsttmp=$dstdir/_inst.$$_
-    rmtmp=$dstdir/_rm.$$_
-
-    # Trap to clean up those temp files at exit.
-    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-    trap '(exit $?); exit' 1 2 13 15
-
-    # Copy the file name to the temp name.
-    $doit $cpprog "$src" "$dsttmp" &&
-
-    # and set any options; do chmod last to preserve setuid bits.
-    #
-    # If any of these fail, we abort the whole thing.  If we want to
-    # ignore errors from any of these, just make sure not to ignore
-    # errors from the above "$doit $cpprog $src $dsttmp" command.
-    #
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
-
-    # Now rename the file to the real destination.
-    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
-      || {
-          # The rename failed, perhaps because mv can't rename something else
-          # to itself, or perhaps because mv is so ancient that it does not
-          # support -f.
-
-          # Now remove or move aside any old file at destination location.
-          # We try this two ways since rm can't unlink itself on some
-          # systems and the destination file might be busy for other
-          # reasons.  In this case, the final cleanup might fail but the new
-          # file should still install successfully.
-          {
-            if test -f "$dstdir/$dstfile"; then
-              $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
-              || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
-              || {
-                echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
-                (exit 1); exit 1
-              }
-            else
-              :
-            fi
-          } &&
-
-          # Now rename the file to the real destination.
-          $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
-        }
-    }
-  fi || { (exit 1); exit 1; }
-done
-
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
-  (exit 0); exit 0
-}
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/missing b/src/mm/boehm-gc/libatomic_ops-1.2/missing
deleted file mode 100755 (executable)
index 894e786..0000000
+++ /dev/null
@@ -1,360 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2005-06-08.21
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
-#   Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
-  exit 1
-fi
-
-run=:
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
-
-msg="missing on your system"
-
-case "$1" in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  # Exit code 63 means version mismatch.  This often happens
-  # when the user try to use an ancient version of a tool on
-  # a file that requires a minimum version.  In this case we
-  # we should proceed has if the program had been absent, or
-  # if --run hadn't been passed.
-  if test $? = 63; then
-    run=:
-    msg="probably too old"
-  fi
-  ;;
-
-  -h|--h|--he|--hel|--help)
-    echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
-  -h, --help      display this help and exit
-  -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
-
-Send bug reports to <bug-automake@gnu.org>."
-    exit $?
-    ;;
-
-  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing $scriptversion (GNU Automake)"
-    exit $?
-    ;;
-
-  -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
-    exit 1
-    ;;
-
-esac
-
-# Now exit if we have it, but it failed.  Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).
-case "$1" in
-  lex|yacc)
-    # Not GNU programs, they don't have --version.
-    ;;
-
-  tar)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
-  *)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       # Could not run --version or --help.  This is probably someone
-       # running `$TOOL --version' or `$TOOL --help' to check whether
-       # $TOOL exists and not knowing $TOOL uses missing.
-       exit 1
-    fi
-    ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-  aclocal*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case "$f" in
-      *:*) touch_files="$touch_files "`echo "$f" |
-                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-          sed 's/\.am$/.in/' |
-          while read f; do touch "$f"; done
-    ;;
-
-  autom4te)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.
-         You can get \`$1' as part of \`Autoconf' from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
-    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
-    if test -f "$file"; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo "#! /bin/sh"
-       echo "# Created by GNU Automake missing as a replacement of"
-       echo "#  $ $@"
-       echo "exit 0"
-       chmod +x $file
-       exit 1
-    fi
-    ;;
-
-  bison|yacc)
-    echo 1>&2 "\
-WARNING: \`$1' $msg.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
-         in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-       case "$LASTARG" in
-       *.y)
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" y.tab.c
-           fi
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" y.tab.h
-           fi
-         ;;
-       esac
-    fi
-    if [ ! -f y.tab.h ]; then
-       echo >y.tab.h
-    fi
-    if [ ! -f y.tab.c ]; then
-       echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex|flex)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
-         in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
-    rm -f lex.yy.c
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-       case "$LASTARG" in
-       *.l)
-           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" lex.yy.c
-           fi
-         ;;
-       esac
-    fi
-    if [ ! -f lex.yy.c ]; then
-       echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-        you modified a dependency of a manual page.  You may need the
-        \`Help2man' package in order for those modifications to take
-        effect.  You can get \`Help2man' from any GNU archive site."
-
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-       file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
-    fi
-    if [ -f "$file" ]; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo ".ab help2man is required to generate this page"
-       exit 1
-    fi
-    ;;
-
-  makeinfo)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
-    # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-      # ... or it is the one specified with @setfilename ...
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
-    fi
-    # If the file does not exist, the user really needs makeinfo;
-    # let's fail without touching anything.
-    test -f $file || exit 1
-    touch $file
-    ;;
-
-  tar)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-       case "$firstarg" in
-       *o*)
-           firstarg=`echo "$firstarg" | sed s/o//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-       case "$firstarg" in
-       *h*)
-           firstarg=`echo "$firstarg" | sed s/h//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
-  *)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequisites for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
-    exit 1
-    ;;
-esac
-
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/mkinstalldirs b/src/mm/boehm-gc/libatomic_ops-1.2/mkinstalldirs
deleted file mode 100755 (executable)
index 259dbfc..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-
-scriptversion=2005-06-29.22
-
-# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain.
-#
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-errstatus=0
-dirmode=
-
-usage="\
-Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
-
-Create each directory DIR (with mode MODE, if specified), including all
-leading file name components.
-
-Report bugs to <bug-automake@gnu.org>."
-
-# process command line arguments
-while test $# -gt 0 ; do
-  case $1 in
-    -h | --help | --h*)         # -h for help
-      echo "$usage"
-      exit $?
-      ;;
-    -m)                         # -m PERM arg
-      shift
-      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
-      dirmode=$1
-      shift
-      ;;
-    --version)
-      echo "$0 $scriptversion"
-      exit $?
-      ;;
-    --)                         # stop option processing
-      shift
-      break
-      ;;
-    -*)                         # unknown option
-      echo "$usage" 1>&2
-      exit 1
-      ;;
-    *)                          # first non-opt arg
-      break
-      ;;
-  esac
-done
-
-for file
-do
-  if test -d "$file"; then
-    shift
-  else
-    break
-  fi
-done
-
-case $# in
-  0) exit 0 ;;
-esac
-
-# Solaris 8's mkdir -p isn't thread-safe.  If you mkdir -p a/b and
-# mkdir -p a/c at the same time, both will detect that a is missing,
-# one will create a, then the other will try to create a and die with
-# a "File exists" error.  This is a problem when calling mkinstalldirs
-# from a parallel make.  We use --version in the probe to restrict
-# ourselves to GNU mkdir, which is thread-safe.
-case $dirmode in
-  '')
-    if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-      echo "mkdir -p -- $*"
-      exec mkdir -p -- "$@"
-    else
-      # On NextStep and OpenStep, the `mkdir' command does not
-      # recognize any option.  It will interpret all options as
-      # directories to create, and then abort because `.' already
-      # exists.
-      test -d ./-p && rmdir ./-p
-      test -d ./--version && rmdir ./--version
-    fi
-    ;;
-  *)
-    if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
-       test ! -d ./--version; then
-      echo "mkdir -m $dirmode -p -- $*"
-      exec mkdir -m "$dirmode" -p -- "$@"
-    else
-      # Clean up after NextStep and OpenStep mkdir.
-      for d in ./-m ./-p ./--version "./$dirmode";
-      do
-        test -d $d && rmdir $d
-      done
-    fi
-    ;;
-esac
-
-for file
-do
-  case $file in
-    /*) pathcomp=/ ;;
-    *)  pathcomp= ;;
-  esac
-  oIFS=$IFS
-  IFS=/
-  set fnord $file
-  shift
-  IFS=$oIFS
-
-  for d
-  do
-    test "x$d" = x && continue
-
-    pathcomp=$pathcomp$d
-    case $pathcomp in
-      -*) pathcomp=./$pathcomp ;;
-    esac
-
-    if test ! -d "$pathcomp"; then
-      echo "mkdir $pathcomp"
-
-      mkdir "$pathcomp" || lasterr=$?
-
-      if test ! -d "$pathcomp"; then
-       errstatus=$lasterr
-      else
-       if test ! -z "$dirmode"; then
-         echo "chmod $dirmode $pathcomp"
-         lasterr=
-         chmod "$dirmode" "$pathcomp" || lasterr=$?
-
-         if test ! -z "$lasterr"; then
-           errstatus=$lasterr
-         fi
-       fi
-      fi
-    fi
-
-    pathcomp=$pathcomp/
-  done
-done
-
-exit $errstatus
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/Makefile.am b/src/mm/boehm-gc/libatomic_ops-1.2/src/Makefile.am
deleted file mode 100644 (file)
index 7ca41ff..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-SUBDIRS=atomic_ops
-
-AM_CFLAGS=@PICFLAG@
-
-include_HEADERS=atomic_ops.h atomic_ops_stack.h atomic_ops_malloc.h
-lib_LIBRARIES = libatomic_ops.a libatomic_ops_gpl.a
-if NEED_ASM
-libatomic_ops_a_SOURCES = atomic_ops.c atomic_ops_sysdeps.S
-else
-libatomic_ops_a_SOURCES = atomic_ops.c
-endif
-
-libatomic_ops_gpl_a_SOURCES = atomic_ops_stack.c atomic_ops_malloc.c
-
-EXTRA_DIST=Makefile.msft
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/Makefile.in b/src/mm/boehm-gc/libatomic_ops-1.2/src/Makefile.in
deleted file mode 100644 (file)
index d496342..0000000
+++ /dev/null
@@ -1,613 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = src
-DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/config.h.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-       $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
-libLIBRARIES_INSTALL = $(INSTALL_DATA)
-LIBRARIES = $(lib_LIBRARIES)
-AR = ar
-ARFLAGS = cru
-libatomic_ops_a_AR = $(AR) $(ARFLAGS)
-libatomic_ops_a_LIBADD =
-am__libatomic_ops_a_SOURCES_DIST = atomic_ops.c atomic_ops_sysdeps.S
-@NEED_ASM_FALSE@am_libatomic_ops_a_OBJECTS = atomic_ops.$(OBJEXT)
-@NEED_ASM_TRUE@am_libatomic_ops_a_OBJECTS = atomic_ops.$(OBJEXT) \
-@NEED_ASM_TRUE@        atomic_ops_sysdeps.$(OBJEXT)
-libatomic_ops_a_OBJECTS = $(am_libatomic_ops_a_OBJECTS)
-libatomic_ops_gpl_a_AR = $(AR) $(ARFLAGS)
-libatomic_ops_gpl_a_LIBADD =
-am_libatomic_ops_gpl_a_OBJECTS = atomic_ops_stack.$(OBJEXT) \
-       atomic_ops_malloc.$(OBJEXT)
-libatomic_ops_gpl_a_OBJECTS = $(am_libatomic_ops_gpl_a_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libatomic_ops_a_SOURCES) $(libatomic_ops_gpl_a_SOURCES)
-DIST_SOURCES = $(am__libatomic_ops_a_SOURCES_DIST) \
-       $(libatomic_ops_gpl_a_SOURCES)
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-       html-recursive info-recursive install-data-recursive \
-       install-exec-recursive install-info-recursive \
-       install-recursive installcheck-recursive installdirs-recursive \
-       pdf-recursive ps-recursive uninstall-info-recursive \
-       uninstall-recursive
-includeHEADERS_INSTALL = $(INSTALL_HEADER)
-HEADERS = $(include_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCAS = @CCAS@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GREP = @GREP@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-NEED_ASM_FALSE = @NEED_ASM_FALSE@
-NEED_ASM_TRUE = @NEED_ASM_TRUE@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PICFLAG = @PICFLAG@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-ac_ct_CC = @ac_ct_CC@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-SUBDIRS = atomic_ops
-AM_CFLAGS = @PICFLAG@
-include_HEADERS = atomic_ops.h atomic_ops_stack.h atomic_ops_malloc.h
-lib_LIBRARIES = libatomic_ops.a libatomic_ops_gpl.a
-@NEED_ASM_FALSE@libatomic_ops_a_SOURCES = atomic_ops.c
-@NEED_ASM_TRUE@libatomic_ops_a_SOURCES = atomic_ops.c atomic_ops_sysdeps.S
-libatomic_ops_gpl_a_SOURCES = atomic_ops_stack.c atomic_ops_malloc.c
-EXTRA_DIST = Makefile.msft
-all: config.h
-       $(MAKE) $(AM_MAKEFLAGS) all-recursive
-
-.SUFFIXES:
-.SUFFIXES: .S .c .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-       @for dep in $?; do \
-         case '$(am__configure_deps)' in \
-           *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
-             exit 1;; \
-         esac; \
-       done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  src/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-       @case '$?' in \
-         *config.status*) \
-           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-         *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-       esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-config.h: stamp-h1
-       @if test ! -f $@; then \
-         rm -f stamp-h1; \
-         $(MAKE) stamp-h1; \
-       else :; fi
-
-stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
-       @rm -f stamp-h1
-       cd $(top_builddir) && $(SHELL) ./config.status src/config.h
-$(srcdir)/config.h.in:  $(am__configure_deps) 
-       cd $(top_srcdir) && $(AUTOHEADER)
-       rm -f stamp-h1
-       touch $@
-
-distclean-hdr:
-       -rm -f config.h stamp-h1
-install-libLIBRARIES: $(lib_LIBRARIES)
-       @$(NORMAL_INSTALL)
-       test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
-       @list='$(lib_LIBRARIES)'; for p in $$list; do \
-         if test -f $$p; then \
-           f=$(am__strip_dir) \
-           echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-           $(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
-         else :; fi; \
-       done
-       @$(POST_INSTALL)
-       @list='$(lib_LIBRARIES)'; for p in $$list; do \
-         if test -f $$p; then \
-           p=$(am__strip_dir) \
-           echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \
-           $(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \
-         else :; fi; \
-       done
-
-uninstall-libLIBRARIES:
-       @$(NORMAL_UNINSTALL)
-       @list='$(lib_LIBRARIES)'; for p in $$list; do \
-         p=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-         rm -f "$(DESTDIR)$(libdir)/$$p"; \
-       done
-
-clean-libLIBRARIES:
-       -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
-libatomic_ops.a: $(libatomic_ops_a_OBJECTS) $(libatomic_ops_a_DEPENDENCIES) 
-       -rm -f libatomic_ops.a
-       $(libatomic_ops_a_AR) libatomic_ops.a $(libatomic_ops_a_OBJECTS) $(libatomic_ops_a_LIBADD)
-       $(RANLIB) libatomic_ops.a
-libatomic_ops_gpl.a: $(libatomic_ops_gpl_a_OBJECTS) $(libatomic_ops_gpl_a_DEPENDENCIES) 
-       -rm -f libatomic_ops_gpl.a
-       $(libatomic_ops_gpl_a_AR) libatomic_ops_gpl.a $(libatomic_ops_gpl_a_OBJECTS) $(libatomic_ops_gpl_a_LIBADD)
-       $(RANLIB) libatomic_ops_gpl.a
-
-mostlyclean-compile:
-       -rm -f *.$(OBJEXT)
-
-distclean-compile:
-       -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops_malloc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops_stack.Po@am__quote@
-
-.S.o:
-       $(CCASCOMPILE) -c $<
-
-.S.obj:
-       $(CCASCOMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.o:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
-uninstall-info-am:
-install-includeHEADERS: $(include_HEADERS)
-       @$(NORMAL_INSTALL)
-       test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
-       @list='$(include_HEADERS)'; for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
-         $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
-       done
-
-uninstall-includeHEADERS:
-       @$(NORMAL_UNINSTALL)
-       @list='$(include_HEADERS)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
-         rm -f "$(DESTDIR)$(includedir)/$$f"; \
-       done
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
-       dot_seen=no; \
-       target=`echo $@ | sed s/-recursive//`; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         echo "Making $$target in $$subdir"; \
-         if test "$$subdir" = "."; then \
-           dot_seen=yes; \
-           local_target="$$target-am"; \
-         else \
-           local_target="$$target"; \
-         fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-         || eval $$failcom; \
-       done; \
-       if test "$$dot_seen" = "no"; then \
-         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-       fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
-       dot_seen=no; \
-       case "$@" in \
-         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-         *) list='$(SUBDIRS)' ;; \
-       esac; \
-       rev=''; for subdir in $$list; do \
-         if test "$$subdir" = "."; then :; else \
-           rev="$$subdir $$rev"; \
-         fi; \
-       done; \
-       rev="$$rev ."; \
-       target=`echo $@ | sed s/-recursive//`; \
-       for subdir in $$rev; do \
-         echo "Making $$target in $$subdir"; \
-         if test "$$subdir" = "."; then \
-           local_target="$$target-am"; \
-         else \
-           local_target="$$target"; \
-         fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-         || eval $$failcom; \
-       done && test -z "$$fail"
-tags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-       done
-ctags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-       done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-         include_option=--etags-include; \
-         empty_fix=.; \
-       else \
-         include_option=--include; \
-         empty_fix=; \
-       fi; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         if test "$$subdir" = .; then :; else \
-           test ! -f $$subdir/TAGS || \
-             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
-         fi; \
-       done; \
-       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-         test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
-       fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
-         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
-
-GTAGS:
-       here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
-         if test -d $$d/$$file; then \
-           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-           fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-         else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
-           || exit 1; \
-         fi; \
-       done
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-         if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(mkdir_p) "$(distdir)/$$subdir" \
-           || exit 1; \
-           distdir=`$(am__cd) $(distdir) && pwd`; \
-           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-           (cd $$subdir && \
-             $(MAKE) $(AM_MAKEFLAGS) \
-               top_distdir="$$top_distdir" \
-               distdir="$$distdir/$$subdir" \
-               distdir) \
-             || exit 1; \
-         fi; \
-       done
-check-am: all-am
-check: check-recursive
-all-am: Makefile $(LIBRARIES) $(HEADERS) config.h
-installdirs: installdirs-recursive
-installdirs-am:
-       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
-       done
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libLIBRARIES mostlyclean-am
-
-distclean: distclean-recursive
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-hdr distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am: install-includeHEADERS
-
-install-exec-am: install-libLIBRARIES
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-includeHEADERS uninstall-info-am \
-       uninstall-libLIBRARIES
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-       clean clean-generic clean-libLIBRARIES clean-recursive ctags \
-       ctags-recursive distclean distclean-compile distclean-generic \
-       distclean-hdr distclean-recursive distclean-tags distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-exec install-exec-am \
-       install-includeHEADERS install-info install-info-am \
-       install-libLIBRARIES install-man install-strip installcheck \
-       installcheck-am installdirs installdirs-am maintainer-clean \
-       maintainer-clean-generic maintainer-clean-recursive \
-       mostlyclean mostlyclean-compile mostlyclean-generic \
-       mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-       uninstall uninstall-am uninstall-includeHEADERS \
-       uninstall-info-am uninstall-libLIBRARIES
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/Makefile.msft b/src/mm/boehm-gc/libatomic_ops-1.2/src/Makefile.msft
deleted file mode 100644 (file)
index ae96702..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P.
-# 
-# The really trivial win32/VC++ Makefile.  Note that atomic_ops.c isn't useful.
-# And we rely on a pre-built test_atomic_include.h and generalize-small.h,
-# since we can't rely on sed.
-# Win32 clients only need to include the header files.
-# To install, copy atomic_ops.h and the atomic_ops/... tree to your favorite
-# include directory.
-
-#MY_CPU=X86
-#CPU=$(MY_CPU)
-#!include <ntwin32.mak>
-
-LIB_OBJS=atomic_ops_stack.obj atomic_ops_malloc.obj
-
-all: check
-
-atomic_ops_stack.obj:
-       cl -O2 -c -DAO_ASSUME_WINDOWS98 atomic_ops_stack.c
-
-atomic_ops_malloc.obj:
-       cl -O2 -c -DAO_ASSUME_WINDOWS98 atomic_ops_malloc.c
-
-test_atomic: ..\tests\test_atomic.c ..\tests\test_atomic_include.h
-       cl -O2 -I. -DAO_ASSUME_WINDOWS98 ..\tests\test_atomic.c -o test_atomic
-
-test_atomic_w95: ..\tests\test_atomic.c ..\tests\test_atomic_include.h
-       cl -O2 -I. ..\tests\test_atomic.c -o test_atomic_w95
-
-test_malloc: ..\tests\test_malloc.c ..\tests\test_atomic_include.h \
-            libatomic_ops_gpl.lib 
-       cl -O2 -DAO_ASSUME_WINDOWS98 -I. ..\tests\test_malloc.c -o test_malloc libatomic_ops_gpl.lib
-
-libatomic_ops_gpl.lib: $(LIB_OBJS)
-       lib /MACHINE:i386 /out:libatomic_ops_gpl.lib $(LIB_OBJS)
-
-check:  test_atomic test_atomic_w95 test_malloc
-       echo The following will print lots of \"Missing ...\" messages.
-       test_atomic_w95
-       echo The following will print some \"Missing ...\" messages.
-       test_atomic
-       test_malloc
-
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops.c b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops.c
deleted file mode 100644 (file)
index 1307612..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-/*
- * Initialized data and out-of-line functions to support atomic_ops.h
- * go here.  Currently this is needed only for pthread-based atomics
- * emulation, or for compare-and-swap emulation.
- * Pthreads emulation isn't useful on a native Windows platform, and
- * cas emulation is not needed.  Thus we skip this on Windows.
- */
-
-#if defined(HAVE_CONFIG_H)
-# include "config.h"
-#endif
-
-#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__BORLANDC__)
-
-#undef AO_REQUIRE_CAS
-
-#include <pthread.h>
-#include <signal.h>
-#ifdef _HPUX_SOURCE
-# include <sys/time.h>
-#else
-# include <sys/select.h>
-#endif
-#include "atomic_ops.h"  /* Without cas emulation! */
-
-#ifndef AO_HAVE_double_t
-# include "atomic_ops/sysdeps/standard_ao_double_t.h"
-#endif
-
-/*
- * Lock for pthreads-based implementation.
- */
-
-pthread_mutex_t AO_pt_lock = PTHREAD_MUTEX_INITIALIZER;
-
-/*
- * Out of line compare-and-swap emulation based on test and set.
- * 
- * We use a small table of locks for different compare_and_swap locations.
- * Before we update perform a compare-and-swap, we grab the corresponding
- * lock.  Different locations may hash to the same lock, but since we
- * never acquire more than one lock at a time, this can't deadlock.
- * We explicitly disable signals while we perform this operation.
- *
- * FIXME: We should probably also support emulation based on Lamport
- * locks, since we may not have test_and_set either.
- */
-#define AO_HASH_SIZE 16
-
-#define AO_HASH(x) (((unsigned long)(x) >> 12) & (AO_HASH_SIZE-1))
-
-AO_TS_t AO_locks[AO_HASH_SIZE] = {
-       AO_TS_INITIALIZER, AO_TS_INITIALIZER,
-       AO_TS_INITIALIZER, AO_TS_INITIALIZER,
-       AO_TS_INITIALIZER, AO_TS_INITIALIZER,
-       AO_TS_INITIALIZER, AO_TS_INITIALIZER,
-       AO_TS_INITIALIZER, AO_TS_INITIALIZER,
-       AO_TS_INITIALIZER, AO_TS_INITIALIZER,
-       AO_TS_INITIALIZER, AO_TS_INITIALIZER,
-       AO_TS_INITIALIZER, AO_TS_INITIALIZER,
-};
-
-static AO_T dummy = 1;
-
-/* Spin for 2**n units. */
-void AO_spin(int n)
-{
-  int i;
-  AO_T j = AO_load(&dummy);
-
-  for (i = 0; i < (2 << n); ++i)
-    {
-       j *= 5;
-       j -= 4;
-    }
-  AO_store(&dummy, j);
-}
-
-void AO_pause(int n)
-{
-    if (n < 12)
-      AO_spin(n);
-    else
-      {
-        struct timeval tv;
-
-       /* Short async-signal-safe sleep. */
-       tv.tv_sec = 0;
-       tv.tv_usec = (n > 28? 100000 : (1 << (n - 12)));
-       select(0, 0, 0, 0, &tv);
-      }
-}
-
-static void lock_ool(volatile AO_TS_t *l)
-{
-  int i = 0;
-
-  while (AO_test_and_set_acquire(l) == AO_TS_SET)
-    AO_pause(++i);
-}
-
-AO_INLINE void lock(volatile AO_TS_t *l)
-{
-  if (AO_test_and_set_acquire(l) == AO_TS_SET)
-    lock_ool(l);
-}
-
-AO_INLINE void unlock(volatile AO_TS_t *l)
-{
-  AO_CLEAR(l);
-}
-
-static sigset_t all_sigs;
-
-static volatile AO_t initialized = 0;
-
-static volatile AO_TS_t init_lock = AO_TS_INITIALIZER;
-
-int AO_compare_and_swap_emulation(volatile AO_t *addr, AO_t old,
-                                 AO_t new_val)
-{
-  AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
-  sigset_t old_sigs;
-  int result;
-
-  if (!AO_load_acquire(&initialized))
-    {
-      lock(&init_lock);
-      if (!initialized) sigfillset(&all_sigs);
-      unlock(&init_lock);
-      AO_store_release(&initialized, 1);
-    }
-  sigprocmask(SIG_BLOCK, &all_sigs, &old_sigs);
-       /* Neither sigprocmask nor pthread_sigmask is 100%      */
-       /* guaranteed to work here.  Sigprocmask is not         */
-       /* guaranteed be thread safe, and pthread_sigmask       */
-       /* is not async-signal-safe.  Under linuxthreads,       */
-       /* sigprocmask may block some pthreads-internal         */
-       /* signals.  So long as we do that for short periods,   */
-       /* we should be OK.                                     */
-  lock(my_lock);
-  if (*addr == old)
-    {
-      *addr = new_val;
-      result = 1;
-    }
-  else
-    result = 0;
-  unlock(my_lock);
-  sigprocmask(SIG_SETMASK, &old_sigs, NULL);
-  return result;
-}
-
-int AO_compare_double_and_swap_double_emulation(volatile AO_double_t *addr,
-                                               AO_t old_val1, AO_t old_val2,
-                                               AO_t new_val1, AO_t new_val2)
-{
-  AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
-  sigset_t old_sigs;
-  int result;
-
-  if (!AO_load_acquire(&initialized))
-    {
-      lock(&init_lock);
-      if (!initialized) sigfillset(&all_sigs);
-      unlock(&init_lock);
-      AO_store_release(&initialized, 1);
-    }
-  sigprocmask(SIG_BLOCK, &all_sigs, &old_sigs);
-       /* Neither sigprocmask nor pthread_sigmask is 100%      */
-       /* guaranteed to work here.  Sigprocmask is not         */
-       /* guaranteed be thread safe, and pthread_sigmask       */
-       /* is not async-signal-safe.  Under linuxthreads,       */
-       /* sigprocmask may block some pthreads-internal         */
-       /* signals.  So long as we do that for short periods,   */
-       /* we should be OK.                                     */
-  lock(my_lock);
-  if (addr -> AO_val1 == old_val1 && addr -> AO_val2 == old_val2)
-    {
-      addr -> AO_val1 = new_val1;
-      addr -> AO_val2 = new_val2;
-      result = 1;
-    }
-  else
-    result = 0;
-  unlock(my_lock);
-  sigprocmask(SIG_SETMASK, &old_sigs, NULL);
-  return result;
-}
-
-void AO_store_full_emulation(volatile AO_t *addr, AO_t val)
-{
-  AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
-  lock(my_lock);
-  *addr = val;
-  unlock(my_lock);
-}
-
-#else /* Non-posix platform */
-
-int AO_non_posix_implementation_is_entirely_in_headers;
-
-#endif
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops.h
deleted file mode 100755 (executable)
index 006d51d..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */ 
-
-#ifndef ATOMIC_OPS_H
-
-#define ATOMIC_OPS_H
-
-#include <assert.h>
-#include <stddef.h>
-
-/* We define various atomic operations on memory in a          */
-/* machine-specific way.  Unfortunately, this is complicated   */
-/* by the fact that these may or may not be combined with      */
-/* various memory barriers.  Thus the actual operations we     */
-/* define have the form AO_<atomic-op>_<barrier>, for all      */
-/* plausible combinations of <atomic-op> and <barrier>.                */
-/* This of course results in a mild combinatorial explosion.   */
-/* To deal with it, we try to generate derived                 */
-/* definitions for as many of the combinations as we can, as   */
-/* automatically as possible.                                  */
-/*                                                             */
-/* Our assumption throughout is that the programmer will       */
-/* specify the least demanding operation and memory barrier    */
-/* that will guarantee correctness for the implementation.     */
-/* Our job is to find the least expensive way to implement it  */
-/* on the applicable hardware.  In many cases that will        */
-/* involve, for example, a stronger memory barrier, or a       */
-/* combination of hardware primitives.                         */
-/*                                                             */
-/* Conventions:                                                        */
-/* "plain" atomic operations are not guaranteed to include     */
-/* a barrier.  The suffix in the name specifies the barrier    */
-/* type.  Suffixes are:                                                */
-/* _release: Earlier operations may not be delayed past it.    */
-/* _acquire: Later operations may not move ahead of it.                */
-/* _read: Subsequent reads must follow this operation and      */
-/*       preceding reads.                                      */
-/* _write: Earlier writes precede both this operation and      */
-/*       later writes.                                         */
-/* _full: Ordered with respect to both earlier and later memops.*/
-/* _release_write: Ordered with respect to earlier writes.     */
-/* _acquire_read: Ordered with respect to later reads.         */
-/*                                                             */
-/* Currently we try to define the following atomic memory      */
-/* operations, in combination with the above barriers:         */
-/* AO_nop                                                      */
-/* AO_load                                                     */
-/* AO_store                                                    */
-/* AO_test_and_set (binary)                                    */
-/* AO_fetch_and_add                                            */
-/* AO_fetch_and_add1                                           */
-/* AO_fetch_and_sub1                                           */
-/* AO_or                                                       */
-/* AO_compare_and_swap                                         */
-/*                                                             */
-/* Note that atomicity guarantees are valid only if both       */
-/* readers and writers use AO_ operations to access the        */
-/* shared value, while ordering constraints are intended to    */
-/* apply all memory operations.         If a location can potentially  */
-/* be accessed simultaneously from multiple threads, and one of        */
-/* those accesses may be a write access, then all such         */
-/* accesses to that location should be through AO_ primitives. */
-/* However if AO_ operations enforce sufficient ordering to    */
-/* ensure that a location x cannot be accessed concurrently,   */
-/* or can only be read concurrently, then x can be accessed    */
-/* via ordinary references and assignments.                    */
-/*                                                             */
-/* Compare_and_exchange takes an address and an expected old   */
-/* value and a new value, and returns an int.  Nonzero                 */
-/* indicates that it succeeded.                                        */
-/* Test_and_set takes an address, atomically replaces it by    */
-/* AO_TS_SET, and returns the prior value.                     */
-/* An AO_TS_t location can be reset with the                   */
-/* AO_CLEAR macro, which normally uses AO_store_release.       */
-/* AO_fetch_and_add takes an address and an AO_t increment     */
-/* value.  The AO_fetch_and_add1 and AO_fetch_and_sub1 variants        */
-/* are provided, since they allow faster implementations on    */
-/* some hardware. AO_or atomically ors an AO_t value into a    */
-/* memory location, but does not provide access to the original.*/
-/*                                                             */
-/* We expect this list to grow slowly over time.               */
-/*                                                             */
-/* Note that AO_nop_full is a full memory barrier.             */
-/*                                                             */
-/* Note that if some data is initialized with                  */
-/*     data.x = ...; data.y = ...; ...                         */
-/*     AO_store_release_write(&data_is_initialized, 1)         */
-/* then data is guaranteed to be initialized after the test    */
-/*     if (AO_load_release_read(&data_is_initialized)) ...     */
-/* succeeds.  Furthermore, this should generate near-optimal   */
-/* code on all common platforms.                               */
-/*                                                             */
-/* All operations operate on unsigned AO_t, which              */
-/* is the natural word size, and usually unsigned long.                */
-/* It is possible to check whether a particular operation op   */
-/* is available on a particular platform by checking whether   */
-/* AO_HAVE_op is defined.  We make heavy use of these macros   */
-/* internally.                                                 */
-
-/* The rest of this file basically has three sections:         */
-/*                                                             */
-/* Some utility and default definitions.                       */
-/*                                                             */
-/* The architecture dependent section:                         */
-/* This defines atomic operations that have direct hardware    */
-/* support on a particular platform, mostly by including the   */
-/* appropriate compiler- and hardware-dependent file.                  */
-/*                                                             */
-/* The synthesis section:                                      */
-/* This tries to define other atomic operations in terms of    */
-/* those that are explicitly available on the platform.                */
-/* This section is hardware independent.                       */
-/* We make no attempt to synthesize operations in ways that    */
-/* effectively introduce locks, except for the debugging/demo  */
-/* pthread-based implementation at the beginning.  A more      */
-/* realistic implementation that falls back to locks could be  */
-/* added as a higher layer.  But that would sacrifice          */
-/* usability from signal handlers.                             */
-/* The synthesis section is implemented almost entirely in     */
-/* atomic_ops_generalize.h.                                    */
-
-/* Some common defaults.  Overridden for some architectures.   */
-#define AO_t size_t
-
-/* The test_and_set primitive returns an AO_TS_VAL_t value.    */
-/* AO_TS_t is the type of an in-memory test-and-set location.  */
-
-#define AO_TS_INITIALIZER (AO_t)AO_TS_CLEAR
-
-/* Platform-dependent stuff:                                   */
-#if defined(__GNUC__) || defined(_MSC_VER) || defined(__INTEL_COMPILER) \
-       || defined(__DMC__) || defined(__WATCOMC__)
-# define AO_INLINE static __inline
-#elif defined(__sun)
-# define AO_INLINE static inline
-#else
-# define AO_INLINE static
-#endif
-
-#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
-# define AO_compiler_barrier() __asm__ __volatile__("" : : : "memory")
-#elif defined(_MSC_VER) || defined(__DMC__) || defined(__BORLANDC__) \
-       || defined(__WATCOMC__)
-# if defined(_AMD64_) || _MSC_VER >= 1400
-#   if defined(_WIN32_WCE)
-/* #     include <cmnintrin.h> */
-#   elif defined(_MSC_VER)
-#     include <intrin.h>
-#   endif
-#   pragma intrinsic(_ReadWriteBarrier)
-#   define AO_compiler_barrier() _ReadWriteBarrier()
-       /* We assume this does not generate a fence instruction.        */
-       /* The documentation is a bit unclear.                          */
-# else
-#   define AO_compiler_barrier() __asm { }
-       /* The preceding implementation may be preferable here too.     */
-       /* But the documentation warns about VC++ 2003 and earlier.     */
-# endif
-#elif defined(__INTEL_COMPILER)
-# define AO_compiler_barrier() __memory_barrier() /* Too strong? IA64-only? */
-#elif defined(_HPUX_SOURCE)
-# if defined(__ia64)
-#   include <machine/sys/inline.h>
-#   define AO_compiler_barrier() _Asm_sched_fence()
-# else
-    /* FIXME - We dont know how to do this.  This is a guess.  */
-    /* And probably a bad one.                                 */
-    static volatile int AO_barrier_dummy;
-#   define AO_compiler_barrier() AO_barrier_dummy = AO_barrier_dummy
-# endif
-#else
-  /* We conjecture that the following usually gives us the right       */
-  /* semantics or an error.                                            */
-# define AO_compiler_barrier() asm("")
-#endif
-
-#if defined(AO_USE_PTHREAD_DEFS)
-# include "atomic_ops/sysdeps/generic_pthread.h"
-#endif /* AO_USE_PTHREAD_DEFS */
-
-#if defined(__GNUC__) && !defined(AO_USE_PTHREAD_DEFS) \
-    && !defined(__INTEL_COMPILER)
-# if defined(__i386__)
-#   include "atomic_ops/sysdeps/gcc/x86.h"
-# endif /* __i386__ */
-# if defined(__x86_64__)
-#   include "atomic_ops/sysdeps/gcc/x86_64.h"
-# endif /* __x86_64__ */
-# if defined(__ia64__)
-#   include "atomic_ops/sysdeps/gcc/ia64.h"
-#   define AO_GENERALIZE_TWICE
-# endif /* __ia64__ */
-# if defined(__hppa__)
-#   include "atomic_ops/sysdeps/gcc/hppa.h"
-#   define AO_CAN_EMUL_CAS
-# endif /* __hppa__ */
-# if defined(__alpha__)
-#   include "atomic_ops/sysdeps/gcc/alpha.h"
-#   define AO_GENERALIZE_TWICE
-# endif /* __alpha__ */
-# if defined(__s390__)
-#   include "atomic_ops/sysdeps/gcc/s390.h"
-# endif /* __s390__ */
-# if defined(__sparc__)
-#   include "atomic_ops/sysdeps/gcc/sparc.h"
-#   define AO_CAN_EMUL_CAS
-# endif /* __sparc__ */
-# if defined(__m68k__)
-#   include "atomic_ops/sysdeps/gcc/m68k.h"
-# endif /* __m68k__ */
-# if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \
-     || defined(__powerpc64__) || defined(__ppc64__)
-#   include "atomic_ops/sysdeps/gcc/powerpc.h"
-# endif /* __powerpc__ */
-# if defined(__arm__) && !defined(AO_USE_PTHREAD_DEFS)
-#   include "atomic_ops/sysdeps/gcc/arm.h"
-#   define AO_CAN_EMUL_CAS
-# endif /* __arm__ */
-# if defined(__cris__) || defined(CRIS)
-#   include "atomic_ops/sysdeps/gcc/cris.h"
-# endif
-# if defined(__mips__)
-#   include "atomic_ops/sysdeps/gcc/mips.h"
-# endif /* __mips__ */
-#endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */
-
-#if defined(__INTEL_COMPILER) && !defined(AO_USE_PTHREAD_DEFS)
-# if defined(__ia64__)
-#   include "atomic_ops/sysdeps/icc/ia64.h"
-#   define AO_GENERALIZE_TWICE
-# endif
-#endif
-
-#if defined(_HPUX_SOURCE) && !defined(__GNUC__) && !defined(AO_USE_PTHREAD_DEFS)
-# if defined(__ia64)
-#   include "atomic_ops/sysdeps/hpc/ia64.h"
-#   define AO_GENERALIZE_TWICE
-# else
-#   include "atomic_ops/sysdeps/hpc/hppa.h"
-#   define AO_CAN_EMUL_CAS
-# endif
-#endif
-
-#if defined(__sun) && !defined(__GNUC__) && !defined(AO_USE_PTHREAD_DEFS)
-  /* Note: use -DAO_USE_PTHREAD_DEFS if Sun CC does not handle inline asm. */
-# if defined(__i386)
-#   include "atomic_ops/sysdeps/sunc/x86.h"
-# endif /* __i386 */
-# if defined(__x86_64) || defined(__amd64)
-#   include "atomic_ops/sysdeps/sunc/x86_64.h"
-# endif /* __x86_64 */
-#endif
-
-#if !defined(__GNUC__) && (defined(sparc) || defined(__sparc)) \
-    && !defined(AO_USE_PTHREAD_DEFS)
-#   include "atomic_ops/sysdeps/sunc/sparc.h"
-#   define AO_CAN_EMUL_CAS
-#endif
-
-#if defined(_MSC_VER) || defined(__DMC__) || defined(__BORLANDC__) \
-       || (defined(__WATCOMC__) && defined(__NT__))
-# if defined(_AMD64_)
-#   include "atomic_ops/sysdeps/msftc/x86_64.h"
-# elif _M_IX86 >= 400
-#   include "atomic_ops/sysdeps/msftc/x86.h"
-# endif
-#endif
-
-#if defined(AO_REQUIRE_CAS) && !defined(AO_HAVE_compare_and_swap) \
-    && !defined(AO_HAVE_compare_and_swap_full) \
-    && !defined(AO_HAVE_compare_and_swap_acquire)
-# if defined(AO_CAN_EMUL_CAS)
-#   include "atomic_ops/sysdeps/emul_cas.h"
-# else
-#  error Cannot implement AO_compare_and_swap_full on this architecture.
-# endif
-#endif         /* AO_REQUIRE_CAS && !AO_HAVE_compare_and_swap ... */
-
-/* The most common way to clear a test-and-set location                */
-/* at the end of a critical section.                           */
-#if AO_AO_TS_T && !defined(AO_CLEAR)
-# define AO_CLEAR(addr) AO_store_release((AO_TS_t *)(addr), AO_TS_CLEAR)
-#endif
-#if AO_CHAR_TS_T && !defined(AO_CLEAR)
-# define AO_CLEAR(addr) AO_char_store_release((AO_TS_t *)(addr), AO_TS_CLEAR)
-#endif
-
-/*
- * The generalization section.
- * Theoretically this should repeatedly include atomic_ops_generalize.h.
- * In fact, we observe that this converges after a small fixed number
- * of iterations, usually one.
- */
-#include "atomic_ops/generalize.h"
-#ifdef AO_GENERALIZE_TWICE
-# include "atomic_ops/generalize.h"
-#endif
-
-/* For compatibility with version 0.4 and earlier      */
-#define AO_TS_T AO_TS_t
-#define AO_T AO_t
-#define AO_TS_VAL AO_TS_VAL_t
-
-#endif /* ATOMIC_OPS_H */
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/Makefile.am b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/Makefile.am
deleted file mode 100644 (file)
index 8000273..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-SUBDIRS=sysdeps
-
-EXTRA_DIST=generalize-small.template
-
-#Private Headers
-private_HEADERS=generalize.h generalize-small.h
-privatedir=${includedir}/atomic_ops/
-
-generalize-small.h: generalize-small.template
-       sed -e s:XSIZE:char:g -e s:XCTYPE:char:g $? > $@
-       sed -e s:XSIZE:short:g -e s:XCTYPE:short:g $? >> $@
-       sed -e s:XSIZE:int:g -e s:XCTYPE:int:g $? >> $@
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/Makefile.in b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/Makefile.in
deleted file mode 100644 (file)
index 023e686..0000000
+++ /dev/null
@@ -1,498 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = src/atomic_ops
-DIST_COMMON = $(private_HEADERS) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-       $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/src/config.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-       html-recursive info-recursive install-data-recursive \
-       install-exec-recursive install-info-recursive \
-       install-recursive installcheck-recursive installdirs-recursive \
-       pdf-recursive ps-recursive uninstall-info-recursive \
-       uninstall-recursive
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(privatedir)"
-privateHEADERS_INSTALL = $(INSTALL_HEADER)
-HEADERS = $(private_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCAS = @CCAS@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GREP = @GREP@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-NEED_ASM_FALSE = @NEED_ASM_FALSE@
-NEED_ASM_TRUE = @NEED_ASM_TRUE@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PICFLAG = @PICFLAG@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-ac_ct_CC = @ac_ct_CC@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-SUBDIRS = sysdeps
-EXTRA_DIST = generalize-small.template
-
-#Private Headers
-private_HEADERS = generalize.h generalize-small.h
-privatedir = ${includedir}/atomic_ops/
-all: all-recursive
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-       @for dep in $?; do \
-         case '$(am__configure_deps)' in \
-           *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
-             exit 1;; \
-         esac; \
-       done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/atomic_ops/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  src/atomic_ops/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-       @case '$?' in \
-         *config.status*) \
-           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-         *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-       esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-uninstall-info-am:
-install-privateHEADERS: $(private_HEADERS)
-       @$(NORMAL_INSTALL)
-       test -z "$(privatedir)" || $(mkdir_p) "$(DESTDIR)$(privatedir)"
-       @list='$(private_HEADERS)'; for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(privateHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(privatedir)/$$f'"; \
-         $(privateHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(privatedir)/$$f"; \
-       done
-
-uninstall-privateHEADERS:
-       @$(NORMAL_UNINSTALL)
-       @list='$(private_HEADERS)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(privatedir)/$$f'"; \
-         rm -f "$(DESTDIR)$(privatedir)/$$f"; \
-       done
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
-       dot_seen=no; \
-       target=`echo $@ | sed s/-recursive//`; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         echo "Making $$target in $$subdir"; \
-         if test "$$subdir" = "."; then \
-           dot_seen=yes; \
-           local_target="$$target-am"; \
-         else \
-           local_target="$$target"; \
-         fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-         || eval $$failcom; \
-       done; \
-       if test "$$dot_seen" = "no"; then \
-         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-       fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
-       dot_seen=no; \
-       case "$@" in \
-         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-         *) list='$(SUBDIRS)' ;; \
-       esac; \
-       rev=''; for subdir in $$list; do \
-         if test "$$subdir" = "."; then :; else \
-           rev="$$subdir $$rev"; \
-         fi; \
-       done; \
-       rev="$$rev ."; \
-       target=`echo $@ | sed s/-recursive//`; \
-       for subdir in $$rev; do \
-         echo "Making $$target in $$subdir"; \
-         if test "$$subdir" = "."; then \
-           local_target="$$target-am"; \
-         else \
-           local_target="$$target"; \
-         fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-         || eval $$failcom; \
-       done && test -z "$$fail"
-tags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-       done
-ctags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-       done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-         include_option=--etags-include; \
-         empty_fix=.; \
-       else \
-         include_option=--include; \
-         empty_fix=; \
-       fi; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         if test "$$subdir" = .; then :; else \
-           test ! -f $$subdir/TAGS || \
-             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
-         fi; \
-       done; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-         test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
-       fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
-         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
-
-GTAGS:
-       here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
-         if test -d $$d/$$file; then \
-           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-           fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-         else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
-           || exit 1; \
-         fi; \
-       done
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-         if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(mkdir_p) "$(distdir)/$$subdir" \
-           || exit 1; \
-           distdir=`$(am__cd) $(distdir) && pwd`; \
-           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-           (cd $$subdir && \
-             $(MAKE) $(AM_MAKEFLAGS) \
-               top_distdir="$$top_distdir" \
-               distdir="$$distdir/$$subdir" \
-               distdir) \
-             || exit 1; \
-         fi; \
-       done
-check-am: all-am
-check: check-recursive
-all-am: Makefile $(HEADERS)
-installdirs: installdirs-recursive
-installdirs-am:
-       for dir in "$(DESTDIR)$(privatedir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
-       done
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-recursive
-       -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am: install-privateHEADERS
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-       -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-info-am uninstall-privateHEADERS
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-       clean clean-generic clean-recursive ctags ctags-recursive \
-       distclean distclean-generic distclean-recursive distclean-tags \
-       distdir dvi dvi-am html html-am info info-am install \
-       install-am install-data install-data-am install-exec \
-       install-exec-am install-info install-info-am install-man \
-       install-privateHEADERS install-strip installcheck \
-       installcheck-am installdirs installdirs-am maintainer-clean \
-       maintainer-clean-generic maintainer-clean-recursive \
-       mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
-       pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
-       uninstall-info-am uninstall-privateHEADERS
-
-
-generalize-small.h: generalize-small.template
-       sed -e s:XSIZE:char:g -e s:XCTYPE:char:g $? > $@
-       sed -e s:XSIZE:short:g -e s:XCTYPE:short:g $? >> $@
-       sed -e s:XSIZE:int:g -e s:XCTYPE:int:g $? >> $@
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/generalize-small.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/generalize-small.h
deleted file mode 100644 (file)
index 2b989a6..0000000
+++ /dev/null
@@ -1,1725 +0,0 @@
-/* char_load */
-#if defined(AO_HAVE_char_load_acquire) && !defined(AO_HAVE_char_load)
-#  define AO_char_load(addr) AO_char_load_acquire(addr)
-#  define AO_HAVE_char_load
-#endif
-
-#if defined(AO_HAVE_char_load_full) && !defined(AO_HAVE_char_load_acquire)
-#  define AO_char_load_acquire(addr) AO_char_load_full(addr)
-#  define AO_HAVE_char_load_acquire
-#endif
-
-#if defined(AO_HAVE_char_load_full) && !defined(AO_HAVE_char_load_read)
-#  define AO_char_load_read(addr) AO_char_load_full(addr)
-#  define AO_HAVE_char_load_read
-#endif
-
-#if !defined(AO_HAVE_char_load_acquire_read) && defined(AO_HAVE_char_load_acquire)
-#  define AO_char_load_acquire_read(addr) AO_char_load_acquire(addr)
-#  define AO_HAVE_char_load_acquire_read
-#endif
-
-#if defined(AO_HAVE_char_load) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_char_load_acquire)
-   AO_INLINE unsigned char
-   AO_char_load_acquire(const volatile unsigned char *addr)
-   {
-     unsigned char result = AO_char_load(addr);
-     /* Acquire barrier would be useless, since the load could be delayed  */
-     /* beyond it.                                                        */
-     AO_nop_full();
-     return result;
-   }
-#  define AO_HAVE_char_load_acquire
-#endif
-
-#if defined(AO_HAVE_char_load) && defined(AO_HAVE_nop_read) && \
-    !defined(AO_HAVE_char_load_read)
-   AO_INLINE unsigned char
-   AO_char_load_read(const volatile unsigned char *addr)
-   {
-     unsigned char result = AO_char_load(addr);
-     /* Acquire barrier would be useless, since the load could be delayed  */
-     /* beyond it.                                                        */
-     AO_nop_read();
-     return result;
-   }
-#  define AO_HAVE_char_load_read
-#endif
-
-#if defined(AO_HAVE_char_load_acquire) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_char_load_full)
-#  define AO_char_load_full(addr) (AO_nop_full(), AO_char_load_acquire(addr))
-#  define AO_HAVE_char_load_full
-#endif
-#if !defined(AO_HAVE_char_load_acquire_read) && defined(AO_HAVE_char_load_read)
-#  define AO_char_load_acquire_read(addr) AO_char_load_read(addr)
-#  define AO_HAVE_char_load_acquire_read
-#endif
-
-#if defined(AO_HAVE_char_load_acquire_read) && !defined(AO_HAVE_char_load)
-#  define AO_char_load(addr) AO_char_load_acquire_read(addr)
-#  define AO_HAVE_char_load
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_char_load_acquire_read)
-#    define AO_char_load_dd_acquire_read(addr) \
-       AO_char_load_acquire_read(addr)
-#    define AO_HAVE_char_load_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_char_load)
-#    define AO_char_load_dd_acquire_read(addr) \
-       AO_char_load(addr)
-#    define AO_HAVE_char_load_dd_acquire_read
-#  endif
-#endif
-
-
-/* char_store */
-
-#if defined(AO_HAVE_char_store_release) && !defined(AO_HAVE_char_store)
-#  define AO_char_store(addr, val) AO_char_store_release(addr,val)
-#  define AO_HAVE_char_store
-#endif
-
-#if defined(AO_HAVE_char_store_full) && !defined(AO_HAVE_char_store_release)
-#  define AO_char_store_release(addr,val) AO_char_store_full(addr,val)
-#  define AO_HAVE_char_store_release
-#endif
-
-#if defined(AO_HAVE_char_store_full) && !defined(AO_HAVE_char_store_write)
-#  define AO_char_store_write(addr,val) AO_char_store_full(addr,val)
-#  define AO_HAVE_char_store_write
-#endif
-
-#if defined(AO_HAVE_char_store_release) && \
-       !defined(AO_HAVE_char_store_release_write)
-#  define AO_char_store_release_write(addr, val) \
-       AO_char_store_release(addr,val)
-#  define AO_HAVE_char_store_release_write
-#endif
-
-#if defined(AO_HAVE_char_store_write) && !defined(AO_HAVE_char_store)
-#  define AO_char_store(addr, val) AO_char_store_write(addr,val)
-#  define AO_HAVE_char_store
-#endif
-
-#if defined(AO_HAVE_char_store) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_char_store_release)
-#  define AO_char_store_release(addr,val) \
-       (AO_nop_full(), AO_char_store(addr,val))
-#  define AO_HAVE_char_store_release
-#endif
-
-#if defined(AO_HAVE_nop_write) && defined(AO_HAVE_char_store) && \
-     !defined(AO_HAVE_char_store_write)
-#  define AO_char_store_write(addr, val) \
-       (AO_nop_write(), AO_char_store(addr,val))
-#  define AO_HAVE_char_store_write
-#endif
-
-#if defined(AO_HAVE_char_store_write) && \
-     !defined(AO_HAVE_char_store_release_write)
-#  define AO_char_store_release_write(addr, val) AO_char_store_write(addr,val)
-#  define AO_HAVE_char_store_release_write
-#endif
-
-#if defined(AO_HAVE_char_store_release) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_char_store_full)
-#  define AO_char_store_full(addr, val) \
-       (AO_char_store_release(addr, val), AO_nop_full())
-#  define AO_HAVE_char_store_full
-#endif
-
-
-/* char_fetch_and_add */
-#if defined(AO_HAVE_char_compare_and_swap_full) && \
-    !defined(AO_HAVE_char_fetch_and_add_full)
-   AO_INLINE AO_t
-   AO_char_fetch_and_add_full(volatile unsigned char *addr,
-                              unsigned char incr)
-   {
-     unsigned char old;
-     do
-       {
-         old = *addr;
-       }
-     while (!AO_char_compare_and_swap_full(addr, old, old+incr));
-     return old;
-   }
-#  define AO_HAVE_char_fetch_and_add_full
-#endif
-
-#if defined(AO_HAVE_char_compare_and_swap_acquire) && \
-    !defined(AO_HAVE_char_fetch_and_add_acquire)
-   AO_INLINE AO_t
-   AO_char_fetch_and_add_acquire(volatile unsigned char *addr,
-                                 unsigned char incr)
-   {
-     unsigned char old;
-     do
-       {
-         old = *addr;
-       }
-     while (!AO_char_compare_and_swap_acquire(addr, old, old+incr));
-     return old;
-   }
-#  define AO_HAVE_char_fetch_and_add_acquire
-#endif
-
-#if defined(AO_HAVE_char_compare_and_swap_release) && \
-    !defined(AO_HAVE_char_fetch_and_add_release)
-   AO_INLINE AO_t
-   AO_char_fetch_and_add_release(volatile unsigned char *addr,
-                                 unsigned char incr)
-   {
-     unsigned char old;
-     do
-       {
-         old = *addr;
-       }
-     while (!AO_char_compare_and_swap_release(addr, old, old+incr));
-     return old;
-   }
-#  define AO_HAVE_char_fetch_and_add_release
-#endif
-
-#if defined(AO_HAVE_char_fetch_and_add_full)
-#  if !defined(AO_HAVE_char_fetch_and_add_release)
-#    define AO_char_fetch_and_add_release(addr, val) \
-        AO_char_fetch_and_add_full(addr, val)
-#    define AO_HAVE_char_fetch_and_add_release
-#  endif
-#  if !defined(AO_HAVE_char_fetch_and_add_acquire)
-#    define AO_char_fetch_and_add_acquire(addr, val) \
-        AO_char_fetch_and_add_full(addr, val)
-#    define AO_HAVE_char_fetch_and_add_acquire
-#  endif
-#  if !defined(AO_HAVE_char_fetch_and_add_write)
-#    define AO_char_fetch_and_add_write(addr, val) \
-        AO_char_fetch_and_add_full(addr, val)
-#    define AO_HAVE_char_fetch_and_add_write
-#  endif
-#  if !defined(AO_HAVE_char_fetch_and_add_read)
-#    define AO_char_fetch_and_add_read(addr, val) \
-        AO_char_fetch_and_add_full(addr, val)
-#    define AO_HAVE_char_fetch_and_add_read
-#  endif
-#endif /* AO_HAVE_char_fetch_and_add_full */
-
-#if !defined(AO_HAVE_char_fetch_and_add) && \
-    defined(AO_HAVE_char_fetch_and_add_release)
-#  define AO_char_fetch_and_add(addr, val) \
-       AO_char_fetch_and_add_release(addr, val)
-#  define AO_HAVE_char_fetch_and_add
-#endif
-#if !defined(AO_HAVE_char_fetch_and_add) && \
-    defined(AO_HAVE_char_fetch_and_add_acquire)
-#  define AO_char_fetch_and_add(addr, val) \
-       AO_char_fetch_and_add_acquire(addr, val)
-#  define AO_HAVE_char_fetch_and_add
-#endif
-#if !defined(AO_HAVE_char_fetch_and_add) && \
-    defined(AO_HAVE_char_fetch_and_add_write)
-#  define AO_char_fetch_and_add(addr, val) \
-       AO_char_fetch_and_add_write(addr, val)
-#  define AO_HAVE_char_fetch_and_add
-#endif
-#if !defined(AO_HAVE_char_fetch_and_add) && \
-    defined(AO_HAVE_char_fetch_and_add_read)
-#  define AO_char_fetch_and_add(addr, val) \
-       AO_char_fetch_and_add_read(addr, val)
-#  define AO_HAVE_char_fetch_and_add
-#endif
-
-#if defined(AO_HAVE_char_fetch_and_add_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_char_fetch_and_add_full)
-#  define AO_char_fetch_and_add_full(addr, val) \
-       (AO_nop_full(), AO_char_fetch_and_add_acquire(addr, val))
-#endif
-
-#if !defined(AO_HAVE_char_fetch_and_add_release_write) && \
-    defined(AO_HAVE_char_fetch_and_add_write)
-#  define AO_char_fetch_and_add_release_write(addr, val) \
-       AO_char_fetch_and_add_write(addr, val)
-#  define AO_HAVE_char_fetch_and_add_release_write
-#endif
-#if !defined(AO_HAVE_char_fetch_and_add_release_write) && \
-    defined(AO_HAVE_char_fetch_and_add_release)
-#  define AO_char_fetch_and_add_release_write(addr, val) \
-       AO_char_fetch_and_add_release(addr, val)
-#  define AO_HAVE_char_fetch_and_add_release_write
-#endif
-#if !defined(AO_HAVE_char_fetch_and_add_acquire_read) && \
-    defined(AO_HAVE_char_fetch_and_add_read)
-#  define AO_char_fetch_and_add_acquire_read(addr, val) \
-       AO_char_fetch_and_add_read(addr, val)
-#  define AO_HAVE_char_fetch_and_add_acquire_read
-#endif
-#if !defined(AO_HAVE_char_fetch_and_add_acquire_read) && \
-    defined(AO_HAVE_char_fetch_and_add_acquire)
-#  define AO_char_fetch_and_add_acquire_read(addr, val) \
-       AO_char_fetch_and_add_acquire(addr, val)
-#  define AO_HAVE_char_fetch_and_add_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_char_fetch_and_add_acquire_read)
-#    define AO_char_fetch_and_add_dd_acquire_read(addr, val) \
-       AO_char_fetch_and_add_acquire_read(addr, val)
-#    define AO_HAVE_char_fetch_and_add_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_char_fetch_and_add)
-#    define AO_char_fetch_and_add_dd_acquire_read(addr, val) \
-       AO_char_fetch_and_add(addr, val)
-#    define AO_HAVE_char_fetch_and_add_dd_acquire_read
-#  endif
-#endif
-  
-/* char_fetch_and_add1 */
-
-#if defined(AO_HAVE_char_fetch_and_add_full) &&\
-    !defined(AO_HAVE_char_fetch_and_add1_full)
-#  define AO_char_fetch_and_add1_full(addr) \
-       AO_char_fetch_and_add_full(addr,1)
-#  define AO_HAVE_char_fetch_and_add1_full
-#endif
-#if defined(AO_HAVE_char_fetch_and_add_release) &&\
-    !defined(AO_HAVE_char_fetch_and_add1_release)
-#  define AO_char_fetch_and_add1_release(addr) \
-       AO_char_fetch_and_add_release(addr,1)
-#  define AO_HAVE_char_fetch_and_add1_release
-#endif
-#if defined(AO_HAVE_char_fetch_and_add_acquire) &&\
-    !defined(AO_HAVE_char_fetch_and_add1_acquire)
-#  define AO_char_fetch_and_add1_acquire(addr) \
-       AO_char_fetch_and_add_acquire(addr,1)
-#  define AO_HAVE_char_fetch_and_add1_acquire
-#endif
-#if defined(AO_HAVE_char_fetch_and_add_write) &&\
-    !defined(AO_HAVE_char_fetch_and_add1_write)
-#  define AO_char_fetch_and_add1_write(addr) \
-       AO_char_fetch_and_add_write(addr,1)
-#  define AO_HAVE_char_fetch_and_add1_write
-#endif
-#if defined(AO_HAVE_char_fetch_and_add_read) &&\
-    !defined(AO_HAVE_char_fetch_and_add1_read)
-#  define AO_char_fetch_and_add1_read(addr) \
-       AO_char_fetch_and_add_read(addr,1)
-#  define AO_HAVE_char_fetch_and_add1_read
-#endif
-#if defined(AO_HAVE_char_fetch_and_add_release_write) &&\
-    !defined(AO_HAVE_char_fetch_and_add1_release_write)
-#  define AO_char_fetch_and_add1_release_write(addr) \
-       AO_char_fetch_and_add_release_write(addr,1)
-#  define AO_HAVE_char_fetch_and_add1_release_write
-#endif
-#if defined(AO_HAVE_char_fetch_and_add_acquire_read) &&\
-    !defined(AO_HAVE_char_fetch_and_add1_acquire_read)
-#  define AO_char_fetch_and_add1_acquire_read(addr) \
-       AO_char_fetch_and_add_acquire_read(addr,1)
-#  define AO_HAVE_char_fetch_and_add1_acquire_read
-#endif
-#if defined(AO_HAVE_char_fetch_and_add) &&\
-    !defined(AO_HAVE_char_fetch_and_add1)
-#  define AO_char_fetch_and_add1(addr) \
-       AO_char_fetch_and_add(addr,1)
-#  define AO_HAVE_char_fetch_and_add1
-#endif
-
-#if defined(AO_HAVE_char_fetch_and_add1_full)
-#  if !defined(AO_HAVE_char_fetch_and_add1_release)
-#    define AO_char_fetch_and_add1_release(addr) \
-        AO_char_fetch_and_add1_full(addr)
-#    define AO_HAVE_char_fetch_and_add1_release
-#  endif
-#  if !defined(AO_HAVE_char_fetch_and_add1_acquire)
-#    define AO_char_fetch_and_add1_acquire(addr) \
-        AO_char_fetch_and_add1_full(addr)
-#    define AO_HAVE_char_fetch_and_add1_acquire
-#  endif
-#  if !defined(AO_HAVE_char_fetch_and_add1_write)
-#    define AO_char_fetch_and_add1_write(addr) \
-        AO_char_fetch_and_add1_full(addr)
-#    define AO_HAVE_char_fetch_and_add1_write
-#  endif
-#  if !defined(AO_HAVE_char_fetch_and_add1_read)
-#    define AO_char_fetch_and_add1_read(addr) \
-        AO_char_fetch_and_add1_full(addr)
-#    define AO_HAVE_char_fetch_and_add1_read
-#  endif
-#endif /* AO_HAVE_char_fetch_and_add1_full */
-
-#if !defined(AO_HAVE_char_fetch_and_add1) && \
-    defined(AO_HAVE_char_fetch_and_add1_release)
-#  define AO_char_fetch_and_add1(addr) \
-       AO_char_fetch_and_add1_release(addr)
-#  define AO_HAVE_char_fetch_and_add1
-#endif
-#if !defined(AO_HAVE_char_fetch_and_add1) && \
-    defined(AO_HAVE_char_fetch_and_add1_acquire)
-#  define AO_char_fetch_and_add1(addr) \
-       AO_char_fetch_and_add1_acquire(addr)
-#  define AO_HAVE_char_fetch_and_add1
-#endif
-#if !defined(AO_HAVE_char_fetch_and_add1) && \
-    defined(AO_HAVE_char_fetch_and_add1_write)
-#  define AO_char_fetch_and_add1(addr) \
-       AO_char_fetch_and_add1_write(addr)
-#  define AO_HAVE_char_fetch_and_add1
-#endif
-#if !defined(AO_HAVE_char_fetch_and_add1) && \
-    defined(AO_HAVE_char_fetch_and_add1_read)
-#  define AO_char_fetch_and_add1(addr) \
-       AO_char_fetch_and_add1_read(addr)
-#  define AO_HAVE_char_fetch_and_add1
-#endif
-
-#if defined(AO_HAVE_char_fetch_and_add1_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_char_fetch_and_add1_full)
-#  define AO_char_fetch_and_add1_full(addr) \
-       (AO_nop_full(), AO_char_fetch_and_add1_acquire(addr))
-#  define AO_HAVE_char_fetch_and_add1_full
-#endif
-
-#if !defined(AO_HAVE_char_fetch_and_add1_release_write) && \
-    defined(AO_HAVE_char_fetch_and_add1_write)
-#  define AO_char_fetch_and_add1_release_write(addr) \
-       AO_char_fetch_and_add1_write(addr)
-#  define AO_HAVE_char_fetch_and_add1_release_write
-#endif
-#if !defined(AO_HAVE_char_fetch_and_add1_release_write) && \
-    defined(AO_HAVE_char_fetch_and_add1_release)
-#  define AO_char_fetch_and_add1_release_write(addr) \
-       AO_char_fetch_and_add1_release(addr)
-#  define AO_HAVE_char_fetch_and_add1_release_write
-#endif
-#if !defined(AO_HAVE_char_fetch_and_add1_acquire_read) && \
-    defined(AO_HAVE_char_fetch_and_add1_read)
-#  define AO_char_fetch_and_add1_acquire_read(addr) \
-       AO_char_fetch_and_add1_read(addr)
-#  define AO_HAVE_char_fetch_and_add1_acquire_read
-#endif
-#if !defined(AO_HAVE_char_fetch_and_add1_acquire_read) && \
-    defined(AO_HAVE_char_fetch_and_add1_acquire)
-#  define AO_char_fetch_and_add1_acquire_read(addr) \
-       AO_char_fetch_and_add1_acquire(addr)
-#  define AO_HAVE_char_fetch_and_add1_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_char_fetch_and_add1_acquire_read)
-#    define AO_char_fetch_and_add1_dd_acquire_read(addr) \
-       AO_char_fetch_and_add1_acquire_read(addr)
-#    define AO_HAVE_char_fetch_and_add1_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_char_fetch_and_add1)
-#    define AO_char_fetch_and_add1_dd_acquire_read(addr) \
-       AO_char_fetch_and_add1(addr)
-#    define AO_HAVE_char_fetch_and_add1_dd_acquire_read
-#  endif
-#endif
-
-/* char_fetch_and_sub1 */
-
-#if defined(AO_HAVE_char_fetch_and_add_full) &&\
-    !defined(AO_HAVE_char_fetch_and_sub1_full)
-#  define AO_char_fetch_and_sub1_full(addr) \
-       AO_char_fetch_and_add_full(addr,(unsigned char)(-1))
-#  define AO_HAVE_char_fetch_and_sub1_full
-#endif
-#if defined(AO_HAVE_char_fetch_and_add_release) &&\
-    !defined(AO_HAVE_char_fetch_and_sub1_release)
-#  define AO_char_fetch_and_sub1_release(addr) \
-       AO_char_fetch_and_add_release(addr,(unsigned char)(-1))
-#  define AO_HAVE_char_fetch_and_sub1_release
-#endif
-#if defined(AO_HAVE_char_fetch_and_add_acquire) &&\
-    !defined(AO_HAVE_char_fetch_and_sub1_acquire)
-#  define AO_char_fetch_and_sub1_acquire(addr) \
-       AO_char_fetch_and_add_acquire(addr,(unsigned char)(-1))
-#  define AO_HAVE_char_fetch_and_sub1_acquire
-#endif
-#if defined(AO_HAVE_char_fetch_and_add_write) &&\
-    !defined(AO_HAVE_char_fetch_and_sub1_write)
-#  define AO_char_fetch_and_sub1_write(addr) \
-       AO_char_fetch_and_add_write(addr,(unsigned char)(-1))
-#  define AO_HAVE_char_fetch_and_sub1_write
-#endif
-#if defined(AO_HAVE_char_fetch_and_add_read) &&\
-    !defined(AO_HAVE_char_fetch_and_sub1_read)
-#  define AO_char_fetch_and_sub1_read(addr) \
-       AO_char_fetch_and_add_read(addr,(unsigned char)(-1))
-#  define AO_HAVE_char_fetch_and_sub1_read
-#endif
-#if defined(AO_HAVE_char_fetch_and_add_release_write) &&\
-    !defined(AO_HAVE_char_fetch_and_sub1_release_write)
-#  define AO_char_fetch_and_sub1_release_write(addr) \
-       AO_char_fetch_and_add_release_write(addr,(unsigned char)(-1))
-#  define AO_HAVE_char_fetch_and_sub1_release_write
-#endif
-#if defined(AO_HAVE_char_fetch_and_add_acquire_read) &&\
-    !defined(AO_HAVE_char_fetch_and_sub1_acquire_read)
-#  define AO_char_fetch_and_sub1_acquire_read(addr) \
-       AO_char_fetch_and_add_acquire_read(addr,(unsigned char)(-1))
-#  define AO_HAVE_char_fetch_and_sub1_acquire_read
-#endif
-#if defined(AO_HAVE_char_fetch_and_add) &&\
-    !defined(AO_HAVE_char_fetch_and_sub1)
-#  define AO_char_fetch_and_sub1(addr) \
-       AO_char_fetch_and_add(addr,(unsigned char)(-1))
-#  define AO_HAVE_char_fetch_and_sub1
-#endif
-
-#if defined(AO_HAVE_char_fetch_and_sub1_full)
-#  if !defined(AO_HAVE_char_fetch_and_sub1_release)
-#    define AO_char_fetch_and_sub1_release(addr) \
-        AO_char_fetch_and_sub1_full(addr)
-#    define AO_HAVE_char_fetch_and_sub1_release
-#  endif
-#  if !defined(AO_HAVE_char_fetch_and_sub1_acquire)
-#    define AO_char_fetch_and_sub1_acquire(addr) \
-        AO_char_fetch_and_sub1_full(addr)
-#    define AO_HAVE_char_fetch_and_sub1_acquire
-#  endif
-#  if !defined(AO_HAVE_char_fetch_and_sub1_write)
-#    define AO_char_fetch_and_sub1_write(addr) \
-        AO_char_fetch_and_sub1_full(addr)
-#    define AO_HAVE_char_fetch_and_sub1_write
-#  endif
-#  if !defined(AO_HAVE_char_fetch_and_sub1_read)
-#    define AO_char_fetch_and_sub1_read(addr) \
-        AO_char_fetch_and_sub1_full(addr)
-#    define AO_HAVE_char_fetch_and_sub1_read
-#  endif
-#endif /* AO_HAVE_char_fetch_and_sub1_full */
-
-#if !defined(AO_HAVE_char_fetch_and_sub1) && \
-    defined(AO_HAVE_char_fetch_and_sub1_release)
-#  define AO_char_fetch_and_sub1(addr) \
-       AO_char_fetch_and_sub1_release(addr)
-#  define AO_HAVE_char_fetch_and_sub1
-#endif
-#if !defined(AO_HAVE_char_fetch_and_sub1) && \
-    defined(AO_HAVE_char_fetch_and_sub1_acquire)
-#  define AO_char_fetch_and_sub1(addr) \
-       AO_char_fetch_and_sub1_acquire(addr)
-#  define AO_HAVE_char_fetch_and_sub1
-#endif
-#if !defined(AO_HAVE_char_fetch_and_sub1) && \
-    defined(AO_HAVE_char_fetch_and_sub1_write)
-#  define AO_char_fetch_and_sub1(addr) \
-       AO_char_fetch_and_sub1_write(addr)
-#  define AO_HAVE_char_fetch_and_sub1
-#endif
-#if !defined(AO_HAVE_char_fetch_and_sub1) && \
-    defined(AO_HAVE_char_fetch_and_sub1_read)
-#  define AO_char_fetch_and_sub1(addr) \
-       AO_char_fetch_and_sub1_read(addr)
-#  define AO_HAVE_char_fetch_and_sub1
-#endif
-
-#if defined(AO_HAVE_char_fetch_and_sub1_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_char_fetch_and_sub1_full)
-#  define AO_char_fetch_and_sub1_full(addr) \
-       (AO_nop_full(), AO_char_fetch_and_sub1_acquire(addr))
-#  define AO_HAVE_char_fetch_and_sub1_full
-#endif
-
-#if !defined(AO_HAVE_char_fetch_and_sub1_release_write) && \
-    defined(AO_HAVE_char_fetch_and_sub1_write)
-#  define AO_char_fetch_and_sub1_release_write(addr) \
-       AO_char_fetch_and_sub1_write(addr)
-#  define AO_HAVE_char_fetch_and_sub1_release_write
-#endif
-#if !defined(AO_HAVE_char_fetch_and_sub1_release_write) && \
-    defined(AO_HAVE_char_fetch_and_sub1_release)
-#  define AO_char_fetch_and_sub1_release_write(addr) \
-       AO_char_fetch_and_sub1_release(addr)
-#  define AO_HAVE_char_fetch_and_sub1_release_write
-#endif
-#if !defined(AO_HAVE_char_fetch_and_sub1_acquire_read) && \
-    defined(AO_HAVE_char_fetch_and_sub1_read)
-#  define AO_char_fetch_and_sub1_acquire_read(addr) \
-       AO_char_fetch_and_sub1_read(addr)
-#  define AO_HAVE_char_fetch_and_sub1_acquire_read
-#endif
-#if !defined(AO_HAVE_char_fetch_and_sub1_acquire_read) && \
-    defined(AO_HAVE_char_fetch_and_sub1_acquire)
-#  define AO_char_fetch_and_sub1_acquire_read(addr) \
-       AO_char_fetch_and_sub1_acquire(addr)
-#  define AO_HAVE_char_fetch_and_sub1_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_char_fetch_and_sub1_acquire_read)
-#    define AO_char_fetch_and_sub1_dd_acquire_read(addr) \
-       AO_char_fetch_and_sub1_acquire_read(addr)
-#    define AO_HAVE_char_fetch_and_sub1_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_char_fetch_and_sub1)
-#    define AO_char_fetch_and_sub1_dd_acquire_read(addr) \
-       AO_char_fetch_and_sub1(addr)
-#    define AO_HAVE_char_fetch_and_sub1_dd_acquire_read
-#  endif
-#endif
-
-/* short_load */
-#if defined(AO_HAVE_short_load_acquire) && !defined(AO_HAVE_short_load)
-#  define AO_short_load(addr) AO_short_load_acquire(addr)
-#  define AO_HAVE_short_load
-#endif
-
-#if defined(AO_HAVE_short_load_full) && !defined(AO_HAVE_short_load_acquire)
-#  define AO_short_load_acquire(addr) AO_short_load_full(addr)
-#  define AO_HAVE_short_load_acquire
-#endif
-
-#if defined(AO_HAVE_short_load_full) && !defined(AO_HAVE_short_load_read)
-#  define AO_short_load_read(addr) AO_short_load_full(addr)
-#  define AO_HAVE_short_load_read
-#endif
-
-#if !defined(AO_HAVE_short_load_acquire_read) && defined(AO_HAVE_short_load_acquire)
-#  define AO_short_load_acquire_read(addr) AO_short_load_acquire(addr)
-#  define AO_HAVE_short_load_acquire_read
-#endif
-
-#if defined(AO_HAVE_short_load) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_short_load_acquire)
-   AO_INLINE unsigned short
-   AO_short_load_acquire(const volatile unsigned short *addr)
-   {
-     unsigned short result = AO_short_load(addr);
-     /* Acquire barrier would be useless, since the load could be delayed  */
-     /* beyond it.                                                        */
-     AO_nop_full();
-     return result;
-   }
-#  define AO_HAVE_short_load_acquire
-#endif
-
-#if defined(AO_HAVE_short_load) && defined(AO_HAVE_nop_read) && \
-    !defined(AO_HAVE_short_load_read)
-   AO_INLINE unsigned short
-   AO_short_load_read(const volatile unsigned short *addr)
-   {
-     unsigned short result = AO_short_load(addr);
-     /* Acquire barrier would be useless, since the load could be delayed  */
-     /* beyond it.                                                        */
-     AO_nop_read();
-     return result;
-   }
-#  define AO_HAVE_short_load_read
-#endif
-
-#if defined(AO_HAVE_short_load_acquire) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_short_load_full)
-#  define AO_short_load_full(addr) (AO_nop_full(), AO_short_load_acquire(addr))
-#  define AO_HAVE_short_load_full
-#endif
-#if !defined(AO_HAVE_short_load_acquire_read) && defined(AO_HAVE_short_load_read)
-#  define AO_short_load_acquire_read(addr) AO_short_load_read(addr)
-#  define AO_HAVE_short_load_acquire_read
-#endif
-
-#if defined(AO_HAVE_short_load_acquire_read) && !defined(AO_HAVE_short_load)
-#  define AO_short_load(addr) AO_short_load_acquire_read(addr)
-#  define AO_HAVE_short_load
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_short_load_acquire_read)
-#    define AO_short_load_dd_acquire_read(addr) \
-       AO_short_load_acquire_read(addr)
-#    define AO_HAVE_short_load_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_short_load)
-#    define AO_short_load_dd_acquire_read(addr) \
-       AO_short_load(addr)
-#    define AO_HAVE_short_load_dd_acquire_read
-#  endif
-#endif
-
-
-/* short_store */
-
-#if defined(AO_HAVE_short_store_release) && !defined(AO_HAVE_short_store)
-#  define AO_short_store(addr, val) AO_short_store_release(addr,val)
-#  define AO_HAVE_short_store
-#endif
-
-#if defined(AO_HAVE_short_store_full) && !defined(AO_HAVE_short_store_release)
-#  define AO_short_store_release(addr,val) AO_short_store_full(addr,val)
-#  define AO_HAVE_short_store_release
-#endif
-
-#if defined(AO_HAVE_short_store_full) && !defined(AO_HAVE_short_store_write)
-#  define AO_short_store_write(addr,val) AO_short_store_full(addr,val)
-#  define AO_HAVE_short_store_write
-#endif
-
-#if defined(AO_HAVE_short_store_release) && \
-       !defined(AO_HAVE_short_store_release_write)
-#  define AO_short_store_release_write(addr, val) \
-       AO_short_store_release(addr,val)
-#  define AO_HAVE_short_store_release_write
-#endif
-
-#if defined(AO_HAVE_short_store_write) && !defined(AO_HAVE_short_store)
-#  define AO_short_store(addr, val) AO_short_store_write(addr,val)
-#  define AO_HAVE_short_store
-#endif
-
-#if defined(AO_HAVE_short_store) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_short_store_release)
-#  define AO_short_store_release(addr,val) \
-       (AO_nop_full(), AO_short_store(addr,val))
-#  define AO_HAVE_short_store_release
-#endif
-
-#if defined(AO_HAVE_nop_write) && defined(AO_HAVE_short_store) && \
-     !defined(AO_HAVE_short_store_write)
-#  define AO_short_store_write(addr, val) \
-       (AO_nop_write(), AO_short_store(addr,val))
-#  define AO_HAVE_short_store_write
-#endif
-
-#if defined(AO_HAVE_short_store_write) && \
-     !defined(AO_HAVE_short_store_release_write)
-#  define AO_short_store_release_write(addr, val) AO_short_store_write(addr,val)
-#  define AO_HAVE_short_store_release_write
-#endif
-
-#if defined(AO_HAVE_short_store_release) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_short_store_full)
-#  define AO_short_store_full(addr, val) \
-       (AO_short_store_release(addr, val), AO_nop_full())
-#  define AO_HAVE_short_store_full
-#endif
-
-
-/* short_fetch_and_add */
-#if defined(AO_HAVE_short_compare_and_swap_full) && \
-    !defined(AO_HAVE_short_fetch_and_add_full)
-   AO_INLINE AO_t
-   AO_short_fetch_and_add_full(volatile unsigned short *addr,
-                              unsigned short incr)
-   {
-     unsigned short old;
-     do
-       {
-         old = *addr;
-       }
-     while (!AO_short_compare_and_swap_full(addr, old, old+incr));
-     return old;
-   }
-#  define AO_HAVE_short_fetch_and_add_full
-#endif
-
-#if defined(AO_HAVE_short_compare_and_swap_acquire) && \
-    !defined(AO_HAVE_short_fetch_and_add_acquire)
-   AO_INLINE AO_t
-   AO_short_fetch_and_add_acquire(volatile unsigned short *addr,
-                                 unsigned short incr)
-   {
-     unsigned short old;
-     do
-       {
-         old = *addr;
-       }
-     while (!AO_short_compare_and_swap_acquire(addr, old, old+incr));
-     return old;
-   }
-#  define AO_HAVE_short_fetch_and_add_acquire
-#endif
-
-#if defined(AO_HAVE_short_compare_and_swap_release) && \
-    !defined(AO_HAVE_short_fetch_and_add_release)
-   AO_INLINE AO_t
-   AO_short_fetch_and_add_release(volatile unsigned short *addr,
-                                 unsigned short incr)
-   {
-     unsigned short old;
-     do
-       {
-         old = *addr;
-       }
-     while (!AO_short_compare_and_swap_release(addr, old, old+incr));
-     return old;
-   }
-#  define AO_HAVE_short_fetch_and_add_release
-#endif
-
-#if defined(AO_HAVE_short_fetch_and_add_full)
-#  if !defined(AO_HAVE_short_fetch_and_add_release)
-#    define AO_short_fetch_and_add_release(addr, val) \
-        AO_short_fetch_and_add_full(addr, val)
-#    define AO_HAVE_short_fetch_and_add_release
-#  endif
-#  if !defined(AO_HAVE_short_fetch_and_add_acquire)
-#    define AO_short_fetch_and_add_acquire(addr, val) \
-        AO_short_fetch_and_add_full(addr, val)
-#    define AO_HAVE_short_fetch_and_add_acquire
-#  endif
-#  if !defined(AO_HAVE_short_fetch_and_add_write)
-#    define AO_short_fetch_and_add_write(addr, val) \
-        AO_short_fetch_and_add_full(addr, val)
-#    define AO_HAVE_short_fetch_and_add_write
-#  endif
-#  if !defined(AO_HAVE_short_fetch_and_add_read)
-#    define AO_short_fetch_and_add_read(addr, val) \
-        AO_short_fetch_and_add_full(addr, val)
-#    define AO_HAVE_short_fetch_and_add_read
-#  endif
-#endif /* AO_HAVE_short_fetch_and_add_full */
-
-#if !defined(AO_HAVE_short_fetch_and_add) && \
-    defined(AO_HAVE_short_fetch_and_add_release)
-#  define AO_short_fetch_and_add(addr, val) \
-       AO_short_fetch_and_add_release(addr, val)
-#  define AO_HAVE_short_fetch_and_add
-#endif
-#if !defined(AO_HAVE_short_fetch_and_add) && \
-    defined(AO_HAVE_short_fetch_and_add_acquire)
-#  define AO_short_fetch_and_add(addr, val) \
-       AO_short_fetch_and_add_acquire(addr, val)
-#  define AO_HAVE_short_fetch_and_add
-#endif
-#if !defined(AO_HAVE_short_fetch_and_add) && \
-    defined(AO_HAVE_short_fetch_and_add_write)
-#  define AO_short_fetch_and_add(addr, val) \
-       AO_short_fetch_and_add_write(addr, val)
-#  define AO_HAVE_short_fetch_and_add
-#endif
-#if !defined(AO_HAVE_short_fetch_and_add) && \
-    defined(AO_HAVE_short_fetch_and_add_read)
-#  define AO_short_fetch_and_add(addr, val) \
-       AO_short_fetch_and_add_read(addr, val)
-#  define AO_HAVE_short_fetch_and_add
-#endif
-
-#if defined(AO_HAVE_short_fetch_and_add_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_short_fetch_and_add_full)
-#  define AO_short_fetch_and_add_full(addr, val) \
-       (AO_nop_full(), AO_short_fetch_and_add_acquire(addr, val))
-#endif
-
-#if !defined(AO_HAVE_short_fetch_and_add_release_write) && \
-    defined(AO_HAVE_short_fetch_and_add_write)
-#  define AO_short_fetch_and_add_release_write(addr, val) \
-       AO_short_fetch_and_add_write(addr, val)
-#  define AO_HAVE_short_fetch_and_add_release_write
-#endif
-#if !defined(AO_HAVE_short_fetch_and_add_release_write) && \
-    defined(AO_HAVE_short_fetch_and_add_release)
-#  define AO_short_fetch_and_add_release_write(addr, val) \
-       AO_short_fetch_and_add_release(addr, val)
-#  define AO_HAVE_short_fetch_and_add_release_write
-#endif
-#if !defined(AO_HAVE_short_fetch_and_add_acquire_read) && \
-    defined(AO_HAVE_short_fetch_and_add_read)
-#  define AO_short_fetch_and_add_acquire_read(addr, val) \
-       AO_short_fetch_and_add_read(addr, val)
-#  define AO_HAVE_short_fetch_and_add_acquire_read
-#endif
-#if !defined(AO_HAVE_short_fetch_and_add_acquire_read) && \
-    defined(AO_HAVE_short_fetch_and_add_acquire)
-#  define AO_short_fetch_and_add_acquire_read(addr, val) \
-       AO_short_fetch_and_add_acquire(addr, val)
-#  define AO_HAVE_short_fetch_and_add_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_short_fetch_and_add_acquire_read)
-#    define AO_short_fetch_and_add_dd_acquire_read(addr, val) \
-       AO_short_fetch_and_add_acquire_read(addr, val)
-#    define AO_HAVE_short_fetch_and_add_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_short_fetch_and_add)
-#    define AO_short_fetch_and_add_dd_acquire_read(addr, val) \
-       AO_short_fetch_and_add(addr, val)
-#    define AO_HAVE_short_fetch_and_add_dd_acquire_read
-#  endif
-#endif
-  
-/* short_fetch_and_add1 */
-
-#if defined(AO_HAVE_short_fetch_and_add_full) &&\
-    !defined(AO_HAVE_short_fetch_and_add1_full)
-#  define AO_short_fetch_and_add1_full(addr) \
-       AO_short_fetch_and_add_full(addr,1)
-#  define AO_HAVE_short_fetch_and_add1_full
-#endif
-#if defined(AO_HAVE_short_fetch_and_add_release) &&\
-    !defined(AO_HAVE_short_fetch_and_add1_release)
-#  define AO_short_fetch_and_add1_release(addr) \
-       AO_short_fetch_and_add_release(addr,1)
-#  define AO_HAVE_short_fetch_and_add1_release
-#endif
-#if defined(AO_HAVE_short_fetch_and_add_acquire) &&\
-    !defined(AO_HAVE_short_fetch_and_add1_acquire)
-#  define AO_short_fetch_and_add1_acquire(addr) \
-       AO_short_fetch_and_add_acquire(addr,1)
-#  define AO_HAVE_short_fetch_and_add1_acquire
-#endif
-#if defined(AO_HAVE_short_fetch_and_add_write) &&\
-    !defined(AO_HAVE_short_fetch_and_add1_write)
-#  define AO_short_fetch_and_add1_write(addr) \
-       AO_short_fetch_and_add_write(addr,1)
-#  define AO_HAVE_short_fetch_and_add1_write
-#endif
-#if defined(AO_HAVE_short_fetch_and_add_read) &&\
-    !defined(AO_HAVE_short_fetch_and_add1_read)
-#  define AO_short_fetch_and_add1_read(addr) \
-       AO_short_fetch_and_add_read(addr,1)
-#  define AO_HAVE_short_fetch_and_add1_read
-#endif
-#if defined(AO_HAVE_short_fetch_and_add_release_write) &&\
-    !defined(AO_HAVE_short_fetch_and_add1_release_write)
-#  define AO_short_fetch_and_add1_release_write(addr) \
-       AO_short_fetch_and_add_release_write(addr,1)
-#  define AO_HAVE_short_fetch_and_add1_release_write
-#endif
-#if defined(AO_HAVE_short_fetch_and_add_acquire_read) &&\
-    !defined(AO_HAVE_short_fetch_and_add1_acquire_read)
-#  define AO_short_fetch_and_add1_acquire_read(addr) \
-       AO_short_fetch_and_add_acquire_read(addr,1)
-#  define AO_HAVE_short_fetch_and_add1_acquire_read
-#endif
-#if defined(AO_HAVE_short_fetch_and_add) &&\
-    !defined(AO_HAVE_short_fetch_and_add1)
-#  define AO_short_fetch_and_add1(addr) \
-       AO_short_fetch_and_add(addr,1)
-#  define AO_HAVE_short_fetch_and_add1
-#endif
-
-#if defined(AO_HAVE_short_fetch_and_add1_full)
-#  if !defined(AO_HAVE_short_fetch_and_add1_release)
-#    define AO_short_fetch_and_add1_release(addr) \
-        AO_short_fetch_and_add1_full(addr)
-#    define AO_HAVE_short_fetch_and_add1_release
-#  endif
-#  if !defined(AO_HAVE_short_fetch_and_add1_acquire)
-#    define AO_short_fetch_and_add1_acquire(addr) \
-        AO_short_fetch_and_add1_full(addr)
-#    define AO_HAVE_short_fetch_and_add1_acquire
-#  endif
-#  if !defined(AO_HAVE_short_fetch_and_add1_write)
-#    define AO_short_fetch_and_add1_write(addr) \
-        AO_short_fetch_and_add1_full(addr)
-#    define AO_HAVE_short_fetch_and_add1_write
-#  endif
-#  if !defined(AO_HAVE_short_fetch_and_add1_read)
-#    define AO_short_fetch_and_add1_read(addr) \
-        AO_short_fetch_and_add1_full(addr)
-#    define AO_HAVE_short_fetch_and_add1_read
-#  endif
-#endif /* AO_HAVE_short_fetch_and_add1_full */
-
-#if !defined(AO_HAVE_short_fetch_and_add1) && \
-    defined(AO_HAVE_short_fetch_and_add1_release)
-#  define AO_short_fetch_and_add1(addr) \
-       AO_short_fetch_and_add1_release(addr)
-#  define AO_HAVE_short_fetch_and_add1
-#endif
-#if !defined(AO_HAVE_short_fetch_and_add1) && \
-    defined(AO_HAVE_short_fetch_and_add1_acquire)
-#  define AO_short_fetch_and_add1(addr) \
-       AO_short_fetch_and_add1_acquire(addr)
-#  define AO_HAVE_short_fetch_and_add1
-#endif
-#if !defined(AO_HAVE_short_fetch_and_add1) && \
-    defined(AO_HAVE_short_fetch_and_add1_write)
-#  define AO_short_fetch_and_add1(addr) \
-       AO_short_fetch_and_add1_write(addr)
-#  define AO_HAVE_short_fetch_and_add1
-#endif
-#if !defined(AO_HAVE_short_fetch_and_add1) && \
-    defined(AO_HAVE_short_fetch_and_add1_read)
-#  define AO_short_fetch_and_add1(addr) \
-       AO_short_fetch_and_add1_read(addr)
-#  define AO_HAVE_short_fetch_and_add1
-#endif
-
-#if defined(AO_HAVE_short_fetch_and_add1_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_short_fetch_and_add1_full)
-#  define AO_short_fetch_and_add1_full(addr) \
-       (AO_nop_full(), AO_short_fetch_and_add1_acquire(addr))
-#  define AO_HAVE_short_fetch_and_add1_full
-#endif
-
-#if !defined(AO_HAVE_short_fetch_and_add1_release_write) && \
-    defined(AO_HAVE_short_fetch_and_add1_write)
-#  define AO_short_fetch_and_add1_release_write(addr) \
-       AO_short_fetch_and_add1_write(addr)
-#  define AO_HAVE_short_fetch_and_add1_release_write
-#endif
-#if !defined(AO_HAVE_short_fetch_and_add1_release_write) && \
-    defined(AO_HAVE_short_fetch_and_add1_release)
-#  define AO_short_fetch_and_add1_release_write(addr) \
-       AO_short_fetch_and_add1_release(addr)
-#  define AO_HAVE_short_fetch_and_add1_release_write
-#endif
-#if !defined(AO_HAVE_short_fetch_and_add1_acquire_read) && \
-    defined(AO_HAVE_short_fetch_and_add1_read)
-#  define AO_short_fetch_and_add1_acquire_read(addr) \
-       AO_short_fetch_and_add1_read(addr)
-#  define AO_HAVE_short_fetch_and_add1_acquire_read
-#endif
-#if !defined(AO_HAVE_short_fetch_and_add1_acquire_read) && \
-    defined(AO_HAVE_short_fetch_and_add1_acquire)
-#  define AO_short_fetch_and_add1_acquire_read(addr) \
-       AO_short_fetch_and_add1_acquire(addr)
-#  define AO_HAVE_short_fetch_and_add1_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_short_fetch_and_add1_acquire_read)
-#    define AO_short_fetch_and_add1_dd_acquire_read(addr) \
-       AO_short_fetch_and_add1_acquire_read(addr)
-#    define AO_HAVE_short_fetch_and_add1_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_short_fetch_and_add1)
-#    define AO_short_fetch_and_add1_dd_acquire_read(addr) \
-       AO_short_fetch_and_add1(addr)
-#    define AO_HAVE_short_fetch_and_add1_dd_acquire_read
-#  endif
-#endif
-
-/* short_fetch_and_sub1 */
-
-#if defined(AO_HAVE_short_fetch_and_add_full) &&\
-    !defined(AO_HAVE_short_fetch_and_sub1_full)
-#  define AO_short_fetch_and_sub1_full(addr) \
-       AO_short_fetch_and_add_full(addr,(unsigned short)(-1))
-#  define AO_HAVE_short_fetch_and_sub1_full
-#endif
-#if defined(AO_HAVE_short_fetch_and_add_release) &&\
-    !defined(AO_HAVE_short_fetch_and_sub1_release)
-#  define AO_short_fetch_and_sub1_release(addr) \
-       AO_short_fetch_and_add_release(addr,(unsigned short)(-1))
-#  define AO_HAVE_short_fetch_and_sub1_release
-#endif
-#if defined(AO_HAVE_short_fetch_and_add_acquire) &&\
-    !defined(AO_HAVE_short_fetch_and_sub1_acquire)
-#  define AO_short_fetch_and_sub1_acquire(addr) \
-       AO_short_fetch_and_add_acquire(addr,(unsigned short)(-1))
-#  define AO_HAVE_short_fetch_and_sub1_acquire
-#endif
-#if defined(AO_HAVE_short_fetch_and_add_write) &&\
-    !defined(AO_HAVE_short_fetch_and_sub1_write)
-#  define AO_short_fetch_and_sub1_write(addr) \
-       AO_short_fetch_and_add_write(addr,(unsigned short)(-1))
-#  define AO_HAVE_short_fetch_and_sub1_write
-#endif
-#if defined(AO_HAVE_short_fetch_and_add_read) &&\
-    !defined(AO_HAVE_short_fetch_and_sub1_read)
-#  define AO_short_fetch_and_sub1_read(addr) \
-       AO_short_fetch_and_add_read(addr,(unsigned short)(-1))
-#  define AO_HAVE_short_fetch_and_sub1_read
-#endif
-#if defined(AO_HAVE_short_fetch_and_add_release_write) &&\
-    !defined(AO_HAVE_short_fetch_and_sub1_release_write)
-#  define AO_short_fetch_and_sub1_release_write(addr) \
-       AO_short_fetch_and_add_release_write(addr,(unsigned short)(-1))
-#  define AO_HAVE_short_fetch_and_sub1_release_write
-#endif
-#if defined(AO_HAVE_short_fetch_and_add_acquire_read) &&\
-    !defined(AO_HAVE_short_fetch_and_sub1_acquire_read)
-#  define AO_short_fetch_and_sub1_acquire_read(addr) \
-       AO_short_fetch_and_add_acquire_read(addr,(unsigned short)(-1))
-#  define AO_HAVE_short_fetch_and_sub1_acquire_read
-#endif
-#if defined(AO_HAVE_short_fetch_and_add) &&\
-    !defined(AO_HAVE_short_fetch_and_sub1)
-#  define AO_short_fetch_and_sub1(addr) \
-       AO_short_fetch_and_add(addr,(unsigned short)(-1))
-#  define AO_HAVE_short_fetch_and_sub1
-#endif
-
-#if defined(AO_HAVE_short_fetch_and_sub1_full)
-#  if !defined(AO_HAVE_short_fetch_and_sub1_release)
-#    define AO_short_fetch_and_sub1_release(addr) \
-        AO_short_fetch_and_sub1_full(addr)
-#    define AO_HAVE_short_fetch_and_sub1_release
-#  endif
-#  if !defined(AO_HAVE_short_fetch_and_sub1_acquire)
-#    define AO_short_fetch_and_sub1_acquire(addr) \
-        AO_short_fetch_and_sub1_full(addr)
-#    define AO_HAVE_short_fetch_and_sub1_acquire
-#  endif
-#  if !defined(AO_HAVE_short_fetch_and_sub1_write)
-#    define AO_short_fetch_and_sub1_write(addr) \
-        AO_short_fetch_and_sub1_full(addr)
-#    define AO_HAVE_short_fetch_and_sub1_write
-#  endif
-#  if !defined(AO_HAVE_short_fetch_and_sub1_read)
-#    define AO_short_fetch_and_sub1_read(addr) \
-        AO_short_fetch_and_sub1_full(addr)
-#    define AO_HAVE_short_fetch_and_sub1_read
-#  endif
-#endif /* AO_HAVE_short_fetch_and_sub1_full */
-
-#if !defined(AO_HAVE_short_fetch_and_sub1) && \
-    defined(AO_HAVE_short_fetch_and_sub1_release)
-#  define AO_short_fetch_and_sub1(addr) \
-       AO_short_fetch_and_sub1_release(addr)
-#  define AO_HAVE_short_fetch_and_sub1
-#endif
-#if !defined(AO_HAVE_short_fetch_and_sub1) && \
-    defined(AO_HAVE_short_fetch_and_sub1_acquire)
-#  define AO_short_fetch_and_sub1(addr) \
-       AO_short_fetch_and_sub1_acquire(addr)
-#  define AO_HAVE_short_fetch_and_sub1
-#endif
-#if !defined(AO_HAVE_short_fetch_and_sub1) && \
-    defined(AO_HAVE_short_fetch_and_sub1_write)
-#  define AO_short_fetch_and_sub1(addr) \
-       AO_short_fetch_and_sub1_write(addr)
-#  define AO_HAVE_short_fetch_and_sub1
-#endif
-#if !defined(AO_HAVE_short_fetch_and_sub1) && \
-    defined(AO_HAVE_short_fetch_and_sub1_read)
-#  define AO_short_fetch_and_sub1(addr) \
-       AO_short_fetch_and_sub1_read(addr)
-#  define AO_HAVE_short_fetch_and_sub1
-#endif
-
-#if defined(AO_HAVE_short_fetch_and_sub1_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_short_fetch_and_sub1_full)
-#  define AO_short_fetch_and_sub1_full(addr) \
-       (AO_nop_full(), AO_short_fetch_and_sub1_acquire(addr))
-#  define AO_HAVE_short_fetch_and_sub1_full
-#endif
-
-#if !defined(AO_HAVE_short_fetch_and_sub1_release_write) && \
-    defined(AO_HAVE_short_fetch_and_sub1_write)
-#  define AO_short_fetch_and_sub1_release_write(addr) \
-       AO_short_fetch_and_sub1_write(addr)
-#  define AO_HAVE_short_fetch_and_sub1_release_write
-#endif
-#if !defined(AO_HAVE_short_fetch_and_sub1_release_write) && \
-    defined(AO_HAVE_short_fetch_and_sub1_release)
-#  define AO_short_fetch_and_sub1_release_write(addr) \
-       AO_short_fetch_and_sub1_release(addr)
-#  define AO_HAVE_short_fetch_and_sub1_release_write
-#endif
-#if !defined(AO_HAVE_short_fetch_and_sub1_acquire_read) && \
-    defined(AO_HAVE_short_fetch_and_sub1_read)
-#  define AO_short_fetch_and_sub1_acquire_read(addr) \
-       AO_short_fetch_and_sub1_read(addr)
-#  define AO_HAVE_short_fetch_and_sub1_acquire_read
-#endif
-#if !defined(AO_HAVE_short_fetch_and_sub1_acquire_read) && \
-    defined(AO_HAVE_short_fetch_and_sub1_acquire)
-#  define AO_short_fetch_and_sub1_acquire_read(addr) \
-       AO_short_fetch_and_sub1_acquire(addr)
-#  define AO_HAVE_short_fetch_and_sub1_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_short_fetch_and_sub1_acquire_read)
-#    define AO_short_fetch_and_sub1_dd_acquire_read(addr) \
-       AO_short_fetch_and_sub1_acquire_read(addr)
-#    define AO_HAVE_short_fetch_and_sub1_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_short_fetch_and_sub1)
-#    define AO_short_fetch_and_sub1_dd_acquire_read(addr) \
-       AO_short_fetch_and_sub1(addr)
-#    define AO_HAVE_short_fetch_and_sub1_dd_acquire_read
-#  endif
-#endif
-
-/* int_load */
-#if defined(AO_HAVE_int_load_acquire) && !defined(AO_HAVE_int_load)
-#  define AO_int_load(addr) AO_int_load_acquire(addr)
-#  define AO_HAVE_int_load
-#endif
-
-#if defined(AO_HAVE_int_load_full) && !defined(AO_HAVE_int_load_acquire)
-#  define AO_int_load_acquire(addr) AO_int_load_full(addr)
-#  define AO_HAVE_int_load_acquire
-#endif
-
-#if defined(AO_HAVE_int_load_full) && !defined(AO_HAVE_int_load_read)
-#  define AO_int_load_read(addr) AO_int_load_full(addr)
-#  define AO_HAVE_int_load_read
-#endif
-
-#if !defined(AO_HAVE_int_load_acquire_read) && defined(AO_HAVE_int_load_acquire)
-#  define AO_int_load_acquire_read(addr) AO_int_load_acquire(addr)
-#  define AO_HAVE_int_load_acquire_read
-#endif
-
-#if defined(AO_HAVE_int_load) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_int_load_acquire)
-   AO_INLINE unsigned int
-   AO_int_load_acquire(const volatile unsigned int *addr)
-   {
-     unsigned int result = AO_int_load(addr);
-     /* Acquire barrier would be useless, since the load could be delayed  */
-     /* beyond it.                                                        */
-     AO_nop_full();
-     return result;
-   }
-#  define AO_HAVE_int_load_acquire
-#endif
-
-#if defined(AO_HAVE_int_load) && defined(AO_HAVE_nop_read) && \
-    !defined(AO_HAVE_int_load_read)
-   AO_INLINE unsigned int
-   AO_int_load_read(const volatile unsigned int *addr)
-   {
-     unsigned int result = AO_int_load(addr);
-     /* Acquire barrier would be useless, since the load could be delayed  */
-     /* beyond it.                                                        */
-     AO_nop_read();
-     return result;
-   }
-#  define AO_HAVE_int_load_read
-#endif
-
-#if defined(AO_HAVE_int_load_acquire) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_int_load_full)
-#  define AO_int_load_full(addr) (AO_nop_full(), AO_int_load_acquire(addr))
-#  define AO_HAVE_int_load_full
-#endif
-#if !defined(AO_HAVE_int_load_acquire_read) && defined(AO_HAVE_int_load_read)
-#  define AO_int_load_acquire_read(addr) AO_int_load_read(addr)
-#  define AO_HAVE_int_load_acquire_read
-#endif
-
-#if defined(AO_HAVE_int_load_acquire_read) && !defined(AO_HAVE_int_load)
-#  define AO_int_load(addr) AO_int_load_acquire_read(addr)
-#  define AO_HAVE_int_load
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_int_load_acquire_read)
-#    define AO_int_load_dd_acquire_read(addr) \
-       AO_int_load_acquire_read(addr)
-#    define AO_HAVE_int_load_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_int_load)
-#    define AO_int_load_dd_acquire_read(addr) \
-       AO_int_load(addr)
-#    define AO_HAVE_int_load_dd_acquire_read
-#  endif
-#endif
-
-
-/* int_store */
-
-#if defined(AO_HAVE_int_store_release) && !defined(AO_HAVE_int_store)
-#  define AO_int_store(addr, val) AO_int_store_release(addr,val)
-#  define AO_HAVE_int_store
-#endif
-
-#if defined(AO_HAVE_int_store_full) && !defined(AO_HAVE_int_store_release)
-#  define AO_int_store_release(addr,val) AO_int_store_full(addr,val)
-#  define AO_HAVE_int_store_release
-#endif
-
-#if defined(AO_HAVE_int_store_full) && !defined(AO_HAVE_int_store_write)
-#  define AO_int_store_write(addr,val) AO_int_store_full(addr,val)
-#  define AO_HAVE_int_store_write
-#endif
-
-#if defined(AO_HAVE_int_store_release) && \
-       !defined(AO_HAVE_int_store_release_write)
-#  define AO_int_store_release_write(addr, val) \
-       AO_int_store_release(addr,val)
-#  define AO_HAVE_int_store_release_write
-#endif
-
-#if defined(AO_HAVE_int_store_write) && !defined(AO_HAVE_int_store)
-#  define AO_int_store(addr, val) AO_int_store_write(addr,val)
-#  define AO_HAVE_int_store
-#endif
-
-#if defined(AO_HAVE_int_store) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_int_store_release)
-#  define AO_int_store_release(addr,val) \
-       (AO_nop_full(), AO_int_store(addr,val))
-#  define AO_HAVE_int_store_release
-#endif
-
-#if defined(AO_HAVE_nop_write) && defined(AO_HAVE_int_store) && \
-     !defined(AO_HAVE_int_store_write)
-#  define AO_int_store_write(addr, val) \
-       (AO_nop_write(), AO_int_store(addr,val))
-#  define AO_HAVE_int_store_write
-#endif
-
-#if defined(AO_HAVE_int_store_write) && \
-     !defined(AO_HAVE_int_store_release_write)
-#  define AO_int_store_release_write(addr, val) AO_int_store_write(addr,val)
-#  define AO_HAVE_int_store_release_write
-#endif
-
-#if defined(AO_HAVE_int_store_release) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_int_store_full)
-#  define AO_int_store_full(addr, val) \
-       (AO_int_store_release(addr, val), AO_nop_full())
-#  define AO_HAVE_int_store_full
-#endif
-
-
-/* int_fetch_and_add */
-#if defined(AO_HAVE_int_compare_and_swap_full) && \
-    !defined(AO_HAVE_int_fetch_and_add_full)
-   AO_INLINE AO_t
-   AO_int_fetch_and_add_full(volatile unsigned int *addr,
-                              unsigned int incr)
-   {
-     unsigned int old;
-     do
-       {
-         old = *addr;
-       }
-     while (!AO_int_compare_and_swap_full(addr, old, old+incr));
-     return old;
-   }
-#  define AO_HAVE_int_fetch_and_add_full
-#endif
-
-#if defined(AO_HAVE_int_compare_and_swap_acquire) && \
-    !defined(AO_HAVE_int_fetch_and_add_acquire)
-   AO_INLINE AO_t
-   AO_int_fetch_and_add_acquire(volatile unsigned int *addr,
-                                 unsigned int incr)
-   {
-     unsigned int old;
-     do
-       {
-         old = *addr;
-       }
-     while (!AO_int_compare_and_swap_acquire(addr, old, old+incr));
-     return old;
-   }
-#  define AO_HAVE_int_fetch_and_add_acquire
-#endif
-
-#if defined(AO_HAVE_int_compare_and_swap_release) && \
-    !defined(AO_HAVE_int_fetch_and_add_release)
-   AO_INLINE AO_t
-   AO_int_fetch_and_add_release(volatile unsigned int *addr,
-                                 unsigned int incr)
-   {
-     unsigned int old;
-     do
-       {
-         old = *addr;
-       }
-     while (!AO_int_compare_and_swap_release(addr, old, old+incr));
-     return old;
-   }
-#  define AO_HAVE_int_fetch_and_add_release
-#endif
-
-#if defined(AO_HAVE_int_fetch_and_add_full)
-#  if !defined(AO_HAVE_int_fetch_and_add_release)
-#    define AO_int_fetch_and_add_release(addr, val) \
-        AO_int_fetch_and_add_full(addr, val)
-#    define AO_HAVE_int_fetch_and_add_release
-#  endif
-#  if !defined(AO_HAVE_int_fetch_and_add_acquire)
-#    define AO_int_fetch_and_add_acquire(addr, val) \
-        AO_int_fetch_and_add_full(addr, val)
-#    define AO_HAVE_int_fetch_and_add_acquire
-#  endif
-#  if !defined(AO_HAVE_int_fetch_and_add_write)
-#    define AO_int_fetch_and_add_write(addr, val) \
-        AO_int_fetch_and_add_full(addr, val)
-#    define AO_HAVE_int_fetch_and_add_write
-#  endif
-#  if !defined(AO_HAVE_int_fetch_and_add_read)
-#    define AO_int_fetch_and_add_read(addr, val) \
-        AO_int_fetch_and_add_full(addr, val)
-#    define AO_HAVE_int_fetch_and_add_read
-#  endif
-#endif /* AO_HAVE_int_fetch_and_add_full */
-
-#if !defined(AO_HAVE_int_fetch_and_add) && \
-    defined(AO_HAVE_int_fetch_and_add_release)
-#  define AO_int_fetch_and_add(addr, val) \
-       AO_int_fetch_and_add_release(addr, val)
-#  define AO_HAVE_int_fetch_and_add
-#endif
-#if !defined(AO_HAVE_int_fetch_and_add) && \
-    defined(AO_HAVE_int_fetch_and_add_acquire)
-#  define AO_int_fetch_and_add(addr, val) \
-       AO_int_fetch_and_add_acquire(addr, val)
-#  define AO_HAVE_int_fetch_and_add
-#endif
-#if !defined(AO_HAVE_int_fetch_and_add) && \
-    defined(AO_HAVE_int_fetch_and_add_write)
-#  define AO_int_fetch_and_add(addr, val) \
-       AO_int_fetch_and_add_write(addr, val)
-#  define AO_HAVE_int_fetch_and_add
-#endif
-#if !defined(AO_HAVE_int_fetch_and_add) && \
-    defined(AO_HAVE_int_fetch_and_add_read)
-#  define AO_int_fetch_and_add(addr, val) \
-       AO_int_fetch_and_add_read(addr, val)
-#  define AO_HAVE_int_fetch_and_add
-#endif
-
-#if defined(AO_HAVE_int_fetch_and_add_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_int_fetch_and_add_full)
-#  define AO_int_fetch_and_add_full(addr, val) \
-       (AO_nop_full(), AO_int_fetch_and_add_acquire(addr, val))
-#endif
-
-#if !defined(AO_HAVE_int_fetch_and_add_release_write) && \
-    defined(AO_HAVE_int_fetch_and_add_write)
-#  define AO_int_fetch_and_add_release_write(addr, val) \
-       AO_int_fetch_and_add_write(addr, val)
-#  define AO_HAVE_int_fetch_and_add_release_write
-#endif
-#if !defined(AO_HAVE_int_fetch_and_add_release_write) && \
-    defined(AO_HAVE_int_fetch_and_add_release)
-#  define AO_int_fetch_and_add_release_write(addr, val) \
-       AO_int_fetch_and_add_release(addr, val)
-#  define AO_HAVE_int_fetch_and_add_release_write
-#endif
-#if !defined(AO_HAVE_int_fetch_and_add_acquire_read) && \
-    defined(AO_HAVE_int_fetch_and_add_read)
-#  define AO_int_fetch_and_add_acquire_read(addr, val) \
-       AO_int_fetch_and_add_read(addr, val)
-#  define AO_HAVE_int_fetch_and_add_acquire_read
-#endif
-#if !defined(AO_HAVE_int_fetch_and_add_acquire_read) && \
-    defined(AO_HAVE_int_fetch_and_add_acquire)
-#  define AO_int_fetch_and_add_acquire_read(addr, val) \
-       AO_int_fetch_and_add_acquire(addr, val)
-#  define AO_HAVE_int_fetch_and_add_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_int_fetch_and_add_acquire_read)
-#    define AO_int_fetch_and_add_dd_acquire_read(addr, val) \
-       AO_int_fetch_and_add_acquire_read(addr, val)
-#    define AO_HAVE_int_fetch_and_add_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_int_fetch_and_add)
-#    define AO_int_fetch_and_add_dd_acquire_read(addr, val) \
-       AO_int_fetch_and_add(addr, val)
-#    define AO_HAVE_int_fetch_and_add_dd_acquire_read
-#  endif
-#endif
-  
-/* int_fetch_and_add1 */
-
-#if defined(AO_HAVE_int_fetch_and_add_full) &&\
-    !defined(AO_HAVE_int_fetch_and_add1_full)
-#  define AO_int_fetch_and_add1_full(addr) \
-       AO_int_fetch_and_add_full(addr,1)
-#  define AO_HAVE_int_fetch_and_add1_full
-#endif
-#if defined(AO_HAVE_int_fetch_and_add_release) &&\
-    !defined(AO_HAVE_int_fetch_and_add1_release)
-#  define AO_int_fetch_and_add1_release(addr) \
-       AO_int_fetch_and_add_release(addr,1)
-#  define AO_HAVE_int_fetch_and_add1_release
-#endif
-#if defined(AO_HAVE_int_fetch_and_add_acquire) &&\
-    !defined(AO_HAVE_int_fetch_and_add1_acquire)
-#  define AO_int_fetch_and_add1_acquire(addr) \
-       AO_int_fetch_and_add_acquire(addr,1)
-#  define AO_HAVE_int_fetch_and_add1_acquire
-#endif
-#if defined(AO_HAVE_int_fetch_and_add_write) &&\
-    !defined(AO_HAVE_int_fetch_and_add1_write)
-#  define AO_int_fetch_and_add1_write(addr) \
-       AO_int_fetch_and_add_write(addr,1)
-#  define AO_HAVE_int_fetch_and_add1_write
-#endif
-#if defined(AO_HAVE_int_fetch_and_add_read) &&\
-    !defined(AO_HAVE_int_fetch_and_add1_read)
-#  define AO_int_fetch_and_add1_read(addr) \
-       AO_int_fetch_and_add_read(addr,1)
-#  define AO_HAVE_int_fetch_and_add1_read
-#endif
-#if defined(AO_HAVE_int_fetch_and_add_release_write) &&\
-    !defined(AO_HAVE_int_fetch_and_add1_release_write)
-#  define AO_int_fetch_and_add1_release_write(addr) \
-       AO_int_fetch_and_add_release_write(addr,1)
-#  define AO_HAVE_int_fetch_and_add1_release_write
-#endif
-#if defined(AO_HAVE_int_fetch_and_add_acquire_read) &&\
-    !defined(AO_HAVE_int_fetch_and_add1_acquire_read)
-#  define AO_int_fetch_and_add1_acquire_read(addr) \
-       AO_int_fetch_and_add_acquire_read(addr,1)
-#  define AO_HAVE_int_fetch_and_add1_acquire_read
-#endif
-#if defined(AO_HAVE_int_fetch_and_add) &&\
-    !defined(AO_HAVE_int_fetch_and_add1)
-#  define AO_int_fetch_and_add1(addr) \
-       AO_int_fetch_and_add(addr,1)
-#  define AO_HAVE_int_fetch_and_add1
-#endif
-
-#if defined(AO_HAVE_int_fetch_and_add1_full)
-#  if !defined(AO_HAVE_int_fetch_and_add1_release)
-#    define AO_int_fetch_and_add1_release(addr) \
-        AO_int_fetch_and_add1_full(addr)
-#    define AO_HAVE_int_fetch_and_add1_release
-#  endif
-#  if !defined(AO_HAVE_int_fetch_and_add1_acquire)
-#    define AO_int_fetch_and_add1_acquire(addr) \
-        AO_int_fetch_and_add1_full(addr)
-#    define AO_HAVE_int_fetch_and_add1_acquire
-#  endif
-#  if !defined(AO_HAVE_int_fetch_and_add1_write)
-#    define AO_int_fetch_and_add1_write(addr) \
-        AO_int_fetch_and_add1_full(addr)
-#    define AO_HAVE_int_fetch_and_add1_write
-#  endif
-#  if !defined(AO_HAVE_int_fetch_and_add1_read)
-#    define AO_int_fetch_and_add1_read(addr) \
-        AO_int_fetch_and_add1_full(addr)
-#    define AO_HAVE_int_fetch_and_add1_read
-#  endif
-#endif /* AO_HAVE_int_fetch_and_add1_full */
-
-#if !defined(AO_HAVE_int_fetch_and_add1) && \
-    defined(AO_HAVE_int_fetch_and_add1_release)
-#  define AO_int_fetch_and_add1(addr) \
-       AO_int_fetch_and_add1_release(addr)
-#  define AO_HAVE_int_fetch_and_add1
-#endif
-#if !defined(AO_HAVE_int_fetch_and_add1) && \
-    defined(AO_HAVE_int_fetch_and_add1_acquire)
-#  define AO_int_fetch_and_add1(addr) \
-       AO_int_fetch_and_add1_acquire(addr)
-#  define AO_HAVE_int_fetch_and_add1
-#endif
-#if !defined(AO_HAVE_int_fetch_and_add1) && \
-    defined(AO_HAVE_int_fetch_and_add1_write)
-#  define AO_int_fetch_and_add1(addr) \
-       AO_int_fetch_and_add1_write(addr)
-#  define AO_HAVE_int_fetch_and_add1
-#endif
-#if !defined(AO_HAVE_int_fetch_and_add1) && \
-    defined(AO_HAVE_int_fetch_and_add1_read)
-#  define AO_int_fetch_and_add1(addr) \
-       AO_int_fetch_and_add1_read(addr)
-#  define AO_HAVE_int_fetch_and_add1
-#endif
-
-#if defined(AO_HAVE_int_fetch_and_add1_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_int_fetch_and_add1_full)
-#  define AO_int_fetch_and_add1_full(addr) \
-       (AO_nop_full(), AO_int_fetch_and_add1_acquire(addr))
-#  define AO_HAVE_int_fetch_and_add1_full
-#endif
-
-#if !defined(AO_HAVE_int_fetch_and_add1_release_write) && \
-    defined(AO_HAVE_int_fetch_and_add1_write)
-#  define AO_int_fetch_and_add1_release_write(addr) \
-       AO_int_fetch_and_add1_write(addr)
-#  define AO_HAVE_int_fetch_and_add1_release_write
-#endif
-#if !defined(AO_HAVE_int_fetch_and_add1_release_write) && \
-    defined(AO_HAVE_int_fetch_and_add1_release)
-#  define AO_int_fetch_and_add1_release_write(addr) \
-       AO_int_fetch_and_add1_release(addr)
-#  define AO_HAVE_int_fetch_and_add1_release_write
-#endif
-#if !defined(AO_HAVE_int_fetch_and_add1_acquire_read) && \
-    defined(AO_HAVE_int_fetch_and_add1_read)
-#  define AO_int_fetch_and_add1_acquire_read(addr) \
-       AO_int_fetch_and_add1_read(addr)
-#  define AO_HAVE_int_fetch_and_add1_acquire_read
-#endif
-#if !defined(AO_HAVE_int_fetch_and_add1_acquire_read) && \
-    defined(AO_HAVE_int_fetch_and_add1_acquire)
-#  define AO_int_fetch_and_add1_acquire_read(addr) \
-       AO_int_fetch_and_add1_acquire(addr)
-#  define AO_HAVE_int_fetch_and_add1_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_int_fetch_and_add1_acquire_read)
-#    define AO_int_fetch_and_add1_dd_acquire_read(addr) \
-       AO_int_fetch_and_add1_acquire_read(addr)
-#    define AO_HAVE_int_fetch_and_add1_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_int_fetch_and_add1)
-#    define AO_int_fetch_and_add1_dd_acquire_read(addr) \
-       AO_int_fetch_and_add1(addr)
-#    define AO_HAVE_int_fetch_and_add1_dd_acquire_read
-#  endif
-#endif
-
-/* int_fetch_and_sub1 */
-
-#if defined(AO_HAVE_int_fetch_and_add_full) &&\
-    !defined(AO_HAVE_int_fetch_and_sub1_full)
-#  define AO_int_fetch_and_sub1_full(addr) \
-       AO_int_fetch_and_add_full(addr,(unsigned int)(-1))
-#  define AO_HAVE_int_fetch_and_sub1_full
-#endif
-#if defined(AO_HAVE_int_fetch_and_add_release) &&\
-    !defined(AO_HAVE_int_fetch_and_sub1_release)
-#  define AO_int_fetch_and_sub1_release(addr) \
-       AO_int_fetch_and_add_release(addr,(unsigned int)(-1))
-#  define AO_HAVE_int_fetch_and_sub1_release
-#endif
-#if defined(AO_HAVE_int_fetch_and_add_acquire) &&\
-    !defined(AO_HAVE_int_fetch_and_sub1_acquire)
-#  define AO_int_fetch_and_sub1_acquire(addr) \
-       AO_int_fetch_and_add_acquire(addr,(unsigned int)(-1))
-#  define AO_HAVE_int_fetch_and_sub1_acquire
-#endif
-#if defined(AO_HAVE_int_fetch_and_add_write) &&\
-    !defined(AO_HAVE_int_fetch_and_sub1_write)
-#  define AO_int_fetch_and_sub1_write(addr) \
-       AO_int_fetch_and_add_write(addr,(unsigned int)(-1))
-#  define AO_HAVE_int_fetch_and_sub1_write
-#endif
-#if defined(AO_HAVE_int_fetch_and_add_read) &&\
-    !defined(AO_HAVE_int_fetch_and_sub1_read)
-#  define AO_int_fetch_and_sub1_read(addr) \
-       AO_int_fetch_and_add_read(addr,(unsigned int)(-1))
-#  define AO_HAVE_int_fetch_and_sub1_read
-#endif
-#if defined(AO_HAVE_int_fetch_and_add_release_write) &&\
-    !defined(AO_HAVE_int_fetch_and_sub1_release_write)
-#  define AO_int_fetch_and_sub1_release_write(addr) \
-       AO_int_fetch_and_add_release_write(addr,(unsigned int)(-1))
-#  define AO_HAVE_int_fetch_and_sub1_release_write
-#endif
-#if defined(AO_HAVE_int_fetch_and_add_acquire_read) &&\
-    !defined(AO_HAVE_int_fetch_and_sub1_acquire_read)
-#  define AO_int_fetch_and_sub1_acquire_read(addr) \
-       AO_int_fetch_and_add_acquire_read(addr,(unsigned int)(-1))
-#  define AO_HAVE_int_fetch_and_sub1_acquire_read
-#endif
-#if defined(AO_HAVE_int_fetch_and_add) &&\
-    !defined(AO_HAVE_int_fetch_and_sub1)
-#  define AO_int_fetch_and_sub1(addr) \
-       AO_int_fetch_and_add(addr,(unsigned int)(-1))
-#  define AO_HAVE_int_fetch_and_sub1
-#endif
-
-#if defined(AO_HAVE_int_fetch_and_sub1_full)
-#  if !defined(AO_HAVE_int_fetch_and_sub1_release)
-#    define AO_int_fetch_and_sub1_release(addr) \
-        AO_int_fetch_and_sub1_full(addr)
-#    define AO_HAVE_int_fetch_and_sub1_release
-#  endif
-#  if !defined(AO_HAVE_int_fetch_and_sub1_acquire)
-#    define AO_int_fetch_and_sub1_acquire(addr) \
-        AO_int_fetch_and_sub1_full(addr)
-#    define AO_HAVE_int_fetch_and_sub1_acquire
-#  endif
-#  if !defined(AO_HAVE_int_fetch_and_sub1_write)
-#    define AO_int_fetch_and_sub1_write(addr) \
-        AO_int_fetch_and_sub1_full(addr)
-#    define AO_HAVE_int_fetch_and_sub1_write
-#  endif
-#  if !defined(AO_HAVE_int_fetch_and_sub1_read)
-#    define AO_int_fetch_and_sub1_read(addr) \
-        AO_int_fetch_and_sub1_full(addr)
-#    define AO_HAVE_int_fetch_and_sub1_read
-#  endif
-#endif /* AO_HAVE_int_fetch_and_sub1_full */
-
-#if !defined(AO_HAVE_int_fetch_and_sub1) && \
-    defined(AO_HAVE_int_fetch_and_sub1_release)
-#  define AO_int_fetch_and_sub1(addr) \
-       AO_int_fetch_and_sub1_release(addr)
-#  define AO_HAVE_int_fetch_and_sub1
-#endif
-#if !defined(AO_HAVE_int_fetch_and_sub1) && \
-    defined(AO_HAVE_int_fetch_and_sub1_acquire)
-#  define AO_int_fetch_and_sub1(addr) \
-       AO_int_fetch_and_sub1_acquire(addr)
-#  define AO_HAVE_int_fetch_and_sub1
-#endif
-#if !defined(AO_HAVE_int_fetch_and_sub1) && \
-    defined(AO_HAVE_int_fetch_and_sub1_write)
-#  define AO_int_fetch_and_sub1(addr) \
-       AO_int_fetch_and_sub1_write(addr)
-#  define AO_HAVE_int_fetch_and_sub1
-#endif
-#if !defined(AO_HAVE_int_fetch_and_sub1) && \
-    defined(AO_HAVE_int_fetch_and_sub1_read)
-#  define AO_int_fetch_and_sub1(addr) \
-       AO_int_fetch_and_sub1_read(addr)
-#  define AO_HAVE_int_fetch_and_sub1
-#endif
-
-#if defined(AO_HAVE_int_fetch_and_sub1_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_int_fetch_and_sub1_full)
-#  define AO_int_fetch_and_sub1_full(addr) \
-       (AO_nop_full(), AO_int_fetch_and_sub1_acquire(addr))
-#  define AO_HAVE_int_fetch_and_sub1_full
-#endif
-
-#if !defined(AO_HAVE_int_fetch_and_sub1_release_write) && \
-    defined(AO_HAVE_int_fetch_and_sub1_write)
-#  define AO_int_fetch_and_sub1_release_write(addr) \
-       AO_int_fetch_and_sub1_write(addr)
-#  define AO_HAVE_int_fetch_and_sub1_release_write
-#endif
-#if !defined(AO_HAVE_int_fetch_and_sub1_release_write) && \
-    defined(AO_HAVE_int_fetch_and_sub1_release)
-#  define AO_int_fetch_and_sub1_release_write(addr) \
-       AO_int_fetch_and_sub1_release(addr)
-#  define AO_HAVE_int_fetch_and_sub1_release_write
-#endif
-#if !defined(AO_HAVE_int_fetch_and_sub1_acquire_read) && \
-    defined(AO_HAVE_int_fetch_and_sub1_read)
-#  define AO_int_fetch_and_sub1_acquire_read(addr) \
-       AO_int_fetch_and_sub1_read(addr)
-#  define AO_HAVE_int_fetch_and_sub1_acquire_read
-#endif
-#if !defined(AO_HAVE_int_fetch_and_sub1_acquire_read) && \
-    defined(AO_HAVE_int_fetch_and_sub1_acquire)
-#  define AO_int_fetch_and_sub1_acquire_read(addr) \
-       AO_int_fetch_and_sub1_acquire(addr)
-#  define AO_HAVE_int_fetch_and_sub1_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_int_fetch_and_sub1_acquire_read)
-#    define AO_int_fetch_and_sub1_dd_acquire_read(addr) \
-       AO_int_fetch_and_sub1_acquire_read(addr)
-#    define AO_HAVE_int_fetch_and_sub1_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_int_fetch_and_sub1)
-#    define AO_int_fetch_and_sub1_dd_acquire_read(addr) \
-       AO_int_fetch_and_sub1(addr)
-#    define AO_HAVE_int_fetch_and_sub1_dd_acquire_read
-#  endif
-#endif
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/generalize-small.template b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/generalize-small.template
deleted file mode 100644 (file)
index c9373df..0000000
+++ /dev/null
@@ -1,575 +0,0 @@
-/* XSIZE_load */
-#if defined(AO_HAVE_XSIZE_load_acquire) && !defined(AO_HAVE_XSIZE_load)
-#  define AO_XSIZE_load(addr) AO_XSIZE_load_acquire(addr)
-#  define AO_HAVE_XSIZE_load
-#endif
-
-#if defined(AO_HAVE_XSIZE_load_full) && !defined(AO_HAVE_XSIZE_load_acquire)
-#  define AO_XSIZE_load_acquire(addr) AO_XSIZE_load_full(addr)
-#  define AO_HAVE_XSIZE_load_acquire
-#endif
-
-#if defined(AO_HAVE_XSIZE_load_full) && !defined(AO_HAVE_XSIZE_load_read)
-#  define AO_XSIZE_load_read(addr) AO_XSIZE_load_full(addr)
-#  define AO_HAVE_XSIZE_load_read
-#endif
-
-#if !defined(AO_HAVE_XSIZE_load_acquire_read) && defined(AO_HAVE_XSIZE_load_acquire)
-#  define AO_XSIZE_load_acquire_read(addr) AO_XSIZE_load_acquire(addr)
-#  define AO_HAVE_XSIZE_load_acquire_read
-#endif
-
-#if defined(AO_HAVE_XSIZE_load) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_XSIZE_load_acquire)
-   AO_INLINE unsigned XCTYPE
-   AO_XSIZE_load_acquire(const volatile unsigned XCTYPE *addr)
-   {
-     unsigned XCTYPE result = AO_XSIZE_load(addr);
-     /* Acquire barrier would be useless, since the load could be delayed  */
-     /* beyond it.                                                        */
-     AO_nop_full();
-     return result;
-   }
-#  define AO_HAVE_XSIZE_load_acquire
-#endif
-
-#if defined(AO_HAVE_XSIZE_load) && defined(AO_HAVE_nop_read) && \
-    !defined(AO_HAVE_XSIZE_load_read)
-   AO_INLINE unsigned XCTYPE
-   AO_XSIZE_load_read(const volatile unsigned XCTYPE *addr)
-   {
-     unsigned XCTYPE result = AO_XSIZE_load(addr);
-     /* Acquire barrier would be useless, since the load could be delayed  */
-     /* beyond it.                                                        */
-     AO_nop_read();
-     return result;
-   }
-#  define AO_HAVE_XSIZE_load_read
-#endif
-
-#if defined(AO_HAVE_XSIZE_load_acquire) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_XSIZE_load_full)
-#  define AO_XSIZE_load_full(addr) (AO_nop_full(), AO_XSIZE_load_acquire(addr))
-#  define AO_HAVE_XSIZE_load_full
-#endif
-#if !defined(AO_HAVE_XSIZE_load_acquire_read) && defined(AO_HAVE_XSIZE_load_read)
-#  define AO_XSIZE_load_acquire_read(addr) AO_XSIZE_load_read(addr)
-#  define AO_HAVE_XSIZE_load_acquire_read
-#endif
-
-#if defined(AO_HAVE_XSIZE_load_acquire_read) && !defined(AO_HAVE_XSIZE_load)
-#  define AO_XSIZE_load(addr) AO_XSIZE_load_acquire_read(addr)
-#  define AO_HAVE_XSIZE_load
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_XSIZE_load_acquire_read)
-#    define AO_XSIZE_load_dd_acquire_read(addr) \
-       AO_XSIZE_load_acquire_read(addr)
-#    define AO_HAVE_XSIZE_load_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_XSIZE_load)
-#    define AO_XSIZE_load_dd_acquire_read(addr) \
-       AO_XSIZE_load(addr)
-#    define AO_HAVE_XSIZE_load_dd_acquire_read
-#  endif
-#endif
-
-
-/* XSIZE_store */
-
-#if defined(AO_HAVE_XSIZE_store_release) && !defined(AO_HAVE_XSIZE_store)
-#  define AO_XSIZE_store(addr, val) AO_XSIZE_store_release(addr,val)
-#  define AO_HAVE_XSIZE_store
-#endif
-
-#if defined(AO_HAVE_XSIZE_store_full) && !defined(AO_HAVE_XSIZE_store_release)
-#  define AO_XSIZE_store_release(addr,val) AO_XSIZE_store_full(addr,val)
-#  define AO_HAVE_XSIZE_store_release
-#endif
-
-#if defined(AO_HAVE_XSIZE_store_full) && !defined(AO_HAVE_XSIZE_store_write)
-#  define AO_XSIZE_store_write(addr,val) AO_XSIZE_store_full(addr,val)
-#  define AO_HAVE_XSIZE_store_write
-#endif
-
-#if defined(AO_HAVE_XSIZE_store_release) && \
-       !defined(AO_HAVE_XSIZE_store_release_write)
-#  define AO_XSIZE_store_release_write(addr, val) \
-       AO_XSIZE_store_release(addr,val)
-#  define AO_HAVE_XSIZE_store_release_write
-#endif
-
-#if defined(AO_HAVE_XSIZE_store_write) && !defined(AO_HAVE_XSIZE_store)
-#  define AO_XSIZE_store(addr, val) AO_XSIZE_store_write(addr,val)
-#  define AO_HAVE_XSIZE_store
-#endif
-
-#if defined(AO_HAVE_XSIZE_store) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_XSIZE_store_release)
-#  define AO_XSIZE_store_release(addr,val) \
-       (AO_nop_full(), AO_XSIZE_store(addr,val))
-#  define AO_HAVE_XSIZE_store_release
-#endif
-
-#if defined(AO_HAVE_nop_write) && defined(AO_HAVE_XSIZE_store) && \
-     !defined(AO_HAVE_XSIZE_store_write)
-#  define AO_XSIZE_store_write(addr, val) \
-       (AO_nop_write(), AO_XSIZE_store(addr,val))
-#  define AO_HAVE_XSIZE_store_write
-#endif
-
-#if defined(AO_HAVE_XSIZE_store_write) && \
-     !defined(AO_HAVE_XSIZE_store_release_write)
-#  define AO_XSIZE_store_release_write(addr, val) AO_XSIZE_store_write(addr,val)
-#  define AO_HAVE_XSIZE_store_release_write
-#endif
-
-#if defined(AO_HAVE_XSIZE_store_release) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_XSIZE_store_full)
-#  define AO_XSIZE_store_full(addr, val) \
-       (AO_XSIZE_store_release(addr, val), AO_nop_full())
-#  define AO_HAVE_XSIZE_store_full
-#endif
-
-
-/* XSIZE_fetch_and_add */
-#if defined(AO_HAVE_XSIZE_compare_and_swap_full) && \
-    !defined(AO_HAVE_XSIZE_fetch_and_add_full)
-   AO_INLINE AO_t
-   AO_XSIZE_fetch_and_add_full(volatile unsigned XCTYPE *addr,
-                              unsigned XCTYPE incr)
-   {
-     unsigned XCTYPE old;
-     do
-       {
-         old = *addr;
-       }
-     while (!AO_XSIZE_compare_and_swap_full(addr, old, old+incr));
-     return old;
-   }
-#  define AO_HAVE_XSIZE_fetch_and_add_full
-#endif
-
-#if defined(AO_HAVE_XSIZE_compare_and_swap_acquire) && \
-    !defined(AO_HAVE_XSIZE_fetch_and_add_acquire)
-   AO_INLINE AO_t
-   AO_XSIZE_fetch_and_add_acquire(volatile unsigned XCTYPE *addr,
-                                 unsigned XCTYPE incr)
-   {
-     unsigned XCTYPE old;
-     do
-       {
-         old = *addr;
-       }
-     while (!AO_XSIZE_compare_and_swap_acquire(addr, old, old+incr));
-     return old;
-   }
-#  define AO_HAVE_XSIZE_fetch_and_add_acquire
-#endif
-
-#if defined(AO_HAVE_XSIZE_compare_and_swap_release) && \
-    !defined(AO_HAVE_XSIZE_fetch_and_add_release)
-   AO_INLINE AO_t
-   AO_XSIZE_fetch_and_add_release(volatile unsigned XCTYPE *addr,
-                                 unsigned XCTYPE incr)
-   {
-     unsigned XCTYPE old;
-     do
-       {
-         old = *addr;
-       }
-     while (!AO_XSIZE_compare_and_swap_release(addr, old, old+incr));
-     return old;
-   }
-#  define AO_HAVE_XSIZE_fetch_and_add_release
-#endif
-
-#if defined(AO_HAVE_XSIZE_fetch_and_add_full)
-#  if !defined(AO_HAVE_XSIZE_fetch_and_add_release)
-#    define AO_XSIZE_fetch_and_add_release(addr, val) \
-        AO_XSIZE_fetch_and_add_full(addr, val)
-#    define AO_HAVE_XSIZE_fetch_and_add_release
-#  endif
-#  if !defined(AO_HAVE_XSIZE_fetch_and_add_acquire)
-#    define AO_XSIZE_fetch_and_add_acquire(addr, val) \
-        AO_XSIZE_fetch_and_add_full(addr, val)
-#    define AO_HAVE_XSIZE_fetch_and_add_acquire
-#  endif
-#  if !defined(AO_HAVE_XSIZE_fetch_and_add_write)
-#    define AO_XSIZE_fetch_and_add_write(addr, val) \
-        AO_XSIZE_fetch_and_add_full(addr, val)
-#    define AO_HAVE_XSIZE_fetch_and_add_write
-#  endif
-#  if !defined(AO_HAVE_XSIZE_fetch_and_add_read)
-#    define AO_XSIZE_fetch_and_add_read(addr, val) \
-        AO_XSIZE_fetch_and_add_full(addr, val)
-#    define AO_HAVE_XSIZE_fetch_and_add_read
-#  endif
-#endif /* AO_HAVE_XSIZE_fetch_and_add_full */
-
-#if !defined(AO_HAVE_XSIZE_fetch_and_add) && \
-    defined(AO_HAVE_XSIZE_fetch_and_add_release)
-#  define AO_XSIZE_fetch_and_add(addr, val) \
-       AO_XSIZE_fetch_and_add_release(addr, val)
-#  define AO_HAVE_XSIZE_fetch_and_add
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_add) && \
-    defined(AO_HAVE_XSIZE_fetch_and_add_acquire)
-#  define AO_XSIZE_fetch_and_add(addr, val) \
-       AO_XSIZE_fetch_and_add_acquire(addr, val)
-#  define AO_HAVE_XSIZE_fetch_and_add
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_add) && \
-    defined(AO_HAVE_XSIZE_fetch_and_add_write)
-#  define AO_XSIZE_fetch_and_add(addr, val) \
-       AO_XSIZE_fetch_and_add_write(addr, val)
-#  define AO_HAVE_XSIZE_fetch_and_add
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_add) && \
-    defined(AO_HAVE_XSIZE_fetch_and_add_read)
-#  define AO_XSIZE_fetch_and_add(addr, val) \
-       AO_XSIZE_fetch_and_add_read(addr, val)
-#  define AO_HAVE_XSIZE_fetch_and_add
-#endif
-
-#if defined(AO_HAVE_XSIZE_fetch_and_add_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_XSIZE_fetch_and_add_full)
-#  define AO_XSIZE_fetch_and_add_full(addr, val) \
-       (AO_nop_full(), AO_XSIZE_fetch_and_add_acquire(addr, val))
-#endif
-
-#if !defined(AO_HAVE_XSIZE_fetch_and_add_release_write) && \
-    defined(AO_HAVE_XSIZE_fetch_and_add_write)
-#  define AO_XSIZE_fetch_and_add_release_write(addr, val) \
-       AO_XSIZE_fetch_and_add_write(addr, val)
-#  define AO_HAVE_XSIZE_fetch_and_add_release_write
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_add_release_write) && \
-    defined(AO_HAVE_XSIZE_fetch_and_add_release)
-#  define AO_XSIZE_fetch_and_add_release_write(addr, val) \
-       AO_XSIZE_fetch_and_add_release(addr, val)
-#  define AO_HAVE_XSIZE_fetch_and_add_release_write
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_add_acquire_read) && \
-    defined(AO_HAVE_XSIZE_fetch_and_add_read)
-#  define AO_XSIZE_fetch_and_add_acquire_read(addr, val) \
-       AO_XSIZE_fetch_and_add_read(addr, val)
-#  define AO_HAVE_XSIZE_fetch_and_add_acquire_read
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_add_acquire_read) && \
-    defined(AO_HAVE_XSIZE_fetch_and_add_acquire)
-#  define AO_XSIZE_fetch_and_add_acquire_read(addr, val) \
-       AO_XSIZE_fetch_and_add_acquire(addr, val)
-#  define AO_HAVE_XSIZE_fetch_and_add_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_XSIZE_fetch_and_add_acquire_read)
-#    define AO_XSIZE_fetch_and_add_dd_acquire_read(addr, val) \
-       AO_XSIZE_fetch_and_add_acquire_read(addr, val)
-#    define AO_HAVE_XSIZE_fetch_and_add_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_XSIZE_fetch_and_add)
-#    define AO_XSIZE_fetch_and_add_dd_acquire_read(addr, val) \
-       AO_XSIZE_fetch_and_add(addr, val)
-#    define AO_HAVE_XSIZE_fetch_and_add_dd_acquire_read
-#  endif
-#endif
-  
-/* XSIZE_fetch_and_add1 */
-
-#if defined(AO_HAVE_XSIZE_fetch_and_add_full) &&\
-    !defined(AO_HAVE_XSIZE_fetch_and_add1_full)
-#  define AO_XSIZE_fetch_and_add1_full(addr) \
-       AO_XSIZE_fetch_and_add_full(addr,1)
-#  define AO_HAVE_XSIZE_fetch_and_add1_full
-#endif
-#if defined(AO_HAVE_XSIZE_fetch_and_add_release) &&\
-    !defined(AO_HAVE_XSIZE_fetch_and_add1_release)
-#  define AO_XSIZE_fetch_and_add1_release(addr) \
-       AO_XSIZE_fetch_and_add_release(addr,1)
-#  define AO_HAVE_XSIZE_fetch_and_add1_release
-#endif
-#if defined(AO_HAVE_XSIZE_fetch_and_add_acquire) &&\
-    !defined(AO_HAVE_XSIZE_fetch_and_add1_acquire)
-#  define AO_XSIZE_fetch_and_add1_acquire(addr) \
-       AO_XSIZE_fetch_and_add_acquire(addr,1)
-#  define AO_HAVE_XSIZE_fetch_and_add1_acquire
-#endif
-#if defined(AO_HAVE_XSIZE_fetch_and_add_write) &&\
-    !defined(AO_HAVE_XSIZE_fetch_and_add1_write)
-#  define AO_XSIZE_fetch_and_add1_write(addr) \
-       AO_XSIZE_fetch_and_add_write(addr,1)
-#  define AO_HAVE_XSIZE_fetch_and_add1_write
-#endif
-#if defined(AO_HAVE_XSIZE_fetch_and_add_read) &&\
-    !defined(AO_HAVE_XSIZE_fetch_and_add1_read)
-#  define AO_XSIZE_fetch_and_add1_read(addr) \
-       AO_XSIZE_fetch_and_add_read(addr,1)
-#  define AO_HAVE_XSIZE_fetch_and_add1_read
-#endif
-#if defined(AO_HAVE_XSIZE_fetch_and_add_release_write) &&\
-    !defined(AO_HAVE_XSIZE_fetch_and_add1_release_write)
-#  define AO_XSIZE_fetch_and_add1_release_write(addr) \
-       AO_XSIZE_fetch_and_add_release_write(addr,1)
-#  define AO_HAVE_XSIZE_fetch_and_add1_release_write
-#endif
-#if defined(AO_HAVE_XSIZE_fetch_and_add_acquire_read) &&\
-    !defined(AO_HAVE_XSIZE_fetch_and_add1_acquire_read)
-#  define AO_XSIZE_fetch_and_add1_acquire_read(addr) \
-       AO_XSIZE_fetch_and_add_acquire_read(addr,1)
-#  define AO_HAVE_XSIZE_fetch_and_add1_acquire_read
-#endif
-#if defined(AO_HAVE_XSIZE_fetch_and_add) &&\
-    !defined(AO_HAVE_XSIZE_fetch_and_add1)
-#  define AO_XSIZE_fetch_and_add1(addr) \
-       AO_XSIZE_fetch_and_add(addr,1)
-#  define AO_HAVE_XSIZE_fetch_and_add1
-#endif
-
-#if defined(AO_HAVE_XSIZE_fetch_and_add1_full)
-#  if !defined(AO_HAVE_XSIZE_fetch_and_add1_release)
-#    define AO_XSIZE_fetch_and_add1_release(addr) \
-        AO_XSIZE_fetch_and_add1_full(addr)
-#    define AO_HAVE_XSIZE_fetch_and_add1_release
-#  endif
-#  if !defined(AO_HAVE_XSIZE_fetch_and_add1_acquire)
-#    define AO_XSIZE_fetch_and_add1_acquire(addr) \
-        AO_XSIZE_fetch_and_add1_full(addr)
-#    define AO_HAVE_XSIZE_fetch_and_add1_acquire
-#  endif
-#  if !defined(AO_HAVE_XSIZE_fetch_and_add1_write)
-#    define AO_XSIZE_fetch_and_add1_write(addr) \
-        AO_XSIZE_fetch_and_add1_full(addr)
-#    define AO_HAVE_XSIZE_fetch_and_add1_write
-#  endif
-#  if !defined(AO_HAVE_XSIZE_fetch_and_add1_read)
-#    define AO_XSIZE_fetch_and_add1_read(addr) \
-        AO_XSIZE_fetch_and_add1_full(addr)
-#    define AO_HAVE_XSIZE_fetch_and_add1_read
-#  endif
-#endif /* AO_HAVE_XSIZE_fetch_and_add1_full */
-
-#if !defined(AO_HAVE_XSIZE_fetch_and_add1) && \
-    defined(AO_HAVE_XSIZE_fetch_and_add1_release)
-#  define AO_XSIZE_fetch_and_add1(addr) \
-       AO_XSIZE_fetch_and_add1_release(addr)
-#  define AO_HAVE_XSIZE_fetch_and_add1
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_add1) && \
-    defined(AO_HAVE_XSIZE_fetch_and_add1_acquire)
-#  define AO_XSIZE_fetch_and_add1(addr) \
-       AO_XSIZE_fetch_and_add1_acquire(addr)
-#  define AO_HAVE_XSIZE_fetch_and_add1
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_add1) && \
-    defined(AO_HAVE_XSIZE_fetch_and_add1_write)
-#  define AO_XSIZE_fetch_and_add1(addr) \
-       AO_XSIZE_fetch_and_add1_write(addr)
-#  define AO_HAVE_XSIZE_fetch_and_add1
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_add1) && \
-    defined(AO_HAVE_XSIZE_fetch_and_add1_read)
-#  define AO_XSIZE_fetch_and_add1(addr) \
-       AO_XSIZE_fetch_and_add1_read(addr)
-#  define AO_HAVE_XSIZE_fetch_and_add1
-#endif
-
-#if defined(AO_HAVE_XSIZE_fetch_and_add1_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_XSIZE_fetch_and_add1_full)
-#  define AO_XSIZE_fetch_and_add1_full(addr) \
-       (AO_nop_full(), AO_XSIZE_fetch_and_add1_acquire(addr))
-#  define AO_HAVE_XSIZE_fetch_and_add1_full
-#endif
-
-#if !defined(AO_HAVE_XSIZE_fetch_and_add1_release_write) && \
-    defined(AO_HAVE_XSIZE_fetch_and_add1_write)
-#  define AO_XSIZE_fetch_and_add1_release_write(addr) \
-       AO_XSIZE_fetch_and_add1_write(addr)
-#  define AO_HAVE_XSIZE_fetch_and_add1_release_write
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_add1_release_write) && \
-    defined(AO_HAVE_XSIZE_fetch_and_add1_release)
-#  define AO_XSIZE_fetch_and_add1_release_write(addr) \
-       AO_XSIZE_fetch_and_add1_release(addr)
-#  define AO_HAVE_XSIZE_fetch_and_add1_release_write
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_add1_acquire_read) && \
-    defined(AO_HAVE_XSIZE_fetch_and_add1_read)
-#  define AO_XSIZE_fetch_and_add1_acquire_read(addr) \
-       AO_XSIZE_fetch_and_add1_read(addr)
-#  define AO_HAVE_XSIZE_fetch_and_add1_acquire_read
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_add1_acquire_read) && \
-    defined(AO_HAVE_XSIZE_fetch_and_add1_acquire)
-#  define AO_XSIZE_fetch_and_add1_acquire_read(addr) \
-       AO_XSIZE_fetch_and_add1_acquire(addr)
-#  define AO_HAVE_XSIZE_fetch_and_add1_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_XSIZE_fetch_and_add1_acquire_read)
-#    define AO_XSIZE_fetch_and_add1_dd_acquire_read(addr) \
-       AO_XSIZE_fetch_and_add1_acquire_read(addr)
-#    define AO_HAVE_XSIZE_fetch_and_add1_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_XSIZE_fetch_and_add1)
-#    define AO_XSIZE_fetch_and_add1_dd_acquire_read(addr) \
-       AO_XSIZE_fetch_and_add1(addr)
-#    define AO_HAVE_XSIZE_fetch_and_add1_dd_acquire_read
-#  endif
-#endif
-
-/* XSIZE_fetch_and_sub1 */
-
-#if defined(AO_HAVE_XSIZE_fetch_and_add_full) &&\
-    !defined(AO_HAVE_XSIZE_fetch_and_sub1_full)
-#  define AO_XSIZE_fetch_and_sub1_full(addr) \
-       AO_XSIZE_fetch_and_add_full(addr,(unsigned XCTYPE)(-1))
-#  define AO_HAVE_XSIZE_fetch_and_sub1_full
-#endif
-#if defined(AO_HAVE_XSIZE_fetch_and_add_release) &&\
-    !defined(AO_HAVE_XSIZE_fetch_and_sub1_release)
-#  define AO_XSIZE_fetch_and_sub1_release(addr) \
-       AO_XSIZE_fetch_and_add_release(addr,(unsigned XCTYPE)(-1))
-#  define AO_HAVE_XSIZE_fetch_and_sub1_release
-#endif
-#if defined(AO_HAVE_XSIZE_fetch_and_add_acquire) &&\
-    !defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire)
-#  define AO_XSIZE_fetch_and_sub1_acquire(addr) \
-       AO_XSIZE_fetch_and_add_acquire(addr,(unsigned XCTYPE)(-1))
-#  define AO_HAVE_XSIZE_fetch_and_sub1_acquire
-#endif
-#if defined(AO_HAVE_XSIZE_fetch_and_add_write) &&\
-    !defined(AO_HAVE_XSIZE_fetch_and_sub1_write)
-#  define AO_XSIZE_fetch_and_sub1_write(addr) \
-       AO_XSIZE_fetch_and_add_write(addr,(unsigned XCTYPE)(-1))
-#  define AO_HAVE_XSIZE_fetch_and_sub1_write
-#endif
-#if defined(AO_HAVE_XSIZE_fetch_and_add_read) &&\
-    !defined(AO_HAVE_XSIZE_fetch_and_sub1_read)
-#  define AO_XSIZE_fetch_and_sub1_read(addr) \
-       AO_XSIZE_fetch_and_add_read(addr,(unsigned XCTYPE)(-1))
-#  define AO_HAVE_XSIZE_fetch_and_sub1_read
-#endif
-#if defined(AO_HAVE_XSIZE_fetch_and_add_release_write) &&\
-    !defined(AO_HAVE_XSIZE_fetch_and_sub1_release_write)
-#  define AO_XSIZE_fetch_and_sub1_release_write(addr) \
-       AO_XSIZE_fetch_and_add_release_write(addr,(unsigned XCTYPE)(-1))
-#  define AO_HAVE_XSIZE_fetch_and_sub1_release_write
-#endif
-#if defined(AO_HAVE_XSIZE_fetch_and_add_acquire_read) &&\
-    !defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire_read)
-#  define AO_XSIZE_fetch_and_sub1_acquire_read(addr) \
-       AO_XSIZE_fetch_and_add_acquire_read(addr,(unsigned XCTYPE)(-1))
-#  define AO_HAVE_XSIZE_fetch_and_sub1_acquire_read
-#endif
-#if defined(AO_HAVE_XSIZE_fetch_and_add) &&\
-    !defined(AO_HAVE_XSIZE_fetch_and_sub1)
-#  define AO_XSIZE_fetch_and_sub1(addr) \
-       AO_XSIZE_fetch_and_add(addr,(unsigned XCTYPE)(-1))
-#  define AO_HAVE_XSIZE_fetch_and_sub1
-#endif
-
-#if defined(AO_HAVE_XSIZE_fetch_and_sub1_full)
-#  if !defined(AO_HAVE_XSIZE_fetch_and_sub1_release)
-#    define AO_XSIZE_fetch_and_sub1_release(addr) \
-        AO_XSIZE_fetch_and_sub1_full(addr)
-#    define AO_HAVE_XSIZE_fetch_and_sub1_release
-#  endif
-#  if !defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire)
-#    define AO_XSIZE_fetch_and_sub1_acquire(addr) \
-        AO_XSIZE_fetch_and_sub1_full(addr)
-#    define AO_HAVE_XSIZE_fetch_and_sub1_acquire
-#  endif
-#  if !defined(AO_HAVE_XSIZE_fetch_and_sub1_write)
-#    define AO_XSIZE_fetch_and_sub1_write(addr) \
-        AO_XSIZE_fetch_and_sub1_full(addr)
-#    define AO_HAVE_XSIZE_fetch_and_sub1_write
-#  endif
-#  if !defined(AO_HAVE_XSIZE_fetch_and_sub1_read)
-#    define AO_XSIZE_fetch_and_sub1_read(addr) \
-        AO_XSIZE_fetch_and_sub1_full(addr)
-#    define AO_HAVE_XSIZE_fetch_and_sub1_read
-#  endif
-#endif /* AO_HAVE_XSIZE_fetch_and_sub1_full */
-
-#if !defined(AO_HAVE_XSIZE_fetch_and_sub1) && \
-    defined(AO_HAVE_XSIZE_fetch_and_sub1_release)
-#  define AO_XSIZE_fetch_and_sub1(addr) \
-       AO_XSIZE_fetch_and_sub1_release(addr)
-#  define AO_HAVE_XSIZE_fetch_and_sub1
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_sub1) && \
-    defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire)
-#  define AO_XSIZE_fetch_and_sub1(addr) \
-       AO_XSIZE_fetch_and_sub1_acquire(addr)
-#  define AO_HAVE_XSIZE_fetch_and_sub1
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_sub1) && \
-    defined(AO_HAVE_XSIZE_fetch_and_sub1_write)
-#  define AO_XSIZE_fetch_and_sub1(addr) \
-       AO_XSIZE_fetch_and_sub1_write(addr)
-#  define AO_HAVE_XSIZE_fetch_and_sub1
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_sub1) && \
-    defined(AO_HAVE_XSIZE_fetch_and_sub1_read)
-#  define AO_XSIZE_fetch_and_sub1(addr) \
-       AO_XSIZE_fetch_and_sub1_read(addr)
-#  define AO_HAVE_XSIZE_fetch_and_sub1
-#endif
-
-#if defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_XSIZE_fetch_and_sub1_full)
-#  define AO_XSIZE_fetch_and_sub1_full(addr) \
-       (AO_nop_full(), AO_XSIZE_fetch_and_sub1_acquire(addr))
-#  define AO_HAVE_XSIZE_fetch_and_sub1_full
-#endif
-
-#if !defined(AO_HAVE_XSIZE_fetch_and_sub1_release_write) && \
-    defined(AO_HAVE_XSIZE_fetch_and_sub1_write)
-#  define AO_XSIZE_fetch_and_sub1_release_write(addr) \
-       AO_XSIZE_fetch_and_sub1_write(addr)
-#  define AO_HAVE_XSIZE_fetch_and_sub1_release_write
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_sub1_release_write) && \
-    defined(AO_HAVE_XSIZE_fetch_and_sub1_release)
-#  define AO_XSIZE_fetch_and_sub1_release_write(addr) \
-       AO_XSIZE_fetch_and_sub1_release(addr)
-#  define AO_HAVE_XSIZE_fetch_and_sub1_release_write
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire_read) && \
-    defined(AO_HAVE_XSIZE_fetch_and_sub1_read)
-#  define AO_XSIZE_fetch_and_sub1_acquire_read(addr) \
-       AO_XSIZE_fetch_and_sub1_read(addr)
-#  define AO_HAVE_XSIZE_fetch_and_sub1_acquire_read
-#endif
-#if !defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire_read) && \
-    defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire)
-#  define AO_XSIZE_fetch_and_sub1_acquire_read(addr) \
-       AO_XSIZE_fetch_and_sub1_acquire(addr)
-#  define AO_HAVE_XSIZE_fetch_and_sub1_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire_read)
-#    define AO_XSIZE_fetch_and_sub1_dd_acquire_read(addr) \
-       AO_XSIZE_fetch_and_sub1_acquire_read(addr)
-#    define AO_HAVE_XSIZE_fetch_and_sub1_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_XSIZE_fetch_and_sub1)
-#    define AO_XSIZE_fetch_and_sub1_dd_acquire_read(addr) \
-       AO_XSIZE_fetch_and_sub1(addr)
-#    define AO_HAVE_XSIZE_fetch_and_sub1_dd_acquire_read
-#  endif
-#endif
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/generalize.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/generalize.h
deleted file mode 100644 (file)
index 45950c7..0000000
+++ /dev/null
@@ -1,1355 +0,0 @@
-/*
- * Copyright (c) 2003-2004 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */ 
-
-/*
- * Generalize atomic operations for atomic_ops.h.
- * Should not be included directly.
- *
- * We make no attempt to define useless operations, such as
- * AO_nop_acquire
- * AO_nop_release
- *
- * We have also so far neglected to define some others, which
- * do not appear likely to be useful, e.g. stores with acquire
- * or read barriers.
- *
- * This file is sometimes included twice by atomic_ops.h.
- * All definitions include explicit checks that we are not replacing
- * an earlier definition.  In general, more desirable expansions
- * appear earlier so that we are more likely to use them.
- *
- * We only make safe generalizations, except that by default we define
- * the ...dd_acquire_read operations to be equivalent to those without
- * a barrier.  On platforms for which this is unsafe, the platform-specific
- * file must define AO_NO_DD_ORDERING.
- */
-
-#ifndef ATOMIC_OPS_H
-# error Atomic_ops_generalize.h should not be included directly.
-#endif
-
-#if AO_CHAR_TS_T
-# define AO_TS_COMPARE_AND_SWAP_FULL(a,o,n) \
-        AO_char_compare_and_swap_full(a,o,n)
-# define AO_TS_COMPARE_AND_SWAP_ACQUIRE(a,o,n) \
-        AO_char_compare_and_swap_acquire(a,o,n)
-# define AO_TS_COMPARE_AND_SWAP_RELEASE(a,o,n) \
-        AO_char_compare_and_swap_release(a,o,n)
-# define AO_TS_COMPARE_AND_SWAP(a,o,n) \
-        AO_char_compare_and_swap(a,o,n)
-#endif
-
-#if AO_AO_TS_T
-# define AO_TS_COMPARE_AND_SWAP_FULL(a,o,n) \
-        AO_compare_and_swap_full(a,o,n)
-# define AO_TS_COMPARE_AND_SWAP_ACQUIRE(a,o,n) \
-        AO_compare_and_swap_acquire(a,o,n)
-# define AO_TS_COMPARE_AND_SWAP_RELEASE(a,o,n) \
-        AO_compare_and_swap_release(a,o,n)
-# define AO_TS_COMPARE_AND_SWAP(a,o,n) \
-        AO_compare_and_swap(a,o,n)
-#endif
-
-/* Generate test_and_set_full, if necessary and possible.      */
-#if !defined(AO_HAVE_test_and_set) && \
-    !defined(AO_HAVE_test_and_set_release) && \
-    !defined(AO_HAVE_test_and_set_acquire) && \
-    !defined(AO_HAVE_test_and_set_read) && \
-    !defined(AO_HAVE_test_and_set_full)
-#  if AO_AO_TS_T && defined(AO_HAVE_compare_and_swap_full) || \
-      AO_CHAR_TS_T && defined(AO_HAVE_char_compare_and_swap_full)
-     AO_INLINE AO_TS_VAL_t
-     AO_test_and_set_full(volatile AO_TS_t *addr)
-     {
-       if (AO_TS_COMPARE_AND_SWAP_FULL(addr, AO_TS_CLEAR, AO_TS_SET))
-         return AO_TS_CLEAR;
-       else
-         return AO_TS_SET;
-     }
-#    define AO_HAVE_test_and_set_full
-#  endif /* AO_HAVE_compare_and_swap_full */
-
-#  if AO_AO_TS_T && defined(AO_HAVE_compare_and_swap_acquire) || \
-      AO_CHAR_TS_T && defined(AO_HAVE_char_compare_and_swap_acquire)
-     AO_INLINE AO_TS_VAL_t
-     AO_test_and_set_acquire(volatile AO_TS_t *addr)
-     {
-       if (AO_TS_COMPARE_AND_SWAP_ACQUIRE(addr, AO_TS_CLEAR, AO_TS_SET))
-         return AO_TS_CLEAR;
-       else
-         return AO_TS_SET;
-     }
-#    define AO_HAVE_test_and_set_acquire
-#  endif /* AO_HAVE_compare_and_swap_acquire */
-
-#  if AO_AO_TS_T && defined(AO_HAVE_compare_and_swap_release) || \
-      AO_CHAR_TS_T && defined(AO_HAVE_char_compare_and_swap_release)
-     AO_INLINE AO_TS_VAL_t
-     AO_test_and_set_release(volatile AO_TS_t *addr)
-     {
-       if (AO_TS_COMPARE_AND_SWAP_RELEASE(addr, AO_TS_CLEAR, AO_TS_SET))
-         return AO_TS_CLEAR;
-       else
-         return AO_TS_SET;
-     }
-#    define AO_HAVE_test_and_set_release
-#  endif /* AO_HAVE_compare_and_swap_release */
-
-#  if AO_AO_TS_T && defined(AO_HAVE_compare_and_swap) || \
-      AO_CHAR_TS_T && defined(AO_HAVE_char_compare_and_swap)
-     AO_INLINE AO_TS_VAL_t
-     AO_test_and_set(volatile AO_TS_t *addr)
-     {
-       if (AO_TS_COMPARE_AND_SWAP(addr, AO_TS_CLEAR, AO_TS_SET))
-         return AO_TS_CLEAR;
-       else
-         return AO_TS_SET;
-     }
-#    define AO_HAVE_test_and_set
-#  endif /* AO_HAVE_compare_and_swap */
-
-#  if defined(AO_HAVE_test_and_set) && defined(AO_HAVE_nop_full) \
-      && !defined(AO_HAVE_test_and_set_acquire)
-     AO_INLINE AO_TS_VAL_t
-     AO_test_and_set_acquire(volatile AO_TS_t *addr)
-     {
-       AO_TS_VAL_t result = AO_test_and_set(addr);
-       AO_nop_full();
-       return result;
-     }
-#    define AO_HAVE_test_and_set_acquire
-#  endif
-
-#endif /* No prior test and set */
-
-/* Nop */
-#if !defined(AO_HAVE_nop)
-   AO_INLINE void AO_nop(void) {}
-#  define AO_HAVE_nop
-#endif
-
-#if defined(AO_HAVE_test_and_set_full) && !defined(AO_HAVE_nop_full)
-   AO_INLINE void
-   AO_nop_full(void)
-   {
-     AO_TS_t dummy = AO_TS_INITIALIZER;
-     AO_test_and_set_full(&dummy);
-   }
-#  define AO_HAVE_nop_full
-#endif
-
-#if defined(AO_HAVE_nop_acquire)
-#  error AO_nop_acquire is useless: dont define.
-#endif
-#if defined(AO_HAVE_nop_release)
-#  error AO_nop_release is useless: dont define.
-#endif
-
-#if defined(AO_HAVE_nop_full) && !defined(AO_HAVE_nop_read)
-#  define AO_nop_read() AO_nop_full()
-#  define AO_HAVE_nop_read
-#endif
-
-#if defined(AO_HAVE_nop_full) && !defined(AO_HAVE_nop_write)
-#  define AO_nop_write() AO_nop_full()
-#  define AO_HAVE_nop_write
-#endif
-
-/* Load */
-#if defined(AO_HAVE_load_full) && !defined(AO_HAVE_load_acquire)
-#  define AO_load_acquire(addr) AO_load_full(addr)
-#  define AO_HAVE_load_acquire
-#endif
-
-#if defined(AO_HAVE_load_acquire) && !defined(AO_HAVE_load)
-#  define AO_load(addr) AO_load_acquire(addr)
-#  define AO_HAVE_load
-#endif
-
-#if defined(AO_HAVE_load_full) && !defined(AO_HAVE_load_read)
-#  define AO_load_read(addr) AO_load_full(addr)
-#  define AO_HAVE_load_read
-#endif
-
-#if !defined(AO_HAVE_load_acquire_read) && defined(AO_HAVE_load_acquire)
-#  define AO_load_acquire_read(addr) AO_load_acquire(addr)
-#  define AO_HAVE_load_acquire_read
-#endif
-
-#if defined(AO_HAVE_load) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_load_acquire)
-   AO_INLINE AO_t
-   AO_load_acquire(const volatile AO_t *addr)
-   {
-     AO_t result = AO_load(addr);
-     /* Acquire barrier would be useless, since the load could be delayed  */
-     /* beyond it.                                                        */
-     AO_nop_full();
-     return result;
-   }
-#  define AO_HAVE_load_acquire
-#endif
-
-#if defined(AO_HAVE_load) && defined(AO_HAVE_nop_read) && \
-    !defined(AO_HAVE_load_read)
-   AO_INLINE AO_t
-   AO_load_read(const volatile AO_t *addr)
-   {
-     AO_t result = AO_load(addr);
-     /* Acquire barrier would be useless, since the load could be delayed  */
-     /* beyond it.                                                        */
-     AO_nop_read();
-     return result;
-   }
-#  define AO_HAVE_load_read
-#endif
-
-#if defined(AO_HAVE_load_acquire) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_load_full)
-#  define AO_load_full(addr) (AO_nop_full(), AO_load_acquire(addr))
-#  define AO_HAVE_load_full
-#endif
-#if !defined(AO_HAVE_load_acquire_read) && defined(AO_HAVE_load_read)
-#  define AO_load_acquire_read(addr) AO_load_read(addr)
-#  define AO_HAVE_load_acquire_read
-#endif
-
-#if defined(AO_HAVE_load_acquire_read) && !defined(AO_HAVE_load)
-#  define AO_load(addr) AO_load_acquire_read(addr)
-#  define AO_HAVE_load
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_load_acquire_read)
-#    define AO_load_dd_acquire_read(addr) AO_load_acquire_read(addr)
-#    define AO_HAVE_load_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_load)
-#    define AO_load_dd_acquire_read(addr) AO_load(addr)
-#    define AO_HAVE_load_dd_acquire_read
-#  endif
-#endif
-
-
-/* Store */
-
-#if defined(AO_HAVE_store_full) && !defined(AO_HAVE_store_release)
-#  define AO_store_release(addr,val) AO_store_full(addr,val)
-#  define AO_HAVE_store_release
-#endif
-
-#if defined(AO_HAVE_store_release) && !defined(AO_HAVE_store)
-#  define AO_store(addr, val) AO_store_release(addr,val)
-#  define AO_HAVE_store
-#endif
-
-#if defined(AO_HAVE_store_full) && !defined(AO_HAVE_store_write)
-#  define AO_store_write(addr,val) AO_store_full(addr,val)
-#  define AO_HAVE_store_write
-#endif
-
-#if defined(AO_HAVE_store_release) && !defined(AO_HAVE_store_release_write)
-#  define AO_store_release_write(addr, val) AO_store_release(addr,val)
-#  define AO_HAVE_store_release_write
-#endif
-
-#if defined(AO_HAVE_store_write) && !defined(AO_HAVE_store)
-#  define AO_store(addr, val) AO_store_write(addr,val)
-#  define AO_HAVE_store
-#endif
-
-#if defined(AO_HAVE_store) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_store_release)
-#  define AO_store_release(addr,val) (AO_nop_full(), AO_store(addr,val))
-#  define AO_HAVE_store_release
-#endif
-
-#if defined(AO_HAVE_nop_write) && defined(AO_HAVE_store) && \
-     !defined(AO_HAVE_store_write)
-#  define AO_store_write(addr, val) (AO_nop_write(), AO_store(addr,val))
-#  define AO_HAVE_store_write
-#endif
-
-#if defined(AO_HAVE_store_write) && !defined(AO_HAVE_store_release_write)
-#  define AO_store_release_write(addr, val) AO_store_write(addr,val)
-#  define AO_HAVE_store_release_write
-#endif
-
-#if defined(AO_HAVE_store_release) && defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_store_full)
-#  define AO_store_full(addr, val) (AO_store_release(addr, val), AO_nop_full())
-#  define AO_HAVE_store_full
-#endif
-
-/* NEC LE-IT: Test and set */
-#if defined(AO_HAVE_test_and_set) && \
-       defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_test_and_set_release)
-#      define AO_test_and_set_release(addr) \
-       (AO_nop_full(), AO_test_and_set(addr))
-#  define AO_HAVE_test_and_set_release
-#endif
-
-#if defined(AO_HAVE_test_and_set) && \
-       defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_test_and_set_acquire)
-AO_INLINE AO_TS_t
-AO_test_and_set_acquire(volatile AO_TS_t *addr)
-{
-       AO_TS_t res = AO_test_and_set(addr);
-       AO_nop_full();
-       return res; 
-}  
-#  define AO_HAVE_test_and_set_acquire
-#endif
-
-  
-/* Fetch_and_add */
-/* We first try to implement fetch_and_add variants in terms   */
-/* of the corresponding compare_and_swap variants to minimize  */
-/* adding barriers.                                            */
-#if defined(AO_HAVE_compare_and_swap_full) && \
-    !defined(AO_HAVE_fetch_and_add_full)
-   AO_INLINE AO_t
-   AO_fetch_and_add_full(volatile AO_t *addr, AO_t incr)
-   {
-     AO_t old;
-     do
-       {
-         old = *addr;
-       }
-     while (!AO_compare_and_swap_full(addr, old, old+incr));
-     return old;
-   }
-#  define AO_HAVE_fetch_and_add_full
-#endif
-
-#if defined(AO_HAVE_compare_and_swap_acquire) && \
-    !defined(AO_HAVE_fetch_and_add_acquire)
-   AO_INLINE AO_t
-   AO_fetch_and_add_acquire(volatile AO_t *addr, AO_t incr)
-   {
-     AO_t old;
-     do
-       {
-         old = *addr;
-       }
-     while (!AO_compare_and_swap_acquire(addr, old, old+incr));
-     return old;
-   }
-#  define AO_HAVE_fetch_and_add_acquire
-#endif
-
-#if defined(AO_HAVE_compare_and_swap_release) && \
-    !defined(AO_HAVE_fetch_and_add_release)
-   AO_INLINE AO_t
-   AO_fetch_and_add_release(volatile AO_t *addr, AO_t incr)
-   {
-     AO_t old;
-     do
-       {
-         old = *addr;
-       }
-     while (!AO_compare_and_swap_release(addr, old, old+incr));
-     return old;
-   }
-#  define AO_HAVE_fetch_and_add_release
-#endif
-
-#if defined(AO_HAVE_compare_and_swap) && \
-    !defined(AO_HAVE_fetch_and_add)
-   AO_INLINE AO_t
-   AO_fetch_and_add(volatile AO_t *addr, AO_t incr)
-   {
-     AO_t old;
-     do
-       {
-         old = *addr;
-       }
-     while (!AO_compare_and_swap(addr, old, old+incr));
-     return old;
-   }
-#  define AO_HAVE_fetch_and_add
-#endif
-
-#if defined(AO_HAVE_fetch_and_add_full)
-#  if !defined(AO_HAVE_fetch_and_add_release)
-#    define AO_fetch_and_add_release(addr, val) \
-        AO_fetch_and_add_full(addr, val)
-#    define AO_HAVE_fetch_and_add_release
-#  endif
-#  if !defined(AO_HAVE_fetch_and_add_acquire)
-#    define AO_fetch_and_add_acquire(addr, val) \
-        AO_fetch_and_add_full(addr, val)
-#    define AO_HAVE_fetch_and_add_acquire
-#  endif
-#  if !defined(AO_HAVE_fetch_and_add_write)
-#    define AO_fetch_and_add_write(addr, val) \
-        AO_fetch_and_add_full(addr, val)
-#    define AO_HAVE_fetch_and_add_write
-#  endif
-#  if !defined(AO_HAVE_fetch_and_add_read)
-#    define AO_fetch_and_add_read(addr, val) \
-        AO_fetch_and_add_full(addr, val)
-#    define AO_HAVE_fetch_and_add_read
-#  endif
-#endif /* AO_HAVE_fetch_and_add_full */
-
-#if !defined(AO_HAVE_fetch_and_add) && \
-    defined(AO_HAVE_fetch_and_add_release)
-#  define AO_fetch_and_add(addr, val) \
-       AO_fetch_and_add_release(addr, val)
-#  define AO_HAVE_fetch_and_add
-#endif
-#if !defined(AO_HAVE_fetch_and_add) && \
-    defined(AO_HAVE_fetch_and_add_acquire)
-#  define AO_fetch_and_add(addr, val) \
-       AO_fetch_and_add_acquire(addr, val)
-#  define AO_HAVE_fetch_and_add
-#endif
-#if !defined(AO_HAVE_fetch_and_add) && \
-    defined(AO_HAVE_fetch_and_add_write)
-#  define AO_fetch_and_add(addr, val) \
-       AO_fetch_and_add_write(addr, val)
-#  define AO_HAVE_fetch_and_add
-#endif
-#if !defined(AO_HAVE_fetch_and_add) && \
-    defined(AO_HAVE_fetch_and_add_read)
-#  define AO_fetch_and_add(addr, val) \
-       AO_fetch_and_add_read(addr, val)
-#  define AO_HAVE_fetch_and_add
-#endif
-
-#if defined(AO_HAVE_fetch_and_add_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_fetch_and_add_full)
-#  define AO_fetch_and_add_full(addr, val) \
-       (AO_nop_full(), AO_fetch_and_add_acquire(addr, val))
-#  define AO_HAVE_fetch_and_add_full
-#endif
-
-#if !defined(AO_HAVE_fetch_and_add_release_write) && \
-    defined(AO_HAVE_fetch_and_add_write)
-#  define AO_fetch_and_add_release_write(addr, val) \
-       AO_fetch_and_add_write(addr, val)
-#  define AO_HAVE_fetch_and_add_release_write
-#endif
-#if !defined(AO_HAVE_fetch_and_add_release_write) && \
-    defined(AO_HAVE_fetch_and_add_release)
-#  define AO_fetch_and_add_release_write(addr, val) \
-       AO_fetch_and_add_release(addr, val)
-#  define AO_HAVE_fetch_and_add_release_write
-#endif
-#if !defined(AO_HAVE_fetch_and_add_acquire_read) && \
-    defined(AO_HAVE_fetch_and_add_read)
-#  define AO_fetch_and_add_acquire_read(addr, val) \
-       AO_fetch_and_add_read(addr, val)
-#  define AO_HAVE_fetch_and_add_acquire_read
-#endif
-#if !defined(AO_HAVE_fetch_and_add_acquire_read) && \
-    defined(AO_HAVE_fetch_and_add_acquire)
-#  define AO_fetch_and_add_acquire_read(addr, val) \
-       AO_fetch_and_add_acquire(addr, val)
-#  define AO_HAVE_fetch_and_add_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_fetch_and_add_acquire_read)
-#    define AO_fetch_and_add_dd_acquire_read(addr, val) \
-       AO_fetch_and_add_acquire_read(addr, val)
-#    define AO_HAVE_fetch_and_add_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_fetch_and_add)
-#    define AO_fetch_and_add_dd_acquire_read(addr, val) \
-       AO_fetch_and_add(addr, val)
-#    define AO_HAVE_fetch_and_add_dd_acquire_read
-#  endif
-#endif
-  
-/* Fetch_and_add1 */
-
-#if defined(AO_HAVE_fetch_and_add_full) &&\
-    !defined(AO_HAVE_fetch_and_add1_full)
-#  define AO_fetch_and_add1_full(addr) AO_fetch_and_add_full(addr,1)
-#  define AO_HAVE_fetch_and_add1_full
-#endif
-#if defined(AO_HAVE_fetch_and_add_release) &&\
-    !defined(AO_HAVE_fetch_and_add1_release)
-#  define AO_fetch_and_add1_release(addr) AO_fetch_and_add_release(addr,1)
-#  define AO_HAVE_fetch_and_add1_release
-#endif
-#if defined(AO_HAVE_fetch_and_add_acquire) &&\
-    !defined(AO_HAVE_fetch_and_add1_acquire)
-#  define AO_fetch_and_add1_acquire(addr) AO_fetch_and_add_acquire(addr,1)
-#  define AO_HAVE_fetch_and_add1_acquire
-#endif
-#if defined(AO_HAVE_fetch_and_add_write) &&\
-    !defined(AO_HAVE_fetch_and_add1_write)
-#  define AO_fetch_and_add1_write(addr) AO_fetch_and_add_write(addr,1)
-#  define AO_HAVE_fetch_and_add1_write
-#endif
-#if defined(AO_HAVE_fetch_and_add_read) &&\
-    !defined(AO_HAVE_fetch_and_add1_read)
-#  define AO_fetch_and_add1_read(addr) AO_fetch_and_add_read(addr,1)
-#  define AO_HAVE_fetch_and_add1_read
-#endif
-#if defined(AO_HAVE_fetch_and_add_release_write) &&\
-    !defined(AO_HAVE_fetch_and_add1_release_write)
-#  define AO_fetch_and_add1_release_write(addr) \
-       AO_fetch_and_add_release_write(addr,1)
-#  define AO_HAVE_fetch_and_add1_release_write
-#endif
-#if defined(AO_HAVE_fetch_and_add_acquire_read) &&\
-    !defined(AO_HAVE_fetch_and_add1_acquire_read)
-#  define AO_fetch_and_add1_acquire_read(addr) \
-       AO_fetch_and_add_acquire_read(addr,1)
-#  define AO_HAVE_fetch_and_add1_acquire_read
-#endif
-#if defined(AO_HAVE_fetch_and_add) &&\
-    !defined(AO_HAVE_fetch_and_add1)
-#  define AO_fetch_and_add1(addr) \
-       AO_fetch_and_add(addr,1)
-#  define AO_HAVE_fetch_and_add1
-#endif
-
-#if defined(AO_HAVE_fetch_and_add1_full)
-#  if !defined(AO_HAVE_fetch_and_add1_release)
-#    define AO_fetch_and_add1_release(addr) \
-        AO_fetch_and_add1_full(addr)
-#    define AO_HAVE_fetch_and_add1_release
-#  endif
-#  if !defined(AO_HAVE_fetch_and_add1_acquire)
-#    define AO_fetch_and_add1_acquire(addr) \
-        AO_fetch_and_add1_full(addr)
-#    define AO_HAVE_fetch_and_add1_acquire
-#  endif
-#  if !defined(AO_HAVE_fetch_and_add1_write)
-#    define AO_fetch_and_add1_write(addr) \
-        AO_fetch_and_add1_full(addr)
-#    define AO_HAVE_fetch_and_add1_write
-#  endif
-#  if !defined(AO_HAVE_fetch_and_add1_read)
-#    define AO_fetch_and_add1_read(addr) \
-        AO_fetch_and_add1_full(addr)
-#    define AO_HAVE_fetch_and_add1_read
-#  endif
-#endif /* AO_HAVE_fetch_and_add1_full */
-
-#if !defined(AO_HAVE_fetch_and_add1) && \
-    defined(AO_HAVE_fetch_and_add1_release)
-#  define AO_fetch_and_add1(addr) \
-       AO_fetch_and_add1_release(addr)
-#  define AO_HAVE_fetch_and_add1
-#endif
-#if !defined(AO_HAVE_fetch_and_add1) && \
-    defined(AO_HAVE_fetch_and_add1_acquire)
-#  define AO_fetch_and_add1(addr) \
-       AO_fetch_and_add1_acquire(addr)
-#  define AO_HAVE_fetch_and_add1
-#endif
-#if !defined(AO_HAVE_fetch_and_add1) && \
-    defined(AO_HAVE_fetch_and_add1_write)
-#  define AO_fetch_and_add1(addr) \
-       AO_fetch_and_add1_write(addr)
-#  define AO_HAVE_fetch_and_add1
-#endif
-#if !defined(AO_HAVE_fetch_and_add1) && \
-    defined(AO_HAVE_fetch_and_add1_read)
-#  define AO_fetch_and_add1(addr) \
-       AO_fetch_and_add1_read(addr)
-#  define AO_HAVE_fetch_and_add1
-#endif
-
-#if defined(AO_HAVE_fetch_and_add1_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_fetch_and_add1_full)
-#  define AO_fetch_and_add1_full(addr) \
-       (AO_nop_full(), AO_fetch_and_add1_acquire(addr))
-#  define AO_HAVE_fetch_and_add1_full
-#endif
-
-#if !defined(AO_HAVE_fetch_and_add1_release_write) && \
-    defined(AO_HAVE_fetch_and_add1_write)
-#  define AO_fetch_and_add1_release_write(addr) \
-       AO_fetch_and_add1_write(addr)
-#  define AO_HAVE_fetch_and_add1_release_write
-#endif
-#if !defined(AO_HAVE_fetch_and_add1_release_write) && \
-    defined(AO_HAVE_fetch_and_add1_release)
-#  define AO_fetch_and_add1_release_write(addr) \
-       AO_fetch_and_add1_release(addr)
-#  define AO_HAVE_fetch_and_add1_release_write
-#endif
-#if !defined(AO_HAVE_fetch_and_add1_acquire_read) && \
-    defined(AO_HAVE_fetch_and_add1_read)
-#  define AO_fetch_and_add1_acquire_read(addr) \
-       AO_fetch_and_add1_read(addr)
-#  define AO_HAVE_fetch_and_add1_acquire_read
-#endif
-#if !defined(AO_HAVE_fetch_and_add1_acquire_read) && \
-    defined(AO_HAVE_fetch_and_add1_acquire)
-#  define AO_fetch_and_add1_acquire_read(addr) \
-       AO_fetch_and_add1_acquire(addr)
-#  define AO_HAVE_fetch_and_add1_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_fetch_and_add1_acquire_read)
-#    define AO_fetch_and_add1_dd_acquire_read(addr) \
-       AO_fetch_and_add1_acquire_read(addr)
-#    define AO_HAVE_fetch_and_add1_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_fetch_and_add1)
-#    define AO_fetch_and_add1_dd_acquire_read(addr) AO_fetch_and_add1(addr)
-#    define AO_HAVE_fetch_and_add1_dd_acquire_read
-#  endif
-#endif
-
-/* Fetch_and_sub1 */
-
-#if defined(AO_HAVE_fetch_and_add_full) &&\
-    !defined(AO_HAVE_fetch_and_sub1_full)
-#  define AO_fetch_and_sub1_full(addr) AO_fetch_and_add_full(addr,(AO_t)(-1))
-#  define AO_HAVE_fetch_and_sub1_full
-#endif
-#if defined(AO_HAVE_fetch_and_add_release) &&\
-    !defined(AO_HAVE_fetch_and_sub1_release)
-#  define AO_fetch_and_sub1_release(addr) \
-       AO_fetch_and_add_release(addr,(AO_t)(-1))
-#  define AO_HAVE_fetch_and_sub1_release
-#endif
-#if defined(AO_HAVE_fetch_and_add_acquire) &&\
-    !defined(AO_HAVE_fetch_and_sub1_acquire)
-#  define AO_fetch_and_sub1_acquire(addr) \
-       AO_fetch_and_add_acquire(addr,(AO_t)(-1))
-#  define AO_HAVE_fetch_and_sub1_acquire
-#endif
-#if defined(AO_HAVE_fetch_and_add_write) &&\
-    !defined(AO_HAVE_fetch_and_sub1_write)
-#  define AO_fetch_and_sub1_write(addr) \
-       AO_fetch_and_add_write(addr,(AO_t)(-1))
-#  define AO_HAVE_fetch_and_sub1_write
-#endif
-#if defined(AO_HAVE_fetch_and_add_read) &&\
-    !defined(AO_HAVE_fetch_and_sub1_read)
-#  define AO_fetch_and_sub1_read(addr) \
-       AO_fetch_and_add_read(addr,(AO_t)(-1))
-#  define AO_HAVE_fetch_and_sub1_read
-#endif
-#if defined(AO_HAVE_fetch_and_add_release_write) &&\
-    !defined(AO_HAVE_fetch_and_sub1_release_write)
-#  define AO_fetch_and_sub1_release_write(addr) \
-       AO_fetch_and_add_release_write(addr,(AO_t)(-1))
-#  define AO_HAVE_fetch_and_sub1_release_write
-#endif
-#if defined(AO_HAVE_fetch_and_add_acquire_read) &&\
-    !defined(AO_HAVE_fetch_and_sub1_acquire_read)
-#  define AO_fetch_and_sub1_acquire_read(addr) \
-       AO_fetch_and_add_acquire_read(addr,(AO_t)(-1))
-#  define AO_HAVE_fetch_and_sub1_acquire_read
-#endif
-#if defined(AO_HAVE_fetch_and_add) &&\
-    !defined(AO_HAVE_fetch_and_sub1)
-#  define AO_fetch_and_sub1(addr) \
-       AO_fetch_and_add(addr,(AO_t)(-1))
-#  define AO_HAVE_fetch_and_sub1
-#endif
-
-#if defined(AO_HAVE_fetch_and_sub1_full)
-#  if !defined(AO_HAVE_fetch_and_sub1_release)
-#    define AO_fetch_and_sub1_release(addr) \
-        AO_fetch_and_sub1_full(addr)
-#    define AO_HAVE_fetch_and_sub1_release
-#  endif
-#  if !defined(AO_HAVE_fetch_and_sub1_acquire)
-#    define AO_fetch_and_sub1_acquire(addr) \
-        AO_fetch_and_sub1_full(addr)
-#    define AO_HAVE_fetch_and_sub1_acquire
-#  endif
-#  if !defined(AO_HAVE_fetch_and_sub1_write)
-#    define AO_fetch_and_sub1_write(addr) \
-        AO_fetch_and_sub1_full(addr)
-#    define AO_HAVE_fetch_and_sub1_write
-#  endif
-#  if !defined(AO_HAVE_fetch_and_sub1_read)
-#    define AO_fetch_and_sub1_read(addr) \
-        AO_fetch_and_sub1_full(addr)
-#    define AO_HAVE_fetch_and_sub1_read
-#  endif
-#endif /* AO_HAVE_fetch_and_sub1_full */
-
-#if !defined(AO_HAVE_fetch_and_sub1) && \
-    defined(AO_HAVE_fetch_and_sub1_release)
-#  define AO_fetch_and_sub1(addr) \
-       AO_fetch_and_sub1_release(addr)
-#  define AO_HAVE_fetch_and_sub1
-#endif
-#if !defined(AO_HAVE_fetch_and_sub1) && \
-    defined(AO_HAVE_fetch_and_sub1_acquire)
-#  define AO_fetch_and_sub1(addr) \
-       AO_fetch_and_sub1_acquire(addr)
-#  define AO_HAVE_fetch_and_sub1
-#endif
-#if !defined(AO_HAVE_fetch_and_sub1) && \
-    defined(AO_HAVE_fetch_and_sub1_write)
-#  define AO_fetch_and_sub1(addr) \
-       AO_fetch_and_sub1_write(addr)
-#  define AO_HAVE_fetch_and_sub1
-#endif
-#if !defined(AO_HAVE_fetch_and_sub1) && \
-    defined(AO_HAVE_fetch_and_sub1_read)
-#  define AO_fetch_and_sub1(addr) \
-       AO_fetch_and_sub1_read(addr)
-#  define AO_HAVE_fetch_and_sub1
-#endif
-
-#if defined(AO_HAVE_fetch_and_sub1_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_fetch_and_sub1_full)
-#  define AO_fetch_and_sub1_full(addr) \
-       (AO_nop_full(), AO_fetch_and_sub1_acquire(addr))
-#  define AO_HAVE_fetch_and_sub1_full
-#endif
-
-#if !defined(AO_HAVE_fetch_and_sub1_release_write) && \
-    defined(AO_HAVE_fetch_and_sub1_write)
-#  define AO_fetch_and_sub1_release_write(addr) \
-       AO_fetch_and_sub1_write(addr)
-#  define AO_HAVE_fetch_and_sub1_release_write
-#endif
-#if !defined(AO_HAVE_fetch_and_sub1_release_write) && \
-    defined(AO_HAVE_fetch_and_sub1_release)
-#  define AO_fetch_and_sub1_release_write(addr) \
-       AO_fetch_and_sub1_release(addr)
-#  define AO_HAVE_fetch_and_sub1_release_write
-#endif
-#if !defined(AO_HAVE_fetch_and_sub1_acquire_read) && \
-    defined(AO_HAVE_fetch_and_sub1_read)
-#  define AO_fetch_and_sub1_acquire_read(addr) \
-       AO_fetch_and_sub1_read(addr)
-#  define AO_HAVE_fetch_and_sub1_acquire_read
-#endif
-#if !defined(AO_HAVE_fetch_and_sub1_acquire_read) && \
-    defined(AO_HAVE_fetch_and_sub1_acquire)
-#  define AO_fetch_and_sub1_acquire_read(addr) \
-       AO_fetch_and_sub1_acquire(addr)
-#  define AO_HAVE_fetch_and_sub1_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_fetch_and_sub1_acquire_read)
-#    define AO_fetch_and_sub1_dd_acquire_read(addr) \
-       AO_fetch_and_sub1_acquire_read(addr)
-#    define AO_HAVE_fetch_and_sub1_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_fetch_and_sub1)
-#    define AO_fetch_and_sub1_dd_acquire_read(addr) AO_fetch_and_sub1(addr)
-#    define AO_HAVE_fetch_and_sub1_dd_acquire_read
-#  endif
-#endif
-
-/* Atomic or */
-#if defined(AO_HAVE_compare_and_swap_full) && \
-    !defined(AO_HAVE_or_full)
-   AO_INLINE void
-   AO_or_full(volatile AO_t *addr, AO_t incr)
-   {
-     AO_t old;
-     do
-       {
-         old = *addr;
-       }
-     while (!AO_compare_and_swap_full(addr, old, (old | incr)));
-   }
-#  define AO_HAVE_or_full
-#endif
-
-#if defined(AO_HAVE_or_full)
-#  if !defined(AO_HAVE_or_release)
-#    define AO_or_release(addr, val) \
-        AO_or_full(addr, val)
-#    define AO_HAVE_or_release
-#  endif
-#  if !defined(AO_HAVE_or_acquire)
-#    define AO_or_acquire(addr, val) \
-        AO_or_full(addr, val)
-#    define AO_HAVE_or_acquire
-#  endif
-#  if !defined(AO_HAVE_or_write)
-#    define AO_or_write(addr, val) \
-        AO_or_full(addr, val)
-#    define AO_HAVE_or_write
-#  endif
-#  if !defined(AO_HAVE_or_read)
-#    define AO_or_read(addr, val) \
-        AO_or_full(addr, val)
-#    define AO_HAVE_or_read
-#  endif
-#endif /* AO_HAVE_or_full */
-
-#if !defined(AO_HAVE_or) && \
-    defined(AO_HAVE_or_release)
-#  define AO_or(addr, val) \
-       AO_or_release(addr, val)
-#  define AO_HAVE_or
-#endif
-#if !defined(AO_HAVE_or) && \
-    defined(AO_HAVE_or_acquire)
-#  define AO_or(addr, val) \
-       AO_or_acquire(addr, val)
-#  define AO_HAVE_or
-#endif
-#if !defined(AO_HAVE_or) && \
-    defined(AO_HAVE_or_write)
-#  define AO_or(addr, val) \
-       AO_or_write(addr, val)
-#  define AO_HAVE_or
-#endif
-#if !defined(AO_HAVE_or) && \
-    defined(AO_HAVE_or_read)
-#  define AO_or(addr, val) \
-       AO_or_read(addr, val)
-#  define AO_HAVE_or
-#endif
-
-#if defined(AO_HAVE_or_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_or_full)
-#  define AO_or_full(addr, val) \
-       (AO_nop_full(), AO_or_acquire(addr, val))
-#endif
-
-#if !defined(AO_HAVE_or_release_write) && \
-    defined(AO_HAVE_or_write)
-#  define AO_or_release_write(addr, val) \
-       AO_or_write(addr, val)
-#  define AO_HAVE_or_release_write
-#endif
-#if !defined(AO_HAVE_or_release_write) && \
-    defined(AO_HAVE_or_release)
-#  define AO_or_release_write(addr, val) \
-       AO_or_release(addr, val)
-#  define AO_HAVE_or_release_write
-#endif
-#if !defined(AO_HAVE_or_acquire_read) && \
-    defined(AO_HAVE_or_read)
-#  define AO_or_acquire_read(addr, val) \
-       AO_or_read(addr, val)
-#  define AO_HAVE_or_acquire_read
-#endif
-#if !defined(AO_HAVE_or_acquire_read) && \
-    defined(AO_HAVE_or_acquire)
-#  define AO_or_acquire_read(addr, val) \
-       AO_or_acquire(addr, val)
-#  define AO_HAVE_or_acquire_read
-#endif
-
-/* dd_aquire_read is meaningless.      */
-  
-/* Test_and_set */
-  
-#if defined(AO_HAVE_test_and_set_full)
-#  if !defined(AO_HAVE_test_and_set_release)
-#    define AO_test_and_set_release(addr) \
-        AO_test_and_set_full(addr)
-#    define AO_HAVE_test_and_set_release
-#  endif
-#  if !defined(AO_HAVE_test_and_set_acquire)
-#    define AO_test_and_set_acquire(addr) \
-        AO_test_and_set_full(addr)
-#    define AO_HAVE_test_and_set_acquire
-#  endif
-#  if !defined(AO_HAVE_test_and_set_write)
-#    define AO_test_and_set_write(addr) \
-        AO_test_and_set_full(addr)
-#    define AO_HAVE_test_and_set_write
-#  endif
-#  if !defined(AO_HAVE_test_and_set_read)
-#    define AO_test_and_set_read(addr) \
-        AO_test_and_set_full(addr)
-#    define AO_HAVE_test_and_set_read
-#  endif
-#endif /* AO_HAVE_test_and_set_full */
-
-#if !defined(AO_HAVE_test_and_set) && \
-    defined(AO_HAVE_test_and_set_release)
-#  define AO_test_and_set(addr) \
-       AO_test_and_set_release(addr)
-#  define AO_HAVE_test_and_set
-#endif
-#if !defined(AO_HAVE_test_and_set) && \
-    defined(AO_HAVE_test_and_set_acquire)
-#  define AO_test_and_set(addr) \
-       AO_test_and_set_acquire(addr)
-#  define AO_HAVE_test_and_set
-#endif
-#if !defined(AO_HAVE_test_and_set) && \
-    defined(AO_HAVE_test_and_set_write)
-#  define AO_test_and_set(addr) \
-       AO_test_and_set_write(addr)
-#  define AO_HAVE_test_and_set
-#endif
-#if !defined(AO_HAVE_test_and_set) && \
-    defined(AO_HAVE_test_and_set_read)
-#  define AO_test_and_set(addr) \
-       AO_test_and_set_read(addr)
-#  define AO_HAVE_test_and_set
-#endif
-
-#if defined(AO_HAVE_test_and_set_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_test_and_set_full)
-#  define AO_test_and_set_full(addr) \
-       (AO_nop_full(), AO_test_and_set_acquire(addr))
-#  define AO_HAVE_test_and_set_full
-#endif
-
-#if !defined(AO_HAVE_test_and_set_release_write) && \
-    defined(AO_HAVE_test_and_set_write)
-#  define AO_test_and_set_release_write(addr) \
-       AO_test_and_set_write(addr)
-#  define AO_HAVE_test_and_set_release_write
-#endif
-#if !defined(AO_HAVE_test_and_set_release_write) && \
-    defined(AO_HAVE_test_and_set_release)
-#  define AO_test_and_set_release_write(addr) \
-       AO_test_and_set_release(addr)
-#  define AO_HAVE_test_and_set_release_write
-#endif
-#if !defined(AO_HAVE_test_and_set_acquire_read) && \
-    defined(AO_HAVE_test_and_set_read)
-#  define AO_test_and_set_acquire_read(addr) \
-       AO_test_and_set_read(addr)
-#  define AO_HAVE_test_and_set_acquire_read
-#endif
-#if !defined(AO_HAVE_test_and_set_acquire_read) && \
-    defined(AO_HAVE_test_and_set_acquire)
-#  define AO_test_and_set_acquire_read(addr) \
-       AO_test_and_set_acquire(addr)
-#  define AO_HAVE_test_and_set_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_test_and_set_acquire_read)
-#    define AO_test_and_set_dd_acquire_read(addr) \
-       AO_test_and_set_acquire_read(addr)
-#    define AO_HAVE_test_and_set_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_test_and_set)
-#    define AO_test_and_set_dd_acquire_read(addr) AO_test_and_set(addr)
-#    define AO_HAVE_test_and_set_dd_acquire_read
-#  endif
-#endif
-
-/* Compare_and_swap */
-#if defined(AO_HAVE_compare_and_swap) && defined(AO_HAVE_nop_full)\
-    && !defined(AO_HAVE_compare_and_swap_acquire)
-   AO_INLINE int
-   AO_compare_and_swap_acquire(volatile AO_t *addr, AO_t old, AO_t new_val)
-   {
-     int result = AO_compare_and_swap(addr, old, new_val);
-     AO_nop_full();
-     return result;
-   }
-#  define AO_HAVE_compare_and_swap_acquire
-#endif
-#if defined(AO_HAVE_compare_and_swap) && defined(AO_HAVE_nop_full)\
-    && !defined(AO_HAVE_compare_and_swap_release)
-#  define AO_compare_and_swap_release(addr, old, new_val) \
-       (AO_nop_full(), AO_compare_and_swap(addr, old, new_val))
-#  define AO_HAVE_compare_and_swap_release
-#endif
-#if defined(AO_HAVE_compare_and_swap_full)
-#  if !defined(AO_HAVE_compare_and_swap_release)
-#    define AO_compare_and_swap_release(addr, old, new_val) \
-        AO_compare_and_swap_full(addr, old, new_val)
-#    define AO_HAVE_compare_and_swap_release
-#  endif
-#  if !defined(AO_HAVE_compare_and_swap_acquire)
-#    define AO_compare_and_swap_acquire(addr, old, new_val) \
-        AO_compare_and_swap_full(addr, old, new_val)
-#    define AO_HAVE_compare_and_swap_acquire
-#  endif
-#  if !defined(AO_HAVE_compare_and_swap_write)
-#    define AO_compare_and_swap_write(addr, old, new_val) \
-        AO_compare_and_swap_full(addr, old, new_val)
-#    define AO_HAVE_compare_and_swap_write
-#  endif
-#  if !defined(AO_HAVE_compare_and_swap_read)
-#    define AO_compare_and_swap_read(addr, old, new_val) \
-        AO_compare_and_swap_full(addr, old, new_val)
-#    define AO_HAVE_compare_and_swap_read
-#  endif
-#endif /* AO_HAVE_compare_and_swap_full */
-
-#if !defined(AO_HAVE_compare_and_swap) && \
-    defined(AO_HAVE_compare_and_swap_release)
-#  define AO_compare_and_swap(addr, old, new_val) \
-       AO_compare_and_swap_release(addr, old, new_val)
-#  define AO_HAVE_compare_and_swap
-#endif
-#if !defined(AO_HAVE_compare_and_swap) && \
-    defined(AO_HAVE_compare_and_swap_acquire)
-#  define AO_compare_and_swap(addr, old, new_val) \
-       AO_compare_and_swap_acquire(addr, old, new_val)
-#  define AO_HAVE_compare_and_swap
-#endif
-#if !defined(AO_HAVE_compare_and_swap) && \
-    defined(AO_HAVE_compare_and_swap_write)
-#  define AO_compare_and_swap(addr, old, new_val) \
-       AO_compare_and_swap_write(addr, old, new_val)
-#  define AO_HAVE_compare_and_swap
-#endif
-#if !defined(AO_HAVE_compare_and_swap) && \
-    defined(AO_HAVE_compare_and_swap_read)
-#  define AO_compare_and_swap(addr, old, new_val) \
-       AO_compare_and_swap_read(addr, old, new_val)
-#  define AO_HAVE_compare_and_swap
-#endif
-
-#if defined(AO_HAVE_compare_and_swap_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_compare_and_swap_full)
-#  define AO_compare_and_swap_full(addr, old, new_val) \
-       (AO_nop_full(), AO_compare_and_swap_acquire(addr, old, new_val))
-#  define AO_HAVE_compare_and_swap_full
-#endif
-
-#if !defined(AO_HAVE_compare_and_swap_release_write) && \
-    defined(AO_HAVE_compare_and_swap_write)
-#  define AO_compare_and_swap_release_write(addr, old, new_val) \
-       AO_compare_and_swap_write(addr, old, new_val)
-#  define AO_HAVE_compare_and_swap_release_write
-#endif
-#if !defined(AO_HAVE_compare_and_swap_release_write) && \
-    defined(AO_HAVE_compare_and_swap_release)
-#  define AO_compare_and_swap_release_write(addr, old, new_val) \
-       AO_compare_and_swap_release(addr, old, new_val)
-#  define AO_HAVE_compare_and_swap_release_write
-#endif
-#if !defined(AO_HAVE_compare_and_swap_acquire_read) && \
-    defined(AO_HAVE_compare_and_swap_read)
-#  define AO_compare_and_swap_acquire_read(addr, old, new_val) \
-       AO_compare_and_swap_read(addr, old, new_val)
-#  define AO_HAVE_compare_and_swap_acquire_read
-#endif
-#if !defined(AO_HAVE_compare_and_swap_acquire_read) && \
-    defined(AO_HAVE_compare_and_swap_acquire)
-#  define AO_compare_and_swap_acquire_read(addr, old, new_val) \
-       AO_compare_and_swap_acquire(addr, old, new_val)
-#  define AO_HAVE_compare_and_swap_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_compare_and_swap_acquire_read)
-#    define AO_compare_and_swap_dd_acquire_read(addr, old, new_val) \
-       AO_compare_and_swap_acquire_read(addr, old, new_val)
-#    define AO_HAVE_compare_and_swap_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_compare_and_swap)
-#    define AO_compare_and_swap_dd_acquire_read(addr, old, new_val) \
-       AO_compare_and_swap(addr, old, new_val)
-#    define AO_HAVE_compare_and_swap_dd_acquire_read
-#  endif
-#endif
-
-#include "generalize-small.h"
-
-/* Compare_double_and_swap_double */
-#if defined(AO_HAVE_compare_double_and_swap_double) && defined(AO_HAVE_nop_full)\
-    && !defined(AO_HAVE_compare_double_and_swap_double_acquire)
-   AO_INLINE int
-   AO_compare_double_and_swap_double_acquire(volatile AO_double_t *addr,
-                                            AO_t o1, AO_t o2,
-                                            AO_t n1, AO_t n2)
-   {
-     int result = AO_compare_double_and_swap_double(addr, o1, o2, n1, n2);
-     AO_nop_full();
-     return result;
-   }
-#  define AO_HAVE_compare_double_and_swap_double_acquire
-#endif
-#if defined(AO_HAVE_compare_double_and_swap_double) \
-    && defined(AO_HAVE_nop_full)\
-    && !defined(AO_HAVE_compare_double_and_swap_double_release)
-#  define AO_compare_double_and_swap_double_release(addr, o1, o2, n1, n2) \
-       (AO_nop_full(), AO_compare_double_and_swap_double(addr, o1, o2, n1, n2))
-#  define AO_HAVE_compare_double_and_swap_double_release
-#endif
-#if defined(AO_HAVE_compare_double_and_swap_double_full)
-#  if !defined(AO_HAVE_compare_double_and_swap_double_release)
-#    define AO_compare_double_and_swap_double_release(addr, o1, o2, n1, n2) \
-        AO_compare_double_and_swap_double_full(addr, o1, o2, n1, n2)
-#    define AO_HAVE_compare_double_and_swap_double_release
-#  endif
-#  if !defined(AO_HAVE_compare_double_and_swap_double_acquire)
-#    define AO_compare_double_and_swap_double_acquire(addr, o1, o2, n1, n2) \
-        AO_compare_double_and_swap_double_full(addr, o1, o2, n1, n2)
-#    define AO_HAVE_compare_double_and_swap_double_acquire
-#  endif
-#  if !defined(AO_HAVE_compare_double_and_swap_double_write)
-#    define AO_compare_double_and_swap_double_write(addr, o1, o2, n1, n2) \
-        AO_compare_double_and_swap_double_full(addr, o1, o2, n1, n2)
-#    define AO_HAVE_compare_double_and_swap_double_write
-#  endif
-#  if !defined(AO_HAVE_compare_double_and_swap_double_read)
-#    define AO_compare_double_and_swap_double_read(addr, o1, o2, n1, n2) \
-        AO_compare_double_and_swap_double_full(addr, o1, o2, n1, n2)
-#    define AO_HAVE_compare_double_and_swap_double_read
-#  endif
-#endif /* AO_HAVE_compare_double_and_swap_double_full */
-
-#if !defined(AO_HAVE_compare_double_and_swap_double) && \
-    defined(AO_HAVE_compare_double_and_swap_double_release)
-#  define AO_compare_double_and_swap_double(addr, o1, o2, n1, n2) \
-       AO_compare_double_and_swap_double_release(addr, o1, o2, n1, n2)
-#  define AO_HAVE_compare_double_and_swap_double
-#endif
-#if !defined(AO_HAVE_compare_double_and_swap_double) && \
-    defined(AO_HAVE_compare_double_and_swap_double_acquire)
-#  define AO_compare_double_and_swap_double(addr, o1, o2, n1, n2) \
-       AO_compare_double_and_swap_double_acquire(addr, o1, o2, n1, n2)
-#  define AO_HAVE_compare_double_and_swap_double
-#endif
-#if !defined(AO_HAVE_compare_double_and_swap_double) && \
-    defined(AO_HAVE_compare_double_and_swap_double_write)
-#  define AO_compare_double_and_swap_double(addr, o1, o2, n1, n2) \
-       AO_compare_double_and_swap_double_write(addr, o1, o2, n1, n2)
-#  define AO_HAVE_compare_double_and_swap_double
-#endif
-#if !defined(AO_HAVE_compare_double_and_swap_double) && \
-    defined(AO_HAVE_compare_double_and_swap_double_read)
-#  define AO_compare_double_and_swap_double(addr, o1, o2, n1, n2) \
-       AO_compare_double_and_swap_double_read(addr, o1, o2, n1, n2)
-#  define AO_HAVE_compare_double_and_swap_double
-#endif
-
-#if defined(AO_HAVE_compare_double_and_swap_double_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_compare_double_and_swap_double_full)
-#  define AO_compare_double_and_swap_double_full(addr, o1, o2, n1, n2) \
-       (AO_nop_full(), AO_compare_double_and_swap_double_acquire(addr, o1, o2, n1, n2))
-#  define AO_HAVE_compare_double_and_swap_double_full
-#endif
-
-#if !defined(AO_HAVE_compare_double_and_swap_double_release_write) && \
-    defined(AO_HAVE_compare_double_and_swap_double_write)
-#  define AO_compare_double_and_swap_double_release_write(addr, o1, o2, n1, n2) \
-       AO_compare_double_and_swap_double_write(addr, o1, o2, n1, n2)
-#  define AO_HAVE_compare_double_and_swap_double_release_write
-#endif
-#if !defined(AO_HAVE_compare_double_and_swap_double_release_write) && \
-    defined(AO_HAVE_compare_double_and_swap_double_release)
-#  define AO_compare_double_and_swap_double_release_write(addr, o1, o2, n1, n2) \
-       AO_compare_double_and_swap_double_release(addr, o1, o2, n1, n2)
-#  define AO_HAVE_compare_double_and_swap_double_release_write
-#endif
-#if !defined(AO_HAVE_compare_double_and_swap_double_acquire_read) && \
-    defined(AO_HAVE_compare_double_and_swap_double_read)
-#  define AO_compare_double_and_swap_double_acquire_read(addr, o1, o2, n1, n2) \
-       AO_compare_double_and_swap_double_read(addr, o1, o2, n1, n2)
-#  define AO_HAVE_compare_double_and_swap_double_acquire_read
-#endif
-#if !defined(AO_HAVE_compare_double_and_swap_double_acquire_read) && \
-    defined(AO_HAVE_compare_double_and_swap_double_acquire)
-#  define AO_compare_double_and_swap_double_acquire_read(addr, o1, o2, n1, n2) \
-       AO_compare_double_and_swap_double_acquire(addr, o1, o2, n1, n2)
-#  define AO_HAVE_compare_double_and_swap_double_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_compare_double_and_swap_double_acquire_read)
-#    define AO_compare_double_and_swap_double_dd_acquire_read(addr, o1, o2, n1, n2) \
-       AO_compare_double_and_swap_double_acquire_read(addr, o1, o2, n1, n2)
-#    define AO_HAVE_compare_double_and_swap_double_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_compare_double_and_swap_double)
-#    define AO_compare_double_and_swap_double_dd_acquire_read(addr, o1, o2, n1, n2) \
-       AO_compare_double_and_swap_double(addr, o1, o2, n1, n2)
-#    define AO_HAVE_compare_double_and_swap_double_dd_acquire_read
-#  endif
-#endif
-
-/* Compare_and_swap_double */
-#if defined(AO_HAVE_compare_and_swap_double) && defined(AO_HAVE_nop_full)\
-    && !defined(AO_HAVE_compare_and_swap_double_acquire)
-   AO_INLINE int
-   AO_compare_and_swap_double_acquire(volatile AO_double_t *addr,
-                                            AO_t o1,
-                                            AO_t n1, AO_t n2)
-   {
-     int result = AO_compare_and_swap_double(addr, o1, n1, n2);
-     AO_nop_full();
-     return result;
-   }
-#  define AO_HAVE_compare_and_swap_double_acquire
-#endif
-#if defined(AO_HAVE_compare_and_swap_double) \
-    && defined(AO_HAVE_nop_full)\
-    && !defined(AO_HAVE_compare_and_swap_double_release)
-#  define AO_compare_and_swap_double_release(addr, o1, n1, n2) \
-       (AO_nop_full(), AO_compare_and_swap_double(addr, o1, n1, n2))
-#  define AO_HAVE_compare_and_swap_double_release
-#endif
-#if defined(AO_HAVE_compare_and_swap_double_full)
-#  if !defined(AO_HAVE_compare_and_swap_double_release)
-#    define AO_compare_and_swap_double_release(addr, o1, n1, n2) \
-        AO_compare_and_swap_double_full(addr, o1, n1, n2)
-#    define AO_HAVE_compare_and_swap_double_release
-#  endif
-#  if !defined(AO_HAVE_compare_and_swap_double_acquire)
-#    define AO_compare_and_swap_double_acquire(addr, o1, n1, n2) \
-        AO_compare_and_swap_double_full(addr, o1, n1, n2)
-#    define AO_HAVE_compare_and_swap_double_acquire
-#  endif
-#  if !defined(AO_HAVE_compare_and_swap_double_write)
-#    define AO_compare_and_swap_double_write(addr, o1, n1, n2) \
-        AO_compare_and_swap_double_full(addr, o1, n1, n2)
-#    define AO_HAVE_compare_and_swap_double_write
-#  endif
-#  if !defined(AO_HAVE_compare_and_swap_double_read)
-#    define AO_compare_and_swap_double_read(addr, o1, n1, n2) \
-        AO_compare_and_swap_double_full(addr, o1, n1, n2)
-#    define AO_HAVE_compare_and_swap_double_read
-#  endif
-#endif /* AO_HAVE_compare_and_swap_double_full */
-
-#if !defined(AO_HAVE_compare_and_swap_double) && \
-    defined(AO_HAVE_compare_and_swap_double_release)
-#  define AO_compare_and_swap_double(addr, o1, n1, n2) \
-       AO_compare_and_swap_double_release(addr, o1, n1, n2)
-#  define AO_HAVE_compare_and_swap_double
-#endif
-#if !defined(AO_HAVE_compare_and_swap_double) && \
-    defined(AO_HAVE_compare_and_swap_double_acquire)
-#  define AO_compare_and_swap_double(addr, o1, n1, n2) \
-       AO_compare_and_swap_double_acquire(addr, o1, n1, n2)
-#  define AO_HAVE_compare_and_swap_double
-#endif
-#if !defined(AO_HAVE_compare_and_swap_double) && \
-    defined(AO_HAVE_compare_and_swap_double_write)
-#  define AO_compare_and_swap_double(addr, o1, n1, n2) \
-       AO_compare_and_swap_double_write(addr, o1, n1, n2)
-#  define AO_HAVE_compare_and_swap_double
-#endif
-#if !defined(AO_HAVE_compare_and_swap_double) && \
-    defined(AO_HAVE_compare_and_swap_double_read)
-#  define AO_compare_and_swap_double(addr, o1, n1, n2) \
-       AO_compare_and_swap_double_read(addr, o1, n1, n2)
-#  define AO_HAVE_compare_and_swap_double
-#endif
-
-#if defined(AO_HAVE_compare_and_swap_double_acquire) &&\
-    defined(AO_HAVE_nop_full) && \
-    !defined(AO_HAVE_compare_and_swap_double_full)
-#  define AO_compare_and_swap_double_full(addr, o1, n1, n2) \
-       (AO_nop_full(), AO_compare_and_swap_double_acquire(addr, o1, n1, n2))
-#  define AO_HAVE_compare_and_swap_double_full
-#endif
-
-#if !defined(AO_HAVE_compare_and_swap_double_release_write) && \
-    defined(AO_HAVE_compare_and_swap_double_write)
-#  define AO_compare_and_swap_double_release_write(addr, o1, n1, n2) \
-       AO_compare_and_swap_double_write(addr, o1, n1, n2)
-#  define AO_HAVE_compare_and_swap_double_release_write
-#endif
-#if !defined(AO_HAVE_compare_and_swap_double_release_write) && \
-    defined(AO_HAVE_compare_and_swap_double_release)
-#  define AO_compare_and_swap_double_release_write(addr, o1, n1, n2) \
-       AO_compare_and_swap_double_release(addr, o1, n1, n2)
-#  define AO_HAVE_compare_and_swap_double_release_write
-#endif
-#if !defined(AO_HAVE_compare_and_swap_double_acquire_read) && \
-    defined(AO_HAVE_compare_and_swap_double_read)
-#  define AO_compare_and_swap_double_acquire_read(addr, o1, n1, n2) \
-       AO_compare_and_swap_double_read(addr, o1, n1, n2)
-#  define AO_HAVE_compare_and_swap_double_acquire_read
-#endif
-#if !defined(AO_HAVE_compare_and_swap_double_acquire_read) && \
-    defined(AO_HAVE_compare_and_swap_double_acquire)
-#  define AO_compare_and_swap_double_acquire_read(addr, o1, n1, n2) \
-       AO_compare_and_swap_double_acquire(addr, o1, n1, n2)
-#  define AO_HAVE_compare_and_swap_double_acquire_read
-#endif
-
-#ifdef AO_NO_DD_ORDERING
-#  if defined(AO_HAVE_compare_and_swap_double_acquire_read)
-#    define AO_compare_and_swap_double_dd_acquire_read(addr, o1, n1, n2) \
-       AO_compare_and_swap_double_acquire_read(addr, o1, n1, n2)
-#    define AO_HAVE_compare_and_swap_double_dd_acquire_read
-#  endif
-#else
-#  if defined(AO_HAVE_compare_and_swap_double)
-#    define AO_compare_and_swap_double_dd_acquire_read(addr, o1, n1, n2) \
-       AO_compare_and_swap_double(addr, o1, n1, n2)
-#    define AO_HAVE_compare_and_swap_double_dd_acquire_read
-#  endif
-#endif
-
-/* NEC LE-IT: Convenience functions for AO_double compare and swap which */
-/* types and reads easier in code                                       */
-#if defined(AO_HAVE_compare_double_and_swap_double_release) && \
-    !defined(AO_HAVE_double_compare_and_swap_release)
-AO_INLINE int
-AO_double_compare_and_swap_release(volatile AO_double_t *addr,
-                                  AO_double_t old_val, AO_double_t new_val) 
-{
-       return AO_compare_double_and_swap_double_release(addr,
-                                                        old_val.AO_val1, old_val.AO_val2,
-                                                        new_val.AO_val1, new_val.AO_val2);
-}
-#define AO_HAVE_double_compare_and_swap_release
-#endif
-
-#if defined(AO_HAVE_compare_double_and_swap_double_acquire) && \
-    !defined(AO_HAVE_double_compare_and_swap_acquire)
-AO_INLINE int
-AO_double_compare_and_swap_acquire(volatile AO_double_t *addr,
-                                  AO_double_t old_val, AO_double_t new_val) 
-{
-       return AO_compare_double_and_swap_double_acquire(addr,
-                                                        old_val.AO_val1, old_val.AO_val2,
-                                                        new_val.AO_val1, new_val.AO_val2);
-}
-#define AO_HAVE_double_compare_and_swap_acquire
-#endif
-
-#if defined(AO_HAVE_compare_double_and_swap_double_full) && \
-    !defined(AO_HAVE_double_compare_and_swap_full)
-AO_INLINE int
-AO_double_compare_and_swap_full(volatile AO_double_t *addr,
-                                        AO_double_t old_val, AO_double_t new_val) 
-{
-       return AO_compare_double_and_swap_double_full(addr,
-                                                     old_val.AO_val1, old_val.AO_val2,
-                                                     new_val.AO_val1, new_val.AO_val2);
-}
-#define AO_HAVE_double_compare_and_swap_full
-#endif
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/Makefile.am b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/Makefile.am
deleted file mode 100644 (file)
index f47f812..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#General sysdep utility headers, followed by the arch-specific ones
-nobase_sysdep_HEADERS= generic_pthread.h \
-         atomic_load_store.h \
-         aligned_atomic_load_store.h \
-         acquire_release_volatile.h \
-         char_acquire_release_volatile.h \
-         char_atomic_load_store.h \
-         short_acquire_release_volatile.h \
-         short_aligned_atomic_load_store.h \
-         short_atomic_load_store.h \
-         int_acquire_release_volatile.h \
-         int_aligned_atomic_load_store.h \
-         int_atomic_load_store.h \
-         all_acquire_release_volatile.h \
-         all_aligned_atomic_load_store.h \
-         all_atomic_load_store.h \
-         read_ordered.h \
-         ordered_except_wr.h \
-         ordered.h \
-         ao_t_is_int.h \
-         test_and_set_t_is_ao_t.h \
-         test_and_set_t_is_char.h \
-         emul_cas.h \
-         standard_ao_double_t.h \
-         README \
-       \
-         gcc/alpha.h gcc/arm.h gcc/x86.h \
-         gcc/hppa.h gcc/ia64.h \
-         gcc/powerpc.h gcc/sparc.h \
-         gcc/hppa.h gcc/m68k.h gcc/mips.h gcc/s390.h \
-         gcc/ia64.h gcc/x86_64.h gcc/cris.h \
-       \
-         icc/ia64.h \
-       \
-         msftc/x86.h \
-         msftc/x86_64.h \
-       \
-         hpc/ia64.h hpc/hppa.h \
-       \
-         sunc/sparc.h \
-       \
-         ibmc/powerpc.h
-
-sysdepdir= ${includedir}/atomic_ops/sysdeps
-
-# A few architectures require special .S files
-EXTRA_DIST = sunc/sparc.S
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/Makefile.in b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/Makefile.in
deleted file mode 100644 (file)
index 17127c1..0000000
+++ /dev/null
@@ -1,427 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = src/atomic_ops/sysdeps
-DIST_COMMON = README $(nobase_sysdep_HEADERS) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-       $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/src/config.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(sysdepdir)"
-nobase_sysdepHEADERS_INSTALL = $(install_sh_DATA)
-HEADERS = $(nobase_sysdep_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCAS = @CCAS@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GREP = @GREP@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-NEED_ASM_FALSE = @NEED_ASM_FALSE@
-NEED_ASM_TRUE = @NEED_ASM_TRUE@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PICFLAG = @PICFLAG@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-ac_ct_CC = @ac_ct_CC@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-
-#General sysdep utility headers, followed by the arch-specific ones
-nobase_sysdep_HEADERS = generic_pthread.h \
-         atomic_load_store.h \
-         aligned_atomic_load_store.h \
-         acquire_release_volatile.h \
-         char_acquire_release_volatile.h \
-         char_atomic_load_store.h \
-         short_acquire_release_volatile.h \
-         short_aligned_atomic_load_store.h \
-         short_atomic_load_store.h \
-         int_acquire_release_volatile.h \
-         int_aligned_atomic_load_store.h \
-         int_atomic_load_store.h \
-         all_acquire_release_volatile.h \
-         all_aligned_atomic_load_store.h \
-         all_atomic_load_store.h \
-         read_ordered.h \
-         ordered_except_wr.h \
-         ordered.h \
-         ao_t_is_int.h \
-         test_and_set_t_is_ao_t.h \
-         test_and_set_t_is_char.h \
-         emul_cas.h \
-         standard_ao_double_t.h \
-         README \
-       \
-         gcc/alpha.h gcc/arm.h gcc/x86.h \
-         gcc/hppa.h gcc/ia64.h \
-         gcc/powerpc.h gcc/sparc.h \
-         gcc/hppa.h gcc/m68k.h gcc/mips.h gcc/s390.h \
-         gcc/ia64.h gcc/x86_64.h gcc/cris.h \
-       \
-         icc/ia64.h \
-       \
-         msftc/x86.h \
-         msftc/x86_64.h \
-       \
-         hpc/ia64.h hpc/hppa.h \
-       \
-         sunc/sparc.h \
-       \
-         ibmc/powerpc.h
-
-sysdepdir = ${includedir}/atomic_ops/sysdeps
-
-# A few architectures require special .S files
-EXTRA_DIST = sunc/sparc.S
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-       @for dep in $?; do \
-         case '$(am__configure_deps)' in \
-           *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
-             exit 1;; \
-         esac; \
-       done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/atomic_ops/sysdeps/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  src/atomic_ops/sysdeps/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-       @case '$?' in \
-         *config.status*) \
-           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-         *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-       esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-uninstall-info-am:
-install-nobase_sysdepHEADERS: $(nobase_sysdep_HEADERS)
-       @$(NORMAL_INSTALL)
-       test -z "$(sysdepdir)" || $(mkdir_p) "$(DESTDIR)$(sysdepdir)"
-       @$(am__vpath_adj_setup) \
-       list='$(nobase_sysdep_HEADERS)'; for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         $(am__vpath_adj) \
-         echo " $(nobase_sysdepHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(sysdepdir)/$$f'"; \
-         $(nobase_sysdepHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(sysdepdir)/$$f"; \
-       done
-
-uninstall-nobase_sysdepHEADERS:
-       @$(NORMAL_UNINSTALL)
-       @$(am__vpath_adj_setup) \
-       list='$(nobase_sysdep_HEADERS)'; for p in $$list; do \
-         $(am__vpath_adj) \
-         echo " rm -f '$(DESTDIR)$(sysdepdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(sysdepdir)/$$f"; \
-       done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-         test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
-       fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
-         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
-
-GTAGS:
-       here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-       $(mkdir_p) $(distdir)/gcc $(distdir)/hpc $(distdir)/ibmc $(distdir)/icc $(distdir)/msftc $(distdir)/sunc
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
-         if test -d $$d/$$file; then \
-           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-           fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-         else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
-           || exit 1; \
-         fi; \
-       done
-check-am: all-am
-check: check-am
-all-am: Makefile $(HEADERS)
-installdirs:
-       for dir in "$(DESTDIR)$(sysdepdir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
-       done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-am
-       -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am: install-nobase_sysdepHEADERS
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-       -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am uninstall-nobase_sysdepHEADERS
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       ctags distclean distclean-generic distclean-tags distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-exec install-exec-am \
-       install-info install-info-am install-man \
-       install-nobase_sysdepHEADERS install-strip installcheck \
-       installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
-       pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am \
-       uninstall-nobase_sysdepHEADERS
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/README b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/README
deleted file mode 100644 (file)
index 605699f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-There are two kinds of entities in this directory:
-
-- Subdirectories corresponding to specific compilers (or compiler/OS combinations).
-  Each of these includes one or more architecture-specific headers.
-
-- More generic header files corresponding to a particular ordering and/or
-  atomicity property that might be shared by multiple hardware platforms.
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/acquire_release_volatile.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/acquire_release_volatile.h
deleted file mode 100644 (file)
index b84dc82..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-/*
- * This file adds definitions appropriate for environments in which an AO_t
- * volatile load has acquire semantics, and an AO_t volatile store has release
- * semantics.  This is arguably supposed to be true with the standard Itanium
- * software conventions.
- */
-
-/*
- * Empirically gcc/ia64 does some reordering of ordinary operations around volatiles
- * even when we think it shouldn't.  Gcc 3.3 and earlier could reorder a volatile store
- * with another store.  As of March 2005, gcc pre-4 reused previously computed
- * common subexpressions across a volatile load.
- * Hence we now add compiler barriers for gcc.
- */
-#if !defined(AO_GCC_BARRIER)
-#  if defined(__GNUC__)
-#    define AO_GCC_BARRIER() AO_compiler_barrier()
-#  else
-#    define AO_GCC_BARRIER()
-#  endif
-#endif
-
-AO_INLINE AO_t
-AO_load_acquire(const volatile AO_t *p)
-{
-  AO_t result = *p;
-  /* A normal volatile load generates an ld.acq                */
-  AO_GCC_BARRIER();
-  return result;
-}
-#define AO_HAVE_load_acquire
-
-AO_INLINE void
-AO_store_release(volatile AO_t *p, AO_t val)
-{
-  AO_GCC_BARRIER();
-  /* A normal volatile store generates an st.rel       */
-  *p = val;
-}
-#define AO_HAVE_store_release
-
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/aligned_atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/aligned_atomic_load_store.h
deleted file mode 100644 (file)
index 13a6241..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */ 
-
-/*
- * Definitions for architectures on which loads and stores of AO_t are
- * atomic fo all legal alignments.
- */
-
-AO_INLINE AO_t
-AO_load(const volatile AO_t *addr)
-{
-  assert(((size_t)addr & (sizeof(AO_t) - 1)) == 0);
-  /* Cast away the volatile for architectures where            */
-  /* volatile adds barrier semantics.                          */
-  return *(AO_t *)addr;
-}
-
-#define AO_HAVE_load
-
-AO_INLINE void
-AO_store(volatile AO_t *addr, AO_t new_val)
-{
-  assert(((size_t)addr & (sizeof(AO_t) - 1)) == 0);
-  (*(AO_t *)addr) = new_val;
-}
-
-#define AO_HAVE_store
-
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/all_acquire_release_volatile.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/all_acquire_release_volatile.h
deleted file mode 100644 (file)
index 6787387..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-/*
- * Describes architectures on which volatile AO_t, unsigned char, unsigned
- * short, and unsigned int loads and stores have acquire/release semantics for
- * all normally legal alignments.
- */
-#include "acquire_release_volatile.h"
-#include "char_acquire_release_volatile.h"
-#include "short_acquire_release_volatile.h"
-#include "int_acquire_release_volatile.h"
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h
deleted file mode 100644 (file)
index ef96e6e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-/*
- * Describes architectures on which AO_t, unsigned char, unsigned short,
- * and unsigned int loads and stores are atomic for all normally legal
- * alignments.
- */
-#include "aligned_atomic_load_store.h"
-#include "char_atomic_load_store.h"
-#include "short_aligned_atomic_load_store.h"
-#include "int_aligned_atomic_load_store.h"
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/all_atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/all_atomic_load_store.h
deleted file mode 100644 (file)
index e6d0e77..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-/*
- * Describes architectures on which AO_t, unsigned char, unsigned short,
- * and unsigned int loads and stores are atomic for all normally legal
- * alignments.
- */
-#include "atomic_load_store.h"
-#include "char_atomic_load_store.h"
-#include "short_atomic_load_store.h"
-#include "int_atomic_load_store.h"
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ao_t_is_int.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ao_t_is_int.h
deleted file mode 100644 (file)
index c7803c5..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2003-2004 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-/*
- * Inclusion of this file signifies that AO_t is in fact int.  Hence
- * any AO_... operations can also server as AO_int_... operations.
- * We currently define only the more important ones here, and allow for
- * the normal generalization process to define the others.
- * We should probably add others in the future.
- */
-
-#if defined(AO_HAVE_compare_and_swap_full) && \
-    !defined(AO_HAVE_int_compare_and_swap_full)
-#  define AO_int_compare_and_swap_full(addr, old, new_val) \
-               AO_compare_and_swap_full((volatile AO_t *)(addr), \
-                                       (AO_t)(old), (AO_t)(new_val))
-#  define AO_HAVE_int_compare_and_swap_full
-# endif
-
-#if defined(AO_HAVE_compare_and_swap_acquire) && \
-    !defined(AO_HAVE_int_compare_and_swap_acquire)
-#  define AO_int_compare_and_swap_acquire(addr, old, new_val) \
-               AO_compare_and_swap_acquire((volatile AO_t *)(addr), \
-                                           (AO_t)(old), (AO_t)(new_val))
-#  define AO_HAVE_int_compare_and_swap_acquire
-# endif
-
-#if defined(AO_HAVE_compare_and_swap_release) && \
-    !defined(AO_HAVE_int_compare_and_swap_release)
-#  define AO_int_compare_and_swap_release(addr, old, new_val) \
-               AO_compare_and_swap_release((volatile AO_t *)(addr), \
-                                        (AO_t)(old), (AO_t)(new_val))
-#  define AO_HAVE_int_compare_and_swap_release
-# endif
-
-#if defined(AO_HAVE_compare_and_swap_write) && \
-    !defined(AO_HAVE_int_compare_and_swap_write)
-#  define AO_int_compare_and_swap_write(addr, old, new_val) \
-               AO_compare_and_swap_write((volatile AO_t *)(addr), \
-                                         (AO_t)(old), (AO_t)(new_val))
-#  define AO_HAVE_int_compare_and_swap_write
-# endif
-
-#if defined(AO_HAVE_compare_and_swap_read) && \
-    !defined(AO_HAVE_int_compare_and_swap_read)
-#  define AO_int_compare_and_swap_read(addr, old, new_val) \
-               AO_compare_and_swap_read((volatile AO_t *)(addr), \
-                                        (AO_t)(old), (AO_t)(new_val))
-#  define AO_HAVE_int_compare_and_swap_read
-# endif
-
-#if defined(AO_HAVE_compare_and_swap) && \
-    !defined(AO_HAVE_int_compare_and_swap)
-#  define AO_int_compare_and_swap(addr, old, new_val) \
-               AO_compare_and_swap((volatile AO_t *)(addr), \
-                                   (AO_t)(old), (AO_t)(new_val))
-#  define AO_HAVE_int_compare_and_swap
-# endif
-
-#if defined(AO_HAVE_load_acquire) && \
-    !defined(AO_HAVE_int_load_acquire)
-#  define AO_int_load_acquire(addr) \
-       (int)AO_load_acquire((const volatile AO_t *)(addr))
-#  define AO_HAVE_int_load_acquire
-# endif
-
-#if defined(AO_HAVE_store_release) && \
-    !defined(AO_HAVE_int_store_release)
-#  define AO_int_store_release(addr, val) \
-       AO_store_release((volatile AO_t *)(addr), (AO_t)(val))
-#  define AO_HAVE_int_store_release
-# endif
-
-#if defined(AO_HAVE_fetch_and_add_full) && \
-    !defined(AO_HAVE_int_fetch_and_add_full)
-#  define AO_int_fetch_and_add_full(addr, incr) \
-       (int)AO_fetch_and_add_full((volatile AO_t *)(addr), (AO_t)(incr))
-#  define AO_HAVE_int_fetch_and_add_full
-# endif
-
-#if defined(AO_HAVE_fetch_and_add1_acquire) && \
-    !defined(AO_HAVE_int_fetch_and_add1_acquire)
-#  define AO_int_fetch_and_add1_acquire(addr) \
-       (int)AO_fetch_and_add1_acquire((volatile AO_t *)(addr))
-#  define AO_HAVE_int_fetch_and_add1_acquire
-# endif
-
-#if defined(AO_HAVE_fetch_and_add1_release) && \
-    !defined(AO_HAVE_int_fetch_and_add1_release)
-#  define AO_int_fetch_and_add1_release(addr) \
-       (int)AO_fetch_and_add1_release((volatile AO_t *)(addr))
-#  define AO_HAVE_int_fetch_and_add1_release
-# endif
-
-#if defined(AO_HAVE_fetch_and_sub1_acquire) && \
-    !defined(AO_HAVE_int_fetch_and_sub1_acquire)
-#  define AO_int_fetch_and_sub1_acquire(addr) \
-       (int)AO_fetch_and_sub1_acquire((volatile AO_t *)(addr))
-#  define AO_HAVE_int_fetch_and_sub1_acquire
-# endif
-
-#if defined(AO_HAVE_fetch_and_sub1_release) && \
-    !defined(AO_HAVE_int_fetch_and_sub1_release)
-#  define AO_int_fetch_and_sub1_release(addr) \
-       (int)AO_fetch_and_sub1_release((volatile AO_t *)(addr))
-#  define AO_HAVE_int_fetch_and_sub1_release
-# endif
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/armcc/arm_v6.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/armcc/arm_v6.h
deleted file mode 100644 (file)
index 86376eb..0000000
+++ /dev/null
@@ -1,234 +0,0 @@
-/* 
- * Copyright (c) 2007 by NEC LE-IT:              All rights reserved.
- * A transcription of ARMv6 atomic operations for the ARM Realview Toolchain.
- * This code works with armcc from RVDS 3.1
- * This is based on work in gcc/arm.h by
- *   Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
- *   Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
- *   Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
- * 
- *
- *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
- *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#include "../read_ordered.h"
-#include "../test_and_set_t_is_ao_t.h" /* Probably suboptimal */
-
-#if __TARGET_ARCH_ARM < 6
-Dont use with ARM instruction sets lower than v6
-#else
-
-#include "../standard_ao_double_t.h"
-
-/* NEC LE-IT: ARMv6 is the first architecture providing support for simple LL/SC
- * A data memory barrier must be raised via CP15 command (see documentation).  
- *
- * ARMv7 is compatible to ARMv6 but has a simpler command for issuing a                
- * memory barrier (DMB). Raising it via CP15 should still work as told me by the
- * support engineers. If it turns out to be much quicker than we should implement
- * custom code for ARMv7 using the asm { dmb } command.
- *
- * If only a single processor is used, we can define AO_UNIPROCESSOR
- * and do not need to access CP15 for ensuring a DMB at all.
-*/
-
-AO_INLINE void
-AO_nop_full(void)
-{
-#ifndef AO_UNIPROCESSOR
-       unsigned int dest=0;
-       /* issue an data memory barrier (keeps ordering of memory transactions  */
-       /* before and after this operation)                                             */
-       __asm { mcr p15,0,dest,c7,c10,5 } ;
-#endif
-}
-
-#define AO_HAVE_nop_full
-
-AO_INLINE AO_t
-AO_load(const volatile AO_t *addr)
-{
-       /* Cast away the volatile in case it adds fence semantics */
-       return (*(const AO_t *)addr);
-}
-#define AO_HAVE_load
-
-/* NEC LE-IT: atomic "store" - according to ARM documentation this is
- * the only safe way to set variables also used in LL/SC environment.
- * A direct write won't be recognized by the LL/SC construct in other CPUs.
- *
- * HB: Based on subsequent discussion, I think it would be OK to use an
- * ordinary store here if we knew that interrupt handlers always cleared
- * the reservation.  They should, but there is some doubt that this is
- * currently always the case for e.g. Linux.
-*/
-AO_INLINE void AO_store(volatile AO_t *addr, AO_t value)
-{
-       unsigned long tmp;
-       
-retry:
-__asm {        
-               ldrex   tmp, [addr]
-               strex   tmp, value, [addr]
-               teq     tmp, #0
-               bne     retry
-         };
-}
-#define AO_HAVE_store
-
-/* NEC LE-IT: replace the SWAP as recommended by ARM:
-
-   "Applies to: ARM11 Cores
-       Though the SWP instruction will still work with ARM V6 cores, it is recommended
-       to use the new V6 synchronization instructions. The SWP instruction produces
-       locked read and write accesses which are atomic, i.e. another operation cannot
-       be done between these locked accesses which ties up external bus (AHB,AXI)
-       bandwidth and can increase worst case interrupt latencies. LDREX,STREX are
-       more flexible, other instructions can be done between the LDREX and STREX accesses. 
-   "
-*/
-AO_INLINE AO_TS_t
-AO_test_and_set(volatile AO_TS_t *addr) {
-       
-       AO_TS_t oldval;
-       unsigned long tmp;
-       unsigned long one = 1;
-retry:
-__asm {        
-               ldrex   oldval, [addr]
-               strex   tmp, one, [addr]
-               teq             tmp, #0
-               bne     retry
-         }
-
-       return oldval;
-}
-
-#define AO_HAVE_test_and_set
-
-/* NEC LE-IT: fetch and add for ARMv6 */
-AO_INLINE AO_t
-AO_fetch_and_add(volatile AO_t *p, AO_t incr)
-{
-       unsigned long tmp,tmp2;
-       AO_t result;
-
-retry:
-__asm {
-       ldrex   result, [p]
-       add     tmp, incr, result
-       strex   tmp2, tmp, [p]
-       teq     tmp2, #0
-       bne     retry }
-
-       return result;
-}
-
-#define AO_HAVE_fetch_and_add
-
-/* NEC LE-IT: fetch and add1 for ARMv6 */
-AO_INLINE AO_t
-AO_fetch_and_add1(volatile AO_t *p)
-{
-       unsigned long tmp,tmp2;
-       AO_t result;
-
-retry:
-__asm {
-       ldrex   result, [p]
-       add     tmp, result, #1
-       strex   tmp2, tmp, [p]
-       teq             tmp2, #0
-       bne     retry
-       }
-
-       return result;
-}
-
-#define AO_HAVE_fetch_and_add1
-
-/* NEC LE-IT: fetch and sub for ARMv6 */
-AO_INLINE AO_t
-AO_fetch_and_sub1(volatile AO_t *p)
-{
-       unsigned long tmp,tmp2;
-       AO_t result;
-
-retry:
-__asm {
-       ldrex   result, [p]
-       sub     tmp, result, #1
-       strex   tmp2, tmp, [p]
-       teq             tmp2, #0
-       bne     retry
-       }
-
-       return result;
-}
-
-#define AO_HAVE_fetch_and_sub1
-
-/* NEC LE-IT: compare and swap */
-/* Returns nonzero if the comparison succeeded. */
-AO_INLINE int
-AO_compare_and_swap(volatile AO_t *addr,
-                               AO_t old_val, AO_t new_val) 
-{
-        AO_t result,tmp;
-
-retry:
-__asm__ {
-       mov             result, #2
-       ldrex   tmp, [addr]
-       teq             tmp, old_val
-       strexeq result, new_val, [addr]
-       teq             result, #1
-       beq             retry
-       }
-       
-       return !(result&2);
-}
-#define AO_HAVE_compare_and_swap
-
-/* helper functions for the Realview compiler: LDREXD is not usable
- * with inline assembler, so use the "embedded" assembler as 
- * suggested by ARM Dev. support (June 2008). */
-__asm inline double_ptr_storage load_ex(volatile AO_double_t *addr) {
-       LDREXD r0,r1,[r0]
-}
-
-__asm inline int store_ex(AO_t val1, AO_t val2, volatile AO_double_t *addr) {
-       STREXD r3,r0,r1,[r2]
-       MOV        r0,r3
-}
-
-AO_INLINE int
-AO_compare_double_and_swap_double(volatile AO_double_t *addr,
-                                                         AO_t old_val1, AO_t old_val2,
-                                                         AO_t new_val1, AO_t new_val2) 
-{
-       double_ptr_storage old_val = ((double_ptr_storage)old_val2 << 32) | old_val1;
-       
-    double_ptr_storage tmp;
-       int result;
-       
-       while(1) {
-               tmp = load_ex(addr);
-               if(tmp != old_val)      return false;
-               result = store_ex(new_val1, new_val2, addr);
-               if(!result)     return true;
-       }
-}
-
-#define AO_HAVE_compare_double_and_swap_double
-
-
-#endif // __TARGET_ARCH_ARM
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/atomic_load_store.h
deleted file mode 100644 (file)
index c69c97a..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */ 
-
-/*
- * Definitions for architectures on which loads and stores of AO_t are
- * atomic for all legal alignments.
- */
-
-AO_INLINE AO_t
-AO_load(const volatile AO_t *addr)
-{
-  /* Cast away the volatile for architectures like IA64 where  */
-  /* volatile adds barrier semantics.                          */
-  return (*(const AO_t *)addr);
-}
-
-#define AO_HAVE_load
-
-AO_INLINE void
-AO_store(volatile AO_t *addr, AO_t new_val)
-{
-  (*(AO_t *)addr) = new_val;
-}
-
-#define AO_HAVE_store
-
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/char_acquire_release_volatile.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/char_acquire_release_volatile.h
deleted file mode 100644 (file)
index a227c1b..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2003-2004 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-/*
- * This file adds definitions appropriate for environments in which an unsigned char
- * volatile load has acquire semantics, and an unsigned char volatile store has release
- * semantics.  This is true with the standard Itanium ABI.
- */
-#if !defined(AO_GCC_BARRIER)
-#  if defined(__GNUC__)
-#    define AO_GCC_BARRIER() AO_compiler_barrier()
-#  else
-#    define AO_GCC_BARRIER()
-#  endif
-#endif
-
-AO_INLINE unsigned char
-AO_char_load_acquire(const volatile unsigned char *p)
-{
-  unsigned char result = *p;
-  /* A normal volatile load generates an ld.acq                */
-  AO_GCC_BARRIER();
-  return result;
-}
-#define AO_HAVE_char_load_acquire
-
-AO_INLINE void
-AO_char_store_release(volatile unsigned char *p, unsigned char val)
-{
-  AO_GCC_BARRIER();
-  /* A normal volatile store generates an st.rel       */
-  *p = val;
-}
-#define AO_HAVE_char_store_release
-
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/char_atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/char_atomic_load_store.h
deleted file mode 100644 (file)
index caac927..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */ 
-
-/*
- * Definitions for architectures on which loads and stores of unsigned char are
- * atomic for all legal alignments.
- */
-
-AO_INLINE unsigned char
-AO_char_load(const volatile unsigned char *addr)
-{
-  /* Cast away the volatile for architectures like IA64 where  */
-  /* volatile adds barrier semantics.                          */
-  return (*(const unsigned char *)addr);
-}
-
-#define AO_HAVE_char_load
-
-AO_INLINE void
-AO_char_store(volatile unsigned char *addr, unsigned char new_val)
-{
-  (*(unsigned char *)addr) = new_val;
-}
-
-#define AO_HAVE_char_store
-
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/emul_cas.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/emul_cas.h
deleted file mode 100644 (file)
index 4187f9f..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-/*
- * Ensure, if at all possible, that AO_compare_and_swap_full() is
- * available.  The emulation should be brute-force signal-safe, even
- * though it actually blocks.
- * Including this file will generate an error if AO_compare_and_swap_full()
- * cannot be made available.
- * This will be included from platform-specific atomic_ops files
- * id appropriate, and if AO_FORCE_CAS is defined.  It should not be
- * included directly, especially since it affects the implementation
- * of other atomic update primitives.
- * The implementation assumes that only AO_store_XXX and AO_test_and_set_XXX
- * variants are defined, and that AO_test_and_set_XXX is not used to
- * operate on compare_and_swap locations.
- */
-
-#if !defined(ATOMIC_OPS_H)
-#  error This file should not be included directly.
-#endif
-
-#ifndef AO_HAVE_double_t
-# include "standard_ao_double_t.h"
-#endif
-
-int AO_compare_and_swap_emulation(volatile AO_t *addr, AO_t old,
-                                 AO_t new_val);
-
-int AO_compare_double_and_swap_double_emulation(volatile AO_double_t *addr,
-                                               AO_t old_val1, AO_t old_val2,
-                                               AO_t new_val1, AO_t new_val2);
-
-void AO_store_full_emulation(volatile AO_t *addr, AO_t val);
-
-#define AO_compare_and_swap_full(addr, old, newval) \
-       AO_compare_and_swap_emulation(addr, old, newval)
-#define AO_HAVE_compare_and_swap_full
-
-#ifndef AO_HAVE_compare_double_and_swap_double
-# define AO_compare_double_and_swap_double_full(addr, old1, old2, \
-                                               newval1, newval2) \
-        AO_compare_double_and_swap_double_emulation(addr, old1, old2, \
-                                                    newval1, newval2)
-# define AO_HAVE_compare_double_and_swap_double_full
-#endif
-
-#undef AO_store
-#undef AO_HAVE_store
-#undef AO_store_write
-#undef AO_HAVE_store_write
-#undef AO_store_release
-#undef AO_HAVE_store_release
-#undef AO_store_full
-#undef AO_HAVE_store_full
-#define AO_store_full(addr, val) AO_store_full_emulation(addr, val)
-#define AO_HAVE_store_full
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/alpha.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/alpha.h
deleted file mode 100644 (file)
index 4e26d47..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/* 
- * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
- * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
- * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
- *
- *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
- *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#include "../atomic_load_store.h"
-
-#include "../test_and_set_t_is_ao_t.h"
-
-#define AO_NO_DD_ORDERING
-       /* Data dependence does not imply read ordering.        */
-
-AO_INLINE void
-AO_nop_full(void)
-{
-  __asm__ __volatile__("mb" : : : "memory");
-}
-
-#define AO_HAVE_nop_full
-
-AO_INLINE void
-AO_nop_write(void)
-{
-  __asm__ __volatile__("wmb" : : : "memory");
-}
-
-#define AO_HAVE_nop_write
-
-/* mb should be used for AO_nop_read().  That's the default.   */
-
-/* We believe that ldq_l ... stq_c does not imply any memory barrier.  */
-/* We should add an explicit fetch_and_add definition.                 */
-AO_INLINE int
-AO_compare_and_swap(volatile AO_t *addr,
-                   AO_t old, AO_t new_val) 
-{
-  unsigned long was_equal;
-  unsigned long temp;
-
-  __asm__ __volatile__(
-                     "1:     ldq_l %0,%1\n"
-                     "       cmpeq %0,%4,%2\n"
-                    "       mov %3,%0\n"
-                     "       beq %2,2f\n"
-                     "       stq_c %0,%1\n"
-                     "       beq %0,1b\n"
-                     "2:\n"
-                     :"=&r" (temp), "=m" (*addr), "=&r" (was_equal)
-                     : "r" (new_val), "Ir" (old)
-                    :"memory");
-  return was_equal;
-}
-
-#define AO_HAVE_compare_and_swap
-
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/arm.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/arm.h
deleted file mode 100644 (file)
index 8a9826b..0000000
+++ /dev/null
@@ -1,281 +0,0 @@
-/* 
- * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
- * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
- * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
- *
- *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
- *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#include "../read_ordered.h"
-
-#include "../test_and_set_t_is_ao_t.h" /* Probably suboptimal */
-
-/* NEC LE-IT: ARMv6 is the first architecture providing support for simple LL/SC
- * A data memory barrier must be raised via CP15 command (see documentation).  
- *                                                                                                                                                             
- * ARMv7 is compatible to ARMv6 but has a simpler command for issuing a                
- * memory barrier (DMB). Raising it via CP15 should still work as told me by the
- * support engineers. If it turns out to be much quicker than we should implement
- * custom code for ARMv7 using the asm { dmb } command.                                                                                                                
- *
- * If only a single processor is used, we can define AO_UNIPROCESSOR
- * and do not need to access CP15 for ensuring a DMB  
-*/
-
-/* NEC LE-IT: gcc has no way to easily check the arm architecture
- * but defines only one of __ARM_ARCH_x__ to be true                   */
-#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_7__)  
-
-#include "../standard_ao_double_t.h"
-
-AO_INLINE void
-AO_nop_full(void)
-{
-#ifndef AO_UNIPROCESSOR
-       /* issue an data memory barrier (keeps ordering of memory transactions  */
-       /* before and after this operation)                                     */
-       unsigned int dest=0;
-       __asm__ __volatile__("mcr p15,0,%0,c7,c10,5" :"=&r"(dest) : : "memory");
-#endif
-}
-
-#define AO_HAVE_nop_full
-
-/* NEC LE-IT: AO_t load is simple reading */
-AO_INLINE AO_t
-AO_load(const volatile AO_t *addr)
-{
-  /* Cast away the volatile for architectures like IA64 where  */
-  /* volatile adds barrier semantics.                          */
-  return (*(const AO_t *)addr);
-}
-#define AO_HAVE_load
-
-/* NEC LE-IT: atomic "store" - according to ARM documentation this is
- * the only safe way to set variables also used in LL/SC environment.
- * A direct write won't be recognized by the LL/SC construct on the _same_ CPU.
- * Support engineers response for behaviour of ARMv6:
- * 
-   Core1        Core2          SUCCESS
-   ===================================
-   LDREX(x)
-   STREX(x)                    Yes
-   -----------------------------------
-   LDREX(x)
-                STR(x)
-   STREX(x)                    No
-   -----------------------------------
-   LDREX(x)
-   STR(x)
-   STREX(x)                    Yes
-   -----------------------------------
-
- * ARMv7 behaves similar, see documentation CortexA8 TRM, point 8.5  
- *
- * HB: I think this is only a problem if interrupt handlers do not clear
- * the reservation, as they almost certainly should.  Probably change this back
- * in a while?
-*/
-AO_INLINE void AO_store(volatile AO_t *addr, AO_t value)
-{
-       AO_t    flag;
-       
-       __asm__ __volatile__("@AO_store\n"
-"1:    ldrex   %0, [%2]\n"
-"      strex   %0, %3, [%2]\n"
-"      teq     %0, #0\n"
-"      bne     1b"
-       : "=&r"(flag), "+m"(*addr)
-       : "r" (addr), "r"(value)
-       : "cc");
-}
-#define AO_HAVE_store
-
-/* NEC LE-IT: replace the SWAP as recommended by ARM:
-
-   "Applies to: ARM11 Cores
-       Though the SWP instruction will still work with ARM V6 cores, it is
-       recommended     to use the new V6 synchronization instructions. The SWP
-       instruction produces â€˜locked’ read and write accesses which are atomic,
-       i.e. another operation cannot be done between these locked accesses which
-       ties up external bus (AHB,AXI) bandwidth and can increase worst case 
-       interrupt latencies. LDREX,STREX are more flexible, other instructions can
-       be done between the LDREX and STREX accesses. 
-   "
-*/
-AO_INLINE AO_TS_t
-AO_test_and_set(volatile AO_TS_t *addr) {
-       
-       AO_TS_t oldval;
-       unsigned long flag;
-
-       __asm__ __volatile__("@AO_test_and_set\n"
-"1:    ldrex   %0, [%3]\n"
-"      strex   %1, %4, [%3]\n"
-"      teq             %1, #0\n"
-"      bne             1b\n"
-       : "=&r"(oldval),"=&r"(flag), "+m"(*addr)
-       : "r"(addr), "r"(1)
-       : "cc");
-
-       return oldval;
-}
-
-#define AO_HAVE_test_and_set
-
-/* NEC LE-IT: fetch and add for ARMv6 */
-AO_INLINE AO_t
-AO_fetch_and_add(volatile AO_t *p, AO_t incr)
-{
-       unsigned long flag,tmp;
-       AO_t result;
-
-       __asm__ __volatile__("@AO_fetch_and_add\n"
-"1:    ldrex   %0, [%5]\n"                     /* get original         */
-"      add     %2, %0, %4\n"           /* sum up in incr       */
-"      strex   %1, %2, [%5]\n"         /* store them           */
-"      teq             %1, #0\n"
-"      bne             1b\n"
-       : "=&r"(result),"=&r"(flag),"=&r"(tmp),"+m"(*p) /* 0..3 */
-       : "r"(incr), "r"(p)                                                             /* 4..5 */
-       : "cc");
-
-       return result;
-}
-
-#define AO_HAVE_fetch_and_add
-
-/* NEC LE-IT: fetch and add1 for ARMv6 */
-AO_INLINE AO_t
-AO_fetch_and_add1(volatile AO_t *p)
-{
-       unsigned long flag,tmp;
-       AO_t result;
-
-       __asm__ __volatile__("@AO_fetch_and_add1\n"
-"1:    ldrex   %0, [%4]\n"                     /* get original   */
-"      add     %1, %0, #1\n"           /* increment */
-"      strex   %2, %1, [%4]\n"         /* store them */
-"      teq             %2, #0\n"
-"      bne             1b\n"
-       : "=&r"(result), "=&r"(tmp), "=&r"(flag), "+m"(*p)
-       : "r"(p)
-       : "cc");
-
-       return result;
-}
-
-#define AO_HAVE_fetch_and_add1
-
-/* NEC LE-IT: fetch and sub for ARMv6 */
-AO_INLINE AO_t
-AO_fetch_and_sub1(volatile AO_t *p)
-{
-       unsigned long flag,tmp;
-       AO_t result;
-
-       __asm__ __volatile__("@AO_fetch_and_sub1\n"
-"1:    ldrex   %0, [%4]\n"                     /* get original   */
-"      sub     %1, %0, #1\n"           /* decrement */
-"      strex   %2, %1, [%4]\n"         /* store them */
-"      teq             %2, #0\n"
-"      bne             1b\n"
-       : "=&r"(result), "=&r"(tmp), "=&r"(flag), "+m"(*p)
-       : "r"(p)
-       : "cc");
-
-       return result;
-}
-
-#define AO_HAVE_fetch_and_sub1
-
-/* NEC LE-IT: compare and swap */
-/* Returns nonzero if the comparison succeeded. */
-AO_INLINE int
-AO_compare_and_swap(volatile AO_t *addr,
-                               AO_t old_val, AO_t new_val) 
-{
-        AO_t result,tmp;
-
-       __asm__ __volatile__("@ AO_compare_and_swap\n"
-"1:    mov             %0, #2\n"                       /* store a flag */
-"      ldrex   %1, [%3]\n"                     /* get original */
-"      teq             %1, %4\n"                       /* see if match */
-"      strexeq %0, %5, [%3]\n"         /* store new one if matched */
-"      teq             %0, #1\n"
-"      beq             1b\n"                           /* if update failed, repeat */
-       : "=&r"(result), "=&r"(tmp), "+m"(*addr)
-       : "r"(addr), "r"(old_val), "r"(new_val)
-       : "cc");
-
-       return !(result&2);                     /* if succeded, return 1, else 0 */
-}
-#define AO_HAVE_compare_and_swap
-
-AO_INLINE int
-AO_compare_double_and_swap_double(volatile AO_double_t *addr,
-                                                         AO_t old_val1, AO_t old_val2,
-                                                         AO_t new_val1, AO_t new_val2) 
-{
-       double_ptr_storage old_val = ((double_ptr_storage)old_val2 << 32) | old_val1;
-       double_ptr_storage new_val = ((double_ptr_storage)new_val2 << 32) | new_val1;
-       
-    double_ptr_storage tmp;
-       int result;
-       
-       while(1) {
-               __asm__ __volatile__("@ AO_compare_and_swap_double\n"
-               "       ldrexd  %0, [%1]\n"                     /* get original to r1&r2*/
-                       : "=&r"(tmp)
-                       : "r"(addr)
-                       : );
-               if(tmp != old_val)      return false;
-               __asm__ __volatile__(
-               "       strexd  %0, %2, [%3]\n" /* store new one if matched */
-                       : "=&r"(result),"+m"(*addr) 
-                       : "r"(new_val), "r"(addr) 
-                       : );
-               if(!result)     return true;
-       }
-}
-
-#define AO_HAVE_compare_double_and_swap_double
-
-#else
-/* pre ARMv6 architecures ... */
-/* I found a slide set that, if I read it correctly, claims that       */
-/* Loads followed by either a Load or Store are ordered, but nothing   */
-/* else is.                                                            */
-/* It appears that SWP is the only simple memory barrier.              */
-#include "../all_atomic_load_store.h"
-
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_full(volatile AO_TS_t *addr) {
-  AO_TS_VAL_t oldval;
-  /* SWP on ARM is very similar to XCHG on x86.                */
-  /* The first operand is the result, the second the value     */
-  /* to be stored.  Both registers must be different from addr.        */
-  /* Make the address operand an early clobber output so it     */
-  /* doesn't overlap with the other operands.  The early clobber*/
-  /* on oldval is necessary to prevent the compiler allocating  */
-  /* them to the same register if they are both unused.        */
-  __asm__ __volatile__("swp %0, %2, [%3]"
-                        : "=&r"(oldval), "=&r"(addr)
-                        : "r"(1), "1"(addr)
-                        : "memory");
-  return oldval;
-}
-
-#define AO_HAVE_test_and_set_full
-
-#endif // __ARM_ARCH_x
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/cris.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/cris.h
deleted file mode 100644 (file)
index 3864905..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- *
- * Most of this code originally comes from Hans-Peter Nilsson.  It is included
- * here with his permission.
- *
- * This version has not been tested.  It was coped here from a GC
- * patch so that we wouldn't lose the code in the upgrade to gc7.
- */ 
-
-#include "../all_atomic_load_store.h"
-
-#include "../ordered.h"  /* There are no multiprocessor implementations. */
-
-#include "../test_and_set_t_is_ao_t.h"
-
-/*
- * The architecture apparently supports an "f" flag which is
- * set on preemption.  This essentially gives us load-locked,
- * store-conditional primitives, though I'm not quite sure how
- * this would work on a hypothetical multiprocessor.  -HB
- *
- * For details, see
- * http://developer.axis.com/doc/hardware/etrax100lx/prog_man/
- *      1_architectural_description.pdf
- *
- * Presumably many other primitives (notably CAS, including the double-
- * width versions) could be implemented in this manner, if someone got
- * around to it.
- */
-
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_full(volatile AO_TS_t *addr) {
-    /* Ripped from linuxthreads/sysdeps/cris/pt-machine.h */
-    register unsigned long int ret;
-
-    /* Note the use of a dummy output of *addr to expose the write.  The
-       memory barrier is to stop *other* writes being moved past this code.  */
-      __asm__ __volatile__("clearf\n"
-                          "0:\n\t"
-                          "movu.b [%2],%0\n\t"
-                          "ax\n\t"
-                          "move.b %3,[%2]\n\t"
-                          "bwf 0b\n\t"
-                          "clearf"
-                          : "=&r" (ret), "=m" (*addr)
-                          : "r" (addr), "r" ((int) 1), "m" (*addr)
-                          : "memory");
-    return ret;
-}
-
-#define AO_HAVE_test_and_set_full
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/hppa.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/hppa.h
deleted file mode 100644 (file)
index f303d7f..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- *
- * Modified by Carlos O'Donell <carlos@baldric.uwo.ca>, 2003
- *     - Added self-aligning lock.
- * 
- */ 
-
-#include "../all_atomic_load_store.h"
-
-/* Some architecture set descriptions include special "ordered" memory */
-/* operations.  As far as we can tell, no existing processors actually */
-/* require those.  Nor does it appear likely that future processors    */
-/* will.                                                               */
-#include "../ordered.h"
-
-/* GCC will not guarantee the alignment we need, use four lock words   */
-/* and select the correctly aligned datum. See the glibc 2.3.2         */
-/* linuxthread port for the original implementation.                   */
-struct AO_pa_clearable_loc {
-  int data[4];
-};
-
-#undef AO_TS_INITIALIZER
-#define AO_TS_t struct AO_pa_clearable_loc
-#define AO_TS_INITIALIZER {1,1,1,1}
-/* Switch meaning of set and clear, since we only have an atomic clear */
-/* instruction.                                                                */
-typedef enum {AO_PA_TS_set = 0, AO_PA_TS_clear = 1} AO_PA_TS_val;
-#define AO_TS_VAL_t AO_PA_TS_val
-#define AO_TS_CLEAR AO_PA_TS_clear
-#define AO_TS_SET AO_PA_TS_set
-
-/* The hppa only has one atomic read and modify memory operation,      */
-/* load and clear, so hppa spinlocks must use zero to signify that     */
-/* someone is holding the lock.  The address used for the ldcw         */
-/* semaphore must be 16-byte aligned.                                  */
-
-#define __ldcw(a) ({ \
-  volatile unsigned int __ret;                                 \
-  __asm__ __volatile__("ldcw 0(%2),%0"                         \
-                      : "=r" (__ret), "=m" (*(a)) : "r" (a));  \
-  __ret;                                                       \
-})
-
-/* Because malloc only guarantees 8-byte alignment for malloc'd data,  */
-/* and GCC only guarantees 8-byte alignment for stack locals, we can't */
-/* be assured of 16-byte alignment for atomic lock data even if we     */
-/* specify "__attribute ((aligned(16)))" in the type declaration.  So, */
-/* we use a struct containing an array of four ints for the atomic lock        */
-/* type and dynamically select the 16-byte aligned int from the array  */
-/* for the semaphore.                                                  */
-#define __PA_LDCW_ALIGNMENT 16
-#define __ldcw_align(a) ({ \
-  unsigned long __ret = (unsigned long) a;                     \
-  __ret += __PA_LDCW_ALIGNMENT - 1;                                    \
-  __ret &= ~(__PA_LDCW_ALIGNMENT - 1);                                 \
-  (volatile unsigned int *) __ret;                                     \
-})
-
-/* Works on PA 1.1 and PA 2.0 systems */
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_full(volatile AO_TS_t * addr)
-{
-  volatile unsigned int *a = __ldcw_align (addr);
-  return (AO_TS_VAL_t) __ldcw (a);
-} 
-
-AO_INLINE void
-AO_pa_clear(volatile AO_TS_t * addr)
-{
-  volatile unsigned int *a = __ldcw_align (addr);
-  AO_compiler_barrier();
-  *a = 1;
-}
-#define AO_CLEAR(addr) AO_pa_clear(addr)
-
-#define AO_HAVE_test_and_set_full
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/ia64.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/ia64.h
deleted file mode 100644 (file)
index bd93f70..0000000
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-#include "../all_atomic_load_store.h"
-
-#include "../all_acquire_release_volatile.h"
-
-#include "../test_and_set_t_is_char.h"
-
-#ifdef _ILP32
-  /* 32-bit HP/UX code.        */
-  /* This requires pointer "swizzling".  Pointers need to be expanded  */
-  /* to 64 bits using the addp4 instruction before use.  This makes it */
-  /* hard to share code, but we try anyway.                            */
-# define AO_LEN "4"
-  /* We assume that addr always appears in argument position 1 in asm  */
-  /* code.  If it is clobbered due to swizzling, we also need it in    */
-  /* second position.  Any later arguments are referenced symbolically,        */
-  /* so that we don't have to worry about their position.  This requires*/
-  /* gcc 3.1, but you shouldn't be using anything older than that on   */
-  /* IA64 anyway.                                                      */
-  /* The AO_MASK macro is a workaround for the fact that HP/UX gcc     */
-  /* appears to otherwise store 64-bit pointers in ar.ccv, i.e. it     */
-  /* doesn't appear to clear high bits in a pointer value we pass into */
-  /* assembly code, even if it is supposedly of type AO_t.             */
-# define AO_IN_ADDR "1"(addr)
-# define AO_OUT_ADDR , "=r"(addr)
-# define AO_SWIZZLE "addp4 %1=0,%1;;\n"
-# define AO_MASK(ptr) __asm__("zxt4 %1=%1": "=r"(ptr) : "0"(ptr));
-#else
-# define AO_LEN "8"
-# define AO_IN_ADDR "r"(addr)
-# define AO_OUT_ADDR
-# define AO_SWIZZLE
-# define AO_MASK(ptr)
-#endif
-
-AO_INLINE void
-AO_nop_full(void)
-{
-  __asm__ __volatile__("mf" : : : "memory");
-}
-#define AO_HAVE_nop_full
-
-AO_INLINE AO_t
-AO_fetch_and_add1_acquire (volatile AO_t *addr)
-{
-  AO_t result;
-
-  __asm__ __volatile__ (AO_SWIZZLE
-                       "fetchadd" AO_LEN ".acq %0=[%1],1":
-                       "=r" (result) AO_OUT_ADDR: AO_IN_ADDR :"memory");
-  return result;
-}
-#define AO_HAVE_fetch_and_add1_acquire
-
-AO_INLINE AO_t
-AO_fetch_and_add1_release (volatile AO_t *addr)
-{
-  AO_t result;
-
-  __asm__ __volatile__ (AO_SWIZZLE
-                       "fetchadd" AO_LEN ".rel %0=[%1],1":
-                       "=r" (result) AO_OUT_ADDR: AO_IN_ADDR :"memory");
-  return result;
-}
-
-#define AO_HAVE_fetch_and_add1_release
-
-AO_INLINE AO_t
-AO_fetch_and_sub1_acquire (volatile AO_t *addr)
-{
-  AO_t result;
-
-  __asm__ __volatile__ (AO_SWIZZLE
-                       "fetchadd" AO_LEN ".acq %0=[%1],-1":
-                       "=r" (result) AO_OUT_ADDR: AO_IN_ADDR :"memory");
-  return result;
-}
-
-#define AO_HAVE_fetch_and_sub1_acquire
-
-AO_INLINE AO_t
-AO_fetch_and_sub1_release (volatile AO_t *addr)
-{
-  AO_t result;
-
-  __asm__ __volatile__ (AO_SWIZZLE
-                       "fetchadd" AO_LEN ".rel %0=[%1],-1":
-                       "=r" (result) AO_OUT_ADDR: AO_IN_ADDR :"memory");
-  return result;
-}
-
-#define AO_HAVE_fetch_and_sub1_release
-
-#ifndef _ILP32
-
-AO_INLINE unsigned int
-AO_int_fetch_and_add1_acquire (volatile unsigned int *addr)
-{
-  unsigned int result;
-
-  __asm__ __volatile__ ("fetchadd4.acq %0=[%1],1":
-                       "=r" (result): AO_IN_ADDR :"memory");
-  return result;
-}
-#define AO_HAVE_int_fetch_and_add1_acquire
-
-AO_INLINE unsigned int
-AO_int_fetch_and_add1_release (volatile unsigned int *addr)
-{
-  unsigned int result;
-
-  __asm__ __volatile__ ("fetchadd4.rel %0=[%1],1":
-                       "=r" (result): AO_IN_ADDR :"memory");
-  return result;
-}
-
-#define AO_HAVE_int_fetch_and_add1_release
-
-AO_INLINE unsigned int
-AO_int_fetch_and_sub1_acquire (volatile unsigned int *addr)
-{
-  unsigned int result;
-
-  __asm__ __volatile__ ("fetchadd4.acq %0=[%1],-1":
-                       "=r" (result): AO_IN_ADDR :"memory");
-  return result;
-}
-
-#define AO_HAVE_int_fetch_and_sub1_acquire
-
-AO_INLINE unsigned int
-AO_int_fetch_and_sub1_release (volatile unsigned int *addr)
-{
-  unsigned int result;
-
-  __asm__ __volatile__ ("fetchadd4.rel %0=[%1],-1":
-                       "=r" (result): AO_IN_ADDR :"memory");
-  return result;
-}
-
-#define AO_HAVE_int_fetch_and_sub1_release
-
-#endif /* !_ILP32 */
-
-AO_INLINE int
-AO_compare_and_swap_acquire(volatile AO_t *addr,
-                            AO_t old, AO_t new_val) 
-{
-  AO_t oldval;
-  AO_MASK(old);
-  __asm__ __volatile__(AO_SWIZZLE
-                      "mov ar.ccv=%[old] ;; cmpxchg" AO_LEN
-                      ".acq %0=[%1],%[new_val],ar.ccv"
-                      : "=r"(oldval) AO_OUT_ADDR
-                      : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"(old)
-                      : "memory");
-  return (oldval == old);
-}
-
-#define AO_HAVE_compare_and_swap_acquire
-
-AO_INLINE int
-AO_compare_and_swap_release(volatile AO_t *addr,
-                            AO_t old, AO_t new_val) 
-{
-  AO_t oldval;
-  AO_MASK(old);
-  __asm__ __volatile__(AO_SWIZZLE
-                      "mov ar.ccv=%[old] ;; cmpxchg" AO_LEN
-                      ".rel %0=[%1],%[new_val],ar.ccv"
-                      : "=r"(oldval) AO_OUT_ADDR
-                      : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"(old)
-                      : "memory");
-  return (oldval == old);
-}
-
-#define AO_HAVE_compare_and_swap_release
-
-AO_INLINE int
-AO_char_compare_and_swap_acquire(volatile unsigned char *addr,
-                                unsigned char old, unsigned char new_val) 
-{
-  unsigned char oldval;
-  __asm__ __volatile__(AO_SWIZZLE
-              "mov ar.ccv=%[old] ;; cmpxchg1.acq %0=[%1],%[new_val],ar.ccv"
-              : "=r"(oldval) AO_OUT_ADDR
-              : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"((AO_t)old)
-              : "memory");
-  return (oldval == old);
-}
-
-#define AO_HAVE_char_compare_and_swap_acquire
-
-AO_INLINE int
-AO_char_compare_and_swap_release(volatile unsigned char *addr,
-                                unsigned char old, unsigned char new_val) 
-{
-  unsigned char oldval;
-  __asm__ __volatile__(AO_SWIZZLE
-               "mov ar.ccv=%[old] ;; cmpxchg1.rel %0=[%1],%[new_val],ar.ccv"
-               : "=r"(oldval) AO_OUT_ADDR
-               : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"((AO_t)old)
-               : "memory");
-  return (oldval == old);
-}
-
-#define AO_HAVE_char_compare_and_swap_release
-
-AO_INLINE int
-AO_short_compare_and_swap_acquire(volatile unsigned short *addr,
-                                 unsigned short old, unsigned short new_val) 
-{
-  unsigned short oldval;
-  __asm__ __volatile__(AO_SWIZZLE
-               "mov ar.ccv=%[old] ;; cmpxchg2.acq %0=[%1],%[new_val],ar.ccv"
-               : "=r"(oldval) AO_OUT_ADDR
-               : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"((AO_t)old)
-               : "memory");
-  return (oldval == old);
-}
-
-#define AO_HAVE_short_compare_and_swap_acquire
-
-AO_INLINE int
-AO_short_compare_and_swap_release(volatile unsigned short *addr,
-                                 unsigned short old, unsigned short new_val) 
-{
-  unsigned short oldval;
-  __asm__ __volatile__(AO_SWIZZLE
-               "mov ar.ccv=%[old] ;; cmpxchg2.rel %0=[%1],%[new_val],ar.ccv"
-               : "=r"(oldval) AO_OUT_ADDR
-               : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"((AO_t)old)
-               : "memory");
-  return (oldval == old);
-}
-
-#define AO_HAVE_short_compare_and_swap_release
-
-#ifndef _ILP32
-
-AO_INLINE int
-AO_int_compare_and_swap_acquire(volatile unsigned int *addr,
-                               unsigned int old, unsigned int new_val) 
-{
-  unsigned int oldval;
-  __asm__ __volatile__("mov ar.ccv=%3 ;; cmpxchg4.acq %0=[%1],%2,ar.ccv"
-                      : "=r"(oldval)
-                      : AO_IN_ADDR, "r"(new_val), "r"((AO_t)old) : "memory");
-  return (oldval == old);
-}
-
-#define AO_HAVE_int_compare_and_swap_acquire
-
-AO_INLINE int
-AO_int_compare_and_swap_release(volatile unsigned int *addr,
-                               unsigned int old, unsigned int new_val) 
-{
-  unsigned int oldval;
-  __asm__ __volatile__("mov ar.ccv=%3 ;; cmpxchg4.rel %0=[%1],%2,ar.ccv"
-                      : "=r"(oldval)
-                      : AO_IN_ADDR, "r"(new_val), "r"((AO_t)old) : "memory");
-  return (oldval == old);
-}
-
-#define AO_HAVE_int_compare_and_swap_release
-
-#endif /* !_ILP32 */
-
-/* FIXME: Add compare_and_swap_double as soon as there is widely       */
-/* available hardware that implements it.                              */
-
-/* FIXME: Add compare_double_and_swap_double for the _ILP32 case.      */
-
-#ifdef _ILP32
-# include "../ao_t_is_int.h"
-#endif
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/m68k.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/m68k.h
deleted file mode 100644 (file)
index 4bec437..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/* 
- * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
- * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
- * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
- *
- *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
- *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* The cas instruction causes an emulation trap for the        */
-/* 060 with a misaligned pointer, so let's avoid this. */
-#undef AO_t
-typedef unsigned long AO_t __attribute__ ((aligned (4)));
-
-/* FIXME.  Very incomplete.  */
-#include "../all_aligned_atomic_load_store.h"
-
-/* Are there any m68k multiprocessors still around?    */
-/* AFAIK, Alliants were sequentially consistent.       */
-#include "../ordered.h"
-
-#include "../test_and_set_t_is_char.h"
-
-/* Contributed by Tony Mantler or new.  Should be changed to MIT license? */
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_full(volatile AO_TS_t *addr) {
-  AO_TS_t oldval;
-
-  /* The value at addr is semi-phony.  */
-  /* 'tas' sets bit 7 while the return */
-  /* value pretends all bits were set, */
-  /* which at least matches AO_TS_SET. */
-  __asm__ __volatile__(
-               "tas %1; sne %0"
-               : "=d" (oldval), "=m" (*addr)
-               : "m" (*addr)
-               : "memory");
-   return oldval;
-}
-
-#define AO_HAVE_test_and_set_full
-
-/* Returns nonzero if the comparison succeeded. */
-AO_INLINE int
-AO_compare_and_swap_full(volatile AO_t *addr,
-                        AO_t old, AO_t new_val)
-{
-  char result;
-
-  __asm__ __volatile__(
-               "cas.l %3,%4,%1; seq %0"
-               : "=d" (result), "=m" (*addr)
-               : "m" (*addr), "d" (old), "d" (new_val)
-               : "memory");
-  return -result;
-}
-
-#define AO_HAVE_compare_and_swap_full
-
-
-#include "../ao_t_is_int.h"
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/mips.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/mips.h
deleted file mode 100644 (file)
index c6fd2c1..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/* \r
- * Copyright (c) 2005,2007  Thiemo Seufer <ths@networkno.de>\r
- *\r
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED\r
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.\r
- *\r
- * Permission is hereby granted to use or copy this program\r
- * for any purpose,  provided the above notices are retained on all copies.\r
- * Permission to modify the code and to distribute modified code is granted,\r
- * provided the above notices are retained, and a notice that the code was\r
- * modified is included with the above copyright notice.\r
- */\r
-\r
-/*\r
- * FIXME:  This should probably make finer distinctions.  SGI MIPS is\r
- * much more strongly ordered, and in fact closer to sequentially\r
- * consistent.  This is really aimed at modern embedded implementations.\r
- * It looks to me like this assumes a 32-bit ABI.  -HB\r
- */\r
-\r
-#include "../all_aligned_atomic_load_store.h"\r
-#include "../acquire_release_volatile.h"\r
-#include "../test_and_set_t_is_ao_t.h"\r
-#include "../standard_ao_double_t.h"\r
-\r
-/* Data dependence does not imply read ordering.  */\r
-#define AO_NO_DD_ORDERING\r
-\r
-AO_INLINE void\r
-AO_nop_full(void)\r
-{\r
-  __asm__ __volatile__(\r
-      "       .set push           \n"\r
-      "       .set mips2          \n"\r
-      "       .set noreorder      \n"\r
-      "       .set nomacro        \n"\r
-      "       sync                \n"\r
-      "       .set pop              "\r
-      : : : "memory");\r
-}\r
-\r
-#define AO_HAVE_nop_full\r
-\r
-AO_INLINE int\r
-AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val)\r
-{\r
-  register int was_equal = 0;\r
-  register int temp;\r
-\r
-  __asm__ __volatile__(\r
-      "       .set push           \n"\r
-      "       .set mips2          \n"\r
-      "       .set noreorder      \n"\r
-      "       .set nomacro        \n"\r
-      "1:     ll      %0, %1      \n"\r
-      "       bne     %0, %4, 2f  \n"\r
-      "        move   %0, %3      \n"\r
-      "       sc      %0, %1      \n"\r
-      "       .set pop            \n"\r
-      "       beqz    %0, 1b      \n"\r
-      "       li      %2, 1       \n"\r
-      "2:                           "\r
-      : "=&r" (temp), "+R" (*addr), "+r" (was_equal)\r
-      : "r" (new_val), "r" (old)\r
-      : "memory");\r
-  return was_equal;\r
-}\r
-\r
-#define AO_HAVE_compare_and_swap\r
-\r
-/* FIXME: I think the implementations below should be automatically    */\r
-/* generated if we omit them.  - HB                                    */\r
-\r
-AO_INLINE int\r
-AO_compare_and_swap_acquire(volatile AO_t *addr, AO_t old, AO_t new_val) {\r
-  int result = AO_compare_and_swap(addr, old, new_val);\r
-  AO_nop_full();\r
-  return result;\r
-}\r
-\r
-#define AO_HAVE_compare_and_swap_acquire\r
-\r
-AO_INLINE int\r
-AO_compare_and_swap_release(volatile AO_t *addr, AO_t old, AO_t new_val) {\r
-  AO_nop_full();\r
-  return AO_compare_and_swap(addr, old, new_val);\r
-}\r
-\r
-#define AO_HAVE_compare_and_swap_release\r
-\r
-AO_INLINE int\r
-AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) {\r
-  AO_t result;\r
-  AO_nop_full();\r
-  result = AO_compare_and_swap(addr, old, new_val);\r
-  AO_nop_full();\r
-  return result;\r
-}\r
-\r
-#define AO_HAVE_compare_and_swap_full\r
-\r
-/*\r
- * FIXME: We should also implement fetch_and_add and or primitives\r
- * directly.\r
- */\r
-\r
-#include "../ao_t_is_int.h"\r
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/powerpc.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/powerpc.h
deleted file mode 100644 (file)
index 49ab63c..0000000
+++ /dev/null
@@ -1,347 +0,0 @@
-/* 
- * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
- * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
- * Copyright (c) 1999-2004 Hewlett-Packard Development Company, L.P.
- *
- *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
- *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* Memory model documented at http://www-106.ibm.com/developerworks/   */
-/* eserver/articles/archguide.html and (clearer)                       */
-/* http://www-106.ibm.com/developerworks/eserver/articles/powerpc.html. */
-/* There appears to be no implicit ordering between any kind of                */
-/* independent memory references.                                      */
-/* Architecture enforces some ordering based on control dependence.    */
-/* I don't know if that could help.                                    */
-/* Data-dependent loads are always ordered.                            */
-/* Based on the above references, eieio is intended for use on         */
-/* uncached memory, which we don't support.  It does not order loads   */
-/* from cached memory.                                                 */
-/* Thanks to Maged Michael, Doug Lea, and Roger Hoover for helping to  */
-/* track some of this down and correcting my misunderstandings. -HB    */
-/* Earl Chew subsequently contributed further fixes & additions.       */
-
-#include "../all_aligned_atomic_load_store.h"
-
-#include "../test_and_set_t_is_ao_t.h"
-       /* There seems to be no byte equivalent of lwarx, so this       */
-       /* may really be what we want, at least in the 32-bit case.     */
-
-AO_INLINE void
-AO_nop_full(void)
-{
-  __asm__ __volatile__("sync" : : : "memory");
-}
-
-#define AO_HAVE_nop_full
-
-/* lwsync apparently works for everything but a StoreLoad barrier.     */
-AO_INLINE void
-AO_lwsync(void)
-{
-#ifdef __NO_LWSYNC__
-  __asm__ __volatile__("sync" : : : "memory");
-#else
-  __asm__ __volatile__("lwsync" : : : "memory");
-#endif
-}
-
-#define AO_nop_write() AO_lwsync()
-#define AO_HAVE_nop_write
-
-#define AO_nop_read() AO_lwsync()
-#define AO_HAVE_nop_read
-
-/* We explicitly specify load_acquire, since it is important, and can  */
-/* be implemented relatively cheaply.  It could be implemented         */
-/* with an ordinary load followed by a lwsync.  But the general wisdom */
-/* seems to be that a data dependent branch followed by an isync is    */
-/* cheaper.  And the documentation is fairly explicit that this also   */
-/* has acquire semantics.                                              */
-/* ppc64 uses ld not lwz */
-#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
-AO_INLINE AO_t
-AO_load_acquire(const volatile AO_t *addr)
-{
-  AO_t result;
-
-   __asm__ __volatile__ (
-    "ld%U1%X1 %0,%1\n"
-    "cmpw %0,%0\n"
-    "bne- 1f\n"
-    "1: isync\n"
-    : "=r" (result)
-    : "m"(*addr) : "memory", "cr0");
-  return result;
-}
-#else
-AO_INLINE AO_t
-AO_load_acquire(const volatile AO_t *addr)
-{
-  AO_t result;
-
-  /* FIXME: We should get gcc to allocate one of the condition */
-  /* registers.  I always got "impossible constraint" when I   */
-  /* tried the "y" constraint.                                 */
-  __asm__ __volatile__ (
-    "lwz%U1%X1 %0,%1\n"
-    "cmpw %0,%0\n"
-    "bne- 1f\n"
-    "1: isync\n"
-    : "=r" (result)
-    : "m"(*addr) : "memory", "cc");
-  return result;
-}
-#endif
-#define AO_HAVE_load_acquire
-
-/* We explicitly specify store_release, since it relies        */
-/* on the fact that lwsync is also a LoadStore barrier.                */
-AO_INLINE void
-AO_store_release(volatile AO_t *addr, AO_t value)
-{
-  AO_lwsync();
-  *addr = value;
-}
-
-#define AO_HAVE_load_acquire
-
-/* This is similar to the code in the garbage collector.  Deleting     */
-/* this and having it synthesized from compare_and_swap would probably */
-/* only cost us a load immediate instruction.                          */
-#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
-/* Completely untested.  And we should be using smaller objects anyway. */
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set(volatile AO_TS_t *addr) {
-  unsigned long oldval;
-  unsigned long temp = 1; /* locked value */
-
-  __asm__ __volatile__(
-               "1:ldarx %0,0,%1\n"   /* load and reserve               */
-               "cmpdi %0, 0\n"       /* if load is                     */
-               "bne 2f\n"            /*   non-zero, return already set */
-               "stdcx. %2,0,%1\n"    /* else store conditional         */
-               "bne- 1b\n"           /* retry if lost reservation      */
-               "2:\n"                /* oldval is zero if we set       */
-              : "=&r"(oldval)
-              : "r"(addr), "r"(temp)
-              : "memory", "cr0");
-
-  return (AO_TS_VAL_t)oldval;
-}
-
-#else
-
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set(volatile AO_TS_t *addr) {
-  int oldval;
-  int temp = 1; /* locked value */
-
-  __asm__ __volatile__(
-               "1:lwarx %0,0,%1\n"   /* load and reserve               */
-               "cmpwi %0, 0\n"       /* if load is                     */
-               "bne 2f\n"            /*   non-zero, return already set */
-               "stwcx. %2,0,%1\n"    /* else store conditional         */
-               "bne- 1b\n"           /* retry if lost reservation      */
-               "2:\n"                /* oldval is zero if we set       */
-              : "=&r"(oldval)
-              : "r"(addr), "r"(temp)
-              : "memory", "cr0");
-
-  return (AO_TS_VAL_t)oldval;
-}
-
-#endif
-
-#define AO_have_test_and_set
-
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_acquire(volatile AO_TS_t *addr) {
-  AO_TS_VAL_t result = AO_test_and_set(addr);
-  AO_lwsync();
-  return result;
-}
-
-#define AO_HAVE_test_and_set_acquire
-
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_release(volatile AO_TS_t *addr) {
-  AO_lwsync();
-  return AO_test_and_set(addr);
-}
-
-#define AO_HAVE_test_and_set_release
-
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_full(volatile AO_TS_t *addr) {
-  AO_TS_VAL_t result;
-  AO_lwsync();
-  result = AO_test_and_set(addr);
-  AO_lwsync();
-  return result;
-}
-
-#define AO_HAVE_test_and_set_full
-
-#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
-/* FIXME: Completely untested. */
-AO_INLINE int
-AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val) {
-  AO_t oldval;
-  int result = 0;
-
-  __asm__ __volatile__(
-               "1:ldarx %0,0,%2\n"   /* load and reserve              */
-               "cmpd %0, %4\n"      /* if load is not equal to         */
-               "bne 2f\n"            /*   old, fail                    */
-               "stdcx. %3,0,%2\n"    /* else store conditional         */
-               "bne- 1b\n"           /* retry if lost reservation      */
-              "li %1,1\n"           /* result = 1;                     */
-               "2:\n"
-              : "=&r"(oldval), "=&r"(result)
-              : "r"(addr), "r"(new_val), "r"(old), "1"(result)
-              : "memory", "cr0");
-
-  return result;
-}
-
-#else
-
-AO_INLINE int
-AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val) {
-  AO_t oldval;
-  int result = 0;
-
-  __asm__ __volatile__(
-               "1:lwarx %0,0,%2\n"   /* load and reserve              */
-               "cmpw %0, %4\n"      /* if load is not equal to         */
-               "bne 2f\n"            /*   old, fail                    */
-               "stwcx. %3,0,%2\n"    /* else store conditional         */
-               "bne- 1b\n"           /* retry if lost reservation      */
-              "li %1,1\n"           /* result = 1;                     */
-               "2:\n"
-              : "=&r"(oldval), "=&r"(result)
-              : "r"(addr), "r"(new_val), "r"(old), "1"(result)
-              : "memory", "cr0");
-
-  return result;
-}
-#endif
-
-#define AO_HAVE_compare_and_swap
-
-AO_INLINE int
-AO_compare_and_swap_acquire(volatile AO_t *addr, AO_t old, AO_t new_val) {
-  int result = AO_compare_and_swap(addr, old, new_val);
-  AO_lwsync();
-  return result;
-}
-
-#define AO_HAVE_compare_and_swap_acquire
-
-AO_INLINE int
-AO_compare_and_swap_release(volatile AO_t *addr, AO_t old, AO_t new_val) {
-  AO_lwsync();
-  return AO_compare_and_swap(addr, old, new_val);
-}
-
-#define AO_HAVE_compare_and_swap_release
-
-AO_INLINE int
-AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) {
-  AO_t result;
-  AO_lwsync();
-  result = AO_compare_and_swap(addr, old, new_val);
-  AO_lwsync();
-  return result;
-}
-
-#define AO_HAVE_compare_and_swap_full
-
-#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
-/* FIXME: Completely untested.                                         */
-
-AO_INLINE AO_t
-AO_fetch_and_add(volatile AO_t *addr, AO_t incr) {
-  AO_t oldval;
-  AO_t newval;
-
-  __asm__ __volatile__(
-               "1:ldarx %0,0,%2\n"   /* load and reserve               */
-               "add %1,%0,%3\n"      /* increment                      */
-               "stdcx. %1,0,%2\n"    /* store conditional              */
-               "bne- 1b\n"           /* retry if lost reservation      */
-              : "=&r"(oldval), "=&r"(newval)
-               : "r"(addr), "r"(incr)
-              : "memory", "cr0");
-
-  return oldval;
-}
-
-#define AO_HAVE_fetch_and_add
-
-#else
-
-AO_INLINE AO_t
-AO_fetch_and_add(volatile AO_t *addr, AO_t incr) {
-  AO_t oldval;
-  AO_t newval;
-
-  __asm__ __volatile__(
-               "1:lwarx %0,0,%2\n"   /* load and reserve               */
-               "add %1,%0,%3\n"      /* increment                      */
-               "stwcx. %1,0,%2\n"    /* store conditional              */
-               "bne- 1b\n"           /* retry if lost reservation      */
-              : "=&r"(oldval), "=&r"(newval)
-               : "r"(addr), "r"(incr)
-              : "memory", "cr0");
-
-  return oldval;
-}
-
-#define AO_HAVE_fetch_and_add
-
-#endif
-
-AO_INLINE AO_t
-AO_fetch_and_add_acquire(volatile AO_t *addr, AO_t incr) {
-  AO_t result = AO_fetch_and_add(addr, incr);
-  AO_lwsync();
-  return result;
-}
-
-#define AO_HAVE_fetch_and_add_acquire
-
-AO_INLINE AO_t
-AO_fetch_and_add_release(volatile AO_t *addr, AO_t incr) {
-  AO_lwsync();
-  return AO_fetch_and_add(addr, incr);
-}
-
-#define AO_HAVE_fetch_and_add_release
-
-AO_INLINE AO_t
-AO_fetch_and_add_full(volatile AO_t *addr, AO_t incr) {
-  AO_t result;
-  AO_lwsync();
-  result = AO_fetch_and_add(addr, incr);
-  AO_lwsync();
-  return result;
-}
-
-#define AO_HAVE_fetch_and_add_full
-
-#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
-#else
-# include "../ao_t_is_int.h"
-#endif
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/s390.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/s390.h
deleted file mode 100644 (file)
index 410f2f6..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/* 
- * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
- * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
- * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
- *
- *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
- *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* FIXME: untested.                                            */
-/* The relevant documentation appears to be at                 */
-/* http://publibz.boulder.ibm.com/epubs/pdf/dz9zr003.pdf       */
-/* around page 5-96.  Apparently:                              */
-/* - Memory references in general are atomic only for a single         */
-/*   byte.  But it appears that the most common load/store     */
-/*   instructions also guarantee atomicity for aligned                 */
-/*   operands of standard types.  WE FOOLISHLY ASSUME that     */
-/*   compilers only generate those.  If that turns out to be   */
-/*   wrong, we need inline assembly code for AO_load and       */
-/*   AO_store.                                                 */
-/* - A store followed by a load is unordered since the store   */
-/*   may be delayed.  Otherwise everything is ordered.         */
-/* - There is a hardware compare-and-swap (CS) instruction.    */
-
-#include "../ordered_except_wr.h"
-#include "../all_aligned_atomic_load_store.h"
-
-#include "../test_and_set_t_is_ao_t.h"
-/* FIXME: Is there a way to do byte-sized test-and-set?        */
-
-/* FIXME: AO_nop_full should probably be implemented directly. */
-/* It appears that certain BCR instructions have that effect.  */
-/* Presumably they're cheaper than CS?                         */
-
-AO_INLINE AO_t AO_compare_and_swap_full(volatile AO_t *addr,
-                                               AO_t old, AO_t new_val)
-{
-  int retval;
-  __asm__ __volatile__ (
-# ifndef __s390x__
-    "     cs  %1,%2,0(%3)\n"
-# else
-    "     csg %1,%2,0(%3)\n"
-# endif
-  "     ipm %0\n"
-  "     srl %0,28\n"
-  : "=&d" (retval), "+d" (old)
-  : "d" (new_val), "a" (addr)
-  : "cc", "memory");
-  return retval == 0;
-}
-
-#define AO_HAVE_compare_and_swap_full
-
-/* FIXME: Add double-wide compare-and-swap for 32-bit executables.     */
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/sparc.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/sparc.h
deleted file mode 100644 (file)
index 5ee7a90..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/* 
- * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
- * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
- * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
- *
- *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
- *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* FIXME.  Very incomplete.  No support for sparc64.   */
-/* Non-ancient SPARCs provide compare-and-swap (casa). */
-/* We should make that available.                      */
-
-#include "../all_atomic_load_store.h"
-
-/* Real SPARC code uses TSO:                           */
-#include "../ordered_except_wr.h"
-
-/* Test_and_set location is just a byte.                */
-#include "../test_and_set_t_is_char.h"
-
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_full(volatile AO_TS_t *addr) {
-   AO_TS_VAL_t oldval;
-
-   __asm__ __volatile__("ldstub %1,%0"
-                       : "=r"(oldval), "=m"(*addr)
-                       : "m"(*addr) : "memory");
-   return oldval;
-}
-
-#define AO_HAVE_test_and_set_full
-
-#ifndef AO_NO_SPARC_V9
-/* Returns nonzero if the comparison succeeded. */
-AO_INLINE int
-AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) {
-  char ret;
-  __asm__ __volatile__ ("membar #StoreLoad | #LoadLoad\n\t"
-#                      if defined(__arch64__)
-                         "casx [%2],%0,%1\n\t"
-#                      else
-                         "cas [%2],%0,%1\n\t" /* 32-bit version */
-#                      endif
-                       "membar #StoreLoad | #StoreStore\n\t"
-                       "cmp %0,%1\n\t"
-                       "be,a 0f\n\t"
-                       "mov 1,%0\n\t"/* one insn after branch always executed */
-                       "clr %0\n\t"
-                       "0:\n\t"
-                       : "=r" (ret), "+r" (new_val)
-                       : "r" (addr), "0" (old)
-                       : "memory", "cc");
-  return (int)ret;
-}
-
-#define AO_HAVE_compare_and_swap_full
-#endif /* AO_NO_SPARC_V9 */
-
-/* FIXME: This needs to be extended for SPARC v8 and v9.       */
-/* SPARC V8 also has swap.  V9 has CAS.                                */
-/* There are barriers like membar #LoadStore.                  */
-/* CASA (32-bit) and CASXA(64-bit) instructions were           */
-/* added in V9.                                                        */
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86.h
deleted file mode 100644 (file)
index 488cd20..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-/* 
- * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
- * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
- * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
- *
- *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
- *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- * Some of the machine specific code was borrowed from our GC distribution.
- */
-
-/* The following really assume we have a 486 or better.  Unfortunately */
-/* gcc doesn't define a suitable feature test macro based on command   */
-/* line options.                                                       */
-/* We should perhaps test dynamically.                                 */
-
-#include "../all_aligned_atomic_load_store.h"
-
-/* Real X86 implementations, except for some old WinChips, appear      */
-/* to enforce ordering between memory operations, EXCEPT that a later  */
-/* read can pass earlier writes, presumably due to the visible         */
-/* presence of store buffers.                                          */
-/* We ignore both the WinChips, and the fact that the official specs   */
-/* seem to be much weaker (and arguably too weak to be usable).                */
-
-#include "../ordered_except_wr.h"
-
-#include "../test_and_set_t_is_char.h"
-
-#include "../standard_ao_double_t.h"
-
-#if defined(AO_USE_PENTIUM4_INSTRS)
-AO_INLINE void
-AO_nop_full(void)
-{
-  __asm__ __volatile__("mfence" : : : "memory");
-}
-
-#define AO_HAVE_nop_full
-
-#else
-
-/* We could use the cpuid instruction.  But that seems to be slower    */
-/* than the default implementation based on test_and_set_full.  Thus   */
-/* we omit that bit of misinformation here.                            */
-
-#endif
-
-/* As far as we can tell, the lfence and sfence instructions are not   */
-/* currently needed or useful for cached memory accesses.              */
-
-/* Really only works for 486 and later */
-AO_INLINE AO_t
-AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
-{
-  AO_t result;
-
-  __asm__ __volatile__ ("lock; xaddl %0, %1" :
-                       "=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
-                       : "memory");
-  return result;
-}
-
-#define AO_HAVE_fetch_and_add_full
-
-AO_INLINE unsigned char
-AO_char_fetch_and_add_full (volatile unsigned char *p, unsigned char incr)
-{
-  unsigned char result;
-
-  __asm__ __volatile__ ("lock; xaddb %0, %1" :
-                       "=q" (result), "=m" (*p) : "0" (incr), "m" (*p)
-                       : "memory");
-  return result;
-}
-
-#define AO_HAVE_char_fetch_and_add_full
-
-AO_INLINE unsigned short
-AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr)
-{
-  unsigned short result;
-
-  __asm__ __volatile__ ("lock; xaddw %0, %1" :
-                       "=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
-                       : "memory");
-  return result;
-}
-
-#define AO_HAVE_short_fetch_and_add_full
-
-/* Really only works for 486 and later */
-AO_INLINE void
-AO_or_full (volatile AO_t *p, AO_t incr)
-{
-  __asm__ __volatile__ ("lock; orl %1, %0" :
-                       "=m" (*p) : "r" (incr), "m" (*p) : "memory");
-}
-
-#define AO_HAVE_or_full
-
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_full(volatile AO_TS_t *addr)
-{
-  unsigned char oldval;
-  /* Note: the "xchg" instruction does not need a "lock" prefix */
-  __asm__ __volatile__("xchgb %0, %1"
-               : "=q"(oldval), "=m"(*addr)
-               : "0"(0xff), "m"(*addr) : "memory");
-  return (AO_TS_VAL_t)oldval;
-}
-
-#define AO_HAVE_test_and_set_full
-
-/* Returns nonzero if the comparison succeeded. */
-AO_INLINE int
-AO_compare_and_swap_full(volatile AO_t *addr,
-                            AO_t old, AO_t new_val) 
-{
-  char result;
-  __asm__ __volatile__("lock; cmpxchgl %3, %0; setz %1"
-                      : "=m"(*addr), "=q"(result)
-                      : "m"(*addr), "r" (new_val), "a"(old) : "memory");
-  return (int) result;
-}
-
-#define AO_HAVE_compare_and_swap_full
-
-/* Returns nonzero if the comparison succeeded. */
-/* Really requires at least a Pentium.         */
-AO_INLINE int
-AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
-                                      AO_t old_val1, AO_t old_val2,
-                                      AO_t new_val1, AO_t new_val2) 
-{
-  char result;
-  #if __PIC__
-  /* If PIC is turned on, we can't use %ebx as it is reserved for the
-     GOT pointer.  We can save and restore %ebx because GCC won't be
-     using it for anything else (such as any of the m operands) */
-  __asm__ __volatile__("pushl %%ebx;"   /* save ebx used for PIC GOT ptr */
-                      "movl %6,%%ebx;" /* move new_val2 to %ebx */
-                      "lock; cmpxchg8b %0; setz %1;"
-                      "pop %%ebx;"     /* restore %ebx */
-                      : "=m"(*addr), "=q"(result)
-                      : "m"(*addr), "d" (old_val2), "a" (old_val1),
-                        "c" (new_val2), "m" (new_val1) : "memory");
-  #else
-  /* We can't just do the same thing in non-PIC mode, because GCC
-   * might be using %ebx as the memory operand.  We could have ifdef'd
-   * in a clobber, but there's no point doing the push/pop if we don't
-   * have to. */
-  __asm__ __volatile__("lock; cmpxchg8b %0; setz %1;"
-                      : "=m"(*addr), "=q"(result)
-                      : "m"(*addr), "d" (old_val2), "a" (old_val1),
-                        "c" (new_val2), "b" (new_val1) : "memory");
-  #endif
-  return (int) result;
-}
-
-#define AO_HAVE_compare_double_and_swap_double_full
-
-#include "../ao_t_is_int.h"
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86_64.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86_64.h
deleted file mode 100644 (file)
index f2522b4..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-/* 
- * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
- * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
- * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
- *
- *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
- *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- * Some of the machine specific code was borrowed from our GC distribution.
- */
-
-/* The following really assume we have a 486 or better.  Unfortunately */
-/* gcc doesn't define a suitable feature test macro based on command   */
-/* line options.                                                       */
-/* We should perhaps test dynamically.                                 */
-
-#include "../all_aligned_atomic_load_store.h"
-
-/* Real X86 implementations, except for some old WinChips, appear      */
-/* to enforce ordering between memory operations, EXCEPT that a later  */
-/* read can pass earlier writes, presumably due to the visible         */
-/* presence of store buffers.                                          */
-/* We ignore both the WinChips, and the fact that the official specs   */
-/* seem to be much weaker (and arguably too weak to be usable).                */
-
-#include "../ordered_except_wr.h"
-
-#include "../test_and_set_t_is_char.h"
-
-#include "../standard_ao_double_t.h"
-
-#if defined(AO_USE_PENTIUM4_INSTRS)
-AO_INLINE void
-AO_nop_full()
-{
-  __asm__ __volatile__("mfence" : : : "memory");
-}
-
-#define AO_HAVE_nop_full
-
-#else
-
-/* We could use the cpuid instruction.  But that seems to be slower    */
-/* than the default implementation based on test_and_set_full.  Thus   */
-/* we omit that bit of misinformation here.                            */
-
-#endif
-
-/* As far as we can tell, the lfence and sfence instructions are not   */
-/* currently needed or useful for cached memory accesses.              */
-
-/* Really only works for 486 and later */
-AO_INLINE AO_t
-AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
-{
-  AO_t result;
-
-  __asm__ __volatile__ ("lock; xaddq %0, %1" :
-                       "=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
-                       : "memory");
-  return result;
-}
-
-#define AO_HAVE_fetch_and_add_full
-
-AO_INLINE unsigned char
-AO_char_fetch_and_add_full (volatile unsigned char *p, unsigned char incr)
-{
-  unsigned char result;
-
-  __asm__ __volatile__ ("lock; xaddb %0, %1" :
-                       "=q" (result), "=m" (*p) : "0" (incr), "m" (*p)
-                       : "memory");
-  return result;
-}
-
-#define AO_HAVE_char_fetch_and_add_full
-
-AO_INLINE unsigned short
-AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr)
-{
-  unsigned short result;
-
-  __asm__ __volatile__ ("lock; xaddw %0, %1" :
-                       "=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
-                       : "memory");
-  return result;
-}
-
-#define AO_HAVE_short_fetch_and_add_full
-
-AO_INLINE unsigned int
-AO_int_fetch_and_add_full (volatile unsigned int *p, unsigned int incr)
-{
-  unsigned int result;
-
-  __asm__ __volatile__ ("lock; xaddl %0, %1" :
-                       "=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
-                       : "memory");
-  return result;
-}
-
-#define AO_HAVE_int_fetch_and_add_full
-
-/* Really only works for 486 and later */
-AO_INLINE void
-AO_or_full (volatile AO_t *p, AO_t incr)
-{
-  __asm__ __volatile__ ("lock; orq %1, %0" :
-                       "=m" (*p) : "r" (incr), "m" (*p) : "memory");
-}
-
-#define AO_HAVE_or_full
-
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_full(volatile AO_TS_t *addr)
-{
-  unsigned char oldval;
-  /* Note: the "xchg" instruction does not need a "lock" prefix */
-  __asm__ __volatile__("xchgb %0, %1"
-               : "=q"(oldval), "=m"(*addr)
-               : "0"(0xff), "m"(*addr) : "memory");
-  return (AO_TS_VAL_t)oldval;
-}
-
-#define AO_HAVE_test_and_set_full
-
-/* Returns nonzero if the comparison succeeded. */
-AO_INLINE int
-AO_compare_and_swap_full(volatile AO_t *addr,
-                        AO_t old, AO_t new_val) 
-{
-  char result;
-  __asm__ __volatile__("lock; cmpxchgq %3, %0; setz %1"
-                      : "=m"(*addr), "=q"(result)
-                      : "m"(*addr), "r" (new_val), "a"(old) : "memory");
-  return (int) result;
-}
-
-#define AO_HAVE_compare_and_swap_full
-
-#ifdef AO_CMPXCHG16B_AVAILABLE
-/* NEC LE-IT: older AMD Opterons are missing this instruction.
- * On these machines SIGILL will be thrown. Define AO_CASDOUBLE_MISSING
- * to have an emulated (lock based) version available */ 
-/* HB: Changed this to not define either by default.  There are
- * enough machines and tool chains around on which cmpxchg16b
- * doesn't work.  And the emulation is unsafe by our usual rules.
- * Hoewever both are clearly useful in certain cases.
- */
-AO_INLINE int
-AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
-                                      AO_t old_val1, AO_t old_val2,
-                                      AO_t new_val1, AO_t new_val2)
-{
-  char result;
-  __asm__ __volatile__("lock; cmpxchg16b %0; setz %1"
-                               : "=m"(*addr), "=q"(result)
-                                       : "m"(*addr),
-                                         "d" (old_val1),
-                                         "a" (old_val2),
-                                         "c" (new_val1),
-                                         "b" (new_val2)  : "memory");
-  return (int) result;
-}
-#define AO_HAVE_compare_double_and_swap_double_full
-#else
-/* this one provides spinlock based emulation of CAS implemented in    */
-/* atomic_ops.c.  We probably do not want to do this here, since it is  */
-/* not atomic with respect to other kinds of updates of *addr.  On the  */
-/* other hand, this may be a useful facility on occasion.              */
-#ifdef AO_WEAK_DOUBLE_CAS_EMULATION
-int AO_compare_double_and_swap_double_emulation(volatile AO_double_t *addr,
-                                               AO_t old_val1, AO_t old_val2,
-                                               AO_t new_val1, AO_t new_val2);
-
-AO_INLINE int
-AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
-                                      AO_t old_val1, AO_t old_val2,
-                                      AO_t new_val1, AO_t new_val2)
-{
-       return AO_compare_double_and_swap_double_emulation(addr,
-                                                          old_val1, old_val2,
-                                                          new_val1, new_val2);
-}
-#define AO_HAVE_compare_double_and_swap_double_full
-#endif /* AO_WEAK_DOUBLE_CAS_EMULATION */
-#endif /* AO_CMPXCHG16B_AVAILABLE */
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/generic_pthread.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/generic_pthread.h
deleted file mode 100644 (file)
index b38367f..0000000
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-/* The following is useful primarily for debugging and documentation.  */
-/* We define various atomic operations by acquiring a global pthread   */
-/* lock.  The resulting implementation will perform poorly, but should */
-/* be correct unless it is used from signal handlers.                  */
-/* We assume that all pthread operations act like full memory barriers.        */
-/* (We believe that is the intent of the specification.)               */
-
-#include <pthread.h>
-
-#include "test_and_set_t_is_ao_t.h"
-       /* This is not necessarily compatible with the native           */
-       /* implementation.  But those can't be safely mixed anyway.     */
-
-/* We define only the full barrier variants, and count on the          */
-/* generalization section below to fill in the rest.                   */
-extern pthread_mutex_t AO_pt_lock;
-
-AO_INLINE void
-AO_nop_full(void)
-{
-  pthread_mutex_lock(&AO_pt_lock);
-  pthread_mutex_unlock(&AO_pt_lock);
-}
-
-#define AO_HAVE_nop_full
-
-AO_INLINE AO_t
-AO_load_full(const volatile AO_t *addr)
-{
-  AO_t result;
-  pthread_mutex_lock(&AO_pt_lock);
-  result = *addr;
-  pthread_mutex_unlock(&AO_pt_lock);
-  return result;
-}
-
-#define AO_HAVE_load_full
-
-AO_INLINE void
-AO_store_full(volatile AO_t *addr, AO_t val)
-{
-  pthread_mutex_lock(&AO_pt_lock);
-  *addr = val;
-  pthread_mutex_unlock(&AO_pt_lock);
-}
-
-#define AO_HAVE_store_full
-
-AO_INLINE unsigned char
-AO_char_load_full(const volatile unsigned char *addr)
-{
-  unsigned char result;
-  pthread_mutex_lock(&AO_pt_lock);
-  result = *addr;
-  pthread_mutex_unlock(&AO_pt_lock);
-  return result;
-}
-
-#define AO_HAVE_char_load_full
-
-AO_INLINE void
-AO_char_store_full(volatile unsigned char *addr, unsigned char val)
-{
-  pthread_mutex_lock(&AO_pt_lock);
-  *addr = val;
-  pthread_mutex_unlock(&AO_pt_lock);
-}
-
-#define AO_HAVE_char_store_full
-
-AO_INLINE unsigned short
-AO_short_load_full(const volatile unsigned short *addr)
-{
-  unsigned short result;
-  pthread_mutex_lock(&AO_pt_lock);
-  result = *addr;
-  pthread_mutex_unlock(&AO_pt_lock);
-  return result;
-}
-
-#define AO_HAVE_short_load_full
-
-AO_INLINE void
-AO_short_store_full(volatile unsigned short *addr, unsigned short val)
-{
-  pthread_mutex_lock(&AO_pt_lock);
-  *addr = val;
-  pthread_mutex_unlock(&AO_pt_lock);
-}
-
-#define AO_HAVE_short_store_full
-
-AO_INLINE unsigned int
-AO_int_load_full(const volatile unsigned int *addr)
-{
-  unsigned int result;
-  pthread_mutex_lock(&AO_pt_lock);
-  result = *addr;
-  pthread_mutex_unlock(&AO_pt_lock);
-  return result;
-}
-
-#define AO_HAVE_int_load_full
-
-AO_INLINE void
-AO_int_store_full(volatile unsigned int *addr, unsigned int val)
-{
-  pthread_mutex_lock(&AO_pt_lock);
-  *addr = val;
-  pthread_mutex_unlock(&AO_pt_lock);
-}
-
-#define AO_HAVE_int_store_full
-
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_full(volatile AO_TS_t *addr)
-{
-  AO_TS_VAL_t result;
-  pthread_mutex_lock(&AO_pt_lock);
-  result = (AO_TS_VAL_t)(*addr);
-  *addr = AO_TS_SET;
-  pthread_mutex_unlock(&AO_pt_lock);
-  assert(result == AO_TS_SET || result == AO_TS_CLEAR);
-  return result;
-}
-
-#define AO_HAVE_test_and_set_full
-
-AO_INLINE AO_t
-AO_fetch_and_add_full(volatile AO_t *p, AO_t incr)
-{
-  AO_t tmp;
-
-  pthread_mutex_lock(&AO_pt_lock);
-  tmp = *p;
-  *p = tmp + incr;
-  pthread_mutex_unlock(&AO_pt_lock);
-  return tmp;
-}
-
-#define AO_HAVE_fetch_and_add_full
-
-AO_INLINE unsigned char
-AO_char_fetch_and_add_full(volatile unsigned char *p, unsigned char incr)
-{
-  unsigned char tmp;
-
-  pthread_mutex_lock(&AO_pt_lock);
-  tmp = *p;
-  *p = tmp + incr;
-  pthread_mutex_unlock(&AO_pt_lock);
-  return tmp;
-}
-
-#define AO_HAVE_char_fetch_and_add_full
-
-AO_INLINE unsigned short
-AO_short_fetch_and_add_full(volatile unsigned short *p, unsigned short incr)
-{
-  unsigned short tmp;
-
-  pthread_mutex_lock(&AO_pt_lock);
-  tmp = *p;
-  *p = tmp + incr;
-  pthread_mutex_unlock(&AO_pt_lock);
-  return tmp;
-}
-
-#define AO_HAVE_short_fetch_and_add_full
-
-AO_INLINE unsigned int
-AO_int_fetch_and_add_full(volatile unsigned int *p, unsigned int incr)
-{
-  unsigned int tmp;
-
-  pthread_mutex_lock(&AO_pt_lock);
-  tmp = *p;
-  *p = tmp + incr;
-  pthread_mutex_unlock(&AO_pt_lock);
-  return tmp;
-}
-
-#define AO_HAVE_int_fetch_and_add_full
-
-AO_INLINE void
-AO_or_full(volatile AO_t *p, AO_t incr)
-{
-  AO_t tmp;
-
-  pthread_mutex_lock(&AO_pt_lock);
-  tmp = *p;
-  *p = (tmp | incr);
-  pthread_mutex_unlock(&AO_pt_lock);
-}
-
-#define AO_HAVE_or_full
-
-AO_INLINE int
-AO_compare_and_swap_full(volatile AO_t *addr,
-                            AO_t old, AO_t new_val) 
-{
-  pthread_mutex_lock(&AO_pt_lock);
-  if (*addr == old)
-    {
-      *addr = new_val;
-      pthread_mutex_unlock(&AO_pt_lock);
-      return 1;
-    }
-  else
-    pthread_mutex_unlock(&AO_pt_lock);
-    return 0;
-}
-
-#define AO_HAVE_compare_and_swap_full
-
-/* Unlike real architectures, we define both double-width CAS variants. */
-
-typedef struct {
-       AO_t AO_val1;
-       AO_t AO_val2;
-} AO_double_t;
-
-#define AO_HAVE_double_t
-
-AO_INLINE int
-AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
-                                      AO_t old1, AO_t old2,
-                                      AO_t new1, AO_t new2) 
-{
-  pthread_mutex_lock(&AO_pt_lock);
-  if (addr -> AO_val1 == old1 && addr -> AO_val2 == old2)
-    {
-      addr -> AO_val1 = new1;
-      addr -> AO_val2 = new2;
-      pthread_mutex_unlock(&AO_pt_lock);
-      return 1;
-    }
-  else
-    pthread_mutex_unlock(&AO_pt_lock);
-    return 0;
-}
-
-#define AO_HAVE_compare_double_and_swap_double_full
-
-AO_INLINE int
-AO_compare_and_swap_double_full(volatile AO_double_t *addr,
-                               AO_t old1,
-                               AO_t new1, AO_t new2) 
-{
-  pthread_mutex_lock(&AO_pt_lock);
-  if (addr -> AO_val1 == old1)
-    {
-      addr -> AO_val1 = new1;
-      addr -> AO_val2 = new2;
-      pthread_mutex_unlock(&AO_pt_lock);
-      return 1;
-    }
-  else
-    pthread_mutex_unlock(&AO_pt_lock);
-    return 0;
-}
-
-#define AO_HAVE_compare_and_swap_double_full
-
-/* We can't use hardware loads and stores, since they don't    */
-/* interact correctly with atomic updates.                     */
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/hpc/hppa.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/hpc/hppa.h
deleted file mode 100644 (file)
index 35edef6..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- * 
- * Derived from the corresponding header file for gcc.
- * 
- */ 
-
-#include "../atomic_load_store.h"
-
-/* Some architecture set descriptions include special "ordered" memory */
-/* operations.  As far as we can tell, no existing processors actually */
-/* require those.  Nor does it appear likely that future processors    */
-/* will.                                                               */
-/* FIXME:                                                              */
-/* The PA emulator on Itanium may obey weaker restrictions.            */
-/* There should be a mode in which we don't assume sequential          */
-/* consistency here.                                                   */
-#include "../ordered.h"
-
-#include <machine/inline.h>
-
-/* GCC will not guarantee the alignment we need, use four lock words   */
-/* and select the correctly aligned datum. See the glibc 2.3.2         */
-/* linuxthread port for the original implementation.                   */
-struct AO_pa_clearable_loc {
-  int data[4];
-};
-
-#undef AO_TS_INITIALIZER
-#define AO_TS_t struct AO_pa_clearable_loc
-#define AO_TS_INITIALIZER {1,1,1,1}
-/* Switch meaning of set and clear, since we only have an atomic clear */
-/* instruction.                                                                */
-typedef enum {AO_PA_TS_set = 0, AO_PA_TS_clear = 1} AO_PA_TS_val;
-#define AO_TS_VAL_t AO_PA_TS_val
-#define AO_TS_CLEAR AO_PA_TS_clear
-#define AO_TS_SET AO_PA_TS_set
-
-/* The hppa only has one atomic read and modify memory operation,      */
-/* load and clear, so hppa spinlocks must use zero to signify that     */
-/* someone is holding the lock.  The address used for the ldcw         */
-/* semaphore must be 16-byte aligned.                                  */
-
-#define __ldcw(a, ret)  \
-  _LDCWX(0 /* index */, 0 /* s */, a /* base */, ret);
-
-/* Because malloc only guarantees 8-byte alignment for malloc'd data,  */
-/* and GCC only guarantees 8-byte alignment for stack locals, we can't */
-/* be assured of 16-byte alignment for atomic lock data even if we     */
-/* specify "__attribute ((aligned(16)))" in the type declaration.  So, */
-/* we use a struct containing an array of four ints for the atomic lock        */
-/* type and dynamically select the 16-byte aligned int from the array  */
-/* for the semaphore.                                                  */
-#define __PA_LDCW_ALIGNMENT 16
-
-#define __ldcw_align(a, ret) { \
-  ret = (unsigned long) a;                     \
-  ret += __PA_LDCW_ALIGNMENT - 1;                                      \
-  ret &= ~(__PA_LDCW_ALIGNMENT - 1);                                   \
-}
-
-/* Works on PA 1.1 and PA 2.0 systems */
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_full(volatile AO_TS_t * addr)
-{
-  register unsigned int ret;
-  register unsigned long a;
-  __ldcw_align (addr, a);
-  __ldcw (a, ret);
-  return ret;
-} 
-
-AO_INLINE void
-AO_pa_clear(volatile AO_TS_t * addr)
-{
-  unsigned long a;
-  __ldcw_align (addr,a);
-  AO_compiler_barrier();
-  *(volatile unsigned int *)a = 1;
-}
-#define AO_CLEAR(addr) AO_pa_clear(addr)
-
-#define AO_HAVE_test_and_set_full
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/hpc/ia64.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/hpc/ia64.h
deleted file mode 100644 (file)
index 3fbcc4d..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-/*
- * This file specifies Itanimum primitives for use with the HP compiler
- * under HP/UX.  We use intrinsics instead of the inline assembly code in the
- * gcc file.
- */
-
-#include "../all_atomic_load_store.h"
-
-#include "../all_acquire_release_volatile.h"
-
-#include "../test_and_set_t_is_char.h"
-
-#include <machine/sys/inline.h>
-
-#ifdef __LP64__
-# define AO_T_FASIZE _FASZ_D
-# define AO_T_SIZE _SZ_D
-#else
-# define AO_T_FASIZE _FASZ_W
-# define AO_T_SIZE _SZ_W
-#endif
-
-AO_INLINE void
-AO_nop_full(void)
-{
-  _Asm_mf();
-}
-#define AO_HAVE_nop_full
-
-AO_INLINE AO_t
-AO_fetch_and_add1_acquire (volatile AO_t *p)
-{
-  return _Asm_fetchadd(AO_T_FASIZE, _SEM_ACQ, p, 1,
-                      _LDHINT_NONE, _DOWN_MEM_FENCE);
-}
-#define AO_HAVE_fetch_and_add1_acquire
-
-AO_INLINE AO_t
-AO_fetch_and_add1_release (volatile AO_t *p)
-{
-  return _Asm_fetchadd(AO_T_FASIZE, _SEM_REL, p, 1,
-                      _LDHINT_NONE, _UP_MEM_FENCE);
-}
-
-#define AO_HAVE_fetch_and_add1_release
-
-AO_INLINE AO_t
-AO_fetch_and_sub1_acquire (volatile AO_t *p)
-{
-  return _Asm_fetchadd(AO_T_FASIZE, _SEM_ACQ, p, -1,
-                      _LDHINT_NONE, _DOWN_MEM_FENCE);
-}
-
-#define AO_HAVE_fetch_and_sub1_acquire
-
-AO_INLINE AO_t
-AO_fetch_and_sub1_release (volatile AO_t *p)
-{
-  return _Asm_fetchadd(AO_T_FASIZE, _SEM_REL, p, -1,
-                      _LDHINT_NONE, _UP_MEM_FENCE);
-}
-
-#define AO_HAVE_fetch_and_sub1_release
-
-AO_INLINE int
-AO_compare_and_swap_acquire(volatile AO_t *addr,
-                            AO_t old, AO_t new_val) 
-{
-  AO_t oldval;
-
-  _Asm_mov_to_ar(_AREG_CCV, old, _DOWN_MEM_FENCE);
-  oldval = _Asm_cmpxchg(AO_T_SIZE, _SEM_ACQ, addr,
-                       new_val, _LDHINT_NONE, _DOWN_MEM_FENCE);
-  return (oldval == old);
-}
-
-#define AO_HAVE_compare_and_swap_acquire
-
-AO_INLINE int
-AO_compare_and_swap_release(volatile AO_t *addr,
-                            AO_t old, AO_t new_val) 
-{
-  AO_t oldval;
-  _Asm_mov_to_ar(_AREG_CCV, old, _UP_MEM_FENCE);
-  oldval = _Asm_cmpxchg(AO_T_SIZE, _SEM_REL, addr,
-                       new_val, _LDHINT_NONE, _UP_MEM_FENCE);
-  /* Hopefully the compiler knows not to reorder the above two? */
-  return (oldval == old);
-}
-
-#define AO_HAVE_compare_and_swap_release
-
-AO_INLINE int
-AO_char_compare_and_swap_acquire(volatile unsigned char *addr,
-                                unsigned char old, unsigned char new_val) 
-{
-  unsigned char oldval;
-
-  _Asm_mov_to_ar(_AREG_CCV, old, _DOWN_MEM_FENCE);
-  oldval = _Asm_cmpxchg(_SZ_B, _SEM_ACQ, addr,
-                       new_val, _LDHINT_NONE, _DOWN_MEM_FENCE);
-  return (oldval == old);
-}
-
-#define AO_HAVE_char_compare_and_swap_acquire
-
-AO_INLINE int
-AO_char_compare_and_swap_release(volatile unsigned char *addr,
-                                unsigned char old, unsigned char new_val) 
-{
-  unsigned char oldval;
-  _Asm_mov_to_ar(_AREG_CCV, old, _UP_MEM_FENCE);
-  oldval = _Asm_cmpxchg(_SZ_B, _SEM_REL, addr,
-                       new_val, _LDHINT_NONE, _UP_MEM_FENCE);
-  /* Hopefully the compiler knows not to reorder the above two? */
-  return (oldval == old);
-}
-
-#define AO_HAVE_char_compare_and_swap_release
-
-AO_INLINE int
-AO_short_compare_and_swap_acquire(volatile unsigned short *addr,
-                                unsigned short old, unsigned short new_val) 
-{
-  unsigned short oldval;
-
-  _Asm_mov_to_ar(_AREG_CCV, old, _DOWN_MEM_FENCE);
-  oldval = _Asm_cmpxchg(_SZ_B, _SEM_ACQ, addr,
-                       new_val, _LDHINT_NONE, _DOWN_MEM_FENCE);
-  return (oldval == old);
-}
-
-#define AO_HAVE_short_compare_and_swap_acquire
-
-AO_INLINE int
-AO_short_compare_and_swap_release(volatile unsigned short *addr,
-                                unsigned short old, unsigned short new_val) 
-{
-  unsigned short oldval;
-  _Asm_mov_to_ar(_AREG_CCV, old, _UP_MEM_FENCE);
-  oldval = _Asm_cmpxchg(_SZ_B, _SEM_REL, addr,
-                       new_val, _LDHINT_NONE, _UP_MEM_FENCE);
-  /* Hopefully the compiler knows not to reorder the above two? */
-  return (oldval == old);
-}
-
-#define AO_HAVE_short_compare_and_swap_release
-
-#ifndef __LP64__
-# include "../ao_t_is_int.h"
-#endif
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ibmc/powerpc.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ibmc/powerpc.h
deleted file mode 100644 (file)
index 4a1badb..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/* FIXME.  This is only a placeholder for the AIX compiler.            */
-/* It doesn't work.  Please send a patch.                              */
-/* Memory model documented at http://www-106.ibm.com/developerworks/   */
-/* eserver/articles/archguide.html and (clearer)                       */
-/* http://www-106.ibm.com/developerworks/eserver/articles/powerpc.html. */
-/* There appears to be no implicit ordering between any kind of                */
-/* independent memory references.                                      */
-/* Architecture enforces some ordering based on control dependence.    */
-/* I don't know if that could help.                                    */
-/* Data-dependent loads are always ordered.                            */
-/* Based on the above references, eieio is intended for use on         */
-/* uncached memory, which we don't support.  It does not order loads   */
-/* from cached memory.                                                 */
-/* Thanks to Maged Michael, Doug Lea, and Roger Hoover for helping to  */
-/* track some of this down and correcting my misunderstandings. -HB    */
-
-#include "../all_aligned_atomic_load_store.h"
-
-void AO_sync(void);
-#pragma mc_func AO_sync { "7c0004ac" }
-
-void AO_lwsync(void);
-#pragma mc_func AO_lwsync { "7c2004ac" }
-
-#define AO_nop_write() AO_lwsync()
-#define AO_HAVE_nop_write
-
-#define AO_nop_read() AO_lwsync()
-#define AO_HAVE_nop_read
-
-/* We explicitly specify load_acquire and store_release, since these   */
-/* rely on the fact that lwsync is also a LoadStore barrier.           */
-AO_INLINE AO_t
-AO_load_acquire(const volatile AO_t *addr)
-{
-  AO_t result = *addr;
-  AO_lwsync();
-  return result;
-}
-
-#define AO_HAVE_load_acquire
-
-AO_INLINE void
-AO_store_release(volatile AO_t *addr, AO_t value)
-{
-  AO_lwsync();
-  *addr = value;
-}
-
-#define AO_HAVE_load_acquire
-
-/* This is similar to the code in the garbage collector.  Deleting     */
-/* this and having it synthesized from compare_and_swap would probably */
-/* only cost us a load immediate instruction.                          */
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set(volatile AO_TS_t *addr) {
-# error Implement me
-}
-
-#define AO_have_test_and_set
-
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_acquire(volatile AO_TS_t *addr) {
-  AO_TS_VAL_t result = AO_test_and_set(addr);
-  AO_lwsync();
-  return result;
-}
-
-#define AO_HAVE_test_and_set_acquire
-
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_release(volatile AO_TS_t *addr) {
-  AO_lwsync();
-  return AO_test_and_set(addr);
-}
-
-#define AO_HAVE_test_and_set_release
-
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_full(volatile AO_TS_t *addr) {
-  AO_TS_VAL_t result;
-  AO_lwsync();
-  result = AO_test_and_set(addr);
-  AO_lwsync();
-  return result;
-}
-
-#define AO_HAVE_test_and_set_full
-
-AO_INLINE AO_t
-AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val) {
-# error Implement me
-}
-
-#define AO_HAVE_compare_and_swap
-
-AO_INLINE AO_t
-AO_compare_and_swap_acquire(volatile AO_t *addr, AO_t old, AO_t new_val) {
-  AO_t result = AO_compare_and_swap(addr, old, new_val);
-  AO_lwsync();
-  return result;
-}
-
-#define AO_HAVE_compare_and_swap_acquire
-
-AO_INLINE AO_t
-AO_compare_and_swap_release(volatile AO_t *addr, AO_t old, AO_t new_val) {
-  AO_lwsync();
-  return AO_compare_and_swap(addr, old, new_val);
-}
-
-#define AO_HAVE_compare_and_swap_release
-
-AO_INLINE AO_t
-AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) {
-  AO_t result;
-  AO_lwsync();
-  result = AO_compare_and_swap(addr, old, new_val);
-  AO_lwsync();
-  return result;
-}
-
-#define AO_HAVE_compare_and_swap_full
-
-/* FIXME: We should also implement fetch_and_add and or primitives     */
-/* directly.                                                           */
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/icc/ia64.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/icc/ia64.h
deleted file mode 100644 (file)
index 0278f8b..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-/*
- * This file specifies Itanimum primitives for use with the Intel (ecc)
- * compiler.  We use intrinsics instead of the inline assembly code in the
- * gcc file.
- */
-
-#include "../all_atomic_load_store.h"
-
-#include "../test_and_set_t_is_char.h"
-
-#include <ia64intrin.h>
-
-/* The acquire release semantics of volatile can be turned off.  And volatile  */
-/* operations in icc9 don't imply ordering with respect to other nonvolatile   */
-/* operations.                                                                 */
-
-#define AO_INTEL_PTR_t void *
-
-AO_INLINE AO_t
-AO_load_acquire(const volatile AO_t *p)
-{
-  return (AO_t)(__ld8_acq((AO_INTEL_PTR_t)p));
-}
-#define AO_HAVE_load_acquire
-
-AO_INLINE void
-AO_store_release(volatile AO_t *p, AO_t val)
-{
-  __st8_rel((AO_INTEL_PTR_t)p, (__int64)val);
-}
-#define AO_HAVE_store_release
-
-AO_INLINE unsigned char
-AO_char_load_acquire(const volatile unsigned char *p)
-{
-  /* A normal volatile load generates an ld.acq                */
-  return (__ld1_acq((AO_INTEL_PTR_t)p));
-}
-#define AO_HAVE_char_load_acquire
-
-AO_INLINE void
-AO_char_store_release(volatile unsigned char *p, unsigned char val)
-{
-  __st1_rel((AO_INTEL_PTR_t)p, val);
-}
-#define AO_HAVE_char_store_release
-
-AO_INLINE unsigned short
-AO_short_load_acquire(const volatile unsigned short *p)
-{
-  /* A normal volatile load generates an ld.acq                */
-  return (__ld2_acq((AO_INTEL_PTR_t)p));
-}
-#define AO_HAVE_short_load_acquire
-
-AO_INLINE void
-AO_short_store_release(volatile unsigned short *p, unsigned short val)
-{
-  __st2_rel((AO_INTEL_PTR_t)p, val);
-}
-#define AO_HAVE_short_store_release
-
-AO_INLINE unsigned int
-AO_int_load_acquire(const volatile unsigned int *p)
-{
-  /* A normal volatile load generates an ld.acq                */
-  return (__ld4_acq((AO_INTEL_PTR_t)p));
-}
-#define AO_HAVE_int_load_acquire
-
-AO_INLINE void
-AO_int_store_release(volatile unsigned int *p, unsigned int val)
-{
-  __st4_rel((AO_INTEL_PTR_t)p, val);
-}
-#define AO_HAVE_int_store_release
-
-AO_INLINE void
-AO_nop_full(void)
-{
-  __mf();
-}
-#define AO_HAVE_nop_full
-
-AO_INLINE AO_t
-AO_fetch_and_add1_acquire (volatile AO_t *p)
-{
-  return __fetchadd8_acq((unsigned __int64 *)p, 1);
-}
-#define AO_HAVE_fetch_and_add1_acquire
-
-AO_INLINE AO_t
-AO_fetch_and_add1_release (volatile AO_t *p)
-{
-  return __fetchadd8_rel((unsigned __int64 *)p, 1);
-}
-
-#define AO_HAVE_fetch_and_add1_release
-
-AO_INLINE AO_t
-AO_fetch_and_sub1_acquire (volatile AO_t *p)
-{
-  return __fetchadd8_acq((unsigned __int64 *)p, -1);
-}
-
-#define AO_HAVE_fetch_and_sub1_acquire
-
-AO_INLINE AO_t
-AO_fetch_and_sub1_release (volatile AO_t *p)
-{
-  return __fetchadd8_rel((unsigned __int64 *)p, -1);
-}
-
-#define AO_HAVE_fetch_and_sub1_release
-
-AO_INLINE int
-AO_compare_and_swap_acquire(volatile AO_t *addr,
-                            AO_t old, AO_t new_val) 
-{
-  AO_t oldval;
-  oldval = _InterlockedCompareExchange64_acq(addr, new_val, old);
-  return (oldval == old);
-}
-
-#define AO_HAVE_compare_and_swap_acquire
-
-AO_INLINE int
-AO_compare_and_swap_release(volatile AO_t *addr,
-                            AO_t old, AO_t new_val) 
-{
-  AO_t oldval;
-  oldval = _InterlockedCompareExchange64_rel(addr, new_val, old);
-  return (oldval == old);
-}
-
-#define AO_HAVE_compare_and_swap_release
-
-AO_INLINE int
-AO_char_compare_and_swap_acquire(volatile unsigned char *addr,
-                                unsigned char old, unsigned char new_val) 
-{
-  unsigned char oldval;
-  oldval = _InterlockedCompareExchange8_acq(addr, new_val, old);
-  return (oldval == old);
-}
-
-#define AO_HAVE_char_compare_and_swap_acquire
-
-AO_INLINE int
-AO_char_compare_and_swap_release(volatile unsigned char *addr,
-                           unsigned char old, unsigned char new_val) 
-{
-  unsigned char oldval;
-  oldval = _InterlockedCompareExchange8_rel(addr, new_val, old);
-  return (oldval == old);
-}
-
-#define AO_HAVE_char_compare_and_swap_release
-
-AO_INLINE int
-AO_short_compare_and_swap_acquire(volatile unsigned short *addr,
-                                unsigned short old, unsigned short new_val) 
-{
-  unsigned short oldval;
-  oldval = _InterlockedCompareExchange16_acq(addr, new_val, old);
-  return (oldval == old);
-}
-
-#define AO_HAVE_short_compare_and_swap_acquire
-
-AO_INLINE int
-AO_short_compare_and_swap_release(volatile unsigned short *addr,
-                           unsigned short old, unsigned short new_val) 
-{
-  unsigned short oldval;
-  oldval = _InterlockedCompareExchange16_rel(addr, new_val, old);
-  return (oldval == old);
-}
-
-#define AO_HAVE_short_compare_and_swap_release
-
-AO_INLINE int
-AO_int_compare_and_swap_acquire(volatile unsigned int *addr,
-                                unsigned int old, unsigned int new_val) 
-{
-  unsigned int oldval;
-  oldval = _InterlockedCompareExchange_acq(addr, new_val, old);
-  return (oldval == old);
-}
-
-#define AO_HAVE_int_compare_and_swap_acquire
-
-AO_INLINE int
-AO_int_compare_and_swap_release(volatile unsigned int *addr,
-                           unsigned int old, unsigned int new_val) 
-{
-  unsigned int oldval;
-  oldval = _InterlockedCompareExchange_rel(addr, new_val, old);
-  return (oldval == old);
-}
-
-#define AO_HAVE_int_compare_and_swap_release
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/int_acquire_release_volatile.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/int_acquire_release_volatile.h
deleted file mode 100644 (file)
index 44d0453..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2003-2004 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-/*
- * This file adds definitions appropriate for environments in which an unsigned
- * int volatile load has acquire semantics, and an unsigned short volatile
- * store has release semantics.  This is true with the standard Itanium ABI.
- */
-#if !defined(AO_GCC_BARRIER)
-#  if defined(__GNUC__)
-#    define AO_GCC_BARRIER() AO_compiler_barrier()
-#  else
-#    define AO_GCC_BARRIER()
-#  endif
-#endif
-
-AO_INLINE unsigned int
-AO_int_load_acquire(const volatile unsigned int *p)
-{
-  unsigned int result = *p;
-  /* A normal volatile load generates an ld.acq                */
-  AO_GCC_BARRIER();
-  return result;
-}
-#define AO_HAVE_int_load_acquire
-
-AO_INLINE void
-AO_int_store_release(volatile unsigned int *p, unsigned int val)
-{
-  AO_GCC_BARRIER();
-  /* A normal volatile store generates an st.rel       */
-  *p = val;
-}
-#define AO_HAVE_int_store_release
-
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/int_aligned_atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/int_aligned_atomic_load_store.h
deleted file mode 100644 (file)
index e49ecd3..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */ 
-
-/*
- * Definitions for architectures on which loads and stores of unsigned int are
- * atomic for all legal alignments.
- */
-
-AO_INLINE unsigned int
-AO_int_load(const volatile unsigned int *addr)
-{
-  assert(((size_t)addr & (sizeof(unsigned int) - 1)) == 0);
-  /* Cast away the volatile for architectures like IA64 where  */
-  /* volatile adds barrier semantics.                          */
-  return (*(unsigned int *)addr);
-}
-
-#define AO_HAVE_int_load
-
-AO_INLINE void
-AO_int_store(volatile unsigned int *addr, unsigned int new_val)
-{
-  assert(((size_t)addr & (sizeof(unsigned int) - 1)) == 0);
-  (*(unsigned int *)addr) = new_val;
-}
-
-#define AO_HAVE_int_store
-
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/int_atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/int_atomic_load_store.h
deleted file mode 100644 (file)
index 570a850..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */ 
-
-/*
- * Definitions for architectures on which loads and stores of unsigned int are
- * atomic for all legal alignments.
- */
-
-AO_INLINE unsigned int
-AO_int_load(const volatile unsigned int *addr)
-{
-  /* Cast away the volatile for architectures like IA64 where  */
-  /* volatile adds barrier semantics.                          */
-  return (*(const unsigned int *)addr);
-}
-
-#define AO_HAVE_int_load
-
-AO_INLINE void
-AO_int_store(volatile unsigned int *addr, unsigned int new_val)
-{
-  (*(unsigned int *)addr) = new_val;
-}
-
-#define AO_HAVE_int_store
-
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/msftc/x86.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/msftc/x86.h
deleted file mode 100644 (file)
index 81c67a1..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-/* The following really assume we have a 486 or better.                */
-/* If ASSUME_WINDOWS98 is defined, we assume Windows 98 or newer.      */
-/* If ASSUME_VISTA is defined, we assume Windows Server 2003, Vista    */
-/* or later.                                                           */
-
-#include "../all_aligned_atomic_load_store.h"
-
-/* Real X86 implementations, except for some old WinChips, appear      */
-/* to enforce ordering between memory operations, EXCEPT that a later  */
-/* read can pass earlier writes, presumably due to the visible         */
-/* presence of store buffers.                                          */
-/* We ignore both the WinChips, and the fact that the official specs   */
-/* seem to be much weaker (and arguably too weak to be usable).                */
-
-#include "../ordered_except_wr.h"
-
-#include "../test_and_set_t_is_char.h"
-
-#include <windows.h>
-       /* Seems like over-kill, but that's what MSDN recommends.       */
-       /* And apparently winbase.h is not always self-contained.       */
-
-#if _MSC_VER < 1310
-
-#define _InterlockedIncrement       InterlockedIncrement
-#define _InterlockedDecrement       InterlockedDecrement
-#define _InterlockedExchange        InterlockedExchange 
-#define _InterlockedExchangeAdd     InterlockedExchangeAdd
-#define _InterlockedCompareExchange InterlockedCompareExchange
-
-#else
-
-#if _MSC_VER >= 1400
-#include <intrin.h>
-
-#pragma intrinsic (_ReadWriteBarrier)
-
-#else
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-LONG __cdecl _InterlockedIncrement(LONG volatile *Addend);
-LONG __cdecl _InterlockedDecrement(LONG volatile *Addend);
-LONG __cdecl _InterlockedExchangeAdd(LONG volatile* Target, LONG Addend);
-LONG __cdecl _InterlockedExchange(LONG volatile* Target, LONG Value);
-LONG __cdecl _InterlockedCompareExchange(LONG volatile* Dest,
-                                         LONG Exchange, LONG Comp);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _MSC_VER >= 1400 */
-
-#pragma intrinsic (_InterlockedIncrement)
-#pragma intrinsic (_InterlockedDecrement)
-#pragma intrinsic (_InterlockedExchange)
-#pragma intrinsic (_InterlockedExchangeAdd)
-#pragma intrinsic (_InterlockedCompareExchange)
-
-#endif /* _MSC_VER < 1310 */
-
-/* As far as we can tell, the lfence and sfence instructions are not   */
-/* currently needed or useful for cached memory accesses.              */
-
-/* Unfortunately mfence doesn't exist everywhere.              */
-/* IsProcessorFeaturePresent(PF_COMPARE_EXCHANGE128) is                */
-/* probably a conservative test for it?                                */
-
-#if defined(AO_USE_PENTIUM4_INSTRS)
-
-AO_INLINE void
-AO_nop_full()
-{
-  __asm { mfence }
-}
-
-#define AO_HAVE_nop_full
-
-#else
-
-/* We could use the cpuid instruction.  But that seems to be slower    */
-/* than the default implementation based on test_and_set_full.  Thus   */
-/* we omit that bit of misinformation here.                            */
-
-#endif
-
-AO_INLINE AO_t
-AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
-{
-  return _InterlockedExchangeAdd((LONG volatile*)p, (LONG)incr);
-}
-
-#define AO_HAVE_fetch_and_add_full
-
-AO_INLINE AO_t
-AO_fetch_and_add1_full (volatile AO_t *p)
-{
-  return _InterlockedIncrement((LONG volatile *)p) - 1;
-}
-
-#define AO_HAVE_fetch_and_add1_full
-
-AO_INLINE AO_t
-AO_fetch_and_sub1_full (volatile AO_t *p)
-{
-  return _InterlockedDecrement((LONG volatile *)p) + 1;
-}
-
-#define AO_HAVE_fetch_and_sub1_full
-
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_full(volatile AO_TS_t *addr)
-{
-    __asm
-    {
-       mov     eax,AO_TS_SET           ;
-       mov     ebx,addr                ;
-       xchg    byte ptr [ebx],al       ;
-    }
-}
-
-#define AO_HAVE_test_and_set_full
-
-#ifdef AO_ASSUME_WINDOWS98
-/* Returns nonzero if the comparison succeeded. */
-AO_INLINE int
-AO_compare_and_swap_full(volatile AO_t *addr,
-                        AO_t old, AO_t new_val) 
-{
-    return _InterlockedCompareExchange((LONG volatile *)addr,
-                                       (LONG)new_val, (LONG)old)
-          == (LONG)old;
-}
-
-#define AO_HAVE_compare_and_swap_full
-#endif /* ASSUME_WINDOWS98 */
-
-#ifdef _WIN64
-#  error wrong architecture
-#endif
-
-#ifdef ASSUME_VISTA
-/* NEC LE-IT: whenever we run on a pentium class machine we have that
- * certain function */
-
-#include "../standard_ao_double_t.h"
-#pragma intrinsic (_InterlockedCompareExchange64)
-/* Returns nonzero if the comparison succeeded. */
-AO_INLINE int
-AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
-                                      AO_t old_val1, AO_t old_val2,
-                                              AO_t new_val1, AO_t new_val2) 
-{
-    __int64 oldv = (__int64)old_val2 | ((__int64)old_val1 << 32);
-    __int64 newv = (__int64)new_val2 | ((__int64)new_val1 << 32);
-    return _InterlockedCompareExchange64((__int64 volatile *)addr,
-                                       newv, oldv) == oldv;
-}
-#define AO_HAVE_compare_double_and_swap_double_full
-
-#ifdef __cplusplus
-AO_INLINE int
-AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
-                                      AO_double_t old_val,
-                                      AO_double_t new_val) 
-{
-    return _InterlockedCompareExchange64((__int64 volatile *)addr,
-               new_val.AO_whole, old_val.AO_whole) == old_val.AO_whole;
-}
-#define AO_HAVE_double_compare_and_swap_full
-#endif // __cplusplus
-#endif /* ASSUME_VISTA */
-
-#include "../ao_t_is_int.h"
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/msftc/x86_64.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/msftc/x86_64.h
deleted file mode 100644 (file)
index ca1a682..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-/* The following really assume we have a 486 or better. */
-/* If ASSUME_WINDOWS98 is defined, we assume Windows 98 or newer.      */
-
-#include "../all_aligned_atomic_load_store.h"
-
-/* Real X86 implementations, except for some old WinChips, appear      */
-/* to enforce ordering between memory operations, EXCEPT that a later  */
-/* read can pass earlier writes, presumably due to the visible         */
-/* presence of store buffers.                                          */
-/* We ignore both the WinChips, and the fact that the official specs   */
-/* seem to be much weaker (and arguably too weak to be usable).                */
-
-#include "../ordered_except_wr.h"
-
-#if 0
-FIXME: Need to reimplement testandset
-
-#include "../test_and_set_t_is_char.h"
-
-#else
-
-#include "../test_and_set_t_is_ao_t.h"
-
-#endif
-
-#include <windows.h>
-       /* Seems like over-kill, but that's what MSDN recommends.       */
-       /* And apparently winbase.h is not always self-contained.       */
-
-
-#include <intrin.h>
-
-#pragma intrinsic (_ReadWriteBarrier)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-LONGLONG __cdecl _InterlockedIncrement64(LONGLONG volatile *Addend);
-LONGLONG __cdecl _InterlockedDecrement64(LONGLONG volatile *Addend);
-LONGLONG __cdecl _InterlockedExchangeAdd64(LONGLONG volatile* Target,
-                                          LONGLONG Addend);
-LONGLONG __cdecl _InterlockedExchange64(LONGLONG volatile* Target,
-                                       LONGLONG Value);
-LONGLONG __cdecl _InterlockedCompareExchange64(LONGLONG volatile* Dest,
-                                               LONGLONG Exchange,
-                                              LONGLONG Comp);
-
-#ifdef __cplusplus
-}
-#endif
-
-#pragma intrinsic (_InterlockedIncrement64)
-#pragma intrinsic (_InterlockedDecrement64)
-#pragma intrinsic (_InterlockedExchange64)
-#pragma intrinsic (_InterlockedExchangeAdd64)
-#pragma intrinsic (_InterlockedCompareExchange64)
-
-/* As far as we can tell, the lfence and sfence instructions are not   */
-/* currently needed or useful for cached memory accesses.              */
-
-/* Unfortunately mfence doesn't exist everywhere.              */
-/* IsProcessorFeaturePresent(PF_COMPARE_EXCHANGE128) is                */
-/* probably a conservative test for it?                                */
-
-#if defined(AO_USE_PENTIUM4_INSTRS)
-
-AO_INLINE void
-AO_nop_full()
-{
-  __asm { mfence }
-}
-
-#define AO_HAVE_nop_full
-
-#else
-
-/* We could use the cpuid instruction.  But that seems to be slower    */
-/* than the default implementation based on test_and_set_full.  Thus   */
-/* we omit that bit of misinformation here.                            */
-
-#endif
-
-AO_INLINE AO_t
-AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
-{
-  return _InterlockedExchangeAdd64((LONGLONG volatile *)p, (LONGLONG)incr);
-}
-
-#define AO_HAVE_fetch_and_add_full
-
-AO_INLINE AO_t
-AO_fetch_and_add1_full (volatile AO_t *p)
-{
-  return _InterlockedIncrement64((LONGLONG volatile *)p) - 1;
-}
-
-#define AO_HAVE_fetch_and_add1_full
-
-AO_INLINE AO_t
-AO_fetch_and_sub1_full (volatile AO_t *p)
-{
-  return _InterlockedDecrement64((LONGLONG volatile *)p) + 1;
-}
-
-#define AO_HAVE_fetch_and_sub1_full
-
-AO_INLINE int
-AO_compare_and_swap_full(volatile AO_t *addr,
-                        AO_t old, AO_t new_val) 
-{
-    return _InterlockedCompareExchange64((LONGLONG volatile *)addr,
-                                         (LONGLONG)new_val, (LONGLONG)old)
-          == (LONGLONG)old;
-}
-
-#define AO_HAVE_compare_and_swap_full
-
-#if 0
-FIXME: (__asm not supported)
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_full(volatile AO_TS_t *addr)
-{
-    __asm
-    {
-       mov     eax,AO_TS_SET           ;
-       mov     ebx,addr                ;
-       xchg    byte ptr [ebx],al       ;
-    }
-}
-
-#define AO_HAVE_test_and_set_full
-
-FIXME: (__asm not supported)
-NEC LE-IT: Don't have a working Win64 environment here at the moment.
-AO_compare_double_and_swap_double_full needs implementation for Win64
-But there is no _InterlockedCompareExchange128 in the WinAPI, so we
-need basically whats given below.
-Also see gcc/x86_64.h for partial old opteron workaround:
-
-#ifndef AO_CASDOUBLE_MISSING
-
-AO_INLINE int
-AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
-                                      AO_t old_val1, AO_t old_val2,
-                                      AO_t new_val1, AO_t new_val2)
-{
-       char result;
-       __asm
-       {
-               mov     rdx,QWORD PTR [old_val]
-               mov     rax,QWORD PTR [old_val + 8]
-               mov     rcx,QWORD PTR [new_val]
-               mov     rbx,QWORD PTR [new_val + 8]
-               lock cmpxchg16b [addr]
-               setz result;
-       }
-       return result;
-}
-#endif // AO_CASDOUBLE_MISSING
-#define AO_HAVE_compare_double_and_swap_double_full
-
-#endif /* 0 */
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ordered.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ordered.h
deleted file mode 100644 (file)
index cdd2d8e..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */ 
-
-/*
- * These are common definitions for architectures that provide processor
- * ordered memory operations.
- */
-
-#include "ordered_except_wr.h"
-
-AO_INLINE void
-AO_nop_full(void)
-{
-  AO_compiler_barrier();
-}
-
-#define AO_HAVE_nop_full
-
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ordered_except_wr.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ordered_except_wr.h
deleted file mode 100644 (file)
index 3e700b1..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */ 
-
-/*
- * These are common definitions for architectures that provide processor
- * ordered memory operations except that a later read may pass an
- * earlier write.  Real x86 implementations seem to be in this category,
- * except apparently for some IDT WinChips, which we ignore.
- */
-
-#include "read_ordered.h"
-
-AO_INLINE void
-AO_nop_write(void)
-{
-  AO_compiler_barrier();
-  /* sfence according to Intel docs.  Pentium 3 and up.        */
-  /* Unnecessary for cached accesses?                  */
-}
-
-#define AO_HAVE_NOP_WRITE
-
-#if defined(AO_HAVE_store)
-
-AO_INLINE void
-AO_store_write(volatile AO_t *addr, AO_t val)
-{
-  AO_compiler_barrier();
-  AO_store(addr, val);
-}
-# define AO_HAVE_store_write
-
-# define AO_store_release(addr, val) AO_store_write(addr, val)
-# define AO_HAVE_store_release
-
-#endif /* AO_HAVE_store */
-
-#if defined(AO_HAVE_char_store)
-
-AO_INLINE void
-AO_char_store_write(volatile unsigned char *addr, unsigned char val)
-{
-  AO_compiler_barrier();
-  AO_char_store(addr, val);
-}
-# define AO_HAVE_char_store_write
-
-# define AO_char_store_release(addr, val) AO_char_store_write(addr, val)
-# define AO_HAVE_char_store_release
-
-#endif /* AO_HAVE_char_store */
-
-#if defined(AO_HAVE_short_store)
-
-AO_INLINE void
-AO_short_store_write(volatile unsigned short *addr, unsigned short val)
-{
-  AO_compiler_barrier();
-  AO_short_store(addr, val);
-}
-# define AO_HAVE_short_store_write
-
-# define AO_short_store_release(addr, val) AO_short_store_write(addr, val)
-# define AO_HAVE_short_store_release
-
-#endif /* AO_HAVE_short_store */
-
-#if defined(AO_HAVE_int_store)
-
-AO_INLINE void
-AO_int_store_write(volatile unsigned int *addr, unsigned int val)
-{
-  AO_compiler_barrier();
-  AO_int_store(addr, val);
-}
-# define AO_HAVE_int_store_write
-
-# define AO_int_store_release(addr, val) AO_int_store_write(addr, val)
-# define AO_HAVE_int_store_release
-
-#endif /* AO_HAVE_int_store */
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/read_ordered.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/read_ordered.h
deleted file mode 100644 (file)
index 922f5ea..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */ 
-
-/*
- * These are common definitions for architectures that provide processor
- * ordered memory operations except that a later read may pass an
- * earlier write.  Real x86 implementations seem to be in this category,
- * except apparently for some IDT WinChips, which we ignore.
- */
-
-AO_INLINE void
-AO_nop_read(void)
-{
-  AO_compiler_barrier();
-}
-
-#define AO_HAVE_NOP_READ
-
-#ifdef AO_HAVE_load
-
-AO_INLINE AO_t
-AO_load_read(const volatile AO_t *addr)
-{
-  AO_t result = AO_load(addr);
-  AO_compiler_barrier();
-  return result;
-}
-#define AO_HAVE_load_read
-
-#define AO_load_acquire(addr) AO_load_read(addr)
-#define AO_HAVE_load_acquire
-
-#endif /* AO_HAVE_load */
-
-#ifdef AO_HAVE_char_load
-
-AO_INLINE AO_t
-AO_char_load_read(const volatile unsigned char *addr)
-{
-  AO_t result = AO_char_load(addr);
-  AO_compiler_barrier();
-  return result;
-}
-#define AO_HAVE_char_load_read
-
-#define AO_char_load_acquire(addr) AO_char_load_read(addr)
-#define AO_HAVE_char_load_acquire
-
-#endif /* AO_HAVE_char_load */
-
-#ifdef AO_HAVE_short_load
-
-AO_INLINE AO_t
-AO_short_load_read(const volatile unsigned short *addr)
-{
-  AO_t result = AO_short_load(addr);
-  AO_compiler_barrier();
-  return result;
-}
-#define AO_HAVE_short_load_read
-
-#define AO_short_load_acquire(addr) AO_short_load_read(addr)
-#define AO_HAVE_short_load_acquire
-
-#endif /* AO_HAVE_short_load */
-
-#ifdef AO_HAVE_int_load
-
-AO_INLINE AO_t
-AO_int_load_read(const volatile unsigned int *addr)
-{
-  AO_t result = AO_int_load(addr);
-  AO_compiler_barrier();
-  return result;
-}
-#define AO_HAVE_int_load_read
-
-#define AO_int_load_acquire(addr) AO_int_load_read(addr)
-#define AO_HAVE_int_load_acquire
-
-#endif /* AO_HAVE_int_load */
-
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/short_acquire_release_volatile.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/short_acquire_release_volatile.h
deleted file mode 100644 (file)
index 56db599..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2003-2004 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-/*
- * This file adds definitions appropriate for environments in which an unsigned short
- * volatile load has acquire semantics, and an unsigned short volatile store has release
- * semantics.  This is true with the standard Itanium ABI.
- */
-#if !defined(AO_GCC_BARRIER)
-#  if defined(__GNUC__)
-#    define AO_GCC_BARRIER() AO_compiler_barrier()
-#  else
-#    define AO_GCC_BARRIER()
-#  endif
-#endif
-
-AO_INLINE unsigned short
-AO_short_load_acquire(const volatile unsigned short *p)
-{
-  unsigned short result = *p;
-  /* A normal volatile load generates an ld.acq                */
-  AO_GCC_BARRIER();
-  return result;
-}
-#define AO_HAVE_short_load_acquire
-
-AO_INLINE void
-AO_short_store_release(volatile unsigned short *p, unsigned short val)
-{
-  AO_GCC_BARRIER();
-  /* A normal volatile store generates an st.rel       */
-  *p = val;
-}
-#define AO_HAVE_short_store_release
-
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/short_aligned_atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/short_aligned_atomic_load_store.h
deleted file mode 100644 (file)
index 675766b..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */ 
-
-/*
- * Definitions for architectures on which loads and stores of unsigned short
- * are atomic for all legal alignments.
- */
-
-AO_INLINE unsigned short
-AO_short_load(const volatile unsigned short *addr)
-{
-  assert(((size_t)addr & (sizeof(unsigned short) - 1)) == 0);
-  /* Cast away the volatile for architectures like IA64 where  */
-  /* volatile adds barrier semantics.                          */
-  return (*(unsigned short *)addr);
-}
-
-#define AO_HAVE_short_load
-
-AO_INLINE void
-AO_short_store(volatile unsigned short *addr, unsigned short new_val)
-{
-  assert(((size_t)addr & (sizeof(unsigned short) - 1)) == 0);
-  (*(unsigned short *)addr) = new_val;
-}
-
-#define AO_HAVE_short_store
-
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/short_atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/short_atomic_load_store.h
deleted file mode 100644 (file)
index 9ec9cf4..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */ 
-
-/*
- * Definitions for architectures on which loads and stores of unsigned short
- * are atomic for all legal alignments.
- */
-
-AO_INLINE unsigned short
-AO_short_load(const volatile unsigned short *addr)
-{
-  /* Cast away the volatile for architectures like IA64 where  */
-  /* volatile adds barrier semantics.                          */
-  return (*(const unsigned short *)addr);
-}
-
-#define AO_HAVE_short_load
-
-AO_INLINE void
-AO_short_store(volatile unsigned short *addr, unsigned short new_val)
-{
-  (*(unsigned short *)addr) = new_val;
-}
-
-#define AO_HAVE_short_store
-
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/standard_ao_double_t.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/standard_ao_double_t.h
deleted file mode 100644 (file)
index 22e8160..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* NEC LE-IT: For 64Bit OS we extend the double type to hold two int64's
-*      
-*  x86-64: __m128 serves as placeholder which also requires the compiler
-*         to align     it on 16 byte boundary (as required by cmpxchg16.
-* Similar things could be done for PowerPC 64bit using a VMX data type...      */
-
-#if defined(__GNUC__)
-# if defined(__x86_64__)
-# include<xmmintrin.h>
-   typedef __m128 double_ptr_storage;
-#  define AO_HAVE_DOUBLE_PTR_STORAGE
-# endif /* __x86_64__ */
-#endif
-
-#ifdef _MSC_VER
-# ifdef _WIN64
-   typedef __m128 double_ptr_storage;
-#  define AO_HAVE_DOUBLE_PTR_STORAGE
-# elif _WIN32
-   typedef unsigned __int64 double_ptr_storage;
-#  define AO_HAVE_DOUBLE_PTR_STORAGE
-# endif
-#endif
-
-#ifndef AO_HAVE_DOUBLE_PTR_STORAGE
-   typedef unsigned long long double_ptr_storage;
-#endif
-
-typedef union {
-    double_ptr_storage AO_whole;
-    struct {AO_t AO_v1; AO_t AO_v2;} AO_parts;
-} AO_double_t;
-
-#define AO_HAVE_double_t
-#define AO_val1 AO_parts.AO_v1
-#define AO_val2 AO_parts.AO_v2
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc/sparc.S b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc/sparc.S
deleted file mode 100644 (file)
index 81f0ef0..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-       .seg    "text"
-       .globl  AO_test_and_set_full
-AO_test_and_set_full:
-       retl
-         ldstub        [%o0],%o0
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc/sparc.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc/sparc.h
deleted file mode 100644 (file)
index 3578722..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-#include "../all_atomic_load_store.h"
-
-/* Real SPARC code uses TSO:                            */
-#include "../ordered_except_wr.h"
-
-/* Test_and_set location is just a byte.               */
-#include "../test_and_set_t_is_char.h"
-
-extern AO_TS_VAL_t
-AO_test_and_set_full(volatile AO_TS_t *addr);
-/* Implemented in separate .S file, for now.   */
-
-#define AO_HAVE_test_and_set_full
-
-/* FIXME: Like the gcc version, this needs to be extended for V8       */
-/* and V9.                                                             */
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc/x86.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc/x86.h
deleted file mode 100644 (file)
index 8cf797a..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-/* 
- * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
- * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
- * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
- *
- *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
- *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- * Some of the machine specific code was borrowed from our GC distribution.
- */
-
-/* The following really assume we have a 486 or better.                        */
-
-#include "../all_aligned_atomic_load_store.h"
-
-/* Real X86 implementations, except for some old WinChips, appear      */
-/* to enforce ordering between memory operations, EXCEPT that a later  */
-/* read can pass earlier writes, presumably due to the visible         */
-/* presence of store buffers.                                          */
-/* We ignore both the WinChips, and the fact that the official specs   */
-/* seem to be much weaker (and arguably too weak to be usable).                */
-
-#include "../ordered_except_wr.h"
-
-#include "../test_and_set_t_is_char.h"
-
-#include "../standard_ao_double_t.h"
-
-#if defined(AO_USE_PENTIUM4_INSTRS)
-AO_INLINE void
-AO_nop_full(void)
-{
-  __asm__ __volatile__("mfence" : : : "memory");
-}
-
-#define AO_HAVE_nop_full
-
-#else
-
-/* We could use the cpuid instruction.  But that seems to be slower    */
-/* than the default implementation based on test_and_set_full.  Thus   */
-/* we omit that bit of misinformation here.                            */
-
-#endif
-
-/* As far as we can tell, the lfence and sfence instructions are not   */
-/* currently needed or useful for cached memory accesses.              */
-
-/* Really only works for 486 and later */
-AO_INLINE AO_t
-AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
-{
-  AO_t result;
-
-  __asm__ __volatile__ ("lock; xaddl %0, %1" :
-                       "=r" (result), "=m" (*p) : "0" (incr) /* , "m" (*p) */
-                       : "memory");
-  return result;
-}
-
-#define AO_HAVE_fetch_and_add_full
-
-AO_INLINE unsigned char
-AO_char_fetch_and_add_full (volatile unsigned char *p, unsigned char incr)
-{
-  unsigned char result;
-
-  __asm__ __volatile__ ("lock; xaddb %0, %1" :
-                       "=q" (result), "=m" (*p) : "0" (incr) /* , "m" (*p) */
-                       : "memory");
-  return result;
-}
-
-#define AO_HAVE_char_fetch_and_add_full
-
-AO_INLINE unsigned short
-AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr)
-{
-  unsigned short result;
-
-  __asm__ __volatile__ ("lock; xaddw %0, %1" :
-                       "=r" (result), "=m" (*p) : "0" (incr) /* , "m" (*p) */
-                       : "memory");
-  return result;
-}
-
-#define AO_HAVE_short_fetch_and_add_full
-
-/* Really only works for 486 and later */
-AO_INLINE void
-AO_or_full (volatile AO_t *p, AO_t incr)
-{
-  __asm__ __volatile__ ("lock; orl %1, %0" :
-                       "=m" (*p) : "r" (incr) /* , "m" (*p) */
-                       : "memory");
-}
-
-#define AO_HAVE_or_full
-
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_full(volatile AO_TS_t *addr)
-{
-  AO_TS_t oldval;
-  /* Note: the "xchg" instruction does not need a "lock" prefix */
-  /* Note 2: "xchgb" is not recognized by Sun CC assembler yet.        */
-  __asm__ __volatile__("xchgl %0, %1"
-               : "=q"(oldval), "=m"(*addr)
-               : "0"(0xff) /* , "m"(*addr) */
-               : "memory");
-  return (AO_TS_VAL_t)oldval;
-}
-
-#define AO_HAVE_test_and_set_full
-
-/* Returns nonzero if the comparison succeeded. */
-AO_INLINE int
-AO_compare_and_swap_full(volatile AO_t *addr,
-                            AO_t old, AO_t new_val) 
-{
-  char result;
-  __asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1"
-                      : "=m"(*addr), "=q"(result)
-                      : "r" (new_val), "a"(old) : "memory");
-  return (int) result;
-}
-
-#define AO_HAVE_compare_and_swap_full
-
-/* Returns nonzero if the comparison succeeded. */
-/* Really requires at least a Pentium.         */
-AO_INLINE int
-AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
-                                      AO_t old_val1, AO_t old_val2,
-                                      AO_t new_val1, AO_t new_val2) 
-{
-  char result;
-  /* FIXME: not tested */
-  #if __PIC__
-  /* If PIC is turned on, we can't use %ebx as it is reserved for the
-     GOT pointer.  We can save and restore %ebx because GCC won't be
-     using it for anything else (such as any of the m operands) */
-  __asm__ __volatile__("pushl %%ebx;"   /* save ebx used for PIC GOT ptr */
-                      "movl %6,%%ebx;" /* move new_val2 to %ebx */
-                      "lock; cmpxchg8b %0; setz %1;"
-                      "pop %%ebx;"     /* restore %ebx */
-                      : "=m"(*addr), "=q"(result)
-                      : "m"(*addr), "d" (old_val2), "a" (old_val1),
-                        "c" (new_val2), "m" (new_val1) : "memory");
-  #else
-  /* We can't just do the same thing in non-PIC mode, because GCC
-   * might be using %ebx as the memory operand.  We could have ifdef'd
-   * in a clobber, but there's no point doing the push/pop if we don't
-   * have to. */
-  __asm__ __volatile__("lock; cmpxchg8b %0; setz %1;"
-                      : "=m"(*addr), "=q"(result)
-                      : /* "m"(*addr), */ "d" (old_val2), "a" (old_val1),
-                        "c" (new_val2), "b" (new_val1) : "memory");
-  #endif
-  return (int) result;
-}
-
-#define AO_HAVE_compare_double_and_swap_double_full
-
-#include "../ao_t_is_int.h"
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc/x86_64.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc/x86_64.h
deleted file mode 100644 (file)
index 72dd185..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-/* 
- * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
- * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
- * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
- *
- *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
- *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- * Some of the machine specific code was borrowed from our GC distribution.
- */
-
-#include "../all_aligned_atomic_load_store.h"
-
-/* Real X86 implementations, appear                                    */
-/* to enforce ordering between memory operations, EXCEPT that a later  */
-/* read can pass earlier writes, presumably due to the visible         */
-/* presence of store buffers.                                          */
-/* We ignore the fact that the official specs                          */
-/* seem to be much weaker (and arguably too weak to be usable).                */
-
-#include "../ordered_except_wr.h"
-
-#include "../test_and_set_t_is_char.h"
-
-#include "../standard_ao_double_t.h"
-
-AO_INLINE void
-AO_nop_full(void)
-{
-  /* Note: "mfence" (SSE2) is supported on all x86_64/amd64 chips.     */
-  __asm__ __volatile__("mfence" : : : "memory");
-}
-
-#define AO_HAVE_nop_full
-
-/* As far as we can tell, the lfence and sfence instructions are not   */
-/* currently needed or useful for cached memory accesses.              */
-
-AO_INLINE AO_t
-AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
-{
-  AO_t result;
-
-  __asm__ __volatile__ ("lock; xaddq %0, %1" :
-                       "=r" (result), "=m" (*p) : "0" (incr) /* , "m" (*p) */
-                       : "memory");
-  return result;
-}
-
-#define AO_HAVE_fetch_and_add_full
-
-AO_INLINE unsigned char
-AO_char_fetch_and_add_full (volatile unsigned char *p, unsigned char incr)
-{
-  unsigned char result;
-
-  __asm__ __volatile__ ("lock; xaddb %0, %1" :
-                       "=q" (result), "=m" (*p) : "0" (incr) /* , "m" (*p) */
-                       : "memory");
-  return result;
-}
-
-#define AO_HAVE_char_fetch_and_add_full
-
-AO_INLINE unsigned short
-AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr)
-{
-  unsigned short result;
-
-  __asm__ __volatile__ ("lock; xaddw %0, %1" :
-                       "=r" (result), "=m" (*p) : "0" (incr) /* , "m" (*p) */
-                       : "memory");
-  return result;
-}
-
-#define AO_HAVE_short_fetch_and_add_full
-
-AO_INLINE unsigned int
-AO_int_fetch_and_add_full (volatile unsigned int *p, unsigned int incr)
-{
-  unsigned int result;
-
-  __asm__ __volatile__ ("lock; xaddl %0, %1" :
-                       "=r" (result), "=m" (*p) : "0" (incr) /* , "m" (*p) */
-                       : "memory");
-  return result;
-}
-
-#define AO_HAVE_int_fetch_and_add_full
-
-AO_INLINE void
-AO_or_full (volatile AO_t *p, AO_t incr)
-{
-  __asm__ __volatile__ ("lock; orq %1, %0" :
-                       "=m" (*p) : "r" (incr) /* , "m" (*p) */
-                       : "memory");
-}
-
-#define AO_HAVE_or_full
-
-AO_INLINE AO_TS_VAL_t
-AO_test_and_set_full(volatile AO_TS_t *addr)
-{
-  unsigned int oldval;
-  /* Note: the "xchg" instruction does not need a "lock" prefix */
-  /* Note 2: "xchgb" is not recognized by Sun CC assembler yet.        */
-  __asm__ __volatile__("xchgl %0, %1"
-               : "=q"(oldval), "=m"(*addr)
-               : "0"(0xff) /* , "m"(*addr) */
-               : "memory");
-  return (AO_TS_VAL_t)oldval;
-}
-
-#define AO_HAVE_test_and_set_full
-
-/* Returns nonzero if the comparison succeeded. */
-AO_INLINE int
-AO_compare_and_swap_full(volatile AO_t *addr,
-                        AO_t old, AO_t new_val) 
-{
-  char result;
-  __asm__ __volatile__("lock; cmpxchgq %2, %0; setz %1"
-                      : "=m"(*addr), "=q"(result)
-                      : "r" (new_val), "a"(old) : "memory");
-  return (int) result;
-}
-
-#define AO_HAVE_compare_and_swap_full
-
-#ifdef AO_CMPXCHG16B_AVAILABLE
-/* NEC LE-IT: older AMD Opterons are missing this instruction.
- * On these machines SIGILL will be thrown.
- * Define AO_WEAK_DOUBLE_CAS_EMULATION to have an emulated
- * (lock based) version available */ 
-/* HB: Changed this to not define either by default.  There are
- * enough machines and tool chains around on which cmpxchg16b
- * doesn't work.  And the emulation is unsafe by our usual rules.
- * Hoewever both are clearly useful in certain cases.
- */
-AO_INLINE int
-AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
-                                      AO_t old_val1, AO_t old_val2,
-                                      AO_t new_val1, AO_t new_val2)
-{
-  char result;
-  __asm__ __volatile__("lock; cmpxchg16b %0; setz %1"
-                               : "=m"(*addr), "=q"(result)
-                                       : "m"(*addr),
-                                         "d" (old_val2),
-                                         "a" (old_val1),
-                                         "c" (new_val2),
-                                         "b" (new_val1)  : "memory");
-  return (int) result;
-}
-#define AO_HAVE_compare_double_and_swap_double_full
-#else
-/* this one provides spinlock based emulation of CAS implemented in    */
-/* atomic_ops.c.  We probably do not want to do this here, since it is  */
-/* not atomic with respect to other kinds of updates of *addr.  On the  */
-/* other hand, this may be a useful facility on occasion.              */
-#ifdef AO_WEAK_DOUBLE_CAS_EMULATION
-int AO_compare_double_and_swap_double_emulation(volatile AO_double_t *addr,
-                                               AO_t old_val1, AO_t old_val2,
-                                               AO_t new_val1, AO_t new_val2);
-
-AO_INLINE int
-AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
-                                      AO_t old_val1, AO_t old_val2,
-                                      AO_t new_val1, AO_t new_val2)
-{
-       return AO_compare_double_and_swap_double_emulation(addr,
-                                                          old_val1, old_val2,
-                                                          new_val1, new_val2);
-}
-#define AO_HAVE_compare_double_and_swap_double_full
-#endif /* AO_WEAK_DOUBLE_CAS_EMULATION */
-#endif /* AO_CMPXCHG16B_AVAILABLE */
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/test_and_set_t_is_ao_t.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/test_and_set_t_is_ao_t.h
deleted file mode 100644 (file)
index 53c2c5c..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */ 
-
-/*
- * These are common definitions for architectures on which test_and_set
- * operates on pointer-sized quantities, the "clear" value contains
- * all zeroes, and the "set" value contains only one lowest bit set.
- * This can be used if test_and_set is synthesized from compare_and_swap.
- */
-typedef enum {AO_TS_clear = 0, AO_TS_set = 1} AO_TS_val; 
-#define AO_TS_VAL_t AO_TS_val
-#define AO_TS_CLEAR AO_TS_clear
-#define AO_TS_SET AO_TS_set
-
-#define AO_TS_t AO_t
-
-#define AO_AO_TS_T 1
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/test_and_set_t_is_char.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/test_and_set_t_is_char.h
deleted file mode 100644 (file)
index bde0f21..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */ 
-
-/*
- * These are common definitions for architectures on which test_and_set
- * operates on byte sized quantities, the "clear" value contains
- * all zeroes, and the "set" value contains all ones.
- */
-
-#define AO_TS_t unsigned char
-typedef enum {AO_BYTE_TS_clear = 0, AO_BYTE_TS_set = 0xff} AO_BYTE_TS_val;
-#define AO_TS_VAL_t AO_BYTE_TS_val
-#define AO_TS_CLEAR AO_BYTE_TS_clear
-#define AO_TS_SET AO_BYTE_TS_set
-
-#define AO_CHAR_TS_T 1
-
-
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_malloc.c b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_malloc.c
deleted file mode 100644 (file)
index dff4908..0000000
+++ /dev/null
@@ -1,288 +0,0 @@
-/*  
- * Copyright (c) 2005 Hewlett-Packard Development Company, L.P.
- * Original Author: Hans Boehm
- *
- * This file may be redistributed and/or modified under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2, or (at your option) any later version.
- * 
- * It is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE.  See the GNU General Public License in the
- * file doc/COPYING for more details.
- */
-
-#if defined(HAVE_CONFIG_H)
-# include "config.h"
-#endif
-
-#define AO_REQUIRE_CAS
-#include "atomic_ops_stack.h"
-#include <string.h>    /* for ffs, which is assumed reentrant. */
-#include <stdlib.h>
-#ifdef AO_TRACE_MALLOC
-# include <stdio.h>
-# include <pthread.h>
-#endif
-
-/*
- * We round up each allocation request to the next power of two
- * minus one word.
- * We keep one stack of free objects for each size.  Each object
- * has an initial word (offset -sizeof(AO_t) from the visible pointer)
- * which contains either
- *     The binary log of the object size in bytes (small objects)
- *     The object size (a multiple of CHUNK_SIZE) for large objects.
- * The second case only arises if mmap-based allocation is supported.
- * We align the user-visible part of each object on a GRANULARITY
- * byte boundary.  That means that the actual (hidden) start of
- * the object starts a word before this boundary.
- */
-
-#ifndef LOG_MAX_SIZE
-# define LOG_MAX_SIZE 16
-       /* We assume that 2**LOG_MAX_SIZE is a multiple of page size. */
-#endif
-
-#ifndef ALIGNMENT
-# define ALIGNMENT 16
-       /* Assumed to be at least sizeof(AO_t).         */
-#endif
-
-#define CHUNK_SIZE (1 << LOG_MAX_SIZE)
-
-#ifndef AO_INITIAL_HEAP_SIZE
-#  define AO_INITIAL_HEAP_SIZE (2*(LOG_MAX_SIZE+1)*CHUNK_SIZE)
-#endif
-
-char AO_initial_heap[AO_INITIAL_HEAP_SIZE];
-
-static volatile AO_t initial_heap_ptr = (AO_t)AO_initial_heap;
-static volatile char *initial_heap_lim = AO_initial_heap + AO_INITIAL_HEAP_SIZE;
-
-#if defined(HAVE_MMAP)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-static volatile AO_t mmap_enabled = 0;
-
-void
-AO_malloc_enable_mmap(void)
-{
-  AO_store(&mmap_enabled, 1);
-}
-
-static char *get_mmaped(size_t sz)
-{
-  char * result;
-
-  assert(!(sz & (CHUNK_SIZE - 1)));
-  if (!mmap_enabled) return 0;
-# if defined(MAP_ANONYMOUS)
-    result = mmap(0, sz, PROT_READ | PROT_WRITE,
-                 MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
-# elif defined(MAP_ANON)
-    result = mmap(0, sz, PROT_READ | PROT_WRITE,
-                 MAP_PRIVATE | MAP_ANON, -1, 0);
-# else
-    {
-      int zero_fd = open("/dev/zero", O_RDONLY);
-      result = mmap(0, sz, PROT_READ | PROT_WRITE,
-                   MAP_PRIVATE, zero_fd, 0);
-      close(zero_fd);
-    }
-# endif
-  if (result == MAP_FAILED) result = 0;
-  return result;
-}
-
-/* Allocate an object of size (incl. header) of size > CHUNK_SIZE.     */
-/* sz includes space for an AO_t-sized header.                         */
-static char *
-AO_malloc_large(size_t sz)
-{
- char * result;
- /* The header will force us to waste ALIGNMENT bytes, incl. header.   */
-   sz += ALIGNMENT;
- /* Round to multiple of CHUNK_SIZE.   */
-   sz = (sz + CHUNK_SIZE - 1) & ~(CHUNK_SIZE - 1);
- result = get_mmaped(sz);
- if (result == 0) return 0;
- result += ALIGNMENT;
- ((AO_t *)result)[-1] = (AO_t)sz;
- return result;
-}
-
-static void
-AO_free_large(char * p)
-{
-  AO_t sz = ((AO_t *)p)[-1];
-  if (munmap(p - ALIGNMENT, (size_t)sz) != 0)
-    abort();  /* Programmer error.  Not really async-signal-safe, but ... */
-}
-  
-
-#else /*  No MMAP */
-
-void
-AO_malloc_enable_mmap(void)
-{
-}
-
-static char *get_mmaped(size_t sz)
-{
-  return 0;
-}
-
-static char *
-AO_malloc_large(size_t sz)
-{
-  return 0;
-}
-
-static void
-AO_free_large(char * p)
-{
-  abort();  /* Programmer error.  Not really async-signal-safe, but ... */
-}
-
-#endif /* No MMAP */
-
-static char *
-get_chunk(void)
-{
-  char *initial_ptr;
-  char *my_chunk_ptr;
-  char * my_lim;
-
-retry:
-  initial_ptr = (char *)AO_load(&initial_heap_ptr);
-  my_chunk_ptr = (char *)(((AO_t)initial_ptr + (ALIGNMENT - 1))
-                         & ~(ALIGNMENT - 1));
-  if (initial_ptr != my_chunk_ptr)
-    {
-      /* Align correctly.  If this fails, someone else did it for us.  */
-      AO_compare_and_swap_acquire(&initial_heap_ptr, (AO_t)initial_ptr,
-                                 (AO_t)my_chunk_ptr);
-    }
-  my_lim = my_chunk_ptr + CHUNK_SIZE;
-  if (my_lim <= initial_heap_lim)
-    {
-      if (!AO_compare_and_swap(&initial_heap_ptr, (AO_t)my_chunk_ptr,
-                                                 (AO_t)my_lim))
-        goto retry;
-      return my_chunk_ptr;
-    }
-  /* We failed.  The initial heap is used up.  */
-  my_chunk_ptr = get_mmaped(CHUNK_SIZE);
-  assert (!((AO_t)my_chunk_ptr & (ALIGNMENT-1)));
-  return my_chunk_ptr;
-}
-
-/* Object free lists.  Ith entry corresponds to objects        */
-/* of total size 2**i bytes.                                   */
-AO_stack_t AO_free_list[LOG_MAX_SIZE+1];
-
-/* Chunk free list, linked through first word in chunks.       */
-/* All entries of size CHUNK_SIZE.                             */
-AO_stack_t AO_chunk_free_list;
-
-/* Break up the chunk, and add it to the object free list for  */
-/* the given size.  Sz must be a power of two.                 */
-/* We have exclusive access to chunk.                          */
-static void
-add_chunk_as(void * chunk, size_t sz, unsigned log_sz)
-{
-  char *first = (char *)chunk + ALIGNMENT - sizeof(AO_t);
-  char *limit = (char *)chunk + CHUNK_SIZE - sz;
-  char *next, *p;
-
-  for (p = first; p <= limit; p = next) {
-    next = p + sz;
-    AO_stack_push(AO_free_list+log_sz, (AO_t *)p);
-  }
-}
-
-static int msbs[16] = {0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4};
-
-/* Return the position of the most significant set bit in the  */
-/* argument.                                                   */
-/* We follow the conventions of ffs(), i.e. the least          */
-/* significant bit is number one.                              */
-int msb(size_t s)
-{
-  int result = 0;
-  if ((s & 0xff) != s) {
-    /* The following shift often generates warnings on 32-bit arch's   */
-    /* That's OK, because it will never be executed there.             */
-    if (sizeof(size_t) > 4 && (s >> 32) != 0)
-      {
-       s >>= 32;
-       result += 32;
-      }
-    if ((s >> 16) != 0)
-      {
-       s >>= 16;
-       result += 16;
-      }
-    if ((s >> 8) != 0)
-      {
-       s >>= 8;
-       result += 8;
-      }
-  }
-  if (s > 15)
-    {
-      s >>= 4;
-      result += 4;
-    }
-  result += msbs[s];
-  return result;
-}
-
-void *
-AO_malloc(size_t sz)
-{
-  AO_t *result;
-  size_t adj_sz = sz + sizeof(AO_t);
-  int log_sz;
-  if (sz > CHUNK_SIZE)
-    return AO_malloc_large(sz);
-  log_sz = msb(adj_sz-1);
-  result = AO_stack_pop(AO_free_list+log_sz);
-  while (0 == result) {
-    void * chunk = get_chunk();
-    if (0 == chunk) return 0;
-    adj_sz = 1 << log_sz;
-    add_chunk_as(chunk, adj_sz, log_sz);
-    result = AO_stack_pop(AO_free_list+log_sz);
-  }
-  *result = log_sz;
-# ifdef AO_TRACE_MALLOC
-    fprintf(stderr, "%x: AO_malloc(%lu) = %p\n",
-                   (int)pthread_self(), (unsigned long)sz, result+1);
-# endif
-  return result + 1;
-}
-
-void
-AO_free(void *p)
-{
-  char *base = (char *)p - sizeof(AO_t);
-  int log_sz;
-
-  if (0 == p) return;
-  log_sz = *(AO_t *)base;
-# ifdef AO_TRACE_MALLOC
-    fprintf(stderr, "%x: AO_free(%p sz:%lu)\n", (int)pthread_self(), p,
-                   (unsigned long)
-                     (log_sz > LOG_MAX_SIZE? log_sz : (1 << log_sz)));
-# endif
-  if (log_sz > LOG_MAX_SIZE)
-    AO_free_large(p);
-  else
-    AO_stack_push(AO_free_list+log_sz, (AO_t *)base);
-}
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_malloc.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_malloc.h
deleted file mode 100644 (file)
index c55d27c..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2005 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-/* Almost lock-free malloc implementation based on stack implementation. */
-/* See README.malloc file for detailed usage rules.                     */
-
-#ifndef AO_ATOMIC_H
-#define AO_ATOMIC_H
-
-#include <stdlib.h>    /* For size_t */
-
-#include "atomic_ops_stack.h"
-
-#ifdef AO_STACK_IS_LOCK_FREE
-# define AO_MALLOC_IS_LOCK_FREE
-#endif
-
-void AO_free(void *);
-
-void * AO_malloc(size_t);
-
-/* Allow use of mmpa to grow the heap.  No-op on some platforms.       */
-void AO_malloc_enable_mmap(void);
-
-#endif /* !AO_ATOMIC_H */
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_stack.c b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_stack.c
deleted file mode 100644 (file)
index 6cf43fd..0000000
+++ /dev/null
@@ -1,302 +0,0 @@
-/*  
- * Copyright (c) 2005 Hewlett-Packard Development Company, L.P.
- * Original Author: Hans Boehm
- *
- * This file may be redistributed and/or modified under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2, or (at your option) any later version.
- * 
- * It is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE.  See the GNU General Public License in the
- * file doc/COPYING for more details.
- */
-
-#if defined(HAVE_CONFIG_H)
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-#include <assert.h>
-#define AO_REQUIRE_CAS
-#include "atomic_ops_stack.h"
-
-#if defined(_MSC_VER) \
-    || defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__CYGWIN__)
-  /* AO_pause not defined elsewhere */
-  /* FIXME: At least AO_spin should be factored out.   */
-#include <windows.h>
-
-AO_t dummy;
-
-/* Spin for 2**n units. */
-static void AO_spin(int n)
-{
-  int i;
-  AO_T j = AO_load(&dummy);
-
-  for (i = 0; i < (2 << n); ++i)
-    {
-       j *= 5;
-       j -= 4;
-    }
-  AO_store(&dummy, j);
-}
-
-void AO_pause(int n)
-{
-    if (n < 12)
-      AO_spin(n);
-    else
-      {
-        DWORD msecs;
-
-       /* Short async-signal-safe sleep. */
-       msecs = (n > 18? 100 : (1 << (n - 12)));
-       Sleep(msecs);
-      }
-}
-
-#else 
-
-/* AO_pause is available elsewhere */
-
-extern void AO_pause(int);
-
-#endif
-
-#ifdef AO_USE_ALMOST_LOCK_FREE
-
-/* LIFO linked lists based on compare-and-swap.  We need to avoid      */
-/* the case of a node deletion and reinsertion while I'm deleting      */
-/* it, since that may cause my CAS to succeed eventhough the next      */
-/* pointer is now wrong.  Our solution is not fully lock-free, but it  */
-/* is good enough for signal handlers, provided we have a suitably low */
-/* bound on the number of recursive signal handler reentries.                  */
-/* A list consists of a first pointer and a blacklist                  */
-/* of pointer values that are currently being removed.  No list element        */
-/* on the blacklist may be inserted.  If we would otherwise do so, we  */
-/* are allowed to insert a variant that differs only in the least      */
-/* significant, ignored, bits.  If the list is full, we wait.          */
-
-/* Crucial observation: A particular padded pointer x (i.e. pointer    */
-/* plus arbitrary low order bits) can never be newly inserted into     */
-/* a list while it's in the corresponding auxiliary data structure.    */
-
-/* The second argument is a pointer to the link field of the element   */
-/* to be inserted.                                                     */
-/* Both list headers and link fields contain "perturbed" pointers, i.e.        */
-/* pointers with extra bits "or"ed into the low order bits.            */
-void
-AO_stack_push_explicit_aux_release(volatile AO_t *list, AO_t *x,
-                                  AO_stack_aux *a)
-{
-  int i;
-  AO_t x_bits = (AO_t)x;
-  AO_t next;
-  
-  /* No deletions of x can start here, since x is not currently in the */
-  /* list.                                                             */
- retry:
-# if AO_BL_SIZE == 2
-  {
-    /* Start all loads as close to concurrently as possible. */
-    AO_t entry1 = AO_load(a -> AO_stack_bl);
-    AO_t entry2 = AO_load(a -> AO_stack_bl + 1);
-    if (entry1 == x_bits || entry2 == x_bits)
-      {
-       /* Entry is currently being removed.  Change it a little.     */
-         ++x_bits;
-         if ((x_bits & AO_BIT_MASK) == 0)
-           /* Version count overflowed;         */
-           /* EXTREMELY unlikely, but possible. */
-           x_bits = (AO_t)x;
-       goto retry;
-      }
-  }
-# else
-    for (i = 0; i < AO_BL_SIZE; ++i)
-      {
-        if (AO_load(a -> AO_stack_bl + i) == x_bits)
-          {
-           /* Entry is currently being removed.  Change it a little.     */
-             ++x_bits;
-             if ((x_bits & AO_BIT_MASK) == 0)
-               /* Version count overflowed;         */
-               /* EXTREMELY unlikely, but possible. */
-               x_bits = (AO_t)x;
-           goto retry;
-          }
-      }
-# endif
-  /* x_bits is not currently being deleted */
-  do
-    {
-      next = AO_load(list);
-      *x = next;
-    }
-  while(!AO_compare_and_swap_release(list, next, x_bits));
-}
-
-/*
- * I concluded experimentally that checking a value first before
- * performing a compare-and-swap is usually beneficial on X86, but
- * slows things down appreciably with contention on Itanium.
- * Since the Itanium behavior makes more sense to me (more cache line
- * movement unless we're mostly reading, but back-off should guard
- * against that), we take Itanium as the default.  Measurements on
- * other multiprocessor architectures would be useful.  (On a uniprocessor,
- * the initial check is almost certainly a very small loss.) - HB
- */
-#ifdef __i386__
-# define PRECHECK(a) (a) == 0 &&
-#else
-# define PRECHECK(a)
-#endif
-
-AO_t *
-AO_stack_pop_explicit_aux_acquire(volatile AO_t *list, AO_stack_aux * a)
-{
-  unsigned i;
-  int j = 0;
-  AO_t first;
-  AO_t * first_ptr;
-  AO_t next;
-
- retry:
-  first = AO_load(list);
-  if (0 == first) return 0;
-  /* Insert first into aux black list.                                 */
-  /* This may spin if more than AO_BL_SIZE removals using auxiliary    */
-  /* structure a are currently in progress.                            */
-  for (i = 0; ; )
-    {
-      if (PRECHECK(a -> AO_stack_bl[i])
-         AO_compare_and_swap_acquire(a->AO_stack_bl+i, 0, first))
-        break;
-      ++i;
-      if ( i >= AO_BL_SIZE )
-       {
-         i = 0;
-         AO_pause(++j);
-       }
-    }
-  assert(i >= 0 && i < AO_BL_SIZE);
-  assert(a -> AO_stack_bl[i] == first);
-  /* First is on the auxiliary black list.  It may be removed by       */
-  /* another thread before we get to it, but a new insertion of x      */
-  /* cannot be started here.                                           */
-  /* Only we can remove it from the black list.                                */
-  /* We need to make sure that first is still the first entry on the   */
-  /* list.  Otherwise it's possible that a reinsertion of it was       */
-  /* already started before we added the black list entry.             */
-  if (first != AO_load(list)) {
-    AO_store_release(a->AO_stack_bl+i, 0);
-    goto retry;
-  }
-  first_ptr = AO_REAL_NEXT_PTR(first);
-  next = AO_load(first_ptr);
-  if (!AO_compare_and_swap_release(list, first, next)) {
-    AO_store_release(a->AO_stack_bl+i, 0);
-    goto retry;
-  }
-  assert(*list != first);
-  /* Since we never insert an entry on the black list, this cannot have        */
-  /* succeeded unless first remained on the list while we were running.        */
-  /* Thus its next link cannot have changed out from under us, and we  */
-  /* removed exactly one entry and preserved the rest of the list.     */
-  /* Note that it is quite possible that an additional entry was       */
-  /* inserted and removed while we were running; this is OK since the  */
-  /* part of the list following first must have remained unchanged, and        */
-  /* first must again have been at the head of the list when the       */
-  /* compare_and_swap succeeded.                                       */
-  AO_store_release(a->AO_stack_bl+i, 0);
-  return first_ptr;
-}
-
-#else /* ! USE_ALMOST_LOCK_FREE */
-
-/* Better names for fields in AO_stack_t */
-#define ptr AO_val2
-#define version AO_val1
-
-#if defined(AO_HAVE_compare_double_and_swap_double)
-
-void AO_stack_push_release(AO_stack_t *list, AO_t *element)
-{
-    AO_t next;
-
-    do {
-      next = AO_load(&(list -> ptr));
-      *element = next;
-    } while (!AO_compare_and_swap_release
-                   ( &(list -> ptr), next, (AO_t) element));
-    /* This uses a narrow CAS here, an old optimization suggested      */
-    /* by Treiber.  Pop is still safe, since we run into the ABA       */
-    /* problem only if there were both intervening "pop"s and "push"es.        */
-    /* In that case we still see a change in the version number.       */
-}
-
-AO_t *AO_stack_pop_acquire(AO_stack_t *list)
-{
-    AO_t *cptr;
-    AO_t next;
-    AO_t cversion;
-
-    do {
-      /* Version must be loaded first. */
-      cversion = AO_load_acquire(&(list -> version));
-      cptr = (AO_t *)AO_load(&(list -> ptr));
-      if (cptr == 0) return 0;
-      next = *cptr;
-    } while (!AO_compare_double_and_swap_double_release
-                   (list, cversion, (AO_t) cptr, cversion+1, (AO_t) next));
-    return cptr;
-}
-
-
-#elif defined(AO_HAVE_compare_and_swap_double)
-
-/* Needed for future IA64 processors.  No current clients? */
-
-#error Untested!  Probably doesnt work.
-
-/* We have a wide CAS, but only does an AO_t-wide comparison.  */
-/* We can't use the Treiber optimization, since we only check  */
-/* for an unchanged version number, not an unchanged pointer.  */
-void AO_stack_push_release(AO_stack_t *list, AO_t *element)
-{
-    AO_t version;
-    AO_t next_ptr;
-
-    do {
-      /* Again version must be loaded first, for different reason.     */
-      version = AO_load_acquire(&(list -> version));
-      next_ptr = AO_load(&(list -> ptr));
-      *element = next_ptr;
-    } while (!AO_compare_and_swap_double_release(
-                          list, version,
-                          version+1, (AO_t) element));
-}
-
-AO_t *AO_stack_pop_acquire(AO_stack_t *list)
-{
-    AO_t *cptr;
-    AO_t next;
-    AO_t cversion;
-
-    do {
-      cversion = AO_load_acquire(&(list -> version));
-      cptr = (AO_t *)AO_load(&(list -> ptr));
-      if (cptr == 0) return 0;
-      next = *cptr;
-    } while (!AO_compare_double_and_swap_double_release
-                   (list, cversion, (AO_t) cptr, cversion+1, next));
-    return cptr;
-}
-
-
-#endif /* AO_HAVE_compare_and_swap_double */
-
-#endif /* ! USE_ALMOST_LOCK_FREE */
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_stack.h b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_stack.h
deleted file mode 100644 (file)
index 3b9d46b..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * The implementation of the routines described here is covered by the GPL.
- * This header file is covered by the following license:
- */
-
-/*
- * Copyright (c) 2005 Hewlett-Packard Development Company, L.P.
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE. 
- */
-
-/* Almost lock-free LIFO linked lists (linked stacks). */
-#ifndef AO_STACK_H
-#define AO_STACK_H
-
-#include "atomic_ops.h"
-
-#if !defined(AO_HAVE_compare_double_and_swap_double) \
-    && !defined(AO_HAVE_compare_double_and_swap) \
-    && defined(AO_HAVE_compare_and_swap)
-# define AO_USE_ALMOST_LOCK_FREE
-#else
-  /* If we have no compare-and-swap operation defined, we assume       */
-  /* that we will actually be using CAS emulation.  If we do that,     */
-  /* it's cheaper to use the version-based implementation.             */
-# define AO_STACK_IS_LOCK_FREE
-#endif
-
-/*
- * These are not guaranteed to be completely lock-free.
- * List insertion may spin under extremely unlikely conditions.
- * It cannot deadlock due to recursive reentry unless AO_list_remove
- * is called while at least AO_BL_SIZE activations of 
- * AO_list_remove are currently active in the same thread, i.e.
- * we must have at least AO_BL_SIZE recursive signal handler
- * invocations.
- *
- * All operations take an AO_list_aux argument.  It is safe to
- * share a single AO_list_aux structure among all lists, but that
- * may increase contention.  Any given list must always be accessed
- * with the same AO_list_aux structure.
- *
- * We make some machine-dependent assumptions:
- *   - We have a compare-and-swap operation.
- *   - At least _AO_N_BITS low order bits in pointers are
- *     zero and normally unused.
- *   - size_t and pointers have the same size.
- *
- * We do use a fully lock-free implementation if double-width
- * compare-and-swap operations are available.
- */
-
-#ifdef AO_USE_ALMOST_LOCK_FREE
-/* The number of low order pointer bits we can use for a small */
-/* version number.                                             */
-# if defined(__LP64__) || defined(_LP64) || defined(_WIN64)
-   /* WIN64 isn't really supported yet.        */
-#  define AO_N_BITS 3
-# else
-#  define AO_N_BITS 2
-# endif
-
-# define AO_BIT_MASK ((1 << AO_N_BITS) - 1)
-/*
- * AO_stack_aux should be treated as opaque.
- * It is fully defined here, so it can be allocated, and to facilitate
- * debugging.
- */
-#ifndef AO_BL_SIZE
-#  define AO_BL_SIZE 2
-#endif
-
-#if AO_BL_SIZE > (1 << AO_N_BITS)
-#  error AO_BL_SIZE too big
-#endif
-
-typedef struct AO__stack_aux {
-  volatile AO_t AO_stack_bl[AO_BL_SIZE];
-} AO_stack_aux;
-
-/* The stack implementation knows only about the location of   */
-/* link fields in nodes, and nothing about the rest of the     */
-/* stack elements.  Link fields hold an AO_t, which is not     */
-/* necessarily a real pointer.  This converts the AO_t to a    */
-/* real (AO_t *) which is either o, or points at the link      */
-/* field in the next node.                                     */
-#define AO_REAL_NEXT_PTR(x) (AO_t *)((x) & ~AO_BIT_MASK)
-
-/* The following two routines should not normally be used directly.    */
-/* We make them visible here for the rare cases in which it makes sense        */
-/* to share the an AO_stack_aux between stacks.                                */
-void
-AO_stack_push_explicit_aux_release(volatile AO_t *list, AO_t *x,
-                                 AO_stack_aux *);
-
-AO_t *
-AO_stack_pop_explicit_aux_acquire(volatile AO_t *list, AO_stack_aux *);
-
-/* And now AO_stack_t for the real interface:                          */
-
-typedef struct AO__stack {
-  volatile AO_t AO_ptr;
-  AO_stack_aux AO_aux;
-} AO_stack_t;
-
-#define AO_STACK_INITIALIZER {0}
-
-AO_INLINE void AO_stack_init(AO_stack_t *list)
-{
-# if AO_BL_SIZE == 2
-    list -> AO_aux.AO_stack_bl[0] = 0;
-    list -> AO_aux.AO_stack_bl[1] = 0;
-# else
-    int i;
-    for (i = 0; i < AO_BL_SIZE; ++i)
-      list -> AO_aux.AO_stack_bl[i] = 0;
-# endif
-  list -> AO_ptr = 0;
-}
-
-/* Convert an AO_stack_t to a pointer to the link field in     */
-/* the first element.                                          */
-#define AO_REAL_HEAD_PTR(x) AO_REAL_NEXT_PTR((x).AO_ptr)
-
-#define AO_stack_push_release(l, e) \
-       AO_stack_push_explicit_aux_release(&((l)->AO_ptr), e, &((l)->AO_aux))
-#define AO_HAVE_stack_push_release
-
-#define AO_stack_pop_acquire(l) \
-       AO_stack_pop_explicit_aux_acquire(&((l)->AO_ptr), &((l)->AO_aux))
-#define AO_HAVE_stack_pop_acquire
-
-# else /* Use fully non-blocking data structure, wide CAS      */
-
-#ifndef AO_HAVE_double_t
-  /* Can happen if we're using CAS emulation, since we don't want to   */
-  /* force that here, in case other atomic_ops clients don't want it.  */
-# include "atomic_ops/sysdeps/standard_ao_double_t.h"
-#endif
-
-typedef volatile AO_double_t AO_stack_t;
-/* AO_val1 is version, AO_val2 is pointer.     */
-
-#define AO_STACK_INITIALIZER {0}
-
-AO_INLINE void AO_stack_init(AO_stack_t *list)
-{
-  list -> AO_val1 = 0;
-  list -> AO_val2 = 0;
-}
-
-#define AO_REAL_HEAD_PTR(x) (AO_t *)((x).AO_val2)
-#define AO_REAL_NEXT_PTR(x) (AO_t *)(x)
-
-void AO_stack_push_release(AO_stack_t *list, AO_t *new_element);
-#define AO_HAVE_stack_push_release
-AO_t * AO_stack_pop_acquire(AO_stack_t *list);
-#define AO_HAVE_stack_pop_acquire
-
-#endif /* Wide CAS case */
-
-#if defined(AO_HAVE_stack_push_release) && !defined(AO_HAVE_stack_push)
-# define AO_stack_push(l, e) AO_stack_push_release(l, e)
-# define AO_HAVE_stack_push
-#endif
-
-#if defined(AO_HAVE_stack_pop_acquire) && !defined(AO_HAVE_stack_pop)
-# define AO_stack_pop(l) AO_stack_pop_acquire(l)
-# define AO_HAVE_stack_pop
-#endif
-
-#endif /* !AO_STACK_H */
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_sysdeps.S b/src/mm/boehm-gc/libatomic_ops-1.2/src/atomic_ops_sysdeps.S
deleted file mode 100644 (file)
index f586f23..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * Include the appropriate system-dependent assembly file, if any.
- * This is used only if the platform supports neither inline assembly
- * code, nor appropriate compiler intrinsics.
- */
-
-#if !defined(__GNUC__) && (defined(sparc) || defined(__sparc))
-#  include "atomic_ops/sysdeps/sunc/sparc.S"
-#endif
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/src/config.h.in b/src/mm/boehm-gc/libatomic_ops-1.2/src/config.h.in
deleted file mode 100644 (file)
index 5b61fbd..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* src/config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define to 1 if you have the `getpagesize' function. */
-#undef HAVE_GETPAGESIZE
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/tests/Makefile.am b/src/mm/boehm-gc/libatomic_ops-1.2/tests/Makefile.am
deleted file mode 100644 (file)
index 0f186cc..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-EXTRA_DIST=test_atomic.template list_atomic.template run_parallel.inc \
-          test_atomic_include.h
-# We distribute test_atomic_include.h, since it's hard to regenerate
-# on Windows without sed.
-
-BUILT_SOURCES = test_atomic_include.h list_atomic.i
-CLEANFILES = test_atomic_include.h list_atomic.c list_atomic.i
-
-AM_CPPFLAGS=-I$(srcdir)/../src
-
-TESTS=test_atomic test_atomic_pthreads test_stack test_malloc
-
-#create the test_atomic test program
-check_PROGRAMS=test_atomic test_atomic_pthreads test_stack test_malloc
-
-test_atomic_SOURCES=test_atomic.c
-test_atomic_LDADD=-lpthread ../src/libatomic_ops.a
-
-test_atomic_pthreads_SOURCES=test_atomic.c 
-test_atomic_pthreads_CPPFLAGS=-DAO_USE_PTHREAD_DEFS $(AM_CPPFLAGS)
-test_atomic_pthreads_LDADD=-lpthread ../src/libatomic_ops.a
-
-test_stack_SOURCES=test_stack.c 
-test_stack_LDADD=-lpthread ../src/libatomic_ops_gpl.a ../src/libatomic_ops.a 
-
-test_malloc_SOURCES=test_malloc.c 
-test_malloc_LDADD=-lpthread ../src/libatomic_ops_gpl.a ../src/libatomic_ops.a 
-
-test_atomic_include.h: test_atomic.template
-       sed -e s/XX// $? > $@
-       sed -e s/XX/_release/ $? >> $@
-       sed -e s/XX/_acquire/ $? >> $@
-       sed -e s/XX/_read/ $? >> $@
-       sed -e s/XX/_write/ $? >> $@
-       sed -e s/XX/_full/ $? >> $@
-       sed -e s/XX/_release_write/ $? >> $@
-       sed -e s/XX/_acquire_read/ $? >> $@
-
-list_atomic.c: list_atomic.template
-       echo "#include \"atomic_ops.h\" " > $@
-       sed -e s/XX// $? >> $@
-       sed -e s/XX/_release/ $? >> $@
-       sed -e s/XX/_acquire/ $? >> $@
-       sed -e s/XX/_read/ $? >> $@
-       sed -e s/XX/_write/ $? >> $@
-       sed -e s/XX/_full/ $? >> $@
-       sed -e s/XX/_release_write/ $? >> $@
-       sed -e s/XX/_acquire_read/ $? >> $@
-
-list_atomic.i: list_atomic.c
-       $(COMPILE) $? -E > list_atomic.i
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/tests/Makefile.in b/src/mm/boehm-gc/libatomic_ops-1.2/tests/Makefile.in
deleted file mode 100644 (file)
index b3af186..0000000
+++ /dev/null
@@ -1,551 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-check_PROGRAMS = test_atomic$(EXEEXT) test_atomic_pthreads$(EXEEXT) \
-       test_stack$(EXEEXT) test_malloc$(EXEEXT)
-subdir = tests
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-       $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/src/config.h
-CONFIG_CLEAN_FILES =
-am_test_atomic_OBJECTS = test_atomic.$(OBJEXT)
-test_atomic_OBJECTS = $(am_test_atomic_OBJECTS)
-test_atomic_DEPENDENCIES = ../src/libatomic_ops.a
-am_test_atomic_pthreads_OBJECTS =  \
-       test_atomic_pthreads-test_atomic.$(OBJEXT)
-test_atomic_pthreads_OBJECTS = $(am_test_atomic_pthreads_OBJECTS)
-test_atomic_pthreads_DEPENDENCIES = ../src/libatomic_ops.a
-am_test_malloc_OBJECTS = test_malloc.$(OBJEXT)
-test_malloc_OBJECTS = $(am_test_malloc_OBJECTS)
-test_malloc_DEPENDENCIES = ../src/libatomic_ops_gpl.a \
-       ../src/libatomic_ops.a
-am_test_stack_OBJECTS = test_stack.$(OBJEXT)
-test_stack_OBJECTS = $(am_test_stack_OBJECTS)
-test_stack_DEPENDENCIES = ../src/libatomic_ops_gpl.a \
-       ../src/libatomic_ops.a
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(test_atomic_SOURCES) $(test_atomic_pthreads_SOURCES) \
-       $(test_malloc_SOURCES) $(test_stack_SOURCES)
-DIST_SOURCES = $(test_atomic_SOURCES) $(test_atomic_pthreads_SOURCES) \
-       $(test_malloc_SOURCES) $(test_stack_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCAS = @CCAS@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GREP = @GREP@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-NEED_ASM_FALSE = @NEED_ASM_FALSE@
-NEED_ASM_TRUE = @NEED_ASM_TRUE@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PICFLAG = @PICFLAG@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-ac_ct_CC = @ac_ct_CC@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-EXTRA_DIST = test_atomic.template list_atomic.template run_parallel.inc \
-          test_atomic_include.h
-
-# We distribute test_atomic_include.h, since it's hard to regenerate
-# on Windows without sed.
-BUILT_SOURCES = test_atomic_include.h list_atomic.i
-CLEANFILES = test_atomic_include.h list_atomic.c list_atomic.i
-AM_CPPFLAGS = -I$(srcdir)/../src
-TESTS = test_atomic test_atomic_pthreads test_stack test_malloc
-test_atomic_SOURCES = test_atomic.c
-test_atomic_LDADD = -lpthread ../src/libatomic_ops.a
-test_atomic_pthreads_SOURCES = test_atomic.c 
-test_atomic_pthreads_CPPFLAGS = -DAO_USE_PTHREAD_DEFS $(AM_CPPFLAGS)
-test_atomic_pthreads_LDADD = -lpthread ../src/libatomic_ops.a
-test_stack_SOURCES = test_stack.c 
-test_stack_LDADD = -lpthread ../src/libatomic_ops_gpl.a ../src/libatomic_ops.a 
-test_malloc_SOURCES = test_malloc.c 
-test_malloc_LDADD = -lpthread ../src/libatomic_ops_gpl.a ../src/libatomic_ops.a 
-all: $(BUILT_SOURCES)
-       $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-       @for dep in $?; do \
-         case '$(am__configure_deps)' in \
-           *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
-             exit 1;; \
-         esac; \
-       done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  tests/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-       @case '$?' in \
-         *config.status*) \
-           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-         *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-       esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-clean-checkPROGRAMS:
-       -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
-test_atomic$(EXEEXT): $(test_atomic_OBJECTS) $(test_atomic_DEPENDENCIES) 
-       @rm -f test_atomic$(EXEEXT)
-       $(LINK) $(test_atomic_LDFLAGS) $(test_atomic_OBJECTS) $(test_atomic_LDADD) $(LIBS)
-test_atomic_pthreads$(EXEEXT): $(test_atomic_pthreads_OBJECTS) $(test_atomic_pthreads_DEPENDENCIES) 
-       @rm -f test_atomic_pthreads$(EXEEXT)
-       $(LINK) $(test_atomic_pthreads_LDFLAGS) $(test_atomic_pthreads_OBJECTS) $(test_atomic_pthreads_LDADD) $(LIBS)
-test_malloc$(EXEEXT): $(test_malloc_OBJECTS) $(test_malloc_DEPENDENCIES) 
-       @rm -f test_malloc$(EXEEXT)
-       $(LINK) $(test_malloc_LDFLAGS) $(test_malloc_OBJECTS) $(test_malloc_LDADD) $(LIBS)
-test_stack$(EXEEXT): $(test_stack_OBJECTS) $(test_stack_DEPENDENCIES) 
-       @rm -f test_stack$(EXEEXT)
-       $(LINK) $(test_stack_LDFLAGS) $(test_stack_OBJECTS) $(test_stack_LDADD) $(LIBS)
-
-mostlyclean-compile:
-       -rm -f *.$(OBJEXT)
-
-distclean-compile:
-       -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_atomic.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_atomic_pthreads-test_atomic.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_malloc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_stack.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-test_atomic_pthreads-test_atomic.o: test_atomic.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_atomic_pthreads_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_atomic_pthreads-test_atomic.o -MD -MP -MF "$(DEPDIR)/test_atomic_pthreads-test_atomic.Tpo" -c -o test_atomic_pthreads-test_atomic.o `test -f 'test_atomic.c' || echo '$(srcdir)/'`test_atomic.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/test_atomic_pthreads-test_atomic.Tpo" "$(DEPDIR)/test_atomic_pthreads-test_atomic.Po"; else rm -f "$(DEPDIR)/test_atomic_pthreads-test_atomic.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='test_atomic.c' object='test_atomic_pthreads-test_atomic.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_atomic_pthreads_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_atomic_pthreads-test_atomic.o `test -f 'test_atomic.c' || echo '$(srcdir)/'`test_atomic.c
-
-test_atomic_pthreads-test_atomic.obj: test_atomic.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_atomic_pthreads_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_atomic_pthreads-test_atomic.obj -MD -MP -MF "$(DEPDIR)/test_atomic_pthreads-test_atomic.Tpo" -c -o test_atomic_pthreads-test_atomic.obj `if test -f 'test_atomic.c'; then $(CYGPATH_W) 'test_atomic.c'; else $(CYGPATH_W) '$(srcdir)/test_atomic.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/test_atomic_pthreads-test_atomic.Tpo" "$(DEPDIR)/test_atomic_pthreads-test_atomic.Po"; else rm -f "$(DEPDIR)/test_atomic_pthreads-test_atomic.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='test_atomic.c' object='test_atomic_pthreads-test_atomic.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_atomic_pthreads_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_atomic_pthreads-test_atomic.obj `if test -f 'test_atomic.c'; then $(CYGPATH_W) 'test_atomic.c'; else $(CYGPATH_W) '$(srcdir)/test_atomic.c'; fi`
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-         test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
-       fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
-         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
-
-GTAGS:
-       here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-check-TESTS: $(TESTS)
-       @failed=0; all=0; xfail=0; xpass=0; skip=0; \
-       srcdir=$(srcdir); export srcdir; \
-       list='$(TESTS)'; \
-       if test -n "$$list"; then \
-         for tst in $$list; do \
-           if test -f ./$$tst; then dir=./; \
-           elif test -f $$tst; then dir=; \
-           else dir="$(srcdir)/"; fi; \
-           if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
-             all=`expr $$all + 1`; \
-             case " $(XFAIL_TESTS) " in \
-             *" $$tst "*) \
-               xpass=`expr $$xpass + 1`; \
-               failed=`expr $$failed + 1`; \
-               echo "XPASS: $$tst"; \
-             ;; \
-             *) \
-               echo "PASS: $$tst"; \
-             ;; \
-             esac; \
-           elif test $$? -ne 77; then \
-             all=`expr $$all + 1`; \
-             case " $(XFAIL_TESTS) " in \
-             *" $$tst "*) \
-               xfail=`expr $$xfail + 1`; \
-               echo "XFAIL: $$tst"; \
-             ;; \
-             *) \
-               failed=`expr $$failed + 1`; \
-               echo "FAIL: $$tst"; \
-             ;; \
-             esac; \
-           else \
-             skip=`expr $$skip + 1`; \
-             echo "SKIP: $$tst"; \
-           fi; \
-         done; \
-         if test "$$failed" -eq 0; then \
-           if test "$$xfail" -eq 0; then \
-             banner="All $$all tests passed"; \
-           else \
-             banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
-           fi; \
-         else \
-           if test "$$xpass" -eq 0; then \
-             banner="$$failed of $$all tests failed"; \
-           else \
-             banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
-           fi; \
-         fi; \
-         dashes="$$banner"; \
-         skipped=""; \
-         if test "$$skip" -ne 0; then \
-           skipped="($$skip tests were not run)"; \
-           test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
-             dashes="$$skipped"; \
-         fi; \
-         report=""; \
-         if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
-           report="Please report to $(PACKAGE_BUGREPORT)"; \
-           test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
-             dashes="$$report"; \
-         fi; \
-         dashes=`echo "$$dashes" | sed s/./=/g`; \
-         echo "$$dashes"; \
-         echo "$$banner"; \
-         test -z "$$skipped" || echo "$$skipped"; \
-         test -z "$$report" || echo "$$report"; \
-         echo "$$dashes"; \
-         test "$$failed" -eq 0; \
-       else :; fi
-
-distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
-         if test -d $$d/$$file; then \
-           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-           fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-         else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
-           || exit 1; \
-         fi; \
-       done
-check-am: all-am
-       $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
-       $(MAKE) $(AM_MAKEFLAGS) check-TESTS
-check: $(BUILT_SOURCES)
-       $(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile
-installdirs:
-install: $(BUILT_SOURCES)
-       $(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-clean: clean-am
-
-clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
-
-distclean: distclean-am
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
-       clean-checkPROGRAMS clean-generic ctags distclean \
-       distclean-compile distclean-generic distclean-tags distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-exec install-exec-am \
-       install-info install-info-am install-man install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-compile \
-       mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-       uninstall-am uninstall-info-am
-
-
-test_atomic_include.h: test_atomic.template
-       sed -e s/XX// $? > $@
-       sed -e s/XX/_release/ $? >> $@
-       sed -e s/XX/_acquire/ $? >> $@
-       sed -e s/XX/_read/ $? >> $@
-       sed -e s/XX/_write/ $? >> $@
-       sed -e s/XX/_full/ $? >> $@
-       sed -e s/XX/_release_write/ $? >> $@
-       sed -e s/XX/_acquire_read/ $? >> $@
-
-list_atomic.c: list_atomic.template
-       echo "#include \"atomic_ops.h\" " > $@
-       sed -e s/XX// $? >> $@
-       sed -e s/XX/_release/ $? >> $@
-       sed -e s/XX/_acquire/ $? >> $@
-       sed -e s/XX/_read/ $? >> $@
-       sed -e s/XX/_write/ $? >> $@
-       sed -e s/XX/_full/ $? >> $@
-       sed -e s/XX/_release_write/ $? >> $@
-       sed -e s/XX/_acquire_read/ $? >> $@
-
-list_atomic.i: list_atomic.c
-       $(COMPILE) $? -E > list_atomic.i
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/tests/list_atomic.c b/src/mm/boehm-gc/libatomic_ops-1.2/tests/list_atomic.c
deleted file mode 100644 (file)
index 1faf5c4..0000000
+++ /dev/null
@@ -1,569 +0,0 @@
-#include "atomic_ops.h" 
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-/* This generates a compilable program.  But it is really meant to be  */
-/* be used only with cc -E, to inspect the expensions generated by     */
-/* primitives.                                                         */
-
-/* The result will not link or run.                                    */
-
-void list_atomic(void)
-{
-  AO_T *addr, val, newval, oldval;
-  AO_TS_T tsaddr;
-  long incr;
-
-# if defined(AO_HAVE_nop)
-    "AO_nop(): ";
-    AO_nop();
-# else
-    "No AO_nop";
-# endif
-# if defined(AO_HAVE_load)
-    "AO_load(addr):";
-    AO_load(addr);
-# else
-    "No AO_load";
-# endif
-# if defined(AO_HAVE_store)
-    "AO_store(addr, val):";
-    AO_store(addr, val);
-# else
-    "No AO_store";
-# endif
-# if defined(AO_HAVE_test_and_set)
-    "AO_test_and_set(tsaddr):";
-    AO_test_and_set(tsaddr);
-# else
-    "No AO_test_and_set";
-# endif
-# if defined(AO_HAVE_fetch_and_add1)
-    "AO_fetch_and_add1(addr):";
-    AO_fetch_and_add1(addr);
-# else
-    "No AO_fetch_and_add1";
-# endif
-# if defined(AO_HAVE_fetch_and_sub1)
-    "AO_fetch_and_sub1(addr):";
-    AO_fetch_and_sub1(addr);
-# else
-    "No AO_fetch_and_sub1";
-# endif
-# if defined(AO_HAVE_fetch_and_add)
-    "AO_fetch_and_add(addr, incr):";
-    AO_fetch_and_add(addr, incr);
-# else
-    "No AO_fetch_and_add";
-# endif
-# if defined(AO_HAVE_compare_and_swap)
-    "AO_compare_and_swap(addr, oldval, newval):";
-    AO_compare_and_swap(addr, oldval, newval);
-# else
-    "No AO_compare_and_swap";
-# endif
-}
-
-
-    
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-/* This generates a compilable program.  But it is really meant to be  */
-/* be used only with cc -E, to inspect the expensions generated by     */
-/* primitives.                                                         */
-
-/* The result will not link or run.                                    */
-
-void list_atomic_release(void)
-{
-  AO_T *addr, val, newval, oldval;
-  AO_TS_T tsaddr;
-  long incr;
-
-# if defined(AO_HAVE_nop_release)
-    "AO_nop_release(): ";
-    AO_nop_release();
-# else
-    "No AO_nop_release";
-# endif
-# if defined(AO_HAVE_load_release)
-    "AO_load_release(addr):";
-    AO_load_release(addr);
-# else
-    "No AO_load_release";
-# endif
-# if defined(AO_HAVE_store_release)
-    "AO_store_release(addr, val):";
-    AO_store_release(addr, val);
-# else
-    "No AO_store_release";
-# endif
-# if defined(AO_HAVE_test_and_set_release)
-    "AO_test_and_set_release(tsaddr):";
-    AO_test_and_set_release(tsaddr);
-# else
-    "No AO_test_and_set_release";
-# endif
-# if defined(AO_HAVE_fetch_and_add1_release)
-    "AO_fetch_and_add1_release(addr):";
-    AO_fetch_and_add1_release(addr);
-# else
-    "No AO_fetch_and_add1_release";
-# endif
-# if defined(AO_HAVE_fetch_and_sub1_release)
-    "AO_fetch_and_sub1_release(addr):";
-    AO_fetch_and_sub1_release(addr);
-# else
-    "No AO_fetch_and_sub1_release";
-# endif
-# if defined(AO_HAVE_fetch_and_add_release)
-    "AO_fetch_and_add_release(addr, incr):";
-    AO_fetch_and_add_release(addr, incr);
-# else
-    "No AO_fetch_and_add_release";
-# endif
-# if defined(AO_HAVE_compare_and_swap_release)
-    "AO_compare_and_swap_release(addr, oldval, newval):";
-    AO_compare_and_swap_release(addr, oldval, newval);
-# else
-    "No AO_compare_and_swap_release";
-# endif
-}
-
-
-    
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-/* This generates a compilable program.  But it is really meant to be  */
-/* be used only with cc -E, to inspect the expensions generated by     */
-/* primitives.                                                         */
-
-/* The result will not link or run.                                    */
-
-void list_atomic_acquire(void)
-{
-  AO_T *addr, val, newval, oldval;
-  AO_TS_T tsaddr;
-  long incr;
-
-# if defined(AO_HAVE_nop_acquire)
-    "AO_nop_acquire(): ";
-    AO_nop_acquire();
-# else
-    "No AO_nop_acquire";
-# endif
-# if defined(AO_HAVE_load_acquire)
-    "AO_load_acquire(addr):";
-    AO_load_acquire(addr);
-# else
-    "No AO_load_acquire";
-# endif
-# if defined(AO_HAVE_store_acquire)
-    "AO_store_acquire(addr, val):";
-    AO_store_acquire(addr, val);
-# else
-    "No AO_store_acquire";
-# endif
-# if defined(AO_HAVE_test_and_set_acquire)
-    "AO_test_and_set_acquire(tsaddr):";
-    AO_test_and_set_acquire(tsaddr);
-# else
-    "No AO_test_and_set_acquire";
-# endif
-# if defined(AO_HAVE_fetch_and_add1_acquire)
-    "AO_fetch_and_add1_acquire(addr):";
-    AO_fetch_and_add1_acquire(addr);
-# else
-    "No AO_fetch_and_add1_acquire";
-# endif
-# if defined(AO_HAVE_fetch_and_sub1_acquire)
-    "AO_fetch_and_sub1_acquire(addr):";
-    AO_fetch_and_sub1_acquire(addr);
-# else
-    "No AO_fetch_and_sub1_acquire";
-# endif
-# if defined(AO_HAVE_fetch_and_add_acquire)
-    "AO_fetch_and_add_acquire(addr, incr):";
-    AO_fetch_and_add_acquire(addr, incr);
-# else
-    "No AO_fetch_and_add_acquire";
-# endif
-# if defined(AO_HAVE_compare_and_swap_acquire)
-    "AO_compare_and_swap_acquire(addr, oldval, newval):";
-    AO_compare_and_swap_acquire(addr, oldval, newval);
-# else
-    "No AO_compare_and_swap_acquire";
-# endif
-}
-
-
-    
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-/* This generates a compilable program.  But it is really meant to be  */
-/* be used only with cc -E, to inspect the expensions generated by     */
-/* primitives.                                                         */
-
-/* The result will not link or run.                                    */
-
-void list_atomic_read(void)
-{
-  AO_T *addr, val, newval, oldval;
-  AO_TS_T tsaddr;
-  long incr;
-
-# if defined(AO_HAVE_nop_read)
-    "AO_nop_read(): ";
-    AO_nop_read();
-# else
-    "No AO_nop_read";
-# endif
-# if defined(AO_HAVE_load_read)
-    "AO_load_read(addr):";
-    AO_load_read(addr);
-# else
-    "No AO_load_read";
-# endif
-# if defined(AO_HAVE_store_read)
-    "AO_store_read(addr, val):";
-    AO_store_read(addr, val);
-# else
-    "No AO_store_read";
-# endif
-# if defined(AO_HAVE_test_and_set_read)
-    "AO_test_and_set_read(tsaddr):";
-    AO_test_and_set_read(tsaddr);
-# else
-    "No AO_test_and_set_read";
-# endif
-# if defined(AO_HAVE_fetch_and_add1_read)
-    "AO_fetch_and_add1_read(addr):";
-    AO_fetch_and_add1_read(addr);
-# else
-    "No AO_fetch_and_add1_read";
-# endif
-# if defined(AO_HAVE_fetch_and_sub1_read)
-    "AO_fetch_and_sub1_read(addr):";
-    AO_fetch_and_sub1_read(addr);
-# else
-    "No AO_fetch_and_sub1_read";
-# endif
-# if defined(AO_HAVE_fetch_and_add_read)
-    "AO_fetch_and_add_read(addr, incr):";
-    AO_fetch_and_add_read(addr, incr);
-# else
-    "No AO_fetch_and_add_read";
-# endif
-# if defined(AO_HAVE_compare_and_swap_read)
-    "AO_compare_and_swap_read(addr, oldval, newval):";
-    AO_compare_and_swap_read(addr, oldval, newval);
-# else
-    "No AO_compare_and_swap_read";
-# endif
-}
-
-
-    
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-/* This generates a compilable program.  But it is really meant to be  */
-/* be used only with cc -E, to inspect the expensions generated by     */
-/* primitives.                                                         */
-
-/* The result will not link or run.                                    */
-
-void list_atomic_write(void)
-{
-  AO_T *addr, val, newval, oldval;
-  AO_TS_T tsaddr;
-  long incr;
-
-# if defined(AO_HAVE_nop_write)
-    "AO_nop_write(): ";
-    AO_nop_write();
-# else
-    "No AO_nop_write";
-# endif
-# if defined(AO_HAVE_load_write)
-    "AO_load_write(addr):";
-    AO_load_write(addr);
-# else
-    "No AO_load_write";
-# endif
-# if defined(AO_HAVE_store_write)
-    "AO_store_write(addr, val):";
-    AO_store_write(addr, val);
-# else
-    "No AO_store_write";
-# endif
-# if defined(AO_HAVE_test_and_set_write)
-    "AO_test_and_set_write(tsaddr):";
-    AO_test_and_set_write(tsaddr);
-# else
-    "No AO_test_and_set_write";
-# endif
-# if defined(AO_HAVE_fetch_and_add1_write)
-    "AO_fetch_and_add1_write(addr):";
-    AO_fetch_and_add1_write(addr);
-# else
-    "No AO_fetch_and_add1_write";
-# endif
-# if defined(AO_HAVE_fetch_and_sub1_write)
-    "AO_fetch_and_sub1_write(addr):";
-    AO_fetch_and_sub1_write(addr);
-# else
-    "No AO_fetch_and_sub1_write";
-# endif
-# if defined(AO_HAVE_fetch_and_add_write)
-    "AO_fetch_and_add_write(addr, incr):";
-    AO_fetch_and_add_write(addr, incr);
-# else
-    "No AO_fetch_and_add_write";
-# endif
-# if defined(AO_HAVE_compare_and_swap_write)
-    "AO_compare_and_swap_write(addr, oldval, newval):";
-    AO_compare_and_swap_write(addr, oldval, newval);
-# else
-    "No AO_compare_and_swap_write";
-# endif
-}
-
-
-    
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-/* This generates a compilable program.  But it is really meant to be  */
-/* be used only with cc -E, to inspect the expensions generated by     */
-/* primitives.                                                         */
-
-/* The result will not link or run.                                    */
-
-void list_atomic_full(void)
-{
-  AO_T *addr, val, newval, oldval;
-  AO_TS_T tsaddr;
-  long incr;
-
-# if defined(AO_HAVE_nop_full)
-    "AO_nop_full(): ";
-    AO_nop_full();
-# else
-    "No AO_nop_full";
-# endif
-# if defined(AO_HAVE_load_full)
-    "AO_load_full(addr):";
-    AO_load_full(addr);
-# else
-    "No AO_load_full";
-# endif
-# if defined(AO_HAVE_store_full)
-    "AO_store_full(addr, val):";
-    AO_store_full(addr, val);
-# else
-    "No AO_store_full";
-# endif
-# if defined(AO_HAVE_test_and_set_full)
-    "AO_test_and_set_full(tsaddr):";
-    AO_test_and_set_full(tsaddr);
-# else
-    "No AO_test_and_set_full";
-# endif
-# if defined(AO_HAVE_fetch_and_add1_full)
-    "AO_fetch_and_add1_full(addr):";
-    AO_fetch_and_add1_full(addr);
-# else
-    "No AO_fetch_and_add1_full";
-# endif
-# if defined(AO_HAVE_fetch_and_sub1_full)
-    "AO_fetch_and_sub1_full(addr):";
-    AO_fetch_and_sub1_full(addr);
-# else
-    "No AO_fetch_and_sub1_full";
-# endif
-# if defined(AO_HAVE_fetch_and_add_full)
-    "AO_fetch_and_add_full(addr, incr):";
-    AO_fetch_and_add_full(addr, incr);
-# else
-    "No AO_fetch_and_add_full";
-# endif
-# if defined(AO_HAVE_compare_and_swap_full)
-    "AO_compare_and_swap_full(addr, oldval, newval):";
-    AO_compare_and_swap_full(addr, oldval, newval);
-# else
-    "No AO_compare_and_swap_full";
-# endif
-}
-
-
-    
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-/* This generates a compilable program.  But it is really meant to be  */
-/* be used only with cc -E, to inspect the expensions generated by     */
-/* primitives.                                                         */
-
-/* The result will not link or run.                                    */
-
-void list_atomic_release_write(void)
-{
-  AO_T *addr, val, newval, oldval;
-  AO_TS_T tsaddr;
-  long incr;
-
-# if defined(AO_HAVE_nop_release_write)
-    "AO_nop_release_write(): ";
-    AO_nop_release_write();
-# else
-    "No AO_nop_release_write";
-# endif
-# if defined(AO_HAVE_load_release_write)
-    "AO_load_release_write(addr):";
-    AO_load_release_write(addr);
-# else
-    "No AO_load_release_write";
-# endif
-# if defined(AO_HAVE_store_release_write)
-    "AO_store_release_write(addr, val):";
-    AO_store_release_write(addr, val);
-# else
-    "No AO_store_release_write";
-# endif
-# if defined(AO_HAVE_test_and_set_release_write)
-    "AO_test_and_set_release_write(tsaddr):";
-    AO_test_and_set_release_write(tsaddr);
-# else
-    "No AO_test_and_set_release_write";
-# endif
-# if defined(AO_HAVE_fetch_and_add1_release_write)
-    "AO_fetch_and_add1_release_write(addr):";
-    AO_fetch_and_add1_release_write(addr);
-# else
-    "No AO_fetch_and_add1_release_write";
-# endif
-# if defined(AO_HAVE_fetch_and_sub1_release_write)
-    "AO_fetch_and_sub1_release_write(addr):";
-    AO_fetch_and_sub1_release_write(addr);
-# else
-    "No AO_fetch_and_sub1_release_write";
-# endif
-# if defined(AO_HAVE_fetch_and_add_release_write)
-    "AO_fetch_and_add_release_write(addr, incr):";
-    AO_fetch_and_add_release_write(addr, incr);
-# else
-    "No AO_fetch_and_add_release_write";
-# endif
-# if defined(AO_HAVE_compare_and_swap_release_write)
-    "AO_compare_and_swap_release_write(addr, oldval, newval):";
-    AO_compare_and_swap_release_write(addr, oldval, newval);
-# else
-    "No AO_compare_and_swap_release_write";
-# endif
-}
-
-
-    
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-/* This generates a compilable program.  But it is really meant to be  */
-/* be used only with cc -E, to inspect the expensions generated by     */
-/* primitives.                                                         */
-
-/* The result will not link or run.                                    */
-
-void list_atomic_acquire_read(void)
-{
-  AO_T *addr, val, newval, oldval;
-  AO_TS_T tsaddr;
-  long incr;
-
-# if defined(AO_HAVE_nop_acquire_read)
-    "AO_nop_acquire_read(): ";
-    AO_nop_acquire_read();
-# else
-    "No AO_nop_acquire_read";
-# endif
-# if defined(AO_HAVE_load_acquire_read)
-    "AO_load_acquire_read(addr):";
-    AO_load_acquire_read(addr);
-# else
-    "No AO_load_acquire_read";
-# endif
-# if defined(AO_HAVE_store_acquire_read)
-    "AO_store_acquire_read(addr, val):";
-    AO_store_acquire_read(addr, val);
-# else
-    "No AO_store_acquire_read";
-# endif
-# if defined(AO_HAVE_test_and_set_acquire_read)
-    "AO_test_and_set_acquire_read(tsaddr):";
-    AO_test_and_set_acquire_read(tsaddr);
-# else
-    "No AO_test_and_set_acquire_read";
-# endif
-# if defined(AO_HAVE_fetch_and_add1_acquire_read)
-    "AO_fetch_and_add1_acquire_read(addr):";
-    AO_fetch_and_add1_acquire_read(addr);
-# else
-    "No AO_fetch_and_add1_acquire_read";
-# endif
-# if defined(AO_HAVE_fetch_and_sub1_acquire_read)
-    "AO_fetch_and_sub1_acquire_read(addr):";
-    AO_fetch_and_sub1_acquire_read(addr);
-# else
-    "No AO_fetch_and_sub1_acquire_read";
-# endif
-# if defined(AO_HAVE_fetch_and_add_acquire_read)
-    "AO_fetch_and_add_acquire_read(addr, incr):";
-    AO_fetch_and_add_acquire_read(addr, incr);
-# else
-    "No AO_fetch_and_add_acquire_read";
-# endif
-# if defined(AO_HAVE_compare_and_swap_acquire_read)
-    "AO_compare_and_swap_acquire_read(addr, oldval, newval):";
-    AO_compare_and_swap_acquire_read(addr, oldval, newval);
-# else
-    "No AO_compare_and_swap_acquire_read";
-# endif
-}
-
-
-    
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/tests/list_atomic.template b/src/mm/boehm-gc/libatomic_ops-1.2/tests/list_atomic.template
deleted file mode 100644 (file)
index a3d36e3..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-/* This generates a compilable program.  But it is really meant to be  */
-/* be used only with cc -E, to inspect the expensions generated by     */
-/* primitives.                                                         */
-
-/* The result will not link or run.                                    */
-
-void list_atomicXX(void)
-{
-  AO_T *addr, val, newval, oldval;
-  AO_TS_T tsaddr;
-  long incr;
-
-# if defined(AO_HAVE_nopXX)
-    "AO_nopXX(): ";
-    AO_nopXX();
-# else
-    "No AO_nopXX";
-# endif
-# if defined(AO_HAVE_loadXX)
-    "AO_loadXX(addr):";
-    AO_loadXX(addr);
-# else
-    "No AO_loadXX";
-# endif
-# if defined(AO_HAVE_storeXX)
-    "AO_storeXX(addr, val):";
-    AO_storeXX(addr, val);
-# else
-    "No AO_storeXX";
-# endif
-# if defined(AO_HAVE_test_and_setXX)
-    "AO_test_and_setXX(tsaddr):";
-    AO_test_and_setXX(tsaddr);
-# else
-    "No AO_test_and_setXX";
-# endif
-# if defined(AO_HAVE_fetch_and_add1XX)
-    "AO_fetch_and_add1XX(addr):";
-    AO_fetch_and_add1XX(addr);
-# else
-    "No AO_fetch_and_add1XX";
-# endif
-# if defined(AO_HAVE_fetch_and_sub1XX)
-    "AO_fetch_and_sub1XX(addr):";
-    AO_fetch_and_sub1XX(addr);
-# else
-    "No AO_fetch_and_sub1XX";
-# endif
-# if defined(AO_HAVE_fetch_and_addXX)
-    "AO_fetch_and_addXX(addr, incr):";
-    AO_fetch_and_addXX(addr, incr);
-# else
-    "No AO_fetch_and_addXX";
-# endif
-# if defined(AO_HAVE_compare_and_swapXX)
-    "AO_compare_and_swapXX(addr, oldval, newval):";
-    AO_compare_and_swapXX(addr, oldval, newval);
-# else
-    "No AO_compare_and_swapXX";
-# endif
-}
-
-
-    
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/tests/run_parallel.inc b/src/mm/boehm-gc/libatomic_ops-1.2/tests/run_parallel.inc
deleted file mode 100644 (file)
index 1a87c8b..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-#if defined(_MSC_VER) || \
-    defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__CYGWIN__) || \
-    defined(_WIN32_WINCE)
-#  define USE_WINTHREADS
-#elif defined(__vxworks)
-#  define USE_VXTHREADS
-#else
-#  define USE_PTHREADS
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#ifdef USE_PTHREADS
-# include <pthread.h>
-#endif
-
-#ifdef USE_VXTHREADS
-# include <vxworks.h>
-# include <taskLib.h>
-#endif
-
-#ifdef USE_WINTHREADS
-# include <windows.h>
-#endif
-
-#include "atomic_ops.h"
-
-typedef void * (* thr_func)(void *);
-
-typedef int (* test_func)(void);       /* Returns != 0 on success */
-
-void * run_parallel(int nthreads, thr_func f1, test_func t, const char *name);
-
-#ifdef USE_PTHREADS
-void * run_parallel(int nthreads, thr_func f1, test_func t, const char *name)
-{
-  pthread_attr_t attr;
-  pthread_t thr[100];
-  int i;
-  int code;
-
-  fprintf(stderr, "Testing %s\n", name);
-  if (nthreads > 100) 
-    {
-      fprintf(stderr, "run_parallel: requested too many threads\n");
-      abort();
-    }
-
-# ifdef _HPUX_SOURCE
-   /* Default stack size is too small, especially with the 64 bit ABI */
-   /* Increase it.                                                    */
-    if (pthread_default_stacksize_np(1024*1024, 0) != 0) {
-      fprintf(stderr, "pthread_default_stacksize_np failed. "
-                     "OK after first call.\n");
-    }
-# endif
-
-  pthread_attr_init(&attr);
-
-  for (i = 0; i < nthreads; ++i)
-    {
-      if ((code = pthread_create(thr + i, &attr, f1, (void *)(long)i)) != 0)
-       {
-         perror("Thread creation failed");
-         fprintf(stderr, "Pthread_create returned %d, thread %d\n", code, i);
-         abort();
-        }
-    }
-  for (i = 0; i < nthreads; ++i)
-    {
-      if ((code = pthread_join(thr[i], NULL)) != 0)
-       {
-         perror("Thread join failed");
-         fprintf(stderr, "Pthread_join returned %d, thread %d\n", code, i);
-         abort();
-        }
-    }
-  if (t())
-    {
-      fprintf(stderr, "Succeeded\n");
-    }
-  else
-    {
-      fprintf(stderr, "Failed\n");
-      abort();
-    }
-  return 0;
-}
-#endif /* USE_PTHREADS */
-
-#ifdef USE_VXTHREADS
-void * run_parallel(int nthreads, thr_func f1, test_func t, const char *name)
-{
-  int thr[100];
-  int i;
-
-  fprintf(stderr, "Testing %s\n", name);
-  if (nthreads > 100) 
-    {
-      fprintf(stderr, "run_parallel: requested too many threads\n");
-      taskSuspend(0);
-    }
-
-  for (i = 0; i < nthreads; ++i)
-    {
-      thr[i] = taskSpawn((char*) name, 180, 0, 32768, (FUNCPTR) f1, i,
-                         1, 2, 3, 4, 5, 6, 7, 8, 9);
-      if (thr[i] == ERROR)
-       {
-         fprintf(stderr, "taskSpawn failed with %d, thread %d\n",
-                         errno, i);
-         taskSuspend(0);
-        }
-    }
-  for (i = 0; i < nthreads; ++i)
-    {
-      while (taskIdVerify(thr[i]) == OK)
-        taskDelay(60);
-    }
-  if (t())
-    {
-      fprintf(stderr, "Succeeded\n");
-    }
-  else
-    {
-      fprintf(stderr, "Failed\n");
-      taskSuspend(0);
-    }
-  return 0;
-}
-#endif /* USE_VXTHREADS */
-
-#ifdef USE_WINTHREADS
-
-struct tramp_args {
-  thr_func fn;
-  long arg;
-};
-
-DWORD WINAPI tramp(LPVOID param)
-{
-  struct tramp_args *args = (struct tramp_args *)param;
-
-  return (DWORD)(args -> fn)((LPVOID)(args -> arg));
-}
-
-void * run_parallel(int nthreads, thr_func f1, test_func t, const char *name)
-{
-  HANDLE thr[100];
-  struct tramp_args args[100];
-  int i;
-  DWORD code;
-
-  fprintf(stderr, "Testing %s\n", name);
-  if (nthreads > 100) 
-    {
-      fprintf(stderr, "run_parallel: requested too many threads\n");
-      abort();
-    }
-
-  for (i = 0; i < nthreads; ++i)
-    {
-      args[i].fn = f1;
-      args[i].arg = i;
-      if ((thr[i] = CreateThread(NULL, 0, tramp, (LPVOID)(args+i), 0, NULL))
-         == NULL)
-       {
-         perror("Thread creation failed");
-         fprintf(stderr, "CreateThread failed with %d, thread %d\n",
-                         GetLastError(), i);
-         abort();
-        }
-    }
-  for (i = 0; i < nthreads; ++i)
-    {
-      if ((code = WaitForSingleObject(thr[i], INFINITE)) != WAIT_OBJECT_0)
-       {
-         perror("Thread join failed");
-         fprintf(stderr, "WaitForSingleObject returned %d, thread %d\n",
-                         code, i);
-         abort();
-        }
-    }
-  if (t())
-    {
-      fprintf(stderr, "Succeeded\n");
-    }
-  else
-    {
-      fprintf(stderr, "Failed\n");
-      abort();
-    }
-  return 0;
-}
-#endif /* USE_WINTHREADS */
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/tests/test_atomic.c b/src/mm/boehm-gc/libatomic_ops-1.2/tests/test_atomic.c
deleted file mode 100644 (file)
index d31297d..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-/*  
- * Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P.
- * Original Author: Hans Boehm
- *
- * This file may be redistributed and/or modified under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2, or (at your option) any later version.
- * 
- * It is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE.  See the GNU General Public License in the
- * file doc/COPYING for more details.
- */
-
-#if defined(HAVE_CONFIG_H)
-# include "config.h"
-#endif
-
-
-#include "run_parallel.inc"
-
-#include "test_atomic_include.h"
-
-#ifdef AO_USE_PTHREAD_DEFS
-# define NITERS 100000
-#else
-# define NITERS 10000000
-#endif
-
-void * add1sub1_thr(void * id);
-int add1sub1_test(void);
-void * acqrel_thr(void *id);
-int acqrel_test(void);
-void * test_and_set_thr(void * id);
-int test_and_set_test(void);
-
-#if defined(AO_HAVE_fetch_and_add1) && defined(AO_HAVE_fetch_and_sub1)
-
-AO_t counter = 0;
-
-void * add1sub1_thr(void * id)
-{
-  int me = (int)(long)id;
-
-  int i;
-
-  for (i = 0; i < NITERS; ++i)
-    if (me & 1)
-      AO_fetch_and_sub1(&counter);
-    else
-      AO_fetch_and_add1(&counter);
-
-  return 0;
-}
-
-int add1sub1_test(void)
-{
-  return counter == 0;
-}
-
-#endif /* defined(AO_HAVE_fetch_and_add1) && defined(AO_HAVE_fetch_and_sub1) */
-
-#if defined(AO_HAVE_store_release_write) && defined(AO_HAVE_load_acquire_read)
-
-/* Invariant: counter1 >= counter2 */
-AO_t counter1 = 0;
-AO_t counter2 = 0;
-
-void * acqrel_thr(void *id)
-{
-  int me = (int)(long)id;
-
-  int i;
-
-  for (i = 0; i < NITERS; ++i)
-    if (me & 1)
-      {
-        AO_t my_counter1;
-       if (me != 1)
-         fprintf(stderr, "acqrel test: too many threads\n");
-       my_counter1 = AO_load(&counter1);
-       AO_store(&counter1, my_counter1 + 1);
-       AO_store_release_write(&counter2, my_counter1 + 1);
-      }
-    else
-      {
-       AO_t my_counter1a, my_counter2a;
-       AO_t my_counter1b, my_counter2b;
-
-       my_counter2a = AO_load_acquire_read(&counter2);
-       my_counter1a = AO_load(&counter1);
-       /* Redo this, to make sure that the second load of counter1     */
-       /* is not viewed as a common subexpression.                     */
-       my_counter2b = AO_load_acquire_read(&counter2);
-       my_counter1b = AO_load(&counter1);
-       if (my_counter1a < my_counter2a)
-         {
-           fprintf(stderr, "Saw release store out of order: %lu < %lu\n",
-                   (unsigned long)my_counter1a, (unsigned long)my_counter2a);
-           abort();
-         }
-       if (my_counter1b < my_counter2b)
-         {
-           fprintf(stderr,
-                   "Saw release store out of order (bad CSE?): %lu < %lu\n",
-                   (unsigned long)my_counter1b, (unsigned long)my_counter2b);
-           abort();
-         }
-      }
-
-  return 0;
-}
-
-int acqrel_test(void)
-{
-  return counter1 == NITERS && counter2 == NITERS;
-}
-
-#endif /* AO_HAVE_store_release_write && AO_HAVE_load_acquire_read */
-
-#if defined(AO_HAVE_test_and_set_acquire)
-
-AO_TS_T lock = AO_TS_INITIALIZER;
-
-unsigned long locked_counter;
-volatile unsigned long junk = 13;
-
-void * test_and_set_thr(void * id)
-{
-  unsigned long i;
-
-  for (i = 0; i < NITERS/10; ++i)
-    {
-      while (AO_test_and_set_acquire(&lock) != AO_TS_CLEAR);
-      ++locked_counter;
-      if (locked_counter != 1)
-        {
-          fprintf(stderr, "Test and set failure 1, counter = %ld\n",
-                     locked_counter);
-          abort();
-        }
-      locked_counter *= 2;
-      locked_counter -= 1;
-      locked_counter *= 5;
-      locked_counter -= 4;
-      if (locked_counter != 1)
-        {
-          fprintf(stderr, "Test and set failure 2, counter = %ld\n",
-                     locked_counter);
-          abort();
-        }
-      --locked_counter;
-      AO_CLEAR(&lock);
-      /* Spend a bit of time outside the lock. */
-        junk *= 17;
-        junk *= 17;
-    }
-  return 0;
-}
-
-int test_and_set_test(void)
-{
-  return locked_counter == 0;
-}
-
-#endif /* defined(AO_HAVE_test_and_set_acquire) */
-
-int main()
-{
-  test_atomic();
-  test_atomic_acquire();
-  test_atomic_release();
-  test_atomic_read();
-  test_atomic_write();
-  test_atomic_full();
-  test_atomic_release_write();
-  test_atomic_acquire_read();
-# if defined(AO_HAVE_fetch_and_add1) && defined(AO_HAVE_fetch_and_sub1)
-    run_parallel(4, add1sub1_thr, add1sub1_test, "add1/sub1");
-# endif
-# if defined(AO_HAVE_store_release_write) && defined(AO_HAVE_load_acquire_read)
-    run_parallel(3, acqrel_thr, acqrel_test,
-                "store_release_write/load_acquire_read");
-# endif
-# if defined(AO_HAVE_test_and_set_acquire)
-    run_parallel(5, test_and_set_thr, test_and_set_test,
-                "test_and_set");
-# endif
-  return 0;
-}
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/tests/test_atomic.template b/src/mm/boehm-gc/libatomic_ops-1.2/tests/test_atomic.template
deleted file mode 100644 (file)
index f80eac8..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-/* Some basic sanity tests.  These do not test the barrier semantics. */
-
-#undef TA_assert
-#define TA_assert(e) \
-  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: XX)\n", \
-                   __FILE__, __LINE__), exit(1); }
-
-#undef MISSING
-#define MISSING(name) \
-  fprintf(stderr, "Missing: %s\n", #name "XX")
-
-void test_atomicXX(void)
-{
-  AO_t x;
-  unsigned char b;
-  unsigned short s;
-  unsigned int zz;
-# if defined(AO_HAVE_test_and_setXX)
-    AO_TS_t z = AO_TS_INITIALIZER;
-# endif
-# if defined(AO_HAVE_double_t)
-    AO_double_t w;
-    w.AO_val1 = 0;
-    w.AO_val2 = 0;
-# endif
-
-# if defined(AO_HAVE_nopXX)
-    AO_nopXX();
-# else
-    MISSING(AO_nop);
-# endif
-# if defined(AO_HAVE_storeXX)
-    AO_storeXX(&x, 13);
-    TA_assert (x == 13);
-# else
-    MISSING(AO_store);
-    x = 13;
-# endif
-# if defined(AO_HAVE_loadXX)
-    TA_assert(AO_loadXX(&x) == 13);
-# else
-    MISSING(AO_load);
-# endif
-# if defined(AO_HAVE_test_and_setXX)
-    assert(AO_test_and_setXX(&z) == AO_TS_CLEAR);
-    assert(AO_test_and_setXX(&z) == AO_TS_SET);
-    assert(AO_test_and_setXX(&z) == AO_TS_SET);
-    AO_CLEAR(&z);
-# else
-    MISSING(AO_test_and_set);
-# endif
-# if defined(AO_HAVE_fetch_and_addXX)
-    TA_assert(AO_fetch_and_addXX(&x, 42) == 13);
-    TA_assert(AO_fetch_and_addXX(&x, -42) == 55);
-# else
-    MISSING(AO_fetch_and_add);
-# endif
-# if defined(AO_HAVE_fetch_and_add1XX)
-    TA_assert(AO_fetch_and_add1XX(&x) == 13);
-# else
-    MISSING(AO_fetch_and_add1);
-    ++x;
-# endif
-# if defined(AO_HAVE_fetch_and_sub1XX)
-    TA_assert(AO_fetch_and_sub1XX(&x) == 14);
-# else
-    MISSING(AO_fetch_and_sub1);
-    --x;
-# endif
-# if defined(AO_HAVE_short_storeXX)
-    AO_short_storeXX(&s, 13);
-# else
-    MISSING(AO_short_store);
-    s = 13;
-# endif
-# if defined(AO_HAVE_short_loadXX)
-    TA_assert(AO_short_load(&s) == 13);
-# else
-    MISSING(AO_short_load);
-# endif
-# if defined(AO_HAVE_short_fetch_and_addXX)
-    TA_assert(AO_short_fetch_and_addXX(&s, 42) == 13);
-    TA_assert(AO_short_fetch_and_addXX(&s, -42) == 55);
-# else
-    MISSING(AO_short_fetch_and_add);
-# endif
-# if defined(AO_HAVE_short_fetch_and_add1XX)
-    TA_assert(AO_short_fetch_and_add1XX(&s) == 13);
-# else
-    MISSING(AO_short_fetch_and_add1);
-    ++s;
-# endif
-# if defined(AO_HAVE_short_fetch_and_sub1XX)
-    TA_assert(AO_short_fetch_and_sub1XX(&s) == 14);
-# else
-    MISSING(AO_short_fetch_and_sub1);
-    --s;
-# endif
-# if defined(AO_HAVE_char_storeXX)
-    AO_char_storeXX(&b, 13);
-# else
-    MISSING(AO_char_store);
-    b = 13;
-# endif
-# if defined(AO_HAVE_char_loadXX)
-    TA_assert(AO_char_load(&b) == 13);
-# else
-    MISSING(AO_char_load);
-# endif
-# if defined(AO_HAVE_char_fetch_and_addXX)
-    TA_assert(AO_char_fetch_and_addXX(&b, 42) == 13);
-    TA_assert(AO_char_fetch_and_addXX(&b, -42) == 55);
-# else
-    MISSING(AO_char_fetch_and_add);
-# endif
-# if defined(AO_HAVE_char_fetch_and_add1XX)
-    TA_assert(AO_char_fetch_and_add1XX(&b) == 13);
-# else
-    MISSING(AO_char_fetch_and_add1);
-    ++b;
-# endif
-# if defined(AO_HAVE_char_fetch_and_sub1XX)
-    TA_assert(AO_char_fetch_and_sub1XX(&b) == 14);
-# else
-    MISSING(AO_char_fetch_and_sub1);
-    --b;
-# endif
-# if defined(AO_HAVE_int_storeXX)
-    AO_int_storeXX(&zz, 13);
-# else
-    MISSING(AO_int_store);
-    zz = 13;
-# endif
-# if defined(AO_HAVE_int_loadXX)
-    TA_assert(AO_int_load(&zz) == 13);
-# else
-    MISSING(AO_int_load);
-# endif
-# if defined(AO_HAVE_int_fetch_and_addXX)
-    TA_assert(AO_int_fetch_and_addXX(&zz, 42) == 13);
-    TA_assert(AO_int_fetch_and_addXX(&zz, -42) == 55);
-# else
-    MISSING(AO_int_fetch_and_add);
-# endif
-# if defined(AO_HAVE_int_fetch_and_add1XX)
-    TA_assert(AO_int_fetch_and_add1XX(&zz) == 13);
-# else
-    MISSING(AO_int_fetch_and_add1);
-    ++zz;
-# endif
-# if defined(AO_HAVE_int_fetch_and_sub1XX)
-    TA_assert(AO_int_fetch_and_sub1XX(&zz) == 14);
-# else
-    MISSING(AO_int_fetch_and_sub1);
-    --zz;
-# endif
-# if defined(AO_HAVE_compare_and_swapXX)
-    TA_assert(!AO_compare_and_swapXX(&x, 14, 42));
-    TA_assert(x == 13);
-    TA_assert(AO_compare_and_swapXX(&x, 13, 42));
-    TA_assert(x == 42);
-# else
-    MISSING(AO_compare_and_swap);
-# endif
-# if defined(AO_HAVE_orXX)
-    AO_orXX(&x, 66);
-    TA_assert(x == 106);
-# else
-    MISSING(AO_or);
-    x |= 34;
-# endif
-# if defined(AO_HAVE_compare_double_and_swap_doubleXX)
-    TA_assert(!AO_compare_double_and_swap_doubleXX(&w, 17, 42, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_double_and_swap_doubleXX(&w, 0, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_double_and_swap_doubleXX(&w, 12, 13, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-    w.AO_val1 = 0; w.AO_val2 = 0;
-# else
-    MISSING(AO_compare_double_and_swap_double);
-# endif
-# if defined(AO_HAVE_compare_and_swap_doubleXX)
-    TA_assert(!AO_compare_and_swap_doubleXX(&w, 17, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_and_swap_doubleXX(&w, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_and_swap_doubleXX(&w, 12, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-# else
-    MISSING(AO_compare_and_swap_double);
-# endif
-}
-
-
-    
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/tests/test_atomic_include.h b/src/mm/boehm-gc/libatomic_ops-1.2/tests/test_atomic_include.h
deleted file mode 100644 (file)
index bc280eb..0000000
+++ /dev/null
@@ -1,1633 +0,0 @@
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-void test_atomic(void);
-void test_atomic_release(void);
-void test_atomic_acquire(void);
-void test_atomic_read(void);
-void test_atomic_write(void);
-void test_atomic_full(void);
-void test_atomic_release_write(void);
-void test_atomic_acquire_read(void);
-
-/* Some basic sanity tests.  These do not test the barrier semantics. */
-
-#undef TA_assert
-#define TA_assert(e) \
-  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: )\n", \
-                   __FILE__, __LINE__), exit(1); }
-
-#undef MISSING
-#define MISSING(name) \
-  fprintf(stderr, "Missing: %s\n", #name "")
-
-void test_atomic(void)
-{
-  AO_t x;
-  unsigned char b;
-  unsigned short s;
-  unsigned int zz;
-# if defined(AO_HAVE_test_and_set)
-    AO_TS_t z = AO_TS_INITIALIZER;
-# endif
-# if defined(AO_HAVE_double_t)
-    AO_double_t w;
-    w.AO_val1 = 0;
-    w.AO_val2 = 0;
-# endif
-
-# if defined(AO_HAVE_nop)
-    AO_nop();
-# else
-    MISSING(AO_nop);
-# endif
-# if defined(AO_HAVE_store)
-    AO_store(&x, 13);
-    TA_assert (x == 13);
-# else
-    MISSING(AO_store);
-    x = 13;
-# endif
-# if defined(AO_HAVE_load)
-    TA_assert(AO_load(&x) == 13);
-# else
-    MISSING(AO_load);
-# endif
-# if defined(AO_HAVE_test_and_set)
-    assert(AO_test_and_set(&z) == AO_TS_CLEAR);
-    assert(AO_test_and_set(&z) == AO_TS_SET);
-    assert(AO_test_and_set(&z) == AO_TS_SET);
-    AO_CLEAR(&z);
-# else
-    MISSING(AO_test_and_set);
-# endif
-# if defined(AO_HAVE_fetch_and_add)
-    TA_assert(AO_fetch_and_add(&x, 42) == 13);
-    TA_assert(AO_fetch_and_add(&x, -42) == 55);
-# else
-    MISSING(AO_fetch_and_add);
-# endif
-# if defined(AO_HAVE_fetch_and_add1)
-    TA_assert(AO_fetch_and_add1(&x) == 13);
-# else
-    MISSING(AO_fetch_and_add1);
-    ++x;
-# endif
-# if defined(AO_HAVE_fetch_and_sub1)
-    TA_assert(AO_fetch_and_sub1(&x) == 14);
-# else
-    MISSING(AO_fetch_and_sub1);
-    --x;
-# endif
-# if defined(AO_HAVE_short_store)
-    AO_short_store(&s, 13);
-# else
-    MISSING(AO_short_store);
-    s = 13;
-# endif
-# if defined(AO_HAVE_short_load)
-    TA_assert(AO_short_load(&s) == 13);
-# else
-    MISSING(AO_short_load);
-# endif
-# if defined(AO_HAVE_short_fetch_and_add)
-    TA_assert(AO_short_fetch_and_add(&s, 42) == 13);
-    TA_assert(AO_short_fetch_and_add(&s, -42) == 55);
-# else
-    MISSING(AO_short_fetch_and_add);
-# endif
-# if defined(AO_HAVE_short_fetch_and_add1)
-    TA_assert(AO_short_fetch_and_add1(&s) == 13);
-# else
-    MISSING(AO_short_fetch_and_add1);
-    ++s;
-# endif
-# if defined(AO_HAVE_short_fetch_and_sub1)
-    TA_assert(AO_short_fetch_and_sub1(&s) == 14);
-# else
-    MISSING(AO_short_fetch_and_sub1);
-    --s;
-# endif
-# if defined(AO_HAVE_char_store)
-    AO_char_store(&b, 13);
-# else
-    MISSING(AO_char_store);
-    b = 13;
-# endif
-# if defined(AO_HAVE_char_load)
-    TA_assert(AO_char_load(&b) == 13);
-# else
-    MISSING(AO_char_load);
-# endif
-# if defined(AO_HAVE_char_fetch_and_add)
-    TA_assert(AO_char_fetch_and_add(&b, 42) == 13);
-    TA_assert(AO_char_fetch_and_add(&b, -42) == 55);
-# else
-    MISSING(AO_char_fetch_and_add);
-# endif
-# if defined(AO_HAVE_char_fetch_and_add1)
-    TA_assert(AO_char_fetch_and_add1(&b) == 13);
-# else
-    MISSING(AO_char_fetch_and_add1);
-    ++b;
-# endif
-# if defined(AO_HAVE_char_fetch_and_sub1)
-    TA_assert(AO_char_fetch_and_sub1(&b) == 14);
-# else
-    MISSING(AO_char_fetch_and_sub1);
-    --b;
-# endif
-# if defined(AO_HAVE_int_store)
-    AO_int_store(&zz, 13);
-# else
-    MISSING(AO_int_store);
-    zz = 13;
-# endif
-# if defined(AO_HAVE_int_load)
-    TA_assert(AO_int_load(&zz) == 13);
-# else
-    MISSING(AO_int_load);
-# endif
-# if defined(AO_HAVE_int_fetch_and_add)
-    TA_assert(AO_int_fetch_and_add(&zz, 42) == 13);
-    TA_assert(AO_int_fetch_and_add(&zz, -42) == 55);
-# else
-    MISSING(AO_int_fetch_and_add);
-# endif
-# if defined(AO_HAVE_int_fetch_and_add1)
-    TA_assert(AO_int_fetch_and_add1(&zz) == 13);
-# else
-    MISSING(AO_int_fetch_and_add1);
-    ++zz;
-# endif
-# if defined(AO_HAVE_int_fetch_and_sub1)
-    TA_assert(AO_int_fetch_and_sub1(&zz) == 14);
-# else
-    MISSING(AO_int_fetch_and_sub1);
-    --zz;
-# endif
-# if defined(AO_HAVE_compare_and_swap)
-    TA_assert(!AO_compare_and_swap(&x, 14, 42));
-    TA_assert(x == 13);
-    TA_assert(AO_compare_and_swap(&x, 13, 42));
-    TA_assert(x == 42);
-# else
-    MISSING(AO_compare_and_swap);
-# endif
-# if defined(AO_HAVE_or)
-    AO_or(&x, 66);
-    TA_assert(x == 106);
-# else
-    MISSING(AO_or);
-    x |= 34;
-# endif
-# if defined(AO_HAVE_compare_double_and_swap_double)
-    TA_assert(!AO_compare_double_and_swap_double(&w, 17, 42, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_double_and_swap_double(&w, 0, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_double_and_swap_double(&w, 12, 13, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-    w.AO_val1 = 0; w.AO_val2 = 0;
-# else
-    MISSING(AO_compare_double_and_swap_double);
-# endif
-# if defined(AO_HAVE_compare_and_swap_double)
-    TA_assert(!AO_compare_and_swap_double(&w, 17, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_and_swap_double(&w, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_and_swap_double(&w, 12, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-# else
-    MISSING(AO_compare_and_swap_double);
-# endif
-}
-
-
-    
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-/* Some basic sanity tests.  These do not test the barrier semantics. */
-
-#undef TA_assert
-#define TA_assert(e) \
-  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: _release)\n", \
-                   __FILE__, __LINE__), exit(1); }
-
-#undef MISSING
-#define MISSING(name) \
-  fprintf(stderr, "Missing: %s\n", #name "_release")
-
-void test_atomic_release(void)
-{
-  AO_t x;
-  unsigned char b;
-  unsigned short s;
-  unsigned int zz;
-# if defined(AO_HAVE_test_and_set_release)
-    AO_TS_t z = AO_TS_INITIALIZER;
-# endif
-# if defined(AO_HAVE_double_t)
-    AO_double_t w;
-    w.AO_val1 = 0;
-    w.AO_val2 = 0;
-# endif
-
-# if defined(AO_HAVE_nop_release)
-    AO_nop_release();
-# else
-    MISSING(AO_nop);
-# endif
-# if defined(AO_HAVE_store_release)
-    AO_store_release(&x, 13);
-    TA_assert (x == 13);
-# else
-    MISSING(AO_store);
-    x = 13;
-# endif
-# if defined(AO_HAVE_load_release)
-    TA_assert(AO_load_release(&x) == 13);
-# else
-    MISSING(AO_load);
-# endif
-# if defined(AO_HAVE_test_and_set_release)
-    assert(AO_test_and_set_release(&z) == AO_TS_CLEAR);
-    assert(AO_test_and_set_release(&z) == AO_TS_SET);
-    assert(AO_test_and_set_release(&z) == AO_TS_SET);
-    AO_CLEAR(&z);
-# else
-    MISSING(AO_test_and_set);
-# endif
-# if defined(AO_HAVE_fetch_and_add_release)
-    TA_assert(AO_fetch_and_add_release(&x, 42) == 13);
-    TA_assert(AO_fetch_and_add_release(&x, -42) == 55);
-# else
-    MISSING(AO_fetch_and_add);
-# endif
-# if defined(AO_HAVE_fetch_and_add1_release)
-    TA_assert(AO_fetch_and_add1_release(&x) == 13);
-# else
-    MISSING(AO_fetch_and_add1);
-    ++x;
-# endif
-# if defined(AO_HAVE_fetch_and_sub1_release)
-    TA_assert(AO_fetch_and_sub1_release(&x) == 14);
-# else
-    MISSING(AO_fetch_and_sub1);
-    --x;
-# endif
-# if defined(AO_HAVE_short_store_release)
-    AO_short_store_release(&s, 13);
-# else
-    MISSING(AO_short_store);
-    s = 13;
-# endif
-# if defined(AO_HAVE_short_load_release)
-    TA_assert(AO_short_load(&s) == 13);
-# else
-    MISSING(AO_short_load);
-# endif
-# if defined(AO_HAVE_short_fetch_and_add_release)
-    TA_assert(AO_short_fetch_and_add_release(&s, 42) == 13);
-    TA_assert(AO_short_fetch_and_add_release(&s, -42) == 55);
-# else
-    MISSING(AO_short_fetch_and_add);
-# endif
-# if defined(AO_HAVE_short_fetch_and_add1_release)
-    TA_assert(AO_short_fetch_and_add1_release(&s) == 13);
-# else
-    MISSING(AO_short_fetch_and_add1);
-    ++s;
-# endif
-# if defined(AO_HAVE_short_fetch_and_sub1_release)
-    TA_assert(AO_short_fetch_and_sub1_release(&s) == 14);
-# else
-    MISSING(AO_short_fetch_and_sub1);
-    --s;
-# endif
-# if defined(AO_HAVE_char_store_release)
-    AO_char_store_release(&b, 13);
-# else
-    MISSING(AO_char_store);
-    b = 13;
-# endif
-# if defined(AO_HAVE_char_load_release)
-    TA_assert(AO_char_load(&b) == 13);
-# else
-    MISSING(AO_char_load);
-# endif
-# if defined(AO_HAVE_char_fetch_and_add_release)
-    TA_assert(AO_char_fetch_and_add_release(&b, 42) == 13);
-    TA_assert(AO_char_fetch_and_add_release(&b, -42) == 55);
-# else
-    MISSING(AO_char_fetch_and_add);
-# endif
-# if defined(AO_HAVE_char_fetch_and_add1_release)
-    TA_assert(AO_char_fetch_and_add1_release(&b) == 13);
-# else
-    MISSING(AO_char_fetch_and_add1);
-    ++b;
-# endif
-# if defined(AO_HAVE_char_fetch_and_sub1_release)
-    TA_assert(AO_char_fetch_and_sub1_release(&b) == 14);
-# else
-    MISSING(AO_char_fetch_and_sub1);
-    --b;
-# endif
-# if defined(AO_HAVE_int_store_release)
-    AO_int_store_release(&zz, 13);
-# else
-    MISSING(AO_int_store);
-    zz = 13;
-# endif
-# if defined(AO_HAVE_int_load_release)
-    TA_assert(AO_int_load(&zz) == 13);
-# else
-    MISSING(AO_int_load);
-# endif
-# if defined(AO_HAVE_int_fetch_and_add_release)
-    TA_assert(AO_int_fetch_and_add_release(&zz, 42) == 13);
-    TA_assert(AO_int_fetch_and_add_release(&zz, -42) == 55);
-# else
-    MISSING(AO_int_fetch_and_add);
-# endif
-# if defined(AO_HAVE_int_fetch_and_add1_release)
-    TA_assert(AO_int_fetch_and_add1_release(&zz) == 13);
-# else
-    MISSING(AO_int_fetch_and_add1);
-    ++zz;
-# endif
-# if defined(AO_HAVE_int_fetch_and_sub1_release)
-    TA_assert(AO_int_fetch_and_sub1_release(&zz) == 14);
-# else
-    MISSING(AO_int_fetch_and_sub1);
-    --zz;
-# endif
-# if defined(AO_HAVE_compare_and_swap_release)
-    TA_assert(!AO_compare_and_swap_release(&x, 14, 42));
-    TA_assert(x == 13);
-    TA_assert(AO_compare_and_swap_release(&x, 13, 42));
-    TA_assert(x == 42);
-# else
-    MISSING(AO_compare_and_swap);
-# endif
-# if defined(AO_HAVE_or_release)
-    AO_or_release(&x, 66);
-    TA_assert(x == 106);
-# else
-    MISSING(AO_or);
-    x |= 34;
-# endif
-# if defined(AO_HAVE_compare_double_and_swap_double_release)
-    TA_assert(!AO_compare_double_and_swap_double_release(&w, 17, 42, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_double_and_swap_double_release(&w, 0, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_double_and_swap_double_release(&w, 12, 13, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-    w.AO_val1 = 0; w.AO_val2 = 0;
-# else
-    MISSING(AO_compare_double_and_swap_double);
-# endif
-# if defined(AO_HAVE_compare_and_swap_double_release)
-    TA_assert(!AO_compare_and_swap_double_release(&w, 17, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_and_swap_double_release(&w, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_and_swap_double_release(&w, 12, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-# else
-    MISSING(AO_compare_and_swap_double);
-# endif
-}
-
-
-    
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-/* Some basic sanity tests.  These do not test the barrier semantics. */
-
-#undef TA_assert
-#define TA_assert(e) \
-  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: _acquire)\n", \
-                   __FILE__, __LINE__), exit(1); }
-
-#undef MISSING
-#define MISSING(name) \
-  fprintf(stderr, "Missing: %s\n", #name "_acquire")
-
-void test_atomic_acquire(void)
-{
-  AO_t x;
-  unsigned char b;
-  unsigned short s;
-  unsigned int zz;
-# if defined(AO_HAVE_test_and_set_acquire)
-    AO_TS_t z = AO_TS_INITIALIZER;
-# endif
-# if defined(AO_HAVE_double_t)
-    AO_double_t w;
-    w.AO_val1 = 0;
-    w.AO_val2 = 0;
-# endif
-
-# if defined(AO_HAVE_nop_acquire)
-    AO_nop_acquire();
-# else
-    MISSING(AO_nop);
-# endif
-# if defined(AO_HAVE_store_acquire)
-    AO_store_acquire(&x, 13);
-    TA_assert (x == 13);
-# else
-    MISSING(AO_store);
-    x = 13;
-# endif
-# if defined(AO_HAVE_load_acquire)
-    TA_assert(AO_load_acquire(&x) == 13);
-# else
-    MISSING(AO_load);
-# endif
-# if defined(AO_HAVE_test_and_set_acquire)
-    assert(AO_test_and_set_acquire(&z) == AO_TS_CLEAR);
-    assert(AO_test_and_set_acquire(&z) == AO_TS_SET);
-    assert(AO_test_and_set_acquire(&z) == AO_TS_SET);
-    AO_CLEAR(&z);
-# else
-    MISSING(AO_test_and_set);
-# endif
-# if defined(AO_HAVE_fetch_and_add_acquire)
-    TA_assert(AO_fetch_and_add_acquire(&x, 42) == 13);
-    TA_assert(AO_fetch_and_add_acquire(&x, -42) == 55);
-# else
-    MISSING(AO_fetch_and_add);
-# endif
-# if defined(AO_HAVE_fetch_and_add1_acquire)
-    TA_assert(AO_fetch_and_add1_acquire(&x) == 13);
-# else
-    MISSING(AO_fetch_and_add1);
-    ++x;
-# endif
-# if defined(AO_HAVE_fetch_and_sub1_acquire)
-    TA_assert(AO_fetch_and_sub1_acquire(&x) == 14);
-# else
-    MISSING(AO_fetch_and_sub1);
-    --x;
-# endif
-# if defined(AO_HAVE_short_store_acquire)
-    AO_short_store_acquire(&s, 13);
-# else
-    MISSING(AO_short_store);
-    s = 13;
-# endif
-# if defined(AO_HAVE_short_load_acquire)
-    TA_assert(AO_short_load(&s) == 13);
-# else
-    MISSING(AO_short_load);
-# endif
-# if defined(AO_HAVE_short_fetch_and_add_acquire)
-    TA_assert(AO_short_fetch_and_add_acquire(&s, 42) == 13);
-    TA_assert(AO_short_fetch_and_add_acquire(&s, -42) == 55);
-# else
-    MISSING(AO_short_fetch_and_add);
-# endif
-# if defined(AO_HAVE_short_fetch_and_add1_acquire)
-    TA_assert(AO_short_fetch_and_add1_acquire(&s) == 13);
-# else
-    MISSING(AO_short_fetch_and_add1);
-    ++s;
-# endif
-# if defined(AO_HAVE_short_fetch_and_sub1_acquire)
-    TA_assert(AO_short_fetch_and_sub1_acquire(&s) == 14);
-# else
-    MISSING(AO_short_fetch_and_sub1);
-    --s;
-# endif
-# if defined(AO_HAVE_char_store_acquire)
-    AO_char_store_acquire(&b, 13);
-# else
-    MISSING(AO_char_store);
-    b = 13;
-# endif
-# if defined(AO_HAVE_char_load_acquire)
-    TA_assert(AO_char_load(&b) == 13);
-# else
-    MISSING(AO_char_load);
-# endif
-# if defined(AO_HAVE_char_fetch_and_add_acquire)
-    TA_assert(AO_char_fetch_and_add_acquire(&b, 42) == 13);
-    TA_assert(AO_char_fetch_and_add_acquire(&b, -42) == 55);
-# else
-    MISSING(AO_char_fetch_and_add);
-# endif
-# if defined(AO_HAVE_char_fetch_and_add1_acquire)
-    TA_assert(AO_char_fetch_and_add1_acquire(&b) == 13);
-# else
-    MISSING(AO_char_fetch_and_add1);
-    ++b;
-# endif
-# if defined(AO_HAVE_char_fetch_and_sub1_acquire)
-    TA_assert(AO_char_fetch_and_sub1_acquire(&b) == 14);
-# else
-    MISSING(AO_char_fetch_and_sub1);
-    --b;
-# endif
-# if defined(AO_HAVE_int_store_acquire)
-    AO_int_store_acquire(&zz, 13);
-# else
-    MISSING(AO_int_store);
-    zz = 13;
-# endif
-# if defined(AO_HAVE_int_load_acquire)
-    TA_assert(AO_int_load(&zz) == 13);
-# else
-    MISSING(AO_int_load);
-# endif
-# if defined(AO_HAVE_int_fetch_and_add_acquire)
-    TA_assert(AO_int_fetch_and_add_acquire(&zz, 42) == 13);
-    TA_assert(AO_int_fetch_and_add_acquire(&zz, -42) == 55);
-# else
-    MISSING(AO_int_fetch_and_add);
-# endif
-# if defined(AO_HAVE_int_fetch_and_add1_acquire)
-    TA_assert(AO_int_fetch_and_add1_acquire(&zz) == 13);
-# else
-    MISSING(AO_int_fetch_and_add1);
-    ++zz;
-# endif
-# if defined(AO_HAVE_int_fetch_and_sub1_acquire)
-    TA_assert(AO_int_fetch_and_sub1_acquire(&zz) == 14);
-# else
-    MISSING(AO_int_fetch_and_sub1);
-    --zz;
-# endif
-# if defined(AO_HAVE_compare_and_swap_acquire)
-    TA_assert(!AO_compare_and_swap_acquire(&x, 14, 42));
-    TA_assert(x == 13);
-    TA_assert(AO_compare_and_swap_acquire(&x, 13, 42));
-    TA_assert(x == 42);
-# else
-    MISSING(AO_compare_and_swap);
-# endif
-# if defined(AO_HAVE_or_acquire)
-    AO_or_acquire(&x, 66);
-    TA_assert(x == 106);
-# else
-    MISSING(AO_or);
-    x |= 34;
-# endif
-# if defined(AO_HAVE_compare_double_and_swap_double_acquire)
-    TA_assert(!AO_compare_double_and_swap_double_acquire(&w, 17, 42, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_double_and_swap_double_acquire(&w, 0, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_double_and_swap_double_acquire(&w, 12, 13, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-    w.AO_val1 = 0; w.AO_val2 = 0;
-# else
-    MISSING(AO_compare_double_and_swap_double);
-# endif
-# if defined(AO_HAVE_compare_and_swap_double_acquire)
-    TA_assert(!AO_compare_and_swap_double_acquire(&w, 17, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_and_swap_double_acquire(&w, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_and_swap_double_acquire(&w, 12, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-# else
-    MISSING(AO_compare_and_swap_double);
-# endif
-}
-
-
-    
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-/* Some basic sanity tests.  These do not test the barrier semantics. */
-
-#undef TA_assert
-#define TA_assert(e) \
-  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: _read)\n", \
-                   __FILE__, __LINE__), exit(1); }
-
-#undef MISSING
-#define MISSING(name) \
-  fprintf(stderr, "Missing: %s\n", #name "_read")
-
-void test_atomic_read(void)
-{
-  AO_t x;
-  unsigned char b;
-  unsigned short s;
-  unsigned int zz;
-# if defined(AO_HAVE_test_and_set_read)
-    AO_TS_t z = AO_TS_INITIALIZER;
-# endif
-# if defined(AO_HAVE_double_t)
-    AO_double_t w;
-    w.AO_val1 = 0;
-    w.AO_val2 = 0;
-# endif
-
-# if defined(AO_HAVE_nop_read)
-    AO_nop_read();
-# else
-    MISSING(AO_nop);
-# endif
-# if defined(AO_HAVE_store_read)
-    AO_store_read(&x, 13);
-    TA_assert (x == 13);
-# else
-    MISSING(AO_store);
-    x = 13;
-# endif
-# if defined(AO_HAVE_load_read)
-    TA_assert(AO_load_read(&x) == 13);
-# else
-    MISSING(AO_load);
-# endif
-# if defined(AO_HAVE_test_and_set_read)
-    assert(AO_test_and_set_read(&z) == AO_TS_CLEAR);
-    assert(AO_test_and_set_read(&z) == AO_TS_SET);
-    assert(AO_test_and_set_read(&z) == AO_TS_SET);
-    AO_CLEAR(&z);
-# else
-    MISSING(AO_test_and_set);
-# endif
-# if defined(AO_HAVE_fetch_and_add_read)
-    TA_assert(AO_fetch_and_add_read(&x, 42) == 13);
-    TA_assert(AO_fetch_and_add_read(&x, -42) == 55);
-# else
-    MISSING(AO_fetch_and_add);
-# endif
-# if defined(AO_HAVE_fetch_and_add1_read)
-    TA_assert(AO_fetch_and_add1_read(&x) == 13);
-# else
-    MISSING(AO_fetch_and_add1);
-    ++x;
-# endif
-# if defined(AO_HAVE_fetch_and_sub1_read)
-    TA_assert(AO_fetch_and_sub1_read(&x) == 14);
-# else
-    MISSING(AO_fetch_and_sub1);
-    --x;
-# endif
-# if defined(AO_HAVE_short_store_read)
-    AO_short_store_read(&s, 13);
-# else
-    MISSING(AO_short_store);
-    s = 13;
-# endif
-# if defined(AO_HAVE_short_load_read)
-    TA_assert(AO_short_load(&s) == 13);
-# else
-    MISSING(AO_short_load);
-# endif
-# if defined(AO_HAVE_short_fetch_and_add_read)
-    TA_assert(AO_short_fetch_and_add_read(&s, 42) == 13);
-    TA_assert(AO_short_fetch_and_add_read(&s, -42) == 55);
-# else
-    MISSING(AO_short_fetch_and_add);
-# endif
-# if defined(AO_HAVE_short_fetch_and_add1_read)
-    TA_assert(AO_short_fetch_and_add1_read(&s) == 13);
-# else
-    MISSING(AO_short_fetch_and_add1);
-    ++s;
-# endif
-# if defined(AO_HAVE_short_fetch_and_sub1_read)
-    TA_assert(AO_short_fetch_and_sub1_read(&s) == 14);
-# else
-    MISSING(AO_short_fetch_and_sub1);
-    --s;
-# endif
-# if defined(AO_HAVE_char_store_read)
-    AO_char_store_read(&b, 13);
-# else
-    MISSING(AO_char_store);
-    b = 13;
-# endif
-# if defined(AO_HAVE_char_load_read)
-    TA_assert(AO_char_load(&b) == 13);
-# else
-    MISSING(AO_char_load);
-# endif
-# if defined(AO_HAVE_char_fetch_and_add_read)
-    TA_assert(AO_char_fetch_and_add_read(&b, 42) == 13);
-    TA_assert(AO_char_fetch_and_add_read(&b, -42) == 55);
-# else
-    MISSING(AO_char_fetch_and_add);
-# endif
-# if defined(AO_HAVE_char_fetch_and_add1_read)
-    TA_assert(AO_char_fetch_and_add1_read(&b) == 13);
-# else
-    MISSING(AO_char_fetch_and_add1);
-    ++b;
-# endif
-# if defined(AO_HAVE_char_fetch_and_sub1_read)
-    TA_assert(AO_char_fetch_and_sub1_read(&b) == 14);
-# else
-    MISSING(AO_char_fetch_and_sub1);
-    --b;
-# endif
-# if defined(AO_HAVE_int_store_read)
-    AO_int_store_read(&zz, 13);
-# else
-    MISSING(AO_int_store);
-    zz = 13;
-# endif
-# if defined(AO_HAVE_int_load_read)
-    TA_assert(AO_int_load(&zz) == 13);
-# else
-    MISSING(AO_int_load);
-# endif
-# if defined(AO_HAVE_int_fetch_and_add_read)
-    TA_assert(AO_int_fetch_and_add_read(&zz, 42) == 13);
-    TA_assert(AO_int_fetch_and_add_read(&zz, -42) == 55);
-# else
-    MISSING(AO_int_fetch_and_add);
-# endif
-# if defined(AO_HAVE_int_fetch_and_add1_read)
-    TA_assert(AO_int_fetch_and_add1_read(&zz) == 13);
-# else
-    MISSING(AO_int_fetch_and_add1);
-    ++zz;
-# endif
-# if defined(AO_HAVE_int_fetch_and_sub1_read)
-    TA_assert(AO_int_fetch_and_sub1_read(&zz) == 14);
-# else
-    MISSING(AO_int_fetch_and_sub1);
-    --zz;
-# endif
-# if defined(AO_HAVE_compare_and_swap_read)
-    TA_assert(!AO_compare_and_swap_read(&x, 14, 42));
-    TA_assert(x == 13);
-    TA_assert(AO_compare_and_swap_read(&x, 13, 42));
-    TA_assert(x == 42);
-# else
-    MISSING(AO_compare_and_swap);
-# endif
-# if defined(AO_HAVE_or_read)
-    AO_or_read(&x, 66);
-    TA_assert(x == 106);
-# else
-    MISSING(AO_or);
-    x |= 34;
-# endif
-# if defined(AO_HAVE_compare_double_and_swap_double_read)
-    TA_assert(!AO_compare_double_and_swap_double_read(&w, 17, 42, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_double_and_swap_double_read(&w, 0, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_double_and_swap_double_read(&w, 12, 13, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-    w.AO_val1 = 0; w.AO_val2 = 0;
-# else
-    MISSING(AO_compare_double_and_swap_double);
-# endif
-# if defined(AO_HAVE_compare_and_swap_double_read)
-    TA_assert(!AO_compare_and_swap_double_read(&w, 17, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_and_swap_double_read(&w, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_and_swap_double_read(&w, 12, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-# else
-    MISSING(AO_compare_and_swap_double);
-# endif
-}
-
-
-    
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-/* Some basic sanity tests.  These do not test the barrier semantics. */
-
-#undef TA_assert
-#define TA_assert(e) \
-  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: _write)\n", \
-                   __FILE__, __LINE__), exit(1); }
-
-#undef MISSING
-#define MISSING(name) \
-  fprintf(stderr, "Missing: %s\n", #name "_write")
-
-void test_atomic_write(void)
-{
-  AO_t x;
-  unsigned char b;
-  unsigned short s;
-  unsigned int zz;
-# if defined(AO_HAVE_test_and_set_write)
-    AO_TS_t z = AO_TS_INITIALIZER;
-# endif
-# if defined(AO_HAVE_double_t)
-    AO_double_t w;
-    w.AO_val1 = 0;
-    w.AO_val2 = 0;
-# endif
-
-# if defined(AO_HAVE_nop_write)
-    AO_nop_write();
-# else
-    MISSING(AO_nop);
-# endif
-# if defined(AO_HAVE_store_write)
-    AO_store_write(&x, 13);
-    TA_assert (x == 13);
-# else
-    MISSING(AO_store);
-    x = 13;
-# endif
-# if defined(AO_HAVE_load_write)
-    TA_assert(AO_load_write(&x) == 13);
-# else
-    MISSING(AO_load);
-# endif
-# if defined(AO_HAVE_test_and_set_write)
-    assert(AO_test_and_set_write(&z) == AO_TS_CLEAR);
-    assert(AO_test_and_set_write(&z) == AO_TS_SET);
-    assert(AO_test_and_set_write(&z) == AO_TS_SET);
-    AO_CLEAR(&z);
-# else
-    MISSING(AO_test_and_set);
-# endif
-# if defined(AO_HAVE_fetch_and_add_write)
-    TA_assert(AO_fetch_and_add_write(&x, 42) == 13);
-    TA_assert(AO_fetch_and_add_write(&x, -42) == 55);
-# else
-    MISSING(AO_fetch_and_add);
-# endif
-# if defined(AO_HAVE_fetch_and_add1_write)
-    TA_assert(AO_fetch_and_add1_write(&x) == 13);
-# else
-    MISSING(AO_fetch_and_add1);
-    ++x;
-# endif
-# if defined(AO_HAVE_fetch_and_sub1_write)
-    TA_assert(AO_fetch_and_sub1_write(&x) == 14);
-# else
-    MISSING(AO_fetch_and_sub1);
-    --x;
-# endif
-# if defined(AO_HAVE_short_store_write)
-    AO_short_store_write(&s, 13);
-# else
-    MISSING(AO_short_store);
-    s = 13;
-# endif
-# if defined(AO_HAVE_short_load_write)
-    TA_assert(AO_short_load(&s) == 13);
-# else
-    MISSING(AO_short_load);
-# endif
-# if defined(AO_HAVE_short_fetch_and_add_write)
-    TA_assert(AO_short_fetch_and_add_write(&s, 42) == 13);
-    TA_assert(AO_short_fetch_and_add_write(&s, -42) == 55);
-# else
-    MISSING(AO_short_fetch_and_add);
-# endif
-# if defined(AO_HAVE_short_fetch_and_add1_write)
-    TA_assert(AO_short_fetch_and_add1_write(&s) == 13);
-# else
-    MISSING(AO_short_fetch_and_add1);
-    ++s;
-# endif
-# if defined(AO_HAVE_short_fetch_and_sub1_write)
-    TA_assert(AO_short_fetch_and_sub1_write(&s) == 14);
-# else
-    MISSING(AO_short_fetch_and_sub1);
-    --s;
-# endif
-# if defined(AO_HAVE_char_store_write)
-    AO_char_store_write(&b, 13);
-# else
-    MISSING(AO_char_store);
-    b = 13;
-# endif
-# if defined(AO_HAVE_char_load_write)
-    TA_assert(AO_char_load(&b) == 13);
-# else
-    MISSING(AO_char_load);
-# endif
-# if defined(AO_HAVE_char_fetch_and_add_write)
-    TA_assert(AO_char_fetch_and_add_write(&b, 42) == 13);
-    TA_assert(AO_char_fetch_and_add_write(&b, -42) == 55);
-# else
-    MISSING(AO_char_fetch_and_add);
-# endif
-# if defined(AO_HAVE_char_fetch_and_add1_write)
-    TA_assert(AO_char_fetch_and_add1_write(&b) == 13);
-# else
-    MISSING(AO_char_fetch_and_add1);
-    ++b;
-# endif
-# if defined(AO_HAVE_char_fetch_and_sub1_write)
-    TA_assert(AO_char_fetch_and_sub1_write(&b) == 14);
-# else
-    MISSING(AO_char_fetch_and_sub1);
-    --b;
-# endif
-# if defined(AO_HAVE_int_store_write)
-    AO_int_store_write(&zz, 13);
-# else
-    MISSING(AO_int_store);
-    zz = 13;
-# endif
-# if defined(AO_HAVE_int_load_write)
-    TA_assert(AO_int_load(&zz) == 13);
-# else
-    MISSING(AO_int_load);
-# endif
-# if defined(AO_HAVE_int_fetch_and_add_write)
-    TA_assert(AO_int_fetch_and_add_write(&zz, 42) == 13);
-    TA_assert(AO_int_fetch_and_add_write(&zz, -42) == 55);
-# else
-    MISSING(AO_int_fetch_and_add);
-# endif
-# if defined(AO_HAVE_int_fetch_and_add1_write)
-    TA_assert(AO_int_fetch_and_add1_write(&zz) == 13);
-# else
-    MISSING(AO_int_fetch_and_add1);
-    ++zz;
-# endif
-# if defined(AO_HAVE_int_fetch_and_sub1_write)
-    TA_assert(AO_int_fetch_and_sub1_write(&zz) == 14);
-# else
-    MISSING(AO_int_fetch_and_sub1);
-    --zz;
-# endif
-# if defined(AO_HAVE_compare_and_swap_write)
-    TA_assert(!AO_compare_and_swap_write(&x, 14, 42));
-    TA_assert(x == 13);
-    TA_assert(AO_compare_and_swap_write(&x, 13, 42));
-    TA_assert(x == 42);
-# else
-    MISSING(AO_compare_and_swap);
-# endif
-# if defined(AO_HAVE_or_write)
-    AO_or_write(&x, 66);
-    TA_assert(x == 106);
-# else
-    MISSING(AO_or);
-    x |= 34;
-# endif
-# if defined(AO_HAVE_compare_double_and_swap_double_write)
-    TA_assert(!AO_compare_double_and_swap_double_write(&w, 17, 42, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_double_and_swap_double_write(&w, 0, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_double_and_swap_double_write(&w, 12, 13, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-    w.AO_val1 = 0; w.AO_val2 = 0;
-# else
-    MISSING(AO_compare_double_and_swap_double);
-# endif
-# if defined(AO_HAVE_compare_and_swap_double_write)
-    TA_assert(!AO_compare_and_swap_double_write(&w, 17, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_and_swap_double_write(&w, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_and_swap_double_write(&w, 12, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-# else
-    MISSING(AO_compare_and_swap_double);
-# endif
-}
-
-
-    
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-/* Some basic sanity tests.  These do not test the barrier semantics. */
-
-#undef TA_assert
-#define TA_assert(e) \
-  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: _full)\n", \
-                   __FILE__, __LINE__), exit(1); }
-
-#undef MISSING
-#define MISSING(name) \
-  fprintf(stderr, "Missing: %s\n", #name "_full")
-
-void test_atomic_full(void)
-{
-  AO_t x;
-  unsigned char b;
-  unsigned short s;
-  unsigned int zz;
-# if defined(AO_HAVE_test_and_set_full)
-    AO_TS_t z = AO_TS_INITIALIZER;
-# endif
-# if defined(AO_HAVE_double_t)
-    AO_double_t w;
-    w.AO_val1 = 0;
-    w.AO_val2 = 0;
-# endif
-
-# if defined(AO_HAVE_nop_full)
-    AO_nop_full();
-# else
-    MISSING(AO_nop);
-# endif
-# if defined(AO_HAVE_store_full)
-    AO_store_full(&x, 13);
-    TA_assert (x == 13);
-# else
-    MISSING(AO_store);
-    x = 13;
-# endif
-# if defined(AO_HAVE_load_full)
-    TA_assert(AO_load_full(&x) == 13);
-# else
-    MISSING(AO_load);
-# endif
-# if defined(AO_HAVE_test_and_set_full)
-    assert(AO_test_and_set_full(&z) == AO_TS_CLEAR);
-    assert(AO_test_and_set_full(&z) == AO_TS_SET);
-    assert(AO_test_and_set_full(&z) == AO_TS_SET);
-    AO_CLEAR(&z);
-# else
-    MISSING(AO_test_and_set);
-# endif
-# if defined(AO_HAVE_fetch_and_add_full)
-    TA_assert(AO_fetch_and_add_full(&x, 42) == 13);
-    TA_assert(AO_fetch_and_add_full(&x, -42) == 55);
-# else
-    MISSING(AO_fetch_and_add);
-# endif
-# if defined(AO_HAVE_fetch_and_add1_full)
-    TA_assert(AO_fetch_and_add1_full(&x) == 13);
-# else
-    MISSING(AO_fetch_and_add1);
-    ++x;
-# endif
-# if defined(AO_HAVE_fetch_and_sub1_full)
-    TA_assert(AO_fetch_and_sub1_full(&x) == 14);
-# else
-    MISSING(AO_fetch_and_sub1);
-    --x;
-# endif
-# if defined(AO_HAVE_short_store_full)
-    AO_short_store_full(&s, 13);
-# else
-    MISSING(AO_short_store);
-    s = 13;
-# endif
-# if defined(AO_HAVE_short_load_full)
-    TA_assert(AO_short_load(&s) == 13);
-# else
-    MISSING(AO_short_load);
-# endif
-# if defined(AO_HAVE_short_fetch_and_add_full)
-    TA_assert(AO_short_fetch_and_add_full(&s, 42) == 13);
-    TA_assert(AO_short_fetch_and_add_full(&s, -42) == 55);
-# else
-    MISSING(AO_short_fetch_and_add);
-# endif
-# if defined(AO_HAVE_short_fetch_and_add1_full)
-    TA_assert(AO_short_fetch_and_add1_full(&s) == 13);
-# else
-    MISSING(AO_short_fetch_and_add1);
-    ++s;
-# endif
-# if defined(AO_HAVE_short_fetch_and_sub1_full)
-    TA_assert(AO_short_fetch_and_sub1_full(&s) == 14);
-# else
-    MISSING(AO_short_fetch_and_sub1);
-    --s;
-# endif
-# if defined(AO_HAVE_char_store_full)
-    AO_char_store_full(&b, 13);
-# else
-    MISSING(AO_char_store);
-    b = 13;
-# endif
-# if defined(AO_HAVE_char_load_full)
-    TA_assert(AO_char_load(&b) == 13);
-# else
-    MISSING(AO_char_load);
-# endif
-# if defined(AO_HAVE_char_fetch_and_add_full)
-    TA_assert(AO_char_fetch_and_add_full(&b, 42) == 13);
-    TA_assert(AO_char_fetch_and_add_full(&b, -42) == 55);
-# else
-    MISSING(AO_char_fetch_and_add);
-# endif
-# if defined(AO_HAVE_char_fetch_and_add1_full)
-    TA_assert(AO_char_fetch_and_add1_full(&b) == 13);
-# else
-    MISSING(AO_char_fetch_and_add1);
-    ++b;
-# endif
-# if defined(AO_HAVE_char_fetch_and_sub1_full)
-    TA_assert(AO_char_fetch_and_sub1_full(&b) == 14);
-# else
-    MISSING(AO_char_fetch_and_sub1);
-    --b;
-# endif
-# if defined(AO_HAVE_int_store_full)
-    AO_int_store_full(&zz, 13);
-# else
-    MISSING(AO_int_store);
-    zz = 13;
-# endif
-# if defined(AO_HAVE_int_load_full)
-    TA_assert(AO_int_load(&zz) == 13);
-# else
-    MISSING(AO_int_load);
-# endif
-# if defined(AO_HAVE_int_fetch_and_add_full)
-    TA_assert(AO_int_fetch_and_add_full(&zz, 42) == 13);
-    TA_assert(AO_int_fetch_and_add_full(&zz, -42) == 55);
-# else
-    MISSING(AO_int_fetch_and_add);
-# endif
-# if defined(AO_HAVE_int_fetch_and_add1_full)
-    TA_assert(AO_int_fetch_and_add1_full(&zz) == 13);
-# else
-    MISSING(AO_int_fetch_and_add1);
-    ++zz;
-# endif
-# if defined(AO_HAVE_int_fetch_and_sub1_full)
-    TA_assert(AO_int_fetch_and_sub1_full(&zz) == 14);
-# else
-    MISSING(AO_int_fetch_and_sub1);
-    --zz;
-# endif
-# if defined(AO_HAVE_compare_and_swap_full)
-    TA_assert(!AO_compare_and_swap_full(&x, 14, 42));
-    TA_assert(x == 13);
-    TA_assert(AO_compare_and_swap_full(&x, 13, 42));
-    TA_assert(x == 42);
-# else
-    MISSING(AO_compare_and_swap);
-# endif
-# if defined(AO_HAVE_or_full)
-    AO_or_full(&x, 66);
-    TA_assert(x == 106);
-# else
-    MISSING(AO_or);
-    x |= 34;
-# endif
-# if defined(AO_HAVE_compare_double_and_swap_double_full)
-    TA_assert(!AO_compare_double_and_swap_double_full(&w, 17, 42, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_double_and_swap_double_full(&w, 0, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_double_and_swap_double_full(&w, 12, 13, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-    w.AO_val1 = 0; w.AO_val2 = 0;
-# else
-    MISSING(AO_compare_double_and_swap_double);
-# endif
-# if defined(AO_HAVE_compare_and_swap_double_full)
-    TA_assert(!AO_compare_and_swap_double_full(&w, 17, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_and_swap_double_full(&w, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_and_swap_double_full(&w, 12, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-# else
-    MISSING(AO_compare_and_swap_double);
-# endif
-}
-
-
-    
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-/* Some basic sanity tests.  These do not test the barrier semantics. */
-
-#undef TA_assert
-#define TA_assert(e) \
-  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: _release_write)\n", \
-                   __FILE__, __LINE__), exit(1); }
-
-#undef MISSING
-#define MISSING(name) \
-  fprintf(stderr, "Missing: %s\n", #name "_release_write")
-
-void test_atomic_release_write(void)
-{
-  AO_t x;
-  unsigned char b;
-  unsigned short s;
-  unsigned int zz;
-# if defined(AO_HAVE_test_and_set_release_write)
-    AO_TS_t z = AO_TS_INITIALIZER;
-# endif
-# if defined(AO_HAVE_double_t)
-    AO_double_t w;
-    w.AO_val1 = 0;
-    w.AO_val2 = 0;
-# endif
-
-# if defined(AO_HAVE_nop_release_write)
-    AO_nop_release_write();
-# else
-    MISSING(AO_nop);
-# endif
-# if defined(AO_HAVE_store_release_write)
-    AO_store_release_write(&x, 13);
-    TA_assert (x == 13);
-# else
-    MISSING(AO_store);
-    x = 13;
-# endif
-# if defined(AO_HAVE_load_release_write)
-    TA_assert(AO_load_release_write(&x) == 13);
-# else
-    MISSING(AO_load);
-# endif
-# if defined(AO_HAVE_test_and_set_release_write)
-    assert(AO_test_and_set_release_write(&z) == AO_TS_CLEAR);
-    assert(AO_test_and_set_release_write(&z) == AO_TS_SET);
-    assert(AO_test_and_set_release_write(&z) == AO_TS_SET);
-    AO_CLEAR(&z);
-# else
-    MISSING(AO_test_and_set);
-# endif
-# if defined(AO_HAVE_fetch_and_add_release_write)
-    TA_assert(AO_fetch_and_add_release_write(&x, 42) == 13);
-    TA_assert(AO_fetch_and_add_release_write(&x, -42) == 55);
-# else
-    MISSING(AO_fetch_and_add);
-# endif
-# if defined(AO_HAVE_fetch_and_add1_release_write)
-    TA_assert(AO_fetch_and_add1_release_write(&x) == 13);
-# else
-    MISSING(AO_fetch_and_add1);
-    ++x;
-# endif
-# if defined(AO_HAVE_fetch_and_sub1_release_write)
-    TA_assert(AO_fetch_and_sub1_release_write(&x) == 14);
-# else
-    MISSING(AO_fetch_and_sub1);
-    --x;
-# endif
-# if defined(AO_HAVE_short_store_release_write)
-    AO_short_store_release_write(&s, 13);
-# else
-    MISSING(AO_short_store);
-    s = 13;
-# endif
-# if defined(AO_HAVE_short_load_release_write)
-    TA_assert(AO_short_load(&s) == 13);
-# else
-    MISSING(AO_short_load);
-# endif
-# if defined(AO_HAVE_short_fetch_and_add_release_write)
-    TA_assert(AO_short_fetch_and_add_release_write(&s, 42) == 13);
-    TA_assert(AO_short_fetch_and_add_release_write(&s, -42) == 55);
-# else
-    MISSING(AO_short_fetch_and_add);
-# endif
-# if defined(AO_HAVE_short_fetch_and_add1_release_write)
-    TA_assert(AO_short_fetch_and_add1_release_write(&s) == 13);
-# else
-    MISSING(AO_short_fetch_and_add1);
-    ++s;
-# endif
-# if defined(AO_HAVE_short_fetch_and_sub1_release_write)
-    TA_assert(AO_short_fetch_and_sub1_release_write(&s) == 14);
-# else
-    MISSING(AO_short_fetch_and_sub1);
-    --s;
-# endif
-# if defined(AO_HAVE_char_store_release_write)
-    AO_char_store_release_write(&b, 13);
-# else
-    MISSING(AO_char_store);
-    b = 13;
-# endif
-# if defined(AO_HAVE_char_load_release_write)
-    TA_assert(AO_char_load(&b) == 13);
-# else
-    MISSING(AO_char_load);
-# endif
-# if defined(AO_HAVE_char_fetch_and_add_release_write)
-    TA_assert(AO_char_fetch_and_add_release_write(&b, 42) == 13);
-    TA_assert(AO_char_fetch_and_add_release_write(&b, -42) == 55);
-# else
-    MISSING(AO_char_fetch_and_add);
-# endif
-# if defined(AO_HAVE_char_fetch_and_add1_release_write)
-    TA_assert(AO_char_fetch_and_add1_release_write(&b) == 13);
-# else
-    MISSING(AO_char_fetch_and_add1);
-    ++b;
-# endif
-# if defined(AO_HAVE_char_fetch_and_sub1_release_write)
-    TA_assert(AO_char_fetch_and_sub1_release_write(&b) == 14);
-# else
-    MISSING(AO_char_fetch_and_sub1);
-    --b;
-# endif
-# if defined(AO_HAVE_int_store_release_write)
-    AO_int_store_release_write(&zz, 13);
-# else
-    MISSING(AO_int_store);
-    zz = 13;
-# endif
-# if defined(AO_HAVE_int_load_release_write)
-    TA_assert(AO_int_load(&zz) == 13);
-# else
-    MISSING(AO_int_load);
-# endif
-# if defined(AO_HAVE_int_fetch_and_add_release_write)
-    TA_assert(AO_int_fetch_and_add_release_write(&zz, 42) == 13);
-    TA_assert(AO_int_fetch_and_add_release_write(&zz, -42) == 55);
-# else
-    MISSING(AO_int_fetch_and_add);
-# endif
-# if defined(AO_HAVE_int_fetch_and_add1_release_write)
-    TA_assert(AO_int_fetch_and_add1_release_write(&zz) == 13);
-# else
-    MISSING(AO_int_fetch_and_add1);
-    ++zz;
-# endif
-# if defined(AO_HAVE_int_fetch_and_sub1_release_write)
-    TA_assert(AO_int_fetch_and_sub1_release_write(&zz) == 14);
-# else
-    MISSING(AO_int_fetch_and_sub1);
-    --zz;
-# endif
-# if defined(AO_HAVE_compare_and_swap_release_write)
-    TA_assert(!AO_compare_and_swap_release_write(&x, 14, 42));
-    TA_assert(x == 13);
-    TA_assert(AO_compare_and_swap_release_write(&x, 13, 42));
-    TA_assert(x == 42);
-# else
-    MISSING(AO_compare_and_swap);
-# endif
-# if defined(AO_HAVE_or_release_write)
-    AO_or_release_write(&x, 66);
-    TA_assert(x == 106);
-# else
-    MISSING(AO_or);
-    x |= 34;
-# endif
-# if defined(AO_HAVE_compare_double_and_swap_double_release_write)
-    TA_assert(!AO_compare_double_and_swap_double_release_write(&w, 17, 42, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_double_and_swap_double_release_write(&w, 0, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_double_and_swap_double_release_write(&w, 12, 13, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-    w.AO_val1 = 0; w.AO_val2 = 0;
-# else
-    MISSING(AO_compare_double_and_swap_double);
-# endif
-# if defined(AO_HAVE_compare_and_swap_double_release_write)
-    TA_assert(!AO_compare_and_swap_double_release_write(&w, 17, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_and_swap_double_release_write(&w, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_and_swap_double_release_write(&w, 12, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-# else
-    MISSING(AO_compare_and_swap_double);
-# endif
-}
-
-
-    
-/*
- * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
- *
- * This file is covered by the GNU general public license, version 2.
- * see doc/COPYING for details.
- */
-
-/* Some basic sanity tests.  These do not test the barrier semantics. */
-
-#undef TA_assert
-#define TA_assert(e) \
-  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: _acquire_read)\n", \
-                   __FILE__, __LINE__), exit(1); }
-
-#undef MISSING
-#define MISSING(name) \
-  fprintf(stderr, "Missing: %s\n", #name "_acquire_read")
-
-void test_atomic_acquire_read(void)
-{
-  AO_t x;
-  unsigned char b;
-  unsigned short s;
-  unsigned int zz;
-# if defined(AO_HAVE_test_and_set_acquire_read)
-    AO_TS_t z = AO_TS_INITIALIZER;
-# endif
-# if defined(AO_HAVE_double_t)
-    AO_double_t w;
-    w.AO_val1 = 0;
-    w.AO_val2 = 0;
-# endif
-
-# if defined(AO_HAVE_nop_acquire_read)
-    AO_nop_acquire_read();
-# else
-    MISSING(AO_nop);
-# endif
-# if defined(AO_HAVE_store_acquire_read)
-    AO_store_acquire_read(&x, 13);
-    TA_assert (x == 13);
-# else
-    MISSING(AO_store);
-    x = 13;
-# endif
-# if defined(AO_HAVE_load_acquire_read)
-    TA_assert(AO_load_acquire_read(&x) == 13);
-# else
-    MISSING(AO_load);
-# endif
-# if defined(AO_HAVE_test_and_set_acquire_read)
-    assert(AO_test_and_set_acquire_read(&z) == AO_TS_CLEAR);
-    assert(AO_test_and_set_acquire_read(&z) == AO_TS_SET);
-    assert(AO_test_and_set_acquire_read(&z) == AO_TS_SET);
-    AO_CLEAR(&z);
-# else
-    MISSING(AO_test_and_set);
-# endif
-# if defined(AO_HAVE_fetch_and_add_acquire_read)
-    TA_assert(AO_fetch_and_add_acquire_read(&x, 42) == 13);
-    TA_assert(AO_fetch_and_add_acquire_read(&x, -42) == 55);
-# else
-    MISSING(AO_fetch_and_add);
-# endif
-# if defined(AO_HAVE_fetch_and_add1_acquire_read)
-    TA_assert(AO_fetch_and_add1_acquire_read(&x) == 13);
-# else
-    MISSING(AO_fetch_and_add1);
-    ++x;
-# endif
-# if defined(AO_HAVE_fetch_and_sub1_acquire_read)
-    TA_assert(AO_fetch_and_sub1_acquire_read(&x) == 14);
-# else
-    MISSING(AO_fetch_and_sub1);
-    --x;
-# endif
-# if defined(AO_HAVE_short_store_acquire_read)
-    AO_short_store_acquire_read(&s, 13);
-# else
-    MISSING(AO_short_store);
-    s = 13;
-# endif
-# if defined(AO_HAVE_short_load_acquire_read)
-    TA_assert(AO_short_load(&s) == 13);
-# else
-    MISSING(AO_short_load);
-# endif
-# if defined(AO_HAVE_short_fetch_and_add_acquire_read)
-    TA_assert(AO_short_fetch_and_add_acquire_read(&s, 42) == 13);
-    TA_assert(AO_short_fetch_and_add_acquire_read(&s, -42) == 55);
-# else
-    MISSING(AO_short_fetch_and_add);
-# endif
-# if defined(AO_HAVE_short_fetch_and_add1_acquire_read)
-    TA_assert(AO_short_fetch_and_add1_acquire_read(&s) == 13);
-# else
-    MISSING(AO_short_fetch_and_add1);
-    ++s;
-# endif
-# if defined(AO_HAVE_short_fetch_and_sub1_acquire_read)
-    TA_assert(AO_short_fetch_and_sub1_acquire_read(&s) == 14);
-# else
-    MISSING(AO_short_fetch_and_sub1);
-    --s;
-# endif
-# if defined(AO_HAVE_char_store_acquire_read)
-    AO_char_store_acquire_read(&b, 13);
-# else
-    MISSING(AO_char_store);
-    b = 13;
-# endif
-# if defined(AO_HAVE_char_load_acquire_read)
-    TA_assert(AO_char_load(&b) == 13);
-# else
-    MISSING(AO_char_load);
-# endif
-# if defined(AO_HAVE_char_fetch_and_add_acquire_read)
-    TA_assert(AO_char_fetch_and_add_acquire_read(&b, 42) == 13);
-    TA_assert(AO_char_fetch_and_add_acquire_read(&b, -42) == 55);
-# else
-    MISSING(AO_char_fetch_and_add);
-# endif
-# if defined(AO_HAVE_char_fetch_and_add1_acquire_read)
-    TA_assert(AO_char_fetch_and_add1_acquire_read(&b) == 13);
-# else
-    MISSING(AO_char_fetch_and_add1);
-    ++b;
-# endif
-# if defined(AO_HAVE_char_fetch_and_sub1_acquire_read)
-    TA_assert(AO_char_fetch_and_sub1_acquire_read(&b) == 14);
-# else
-    MISSING(AO_char_fetch_and_sub1);
-    --b;
-# endif
-# if defined(AO_HAVE_int_store_acquire_read)
-    AO_int_store_acquire_read(&zz, 13);
-# else
-    MISSING(AO_int_store);
-    zz = 13;
-# endif
-# if defined(AO_HAVE_int_load_acquire_read)
-    TA_assert(AO_int_load(&zz) == 13);
-# else
-    MISSING(AO_int_load);
-# endif
-# if defined(AO_HAVE_int_fetch_and_add_acquire_read)
-    TA_assert(AO_int_fetch_and_add_acquire_read(&zz, 42) == 13);
-    TA_assert(AO_int_fetch_and_add_acquire_read(&zz, -42) == 55);
-# else
-    MISSING(AO_int_fetch_and_add);
-# endif
-# if defined(AO_HAVE_int_fetch_and_add1_acquire_read)
-    TA_assert(AO_int_fetch_and_add1_acquire_read(&zz) == 13);
-# else
-    MISSING(AO_int_fetch_and_add1);
-    ++zz;
-# endif
-# if defined(AO_HAVE_int_fetch_and_sub1_acquire_read)
-    TA_assert(AO_int_fetch_and_sub1_acquire_read(&zz) == 14);
-# else
-    MISSING(AO_int_fetch_and_sub1);
-    --zz;
-# endif
-# if defined(AO_HAVE_compare_and_swap_acquire_read)
-    TA_assert(!AO_compare_and_swap_acquire_read(&x, 14, 42));
-    TA_assert(x == 13);
-    TA_assert(AO_compare_and_swap_acquire_read(&x, 13, 42));
-    TA_assert(x == 42);
-# else
-    MISSING(AO_compare_and_swap);
-# endif
-# if defined(AO_HAVE_or_acquire_read)
-    AO_or_acquire_read(&x, 66);
-    TA_assert(x == 106);
-# else
-    MISSING(AO_or);
-    x |= 34;
-# endif
-# if defined(AO_HAVE_compare_double_and_swap_double_acquire_read)
-    TA_assert(!AO_compare_double_and_swap_double_acquire_read(&w, 17, 42, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_double_and_swap_double_acquire_read(&w, 0, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_double_and_swap_double_acquire_read(&w, 12, 13, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-    w.AO_val1 = 0; w.AO_val2 = 0;
-# else
-    MISSING(AO_compare_double_and_swap_double);
-# endif
-# if defined(AO_HAVE_compare_and_swap_double_acquire_read)
-    TA_assert(!AO_compare_and_swap_double_acquire_read(&w, 17, 12, 13));
-    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
-    TA_assert(AO_compare_and_swap_double_acquire_read(&w, 0, 12, 13));
-    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
-    TA_assert(AO_compare_and_swap_double_acquire_read(&w, 12, 17, 42));
-    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
-# else
-    MISSING(AO_compare_and_swap_double);
-# endif
-}
-
-
-    
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/tests/test_malloc.c b/src/mm/boehm-gc/libatomic_ops-1.2/tests/test_malloc.c
deleted file mode 100644 (file)
index 4026e62..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/*  
- * Copyright (c) 2005 Hewlett-Packard Development Company, L.P.
- * Original Author: Hans Boehm
- *
- * This file may be redistributed and/or modified under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2, or (at your option) any later version.
- * 
- * It is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE.  See the GNU General Public License in the
- * file doc/COPYING for more details.
- */
-
-#if defined(HAVE_CONFIG_H)
-# include "config.h"
-#endif
-
-#include "run_parallel.inc"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include "atomic_ops_malloc.h"
-#define MAX_NTHREADS 100
-#define N_REVERSALS 1000 /* must be even */
-#define LENGTH 1000
-
-#ifdef USE_STANDARD_MALLOC
-# define AO_malloc(n) malloc(n)
-# define AO_free(p) free(p)
-# define AO_malloc_enable_mmap() 
-#endif
-
-typedef struct list_node {
-       struct list_node *next;
-       int data;
-} ln;
-
-ln *cons(int d, ln *tail)
-{
-  static size_t extra = 0;
-  size_t my_extra = extra;
-  ln *result;
-  int * extras;
-  int i;
-
-  if (my_extra > 100) 
-    extra = my_extra = 0;
-  else
-    ++extra;
-  result = AO_malloc(sizeof(ln) + sizeof(int)*my_extra);
-  if (result == 0)
-    {
-      fprintf(stderr, "Out of memory\n");
-       /* Normal for more than about 10 threads without mmap? */
-      abort();
-    }
-
-  result -> data = d;
-  result -> next = tail;
-  extras = (int *)(result+1);
-  for (i = 0; i < my_extra; ++i) extras[i] = 42;
-  return result;
-}
-
-void print_list(ln *l)
-{
-  ln *p;
-
-  for (p = l; p != 0; p = p -> next)
-    {
-      fprintf(stderr, "%d, ", p -> data);
-    }
-  fprintf(stderr, "\n");
-}
-
-/* Check that l contains numbers from m to n inclusive in ascending order */
-void check_list(ln *l, int m, int n)
-{
-  ln *p;
-  int i;
-
-  for (p = l, i = m; p != 0; p = p -> next, ++i)
-    {
-      if (i != p -> data)
-       {
-         fprintf(stderr, "Found %d, expected %d\n", p -> data, i);
-         abort();
-       }
-    }
-}
-
-/* Create a list of integers from m to n */
-ln *
-make_list(int m, int n)
-{
-  if (m > n) return 0;
-  return cons(m, make_list(m+1, n));
-}
-
-/* Reverse list x, and concatenate it to y, deallocating no longer needed */
-/* nodes in x.                                                           */
-ln *
-reverse(ln *x, ln *y)
-{
-  ln * result;
-
-  if (x == 0) return y;
-  result = reverse(x -> next, cons(x -> data, y));
-  AO_free(x);
-  return result;
-}
-
-int dummy_test(void) { return 1; }
-
-#define LARGE 200000
-
-void * run_one_test(void * arg) {
-  ln * x = make_list(1, LENGTH);
-  int i;
-  char *p = AO_malloc(LARGE);
-  char *q;
-
-  if (0 == p) {
-    fprintf(stderr, "AO_malloc(%d) failed: This is normal without mmap\n",
-           LARGE);
-    AO_free(p);
-  } else {
-    p[0] = p[LARGE/2] = p[LARGE-1] = 'a';
-    q = AO_malloc(LARGE);
-    q[0] = q[LARGE/2] = q[LARGE-1] = 'b';
-    if (p[0] != 'a' || p[LARGE/2] != 'a' || p[LARGE-1] != 'a') {
-      fprintf(stderr, "First large allocation smashed\n");
-      abort();
-    }
-    AO_free(p);
-    if (q[0] != 'b' || q[LARGE/2] != 'b' || q[LARGE-1] != 'b') {
-      fprintf(stderr, "Second large allocation smashed\n");
-      abort();
-    }
-    AO_free(q);
-  }
-# if 0 /* enable for debugging */
-    x = reverse(x, 0);
-    print_list(x);
-    x = reverse(x, 0);
-    print_list(x);
-# endif
-  for (i = 0; i < N_REVERSALS; ++i) {
-    x = reverse(x, 0);
-  }
-  check_list(x, 1, LENGTH);
-  return 0;
-}
-
-int main(int argc, char **argv) {
-    int nthreads;
-    int exper_n;
-
-    if (1 == argc) {
-#     if !defined(HAVE_MMAP)
-       nthreads = 3;
-#     else
-        nthreads = 10;
-#     endif
-    } else if (2 == argc) {
-      nthreads = atoi(argv[1]);
-      if (nthreads < 1 || nthreads > MAX_NTHREADS) {
-       fprintf(stderr, "Invalid # of threads argument\n");
-       exit(1);
-      }
-    } else {
-      fprintf(stderr, "Usage: %s [# of threads]\n", argv[0]);
-      exit(1);
-    }
-    printf("Performing %d reversals of %d element lists in %d threads\n",
-          N_REVERSALS, LENGTH, nthreads);
-    AO_malloc_enable_mmap();
-    run_parallel(nthreads, run_one_test, dummy_test, "AO_malloc/AO_free");
-    return 0;
-}
-
diff --git a/src/mm/boehm-gc/libatomic_ops-1.2/tests/test_stack.c b/src/mm/boehm-gc/libatomic_ops-1.2/tests/test_stack.c
deleted file mode 100644 (file)
index 8a8ba50..0000000
+++ /dev/null
@@ -1,232 +0,0 @@
-/*  
- * Copyright (c) 2005 Hewlett-Packard Development Company, L.P.
- * Original Author: Hans Boehm
- *
- * This file may be redistributed and/or modified under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2, or (at your option) any later version.
- * 
- * It is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE.  See the GNU General Public License in the
- * file doc/COPYING for more details.
- */
-
-#if defined(HAVE_CONFIG_H)
-# include "config.h"
-#endif
-
-#include <pthread.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include "atomic_ops.h"
-#include "atomic_ops_stack.h"
-#define MAX_NTHREADS 100
-
-#ifndef NO_TIMES
-#include <time.h>
-#include <sys/time.h>
-/* Need 64-bit long long support */
-long long
-get_msecs(void)
-{
-  struct timeval tv;
-
-  gettimeofday(&tv, 0);
-  return (long long)tv.tv_sec * 1000 + tv.tv_usec/1000;
-}
-#else
-# define get_msecs() 0
-#endif
-
-typedef struct le {
-    AO_t next;
-    int data;
-} list_element;
-
-AO_stack_t the_list = AO_STACK_INITIALIZER;
-
-void add_elements(int n)
-{
-  list_element * le;
-  if (n == 0) return;
-  add_elements(n-1);
-  le = malloc(sizeof(list_element));
-  le -> data = n;
-  AO_stack_push(&the_list, (AO_t *)le);
-}
-
-void print_list()
-{
-  list_element *p;
-
-  for (p = (list_element *)AO_REAL_HEAD_PTR(the_list);
-       p != 0;
-       p = (list_element *)AO_REAL_NEXT_PTR(p -> next))
-    printf("%d\n", p -> data);
-}
-
-static char marks[MAX_NTHREADS * MAX_NTHREADS];
-
-void check_list(int n)
-{
-  list_element *p;
-  int i;
-
-  for (i = 1; i <= n; ++i) marks[i] = 0;
-  for (p = (list_element *)AO_REAL_HEAD_PTR(the_list);
-       p != 0;
-       p = (list_element *)AO_REAL_NEXT_PTR(p -> next))
-    {
-      if (p -> data > n || p -> data <= 0)
-        fprintf(stderr, "Found erroneous list element %d\n", p -> data);
-      if (marks[p -> data] != 0)
-        fprintf(stderr, "Found duplicate list element %d\n", p -> data);
-      marks[p -> data] = 1;
-    }
-  for (i = 1; i <= n; ++i)
-    if (marks[i] != 1)
-      fprintf(stderr, "Missing list element %d\n", i);
-}
-     
-volatile AO_t ops_performed = 0;
-
-#define LIMIT 1000000
-       /* Total number of push/pop ops in all threads per test. */
-
-#ifdef AO_HAVE_fetch_and_add
-# define fetch_and_add(addr, val) AO_fetch_and_add(addr, val)
-#else
-  /* Fake it.  This is really quite unacceptable for timing    */
-  /* purposes.  But as a correctness test, it should be OK.    */
-  AO_INLINE AO_t fetch_and_add(volatile AO_t * addr, AO_t val)
-  {
-    AO_t result = AO_load(addr);
-    AO_store(addr, result + val);
-    return result;
-  }
-#endif
-
-void * run_one_test(void * arg)
-{
-  list_element * t[MAX_NTHREADS + 1];
-  list_element * aux; 
-  long index = (long)arg;
-  int i;
-  int j = 0;
-
-# ifdef VERBOSE
-    printf("starting thread %d\n", index);
-# endif
-  while (fetch_and_add(&ops_performed, index + 1) + index + 1 < LIMIT)
-    {
-      for (i = 0; i < index + 1; ++i)
-        {
-          t[i] = (list_element *)AO_stack_pop(&the_list);
-          if (0 == t[i])
-           {
-              fprintf(stderr, "FAILED\n");
-              abort();
-            }
-        }
-      for (i = 0; i < index + 1; ++i)
-        {
-          AO_stack_push(&the_list, (AO_t *)t[i]);
-        }
-      j += (index + 1);
-    }
-# ifdef VERBOSE
-    printf("finished thread %d: %d total ops\n", index, j);
-# endif
-  return 0;
-}
-
-#define N_EXPERIMENTS 1
-
-unsigned long times[MAX_NTHREADS + 1][N_EXPERIMENTS];
-
-int main(int argc, char **argv)
-{
-  int nthreads;
-  int max_nthreads;
-  int exper_n;
-
-  if (1 == argc)
-    max_nthreads = 4;
-  else if (2 == argc)
-    {
-      max_nthreads = atoi(argv[1]);
-      if (max_nthreads < 1 || max_nthreads > MAX_NTHREADS)
-        {
-         fprintf(stderr, "Invalid max # of threads argument\n");
-         exit(1);
-        }
-    }
-  else
-    {
-      fprintf(stderr, "Usage: %s [max # of threads]\n", argv[0]);
-      exit(1);
-    }
-  for (exper_n = 0; exper_n < N_EXPERIMENTS; ++ exper_n)
-    for (nthreads = 1; nthreads <= max_nthreads; ++nthreads)
-      {
-        int i;
-        pthread_t thread[MAX_NTHREADS];
-        int list_length = nthreads*(nthreads+1)/2;
-        long long start_time;
-  
-        add_elements(list_length);
-  #     ifdef VERBOSE
-          printf("Initial list (nthreads = %d):\n", nthreads);
-          print_list();
-  #     endif
-        ops_performed = 0;
-        start_time = get_msecs();
-        for (i = 1; i < nthreads; ++i) {
-       int code;
-  
-          if ((code = pthread_create(thread+i, 0, run_one_test,
-           (void *)(long)i)) != 0) {
-             fprintf(stderr, "Thread creation failed %u\n", code);
-            exit(1);
-          }
-        }
-        /* We use the main thread to run one test.  This allows gprof  */
-        /* profiling to work, for example.                             */
-          run_one_test(0);
-        for (i = 1; i < nthreads; ++i) {
-         int code;
-          if ((code = pthread_join(thread[i], 0)) != 0) {
-           fprintf(stderr, "Thread join failed %u\n", code);
-          }
-        }
-        times[nthreads][exper_n] = (unsigned long)(get_msecs() - start_time);
-  #     ifdef VERBOSE
-          printf("%d %lu\n", nthreads,
-                            (unsigned long)(get_msecs() - start_time));
-          printf("final list (should be reordered initial list):\n");
-          print_list();
-  #     endif
-        check_list(list_length);
-        while ((list_element *)AO_stack_pop(&the_list));
-      }
-# ifndef NO_TIMES
-    for (nthreads = 1; nthreads <= max_nthreads; ++nthreads)
-      {
-        unsigned long sum = 0;
-
-        printf("About %d pushes + %d pops in %d threads:",
-               LIMIT, LIMIT, nthreads);
-        for (exper_n = 0; exper_n < N_EXPERIMENTS; ++exper_n)
-         {
-#           if defined(VERBOSE)
-             printf("[%lu] ", times[nthreads][exper_n]);
-#          endif
-           sum += times[nthreads][exper_n];
-          }
-        printf(" %lu msecs\n", (sum + N_EXPERIMENTS/2)/N_EXPERIMENTS);
-      }
-# endif /* NO_TIMES */
-  return 0;
-}
-
diff --git a/src/mm/boehm-gc/libatomic_ops/AUTHORS b/src/mm/boehm-gc/libatomic_ops/AUTHORS
new file mode 100644 (file)
index 0000000..b770890
--- /dev/null
@@ -0,0 +1,4 @@
+Originally written by Hans Boehm, with some platform-dependent code
+imported from the Boehm-Demers-Weiser GC, where it was contributed
+by many others.
+
diff --git a/src/mm/boehm-gc/libatomic_ops/COPYING b/src/mm/boehm-gc/libatomic_ops/COPYING
new file mode 100644 (file)
index 0000000..d60c31a
--- /dev/null
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/src/mm/boehm-gc/libatomic_ops/ChangeLog b/src/mm/boehm-gc/libatomic_ops/ChangeLog
new file mode 100644 (file)
index 0000000..1d157a3
--- /dev/null
@@ -0,0 +1,701 @@
+[1.3alpha1 release]
+
+2009-12-01  Ivan Maidanski <ivmai@mail.ru>
+
+       * configure.ac, README: Change to version 1.3alpha1.
+       * configure: Regenerate.
+
+2009-11-21  Ivan Maidanski <ivmai@mail.ru> (really Daniel R. Grayson)
+
+       * configure.ac (AC_CONFIG_COMMANDS): Quote PICFLAG, CC, DEFS
+       values.
+       * configure: Regenerate.
+
+2009-10-06  Ivan Maidanski <ivmai@mail.ru>
+
+       * src/atomic_ops/sysdeps/gcc/sh.h: Remove commented out AO_TS_SET
+       redefinition.
+
+2009-10-05  Ivan Maidanski <ivmai@mail.ru>
+
+       * src/atomic_ops/sysdeps/Makefile.in: Regenerate.
+
+2009-10-05  Ivan Maidanski <ivmai@mail.ru> (really Takashi YOSHII)
+
+       * src/atomic_ops/sysdeps/gcc/sh.h: New file.
+       * src/atomic_ops.h: Include gcc/sh.h if __arm__.
+       * src/atomic_ops/sysdeps/Makefile.am: Add gcc/sh.h entry.
+
+2009-10-02  Ivan Maidanski <ivmai@mail.ru>
+
+       * src/atomic_ops/sysdeps/Makefile.am: Add armcc/arm_v6.h,
+       msftc/arm.h, msftc/common32_defs.h, sunc/x86.h sunc/x86_64.h
+       entries; order all entries alphabetically.
+       * src/atomic_ops/sysdeps/Makefile.in: Regenerate.
+
+2009-10-01  Ivan Maidanski <ivmai@mail.ru>
+
+       * aclocal.m4: Regenerate (by autoreconf -vif using libtool-2.2,
+       automake-1.10.2, autoconf-2.64).
+       * INSTALL: Ditto.
+       * Makefile.in: Ditto.
+       * aclocal.m4: Ditto.
+       * config.guess: Ditto.
+       * config.sub: Ditto.
+       * configure: Ditto.
+       * depcomp: Ditto.
+       * install-sh: Ditto.
+       * missing: Ditto.
+       * mkinstalldirs: Ditto.
+       * doc/Makefile.in: Ditto.
+       * src/config.h.in: Ditto.
+       * src/Makefile.in: Ditto.
+       * src/atomic_ops/Makefile.in: Ditto.
+       * src/atomic_ops/sysdeps/Makefile.in: Ditto.
+       * tests/Makefile.in: Ditto.
+
+2009-10-01  Ivan Maidanski <ivmai@mail.ru>
+
+       * src/atomic_ops/sysdeps/gcc/x86.h: Remove spaces preceding '#'
+       for the preprocessor directives.
+       * src/atomic_ops/sysdeps/sunc/x86.h: Ditto.
+
+2009-09-30  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
+
+       * README: Move notes from the hand-edited part of INSTALL which
+       was overwritten by Automake recently.
+
+2009-09-26  Ivan Maidanski <ivmai@mail.ru>
+
+       * aclocal.m4: Regenerate (by autoreconf -vif).
+       * config.guess: Ditto.
+       * config.sub: Ditto.
+       * configure: Ditto.
+       * INSTALL: Ditto.
+       * Makefile.in: Ditto.
+       * doc/Makefile.in: Ditto.
+       * src/config.h.in: Ditto.
+       * src/Makefile.in: Ditto.
+       * src/atomic_ops/Makefile.in: Ditto.
+       * src/atomic_ops/sysdeps/Makefile.in: Ditto.
+       * tests/Makefile.in: Ditto.
+
+2009-09-25  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
+
+       * configure.ac: Replace AC_PROG_CC with AM_PROG_CC_C_O.
+
+2009-09-16  Ivan Maidanski <ivmai@mail.ru>
+
+       * ChangeLog: Remove trailing spaces at EOLn.
+       * doc/README.txt: Expand all tabs to spaces; remove trailing
+       spaces at EOLn; remove multiple trailing blank lines.
+       * src/atomic_ops.c: Ditto.
+       * src/atomic_ops.h: Ditto.
+       * src/atomic_ops/generalize-small.h: Ditto.
+       * src/atomic_ops/generalize.h: Ditto.
+       * src/atomic_ops/sysdeps/acquire_release_volatile.h: Ditto.
+       * src/atomic_ops/sysdeps/aligned_atomic_load_store.h: Ditto.
+       * src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h: Ditto.
+       * src/atomic_ops/sysdeps/all_atomic_load_store.h: Ditto.
+       * src/atomic_ops/sysdeps/ao_t_is_int.h: Ditto.
+       * src/atomic_ops/sysdeps/armcc/arm_v6.h: Ditto.
+       * src/atomic_ops/sysdeps/atomic_load_store.h: Ditto.
+       * src/atomic_ops/sysdeps/char_acquire_release_volatile.h: Ditto.
+       * src/atomic_ops/sysdeps/char_atomic_load_store.h: Ditto.
+       * src/atomic_ops/sysdeps/gcc/alpha.h: Ditto.
+       * src/atomic_ops/sysdeps/gcc/arm.h: Ditto.
+       * src/atomic_ops/sysdeps/gcc/hppa.h: Ditto.
+       * src/atomic_ops/sysdeps/gcc/ia64.h: Ditto.
+       * src/atomic_ops/sysdeps/gcc/m68k.h: Ditto.
+       * src/atomic_ops/sysdeps/gcc/mips.h: Ditto.
+       * src/atomic_ops/sysdeps/gcc/powerpc.h: Ditto.
+       * src/atomic_ops/sysdeps/gcc/s390.h: Ditto.
+       * src/atomic_ops/sysdeps/gcc/sparc.h: Ditto.
+       * src/atomic_ops/sysdeps/gcc/x86.h: Ditto.
+       * src/atomic_ops/sysdeps/gcc/x86_64.h: Ditto.
+       * src/atomic_ops/sysdeps/generic_pthread.h: Ditto.
+       * src/atomic_ops/sysdeps/hpc/hppa.h: Ditto.
+       * src/atomic_ops/sysdeps/hpc/ia64.h: Ditto.
+       * src/atomic_ops/sysdeps/ibmc/powerpc.h: Ditto.
+       * src/atomic_ops/sysdeps/icc/ia64.h: Ditto.
+       * src/atomic_ops/sysdeps/int_acquire_release_volatile.h: Ditto.
+       * src/atomic_ops/sysdeps/int_aligned_atomic_load_store.h: Ditto.
+       * src/atomic_ops/sysdeps/int_atomic_load_store.h: Ditto.
+       * src/atomic_ops/sysdeps/msftc/arm.h: Ditto.
+       * src/atomic_ops/sysdeps/msftc/common32_defs.h: Ditto.
+       * src/atomic_ops/sysdeps/msftc/x86.h: Ditto.
+       * src/atomic_ops/sysdeps/msftc/x86_64.h: Ditto.
+       * src/atomic_ops/sysdeps/ordered.h: Ditto.
+       * src/atomic_ops/sysdeps/ordered_except_wr.h: Ditto.
+       * src/atomic_ops/sysdeps/read_ordered.h: Ditto.
+       * src/atomic_ops/sysdeps/short_acquire_release_volatile.h: Ditto.
+       * src/atomic_ops/sysdeps/short_aligned_atomic_load_store.h: Ditto.
+       * src/atomic_ops/sysdeps/short_atomic_load_store.h: Ditto.
+       * src/atomic_ops/sysdeps/standard_ao_double_t.h: Ditto.
+       * src/atomic_ops/sysdeps/sunc/x86.h: Ditto.
+       * src/atomic_ops/sysdeps/sunc/x86_64.h: Ditto.
+       * src/atomic_ops/sysdeps/test_and_set_t_is_ao_t.h: Ditto.
+       * src/atomic_ops_stack.c: Ditto.
+       * src/atomic_ops_stack.h: Ditto.
+       * src/atomic_ops/sysdeps/gcc/arm.h: Replace non-ASCII quotes in a
+       comment.
+       * src/atomic_ops/sysdeps/gcc/mips.h: Use Unix-style EOLn.
+
+2009-09-10  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai123.diff)
+
+       * src/atomic_ops/sysdeps/msftc/arm.h: Add FIXME for InterlockedOps
+       (regarding memory barrier).
+       * src/atomic_ops/sysdeps/msftc/arm.h: Don't recognize
+       AO_ASSUME_ARM_ARCH6 anymore; check for _M_ARM >= 6 instead.
+       * src/atomic_ops/sysdeps/msftc/arm.h (AO_nop_full,
+       AO_test_and_set): Replace FIXME with the comment saying it is
+       emulated (in generalize.h); include test_and_set_t_is_ao_t.h.
+       * src/atomic_ops/sysdeps/msftc/arm.h (AO_store_full): Implement
+       using InterlockedCompareExchange() (assuming the latter has a full
+       mbar) for ARMv6+.
+       * src/atomic_ops/sysdeps/msftc/arm.h: Include
+       all_atomic_load_store.h and test_and_set_t_is_ao_t.h for the case
+       of pre-ARMv6; add the comment.
+
+2009-09-10  Ivan Maidanski <ivmai@mail.ru>
+       (ivmai122.diff)
+
+       * src/atomic_ops/sysdeps/armcc/arm_v6.h
+       (AO_compare_double_and_swap_double): Replace false/true with 0/1.
+       * src/atomic_ops/sysdeps/gcc/arm.h
+       (AO_compare_double_and_swap_double): Ditto.
+       * src/atomic_ops/sysdeps/gcc/arm.h: Recognize more ARMv6+
+       predefined macros (6J, 6ZK, 7A, 7M, 7R).
+       * src/atomic_ops/sysdeps/gcc/arm.h
+       (AO_compare_double_and_swap_double): Add "cc" clobber to asm.
+       * src/atomic_ops/sysdeps/gcc/powerpc.h (AO_HAVE_load_acquire):
+       Correct the name (convert from the lower case).
+       * src/atomic_ops/sysdeps/ibmc/powerpc.h (AO_HAVE_load_acquire):
+       Ditto.
+       * src/atomic_ops/sysdeps/ibmc/powerpc.h (AO_test_and_set,
+       AO_compare_and_swap): Comment out unimplemented code (and the
+       corresponding macros); add FIXME.
+       * src/atomic_ops.c: Recognize AO_USE_WIN32_PTHREADS overriding
+       _MSC_VER and __MINGW32__ predefined macros (useful for WinCE with
+       pthreads-w32 library); don't include signal.h, sys/time.h,
+       sys/select.h in this case; include windows.h instead.
+       * src/atomic_ops.c (AO_pause): Use Sleep() in case of
+       AO_USE_WIN32_PTHREADS (instead of select()).
+       * src/atomic_ops.c (all_sigs, initialized): Don't define in case
+       of AO_USE_WIN32_PTHREADS.
+       * src/atomic_ops.c (AO_compare_and_swap_emulation,
+       AO_compare_double_and_swap_double_emulation): Don't deal with
+       signals in case of AO_USE_WIN32_PTHREADS.
+
+2009-09-10  Ivan Maidanski <ivmai@mail.ru>
+       (diff110)
+
+       * src/atomic_ops/sysdeps/msftc/arm.h: New file (initial support
+       for ARM family).
+       * src/atomic_ops/sysdeps/msftc/common32_defs.h: New file.
+       * src/atomic_ops/sysdeps/msftc/arm.h (AO_ASSUME_ARM_ARCH6): New
+       macro.
+       * src/atomic_ops/sysdeps/msftc/common32_defs.h
+       (AO_USE_INTERLOCKED_INTRINSICS): Ditto.
+       * src/atomic_ops/sysdeps/msftc/x86.h: Move "Interlocked"
+       declarations to common32_defs.h.
+       * src/atomic_ops/sysdeps/msftc/common32_defs.h
+       (AO_INTERLOCKED_VOLATILE): New macro defined (used by
+       Interlocked-based primitives) for compatibility with older VC++.
+       * src/atomic_ops/sysdeps/msftc/common32_defs.h: Don't include
+       missing <intrin.h> if WinCE target.
+       * src/atomic_ops/sysdeps/msftc/x86.h: Include common32_defs.h
+       (define AO_USE_INTERLOCKED_INTRINSICS unconditionally).
+       * src/atomic_ops/sysdeps/msftc/x86.h (AO_fetch_and_add_full,
+       AO_fetch_and_add1_full, AO_fetch_and_sub1_full,
+       AO_compare_and_swap_full): Move arch-independent primitives to
+       common32_defs.h.
+       * src/atomic_ops/sysdeps/msftc/x86.h: Remove comment about i486 or
+       better CPU (since Interlocked Add and Xchg primitives are available
+       on any 32-bit CPU).
+       * src/atomic_ops.h: Include msftc/x86.h even if _M_IX86 is less than
+       400 (for i80386).
+       * src/atomic_ops.h: Include msftc/x86.h if "x86" defined (for WinCE
+       on x86).
+       * src/atomic_ops.h: Include msftc/arm.h if ARM target (for WinCE).
+
+2009-09-10  Ivan Maidanski <ivmai@mail.ru>
+       (diff109_cvs)
+
+       * src/atomic_ops/sysdeps/msftc/x86.h: Fix comments (prefix
+       ASSUME_WINDOWS98 with "AO_").
+       * src/atomic_ops/sysdeps/msftc/x86.h: Prefix ASSUME_VISTA macro with
+       "AO_".
+       * src/atomic_ops/sysdeps/msftc/x86.h (AO_nop_full): Replace
+       K&R-style function definition with ANSI C one.
+       * src/atomic_ops/sysdeps/msftc/x86.h (AO_test_and_set_full):
+       Replace AO_TS_SET with its value 0xff (some compilers does not like
+       C enum consts inside inline assembler).
+       * src/atomic_ops/sysdeps/msftc/x86.h (AO_test_and_set_full): Add
+       comment about "missing return value" warning.
+       * src/atomic_ops/sysdeps/msftc/x86.h
+       (AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE): New macro.
+       * src/atomic_ops/sysdeps/msftc/x86.h (AO_compare_and_swap_full): Use
+       _InterlockedCompareExchange() with args and result of PVOID type
+       if AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE is defined (mostly for
+       DigitalMars compiler support).
+       * src/atomic_ops/sysdeps/msftc/x86.h
+       (AO_compare_double_and_swap_double_full): Swap all "val1" and "val2"
+       variables ("val1" is the lowest part of AO_double_t).
+       * src/atomic_ops/sysdeps/msftc/x86.h
+       (AO_compare_double_and_swap_double_full): Rename to
+       AO_double_compare_and_swap_full (as it has 3 args).
+       * src/atomic_ops/sysdeps/msftc/x86.h: Replace C++ style comment
+       with ANSI C one.
+
+2009-09-10  Ivan Maidanski <ivmai@mail.ru>
+       (diff108_cvs)
+
+       * src/atomic_ops/sysdeps/gcc/x86_64.h: Remove comments about i486
+       and 32-bit WinChips.
+       * src/atomic_ops/sysdeps/msftc/x86_64.h: Ditto.
+       * src/atomic_ops/sysdeps/gcc/x86_64.h (AO_nop_full): Replace
+       K&R-style function definition with ANSI C one.
+       * src/atomic_ops/sysdeps/msftc/x86_64.h (AO_nop_full): Ditto.
+       * src/atomic_ops/sysdeps/gcc/x86_64.h
+       (AO_compare_double_and_swap_double_full): Fix comment.
+       * src/atomic_ops/sysdeps/gcc/x86_64.h
+       (AO_compare_double_and_swap_double_full): Swap all "val1" and "val2"
+       variables ("val1" is the lowest part of AO_double_t).
+       * src/atomic_ops/sysdeps/msftc/x86_64.h
+       (AO_compare_double_and_swap_double_full): Ditto.
+       * src/atomic_ops/sysdeps/msftc/x86_64.h: Remove comment about
+       ASSUME_WINDOWS98.
+       * src/atomic_ops/sysdeps/msftc/x86_64.h (AO_ASM_X64_AVAILABLE): New
+       macro.
+       * src/atomic_ops/sysdeps/msftc/x86_64.h: Include
+       "test_and_set_t_is_char.h" if AO_ASM_X64_AVAILABLE (same as in
+       x86_64.h for gcc); remove FIXME (for re-implement test-and-set).
+       * src/atomic_ops/sysdeps/msftc/x86_64.h: Include
+       "standard_ao_double_t.h" (same as in x86_64.h for gcc).
+       * src/atomic_ops/sysdeps/msftc/x86_64.h: Add comment for include
+       <intrin.h> assuming at least VC++ v8.
+       * src/atomic_ops/sysdeps/msftc/x86_64.h: Remove _Interlocked
+       prototypes (since they are always declared in intrin.h).
+       * src/atomic_ops/sysdeps/msftc/x86_64.h (AO_nop_full): Move its
+       definition below CAS primitive (to textually group all asm-based
+       primitives together).
+       * src/atomic_ops/sysdeps/msftc/x86_64.h (AO_test_and_set_full):
+       Implement for AO_ASM_X64_AVAILABLE case.
+       * src/atomic_ops/sysdeps/msftc/x86_64.h: Remove AO_CASDOUBLE_MISSING
+       macro (replaced with AO_ASM_X64_AVAILABLE).
+       * src/atomic_ops/sysdeps/msftc/x86_64.h
+       (AO_compare_double_and_swap_double_full): Add intrinsic-based
+       implementation for VC++ v9+.
+       * src/atomic_ops/sysdeps/standard_ao_double_t.h: Include
+       <xmmintrin.h> (and use "__m128" type) if _WIN64.
+       * src/atomic_ops/sysdeps/standard_ao_double_t.h
+       (AO_HAVE_DOUBLE_PTR_STORAGE): Define it always (as
+       "double_ptr_storage" is defined for all cases).
+
+2009-09-09  Hans Boehm <Hans.Boehm@hp.com> (Really mostly Patrick Marlier)
+
+       * src/atomic_ops/sysdeps/gcc/sparc.h (NO_SPARC_V9):
+       Renamed to AO_NO_SPARC_V9.
+
+2009-09-01  Hans Boehm <Hans.Boehm@hp.com> (Really mostly Patrick Marlier)
+
+       * src/atomic_ops/sysdeps/gcc/sparc.h (AO_test_and_set_full): Use
+       AO_TS_VAL_t for "oldval" (for 64-bit support).
+       * src/atomic_ops/sysdeps/gcc/sparc.h (AO_compare_and_swap_full):
+       New function implemented.
+
+2009-08-12  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
+       (diff107_cvs, resembling diff78 and diff88_cvs)
+
+       * src/atomic_ops/sysdeps/sunc/x86.h: New file.
+       * src/atomic_ops/sysdeps/sunc/x86_64.h: Ditto.
+       * src/atomic_ops.h (AO_INLINE): Support inlining for DigitalMars,
+       Watcom, Sun C.
+       * src/atomic_ops.h (AO_compiler_barrier): Use intrinsic-based
+       implementation for VC++ v8+ (include <intrin.h> before it unless
+       WinCE target); use asm-based barrier implementation for Borland,
+       DigitalMars and Watcom.
+       * src/atomic_ops.h: Fix comment (for x86_64).
+       * src/atomic_ops.h: Include specialized x86.h and x86_64.h arch
+       headers for Sun C (if not AO_USE_PTHREAD_DEFS).
+       * src/atomic_ops.h: Include VC-specific arch headers for Borland,
+       DigitalMars and Watcom (Win32 target only).
+
+2009-05-27  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
+       (diff87_cvs, resembling diff29, diff68, diff78 partly)
+
+       * doc/README.txt: Remove outdated info about Windows support.
+       * src/atomic_ops/generalize.h (AO_nop_full): Replace
+       K&R-style function definition with ANSI C one.
+       * src/atomic_ops/sysdeps/armcc/arm_v6.h (AO_nop_full): Ditto.
+       * src/atomic_ops/sysdeps/gcc/alpha.h (AO_nop_full, AO_nop_write):
+       Ditto.
+       * src/atomic_ops/sysdeps/gcc/arm.h (AO_nop_full): Ditto.
+       * src/atomic_ops/sysdeps/gcc/ia64.h (AO_nop_full): Ditto.
+       * src/atomic_ops/sysdeps/gcc/mips.h (AO_nop_full): Ditto.
+       * src/atomic_ops/sysdeps/gcc/powerpc.h (AO_nop_full, AO_lwsync): Ditto.
+       * src/atomic_ops/sysdeps/gcc/x86.h (AO_nop_full): Ditto.
+       * src/atomic_ops/sysdeps/generic_pthread.h (AO_nop_full): Ditto.
+       * src/atomic_ops/sysdeps/hpc/ia64.h (AO_nop_full): Ditto.
+       * src/atomic_ops/sysdeps/icc/ia64.h (AO_nop_full): Ditto.
+       * src/atomic_ops/sysdeps/ordered.h (AO_nop_full): Ditto.
+       * src/atomic_ops/sysdeps/ordered_except_wr.h (AO_nop_write): Ditto.
+       * src/atomic_ops/sysdeps/read_ordered.h (AO_nop_read): Ditto.
+       * src/atomic_ops/sysdeps/test_and_set_t_is_ao_t.h (AO_TS_val): Fix
+       comment.
+
+2009-02-24  Hans Boehm <Hans.Boehm@hp.com> (Really primarily Earl Chew)
+
+       * src/atomic_ops/sysdeps/gcc/powerpc.h: Add index,
+       update modifiers to asms, refine clobbers to "cr0", use
+       cr0 instead of cr7, add explicit AO_fetch_and_add,
+       add UNTESTED 64 bit support.
+
+2008-11-10  Hans Boehm <Hans.Boehm@hp.com> (Really Joerg Wagner)
+
+       * src/atomic_ops/sysdeps/armcc/arm_v6.h: Compute
+       AO_compare_and_swap value differently, add
+       AO_compare_double_and_swap_double, some indentation fixes.
+       * src/atomic_ops/sysdeps/gcc/arm.h: Make gcc asm code more
+       robust and minimize clobbers, Add AO_compare_double_and_swap_double.
+
+2008-11-06  Hans Boehm <Hans.Boehm@hp.com>
+
+       * INSTALL: Add some platform-specific documentation.
+       * src/Makefile.msft: Fix copyright notice.
+
+2008-10-21  Hans Boehm <Hans.Boehm@hp.com>  (really Ivan Maidanski)
+
+       * src/atomic_ops/sysdeps/aligned_atomic_load_store.h: Fix comments.
+       * src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h: Fix comments.
+       * src/atomic_ops/sysdeps/all_atomic_load_store.h: Fix comments.
+       * src/atomic_ops/sysdeps/atomic_load_store.h: Fix comments.
+       * src/atomic_ops/sysdeps/char_atomic_load_store.h: Fix comments.
+       * src/atomic_ops/sysdeps/gcc/arm.h: Fix comments.
+       * src/atomic_ops/sysdeps/gcc/x86.h: Fix comments.
+       * src/atomic_ops/sysdeps/gcc/x86_64.h: Fix comments.
+       * src/atomic_ops/sysdeps/hpc/hppa.h: Fix comments.
+       * src/atomic_ops/sysdeps/hpc/ia64.h: Fix comments.
+       * src/atomic_ops/sysdeps/int_aligned_atomic_load_store.h: Fix comments.
+       * src/atomic_ops/sysdeps/int_atomic_load_store.h: Fix comments.
+       * src/atomic_ops/sysdeps/short_aligned_atomic_load_store.h: Fix comments.
+       * src/atomic_ops/sysdeps/short_atomic_load_store.h: Fix comments.
+       * src/atomic_ops.c: Fix comments.
+       * src/atomic_ops.h: Fix comments.
+       * src/atomic_ops_stack.c: Fix comments.
+       * src/atomic_ops_stack.h: Fix comments.
+
+2008-10-20  Hans Boehm <Hans.Boehm@hp.com>  (really Andrew Agno)
+
+       * src/atomic_ops/sysdeps/gcc/x86_64.h (AO_int_fetch_and_add_full):
+       fix return type.
+
+2008-08-21  Hans Boehm <Hans.Boehm@hp.com>
+
+       * config.guess, config.sub, configure: Regenerate/replace.
+       Use autoconf 2.61, automake 1.9.6.
+
+2008-08-19  Hans Boehm <Hans.Boehm@hp.com> (really Thiemo Seufer)
+
+       * src/atomic_ops/sysdeps/gcc/powerpc.h: Add %U1 (update) to lwz
+       instruction.
+
+2008-08-19  Hans Boehm <Hans.Boehm@hp.com> (really Sebastian Siewior)
+
+       * src/atomic_ops/sysdeps/gcc/powerpc.h: Consider __NO_LWSYNC__.
+
+2008-07-24  Hans Boehm <Hans.Boehm@hp.com> (really Ivan Maidanski)
+
+       * src/atomic_ops/sysdeps/ao_t_is_int.h, src/atomic_ops.h:
+       Add parentheses around addr arg for various functions.
+
+2008-07-18  Hans Boehm <Hans.Boehm@hp.com>
+
+       * src/atomic_ops/sysdeps/gcc/powerpc.h:
+       Add const to first parameter of load calls (forgot one).
+
+2008-07-18  Hans Boehm <Hans.Boehm@hp.com>
+
+       * doc/README.txt, src/atomic_ops/generalize.h,
+       src/atomic_ops/generalize-small.template,
+       src/atomic_ops/generalize-small.h,
+       src/atomic_ops/sysdeps/acquire_release_volatile.h,
+       src/atomic_ops/sysdeps/char_acquire_release_volatile.h,
+       src/atomic_ops/sysdeps/int_acquire_release_volatile.h,
+       src/atomic_ops/sysdeps/short_acquire_release_volatile.h,
+       src/atomic_ops/sysdeps/aligned_atomic_load_store.h,
+       src/atomic_ops/sysdeps/int_aligned_atomic_load_store.h,
+       src/atomic_ops/sysdeps/short_aligned_atomic_load_store.h,
+       src/atomic_ops/sysdeps/ao_t_is_int.h,
+       src/atomic_ops/sysdeps/atomic_load_store.h,
+       src/atomic_ops/sysdeps/char_atomic_load_store.h,
+       src/atomic_ops/sysdeps/int_atomic_load_store.h,
+       src/atomic_ops/sysdeps/short_atomic_load_store.h,
+       src/atomic_ops/sysdeps/generic_pthread.h,
+       src/atomic_ops/sysdeps/read_ordered.h,
+       src/atomic_ops/sysdeps/sysdeps/armcc/arm_v6.h,
+       src/atomic_ops/sysdeps/gcc/arm.h,
+       src/atomic_ops/sysdeps/icc/ia64.h,
+       src/atomic_ops/sysdeps/ibmc/powerpc.h:
+       Add const to first parameter of load calls.
+
+2008-07-10  Hans Boehm <Hans.Boehm@hp.com>
+
+       * src/atomic_ops/sysdeps/gcc/m68k.h: Remove SMP-unsafe
+       AO_or_full, and let it be autogenerated instead.
+
+2008-07-03  Hans Boehm <Hans.Boehm@hp.com> (Really Thiemo Seufer)
+
+       * src/atomic_ops/sysdeps/gcc/mips.h: Really add mips support,
+       fixing a merge accident.
+
+2008-05-30  Hans Boehm <Hans.Boehm@hp.com> (Really from various Debian
+       contributors)
+
+       * doc/Makefile.in, src/Makefile.in, src/atomic_ops/Makefile.in:
+       Regenerate.
+
+2008-05-30  Hans Boehm <Hans.Boehm@hp.com> (Really from various Debian
+       contributors)
+
+       * src/atomic_ops.h, src/atomic_ops/sysdeps/Makefile.am,
+       src/atomic_ops/sysdeps/gcc/mips.h: Add mips support.
+       * src/atomic_ops/sysdeps/gcc/m68k.h: Make test_and_set work
+       on char, align AO_t.  Add cas, or.
+       * src/atomic_ops/sysdeps/gcc/s390.h: Fix include paths.
+       * src/atomic_ops/generalize.h: Fix AO_compare_and_swap_double_acquire.
+       * Makefile.in, aclocal.m4, src/atomic_ops/sysdeps/Makefile.in,
+       tests/Makefile.in: Regenerate.
+
+2008-02-11  Hans Boehm <Hans.Boehm@hp.com>
+          (Really Ian Wienand & Debian maintainers)
+
+       * src/atomic_ops/sysdeps/gcc/x86.h
+       (AO_compare_double_and_swap_double_full): Correctly account for
+       ebx usage with PIC.
+
+2008-01-09  Hans Boehm <Hans.Boehm@hp.com>
+
+       * src/atomic_ops/sysdeps/standard_ao_double_t.h: Let
+       double_ptr_storage default to long long; define everywhere.
+
+2008-01-08  Hans Boehm <Hans.Boehm@hp.com> (Really mostly Joerg Wagner)
+
+       * src/atomic_ops/sysdeps/msftc/x86.h: Conditionally add
+       compare_double_and_swap_double.
+
+2008-01-06  Hans Boehm <Hans.Boehm@hp.com> (Really mostly Joerg Wagner)
+
+       * src/atomic_ops/generalize.h: Add test_and_set generalizations,
+       Add AO_double_compare_and_swap generalizations.
+       * src/atomic_ops/sysdeps/armcc/arm_v6.h: New file.
+       * src/atomic_ops/sysdeps/gcc/arm.h: Handle V6 and V7.
+       * src/atomic_ops/sysdeps/gcc/x86.h,
+       src/atomic_ops/sysdeps/{gcc,msftc}/x86_64.h: Conditionally add
+       compare_double_and_swap_double, commented out for msftc.
+       * src/atomic_ops/sysdeps/standard_ao_double_t.h:  Add
+       double_ptr_storage field.
+
+2008-01-03  Hans Boehm <Hans.Boehm@hp.com>
+       (Merge from separate atomic_ops tree)
+
+       * src/atomic_ops/sysdeps/gcc/x86.h: Define correct macro for
+       double-width cas, and fix its implementation.
+       * doc/README.txt: Clarify use of _full.  Add more warnings about
+       data dependencies.
+
+2008-01-02  Hans Boehm <Hans.Boehm@hp.com>
+
+       * src/atomic_ops/sysdeps/gcc/powerpc.h (AO_load_acquire): Add
+       %X1 modifier to support indexed addressing.
+
+2007-07-23  Hans Boehm <Hans.Boehm@hp.com> (really Jim Marshall)
+
+       * src/atomic_ops/sysdeps/msftc/x86.h (_InterlockedExchangeAdd): Define
+       for VC++6.
+
+2007-07-05  Andreas Tobler  <a.tobler@schweiz.org>
+
+       * src/atomic_ops.h: Check for __powerpc64__ and __ppc64__ to include
+       powerpc.h.
+
+2007-06-26  Hans Boehm <Hans.Boehm@hp.com> (really Luca Barbato)
+
+       * src/atomic_ops/sysdeps/gcc/powerpc.h (AO_load_acquire): Add
+       64-bit version.
+
+2007-06-13  Hans Boehm <Hans.Boehm@hp.com>
+
+       * src/atomic_ops.h: include stddef.h
+
+2007-06-06  Hans Boehm <Hans.Boehm@hp.com>
+
+       * src/atomic_ops/sysdeps/msftc/x86_64.h: New file.
+       * src/atomic_ops.h: Add test for msftc/x86_64.h.
+       * src/atomic_ops/sysdeps/msftc/x86.h: Complain for _WIN64.
+       * src/atomic_ops/sysdeps/Makefile.am: Add x86_64.h.
+       * src/atomic_ops/sysdeps/Makefile.in: Regenerate.
+       * src/atomic_ops/sysdeps/aligned_atomic_load_store.h,
+       src/atomic_ops/sysdeps/int_aligned_atomic_load_store.h,
+       src/atomic_ops/sysdeps/short_aligned_atomic_load_store.h:
+       Replace unsigned long cast with size_t.
+
+2007-05-17  Hans Boehm <Hans.Boehm@hp.com>
+
+       * src/atomic_ops/sysdeps/gcc/hppa.h (AO_test_and_set_full):
+       Add cast for return.
+
+2007-05-14  Hans Boehm <Hans.Boehm@hp.com>
+
+       * doc/README.txt: Update to reflect C++0x effort.
+
+2007-05-07  Hans Boehm <Hans.Boehm@hp.com> (with help from Philipp Zambelli)
+
+       * src/atomic_ops/sysdeps/msftc/x86.h: Don't just assume that mfence
+       is present.
+       * src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set_full): Correct
+       oldval type.
+
+2006-11-09  Earl Chew (Agilent)
+
+       * msftc/x86.h: Follow Microsoft documentation and include
+       windows.h.
+
+[1.2 release]
+
+2006-07-11  Hans Boehm <Hans.Boehm@hp.com>
+
+       * src/atomic_ops/sysdeps/hpc/ia64.h: Fix typos.
+
+2006-03-28  Earl Chew (Agilent)
+
+       * src/atomic_ops/sysdeps/gcc/powerpc.h: Remove unused variable cr.
+       * src/atomic_ops/sysdeps/msftc/x86.h:
+       Use new intrinsics available in MSVC 2003 and MSVC 2005.
+       Use inline assembler to generate mfence and byte sized xchg
+       Use correct prototype for InterlockedCompareExchange.
+       * src/atomic_ops.h: Add test for __PPC__ .
+       * tests/run_parallel.inc: Add simple VxWorks support.
+       * tests/test_atomic.c, tests/test_atomic_include.h: Add prototypes
+       to silence compiler warnings.
+
+2006-11-13  Hans Boehm <Hans.Boehm@hp.com>
+
+       * src/atomic_ops/sysdeps/gcc/powerpc.h: Beginnings of 64 bit support.
+       * src/atomic_ops/sysdeps/gcc/x86.h: Use "=q" for AO_test_and_set_full.
+
+2005-11-04  Hans Boehm <Hans.Boehm@hp.com>
+
+       * src/atomic_ops/sysdeps/gcc/ia64.h: Include
+       all_acquire_release_volatile.h, instead of just the pointer-sized
+       version.
+       * src/atomic_ops/sysdeps/gcc/ia64.h: Include
+       all_acquire_release_volatile.h and all_atomic_load_store.h,
+       instead of just the pointer-sized versions.
+
+[1.1 release]
+
+2005-09-27  Hans Boehm <Hans.Boehm@hp.com>
+
+       * src/atomic_ops.h: Define AO_CAN_EMUL_CAS for arm.
+       * src/atomic_ops/sysdeps/read_ordered.h: New file, extracted from
+       ordered_except_wr.h.
+       * src/atomic_ops/sysdeps/ordered_except_wr.h: include read_ordered.h
+       instead of duplicating it.
+       * src/atomic_ops/sysdeps/gcc/arm.h: Include read_ordered.h.
+
+2005-09-16  Hans Boehm <Hans.Boehm@hp.com>
+
+       * src/atomic_ops/sysdeps/gcc/arm.h: Replace the AO_test_and_set
+       definition with one that might actually work.  (Thanks to Kazu
+       Hirata and Paul Brook.)
+
+2005-08-01  Hans Boehm <Hans.Boehm@hp.com>
+
+       * src/atomic_ops/Makefile.am: Change function naming from "byte" to
+       "char" (again).
+
+[1.0 release]
+
+2005-03-21  Hans Boehm <Hans.Boehm@hp.com>
+       Fix various acquire_release_volatile.h files to reflect the fact
+       that both icc and gcc seem to reorder ordinary memory accesses around
+       volatile accesses early in the compilation. Modify the acquire
+       release test to catch this problem (with high probablity, and only on
+       a multiprocessor).
+
+2005-03        Hans Boehm <Hans.Boehm@hp.com>
+       Fixes for recently introduced bugs.  Update x86 and x86-64 assembly
+       syntax to deal with complaints by some recent gcc versions.
+
+2005-02        Hans Boehm <Hans.Boehm@hp.com>
+       Added libatomic_ops_gpl library with support for mostly
+       lock-free stack and malloc().
+
+2005-01 Ian Wienand <ianw@gelato.unsw.edu.au>, Al Stone <ahs3@debian.org>,
+       Hans Boehm <Hans.Boehm@hp.com>
+       Use autoconf, automake, starting with code from Debian package.
+       Don't use libtool.
+
+2005-01        Hans Boehm <Hans.Boehm@hp.com>
+       * test_and_set_t_is_ao_t.h, test_and_set_t_is_char.h, others:
+       Change most platforms to use byte-wide test-and-set locations.
+
+2005-01        Hans Boehm <Hans.Boehm@hp.com>
+       * ao_t_is_int.h: Add to trivially support int-wide operations
+       on platforms with int-sized pointers.
+
+2004-12        Hans Boehm <Hans.Boehm@hp.com>
+       * gcc/powerpc.h: First serious attempt to support PowerPC (with
+       help from Maged Michael and others).
+
+2004-12        Hans Boehm <Hans.Boehm@hp.com>
+       * sunc/sparc.[hS]: Added minimal supprt for the Sun SPARC compiler.
+       * atomic_ops_sysdeps.S: Add support for platforms that require
+       out-of-line assmebly code.
+
+2004-10 Hans Boehm <Hans.Boehm@hp.com>
+       More work on char, short, int sized data.  Add both
+       compare_double_and_swap_double and compare_and_swap_double.
+       Typically each platform will provide at most one of these.
+
+2004-07-02  Ranko Zivojnovic
+       Replace both instances of AO_HAVE_NOP_FULL with AO_HAVE_nop_full.
+
+2004-06 Hans Boehm <Hans.Boehm@hp.com>
+       Start to add atomic_ops primitives for different sized data.
+
+2003-12-18  Hans Boehm  <Hans.Boehm@hp.com>
+
+       * atomic_ops/sysdeps/acquire_release_volatile.h, atomic_ops.h:
+       Fix support for ecc on IA64.  Remove compiler_barrier workaround
+       for gcc 3.4 and later.
+
+2003-12-17  Hans Boehm  <Hans.Boehm@hp.com>
+
+       * atomic_ops/sysdeps/hpc/{ia64.h,hppa.h},
+       atomic_ops/sysdeps/msftc/x86.h, Makefile, Makefile.atomic_ops,
+       Makefile.atomic_ops.msft, atomic_ops.h: Add initial support
+       for atomic_ops for VC++/Windows/X86 and HP/UX with the HP
+       compiler on PA_RISC and IA64.
+
+2003-12-09  Hans Boehm  <Hans.Boehm@hp.com>
+
+       * many: Install under "atomic_ops" instead of "ao".
+       Change atomic_ops include file structure.  Auxiliary include
+       files are all under include/atomic_ops.
+       Fix (hopefully) "make dist" in atomic_ops distribution.
+       Renamed various types to end in _t, though the old versions
+       are still defined for backward compatibility.
+
+2003-12-08  Carlos O'Donell  <carlos@baldric.uwo.ca>
+
+       * ao_sysdeps/gcc/hppa.h: Define AO_CLEAR macro. Change
+       AO_pa_clearable_loc type. Add __ldcw, and __ldcw_align
+       helper macros. AO_test_and_set_full uses helper macros.
+
+
+Started sometime after version 0.4 release.  Currently the format is
+informal.  Eventually should become more GNU-like.
diff --git a/src/mm/boehm-gc/libatomic_ops/INSTALL b/src/mm/boehm-gc/libatomic_ops/INSTALL
new file mode 100644 (file)
index 0000000..8b82ade
--- /dev/null
@@ -0,0 +1,291 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
+
+   This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
diff --git a/src/mm/boehm-gc/libatomic_ops/Makefile.am b/src/mm/boehm-gc/libatomic_ops/Makefile.am
new file mode 100644 (file)
index 0000000..da64dc2
--- /dev/null
@@ -0,0 +1,3 @@
+SUBDIRS = src doc tests
+
+#distclean-local:
diff --git a/src/mm/boehm-gc/libatomic_ops/Makefile.in b/src/mm/boehm-gc/libatomic_ops/Makefile.in
new file mode 100644 (file)
index 0000000..0671dbb
--- /dev/null
@@ -0,0 +1,601 @@
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
+       ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \
+       install-sh missing mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PICFLAG = @PICFLAG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = src doc tests
+all: all-recursive
+
+.SUFFIXES:
+am--refresh:
+       @:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+             cd $(srcdir) && $(AUTOMAKE) --gnu  \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           echo ' $(SHELL) ./config.status'; \
+           $(SHELL) ./config.status;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       $(am__remove_distdir)
+       test -d $(distdir) || mkdir $(distdir)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
+           || exit 1; \
+           distdir=`$(am__cd) $(distdir) && pwd`; \
+           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+           (cd $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$top_distdir" \
+               distdir="$$distdir/$$subdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+       || chmod -R a+r $(distdir)
+dist-gzip: distdir
+       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       $(am__remove_distdir)
+
+dist-bzip2: distdir
+       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+       $(am__remove_distdir)
+
+dist-lzma: distdir
+       tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+       $(am__remove_distdir)
+
+dist-tarZ: distdir
+       tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+       $(am__remove_distdir)
+
+dist-shar: distdir
+       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+       $(am__remove_distdir)
+
+dist-zip: distdir
+       -rm -f $(distdir).zip
+       zip -rq $(distdir).zip $(distdir)
+       $(am__remove_distdir)
+
+dist dist-all: distdir
+       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+       case '$(DIST_ARCHIVES)' in \
+       *.tar.gz*) \
+         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+       *.tar.bz2*) \
+         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.lzma*) \
+         unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.Z*) \
+         uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+       *.shar.gz*) \
+         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+       *.zip*) \
+         unzip $(distdir).zip ;;\
+       esac
+       chmod -R a-w $(distdir); chmod a+w $(distdir)
+       mkdir $(distdir)/_build
+       mkdir $(distdir)/_inst
+       chmod a-w $(distdir)
+       dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+         && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+         && cd $(distdir)/_build \
+         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+           $(DISTCHECK_CONFIGURE_FLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) dvi \
+         && $(MAKE) $(AM_MAKEFLAGS) check \
+         && $(MAKE) $(AM_MAKEFLAGS) install \
+         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+         && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+               distuninstallcheck \
+         && chmod -R a-w "$$dc_install_base" \
+         && ({ \
+              (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+                   distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+             } || { rm -rf "$$dc_destdir"; exit 1; }) \
+         && rm -rf "$$dc_destdir" \
+         && $(MAKE) $(AM_MAKEFLAGS) dist \
+         && rm -rf $(DIST_ARCHIVES) \
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+       $(am__remove_distdir)
+       @(echo "$(distdir) archives ready for distribution: "; \
+         list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+         sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+       @cd $(distuninstallcheck_dir) \
+       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+          || { echo "ERROR: files left after uninstall:" ; \
+               if test -n "$(DESTDIR)"; then \
+                 echo "  (check DESTDIR support)"; \
+               fi ; \
+               $(distuninstallcheck_listfiles) ; \
+               exit 1; } >&2
+distcleancheck: distclean
+       @if test '$(srcdir)' = . ; then \
+         echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+         exit 1 ; \
+       fi
+       @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+         || { echo "ERROR: files left in build directory after distclean:" ; \
+              $(distcleancheck_listfiles) ; \
+              exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -rf $(top_srcdir)/autom4te.cache
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+       install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am am--refresh check check-am clean clean-generic \
+       ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+       dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \
+       distclean-generic distclean-tags distcleancheck distdir \
+       distuninstallcheck dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
+       tags-recursive uninstall uninstall-am
+
+
+#distclean-local:
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/mm/boehm-gc/libatomic_ops/NEWS b/src/mm/boehm-gc/libatomic_ops/NEWS
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/src/mm/boehm-gc/libatomic_ops/README b/src/mm/boehm-gc/libatomic_ops/README
new file mode 100644 (file)
index 0000000..4e6172f
--- /dev/null
@@ -0,0 +1,56 @@
+Synopsis
+========
+
+This package provides semi-portable access to hardware provided
+atomic memory operations.  These might allow you to write code:
+
+- That does more interesting things in signal handlers.
+- Makes more effective use of multiprocessors by allowing you to write
+  clever lock-free code.  Note that such code is very difficult to get
+  right, and will unavoidably be less portable than lock-based code.  It
+  is also not always faster than lock-based code.  But it may occasionally
+  be a large performance win.
+- To experiment with new and much better thread programming paradigms, etc.
+
+For details and licensing restrictions see the files in the doc
+subdirectory.
+
+This is version 1.3alpha1 of libatomic_ops.
+
+You might find a more recent version of this at
+
+http://www.hpl.hp.com/personal/Hans_Boehm/gc
+
+or
+
+http://www.hpl.hp.com/research/linux/atomic_ops/
+
+
+Installation and Usage
+======================
+
+The configuration and build scripts for this package were generated by
+Automake/Autoconf.  "./configure --prefix=<install dir>; make; make install"
+in this directory should work.  For a more customized build, see "INSTALL"
+and the output of "./configure --help".
+
+Note that much of the content of this library is in the header files.
+However, two small libraries are built and installed:
+
+- libatomic_ops.a is a support library, which is not needed on some platforms.
+  This is intended to be usable, under some mild restrictions, in free or
+  proprietary code, as are all the header files.  See doc/LICENSING.txt.
+- libatomic_ops_gpl.a contains some higher level facilities.  This code is
+  currently covered by the GPL.  The contents currently correspond to
+  the headers atomic_ops_stack.h and atomic_ops_malloc.h.
+
+
+Platform Specific Notes
+=======================
+
+Win32/64: src/Makefile.msft contains a very simple Makefile for building
+and running tests and building the gpl library.  The core atomic_ops
+implementation is entirely in header files.
+
+HP-UX/PA-RISC: aCC -Ae won't work as a C compiler, since it doesn't support
+inline assembly code.  Use cc.
diff --git a/src/mm/boehm-gc/libatomic_ops/aclocal.m4 b/src/mm/boehm-gc/libatomic_ops/aclocal.m4
new file mode 100644 (file)
index 0000000..de84ba5
--- /dev/null
@@ -0,0 +1,946 @@
+# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
+[m4_warning([this file was generated for autoconf 2.64.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.10'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.10.2], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.10.2])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# Figure out how to run the assembler.                      -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_PROG_AS
+# ----------
+AC_DEFUN([AM_PROG_AS],
+[# By default we simply use the C compiler to build assembly code.
+AC_REQUIRE([AC_PROG_CC])
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+AC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
+AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
+_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
+])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 4
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[# Autoconf 2.62 quotes --file arguments for eval, but not when files
+# are listed without --file.  Let's play safe and only enable the eval
+# if we detect the quoting.
+case $CONFIG_FILES in
+*\'*) eval set x "$CONFIG_FILES" ;;
+*)   set x $CONFIG_FILES ;;
+esac
+shift
+for mf
+do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # Grep'ing the whole file is not good either: AIX grep has a line
+  # limit of 2048, but all sed's we know have understand at least 4000.
+  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`AS_DIRNAME(["$file"])`
+    AS_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 13
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.60])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                  [_AM_DEPENDENCIES(OBJC)],
+                  [define([AC_PROG_OBJC],
+                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes.                 -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/src/mm/boehm-gc/libatomic_ops/compile b/src/mm/boehm-gc/libatomic_ops/compile
new file mode 100755 (executable)
index 0000000..1b1d232
--- /dev/null
@@ -0,0 +1,142 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+       # configure might choose to run compile as `compile cc -o foo foo.c'.
+       # So we strip `-o arg' only if arg is an object.
+       eat=1
+       case $2 in
+         *.o | *.obj)
+           ofile=$2
+           ;;
+         *)
+           set x "$@" -o "$2"
+           shift
+           ;;
+       esac
+       ;;
+      *.c)
+       cfile=$1
+       set x "$@" "$1"
+       shift
+       ;;
+      *)
+       set x "$@" "$1"
+       shift
+       ;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no `-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # `.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/src/mm/boehm-gc/libatomic_ops/config.guess b/src/mm/boehm-gc/libatomic_ops/config.guess
new file mode 100755 (executable)
index 0000000..7b24a87
--- /dev/null
@@ -0,0 +1,1542 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   Free Software Foundation, Inc.
+
+timestamp='2008-11-15'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+       for c in cc gcc c89 c99 ; do
+         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+            CC_FOR_BUILD="$c"; break ;
+         fi ;
+       done ;
+       if test x"$CC_FOR_BUILD" = x ; then
+         CC_FOR_BUILD=no_compiler_found ;
+       fi
+       ;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+       PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+       # NetBSD (nbsd) targets should (where applicable) match one or
+       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+       # switched to ELF, *-*-netbsd* would select the old
+       # object file format.  This provides both forward
+       # compatibility and a consistent mechanism for selecting the
+       # object file format.
+       #
+       # Note: NetBSD doesn't particularly care about the vendor
+       # portion of the name.  We always set it to "unknown".
+       sysctl="sysctl -n hw.machine_arch"
+       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+       case "${UNAME_MACHINE_ARCH}" in
+           armeb) machine=armeb-unknown ;;
+           arm*) machine=arm-unknown ;;
+           sh3el) machine=shl-unknown ;;
+           sh3eb) machine=sh-unknown ;;
+           sh5el) machine=sh5le-unknown ;;
+           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+       esac
+       # The Operating System including object format, if it has switched
+       # to ELF recently, or will in the future.
+       case "${UNAME_MACHINE_ARCH}" in
+           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+               eval $set_cc_for_build
+               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+                       | grep __ELF__ >/dev/null
+               then
+                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+                   # Return netbsd for either.  FIX?
+                   os=netbsd
+               else
+                   os=netbsdelf
+               fi
+               ;;
+           *)
+               os=netbsd
+               ;;
+       esac
+       # The OS release
+       # Debian GNU/NetBSD machines have a different userland, and
+       # thus, need a distinct triplet. However, they do not need
+       # kernel version information, so it can be replaced with a
+       # suitable tag, in the style of linux-gnu.
+       case "${UNAME_VERSION}" in
+           Debian*)
+               release='-gnu'
+               ;;
+           *)
+               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+               ;;
+       esac
+       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+       # contains redundant information, the shorter form:
+       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+       echo "${machine}-${os}${release}"
+       exit ;;
+    *:OpenBSD:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+       exit ;;
+    *:ekkoBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+       exit ;;
+    *:SolidBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+       exit ;;
+    macppc:MirBSD:*:*)
+       echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    *:MirBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    alpha:OSF1:*:*)
+       case $UNAME_RELEASE in
+       *4.0)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+               ;;
+       *5.*)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               ;;
+       esac
+       # According to Compaq, /usr/sbin/psrinfo has been available on
+       # OSF/1 and Tru64 systems produced since 1995.  I hope that
+       # covers most systems running today.  This code pipes the CPU
+       # types through head -n 1, so we only detect the type of CPU 0.
+       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+       case "$ALPHA_CPU_TYPE" in
+           "EV4 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "EV4.5 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "LCA4 (21066/21068)")
+               UNAME_MACHINE="alpha" ;;
+           "EV5 (21164)")
+               UNAME_MACHINE="alphaev5" ;;
+           "EV5.6 (21164A)")
+               UNAME_MACHINE="alphaev56" ;;
+           "EV5.6 (21164PC)")
+               UNAME_MACHINE="alphapca56" ;;
+           "EV5.7 (21164PC)")
+               UNAME_MACHINE="alphapca57" ;;
+           "EV6 (21264)")
+               UNAME_MACHINE="alphaev6" ;;
+           "EV6.7 (21264A)")
+               UNAME_MACHINE="alphaev67" ;;
+           "EV6.8CB (21264C)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8AL (21264B)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8CX (21264D)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.9A (21264/EV69A)")
+               UNAME_MACHINE="alphaev69" ;;
+           "EV7 (21364)")
+               UNAME_MACHINE="alphaev7" ;;
+           "EV7.9 (21364A)")
+               UNAME_MACHINE="alphaev79" ;;
+       esac
+       # A Pn.n version is a patched version.
+       # A Vn.n version is a released version.
+       # A Tn.n version is a released field test version.
+       # A Xn.n version is an unreleased experimental baselevel.
+       # 1.2 uses "1.2" for uname -r.
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       exit ;;
+    Alpha\ *:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # Should we change UNAME_MACHINE based on the output of uname instead
+       # of the specific Alpha model?
+       echo alpha-pc-interix
+       exit ;;
+    21064:Windows_NT:50:3)
+       echo alpha-dec-winnt3.5
+       exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+       echo m68k-unknown-sysv4
+       exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-amigaos
+       exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-morphos
+       exit ;;
+    *:OS/390:*:*)
+       echo i370-ibm-openedition
+       exit ;;
+    *:z/VM:*:*)
+       echo s390-ibm-zvmoe
+       exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+       exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+       echo arm-acorn-riscix${UNAME_RELEASE}
+       exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+       echo arm-unknown-riscos
+       exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+       echo hppa1.1-hitachi-hiuxmpp
+       exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+       if test "`(/bin/universe) 2>/dev/null`" = att ; then
+               echo pyramid-pyramid-sysv3
+       else
+               echo pyramid-pyramid-bsd
+       fi
+       exit ;;
+    NILE*:*:*:dcosx)
+       echo pyramid-pyramid-svr4
+       exit ;;
+    DRS?6000:unix:4.0:6*)
+       echo sparc-icl-nx6
+       exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+       case `/usr/bin/uname -p` in
+           sparc) echo sparc-icl-nx7; exit ;;
+       esac ;;
+    sun4H:SunOS:5.*:*)
+       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+       eval $set_cc_for_build
+       SUN_ARCH="i386"
+       # If there is a compiler, see if it is configured for 64-bit objects.
+       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+       # This test works for both compilers.
+       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+           if echo '\n#ifdef __amd64\nIS_64BIT_ARCH\n#endif' | \
+               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+               grep IS_64BIT_ARCH >/dev/null
+           then
+               SUN_ARCH="x86_64"
+           fi
+       fi
+       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:6*:*)
+       # According to config.sub, this is the proper way to canonicalize
+       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+       # it's likely to be more like Solaris than SunOS4.
+       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:*:*)
+       case "`/usr/bin/arch -k`" in
+           Series*|S4*)
+               UNAME_RELEASE=`uname -v`
+               ;;
+       esac
+       # Japanese Language versions have a version number like `4.1.3-JL'.
+       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+       exit ;;
+    sun3*:SunOS:*:*)
+       echo m68k-sun-sunos${UNAME_RELEASE}
+       exit ;;
+    sun*:*:4.2BSD:*)
+       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+       case "`/bin/arch`" in
+           sun3)
+               echo m68k-sun-sunos${UNAME_RELEASE}
+               ;;
+           sun4)
+               echo sparc-sun-sunos${UNAME_RELEASE}
+               ;;
+       esac
+       exit ;;
+    aushp:SunOS:*:*)
+       echo sparc-auspex-sunos${UNAME_RELEASE}
+       exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+       echo m68k-atari-mint${UNAME_RELEASE}
+        exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit ;;
+    m68k:machten:*:*)
+       echo m68k-apple-machten${UNAME_RELEASE}
+       exit ;;
+    powerpc:machten:*:*)
+       echo powerpc-apple-machten${UNAME_RELEASE}
+       exit ;;
+    RISC*:Mach:*:*)
+       echo mips-dec-mach_bsd4.3
+       exit ;;
+    RISC*:ULTRIX:*:*)
+       echo mips-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    VAX*:ULTRIX*:*:*)
+       echo vax-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+       echo clipper-intergraph-clix${UNAME_RELEASE}
+       exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+       int main (int argc, char *argv[]) {
+#else
+       int main (argc, argv) int argc; char *argv[]; {
+#endif
+       #if defined (host_mips) && defined (MIPSEB)
+       #if defined (SYSTYPE_SYSV)
+         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_SVR4)
+         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+       #endif
+       #endif
+         exit (-1);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c &&
+         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+         SYSTEM_NAME=`$dummy $dummyarg` &&
+           { echo "$SYSTEM_NAME"; exit; }
+       echo mips-mips-riscos${UNAME_RELEASE}
+       exit ;;
+    Motorola:PowerMAX_OS:*:*)
+       echo powerpc-motorola-powermax
+       exit ;;
+    Motorola:*:4.3:PL8-*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+       echo powerpc-harris-powerunix
+       exit ;;
+    m88k:CX/UX:7*:*)
+       echo m88k-harris-cxux7
+       exit ;;
+    m88k:*:4*:R4*)
+       echo m88k-motorola-sysv4
+       exit ;;
+    m88k:*:3*:R3*)
+       echo m88k-motorola-sysv3
+       exit ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+       then
+           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+              [ ${TARGET_BINARY_INTERFACE}x = x ]
+           then
+               echo m88k-dg-dgux${UNAME_RELEASE}
+           else
+               echo m88k-dg-dguxbcs${UNAME_RELEASE}
+           fi
+       else
+           echo i586-dg-dgux${UNAME_RELEASE}
+       fi
+       exit ;;
+    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
+       echo m88k-dolphin-sysv3
+       exit ;;
+    M88*:*:R3*:*)
+       # Delta 88k system running SVR3
+       echo m88k-motorola-sysv3
+       exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+       echo m88k-tektronix-sysv3
+       exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+       echo m68k-tektronix-bsd
+       exit ;;
+    *:IRIX*:*:*)
+       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+       exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+       echo i386-ibm-aix
+       exit ;;
+    ia64:AIX:*:*)
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:2:3)
+       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+               eval $set_cc_for_build
+               sed 's/^                //' << EOF >$dummy.c
+               #include <sys/systemcfg.h>
+
+               main()
+                       {
+                       if (!__power_pc())
+                               exit(1);
+                       puts("powerpc-ibm-aix3.2.5");
+                       exit(0);
+                       }
+EOF
+               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+               then
+                       echo "$SYSTEM_NAME"
+               else
+                       echo rs6000-ibm-aix3.2.5
+               fi
+       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+               echo rs6000-ibm-aix3.2.4
+       else
+               echo rs6000-ibm-aix3.2
+       fi
+       exit ;;
+    *:AIX:*:[456])
+       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+               IBM_ARCH=rs6000
+       else
+               IBM_ARCH=powerpc
+       fi
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:*:*)
+       echo rs6000-ibm-aix
+       exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+       echo romp-ibm-bsd4.4
+       exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+       exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+       echo rs6000-bull-bosx
+       exit ;;
+    DPX/2?00:B.O.S.:*:*)
+       echo m68k-bull-sysv3
+       exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+       echo m68k-hp-bsd
+       exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+       echo m68k-hp-bsd4.4
+       exit ;;
+    9000/[34678]??:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       case "${UNAME_MACHINE}" in
+           9000/31? )            HP_ARCH=m68000 ;;
+           9000/[34]?? )         HP_ARCH=m68k ;;
+           9000/[678][0-9][0-9])
+               if [ -x /usr/bin/getconf ]; then
+                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+               fi
+               if [ "${HP_ARCH}" = "" ]; then
+                   eval $set_cc_for_build
+                   sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+               {
+               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+               case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+                   switch (bits)
+                       {
+                       case 64: puts ("hppa2.0w"); break;
+                       case 32: puts ("hppa2.0n"); break;
+                       default: puts ("hppa2.0"); break;
+                       } break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+                   puts ("hppa2.0"); break;
+              #endif
+               default: puts ("hppa1.0"); break;
+               }
+                  exit (0);
+              }
+EOF
+                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+                   test -z "$HP_ARCH" && HP_ARCH=hppa
+               fi ;;
+       esac
+       if [ ${HP_ARCH} = "hppa2.0w" ]
+       then
+           eval $set_cc_for_build
+
+           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+           # generating 64-bit code.  GNU and HP use different nomenclature:
+           #
+           # $ CC_FOR_BUILD=cc ./config.guess
+           # => hppa2.0w-hp-hpux11.23
+           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+           # => hppa64-hp-hpux11.23
+
+           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+               grep __LP64__ >/dev/null
+           then
+               HP_ARCH="hppa2.0w"
+           else
+               HP_ARCH="hppa64"
+           fi
+       fi
+       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+       exit ;;
+    ia64:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       echo ia64-hp-hpux${HPUX_REV}
+       exit ;;
+    3050*:HI-UX:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <unistd.h>
+       int
+       main ()
+       {
+         long cpu = sysconf (_SC_CPU_VERSION);
+         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+            results, however.  */
+         if (CPU_IS_PA_RISC (cpu))
+           {
+             switch (cpu)
+               {
+                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+                 default: puts ("hppa-hitachi-hiuxwe2"); break;
+               }
+           }
+         else if (CPU_IS_HP_MC68K (cpu))
+           puts ("m68k-hitachi-hiuxwe2");
+         else puts ("unknown-hitachi-hiuxwe2");
+         exit (0);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+               { echo "$SYSTEM_NAME"; exit; }
+       echo unknown-hitachi-hiuxwe2
+       exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+       echo hppa1.1-hp-bsd
+       exit ;;
+    9000/8??:4.3bsd:*:*)
+       echo hppa1.0-hp-bsd
+       exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+       echo hppa1.0-hp-mpeix
+       exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+       echo hppa1.1-hp-osf
+       exit ;;
+    hp8??:OSF1:*:*)
+       echo hppa1.0-hp-osf
+       exit ;;
+    i*86:OSF1:*:*)
+       if [ -x /usr/sbin/sysversion ] ; then
+           echo ${UNAME_MACHINE}-unknown-osf1mk
+       else
+           echo ${UNAME_MACHINE}-unknown-osf1
+       fi
+       exit ;;
+    parisc*:Lites*:*:*)
+       echo hppa1.1-hp-lites
+       exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+       echo c1-convex-bsd
+        exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+        exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+       echo c34-convex-bsd
+        exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+       echo c38-convex-bsd
+        exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+       echo c4-convex-bsd
+        exit ;;
+    CRAY*Y-MP:*:*:*)
+       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*[A-Z]90:*:*:*)
+       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+             -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*TS:*:*:*)
+       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*T3E:*:*:*)
+       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*SV1:*:*:*)
+       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    *:UNICOS/mp:*:*)
+       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+       exit ;;
+    sparc*:BSD/OS:*:*)
+       echo sparc-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:BSD/OS:*:*)
+       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:FreeBSD:*:*)
+       case ${UNAME_MACHINE} in
+           pc98)
+               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+           amd64)
+               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+           *)
+               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+       esac
+       exit ;;
+    i*:CYGWIN*:*)
+       echo ${UNAME_MACHINE}-pc-cygwin
+       exit ;;
+    *:MINGW*:*)
+       echo ${UNAME_MACHINE}-pc-mingw32
+       exit ;;
+    i*:windows32*:*)
+       # uname -m includes "-pc" on this system.
+       echo ${UNAME_MACHINE}-mingw32
+       exit ;;
+    i*:PW*:*)
+       echo ${UNAME_MACHINE}-pc-pw32
+       exit ;;
+    *:Interix*:[3456]*)
+       case ${UNAME_MACHINE} in
+           x86)
+               echo i586-pc-interix${UNAME_RELEASE}
+               exit ;;
+           EM64T | authenticamd | genuineintel)
+               echo x86_64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+           IA64)
+               echo ia64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+       esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+       echo i${UNAME_MACHINE}-pc-mks
+       exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+       # UNAME_MACHINE based on the output of uname instead of i386?
+       echo i586-pc-interix
+       exit ;;
+    i*:UWIN*:*)
+       echo ${UNAME_MACHINE}-pc-uwin
+       exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+       echo x86_64-unknown-cygwin
+       exit ;;
+    p*:CYGWIN*:*)
+       echo powerpcle-unknown-cygwin
+       exit ;;
+    prep*:SunOS:5.*:*)
+       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    *:GNU:*:*)
+       # the GNU system
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       exit ;;
+    *:GNU/*:*:*)
+       # other systems with GNU libc and userland
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       exit ;;
+    i*86:Minix:*:*)
+       echo ${UNAME_MACHINE}-pc-minix
+       exit ;;
+    arm*:Linux:*:*)
+       eval $set_cc_for_build
+       if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+           | grep -q __ARM_EABI__
+       then
+           echo ${UNAME_MACHINE}-unknown-linux-gnu
+       else
+           echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+       fi
+       exit ;;
+    avr32*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    cris:Linux:*:*)
+       echo cris-axis-linux-gnu
+       exit ;;
+    crisv32:Linux:*:*)
+       echo crisv32-axis-linux-gnu
+       exit ;;
+    frv:Linux:*:*)
+       echo frv-unknown-linux-gnu
+       exit ;;
+    ia64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m32r*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m68*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    mips:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips
+       #undef mipsel
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mipsel
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+           /^CPU/{
+               s: ::g
+               p
+           }'`"
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       ;;
+    mips64:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips64
+       #undef mips64el
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mips64el
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips64
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+           /^CPU/{
+               s: ::g
+               p
+           }'`"
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       ;;
+    or32:Linux:*:*)
+       echo or32-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
+       exit ;;
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
+    padre:Linux:*:*)
+       echo sparc-unknown-linux-gnu
+       exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+       # Look for CPU level
+       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+         PA7*) echo hppa1.1-unknown-linux-gnu ;;
+         PA8*) echo hppa2.0-unknown-linux-gnu ;;
+         *)    echo hppa-unknown-linux-gnu ;;
+       esac
+       exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+       echo ${UNAME_MACHINE}-ibm-linux
+       exit ;;
+    sh64*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sh*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    vax:Linux:*:*)
+       echo ${UNAME_MACHINE}-dec-linux-gnu
+       exit ;;
+    x86_64:Linux:*:*)
+       echo x86_64-unknown-linux-gnu
+       exit ;;
+    xtensa*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    i*86:Linux:*:*)
+       # The BFD linker knows what the default object file format is, so
+       # first see if it will tell us. cd to the root directory to prevent
+       # problems with other programs or directories called `ld' in the path.
+       # Set LC_ALL=C to ensure ld outputs messages in English.
+       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+                        | sed -ne '/supported targets:/!d
+                                   s/[         ][      ]*/ /g
+                                   s/.*supported targets: *//
+                                   s/ .*//
+                                   p'`
+        case "$ld_supported_targets" in
+         elf32-i386)
+               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+               ;;
+         a.out-i386-linux)
+               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+               exit ;;
+         "")
+               # Either a pre-BFD a.out linker (linux-gnuoldld) or
+               # one that does not give us useful --help.
+               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+               exit ;;
+       esac
+       # Determine whether the default compiler is a.out or elf
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <features.h>
+       #ifdef __ELF__
+       # ifdef __GLIBC__
+       #  if __GLIBC__ >= 2
+       LIBC=gnu
+       #  else
+       LIBC=gnulibc1
+       #  endif
+       # else
+       LIBC=gnulibc1
+       # endif
+       #else
+       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+       LIBC=gnu
+       #else
+       LIBC=gnuaout
+       #endif
+       #endif
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+           /^LIBC/{
+               s: ::g
+               p
+           }'`"
+       test x"${LIBC}" != x && {
+               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+               exit
+       }
+       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+       ;;
+    i*86:DYNIX/ptx:4*:*)
+       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+       # earlier versions are messed up and put the nodename in both
+       # sysname and nodename.
+       echo i386-sequent-sysv4
+       exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+       # I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+       exit ;;
+    i*86:OS/2:*:*)
+       # If we were able to find `uname', then EMX Unix compatibility
+       # is probably installed.
+       echo ${UNAME_MACHINE}-pc-os2-emx
+       exit ;;
+    i*86:XTS-300:*:STOP)
+       echo ${UNAME_MACHINE}-unknown-stop
+       exit ;;
+    i*86:atheos:*:*)
+       echo ${UNAME_MACHINE}-unknown-atheos
+       exit ;;
+    i*86:syllable:*:*)
+       echo ${UNAME_MACHINE}-pc-syllable
+       exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+       echo i386-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    i*86:*DOS:*:*)
+       echo ${UNAME_MACHINE}-pc-msdosdjgpp
+       exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+       else
+               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+       fi
+       exit ;;
+    i*86:*:5:[678]*)
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
+       case `/bin/uname -X | grep "^Machine"` in
+           *486*)           UNAME_MACHINE=i486 ;;
+           *Pentium)        UNAME_MACHINE=i586 ;;
+           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+       esac
+       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+       exit ;;
+    i*86:*:3.2:*)
+       if test -f /usr/options/cb.name; then
+               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+       elif /bin/uname -X 2>/dev/null >/dev/null ; then
+               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+                       && UNAME_MACHINE=i586
+               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+       else
+               echo ${UNAME_MACHINE}-pc-sysv32
+       fi
+       exit ;;
+    pc:*:*:*)
+       # Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+       echo i386-pc-msdosdjgpp
+        exit ;;
+    Intel:Mach:3*:*)
+       echo i386-pc-mach3
+       exit ;;
+    paragon:*:*:*)
+       echo i860-intel-osf1
+       exit ;;
+    i860:*:4.*:*) # i860-SVR4
+       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+       else # Add other i860-SVR4 vendors below as they are discovered.
+         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+       fi
+       exit ;;
+    mini*:CTIX:SYS*5:*)
+       # "miniframe"
+       echo m68010-convergent-sysv
+       exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+       echo m68k-convergent-sysv
+       exit ;;
+    M680?0:D-NIX:5.3:*)
+       echo m68k-diab-dnix
+       exit ;;
+    M68*:*:R3V[5678]*:*)
+       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+       OS_REL=''
+       test -r /etc/.relid \
+       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && { echo i486-ncr-sysv4; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+       echo m68k-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+       echo m68k-atari-sysv4
+       exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+       echo sparc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    rs6000:LynxOS:2.*:*)
+       echo rs6000-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+       echo powerpc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+       echo mips-dde-sysv${UNAME_RELEASE}
+       exit ;;
+    RM*:ReliantUNIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    RM*:SINIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    *:SINIX-*:*:*)
+       if uname -p 2>/dev/null >/dev/null ; then
+               UNAME_MACHINE=`(uname -p) 2>/dev/null`
+               echo ${UNAME_MACHINE}-sni-sysv4
+       else
+               echo ns32k-sni-sysv
+       fi
+       exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+       # From Gerald Hewes <hewes@openmarket.com>.
+       # How about differentiating between stratus architectures? -djm
+       echo hppa1.1-stratus-sysv4
+       exit ;;
+    *:*:*:FTX*)
+       # From seanf@swdc.stratus.com.
+       echo i860-stratus-sysv4
+       exit ;;
+    i*86:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo ${UNAME_MACHINE}-stratus-vos
+       exit ;;
+    *:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo hppa1.1-stratus-vos
+       exit ;;
+    mc68*:A/UX:*:*)
+       echo m68k-apple-aux${UNAME_RELEASE}
+       exit ;;
+    news*:NEWS-OS:6*:*)
+       echo mips-sony-newsos6
+       exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+       if [ -d /usr/nec ]; then
+               echo mips-nec-sysv${UNAME_RELEASE}
+       else
+               echo mips-unknown-sysv${UNAME_RELEASE}
+       fi
+        exit ;;
+    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
+       echo powerpc-be-beos
+       exit ;;
+    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
+       echo powerpc-apple-beos
+       exit ;;
+    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
+       echo i586-pc-beos
+       exit ;;
+    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
+       echo i586-pc-haiku
+       exit ;;
+    SX-4:SUPER-UX:*:*)
+       echo sx4-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-5:SUPER-UX:*:*)
+       echo sx5-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-6:SUPER-UX:*:*)
+       echo sx6-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-7:SUPER-UX:*:*)
+       echo sx7-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8:SUPER-UX:*:*)
+       echo sx8-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8R:SUPER-UX:*:*)
+       echo sx8r-nec-superux${UNAME_RELEASE}
+       exit ;;
+    Power*:Rhapsody:*:*)
+       echo powerpc-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Rhapsody:*:*)
+       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Darwin:*:*)
+       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+       case $UNAME_PROCESSOR in
+           unknown) UNAME_PROCESSOR=powerpc ;;
+       esac
+       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+       exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+       UNAME_PROCESSOR=`uname -p`
+       if test "$UNAME_PROCESSOR" = "x86"; then
+               UNAME_PROCESSOR=i386
+               UNAME_MACHINE=pc
+       fi
+       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+       exit ;;
+    *:QNX:*:4*)
+       echo i386-pc-qnx
+       exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+       echo nse-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+       echo nsr-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    *:NonStop-UX:*:*)
+       echo mips-compaq-nonstopux
+       exit ;;
+    BS2000:POSIX*:*:*)
+       echo bs2000-siemens-sysv
+       exit ;;
+    DS/*:UNIX_System_V:*:*)
+       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+       exit ;;
+    *:Plan9:*:*)
+       # "uname -m" is not consistent, so use $cputype instead. 386
+       # is converted to i386 for consistency with other x86
+       # operating systems.
+       if test "$cputype" = "386"; then
+           UNAME_MACHINE=i386
+       else
+           UNAME_MACHINE="$cputype"
+       fi
+       echo ${UNAME_MACHINE}-unknown-plan9
+       exit ;;
+    *:TOPS-10:*:*)
+       echo pdp10-unknown-tops10
+       exit ;;
+    *:TENEX:*:*)
+       echo pdp10-unknown-tenex
+       exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+       echo pdp10-dec-tops20
+       exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+       echo pdp10-xkl-tops20
+       exit ;;
+    *:TOPS-20:*:*)
+       echo pdp10-unknown-tops20
+       exit ;;
+    *:ITS:*:*)
+       echo pdp10-unknown-its
+       exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+       exit ;;
+    *:DragonFly:*:*)
+       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit ;;
+    *:*VMS:*:*)
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       case "${UNAME_MACHINE}" in
+           A*) echo alpha-dec-vms ; exit ;;
+           I*) echo ia64-dec-vms ; exit ;;
+           V*) echo vax-dec-vms ; exit ;;
+       esac ;;
+    *:XENIX:*:SysV)
+       echo i386-pc-xenix
+       exit ;;
+    i*86:skyos:*:*)
+       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+       exit ;;
+    i*86:rdos:*:*)
+       echo ${UNAME_MACHINE}-pc-rdos
+       exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+         ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+       printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+       printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+       { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+       echo c1-convex-bsd
+       exit ;;
+    c2*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+       exit ;;
+    c34*)
+       echo c34-convex-bsd
+       exit ;;
+    c38*)
+       echo c38-convex-bsd
+       exit ;;
+    c4*)
+       echo c4-convex-bsd
+       exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/src/mm/boehm-gc/libatomic_ops/config.sub b/src/mm/boehm-gc/libatomic_ops/config.sub
new file mode 100755 (executable)
index 0000000..053e738
--- /dev/null
@@ -0,0 +1,1677 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   Free Software Foundation, Inc.
+
+timestamp='2008-09-08'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+       -sun*os*)
+               # Prevent following clause from handling this invalid input.
+               ;;
+       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+       -apple | -axis | -knuth | -cray)
+               os=
+               basic_machine=$1
+               ;;
+       -sim | -cisco | -oki | -wec | -winbond)
+               os=
+               basic_machine=$1
+               ;;
+       -scout)
+               ;;
+       -wrs)
+               os=-vxworks
+               basic_machine=$1
+               ;;
+       -chorusos*)
+               os=-chorusos
+               basic_machine=$1
+               ;;
+       -chorusrdb)
+               os=-chorusrdb
+               basic_machine=$1
+               ;;
+       -hiux*)
+               os=-hiuxwe2
+               ;;
+       -sco6)
+               os=-sco5v6
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco5)
+               os=-sco3.2v5
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco4)
+               os=-sco3.2v4
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2.[4-9]*)
+               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2v[4-9]*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco5v6*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco*)
+               os=-sco3.2v2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -udk*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -isc)
+               os=-isc2.2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -clix*)
+               basic_machine=clipper-intergraph
+               ;;
+       -isc*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -lynx*)
+               os=-lynxos
+               ;;
+       -ptx*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+               ;;
+       -windowsnt*)
+               os=`echo $os | sed -e 's/windowsnt/winnt/'`
+               ;;
+       -psos*)
+               os=-psos
+               ;;
+       -mint | -mint[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+       # Recognize the basic CPU types without company name.
+       # Some are omitted here because they have special meanings below.
+       1750a | 580 \
+       | a29k \
+       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+       | am33_2.0 \
+       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+       | bfin \
+       | c4x | clipper \
+       | d10v | d30v | dlx | dsp16xx \
+       | fido | fr30 | frv \
+       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+       | i370 | i860 | i960 | ia64 \
+       | ip2k | iq2000 \
+       | m32c | m32r | m32rle | m68000 | m68k | m88k \
+       | maxq | mb | microblaze | mcore | mep | metag \
+       | mips | mipsbe | mipseb | mipsel | mipsle \
+       | mips16 \
+       | mips64 | mips64el \
+       | mips64octeon | mips64octeonel \
+       | mips64orion | mips64orionel \
+       | mips64r5900 | mips64r5900el \
+       | mips64vr | mips64vrel \
+       | mips64vr4100 | mips64vr4100el \
+       | mips64vr4300 | mips64vr4300el \
+       | mips64vr5000 | mips64vr5000el \
+       | mips64vr5900 | mips64vr5900el \
+       | mipsisa32 | mipsisa32el \
+       | mipsisa32r2 | mipsisa32r2el \
+       | mipsisa64 | mipsisa64el \
+       | mipsisa64r2 | mipsisa64r2el \
+       | mipsisa64sb1 | mipsisa64sb1el \
+       | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipstx39 | mipstx39el \
+       | mn10200 | mn10300 \
+       | mt \
+       | msp430 \
+       | nios | nios2 \
+       | ns16k | ns32k \
+       | or32 \
+       | pdp10 | pdp11 | pj | pjl \
+       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | pyramid \
+       | score \
+       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+       | sh64 | sh64le \
+       | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+       | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+       | spu | strongarm \
+       | tahoe | thumb | tic4x | tic80 | tron \
+       | v850 | v850e \
+       | we32k \
+       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+       | z8k | z80)
+               basic_machine=$basic_machine-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12)
+               # Motorola 68HC11/12.
+               basic_machine=$basic_machine-unknown
+               os=-none
+               ;;
+       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+               ;;
+       ms1)
+               basic_machine=mt-unknown
+               ;;
+
+       # We use `pc' rather than `unknown'
+       # because (1) that's what they normally are, and
+       # (2) the word "unknown" tends to confuse beginning users.
+       i*86 | x86_64)
+         basic_machine=$basic_machine-pc
+         ;;
+       # Object if more than one company name word.
+       *-*-*)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+       # Recognize the basic CPU types with company name.
+       580-* \
+       | a29k-* \
+       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+       | avr-* | avr32-* \
+       | bfin-* | bs2000-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | clipper-* | craynv-* | cydra-* \
+       | d10v-* | d30v-* | dlx-* \
+       | elxsi-* \
+       | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+       | h8300-* | h8500-* \
+       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+       | i*86-* | i860-* | i960-* | ia64-* \
+       | ip2k-* | iq2000-* \
+       | m32c-* | m32r-* | m32rle-* \
+       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+       | mips16-* \
+       | mips64-* | mips64el-* \
+       | mips64octeon-* | mips64octeonel-* \
+       | mips64orion-* | mips64orionel-* \
+       | mips64r5900-* | mips64r5900el-* \
+       | mips64vr-* | mips64vrel-* \
+       | mips64vr4100-* | mips64vr4100el-* \
+       | mips64vr4300-* | mips64vr4300el-* \
+       | mips64vr5000-* | mips64vr5000el-* \
+       | mips64vr5900-* | mips64vr5900el-* \
+       | mipsisa32-* | mipsisa32el-* \
+       | mipsisa32r2-* | mipsisa32r2el-* \
+       | mipsisa64-* | mipsisa64el-* \
+       | mipsisa64r2-* | mipsisa64r2el-* \
+       | mipsisa64sb1-* | mipsisa64sb1el-* \
+       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipstx39-* | mipstx39el-* \
+       | mmix-* \
+       | mt-* \
+       | msp430-* \
+       | nios-* | nios2-* \
+       | none-* | np1-* | ns16k-* | ns32k-* \
+       | orion-* \
+       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | pyramid-* \
+       | romp-* | rs6000-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+       | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+       | sparclite-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+       | tahoe-* | thumb-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+       | tron-* \
+       | v850-* | v850e-* | vax-* \
+       | we32k-* \
+       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | xstormy16-* | xtensa*-* \
+       | ymp-* \
+       | z8k-* | z80-*)
+               ;;
+       # Recognize the basic CPU types without company name, with glob match.
+       xtensa*)
+               basic_machine=$basic_machine-unknown
+               ;;
+       # Recognize the various machine names and aliases which stand
+       # for a CPU type and a company and sometimes even an OS.
+       386bsd)
+               basic_machine=i386-unknown
+               os=-bsd
+               ;;
+       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+               basic_machine=m68000-att
+               ;;
+       3b*)
+               basic_machine=we32k-att
+               ;;
+       a29khif)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       abacus)
+               basic_machine=abacus-unknown
+               ;;
+       adobe68k)
+               basic_machine=m68010-adobe
+               os=-scout
+               ;;
+       alliant | fx80)
+               basic_machine=fx80-alliant
+               ;;
+       altos | altos3068)
+               basic_machine=m68k-altos
+               ;;
+       am29k)
+               basic_machine=a29k-none
+               os=-bsd
+               ;;
+       amd64)
+               basic_machine=x86_64-pc
+               ;;
+       amd64-*)
+               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       amdahl)
+               basic_machine=580-amdahl
+               os=-sysv
+               ;;
+       amiga | amiga-*)
+               basic_machine=m68k-unknown
+               ;;
+       amigaos | amigados)
+               basic_machine=m68k-unknown
+               os=-amigaos
+               ;;
+       amigaunix | amix)
+               basic_machine=m68k-unknown
+               os=-sysv4
+               ;;
+       apollo68)
+               basic_machine=m68k-apollo
+               os=-sysv
+               ;;
+       apollo68bsd)
+               basic_machine=m68k-apollo
+               os=-bsd
+               ;;
+       aux)
+               basic_machine=m68k-apple
+               os=-aux
+               ;;
+       balance)
+               basic_machine=ns32k-sequent
+               os=-dynix
+               ;;
+       blackfin)
+               basic_machine=bfin-unknown
+               os=-linux
+               ;;
+       blackfin-*)
+               basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
+       c90)
+               basic_machine=c90-cray
+               os=-unicos
+               ;;
+        cegcc)
+               basic_machine=arm-unknown
+               os=-cegcc
+               ;;
+       convex-c1)
+               basic_machine=c1-convex
+               os=-bsd
+               ;;
+       convex-c2)
+               basic_machine=c2-convex
+               os=-bsd
+               ;;
+       convex-c32)
+               basic_machine=c32-convex
+               os=-bsd
+               ;;
+       convex-c34)
+               basic_machine=c34-convex
+               os=-bsd
+               ;;
+       convex-c38)
+               basic_machine=c38-convex
+               os=-bsd
+               ;;
+       cray | j90)
+               basic_machine=j90-cray
+               os=-unicos
+               ;;
+       craynv)
+               basic_machine=craynv-cray
+               os=-unicosmp
+               ;;
+       cr16)
+               basic_machine=cr16-unknown
+               os=-elf
+               ;;
+       crds | unos)
+               basic_machine=m68k-crds
+               ;;
+       crisv32 | crisv32-* | etraxfs*)
+               basic_machine=crisv32-axis
+               ;;
+       cris | cris-* | etrax*)
+               basic_machine=cris-axis
+               ;;
+       crx)
+               basic_machine=crx-unknown
+               os=-elf
+               ;;
+       da30 | da30-*)
+               basic_machine=m68k-da30
+               ;;
+       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+               basic_machine=mips-dec
+               ;;
+       decsystem10* | dec10*)
+               basic_machine=pdp10-dec
+               os=-tops10
+               ;;
+       decsystem20* | dec20*)
+               basic_machine=pdp10-dec
+               os=-tops20
+               ;;
+       delta | 3300 | motorola-3300 | motorola-delta \
+             | 3300-motorola | delta-motorola)
+               basic_machine=m68k-motorola
+               ;;
+       delta88)
+               basic_machine=m88k-motorola
+               os=-sysv3
+               ;;
+       dicos)
+               basic_machine=i686-pc
+               os=-dicos
+               ;;
+       djgpp)
+               basic_machine=i586-pc
+               os=-msdosdjgpp
+               ;;
+       dpx20 | dpx20-*)
+               basic_machine=rs6000-bull
+               os=-bosx
+               ;;
+       dpx2* | dpx2*-bull)
+               basic_machine=m68k-bull
+               os=-sysv3
+               ;;
+       ebmon29k)
+               basic_machine=a29k-amd
+               os=-ebmon
+               ;;
+       elxsi)
+               basic_machine=elxsi-elxsi
+               os=-bsd
+               ;;
+       encore | umax | mmax)
+               basic_machine=ns32k-encore
+               ;;
+       es1800 | OSE68k | ose68k | ose | OSE)
+               basic_machine=m68k-ericsson
+               os=-ose
+               ;;
+       fx2800)
+               basic_machine=i860-alliant
+               ;;
+       genix)
+               basic_machine=ns32k-ns
+               ;;
+       gmicro)
+               basic_machine=tron-gmicro
+               os=-sysv
+               ;;
+       go32)
+               basic_machine=i386-pc
+               os=-go32
+               ;;
+       h3050r* | hiux*)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       h8300hms)
+               basic_machine=h8300-hitachi
+               os=-hms
+               ;;
+       h8300xray)
+               basic_machine=h8300-hitachi
+               os=-xray
+               ;;
+       h8500hms)
+               basic_machine=h8500-hitachi
+               os=-hms
+               ;;
+       harris)
+               basic_machine=m88k-harris
+               os=-sysv3
+               ;;
+       hp300-*)
+               basic_machine=m68k-hp
+               ;;
+       hp300bsd)
+               basic_machine=m68k-hp
+               os=-bsd
+               ;;
+       hp300hpux)
+               basic_machine=m68k-hp
+               os=-hpux
+               ;;
+       hp3k9[0-9][0-9] | hp9[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k2[0-9][0-9] | hp9k31[0-9])
+               basic_machine=m68000-hp
+               ;;
+       hp9k3[2-9][0-9])
+               basic_machine=m68k-hp
+               ;;
+       hp9k6[0-9][0-9] | hp6[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k7[0-79][0-9] | hp7[0-79][0-9])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k78[0-9] | hp78[0-9])
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][13679] | hp8[0-9][13679])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][0-9] | hp8[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hppa-next)
+               os=-nextstep3
+               ;;
+       hppaosf)
+               basic_machine=hppa1.1-hp
+               os=-osf
+               ;;
+       hppro)
+               basic_machine=hppa1.1-hp
+               os=-proelf
+               ;;
+       i370-ibm* | ibm*)
+               basic_machine=i370-ibm
+               ;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+       i*86v32)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv32
+               ;;
+       i*86v4*)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv4
+               ;;
+       i*86v)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv
+               ;;
+       i*86sol2)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-solaris2
+               ;;
+       i386mach)
+               basic_machine=i386-mach
+               os=-mach
+               ;;
+       i386-vsta | vsta)
+               basic_machine=i386-unknown
+               os=-vsta
+               ;;
+       iris | iris4d)
+               basic_machine=mips-sgi
+               case $os in
+                   -irix*)
+                       ;;
+                   *)
+                       os=-irix4
+                       ;;
+               esac
+               ;;
+       isi68 | isi)
+               basic_machine=m68k-isi
+               os=-sysv
+               ;;
+       m68knommu)
+               basic_machine=m68k-unknown
+               os=-linux
+               ;;
+       m68knommu-*)
+               basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
+       m88k-omron*)
+               basic_machine=m88k-omron
+               ;;
+       magnum | m3230)
+               basic_machine=mips-mips
+               os=-sysv
+               ;;
+       merlin)
+               basic_machine=ns32k-utek
+               os=-sysv
+               ;;
+       mingw32)
+               basic_machine=i386-pc
+               os=-mingw32
+               ;;
+       mingw32ce)
+               basic_machine=arm-unknown
+               os=-mingw32ce
+               ;;
+       miniframe)
+               basic_machine=m68000-convergent
+               ;;
+       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+       mips3*-*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+               ;;
+       mips3*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+               ;;
+       monitor)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       morphos)
+               basic_machine=powerpc-unknown
+               os=-morphos
+               ;;
+       msdos)
+               basic_machine=i386-pc
+               os=-msdos
+               ;;
+       ms1-*)
+               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+               ;;
+       mvs)
+               basic_machine=i370-ibm
+               os=-mvs
+               ;;
+       ncr3000)
+               basic_machine=i486-ncr
+               os=-sysv4
+               ;;
+       netbsd386)
+               basic_machine=i386-unknown
+               os=-netbsd
+               ;;
+       netwinder)
+               basic_machine=armv4l-rebel
+               os=-linux
+               ;;
+       news | news700 | news800 | news900)
+               basic_machine=m68k-sony
+               os=-newsos
+               ;;
+       news1000)
+               basic_machine=m68030-sony
+               os=-newsos
+               ;;
+       news-3600 | risc-news)
+               basic_machine=mips-sony
+               os=-newsos
+               ;;
+       necv70)
+               basic_machine=v70-nec
+               os=-sysv
+               ;;
+       next | m*-next )
+               basic_machine=m68k-next
+               case $os in
+                   -nextstep* )
+                       ;;
+                   -ns2*)
+                     os=-nextstep2
+                       ;;
+                   *)
+                     os=-nextstep3
+                       ;;
+               esac
+               ;;
+       nh3000)
+               basic_machine=m68k-harris
+               os=-cxux
+               ;;
+       nh[45]000)
+               basic_machine=m88k-harris
+               os=-cxux
+               ;;
+       nindy960)
+               basic_machine=i960-intel
+               os=-nindy
+               ;;
+       mon960)
+               basic_machine=i960-intel
+               os=-mon960
+               ;;
+       nonstopux)
+               basic_machine=mips-compaq
+               os=-nonstopux
+               ;;
+       np1)
+               basic_machine=np1-gould
+               ;;
+       nsr-tandem)
+               basic_machine=nsr-tandem
+               ;;
+       op50n-* | op60c-*)
+               basic_machine=hppa1.1-oki
+               os=-proelf
+               ;;
+       openrisc | openrisc-*)
+               basic_machine=or32-unknown
+               ;;
+       os400)
+               basic_machine=powerpc-ibm
+               os=-os400
+               ;;
+       OSE68000 | ose68000)
+               basic_machine=m68000-ericsson
+               os=-ose
+               ;;
+       os68k)
+               basic_machine=m68k-none
+               os=-os68k
+               ;;
+       pa-hitachi)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       paragon)
+               basic_machine=i860-intel
+               os=-osf
+               ;;
+       parisc)
+               basic_machine=hppa-unknown
+               os=-linux
+               ;;
+       parisc-*)
+               basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
+       pbd)
+               basic_machine=sparc-tti
+               ;;
+       pbb)
+               basic_machine=m68k-tti
+               ;;
+       pc532 | pc532-*)
+               basic_machine=ns32k-pc532
+               ;;
+       pc98)
+               basic_machine=i386-pc
+               ;;
+       pc98-*)
+               basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentium | p5 | k5 | k6 | nexgen | viac3)
+               basic_machine=i586-pc
+               ;;
+       pentiumpro | p6 | 6x86 | athlon | athlon_*)
+               basic_machine=i686-pc
+               ;;
+       pentiumii | pentium2 | pentiumiii | pentium3)
+               basic_machine=i686-pc
+               ;;
+       pentium4)
+               basic_machine=i786-pc
+               ;;
+       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumpro-* | p6-* | 6x86-* | athlon-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentium4-*)
+               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pn)
+               basic_machine=pn-gould
+               ;;
+       power)  basic_machine=power-ibm
+               ;;
+       ppc)    basic_machine=powerpc-unknown
+               ;;
+       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppcle | powerpclittle | ppc-le | powerpc-little)
+               basic_machine=powerpcle-unknown
+               ;;
+       ppcle-* | powerpclittle-*)
+               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64)  basic_machine=powerpc64-unknown
+               ;;
+       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+               basic_machine=powerpc64le-unknown
+               ;;
+       ppc64le-* | powerpc64little-*)
+               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ps2)
+               basic_machine=i386-ibm
+               ;;
+       pw32)
+               basic_machine=i586-unknown
+               os=-pw32
+               ;;
+       rdos)
+               basic_machine=i386-pc
+               os=-rdos
+               ;;
+       rom68k)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       rm[46]00)
+               basic_machine=mips-siemens
+               ;;
+       rtpc | rtpc-*)
+               basic_machine=romp-ibm
+               ;;
+       s390 | s390-*)
+               basic_machine=s390-ibm
+               ;;
+       s390x | s390x-*)
+               basic_machine=s390x-ibm
+               ;;
+       sa29200)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       sb1)
+               basic_machine=mipsisa64sb1-unknown
+               ;;
+       sb1el)
+               basic_machine=mipsisa64sb1el-unknown
+               ;;
+       sde)
+               basic_machine=mipsisa32-sde
+               os=-elf
+               ;;
+       sei)
+               basic_machine=mips-sei
+               os=-seiux
+               ;;
+       sequent)
+               basic_machine=i386-sequent
+               ;;
+       sh)
+               basic_machine=sh-hitachi
+               os=-hms
+               ;;
+       sh5el)
+               basic_machine=sh5le-unknown
+               ;;
+       sh64)
+               basic_machine=sh64-unknown
+               ;;
+       sparclite-wrs | simso-wrs)
+               basic_machine=sparclite-wrs
+               os=-vxworks
+               ;;
+       sps7)
+               basic_machine=m68k-bull
+               os=-sysv2
+               ;;
+       spur)
+               basic_machine=spur-unknown
+               ;;
+       st2000)
+               basic_machine=m68k-tandem
+               ;;
+       stratus)
+               basic_machine=i860-stratus
+               os=-sysv4
+               ;;
+       sun2)
+               basic_machine=m68000-sun
+               ;;
+       sun2os3)
+               basic_machine=m68000-sun
+               os=-sunos3
+               ;;
+       sun2os4)
+               basic_machine=m68000-sun
+               os=-sunos4
+               ;;
+       sun3os3)
+               basic_machine=m68k-sun
+               os=-sunos3
+               ;;
+       sun3os4)
+               basic_machine=m68k-sun
+               os=-sunos4
+               ;;
+       sun4os3)
+               basic_machine=sparc-sun
+               os=-sunos3
+               ;;
+       sun4os4)
+               basic_machine=sparc-sun
+               os=-sunos4
+               ;;
+       sun4sol2)
+               basic_machine=sparc-sun
+               os=-solaris2
+               ;;
+       sun3 | sun3-*)
+               basic_machine=m68k-sun
+               ;;
+       sun4)
+               basic_machine=sparc-sun
+               ;;
+       sun386 | sun386i | roadrunner)
+               basic_machine=i386-sun
+               ;;
+       sv1)
+               basic_machine=sv1-cray
+               os=-unicos
+               ;;
+       symmetry)
+               basic_machine=i386-sequent
+               os=-dynix
+               ;;
+       t3e)
+               basic_machine=alphaev5-cray
+               os=-unicos
+               ;;
+       t90)
+               basic_machine=t90-cray
+               os=-unicos
+               ;;
+       tic54x | c54x*)
+               basic_machine=tic54x-unknown
+               os=-coff
+               ;;
+       tic55x | c55x*)
+               basic_machine=tic55x-unknown
+               os=-coff
+               ;;
+       tic6x | c6x*)
+               basic_machine=tic6x-unknown
+               os=-coff
+               ;;
+       tile*)
+               basic_machine=tile-unknown
+               os=-linux-gnu
+               ;;
+       tx39)
+               basic_machine=mipstx39-unknown
+               ;;
+       tx39el)
+               basic_machine=mipstx39el-unknown
+               ;;
+       toad1)
+               basic_machine=pdp10-xkl
+               os=-tops20
+               ;;
+       tower | tower-32)
+               basic_machine=m68k-ncr
+               ;;
+       tpf)
+               basic_machine=s390x-ibm
+               os=-tpf
+               ;;
+       udi29k)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       ultra3)
+               basic_machine=a29k-nyu
+               os=-sym1
+               ;;
+       v810 | necv810)
+               basic_machine=v810-nec
+               os=-none
+               ;;
+       vaxv)
+               basic_machine=vax-dec
+               os=-sysv
+               ;;
+       vms)
+               basic_machine=vax-dec
+               os=-vms
+               ;;
+       vpp*|vx|vx-*)
+               basic_machine=f301-fujitsu
+               ;;
+       vxworks960)
+               basic_machine=i960-wrs
+               os=-vxworks
+               ;;
+       vxworks68)
+               basic_machine=m68k-wrs
+               os=-vxworks
+               ;;
+       vxworks29k)
+               basic_machine=a29k-wrs
+               os=-vxworks
+               ;;
+       w65*)
+               basic_machine=w65-wdc
+               os=-none
+               ;;
+       w89k-*)
+               basic_machine=hppa1.1-winbond
+               os=-proelf
+               ;;
+       xbox)
+               basic_machine=i686-pc
+               os=-mingw32
+               ;;
+       xps | xps100)
+               basic_machine=xps100-honeywell
+               ;;
+       ymp)
+               basic_machine=ymp-cray
+               os=-unicos
+               ;;
+       z8k-*-coff)
+               basic_machine=z8k-unknown
+               os=-sim
+               ;;
+       z80-*-coff)
+               basic_machine=z80-unknown
+               os=-sim
+               ;;
+       none)
+               basic_machine=none-none
+               os=-none
+               ;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+       w89k)
+               basic_machine=hppa1.1-winbond
+               ;;
+       op50n)
+               basic_machine=hppa1.1-oki
+               ;;
+       op60c)
+               basic_machine=hppa1.1-oki
+               ;;
+       romp)
+               basic_machine=romp-ibm
+               ;;
+       mmix)
+               basic_machine=mmix-knuth
+               ;;
+       rs6000)
+               basic_machine=rs6000-ibm
+               ;;
+       vax)
+               basic_machine=vax-dec
+               ;;
+       pdp10)
+               # there are many clones, so DEC is not a safe bet
+               basic_machine=pdp10-unknown
+               ;;
+       pdp11)
+               basic_machine=pdp11-dec
+               ;;
+       we32k)
+               basic_machine=we32k-att
+               ;;
+       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+               basic_machine=sh-unknown
+               ;;
+       sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+               basic_machine=sparc-sun
+               ;;
+       cydra)
+               basic_machine=cydra-cydrome
+               ;;
+       orion)
+               basic_machine=orion-highlevel
+               ;;
+       orion105)
+               basic_machine=clipper-highlevel
+               ;;
+       mac | mpw | mac-mpw)
+               basic_machine=m68k-apple
+               ;;
+       pmac | pmac-mpw)
+               basic_machine=powerpc-apple
+               ;;
+       *-unknown)
+               # Make sure to match an already-canonicalized machine name.
+               ;;
+       *)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+       *-digital*)
+               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+               ;;
+       *-commodore*)
+               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+               ;;
+       *)
+               ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+       # -solaris* is a basic system type, with this one exception.
+       -solaris1 | -solaris1.*)
+               os=`echo $os | sed -e 's|solaris1|sunos4|'`
+               ;;
+       -solaris)
+               os=-solaris2
+               ;;
+       -svr4*)
+               os=-sysv4
+               ;;
+       -unixware*)
+               os=-sysv4.2uw
+               ;;
+       -gnu/linux*)
+               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+               ;;
+       # First accept the basic system types.
+       # The portable systems comes first.
+       # Each alternative MUST END IN A *, to match a version number.
+       # -sysv* is not here because it comes later, after sysvr4.
+       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+             | -aos* \
+             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+             | -openbsd* | -solidbsd* \
+             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+             | -chorusos* | -chorusrdb* | -cegcc* \
+             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+       # Remember, each alternative MUST END IN *, to match a version number.
+               ;;
+       -qnx*)
+               case $basic_machine in
+                   x86-* | i*86-*)
+                       ;;
+                   *)
+                       os=-nto$os
+                       ;;
+               esac
+               ;;
+       -nto-qnx*)
+               ;;
+       -nto*)
+               os=`echo $os | sed -e 's|nto|nto-qnx|'`
+               ;;
+       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+               ;;
+       -mac*)
+               os=`echo $os | sed -e 's|mac|macos|'`
+               ;;
+       -linux-dietlibc)
+               os=-linux-dietlibc
+               ;;
+       -linux*)
+               os=`echo $os | sed -e 's|linux|linux-gnu|'`
+               ;;
+       -sunos5*)
+               os=`echo $os | sed -e 's|sunos5|solaris2|'`
+               ;;
+       -sunos6*)
+               os=`echo $os | sed -e 's|sunos6|solaris3|'`
+               ;;
+       -opened*)
+               os=-openedition
+               ;;
+        -os400*)
+               os=-os400
+               ;;
+       -wince*)
+               os=-wince
+               ;;
+       -osfrose*)
+               os=-osfrose
+               ;;
+       -osf*)
+               os=-osf
+               ;;
+       -utek*)
+               os=-bsd
+               ;;
+       -dynix*)
+               os=-bsd
+               ;;
+       -acis*)
+               os=-aos
+               ;;
+       -atheos*)
+               os=-atheos
+               ;;
+       -syllable*)
+               os=-syllable
+               ;;
+       -386bsd)
+               os=-bsd
+               ;;
+       -ctix* | -uts*)
+               os=-sysv
+               ;;
+       -nova*)
+               os=-rtmk-nova
+               ;;
+       -ns2 )
+               os=-nextstep2
+               ;;
+       -nsk*)
+               os=-nsk
+               ;;
+       # Preserve the version number of sinix5.
+       -sinix5.*)
+               os=`echo $os | sed -e 's|sinix|sysv|'`
+               ;;
+       -sinix*)
+               os=-sysv4
+               ;;
+        -tpf*)
+               os=-tpf
+               ;;
+       -triton*)
+               os=-sysv3
+               ;;
+       -oss*)
+               os=-sysv3
+               ;;
+       -svr4)
+               os=-sysv4
+               ;;
+       -svr3)
+               os=-sysv3
+               ;;
+       -sysvr4)
+               os=-sysv4
+               ;;
+       # This must come after -sysvr4.
+       -sysv*)
+               ;;
+       -ose*)
+               os=-ose
+               ;;
+       -es1800*)
+               os=-ose
+               ;;
+       -xenix)
+               os=-xenix
+               ;;
+       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+               os=-mint
+               ;;
+       -aros*)
+               os=-aros
+               ;;
+       -kaos*)
+               os=-kaos
+               ;;
+       -zvmoe)
+               os=-zvmoe
+               ;;
+       -dicos*)
+               os=-dicos
+               ;;
+       -none)
+               ;;
+       *)
+               # Get rid of the `-' at the beginning of $os.
+               os=`echo $os | sed 's/[^-]*-//'`
+               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+        score-*)
+               os=-elf
+               ;;
+        spu-*)
+               os=-elf
+               ;;
+       *-acorn)
+               os=-riscix1.2
+               ;;
+       arm*-rebel)
+               os=-linux
+               ;;
+       arm*-semi)
+               os=-aout
+               ;;
+        c4x-* | tic4x-*)
+               os=-coff
+               ;;
+       # This must come before the *-dec entry.
+       pdp10-*)
+               os=-tops20
+               ;;
+       pdp11-*)
+               os=-none
+               ;;
+       *-dec | vax-*)
+               os=-ultrix4.2
+               ;;
+       m68*-apollo)
+               os=-domain
+               ;;
+       i386-sun)
+               os=-sunos4.0.2
+               ;;
+       m68000-sun)
+               os=-sunos3
+               # This also exists in the configure program, but was not the
+               # default.
+               # os=-sunos4
+               ;;
+       m68*-cisco)
+               os=-aout
+               ;;
+        mep-*)
+               os=-elf
+               ;;
+       mips*-cisco)
+               os=-elf
+               ;;
+       mips*-*)
+               os=-elf
+               ;;
+       or32-*)
+               os=-coff
+               ;;
+       *-tti)  # must be before sparc entry or we get the wrong os.
+               os=-sysv3
+               ;;
+       sparc-* | *-sun)
+               os=-sunos4.1.1
+               ;;
+       *-be)
+               os=-beos
+               ;;
+       *-haiku)
+               os=-haiku
+               ;;
+       *-ibm)
+               os=-aix
+               ;;
+       *-knuth)
+               os=-mmixware
+               ;;
+       *-wec)
+               os=-proelf
+               ;;
+       *-winbond)
+               os=-proelf
+               ;;
+       *-oki)
+               os=-proelf
+               ;;
+       *-hp)
+               os=-hpux
+               ;;
+       *-hitachi)
+               os=-hiux
+               ;;
+       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+               os=-sysv
+               ;;
+       *-cbm)
+               os=-amigaos
+               ;;
+       *-dg)
+               os=-dgux
+               ;;
+       *-dolphin)
+               os=-sysv3
+               ;;
+       m68k-ccur)
+               os=-rtu
+               ;;
+       m88k-omron*)
+               os=-luna
+               ;;
+       *-next )
+               os=-nextstep
+               ;;
+       *-sequent)
+               os=-ptx
+               ;;
+       *-crds)
+               os=-unos
+               ;;
+       *-ns)
+               os=-genix
+               ;;
+       i370-*)
+               os=-mvs
+               ;;
+       *-next)
+               os=-nextstep3
+               ;;
+       *-gould)
+               os=-sysv
+               ;;
+       *-highlevel)
+               os=-bsd
+               ;;
+       *-encore)
+               os=-bsd
+               ;;
+       *-sgi)
+               os=-irix
+               ;;
+       *-siemens)
+               os=-sysv4
+               ;;
+       *-masscomp)
+               os=-rtu
+               ;;
+       f30[01]-fujitsu | f700-fujitsu)
+               os=-uxpv
+               ;;
+       *-rom68k)
+               os=-coff
+               ;;
+       *-*bug)
+               os=-coff
+               ;;
+       *-apple)
+               os=-macos
+               ;;
+       *-atari*)
+               os=-mint
+               ;;
+       *)
+               os=-none
+               ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+       *-unknown)
+               case $os in
+                       -riscix*)
+                               vendor=acorn
+                               ;;
+                       -sunos*)
+                               vendor=sun
+                               ;;
+                       -aix*)
+                               vendor=ibm
+                               ;;
+                       -beos*)
+                               vendor=be
+                               ;;
+                       -hpux*)
+                               vendor=hp
+                               ;;
+                       -mpeix*)
+                               vendor=hp
+                               ;;
+                       -hiux*)
+                               vendor=hitachi
+                               ;;
+                       -unos*)
+                               vendor=crds
+                               ;;
+                       -dgux*)
+                               vendor=dg
+                               ;;
+                       -luna*)
+                               vendor=omron
+                               ;;
+                       -genix*)
+                               vendor=ns
+                               ;;
+                       -mvs* | -opened*)
+                               vendor=ibm
+                               ;;
+                       -os400*)
+                               vendor=ibm
+                               ;;
+                       -ptx*)
+                               vendor=sequent
+                               ;;
+                       -tpf*)
+                               vendor=ibm
+                               ;;
+                       -vxsim* | -vxworks* | -windiss*)
+                               vendor=wrs
+                               ;;
+                       -aux*)
+                               vendor=apple
+                               ;;
+                       -hms*)
+                               vendor=hitachi
+                               ;;
+                       -mpw* | -macos*)
+                               vendor=apple
+                               ;;
+                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+                               vendor=atari
+                               ;;
+                       -vos*)
+                               vendor=stratus
+                               ;;
+               esac
+               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+               ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/src/mm/boehm-gc/libatomic_ops/configure b/src/mm/boehm-gc/libatomic_ops/configure
new file mode 100755 (executable)
index 0000000..1c59546
--- /dev/null
@@ -0,0 +1,6174 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.64 for libatomic_ops 1.3alpha1.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+# Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+        /*)
+          for as_base in sh bash ksh sh5; do
+            # Try only shells that exist, to save several forks.
+            as_shell=$as_dir/$as_base
+            if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+                   { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+                  if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+          done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+             { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  # We cannot yet assume a decent shell, so we have to provide a
+       # neutralization value for shells without unset; and this also
+       # works around shells that cannot unset nonexistent variables.
+       BASH_ENV=/dev/null
+       ENV=/dev/null
+       (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+       export CONFIG_SHELL
+       exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with status $?, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$?; test $as_status -eq 0 && as_status=1
+  if test "$3"; then
+    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  fi
+  $as_echo "$as_me: error: $1" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='libatomic_ops'
+PACKAGE_TARNAME='libatomic_ops'
+PACKAGE_VERSION='1.3alpha1'
+PACKAGE_STRING='libatomic_ops 1.3alpha1'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_unique_file="src/atomic_ops.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+NEED_ASM_FALSE
+NEED_ASM_TRUE
+PICFLAG
+EGREP
+GREP
+CPP
+am__fastdepCCAS_FALSE
+am__fastdepCCAS_TRUE
+CCASDEPMODE
+CCASFLAGS
+CCAS
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+RANLIB
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_dependency_tracking
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CCAS
+CCASFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *)   ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) as_fn_error "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information."
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
+               datadir sysconfdir sharedstatedir localstatedir includedir \
+               oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+               libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_myself" : 'X\(//\)[^/]' \| \
+        X"$as_myself" : 'X\(//\)$' \| \
+        X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+       pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures libatomic_ops 1.3alpha1 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/libatomic_ops]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of libatomic_ops 1.3alpha1:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CCAS        assembler compiler command (defaults to CC)
+  CCASFLAGS   assembler compiler flags (defaults to CFLAGS)
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+libatomic_ops configure 1.3alpha1
+generated by GNU Autoconf 2.64
+
+Copyright (C) 2009 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_func
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by libatomic_ops $as_me 1.3alpha1, which was
+generated by GNU Autoconf 2.64.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append ac_configure_args1 " '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+       ac_must_keep_next=false # Got value, back to normal.
+      else
+       case $ac_arg in
+         *=* | --config-cache | -C | -disable-* | --disable-* \
+         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+         | -with-* | --with-* | -without-* | --without-* | --x)
+           case "$ac_configure_args0 " in
+             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+           esac
+           ;;
+         -* ) ac_must_keep_next=true ;;
+       esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+       "s/'\''/'\''\\\\'\'''\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+       eval ac_val=\$$ac_var
+       case $ac_val in
+       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+       esac
+       $as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  ac_site_file1=$CONFIG_SITE
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+       # differences in whitespace do not lead to failure.
+       ac_old_val_w=`echo x $ac_old_val`
+       ac_new_val_w=`echo x $ac_new_val`
+       if test "$ac_old_val_w" != "$ac_new_val_w"; then
+         { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+         ac_cache_corrupted=:
+       else
+         { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+         eval $ac_var=\$ac_old_val
+       fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+  for ac_t in install-sh install.sh shtool; do
+    if test -f "$ac_dir/$ac_t"; then
+      ac_aux_dir=$ac_dir
+      ac_install_sh="$ac_aux_dir/$ac_t -c"
+      break 2
+    fi
+  done
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if test "${ac_cv_target+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$target_alias" = x; then
+  ac_cv_target=$ac_cv_host
+else
+  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+    as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+am__api_version='1.10'
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+  ./ | .// | /[cC]/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+         if test $ac_prog = install &&
+           grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+           :
+         elif test $ac_prog = install &&
+           grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+           # program-specific install script used by HP pwplus--don't use.
+           :
+         else
+           rm -rf conftest.one conftest.two conftest.dir
+           echo one > conftest.one
+           echo two > conftest.two
+           mkdir conftest.dir
+           if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+             test -s conftest.one && test -s conftest.two &&
+             test -s conftest.dir/conftest.one &&
+             test -s conftest.dir/conftest.two
+           then
+             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+             break 3
+           fi
+         fi
+       fi
+      done
+    done
+    ;;
+esac
+
+  done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      as_fn_error "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if test "${ac_cv_path_mkdir+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+            'mkdir (GNU coreutils) '* | \
+            'mkdir (coreutils) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+       done
+  done
+IFS=$as_save_IFS
+
+fi
+
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    test -d ./--version && rmdir ./--version
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+       @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='libatomic_ops'
+ VERSION='1.3alpha1'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+
+ac_config_headers="$ac_config_headers src/config.h"
+
+
+# Checks for programs.
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "no acceptable C compiler found in \$PATH
+See \`config.log' for more details." "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    rm -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+       ;;
+    [ab].out )
+       # We found the default executable, but exeext='' is most
+       # certainly right.
+       break;;
+    *.* )
+       if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+       then :; else
+          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+       fi
+       # We set ac_cv_exeext here because the later test for it is not
+       # safe: cross compilers may not add the suffix if given an `-o'
+       # argument, so we may need to know it at that point already.
+       # Even if this section looks crufty: it has the advantage of
+       # actually working.
+       break;;
+    * )
+       break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+if test -z "$ac_file"; then :
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "C compiler cannot create executables
+See \`config.log' for more details." "$LINENO" 5; }; }
+fi
+ac_exeext=$ac_cv_exeext
+
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+       cross_compiling=yes
+    else
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+         break;;
+    * ) break;;
+  esac
+done
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+rm -f conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+if test "x$CC" != xcc; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+fi
+set dummy $CC; ac_cc=`$as_echo "$2" |
+                     sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } &&
+   test -f conftest2.$ac_objext && { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; };
+then
+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+  if test "x$CC" != xcc; then
+    # Test first that cc exists at all.
+    if { ac_try='cc -c conftest.$ac_ext >&5'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+      rm -f conftest2.*
+      if { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } &&
+        test -f conftest2.$ac_objext && { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; };
+      then
+       # cc works too.
+       :
+      else
+       # cc exists but doesn't like -o.
+       eval ac_cv_prog_cc_${ac_cc}_c_o=no
+      fi
+    fi
+  fi
+else
+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+
+
+# By default we simply use the C compiler to build assembly code.
+
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+
+
+
+depcc="$CCAS"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CCAS_dependencies_compiler_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CCAS_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CCAS_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CCAS_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; }
+CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then
+  am__fastdepCCAS_TRUE=
+  am__fastdepCCAS_FALSE='#'
+else
+  am__fastdepCCAS_TRUE='#'
+  am__fastdepCCAS_FALSE=
+fi
+
+
+
+# Checks for functions.
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+                  (('a' <= (c) && (c) <= 'i') \
+                    || ('j' <= (c) && (c) <= 'r') \
+                    || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+       || toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                 inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in stdlib.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+for ac_func in getpagesize
+do :
+  ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
+if test "x$ac_cv_func_getpagesize" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETPAGESIZE 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
+$as_echo_n "checking for working mmap... " >&6; }
+if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_mmap_fixed_mapped=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+/* malloc might have been renamed as rpl_malloc. */
+#undef malloc
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+   Here is a matrix of mmap possibilities:
+       mmap private not fixed
+       mmap private fixed at somewhere currently unmapped
+       mmap private fixed at somewhere already mapped
+       mmap shared not fixed
+       mmap shared fixed at somewhere currently unmapped
+       mmap shared fixed at somewhere already mapped
+   For private mappings, we should verify that changes cannot be read()
+   back from the file, nor mmap's back from the file at a different
+   address.  (There have been systems where private was not correctly
+   implemented like the infamous i386 svr4.0, and systems where the
+   VM page cache was not coherent with the file system buffer cache
+   like early versions of FreeBSD and possibly contemporary NetBSD.)
+   For shared mappings, we should conversely verify that changes get
+   propagated back to all the places they're supposed to be.
+
+   Grep wants private fixed already mapped.
+   The main things grep needs to know about mmap are:
+   * does it exist and is it safe to write into the mmap'd area
+   * how to use it (BSD variants)  */
+
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
+char *malloc ();
+#endif
+
+/* This mess was copied from the GNU getpagesize.h.  */
+#ifndef HAVE_GETPAGESIZE
+/* Assume that all systems that can run configure have sys/param.h.  */
+# ifndef HAVE_SYS_PARAM_H
+#  define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+#  define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+#  ifdef HAVE_SYS_PARAM_H
+#   include <sys/param.h>
+#   ifdef EXEC_PAGESIZE
+#    define getpagesize() EXEC_PAGESIZE
+#   else /* no EXEC_PAGESIZE */
+#    ifdef NBPG
+#     define getpagesize() NBPG * CLSIZE
+#     ifndef CLSIZE
+#      define CLSIZE 1
+#     endif /* no CLSIZE */
+#    else /* no NBPG */
+#     ifdef NBPC
+#      define getpagesize() NBPC
+#     else /* no NBPC */
+#      ifdef PAGESIZE
+#       define getpagesize() PAGESIZE
+#      endif /* PAGESIZE */
+#     endif /* no NBPC */
+#    endif /* no NBPG */
+#   endif /* no EXEC_PAGESIZE */
+#  else /* no HAVE_SYS_PARAM_H */
+#   define getpagesize() 8192  /* punt totally */
+#  endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+int
+main ()
+{
+  char *data, *data2, *data3;
+  int i, pagesize;
+  int fd;
+
+  pagesize = getpagesize ();
+
+  /* First, make a file with some known garbage in it. */
+  data = (char *) malloc (pagesize);
+  if (!data)
+    return 1;
+  for (i = 0; i < pagesize; ++i)
+    *(data + i) = rand ();
+  umask (0);
+  fd = creat ("conftest.mmap", 0600);
+  if (fd < 0)
+    return 1;
+  if (write (fd, data, pagesize) != pagesize)
+    return 1;
+  close (fd);
+
+  /* Next, try to mmap the file at a fixed address which already has
+     something else allocated at it.  If we can, also make sure that
+     we see the same garbage.  */
+  fd = open ("conftest.mmap", O_RDWR);
+  if (fd < 0)
+    return 1;
+  data2 = (char *) malloc (2 * pagesize);
+  if (!data2)
+    return 1;
+  data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
+  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
+                    MAP_PRIVATE | MAP_FIXED, fd, 0L))
+    return 1;
+  for (i = 0; i < pagesize; ++i)
+    if (*(data + i) != *(data2 + i))
+      return 1;
+
+  /* Finally, make sure that changes to the mapped area do not
+     percolate back to the file as seen by read().  (This is a bug on
+     some variants of i386 svr4.0.)  */
+  for (i = 0; i < pagesize; ++i)
+    *(data2 + i) = *(data2 + i) + 1;
+  data3 = (char *) malloc (pagesize);
+  if (!data3)
+    return 1;
+  if (read (fd, data3, pagesize) != pagesize)
+    return 1;
+  for (i = 0; i < pagesize; ++i)
+    if (*(data + i) != *(data3 + i))
+      return 1;
+  close (fd);
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_mmap_fixed_mapped=yes
+else
+  ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
+$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+
+$as_echo "#define HAVE_MMAP 1" >>confdefs.h
+
+fi
+rm -f conftest.mmap
+
+
+# Checks for header files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+                  (('a' <= (c) && (c) <= 'i') \
+                    || ('j' <= (c) && (c) <= 'r') \
+                    || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+       || toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# AC_CHECK_HEADERS([ ])
+
+# Determine PIC flag, adjust default CFLAGS
+need_asm=false
+PICFLAG=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining PIC compiler flag" >&5
+$as_echo_n "checking Determining PIC compiler flag... " >&6; }
+if test "$GCC" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: -fPIC" >&5
+$as_echo "-fPIC" >&6; }
+  PICFLAG=-fPIC
+else
+  case "$host" in
+    *-*-hpux*)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"+Z\"" >&5
+$as_echo "\"+Z\"" >&6; }
+      PICFLAG="+Z"
+      if test "$GCC" != yes; then
+        CFLAGS="$CFLAGS +O2 -mt"
+      fi
+      ;;
+    *-*-solaris*)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: -Kpic" >&5
+$as_echo "-Kpic" >&6; }
+      PICFLAG=-Kpic
+      if test "$GCC" != yes; then
+        CFLAGS="$CFLAGS -O"
+        need_asm=true
+      fi
+      ;;
+    *-*-linux*)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: -fPIC" >&5
+$as_echo "-fPIC" >&6; }
+      PICFLAG=-fPIC
+      # Any Linux compiler had better be gcc compatible.
+      ;;
+    *)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"<none>\"" >&5
+$as_echo "\"<none>\"" >&6; }
+      ;;
+  esac
+fi
+CFLAGS="$CFLAGS -DNDEBUG"
+
+
+
+
+ if test x$need_asm = xtrue; then
+  NEED_ASM_TRUE=
+  NEED_ASM_FALSE='#'
+else
+  NEED_ASM_TRUE='#'
+  NEED_ASM_FALSE=
+fi
+
+
+ac_config_files="$ac_config_files Makefile src/Makefile src/atomic_ops/Makefile src/atomic_ops/sysdeps/Makefile doc/Makefile tests/Makefile"
+
+ac_config_commands="$ac_config_commands default"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+       "s/'/'\\\\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then
+  as_fn_error "conditional \"am__fastdepCCAS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${NEED_ASM_TRUE}" && test -z "${NEED_ASM_FALSE}"; then
+  as_fn_error "conditional \"NEED_ASM\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with status $?, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$?; test $as_status -eq 0 && as_status=1
+  if test "$3"; then
+    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  fi
+  $as_echo "$as_me: error: $1" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by libatomic_ops $as_me 1.3alpha1, which was
+generated by GNU Autoconf 2.64.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_version="\\
+libatomic_ops config.status 1.3alpha1
+configured by $0, generated by GNU Autoconf 2.64,
+  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2009 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    as_fn_error "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+PICFLAG="${PICFLAG}"
+CC="${CC}"
+DEFS="${DEFS}"
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+    "src/atomic_ops/Makefile") CONFIG_FILES="$CONFIG_FILES src/atomic_ops/Makefile" ;;
+    "src/atomic_ops/sysdeps/Makefile") CONFIG_FILES="$CONFIG_FILES src/atomic_ops/sysdeps/Makefile" ;;
+    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+
+  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\).*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\).*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = "\a"
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+  || as_fn_error "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[         ]*VPATH[        ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[    ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[      ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_t"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[    ]*#[    ]*define[       ][      ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = "\a"
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+        # (if the path is not absolute).  The absolute path cannot be DOS-style,
+        # because $ac_f cannot contain `:'.
+        test -f "$ac_f" ||
+          case $ac_f in
+          [\\/$]*) false;;
+          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+          esac ||
+          as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+         $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+       `' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin" \
+      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ac_file" : 'X\(//\)[^/]' \| \
+        X"$ac_file" : 'X\(//\)$' \| \
+        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+  || as_fn_error "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&2;}
+
+  rm -f "$tmp/stdin"
+  case $ac_file in
+  -) cat "$tmp/out" && rm -f "$tmp/out";;
+  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+    } >"$tmp/config.h" \
+      || as_fn_error "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f "$ac_file"
+      mv "$tmp/config.h" "$ac_file" \
+       || as_fn_error "could not create $ac_file" "$LINENO" 5
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error "could not create -" "$LINENO" 5
+  fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$_am_arg" : 'X\(//\)[^/]' \| \
+        X"$_am_arg" : 'X\(//\)$' \| \
+        X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || # Autoconf 2.62 quotes --file arguments for eval, but not when files
+# are listed without --file.  Let's play safe and only enable the eval
+# if we detect the quoting.
+case $CONFIG_FILES in
+*\'*) eval set x "$CONFIG_FILES" ;;
+*)   set x $CONFIG_FILES ;;
+esac
+shift
+for mf
+do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # Grep'ing the whole file is not good either: AIX grep has a line
+  # limit of 2048, but all sed's we know have understand at least 4000.
+  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+    dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$mf" : 'X\(//\)[^/]' \| \
+        X"$mf" : 'X\(//\)$' \| \
+        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$file" : 'X\(//\)[^/]' \| \
+        X"$file" : 'X\(//\)$' \| \
+        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+    as_dir=$dirpart/$fdir; as_fn_mkdir_p
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+    "default":C)  ;;
+
+  esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || as_fn_exit $?
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/src/mm/boehm-gc/libatomic_ops/configure.ac b/src/mm/boehm-gc/libatomic_ops/configure.ac
new file mode 100644 (file)
index 0000000..45d8e26
--- /dev/null
@@ -0,0 +1,68 @@
+# Process this file with autoconf to produce a configure script.
+AC_INIT([libatomic_ops],[1.3alpha1])
+AC_CANONICAL_TARGET([])
+AC_CONFIG_SRCDIR(src/atomic_ops.c)
+AM_INIT_AUTOMAKE
+AC_PROG_RANLIB
+
+AM_CONFIG_HEADER(src/config.h)
+
+# Checks for programs.
+AM_PROG_CC_C_O
+AM_PROG_AS
+
+# Checks for functions.
+AC_FUNC_MMAP
+
+# Checks for header files.
+AC_HEADER_STDC
+# AC_CHECK_HEADERS([ ])
+
+# Determine PIC flag, adjust default CFLAGS
+need_asm=false
+PICFLAG=
+AC_MSG_CHECKING(Determining PIC compiler flag)
+if test "$GCC" = yes; then
+  AC_MSG_RESULT(-fPIC)
+  PICFLAG=-fPIC
+else
+  case "$host" in
+    *-*-hpux*)
+      AC_MSG_RESULT("+Z")
+      PICFLAG="+Z"
+      if test "$GCC" != yes; then
+        CFLAGS="$CFLAGS +O2 -mt"
+      fi
+      ;;
+    *-*-solaris*)
+      AC_MSG_RESULT(-Kpic)
+      PICFLAG=-Kpic
+      if test "$GCC" != yes; then
+        CFLAGS="$CFLAGS -O"
+        need_asm=true
+      fi
+      ;;
+    *-*-linux*)
+      AC_MSG_RESULT(-fPIC)
+      PICFLAG=-fPIC
+      # Any Linux compiler had better be gcc compatible.
+      ;;
+    *)
+      AC_MSG_RESULT("<none>")
+      ;;
+  esac
+fi
+CFLAGS="$CFLAGS -DNDEBUG"
+
+AC_SUBST(PICFLAG)
+AC_SUBST(DEFS)
+
+AM_CONDITIONAL(NEED_ASM, test x$need_asm = xtrue)
+
+AC_CONFIG_FILES([Makefile src/Makefile src/atomic_ops/Makefile src/atomic_ops/sysdeps/Makefile doc/Makefile tests/Makefile])
+AC_CONFIG_COMMANDS([default],[[]],[[
+PICFLAG="${PICFLAG}"
+CC="${CC}"
+DEFS="${DEFS}"
+]])
+AC_OUTPUT
diff --git a/src/mm/boehm-gc/libatomic_ops/depcomp b/src/mm/boehm-gc/libatomic_ops/depcomp
new file mode 100755 (executable)
index 0000000..e5f9736
--- /dev/null
@@ -0,0 +1,589 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2007-03-29.01
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
+    "$@" -Wc,-M
+  else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
+    "$@" -M
+  fi
+  stat=$?
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    # That's a tab and a space in the [].
+    sed -e 's,^.*\.[a-z]*:[     ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mechanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+       set fnord "$@"
+       shift
+       shift
+       ;;
+    *)
+       set fnord "$@" "$arg"
+       shift
+       shift
+       ;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
+  echo "       " >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/src/mm/boehm-gc/libatomic_ops/doc/COPYING b/src/mm/boehm-gc/libatomic_ops/doc/COPYING
new file mode 100644 (file)
index 0000000..d60c31a
--- /dev/null
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/src/mm/boehm-gc/libatomic_ops/doc/LICENSING.txt b/src/mm/boehm-gc/libatomic_ops/doc/LICENSING.txt
new file mode 100644 (file)
index 0000000..1ae0e93
--- /dev/null
@@ -0,0 +1,64 @@
+Our intent is to make it easy to use libatomic_ops, in
+both free and proprietary software.  Hence most code that we expect to be
+linked into a client application is covered by an MIT-style license.
+
+A few library routines are covered by the GNU General Public License.
+These are put into a separate library, libatomic_ops_gpl.a .
+
+The low-level part of the library is mostly covered by the following
+license:
+
+----------------------------------------
+
+Copyright (c) ...
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE. 
+
+--------------------------------
+
+A few files in the sysdeps directory were inherited in part from the
+Boehm-Demers-Weiser conservative garbage collector, and are covered by
+its license, which is similar in spirit:
+
+--------------------------------
+
+Copyright (c) ...
+
+THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+
+Permission is hereby granted to use or copy this program
+for any purpose,  provided the above notices are retained on all copies.
+Permission to modify the code and to distribute modified code is granted,
+provided the above notices are retained, and a notice that the code was
+modified is included with the above copyright notice.
+
+----------------------------------
+
+A few files are covered by the GNU General Public License.  (See file
+"COPYING".) This applies only to test code, sample applications,
+and the libatomic_ops_gpl portion of the library.
+Thus libatomic_ops_gpl should generally not be linked into proprietary code.
+(This distinction was motivated by patent considerations.)
+
+It is possible that the license of the GPL pieces may be changed for
+future versions to make them more consistent with the rest of the package.
+If you submit patches, and have strong preferences about licensing, please
+express them.
+
diff --git a/src/mm/boehm-gc/libatomic_ops/doc/Makefile.am b/src/mm/boehm-gc/libatomic_ops/doc/Makefile.am
new file mode 100644 (file)
index 0000000..ce212d0
--- /dev/null
@@ -0,0 +1,3 @@
+# installed documentation
+#
+dist_pkgdata_DATA=COPYING LICENSING.txt README.txt COPYING README_stack.txt README_malloc.txt README_win32.txt
diff --git a/src/mm/boehm-gc/libatomic_ops/doc/Makefile.in b/src/mm/boehm-gc/libatomic_ops/doc/Makefile.in
new file mode 100644 (file)
index 0000000..9dd080d
--- /dev/null
@@ -0,0 +1,348 @@
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = doc
+DIST_COMMON = $(dist_pkgdata_DATA) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in COPYING
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(pkgdatadir)"
+dist_pkgdataDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(dist_pkgdata_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PICFLAG = @PICFLAG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# installed documentation
+#
+dist_pkgdata_DATA = COPYING LICENSING.txt README.txt COPYING README_stack.txt README_malloc.txt README_win32.txt
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  doc/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  doc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
+       @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f=$(am__strip_dir) \
+         echo " $(dist_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
+         $(dist_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
+       done
+
+uninstall-dist_pkgdataDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
+         f=$(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
+         rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
+       done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+       for dir in "$(DESTDIR)$(pkgdatadir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_pkgdataDATA
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_pkgdataDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+       distclean-generic distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am \
+       install-dist_pkgdataDATA install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+       pdf-am ps ps-am uninstall uninstall-am \
+       uninstall-dist_pkgdataDATA
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/mm/boehm-gc/libatomic_ops/doc/README.txt b/src/mm/boehm-gc/libatomic_ops/doc/README.txt
new file mode 100644 (file)
index 0000000..d66905d
--- /dev/null
@@ -0,0 +1,241 @@
+Usage:
+
+0) If possible, do this on a multiprocessor, especially if you are planning
+on modifying or enhancing the package.  It will work on a uniprocessor,
+but the tests are much more likely to pass in the presence of serious problems.
+
+1) Type ./configure --prefix=<install dir>; make; make check
+in the directory containing unpacked source.  The usual GNU build machinery
+is used, except that only static, but position-independent, libraries
+are normally built.  On Windows, read README_win32.txt instead.
+
+2) Applications should include atomic_ops.h.  Nearly all operations
+are implemented by header files included from it.  It is sometimes
+necessary, and always recommended to also link against libatomic_ops.a.
+To use the almost non-blocking stack or malloc implementations,
+see the corresponding README files, and also link against libatomic_gpl.a
+before linking against libatomic_ops.a.
+
+OVERVIEW:
+Atomic_ops.h defines a large collection of operations, each one of which is
+a combination of an (optional) atomic memory operation, and a memory barrier.
+Also defines associated feature-test macros to determine whether a particular
+operation is available on the current target hardware (either directly or
+by synthesis).  This is an attempt to replace various existing files with
+similar goals, since they usually do not handle differences in memory
+barrier styles with sufficient generality.
+
+If this is included after defining AO_REQUIRE_CAS, then the package
+will make an attempt to emulate compare-and-swap in a way that (at least
+on Linux) should still be async-signal-safe.  As a result, most other
+atomic operations will then be defined using the compare-and-swap
+emulation.  This emulation is slow, since it needs to disable signals.
+And it needs to block in case of contention.  If you care about performance
+on a platform that can't directly provide compare-and-swap, there are
+probably better alternatives.  But this allows easy ports to some such
+platforms (e.g. PA_RISC).  The option is ignored if compare-and-swap
+can be implemented directly.
+
+If atomic_ops.h is included after defining AO_USE_PTHREAD_DEFS, then all
+atomic operations will be emulated with pthread locking.  This is NOT
+async-signal-safe.  And it is slow.  It is intended primarily for debugging
+of the atomic_ops package itself.
+
+Note that the implementation reflects our understanding of real processor
+behavior.  This occasionally diverges from the documented behavior.  (E.g.
+the documented X86 behavior seems to be weak enough that it is impractical
+to use.  Current real implementations appear to be much better behaved.)
+We of course are in no position to guarantee that future processors
+(even HPs) will continue to behave this way, though we hope they will.
+
+This is a work in progress.  Corrections/additions for other platforms are
+greatly appreciated.  It passes rudimentary tests on X86, Itanium, and
+Alpha.
+
+OPERATIONS:
+
+Most operations operate on values of type AO_t, which are unsigned integers
+whose size matches that of pointers on the given architecture.  Exceptions
+are:
+
+- AO_test_and_set operates on AO_TS_t, which is whatever size the hardware
+supports with good performance.  In some cases this is the length of a cache
+line.  In some cases it is a byte.  In many cases it is equivalent to AO_t.
+
+- A few operations are implemented on smaller or larger size integers.
+Such operations are indicated by the appropriate prefix:
+
+AO_char_... Operates on unsigned char values.
+AO_short_... Operates on unsigned short values.
+AO_int_... Operates on unsigned int values.
+
+(Currently a very limited selection of these is implemented.  We're
+working on it.)
+
+The defined operations are all of the form AO_[<size>_]<op><barrier>(<args>).
+
+The <op> component specifies an atomic memory operation.  It may be
+one of the following, where the corresponding argument and result types
+are also specified:
+
+void nop()
+        No atomic operation.  The barrier may still be useful.
+AO_t load(const volatile AO_t * addr)
+        Atomic load of *addr.
+void store(volatile AO_t * addr, AO_t new_val)
+        Atomically store new_val to *addr.
+AO_t fetch_and_add(volatile AO_t *addr, AO_t incr)
+        Atomically add incr to *addr, and return the original value of *addr.
+AO_t fetch_and_add1(volatile AO_t *addr)
+        Equivalent to AO_fetch_and_add(addr, 1).
+AO_t fetch_and_sub1(volatile AO_t *addr)
+        Equivalent to AO_fetch_and_add(addr, (AO_t)(-1)).
+void or(volatile AO_t *addr, AO_t incr)
+        Atomically or incr into *addr.
+int compare_and_swap(volatile AO_t * addr, AO_t old_val, AO_t new_val)
+        Atomically compare *addr to old_val, and replace *addr by new_val
+        if the first comparison succeeds.  Returns nonzero if the comparison
+        succeeded and *addr was updated.
+AO_TS_VAL_t test_and_set(volatile AO_TS_t * addr)
+        Atomically read the binary value at *addr, and set it.  AO_TS_VAL_t
+        is an enumeration type which includes the two values AO_TS_SET and
+        and AO_TS_CLEAR.  An AO_TS_t location is capable of holding an
+        AO_TS_VAL_t, but may be much larger, as dictated by hardware
+        constraints.  Test_and_set logically sets the value to AO_TS_SET.
+        It may be reset to AO_TS_CLEAR with the AO_CLEAR(AO_TS_t *) macro.
+        AO_TS_t locations should be initialized to AO_TS_INITIALIZER.
+        The values of AO_TS_SET and AO_TS_CLEAR are hardware dependent.
+        (On PA-RISC, AO_TS_SET is zero!)
+
+Test_and_set is a more limited version of compare_and_swap.  Its only
+advantage is that it is more easily implementable on some hardware.  It
+should thus be used if only binary test-and-set functionality is needed.
+
+If available, we also provide compare_and_swap operations that operate
+on wider values.  Since standard data types for double width values
+may not be available, these explicitly take pairs of arguments for the
+new and/or old value.  Unfortunately, there are two common variants,
+neither of which can easily and efficiently emulate the other.
+The first performs a comparison against the entire value being replaced,
+where the second replaces a double-width replacement, but performs
+a single-width comparison:
+
+int compare_double_and_swap_double(volatile AO_double_t * addr,
+                                   AO_t old_val1, AO_t old_val2,
+                                   AO_t new_val1, AO_t new_val2);
+
+int compare_and_swap_double(volatile AO_double_t * addr,
+                            AO_t old_val1,
+                            AO_t new_val1, AO_t new_val2);
+
+where AO_double_t is a structure containing AO_val1 and AO_val2 fields,
+both of type AO_t.  For compare_and_swap_double, we compare against
+the val1 field.  AO_double_t exists only if AO_HAVE_double_t
+is defined.
+
+ORDERING CONSTRAINTS:
+
+Each operation name also includes a suffix that specifies the associated
+ordering semantics.  The ordering constraint limits reordering of this
+operation with repsect to other atomic operations and ordinary memory
+references.  The current implementation assumes that all memory references
+are to ordinary cacheable memory; the ordering guarantee is with respect
+to other threads or processes, not I/O devices.  (Whether or not this
+distinction is important is platform-dependent.)
+
+Ordering suffixes are one of the following:
+
+<none>: No memory barrier.  A plain AO_nop() really does nothing.
+_release: Earlier operations must become visible to other threads
+          before the atomic operation.
+_acquire: Later operations must become visible after this operation.
+_read: Subsequent reads must become visible after reads included in
+       the atomic operation or preceding it.  Rarely useful for clients?
+_write: Earlier writes become visible before writes during or after
+        the atomic operation.  Rarely useful for clients?
+_full: Ordered with respect to both earlier and later memops.
+       AO_store_full or AO_nop_full are the normal ways to force a store
+       to be ordered with respect to a later load.
+_release_write: Ordered with respect to earlier writes.  This is
+                normally implemented as either a _write or _release
+                barrier.
+_dd_acquire_read: Ordered with respect to later reads that are data
+               dependent on this one.  This is needed on
+               a pointer read, which is later dereferenced to read a
+               second value, with the expectation that the second
+               read is ordered after the first one.  On most architectures,
+               this is equivalent to no barrier.  (This is very
+               hard to define precisely.  It should probably be avoided.
+               A major problem is that optimizers tend to try to
+               eliminate dependencies from the generated code, since
+               dependencies force the hardware to execute the code
+               serially.)
+_release_read: Ordered with respect to earlier reads.  Useful for
+               implementing read locks.  Can be implemented as _release,
+               but not as _read, since _read groups the current operation
+               with the earlier ones.
+
+We assume that if a store is data-dependent on an a previous load, then
+the two are always implicitly ordered.
+
+It is possible to test whether AO_<op><barrier> is available on the
+current platform by checking whether AO_HAVE_<op>_<barrier> is defined
+as a macro.
+
+Note that we generally don't implement operations that are either
+meaningless (e.g. AO_nop_acquire, AO_nop_release) or which appear to
+have no clear use (e.g. AO_load_release, AO_store_acquire, AO_load_write,
+AO_store_read).  On some platforms (e.g. PA-RISC) many operations
+will remain undefined unless AO_REQUIRE_CAS is defined before including
+the package.
+
+When typed in the package build directory, the following command
+will print operations that are unimplemented on the platform:
+
+make test_atomic; ./test_atomic
+
+The following command generates a file "list_atomic.i" containing the
+macro expansions of all implemented operations on the platform:
+
+make list_atomic.i
+
+Future directions:
+
+It currently appears that something roughly analogous to this is very likely
+to become part of the C++0x standard.  That effort has pointed out a number
+of issues that we expect to address there.  Since some of the solutions
+really require compiler support, they may not be completely addressed here.
+
+Known issues include:
+
+We should be more precise in defining the semantics of the ordering
+constraints, and if and how we can guarantee sequential consistency.
+
+Dd_acquire_read is very hard or impossible to define in a way that cannot
+be invalidated by reasonably standard compiler transformations.
+
+There is probably no good reason to provide operations on standard
+integer types, since those may have the wrong alignment constraints.
+
+
+Example:
+
+If you want to initialize an object, and then "publish" a pointer to it
+in a global location p, such that other threads reading the new value of
+p are guaranteed to see an initialized object, it suffices to use
+AO_release_write(p, ...) to write the pointer to the object, and to
+retrieve it in other threads with AO_acquire_read(p).
+
+Platform notes:
+
+All X86: We quietly assume 486 or better.
+
+Microsoft compilers:
+Define AO_ASSUME_WINDOWS98 to get access to hardware compare-and-swap
+functionality.  This relies on the InterlockedCompareExchange() function
+which was apparently not supported in Windows95.  (There may be a better
+way to get access to this.)
+
+Gcc on x86:
+Define AO_USE_PENTIUM4_INSTRS to use the Pentium 4 mfence instruction.
+Currently this is appears to be of marginal benefit.
diff --git a/src/mm/boehm-gc/libatomic_ops/doc/README_malloc.txt b/src/mm/boehm-gc/libatomic_ops/doc/README_malloc.txt
new file mode 100644 (file)
index 0000000..680b3e2
--- /dev/null
@@ -0,0 +1,57 @@
+The libatomic_ops_gpl includes a simple almost-lock-free malloc implementation.
+
+This is intended as a safe way to allocate memory from a signal handler,
+or to allocate memory in the context of a library that does not know what
+thread library it will be used with.  In either case locking is impossible.
+
+Note that the operations are only guaranteed to be 1-lock-free, i.e. a
+single blocked thread will not prevent progress, but multiple blocked
+threads may.  To safely use these operations in a signal handler,
+the handler should be non-reentrant, i.e. it should not be interruptable
+by another handler using these operations.  Furthermore use outside
+of signal handlers in a multithreaded application should be protected
+by a lock, so that at most one invocation may be interrupted by a signal.
+The header will define the macro "AO_MALLOC_IS_LOCK_FREE" on platforms
+on which malloc is completely lock-free, and hence these restrictions
+do not apply.
+
+In the presence of threads, but absence of contention, the time performance
+of this package should be as good, or slightly better than, most system
+malloc implementations.  Its space performance
+is theoretically optimal (to within a constant factor), but probably
+quite poor in practice.  In particular, no attempt is made to
+coalesce free small memory blocks.  Something like Doug Lea's malloc is
+likely to use significantly less memory for complex applications.
+
+Perfomance on platforms without an efficient compare-and-swap implementation
+will be poor.
+
+This package was not designed for processor-scalability in the face of
+high allocation rates.  If all threads happen to allocate different-sized
+objects, you might get lucky.  Otherwise expect contention and false-sharing
+problems.  If this is an issue, something like Maged Michael's algorithm
+(PLDI 2004) would be technically a far better choice.  If you are concerned
+only with scalablity, and not signal-safety, you might also consider
+using Hoard instead.  We have seen a factor of 3 to 4 slowdown from the
+standard glibc malloc implementation with contention, even when the
+performance without contention was faster.  (To make the implementation
+more scalable, one would need to replicate at least the free list headers,
+so that concurrent access is possible without cache conflicts.)
+
+Unfortunately there is no portable async-signal-safe way to obtain large
+chunks of memory from the OS.  Based on reading of the source code,
+mmap-based allocation appears safe under Linux, and probably BSD variants.
+It is probably unsafe for operating systems built on Mach, such as
+Apple's Darwin.  Without use of mmap, the allocator is
+limited to a fixed size, statically preallocated heap (2MB by default),
+and will fail to allocate objects above a certain size (just under 64K
+by default).  Use of mmap to circumvent these limitations requires an
+explicit call.
+
+The entire interface to the AO_malloc package currently consists of:
+
+#include <atomic_ops_malloc.h> /* includes atomic_ops.h */
+
+void *AO_malloc(size_t sz);
+void AO_free(void *p);
+void AO_malloc_enable_mmap(void);
diff --git a/src/mm/boehm-gc/libatomic_ops/doc/README_stack.txt b/src/mm/boehm-gc/libatomic_ops/doc/README_stack.txt
new file mode 100644 (file)
index 0000000..98ff87c
--- /dev/null
@@ -0,0 +1,78 @@
+Note that the AO_stack implementation is licensed under the GPL,
+unlike the lower level routines.
+
+The header file atomic_ops_stack.h defines a linked stack abstraction.
+Stacks may be accessed by multiple concurrent threads.  The implementation
+is 1-lock-free, i.e. it will continue to make progress if at most one
+thread becomes inactive while operating on the data structure.
+
+(The implementation can be built to be N-lock-free for any given N.  But that
+seems to rarely be useful, especially since larger N involve some slowdown.)
+
+This makes it safe to access these data structures from non-reentrant
+signal handlers, provided at most one non-signal-handler thread is
+accessing the data structure at once.  This latter condition can be
+ensured by acquiring an ordinary lock around the non-hndler accesses
+to the data structure.
+
+For details see:
+
+Hans-J. Boehm, "An Almost Non-Blocking Stack", PODC 2004,
+http://portal.acm.org/citation.cfm?doid=1011767.1011774, or
+http://www.hpl.hp.com/techreports/2004/HPL-2004-105.html
+(This is not exactly the implementation described there, since the
+interface was cleaned up in the interim.  But it should perform
+very similarly.)
+
+We use a fully lock-free implementation when the underlying hardware
+makes that less expensive, i.e. when we have a double-wide compare-and-swap
+operation available.  (The fully lock-free implementation uses an AO_t-
+sized version count, and assumes it does not wrap during the time any
+given operation is active.  This seems reasonably safe on 32-bit hardware,
+and very safe on 64-bit hardware.) If a fully lock-free implementation
+is used, the macro AO_STACK_IS_LOCK_FREE will be defined.
+
+The implementation is interesting only because it allows reuse of
+existing nodes.  This is necessary, for example, to implement a memory
+allocator.
+
+Since we want to leave the precise stack node type up to the client,
+we insist only that each stack node contains a link field of type AO_t.
+When a new node is pushed on the stack, the push operation expects to be
+passed the pointer to this link field, which will then be overwritten by
+this link field.  Similarly, the pop operation returns a pointer to the
+link field of the object that previously was on the top of the stack.
+
+The cleanest way to use these routines is probably to define the stack node
+type with an initial AO_t link field, so that the conversion between the
+link-field pointer and the stack element pointer is just a compile-time
+cast.  But other possibilities exist.  (This would be cleaner in C++ with
+templates.)
+
+A stack is represented by an AO_stack_t structure.  (This is normally
+2 or 3 times the size of a pointer.)  It may be statically initialized
+by setting it to AO_STACK_INITIALIZER, or dynamically initialized to
+an empty stack with AO_stack_init.  There are only three operations for
+accessing stacks:
+
+void AO_stack_init(AO_stack_t *list);
+void AO_stack_push_release(AO_stack_t *list, AO_t *new_element);
+AO_t * AO_stack_pop_acquire(volatile AO_stack_t *list);
+
+We require that the objects pushed as list elements remain addressable
+as long as any push or pop operation are in progress.  (It is OK for an object
+to be "pop"ped off a stack and "deallocated" with a concurrent "pop" on
+the same stack still in progress, but only if "deallocation" leaves the
+object addressable.  The second "pop" may still read the object, but
+the value it reads will not matter.)
+
+We require that the headers (AO_stack objects) remain allocated and
+valid as long as any operations on them are still in-flight.
+
+We also provide macros AO_REAL_HEAD_PTR that converts an AO_stack_t
+to a pointer to the link field in the next element, and AO_REAL_NEXT_PTR
+that converts a link field to a real, dereferencable, pointer to the link field
+in the next element.  This is intended only for debugging, or to traverse
+the list after modification has ceased.  There is otherwise no guarantee that
+walking a stack using this macro will produce any kind of consistent
+picture of the data structure.
diff --git a/src/mm/boehm-gc/libatomic_ops/doc/README_win32.txt b/src/mm/boehm-gc/libatomic_ops/doc/README_win32.txt
new file mode 100644 (file)
index 0000000..0fe6f88
--- /dev/null
@@ -0,0 +1,28 @@
+Most of the atomic_ops functionality is available under Win32 with
+the Microsoft tools, but the build process currently is considerably more
+primitive than on Linux/Unix platforms.
+
+To build:
+
+1) Go to the src directory in the distribution.
+2) Make sure the Microsoft command-line tools (e.g. nmake) are available.
+3) Run "nmake -f Makefile.msft".  This should run some tests, which
+may print warnings about the types of the "Interlocked" functions.
+I haven't been able to make all versions of VC++ happy.  If you know
+how to, please send a patch.
+4) To compile applications, you will need to retain or copy the following
+pieces from the resulting src directory contents:
+       "atomic_ops.h" - Header file defining low-level primitives.  This
+                        includes files from:
+       "atomic_ops"- Subdirectory containing implementation header files.
+       "atomic_ops_stack.h" - Header file describing almost lock-free stack.
+       "atomic_ops_malloc.h" - Header file describing almost lock-free malloc.
+       "libatomic_ops_gpl.lib" - Library containing implementation of the
+                                 above two.  The atomic_ops.h implementation
+                                 is entirely in the header files in Win32.
+
+Most clients of atomic_ops.h will need to define AO_ASSUME_WINDOWS98 before
+including it.  Compare_and_swap is otherwise not available.
+
+Note that the library is covered by the GNU General Public License, while
+the top 2 of these pieces allow use in proprietary code.
diff --git a/src/mm/boehm-gc/libatomic_ops/install-sh b/src/mm/boehm-gc/libatomic_ops/install-sh
new file mode 100755 (executable)
index 0000000..a5897de
--- /dev/null
@@ -0,0 +1,519 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2006-12-25.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""       $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
+
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+       shift;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+       case $mode in
+         *' '* | *'    '* | *'
+'*       | *'*'* | *'?'* | *'['*)
+           echo "$0: invalid mode: $mode" >&2
+           exit 1;;
+       esac
+       shift;;
+
+    -o) chowncmd="$chownprog $2"
+       shift;;
+
+    -s) stripcmd=$stripprog;;
+
+    -t) dst_arg=$2
+       shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)        shift
+       break;;
+
+    -*)        echo "$0: invalid option: $1" >&2
+       exit 1;;
+
+    *)  break;;
+  esac
+  shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+       echo "$0: $dst_arg: Is a directory" >&2
+       exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+       (dirname "$dst") 2>/dev/null ||
+       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+            X"$dst" : 'X\(//\)[^/]' \| \
+            X"$dst" : 'X\(//\)$' \| \
+            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+       echo X"$dst" |
+           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)[^/].*/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\).*/{
+                  s//\1/
+                  q
+                }
+                s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+       # Create intermediate dirs using mode 755 as modified by the umask.
+       # This is like FreeBSD 'install' as of 1997-10-28.
+       umask=`umask`
+       case $stripcmd.$umask in
+         # Optimize common cases.
+         *[2367][2367]) mkdir_umask=$umask;;
+         .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+         *[0-7])
+           mkdir_umask=`expr $umask + 22 \
+             - $umask % 100 % 40 + $umask % 20 \
+             - $umask % 10 % 4 + $umask % 2
+           `;;
+         *) mkdir_umask=$umask,go-w;;
+       esac
+
+       # With -d, create the new directory with the user-specified mode.
+       # Otherwise, rely on $mkdir_umask.
+       if test -n "$dir_arg"; then
+         mkdir_mode=-m$mode
+       else
+         mkdir_mode=
+       fi
+
+       posix_mkdir=false
+       case $umask in
+         *[123567][0-7][0-7])
+           # POSIX mkdir -p sets u+wx bits regardless of umask, which
+           # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+           ;;
+         *)
+           tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+           trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+           if (umask $mkdir_umask &&
+               exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+           then
+             if test -z "$dir_arg" || {
+                  # Check for POSIX incompatibilities with -m.
+                  # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                  # other-writeable bit of parent directory when it shouldn't.
+                  # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                  ls_ld_tmpdir=`ls -ld "$tmpdir"`
+                  case $ls_ld_tmpdir in
+                    d????-?r-*) different_mode=700;;
+                    d????-?--*) different_mode=755;;
+                    *) false;;
+                  esac &&
+                  $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+                    ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+                    test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                  }
+                }
+             then posix_mkdir=:
+             fi
+             rmdir "$tmpdir/d" "$tmpdir"
+           else
+             # Remove any dirs left behind by ancient mkdir implementations.
+             rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+           fi
+           trap '' 0;;
+       esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+       umask $mkdir_umask &&
+       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+       /*) prefix='/';;
+       -*) prefix='./';;
+       *)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+       test -z "$d" && continue
+
+       prefix=$prefix$d
+       if test -d "$prefix"; then
+         prefixes=
+       else
+         if $posix_mkdir; then
+           (umask=$mkdir_umask &&
+            $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+           # Don't fail if two instances are running concurrently.
+           test -d "$prefix" || exit 1
+         else
+           case $prefix in
+             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+             *) qprefix=$prefix;;
+           esac
+           prefixes="$prefixes '$qprefix'"
+         fi
+       fi
+       prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+       # Don't fail if two instances are running concurrently.
+       (umask $mkdir_umask &&
+        eval "\$doit_exec \$mkdirprog $prefixes") ||
+         test -d "$dstdir" || exit 1
+       obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"    2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+       # Now remove or move aside any old file at destination location.
+       # We try this two ways since rm can't unlink itself on some
+       # systems and the destination file might be busy for other
+       # reasons.  In this case, the final cleanup might fail but the new
+       # file should still install successfully.
+       {
+         test ! -f "$dst" ||
+         $doit $rmcmd -f "$dst" 2>/dev/null ||
+         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+         } ||
+         { echo "$0: cannot unlink or rename $dst" >&2
+           (exit 1); exit 1
+         }
+       } &&
+
+       # Now rename the file to the real destination.
+       $doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/src/mm/boehm-gc/libatomic_ops/missing b/src/mm/boehm-gc/libatomic_ops/missing
new file mode 100755 (executable)
index 0000000..1c8ff70
--- /dev/null
@@ -0,0 +1,367 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2006-05-10.23
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
+#   Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case $1 in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $1 in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case $f in
+      *:*) touch_files="$touch_files "`echo "$f" |
+                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+          sed 's/\.am$/.in/' |
+          while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo "#! /bin/sh"
+       echo "# Created by GNU Automake missing as a replacement of"
+       echo "#  $ $@"
+       echo "exit 0"
+       chmod +x $file
+       exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.y)
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.c
+           fi
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.h
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f y.tab.h; then
+       echo >y.tab.h
+    fi
+    if test ! -f y.tab.c; then
+       echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.l)
+           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" lex.yy.c
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f lex.yy.c; then
+       echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+        you modified a dependency of a manual page.  You may need the
+        \`Help2man' package in order for those modifications to take
+        effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo ".ab help2man is required to generate this page"
+       exit 1
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+       /^@setfilename/{
+         s/.* \([^ ]*\) *$/\1/
+         p
+         q
+       }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+       case $firstarg in
+       *o*)
+           firstarg=`echo "$firstarg" | sed s/o//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+       case $firstarg in
+       *h*)
+           firstarg=`echo "$firstarg" | sed s/h//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/src/mm/boehm-gc/libatomic_ops/mkinstalldirs b/src/mm/boehm-gc/libatomic_ops/mkinstalldirs
new file mode 100755 (executable)
index 0000000..ef7e16f
--- /dev/null
@@ -0,0 +1,161 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+
+scriptversion=2006-05-11.19
+
+# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain.
+#
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+IFS=" ""       $nl"
+errstatus=0
+dirmode=
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
+
+Create each directory DIR (with mode MODE, if specified), including all
+leading file name components.
+
+Report bugs to <bug-automake@gnu.org>."
+
+# process command line arguments
+while test $# -gt 0 ; do
+  case $1 in
+    -h | --help | --h*)         # -h for help
+      echo "$usage"
+      exit $?
+      ;;
+    -m)                         # -m PERM arg
+      shift
+      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+      dirmode=$1
+      shift
+      ;;
+    --version)
+      echo "$0 $scriptversion"
+      exit $?
+      ;;
+    --)                         # stop option processing
+      shift
+      break
+      ;;
+    -*)                         # unknown option
+      echo "$usage" 1>&2
+      exit 1
+      ;;
+    *)                          # first non-opt arg
+      break
+      ;;
+  esac
+done
+
+for file
+do
+  if test -d "$file"; then
+    shift
+  else
+    break
+  fi
+done
+
+case $# in
+  0) exit 0 ;;
+esac
+
+# Solaris 8's mkdir -p isn't thread-safe.  If you mkdir -p a/b and
+# mkdir -p a/c at the same time, both will detect that a is missing,
+# one will create a, then the other will try to create a and die with
+# a "File exists" error.  This is a problem when calling mkinstalldirs
+# from a parallel make.  We use --version in the probe to restrict
+# ourselves to GNU mkdir, which is thread-safe.
+case $dirmode in
+  '')
+    if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+      echo "mkdir -p -- $*"
+      exec mkdir -p -- "$@"
+    else
+      # On NextStep and OpenStep, the `mkdir' command does not
+      # recognize any option.  It will interpret all options as
+      # directories to create, and then abort because `.' already
+      # exists.
+      test -d ./-p && rmdir ./-p
+      test -d ./--version && rmdir ./--version
+    fi
+    ;;
+  *)
+    if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
+       test ! -d ./--version; then
+      echo "mkdir -m $dirmode -p -- $*"
+      exec mkdir -m "$dirmode" -p -- "$@"
+    else
+      # Clean up after NextStep and OpenStep mkdir.
+      for d in ./-m ./-p ./--version "./$dirmode";
+      do
+        test -d $d && rmdir $d
+      done
+    fi
+    ;;
+esac
+
+for file
+do
+  case $file in
+    /*) pathcomp=/ ;;
+    *)  pathcomp= ;;
+  esac
+  oIFS=$IFS
+  IFS=/
+  set fnord $file
+  shift
+  IFS=$oIFS
+
+  for d
+  do
+    test "x$d" = x && continue
+
+    pathcomp=$pathcomp$d
+    case $pathcomp in
+      -*) pathcomp=./$pathcomp ;;
+    esac
+
+    if test ! -d "$pathcomp"; then
+      echo "mkdir $pathcomp"
+
+      mkdir "$pathcomp" || lasterr=$?
+
+      if test ! -d "$pathcomp"; then
+       errstatus=$lasterr
+      else
+       if test ! -z "$dirmode"; then
+         echo "chmod $dirmode $pathcomp"
+         lasterr=
+         chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+         if test ! -z "$lasterr"; then
+           errstatus=$lasterr
+         fi
+       fi
+      fi
+    fi
+
+    pathcomp=$pathcomp/
+  done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/src/mm/boehm-gc/libatomic_ops/src/Makefile.am b/src/mm/boehm-gc/libatomic_ops/src/Makefile.am
new file mode 100644 (file)
index 0000000..7ca41ff
--- /dev/null
@@ -0,0 +1,16 @@
+SUBDIRS=atomic_ops
+
+AM_CFLAGS=@PICFLAG@
+
+include_HEADERS=atomic_ops.h atomic_ops_stack.h atomic_ops_malloc.h
+lib_LIBRARIES = libatomic_ops.a libatomic_ops_gpl.a
+if NEED_ASM
+libatomic_ops_a_SOURCES = atomic_ops.c atomic_ops_sysdeps.S
+else
+libatomic_ops_a_SOURCES = atomic_ops.c
+endif
+
+libatomic_ops_gpl_a_SOURCES = atomic_ops_stack.c atomic_ops_malloc.c
+
+EXTRA_DIST=Makefile.msft
+
diff --git a/src/mm/boehm-gc/libatomic_ops/src/Makefile.in b/src/mm/boehm-gc/libatomic_ops/src/Makefile.in
new file mode 100644 (file)
index 0000000..573cd63
--- /dev/null
@@ -0,0 +1,636 @@
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = src
+DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in $(srcdir)/config.h.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
+libLIBRARIES_INSTALL = $(INSTALL_DATA)
+LIBRARIES = $(lib_LIBRARIES)
+AR = ar
+ARFLAGS = cru
+libatomic_ops_a_AR = $(AR) $(ARFLAGS)
+libatomic_ops_a_LIBADD =
+am__libatomic_ops_a_SOURCES_DIST = atomic_ops.c atomic_ops_sysdeps.S
+@NEED_ASM_FALSE@am_libatomic_ops_a_OBJECTS = atomic_ops.$(OBJEXT)
+@NEED_ASM_TRUE@am_libatomic_ops_a_OBJECTS = atomic_ops.$(OBJEXT) \
+@NEED_ASM_TRUE@        atomic_ops_sysdeps.$(OBJEXT)
+libatomic_ops_a_OBJECTS = $(am_libatomic_ops_a_OBJECTS)
+libatomic_ops_gpl_a_AR = $(AR) $(ARFLAGS)
+libatomic_ops_gpl_a_LIBADD =
+am_libatomic_ops_gpl_a_OBJECTS = atomic_ops_stack.$(OBJEXT) \
+       atomic_ops_malloc.$(OBJEXT)
+libatomic_ops_gpl_a_OBJECTS = $(am_libatomic_ops_gpl_a_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libatomic_ops_a_SOURCES) $(libatomic_ops_gpl_a_SOURCES)
+DIST_SOURCES = $(am__libatomic_ops_a_SOURCES_DIST) \
+       $(libatomic_ops_gpl_a_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
+includeHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(include_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PICFLAG = @PICFLAG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = atomic_ops
+AM_CFLAGS = @PICFLAG@
+include_HEADERS = atomic_ops.h atomic_ops_stack.h atomic_ops_malloc.h
+lib_LIBRARIES = libatomic_ops.a libatomic_ops_gpl.a
+@NEED_ASM_FALSE@libatomic_ops_a_SOURCES = atomic_ops.c
+@NEED_ASM_TRUE@libatomic_ops_a_SOURCES = atomic_ops.c atomic_ops_sysdeps.S
+libatomic_ops_gpl_a_SOURCES = atomic_ops_stack.c atomic_ops_malloc.c
+EXTRA_DIST = Makefile.msft
+all: config.h
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .S .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+config.h: stamp-h1
+       @if test ! -f $@; then \
+         rm -f stamp-h1; \
+         $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+       else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+       @rm -f stamp-h1
+       cd $(top_builddir) && $(SHELL) ./config.status src/config.h
+$(srcdir)/config.h.in:  $(am__configure_deps) 
+       cd $(top_srcdir) && $(AUTOHEADER)
+       rm -f stamp-h1
+       touch $@
+
+distclean-hdr:
+       -rm -f config.h stamp-h1
+install-libLIBRARIES: $(lib_LIBRARIES)
+       @$(NORMAL_INSTALL)
+       test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+       @list='$(lib_LIBRARIES)'; for p in $$list; do \
+         if test -f $$p; then \
+           f=$(am__strip_dir) \
+           echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+           $(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+         else :; fi; \
+       done
+       @$(POST_INSTALL)
+       @list='$(lib_LIBRARIES)'; for p in $$list; do \
+         if test -f $$p; then \
+           p=$(am__strip_dir) \
+           echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \
+           $(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \
+         else :; fi; \
+       done
+
+uninstall-libLIBRARIES:
+       @$(NORMAL_UNINSTALL)
+       @list='$(lib_LIBRARIES)'; for p in $$list; do \
+         p=$(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+         rm -f "$(DESTDIR)$(libdir)/$$p"; \
+       done
+
+clean-libLIBRARIES:
+       -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+libatomic_ops.a: $(libatomic_ops_a_OBJECTS) $(libatomic_ops_a_DEPENDENCIES) 
+       -rm -f libatomic_ops.a
+       $(libatomic_ops_a_AR) libatomic_ops.a $(libatomic_ops_a_OBJECTS) $(libatomic_ops_a_LIBADD)
+       $(RANLIB) libatomic_ops.a
+libatomic_ops_gpl.a: $(libatomic_ops_gpl_a_OBJECTS) $(libatomic_ops_gpl_a_DEPENDENCIES) 
+       -rm -f libatomic_ops_gpl.a
+       $(libatomic_ops_gpl_a_AR) libatomic_ops_gpl.a $(libatomic_ops_gpl_a_OBJECTS) $(libatomic_ops_gpl_a_LIBADD)
+       $(RANLIB) libatomic_ops_gpl.a
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops_malloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops_stack.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops_sysdeps.Po@am__quote@
+
+.S.o:
+@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCCAS_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@    source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@    DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@        $(CPPASCOMPILE) -c -o $@ $<
+
+.S.obj:
+@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCCAS_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@    source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@    DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@        $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.o:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-includeHEADERS: $(include_HEADERS)
+       @$(NORMAL_INSTALL)
+       test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
+       @list='$(include_HEADERS)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f=$(am__strip_dir) \
+         echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
+         $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
+       done
+
+uninstall-includeHEADERS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(include_HEADERS)'; for p in $$list; do \
+         f=$(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
+         rm -f "$(DESTDIR)$(includedir)/$$f"; \
+       done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
+           || exit 1; \
+           distdir=`$(am__cd) $(distdir) && pwd`; \
+           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+           (cd $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$top_distdir" \
+               distdir="$$distdir/$$subdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LIBRARIES) $(HEADERS) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libLIBRARIES mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-hdr distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-includeHEADERS
+
+install-dvi: install-dvi-recursive
+
+install-exec-am: install-libLIBRARIES
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-includeHEADERS uninstall-libLIBRARIES
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+       install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am check check-am clean clean-generic \
+       clean-libLIBRARIES ctags ctags-recursive distclean \
+       distclean-compile distclean-generic distclean-hdr \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-includeHEADERS install-info \
+       install-info-am install-libLIBRARIES install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs installdirs-am \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+       tags tags-recursive uninstall uninstall-am \
+       uninstall-includeHEADERS uninstall-libLIBRARIES
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/mm/boehm-gc/libatomic_ops/src/Makefile.msft b/src/mm/boehm-gc/libatomic_ops/src/Makefile.msft
new file mode 100644 (file)
index 0000000..ae96702
--- /dev/null
@@ -0,0 +1,45 @@
+#
+# Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P.
+# 
+# The really trivial win32/VC++ Makefile.  Note that atomic_ops.c isn't useful.
+# And we rely on a pre-built test_atomic_include.h and generalize-small.h,
+# since we can't rely on sed.
+# Win32 clients only need to include the header files.
+# To install, copy atomic_ops.h and the atomic_ops/... tree to your favorite
+# include directory.
+
+#MY_CPU=X86
+#CPU=$(MY_CPU)
+#!include <ntwin32.mak>
+
+LIB_OBJS=atomic_ops_stack.obj atomic_ops_malloc.obj
+
+all: check
+
+atomic_ops_stack.obj:
+       cl -O2 -c -DAO_ASSUME_WINDOWS98 atomic_ops_stack.c
+
+atomic_ops_malloc.obj:
+       cl -O2 -c -DAO_ASSUME_WINDOWS98 atomic_ops_malloc.c
+
+test_atomic: ..\tests\test_atomic.c ..\tests\test_atomic_include.h
+       cl -O2 -I. -DAO_ASSUME_WINDOWS98 ..\tests\test_atomic.c -o test_atomic
+
+test_atomic_w95: ..\tests\test_atomic.c ..\tests\test_atomic_include.h
+       cl -O2 -I. ..\tests\test_atomic.c -o test_atomic_w95
+
+test_malloc: ..\tests\test_malloc.c ..\tests\test_atomic_include.h \
+            libatomic_ops_gpl.lib 
+       cl -O2 -DAO_ASSUME_WINDOWS98 -I. ..\tests\test_malloc.c -o test_malloc libatomic_ops_gpl.lib
+
+libatomic_ops_gpl.lib: $(LIB_OBJS)
+       lib /MACHINE:i386 /out:libatomic_ops_gpl.lib $(LIB_OBJS)
+
+check:  test_atomic test_atomic_w95 test_malloc
+       echo The following will print lots of \"Missing ...\" messages.
+       test_atomic_w95
+       echo The following will print some \"Missing ...\" messages.
+       test_atomic
+       test_malloc
+
+
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops.c b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops.c
new file mode 100644 (file)
index 0000000..61f3a42
--- /dev/null
@@ -0,0 +1,245 @@
+/*
+ * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Initialized data and out-of-line functions to support atomic_ops.h
+ * go here.  Currently this is needed only for pthread-based atomics
+ * emulation, or for compare-and-swap emulation.
+ * Pthreads emulation isn't useful on a native Windows platform, and
+ * cas emulation is not needed.  Thus we skip this on Windows.
+ */
+
+#if defined(HAVE_CONFIG_H)
+# include "config.h"
+#endif
+
+#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__BORLANDC__) \
+    || defined(AO_USE_WIN32_PTHREADS)
+
+#undef AO_REQUIRE_CAS
+
+#include <pthread.h>
+
+#ifdef AO_USE_WIN32_PTHREADS
+# include <windows.h> /* for Sleep() */
+#else
+# include <signal.h>
+# ifdef _HPUX_SOURCE
+#   include <sys/time.h>
+# else
+#   include <sys/select.h>
+# endif
+#endif
+
+#include "atomic_ops.h"  /* Without cas emulation! */
+
+#ifndef AO_HAVE_double_t
+# include "atomic_ops/sysdeps/standard_ao_double_t.h"
+#endif
+
+/*
+ * Lock for pthreads-based implementation.
+ */
+
+pthread_mutex_t AO_pt_lock = PTHREAD_MUTEX_INITIALIZER;
+
+/*
+ * Out of line compare-and-swap emulation based on test and set.
+ *
+ * We use a small table of locks for different compare_and_swap locations.
+ * Before we update perform a compare-and-swap, we grab the corresponding
+ * lock.  Different locations may hash to the same lock, but since we
+ * never acquire more than one lock at a time, this can't deadlock.
+ * We explicitly disable signals while we perform this operation.
+ *
+ * FIXME: We should probably also support emulation based on Lamport
+ * locks, since we may not have test_and_set either.
+ */
+#define AO_HASH_SIZE 16
+
+#define AO_HASH(x) (((unsigned long)(x) >> 12) & (AO_HASH_SIZE-1))
+
+AO_TS_t AO_locks[AO_HASH_SIZE] = {
+        AO_TS_INITIALIZER, AO_TS_INITIALIZER,
+        AO_TS_INITIALIZER, AO_TS_INITIALIZER,
+        AO_TS_INITIALIZER, AO_TS_INITIALIZER,
+        AO_TS_INITIALIZER, AO_TS_INITIALIZER,
+        AO_TS_INITIALIZER, AO_TS_INITIALIZER,
+        AO_TS_INITIALIZER, AO_TS_INITIALIZER,
+        AO_TS_INITIALIZER, AO_TS_INITIALIZER,
+        AO_TS_INITIALIZER, AO_TS_INITIALIZER,
+};
+
+static AO_T dummy = 1;
+
+/* Spin for 2**n units. */
+void AO_spin(int n)
+{
+  int i;
+  AO_T j = AO_load(&dummy);
+
+  for (i = 0; i < (2 << n); ++i)
+    {
+       j *= 5;
+       j -= 4;
+    }
+  AO_store(&dummy, j);
+}
+
+void AO_pause(int n)
+{
+    if (n < 12)
+      AO_spin(n);
+    else
+      {
+#     ifdef AO_USE_WIN32_PTHREADS
+        Sleep(n > 28 ? 100 : 1 << (n - 22)); /* in millis */
+#     else
+        struct timeval tv;
+
+        /* Short async-signal-safe sleep. */
+        tv.tv_sec = 0;
+        tv.tv_usec = (n > 28? 100000 : (1 << (n - 12)));
+        select(0, 0, 0, 0, &tv);
+#     endif
+      }
+}
+
+static void lock_ool(volatile AO_TS_t *l)
+{
+  int i = 0;
+
+  while (AO_test_and_set_acquire(l) == AO_TS_SET)
+    AO_pause(++i);
+}
+
+AO_INLINE void lock(volatile AO_TS_t *l)
+{
+  if (AO_test_and_set_acquire(l) == AO_TS_SET)
+    lock_ool(l);
+}
+
+AO_INLINE void unlock(volatile AO_TS_t *l)
+{
+  AO_CLEAR(l);
+}
+
+#ifndef AO_USE_WIN32_PTHREADS
+  static sigset_t all_sigs;
+  static volatile AO_t initialized = 0;
+#endif
+
+static volatile AO_TS_t init_lock = AO_TS_INITIALIZER;
+
+int AO_compare_and_swap_emulation(volatile AO_t *addr, AO_t old,
+                                  AO_t new_val)
+{
+  AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
+  int result;
+
+# ifndef AO_USE_WIN32_PTHREADS
+    sigset_t old_sigs;
+    if (!AO_load_acquire(&initialized))
+    {
+      lock(&init_lock);
+      if (!initialized) sigfillset(&all_sigs);
+      unlock(&init_lock);
+      AO_store_release(&initialized, 1);
+    }
+    sigprocmask(SIG_BLOCK, &all_sigs, &old_sigs);
+        /* Neither sigprocmask nor pthread_sigmask is 100%      */
+        /* guaranteed to work here.  Sigprocmask is not         */
+        /* guaranteed be thread safe, and pthread_sigmask       */
+        /* is not async-signal-safe.  Under linuxthreads,       */
+        /* sigprocmask may block some pthreads-internal         */
+        /* signals.  So long as we do that for short periods,   */
+        /* we should be OK.                                     */
+# endif
+  lock(my_lock);
+  if (*addr == old)
+    {
+      *addr = new_val;
+      result = 1;
+    }
+  else
+    result = 0;
+  unlock(my_lock);
+# ifndef AO_USE_WIN32_PTHREADS
+    sigprocmask(SIG_SETMASK, &old_sigs, NULL);
+# endif
+  return result;
+}
+
+int AO_compare_double_and_swap_double_emulation(volatile AO_double_t *addr,
+                                                AO_t old_val1, AO_t old_val2,
+                                                AO_t new_val1, AO_t new_val2)
+{
+  AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
+  int result;
+
+# ifndef AO_USE_WIN32_PTHREADS
+    sigset_t old_sigs;
+    if (!AO_load_acquire(&initialized))
+    {
+      lock(&init_lock);
+      if (!initialized) sigfillset(&all_sigs);
+      unlock(&init_lock);
+      AO_store_release(&initialized, 1);
+    }
+    sigprocmask(SIG_BLOCK, &all_sigs, &old_sigs);
+        /* Neither sigprocmask nor pthread_sigmask is 100%      */
+        /* guaranteed to work here.  Sigprocmask is not         */
+        /* guaranteed be thread safe, and pthread_sigmask       */
+        /* is not async-signal-safe.  Under linuxthreads,       */
+        /* sigprocmask may block some pthreads-internal         */
+        /* signals.  So long as we do that for short periods,   */
+        /* we should be OK.                                     */
+# endif
+  lock(my_lock);
+  if (addr -> AO_val1 == old_val1 && addr -> AO_val2 == old_val2)
+    {
+      addr -> AO_val1 = new_val1;
+      addr -> AO_val2 = new_val2;
+      result = 1;
+    }
+  else
+    result = 0;
+  unlock(my_lock);
+# ifndef AO_USE_WIN32_PTHREADS
+    sigprocmask(SIG_SETMASK, &old_sigs, NULL);
+# endif
+  return result;
+}
+
+void AO_store_full_emulation(volatile AO_t *addr, AO_t val)
+{
+  AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
+  lock(my_lock);
+  *addr = val;
+  unlock(my_lock);
+}
+
+#else /* Non-posix platform */
+
+int AO_non_posix_implementation_is_entirely_in_headers;
+
+#endif
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops.h
new file mode 100755 (executable)
index 0000000..1424711
--- /dev/null
@@ -0,0 +1,329 @@
+/*
+ * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef ATOMIC_OPS_H
+
+#define ATOMIC_OPS_H
+
+#include <assert.h>
+#include <stddef.h>
+
+/* We define various atomic operations on memory in a           */
+/* machine-specific way.  Unfortunately, this is complicated    */
+/* by the fact that these may or may not be combined with       */
+/* various memory barriers.  Thus the actual operations we      */
+/* define have the form AO_<atomic-op>_<barrier>, for all       */
+/* plausible combinations of <atomic-op> and <barrier>.         */
+/* This of course results in a mild combinatorial explosion.    */
+/* To deal with it, we try to generate derived                  */
+/* definitions for as many of the combinations as we can, as    */
+/* automatically as possible.                                   */
+/*                                                              */
+/* Our assumption throughout is that the programmer will        */
+/* specify the least demanding operation and memory barrier     */
+/* that will guarantee correctness for the implementation.      */
+/* Our job is to find the least expensive way to implement it   */
+/* on the applicable hardware.  In many cases that will         */
+/* involve, for example, a stronger memory barrier, or a        */
+/* combination of hardware primitives.                          */
+/*                                                              */
+/* Conventions:                                                 */
+/* "plain" atomic operations are not guaranteed to include      */
+/* a barrier.  The suffix in the name specifies the barrier     */
+/* type.  Suffixes are:                                         */
+/* _release: Earlier operations may not be delayed past it.     */
+/* _acquire: Later operations may not move ahead of it.         */
+/* _read: Subsequent reads must follow this operation and       */
+/*        preceding reads.                                      */
+/* _write: Earlier writes precede both this operation and       */
+/*        later writes.                                         */
+/* _full: Ordered with respect to both earlier and later memops.*/
+/* _release_write: Ordered with respect to earlier writes.      */
+/* _acquire_read: Ordered with respect to later reads.          */
+/*                                                              */
+/* Currently we try to define the following atomic memory       */
+/* operations, in combination with the above barriers:          */
+/* AO_nop                                                       */
+/* AO_load                                                      */
+/* AO_store                                                     */
+/* AO_test_and_set (binary)                                     */
+/* AO_fetch_and_add                                             */
+/* AO_fetch_and_add1                                            */
+/* AO_fetch_and_sub1                                            */
+/* AO_or                                                        */
+/* AO_compare_and_swap                                          */
+/*                                                              */
+/* Note that atomicity guarantees are valid only if both        */
+/* readers and writers use AO_ operations to access the         */
+/* shared value, while ordering constraints are intended to     */
+/* apply all memory operations.  If a location can potentially  */
+/* be accessed simultaneously from multiple threads, and one of */
+/* those accesses may be a write access, then all such          */
+/* accesses to that location should be through AO_ primitives.  */
+/* However if AO_ operations enforce sufficient ordering to     */
+/* ensure that a location x cannot be accessed concurrently,    */
+/* or can only be read concurrently, then x can be accessed     */
+/* via ordinary references and assignments.                     */
+/*                                                              */
+/* Compare_and_exchange takes an address and an expected old    */
+/* value and a new value, and returns an int.  Nonzero          */
+/* indicates that it succeeded.                                 */
+/* Test_and_set takes an address, atomically replaces it by     */
+/* AO_TS_SET, and returns the prior value.                      */
+/* An AO_TS_t location can be reset with the                    */
+/* AO_CLEAR macro, which normally uses AO_store_release.        */
+/* AO_fetch_and_add takes an address and an AO_t increment      */
+/* value.  The AO_fetch_and_add1 and AO_fetch_and_sub1 variants */
+/* are provided, since they allow faster implementations on     */
+/* some hardware. AO_or atomically ors an AO_t value into a     */
+/* memory location, but does not provide access to the original.*/
+/*                                                              */
+/* We expect this list to grow slowly over time.                */
+/*                                                              */
+/* Note that AO_nop_full is a full memory barrier.              */
+/*                                                              */
+/* Note that if some data is initialized with                   */
+/*      data.x = ...; data.y = ...; ...                         */
+/*      AO_store_release_write(&data_is_initialized, 1)         */
+/* then data is guaranteed to be initialized after the test     */
+/*      if (AO_load_release_read(&data_is_initialized)) ...     */
+/* succeeds.  Furthermore, this should generate near-optimal    */
+/* code on all common platforms.                                */
+/*                                                              */
+/* All operations operate on unsigned AO_t, which               */
+/* is the natural word size, and usually unsigned long.         */
+/* It is possible to check whether a particular operation op    */
+/* is available on a particular platform by checking whether    */
+/* AO_HAVE_op is defined.  We make heavy use of these macros    */
+/* internally.                                                  */
+
+/* The rest of this file basically has three sections:          */
+/*                                                              */
+/* Some utility and default definitions.                        */
+/*                                                              */
+/* The architecture dependent section:                          */
+/* This defines atomic operations that have direct hardware     */
+/* support on a particular platform, mostly by including the    */
+/* appropriate compiler- and hardware-dependent file.           */
+/*                                                              */
+/* The synthesis section:                                       */
+/* This tries to define other atomic operations in terms of     */
+/* those that are explicitly available on the platform.         */
+/* This section is hardware independent.                        */
+/* We make no attempt to synthesize operations in ways that     */
+/* effectively introduce locks, except for the debugging/demo   */
+/* pthread-based implementation at the beginning.  A more       */
+/* realistic implementation that falls back to locks could be   */
+/* added as a higher layer.  But that would sacrifice           */
+/* usability from signal handlers.                              */
+/* The synthesis section is implemented almost entirely in      */
+/* atomic_ops_generalize.h.                                     */
+
+/* Some common defaults.  Overridden for some architectures.    */
+#define AO_t size_t
+
+/* The test_and_set primitive returns an AO_TS_VAL_t value.     */
+/* AO_TS_t is the type of an in-memory test-and-set location.   */
+
+#define AO_TS_INITIALIZER (AO_t)AO_TS_CLEAR
+
+/* Platform-dependent stuff:                                    */
+#if defined(__GNUC__) || defined(_MSC_VER) || defined(__INTEL_COMPILER) \
+        || defined(__DMC__) || defined(__WATCOMC__)
+# define AO_INLINE static __inline
+#elif defined(__sun)
+# define AO_INLINE static inline
+#else
+# define AO_INLINE static
+#endif
+
+#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
+# define AO_compiler_barrier() __asm__ __volatile__("" : : : "memory")
+#elif defined(_MSC_VER) || defined(__DMC__) || defined(__BORLANDC__) \
+        || defined(__WATCOMC__)
+# if defined(_AMD64_) || _MSC_VER >= 1400
+#   if defined(_WIN32_WCE)
+/* #     include <cmnintrin.h> */
+#   elif defined(_MSC_VER)
+#     include <intrin.h>
+#   endif
+#   pragma intrinsic(_ReadWriteBarrier)
+#   define AO_compiler_barrier() _ReadWriteBarrier()
+        /* We assume this does not generate a fence instruction.        */
+        /* The documentation is a bit unclear.                          */
+# else
+#   define AO_compiler_barrier() __asm { }
+        /* The preceding implementation may be preferable here too.     */
+        /* But the documentation warns about VC++ 2003 and earlier.     */
+# endif
+#elif defined(__INTEL_COMPILER)
+# define AO_compiler_barrier() __memory_barrier() /* Too strong? IA64-only? */
+#elif defined(_HPUX_SOURCE)
+# if defined(__ia64)
+#   include <machine/sys/inline.h>
+#   define AO_compiler_barrier() _Asm_sched_fence()
+# else
+    /* FIXME - We dont know how to do this.  This is a guess.   */
+    /* And probably a bad one.                                  */
+    static volatile int AO_barrier_dummy;
+#   define AO_compiler_barrier() AO_barrier_dummy = AO_barrier_dummy
+# endif
+#else
+  /* We conjecture that the following usually gives us the right        */
+  /* semantics or an error.                                             */
+# define AO_compiler_barrier() asm("")
+#endif
+
+#if defined(AO_USE_PTHREAD_DEFS)
+# include "atomic_ops/sysdeps/generic_pthread.h"
+#endif /* AO_USE_PTHREAD_DEFS */
+
+#if defined(__GNUC__) && !defined(AO_USE_PTHREAD_DEFS) \
+    && !defined(__INTEL_COMPILER)
+# if defined(__i386__)
+#   include "atomic_ops/sysdeps/gcc/x86.h"
+# endif /* __i386__ */
+# if defined(__x86_64__)
+#   include "atomic_ops/sysdeps/gcc/x86_64.h"
+# endif /* __x86_64__ */
+# if defined(__ia64__)
+#   include "atomic_ops/sysdeps/gcc/ia64.h"
+#   define AO_GENERALIZE_TWICE
+# endif /* __ia64__ */
+# if defined(__hppa__)
+#   include "atomic_ops/sysdeps/gcc/hppa.h"
+#   define AO_CAN_EMUL_CAS
+# endif /* __hppa__ */
+# if defined(__alpha__)
+#   include "atomic_ops/sysdeps/gcc/alpha.h"
+#   define AO_GENERALIZE_TWICE
+# endif /* __alpha__ */
+# if defined(__s390__)
+#   include "atomic_ops/sysdeps/gcc/s390.h"
+# endif /* __s390__ */
+# if defined(__sparc__)
+#   include "atomic_ops/sysdeps/gcc/sparc.h"
+#   define AO_CAN_EMUL_CAS
+# endif /* __sparc__ */
+# if defined(__m68k__)
+#   include "atomic_ops/sysdeps/gcc/m68k.h"
+# endif /* __m68k__ */
+# if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \
+     || defined(__powerpc64__) || defined(__ppc64__)
+#   include "atomic_ops/sysdeps/gcc/powerpc.h"
+# endif /* __powerpc__ */
+# if defined(__arm__) && !defined(AO_USE_PTHREAD_DEFS)
+#   include "atomic_ops/sysdeps/gcc/arm.h"
+#   define AO_CAN_EMUL_CAS
+# endif /* __arm__ */
+# if defined(__cris__) || defined(CRIS)
+#   include "atomic_ops/sysdeps/gcc/cris.h"
+# endif
+# if defined(__mips__)
+#   include "atomic_ops/sysdeps/gcc/mips.h"
+# endif /* __mips__ */
+# if defined(__sh__) || defined(SH4)
+#   include "atomic_ops/sysdeps/gcc/sh.h"
+#   define AO_CAN_EMUL_CAS
+# endif /* __sh__ */
+#endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */
+
+#if defined(__INTEL_COMPILER) && !defined(AO_USE_PTHREAD_DEFS)
+# if defined(__ia64__)
+#   include "atomic_ops/sysdeps/icc/ia64.h"
+#   define AO_GENERALIZE_TWICE
+# endif
+#endif
+
+#if defined(_HPUX_SOURCE) && !defined(__GNUC__) && !defined(AO_USE_PTHREAD_DEFS)
+# if defined(__ia64)
+#   include "atomic_ops/sysdeps/hpc/ia64.h"
+#   define AO_GENERALIZE_TWICE
+# else
+#   include "atomic_ops/sysdeps/hpc/hppa.h"
+#   define AO_CAN_EMUL_CAS
+# endif
+#endif
+
+#if defined(__sun) && !defined(__GNUC__) && !defined(AO_USE_PTHREAD_DEFS)
+  /* Note: use -DAO_USE_PTHREAD_DEFS if Sun CC does not handle inline asm. */
+# if defined(__i386)
+#   include "atomic_ops/sysdeps/sunc/x86.h"
+# endif /* __i386 */
+# if defined(__x86_64) || defined(__amd64)
+#   include "atomic_ops/sysdeps/sunc/x86_64.h"
+# endif /* __x86_64 */
+#endif
+
+#if !defined(__GNUC__) && (defined(sparc) || defined(__sparc)) \
+    && !defined(AO_USE_PTHREAD_DEFS)
+#   include "atomic_ops/sysdeps/sunc/sparc.h"
+#   define AO_CAN_EMUL_CAS
+#endif
+
+#if defined(_MSC_VER) || defined(__DMC__) || defined(__BORLANDC__) \
+        || (defined(__WATCOMC__) && defined(__NT__))
+# if defined(_AMD64_)
+#   include "atomic_ops/sysdeps/msftc/x86_64.h"
+# elif defined(_M_IX86) || defined(x86)
+#   include "atomic_ops/sysdeps/msftc/x86.h"
+# elif defined(_M_ARM) || defined(ARM) || defined(_ARM_)
+#   include "atomic_ops/sysdeps/msftc/arm.h"
+# endif
+#endif
+
+#if defined(AO_REQUIRE_CAS) && !defined(AO_HAVE_compare_and_swap) \
+    && !defined(AO_HAVE_compare_and_swap_full) \
+    && !defined(AO_HAVE_compare_and_swap_acquire)
+# if defined(AO_CAN_EMUL_CAS)
+#   include "atomic_ops/sysdeps/emul_cas.h"
+# else
+#  error Cannot implement AO_compare_and_swap_full on this architecture.
+# endif
+#endif  /* AO_REQUIRE_CAS && !AO_HAVE_compare_and_swap ... */
+
+/* The most common way to clear a test-and-set location         */
+/* at the end of a critical section.                            */
+#if AO_AO_TS_T && !defined(AO_CLEAR)
+# define AO_CLEAR(addr) AO_store_release((AO_TS_t *)(addr), AO_TS_CLEAR)
+#endif
+#if AO_CHAR_TS_T && !defined(AO_CLEAR)
+# define AO_CLEAR(addr) AO_char_store_release((AO_TS_t *)(addr), AO_TS_CLEAR)
+#endif
+
+/*
+ * The generalization section.
+ * Theoretically this should repeatedly include atomic_ops_generalize.h.
+ * In fact, we observe that this converges after a small fixed number
+ * of iterations, usually one.
+ */
+#include "atomic_ops/generalize.h"
+#ifdef AO_GENERALIZE_TWICE
+# include "atomic_ops/generalize.h"
+#endif
+
+/* For compatibility with version 0.4 and earlier       */
+#define AO_TS_T AO_TS_t
+#define AO_T AO_t
+#define AO_TS_VAL AO_TS_VAL_t
+
+#endif /* ATOMIC_OPS_H */
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/Makefile.am b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/Makefile.am
new file mode 100644 (file)
index 0000000..8000273
--- /dev/null
@@ -0,0 +1,12 @@
+SUBDIRS=sysdeps
+
+EXTRA_DIST=generalize-small.template
+
+#Private Headers
+private_HEADERS=generalize.h generalize-small.h
+privatedir=${includedir}/atomic_ops/
+
+generalize-small.h: generalize-small.template
+       sed -e s:XSIZE:char:g -e s:XCTYPE:char:g $? > $@
+       sed -e s:XSIZE:short:g -e s:XCTYPE:short:g $? >> $@
+       sed -e s:XSIZE:int:g -e s:XCTYPE:int:g $? >> $@
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/Makefile.in b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/Makefile.in
new file mode 100644 (file)
index 0000000..60a1f6a
--- /dev/null
@@ -0,0 +1,512 @@
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = src/atomic_ops
+DIST_COMMON = $(private_HEADERS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(privatedir)"
+privateHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(private_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PICFLAG = @PICFLAG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = sysdeps
+EXTRA_DIST = generalize-small.template
+
+#Private Headers
+private_HEADERS = generalize.h generalize-small.h
+privatedir = ${includedir}/atomic_ops/
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/atomic_ops/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  src/atomic_ops/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-privateHEADERS: $(private_HEADERS)
+       @$(NORMAL_INSTALL)
+       test -z "$(privatedir)" || $(MKDIR_P) "$(DESTDIR)$(privatedir)"
+       @list='$(private_HEADERS)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f=$(am__strip_dir) \
+         echo " $(privateHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(privatedir)/$$f'"; \
+         $(privateHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(privatedir)/$$f"; \
+       done
+
+uninstall-privateHEADERS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(private_HEADERS)'; for p in $$list; do \
+         f=$(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(privatedir)/$$f'"; \
+         rm -f "$(DESTDIR)$(privatedir)/$$f"; \
+       done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
+           || exit 1; \
+           distdir=`$(am__cd) $(distdir) && pwd`; \
+           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+           (cd $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$top_distdir" \
+               distdir="$$distdir/$$subdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
+       for dir in "$(DESTDIR)$(privatedir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-privateHEADERS
+
+install-dvi: install-dvi-recursive
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-privateHEADERS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+       install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am check check-am clean clean-generic ctags \
+       ctags-recursive distclean distclean-generic distclean-tags \
+       distdir dvi dvi-am html html-am info info-am install \
+       install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-privateHEADERS install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs installdirs-am maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+       pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+       uninstall-privateHEADERS
+
+
+generalize-small.h: generalize-small.template
+       sed -e s:XSIZE:char:g -e s:XCTYPE:char:g $? > $@
+       sed -e s:XSIZE:short:g -e s:XCTYPE:short:g $? >> $@
+       sed -e s:XSIZE:int:g -e s:XCTYPE:int:g $? >> $@
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/generalize-small.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/generalize-small.h
new file mode 100644 (file)
index 0000000..067b0f0
--- /dev/null
@@ -0,0 +1,1724 @@
+/* char_load */
+#if defined(AO_HAVE_char_load_acquire) && !defined(AO_HAVE_char_load)
+#  define AO_char_load(addr) AO_char_load_acquire(addr)
+#  define AO_HAVE_char_load
+#endif
+
+#if defined(AO_HAVE_char_load_full) && !defined(AO_HAVE_char_load_acquire)
+#  define AO_char_load_acquire(addr) AO_char_load_full(addr)
+#  define AO_HAVE_char_load_acquire
+#endif
+
+#if defined(AO_HAVE_char_load_full) && !defined(AO_HAVE_char_load_read)
+#  define AO_char_load_read(addr) AO_char_load_full(addr)
+#  define AO_HAVE_char_load_read
+#endif
+
+#if !defined(AO_HAVE_char_load_acquire_read) && defined(AO_HAVE_char_load_acquire)
+#  define AO_char_load_acquire_read(addr) AO_char_load_acquire(addr)
+#  define AO_HAVE_char_load_acquire_read
+#endif
+
+#if defined(AO_HAVE_char_load) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_char_load_acquire)
+   AO_INLINE unsigned char
+   AO_char_load_acquire(const volatile unsigned char *addr)
+   {
+     unsigned char result = AO_char_load(addr);
+     /* Acquire barrier would be useless, since the load could be delayed  */
+     /* beyond it.                                                         */
+     AO_nop_full();
+     return result;
+   }
+#  define AO_HAVE_char_load_acquire
+#endif
+
+#if defined(AO_HAVE_char_load) && defined(AO_HAVE_nop_read) && \
+    !defined(AO_HAVE_char_load_read)
+   AO_INLINE unsigned char
+   AO_char_load_read(const volatile unsigned char *addr)
+   {
+     unsigned char result = AO_char_load(addr);
+     /* Acquire barrier would be useless, since the load could be delayed  */
+     /* beyond it.                                                         */
+     AO_nop_read();
+     return result;
+   }
+#  define AO_HAVE_char_load_read
+#endif
+
+#if defined(AO_HAVE_char_load_acquire) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_char_load_full)
+#  define AO_char_load_full(addr) (AO_nop_full(), AO_char_load_acquire(addr))
+#  define AO_HAVE_char_load_full
+#endif
+
+#if !defined(AO_HAVE_char_load_acquire_read) && defined(AO_HAVE_char_load_read)
+#  define AO_char_load_acquire_read(addr) AO_char_load_read(addr)
+#  define AO_HAVE_char_load_acquire_read
+#endif
+
+#if defined(AO_HAVE_char_load_acquire_read) && !defined(AO_HAVE_char_load)
+#  define AO_char_load(addr) AO_char_load_acquire_read(addr)
+#  define AO_HAVE_char_load
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_char_load_acquire_read)
+#    define AO_char_load_dd_acquire_read(addr) \
+        AO_char_load_acquire_read(addr)
+#    define AO_HAVE_char_load_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_char_load)
+#    define AO_char_load_dd_acquire_read(addr) \
+        AO_char_load(addr)
+#    define AO_HAVE_char_load_dd_acquire_read
+#  endif
+#endif
+
+
+/* char_store */
+
+#if defined(AO_HAVE_char_store_release) && !defined(AO_HAVE_char_store)
+#  define AO_char_store(addr, val) AO_char_store_release(addr,val)
+#  define AO_HAVE_char_store
+#endif
+
+#if defined(AO_HAVE_char_store_full) && !defined(AO_HAVE_char_store_release)
+#  define AO_char_store_release(addr,val) AO_char_store_full(addr,val)
+#  define AO_HAVE_char_store_release
+#endif
+
+#if defined(AO_HAVE_char_store_full) && !defined(AO_HAVE_char_store_write)
+#  define AO_char_store_write(addr,val) AO_char_store_full(addr,val)
+#  define AO_HAVE_char_store_write
+#endif
+
+#if defined(AO_HAVE_char_store_release) && \
+        !defined(AO_HAVE_char_store_release_write)
+#  define AO_char_store_release_write(addr, val) \
+        AO_char_store_release(addr,val)
+#  define AO_HAVE_char_store_release_write
+#endif
+
+#if defined(AO_HAVE_char_store_write) && !defined(AO_HAVE_char_store)
+#  define AO_char_store(addr, val) AO_char_store_write(addr,val)
+#  define AO_HAVE_char_store
+#endif
+
+#if defined(AO_HAVE_char_store) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_char_store_release)
+#  define AO_char_store_release(addr,val) \
+        (AO_nop_full(), AO_char_store(addr,val))
+#  define AO_HAVE_char_store_release
+#endif
+
+#if defined(AO_HAVE_nop_write) && defined(AO_HAVE_char_store) && \
+     !defined(AO_HAVE_char_store_write)
+#  define AO_char_store_write(addr, val) \
+        (AO_nop_write(), AO_char_store(addr,val))
+#  define AO_HAVE_char_store_write
+#endif
+
+#if defined(AO_HAVE_char_store_write) && \
+     !defined(AO_HAVE_char_store_release_write)
+#  define AO_char_store_release_write(addr, val) AO_char_store_write(addr,val)
+#  define AO_HAVE_char_store_release_write
+#endif
+
+#if defined(AO_HAVE_char_store_release) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_char_store_full)
+#  define AO_char_store_full(addr, val) \
+        (AO_char_store_release(addr, val), AO_nop_full())
+#  define AO_HAVE_char_store_full
+#endif
+
+
+/* char_fetch_and_add */
+#if defined(AO_HAVE_char_compare_and_swap_full) && \
+    !defined(AO_HAVE_char_fetch_and_add_full)
+   AO_INLINE AO_t
+   AO_char_fetch_and_add_full(volatile unsigned char *addr,
+                               unsigned char incr)
+   {
+     unsigned char old;
+     do
+       {
+         old = *addr;
+       }
+     while (!AO_char_compare_and_swap_full(addr, old, old+incr));
+     return old;
+   }
+#  define AO_HAVE_char_fetch_and_add_full
+#endif
+
+#if defined(AO_HAVE_char_compare_and_swap_acquire) && \
+    !defined(AO_HAVE_char_fetch_and_add_acquire)
+   AO_INLINE AO_t
+   AO_char_fetch_and_add_acquire(volatile unsigned char *addr,
+                                  unsigned char incr)
+   {
+     unsigned char old;
+     do
+       {
+         old = *addr;
+       }
+     while (!AO_char_compare_and_swap_acquire(addr, old, old+incr));
+     return old;
+   }
+#  define AO_HAVE_char_fetch_and_add_acquire
+#endif
+
+#if defined(AO_HAVE_char_compare_and_swap_release) && \
+    !defined(AO_HAVE_char_fetch_and_add_release)
+   AO_INLINE AO_t
+   AO_char_fetch_and_add_release(volatile unsigned char *addr,
+                                  unsigned char incr)
+   {
+     unsigned char old;
+     do
+       {
+         old = *addr;
+       }
+     while (!AO_char_compare_and_swap_release(addr, old, old+incr));
+     return old;
+   }
+#  define AO_HAVE_char_fetch_and_add_release
+#endif
+
+#if defined(AO_HAVE_char_fetch_and_add_full)
+#  if !defined(AO_HAVE_char_fetch_and_add_release)
+#    define AO_char_fetch_and_add_release(addr, val) \
+         AO_char_fetch_and_add_full(addr, val)
+#    define AO_HAVE_char_fetch_and_add_release
+#  endif
+#  if !defined(AO_HAVE_char_fetch_and_add_acquire)
+#    define AO_char_fetch_and_add_acquire(addr, val) \
+         AO_char_fetch_and_add_full(addr, val)
+#    define AO_HAVE_char_fetch_and_add_acquire
+#  endif
+#  if !defined(AO_HAVE_char_fetch_and_add_write)
+#    define AO_char_fetch_and_add_write(addr, val) \
+         AO_char_fetch_and_add_full(addr, val)
+#    define AO_HAVE_char_fetch_and_add_write
+#  endif
+#  if !defined(AO_HAVE_char_fetch_and_add_read)
+#    define AO_char_fetch_and_add_read(addr, val) \
+         AO_char_fetch_and_add_full(addr, val)
+#    define AO_HAVE_char_fetch_and_add_read
+#  endif
+#endif /* AO_HAVE_char_fetch_and_add_full */
+
+#if !defined(AO_HAVE_char_fetch_and_add) && \
+    defined(AO_HAVE_char_fetch_and_add_release)
+#  define AO_char_fetch_and_add(addr, val) \
+        AO_char_fetch_and_add_release(addr, val)
+#  define AO_HAVE_char_fetch_and_add
+#endif
+#if !defined(AO_HAVE_char_fetch_and_add) && \
+    defined(AO_HAVE_char_fetch_and_add_acquire)
+#  define AO_char_fetch_and_add(addr, val) \
+        AO_char_fetch_and_add_acquire(addr, val)
+#  define AO_HAVE_char_fetch_and_add
+#endif
+#if !defined(AO_HAVE_char_fetch_and_add) && \
+    defined(AO_HAVE_char_fetch_and_add_write)
+#  define AO_char_fetch_and_add(addr, val) \
+        AO_char_fetch_and_add_write(addr, val)
+#  define AO_HAVE_char_fetch_and_add
+#endif
+#if !defined(AO_HAVE_char_fetch_and_add) && \
+    defined(AO_HAVE_char_fetch_and_add_read)
+#  define AO_char_fetch_and_add(addr, val) \
+        AO_char_fetch_and_add_read(addr, val)
+#  define AO_HAVE_char_fetch_and_add
+#endif
+
+#if defined(AO_HAVE_char_fetch_and_add_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_char_fetch_and_add_full)
+#  define AO_char_fetch_and_add_full(addr, val) \
+        (AO_nop_full(), AO_char_fetch_and_add_acquire(addr, val))
+#endif
+
+#if !defined(AO_HAVE_char_fetch_and_add_release_write) && \
+    defined(AO_HAVE_char_fetch_and_add_write)
+#  define AO_char_fetch_and_add_release_write(addr, val) \
+        AO_char_fetch_and_add_write(addr, val)
+#  define AO_HAVE_char_fetch_and_add_release_write
+#endif
+#if !defined(AO_HAVE_char_fetch_and_add_release_write) && \
+    defined(AO_HAVE_char_fetch_and_add_release)
+#  define AO_char_fetch_and_add_release_write(addr, val) \
+        AO_char_fetch_and_add_release(addr, val)
+#  define AO_HAVE_char_fetch_and_add_release_write
+#endif
+#if !defined(AO_HAVE_char_fetch_and_add_acquire_read) && \
+    defined(AO_HAVE_char_fetch_and_add_read)
+#  define AO_char_fetch_and_add_acquire_read(addr, val) \
+        AO_char_fetch_and_add_read(addr, val)
+#  define AO_HAVE_char_fetch_and_add_acquire_read
+#endif
+#if !defined(AO_HAVE_char_fetch_and_add_acquire_read) && \
+    defined(AO_HAVE_char_fetch_and_add_acquire)
+#  define AO_char_fetch_and_add_acquire_read(addr, val) \
+        AO_char_fetch_and_add_acquire(addr, val)
+#  define AO_HAVE_char_fetch_and_add_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_char_fetch_and_add_acquire_read)
+#    define AO_char_fetch_and_add_dd_acquire_read(addr, val) \
+        AO_char_fetch_and_add_acquire_read(addr, val)
+#    define AO_HAVE_char_fetch_and_add_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_char_fetch_and_add)
+#    define AO_char_fetch_and_add_dd_acquire_read(addr, val) \
+        AO_char_fetch_and_add(addr, val)
+#    define AO_HAVE_char_fetch_and_add_dd_acquire_read
+#  endif
+#endif
+
+/* char_fetch_and_add1 */
+
+#if defined(AO_HAVE_char_fetch_and_add_full) &&\
+    !defined(AO_HAVE_char_fetch_and_add1_full)
+#  define AO_char_fetch_and_add1_full(addr) \
+        AO_char_fetch_and_add_full(addr,1)
+#  define AO_HAVE_char_fetch_and_add1_full
+#endif
+#if defined(AO_HAVE_char_fetch_and_add_release) &&\
+    !defined(AO_HAVE_char_fetch_and_add1_release)
+#  define AO_char_fetch_and_add1_release(addr) \
+        AO_char_fetch_and_add_release(addr,1)
+#  define AO_HAVE_char_fetch_and_add1_release
+#endif
+#if defined(AO_HAVE_char_fetch_and_add_acquire) &&\
+    !defined(AO_HAVE_char_fetch_and_add1_acquire)
+#  define AO_char_fetch_and_add1_acquire(addr) \
+        AO_char_fetch_and_add_acquire(addr,1)
+#  define AO_HAVE_char_fetch_and_add1_acquire
+#endif
+#if defined(AO_HAVE_char_fetch_and_add_write) &&\
+    !defined(AO_HAVE_char_fetch_and_add1_write)
+#  define AO_char_fetch_and_add1_write(addr) \
+        AO_char_fetch_and_add_write(addr,1)
+#  define AO_HAVE_char_fetch_and_add1_write
+#endif
+#if defined(AO_HAVE_char_fetch_and_add_read) &&\
+    !defined(AO_HAVE_char_fetch_and_add1_read)
+#  define AO_char_fetch_and_add1_read(addr) \
+        AO_char_fetch_and_add_read(addr,1)
+#  define AO_HAVE_char_fetch_and_add1_read
+#endif
+#if defined(AO_HAVE_char_fetch_and_add_release_write) &&\
+    !defined(AO_HAVE_char_fetch_and_add1_release_write)
+#  define AO_char_fetch_and_add1_release_write(addr) \
+        AO_char_fetch_and_add_release_write(addr,1)
+#  define AO_HAVE_char_fetch_and_add1_release_write
+#endif
+#if defined(AO_HAVE_char_fetch_and_add_acquire_read) &&\
+    !defined(AO_HAVE_char_fetch_and_add1_acquire_read)
+#  define AO_char_fetch_and_add1_acquire_read(addr) \
+        AO_char_fetch_and_add_acquire_read(addr,1)
+#  define AO_HAVE_char_fetch_and_add1_acquire_read
+#endif
+#if defined(AO_HAVE_char_fetch_and_add) &&\
+    !defined(AO_HAVE_char_fetch_and_add1)
+#  define AO_char_fetch_and_add1(addr) \
+        AO_char_fetch_and_add(addr,1)
+#  define AO_HAVE_char_fetch_and_add1
+#endif
+
+#if defined(AO_HAVE_char_fetch_and_add1_full)
+#  if !defined(AO_HAVE_char_fetch_and_add1_release)
+#    define AO_char_fetch_and_add1_release(addr) \
+         AO_char_fetch_and_add1_full(addr)
+#    define AO_HAVE_char_fetch_and_add1_release
+#  endif
+#  if !defined(AO_HAVE_char_fetch_and_add1_acquire)
+#    define AO_char_fetch_and_add1_acquire(addr) \
+         AO_char_fetch_and_add1_full(addr)
+#    define AO_HAVE_char_fetch_and_add1_acquire
+#  endif
+#  if !defined(AO_HAVE_char_fetch_and_add1_write)
+#    define AO_char_fetch_and_add1_write(addr) \
+         AO_char_fetch_and_add1_full(addr)
+#    define AO_HAVE_char_fetch_and_add1_write
+#  endif
+#  if !defined(AO_HAVE_char_fetch_and_add1_read)
+#    define AO_char_fetch_and_add1_read(addr) \
+         AO_char_fetch_and_add1_full(addr)
+#    define AO_HAVE_char_fetch_and_add1_read
+#  endif
+#endif /* AO_HAVE_char_fetch_and_add1_full */
+
+#if !defined(AO_HAVE_char_fetch_and_add1) && \
+    defined(AO_HAVE_char_fetch_and_add1_release)
+#  define AO_char_fetch_and_add1(addr) \
+        AO_char_fetch_and_add1_release(addr)
+#  define AO_HAVE_char_fetch_and_add1
+#endif
+#if !defined(AO_HAVE_char_fetch_and_add1) && \
+    defined(AO_HAVE_char_fetch_and_add1_acquire)
+#  define AO_char_fetch_and_add1(addr) \
+        AO_char_fetch_and_add1_acquire(addr)
+#  define AO_HAVE_char_fetch_and_add1
+#endif
+#if !defined(AO_HAVE_char_fetch_and_add1) && \
+    defined(AO_HAVE_char_fetch_and_add1_write)
+#  define AO_char_fetch_and_add1(addr) \
+        AO_char_fetch_and_add1_write(addr)
+#  define AO_HAVE_char_fetch_and_add1
+#endif
+#if !defined(AO_HAVE_char_fetch_and_add1) && \
+    defined(AO_HAVE_char_fetch_and_add1_read)
+#  define AO_char_fetch_and_add1(addr) \
+        AO_char_fetch_and_add1_read(addr)
+#  define AO_HAVE_char_fetch_and_add1
+#endif
+
+#if defined(AO_HAVE_char_fetch_and_add1_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_char_fetch_and_add1_full)
+#  define AO_char_fetch_and_add1_full(addr) \
+        (AO_nop_full(), AO_char_fetch_and_add1_acquire(addr))
+#  define AO_HAVE_char_fetch_and_add1_full
+#endif
+
+#if !defined(AO_HAVE_char_fetch_and_add1_release_write) && \
+    defined(AO_HAVE_char_fetch_and_add1_write)
+#  define AO_char_fetch_and_add1_release_write(addr) \
+        AO_char_fetch_and_add1_write(addr)
+#  define AO_HAVE_char_fetch_and_add1_release_write
+#endif
+#if !defined(AO_HAVE_char_fetch_and_add1_release_write) && \
+    defined(AO_HAVE_char_fetch_and_add1_release)
+#  define AO_char_fetch_and_add1_release_write(addr) \
+        AO_char_fetch_and_add1_release(addr)
+#  define AO_HAVE_char_fetch_and_add1_release_write
+#endif
+#if !defined(AO_HAVE_char_fetch_and_add1_acquire_read) && \
+    defined(AO_HAVE_char_fetch_and_add1_read)
+#  define AO_char_fetch_and_add1_acquire_read(addr) \
+        AO_char_fetch_and_add1_read(addr)
+#  define AO_HAVE_char_fetch_and_add1_acquire_read
+#endif
+#if !defined(AO_HAVE_char_fetch_and_add1_acquire_read) && \
+    defined(AO_HAVE_char_fetch_and_add1_acquire)
+#  define AO_char_fetch_and_add1_acquire_read(addr) \
+        AO_char_fetch_and_add1_acquire(addr)
+#  define AO_HAVE_char_fetch_and_add1_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_char_fetch_and_add1_acquire_read)
+#    define AO_char_fetch_and_add1_dd_acquire_read(addr) \
+        AO_char_fetch_and_add1_acquire_read(addr)
+#    define AO_HAVE_char_fetch_and_add1_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_char_fetch_and_add1)
+#    define AO_char_fetch_and_add1_dd_acquire_read(addr) \
+        AO_char_fetch_and_add1(addr)
+#    define AO_HAVE_char_fetch_and_add1_dd_acquire_read
+#  endif
+#endif
+
+/* char_fetch_and_sub1 */
+
+#if defined(AO_HAVE_char_fetch_and_add_full) &&\
+    !defined(AO_HAVE_char_fetch_and_sub1_full)
+#  define AO_char_fetch_and_sub1_full(addr) \
+        AO_char_fetch_and_add_full(addr,(unsigned char)(-1))
+#  define AO_HAVE_char_fetch_and_sub1_full
+#endif
+#if defined(AO_HAVE_char_fetch_and_add_release) &&\
+    !defined(AO_HAVE_char_fetch_and_sub1_release)
+#  define AO_char_fetch_and_sub1_release(addr) \
+        AO_char_fetch_and_add_release(addr,(unsigned char)(-1))
+#  define AO_HAVE_char_fetch_and_sub1_release
+#endif
+#if defined(AO_HAVE_char_fetch_and_add_acquire) &&\
+    !defined(AO_HAVE_char_fetch_and_sub1_acquire)
+#  define AO_char_fetch_and_sub1_acquire(addr) \
+        AO_char_fetch_and_add_acquire(addr,(unsigned char)(-1))
+#  define AO_HAVE_char_fetch_and_sub1_acquire
+#endif
+#if defined(AO_HAVE_char_fetch_and_add_write) &&\
+    !defined(AO_HAVE_char_fetch_and_sub1_write)
+#  define AO_char_fetch_and_sub1_write(addr) \
+        AO_char_fetch_and_add_write(addr,(unsigned char)(-1))
+#  define AO_HAVE_char_fetch_and_sub1_write
+#endif
+#if defined(AO_HAVE_char_fetch_and_add_read) &&\
+    !defined(AO_HAVE_char_fetch_and_sub1_read)
+#  define AO_char_fetch_and_sub1_read(addr) \
+        AO_char_fetch_and_add_read(addr,(unsigned char)(-1))
+#  define AO_HAVE_char_fetch_and_sub1_read
+#endif
+#if defined(AO_HAVE_char_fetch_and_add_release_write) &&\
+    !defined(AO_HAVE_char_fetch_and_sub1_release_write)
+#  define AO_char_fetch_and_sub1_release_write(addr) \
+        AO_char_fetch_and_add_release_write(addr,(unsigned char)(-1))
+#  define AO_HAVE_char_fetch_and_sub1_release_write
+#endif
+#if defined(AO_HAVE_char_fetch_and_add_acquire_read) &&\
+    !defined(AO_HAVE_char_fetch_and_sub1_acquire_read)
+#  define AO_char_fetch_and_sub1_acquire_read(addr) \
+        AO_char_fetch_and_add_acquire_read(addr,(unsigned char)(-1))
+#  define AO_HAVE_char_fetch_and_sub1_acquire_read
+#endif
+#if defined(AO_HAVE_char_fetch_and_add) &&\
+    !defined(AO_HAVE_char_fetch_and_sub1)
+#  define AO_char_fetch_and_sub1(addr) \
+        AO_char_fetch_and_add(addr,(unsigned char)(-1))
+#  define AO_HAVE_char_fetch_and_sub1
+#endif
+
+#if defined(AO_HAVE_char_fetch_and_sub1_full)
+#  if !defined(AO_HAVE_char_fetch_and_sub1_release)
+#    define AO_char_fetch_and_sub1_release(addr) \
+         AO_char_fetch_and_sub1_full(addr)
+#    define AO_HAVE_char_fetch_and_sub1_release
+#  endif
+#  if !defined(AO_HAVE_char_fetch_and_sub1_acquire)
+#    define AO_char_fetch_and_sub1_acquire(addr) \
+         AO_char_fetch_and_sub1_full(addr)
+#    define AO_HAVE_char_fetch_and_sub1_acquire
+#  endif
+#  if !defined(AO_HAVE_char_fetch_and_sub1_write)
+#    define AO_char_fetch_and_sub1_write(addr) \
+         AO_char_fetch_and_sub1_full(addr)
+#    define AO_HAVE_char_fetch_and_sub1_write
+#  endif
+#  if !defined(AO_HAVE_char_fetch_and_sub1_read)
+#    define AO_char_fetch_and_sub1_read(addr) \
+         AO_char_fetch_and_sub1_full(addr)
+#    define AO_HAVE_char_fetch_and_sub1_read
+#  endif
+#endif /* AO_HAVE_char_fetch_and_sub1_full */
+
+#if !defined(AO_HAVE_char_fetch_and_sub1) && \
+    defined(AO_HAVE_char_fetch_and_sub1_release)
+#  define AO_char_fetch_and_sub1(addr) \
+        AO_char_fetch_and_sub1_release(addr)
+#  define AO_HAVE_char_fetch_and_sub1
+#endif
+#if !defined(AO_HAVE_char_fetch_and_sub1) && \
+    defined(AO_HAVE_char_fetch_and_sub1_acquire)
+#  define AO_char_fetch_and_sub1(addr) \
+        AO_char_fetch_and_sub1_acquire(addr)
+#  define AO_HAVE_char_fetch_and_sub1
+#endif
+#if !defined(AO_HAVE_char_fetch_and_sub1) && \
+    defined(AO_HAVE_char_fetch_and_sub1_write)
+#  define AO_char_fetch_and_sub1(addr) \
+        AO_char_fetch_and_sub1_write(addr)
+#  define AO_HAVE_char_fetch_and_sub1
+#endif
+#if !defined(AO_HAVE_char_fetch_and_sub1) && \
+    defined(AO_HAVE_char_fetch_and_sub1_read)
+#  define AO_char_fetch_and_sub1(addr) \
+        AO_char_fetch_and_sub1_read(addr)
+#  define AO_HAVE_char_fetch_and_sub1
+#endif
+
+#if defined(AO_HAVE_char_fetch_and_sub1_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_char_fetch_and_sub1_full)
+#  define AO_char_fetch_and_sub1_full(addr) \
+        (AO_nop_full(), AO_char_fetch_and_sub1_acquire(addr))
+#  define AO_HAVE_char_fetch_and_sub1_full
+#endif
+
+#if !defined(AO_HAVE_char_fetch_and_sub1_release_write) && \
+    defined(AO_HAVE_char_fetch_and_sub1_write)
+#  define AO_char_fetch_and_sub1_release_write(addr) \
+        AO_char_fetch_and_sub1_write(addr)
+#  define AO_HAVE_char_fetch_and_sub1_release_write
+#endif
+#if !defined(AO_HAVE_char_fetch_and_sub1_release_write) && \
+    defined(AO_HAVE_char_fetch_and_sub1_release)
+#  define AO_char_fetch_and_sub1_release_write(addr) \
+        AO_char_fetch_and_sub1_release(addr)
+#  define AO_HAVE_char_fetch_and_sub1_release_write
+#endif
+#if !defined(AO_HAVE_char_fetch_and_sub1_acquire_read) && \
+    defined(AO_HAVE_char_fetch_and_sub1_read)
+#  define AO_char_fetch_and_sub1_acquire_read(addr) \
+        AO_char_fetch_and_sub1_read(addr)
+#  define AO_HAVE_char_fetch_and_sub1_acquire_read
+#endif
+#if !defined(AO_HAVE_char_fetch_and_sub1_acquire_read) && \
+    defined(AO_HAVE_char_fetch_and_sub1_acquire)
+#  define AO_char_fetch_and_sub1_acquire_read(addr) \
+        AO_char_fetch_and_sub1_acquire(addr)
+#  define AO_HAVE_char_fetch_and_sub1_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_char_fetch_and_sub1_acquire_read)
+#    define AO_char_fetch_and_sub1_dd_acquire_read(addr) \
+        AO_char_fetch_and_sub1_acquire_read(addr)
+#    define AO_HAVE_char_fetch_and_sub1_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_char_fetch_and_sub1)
+#    define AO_char_fetch_and_sub1_dd_acquire_read(addr) \
+        AO_char_fetch_and_sub1(addr)
+#    define AO_HAVE_char_fetch_and_sub1_dd_acquire_read
+#  endif
+#endif
+
+/* short_load */
+#if defined(AO_HAVE_short_load_acquire) && !defined(AO_HAVE_short_load)
+#  define AO_short_load(addr) AO_short_load_acquire(addr)
+#  define AO_HAVE_short_load
+#endif
+
+#if defined(AO_HAVE_short_load_full) && !defined(AO_HAVE_short_load_acquire)
+#  define AO_short_load_acquire(addr) AO_short_load_full(addr)
+#  define AO_HAVE_short_load_acquire
+#endif
+
+#if defined(AO_HAVE_short_load_full) && !defined(AO_HAVE_short_load_read)
+#  define AO_short_load_read(addr) AO_short_load_full(addr)
+#  define AO_HAVE_short_load_read
+#endif
+
+#if !defined(AO_HAVE_short_load_acquire_read) && defined(AO_HAVE_short_load_acquire)
+#  define AO_short_load_acquire_read(addr) AO_short_load_acquire(addr)
+#  define AO_HAVE_short_load_acquire_read
+#endif
+
+#if defined(AO_HAVE_short_load) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_short_load_acquire)
+   AO_INLINE unsigned short
+   AO_short_load_acquire(const volatile unsigned short *addr)
+   {
+     unsigned short result = AO_short_load(addr);
+     /* Acquire barrier would be useless, since the load could be delayed  */
+     /* beyond it.                                                         */
+     AO_nop_full();
+     return result;
+   }
+#  define AO_HAVE_short_load_acquire
+#endif
+
+#if defined(AO_HAVE_short_load) && defined(AO_HAVE_nop_read) && \
+    !defined(AO_HAVE_short_load_read)
+   AO_INLINE unsigned short
+   AO_short_load_read(const volatile unsigned short *addr)
+   {
+     unsigned short result = AO_short_load(addr);
+     /* Acquire barrier would be useless, since the load could be delayed  */
+     /* beyond it.                                                         */
+     AO_nop_read();
+     return result;
+   }
+#  define AO_HAVE_short_load_read
+#endif
+
+#if defined(AO_HAVE_short_load_acquire) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_short_load_full)
+#  define AO_short_load_full(addr) (AO_nop_full(), AO_short_load_acquire(addr))
+#  define AO_HAVE_short_load_full
+#endif
+
+#if !defined(AO_HAVE_short_load_acquire_read) && defined(AO_HAVE_short_load_read)
+#  define AO_short_load_acquire_read(addr) AO_short_load_read(addr)
+#  define AO_HAVE_short_load_acquire_read
+#endif
+
+#if defined(AO_HAVE_short_load_acquire_read) && !defined(AO_HAVE_short_load)
+#  define AO_short_load(addr) AO_short_load_acquire_read(addr)
+#  define AO_HAVE_short_load
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_short_load_acquire_read)
+#    define AO_short_load_dd_acquire_read(addr) \
+        AO_short_load_acquire_read(addr)
+#    define AO_HAVE_short_load_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_short_load)
+#    define AO_short_load_dd_acquire_read(addr) \
+        AO_short_load(addr)
+#    define AO_HAVE_short_load_dd_acquire_read
+#  endif
+#endif
+
+
+/* short_store */
+
+#if defined(AO_HAVE_short_store_release) && !defined(AO_HAVE_short_store)
+#  define AO_short_store(addr, val) AO_short_store_release(addr,val)
+#  define AO_HAVE_short_store
+#endif
+
+#if defined(AO_HAVE_short_store_full) && !defined(AO_HAVE_short_store_release)
+#  define AO_short_store_release(addr,val) AO_short_store_full(addr,val)
+#  define AO_HAVE_short_store_release
+#endif
+
+#if defined(AO_HAVE_short_store_full) && !defined(AO_HAVE_short_store_write)
+#  define AO_short_store_write(addr,val) AO_short_store_full(addr,val)
+#  define AO_HAVE_short_store_write
+#endif
+
+#if defined(AO_HAVE_short_store_release) && \
+        !defined(AO_HAVE_short_store_release_write)
+#  define AO_short_store_release_write(addr, val) \
+        AO_short_store_release(addr,val)
+#  define AO_HAVE_short_store_release_write
+#endif
+
+#if defined(AO_HAVE_short_store_write) && !defined(AO_HAVE_short_store)
+#  define AO_short_store(addr, val) AO_short_store_write(addr,val)
+#  define AO_HAVE_short_store
+#endif
+
+#if defined(AO_HAVE_short_store) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_short_store_release)
+#  define AO_short_store_release(addr,val) \
+        (AO_nop_full(), AO_short_store(addr,val))
+#  define AO_HAVE_short_store_release
+#endif
+
+#if defined(AO_HAVE_nop_write) && defined(AO_HAVE_short_store) && \
+     !defined(AO_HAVE_short_store_write)
+#  define AO_short_store_write(addr, val) \
+        (AO_nop_write(), AO_short_store(addr,val))
+#  define AO_HAVE_short_store_write
+#endif
+
+#if defined(AO_HAVE_short_store_write) && \
+     !defined(AO_HAVE_short_store_release_write)
+#  define AO_short_store_release_write(addr, val) AO_short_store_write(addr,val)
+#  define AO_HAVE_short_store_release_write
+#endif
+
+#if defined(AO_HAVE_short_store_release) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_short_store_full)
+#  define AO_short_store_full(addr, val) \
+        (AO_short_store_release(addr, val), AO_nop_full())
+#  define AO_HAVE_short_store_full
+#endif
+
+
+/* short_fetch_and_add */
+#if defined(AO_HAVE_short_compare_and_swap_full) && \
+    !defined(AO_HAVE_short_fetch_and_add_full)
+   AO_INLINE AO_t
+   AO_short_fetch_and_add_full(volatile unsigned short *addr,
+                               unsigned short incr)
+   {
+     unsigned short old;
+     do
+       {
+         old = *addr;
+       }
+     while (!AO_short_compare_and_swap_full(addr, old, old+incr));
+     return old;
+   }
+#  define AO_HAVE_short_fetch_and_add_full
+#endif
+
+#if defined(AO_HAVE_short_compare_and_swap_acquire) && \
+    !defined(AO_HAVE_short_fetch_and_add_acquire)
+   AO_INLINE AO_t
+   AO_short_fetch_and_add_acquire(volatile unsigned short *addr,
+                                  unsigned short incr)
+   {
+     unsigned short old;
+     do
+       {
+         old = *addr;
+       }
+     while (!AO_short_compare_and_swap_acquire(addr, old, old+incr));
+     return old;
+   }
+#  define AO_HAVE_short_fetch_and_add_acquire
+#endif
+
+#if defined(AO_HAVE_short_compare_and_swap_release) && \
+    !defined(AO_HAVE_short_fetch_and_add_release)
+   AO_INLINE AO_t
+   AO_short_fetch_and_add_release(volatile unsigned short *addr,
+                                  unsigned short incr)
+   {
+     unsigned short old;
+     do
+       {
+         old = *addr;
+       }
+     while (!AO_short_compare_and_swap_release(addr, old, old+incr));
+     return old;
+   }
+#  define AO_HAVE_short_fetch_and_add_release
+#endif
+
+#if defined(AO_HAVE_short_fetch_and_add_full)
+#  if !defined(AO_HAVE_short_fetch_and_add_release)
+#    define AO_short_fetch_and_add_release(addr, val) \
+         AO_short_fetch_and_add_full(addr, val)
+#    define AO_HAVE_short_fetch_and_add_release
+#  endif
+#  if !defined(AO_HAVE_short_fetch_and_add_acquire)
+#    define AO_short_fetch_and_add_acquire(addr, val) \
+         AO_short_fetch_and_add_full(addr, val)
+#    define AO_HAVE_short_fetch_and_add_acquire
+#  endif
+#  if !defined(AO_HAVE_short_fetch_and_add_write)
+#    define AO_short_fetch_and_add_write(addr, val) \
+         AO_short_fetch_and_add_full(addr, val)
+#    define AO_HAVE_short_fetch_and_add_write
+#  endif
+#  if !defined(AO_HAVE_short_fetch_and_add_read)
+#    define AO_short_fetch_and_add_read(addr, val) \
+         AO_short_fetch_and_add_full(addr, val)
+#    define AO_HAVE_short_fetch_and_add_read
+#  endif
+#endif /* AO_HAVE_short_fetch_and_add_full */
+
+#if !defined(AO_HAVE_short_fetch_and_add) && \
+    defined(AO_HAVE_short_fetch_and_add_release)
+#  define AO_short_fetch_and_add(addr, val) \
+        AO_short_fetch_and_add_release(addr, val)
+#  define AO_HAVE_short_fetch_and_add
+#endif
+#if !defined(AO_HAVE_short_fetch_and_add) && \
+    defined(AO_HAVE_short_fetch_and_add_acquire)
+#  define AO_short_fetch_and_add(addr, val) \
+        AO_short_fetch_and_add_acquire(addr, val)
+#  define AO_HAVE_short_fetch_and_add
+#endif
+#if !defined(AO_HAVE_short_fetch_and_add) && \
+    defined(AO_HAVE_short_fetch_and_add_write)
+#  define AO_short_fetch_and_add(addr, val) \
+        AO_short_fetch_and_add_write(addr, val)
+#  define AO_HAVE_short_fetch_and_add
+#endif
+#if !defined(AO_HAVE_short_fetch_and_add) && \
+    defined(AO_HAVE_short_fetch_and_add_read)
+#  define AO_short_fetch_and_add(addr, val) \
+        AO_short_fetch_and_add_read(addr, val)
+#  define AO_HAVE_short_fetch_and_add
+#endif
+
+#if defined(AO_HAVE_short_fetch_and_add_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_short_fetch_and_add_full)
+#  define AO_short_fetch_and_add_full(addr, val) \
+        (AO_nop_full(), AO_short_fetch_and_add_acquire(addr, val))
+#endif
+
+#if !defined(AO_HAVE_short_fetch_and_add_release_write) && \
+    defined(AO_HAVE_short_fetch_and_add_write)
+#  define AO_short_fetch_and_add_release_write(addr, val) \
+        AO_short_fetch_and_add_write(addr, val)
+#  define AO_HAVE_short_fetch_and_add_release_write
+#endif
+#if !defined(AO_HAVE_short_fetch_and_add_release_write) && \
+    defined(AO_HAVE_short_fetch_and_add_release)
+#  define AO_short_fetch_and_add_release_write(addr, val) \
+        AO_short_fetch_and_add_release(addr, val)
+#  define AO_HAVE_short_fetch_and_add_release_write
+#endif
+#if !defined(AO_HAVE_short_fetch_and_add_acquire_read) && \
+    defined(AO_HAVE_short_fetch_and_add_read)
+#  define AO_short_fetch_and_add_acquire_read(addr, val) \
+        AO_short_fetch_and_add_read(addr, val)
+#  define AO_HAVE_short_fetch_and_add_acquire_read
+#endif
+#if !defined(AO_HAVE_short_fetch_and_add_acquire_read) && \
+    defined(AO_HAVE_short_fetch_and_add_acquire)
+#  define AO_short_fetch_and_add_acquire_read(addr, val) \
+        AO_short_fetch_and_add_acquire(addr, val)
+#  define AO_HAVE_short_fetch_and_add_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_short_fetch_and_add_acquire_read)
+#    define AO_short_fetch_and_add_dd_acquire_read(addr, val) \
+        AO_short_fetch_and_add_acquire_read(addr, val)
+#    define AO_HAVE_short_fetch_and_add_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_short_fetch_and_add)
+#    define AO_short_fetch_and_add_dd_acquire_read(addr, val) \
+        AO_short_fetch_and_add(addr, val)
+#    define AO_HAVE_short_fetch_and_add_dd_acquire_read
+#  endif
+#endif
+
+/* short_fetch_and_add1 */
+
+#if defined(AO_HAVE_short_fetch_and_add_full) &&\
+    !defined(AO_HAVE_short_fetch_and_add1_full)
+#  define AO_short_fetch_and_add1_full(addr) \
+        AO_short_fetch_and_add_full(addr,1)
+#  define AO_HAVE_short_fetch_and_add1_full
+#endif
+#if defined(AO_HAVE_short_fetch_and_add_release) &&\
+    !defined(AO_HAVE_short_fetch_and_add1_release)
+#  define AO_short_fetch_and_add1_release(addr) \
+        AO_short_fetch_and_add_release(addr,1)
+#  define AO_HAVE_short_fetch_and_add1_release
+#endif
+#if defined(AO_HAVE_short_fetch_and_add_acquire) &&\
+    !defined(AO_HAVE_short_fetch_and_add1_acquire)
+#  define AO_short_fetch_and_add1_acquire(addr) \
+        AO_short_fetch_and_add_acquire(addr,1)
+#  define AO_HAVE_short_fetch_and_add1_acquire
+#endif
+#if defined(AO_HAVE_short_fetch_and_add_write) &&\
+    !defined(AO_HAVE_short_fetch_and_add1_write)
+#  define AO_short_fetch_and_add1_write(addr) \
+        AO_short_fetch_and_add_write(addr,1)
+#  define AO_HAVE_short_fetch_and_add1_write
+#endif
+#if defined(AO_HAVE_short_fetch_and_add_read) &&\
+    !defined(AO_HAVE_short_fetch_and_add1_read)
+#  define AO_short_fetch_and_add1_read(addr) \
+        AO_short_fetch_and_add_read(addr,1)
+#  define AO_HAVE_short_fetch_and_add1_read
+#endif
+#if defined(AO_HAVE_short_fetch_and_add_release_write) &&\
+    !defined(AO_HAVE_short_fetch_and_add1_release_write)
+#  define AO_short_fetch_and_add1_release_write(addr) \
+        AO_short_fetch_and_add_release_write(addr,1)
+#  define AO_HAVE_short_fetch_and_add1_release_write
+#endif
+#if defined(AO_HAVE_short_fetch_and_add_acquire_read) &&\
+    !defined(AO_HAVE_short_fetch_and_add1_acquire_read)
+#  define AO_short_fetch_and_add1_acquire_read(addr) \
+        AO_short_fetch_and_add_acquire_read(addr,1)
+#  define AO_HAVE_short_fetch_and_add1_acquire_read
+#endif
+#if defined(AO_HAVE_short_fetch_and_add) &&\
+    !defined(AO_HAVE_short_fetch_and_add1)
+#  define AO_short_fetch_and_add1(addr) \
+        AO_short_fetch_and_add(addr,1)
+#  define AO_HAVE_short_fetch_and_add1
+#endif
+
+#if defined(AO_HAVE_short_fetch_and_add1_full)
+#  if !defined(AO_HAVE_short_fetch_and_add1_release)
+#    define AO_short_fetch_and_add1_release(addr) \
+         AO_short_fetch_and_add1_full(addr)
+#    define AO_HAVE_short_fetch_and_add1_release
+#  endif
+#  if !defined(AO_HAVE_short_fetch_and_add1_acquire)
+#    define AO_short_fetch_and_add1_acquire(addr) \
+         AO_short_fetch_and_add1_full(addr)
+#    define AO_HAVE_short_fetch_and_add1_acquire
+#  endif
+#  if !defined(AO_HAVE_short_fetch_and_add1_write)
+#    define AO_short_fetch_and_add1_write(addr) \
+         AO_short_fetch_and_add1_full(addr)
+#    define AO_HAVE_short_fetch_and_add1_write
+#  endif
+#  if !defined(AO_HAVE_short_fetch_and_add1_read)
+#    define AO_short_fetch_and_add1_read(addr) \
+         AO_short_fetch_and_add1_full(addr)
+#    define AO_HAVE_short_fetch_and_add1_read
+#  endif
+#endif /* AO_HAVE_short_fetch_and_add1_full */
+
+#if !defined(AO_HAVE_short_fetch_and_add1) && \
+    defined(AO_HAVE_short_fetch_and_add1_release)
+#  define AO_short_fetch_and_add1(addr) \
+        AO_short_fetch_and_add1_release(addr)
+#  define AO_HAVE_short_fetch_and_add1
+#endif
+#if !defined(AO_HAVE_short_fetch_and_add1) && \
+    defined(AO_HAVE_short_fetch_and_add1_acquire)
+#  define AO_short_fetch_and_add1(addr) \
+        AO_short_fetch_and_add1_acquire(addr)
+#  define AO_HAVE_short_fetch_and_add1
+#endif
+#if !defined(AO_HAVE_short_fetch_and_add1) && \
+    defined(AO_HAVE_short_fetch_and_add1_write)
+#  define AO_short_fetch_and_add1(addr) \
+        AO_short_fetch_and_add1_write(addr)
+#  define AO_HAVE_short_fetch_and_add1
+#endif
+#if !defined(AO_HAVE_short_fetch_and_add1) && \
+    defined(AO_HAVE_short_fetch_and_add1_read)
+#  define AO_short_fetch_and_add1(addr) \
+        AO_short_fetch_and_add1_read(addr)
+#  define AO_HAVE_short_fetch_and_add1
+#endif
+
+#if defined(AO_HAVE_short_fetch_and_add1_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_short_fetch_and_add1_full)
+#  define AO_short_fetch_and_add1_full(addr) \
+        (AO_nop_full(), AO_short_fetch_and_add1_acquire(addr))
+#  define AO_HAVE_short_fetch_and_add1_full
+#endif
+
+#if !defined(AO_HAVE_short_fetch_and_add1_release_write) && \
+    defined(AO_HAVE_short_fetch_and_add1_write)
+#  define AO_short_fetch_and_add1_release_write(addr) \
+        AO_short_fetch_and_add1_write(addr)
+#  define AO_HAVE_short_fetch_and_add1_release_write
+#endif
+#if !defined(AO_HAVE_short_fetch_and_add1_release_write) && \
+    defined(AO_HAVE_short_fetch_and_add1_release)
+#  define AO_short_fetch_and_add1_release_write(addr) \
+        AO_short_fetch_and_add1_release(addr)
+#  define AO_HAVE_short_fetch_and_add1_release_write
+#endif
+#if !defined(AO_HAVE_short_fetch_and_add1_acquire_read) && \
+    defined(AO_HAVE_short_fetch_and_add1_read)
+#  define AO_short_fetch_and_add1_acquire_read(addr) \
+        AO_short_fetch_and_add1_read(addr)
+#  define AO_HAVE_short_fetch_and_add1_acquire_read
+#endif
+#if !defined(AO_HAVE_short_fetch_and_add1_acquire_read) && \
+    defined(AO_HAVE_short_fetch_and_add1_acquire)
+#  define AO_short_fetch_and_add1_acquire_read(addr) \
+        AO_short_fetch_and_add1_acquire(addr)
+#  define AO_HAVE_short_fetch_and_add1_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_short_fetch_and_add1_acquire_read)
+#    define AO_short_fetch_and_add1_dd_acquire_read(addr) \
+        AO_short_fetch_and_add1_acquire_read(addr)
+#    define AO_HAVE_short_fetch_and_add1_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_short_fetch_and_add1)
+#    define AO_short_fetch_and_add1_dd_acquire_read(addr) \
+        AO_short_fetch_and_add1(addr)
+#    define AO_HAVE_short_fetch_and_add1_dd_acquire_read
+#  endif
+#endif
+
+/* short_fetch_and_sub1 */
+
+#if defined(AO_HAVE_short_fetch_and_add_full) &&\
+    !defined(AO_HAVE_short_fetch_and_sub1_full)
+#  define AO_short_fetch_and_sub1_full(addr) \
+        AO_short_fetch_and_add_full(addr,(unsigned short)(-1))
+#  define AO_HAVE_short_fetch_and_sub1_full
+#endif
+#if defined(AO_HAVE_short_fetch_and_add_release) &&\
+    !defined(AO_HAVE_short_fetch_and_sub1_release)
+#  define AO_short_fetch_and_sub1_release(addr) \
+        AO_short_fetch_and_add_release(addr,(unsigned short)(-1))
+#  define AO_HAVE_short_fetch_and_sub1_release
+#endif
+#if defined(AO_HAVE_short_fetch_and_add_acquire) &&\
+    !defined(AO_HAVE_short_fetch_and_sub1_acquire)
+#  define AO_short_fetch_and_sub1_acquire(addr) \
+        AO_short_fetch_and_add_acquire(addr,(unsigned short)(-1))
+#  define AO_HAVE_short_fetch_and_sub1_acquire
+#endif
+#if defined(AO_HAVE_short_fetch_and_add_write) &&\
+    !defined(AO_HAVE_short_fetch_and_sub1_write)
+#  define AO_short_fetch_and_sub1_write(addr) \
+        AO_short_fetch_and_add_write(addr,(unsigned short)(-1))
+#  define AO_HAVE_short_fetch_and_sub1_write
+#endif
+#if defined(AO_HAVE_short_fetch_and_add_read) &&\
+    !defined(AO_HAVE_short_fetch_and_sub1_read)
+#  define AO_short_fetch_and_sub1_read(addr) \
+        AO_short_fetch_and_add_read(addr,(unsigned short)(-1))
+#  define AO_HAVE_short_fetch_and_sub1_read
+#endif
+#if defined(AO_HAVE_short_fetch_and_add_release_write) &&\
+    !defined(AO_HAVE_short_fetch_and_sub1_release_write)
+#  define AO_short_fetch_and_sub1_release_write(addr) \
+        AO_short_fetch_and_add_release_write(addr,(unsigned short)(-1))
+#  define AO_HAVE_short_fetch_and_sub1_release_write
+#endif
+#if defined(AO_HAVE_short_fetch_and_add_acquire_read) &&\
+    !defined(AO_HAVE_short_fetch_and_sub1_acquire_read)
+#  define AO_short_fetch_and_sub1_acquire_read(addr) \
+        AO_short_fetch_and_add_acquire_read(addr,(unsigned short)(-1))
+#  define AO_HAVE_short_fetch_and_sub1_acquire_read
+#endif
+#if defined(AO_HAVE_short_fetch_and_add) &&\
+    !defined(AO_HAVE_short_fetch_and_sub1)
+#  define AO_short_fetch_and_sub1(addr) \
+        AO_short_fetch_and_add(addr,(unsigned short)(-1))
+#  define AO_HAVE_short_fetch_and_sub1
+#endif
+
+#if defined(AO_HAVE_short_fetch_and_sub1_full)
+#  if !defined(AO_HAVE_short_fetch_and_sub1_release)
+#    define AO_short_fetch_and_sub1_release(addr) \
+         AO_short_fetch_and_sub1_full(addr)
+#    define AO_HAVE_short_fetch_and_sub1_release
+#  endif
+#  if !defined(AO_HAVE_short_fetch_and_sub1_acquire)
+#    define AO_short_fetch_and_sub1_acquire(addr) \
+         AO_short_fetch_and_sub1_full(addr)
+#    define AO_HAVE_short_fetch_and_sub1_acquire
+#  endif
+#  if !defined(AO_HAVE_short_fetch_and_sub1_write)
+#    define AO_short_fetch_and_sub1_write(addr) \
+         AO_short_fetch_and_sub1_full(addr)
+#    define AO_HAVE_short_fetch_and_sub1_write
+#  endif
+#  if !defined(AO_HAVE_short_fetch_and_sub1_read)
+#    define AO_short_fetch_and_sub1_read(addr) \
+         AO_short_fetch_and_sub1_full(addr)
+#    define AO_HAVE_short_fetch_and_sub1_read
+#  endif
+#endif /* AO_HAVE_short_fetch_and_sub1_full */
+
+#if !defined(AO_HAVE_short_fetch_and_sub1) && \
+    defined(AO_HAVE_short_fetch_and_sub1_release)
+#  define AO_short_fetch_and_sub1(addr) \
+        AO_short_fetch_and_sub1_release(addr)
+#  define AO_HAVE_short_fetch_and_sub1
+#endif
+#if !defined(AO_HAVE_short_fetch_and_sub1) && \
+    defined(AO_HAVE_short_fetch_and_sub1_acquire)
+#  define AO_short_fetch_and_sub1(addr) \
+        AO_short_fetch_and_sub1_acquire(addr)
+#  define AO_HAVE_short_fetch_and_sub1
+#endif
+#if !defined(AO_HAVE_short_fetch_and_sub1) && \
+    defined(AO_HAVE_short_fetch_and_sub1_write)
+#  define AO_short_fetch_and_sub1(addr) \
+        AO_short_fetch_and_sub1_write(addr)
+#  define AO_HAVE_short_fetch_and_sub1
+#endif
+#if !defined(AO_HAVE_short_fetch_and_sub1) && \
+    defined(AO_HAVE_short_fetch_and_sub1_read)
+#  define AO_short_fetch_and_sub1(addr) \
+        AO_short_fetch_and_sub1_read(addr)
+#  define AO_HAVE_short_fetch_and_sub1
+#endif
+
+#if defined(AO_HAVE_short_fetch_and_sub1_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_short_fetch_and_sub1_full)
+#  define AO_short_fetch_and_sub1_full(addr) \
+        (AO_nop_full(), AO_short_fetch_and_sub1_acquire(addr))
+#  define AO_HAVE_short_fetch_and_sub1_full
+#endif
+
+#if !defined(AO_HAVE_short_fetch_and_sub1_release_write) && \
+    defined(AO_HAVE_short_fetch_and_sub1_write)
+#  define AO_short_fetch_and_sub1_release_write(addr) \
+        AO_short_fetch_and_sub1_write(addr)
+#  define AO_HAVE_short_fetch_and_sub1_release_write
+#endif
+#if !defined(AO_HAVE_short_fetch_and_sub1_release_write) && \
+    defined(AO_HAVE_short_fetch_and_sub1_release)
+#  define AO_short_fetch_and_sub1_release_write(addr) \
+        AO_short_fetch_and_sub1_release(addr)
+#  define AO_HAVE_short_fetch_and_sub1_release_write
+#endif
+#if !defined(AO_HAVE_short_fetch_and_sub1_acquire_read) && \
+    defined(AO_HAVE_short_fetch_and_sub1_read)
+#  define AO_short_fetch_and_sub1_acquire_read(addr) \
+        AO_short_fetch_and_sub1_read(addr)
+#  define AO_HAVE_short_fetch_and_sub1_acquire_read
+#endif
+#if !defined(AO_HAVE_short_fetch_and_sub1_acquire_read) && \
+    defined(AO_HAVE_short_fetch_and_sub1_acquire)
+#  define AO_short_fetch_and_sub1_acquire_read(addr) \
+        AO_short_fetch_and_sub1_acquire(addr)
+#  define AO_HAVE_short_fetch_and_sub1_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_short_fetch_and_sub1_acquire_read)
+#    define AO_short_fetch_and_sub1_dd_acquire_read(addr) \
+        AO_short_fetch_and_sub1_acquire_read(addr)
+#    define AO_HAVE_short_fetch_and_sub1_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_short_fetch_and_sub1)
+#    define AO_short_fetch_and_sub1_dd_acquire_read(addr) \
+        AO_short_fetch_and_sub1(addr)
+#    define AO_HAVE_short_fetch_and_sub1_dd_acquire_read
+#  endif
+#endif
+
+/* int_load */
+#if defined(AO_HAVE_int_load_acquire) && !defined(AO_HAVE_int_load)
+#  define AO_int_load(addr) AO_int_load_acquire(addr)
+#  define AO_HAVE_int_load
+#endif
+
+#if defined(AO_HAVE_int_load_full) && !defined(AO_HAVE_int_load_acquire)
+#  define AO_int_load_acquire(addr) AO_int_load_full(addr)
+#  define AO_HAVE_int_load_acquire
+#endif
+
+#if defined(AO_HAVE_int_load_full) && !defined(AO_HAVE_int_load_read)
+#  define AO_int_load_read(addr) AO_int_load_full(addr)
+#  define AO_HAVE_int_load_read
+#endif
+
+#if !defined(AO_HAVE_int_load_acquire_read) && defined(AO_HAVE_int_load_acquire)
+#  define AO_int_load_acquire_read(addr) AO_int_load_acquire(addr)
+#  define AO_HAVE_int_load_acquire_read
+#endif
+
+#if defined(AO_HAVE_int_load) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_int_load_acquire)
+   AO_INLINE unsigned int
+   AO_int_load_acquire(const volatile unsigned int *addr)
+   {
+     unsigned int result = AO_int_load(addr);
+     /* Acquire barrier would be useless, since the load could be delayed  */
+     /* beyond it.                                                         */
+     AO_nop_full();
+     return result;
+   }
+#  define AO_HAVE_int_load_acquire
+#endif
+
+#if defined(AO_HAVE_int_load) && defined(AO_HAVE_nop_read) && \
+    !defined(AO_HAVE_int_load_read)
+   AO_INLINE unsigned int
+   AO_int_load_read(const volatile unsigned int *addr)
+   {
+     unsigned int result = AO_int_load(addr);
+     /* Acquire barrier would be useless, since the load could be delayed  */
+     /* beyond it.                                                         */
+     AO_nop_read();
+     return result;
+   }
+#  define AO_HAVE_int_load_read
+#endif
+
+#if defined(AO_HAVE_int_load_acquire) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_int_load_full)
+#  define AO_int_load_full(addr) (AO_nop_full(), AO_int_load_acquire(addr))
+#  define AO_HAVE_int_load_full
+#endif
+
+#if !defined(AO_HAVE_int_load_acquire_read) && defined(AO_HAVE_int_load_read)
+#  define AO_int_load_acquire_read(addr) AO_int_load_read(addr)
+#  define AO_HAVE_int_load_acquire_read
+#endif
+
+#if defined(AO_HAVE_int_load_acquire_read) && !defined(AO_HAVE_int_load)
+#  define AO_int_load(addr) AO_int_load_acquire_read(addr)
+#  define AO_HAVE_int_load
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_int_load_acquire_read)
+#    define AO_int_load_dd_acquire_read(addr) \
+        AO_int_load_acquire_read(addr)
+#    define AO_HAVE_int_load_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_int_load)
+#    define AO_int_load_dd_acquire_read(addr) \
+        AO_int_load(addr)
+#    define AO_HAVE_int_load_dd_acquire_read
+#  endif
+#endif
+
+
+/* int_store */
+
+#if defined(AO_HAVE_int_store_release) && !defined(AO_HAVE_int_store)
+#  define AO_int_store(addr, val) AO_int_store_release(addr,val)
+#  define AO_HAVE_int_store
+#endif
+
+#if defined(AO_HAVE_int_store_full) && !defined(AO_HAVE_int_store_release)
+#  define AO_int_store_release(addr,val) AO_int_store_full(addr,val)
+#  define AO_HAVE_int_store_release
+#endif
+
+#if defined(AO_HAVE_int_store_full) && !defined(AO_HAVE_int_store_write)
+#  define AO_int_store_write(addr,val) AO_int_store_full(addr,val)
+#  define AO_HAVE_int_store_write
+#endif
+
+#if defined(AO_HAVE_int_store_release) && \
+        !defined(AO_HAVE_int_store_release_write)
+#  define AO_int_store_release_write(addr, val) \
+        AO_int_store_release(addr,val)
+#  define AO_HAVE_int_store_release_write
+#endif
+
+#if defined(AO_HAVE_int_store_write) && !defined(AO_HAVE_int_store)
+#  define AO_int_store(addr, val) AO_int_store_write(addr,val)
+#  define AO_HAVE_int_store
+#endif
+
+#if defined(AO_HAVE_int_store) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_int_store_release)
+#  define AO_int_store_release(addr,val) \
+        (AO_nop_full(), AO_int_store(addr,val))
+#  define AO_HAVE_int_store_release
+#endif
+
+#if defined(AO_HAVE_nop_write) && defined(AO_HAVE_int_store) && \
+     !defined(AO_HAVE_int_store_write)
+#  define AO_int_store_write(addr, val) \
+        (AO_nop_write(), AO_int_store(addr,val))
+#  define AO_HAVE_int_store_write
+#endif
+
+#if defined(AO_HAVE_int_store_write) && \
+     !defined(AO_HAVE_int_store_release_write)
+#  define AO_int_store_release_write(addr, val) AO_int_store_write(addr,val)
+#  define AO_HAVE_int_store_release_write
+#endif
+
+#if defined(AO_HAVE_int_store_release) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_int_store_full)
+#  define AO_int_store_full(addr, val) \
+        (AO_int_store_release(addr, val), AO_nop_full())
+#  define AO_HAVE_int_store_full
+#endif
+
+
+/* int_fetch_and_add */
+#if defined(AO_HAVE_int_compare_and_swap_full) && \
+    !defined(AO_HAVE_int_fetch_and_add_full)
+   AO_INLINE AO_t
+   AO_int_fetch_and_add_full(volatile unsigned int *addr,
+                               unsigned int incr)
+   {
+     unsigned int old;
+     do
+       {
+         old = *addr;
+       }
+     while (!AO_int_compare_and_swap_full(addr, old, old+incr));
+     return old;
+   }
+#  define AO_HAVE_int_fetch_and_add_full
+#endif
+
+#if defined(AO_HAVE_int_compare_and_swap_acquire) && \
+    !defined(AO_HAVE_int_fetch_and_add_acquire)
+   AO_INLINE AO_t
+   AO_int_fetch_and_add_acquire(volatile unsigned int *addr,
+                                  unsigned int incr)
+   {
+     unsigned int old;
+     do
+       {
+         old = *addr;
+       }
+     while (!AO_int_compare_and_swap_acquire(addr, old, old+incr));
+     return old;
+   }
+#  define AO_HAVE_int_fetch_and_add_acquire
+#endif
+
+#if defined(AO_HAVE_int_compare_and_swap_release) && \
+    !defined(AO_HAVE_int_fetch_and_add_release)
+   AO_INLINE AO_t
+   AO_int_fetch_and_add_release(volatile unsigned int *addr,
+                                  unsigned int incr)
+   {
+     unsigned int old;
+     do
+       {
+         old = *addr;
+       }
+     while (!AO_int_compare_and_swap_release(addr, old, old+incr));
+     return old;
+   }
+#  define AO_HAVE_int_fetch_and_add_release
+#endif
+
+#if defined(AO_HAVE_int_fetch_and_add_full)
+#  if !defined(AO_HAVE_int_fetch_and_add_release)
+#    define AO_int_fetch_and_add_release(addr, val) \
+         AO_int_fetch_and_add_full(addr, val)
+#    define AO_HAVE_int_fetch_and_add_release
+#  endif
+#  if !defined(AO_HAVE_int_fetch_and_add_acquire)
+#    define AO_int_fetch_and_add_acquire(addr, val) \
+         AO_int_fetch_and_add_full(addr, val)
+#    define AO_HAVE_int_fetch_and_add_acquire
+#  endif
+#  if !defined(AO_HAVE_int_fetch_and_add_write)
+#    define AO_int_fetch_and_add_write(addr, val) \
+         AO_int_fetch_and_add_full(addr, val)
+#    define AO_HAVE_int_fetch_and_add_write
+#  endif
+#  if !defined(AO_HAVE_int_fetch_and_add_read)
+#    define AO_int_fetch_and_add_read(addr, val) \
+         AO_int_fetch_and_add_full(addr, val)
+#    define AO_HAVE_int_fetch_and_add_read
+#  endif
+#endif /* AO_HAVE_int_fetch_and_add_full */
+
+#if !defined(AO_HAVE_int_fetch_and_add) && \
+    defined(AO_HAVE_int_fetch_and_add_release)
+#  define AO_int_fetch_and_add(addr, val) \
+        AO_int_fetch_and_add_release(addr, val)
+#  define AO_HAVE_int_fetch_and_add
+#endif
+#if !defined(AO_HAVE_int_fetch_and_add) && \
+    defined(AO_HAVE_int_fetch_and_add_acquire)
+#  define AO_int_fetch_and_add(addr, val) \
+        AO_int_fetch_and_add_acquire(addr, val)
+#  define AO_HAVE_int_fetch_and_add
+#endif
+#if !defined(AO_HAVE_int_fetch_and_add) && \
+    defined(AO_HAVE_int_fetch_and_add_write)
+#  define AO_int_fetch_and_add(addr, val) \
+        AO_int_fetch_and_add_write(addr, val)
+#  define AO_HAVE_int_fetch_and_add
+#endif
+#if !defined(AO_HAVE_int_fetch_and_add) && \
+    defined(AO_HAVE_int_fetch_and_add_read)
+#  define AO_int_fetch_and_add(addr, val) \
+        AO_int_fetch_and_add_read(addr, val)
+#  define AO_HAVE_int_fetch_and_add
+#endif
+
+#if defined(AO_HAVE_int_fetch_and_add_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_int_fetch_and_add_full)
+#  define AO_int_fetch_and_add_full(addr, val) \
+        (AO_nop_full(), AO_int_fetch_and_add_acquire(addr, val))
+#endif
+
+#if !defined(AO_HAVE_int_fetch_and_add_release_write) && \
+    defined(AO_HAVE_int_fetch_and_add_write)
+#  define AO_int_fetch_and_add_release_write(addr, val) \
+        AO_int_fetch_and_add_write(addr, val)
+#  define AO_HAVE_int_fetch_and_add_release_write
+#endif
+#if !defined(AO_HAVE_int_fetch_and_add_release_write) && \
+    defined(AO_HAVE_int_fetch_and_add_release)
+#  define AO_int_fetch_and_add_release_write(addr, val) \
+        AO_int_fetch_and_add_release(addr, val)
+#  define AO_HAVE_int_fetch_and_add_release_write
+#endif
+#if !defined(AO_HAVE_int_fetch_and_add_acquire_read) && \
+    defined(AO_HAVE_int_fetch_and_add_read)
+#  define AO_int_fetch_and_add_acquire_read(addr, val) \
+        AO_int_fetch_and_add_read(addr, val)
+#  define AO_HAVE_int_fetch_and_add_acquire_read
+#endif
+#if !defined(AO_HAVE_int_fetch_and_add_acquire_read) && \
+    defined(AO_HAVE_int_fetch_and_add_acquire)
+#  define AO_int_fetch_and_add_acquire_read(addr, val) \
+        AO_int_fetch_and_add_acquire(addr, val)
+#  define AO_HAVE_int_fetch_and_add_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_int_fetch_and_add_acquire_read)
+#    define AO_int_fetch_and_add_dd_acquire_read(addr, val) \
+        AO_int_fetch_and_add_acquire_read(addr, val)
+#    define AO_HAVE_int_fetch_and_add_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_int_fetch_and_add)
+#    define AO_int_fetch_and_add_dd_acquire_read(addr, val) \
+        AO_int_fetch_and_add(addr, val)
+#    define AO_HAVE_int_fetch_and_add_dd_acquire_read
+#  endif
+#endif
+
+/* int_fetch_and_add1 */
+
+#if defined(AO_HAVE_int_fetch_and_add_full) &&\
+    !defined(AO_HAVE_int_fetch_and_add1_full)
+#  define AO_int_fetch_and_add1_full(addr) \
+        AO_int_fetch_and_add_full(addr,1)
+#  define AO_HAVE_int_fetch_and_add1_full
+#endif
+#if defined(AO_HAVE_int_fetch_and_add_release) &&\
+    !defined(AO_HAVE_int_fetch_and_add1_release)
+#  define AO_int_fetch_and_add1_release(addr) \
+        AO_int_fetch_and_add_release(addr,1)
+#  define AO_HAVE_int_fetch_and_add1_release
+#endif
+#if defined(AO_HAVE_int_fetch_and_add_acquire) &&\
+    !defined(AO_HAVE_int_fetch_and_add1_acquire)
+#  define AO_int_fetch_and_add1_acquire(addr) \
+        AO_int_fetch_and_add_acquire(addr,1)
+#  define AO_HAVE_int_fetch_and_add1_acquire
+#endif
+#if defined(AO_HAVE_int_fetch_and_add_write) &&\
+    !defined(AO_HAVE_int_fetch_and_add1_write)
+#  define AO_int_fetch_and_add1_write(addr) \
+        AO_int_fetch_and_add_write(addr,1)
+#  define AO_HAVE_int_fetch_and_add1_write
+#endif
+#if defined(AO_HAVE_int_fetch_and_add_read) &&\
+    !defined(AO_HAVE_int_fetch_and_add1_read)
+#  define AO_int_fetch_and_add1_read(addr) \
+        AO_int_fetch_and_add_read(addr,1)
+#  define AO_HAVE_int_fetch_and_add1_read
+#endif
+#if defined(AO_HAVE_int_fetch_and_add_release_write) &&\
+    !defined(AO_HAVE_int_fetch_and_add1_release_write)
+#  define AO_int_fetch_and_add1_release_write(addr) \
+        AO_int_fetch_and_add_release_write(addr,1)
+#  define AO_HAVE_int_fetch_and_add1_release_write
+#endif
+#if defined(AO_HAVE_int_fetch_and_add_acquire_read) &&\
+    !defined(AO_HAVE_int_fetch_and_add1_acquire_read)
+#  define AO_int_fetch_and_add1_acquire_read(addr) \
+        AO_int_fetch_and_add_acquire_read(addr,1)
+#  define AO_HAVE_int_fetch_and_add1_acquire_read
+#endif
+#if defined(AO_HAVE_int_fetch_and_add) &&\
+    !defined(AO_HAVE_int_fetch_and_add1)
+#  define AO_int_fetch_and_add1(addr) \
+        AO_int_fetch_and_add(addr,1)
+#  define AO_HAVE_int_fetch_and_add1
+#endif
+
+#if defined(AO_HAVE_int_fetch_and_add1_full)
+#  if !defined(AO_HAVE_int_fetch_and_add1_release)
+#    define AO_int_fetch_and_add1_release(addr) \
+         AO_int_fetch_and_add1_full(addr)
+#    define AO_HAVE_int_fetch_and_add1_release
+#  endif
+#  if !defined(AO_HAVE_int_fetch_and_add1_acquire)
+#    define AO_int_fetch_and_add1_acquire(addr) \
+         AO_int_fetch_and_add1_full(addr)
+#    define AO_HAVE_int_fetch_and_add1_acquire
+#  endif
+#  if !defined(AO_HAVE_int_fetch_and_add1_write)
+#    define AO_int_fetch_and_add1_write(addr) \
+         AO_int_fetch_and_add1_full(addr)
+#    define AO_HAVE_int_fetch_and_add1_write
+#  endif
+#  if !defined(AO_HAVE_int_fetch_and_add1_read)
+#    define AO_int_fetch_and_add1_read(addr) \
+         AO_int_fetch_and_add1_full(addr)
+#    define AO_HAVE_int_fetch_and_add1_read
+#  endif
+#endif /* AO_HAVE_int_fetch_and_add1_full */
+
+#if !defined(AO_HAVE_int_fetch_and_add1) && \
+    defined(AO_HAVE_int_fetch_and_add1_release)
+#  define AO_int_fetch_and_add1(addr) \
+        AO_int_fetch_and_add1_release(addr)
+#  define AO_HAVE_int_fetch_and_add1
+#endif
+#if !defined(AO_HAVE_int_fetch_and_add1) && \
+    defined(AO_HAVE_int_fetch_and_add1_acquire)
+#  define AO_int_fetch_and_add1(addr) \
+        AO_int_fetch_and_add1_acquire(addr)
+#  define AO_HAVE_int_fetch_and_add1
+#endif
+#if !defined(AO_HAVE_int_fetch_and_add1) && \
+    defined(AO_HAVE_int_fetch_and_add1_write)
+#  define AO_int_fetch_and_add1(addr) \
+        AO_int_fetch_and_add1_write(addr)
+#  define AO_HAVE_int_fetch_and_add1
+#endif
+#if !defined(AO_HAVE_int_fetch_and_add1) && \
+    defined(AO_HAVE_int_fetch_and_add1_read)
+#  define AO_int_fetch_and_add1(addr) \
+        AO_int_fetch_and_add1_read(addr)
+#  define AO_HAVE_int_fetch_and_add1
+#endif
+
+#if defined(AO_HAVE_int_fetch_and_add1_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_int_fetch_and_add1_full)
+#  define AO_int_fetch_and_add1_full(addr) \
+        (AO_nop_full(), AO_int_fetch_and_add1_acquire(addr))
+#  define AO_HAVE_int_fetch_and_add1_full
+#endif
+
+#if !defined(AO_HAVE_int_fetch_and_add1_release_write) && \
+    defined(AO_HAVE_int_fetch_and_add1_write)
+#  define AO_int_fetch_and_add1_release_write(addr) \
+        AO_int_fetch_and_add1_write(addr)
+#  define AO_HAVE_int_fetch_and_add1_release_write
+#endif
+#if !defined(AO_HAVE_int_fetch_and_add1_release_write) && \
+    defined(AO_HAVE_int_fetch_and_add1_release)
+#  define AO_int_fetch_and_add1_release_write(addr) \
+        AO_int_fetch_and_add1_release(addr)
+#  define AO_HAVE_int_fetch_and_add1_release_write
+#endif
+#if !defined(AO_HAVE_int_fetch_and_add1_acquire_read) && \
+    defined(AO_HAVE_int_fetch_and_add1_read)
+#  define AO_int_fetch_and_add1_acquire_read(addr) \
+        AO_int_fetch_and_add1_read(addr)
+#  define AO_HAVE_int_fetch_and_add1_acquire_read
+#endif
+#if !defined(AO_HAVE_int_fetch_and_add1_acquire_read) && \
+    defined(AO_HAVE_int_fetch_and_add1_acquire)
+#  define AO_int_fetch_and_add1_acquire_read(addr) \
+        AO_int_fetch_and_add1_acquire(addr)
+#  define AO_HAVE_int_fetch_and_add1_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_int_fetch_and_add1_acquire_read)
+#    define AO_int_fetch_and_add1_dd_acquire_read(addr) \
+        AO_int_fetch_and_add1_acquire_read(addr)
+#    define AO_HAVE_int_fetch_and_add1_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_int_fetch_and_add1)
+#    define AO_int_fetch_and_add1_dd_acquire_read(addr) \
+        AO_int_fetch_and_add1(addr)
+#    define AO_HAVE_int_fetch_and_add1_dd_acquire_read
+#  endif
+#endif
+
+/* int_fetch_and_sub1 */
+
+#if defined(AO_HAVE_int_fetch_and_add_full) &&\
+    !defined(AO_HAVE_int_fetch_and_sub1_full)
+#  define AO_int_fetch_and_sub1_full(addr) \
+        AO_int_fetch_and_add_full(addr,(unsigned int)(-1))
+#  define AO_HAVE_int_fetch_and_sub1_full
+#endif
+#if defined(AO_HAVE_int_fetch_and_add_release) &&\
+    !defined(AO_HAVE_int_fetch_and_sub1_release)
+#  define AO_int_fetch_and_sub1_release(addr) \
+        AO_int_fetch_and_add_release(addr,(unsigned int)(-1))
+#  define AO_HAVE_int_fetch_and_sub1_release
+#endif
+#if defined(AO_HAVE_int_fetch_and_add_acquire) &&\
+    !defined(AO_HAVE_int_fetch_and_sub1_acquire)
+#  define AO_int_fetch_and_sub1_acquire(addr) \
+        AO_int_fetch_and_add_acquire(addr,(unsigned int)(-1))
+#  define AO_HAVE_int_fetch_and_sub1_acquire
+#endif
+#if defined(AO_HAVE_int_fetch_and_add_write) &&\
+    !defined(AO_HAVE_int_fetch_and_sub1_write)
+#  define AO_int_fetch_and_sub1_write(addr) \
+        AO_int_fetch_and_add_write(addr,(unsigned int)(-1))
+#  define AO_HAVE_int_fetch_and_sub1_write
+#endif
+#if defined(AO_HAVE_int_fetch_and_add_read) &&\
+    !defined(AO_HAVE_int_fetch_and_sub1_read)
+#  define AO_int_fetch_and_sub1_read(addr) \
+        AO_int_fetch_and_add_read(addr,(unsigned int)(-1))
+#  define AO_HAVE_int_fetch_and_sub1_read
+#endif
+#if defined(AO_HAVE_int_fetch_and_add_release_write) &&\
+    !defined(AO_HAVE_int_fetch_and_sub1_release_write)
+#  define AO_int_fetch_and_sub1_release_write(addr) \
+        AO_int_fetch_and_add_release_write(addr,(unsigned int)(-1))
+#  define AO_HAVE_int_fetch_and_sub1_release_write
+#endif
+#if defined(AO_HAVE_int_fetch_and_add_acquire_read) &&\
+    !defined(AO_HAVE_int_fetch_and_sub1_acquire_read)
+#  define AO_int_fetch_and_sub1_acquire_read(addr) \
+        AO_int_fetch_and_add_acquire_read(addr,(unsigned int)(-1))
+#  define AO_HAVE_int_fetch_and_sub1_acquire_read
+#endif
+#if defined(AO_HAVE_int_fetch_and_add) &&\
+    !defined(AO_HAVE_int_fetch_and_sub1)
+#  define AO_int_fetch_and_sub1(addr) \
+        AO_int_fetch_and_add(addr,(unsigned int)(-1))
+#  define AO_HAVE_int_fetch_and_sub1
+#endif
+
+#if defined(AO_HAVE_int_fetch_and_sub1_full)
+#  if !defined(AO_HAVE_int_fetch_and_sub1_release)
+#    define AO_int_fetch_and_sub1_release(addr) \
+         AO_int_fetch_and_sub1_full(addr)
+#    define AO_HAVE_int_fetch_and_sub1_release
+#  endif
+#  if !defined(AO_HAVE_int_fetch_and_sub1_acquire)
+#    define AO_int_fetch_and_sub1_acquire(addr) \
+         AO_int_fetch_and_sub1_full(addr)
+#    define AO_HAVE_int_fetch_and_sub1_acquire
+#  endif
+#  if !defined(AO_HAVE_int_fetch_and_sub1_write)
+#    define AO_int_fetch_and_sub1_write(addr) \
+         AO_int_fetch_and_sub1_full(addr)
+#    define AO_HAVE_int_fetch_and_sub1_write
+#  endif
+#  if !defined(AO_HAVE_int_fetch_and_sub1_read)
+#    define AO_int_fetch_and_sub1_read(addr) \
+         AO_int_fetch_and_sub1_full(addr)
+#    define AO_HAVE_int_fetch_and_sub1_read
+#  endif
+#endif /* AO_HAVE_int_fetch_and_sub1_full */
+
+#if !defined(AO_HAVE_int_fetch_and_sub1) && \
+    defined(AO_HAVE_int_fetch_and_sub1_release)
+#  define AO_int_fetch_and_sub1(addr) \
+        AO_int_fetch_and_sub1_release(addr)
+#  define AO_HAVE_int_fetch_and_sub1
+#endif
+#if !defined(AO_HAVE_int_fetch_and_sub1) && \
+    defined(AO_HAVE_int_fetch_and_sub1_acquire)
+#  define AO_int_fetch_and_sub1(addr) \
+        AO_int_fetch_and_sub1_acquire(addr)
+#  define AO_HAVE_int_fetch_and_sub1
+#endif
+#if !defined(AO_HAVE_int_fetch_and_sub1) && \
+    defined(AO_HAVE_int_fetch_and_sub1_write)
+#  define AO_int_fetch_and_sub1(addr) \
+        AO_int_fetch_and_sub1_write(addr)
+#  define AO_HAVE_int_fetch_and_sub1
+#endif
+#if !defined(AO_HAVE_int_fetch_and_sub1) && \
+    defined(AO_HAVE_int_fetch_and_sub1_read)
+#  define AO_int_fetch_and_sub1(addr) \
+        AO_int_fetch_and_sub1_read(addr)
+#  define AO_HAVE_int_fetch_and_sub1
+#endif
+
+#if defined(AO_HAVE_int_fetch_and_sub1_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_int_fetch_and_sub1_full)
+#  define AO_int_fetch_and_sub1_full(addr) \
+        (AO_nop_full(), AO_int_fetch_and_sub1_acquire(addr))
+#  define AO_HAVE_int_fetch_and_sub1_full
+#endif
+
+#if !defined(AO_HAVE_int_fetch_and_sub1_release_write) && \
+    defined(AO_HAVE_int_fetch_and_sub1_write)
+#  define AO_int_fetch_and_sub1_release_write(addr) \
+        AO_int_fetch_and_sub1_write(addr)
+#  define AO_HAVE_int_fetch_and_sub1_release_write
+#endif
+#if !defined(AO_HAVE_int_fetch_and_sub1_release_write) && \
+    defined(AO_HAVE_int_fetch_and_sub1_release)
+#  define AO_int_fetch_and_sub1_release_write(addr) \
+        AO_int_fetch_and_sub1_release(addr)
+#  define AO_HAVE_int_fetch_and_sub1_release_write
+#endif
+#if !defined(AO_HAVE_int_fetch_and_sub1_acquire_read) && \
+    defined(AO_HAVE_int_fetch_and_sub1_read)
+#  define AO_int_fetch_and_sub1_acquire_read(addr) \
+        AO_int_fetch_and_sub1_read(addr)
+#  define AO_HAVE_int_fetch_and_sub1_acquire_read
+#endif
+#if !defined(AO_HAVE_int_fetch_and_sub1_acquire_read) && \
+    defined(AO_HAVE_int_fetch_and_sub1_acquire)
+#  define AO_int_fetch_and_sub1_acquire_read(addr) \
+        AO_int_fetch_and_sub1_acquire(addr)
+#  define AO_HAVE_int_fetch_and_sub1_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_int_fetch_and_sub1_acquire_read)
+#    define AO_int_fetch_and_sub1_dd_acquire_read(addr) \
+        AO_int_fetch_and_sub1_acquire_read(addr)
+#    define AO_HAVE_int_fetch_and_sub1_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_int_fetch_and_sub1)
+#    define AO_int_fetch_and_sub1_dd_acquire_read(addr) \
+        AO_int_fetch_and_sub1(addr)
+#    define AO_HAVE_int_fetch_and_sub1_dd_acquire_read
+#  endif
+#endif
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/generalize-small.template b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/generalize-small.template
new file mode 100644 (file)
index 0000000..c9373df
--- /dev/null
@@ -0,0 +1,575 @@
+/* XSIZE_load */
+#if defined(AO_HAVE_XSIZE_load_acquire) && !defined(AO_HAVE_XSIZE_load)
+#  define AO_XSIZE_load(addr) AO_XSIZE_load_acquire(addr)
+#  define AO_HAVE_XSIZE_load
+#endif
+
+#if defined(AO_HAVE_XSIZE_load_full) && !defined(AO_HAVE_XSIZE_load_acquire)
+#  define AO_XSIZE_load_acquire(addr) AO_XSIZE_load_full(addr)
+#  define AO_HAVE_XSIZE_load_acquire
+#endif
+
+#if defined(AO_HAVE_XSIZE_load_full) && !defined(AO_HAVE_XSIZE_load_read)
+#  define AO_XSIZE_load_read(addr) AO_XSIZE_load_full(addr)
+#  define AO_HAVE_XSIZE_load_read
+#endif
+
+#if !defined(AO_HAVE_XSIZE_load_acquire_read) && defined(AO_HAVE_XSIZE_load_acquire)
+#  define AO_XSIZE_load_acquire_read(addr) AO_XSIZE_load_acquire(addr)
+#  define AO_HAVE_XSIZE_load_acquire_read
+#endif
+
+#if defined(AO_HAVE_XSIZE_load) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_XSIZE_load_acquire)
+   AO_INLINE unsigned XCTYPE
+   AO_XSIZE_load_acquire(const volatile unsigned XCTYPE *addr)
+   {
+     unsigned XCTYPE result = AO_XSIZE_load(addr);
+     /* Acquire barrier would be useless, since the load could be delayed  */
+     /* beyond it.                                                        */
+     AO_nop_full();
+     return result;
+   }
+#  define AO_HAVE_XSIZE_load_acquire
+#endif
+
+#if defined(AO_HAVE_XSIZE_load) && defined(AO_HAVE_nop_read) && \
+    !defined(AO_HAVE_XSIZE_load_read)
+   AO_INLINE unsigned XCTYPE
+   AO_XSIZE_load_read(const volatile unsigned XCTYPE *addr)
+   {
+     unsigned XCTYPE result = AO_XSIZE_load(addr);
+     /* Acquire barrier would be useless, since the load could be delayed  */
+     /* beyond it.                                                        */
+     AO_nop_read();
+     return result;
+   }
+#  define AO_HAVE_XSIZE_load_read
+#endif
+
+#if defined(AO_HAVE_XSIZE_load_acquire) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_XSIZE_load_full)
+#  define AO_XSIZE_load_full(addr) (AO_nop_full(), AO_XSIZE_load_acquire(addr))
+#  define AO_HAVE_XSIZE_load_full
+#endif
+#if !defined(AO_HAVE_XSIZE_load_acquire_read) && defined(AO_HAVE_XSIZE_load_read)
+#  define AO_XSIZE_load_acquire_read(addr) AO_XSIZE_load_read(addr)
+#  define AO_HAVE_XSIZE_load_acquire_read
+#endif
+
+#if defined(AO_HAVE_XSIZE_load_acquire_read) && !defined(AO_HAVE_XSIZE_load)
+#  define AO_XSIZE_load(addr) AO_XSIZE_load_acquire_read(addr)
+#  define AO_HAVE_XSIZE_load
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_XSIZE_load_acquire_read)
+#    define AO_XSIZE_load_dd_acquire_read(addr) \
+       AO_XSIZE_load_acquire_read(addr)
+#    define AO_HAVE_XSIZE_load_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_XSIZE_load)
+#    define AO_XSIZE_load_dd_acquire_read(addr) \
+       AO_XSIZE_load(addr)
+#    define AO_HAVE_XSIZE_load_dd_acquire_read
+#  endif
+#endif
+
+
+/* XSIZE_store */
+
+#if defined(AO_HAVE_XSIZE_store_release) && !defined(AO_HAVE_XSIZE_store)
+#  define AO_XSIZE_store(addr, val) AO_XSIZE_store_release(addr,val)
+#  define AO_HAVE_XSIZE_store
+#endif
+
+#if defined(AO_HAVE_XSIZE_store_full) && !defined(AO_HAVE_XSIZE_store_release)
+#  define AO_XSIZE_store_release(addr,val) AO_XSIZE_store_full(addr,val)
+#  define AO_HAVE_XSIZE_store_release
+#endif
+
+#if defined(AO_HAVE_XSIZE_store_full) && !defined(AO_HAVE_XSIZE_store_write)
+#  define AO_XSIZE_store_write(addr,val) AO_XSIZE_store_full(addr,val)
+#  define AO_HAVE_XSIZE_store_write
+#endif
+
+#if defined(AO_HAVE_XSIZE_store_release) && \
+       !defined(AO_HAVE_XSIZE_store_release_write)
+#  define AO_XSIZE_store_release_write(addr, val) \
+       AO_XSIZE_store_release(addr,val)
+#  define AO_HAVE_XSIZE_store_release_write
+#endif
+
+#if defined(AO_HAVE_XSIZE_store_write) && !defined(AO_HAVE_XSIZE_store)
+#  define AO_XSIZE_store(addr, val) AO_XSIZE_store_write(addr,val)
+#  define AO_HAVE_XSIZE_store
+#endif
+
+#if defined(AO_HAVE_XSIZE_store) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_XSIZE_store_release)
+#  define AO_XSIZE_store_release(addr,val) \
+       (AO_nop_full(), AO_XSIZE_store(addr,val))
+#  define AO_HAVE_XSIZE_store_release
+#endif
+
+#if defined(AO_HAVE_nop_write) && defined(AO_HAVE_XSIZE_store) && \
+     !defined(AO_HAVE_XSIZE_store_write)
+#  define AO_XSIZE_store_write(addr, val) \
+       (AO_nop_write(), AO_XSIZE_store(addr,val))
+#  define AO_HAVE_XSIZE_store_write
+#endif
+
+#if defined(AO_HAVE_XSIZE_store_write) && \
+     !defined(AO_HAVE_XSIZE_store_release_write)
+#  define AO_XSIZE_store_release_write(addr, val) AO_XSIZE_store_write(addr,val)
+#  define AO_HAVE_XSIZE_store_release_write
+#endif
+
+#if defined(AO_HAVE_XSIZE_store_release) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_XSIZE_store_full)
+#  define AO_XSIZE_store_full(addr, val) \
+       (AO_XSIZE_store_release(addr, val), AO_nop_full())
+#  define AO_HAVE_XSIZE_store_full
+#endif
+
+
+/* XSIZE_fetch_and_add */
+#if defined(AO_HAVE_XSIZE_compare_and_swap_full) && \
+    !defined(AO_HAVE_XSIZE_fetch_and_add_full)
+   AO_INLINE AO_t
+   AO_XSIZE_fetch_and_add_full(volatile unsigned XCTYPE *addr,
+                              unsigned XCTYPE incr)
+   {
+     unsigned XCTYPE old;
+     do
+       {
+         old = *addr;
+       }
+     while (!AO_XSIZE_compare_and_swap_full(addr, old, old+incr));
+     return old;
+   }
+#  define AO_HAVE_XSIZE_fetch_and_add_full
+#endif
+
+#if defined(AO_HAVE_XSIZE_compare_and_swap_acquire) && \
+    !defined(AO_HAVE_XSIZE_fetch_and_add_acquire)
+   AO_INLINE AO_t
+   AO_XSIZE_fetch_and_add_acquire(volatile unsigned XCTYPE *addr,
+                                 unsigned XCTYPE incr)
+   {
+     unsigned XCTYPE old;
+     do
+       {
+         old = *addr;
+       }
+     while (!AO_XSIZE_compare_and_swap_acquire(addr, old, old+incr));
+     return old;
+   }
+#  define AO_HAVE_XSIZE_fetch_and_add_acquire
+#endif
+
+#if defined(AO_HAVE_XSIZE_compare_and_swap_release) && \
+    !defined(AO_HAVE_XSIZE_fetch_and_add_release)
+   AO_INLINE AO_t
+   AO_XSIZE_fetch_and_add_release(volatile unsigned XCTYPE *addr,
+                                 unsigned XCTYPE incr)
+   {
+     unsigned XCTYPE old;
+     do
+       {
+         old = *addr;
+       }
+     while (!AO_XSIZE_compare_and_swap_release(addr, old, old+incr));
+     return old;
+   }
+#  define AO_HAVE_XSIZE_fetch_and_add_release
+#endif
+
+#if defined(AO_HAVE_XSIZE_fetch_and_add_full)
+#  if !defined(AO_HAVE_XSIZE_fetch_and_add_release)
+#    define AO_XSIZE_fetch_and_add_release(addr, val) \
+        AO_XSIZE_fetch_and_add_full(addr, val)
+#    define AO_HAVE_XSIZE_fetch_and_add_release
+#  endif
+#  if !defined(AO_HAVE_XSIZE_fetch_and_add_acquire)
+#    define AO_XSIZE_fetch_and_add_acquire(addr, val) \
+        AO_XSIZE_fetch_and_add_full(addr, val)
+#    define AO_HAVE_XSIZE_fetch_and_add_acquire
+#  endif
+#  if !defined(AO_HAVE_XSIZE_fetch_and_add_write)
+#    define AO_XSIZE_fetch_and_add_write(addr, val) \
+        AO_XSIZE_fetch_and_add_full(addr, val)
+#    define AO_HAVE_XSIZE_fetch_and_add_write
+#  endif
+#  if !defined(AO_HAVE_XSIZE_fetch_and_add_read)
+#    define AO_XSIZE_fetch_and_add_read(addr, val) \
+        AO_XSIZE_fetch_and_add_full(addr, val)
+#    define AO_HAVE_XSIZE_fetch_and_add_read
+#  endif
+#endif /* AO_HAVE_XSIZE_fetch_and_add_full */
+
+#if !defined(AO_HAVE_XSIZE_fetch_and_add) && \
+    defined(AO_HAVE_XSIZE_fetch_and_add_release)
+#  define AO_XSIZE_fetch_and_add(addr, val) \
+       AO_XSIZE_fetch_and_add_release(addr, val)
+#  define AO_HAVE_XSIZE_fetch_and_add
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_add) && \
+    defined(AO_HAVE_XSIZE_fetch_and_add_acquire)
+#  define AO_XSIZE_fetch_and_add(addr, val) \
+       AO_XSIZE_fetch_and_add_acquire(addr, val)
+#  define AO_HAVE_XSIZE_fetch_and_add
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_add) && \
+    defined(AO_HAVE_XSIZE_fetch_and_add_write)
+#  define AO_XSIZE_fetch_and_add(addr, val) \
+       AO_XSIZE_fetch_and_add_write(addr, val)
+#  define AO_HAVE_XSIZE_fetch_and_add
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_add) && \
+    defined(AO_HAVE_XSIZE_fetch_and_add_read)
+#  define AO_XSIZE_fetch_and_add(addr, val) \
+       AO_XSIZE_fetch_and_add_read(addr, val)
+#  define AO_HAVE_XSIZE_fetch_and_add
+#endif
+
+#if defined(AO_HAVE_XSIZE_fetch_and_add_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_XSIZE_fetch_and_add_full)
+#  define AO_XSIZE_fetch_and_add_full(addr, val) \
+       (AO_nop_full(), AO_XSIZE_fetch_and_add_acquire(addr, val))
+#endif
+
+#if !defined(AO_HAVE_XSIZE_fetch_and_add_release_write) && \
+    defined(AO_HAVE_XSIZE_fetch_and_add_write)
+#  define AO_XSIZE_fetch_and_add_release_write(addr, val) \
+       AO_XSIZE_fetch_and_add_write(addr, val)
+#  define AO_HAVE_XSIZE_fetch_and_add_release_write
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_add_release_write) && \
+    defined(AO_HAVE_XSIZE_fetch_and_add_release)
+#  define AO_XSIZE_fetch_and_add_release_write(addr, val) \
+       AO_XSIZE_fetch_and_add_release(addr, val)
+#  define AO_HAVE_XSIZE_fetch_and_add_release_write
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_add_acquire_read) && \
+    defined(AO_HAVE_XSIZE_fetch_and_add_read)
+#  define AO_XSIZE_fetch_and_add_acquire_read(addr, val) \
+       AO_XSIZE_fetch_and_add_read(addr, val)
+#  define AO_HAVE_XSIZE_fetch_and_add_acquire_read
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_add_acquire_read) && \
+    defined(AO_HAVE_XSIZE_fetch_and_add_acquire)
+#  define AO_XSIZE_fetch_and_add_acquire_read(addr, val) \
+       AO_XSIZE_fetch_and_add_acquire(addr, val)
+#  define AO_HAVE_XSIZE_fetch_and_add_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_XSIZE_fetch_and_add_acquire_read)
+#    define AO_XSIZE_fetch_and_add_dd_acquire_read(addr, val) \
+       AO_XSIZE_fetch_and_add_acquire_read(addr, val)
+#    define AO_HAVE_XSIZE_fetch_and_add_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_XSIZE_fetch_and_add)
+#    define AO_XSIZE_fetch_and_add_dd_acquire_read(addr, val) \
+       AO_XSIZE_fetch_and_add(addr, val)
+#    define AO_HAVE_XSIZE_fetch_and_add_dd_acquire_read
+#  endif
+#endif
+  
+/* XSIZE_fetch_and_add1 */
+
+#if defined(AO_HAVE_XSIZE_fetch_and_add_full) &&\
+    !defined(AO_HAVE_XSIZE_fetch_and_add1_full)
+#  define AO_XSIZE_fetch_and_add1_full(addr) \
+       AO_XSIZE_fetch_and_add_full(addr,1)
+#  define AO_HAVE_XSIZE_fetch_and_add1_full
+#endif
+#if defined(AO_HAVE_XSIZE_fetch_and_add_release) &&\
+    !defined(AO_HAVE_XSIZE_fetch_and_add1_release)
+#  define AO_XSIZE_fetch_and_add1_release(addr) \
+       AO_XSIZE_fetch_and_add_release(addr,1)
+#  define AO_HAVE_XSIZE_fetch_and_add1_release
+#endif
+#if defined(AO_HAVE_XSIZE_fetch_and_add_acquire) &&\
+    !defined(AO_HAVE_XSIZE_fetch_and_add1_acquire)
+#  define AO_XSIZE_fetch_and_add1_acquire(addr) \
+       AO_XSIZE_fetch_and_add_acquire(addr,1)
+#  define AO_HAVE_XSIZE_fetch_and_add1_acquire
+#endif
+#if defined(AO_HAVE_XSIZE_fetch_and_add_write) &&\
+    !defined(AO_HAVE_XSIZE_fetch_and_add1_write)
+#  define AO_XSIZE_fetch_and_add1_write(addr) \
+       AO_XSIZE_fetch_and_add_write(addr,1)
+#  define AO_HAVE_XSIZE_fetch_and_add1_write
+#endif
+#if defined(AO_HAVE_XSIZE_fetch_and_add_read) &&\
+    !defined(AO_HAVE_XSIZE_fetch_and_add1_read)
+#  define AO_XSIZE_fetch_and_add1_read(addr) \
+       AO_XSIZE_fetch_and_add_read(addr,1)
+#  define AO_HAVE_XSIZE_fetch_and_add1_read
+#endif
+#if defined(AO_HAVE_XSIZE_fetch_and_add_release_write) &&\
+    !defined(AO_HAVE_XSIZE_fetch_and_add1_release_write)
+#  define AO_XSIZE_fetch_and_add1_release_write(addr) \
+       AO_XSIZE_fetch_and_add_release_write(addr,1)
+#  define AO_HAVE_XSIZE_fetch_and_add1_release_write
+#endif
+#if defined(AO_HAVE_XSIZE_fetch_and_add_acquire_read) &&\
+    !defined(AO_HAVE_XSIZE_fetch_and_add1_acquire_read)
+#  define AO_XSIZE_fetch_and_add1_acquire_read(addr) \
+       AO_XSIZE_fetch_and_add_acquire_read(addr,1)
+#  define AO_HAVE_XSIZE_fetch_and_add1_acquire_read
+#endif
+#if defined(AO_HAVE_XSIZE_fetch_and_add) &&\
+    !defined(AO_HAVE_XSIZE_fetch_and_add1)
+#  define AO_XSIZE_fetch_and_add1(addr) \
+       AO_XSIZE_fetch_and_add(addr,1)
+#  define AO_HAVE_XSIZE_fetch_and_add1
+#endif
+
+#if defined(AO_HAVE_XSIZE_fetch_and_add1_full)
+#  if !defined(AO_HAVE_XSIZE_fetch_and_add1_release)
+#    define AO_XSIZE_fetch_and_add1_release(addr) \
+        AO_XSIZE_fetch_and_add1_full(addr)
+#    define AO_HAVE_XSIZE_fetch_and_add1_release
+#  endif
+#  if !defined(AO_HAVE_XSIZE_fetch_and_add1_acquire)
+#    define AO_XSIZE_fetch_and_add1_acquire(addr) \
+        AO_XSIZE_fetch_and_add1_full(addr)
+#    define AO_HAVE_XSIZE_fetch_and_add1_acquire
+#  endif
+#  if !defined(AO_HAVE_XSIZE_fetch_and_add1_write)
+#    define AO_XSIZE_fetch_and_add1_write(addr) \
+        AO_XSIZE_fetch_and_add1_full(addr)
+#    define AO_HAVE_XSIZE_fetch_and_add1_write
+#  endif
+#  if !defined(AO_HAVE_XSIZE_fetch_and_add1_read)
+#    define AO_XSIZE_fetch_and_add1_read(addr) \
+        AO_XSIZE_fetch_and_add1_full(addr)
+#    define AO_HAVE_XSIZE_fetch_and_add1_read
+#  endif
+#endif /* AO_HAVE_XSIZE_fetch_and_add1_full */
+
+#if !defined(AO_HAVE_XSIZE_fetch_and_add1) && \
+    defined(AO_HAVE_XSIZE_fetch_and_add1_release)
+#  define AO_XSIZE_fetch_and_add1(addr) \
+       AO_XSIZE_fetch_and_add1_release(addr)
+#  define AO_HAVE_XSIZE_fetch_and_add1
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_add1) && \
+    defined(AO_HAVE_XSIZE_fetch_and_add1_acquire)
+#  define AO_XSIZE_fetch_and_add1(addr) \
+       AO_XSIZE_fetch_and_add1_acquire(addr)
+#  define AO_HAVE_XSIZE_fetch_and_add1
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_add1) && \
+    defined(AO_HAVE_XSIZE_fetch_and_add1_write)
+#  define AO_XSIZE_fetch_and_add1(addr) \
+       AO_XSIZE_fetch_and_add1_write(addr)
+#  define AO_HAVE_XSIZE_fetch_and_add1
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_add1) && \
+    defined(AO_HAVE_XSIZE_fetch_and_add1_read)
+#  define AO_XSIZE_fetch_and_add1(addr) \
+       AO_XSIZE_fetch_and_add1_read(addr)
+#  define AO_HAVE_XSIZE_fetch_and_add1
+#endif
+
+#if defined(AO_HAVE_XSIZE_fetch_and_add1_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_XSIZE_fetch_and_add1_full)
+#  define AO_XSIZE_fetch_and_add1_full(addr) \
+       (AO_nop_full(), AO_XSIZE_fetch_and_add1_acquire(addr))
+#  define AO_HAVE_XSIZE_fetch_and_add1_full
+#endif
+
+#if !defined(AO_HAVE_XSIZE_fetch_and_add1_release_write) && \
+    defined(AO_HAVE_XSIZE_fetch_and_add1_write)
+#  define AO_XSIZE_fetch_and_add1_release_write(addr) \
+       AO_XSIZE_fetch_and_add1_write(addr)
+#  define AO_HAVE_XSIZE_fetch_and_add1_release_write
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_add1_release_write) && \
+    defined(AO_HAVE_XSIZE_fetch_and_add1_release)
+#  define AO_XSIZE_fetch_and_add1_release_write(addr) \
+       AO_XSIZE_fetch_and_add1_release(addr)
+#  define AO_HAVE_XSIZE_fetch_and_add1_release_write
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_add1_acquire_read) && \
+    defined(AO_HAVE_XSIZE_fetch_and_add1_read)
+#  define AO_XSIZE_fetch_and_add1_acquire_read(addr) \
+       AO_XSIZE_fetch_and_add1_read(addr)
+#  define AO_HAVE_XSIZE_fetch_and_add1_acquire_read
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_add1_acquire_read) && \
+    defined(AO_HAVE_XSIZE_fetch_and_add1_acquire)
+#  define AO_XSIZE_fetch_and_add1_acquire_read(addr) \
+       AO_XSIZE_fetch_and_add1_acquire(addr)
+#  define AO_HAVE_XSIZE_fetch_and_add1_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_XSIZE_fetch_and_add1_acquire_read)
+#    define AO_XSIZE_fetch_and_add1_dd_acquire_read(addr) \
+       AO_XSIZE_fetch_and_add1_acquire_read(addr)
+#    define AO_HAVE_XSIZE_fetch_and_add1_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_XSIZE_fetch_and_add1)
+#    define AO_XSIZE_fetch_and_add1_dd_acquire_read(addr) \
+       AO_XSIZE_fetch_and_add1(addr)
+#    define AO_HAVE_XSIZE_fetch_and_add1_dd_acquire_read
+#  endif
+#endif
+
+/* XSIZE_fetch_and_sub1 */
+
+#if defined(AO_HAVE_XSIZE_fetch_and_add_full) &&\
+    !defined(AO_HAVE_XSIZE_fetch_and_sub1_full)
+#  define AO_XSIZE_fetch_and_sub1_full(addr) \
+       AO_XSIZE_fetch_and_add_full(addr,(unsigned XCTYPE)(-1))
+#  define AO_HAVE_XSIZE_fetch_and_sub1_full
+#endif
+#if defined(AO_HAVE_XSIZE_fetch_and_add_release) &&\
+    !defined(AO_HAVE_XSIZE_fetch_and_sub1_release)
+#  define AO_XSIZE_fetch_and_sub1_release(addr) \
+       AO_XSIZE_fetch_and_add_release(addr,(unsigned XCTYPE)(-1))
+#  define AO_HAVE_XSIZE_fetch_and_sub1_release
+#endif
+#if defined(AO_HAVE_XSIZE_fetch_and_add_acquire) &&\
+    !defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire)
+#  define AO_XSIZE_fetch_and_sub1_acquire(addr) \
+       AO_XSIZE_fetch_and_add_acquire(addr,(unsigned XCTYPE)(-1))
+#  define AO_HAVE_XSIZE_fetch_and_sub1_acquire
+#endif
+#if defined(AO_HAVE_XSIZE_fetch_and_add_write) &&\
+    !defined(AO_HAVE_XSIZE_fetch_and_sub1_write)
+#  define AO_XSIZE_fetch_and_sub1_write(addr) \
+       AO_XSIZE_fetch_and_add_write(addr,(unsigned XCTYPE)(-1))
+#  define AO_HAVE_XSIZE_fetch_and_sub1_write
+#endif
+#if defined(AO_HAVE_XSIZE_fetch_and_add_read) &&\
+    !defined(AO_HAVE_XSIZE_fetch_and_sub1_read)
+#  define AO_XSIZE_fetch_and_sub1_read(addr) \
+       AO_XSIZE_fetch_and_add_read(addr,(unsigned XCTYPE)(-1))
+#  define AO_HAVE_XSIZE_fetch_and_sub1_read
+#endif
+#if defined(AO_HAVE_XSIZE_fetch_and_add_release_write) &&\
+    !defined(AO_HAVE_XSIZE_fetch_and_sub1_release_write)
+#  define AO_XSIZE_fetch_and_sub1_release_write(addr) \
+       AO_XSIZE_fetch_and_add_release_write(addr,(unsigned XCTYPE)(-1))
+#  define AO_HAVE_XSIZE_fetch_and_sub1_release_write
+#endif
+#if defined(AO_HAVE_XSIZE_fetch_and_add_acquire_read) &&\
+    !defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire_read)
+#  define AO_XSIZE_fetch_and_sub1_acquire_read(addr) \
+       AO_XSIZE_fetch_and_add_acquire_read(addr,(unsigned XCTYPE)(-1))
+#  define AO_HAVE_XSIZE_fetch_and_sub1_acquire_read
+#endif
+#if defined(AO_HAVE_XSIZE_fetch_and_add) &&\
+    !defined(AO_HAVE_XSIZE_fetch_and_sub1)
+#  define AO_XSIZE_fetch_and_sub1(addr) \
+       AO_XSIZE_fetch_and_add(addr,(unsigned XCTYPE)(-1))
+#  define AO_HAVE_XSIZE_fetch_and_sub1
+#endif
+
+#if defined(AO_HAVE_XSIZE_fetch_and_sub1_full)
+#  if !defined(AO_HAVE_XSIZE_fetch_and_sub1_release)
+#    define AO_XSIZE_fetch_and_sub1_release(addr) \
+        AO_XSIZE_fetch_and_sub1_full(addr)
+#    define AO_HAVE_XSIZE_fetch_and_sub1_release
+#  endif
+#  if !defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire)
+#    define AO_XSIZE_fetch_and_sub1_acquire(addr) \
+        AO_XSIZE_fetch_and_sub1_full(addr)
+#    define AO_HAVE_XSIZE_fetch_and_sub1_acquire
+#  endif
+#  if !defined(AO_HAVE_XSIZE_fetch_and_sub1_write)
+#    define AO_XSIZE_fetch_and_sub1_write(addr) \
+        AO_XSIZE_fetch_and_sub1_full(addr)
+#    define AO_HAVE_XSIZE_fetch_and_sub1_write
+#  endif
+#  if !defined(AO_HAVE_XSIZE_fetch_and_sub1_read)
+#    define AO_XSIZE_fetch_and_sub1_read(addr) \
+        AO_XSIZE_fetch_and_sub1_full(addr)
+#    define AO_HAVE_XSIZE_fetch_and_sub1_read
+#  endif
+#endif /* AO_HAVE_XSIZE_fetch_and_sub1_full */
+
+#if !defined(AO_HAVE_XSIZE_fetch_and_sub1) && \
+    defined(AO_HAVE_XSIZE_fetch_and_sub1_release)
+#  define AO_XSIZE_fetch_and_sub1(addr) \
+       AO_XSIZE_fetch_and_sub1_release(addr)
+#  define AO_HAVE_XSIZE_fetch_and_sub1
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_sub1) && \
+    defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire)
+#  define AO_XSIZE_fetch_and_sub1(addr) \
+       AO_XSIZE_fetch_and_sub1_acquire(addr)
+#  define AO_HAVE_XSIZE_fetch_and_sub1
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_sub1) && \
+    defined(AO_HAVE_XSIZE_fetch_and_sub1_write)
+#  define AO_XSIZE_fetch_and_sub1(addr) \
+       AO_XSIZE_fetch_and_sub1_write(addr)
+#  define AO_HAVE_XSIZE_fetch_and_sub1
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_sub1) && \
+    defined(AO_HAVE_XSIZE_fetch_and_sub1_read)
+#  define AO_XSIZE_fetch_and_sub1(addr) \
+       AO_XSIZE_fetch_and_sub1_read(addr)
+#  define AO_HAVE_XSIZE_fetch_and_sub1
+#endif
+
+#if defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_XSIZE_fetch_and_sub1_full)
+#  define AO_XSIZE_fetch_and_sub1_full(addr) \
+       (AO_nop_full(), AO_XSIZE_fetch_and_sub1_acquire(addr))
+#  define AO_HAVE_XSIZE_fetch_and_sub1_full
+#endif
+
+#if !defined(AO_HAVE_XSIZE_fetch_and_sub1_release_write) && \
+    defined(AO_HAVE_XSIZE_fetch_and_sub1_write)
+#  define AO_XSIZE_fetch_and_sub1_release_write(addr) \
+       AO_XSIZE_fetch_and_sub1_write(addr)
+#  define AO_HAVE_XSIZE_fetch_and_sub1_release_write
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_sub1_release_write) && \
+    defined(AO_HAVE_XSIZE_fetch_and_sub1_release)
+#  define AO_XSIZE_fetch_and_sub1_release_write(addr) \
+       AO_XSIZE_fetch_and_sub1_release(addr)
+#  define AO_HAVE_XSIZE_fetch_and_sub1_release_write
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire_read) && \
+    defined(AO_HAVE_XSIZE_fetch_and_sub1_read)
+#  define AO_XSIZE_fetch_and_sub1_acquire_read(addr) \
+       AO_XSIZE_fetch_and_sub1_read(addr)
+#  define AO_HAVE_XSIZE_fetch_and_sub1_acquire_read
+#endif
+#if !defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire_read) && \
+    defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire)
+#  define AO_XSIZE_fetch_and_sub1_acquire_read(addr) \
+       AO_XSIZE_fetch_and_sub1_acquire(addr)
+#  define AO_HAVE_XSIZE_fetch_and_sub1_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_XSIZE_fetch_and_sub1_acquire_read)
+#    define AO_XSIZE_fetch_and_sub1_dd_acquire_read(addr) \
+       AO_XSIZE_fetch_and_sub1_acquire_read(addr)
+#    define AO_HAVE_XSIZE_fetch_and_sub1_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_XSIZE_fetch_and_sub1)
+#    define AO_XSIZE_fetch_and_sub1_dd_acquire_read(addr) \
+       AO_XSIZE_fetch_and_sub1(addr)
+#    define AO_HAVE_XSIZE_fetch_and_sub1_dd_acquire_read
+#  endif
+#endif
+
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/generalize.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/generalize.h
new file mode 100644 (file)
index 0000000..05dc508
--- /dev/null
@@ -0,0 +1,1355 @@
+/*
+ * Copyright (c) 2003-2004 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Generalize atomic operations for atomic_ops.h.
+ * Should not be included directly.
+ *
+ * We make no attempt to define useless operations, such as
+ * AO_nop_acquire
+ * AO_nop_release
+ *
+ * We have also so far neglected to define some others, which
+ * do not appear likely to be useful, e.g. stores with acquire
+ * or read barriers.
+ *
+ * This file is sometimes included twice by atomic_ops.h.
+ * All definitions include explicit checks that we are not replacing
+ * an earlier definition.  In general, more desirable expansions
+ * appear earlier so that we are more likely to use them.
+ *
+ * We only make safe generalizations, except that by default we define
+ * the ...dd_acquire_read operations to be equivalent to those without
+ * a barrier.  On platforms for which this is unsafe, the platform-specific
+ * file must define AO_NO_DD_ORDERING.
+ */
+
+#ifndef ATOMIC_OPS_H
+# error Atomic_ops_generalize.h should not be included directly.
+#endif
+
+#if AO_CHAR_TS_T
+# define AO_TS_COMPARE_AND_SWAP_FULL(a,o,n) \
+         AO_char_compare_and_swap_full(a,o,n)
+# define AO_TS_COMPARE_AND_SWAP_ACQUIRE(a,o,n) \
+         AO_char_compare_and_swap_acquire(a,o,n)
+# define AO_TS_COMPARE_AND_SWAP_RELEASE(a,o,n) \
+         AO_char_compare_and_swap_release(a,o,n)
+# define AO_TS_COMPARE_AND_SWAP(a,o,n) \
+         AO_char_compare_and_swap(a,o,n)
+#endif
+
+#if AO_AO_TS_T
+# define AO_TS_COMPARE_AND_SWAP_FULL(a,o,n) \
+         AO_compare_and_swap_full(a,o,n)
+# define AO_TS_COMPARE_AND_SWAP_ACQUIRE(a,o,n) \
+         AO_compare_and_swap_acquire(a,o,n)
+# define AO_TS_COMPARE_AND_SWAP_RELEASE(a,o,n) \
+         AO_compare_and_swap_release(a,o,n)
+# define AO_TS_COMPARE_AND_SWAP(a,o,n) \
+         AO_compare_and_swap(a,o,n)
+#endif
+
+/* Generate test_and_set_full, if necessary and possible.       */
+#if !defined(AO_HAVE_test_and_set) && \
+    !defined(AO_HAVE_test_and_set_release) && \
+    !defined(AO_HAVE_test_and_set_acquire) && \
+    !defined(AO_HAVE_test_and_set_read) && \
+    !defined(AO_HAVE_test_and_set_full)
+#  if AO_AO_TS_T && defined(AO_HAVE_compare_and_swap_full) || \
+      AO_CHAR_TS_T && defined(AO_HAVE_char_compare_and_swap_full)
+     AO_INLINE AO_TS_VAL_t
+     AO_test_and_set_full(volatile AO_TS_t *addr)
+     {
+       if (AO_TS_COMPARE_AND_SWAP_FULL(addr, AO_TS_CLEAR, AO_TS_SET))
+         return AO_TS_CLEAR;
+       else
+         return AO_TS_SET;
+     }
+#    define AO_HAVE_test_and_set_full
+#  endif /* AO_HAVE_compare_and_swap_full */
+
+#  if AO_AO_TS_T && defined(AO_HAVE_compare_and_swap_acquire) || \
+      AO_CHAR_TS_T && defined(AO_HAVE_char_compare_and_swap_acquire)
+     AO_INLINE AO_TS_VAL_t
+     AO_test_and_set_acquire(volatile AO_TS_t *addr)
+     {
+       if (AO_TS_COMPARE_AND_SWAP_ACQUIRE(addr, AO_TS_CLEAR, AO_TS_SET))
+         return AO_TS_CLEAR;
+       else
+         return AO_TS_SET;
+     }
+#    define AO_HAVE_test_and_set_acquire
+#  endif /* AO_HAVE_compare_and_swap_acquire */
+
+#  if AO_AO_TS_T && defined(AO_HAVE_compare_and_swap_release) || \
+      AO_CHAR_TS_T && defined(AO_HAVE_char_compare_and_swap_release)
+     AO_INLINE AO_TS_VAL_t
+     AO_test_and_set_release(volatile AO_TS_t *addr)
+     {
+       if (AO_TS_COMPARE_AND_SWAP_RELEASE(addr, AO_TS_CLEAR, AO_TS_SET))
+         return AO_TS_CLEAR;
+       else
+         return AO_TS_SET;
+     }
+#    define AO_HAVE_test_and_set_release
+#  endif /* AO_HAVE_compare_and_swap_release */
+
+#  if AO_AO_TS_T && defined(AO_HAVE_compare_and_swap) || \
+      AO_CHAR_TS_T && defined(AO_HAVE_char_compare_and_swap)
+     AO_INLINE AO_TS_VAL_t
+     AO_test_and_set(volatile AO_TS_t *addr)
+     {
+       if (AO_TS_COMPARE_AND_SWAP(addr, AO_TS_CLEAR, AO_TS_SET))
+         return AO_TS_CLEAR;
+       else
+         return AO_TS_SET;
+     }
+#    define AO_HAVE_test_and_set
+#  endif /* AO_HAVE_compare_and_swap */
+
+#  if defined(AO_HAVE_test_and_set) && defined(AO_HAVE_nop_full) \
+      && !defined(AO_HAVE_test_and_set_acquire)
+     AO_INLINE AO_TS_VAL_t
+     AO_test_and_set_acquire(volatile AO_TS_t *addr)
+     {
+       AO_TS_VAL_t result = AO_test_and_set(addr);
+       AO_nop_full();
+       return result;
+     }
+#    define AO_HAVE_test_and_set_acquire
+#  endif
+
+#endif /* No prior test and set */
+
+/* Nop */
+#if !defined(AO_HAVE_nop)
+   AO_INLINE void AO_nop(void) {}
+#  define AO_HAVE_nop
+#endif
+
+#if defined(AO_HAVE_test_and_set_full) && !defined(AO_HAVE_nop_full)
+   AO_INLINE void
+   AO_nop_full(void)
+   {
+     AO_TS_t dummy = AO_TS_INITIALIZER;
+     AO_test_and_set_full(&dummy);
+   }
+#  define AO_HAVE_nop_full
+#endif
+
+#if defined(AO_HAVE_nop_acquire)
+#  error AO_nop_acquire is useless: dont define.
+#endif
+#if defined(AO_HAVE_nop_release)
+#  error AO_nop_release is useless: dont define.
+#endif
+
+#if defined(AO_HAVE_nop_full) && !defined(AO_HAVE_nop_read)
+#  define AO_nop_read() AO_nop_full()
+#  define AO_HAVE_nop_read
+#endif
+
+#if defined(AO_HAVE_nop_full) && !defined(AO_HAVE_nop_write)
+#  define AO_nop_write() AO_nop_full()
+#  define AO_HAVE_nop_write
+#endif
+
+/* Load */
+#if defined(AO_HAVE_load_full) && !defined(AO_HAVE_load_acquire)
+#  define AO_load_acquire(addr) AO_load_full(addr)
+#  define AO_HAVE_load_acquire
+#endif
+
+#if defined(AO_HAVE_load_acquire) && !defined(AO_HAVE_load)
+#  define AO_load(addr) AO_load_acquire(addr)
+#  define AO_HAVE_load
+#endif
+
+#if defined(AO_HAVE_load_full) && !defined(AO_HAVE_load_read)
+#  define AO_load_read(addr) AO_load_full(addr)
+#  define AO_HAVE_load_read
+#endif
+
+#if !defined(AO_HAVE_load_acquire_read) && defined(AO_HAVE_load_acquire)
+#  define AO_load_acquire_read(addr) AO_load_acquire(addr)
+#  define AO_HAVE_load_acquire_read
+#endif
+
+#if defined(AO_HAVE_load) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_load_acquire)
+   AO_INLINE AO_t
+   AO_load_acquire(const volatile AO_t *addr)
+   {
+     AO_t result = AO_load(addr);
+     /* Acquire barrier would be useless, since the load could be delayed  */
+     /* beyond it.                                                         */
+     AO_nop_full();
+     return result;
+   }
+#  define AO_HAVE_load_acquire
+#endif
+
+#if defined(AO_HAVE_load) && defined(AO_HAVE_nop_read) && \
+    !defined(AO_HAVE_load_read)
+   AO_INLINE AO_t
+   AO_load_read(const volatile AO_t *addr)
+   {
+     AO_t result = AO_load(addr);
+     /* Acquire barrier would be useless, since the load could be delayed  */
+     /* beyond it.                                                         */
+     AO_nop_read();
+     return result;
+   }
+#  define AO_HAVE_load_read
+#endif
+
+#if defined(AO_HAVE_load_acquire) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_load_full)
+#  define AO_load_full(addr) (AO_nop_full(), AO_load_acquire(addr))
+#  define AO_HAVE_load_full
+#endif
+
+#if !defined(AO_HAVE_load_acquire_read) && defined(AO_HAVE_load_read)
+#  define AO_load_acquire_read(addr) AO_load_read(addr)
+#  define AO_HAVE_load_acquire_read
+#endif
+
+#if defined(AO_HAVE_load_acquire_read) && !defined(AO_HAVE_load)
+#  define AO_load(addr) AO_load_acquire_read(addr)
+#  define AO_HAVE_load
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_load_acquire_read)
+#    define AO_load_dd_acquire_read(addr) AO_load_acquire_read(addr)
+#    define AO_HAVE_load_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_load)
+#    define AO_load_dd_acquire_read(addr) AO_load(addr)
+#    define AO_HAVE_load_dd_acquire_read
+#  endif
+#endif
+
+
+/* Store */
+
+#if defined(AO_HAVE_store_full) && !defined(AO_HAVE_store_release)
+#  define AO_store_release(addr,val) AO_store_full(addr,val)
+#  define AO_HAVE_store_release
+#endif
+
+#if defined(AO_HAVE_store_release) && !defined(AO_HAVE_store)
+#  define AO_store(addr, val) AO_store_release(addr,val)
+#  define AO_HAVE_store
+#endif
+
+#if defined(AO_HAVE_store_full) && !defined(AO_HAVE_store_write)
+#  define AO_store_write(addr,val) AO_store_full(addr,val)
+#  define AO_HAVE_store_write
+#endif
+
+#if defined(AO_HAVE_store_release) && !defined(AO_HAVE_store_release_write)
+#  define AO_store_release_write(addr, val) AO_store_release(addr,val)
+#  define AO_HAVE_store_release_write
+#endif
+
+#if defined(AO_HAVE_store_write) && !defined(AO_HAVE_store)
+#  define AO_store(addr, val) AO_store_write(addr,val)
+#  define AO_HAVE_store
+#endif
+
+#if defined(AO_HAVE_store) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_store_release)
+#  define AO_store_release(addr,val) (AO_nop_full(), AO_store(addr,val))
+#  define AO_HAVE_store_release
+#endif
+
+#if defined(AO_HAVE_nop_write) && defined(AO_HAVE_store) && \
+     !defined(AO_HAVE_store_write)
+#  define AO_store_write(addr, val) (AO_nop_write(), AO_store(addr,val))
+#  define AO_HAVE_store_write
+#endif
+
+#if defined(AO_HAVE_store_write) && !defined(AO_HAVE_store_release_write)
+#  define AO_store_release_write(addr, val) AO_store_write(addr,val)
+#  define AO_HAVE_store_release_write
+#endif
+
+#if defined(AO_HAVE_store_release) && defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_store_full)
+#  define AO_store_full(addr, val) (AO_store_release(addr, val), AO_nop_full())
+#  define AO_HAVE_store_full
+#endif
+
+/* NEC LE-IT: Test and set */
+#if defined(AO_HAVE_test_and_set) && \
+        defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_test_and_set_release)
+#       define AO_test_and_set_release(addr) \
+        (AO_nop_full(), AO_test_and_set(addr))
+#  define AO_HAVE_test_and_set_release
+#endif
+
+#if defined(AO_HAVE_test_and_set) && \
+        defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_test_and_set_acquire)
+AO_INLINE AO_TS_t
+AO_test_and_set_acquire(volatile AO_TS_t *addr)
+{
+        AO_TS_t res = AO_test_and_set(addr);
+        AO_nop_full();
+        return res;
+}
+#  define AO_HAVE_test_and_set_acquire
+#endif
+
+
+/* Fetch_and_add */
+/* We first try to implement fetch_and_add variants in terms    */
+/* of the corresponding compare_and_swap variants to minimize   */
+/* adding barriers.                                             */
+#if defined(AO_HAVE_compare_and_swap_full) && \
+    !defined(AO_HAVE_fetch_and_add_full)
+   AO_INLINE AO_t
+   AO_fetch_and_add_full(volatile AO_t *addr, AO_t incr)
+   {
+     AO_t old;
+     do
+       {
+         old = *addr;
+       }
+     while (!AO_compare_and_swap_full(addr, old, old+incr));
+     return old;
+   }
+#  define AO_HAVE_fetch_and_add_full
+#endif
+
+#if defined(AO_HAVE_compare_and_swap_acquire) && \
+    !defined(AO_HAVE_fetch_and_add_acquire)
+   AO_INLINE AO_t
+   AO_fetch_and_add_acquire(volatile AO_t *addr, AO_t incr)
+   {
+     AO_t old;
+     do
+       {
+         old = *addr;
+       }
+     while (!AO_compare_and_swap_acquire(addr, old, old+incr));
+     return old;
+   }
+#  define AO_HAVE_fetch_and_add_acquire
+#endif
+
+#if defined(AO_HAVE_compare_and_swap_release) && \
+    !defined(AO_HAVE_fetch_and_add_release)
+   AO_INLINE AO_t
+   AO_fetch_and_add_release(volatile AO_t *addr, AO_t incr)
+   {
+     AO_t old;
+     do
+       {
+         old = *addr;
+       }
+     while (!AO_compare_and_swap_release(addr, old, old+incr));
+     return old;
+   }
+#  define AO_HAVE_fetch_and_add_release
+#endif
+
+#if defined(AO_HAVE_compare_and_swap) && \
+    !defined(AO_HAVE_fetch_and_add)
+   AO_INLINE AO_t
+   AO_fetch_and_add(volatile AO_t *addr, AO_t incr)
+   {
+     AO_t old;
+     do
+       {
+         old = *addr;
+       }
+     while (!AO_compare_and_swap(addr, old, old+incr));
+     return old;
+   }
+#  define AO_HAVE_fetch_and_add
+#endif
+
+#if defined(AO_HAVE_fetch_and_add_full)
+#  if !defined(AO_HAVE_fetch_and_add_release)
+#    define AO_fetch_and_add_release(addr, val) \
+         AO_fetch_and_add_full(addr, val)
+#    define AO_HAVE_fetch_and_add_release
+#  endif
+#  if !defined(AO_HAVE_fetch_and_add_acquire)
+#    define AO_fetch_and_add_acquire(addr, val) \
+         AO_fetch_and_add_full(addr, val)
+#    define AO_HAVE_fetch_and_add_acquire
+#  endif
+#  if !defined(AO_HAVE_fetch_and_add_write)
+#    define AO_fetch_and_add_write(addr, val) \
+         AO_fetch_and_add_full(addr, val)
+#    define AO_HAVE_fetch_and_add_write
+#  endif
+#  if !defined(AO_HAVE_fetch_and_add_read)
+#    define AO_fetch_and_add_read(addr, val) \
+         AO_fetch_and_add_full(addr, val)
+#    define AO_HAVE_fetch_and_add_read
+#  endif
+#endif /* AO_HAVE_fetch_and_add_full */
+
+#if !defined(AO_HAVE_fetch_and_add) && \
+    defined(AO_HAVE_fetch_and_add_release)
+#  define AO_fetch_and_add(addr, val) \
+        AO_fetch_and_add_release(addr, val)
+#  define AO_HAVE_fetch_and_add
+#endif
+#if !defined(AO_HAVE_fetch_and_add) && \
+    defined(AO_HAVE_fetch_and_add_acquire)
+#  define AO_fetch_and_add(addr, val) \
+        AO_fetch_and_add_acquire(addr, val)
+#  define AO_HAVE_fetch_and_add
+#endif
+#if !defined(AO_HAVE_fetch_and_add) && \
+    defined(AO_HAVE_fetch_and_add_write)
+#  define AO_fetch_and_add(addr, val) \
+        AO_fetch_and_add_write(addr, val)
+#  define AO_HAVE_fetch_and_add
+#endif
+#if !defined(AO_HAVE_fetch_and_add) && \
+    defined(AO_HAVE_fetch_and_add_read)
+#  define AO_fetch_and_add(addr, val) \
+        AO_fetch_and_add_read(addr, val)
+#  define AO_HAVE_fetch_and_add
+#endif
+
+#if defined(AO_HAVE_fetch_and_add_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_fetch_and_add_full)
+#  define AO_fetch_and_add_full(addr, val) \
+        (AO_nop_full(), AO_fetch_and_add_acquire(addr, val))
+#  define AO_HAVE_fetch_and_add_full
+#endif
+
+#if !defined(AO_HAVE_fetch_and_add_release_write) && \
+    defined(AO_HAVE_fetch_and_add_write)
+#  define AO_fetch_and_add_release_write(addr, val) \
+        AO_fetch_and_add_write(addr, val)
+#  define AO_HAVE_fetch_and_add_release_write
+#endif
+#if !defined(AO_HAVE_fetch_and_add_release_write) && \
+    defined(AO_HAVE_fetch_and_add_release)
+#  define AO_fetch_and_add_release_write(addr, val) \
+        AO_fetch_and_add_release(addr, val)
+#  define AO_HAVE_fetch_and_add_release_write
+#endif
+#if !defined(AO_HAVE_fetch_and_add_acquire_read) && \
+    defined(AO_HAVE_fetch_and_add_read)
+#  define AO_fetch_and_add_acquire_read(addr, val) \
+        AO_fetch_and_add_read(addr, val)
+#  define AO_HAVE_fetch_and_add_acquire_read
+#endif
+#if !defined(AO_HAVE_fetch_and_add_acquire_read) && \
+    defined(AO_HAVE_fetch_and_add_acquire)
+#  define AO_fetch_and_add_acquire_read(addr, val) \
+        AO_fetch_and_add_acquire(addr, val)
+#  define AO_HAVE_fetch_and_add_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_fetch_and_add_acquire_read)
+#    define AO_fetch_and_add_dd_acquire_read(addr, val) \
+        AO_fetch_and_add_acquire_read(addr, val)
+#    define AO_HAVE_fetch_and_add_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_fetch_and_add)
+#    define AO_fetch_and_add_dd_acquire_read(addr, val) \
+        AO_fetch_and_add(addr, val)
+#    define AO_HAVE_fetch_and_add_dd_acquire_read
+#  endif
+#endif
+
+/* Fetch_and_add1 */
+
+#if defined(AO_HAVE_fetch_and_add_full) &&\
+    !defined(AO_HAVE_fetch_and_add1_full)
+#  define AO_fetch_and_add1_full(addr) AO_fetch_and_add_full(addr,1)
+#  define AO_HAVE_fetch_and_add1_full
+#endif
+#if defined(AO_HAVE_fetch_and_add_release) &&\
+    !defined(AO_HAVE_fetch_and_add1_release)
+#  define AO_fetch_and_add1_release(addr) AO_fetch_and_add_release(addr,1)
+#  define AO_HAVE_fetch_and_add1_release
+#endif
+#if defined(AO_HAVE_fetch_and_add_acquire) &&\
+    !defined(AO_HAVE_fetch_and_add1_acquire)
+#  define AO_fetch_and_add1_acquire(addr) AO_fetch_and_add_acquire(addr,1)
+#  define AO_HAVE_fetch_and_add1_acquire
+#endif
+#if defined(AO_HAVE_fetch_and_add_write) &&\
+    !defined(AO_HAVE_fetch_and_add1_write)
+#  define AO_fetch_and_add1_write(addr) AO_fetch_and_add_write(addr,1)
+#  define AO_HAVE_fetch_and_add1_write
+#endif
+#if defined(AO_HAVE_fetch_and_add_read) &&\
+    !defined(AO_HAVE_fetch_and_add1_read)
+#  define AO_fetch_and_add1_read(addr) AO_fetch_and_add_read(addr,1)
+#  define AO_HAVE_fetch_and_add1_read
+#endif
+#if defined(AO_HAVE_fetch_and_add_release_write) &&\
+    !defined(AO_HAVE_fetch_and_add1_release_write)
+#  define AO_fetch_and_add1_release_write(addr) \
+        AO_fetch_and_add_release_write(addr,1)
+#  define AO_HAVE_fetch_and_add1_release_write
+#endif
+#if defined(AO_HAVE_fetch_and_add_acquire_read) &&\
+    !defined(AO_HAVE_fetch_and_add1_acquire_read)
+#  define AO_fetch_and_add1_acquire_read(addr) \
+        AO_fetch_and_add_acquire_read(addr,1)
+#  define AO_HAVE_fetch_and_add1_acquire_read
+#endif
+#if defined(AO_HAVE_fetch_and_add) &&\
+    !defined(AO_HAVE_fetch_and_add1)
+#  define AO_fetch_and_add1(addr) \
+        AO_fetch_and_add(addr,1)
+#  define AO_HAVE_fetch_and_add1
+#endif
+
+#if defined(AO_HAVE_fetch_and_add1_full)
+#  if !defined(AO_HAVE_fetch_and_add1_release)
+#    define AO_fetch_and_add1_release(addr) \
+         AO_fetch_and_add1_full(addr)
+#    define AO_HAVE_fetch_and_add1_release
+#  endif
+#  if !defined(AO_HAVE_fetch_and_add1_acquire)
+#    define AO_fetch_and_add1_acquire(addr) \
+         AO_fetch_and_add1_full(addr)
+#    define AO_HAVE_fetch_and_add1_acquire
+#  endif
+#  if !defined(AO_HAVE_fetch_and_add1_write)
+#    define AO_fetch_and_add1_write(addr) \
+         AO_fetch_and_add1_full(addr)
+#    define AO_HAVE_fetch_and_add1_write
+#  endif
+#  if !defined(AO_HAVE_fetch_and_add1_read)
+#    define AO_fetch_and_add1_read(addr) \
+         AO_fetch_and_add1_full(addr)
+#    define AO_HAVE_fetch_and_add1_read
+#  endif
+#endif /* AO_HAVE_fetch_and_add1_full */
+
+#if !defined(AO_HAVE_fetch_and_add1) && \
+    defined(AO_HAVE_fetch_and_add1_release)
+#  define AO_fetch_and_add1(addr) \
+        AO_fetch_and_add1_release(addr)
+#  define AO_HAVE_fetch_and_add1
+#endif
+#if !defined(AO_HAVE_fetch_and_add1) && \
+    defined(AO_HAVE_fetch_and_add1_acquire)
+#  define AO_fetch_and_add1(addr) \
+        AO_fetch_and_add1_acquire(addr)
+#  define AO_HAVE_fetch_and_add1
+#endif
+#if !defined(AO_HAVE_fetch_and_add1) && \
+    defined(AO_HAVE_fetch_and_add1_write)
+#  define AO_fetch_and_add1(addr) \
+        AO_fetch_and_add1_write(addr)
+#  define AO_HAVE_fetch_and_add1
+#endif
+#if !defined(AO_HAVE_fetch_and_add1) && \
+    defined(AO_HAVE_fetch_and_add1_read)
+#  define AO_fetch_and_add1(addr) \
+        AO_fetch_and_add1_read(addr)
+#  define AO_HAVE_fetch_and_add1
+#endif
+
+#if defined(AO_HAVE_fetch_and_add1_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_fetch_and_add1_full)
+#  define AO_fetch_and_add1_full(addr) \
+        (AO_nop_full(), AO_fetch_and_add1_acquire(addr))
+#  define AO_HAVE_fetch_and_add1_full
+#endif
+
+#if !defined(AO_HAVE_fetch_and_add1_release_write) && \
+    defined(AO_HAVE_fetch_and_add1_write)
+#  define AO_fetch_and_add1_release_write(addr) \
+        AO_fetch_and_add1_write(addr)
+#  define AO_HAVE_fetch_and_add1_release_write
+#endif
+#if !defined(AO_HAVE_fetch_and_add1_release_write) && \
+    defined(AO_HAVE_fetch_and_add1_release)
+#  define AO_fetch_and_add1_release_write(addr) \
+        AO_fetch_and_add1_release(addr)
+#  define AO_HAVE_fetch_and_add1_release_write
+#endif
+#if !defined(AO_HAVE_fetch_and_add1_acquire_read) && \
+    defined(AO_HAVE_fetch_and_add1_read)
+#  define AO_fetch_and_add1_acquire_read(addr) \
+        AO_fetch_and_add1_read(addr)
+#  define AO_HAVE_fetch_and_add1_acquire_read
+#endif
+#if !defined(AO_HAVE_fetch_and_add1_acquire_read) && \
+    defined(AO_HAVE_fetch_and_add1_acquire)
+#  define AO_fetch_and_add1_acquire_read(addr) \
+        AO_fetch_and_add1_acquire(addr)
+#  define AO_HAVE_fetch_and_add1_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_fetch_and_add1_acquire_read)
+#    define AO_fetch_and_add1_dd_acquire_read(addr) \
+        AO_fetch_and_add1_acquire_read(addr)
+#    define AO_HAVE_fetch_and_add1_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_fetch_and_add1)
+#    define AO_fetch_and_add1_dd_acquire_read(addr) AO_fetch_and_add1(addr)
+#    define AO_HAVE_fetch_and_add1_dd_acquire_read
+#  endif
+#endif
+
+/* Fetch_and_sub1 */
+
+#if defined(AO_HAVE_fetch_and_add_full) &&\
+    !defined(AO_HAVE_fetch_and_sub1_full)
+#  define AO_fetch_and_sub1_full(addr) AO_fetch_and_add_full(addr,(AO_t)(-1))
+#  define AO_HAVE_fetch_and_sub1_full
+#endif
+#if defined(AO_HAVE_fetch_and_add_release) &&\
+    !defined(AO_HAVE_fetch_and_sub1_release)
+#  define AO_fetch_and_sub1_release(addr) \
+        AO_fetch_and_add_release(addr,(AO_t)(-1))
+#  define AO_HAVE_fetch_and_sub1_release
+#endif
+#if defined(AO_HAVE_fetch_and_add_acquire) &&\
+    !defined(AO_HAVE_fetch_and_sub1_acquire)
+#  define AO_fetch_and_sub1_acquire(addr) \
+        AO_fetch_and_add_acquire(addr,(AO_t)(-1))
+#  define AO_HAVE_fetch_and_sub1_acquire
+#endif
+#if defined(AO_HAVE_fetch_and_add_write) &&\
+    !defined(AO_HAVE_fetch_and_sub1_write)
+#  define AO_fetch_and_sub1_write(addr) \
+        AO_fetch_and_add_write(addr,(AO_t)(-1))
+#  define AO_HAVE_fetch_and_sub1_write
+#endif
+#if defined(AO_HAVE_fetch_and_add_read) &&\
+    !defined(AO_HAVE_fetch_and_sub1_read)
+#  define AO_fetch_and_sub1_read(addr) \
+        AO_fetch_and_add_read(addr,(AO_t)(-1))
+#  define AO_HAVE_fetch_and_sub1_read
+#endif
+#if defined(AO_HAVE_fetch_and_add_release_write) &&\
+    !defined(AO_HAVE_fetch_and_sub1_release_write)
+#  define AO_fetch_and_sub1_release_write(addr) \
+        AO_fetch_and_add_release_write(addr,(AO_t)(-1))
+#  define AO_HAVE_fetch_and_sub1_release_write
+#endif
+#if defined(AO_HAVE_fetch_and_add_acquire_read) &&\
+    !defined(AO_HAVE_fetch_and_sub1_acquire_read)
+#  define AO_fetch_and_sub1_acquire_read(addr) \
+        AO_fetch_and_add_acquire_read(addr,(AO_t)(-1))
+#  define AO_HAVE_fetch_and_sub1_acquire_read
+#endif
+#if defined(AO_HAVE_fetch_and_add) &&\
+    !defined(AO_HAVE_fetch_and_sub1)
+#  define AO_fetch_and_sub1(addr) \
+        AO_fetch_and_add(addr,(AO_t)(-1))
+#  define AO_HAVE_fetch_and_sub1
+#endif
+
+#if defined(AO_HAVE_fetch_and_sub1_full)
+#  if !defined(AO_HAVE_fetch_and_sub1_release)
+#    define AO_fetch_and_sub1_release(addr) \
+         AO_fetch_and_sub1_full(addr)
+#    define AO_HAVE_fetch_and_sub1_release
+#  endif
+#  if !defined(AO_HAVE_fetch_and_sub1_acquire)
+#    define AO_fetch_and_sub1_acquire(addr) \
+         AO_fetch_and_sub1_full(addr)
+#    define AO_HAVE_fetch_and_sub1_acquire
+#  endif
+#  if !defined(AO_HAVE_fetch_and_sub1_write)
+#    define AO_fetch_and_sub1_write(addr) \
+         AO_fetch_and_sub1_full(addr)
+#    define AO_HAVE_fetch_and_sub1_write
+#  endif
+#  if !defined(AO_HAVE_fetch_and_sub1_read)
+#    define AO_fetch_and_sub1_read(addr) \
+         AO_fetch_and_sub1_full(addr)
+#    define AO_HAVE_fetch_and_sub1_read
+#  endif
+#endif /* AO_HAVE_fetch_and_sub1_full */
+
+#if !defined(AO_HAVE_fetch_and_sub1) && \
+    defined(AO_HAVE_fetch_and_sub1_release)
+#  define AO_fetch_and_sub1(addr) \
+        AO_fetch_and_sub1_release(addr)
+#  define AO_HAVE_fetch_and_sub1
+#endif
+#if !defined(AO_HAVE_fetch_and_sub1) && \
+    defined(AO_HAVE_fetch_and_sub1_acquire)
+#  define AO_fetch_and_sub1(addr) \
+        AO_fetch_and_sub1_acquire(addr)
+#  define AO_HAVE_fetch_and_sub1
+#endif
+#if !defined(AO_HAVE_fetch_and_sub1) && \
+    defined(AO_HAVE_fetch_and_sub1_write)
+#  define AO_fetch_and_sub1(addr) \
+        AO_fetch_and_sub1_write(addr)
+#  define AO_HAVE_fetch_and_sub1
+#endif
+#if !defined(AO_HAVE_fetch_and_sub1) && \
+    defined(AO_HAVE_fetch_and_sub1_read)
+#  define AO_fetch_and_sub1(addr) \
+        AO_fetch_and_sub1_read(addr)
+#  define AO_HAVE_fetch_and_sub1
+#endif
+
+#if defined(AO_HAVE_fetch_and_sub1_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_fetch_and_sub1_full)
+#  define AO_fetch_and_sub1_full(addr) \
+        (AO_nop_full(), AO_fetch_and_sub1_acquire(addr))
+#  define AO_HAVE_fetch_and_sub1_full
+#endif
+
+#if !defined(AO_HAVE_fetch_and_sub1_release_write) && \
+    defined(AO_HAVE_fetch_and_sub1_write)
+#  define AO_fetch_and_sub1_release_write(addr) \
+        AO_fetch_and_sub1_write(addr)
+#  define AO_HAVE_fetch_and_sub1_release_write
+#endif
+#if !defined(AO_HAVE_fetch_and_sub1_release_write) && \
+    defined(AO_HAVE_fetch_and_sub1_release)
+#  define AO_fetch_and_sub1_release_write(addr) \
+        AO_fetch_and_sub1_release(addr)
+#  define AO_HAVE_fetch_and_sub1_release_write
+#endif
+#if !defined(AO_HAVE_fetch_and_sub1_acquire_read) && \
+    defined(AO_HAVE_fetch_and_sub1_read)
+#  define AO_fetch_and_sub1_acquire_read(addr) \
+        AO_fetch_and_sub1_read(addr)
+#  define AO_HAVE_fetch_and_sub1_acquire_read
+#endif
+#if !defined(AO_HAVE_fetch_and_sub1_acquire_read) && \
+    defined(AO_HAVE_fetch_and_sub1_acquire)
+#  define AO_fetch_and_sub1_acquire_read(addr) \
+        AO_fetch_and_sub1_acquire(addr)
+#  define AO_HAVE_fetch_and_sub1_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_fetch_and_sub1_acquire_read)
+#    define AO_fetch_and_sub1_dd_acquire_read(addr) \
+        AO_fetch_and_sub1_acquire_read(addr)
+#    define AO_HAVE_fetch_and_sub1_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_fetch_and_sub1)
+#    define AO_fetch_and_sub1_dd_acquire_read(addr) AO_fetch_and_sub1(addr)
+#    define AO_HAVE_fetch_and_sub1_dd_acquire_read
+#  endif
+#endif
+
+/* Atomic or */
+#if defined(AO_HAVE_compare_and_swap_full) && \
+    !defined(AO_HAVE_or_full)
+   AO_INLINE void
+   AO_or_full(volatile AO_t *addr, AO_t incr)
+   {
+     AO_t old;
+     do
+       {
+         old = *addr;
+       }
+     while (!AO_compare_and_swap_full(addr, old, (old | incr)));
+   }
+#  define AO_HAVE_or_full
+#endif
+
+#if defined(AO_HAVE_or_full)
+#  if !defined(AO_HAVE_or_release)
+#    define AO_or_release(addr, val) \
+         AO_or_full(addr, val)
+#    define AO_HAVE_or_release
+#  endif
+#  if !defined(AO_HAVE_or_acquire)
+#    define AO_or_acquire(addr, val) \
+         AO_or_full(addr, val)
+#    define AO_HAVE_or_acquire
+#  endif
+#  if !defined(AO_HAVE_or_write)
+#    define AO_or_write(addr, val) \
+         AO_or_full(addr, val)
+#    define AO_HAVE_or_write
+#  endif
+#  if !defined(AO_HAVE_or_read)
+#    define AO_or_read(addr, val) \
+         AO_or_full(addr, val)
+#    define AO_HAVE_or_read
+#  endif
+#endif /* AO_HAVE_or_full */
+
+#if !defined(AO_HAVE_or) && \
+    defined(AO_HAVE_or_release)
+#  define AO_or(addr, val) \
+        AO_or_release(addr, val)
+#  define AO_HAVE_or
+#endif
+#if !defined(AO_HAVE_or) && \
+    defined(AO_HAVE_or_acquire)
+#  define AO_or(addr, val) \
+        AO_or_acquire(addr, val)
+#  define AO_HAVE_or
+#endif
+#if !defined(AO_HAVE_or) && \
+    defined(AO_HAVE_or_write)
+#  define AO_or(addr, val) \
+        AO_or_write(addr, val)
+#  define AO_HAVE_or
+#endif
+#if !defined(AO_HAVE_or) && \
+    defined(AO_HAVE_or_read)
+#  define AO_or(addr, val) \
+        AO_or_read(addr, val)
+#  define AO_HAVE_or
+#endif
+
+#if defined(AO_HAVE_or_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_or_full)
+#  define AO_or_full(addr, val) \
+        (AO_nop_full(), AO_or_acquire(addr, val))
+#endif
+
+#if !defined(AO_HAVE_or_release_write) && \
+    defined(AO_HAVE_or_write)
+#  define AO_or_release_write(addr, val) \
+        AO_or_write(addr, val)
+#  define AO_HAVE_or_release_write
+#endif
+#if !defined(AO_HAVE_or_release_write) && \
+    defined(AO_HAVE_or_release)
+#  define AO_or_release_write(addr, val) \
+        AO_or_release(addr, val)
+#  define AO_HAVE_or_release_write
+#endif
+#if !defined(AO_HAVE_or_acquire_read) && \
+    defined(AO_HAVE_or_read)
+#  define AO_or_acquire_read(addr, val) \
+        AO_or_read(addr, val)
+#  define AO_HAVE_or_acquire_read
+#endif
+#if !defined(AO_HAVE_or_acquire_read) && \
+    defined(AO_HAVE_or_acquire)
+#  define AO_or_acquire_read(addr, val) \
+        AO_or_acquire(addr, val)
+#  define AO_HAVE_or_acquire_read
+#endif
+
+/* dd_aquire_read is meaningless.       */
+
+/* Test_and_set */
+
+#if defined(AO_HAVE_test_and_set_full)
+#  if !defined(AO_HAVE_test_and_set_release)
+#    define AO_test_and_set_release(addr) \
+         AO_test_and_set_full(addr)
+#    define AO_HAVE_test_and_set_release
+#  endif
+#  if !defined(AO_HAVE_test_and_set_acquire)
+#    define AO_test_and_set_acquire(addr) \
+         AO_test_and_set_full(addr)
+#    define AO_HAVE_test_and_set_acquire
+#  endif
+#  if !defined(AO_HAVE_test_and_set_write)
+#    define AO_test_and_set_write(addr) \
+         AO_test_and_set_full(addr)
+#    define AO_HAVE_test_and_set_write
+#  endif
+#  if !defined(AO_HAVE_test_and_set_read)
+#    define AO_test_and_set_read(addr) \
+         AO_test_and_set_full(addr)
+#    define AO_HAVE_test_and_set_read
+#  endif
+#endif /* AO_HAVE_test_and_set_full */
+
+#if !defined(AO_HAVE_test_and_set) && \
+    defined(AO_HAVE_test_and_set_release)
+#  define AO_test_and_set(addr) \
+        AO_test_and_set_release(addr)
+#  define AO_HAVE_test_and_set
+#endif
+#if !defined(AO_HAVE_test_and_set) && \
+    defined(AO_HAVE_test_and_set_acquire)
+#  define AO_test_and_set(addr) \
+        AO_test_and_set_acquire(addr)
+#  define AO_HAVE_test_and_set
+#endif
+#if !defined(AO_HAVE_test_and_set) && \
+    defined(AO_HAVE_test_and_set_write)
+#  define AO_test_and_set(addr) \
+        AO_test_and_set_write(addr)
+#  define AO_HAVE_test_and_set
+#endif
+#if !defined(AO_HAVE_test_and_set) && \
+    defined(AO_HAVE_test_and_set_read)
+#  define AO_test_and_set(addr) \
+        AO_test_and_set_read(addr)
+#  define AO_HAVE_test_and_set
+#endif
+
+#if defined(AO_HAVE_test_and_set_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_test_and_set_full)
+#  define AO_test_and_set_full(addr) \
+        (AO_nop_full(), AO_test_and_set_acquire(addr))
+#  define AO_HAVE_test_and_set_full
+#endif
+
+#if !defined(AO_HAVE_test_and_set_release_write) && \
+    defined(AO_HAVE_test_and_set_write)
+#  define AO_test_and_set_release_write(addr) \
+        AO_test_and_set_write(addr)
+#  define AO_HAVE_test_and_set_release_write
+#endif
+#if !defined(AO_HAVE_test_and_set_release_write) && \
+    defined(AO_HAVE_test_and_set_release)
+#  define AO_test_and_set_release_write(addr) \
+        AO_test_and_set_release(addr)
+#  define AO_HAVE_test_and_set_release_write
+#endif
+#if !defined(AO_HAVE_test_and_set_acquire_read) && \
+    defined(AO_HAVE_test_and_set_read)
+#  define AO_test_and_set_acquire_read(addr) \
+        AO_test_and_set_read(addr)
+#  define AO_HAVE_test_and_set_acquire_read
+#endif
+#if !defined(AO_HAVE_test_and_set_acquire_read) && \
+    defined(AO_HAVE_test_and_set_acquire)
+#  define AO_test_and_set_acquire_read(addr) \
+        AO_test_and_set_acquire(addr)
+#  define AO_HAVE_test_and_set_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_test_and_set_acquire_read)
+#    define AO_test_and_set_dd_acquire_read(addr) \
+        AO_test_and_set_acquire_read(addr)
+#    define AO_HAVE_test_and_set_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_test_and_set)
+#    define AO_test_and_set_dd_acquire_read(addr) AO_test_and_set(addr)
+#    define AO_HAVE_test_and_set_dd_acquire_read
+#  endif
+#endif
+
+/* Compare_and_swap */
+#if defined(AO_HAVE_compare_and_swap) && defined(AO_HAVE_nop_full)\
+    && !defined(AO_HAVE_compare_and_swap_acquire)
+   AO_INLINE int
+   AO_compare_and_swap_acquire(volatile AO_t *addr, AO_t old, AO_t new_val)
+   {
+     int result = AO_compare_and_swap(addr, old, new_val);
+     AO_nop_full();
+     return result;
+   }
+#  define AO_HAVE_compare_and_swap_acquire
+#endif
+#if defined(AO_HAVE_compare_and_swap) && defined(AO_HAVE_nop_full)\
+    && !defined(AO_HAVE_compare_and_swap_release)
+#  define AO_compare_and_swap_release(addr, old, new_val) \
+        (AO_nop_full(), AO_compare_and_swap(addr, old, new_val))
+#  define AO_HAVE_compare_and_swap_release
+#endif
+#if defined(AO_HAVE_compare_and_swap_full)
+#  if !defined(AO_HAVE_compare_and_swap_release)
+#    define AO_compare_and_swap_release(addr, old, new_val) \
+         AO_compare_and_swap_full(addr, old, new_val)
+#    define AO_HAVE_compare_and_swap_release
+#  endif
+#  if !defined(AO_HAVE_compare_and_swap_acquire)
+#    define AO_compare_and_swap_acquire(addr, old, new_val) \
+         AO_compare_and_swap_full(addr, old, new_val)
+#    define AO_HAVE_compare_and_swap_acquire
+#  endif
+#  if !defined(AO_HAVE_compare_and_swap_write)
+#    define AO_compare_and_swap_write(addr, old, new_val) \
+         AO_compare_and_swap_full(addr, old, new_val)
+#    define AO_HAVE_compare_and_swap_write
+#  endif
+#  if !defined(AO_HAVE_compare_and_swap_read)
+#    define AO_compare_and_swap_read(addr, old, new_val) \
+         AO_compare_and_swap_full(addr, old, new_val)
+#    define AO_HAVE_compare_and_swap_read
+#  endif
+#endif /* AO_HAVE_compare_and_swap_full */
+
+#if !defined(AO_HAVE_compare_and_swap) && \
+    defined(AO_HAVE_compare_and_swap_release)
+#  define AO_compare_and_swap(addr, old, new_val) \
+        AO_compare_and_swap_release(addr, old, new_val)
+#  define AO_HAVE_compare_and_swap
+#endif
+#if !defined(AO_HAVE_compare_and_swap) && \
+    defined(AO_HAVE_compare_and_swap_acquire)
+#  define AO_compare_and_swap(addr, old, new_val) \
+        AO_compare_and_swap_acquire(addr, old, new_val)
+#  define AO_HAVE_compare_and_swap
+#endif
+#if !defined(AO_HAVE_compare_and_swap) && \
+    defined(AO_HAVE_compare_and_swap_write)
+#  define AO_compare_and_swap(addr, old, new_val) \
+        AO_compare_and_swap_write(addr, old, new_val)
+#  define AO_HAVE_compare_and_swap
+#endif
+#if !defined(AO_HAVE_compare_and_swap) && \
+    defined(AO_HAVE_compare_and_swap_read)
+#  define AO_compare_and_swap(addr, old, new_val) \
+        AO_compare_and_swap_read(addr, old, new_val)
+#  define AO_HAVE_compare_and_swap
+#endif
+
+#if defined(AO_HAVE_compare_and_swap_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_compare_and_swap_full)
+#  define AO_compare_and_swap_full(addr, old, new_val) \
+        (AO_nop_full(), AO_compare_and_swap_acquire(addr, old, new_val))
+#  define AO_HAVE_compare_and_swap_full
+#endif
+
+#if !defined(AO_HAVE_compare_and_swap_release_write) && \
+    defined(AO_HAVE_compare_and_swap_write)
+#  define AO_compare_and_swap_release_write(addr, old, new_val) \
+        AO_compare_and_swap_write(addr, old, new_val)
+#  define AO_HAVE_compare_and_swap_release_write
+#endif
+#if !defined(AO_HAVE_compare_and_swap_release_write) && \
+    defined(AO_HAVE_compare_and_swap_release)
+#  define AO_compare_and_swap_release_write(addr, old, new_val) \
+        AO_compare_and_swap_release(addr, old, new_val)
+#  define AO_HAVE_compare_and_swap_release_write
+#endif
+#if !defined(AO_HAVE_compare_and_swap_acquire_read) && \
+    defined(AO_HAVE_compare_and_swap_read)
+#  define AO_compare_and_swap_acquire_read(addr, old, new_val) \
+        AO_compare_and_swap_read(addr, old, new_val)
+#  define AO_HAVE_compare_and_swap_acquire_read
+#endif
+#if !defined(AO_HAVE_compare_and_swap_acquire_read) && \
+    defined(AO_HAVE_compare_and_swap_acquire)
+#  define AO_compare_and_swap_acquire_read(addr, old, new_val) \
+        AO_compare_and_swap_acquire(addr, old, new_val)
+#  define AO_HAVE_compare_and_swap_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_compare_and_swap_acquire_read)
+#    define AO_compare_and_swap_dd_acquire_read(addr, old, new_val) \
+        AO_compare_and_swap_acquire_read(addr, old, new_val)
+#    define AO_HAVE_compare_and_swap_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_compare_and_swap)
+#    define AO_compare_and_swap_dd_acquire_read(addr, old, new_val) \
+        AO_compare_and_swap(addr, old, new_val)
+#    define AO_HAVE_compare_and_swap_dd_acquire_read
+#  endif
+#endif
+
+#include "generalize-small.h"
+
+/* Compare_double_and_swap_double */
+#if defined(AO_HAVE_compare_double_and_swap_double) && defined(AO_HAVE_nop_full)\
+    && !defined(AO_HAVE_compare_double_and_swap_double_acquire)
+   AO_INLINE int
+   AO_compare_double_and_swap_double_acquire(volatile AO_double_t *addr,
+                                             AO_t o1, AO_t o2,
+                                             AO_t n1, AO_t n2)
+   {
+     int result = AO_compare_double_and_swap_double(addr, o1, o2, n1, n2);
+     AO_nop_full();
+     return result;
+   }
+#  define AO_HAVE_compare_double_and_swap_double_acquire
+#endif
+#if defined(AO_HAVE_compare_double_and_swap_double) \
+    && defined(AO_HAVE_nop_full)\
+    && !defined(AO_HAVE_compare_double_and_swap_double_release)
+#  define AO_compare_double_and_swap_double_release(addr, o1, o2, n1, n2) \
+        (AO_nop_full(), AO_compare_double_and_swap_double(addr, o1, o2, n1, n2))
+#  define AO_HAVE_compare_double_and_swap_double_release
+#endif
+#if defined(AO_HAVE_compare_double_and_swap_double_full)
+#  if !defined(AO_HAVE_compare_double_and_swap_double_release)
+#    define AO_compare_double_and_swap_double_release(addr, o1, o2, n1, n2) \
+         AO_compare_double_and_swap_double_full(addr, o1, o2, n1, n2)
+#    define AO_HAVE_compare_double_and_swap_double_release
+#  endif
+#  if !defined(AO_HAVE_compare_double_and_swap_double_acquire)
+#    define AO_compare_double_and_swap_double_acquire(addr, o1, o2, n1, n2) \
+         AO_compare_double_and_swap_double_full(addr, o1, o2, n1, n2)
+#    define AO_HAVE_compare_double_and_swap_double_acquire
+#  endif
+#  if !defined(AO_HAVE_compare_double_and_swap_double_write)
+#    define AO_compare_double_and_swap_double_write(addr, o1, o2, n1, n2) \
+         AO_compare_double_and_swap_double_full(addr, o1, o2, n1, n2)
+#    define AO_HAVE_compare_double_and_swap_double_write
+#  endif
+#  if !defined(AO_HAVE_compare_double_and_swap_double_read)
+#    define AO_compare_double_and_swap_double_read(addr, o1, o2, n1, n2) \
+         AO_compare_double_and_swap_double_full(addr, o1, o2, n1, n2)
+#    define AO_HAVE_compare_double_and_swap_double_read
+#  endif
+#endif /* AO_HAVE_compare_double_and_swap_double_full */
+
+#if !defined(AO_HAVE_compare_double_and_swap_double) && \
+    defined(AO_HAVE_compare_double_and_swap_double_release)
+#  define AO_compare_double_and_swap_double(addr, o1, o2, n1, n2) \
+        AO_compare_double_and_swap_double_release(addr, o1, o2, n1, n2)
+#  define AO_HAVE_compare_double_and_swap_double
+#endif
+#if !defined(AO_HAVE_compare_double_and_swap_double) && \
+    defined(AO_HAVE_compare_double_and_swap_double_acquire)
+#  define AO_compare_double_and_swap_double(addr, o1, o2, n1, n2) \
+        AO_compare_double_and_swap_double_acquire(addr, o1, o2, n1, n2)
+#  define AO_HAVE_compare_double_and_swap_double
+#endif
+#if !defined(AO_HAVE_compare_double_and_swap_double) && \
+    defined(AO_HAVE_compare_double_and_swap_double_write)
+#  define AO_compare_double_and_swap_double(addr, o1, o2, n1, n2) \
+        AO_compare_double_and_swap_double_write(addr, o1, o2, n1, n2)
+#  define AO_HAVE_compare_double_and_swap_double
+#endif
+#if !defined(AO_HAVE_compare_double_and_swap_double) && \
+    defined(AO_HAVE_compare_double_and_swap_double_read)
+#  define AO_compare_double_and_swap_double(addr, o1, o2, n1, n2) \
+        AO_compare_double_and_swap_double_read(addr, o1, o2, n1, n2)
+#  define AO_HAVE_compare_double_and_swap_double
+#endif
+
+#if defined(AO_HAVE_compare_double_and_swap_double_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_compare_double_and_swap_double_full)
+#  define AO_compare_double_and_swap_double_full(addr, o1, o2, n1, n2) \
+        (AO_nop_full(), AO_compare_double_and_swap_double_acquire(addr, o1, o2, n1, n2))
+#  define AO_HAVE_compare_double_and_swap_double_full
+#endif
+
+#if !defined(AO_HAVE_compare_double_and_swap_double_release_write) && \
+    defined(AO_HAVE_compare_double_and_swap_double_write)
+#  define AO_compare_double_and_swap_double_release_write(addr, o1, o2, n1, n2) \
+        AO_compare_double_and_swap_double_write(addr, o1, o2, n1, n2)
+#  define AO_HAVE_compare_double_and_swap_double_release_write
+#endif
+#if !defined(AO_HAVE_compare_double_and_swap_double_release_write) && \
+    defined(AO_HAVE_compare_double_and_swap_double_release)
+#  define AO_compare_double_and_swap_double_release_write(addr, o1, o2, n1, n2) \
+        AO_compare_double_and_swap_double_release(addr, o1, o2, n1, n2)
+#  define AO_HAVE_compare_double_and_swap_double_release_write
+#endif
+#if !defined(AO_HAVE_compare_double_and_swap_double_acquire_read) && \
+    defined(AO_HAVE_compare_double_and_swap_double_read)
+#  define AO_compare_double_and_swap_double_acquire_read(addr, o1, o2, n1, n2) \
+        AO_compare_double_and_swap_double_read(addr, o1, o2, n1, n2)
+#  define AO_HAVE_compare_double_and_swap_double_acquire_read
+#endif
+#if !defined(AO_HAVE_compare_double_and_swap_double_acquire_read) && \
+    defined(AO_HAVE_compare_double_and_swap_double_acquire)
+#  define AO_compare_double_and_swap_double_acquire_read(addr, o1, o2, n1, n2) \
+        AO_compare_double_and_swap_double_acquire(addr, o1, o2, n1, n2)
+#  define AO_HAVE_compare_double_and_swap_double_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_compare_double_and_swap_double_acquire_read)
+#    define AO_compare_double_and_swap_double_dd_acquire_read(addr, o1, o2, n1, n2) \
+        AO_compare_double_and_swap_double_acquire_read(addr, o1, o2, n1, n2)
+#    define AO_HAVE_compare_double_and_swap_double_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_compare_double_and_swap_double)
+#    define AO_compare_double_and_swap_double_dd_acquire_read(addr, o1, o2, n1, n2) \
+        AO_compare_double_and_swap_double(addr, o1, o2, n1, n2)
+#    define AO_HAVE_compare_double_and_swap_double_dd_acquire_read
+#  endif
+#endif
+
+/* Compare_and_swap_double */
+#if defined(AO_HAVE_compare_and_swap_double) && defined(AO_HAVE_nop_full)\
+    && !defined(AO_HAVE_compare_and_swap_double_acquire)
+   AO_INLINE int
+   AO_compare_and_swap_double_acquire(volatile AO_double_t *addr,
+                                             AO_t o1,
+                                             AO_t n1, AO_t n2)
+   {
+     int result = AO_compare_and_swap_double(addr, o1, n1, n2);
+     AO_nop_full();
+     return result;
+   }
+#  define AO_HAVE_compare_and_swap_double_acquire
+#endif
+#if defined(AO_HAVE_compare_and_swap_double) \
+    && defined(AO_HAVE_nop_full)\
+    && !defined(AO_HAVE_compare_and_swap_double_release)
+#  define AO_compare_and_swap_double_release(addr, o1, n1, n2) \
+        (AO_nop_full(), AO_compare_and_swap_double(addr, o1, n1, n2))
+#  define AO_HAVE_compare_and_swap_double_release
+#endif
+#if defined(AO_HAVE_compare_and_swap_double_full)
+#  if !defined(AO_HAVE_compare_and_swap_double_release)
+#    define AO_compare_and_swap_double_release(addr, o1, n1, n2) \
+         AO_compare_and_swap_double_full(addr, o1, n1, n2)
+#    define AO_HAVE_compare_and_swap_double_release
+#  endif
+#  if !defined(AO_HAVE_compare_and_swap_double_acquire)
+#    define AO_compare_and_swap_double_acquire(addr, o1, n1, n2) \
+         AO_compare_and_swap_double_full(addr, o1, n1, n2)
+#    define AO_HAVE_compare_and_swap_double_acquire
+#  endif
+#  if !defined(AO_HAVE_compare_and_swap_double_write)
+#    define AO_compare_and_swap_double_write(addr, o1, n1, n2) \
+         AO_compare_and_swap_double_full(addr, o1, n1, n2)
+#    define AO_HAVE_compare_and_swap_double_write
+#  endif
+#  if !defined(AO_HAVE_compare_and_swap_double_read)
+#    define AO_compare_and_swap_double_read(addr, o1, n1, n2) \
+         AO_compare_and_swap_double_full(addr, o1, n1, n2)
+#    define AO_HAVE_compare_and_swap_double_read
+#  endif
+#endif /* AO_HAVE_compare_and_swap_double_full */
+
+#if !defined(AO_HAVE_compare_and_swap_double) && \
+    defined(AO_HAVE_compare_and_swap_double_release)
+#  define AO_compare_and_swap_double(addr, o1, n1, n2) \
+        AO_compare_and_swap_double_release(addr, o1, n1, n2)
+#  define AO_HAVE_compare_and_swap_double
+#endif
+#if !defined(AO_HAVE_compare_and_swap_double) && \
+    defined(AO_HAVE_compare_and_swap_double_acquire)
+#  define AO_compare_and_swap_double(addr, o1, n1, n2) \
+        AO_compare_and_swap_double_acquire(addr, o1, n1, n2)
+#  define AO_HAVE_compare_and_swap_double
+#endif
+#if !defined(AO_HAVE_compare_and_swap_double) && \
+    defined(AO_HAVE_compare_and_swap_double_write)
+#  define AO_compare_and_swap_double(addr, o1, n1, n2) \
+        AO_compare_and_swap_double_write(addr, o1, n1, n2)
+#  define AO_HAVE_compare_and_swap_double
+#endif
+#if !defined(AO_HAVE_compare_and_swap_double) && \
+    defined(AO_HAVE_compare_and_swap_double_read)
+#  define AO_compare_and_swap_double(addr, o1, n1, n2) \
+        AO_compare_and_swap_double_read(addr, o1, n1, n2)
+#  define AO_HAVE_compare_and_swap_double
+#endif
+
+#if defined(AO_HAVE_compare_and_swap_double_acquire) &&\
+    defined(AO_HAVE_nop_full) && \
+    !defined(AO_HAVE_compare_and_swap_double_full)
+#  define AO_compare_and_swap_double_full(addr, o1, n1, n2) \
+        (AO_nop_full(), AO_compare_and_swap_double_acquire(addr, o1, n1, n2))
+#  define AO_HAVE_compare_and_swap_double_full
+#endif
+
+#if !defined(AO_HAVE_compare_and_swap_double_release_write) && \
+    defined(AO_HAVE_compare_and_swap_double_write)
+#  define AO_compare_and_swap_double_release_write(addr, o1, n1, n2) \
+        AO_compare_and_swap_double_write(addr, o1, n1, n2)
+#  define AO_HAVE_compare_and_swap_double_release_write
+#endif
+#if !defined(AO_HAVE_compare_and_swap_double_release_write) && \
+    defined(AO_HAVE_compare_and_swap_double_release)
+#  define AO_compare_and_swap_double_release_write(addr, o1, n1, n2) \
+        AO_compare_and_swap_double_release(addr, o1, n1, n2)
+#  define AO_HAVE_compare_and_swap_double_release_write
+#endif
+#if !defined(AO_HAVE_compare_and_swap_double_acquire_read) && \
+    defined(AO_HAVE_compare_and_swap_double_read)
+#  define AO_compare_and_swap_double_acquire_read(addr, o1, n1, n2) \
+        AO_compare_and_swap_double_read(addr, o1, n1, n2)
+#  define AO_HAVE_compare_and_swap_double_acquire_read
+#endif
+#if !defined(AO_HAVE_compare_and_swap_double_acquire_read) && \
+    defined(AO_HAVE_compare_and_swap_double_acquire)
+#  define AO_compare_and_swap_double_acquire_read(addr, o1, n1, n2) \
+        AO_compare_and_swap_double_acquire(addr, o1, n1, n2)
+#  define AO_HAVE_compare_and_swap_double_acquire_read
+#endif
+
+#ifdef AO_NO_DD_ORDERING
+#  if defined(AO_HAVE_compare_and_swap_double_acquire_read)
+#    define AO_compare_and_swap_double_dd_acquire_read(addr, o1, n1, n2) \
+        AO_compare_and_swap_double_acquire_read(addr, o1, n1, n2)
+#    define AO_HAVE_compare_and_swap_double_dd_acquire_read
+#  endif
+#else
+#  if defined(AO_HAVE_compare_and_swap_double)
+#    define AO_compare_and_swap_double_dd_acquire_read(addr, o1, n1, n2) \
+        AO_compare_and_swap_double(addr, o1, n1, n2)
+#    define AO_HAVE_compare_and_swap_double_dd_acquire_read
+#  endif
+#endif
+
+/* NEC LE-IT: Convenience functions for AO_double compare and swap which */
+/* types and reads easier in code                                        */
+#if defined(AO_HAVE_compare_double_and_swap_double_release) && \
+    !defined(AO_HAVE_double_compare_and_swap_release)
+AO_INLINE int
+AO_double_compare_and_swap_release(volatile AO_double_t *addr,
+                                   AO_double_t old_val, AO_double_t new_val)
+{
+        return AO_compare_double_and_swap_double_release(addr,
+                                                         old_val.AO_val1, old_val.AO_val2,
+                                                         new_val.AO_val1, new_val.AO_val2);
+}
+#define AO_HAVE_double_compare_and_swap_release
+#endif
+
+#if defined(AO_HAVE_compare_double_and_swap_double_acquire) && \
+    !defined(AO_HAVE_double_compare_and_swap_acquire)
+AO_INLINE int
+AO_double_compare_and_swap_acquire(volatile AO_double_t *addr,
+                                   AO_double_t old_val, AO_double_t new_val)
+{
+        return AO_compare_double_and_swap_double_acquire(addr,
+                                                         old_val.AO_val1, old_val.AO_val2,
+                                                         new_val.AO_val1, new_val.AO_val2);
+}
+#define AO_HAVE_double_compare_and_swap_acquire
+#endif
+
+#if defined(AO_HAVE_compare_double_and_swap_double_full) && \
+    !defined(AO_HAVE_double_compare_and_swap_full)
+AO_INLINE int
+AO_double_compare_and_swap_full(volatile AO_double_t *addr,
+                                         AO_double_t old_val, AO_double_t new_val)
+{
+        return AO_compare_double_and_swap_double_full(addr,
+                                                      old_val.AO_val1, old_val.AO_val2,
+                                                      new_val.AO_val1, new_val.AO_val2);
+}
+#define AO_HAVE_double_compare_and_swap_full
+#endif
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/Makefile.am b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/Makefile.am
new file mode 100644 (file)
index 0000000..d0274f0
--- /dev/null
@@ -0,0 +1,48 @@
+#General sysdep utility headers, followed by the arch-specific ones
+nobase_sysdep_HEADERS= generic_pthread.h \
+         atomic_load_store.h \
+         aligned_atomic_load_store.h \
+         acquire_release_volatile.h \
+         char_acquire_release_volatile.h \
+         char_atomic_load_store.h \
+         short_acquire_release_volatile.h \
+         short_aligned_atomic_load_store.h \
+         short_atomic_load_store.h \
+         int_acquire_release_volatile.h \
+         int_aligned_atomic_load_store.h \
+         int_atomic_load_store.h \
+         all_acquire_release_volatile.h \
+         all_aligned_atomic_load_store.h \
+         all_atomic_load_store.h \
+         read_ordered.h \
+         ordered_except_wr.h \
+         ordered.h \
+         ao_t_is_int.h \
+         test_and_set_t_is_ao_t.h \
+         test_and_set_t_is_char.h \
+         emul_cas.h \
+         standard_ao_double_t.h \
+         README \
+       \
+         armcc/arm_v6.h \
+       \
+         gcc/alpha.h gcc/arm.h gcc/cris.h \
+         gcc/hppa.h gcc/ia64.h gcc/m68k.h \
+         gcc/mips.h gcc/powerpc.h gcc/s390.h \
+         gcc/sh.h gcc/sparc.h gcc/x86.h gcc/x86_64.h \
+       \
+         hpc/hppa.h hpc/ia64.h \
+       \
+         ibmc/powerpc.h \
+       \
+         icc/ia64.h \
+       \
+         msftc/arm.h msftc/common32_defs.h msftc/x86.h \
+         msftc/x86_64.h \
+       \
+         sunc/sparc.h sunc/x86.h sunc/x86_64.h
+
+sysdepdir= ${includedir}/atomic_ops/sysdeps
+
+# A few architectures require special .S files
+EXTRA_DIST = sunc/sparc.S
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/Makefile.in b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/Makefile.in
new file mode 100644 (file)
index 0000000..fc123e9
--- /dev/null
@@ -0,0 +1,439 @@
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = src/atomic_ops/sysdeps
+DIST_COMMON = README $(nobase_sysdep_HEADERS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(sysdepdir)"
+nobase_sysdepHEADERS_INSTALL = $(install_sh_DATA)
+HEADERS = $(nobase_sysdep_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PICFLAG = @PICFLAG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+#General sysdep utility headers, followed by the arch-specific ones
+nobase_sysdep_HEADERS = generic_pthread.h \
+         atomic_load_store.h \
+         aligned_atomic_load_store.h \
+         acquire_release_volatile.h \
+         char_acquire_release_volatile.h \
+         char_atomic_load_store.h \
+         short_acquire_release_volatile.h \
+         short_aligned_atomic_load_store.h \
+         short_atomic_load_store.h \
+         int_acquire_release_volatile.h \
+         int_aligned_atomic_load_store.h \
+         int_atomic_load_store.h \
+         all_acquire_release_volatile.h \
+         all_aligned_atomic_load_store.h \
+         all_atomic_load_store.h \
+         read_ordered.h \
+         ordered_except_wr.h \
+         ordered.h \
+         ao_t_is_int.h \
+         test_and_set_t_is_ao_t.h \
+         test_and_set_t_is_char.h \
+         emul_cas.h \
+         standard_ao_double_t.h \
+         README \
+       \
+         armcc/arm_v6.h \
+       \
+         gcc/alpha.h gcc/arm.h gcc/cris.h \
+         gcc/hppa.h gcc/ia64.h gcc/m68k.h \
+         gcc/mips.h gcc/powerpc.h gcc/s390.h \
+         gcc/sh.h gcc/sparc.h gcc/x86.h gcc/x86_64.h \
+       \
+         hpc/hppa.h hpc/ia64.h \
+       \
+         ibmc/powerpc.h \
+       \
+         icc/ia64.h \
+       \
+         msftc/arm.h msftc/common32_defs.h msftc/x86.h \
+         msftc/x86_64.h \
+       \
+         sunc/sparc.h sunc/x86.h sunc/x86_64.h
+
+sysdepdir = ${includedir}/atomic_ops/sysdeps
+
+# A few architectures require special .S files
+EXTRA_DIST = sunc/sparc.S
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/atomic_ops/sysdeps/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  src/atomic_ops/sysdeps/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-nobase_sysdepHEADERS: $(nobase_sysdep_HEADERS)
+       @$(NORMAL_INSTALL)
+       test -z "$(sysdepdir)" || $(MKDIR_P) "$(DESTDIR)$(sysdepdir)"
+       @$(am__vpath_adj_setup) \
+       list='$(nobase_sysdep_HEADERS)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         $(am__vpath_adj) \
+         echo " $(nobase_sysdepHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(sysdepdir)/$$f'"; \
+         $(nobase_sysdepHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(sysdepdir)/$$f"; \
+       done
+
+uninstall-nobase_sysdepHEADERS:
+       @$(NORMAL_UNINSTALL)
+       @$(am__vpath_adj_setup) \
+       list='$(nobase_sysdep_HEADERS)'; for p in $$list; do \
+         $(am__vpath_adj) \
+         echo " rm -f '$(DESTDIR)$(sysdepdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(sysdepdir)/$$f"; \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+       for dir in "$(DESTDIR)$(sysdepdir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nobase_sysdepHEADERS
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-nobase_sysdepHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+       ctags distclean distclean-generic distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-data install-data-am install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man \
+       install-nobase_sysdepHEADERS install-pdf install-pdf-am \
+       install-ps install-ps-am install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+       pdf-am ps ps-am tags uninstall uninstall-am \
+       uninstall-nobase_sysdepHEADERS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/README b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/README
new file mode 100644 (file)
index 0000000..605699f
--- /dev/null
@@ -0,0 +1,7 @@
+There are two kinds of entities in this directory:
+
+- Subdirectories corresponding to specific compilers (or compiler/OS combinations).
+  Each of these includes one or more architecture-specific headers.
+
+- More generic header files corresponding to a particular ordering and/or
+  atomicity property that might be shared by multiple hardware platforms.
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/acquire_release_volatile.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/acquire_release_volatile.h
new file mode 100644 (file)
index 0000000..6d54af9
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * This file adds definitions appropriate for environments in which an AO_t
+ * volatile load has acquire semantics, and an AO_t volatile store has release
+ * semantics.  This is arguably supposed to be true with the standard Itanium
+ * software conventions.
+ */
+
+/*
+ * Empirically gcc/ia64 does some reordering of ordinary operations around volatiles
+ * even when we think it shouldn't.  Gcc 3.3 and earlier could reorder a volatile store
+ * with another store.  As of March 2005, gcc pre-4 reused previously computed
+ * common subexpressions across a volatile load.
+ * Hence we now add compiler barriers for gcc.
+ */
+#if !defined(AO_GCC_BARRIER)
+#  if defined(__GNUC__)
+#    define AO_GCC_BARRIER() AO_compiler_barrier()
+#  else
+#    define AO_GCC_BARRIER()
+#  endif
+#endif
+
+AO_INLINE AO_t
+AO_load_acquire(const volatile AO_t *p)
+{
+  AO_t result = *p;
+  /* A normal volatile load generates an ld.acq         */
+  AO_GCC_BARRIER();
+  return result;
+}
+#define AO_HAVE_load_acquire
+
+AO_INLINE void
+AO_store_release(volatile AO_t *p, AO_t val)
+{
+  AO_GCC_BARRIER();
+  /* A normal volatile store generates an st.rel        */
+  *p = val;
+}
+#define AO_HAVE_store_release
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/aligned_atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/aligned_atomic_load_store.h
new file mode 100644 (file)
index 0000000..071bea0
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Definitions for architectures on which loads and stores of AO_t are
+ * atomic fo all legal alignments.
+ */
+
+AO_INLINE AO_t
+AO_load(const volatile AO_t *addr)
+{
+  assert(((size_t)addr & (sizeof(AO_t) - 1)) == 0);
+  /* Cast away the volatile for architectures where             */
+  /* volatile adds barrier semantics.                           */
+  return *(AO_t *)addr;
+}
+
+#define AO_HAVE_load
+
+AO_INLINE void
+AO_store(volatile AO_t *addr, AO_t new_val)
+{
+  assert(((size_t)addr & (sizeof(AO_t) - 1)) == 0);
+  (*(AO_t *)addr) = new_val;
+}
+
+#define AO_HAVE_store
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/all_acquire_release_volatile.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/all_acquire_release_volatile.h
new file mode 100644 (file)
index 0000000..6787387
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE. 
+ */
+
+/*
+ * Describes architectures on which volatile AO_t, unsigned char, unsigned
+ * short, and unsigned int loads and stores have acquire/release semantics for
+ * all normally legal alignments.
+ */
+#include "acquire_release_volatile.h"
+#include "char_acquire_release_volatile.h"
+#include "short_acquire_release_volatile.h"
+#include "int_acquire_release_volatile.h"
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h
new file mode 100644 (file)
index 0000000..db258df
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Describes architectures on which AO_t, unsigned char, unsigned short,
+ * and unsigned int loads and stores are atomic for all normally legal
+ * alignments.
+ */
+#include "aligned_atomic_load_store.h"
+#include "char_atomic_load_store.h"
+#include "short_aligned_atomic_load_store.h"
+#include "int_aligned_atomic_load_store.h"
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/all_atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/all_atomic_load_store.h
new file mode 100644 (file)
index 0000000..248d9a6
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Describes architectures on which AO_t, unsigned char, unsigned short,
+ * and unsigned int loads and stores are atomic for all normally legal
+ * alignments.
+ */
+#include "atomic_load_store.h"
+#include "char_atomic_load_store.h"
+#include "short_atomic_load_store.h"
+#include "int_atomic_load_store.h"
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/ao_t_is_int.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/ao_t_is_int.h
new file mode 100644 (file)
index 0000000..8e57bb4
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2003-2004 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Inclusion of this file signifies that AO_t is in fact int.  Hence
+ * any AO_... operations can also server as AO_int_... operations.
+ * We currently define only the more important ones here, and allow for
+ * the normal generalization process to define the others.
+ * We should probably add others in the future.
+ */
+
+#if defined(AO_HAVE_compare_and_swap_full) && \
+    !defined(AO_HAVE_int_compare_and_swap_full)
+#  define AO_int_compare_and_swap_full(addr, old, new_val) \
+                AO_compare_and_swap_full((volatile AO_t *)(addr), \
+                                        (AO_t)(old), (AO_t)(new_val))
+#  define AO_HAVE_int_compare_and_swap_full
+# endif
+
+#if defined(AO_HAVE_compare_and_swap_acquire) && \
+    !defined(AO_HAVE_int_compare_and_swap_acquire)
+#  define AO_int_compare_and_swap_acquire(addr, old, new_val) \
+                AO_compare_and_swap_acquire((volatile AO_t *)(addr), \
+                                            (AO_t)(old), (AO_t)(new_val))
+#  define AO_HAVE_int_compare_and_swap_acquire
+# endif
+
+#if defined(AO_HAVE_compare_and_swap_release) && \
+    !defined(AO_HAVE_int_compare_and_swap_release)
+#  define AO_int_compare_and_swap_release(addr, old, new_val) \
+                AO_compare_and_swap_release((volatile AO_t *)(addr), \
+                                         (AO_t)(old), (AO_t)(new_val))
+#  define AO_HAVE_int_compare_and_swap_release
+# endif
+
+#if defined(AO_HAVE_compare_and_swap_write) && \
+    !defined(AO_HAVE_int_compare_and_swap_write)
+#  define AO_int_compare_and_swap_write(addr, old, new_val) \
+                AO_compare_and_swap_write((volatile AO_t *)(addr), \
+                                          (AO_t)(old), (AO_t)(new_val))
+#  define AO_HAVE_int_compare_and_swap_write
+# endif
+
+#if defined(AO_HAVE_compare_and_swap_read) && \
+    !defined(AO_HAVE_int_compare_and_swap_read)
+#  define AO_int_compare_and_swap_read(addr, old, new_val) \
+                AO_compare_and_swap_read((volatile AO_t *)(addr), \
+                                         (AO_t)(old), (AO_t)(new_val))
+#  define AO_HAVE_int_compare_and_swap_read
+# endif
+
+#if defined(AO_HAVE_compare_and_swap) && \
+    !defined(AO_HAVE_int_compare_and_swap)
+#  define AO_int_compare_and_swap(addr, old, new_val) \
+                AO_compare_and_swap((volatile AO_t *)(addr), \
+                                    (AO_t)(old), (AO_t)(new_val))
+#  define AO_HAVE_int_compare_and_swap
+# endif
+
+#if defined(AO_HAVE_load_acquire) && \
+    !defined(AO_HAVE_int_load_acquire)
+#  define AO_int_load_acquire(addr) \
+        (int)AO_load_acquire((const volatile AO_t *)(addr))
+#  define AO_HAVE_int_load_acquire
+# endif
+
+#if defined(AO_HAVE_store_release) && \
+    !defined(AO_HAVE_int_store_release)
+#  define AO_int_store_release(addr, val) \
+        AO_store_release((volatile AO_t *)(addr), (AO_t)(val))
+#  define AO_HAVE_int_store_release
+# endif
+
+#if defined(AO_HAVE_fetch_and_add_full) && \
+    !defined(AO_HAVE_int_fetch_and_add_full)
+#  define AO_int_fetch_and_add_full(addr, incr) \
+        (int)AO_fetch_and_add_full((volatile AO_t *)(addr), (AO_t)(incr))
+#  define AO_HAVE_int_fetch_and_add_full
+# endif
+
+#if defined(AO_HAVE_fetch_and_add1_acquire) && \
+    !defined(AO_HAVE_int_fetch_and_add1_acquire)
+#  define AO_int_fetch_and_add1_acquire(addr) \
+        (int)AO_fetch_and_add1_acquire((volatile AO_t *)(addr))
+#  define AO_HAVE_int_fetch_and_add1_acquire
+# endif
+
+#if defined(AO_HAVE_fetch_and_add1_release) && \
+    !defined(AO_HAVE_int_fetch_and_add1_release)
+#  define AO_int_fetch_and_add1_release(addr) \
+        (int)AO_fetch_and_add1_release((volatile AO_t *)(addr))
+#  define AO_HAVE_int_fetch_and_add1_release
+# endif
+
+#if defined(AO_HAVE_fetch_and_sub1_acquire) && \
+    !defined(AO_HAVE_int_fetch_and_sub1_acquire)
+#  define AO_int_fetch_and_sub1_acquire(addr) \
+        (int)AO_fetch_and_sub1_acquire((volatile AO_t *)(addr))
+#  define AO_HAVE_int_fetch_and_sub1_acquire
+# endif
+
+#if defined(AO_HAVE_fetch_and_sub1_release) && \
+    !defined(AO_HAVE_int_fetch_and_sub1_release)
+#  define AO_int_fetch_and_sub1_release(addr) \
+        (int)AO_fetch_and_sub1_release((volatile AO_t *)(addr))
+#  define AO_HAVE_int_fetch_and_sub1_release
+# endif
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/armcc/arm_v6.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/armcc/arm_v6.h
new file mode 100644 (file)
index 0000000..f7e186c
--- /dev/null
@@ -0,0 +1,234 @@
+/*
+ * Copyright (c) 2007 by NEC LE-IT:               All rights reserved.
+ * A transcription of ARMv6 atomic operations for the ARM Realview Toolchain.
+ * This code works with armcc from RVDS 3.1
+ * This is based on work in gcc/arm.h by
+ *   Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
+ *   Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
+ *   Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
+ *
+ *
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ *
+ */
+#include "../read_ordered.h"
+#include "../test_and_set_t_is_ao_t.h" /* Probably suboptimal */
+
+#if __TARGET_ARCH_ARM < 6
+Dont use with ARM instruction sets lower than v6
+#else
+
+#include "../standard_ao_double_t.h"
+
+/* NEC LE-IT: ARMv6 is the first architecture providing support for simple LL/SC
+ * A data memory barrier must be raised via CP15 command (see documentation).
+ *
+ * ARMv7 is compatible to ARMv6 but has a simpler command for issuing a
+ * memory barrier (DMB). Raising it via CP15 should still work as told me by the
+ * support engineers. If it turns out to be much quicker than we should implement
+ * custom code for ARMv7 using the asm { dmb } command.
+ *
+ * If only a single processor is used, we can define AO_UNIPROCESSOR
+ * and do not need to access CP15 for ensuring a DMB at all.
+*/
+
+AO_INLINE void
+AO_nop_full(void)
+{
+#ifndef AO_UNIPROCESSOR
+        unsigned int dest=0;
+        /* issue an data memory barrier (keeps ordering of memory transactions  */
+        /* before and after this operation)                                             */
+        __asm { mcr p15,0,dest,c7,c10,5 } ;
+#endif
+}
+
+#define AO_HAVE_nop_full
+
+AO_INLINE AO_t
+AO_load(const volatile AO_t *addr)
+{
+        /* Cast away the volatile in case it adds fence semantics */
+        return (*(const AO_t *)addr);
+}
+#define AO_HAVE_load
+
+/* NEC LE-IT: atomic "store" - according to ARM documentation this is
+ * the only safe way to set variables also used in LL/SC environment.
+ * A direct write won't be recognized by the LL/SC construct in other CPUs.
+ *
+ * HB: Based on subsequent discussion, I think it would be OK to use an
+ * ordinary store here if we knew that interrupt handlers always cleared
+ * the reservation.  They should, but there is some doubt that this is
+ * currently always the case for e.g. Linux.
+*/
+AO_INLINE void AO_store(volatile AO_t *addr, AO_t value)
+{
+        unsigned long tmp;
+
+retry:
+__asm {
+                ldrex   tmp, [addr]
+                strex   tmp, value, [addr]
+                teq     tmp, #0
+                bne     retry
+          };
+}
+#define AO_HAVE_store
+
+/* NEC LE-IT: replace the SWAP as recommended by ARM:
+
+   "Applies to: ARM11 Cores
+        Though the SWP instruction will still work with ARM V6 cores, it is recommended
+        to use the new V6 synchronization instructions. The SWP instruction produces
+        locked read and write accesses which are atomic, i.e. another operation cannot
+        be done between these locked accesses which ties up external bus (AHB,AXI)
+        bandwidth and can increase worst case interrupt latencies. LDREX,STREX are
+        more flexible, other instructions can be done between the LDREX and STREX accesses.
+   "
+*/
+AO_INLINE AO_TS_t
+AO_test_and_set(volatile AO_TS_t *addr) {
+
+        AO_TS_t oldval;
+        unsigned long tmp;
+        unsigned long one = 1;
+retry:
+__asm {
+                ldrex   oldval, [addr]
+                strex   tmp, one, [addr]
+                teq             tmp, #0
+                bne     retry
+          }
+
+        return oldval;
+}
+
+#define AO_HAVE_test_and_set
+
+/* NEC LE-IT: fetch and add for ARMv6 */
+AO_INLINE AO_t
+AO_fetch_and_add(volatile AO_t *p, AO_t incr)
+{
+        unsigned long tmp,tmp2;
+        AO_t result;
+
+retry:
+__asm {
+        ldrex   result, [p]
+        add     tmp, incr, result
+        strex   tmp2, tmp, [p]
+        teq     tmp2, #0
+        bne     retry }
+
+        return result;
+}
+
+#define AO_HAVE_fetch_and_add
+
+/* NEC LE-IT: fetch and add1 for ARMv6 */
+AO_INLINE AO_t
+AO_fetch_and_add1(volatile AO_t *p)
+{
+        unsigned long tmp,tmp2;
+        AO_t result;
+
+retry:
+__asm {
+        ldrex   result, [p]
+        add     tmp, result, #1
+        strex   tmp2, tmp, [p]
+        teq             tmp2, #0
+        bne     retry
+        }
+
+        return result;
+}
+
+#define AO_HAVE_fetch_and_add1
+
+/* NEC LE-IT: fetch and sub for ARMv6 */
+AO_INLINE AO_t
+AO_fetch_and_sub1(volatile AO_t *p)
+{
+        unsigned long tmp,tmp2;
+        AO_t result;
+
+retry:
+__asm {
+        ldrex   result, [p]
+        sub     tmp, result, #1
+        strex   tmp2, tmp, [p]
+        teq             tmp2, #0
+        bne     retry
+        }
+
+        return result;
+}
+
+#define AO_HAVE_fetch_and_sub1
+
+/* NEC LE-IT: compare and swap */
+/* Returns nonzero if the comparison succeeded. */
+AO_INLINE int
+AO_compare_and_swap(volatile AO_t *addr,
+                                AO_t old_val, AO_t new_val)
+{
+         AO_t result,tmp;
+
+retry:
+__asm__ {
+        mov             result, #2
+        ldrex   tmp, [addr]
+        teq             tmp, old_val
+        strexeq result, new_val, [addr]
+        teq             result, #1
+        beq             retry
+        }
+
+        return !(result&2);
+}
+#define AO_HAVE_compare_and_swap
+
+/* helper functions for the Realview compiler: LDREXD is not usable
+ * with inline assembler, so use the "embedded" assembler as
+ * suggested by ARM Dev. support (June 2008). */
+__asm inline double_ptr_storage load_ex(volatile AO_double_t *addr) {
+        LDREXD r0,r1,[r0]
+}
+
+__asm inline int store_ex(AO_t val1, AO_t val2, volatile AO_double_t *addr) {
+        STREXD r3,r0,r1,[r2]
+        MOV        r0,r3
+}
+
+AO_INLINE int
+AO_compare_double_and_swap_double(volatile AO_double_t *addr,
+                                                          AO_t old_val1, AO_t old_val2,
+                                                          AO_t new_val1, AO_t new_val2)
+{
+        double_ptr_storage old_val = ((double_ptr_storage)old_val2 << 32) | old_val1;
+
+    double_ptr_storage tmp;
+        int result;
+
+        while(1) {
+                tmp = load_ex(addr);
+                if(tmp != old_val)      return 0;
+                result = store_ex(new_val1, new_val2, addr);
+                if(!result)     return 1;
+        }
+}
+
+#define AO_HAVE_compare_double_and_swap_double
+
+
+#endif // __TARGET_ARCH_ARM
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/atomic_load_store.h
new file mode 100644 (file)
index 0000000..e4bf103
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Definitions for architectures on which loads and stores of AO_t are
+ * atomic for all legal alignments.
+ */
+
+AO_INLINE AO_t
+AO_load(const volatile AO_t *addr)
+{
+  /* Cast away the volatile for architectures like IA64 where   */
+  /* volatile adds barrier semantics.                           */
+  return (*(const AO_t *)addr);
+}
+
+#define AO_HAVE_load
+
+AO_INLINE void
+AO_store(volatile AO_t *addr, AO_t new_val)
+{
+  (*(AO_t *)addr) = new_val;
+}
+
+#define AO_HAVE_store
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/char_acquire_release_volatile.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/char_acquire_release_volatile.h
new file mode 100644 (file)
index 0000000..c988488
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2003-2004 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * This file adds definitions appropriate for environments in which an unsigned char
+ * volatile load has acquire semantics, and an unsigned char volatile store has release
+ * semantics.  This is true with the standard Itanium ABI.
+ */
+#if !defined(AO_GCC_BARRIER)
+#  if defined(__GNUC__)
+#    define AO_GCC_BARRIER() AO_compiler_barrier()
+#  else
+#    define AO_GCC_BARRIER()
+#  endif
+#endif
+
+AO_INLINE unsigned char
+AO_char_load_acquire(const volatile unsigned char *p)
+{
+  unsigned char result = *p;
+  /* A normal volatile load generates an ld.acq         */
+  AO_GCC_BARRIER();
+  return result;
+}
+#define AO_HAVE_char_load_acquire
+
+AO_INLINE void
+AO_char_store_release(volatile unsigned char *p, unsigned char val)
+{
+  AO_GCC_BARRIER();
+  /* A normal volatile store generates an st.rel        */
+  *p = val;
+}
+#define AO_HAVE_char_store_release
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/char_atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/char_atomic_load_store.h
new file mode 100644 (file)
index 0000000..ca12541
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Definitions for architectures on which loads and stores of unsigned char are
+ * atomic for all legal alignments.
+ */
+
+AO_INLINE unsigned char
+AO_char_load(const volatile unsigned char *addr)
+{
+  /* Cast away the volatile for architectures like IA64 where   */
+  /* volatile adds barrier semantics.                           */
+  return (*(const unsigned char *)addr);
+}
+
+#define AO_HAVE_char_load
+
+AO_INLINE void
+AO_char_store(volatile unsigned char *addr, unsigned char new_val)
+{
+  (*(unsigned char *)addr) = new_val;
+}
+
+#define AO_HAVE_char_store
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/emul_cas.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/emul_cas.h
new file mode 100644 (file)
index 0000000..4187f9f
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE. 
+ */
+
+/*
+ * Ensure, if at all possible, that AO_compare_and_swap_full() is
+ * available.  The emulation should be brute-force signal-safe, even
+ * though it actually blocks.
+ * Including this file will generate an error if AO_compare_and_swap_full()
+ * cannot be made available.
+ * This will be included from platform-specific atomic_ops files
+ * id appropriate, and if AO_FORCE_CAS is defined.  It should not be
+ * included directly, especially since it affects the implementation
+ * of other atomic update primitives.
+ * The implementation assumes that only AO_store_XXX and AO_test_and_set_XXX
+ * variants are defined, and that AO_test_and_set_XXX is not used to
+ * operate on compare_and_swap locations.
+ */
+
+#if !defined(ATOMIC_OPS_H)
+#  error This file should not be included directly.
+#endif
+
+#ifndef AO_HAVE_double_t
+# include "standard_ao_double_t.h"
+#endif
+
+int AO_compare_and_swap_emulation(volatile AO_t *addr, AO_t old,
+                                 AO_t new_val);
+
+int AO_compare_double_and_swap_double_emulation(volatile AO_double_t *addr,
+                                               AO_t old_val1, AO_t old_val2,
+                                               AO_t new_val1, AO_t new_val2);
+
+void AO_store_full_emulation(volatile AO_t *addr, AO_t val);
+
+#define AO_compare_and_swap_full(addr, old, newval) \
+       AO_compare_and_swap_emulation(addr, old, newval)
+#define AO_HAVE_compare_and_swap_full
+
+#ifndef AO_HAVE_compare_double_and_swap_double
+# define AO_compare_double_and_swap_double_full(addr, old1, old2, \
+                                               newval1, newval2) \
+        AO_compare_double_and_swap_double_emulation(addr, old1, old2, \
+                                                    newval1, newval2)
+# define AO_HAVE_compare_double_and_swap_double_full
+#endif
+
+#undef AO_store
+#undef AO_HAVE_store
+#undef AO_store_write
+#undef AO_HAVE_store_write
+#undef AO_store_release
+#undef AO_HAVE_store_release
+#undef AO_store_full
+#undef AO_HAVE_store_full
+#define AO_store_full(addr, val) AO_store_full_emulation(addr, val)
+#define AO_HAVE_store_full
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/alpha.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/alpha.h
new file mode 100644 (file)
index 0000000..ea6293c
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
+ *
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ *
+ */
+
+#include "../atomic_load_store.h"
+
+#include "../test_and_set_t_is_ao_t.h"
+
+#define AO_NO_DD_ORDERING
+        /* Data dependence does not imply read ordering.        */
+
+AO_INLINE void
+AO_nop_full(void)
+{
+  __asm__ __volatile__("mb" : : : "memory");
+}
+
+#define AO_HAVE_nop_full
+
+AO_INLINE void
+AO_nop_write(void)
+{
+  __asm__ __volatile__("wmb" : : : "memory");
+}
+
+#define AO_HAVE_nop_write
+
+/* mb should be used for AO_nop_read().  That's the default.    */
+
+/* We believe that ldq_l ... stq_c does not imply any memory barrier.   */
+/* We should add an explicit fetch_and_add definition.                  */
+AO_INLINE int
+AO_compare_and_swap(volatile AO_t *addr,
+                    AO_t old, AO_t new_val)
+{
+  unsigned long was_equal;
+  unsigned long temp;
+
+  __asm__ __volatile__(
+                     "1:     ldq_l %0,%1\n"
+                     "       cmpeq %0,%4,%2\n"
+                     "       mov %3,%0\n"
+                     "       beq %2,2f\n"
+                     "       stq_c %0,%1\n"
+                     "       beq %0,1b\n"
+                     "2:\n"
+                     :"=&r" (temp), "=m" (*addr), "=&r" (was_equal)
+                     : "r" (new_val), "Ir" (old)
+                     :"memory");
+  return was_equal;
+}
+
+#define AO_HAVE_compare_and_swap
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/arm.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/arm.h
new file mode 100644 (file)
index 0000000..41fc3e4
--- /dev/null
@@ -0,0 +1,284 @@
+/*
+ * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
+ *
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ *
+ */
+
+#include "../read_ordered.h"
+
+#include "../test_and_set_t_is_ao_t.h" /* Probably suboptimal */
+
+/* NEC LE-IT: ARMv6 is the first architecture providing support for simple LL/SC
+ * A data memory barrier must be raised via CP15 command (see documentation).
+ *
+ * ARMv7 is compatible to ARMv6 but has a simpler command for issuing a
+ * memory barrier (DMB). Raising it via CP15 should still work as told me by the
+ * support engineers. If it turns out to be much quicker than we should implement
+ * custom code for ARMv7 using the asm { dmb } command.
+ *
+ * If only a single processor is used, we can define AO_UNIPROCESSOR
+ * and do not need to access CP15 for ensuring a DMB
+*/
+
+/* NEC LE-IT: gcc has no way to easily check the arm architecture
+ * but defines only one of __ARM_ARCH_x__ to be true                    */
+#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
+        || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6ZK__) \
+        || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
+        || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7R__)
+
+#include "../standard_ao_double_t.h"
+
+AO_INLINE void
+AO_nop_full(void)
+{
+#ifndef AO_UNIPROCESSOR
+        /* issue an data memory barrier (keeps ordering of memory transactions  */
+        /* before and after this operation)                                     */
+        unsigned int dest=0;
+        __asm__ __volatile__("mcr p15,0,%0,c7,c10,5" :"=&r"(dest) : : "memory");
+#endif
+}
+
+#define AO_HAVE_nop_full
+
+/* NEC LE-IT: AO_t load is simple reading */
+AO_INLINE AO_t
+AO_load(const volatile AO_t *addr)
+{
+  /* Cast away the volatile for architectures like IA64 where   */
+  /* volatile adds barrier semantics.                           */
+  return (*(const AO_t *)addr);
+}
+#define AO_HAVE_load
+
+/* NEC LE-IT: atomic "store" - according to ARM documentation this is
+ * the only safe way to set variables also used in LL/SC environment.
+ * A direct write won't be recognized by the LL/SC construct on the _same_ CPU.
+ * Support engineers response for behaviour of ARMv6:
+ *
+   Core1        Core2          SUCCESS
+   ===================================
+   LDREX(x)
+   STREX(x)                    Yes
+   -----------------------------------
+   LDREX(x)
+                STR(x)
+   STREX(x)                    No
+   -----------------------------------
+   LDREX(x)
+   STR(x)
+   STREX(x)                    Yes
+   -----------------------------------
+
+ * ARMv7 behaves similar, see documentation CortexA8 TRM, point 8.5
+ *
+ * HB: I think this is only a problem if interrupt handlers do not clear
+ * the reservation, as they almost certainly should.  Probably change this back
+ * in a while?
+*/
+AO_INLINE void AO_store(volatile AO_t *addr, AO_t value)
+{
+        AO_t    flag;
+
+        __asm__ __volatile__("@AO_store\n"
+"1:     ldrex   %0, [%2]\n"
+"       strex   %0, %3, [%2]\n"
+"       teq     %0, #0\n"
+"       bne     1b"
+        : "=&r"(flag), "+m"(*addr)
+        : "r" (addr), "r"(value)
+        : "cc");
+}
+#define AO_HAVE_store
+
+/* NEC LE-IT: replace the SWAP as recommended by ARM:
+
+   "Applies to: ARM11 Cores
+        Though the SWP instruction will still work with ARM V6 cores, it is
+        recommended     to use the new V6 synchronization instructions. The SWP
+        instruction produces 'locked' read and write accesses which are atomic,
+        i.e. another operation cannot be done between these locked accesses which
+        ties up external bus (AHB,AXI) bandwidth and can increase worst case
+        interrupt latencies. LDREX,STREX are more flexible, other instructions can
+        be done between the LDREX and STREX accesses.
+   "
+*/
+AO_INLINE AO_TS_t
+AO_test_and_set(volatile AO_TS_t *addr) {
+
+        AO_TS_t oldval;
+        unsigned long flag;
+
+        __asm__ __volatile__("@AO_test_and_set\n"
+"1:     ldrex   %0, [%3]\n"
+"       strex   %1, %4, [%3]\n"
+"       teq             %1, #0\n"
+"       bne             1b\n"
+        : "=&r"(oldval),"=&r"(flag), "+m"(*addr)
+        : "r"(addr), "r"(1)
+        : "cc");
+
+        return oldval;
+}
+
+#define AO_HAVE_test_and_set
+
+/* NEC LE-IT: fetch and add for ARMv6 */
+AO_INLINE AO_t
+AO_fetch_and_add(volatile AO_t *p, AO_t incr)
+{
+        unsigned long flag,tmp;
+        AO_t result;
+
+        __asm__ __volatile__("@AO_fetch_and_add\n"
+"1:     ldrex   %0, [%5]\n"                     /* get original         */
+"       add     %2, %0, %4\n"           /* sum up in incr       */
+"       strex   %1, %2, [%5]\n"         /* store them           */
+"       teq             %1, #0\n"
+"       bne             1b\n"
+        : "=&r"(result),"=&r"(flag),"=&r"(tmp),"+m"(*p) /* 0..3 */
+        : "r"(incr), "r"(p)                                                             /* 4..5 */
+        : "cc");
+
+        return result;
+}
+
+#define AO_HAVE_fetch_and_add
+
+/* NEC LE-IT: fetch and add1 for ARMv6 */
+AO_INLINE AO_t
+AO_fetch_and_add1(volatile AO_t *p)
+{
+        unsigned long flag,tmp;
+        AO_t result;
+
+        __asm__ __volatile__("@AO_fetch_and_add1\n"
+"1:     ldrex   %0, [%4]\n"                     /* get original   */
+"       add     %1, %0, #1\n"           /* increment */
+"       strex   %2, %1, [%4]\n"         /* store them */
+"       teq             %2, #0\n"
+"       bne             1b\n"
+        : "=&r"(result), "=&r"(tmp), "=&r"(flag), "+m"(*p)
+        : "r"(p)
+        : "cc");
+
+        return result;
+}
+
+#define AO_HAVE_fetch_and_add1
+
+/* NEC LE-IT: fetch and sub for ARMv6 */
+AO_INLINE AO_t
+AO_fetch_and_sub1(volatile AO_t *p)
+{
+        unsigned long flag,tmp;
+        AO_t result;
+
+        __asm__ __volatile__("@AO_fetch_and_sub1\n"
+"1:     ldrex   %0, [%4]\n"                     /* get original   */
+"       sub     %1, %0, #1\n"           /* decrement */
+"       strex   %2, %1, [%4]\n"         /* store them */
+"       teq             %2, #0\n"
+"       bne             1b\n"
+        : "=&r"(result), "=&r"(tmp), "=&r"(flag), "+m"(*p)
+        : "r"(p)
+        : "cc");
+
+        return result;
+}
+
+#define AO_HAVE_fetch_and_sub1
+
+/* NEC LE-IT: compare and swap */
+/* Returns nonzero if the comparison succeeded. */
+AO_INLINE int
+AO_compare_and_swap(volatile AO_t *addr,
+                                AO_t old_val, AO_t new_val)
+{
+         AO_t result,tmp;
+
+        __asm__ __volatile__("@ AO_compare_and_swap\n"
+"1:     mov             %0, #2\n"                       /* store a flag */
+"       ldrex   %1, [%3]\n"                     /* get original */
+"       teq             %1, %4\n"                       /* see if match */
+"       strexeq %0, %5, [%3]\n"         /* store new one if matched */
+"       teq             %0, #1\n"
+"       beq             1b\n"                           /* if update failed, repeat */
+        : "=&r"(result), "=&r"(tmp), "+m"(*addr)
+        : "r"(addr), "r"(old_val), "r"(new_val)
+        : "cc");
+
+        return !(result&2);                     /* if succeded, return 1, else 0 */
+}
+#define AO_HAVE_compare_and_swap
+
+AO_INLINE int
+AO_compare_double_and_swap_double(volatile AO_double_t *addr,
+                                                          AO_t old_val1, AO_t old_val2,
+                                                          AO_t new_val1, AO_t new_val2)
+{
+        double_ptr_storage old_val = ((double_ptr_storage)old_val2 << 32) | old_val1;
+        double_ptr_storage new_val = ((double_ptr_storage)new_val2 << 32) | new_val1;
+
+    double_ptr_storage tmp;
+        int result;
+
+        while(1) {
+                __asm__ __volatile__("@ AO_compare_and_swap_double\n"
+                "       ldrexd  %0, [%1]\n"                     /* get original to r1&r2*/
+                        : "=&r"(tmp)
+                        : "r"(addr)
+                        : "cc");
+                if(tmp != old_val)      return 0;
+                __asm__ __volatile__(
+                "       strexd  %0, %2, [%3]\n" /* store new one if matched */
+                        : "=&r"(result),"+m"(*addr)
+                        : "r"(new_val), "r"(addr)
+                        : "cc");
+                if(!result)     return 1;
+        }
+}
+
+#define AO_HAVE_compare_double_and_swap_double
+
+#else
+/* pre ARMv6 architecures ... */
+
+/* I found a slide set that, if I read it correctly, claims that        */
+/* Loads followed by either a Load or Store are ordered, but nothing    */
+/* else is.                                                             */
+/* It appears that SWP is the only simple memory barrier.               */
+#include "../all_atomic_load_store.h"
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t *addr) {
+  AO_TS_VAL_t oldval;
+  /* SWP on ARM is very similar to XCHG on x86.                 */
+  /* The first operand is the result, the second the value      */
+  /* to be stored.  Both registers must be different from addr. */
+  /* Make the address operand an early clobber output so it     */
+  /* doesn't overlap with the other operands.  The early clobber*/
+  /* on oldval is necessary to prevent the compiler allocating  */
+  /* them to the same register if they are both unused.         */
+  __asm__ __volatile__("swp %0, %2, [%3]"
+                        : "=&r"(oldval), "=&r"(addr)
+                        : "r"(1), "1"(addr)
+                        : "memory");
+  return oldval;
+}
+
+#define AO_HAVE_test_and_set_full
+
+#endif // __ARM_ARCH_x
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/cris.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/cris.h
new file mode 100644 (file)
index 0000000..3864905
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE. 
+ *
+ * Most of this code originally comes from Hans-Peter Nilsson.  It is included
+ * here with his permission.
+ *
+ * This version has not been tested.  It was coped here from a GC
+ * patch so that we wouldn't lose the code in the upgrade to gc7.
+ */ 
+
+#include "../all_atomic_load_store.h"
+
+#include "../ordered.h"  /* There are no multiprocessor implementations. */
+
+#include "../test_and_set_t_is_ao_t.h"
+
+/*
+ * The architecture apparently supports an "f" flag which is
+ * set on preemption.  This essentially gives us load-locked,
+ * store-conditional primitives, though I'm not quite sure how
+ * this would work on a hypothetical multiprocessor.  -HB
+ *
+ * For details, see
+ * http://developer.axis.com/doc/hardware/etrax100lx/prog_man/
+ *      1_architectural_description.pdf
+ *
+ * Presumably many other primitives (notably CAS, including the double-
+ * width versions) could be implemented in this manner, if someone got
+ * around to it.
+ */
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t *addr) {
+    /* Ripped from linuxthreads/sysdeps/cris/pt-machine.h */
+    register unsigned long int ret;
+
+    /* Note the use of a dummy output of *addr to expose the write.  The
+       memory barrier is to stop *other* writes being moved past this code.  */
+      __asm__ __volatile__("clearf\n"
+                          "0:\n\t"
+                          "movu.b [%2],%0\n\t"
+                          "ax\n\t"
+                          "move.b %3,[%2]\n\t"
+                          "bwf 0b\n\t"
+                          "clearf"
+                          : "=&r" (ret), "=m" (*addr)
+                          : "r" (addr), "r" ((int) 1), "m" (*addr)
+                          : "memory");
+    return ret;
+}
+
+#define AO_HAVE_test_and_set_full
+
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/hppa.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/hppa.h
new file mode 100644 (file)
index 0000000..663f6b6
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Modified by Carlos O'Donell <carlos@baldric.uwo.ca>, 2003
+ *      - Added self-aligning lock.
+ *
+ */
+
+#include "../all_atomic_load_store.h"
+
+/* Some architecture set descriptions include special "ordered" memory  */
+/* operations.  As far as we can tell, no existing processors actually  */
+/* require those.  Nor does it appear likely that future processors     */
+/* will.                                                                */
+#include "../ordered.h"
+
+/* GCC will not guarantee the alignment we need, use four lock words    */
+/* and select the correctly aligned datum. See the glibc 2.3.2          */
+/* linuxthread port for the original implementation.                    */
+struct AO_pa_clearable_loc {
+  int data[4];
+};
+
+#undef AO_TS_INITIALIZER
+#define AO_TS_t struct AO_pa_clearable_loc
+#define AO_TS_INITIALIZER {1,1,1,1}
+/* Switch meaning of set and clear, since we only have an atomic clear  */
+/* instruction.                                                         */
+typedef enum {AO_PA_TS_set = 0, AO_PA_TS_clear = 1} AO_PA_TS_val;
+#define AO_TS_VAL_t AO_PA_TS_val
+#define AO_TS_CLEAR AO_PA_TS_clear
+#define AO_TS_SET AO_PA_TS_set
+
+/* The hppa only has one atomic read and modify memory operation,       */
+/* load and clear, so hppa spinlocks must use zero to signify that      */
+/* someone is holding the lock.  The address used for the ldcw          */
+/* semaphore must be 16-byte aligned.                                   */
+
+#define __ldcw(a) ({ \
+  volatile unsigned int __ret;                                  \
+  __asm__ __volatile__("ldcw 0(%2),%0"                          \
+                      : "=r" (__ret), "=m" (*(a)) : "r" (a));   \
+  __ret;                                                        \
+})
+
+/* Because malloc only guarantees 8-byte alignment for malloc'd data,   */
+/* and GCC only guarantees 8-byte alignment for stack locals, we can't  */
+/* be assured of 16-byte alignment for atomic lock data even if we      */
+/* specify "__attribute ((aligned(16)))" in the type declaration.  So,  */
+/* we use a struct containing an array of four ints for the atomic lock */
+/* type and dynamically select the 16-byte aligned int from the array   */
+/* for the semaphore.                                                   */
+#define __PA_LDCW_ALIGNMENT 16
+#define __ldcw_align(a) ({ \
+  unsigned long __ret = (unsigned long) a;                      \
+  __ret += __PA_LDCW_ALIGNMENT - 1;                                     \
+  __ret &= ~(__PA_LDCW_ALIGNMENT - 1);                                  \
+  (volatile unsigned int *) __ret;                                      \
+})
+
+/* Works on PA 1.1 and PA 2.0 systems */
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t * addr)
+{
+  volatile unsigned int *a = __ldcw_align (addr);
+  return (AO_TS_VAL_t) __ldcw (a);
+}
+
+AO_INLINE void
+AO_pa_clear(volatile AO_TS_t * addr)
+{
+  volatile unsigned int *a = __ldcw_align (addr);
+  AO_compiler_barrier();
+  *a = 1;
+}
+#define AO_CLEAR(addr) AO_pa_clear(addr)
+
+#define AO_HAVE_test_and_set_full
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/ia64.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/ia64.h
new file mode 100644 (file)
index 0000000..37f2f6a
--- /dev/null
@@ -0,0 +1,297 @@
+/*
+ * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include "../all_atomic_load_store.h"
+
+#include "../all_acquire_release_volatile.h"
+
+#include "../test_and_set_t_is_char.h"
+
+#ifdef _ILP32
+  /* 32-bit HP/UX code. */
+  /* This requires pointer "swizzling".  Pointers need to be expanded   */
+  /* to 64 bits using the addp4 instruction before use.  This makes it  */
+  /* hard to share code, but we try anyway.                             */
+# define AO_LEN "4"
+  /* We assume that addr always appears in argument position 1 in asm   */
+  /* code.  If it is clobbered due to swizzling, we also need it in     */
+  /* second position.  Any later arguments are referenced symbolically, */
+  /* so that we don't have to worry about their position.  This requires*/
+  /* gcc 3.1, but you shouldn't be using anything older than that on    */
+  /* IA64 anyway.                                                       */
+  /* The AO_MASK macro is a workaround for the fact that HP/UX gcc      */
+  /* appears to otherwise store 64-bit pointers in ar.ccv, i.e. it      */
+  /* doesn't appear to clear high bits in a pointer value we pass into  */
+  /* assembly code, even if it is supposedly of type AO_t.              */
+# define AO_IN_ADDR "1"(addr)
+# define AO_OUT_ADDR , "=r"(addr)
+# define AO_SWIZZLE "addp4 %1=0,%1;;\n"
+# define AO_MASK(ptr) __asm__("zxt4 %1=%1": "=r"(ptr) : "0"(ptr));
+#else
+# define AO_LEN "8"
+# define AO_IN_ADDR "r"(addr)
+# define AO_OUT_ADDR
+# define AO_SWIZZLE
+# define AO_MASK(ptr)
+#endif
+
+AO_INLINE void
+AO_nop_full(void)
+{
+  __asm__ __volatile__("mf" : : : "memory");
+}
+#define AO_HAVE_nop_full
+
+AO_INLINE AO_t
+AO_fetch_and_add1_acquire (volatile AO_t *addr)
+{
+  AO_t result;
+
+  __asm__ __volatile__ (AO_SWIZZLE
+                        "fetchadd" AO_LEN ".acq %0=[%1],1":
+                        "=r" (result) AO_OUT_ADDR: AO_IN_ADDR :"memory");
+  return result;
+}
+#define AO_HAVE_fetch_and_add1_acquire
+
+AO_INLINE AO_t
+AO_fetch_and_add1_release (volatile AO_t *addr)
+{
+  AO_t result;
+
+  __asm__ __volatile__ (AO_SWIZZLE
+                        "fetchadd" AO_LEN ".rel %0=[%1],1":
+                        "=r" (result) AO_OUT_ADDR: AO_IN_ADDR :"memory");
+  return result;
+}
+
+#define AO_HAVE_fetch_and_add1_release
+
+AO_INLINE AO_t
+AO_fetch_and_sub1_acquire (volatile AO_t *addr)
+{
+  AO_t result;
+
+  __asm__ __volatile__ (AO_SWIZZLE
+                        "fetchadd" AO_LEN ".acq %0=[%1],-1":
+                        "=r" (result) AO_OUT_ADDR: AO_IN_ADDR :"memory");
+  return result;
+}
+
+#define AO_HAVE_fetch_and_sub1_acquire
+
+AO_INLINE AO_t
+AO_fetch_and_sub1_release (volatile AO_t *addr)
+{
+  AO_t result;
+
+  __asm__ __volatile__ (AO_SWIZZLE
+                        "fetchadd" AO_LEN ".rel %0=[%1],-1":
+                        "=r" (result) AO_OUT_ADDR: AO_IN_ADDR :"memory");
+  return result;
+}
+
+#define AO_HAVE_fetch_and_sub1_release
+
+#ifndef _ILP32
+
+AO_INLINE unsigned int
+AO_int_fetch_and_add1_acquire (volatile unsigned int *addr)
+{
+  unsigned int result;
+
+  __asm__ __volatile__ ("fetchadd4.acq %0=[%1],1":
+                        "=r" (result): AO_IN_ADDR :"memory");
+  return result;
+}
+#define AO_HAVE_int_fetch_and_add1_acquire
+
+AO_INLINE unsigned int
+AO_int_fetch_and_add1_release (volatile unsigned int *addr)
+{
+  unsigned int result;
+
+  __asm__ __volatile__ ("fetchadd4.rel %0=[%1],1":
+                        "=r" (result): AO_IN_ADDR :"memory");
+  return result;
+}
+
+#define AO_HAVE_int_fetch_and_add1_release
+
+AO_INLINE unsigned int
+AO_int_fetch_and_sub1_acquire (volatile unsigned int *addr)
+{
+  unsigned int result;
+
+  __asm__ __volatile__ ("fetchadd4.acq %0=[%1],-1":
+                        "=r" (result): AO_IN_ADDR :"memory");
+  return result;
+}
+
+#define AO_HAVE_int_fetch_and_sub1_acquire
+
+AO_INLINE unsigned int
+AO_int_fetch_and_sub1_release (volatile unsigned int *addr)
+{
+  unsigned int result;
+
+  __asm__ __volatile__ ("fetchadd4.rel %0=[%1],-1":
+                        "=r" (result): AO_IN_ADDR :"memory");
+  return result;
+}
+
+#define AO_HAVE_int_fetch_and_sub1_release
+
+#endif /* !_ILP32 */
+
+AO_INLINE int
+AO_compare_and_swap_acquire(volatile AO_t *addr,
+                             AO_t old, AO_t new_val)
+{
+  AO_t oldval;
+  AO_MASK(old);
+  __asm__ __volatile__(AO_SWIZZLE
+                       "mov ar.ccv=%[old] ;; cmpxchg" AO_LEN
+                       ".acq %0=[%1],%[new_val],ar.ccv"
+                       : "=r"(oldval) AO_OUT_ADDR
+                       : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"(old)
+                       : "memory");
+  return (oldval == old);
+}
+
+#define AO_HAVE_compare_and_swap_acquire
+
+AO_INLINE int
+AO_compare_and_swap_release(volatile AO_t *addr,
+                             AO_t old, AO_t new_val)
+{
+  AO_t oldval;
+  AO_MASK(old);
+  __asm__ __volatile__(AO_SWIZZLE
+                       "mov ar.ccv=%[old] ;; cmpxchg" AO_LEN
+                       ".rel %0=[%1],%[new_val],ar.ccv"
+                       : "=r"(oldval) AO_OUT_ADDR
+                       : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"(old)
+                       : "memory");
+  return (oldval == old);
+}
+
+#define AO_HAVE_compare_and_swap_release
+
+AO_INLINE int
+AO_char_compare_and_swap_acquire(volatile unsigned char *addr,
+                                 unsigned char old, unsigned char new_val)
+{
+  unsigned char oldval;
+  __asm__ __volatile__(AO_SWIZZLE
+               "mov ar.ccv=%[old] ;; cmpxchg1.acq %0=[%1],%[new_val],ar.ccv"
+               : "=r"(oldval) AO_OUT_ADDR
+               : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"((AO_t)old)
+               : "memory");
+  return (oldval == old);
+}
+
+#define AO_HAVE_char_compare_and_swap_acquire
+
+AO_INLINE int
+AO_char_compare_and_swap_release(volatile unsigned char *addr,
+                                 unsigned char old, unsigned char new_val)
+{
+  unsigned char oldval;
+  __asm__ __volatile__(AO_SWIZZLE
+                "mov ar.ccv=%[old] ;; cmpxchg1.rel %0=[%1],%[new_val],ar.ccv"
+                : "=r"(oldval) AO_OUT_ADDR
+                : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"((AO_t)old)
+                : "memory");
+  return (oldval == old);
+}
+
+#define AO_HAVE_char_compare_and_swap_release
+
+AO_INLINE int
+AO_short_compare_and_swap_acquire(volatile unsigned short *addr,
+                                  unsigned short old, unsigned short new_val)
+{
+  unsigned short oldval;
+  __asm__ __volatile__(AO_SWIZZLE
+                "mov ar.ccv=%[old] ;; cmpxchg2.acq %0=[%1],%[new_val],ar.ccv"
+                : "=r"(oldval) AO_OUT_ADDR
+                : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"((AO_t)old)
+                : "memory");
+  return (oldval == old);
+}
+
+#define AO_HAVE_short_compare_and_swap_acquire
+
+AO_INLINE int
+AO_short_compare_and_swap_release(volatile unsigned short *addr,
+                                  unsigned short old, unsigned short new_val)
+{
+  unsigned short oldval;
+  __asm__ __volatile__(AO_SWIZZLE
+                "mov ar.ccv=%[old] ;; cmpxchg2.rel %0=[%1],%[new_val],ar.ccv"
+                : "=r"(oldval) AO_OUT_ADDR
+                : AO_IN_ADDR, [new_val]"r"(new_val), [old]"r"((AO_t)old)
+                : "memory");
+  return (oldval == old);
+}
+
+#define AO_HAVE_short_compare_and_swap_release
+
+#ifndef _ILP32
+
+AO_INLINE int
+AO_int_compare_and_swap_acquire(volatile unsigned int *addr,
+                                unsigned int old, unsigned int new_val)
+{
+  unsigned int oldval;
+  __asm__ __volatile__("mov ar.ccv=%3 ;; cmpxchg4.acq %0=[%1],%2,ar.ccv"
+                       : "=r"(oldval)
+                       : AO_IN_ADDR, "r"(new_val), "r"((AO_t)old) : "memory");
+  return (oldval == old);
+}
+
+#define AO_HAVE_int_compare_and_swap_acquire
+
+AO_INLINE int
+AO_int_compare_and_swap_release(volatile unsigned int *addr,
+                                unsigned int old, unsigned int new_val)
+{
+  unsigned int oldval;
+  __asm__ __volatile__("mov ar.ccv=%3 ;; cmpxchg4.rel %0=[%1],%2,ar.ccv"
+                       : "=r"(oldval)
+                       : AO_IN_ADDR, "r"(new_val), "r"((AO_t)old) : "memory");
+  return (oldval == old);
+}
+
+#define AO_HAVE_int_compare_and_swap_release
+
+#endif /* !_ILP32 */
+
+/* FIXME: Add compare_and_swap_double as soon as there is widely        */
+/* available hardware that implements it.                               */
+
+/* FIXME: Add compare_double_and_swap_double for the _ILP32 case.       */
+
+#ifdef _ILP32
+# include "../ao_t_is_int.h"
+#endif
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/m68k.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/m68k.h
new file mode 100644 (file)
index 0000000..a815d81
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
+ *
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ *
+ */
+
+/* The cas instruction causes an emulation trap for the */
+/* 060 with a misaligned pointer, so let's avoid this.  */
+#undef AO_t
+typedef unsigned long AO_t __attribute__ ((aligned (4)));
+
+/* FIXME.  Very incomplete.  */
+#include "../all_aligned_atomic_load_store.h"
+
+/* Are there any m68k multiprocessors still around?     */
+/* AFAIK, Alliants were sequentially consistent.        */
+#include "../ordered.h"
+
+#include "../test_and_set_t_is_char.h"
+
+/* Contributed by Tony Mantler or new.  Should be changed to MIT license? */
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t *addr) {
+  AO_TS_t oldval;
+
+  /* The value at addr is semi-phony.   */
+  /* 'tas' sets bit 7 while the return  */
+  /* value pretends all bits were set,  */
+  /* which at least matches AO_TS_SET.  */
+  __asm__ __volatile__(
+                "tas %1; sne %0"
+                : "=d" (oldval), "=m" (*addr)
+                : "m" (*addr)
+                : "memory");
+   return oldval;
+}
+
+#define AO_HAVE_test_and_set_full
+
+/* Returns nonzero if the comparison succeeded. */
+AO_INLINE int
+AO_compare_and_swap_full(volatile AO_t *addr,
+                         AO_t old, AO_t new_val)
+{
+  char result;
+
+  __asm__ __volatile__(
+                "cas.l %3,%4,%1; seq %0"
+                : "=d" (result), "=m" (*addr)
+                : "m" (*addr), "d" (old), "d" (new_val)
+                : "memory");
+  return -result;
+}
+
+#define AO_HAVE_compare_and_swap_full
+
+
+#include "../ao_t_is_int.h"
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/mips.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/mips.h
new file mode 100644 (file)
index 0000000..bc2a236
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2005,2007  Thiemo Seufer <ths@networkno.de>
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
+/*
+ * FIXME:  This should probably make finer distinctions.  SGI MIPS is
+ * much more strongly ordered, and in fact closer to sequentially
+ * consistent.  This is really aimed at modern embedded implementations.
+ * It looks to me like this assumes a 32-bit ABI.  -HB
+ */
+
+#include "../all_aligned_atomic_load_store.h"
+#include "../acquire_release_volatile.h"
+#include "../test_and_set_t_is_ao_t.h"
+#include "../standard_ao_double_t.h"
+
+/* Data dependence does not imply read ordering.  */
+#define AO_NO_DD_ORDERING
+
+AO_INLINE void
+AO_nop_full(void)
+{
+  __asm__ __volatile__(
+      "       .set push           \n"
+      "       .set mips2          \n"
+      "       .set noreorder      \n"
+      "       .set nomacro        \n"
+      "       sync                \n"
+      "       .set pop              "
+      : : : "memory");
+}
+
+#define AO_HAVE_nop_full
+
+AO_INLINE int
+AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val)
+{
+  register int was_equal = 0;
+  register int temp;
+
+  __asm__ __volatile__(
+      "       .set push           \n"
+      "       .set mips2          \n"
+      "       .set noreorder      \n"
+      "       .set nomacro        \n"
+      "1:     ll      %0, %1      \n"
+      "       bne     %0, %4, 2f  \n"
+      "        move   %0, %3      \n"
+      "       sc      %0, %1      \n"
+      "       .set pop            \n"
+      "       beqz    %0, 1b      \n"
+      "       li      %2, 1       \n"
+      "2:                           "
+      : "=&r" (temp), "+R" (*addr), "+r" (was_equal)
+      : "r" (new_val), "r" (old)
+      : "memory");
+  return was_equal;
+}
+
+#define AO_HAVE_compare_and_swap
+
+/* FIXME: I think the implementations below should be automatically     */
+/* generated if we omit them.  - HB                                     */
+
+AO_INLINE int
+AO_compare_and_swap_acquire(volatile AO_t *addr, AO_t old, AO_t new_val) {
+  int result = AO_compare_and_swap(addr, old, new_val);
+  AO_nop_full();
+  return result;
+}
+
+#define AO_HAVE_compare_and_swap_acquire
+
+AO_INLINE int
+AO_compare_and_swap_release(volatile AO_t *addr, AO_t old, AO_t new_val) {
+  AO_nop_full();
+  return AO_compare_and_swap(addr, old, new_val);
+}
+
+#define AO_HAVE_compare_and_swap_release
+
+AO_INLINE int
+AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) {
+  AO_t result;
+  AO_nop_full();
+  result = AO_compare_and_swap(addr, old, new_val);
+  AO_nop_full();
+  return result;
+}
+
+#define AO_HAVE_compare_and_swap_full
+
+/*
+ * FIXME: We should also implement fetch_and_add and or primitives
+ * directly.
+ */
+
+#include "../ao_t_is_int.h"
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/powerpc.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/powerpc.h
new file mode 100644 (file)
index 0000000..5d2f386
--- /dev/null
@@ -0,0 +1,346 @@
+/*
+ * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1999-2004 Hewlett-Packard Development Company, L.P.
+ *
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ *
+ */
+
+/* Memory model documented at http://www-106.ibm.com/developerworks/    */
+/* eserver/articles/archguide.html and (clearer)                        */
+/* http://www-106.ibm.com/developerworks/eserver/articles/powerpc.html. */
+/* There appears to be no implicit ordering between any kind of         */
+/* independent memory references.                                       */
+/* Architecture enforces some ordering based on control dependence.     */
+/* I don't know if that could help.                                     */
+/* Data-dependent loads are always ordered.                             */
+/* Based on the above references, eieio is intended for use on          */
+/* uncached memory, which we don't support.  It does not order loads    */
+/* from cached memory.                                                  */
+/* Thanks to Maged Michael, Doug Lea, and Roger Hoover for helping to   */
+/* track some of this down and correcting my misunderstandings. -HB     */
+/* Earl Chew subsequently contributed further fixes & additions.        */
+
+#include "../all_aligned_atomic_load_store.h"
+
+#include "../test_and_set_t_is_ao_t.h"
+        /* There seems to be no byte equivalent of lwarx, so this       */
+        /* may really be what we want, at least in the 32-bit case.     */
+
+AO_INLINE void
+AO_nop_full(void)
+{
+  __asm__ __volatile__("sync" : : : "memory");
+}
+
+#define AO_HAVE_nop_full
+
+/* lwsync apparently works for everything but a StoreLoad barrier.      */
+AO_INLINE void
+AO_lwsync(void)
+{
+#ifdef __NO_LWSYNC__
+  __asm__ __volatile__("sync" : : : "memory");
+#else
+  __asm__ __volatile__("lwsync" : : : "memory");
+#endif
+}
+
+#define AO_nop_write() AO_lwsync()
+#define AO_HAVE_nop_write
+
+#define AO_nop_read() AO_lwsync()
+#define AO_HAVE_nop_read
+
+/* We explicitly specify load_acquire, since it is important, and can   */
+/* be implemented relatively cheaply.  It could be implemented          */
+/* with an ordinary load followed by a lwsync.  But the general wisdom  */
+/* seems to be that a data dependent branch followed by an isync is     */
+/* cheaper.  And the documentation is fairly explicit that this also    */
+/* has acquire semantics.                                               */
+/* ppc64 uses ld not lwz */
+#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
+AO_INLINE AO_t
+AO_load_acquire(const volatile AO_t *addr)
+{
+  AO_t result;
+
+   __asm__ __volatile__ (
+    "ld%U1%X1 %0,%1\n"
+    "cmpw %0,%0\n"
+    "bne- 1f\n"
+    "1: isync\n"
+    : "=r" (result)
+    : "m"(*addr) : "memory", "cr0");
+  return result;
+}
+#else
+AO_INLINE AO_t
+AO_load_acquire(const volatile AO_t *addr)
+{
+  AO_t result;
+
+  /* FIXME: We should get gcc to allocate one of the condition  */
+  /* registers.  I always got "impossible constraint" when I    */
+  /* tried the "y" constraint.                                  */
+  __asm__ __volatile__ (
+    "lwz%U1%X1 %0,%1\n"
+    "cmpw %0,%0\n"
+    "bne- 1f\n"
+    "1: isync\n"
+    : "=r" (result)
+    : "m"(*addr) : "memory", "cc");
+  return result;
+}
+#endif
+#define AO_HAVE_load_acquire
+
+/* We explicitly specify store_release, since it relies         */
+/* on the fact that lwsync is also a LoadStore barrier.         */
+AO_INLINE void
+AO_store_release(volatile AO_t *addr, AO_t value)
+{
+  AO_lwsync();
+  *addr = value;
+}
+
+#define AO_HAVE_load_acquire
+
+/* This is similar to the code in the garbage collector.  Deleting      */
+/* this and having it synthesized from compare_and_swap would probably  */
+/* only cost us a load immediate instruction.                           */
+#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
+/* Completely untested.  And we should be using smaller objects anyway. */
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set(volatile AO_TS_t *addr) {
+  unsigned long oldval;
+  unsigned long temp = 1; /* locked value */
+
+  __asm__ __volatile__(
+               "1:ldarx %0,0,%1\n"   /* load and reserve               */
+               "cmpdi %0, 0\n"       /* if load is                     */
+               "bne 2f\n"            /*   non-zero, return already set */
+               "stdcx. %2,0,%1\n"    /* else store conditional         */
+               "bne- 1b\n"           /* retry if lost reservation      */
+               "2:\n"                /* oldval is zero if we set       */
+              : "=&r"(oldval)
+              : "r"(addr), "r"(temp)
+              : "memory", "cr0");
+
+  return (AO_TS_VAL_t)oldval;
+}
+
+#else
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set(volatile AO_TS_t *addr) {
+  int oldval;
+  int temp = 1; /* locked value */
+
+  __asm__ __volatile__(
+               "1:lwarx %0,0,%1\n"   /* load and reserve               */
+               "cmpwi %0, 0\n"       /* if load is                     */
+               "bne 2f\n"            /*   non-zero, return already set */
+               "stwcx. %2,0,%1\n"    /* else store conditional         */
+               "bne- 1b\n"           /* retry if lost reservation      */
+               "2:\n"                /* oldval is zero if we set       */
+              : "=&r"(oldval)
+              : "r"(addr), "r"(temp)
+              : "memory", "cr0");
+
+  return (AO_TS_VAL_t)oldval;
+}
+
+#endif
+
+#define AO_HAVE_test_and_set
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_acquire(volatile AO_TS_t *addr) {
+  AO_TS_VAL_t result = AO_test_and_set(addr);
+  AO_lwsync();
+  return result;
+}
+
+#define AO_HAVE_test_and_set_acquire
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_release(volatile AO_TS_t *addr) {
+  AO_lwsync();
+  return AO_test_and_set(addr);
+}
+
+#define AO_HAVE_test_and_set_release
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t *addr) {
+  AO_TS_VAL_t result;
+  AO_lwsync();
+  result = AO_test_and_set(addr);
+  AO_lwsync();
+  return result;
+}
+
+#define AO_HAVE_test_and_set_full
+
+#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
+/* FIXME: Completely untested.  */
+AO_INLINE int
+AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val) {
+  AO_t oldval;
+  int result = 0;
+
+  __asm__ __volatile__(
+               "1:ldarx %0,0,%2\n"   /* load and reserve              */
+               "cmpd %0, %4\n"      /* if load is not equal to  */
+               "bne 2f\n"            /*   old, fail                     */
+               "stdcx. %3,0,%2\n"    /* else store conditional         */
+               "bne- 1b\n"           /* retry if lost reservation      */
+               "li %1,1\n"           /* result = 1;                     */
+               "2:\n"
+              : "=&r"(oldval), "=&r"(result)
+              : "r"(addr), "r"(new_val), "r"(old), "1"(result)
+              : "memory", "cr0");
+
+  return result;
+}
+
+#else
+
+AO_INLINE int
+AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val) {
+  AO_t oldval;
+  int result = 0;
+
+  __asm__ __volatile__(
+               "1:lwarx %0,0,%2\n"   /* load and reserve              */
+               "cmpw %0, %4\n"      /* if load is not equal to  */
+               "bne 2f\n"            /*   old, fail                     */
+               "stwcx. %3,0,%2\n"    /* else store conditional         */
+               "bne- 1b\n"           /* retry if lost reservation      */
+               "li %1,1\n"           /* result = 1;                     */
+               "2:\n"
+              : "=&r"(oldval), "=&r"(result)
+              : "r"(addr), "r"(new_val), "r"(old), "1"(result)
+              : "memory", "cr0");
+
+  return result;
+}
+#endif
+
+#define AO_HAVE_compare_and_swap
+
+AO_INLINE int
+AO_compare_and_swap_acquire(volatile AO_t *addr, AO_t old, AO_t new_val) {
+  int result = AO_compare_and_swap(addr, old, new_val);
+  AO_lwsync();
+  return result;
+}
+
+#define AO_HAVE_compare_and_swap_acquire
+
+AO_INLINE int
+AO_compare_and_swap_release(volatile AO_t *addr, AO_t old, AO_t new_val) {
+  AO_lwsync();
+  return AO_compare_and_swap(addr, old, new_val);
+}
+
+#define AO_HAVE_compare_and_swap_release
+
+AO_INLINE int
+AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) {
+  AO_t result;
+  AO_lwsync();
+  result = AO_compare_and_swap(addr, old, new_val);
+  AO_lwsync();
+  return result;
+}
+
+#define AO_HAVE_compare_and_swap_full
+
+#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
+/* FIXME: Completely untested.                                          */
+
+AO_INLINE AO_t
+AO_fetch_and_add(volatile AO_t *addr, AO_t incr) {
+  AO_t oldval;
+  AO_t newval;
+
+  __asm__ __volatile__(
+               "1:ldarx %0,0,%2\n"   /* load and reserve                */
+               "add %1,%0,%3\n"      /* increment                       */
+               "stdcx. %1,0,%2\n"    /* store conditional               */
+               "bne- 1b\n"           /* retry if lost reservation       */
+              : "=&r"(oldval), "=&r"(newval)
+               : "r"(addr), "r"(incr)
+              : "memory", "cr0");
+
+  return oldval;
+}
+
+#define AO_HAVE_fetch_and_add
+
+#else
+
+AO_INLINE AO_t
+AO_fetch_and_add(volatile AO_t *addr, AO_t incr) {
+  AO_t oldval;
+  AO_t newval;
+
+  __asm__ __volatile__(
+               "1:lwarx %0,0,%2\n"   /* load and reserve                */
+               "add %1,%0,%3\n"      /* increment                       */
+               "stwcx. %1,0,%2\n"    /* store conditional               */
+               "bne- 1b\n"           /* retry if lost reservation       */
+              : "=&r"(oldval), "=&r"(newval)
+               : "r"(addr), "r"(incr)
+              : "memory", "cr0");
+
+  return oldval;
+}
+
+#define AO_HAVE_fetch_and_add
+
+#endif
+
+AO_INLINE AO_t
+AO_fetch_and_add_acquire(volatile AO_t *addr, AO_t incr) {
+  AO_t result = AO_fetch_and_add(addr, incr);
+  AO_lwsync();
+  return result;
+}
+
+#define AO_HAVE_fetch_and_add_acquire
+
+AO_INLINE AO_t
+AO_fetch_and_add_release(volatile AO_t *addr, AO_t incr) {
+  AO_lwsync();
+  return AO_fetch_and_add(addr, incr);
+}
+
+#define AO_HAVE_fetch_and_add_release
+
+AO_INLINE AO_t
+AO_fetch_and_add_full(volatile AO_t *addr, AO_t incr) {
+  AO_t result;
+  AO_lwsync();
+  result = AO_fetch_and_add(addr, incr);
+  AO_lwsync();
+  return result;
+}
+
+#define AO_HAVE_fetch_and_add_full
+
+#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
+#else
+# include "../ao_t_is_int.h"
+#endif
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/s390.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/s390.h
new file mode 100644 (file)
index 0000000..c9facf6
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
+ *
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ *
+ */
+
+/* FIXME: untested.                                             */
+/* The relevant documentation appears to be at                  */
+/* http://publibz.boulder.ibm.com/epubs/pdf/dz9zr003.pdf        */
+/* around page 5-96.  Apparently:                               */
+/* - Memory references in general are atomic only for a single  */
+/*   byte.  But it appears that the most common load/store      */
+/*   instructions also guarantee atomicity for aligned          */
+/*   operands of standard types.  WE FOOLISHLY ASSUME that      */
+/*   compilers only generate those.  If that turns out to be    */
+/*   wrong, we need inline assembly code for AO_load and        */
+/*   AO_store.                                                  */
+/* - A store followed by a load is unordered since the store    */
+/*   may be delayed.  Otherwise everything is ordered.          */
+/* - There is a hardware compare-and-swap (CS) instruction.     */
+
+#include "../ordered_except_wr.h"
+#include "../all_aligned_atomic_load_store.h"
+
+#include "../test_and_set_t_is_ao_t.h"
+/* FIXME: Is there a way to do byte-sized test-and-set? */
+
+/* FIXME: AO_nop_full should probably be implemented directly.  */
+/* It appears that certain BCR instructions have that effect.   */
+/* Presumably they're cheaper than CS?                          */
+
+AO_INLINE AO_t AO_compare_and_swap_full(volatile AO_t *addr,
+                                               AO_t old, AO_t new_val)
+{
+  int retval;
+  __asm__ __volatile__ (
+# ifndef __s390x__
+    "     cs  %1,%2,0(%3)\n"
+# else
+    "     csg %1,%2,0(%3)\n"
+# endif
+  "     ipm %0\n"
+  "     srl %0,28\n"
+  : "=&d" (retval), "+d" (old)
+  : "d" (new_val), "a" (addr)
+  : "cc", "memory");
+  return retval == 0;
+}
+
+#define AO_HAVE_compare_and_swap_full
+
+/* FIXME: Add double-wide compare-and-swap for 32-bit executables.      */
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/sh.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/sh.h
new file mode 100644 (file)
index 0000000..933037a
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2009 by Takashi YOSHII. All rights reserved.
+ *
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
+#include "../all_atomic_load_store.h"
+#include "../ordered.h"
+
+/* sh has tas.b(byte) only */
+#include "../test_and_set_t_is_char.h"
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t *addr)
+{
+  int oldval;
+  __asm__ __volatile__(
+        "tas.b @%1; movt %0"
+        : "=r" (oldval)
+        : "r" (addr)
+        : "t", "memory");
+  return oldval? AO_TS_CLEAR : AO_TS_SET;
+}
+#define AO_HAVE_test_and_set_full
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/sparc.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/sparc.h
new file mode 100644 (file)
index 0000000..b264b0d
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
+ *
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ *
+ */
+
+/* FIXME.  Very incomplete.  No support for sparc64.    */
+/* Non-ancient SPARCs provide compare-and-swap (casa).  */
+/* We should make that available.                       */
+
+#include "../all_atomic_load_store.h"
+
+/* Real SPARC code uses TSO:                            */
+#include "../ordered_except_wr.h"
+
+/* Test_and_set location is just a byte.                */
+#include "../test_and_set_t_is_char.h"
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t *addr) {
+   AO_TS_VAL_t oldval;
+
+   __asm__ __volatile__("ldstub %1,%0"
+                        : "=r"(oldval), "=m"(*addr)
+                        : "m"(*addr) : "memory");
+   return oldval;
+}
+
+#define AO_HAVE_test_and_set_full
+
+#ifndef AO_NO_SPARC_V9
+/* Returns nonzero if the comparison succeeded. */
+AO_INLINE int
+AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) {
+  char ret;
+  __asm__ __volatile__ ("membar #StoreLoad | #LoadLoad\n\t"
+#                       if defined(__arch64__)
+                          "casx [%2],%0,%1\n\t"
+#                       else
+                          "cas [%2],%0,%1\n\t" /* 32-bit version */
+#                       endif
+                        "membar #StoreLoad | #StoreStore\n\t"
+                        "cmp %0,%1\n\t"
+                        "be,a 0f\n\t"
+                        "mov 1,%0\n\t"/* one insn after branch always executed */
+                        "clr %0\n\t"
+                        "0:\n\t"
+                        : "=r" (ret), "+r" (new_val)
+                        : "r" (addr), "0" (old)
+                        : "memory", "cc");
+  return (int)ret;
+}
+
+#define AO_HAVE_compare_and_swap_full
+#endif /* AO_NO_SPARC_V9 */
+
+/* FIXME: This needs to be extended for SPARC v8 and v9.        */
+/* SPARC V8 also has swap.  V9 has CAS.                         */
+/* There are barriers like membar #LoadStore.                   */
+/* CASA (32-bit) and CASXA(64-bit) instructions were            */
+/* added in V9.                                                 */
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86.h
new file mode 100644 (file)
index 0000000..a82a2f9
--- /dev/null
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
+ *
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ *
+ * Some of the machine specific code was borrowed from our GC distribution.
+ */
+
+/* The following really assume we have a 486 or better.  Unfortunately  */
+/* gcc doesn't define a suitable feature test macro based on command    */
+/* line options.                                                        */
+/* We should perhaps test dynamically.                                  */
+
+#include "../all_aligned_atomic_load_store.h"
+
+/* Real X86 implementations, except for some old WinChips, appear       */
+/* to enforce ordering between memory operations, EXCEPT that a later   */
+/* read can pass earlier writes, presumably due to the visible          */
+/* presence of store buffers.                                           */
+/* We ignore both the WinChips, and the fact that the official specs    */
+/* seem to be much weaker (and arguably too weak to be usable).         */
+
+#include "../ordered_except_wr.h"
+
+#include "../test_and_set_t_is_char.h"
+
+#include "../standard_ao_double_t.h"
+
+#if defined(AO_USE_PENTIUM4_INSTRS)
+AO_INLINE void
+AO_nop_full(void)
+{
+  __asm__ __volatile__("mfence" : : : "memory");
+}
+
+#define AO_HAVE_nop_full
+
+#else
+
+/* We could use the cpuid instruction.  But that seems to be slower     */
+/* than the default implementation based on test_and_set_full.  Thus    */
+/* we omit that bit of misinformation here.                             */
+
+#endif
+
+/* As far as we can tell, the lfence and sfence instructions are not    */
+/* currently needed or useful for cached memory accesses.               */
+
+/* Really only works for 486 and later */
+AO_INLINE AO_t
+AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
+{
+  AO_t result;
+
+  __asm__ __volatile__ ("lock; xaddl %0, %1" :
+                        "=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
+                        : "memory");
+  return result;
+}
+
+#define AO_HAVE_fetch_and_add_full
+
+AO_INLINE unsigned char
+AO_char_fetch_and_add_full (volatile unsigned char *p, unsigned char incr)
+{
+  unsigned char result;
+
+  __asm__ __volatile__ ("lock; xaddb %0, %1" :
+                        "=q" (result), "=m" (*p) : "0" (incr), "m" (*p)
+                        : "memory");
+  return result;
+}
+
+#define AO_HAVE_char_fetch_and_add_full
+
+AO_INLINE unsigned short
+AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr)
+{
+  unsigned short result;
+
+  __asm__ __volatile__ ("lock; xaddw %0, %1" :
+                        "=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
+                        : "memory");
+  return result;
+}
+
+#define AO_HAVE_short_fetch_and_add_full
+
+/* Really only works for 486 and later */
+AO_INLINE void
+AO_or_full (volatile AO_t *p, AO_t incr)
+{
+  __asm__ __volatile__ ("lock; orl %1, %0" :
+                        "=m" (*p) : "r" (incr), "m" (*p) : "memory");
+}
+
+#define AO_HAVE_or_full
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t *addr)
+{
+  unsigned char oldval;
+  /* Note: the "xchg" instruction does not need a "lock" prefix */
+  __asm__ __volatile__("xchgb %0, %1"
+                : "=q"(oldval), "=m"(*addr)
+                : "0"(0xff), "m"(*addr) : "memory");
+  return (AO_TS_VAL_t)oldval;
+}
+
+#define AO_HAVE_test_and_set_full
+
+/* Returns nonzero if the comparison succeeded. */
+AO_INLINE int
+AO_compare_and_swap_full(volatile AO_t *addr,
+                             AO_t old, AO_t new_val)
+{
+  char result;
+  __asm__ __volatile__("lock; cmpxchgl %3, %0; setz %1"
+                       : "=m"(*addr), "=q"(result)
+                       : "m"(*addr), "r" (new_val), "a"(old) : "memory");
+  return (int) result;
+}
+
+#define AO_HAVE_compare_and_swap_full
+
+/* Returns nonzero if the comparison succeeded. */
+/* Really requires at least a Pentium.          */
+AO_INLINE int
+AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
+                                       AO_t old_val1, AO_t old_val2,
+                                       AO_t new_val1, AO_t new_val2)
+{
+  char result;
+#if __PIC__
+  /* If PIC is turned on, we can't use %ebx as it is reserved for the
+     GOT pointer.  We can save and restore %ebx because GCC won't be
+     using it for anything else (such as any of the m operands) */
+  __asm__ __volatile__("pushl %%ebx;"   /* save ebx used for PIC GOT ptr */
+                       "movl %6,%%ebx;" /* move new_val2 to %ebx */
+                       "lock; cmpxchg8b %0; setz %1;"
+                       "pop %%ebx;"     /* restore %ebx */
+                       : "=m"(*addr), "=q"(result)
+                       : "m"(*addr), "d" (old_val2), "a" (old_val1),
+                         "c" (new_val2), "m" (new_val1) : "memory");
+#else
+  /* We can't just do the same thing in non-PIC mode, because GCC
+   * might be using %ebx as the memory operand.  We could have ifdef'd
+   * in a clobber, but there's no point doing the push/pop if we don't
+   * have to. */
+  __asm__ __volatile__("lock; cmpxchg8b %0; setz %1;"
+                       : "=m"(*addr), "=q"(result)
+                       : "m"(*addr), "d" (old_val2), "a" (old_val1),
+                         "c" (new_val2), "b" (new_val1) : "memory");
+#endif
+  return (int) result;
+}
+
+#define AO_HAVE_compare_double_and_swap_double_full
+
+#include "../ao_t_is_int.h"
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86_64.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86_64.h
new file mode 100644 (file)
index 0000000..78a4a0f
--- /dev/null
@@ -0,0 +1,189 @@
+/*
+ * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
+ *
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ *
+ * Some of the machine specific code was borrowed from our GC distribution.
+ */
+
+#include "../all_aligned_atomic_load_store.h"
+
+/* Real X86 implementations appear                                      */
+/* to enforce ordering between memory operations, EXCEPT that a later   */
+/* read can pass earlier writes, presumably due to the visible          */
+/* presence of store buffers.                                           */
+/* We ignore the fact that the official specs                           */
+/* seem to be much weaker (and arguably too weak to be usable).         */
+
+#include "../ordered_except_wr.h"
+
+#include "../test_and_set_t_is_char.h"
+
+#include "../standard_ao_double_t.h"
+
+#if defined(AO_USE_PENTIUM4_INSTRS)
+AO_INLINE void
+AO_nop_full(void)
+{
+  __asm__ __volatile__("mfence" : : : "memory");
+}
+
+#define AO_HAVE_nop_full
+
+#else
+
+/* We could use the cpuid instruction.  But that seems to be slower     */
+/* than the default implementation based on test_and_set_full.  Thus    */
+/* we omit that bit of misinformation here.                             */
+
+#endif
+
+/* As far as we can tell, the lfence and sfence instructions are not    */
+/* currently needed or useful for cached memory accesses.               */
+
+AO_INLINE AO_t
+AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
+{
+  AO_t result;
+
+  __asm__ __volatile__ ("lock; xaddq %0, %1" :
+                        "=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
+                        : "memory");
+  return result;
+}
+
+#define AO_HAVE_fetch_and_add_full
+
+AO_INLINE unsigned char
+AO_char_fetch_and_add_full (volatile unsigned char *p, unsigned char incr)
+{
+  unsigned char result;
+
+  __asm__ __volatile__ ("lock; xaddb %0, %1" :
+                        "=q" (result), "=m" (*p) : "0" (incr), "m" (*p)
+                        : "memory");
+  return result;
+}
+
+#define AO_HAVE_char_fetch_and_add_full
+
+AO_INLINE unsigned short
+AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr)
+{
+  unsigned short result;
+
+  __asm__ __volatile__ ("lock; xaddw %0, %1" :
+                        "=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
+                        : "memory");
+  return result;
+}
+
+#define AO_HAVE_short_fetch_and_add_full
+
+AO_INLINE unsigned int
+AO_int_fetch_and_add_full (volatile unsigned int *p, unsigned int incr)
+{
+  unsigned int result;
+
+  __asm__ __volatile__ ("lock; xaddl %0, %1" :
+                        "=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
+                        : "memory");
+  return result;
+}
+
+#define AO_HAVE_int_fetch_and_add_full
+
+AO_INLINE void
+AO_or_full (volatile AO_t *p, AO_t incr)
+{
+  __asm__ __volatile__ ("lock; orq %1, %0" :
+                        "=m" (*p) : "r" (incr), "m" (*p) : "memory");
+}
+
+#define AO_HAVE_or_full
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t *addr)
+{
+  unsigned char oldval;
+  /* Note: the "xchg" instruction does not need a "lock" prefix */
+  __asm__ __volatile__("xchgb %0, %1"
+                : "=q"(oldval), "=m"(*addr)
+                : "0"(0xff), "m"(*addr) : "memory");
+  return (AO_TS_VAL_t)oldval;
+}
+
+#define AO_HAVE_test_and_set_full
+
+/* Returns nonzero if the comparison succeeded. */
+AO_INLINE int
+AO_compare_and_swap_full(volatile AO_t *addr,
+                         AO_t old, AO_t new_val)
+{
+  char result;
+  __asm__ __volatile__("lock; cmpxchgq %3, %0; setz %1"
+                       : "=m"(*addr), "=q"(result)
+                       : "m"(*addr), "r" (new_val), "a"(old) : "memory");
+  return (int) result;
+}
+
+#define AO_HAVE_compare_and_swap_full
+
+#ifdef AO_CMPXCHG16B_AVAILABLE
+/* NEC LE-IT: older AMD Opterons are missing this instruction.
+ * On these machines SIGILL will be thrown.
+ * Define AO_WEAK_DOUBLE_CAS_EMULATION to have an emulated
+ * (lock based) version available */
+/* HB: Changed this to not define either by default.  There are
+ * enough machines and tool chains around on which cmpxchg16b
+ * doesn't work.  And the emulation is unsafe by our usual rules.
+ * Hoewever both are clearly useful in certain cases.
+ */
+AO_INLINE int
+AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
+                                       AO_t old_val1, AO_t old_val2,
+                                       AO_t new_val1, AO_t new_val2)
+{
+  char result;
+  __asm__ __volatile__("lock; cmpxchg16b %0; setz %1"
+                                : "=m"(*addr), "=q"(result)
+                                        : "m"(*addr),
+                                          "d" (old_val2),
+                                          "a" (old_val1),
+                                          "c" (new_val2),
+                                          "b" (new_val1)  : "memory");
+  return (int) result;
+}
+#define AO_HAVE_compare_double_and_swap_double_full
+#else
+/* this one provides spinlock based emulation of CAS implemented in     */
+/* atomic_ops.c.  We probably do not want to do this here, since it is  */
+/* not atomic with respect to other kinds of updates of *addr.  On the  */
+/* other hand, this may be a useful facility on occasion.               */
+#ifdef AO_WEAK_DOUBLE_CAS_EMULATION
+int AO_compare_double_and_swap_double_emulation(volatile AO_double_t *addr,
+                                                AO_t old_val1, AO_t old_val2,
+                                                AO_t new_val1, AO_t new_val2);
+
+AO_INLINE int
+AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
+                                       AO_t old_val1, AO_t old_val2,
+                                       AO_t new_val1, AO_t new_val2)
+{
+        return AO_compare_double_and_swap_double_emulation(addr,
+                                                           old_val1, old_val2,
+                                                           new_val1, new_val2);
+}
+#define AO_HAVE_compare_double_and_swap_double_full
+#endif /* AO_WEAK_DOUBLE_CAS_EMULATION */
+#endif /* AO_CMPXCHG16B_AVAILABLE */
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/generic_pthread.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/generic_pthread.h
new file mode 100644 (file)
index 0000000..90bf117
--- /dev/null
@@ -0,0 +1,288 @@
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/* The following is useful primarily for debugging and documentation.   */
+/* We define various atomic operations by acquiring a global pthread    */
+/* lock.  The resulting implementation will perform poorly, but should  */
+/* be correct unless it is used from signal handlers.                   */
+/* We assume that all pthread operations act like full memory barriers. */
+/* (We believe that is the intent of the specification.)                */
+
+#include <pthread.h>
+
+#include "test_and_set_t_is_ao_t.h"
+        /* This is not necessarily compatible with the native           */
+        /* implementation.  But those can't be safely mixed anyway.     */
+
+/* We define only the full barrier variants, and count on the           */
+/* generalization section below to fill in the rest.                    */
+extern pthread_mutex_t AO_pt_lock;
+
+AO_INLINE void
+AO_nop_full(void)
+{
+  pthread_mutex_lock(&AO_pt_lock);
+  pthread_mutex_unlock(&AO_pt_lock);
+}
+
+#define AO_HAVE_nop_full
+
+AO_INLINE AO_t
+AO_load_full(const volatile AO_t *addr)
+{
+  AO_t result;
+  pthread_mutex_lock(&AO_pt_lock);
+  result = *addr;
+  pthread_mutex_unlock(&AO_pt_lock);
+  return result;
+}
+
+#define AO_HAVE_load_full
+
+AO_INLINE void
+AO_store_full(volatile AO_t *addr, AO_t val)
+{
+  pthread_mutex_lock(&AO_pt_lock);
+  *addr = val;
+  pthread_mutex_unlock(&AO_pt_lock);
+}
+
+#define AO_HAVE_store_full
+
+AO_INLINE unsigned char
+AO_char_load_full(const volatile unsigned char *addr)
+{
+  unsigned char result;
+  pthread_mutex_lock(&AO_pt_lock);
+  result = *addr;
+  pthread_mutex_unlock(&AO_pt_lock);
+  return result;
+}
+
+#define AO_HAVE_char_load_full
+
+AO_INLINE void
+AO_char_store_full(volatile unsigned char *addr, unsigned char val)
+{
+  pthread_mutex_lock(&AO_pt_lock);
+  *addr = val;
+  pthread_mutex_unlock(&AO_pt_lock);
+}
+
+#define AO_HAVE_char_store_full
+
+AO_INLINE unsigned short
+AO_short_load_full(const volatile unsigned short *addr)
+{
+  unsigned short result;
+  pthread_mutex_lock(&AO_pt_lock);
+  result = *addr;
+  pthread_mutex_unlock(&AO_pt_lock);
+  return result;
+}
+
+#define AO_HAVE_short_load_full
+
+AO_INLINE void
+AO_short_store_full(volatile unsigned short *addr, unsigned short val)
+{
+  pthread_mutex_lock(&AO_pt_lock);
+  *addr = val;
+  pthread_mutex_unlock(&AO_pt_lock);
+}
+
+#define AO_HAVE_short_store_full
+
+AO_INLINE unsigned int
+AO_int_load_full(const volatile unsigned int *addr)
+{
+  unsigned int result;
+  pthread_mutex_lock(&AO_pt_lock);
+  result = *addr;
+  pthread_mutex_unlock(&AO_pt_lock);
+  return result;
+}
+
+#define AO_HAVE_int_load_full
+
+AO_INLINE void
+AO_int_store_full(volatile unsigned int *addr, unsigned int val)
+{
+  pthread_mutex_lock(&AO_pt_lock);
+  *addr = val;
+  pthread_mutex_unlock(&AO_pt_lock);
+}
+
+#define AO_HAVE_int_store_full
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t *addr)
+{
+  AO_TS_VAL_t result;
+  pthread_mutex_lock(&AO_pt_lock);
+  result = (AO_TS_VAL_t)(*addr);
+  *addr = AO_TS_SET;
+  pthread_mutex_unlock(&AO_pt_lock);
+  assert(result == AO_TS_SET || result == AO_TS_CLEAR);
+  return result;
+}
+
+#define AO_HAVE_test_and_set_full
+
+AO_INLINE AO_t
+AO_fetch_and_add_full(volatile AO_t *p, AO_t incr)
+{
+  AO_t tmp;
+
+  pthread_mutex_lock(&AO_pt_lock);
+  tmp = *p;
+  *p = tmp + incr;
+  pthread_mutex_unlock(&AO_pt_lock);
+  return tmp;
+}
+
+#define AO_HAVE_fetch_and_add_full
+
+AO_INLINE unsigned char
+AO_char_fetch_and_add_full(volatile unsigned char *p, unsigned char incr)
+{
+  unsigned char tmp;
+
+  pthread_mutex_lock(&AO_pt_lock);
+  tmp = *p;
+  *p = tmp + incr;
+  pthread_mutex_unlock(&AO_pt_lock);
+  return tmp;
+}
+
+#define AO_HAVE_char_fetch_and_add_full
+
+AO_INLINE unsigned short
+AO_short_fetch_and_add_full(volatile unsigned short *p, unsigned short incr)
+{
+  unsigned short tmp;
+
+  pthread_mutex_lock(&AO_pt_lock);
+  tmp = *p;
+  *p = tmp + incr;
+  pthread_mutex_unlock(&AO_pt_lock);
+  return tmp;
+}
+
+#define AO_HAVE_short_fetch_and_add_full
+
+AO_INLINE unsigned int
+AO_int_fetch_and_add_full(volatile unsigned int *p, unsigned int incr)
+{
+  unsigned int tmp;
+
+  pthread_mutex_lock(&AO_pt_lock);
+  tmp = *p;
+  *p = tmp + incr;
+  pthread_mutex_unlock(&AO_pt_lock);
+  return tmp;
+}
+
+#define AO_HAVE_int_fetch_and_add_full
+
+AO_INLINE void
+AO_or_full(volatile AO_t *p, AO_t incr)
+{
+  AO_t tmp;
+
+  pthread_mutex_lock(&AO_pt_lock);
+  tmp = *p;
+  *p = (tmp | incr);
+  pthread_mutex_unlock(&AO_pt_lock);
+}
+
+#define AO_HAVE_or_full
+
+AO_INLINE int
+AO_compare_and_swap_full(volatile AO_t *addr,
+                             AO_t old, AO_t new_val)
+{
+  pthread_mutex_lock(&AO_pt_lock);
+  if (*addr == old)
+    {
+      *addr = new_val;
+      pthread_mutex_unlock(&AO_pt_lock);
+      return 1;
+    }
+  else
+    pthread_mutex_unlock(&AO_pt_lock);
+    return 0;
+}
+
+#define AO_HAVE_compare_and_swap_full
+
+/* Unlike real architectures, we define both double-width CAS variants. */
+
+typedef struct {
+        AO_t AO_val1;
+        AO_t AO_val2;
+} AO_double_t;
+
+#define AO_HAVE_double_t
+
+AO_INLINE int
+AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
+                                       AO_t old1, AO_t old2,
+                                       AO_t new1, AO_t new2)
+{
+  pthread_mutex_lock(&AO_pt_lock);
+  if (addr -> AO_val1 == old1 && addr -> AO_val2 == old2)
+    {
+      addr -> AO_val1 = new1;
+      addr -> AO_val2 = new2;
+      pthread_mutex_unlock(&AO_pt_lock);
+      return 1;
+    }
+  else
+    pthread_mutex_unlock(&AO_pt_lock);
+    return 0;
+}
+
+#define AO_HAVE_compare_double_and_swap_double_full
+
+AO_INLINE int
+AO_compare_and_swap_double_full(volatile AO_double_t *addr,
+                                AO_t old1,
+                                AO_t new1, AO_t new2)
+{
+  pthread_mutex_lock(&AO_pt_lock);
+  if (addr -> AO_val1 == old1)
+    {
+      addr -> AO_val1 = new1;
+      addr -> AO_val2 = new2;
+      pthread_mutex_unlock(&AO_pt_lock);
+      return 1;
+    }
+  else
+    pthread_mutex_unlock(&AO_pt_lock);
+    return 0;
+}
+
+#define AO_HAVE_compare_and_swap_double_full
+
+/* We can't use hardware loads and stores, since they don't     */
+/* interact correctly with atomic updates.                      */
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/hpc/hppa.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/hpc/hppa.h
new file mode 100644 (file)
index 0000000..fe11fec
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Derived from the corresponding header file for gcc.
+ *
+ */
+
+#include "../atomic_load_store.h"
+
+/* Some architecture set descriptions include special "ordered" memory  */
+/* operations.  As far as we can tell, no existing processors actually  */
+/* require those.  Nor does it appear likely that future processors     */
+/* will.                                                                */
+/* FIXME:                                                               */
+/* The PA emulator on Itanium may obey weaker restrictions.             */
+/* There should be a mode in which we don't assume sequential           */
+/* consistency here.                                                    */
+#include "../ordered.h"
+
+#include <machine/inline.h>
+
+/* GCC will not guarantee the alignment we need, use four lock words    */
+/* and select the correctly aligned datum. See the glibc 2.3.2          */
+/* linuxthread port for the original implementation.                    */
+struct AO_pa_clearable_loc {
+  int data[4];
+};
+
+#undef AO_TS_INITIALIZER
+#define AO_TS_t struct AO_pa_clearable_loc
+#define AO_TS_INITIALIZER {1,1,1,1}
+/* Switch meaning of set and clear, since we only have an atomic clear  */
+/* instruction.                                                         */
+typedef enum {AO_PA_TS_set = 0, AO_PA_TS_clear = 1} AO_PA_TS_val;
+#define AO_TS_VAL_t AO_PA_TS_val
+#define AO_TS_CLEAR AO_PA_TS_clear
+#define AO_TS_SET AO_PA_TS_set
+
+/* The hppa only has one atomic read and modify memory operation,       */
+/* load and clear, so hppa spinlocks must use zero to signify that      */
+/* someone is holding the lock.  The address used for the ldcw          */
+/* semaphore must be 16-byte aligned.                                   */
+
+#define __ldcw(a, ret)  \
+  _LDCWX(0 /* index */, 0 /* s */, a /* base */, ret);
+
+/* Because malloc only guarantees 8-byte alignment for malloc'd data,   */
+/* and GCC only guarantees 8-byte alignment for stack locals, we can't  */
+/* be assured of 16-byte alignment for atomic lock data even if we      */
+/* specify "__attribute ((aligned(16)))" in the type declaration.  So,  */
+/* we use a struct containing an array of four ints for the atomic lock */
+/* type and dynamically select the 16-byte aligned int from the array   */
+/* for the semaphore.                                                   */
+#define __PA_LDCW_ALIGNMENT 16
+
+#define __ldcw_align(a, ret) { \
+  ret = (unsigned long) a;                      \
+  ret += __PA_LDCW_ALIGNMENT - 1;                                       \
+  ret &= ~(__PA_LDCW_ALIGNMENT - 1);                                    \
+}
+
+/* Works on PA 1.1 and PA 2.0 systems */
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t * addr)
+{
+  register unsigned int ret;
+  register unsigned long a;
+  __ldcw_align (addr, a);
+  __ldcw (a, ret);
+  return ret;
+}
+
+AO_INLINE void
+AO_pa_clear(volatile AO_TS_t * addr)
+{
+  unsigned long a;
+  __ldcw_align (addr,a);
+  AO_compiler_barrier();
+  *(volatile unsigned int *)a = 1;
+}
+#define AO_CLEAR(addr) AO_pa_clear(addr)
+
+#define AO_HAVE_test_and_set_full
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/hpc/ia64.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/hpc/ia64.h
new file mode 100644 (file)
index 0000000..1cfec1c
--- /dev/null
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * This file specifies Itanimum primitives for use with the HP compiler
+ * under HP/UX.  We use intrinsics instead of the inline assembly code in the
+ * gcc file.
+ */
+
+#include "../all_atomic_load_store.h"
+
+#include "../all_acquire_release_volatile.h"
+
+#include "../test_and_set_t_is_char.h"
+
+#include <machine/sys/inline.h>
+
+#ifdef __LP64__
+# define AO_T_FASIZE _FASZ_D
+# define AO_T_SIZE _SZ_D
+#else
+# define AO_T_FASIZE _FASZ_W
+# define AO_T_SIZE _SZ_W
+#endif
+
+AO_INLINE void
+AO_nop_full(void)
+{
+  _Asm_mf();
+}
+#define AO_HAVE_nop_full
+
+AO_INLINE AO_t
+AO_fetch_and_add1_acquire (volatile AO_t *p)
+{
+  return _Asm_fetchadd(AO_T_FASIZE, _SEM_ACQ, p, 1,
+                       _LDHINT_NONE, _DOWN_MEM_FENCE);
+}
+#define AO_HAVE_fetch_and_add1_acquire
+
+AO_INLINE AO_t
+AO_fetch_and_add1_release (volatile AO_t *p)
+{
+  return _Asm_fetchadd(AO_T_FASIZE, _SEM_REL, p, 1,
+                       _LDHINT_NONE, _UP_MEM_FENCE);
+}
+
+#define AO_HAVE_fetch_and_add1_release
+
+AO_INLINE AO_t
+AO_fetch_and_sub1_acquire (volatile AO_t *p)
+{
+  return _Asm_fetchadd(AO_T_FASIZE, _SEM_ACQ, p, -1,
+                       _LDHINT_NONE, _DOWN_MEM_FENCE);
+}
+
+#define AO_HAVE_fetch_and_sub1_acquire
+
+AO_INLINE AO_t
+AO_fetch_and_sub1_release (volatile AO_t *p)
+{
+  return _Asm_fetchadd(AO_T_FASIZE, _SEM_REL, p, -1,
+                       _LDHINT_NONE, _UP_MEM_FENCE);
+}
+
+#define AO_HAVE_fetch_and_sub1_release
+
+AO_INLINE int
+AO_compare_and_swap_acquire(volatile AO_t *addr,
+                             AO_t old, AO_t new_val)
+{
+  AO_t oldval;
+
+  _Asm_mov_to_ar(_AREG_CCV, old, _DOWN_MEM_FENCE);
+  oldval = _Asm_cmpxchg(AO_T_SIZE, _SEM_ACQ, addr,
+                        new_val, _LDHINT_NONE, _DOWN_MEM_FENCE);
+  return (oldval == old);
+}
+
+#define AO_HAVE_compare_and_swap_acquire
+
+AO_INLINE int
+AO_compare_and_swap_release(volatile AO_t *addr,
+                             AO_t old, AO_t new_val)
+{
+  AO_t oldval;
+  _Asm_mov_to_ar(_AREG_CCV, old, _UP_MEM_FENCE);
+  oldval = _Asm_cmpxchg(AO_T_SIZE, _SEM_REL, addr,
+                        new_val, _LDHINT_NONE, _UP_MEM_FENCE);
+  /* Hopefully the compiler knows not to reorder the above two? */
+  return (oldval == old);
+}
+
+#define AO_HAVE_compare_and_swap_release
+
+AO_INLINE int
+AO_char_compare_and_swap_acquire(volatile unsigned char *addr,
+                                 unsigned char old, unsigned char new_val)
+{
+  unsigned char oldval;
+
+  _Asm_mov_to_ar(_AREG_CCV, old, _DOWN_MEM_FENCE);
+  oldval = _Asm_cmpxchg(_SZ_B, _SEM_ACQ, addr,
+                        new_val, _LDHINT_NONE, _DOWN_MEM_FENCE);
+  return (oldval == old);
+}
+
+#define AO_HAVE_char_compare_and_swap_acquire
+
+AO_INLINE int
+AO_char_compare_and_swap_release(volatile unsigned char *addr,
+                                 unsigned char old, unsigned char new_val)
+{
+  unsigned char oldval;
+  _Asm_mov_to_ar(_AREG_CCV, old, _UP_MEM_FENCE);
+  oldval = _Asm_cmpxchg(_SZ_B, _SEM_REL, addr,
+                        new_val, _LDHINT_NONE, _UP_MEM_FENCE);
+  /* Hopefully the compiler knows not to reorder the above two? */
+  return (oldval == old);
+}
+
+#define AO_HAVE_char_compare_and_swap_release
+
+AO_INLINE int
+AO_short_compare_and_swap_acquire(volatile unsigned short *addr,
+                                 unsigned short old, unsigned short new_val)
+{
+  unsigned short oldval;
+
+  _Asm_mov_to_ar(_AREG_CCV, old, _DOWN_MEM_FENCE);
+  oldval = _Asm_cmpxchg(_SZ_B, _SEM_ACQ, addr,
+                        new_val, _LDHINT_NONE, _DOWN_MEM_FENCE);
+  return (oldval == old);
+}
+
+#define AO_HAVE_short_compare_and_swap_acquire
+
+AO_INLINE int
+AO_short_compare_and_swap_release(volatile unsigned short *addr,
+                                 unsigned short old, unsigned short new_val)
+{
+  unsigned short oldval;
+  _Asm_mov_to_ar(_AREG_CCV, old, _UP_MEM_FENCE);
+  oldval = _Asm_cmpxchg(_SZ_B, _SEM_REL, addr,
+                        new_val, _LDHINT_NONE, _UP_MEM_FENCE);
+  /* Hopefully the compiler knows not to reorder the above two? */
+  return (oldval == old);
+}
+
+#define AO_HAVE_short_compare_and_swap_release
+
+#ifndef __LP64__
+# include "../ao_t_is_int.h"
+#endif
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/ibmc/powerpc.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/ibmc/powerpc.h
new file mode 100644 (file)
index 0000000..ee0123c
--- /dev/null
@@ -0,0 +1,126 @@
+/* FIXME.  This is only a placeholder for the AIX compiler.             */
+/* It doesn't work.  Please send a patch.                               */
+/* Memory model documented at http://www-106.ibm.com/developerworks/    */
+/* eserver/articles/archguide.html and (clearer)                        */
+/* http://www-106.ibm.com/developerworks/eserver/articles/powerpc.html. */
+/* There appears to be no implicit ordering between any kind of         */
+/* independent memory references.                                       */
+/* Architecture enforces some ordering based on control dependence.     */
+/* I don't know if that could help.                                     */
+/* Data-dependent loads are always ordered.                             */
+/* Based on the above references, eieio is intended for use on          */
+/* uncached memory, which we don't support.  It does not order loads    */
+/* from cached memory.                                                  */
+/* Thanks to Maged Michael, Doug Lea, and Roger Hoover for helping to   */
+/* track some of this down and correcting my misunderstandings. -HB     */
+
+#include "../all_aligned_atomic_load_store.h"
+
+void AO_sync(void);
+#pragma mc_func AO_sync { "7c0004ac" }
+
+void AO_lwsync(void);
+#pragma mc_func AO_lwsync { "7c2004ac" }
+
+#define AO_nop_write() AO_lwsync()
+#define AO_HAVE_nop_write
+
+#define AO_nop_read() AO_lwsync()
+#define AO_HAVE_nop_read
+
+/* We explicitly specify load_acquire and store_release, since these    */
+/* rely on the fact that lwsync is also a LoadStore barrier.            */
+AO_INLINE AO_t
+AO_load_acquire(const volatile AO_t *addr)
+{
+  AO_t result = *addr;
+  AO_lwsync();
+  return result;
+}
+
+#define AO_HAVE_load_acquire
+
+AO_INLINE void
+AO_store_release(volatile AO_t *addr, AO_t value)
+{
+  AO_lwsync();
+  *addr = value;
+}
+
+#define AO_HAVE_load_acquire
+
+/* This is similar to the code in the garbage collector.  Deleting      */
+/* this and having it synthesized from compare_and_swap would probably  */
+/* only cost us a load immediate instruction.                           */
+/*AO_INLINE AO_TS_VAL_t
+AO_test_and_set(volatile AO_TS_t *addr) {
+# error FIXME Implement me
+}
+
+#define AO_HAVE_test_and_set*/
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_acquire(volatile AO_TS_t *addr) {
+  AO_TS_VAL_t result = AO_test_and_set(addr);
+  AO_lwsync();
+  return result;
+}
+
+#define AO_HAVE_test_and_set_acquire
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_release(volatile AO_TS_t *addr) {
+  AO_lwsync();
+  return AO_test_and_set(addr);
+}
+
+#define AO_HAVE_test_and_set_release
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t *addr) {
+  AO_TS_VAL_t result;
+  AO_lwsync();
+  result = AO_test_and_set(addr);
+  AO_lwsync();
+  return result;
+}
+
+#define AO_HAVE_test_and_set_full
+
+/*AO_INLINE AO_t
+AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val) {
+# error FIXME Implement me
+}
+
+#define AO_HAVE_compare_and_swap*/
+
+AO_INLINE AO_t
+AO_compare_and_swap_acquire(volatile AO_t *addr, AO_t old, AO_t new_val) {
+  AO_t result = AO_compare_and_swap(addr, old, new_val);
+  AO_lwsync();
+  return result;
+}
+
+#define AO_HAVE_compare_and_swap_acquire
+
+AO_INLINE AO_t
+AO_compare_and_swap_release(volatile AO_t *addr, AO_t old, AO_t new_val) {
+  AO_lwsync();
+  return AO_compare_and_swap(addr, old, new_val);
+}
+
+#define AO_HAVE_compare_and_swap_release
+
+AO_INLINE AO_t
+AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) {
+  AO_t result;
+  AO_lwsync();
+  result = AO_compare_and_swap(addr, old, new_val);
+  AO_lwsync();
+  return result;
+}
+
+#define AO_HAVE_compare_and_swap_full
+
+/* FIXME: We should also implement fetch_and_add and or primitives      */
+/* directly.                                                            */
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/icc/ia64.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/icc/ia64.h
new file mode 100644 (file)
index 0000000..d0ca804
--- /dev/null
@@ -0,0 +1,224 @@
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * This file specifies Itanimum primitives for use with the Intel (ecc)
+ * compiler.  We use intrinsics instead of the inline assembly code in the
+ * gcc file.
+ */
+
+#include "../all_atomic_load_store.h"
+
+#include "../test_and_set_t_is_char.h"
+
+#include <ia64intrin.h>
+
+/* The acquire release semantics of volatile can be turned off.  And volatile   */
+/* operations in icc9 don't imply ordering with respect to other nonvolatile    */
+/* operations.                                                                  */
+
+#define AO_INTEL_PTR_t void *
+
+AO_INLINE AO_t
+AO_load_acquire(const volatile AO_t *p)
+{
+  return (AO_t)(__ld8_acq((AO_INTEL_PTR_t)p));
+}
+#define AO_HAVE_load_acquire
+
+AO_INLINE void
+AO_store_release(volatile AO_t *p, AO_t val)
+{
+  __st8_rel((AO_INTEL_PTR_t)p, (__int64)val);
+}
+#define AO_HAVE_store_release
+
+AO_INLINE unsigned char
+AO_char_load_acquire(const volatile unsigned char *p)
+{
+  /* A normal volatile load generates an ld.acq         */
+  return (__ld1_acq((AO_INTEL_PTR_t)p));
+}
+#define AO_HAVE_char_load_acquire
+
+AO_INLINE void
+AO_char_store_release(volatile unsigned char *p, unsigned char val)
+{
+  __st1_rel((AO_INTEL_PTR_t)p, val);
+}
+#define AO_HAVE_char_store_release
+
+AO_INLINE unsigned short
+AO_short_load_acquire(const volatile unsigned short *p)
+{
+  /* A normal volatile load generates an ld.acq         */
+  return (__ld2_acq((AO_INTEL_PTR_t)p));
+}
+#define AO_HAVE_short_load_acquire
+
+AO_INLINE void
+AO_short_store_release(volatile unsigned short *p, unsigned short val)
+{
+  __st2_rel((AO_INTEL_PTR_t)p, val);
+}
+#define AO_HAVE_short_store_release
+
+AO_INLINE unsigned int
+AO_int_load_acquire(const volatile unsigned int *p)
+{
+  /* A normal volatile load generates an ld.acq         */
+  return (__ld4_acq((AO_INTEL_PTR_t)p));
+}
+#define AO_HAVE_int_load_acquire
+
+AO_INLINE void
+AO_int_store_release(volatile unsigned int *p, unsigned int val)
+{
+  __st4_rel((AO_INTEL_PTR_t)p, val);
+}
+#define AO_HAVE_int_store_release
+
+AO_INLINE void
+AO_nop_full(void)
+{
+  __mf();
+}
+#define AO_HAVE_nop_full
+
+AO_INLINE AO_t
+AO_fetch_and_add1_acquire (volatile AO_t *p)
+{
+  return __fetchadd8_acq((unsigned __int64 *)p, 1);
+}
+#define AO_HAVE_fetch_and_add1_acquire
+
+AO_INLINE AO_t
+AO_fetch_and_add1_release (volatile AO_t *p)
+{
+  return __fetchadd8_rel((unsigned __int64 *)p, 1);
+}
+
+#define AO_HAVE_fetch_and_add1_release
+
+AO_INLINE AO_t
+AO_fetch_and_sub1_acquire (volatile AO_t *p)
+{
+  return __fetchadd8_acq((unsigned __int64 *)p, -1);
+}
+
+#define AO_HAVE_fetch_and_sub1_acquire
+
+AO_INLINE AO_t
+AO_fetch_and_sub1_release (volatile AO_t *p)
+{
+  return __fetchadd8_rel((unsigned __int64 *)p, -1);
+}
+
+#define AO_HAVE_fetch_and_sub1_release
+
+AO_INLINE int
+AO_compare_and_swap_acquire(volatile AO_t *addr,
+                             AO_t old, AO_t new_val)
+{
+  AO_t oldval;
+  oldval = _InterlockedCompareExchange64_acq(addr, new_val, old);
+  return (oldval == old);
+}
+
+#define AO_HAVE_compare_and_swap_acquire
+
+AO_INLINE int
+AO_compare_and_swap_release(volatile AO_t *addr,
+                             AO_t old, AO_t new_val)
+{
+  AO_t oldval;
+  oldval = _InterlockedCompareExchange64_rel(addr, new_val, old);
+  return (oldval == old);
+}
+
+#define AO_HAVE_compare_and_swap_release
+
+AO_INLINE int
+AO_char_compare_and_swap_acquire(volatile unsigned char *addr,
+                                 unsigned char old, unsigned char new_val)
+{
+  unsigned char oldval;
+  oldval = _InterlockedCompareExchange8_acq(addr, new_val, old);
+  return (oldval == old);
+}
+
+#define AO_HAVE_char_compare_and_swap_acquire
+
+AO_INLINE int
+AO_char_compare_and_swap_release(volatile unsigned char *addr,
+                            unsigned char old, unsigned char new_val)
+{
+  unsigned char oldval;
+  oldval = _InterlockedCompareExchange8_rel(addr, new_val, old);
+  return (oldval == old);
+}
+
+#define AO_HAVE_char_compare_and_swap_release
+
+AO_INLINE int
+AO_short_compare_and_swap_acquire(volatile unsigned short *addr,
+                                 unsigned short old, unsigned short new_val)
+{
+  unsigned short oldval;
+  oldval = _InterlockedCompareExchange16_acq(addr, new_val, old);
+  return (oldval == old);
+}
+
+#define AO_HAVE_short_compare_and_swap_acquire
+
+AO_INLINE int
+AO_short_compare_and_swap_release(volatile unsigned short *addr,
+                            unsigned short old, unsigned short new_val)
+{
+  unsigned short oldval;
+  oldval = _InterlockedCompareExchange16_rel(addr, new_val, old);
+  return (oldval == old);
+}
+
+#define AO_HAVE_short_compare_and_swap_release
+
+AO_INLINE int
+AO_int_compare_and_swap_acquire(volatile unsigned int *addr,
+                                 unsigned int old, unsigned int new_val)
+{
+  unsigned int oldval;
+  oldval = _InterlockedCompareExchange_acq(addr, new_val, old);
+  return (oldval == old);
+}
+
+#define AO_HAVE_int_compare_and_swap_acquire
+
+AO_INLINE int
+AO_int_compare_and_swap_release(volatile unsigned int *addr,
+                            unsigned int old, unsigned int new_val)
+{
+  unsigned int oldval;
+  oldval = _InterlockedCompareExchange_rel(addr, new_val, old);
+  return (oldval == old);
+}
+
+#define AO_HAVE_int_compare_and_swap_release
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/int_acquire_release_volatile.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/int_acquire_release_volatile.h
new file mode 100644 (file)
index 0000000..01037a2
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2003-2004 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * This file adds definitions appropriate for environments in which an unsigned
+ * int volatile load has acquire semantics, and an unsigned short volatile
+ * store has release semantics.  This is true with the standard Itanium ABI.
+ */
+#if !defined(AO_GCC_BARRIER)
+#  if defined(__GNUC__)
+#    define AO_GCC_BARRIER() AO_compiler_barrier()
+#  else
+#    define AO_GCC_BARRIER()
+#  endif
+#endif
+
+AO_INLINE unsigned int
+AO_int_load_acquire(const volatile unsigned int *p)
+{
+  unsigned int result = *p;
+  /* A normal volatile load generates an ld.acq         */
+  AO_GCC_BARRIER();
+  return result;
+}
+#define AO_HAVE_int_load_acquire
+
+AO_INLINE void
+AO_int_store_release(volatile unsigned int *p, unsigned int val)
+{
+  AO_GCC_BARRIER();
+  /* A normal volatile store generates an st.rel        */
+  *p = val;
+}
+#define AO_HAVE_int_store_release
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/int_aligned_atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/int_aligned_atomic_load_store.h
new file mode 100644 (file)
index 0000000..e1c373c
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Definitions for architectures on which loads and stores of unsigned int are
+ * atomic for all legal alignments.
+ */
+
+AO_INLINE unsigned int
+AO_int_load(const volatile unsigned int *addr)
+{
+  assert(((size_t)addr & (sizeof(unsigned int) - 1)) == 0);
+  /* Cast away the volatile for architectures like IA64 where   */
+  /* volatile adds barrier semantics.                           */
+  return (*(unsigned int *)addr);
+}
+
+#define AO_HAVE_int_load
+
+AO_INLINE void
+AO_int_store(volatile unsigned int *addr, unsigned int new_val)
+{
+  assert(((size_t)addr & (sizeof(unsigned int) - 1)) == 0);
+  (*(unsigned int *)addr) = new_val;
+}
+
+#define AO_HAVE_int_store
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/int_atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/int_atomic_load_store.h
new file mode 100644 (file)
index 0000000..8892692
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Definitions for architectures on which loads and stores of unsigned int are
+ * atomic for all legal alignments.
+ */
+
+AO_INLINE unsigned int
+AO_int_load(const volatile unsigned int *addr)
+{
+  /* Cast away the volatile for architectures like IA64 where   */
+  /* volatile adds barrier semantics.                           */
+  return (*(const unsigned int *)addr);
+}
+
+#define AO_HAVE_int_load
+
+AO_INLINE void
+AO_int_store(volatile unsigned int *addr, unsigned int new_val)
+{
+  (*(unsigned int *)addr) = new_val;
+}
+
+#define AO_HAVE_int_store
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/msftc/arm.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/msftc/arm.h
new file mode 100644 (file)
index 0000000..36e45f0
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include "../read_ordered.h"
+
+#ifndef AO_ASSUME_WINDOWS98
+  /* CAS is always available */
+# define AO_ASSUME_WINDOWS98
+#endif
+#include "common32_defs.h"
+/* FIXME: Do _InterlockedOps really have a full memory barrier?         */
+/* (MSDN WinCE docs say nothing about it.)                              */
+
+#if _M_ARM >= 6
+/* ARMv6 is the first architecture providing support for simple LL/SC.  */
+
+#include "../standard_ao_double_t.h"
+
+/* If only a single processor is used, we can define AO_UNIPROCESSOR    */
+/* and do not need to access CP15 for ensuring a DMB at all.            */
+#ifdef AO_UNIPROCESSOR
+  AO_INLINE void AO_nop_full(void) {}
+# define AO_HAVE_nop_full
+#else
+/* AO_nop_full() is emulated using AO_test_and_set_full().              */
+#endif
+
+#include "../test_and_set_t_is_ao_t.h"
+/* AO_test_and_set() is emulated using CAS.                             */
+
+AO_INLINE AO_t
+AO_load(const volatile AO_t *addr)
+{
+  /* Cast away the volatile in case it adds fence semantics */
+  return (*(const AO_t *)addr);
+}
+#define AO_HAVE_load
+
+AO_INLINE void
+AO_store_full(volatile AO_t *addr, AO_t value)
+{
+  /* Emulate atomic store using CAS.    */
+  AO_t old = AO_load(addr);
+  AO_t current;
+# ifdef AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE
+    while ((current = (AO_t)_InterlockedCompareExchange(
+                                (PVOID AO_INTERLOCKED_VOLATILE *)addr,
+                                (PVOID)value, (PVOID)old)) != old)
+      old = current;
+# else
+    while ((current = (AO_t)_InterlockedCompareExchange(
+                                (LONG AO_INTERLOCKED_VOLATILE *)addr,
+                                (LONG)value, (LONG)old)) != old)
+      old = current;
+# endif
+}
+#define AO_HAVE_store_full
+
+/* FIXME: implement AO_compare_double_and_swap_double() */
+
+#else /* _M_ARM < 6 */
+
+/* Some slide set, if it has been red correctly, claims that Loads      */
+/* followed by either a Load or a Store are ordered, but nothing        */
+/* else is. It appears that SWP is the only simple memory barrier.      */
+#include "../all_atomic_load_store.h"
+
+#include "../test_and_set_t_is_ao_t.h"
+/* AO_test_and_set_full() is emulated using CAS.                        */
+
+#endif /* _M_ARM < 6 */
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/msftc/common32_defs.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/msftc/common32_defs.h
new file mode 100644 (file)
index 0000000..96adba2
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/* This file contains AO primitives based on VC++ built-in intrinsic    */
+/* functions commonly available across 32-bit architectures.            */
+
+/* This file should be included from arch-specific header files.        */
+/* Define AO_USE_INTERLOCKED_INTRINSICS if _Interlocked primitives      */
+/* (used below) are available as intrinsic ones for a target arch       */
+/* (otherwise "Interlocked" functions family is used instead).          */
+/* Define AO_ASSUME_WINDOWS98 if CAS is available.                      */
+
+#include <windows.h>
+        /* Seems like over-kill, but that's what MSDN recommends.       */
+        /* And apparently winbase.h is not always self-contained.       */
+
+#if _MSC_VER < 1310 || !defined(AO_USE_INTERLOCKED_INTRINSICS)
+
+# define _InterlockedIncrement       InterlockedIncrement
+# define _InterlockedDecrement       InterlockedDecrement
+# define _InterlockedExchange        InterlockedExchange
+# define _InterlockedExchangeAdd     InterlockedExchangeAdd
+# define _InterlockedCompareExchange InterlockedCompareExchange
+
+# define AO_INTERLOCKED_VOLATILE /**/
+
+#else /* elif _MSC_VER >= 1310 */
+
+# if _MSC_VER >= 1400
+#   ifndef _WIN32_WCE
+#     include <intrin.h>
+#   endif
+
+#   pragma intrinsic (_ReadWriteBarrier)
+
+# else /* elif _MSC_VER < 1400 */
+#  ifdef __cplusplus
+     extern "C" {
+#  endif
+   LONG __cdecl _InterlockedIncrement(LONG volatile *);
+   LONG __cdecl _InterlockedDecrement(LONG volatile *);
+   LONG __cdecl _InterlockedExchangeAdd(LONG volatile *, LONG);
+   LONG __cdecl _InterlockedExchange(LONG volatile *, LONG);
+   LONG __cdecl _InterlockedCompareExchange(LONG volatile *,
+                                        LONG /* Exchange */, LONG /* Comp */);
+#  ifdef __cplusplus
+     }
+#  endif
+# endif /* _MSC_VER < 1400 */
+
+# pragma intrinsic (_InterlockedIncrement)
+# pragma intrinsic (_InterlockedDecrement)
+# pragma intrinsic (_InterlockedExchange)
+# pragma intrinsic (_InterlockedExchangeAdd)
+# pragma intrinsic (_InterlockedCompareExchange)
+
+# define AO_INTERLOCKED_VOLATILE volatile
+
+#endif /* _MSC_VER >= 1310 */
+
+AO_INLINE AO_t
+AO_fetch_and_add_full(volatile AO_t *p, AO_t incr)
+{
+  return _InterlockedExchangeAdd((LONG AO_INTERLOCKED_VOLATILE *)p,
+                                 (LONG)incr);
+}
+
+#define AO_HAVE_fetch_and_add_full
+
+AO_INLINE AO_t
+AO_fetch_and_add1_full(volatile AO_t *p)
+{
+  return _InterlockedIncrement((LONG AO_INTERLOCKED_VOLATILE *)p) - 1;
+}
+
+#define AO_HAVE_fetch_and_add1_full
+
+AO_INLINE AO_t
+AO_fetch_and_sub1_full(volatile AO_t *p)
+{
+  return _InterlockedDecrement((LONG AO_INTERLOCKED_VOLATILE *)p) + 1;
+}
+
+#define AO_HAVE_fetch_and_sub1_full
+
+#ifdef AO_ASSUME_WINDOWS98
+/* Returns nonzero if the comparison succeeded. */
+AO_INLINE int
+AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val)
+{
+# ifdef AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE
+    return _InterlockedCompareExchange((PVOID AO_INTERLOCKED_VOLATILE *)addr,
+                                       (PVOID)new_val, (PVOID)old)
+           == (PVOID)old;
+# else
+    return _InterlockedCompareExchange((LONG AO_INTERLOCKED_VOLATILE *)addr,
+                                       (LONG)new_val, (LONG)old)
+           == (LONG)old;
+# endif
+}
+
+# define AO_HAVE_compare_and_swap_full
+#endif /* AO_ASSUME_WINDOWS98 */
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/msftc/x86.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/msftc/x86.h
new file mode 100644 (file)
index 0000000..347b66c
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/* If AO_ASSUME_WINDOWS98 is defined, we assume Windows 98 or newer.    */
+/* If AO_ASSUME_VISTA is defined, we assume Windows Server 2003, Vista  */
+/* or later.                                                            */
+
+#include "../all_aligned_atomic_load_store.h"
+
+/* Real X86 implementations, except for some old WinChips, appear       */
+/* to enforce ordering between memory operations, EXCEPT that a later   */
+/* read can pass earlier writes, presumably due to the visible          */
+/* presence of store buffers.                                           */
+/* We ignore both the WinChips, and the fact that the official specs    */
+/* seem to be much weaker (and arguably too weak to be usable).         */
+
+#include "../ordered_except_wr.h"
+
+#include "../test_and_set_t_is_char.h"
+
+#ifndef AO_USE_INTERLOCKED_INTRINSICS
+  /* _Interlocked primitives (Inc, Dec, Xchg, Add) are always available */
+# define AO_USE_INTERLOCKED_INTRINSICS
+#endif
+#include "common32_defs.h"
+
+/* As far as we can tell, the lfence and sfence instructions are not    */
+/* currently needed or useful for cached memory accesses.               */
+
+/* Unfortunately mfence doesn't exist everywhere.               */
+/* IsProcessorFeaturePresent(PF_COMPARE_EXCHANGE128) is         */
+/* probably a conservative test for it?                         */
+
+#if defined(AO_USE_PENTIUM4_INSTRS)
+
+AO_INLINE void
+AO_nop_full(void)
+{
+  __asm { mfence }
+}
+
+#define AO_HAVE_nop_full
+
+#else
+
+/* We could use the cpuid instruction.  But that seems to be slower     */
+/* than the default implementation based on test_and_set_full.  Thus    */
+/* we omit that bit of misinformation here.                             */
+
+#endif
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t *addr)
+{
+    __asm
+    {
+        mov     eax,0xff                ; /* AO_TS_SET */
+        mov     ebx,addr                ;
+        xchg    byte ptr [ebx],al       ;
+    }
+    /* Ignore possible "missing return value" warning here. */
+}
+
+#define AO_HAVE_test_and_set_full
+
+#ifdef _WIN64
+#  error wrong architecture
+#endif
+
+#ifdef AO_ASSUME_VISTA
+/* NEC LE-IT: whenever we run on a pentium class machine we have that
+ * certain function */
+
+#include "../standard_ao_double_t.h"
+#pragma intrinsic (_InterlockedCompareExchange64)
+/* Returns nonzero if the comparison succeeded. */
+AO_INLINE int
+AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
+                                       AO_t old_val1, AO_t old_val2,
+                                       AO_t new_val1, AO_t new_val2)
+{
+    __int64 oldv = (__int64)old_val1 | ((__int64)old_val2 << 32);
+    __int64 newv = (__int64)new_val1 | ((__int64)new_val2 << 32);
+    return _InterlockedCompareExchange64((__int64 volatile *)addr,
+                                       newv, oldv) == oldv;
+}
+#define AO_HAVE_compare_double_and_swap_double_full
+
+#ifdef __cplusplus
+AO_INLINE int
+AO_double_compare_and_swap_full(volatile AO_double_t *addr,
+                                AO_double_t old_val, AO_double_t new_val)
+{
+    return _InterlockedCompareExchange64((__int64 volatile *)addr,
+                new_val.AO_whole, old_val.AO_whole) == old_val.AO_whole;
+}
+#define AO_HAVE_double_compare_and_swap_full
+#endif /* __cplusplus */
+#endif /* AO_ASSUME_VISTA */
+
+#include "../ao_t_is_int.h"
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/msftc/x86_64.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/msftc/x86_64.h
new file mode 100644 (file)
index 0000000..150a97f
--- /dev/null
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include "../all_aligned_atomic_load_store.h"
+
+/* Real X86 implementations appear                                      */
+/* to enforce ordering between memory operations, EXCEPT that a later   */
+/* read can pass earlier writes, presumably due to the visible          */
+/* presence of store buffers.                                           */
+/* We ignore the fact that the official specs                           */
+/* seem to be much weaker (and arguably too weak to be usable).         */
+
+#include "../ordered_except_wr.h"
+
+#ifdef AO_ASM_X64_AVAILABLE
+# include "../test_and_set_t_is_char.h"
+#else
+# include "../test_and_set_t_is_ao_t.h"
+#endif
+
+#include "../standard_ao_double_t.h"
+
+#include <windows.h>
+        /* Seems like over-kill, but that's what MSDN recommends.       */
+        /* And apparently winbase.h is not always self-contained.       */
+
+/* Assume _MSC_VER >= 1400 */
+#include <intrin.h>
+
+#pragma intrinsic (_ReadWriteBarrier)
+
+#pragma intrinsic (_InterlockedIncrement64)
+#pragma intrinsic (_InterlockedDecrement64)
+#pragma intrinsic (_InterlockedExchange64)
+#pragma intrinsic (_InterlockedExchangeAdd64)
+#pragma intrinsic (_InterlockedCompareExchange64)
+
+AO_INLINE AO_t
+AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
+{
+  return _InterlockedExchangeAdd64((LONGLONG volatile *)p, (LONGLONG)incr);
+}
+
+#define AO_HAVE_fetch_and_add_full
+
+AO_INLINE AO_t
+AO_fetch_and_add1_full (volatile AO_t *p)
+{
+  return _InterlockedIncrement64((LONGLONG volatile *)p) - 1;
+}
+
+#define AO_HAVE_fetch_and_add1_full
+
+AO_INLINE AO_t
+AO_fetch_and_sub1_full (volatile AO_t *p)
+{
+  return _InterlockedDecrement64((LONGLONG volatile *)p) + 1;
+}
+
+#define AO_HAVE_fetch_and_sub1_full
+
+AO_INLINE int
+AO_compare_and_swap_full(volatile AO_t *addr,
+                         AO_t old, AO_t new_val)
+{
+    return _InterlockedCompareExchange64((LONGLONG volatile *)addr,
+                                         (LONGLONG)new_val, (LONGLONG)old)
+           == (LONGLONG)old;
+}
+
+#define AO_HAVE_compare_and_swap_full
+
+/* As far as we can tell, the lfence and sfence instructions are not    */
+/* currently needed or useful for cached memory accesses.               */
+
+/* Unfortunately mfence doesn't exist everywhere.               */
+/* IsProcessorFeaturePresent(PF_COMPARE_EXCHANGE128) is         */
+/* probably a conservative test for it?                         */
+
+#if defined(AO_USE_PENTIUM4_INSTRS)
+
+AO_INLINE void
+AO_nop_full(void)
+{
+  __asm { mfence }
+}
+
+#define AO_HAVE_nop_full
+
+#else
+
+/* We could use the cpuid instruction.  But that seems to be slower     */
+/* than the default implementation based on test_and_set_full.  Thus    */
+/* we omit that bit of misinformation here.                             */
+
+#endif
+
+#ifdef AO_ASM_X64_AVAILABLE
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t *addr)
+{
+    __asm
+    {
+        mov     rax,AO_TS_SET           ;
+        mov     rbx,addr                ;
+        xchg    byte ptr [rbx],al       ;
+    }
+}
+
+#define AO_HAVE_test_and_set_full
+
+#endif /* AO_ASM_X64_AVAILABLE */
+
+#ifdef AO_CMPXCHG16B_AVAILABLE
+
+/* AO_compare_double_and_swap_double_full needs implementation for Win64.
+ * Also see ../gcc/x86_64.h for partial old Opteron workaround.
+ */
+
+# if _MSC_VER >= 1500
+
+#pragma intrinsic (_InterlockedCompareExchange128)
+
+AO_INLINE int
+AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
+                                       AO_t old_val1, AO_t old_val2,
+                                       AO_t new_val1, AO_t new_val2)
+{
+   __int64 comparandResult[2];
+   comparandResult[0] = old_val1; /* low */
+   comparandResult[1] = old_val2; /* high */
+   return _InterlockedCompareExchange128((volatile __int64 *)addr,
+                new_val2 /* high */, new_val1 /* low */, comparandResult);
+}
+
+#   define AO_HAVE_compare_double_and_swap_double_full
+
+# elif defined(AO_ASM_X64_AVAILABLE)
+
+ /* If there is no intrinsic _InterlockedCompareExchange128 then we
+  * need basically what's given below.
+  */
+
+AO_INLINE int
+AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
+                                       AO_t old_val1, AO_t old_val2,
+                                       AO_t new_val1, AO_t new_val2)
+{
+        __asm
+        {
+                mov     rdx,QWORD PTR [old_val2]        ;
+                mov     rax,QWORD PTR [old_val1]        ;
+                mov     rcx,QWORD PTR [new_val2]        ;
+                mov     rbx,QWORD PTR [new_val1]        ;
+                lock cmpxchg16b [addr]                  ;
+                setz    rax                             ;
+        }
+}
+
+#   define AO_HAVE_compare_double_and_swap_double_full
+
+# endif /* _MSC_VER >= 1500 || AO_ASM_X64_AVAILABLE */
+
+#endif /* AO_CMPXCHG16B_AVAILABLE */
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/ordered.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/ordered.h
new file mode 100644 (file)
index 0000000..da77b63
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * These are common definitions for architectures that provide processor
+ * ordered memory operations.
+ */
+
+#include "ordered_except_wr.h"
+
+AO_INLINE void
+AO_nop_full(void)
+{
+  AO_compiler_barrier();
+}
+
+#define AO_HAVE_nop_full
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/ordered_except_wr.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/ordered_except_wr.h
new file mode 100644 (file)
index 0000000..ee51aff
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * These are common definitions for architectures that provide processor
+ * ordered memory operations except that a later read may pass an
+ * earlier write.  Real x86 implementations seem to be in this category,
+ * except apparently for some IDT WinChips, which we ignore.
+ */
+
+#include "read_ordered.h"
+
+AO_INLINE void
+AO_nop_write(void)
+{
+  AO_compiler_barrier();
+  /* sfence according to Intel docs.  Pentium 3 and up. */
+  /* Unnecessary for cached accesses?                   */
+}
+
+#define AO_HAVE_NOP_WRITE
+
+#if defined(AO_HAVE_store)
+
+AO_INLINE void
+AO_store_write(volatile AO_t *addr, AO_t val)
+{
+  AO_compiler_barrier();
+  AO_store(addr, val);
+}
+# define AO_HAVE_store_write
+
+# define AO_store_release(addr, val) AO_store_write(addr, val)
+# define AO_HAVE_store_release
+
+#endif /* AO_HAVE_store */
+
+#if defined(AO_HAVE_char_store)
+
+AO_INLINE void
+AO_char_store_write(volatile unsigned char *addr, unsigned char val)
+{
+  AO_compiler_barrier();
+  AO_char_store(addr, val);
+}
+# define AO_HAVE_char_store_write
+
+# define AO_char_store_release(addr, val) AO_char_store_write(addr, val)
+# define AO_HAVE_char_store_release
+
+#endif /* AO_HAVE_char_store */
+
+#if defined(AO_HAVE_short_store)
+
+AO_INLINE void
+AO_short_store_write(volatile unsigned short *addr, unsigned short val)
+{
+  AO_compiler_barrier();
+  AO_short_store(addr, val);
+}
+# define AO_HAVE_short_store_write
+
+# define AO_short_store_release(addr, val) AO_short_store_write(addr, val)
+# define AO_HAVE_short_store_release
+
+#endif /* AO_HAVE_short_store */
+
+#if defined(AO_HAVE_int_store)
+
+AO_INLINE void
+AO_int_store_write(volatile unsigned int *addr, unsigned int val)
+{
+  AO_compiler_barrier();
+  AO_int_store(addr, val);
+}
+# define AO_HAVE_int_store_write
+
+# define AO_int_store_release(addr, val) AO_int_store_write(addr, val)
+# define AO_HAVE_int_store_release
+
+#endif /* AO_HAVE_int_store */
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/read_ordered.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/read_ordered.h
new file mode 100644 (file)
index 0000000..1589e5c
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * These are common definitions for architectures that provide processor
+ * ordered memory operations except that a later read may pass an
+ * earlier write.  Real x86 implementations seem to be in this category,
+ * except apparently for some IDT WinChips, which we ignore.
+ */
+
+AO_INLINE void
+AO_nop_read(void)
+{
+  AO_compiler_barrier();
+}
+
+#define AO_HAVE_NOP_READ
+
+#ifdef AO_HAVE_load
+
+AO_INLINE AO_t
+AO_load_read(const volatile AO_t *addr)
+{
+  AO_t result = AO_load(addr);
+  AO_compiler_barrier();
+  return result;
+}
+#define AO_HAVE_load_read
+
+#define AO_load_acquire(addr) AO_load_read(addr)
+#define AO_HAVE_load_acquire
+
+#endif /* AO_HAVE_load */
+
+#ifdef AO_HAVE_char_load
+
+AO_INLINE AO_t
+AO_char_load_read(const volatile unsigned char *addr)
+{
+  AO_t result = AO_char_load(addr);
+  AO_compiler_barrier();
+  return result;
+}
+#define AO_HAVE_char_load_read
+
+#define AO_char_load_acquire(addr) AO_char_load_read(addr)
+#define AO_HAVE_char_load_acquire
+
+#endif /* AO_HAVE_char_load */
+
+#ifdef AO_HAVE_short_load
+
+AO_INLINE AO_t
+AO_short_load_read(const volatile unsigned short *addr)
+{
+  AO_t result = AO_short_load(addr);
+  AO_compiler_barrier();
+  return result;
+}
+#define AO_HAVE_short_load_read
+
+#define AO_short_load_acquire(addr) AO_short_load_read(addr)
+#define AO_HAVE_short_load_acquire
+
+#endif /* AO_HAVE_short_load */
+
+#ifdef AO_HAVE_int_load
+
+AO_INLINE AO_t
+AO_int_load_read(const volatile unsigned int *addr)
+{
+  AO_t result = AO_int_load(addr);
+  AO_compiler_barrier();
+  return result;
+}
+#define AO_HAVE_int_load_read
+
+#define AO_int_load_acquire(addr) AO_int_load_read(addr)
+#define AO_HAVE_int_load_acquire
+
+#endif /* AO_HAVE_int_load */
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/short_acquire_release_volatile.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/short_acquire_release_volatile.h
new file mode 100644 (file)
index 0000000..dcf3c04
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2003-2004 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * This file adds definitions appropriate for environments in which an unsigned short
+ * volatile load has acquire semantics, and an unsigned short volatile store has release
+ * semantics.  This is true with the standard Itanium ABI.
+ */
+#if !defined(AO_GCC_BARRIER)
+#  if defined(__GNUC__)
+#    define AO_GCC_BARRIER() AO_compiler_barrier()
+#  else
+#    define AO_GCC_BARRIER()
+#  endif
+#endif
+
+AO_INLINE unsigned short
+AO_short_load_acquire(const volatile unsigned short *p)
+{
+  unsigned short result = *p;
+  /* A normal volatile load generates an ld.acq         */
+  AO_GCC_BARRIER();
+  return result;
+}
+#define AO_HAVE_short_load_acquire
+
+AO_INLINE void
+AO_short_store_release(volatile unsigned short *p, unsigned short val)
+{
+  AO_GCC_BARRIER();
+  /* A normal volatile store generates an st.rel        */
+  *p = val;
+}
+#define AO_HAVE_short_store_release
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/short_aligned_atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/short_aligned_atomic_load_store.h
new file mode 100644 (file)
index 0000000..164ba97
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Definitions for architectures on which loads and stores of unsigned short
+ * are atomic for all legal alignments.
+ */
+
+AO_INLINE unsigned short
+AO_short_load(const volatile unsigned short *addr)
+{
+  assert(((size_t)addr & (sizeof(unsigned short) - 1)) == 0);
+  /* Cast away the volatile for architectures like IA64 where   */
+  /* volatile adds barrier semantics.                           */
+  return (*(unsigned short *)addr);
+}
+
+#define AO_HAVE_short_load
+
+AO_INLINE void
+AO_short_store(volatile unsigned short *addr, unsigned short new_val)
+{
+  assert(((size_t)addr & (sizeof(unsigned short) - 1)) == 0);
+  (*(unsigned short *)addr) = new_val;
+}
+
+#define AO_HAVE_short_store
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/short_atomic_load_store.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/short_atomic_load_store.h
new file mode 100644 (file)
index 0000000..9a88db5
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Definitions for architectures on which loads and stores of unsigned short
+ * are atomic for all legal alignments.
+ */
+
+AO_INLINE unsigned short
+AO_short_load(const volatile unsigned short *addr)
+{
+  /* Cast away the volatile for architectures like IA64 where   */
+  /* volatile adds barrier semantics.                           */
+  return (*(const unsigned short *)addr);
+}
+
+#define AO_HAVE_short_load
+
+AO_INLINE void
+AO_short_store(volatile unsigned short *addr, unsigned short new_val)
+{
+  (*(unsigned short *)addr) = new_val;
+}
+
+#define AO_HAVE_short_store
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/standard_ao_double_t.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/standard_ao_double_t.h
new file mode 100644 (file)
index 0000000..e92424d
--- /dev/null
@@ -0,0 +1,25 @@
+/* NEC LE-IT: For 64Bit OS we extend the double type to hold two int64's
+*
+*  x86-64: __m128 serves as placeholder which also requires the compiler
+*          to align     it on 16 byte boundary (as required by cmpxchg16.
+* Similar things could be done for PowerPC 64bit using a VMX data type...       */
+
+#if (defined(__x86_64__) && defined(__GNUC__)) || defined(_WIN64)
+# include <xmmintrin.h>
+  typedef __m128 double_ptr_storage;
+#elif defined(_WIN32) && !defined(__GNUC__)
+  typedef unsigned __int64 double_ptr_storage;
+#else
+  typedef unsigned long long double_ptr_storage;
+#endif
+
+# define AO_HAVE_DOUBLE_PTR_STORAGE
+
+typedef union {
+    double_ptr_storage AO_whole;
+    struct {AO_t AO_v1; AO_t AO_v2;} AO_parts;
+} AO_double_t;
+
+#define AO_HAVE_double_t
+#define AO_val1 AO_parts.AO_v1
+#define AO_val2 AO_parts.AO_v2
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/sunc/sparc.S b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/sunc/sparc.S
new file mode 100644 (file)
index 0000000..81f0ef0
--- /dev/null
@@ -0,0 +1,5 @@
+       .seg    "text"
+       .globl  AO_test_and_set_full
+AO_test_and_set_full:
+       retl
+         ldstub        [%o0],%o0
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/sunc/sparc.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/sunc/sparc.h
new file mode 100644 (file)
index 0000000..3578722
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE. 
+ */
+
+#include "../all_atomic_load_store.h"
+
+/* Real SPARC code uses TSO:                            */
+#include "../ordered_except_wr.h"
+
+/* Test_and_set location is just a byte.               */
+#include "../test_and_set_t_is_char.h"
+
+extern AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t *addr);
+/* Implemented in separate .S file, for now.   */
+
+#define AO_HAVE_test_and_set_full
+
+/* FIXME: Like the gcc version, this needs to be extended for V8       */
+/* and V9.                                                             */
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/sunc/x86.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/sunc/x86.h
new file mode 100644 (file)
index 0000000..a3236b5
--- /dev/null
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
+ *
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ *
+ * Some of the machine specific code was borrowed from our GC distribution.
+ */
+
+/* The following really assume we have a 486 or better.                 */
+
+#include "../all_aligned_atomic_load_store.h"
+
+/* Real X86 implementations, except for some old WinChips, appear       */
+/* to enforce ordering between memory operations, EXCEPT that a later   */
+/* read can pass earlier writes, presumably due to the visible          */
+/* presence of store buffers.                                           */
+/* We ignore both the WinChips, and the fact that the official specs    */
+/* seem to be much weaker (and arguably too weak to be usable).         */
+
+#include "../ordered_except_wr.h"
+
+#include "../test_and_set_t_is_char.h"
+
+#include "../standard_ao_double_t.h"
+
+#if defined(AO_USE_PENTIUM4_INSTRS)
+AO_INLINE void
+AO_nop_full(void)
+{
+  __asm__ __volatile__("mfence" : : : "memory");
+}
+
+#define AO_HAVE_nop_full
+
+#else
+
+/* We could use the cpuid instruction.  But that seems to be slower     */
+/* than the default implementation based on test_and_set_full.  Thus    */
+/* we omit that bit of misinformation here.                             */
+
+#endif
+
+/* As far as we can tell, the lfence and sfence instructions are not    */
+/* currently needed or useful for cached memory accesses.               */
+
+/* Really only works for 486 and later */
+AO_INLINE AO_t
+AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
+{
+  AO_t result;
+
+  __asm__ __volatile__ ("lock; xaddl %0, %1" :
+                        "=r" (result), "=m" (*p) : "0" (incr) /* , "m" (*p) */
+                        : "memory");
+  return result;
+}
+
+#define AO_HAVE_fetch_and_add_full
+
+AO_INLINE unsigned char
+AO_char_fetch_and_add_full (volatile unsigned char *p, unsigned char incr)
+{
+  unsigned char result;
+
+  __asm__ __volatile__ ("lock; xaddb %0, %1" :
+                        "=q" (result), "=m" (*p) : "0" (incr) /* , "m" (*p) */
+                        : "memory");
+  return result;
+}
+
+#define AO_HAVE_char_fetch_and_add_full
+
+AO_INLINE unsigned short
+AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr)
+{
+  unsigned short result;
+
+  __asm__ __volatile__ ("lock; xaddw %0, %1" :
+                        "=r" (result), "=m" (*p) : "0" (incr) /* , "m" (*p) */
+                        : "memory");
+  return result;
+}
+
+#define AO_HAVE_short_fetch_and_add_full
+
+/* Really only works for 486 and later */
+AO_INLINE void
+AO_or_full (volatile AO_t *p, AO_t incr)
+{
+  __asm__ __volatile__ ("lock; orl %1, %0" :
+                        "=m" (*p) : "r" (incr) /* , "m" (*p) */
+                        : "memory");
+}
+
+#define AO_HAVE_or_full
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t *addr)
+{
+  AO_TS_t oldval;
+  /* Note: the "xchg" instruction does not need a "lock" prefix */
+  /* Note 2: "xchgb" is not recognized by Sun CC assembler yet. */
+  __asm__ __volatile__("xchgl %0, %1"
+                : "=q"(oldval), "=m"(*addr)
+                : "0"(0xff) /* , "m"(*addr) */
+                : "memory");
+  return (AO_TS_VAL_t)oldval;
+}
+
+#define AO_HAVE_test_and_set_full
+
+/* Returns nonzero if the comparison succeeded. */
+AO_INLINE int
+AO_compare_and_swap_full(volatile AO_t *addr,
+                             AO_t old, AO_t new_val)
+{
+  char result;
+  __asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1"
+                       : "=m"(*addr), "=q"(result)
+                       : "r" (new_val), "a"(old) : "memory");
+  return (int) result;
+}
+
+#define AO_HAVE_compare_and_swap_full
+
+/* Returns nonzero if the comparison succeeded. */
+/* Really requires at least a Pentium.          */
+AO_INLINE int
+AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
+                                       AO_t old_val1, AO_t old_val2,
+                                       AO_t new_val1, AO_t new_val2)
+{
+  char result;
+  /* FIXME: not tested */
+#if __PIC__
+  /* If PIC is turned on, we can't use %ebx as it is reserved for the
+     GOT pointer.  We can save and restore %ebx because GCC won't be
+     using it for anything else (such as any of the m operands) */
+  __asm__ __volatile__("pushl %%ebx;"   /* save ebx used for PIC GOT ptr */
+                       "movl %6,%%ebx;" /* move new_val2 to %ebx */
+                       "lock; cmpxchg8b %0; setz %1;"
+                       "pop %%ebx;"     /* restore %ebx */
+                       : "=m"(*addr), "=q"(result)
+                       : "m"(*addr), "d" (old_val2), "a" (old_val1),
+                         "c" (new_val2), "m" (new_val1) : "memory");
+#else
+  /* We can't just do the same thing in non-PIC mode, because GCC
+   * might be using %ebx as the memory operand.  We could have ifdef'd
+   * in a clobber, but there's no point doing the push/pop if we don't
+   * have to. */
+  __asm__ __volatile__("lock; cmpxchg8b %0; setz %1;"
+                       : "=m"(*addr), "=q"(result)
+                       : /* "m"(*addr), */ "d" (old_val2), "a" (old_val1),
+                         "c" (new_val2), "b" (new_val1) : "memory");
+#endif
+  return (int) result;
+}
+
+#define AO_HAVE_compare_double_and_swap_double_full
+
+#include "../ao_t_is_int.h"
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/sunc/x86_64.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/sunc/x86_64.h
new file mode 100644 (file)
index 0000000..9822833
--- /dev/null
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved.
+ *
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ *
+ * Some of the machine specific code was borrowed from our GC distribution.
+ */
+
+#include "../all_aligned_atomic_load_store.h"
+
+/* Real X86 implementations, appear                                     */
+/* to enforce ordering between memory operations, EXCEPT that a later   */
+/* read can pass earlier writes, presumably due to the visible          */
+/* presence of store buffers.                                           */
+/* We ignore the fact that the official specs                           */
+/* seem to be much weaker (and arguably too weak to be usable).         */
+
+#include "../ordered_except_wr.h"
+
+#include "../test_and_set_t_is_char.h"
+
+#include "../standard_ao_double_t.h"
+
+AO_INLINE void
+AO_nop_full(void)
+{
+  /* Note: "mfence" (SSE2) is supported on all x86_64/amd64 chips.      */
+  __asm__ __volatile__("mfence" : : : "memory");
+}
+
+#define AO_HAVE_nop_full
+
+/* As far as we can tell, the lfence and sfence instructions are not    */
+/* currently needed or useful for cached memory accesses.               */
+
+AO_INLINE AO_t
+AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
+{
+  AO_t result;
+
+  __asm__ __volatile__ ("lock; xaddq %0, %1" :
+                        "=r" (result), "=m" (*p) : "0" (incr) /* , "m" (*p) */
+                        : "memory");
+  return result;
+}
+
+#define AO_HAVE_fetch_and_add_full
+
+AO_INLINE unsigned char
+AO_char_fetch_and_add_full (volatile unsigned char *p, unsigned char incr)
+{
+  unsigned char result;
+
+  __asm__ __volatile__ ("lock; xaddb %0, %1" :
+                        "=q" (result), "=m" (*p) : "0" (incr) /* , "m" (*p) */
+                        : "memory");
+  return result;
+}
+
+#define AO_HAVE_char_fetch_and_add_full
+
+AO_INLINE unsigned short
+AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr)
+{
+  unsigned short result;
+
+  __asm__ __volatile__ ("lock; xaddw %0, %1" :
+                        "=r" (result), "=m" (*p) : "0" (incr) /* , "m" (*p) */
+                        : "memory");
+  return result;
+}
+
+#define AO_HAVE_short_fetch_and_add_full
+
+AO_INLINE unsigned int
+AO_int_fetch_and_add_full (volatile unsigned int *p, unsigned int incr)
+{
+  unsigned int result;
+
+  __asm__ __volatile__ ("lock; xaddl %0, %1" :
+                        "=r" (result), "=m" (*p) : "0" (incr) /* , "m" (*p) */
+                        : "memory");
+  return result;
+}
+
+#define AO_HAVE_int_fetch_and_add_full
+
+AO_INLINE void
+AO_or_full (volatile AO_t *p, AO_t incr)
+{
+  __asm__ __volatile__ ("lock; orq %1, %0" :
+                        "=m" (*p) : "r" (incr) /* , "m" (*p) */
+                        : "memory");
+}
+
+#define AO_HAVE_or_full
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t *addr)
+{
+  unsigned int oldval;
+  /* Note: the "xchg" instruction does not need a "lock" prefix */
+  /* Note 2: "xchgb" is not recognized by Sun CC assembler yet. */
+  __asm__ __volatile__("xchgl %0, %1"
+                : "=q"(oldval), "=m"(*addr)
+                : "0"(0xff) /* , "m"(*addr) */
+                : "memory");
+  return (AO_TS_VAL_t)oldval;
+}
+
+#define AO_HAVE_test_and_set_full
+
+/* Returns nonzero if the comparison succeeded. */
+AO_INLINE int
+AO_compare_and_swap_full(volatile AO_t *addr,
+                         AO_t old, AO_t new_val)
+{
+  char result;
+  __asm__ __volatile__("lock; cmpxchgq %2, %0; setz %1"
+                       : "=m"(*addr), "=q"(result)
+                       : "r" (new_val), "a"(old) : "memory");
+  return (int) result;
+}
+
+#define AO_HAVE_compare_and_swap_full
+
+#ifdef AO_CMPXCHG16B_AVAILABLE
+/* NEC LE-IT: older AMD Opterons are missing this instruction.
+ * On these machines SIGILL will be thrown.
+ * Define AO_WEAK_DOUBLE_CAS_EMULATION to have an emulated
+ * (lock based) version available */
+/* HB: Changed this to not define either by default.  There are
+ * enough machines and tool chains around on which cmpxchg16b
+ * doesn't work.  And the emulation is unsafe by our usual rules.
+ * Hoewever both are clearly useful in certain cases.
+ */
+AO_INLINE int
+AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
+                                       AO_t old_val1, AO_t old_val2,
+                                       AO_t new_val1, AO_t new_val2)
+{
+  char result;
+  __asm__ __volatile__("lock; cmpxchg16b %0; setz %1"
+                                : "=m"(*addr), "=q"(result)
+                                        : "m"(*addr),
+                                          "d" (old_val2),
+                                          "a" (old_val1),
+                                          "c" (new_val2),
+                                          "b" (new_val1)  : "memory");
+  return (int) result;
+}
+#define AO_HAVE_compare_double_and_swap_double_full
+#else
+/* this one provides spinlock based emulation of CAS implemented in     */
+/* atomic_ops.c.  We probably do not want to do this here, since it is  */
+/* not atomic with respect to other kinds of updates of *addr.  On the  */
+/* other hand, this may be a useful facility on occasion.               */
+#ifdef AO_WEAK_DOUBLE_CAS_EMULATION
+int AO_compare_double_and_swap_double_emulation(volatile AO_double_t *addr,
+                                                AO_t old_val1, AO_t old_val2,
+                                                AO_t new_val1, AO_t new_val2);
+
+AO_INLINE int
+AO_compare_double_and_swap_double_full(volatile AO_double_t *addr,
+                                       AO_t old_val1, AO_t old_val2,
+                                       AO_t new_val1, AO_t new_val2)
+{
+        return AO_compare_double_and_swap_double_emulation(addr,
+                                                           old_val1, old_val2,
+                                                           new_val1, new_val2);
+}
+#define AO_HAVE_compare_double_and_swap_double_full
+#endif /* AO_WEAK_DOUBLE_CAS_EMULATION */
+#endif /* AO_CMPXCHG16B_AVAILABLE */
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/test_and_set_t_is_ao_t.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/test_and_set_t_is_ao_t.h
new file mode 100644 (file)
index 0000000..606f7ac
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * These are common definitions for architectures on which test_and_set
+ * operates on pointer-sized quantities, the "clear" value contains
+ * all zeroes, and the "set" value contains only one lowest bit set.
+ * This can be used if test_and_set is synthesized from compare_and_swap.
+ */
+typedef enum {AO_TS_clear = 0, AO_TS_set = 1} AO_TS_val;
+#define AO_TS_VAL_t AO_TS_val
+#define AO_TS_CLEAR AO_TS_clear
+#define AO_TS_SET AO_TS_set
+
+#define AO_TS_t AO_t
+
+#define AO_AO_TS_T 1
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/test_and_set_t_is_char.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops/sysdeps/test_and_set_t_is_char.h
new file mode 100644 (file)
index 0000000..bde0f21
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE. 
+ */ 
+
+/*
+ * These are common definitions for architectures on which test_and_set
+ * operates on byte sized quantities, the "clear" value contains
+ * all zeroes, and the "set" value contains all ones.
+ */
+
+#define AO_TS_t unsigned char
+typedef enum {AO_BYTE_TS_clear = 0, AO_BYTE_TS_set = 0xff} AO_BYTE_TS_val;
+#define AO_TS_VAL_t AO_BYTE_TS_val
+#define AO_TS_CLEAR AO_BYTE_TS_clear
+#define AO_TS_SET AO_BYTE_TS_set
+
+#define AO_CHAR_TS_T 1
+
+
+
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops_malloc.c b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops_malloc.c
new file mode 100644 (file)
index 0000000..dff4908
--- /dev/null
@@ -0,0 +1,288 @@
+/*  
+ * Copyright (c) 2005 Hewlett-Packard Development Company, L.P.
+ * Original Author: Hans Boehm
+ *
+ * This file may be redistributed and/or modified under the
+ * terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2, or (at your option) any later version.
+ * 
+ * It is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License in the
+ * file doc/COPYING for more details.
+ */
+
+#if defined(HAVE_CONFIG_H)
+# include "config.h"
+#endif
+
+#define AO_REQUIRE_CAS
+#include "atomic_ops_stack.h"
+#include <string.h>    /* for ffs, which is assumed reentrant. */
+#include <stdlib.h>
+#ifdef AO_TRACE_MALLOC
+# include <stdio.h>
+# include <pthread.h>
+#endif
+
+/*
+ * We round up each allocation request to the next power of two
+ * minus one word.
+ * We keep one stack of free objects for each size.  Each object
+ * has an initial word (offset -sizeof(AO_t) from the visible pointer)
+ * which contains either
+ *     The binary log of the object size in bytes (small objects)
+ *     The object size (a multiple of CHUNK_SIZE) for large objects.
+ * The second case only arises if mmap-based allocation is supported.
+ * We align the user-visible part of each object on a GRANULARITY
+ * byte boundary.  That means that the actual (hidden) start of
+ * the object starts a word before this boundary.
+ */
+
+#ifndef LOG_MAX_SIZE
+# define LOG_MAX_SIZE 16
+       /* We assume that 2**LOG_MAX_SIZE is a multiple of page size. */
+#endif
+
+#ifndef ALIGNMENT
+# define ALIGNMENT 16
+       /* Assumed to be at least sizeof(AO_t).         */
+#endif
+
+#define CHUNK_SIZE (1 << LOG_MAX_SIZE)
+
+#ifndef AO_INITIAL_HEAP_SIZE
+#  define AO_INITIAL_HEAP_SIZE (2*(LOG_MAX_SIZE+1)*CHUNK_SIZE)
+#endif
+
+char AO_initial_heap[AO_INITIAL_HEAP_SIZE];
+
+static volatile AO_t initial_heap_ptr = (AO_t)AO_initial_heap;
+static volatile char *initial_heap_lim = AO_initial_heap + AO_INITIAL_HEAP_SIZE;
+
+#if defined(HAVE_MMAP)
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+static volatile AO_t mmap_enabled = 0;
+
+void
+AO_malloc_enable_mmap(void)
+{
+  AO_store(&mmap_enabled, 1);
+}
+
+static char *get_mmaped(size_t sz)
+{
+  char * result;
+
+  assert(!(sz & (CHUNK_SIZE - 1)));
+  if (!mmap_enabled) return 0;
+# if defined(MAP_ANONYMOUS)
+    result = mmap(0, sz, PROT_READ | PROT_WRITE,
+                 MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
+# elif defined(MAP_ANON)
+    result = mmap(0, sz, PROT_READ | PROT_WRITE,
+                 MAP_PRIVATE | MAP_ANON, -1, 0);
+# else
+    {
+      int zero_fd = open("/dev/zero", O_RDONLY);
+      result = mmap(0, sz, PROT_READ | PROT_WRITE,
+                   MAP_PRIVATE, zero_fd, 0);
+      close(zero_fd);
+    }
+# endif
+  if (result == MAP_FAILED) result = 0;
+  return result;
+}
+
+/* Allocate an object of size (incl. header) of size > CHUNK_SIZE.     */
+/* sz includes space for an AO_t-sized header.                         */
+static char *
+AO_malloc_large(size_t sz)
+{
+ char * result;
+ /* The header will force us to waste ALIGNMENT bytes, incl. header.   */
+   sz += ALIGNMENT;
+ /* Round to multiple of CHUNK_SIZE.   */
+   sz = (sz + CHUNK_SIZE - 1) & ~(CHUNK_SIZE - 1);
+ result = get_mmaped(sz);
+ if (result == 0) return 0;
+ result += ALIGNMENT;
+ ((AO_t *)result)[-1] = (AO_t)sz;
+ return result;
+}
+
+static void
+AO_free_large(char * p)
+{
+  AO_t sz = ((AO_t *)p)[-1];
+  if (munmap(p - ALIGNMENT, (size_t)sz) != 0)
+    abort();  /* Programmer error.  Not really async-signal-safe, but ... */
+}
+  
+
+#else /*  No MMAP */
+
+void
+AO_malloc_enable_mmap(void)
+{
+}
+
+static char *get_mmaped(size_t sz)
+{
+  return 0;
+}
+
+static char *
+AO_malloc_large(size_t sz)
+{
+  return 0;
+}
+
+static void
+AO_free_large(char * p)
+{
+  abort();  /* Programmer error.  Not really async-signal-safe, but ... */
+}
+
+#endif /* No MMAP */
+
+static char *
+get_chunk(void)
+{
+  char *initial_ptr;
+  char *my_chunk_ptr;
+  char * my_lim;
+
+retry:
+  initial_ptr = (char *)AO_load(&initial_heap_ptr);
+  my_chunk_ptr = (char *)(((AO_t)initial_ptr + (ALIGNMENT - 1))
+                         & ~(ALIGNMENT - 1));
+  if (initial_ptr != my_chunk_ptr)
+    {
+      /* Align correctly.  If this fails, someone else did it for us.  */
+      AO_compare_and_swap_acquire(&initial_heap_ptr, (AO_t)initial_ptr,
+                                 (AO_t)my_chunk_ptr);
+    }
+  my_lim = my_chunk_ptr + CHUNK_SIZE;
+  if (my_lim <= initial_heap_lim)
+    {
+      if (!AO_compare_and_swap(&initial_heap_ptr, (AO_t)my_chunk_ptr,
+                                                 (AO_t)my_lim))
+        goto retry;
+      return my_chunk_ptr;
+    }
+  /* We failed.  The initial heap is used up.  */
+  my_chunk_ptr = get_mmaped(CHUNK_SIZE);
+  assert (!((AO_t)my_chunk_ptr & (ALIGNMENT-1)));
+  return my_chunk_ptr;
+}
+
+/* Object free lists.  Ith entry corresponds to objects        */
+/* of total size 2**i bytes.                                   */
+AO_stack_t AO_free_list[LOG_MAX_SIZE+1];
+
+/* Chunk free list, linked through first word in chunks.       */
+/* All entries of size CHUNK_SIZE.                             */
+AO_stack_t AO_chunk_free_list;
+
+/* Break up the chunk, and add it to the object free list for  */
+/* the given size.  Sz must be a power of two.                 */
+/* We have exclusive access to chunk.                          */
+static void
+add_chunk_as(void * chunk, size_t sz, unsigned log_sz)
+{
+  char *first = (char *)chunk + ALIGNMENT - sizeof(AO_t);
+  char *limit = (char *)chunk + CHUNK_SIZE - sz;
+  char *next, *p;
+
+  for (p = first; p <= limit; p = next) {
+    next = p + sz;
+    AO_stack_push(AO_free_list+log_sz, (AO_t *)p);
+  }
+}
+
+static int msbs[16] = {0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4};
+
+/* Return the position of the most significant set bit in the  */
+/* argument.                                                   */
+/* We follow the conventions of ffs(), i.e. the least          */
+/* significant bit is number one.                              */
+int msb(size_t s)
+{
+  int result = 0;
+  if ((s & 0xff) != s) {
+    /* The following shift often generates warnings on 32-bit arch's   */
+    /* That's OK, because it will never be executed there.             */
+    if (sizeof(size_t) > 4 && (s >> 32) != 0)
+      {
+       s >>= 32;
+       result += 32;
+      }
+    if ((s >> 16) != 0)
+      {
+       s >>= 16;
+       result += 16;
+      }
+    if ((s >> 8) != 0)
+      {
+       s >>= 8;
+       result += 8;
+      }
+  }
+  if (s > 15)
+    {
+      s >>= 4;
+      result += 4;
+    }
+  result += msbs[s];
+  return result;
+}
+
+void *
+AO_malloc(size_t sz)
+{
+  AO_t *result;
+  size_t adj_sz = sz + sizeof(AO_t);
+  int log_sz;
+  if (sz > CHUNK_SIZE)
+    return AO_malloc_large(sz);
+  log_sz = msb(adj_sz-1);
+  result = AO_stack_pop(AO_free_list+log_sz);
+  while (0 == result) {
+    void * chunk = get_chunk();
+    if (0 == chunk) return 0;
+    adj_sz = 1 << log_sz;
+    add_chunk_as(chunk, adj_sz, log_sz);
+    result = AO_stack_pop(AO_free_list+log_sz);
+  }
+  *result = log_sz;
+# ifdef AO_TRACE_MALLOC
+    fprintf(stderr, "%x: AO_malloc(%lu) = %p\n",
+                   (int)pthread_self(), (unsigned long)sz, result+1);
+# endif
+  return result + 1;
+}
+
+void
+AO_free(void *p)
+{
+  char *base = (char *)p - sizeof(AO_t);
+  int log_sz;
+
+  if (0 == p) return;
+  log_sz = *(AO_t *)base;
+# ifdef AO_TRACE_MALLOC
+    fprintf(stderr, "%x: AO_free(%p sz:%lu)\n", (int)pthread_self(), p,
+                   (unsigned long)
+                     (log_sz > LOG_MAX_SIZE? log_sz : (1 << log_sz)));
+# endif
+  if (log_sz > LOG_MAX_SIZE)
+    AO_free_large(p);
+  else
+    AO_stack_push(AO_free_list+log_sz, (AO_t *)base);
+}
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops_malloc.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops_malloc.h
new file mode 100644 (file)
index 0000000..c55d27c
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2005 Hewlett-Packard Development Company, L.P.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE. 
+ */
+
+/* Almost lock-free malloc implementation based on stack implementation. */
+/* See README.malloc file for detailed usage rules.                     */
+
+#ifndef AO_ATOMIC_H
+#define AO_ATOMIC_H
+
+#include <stdlib.h>    /* For size_t */
+
+#include "atomic_ops_stack.h"
+
+#ifdef AO_STACK_IS_LOCK_FREE
+# define AO_MALLOC_IS_LOCK_FREE
+#endif
+
+void AO_free(void *);
+
+void * AO_malloc(size_t);
+
+/* Allow use of mmpa to grow the heap.  No-op on some platforms.       */
+void AO_malloc_enable_mmap(void);
+
+#endif /* !AO_ATOMIC_H */
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops_stack.c b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops_stack.c
new file mode 100644 (file)
index 0000000..6de7a57
--- /dev/null
@@ -0,0 +1,302 @@
+/*
+ * Copyright (c) 2005 Hewlett-Packard Development Company, L.P.
+ * Original Author: Hans Boehm
+ *
+ * This file may be redistributed and/or modified under the
+ * terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2, or (at your option) any later version.
+ *
+ * It is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License in the
+ * file doc/COPYING for more details.
+ */
+
+#if defined(HAVE_CONFIG_H)
+# include "config.h"
+#endif
+
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+#define AO_REQUIRE_CAS
+#include "atomic_ops_stack.h"
+
+#if defined(_MSC_VER) \
+    || defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__CYGWIN__)
+  /* AO_pause not defined elsewhere */
+  /* FIXME: At least AO_spin should be factored out.    */
+#include <windows.h>
+
+AO_t dummy;
+
+/* Spin for 2**n units. */
+static void AO_spin(int n)
+{
+  int i;
+  AO_T j = AO_load(&dummy);
+
+  for (i = 0; i < (2 << n); ++i)
+    {
+       j *= 5;
+       j -= 4;
+    }
+  AO_store(&dummy, j);
+}
+
+void AO_pause(int n)
+{
+    if (n < 12)
+      AO_spin(n);
+    else
+      {
+        DWORD msecs;
+
+        /* Short async-signal-safe sleep. */
+        msecs = (n > 18? 100 : (1 << (n - 12)));
+        Sleep(msecs);
+      }
+}
+
+#else
+
+/* AO_pause is available elsewhere */
+
+extern void AO_pause(int);
+
+#endif
+
+#ifdef AO_USE_ALMOST_LOCK_FREE
+
+/* LIFO linked lists based on compare-and-swap.  We need to avoid       */
+/* the case of a node deletion and reinsertion while I'm deleting       */
+/* it, since that may cause my CAS to succeed eventhough the next       */
+/* pointer is now wrong.  Our solution is not fully lock-free, but it   */
+/* is good enough for signal handlers, provided we have a suitably low  */
+/* bound on the number of recursive signal handler reentries.           */
+/* A list consists of a first pointer and a blacklist                   */
+/* of pointer values that are currently being removed.  No list element */
+/* on the blacklist may be inserted.  If we would otherwise do so, we   */
+/* are allowed to insert a variant that differs only in the least       */
+/* significant, ignored, bits.  If the list is full, we wait.           */
+
+/* Crucial observation: A particular padded pointer x (i.e. pointer     */
+/* plus arbitrary low order bits) can never be newly inserted into      */
+/* a list while it's in the corresponding auxiliary data structure.     */
+
+/* The second argument is a pointer to the link field of the element    */
+/* to be inserted.                                                      */
+/* Both list headers and link fields contain "perturbed" pointers, i.e. */
+/* pointers with extra bits "or"ed into the low order bits.             */
+void
+AO_stack_push_explicit_aux_release(volatile AO_t *list, AO_t *x,
+                                   AO_stack_aux *a)
+{
+  int i;
+  AO_t x_bits = (AO_t)x;
+  AO_t next;
+
+  /* No deletions of x can start here, since x is not currently in the  */
+  /* list.                                                              */
+ retry:
+# if AO_BL_SIZE == 2
+  {
+    /* Start all loads as close to concurrently as possible. */
+    AO_t entry1 = AO_load(a -> AO_stack_bl);
+    AO_t entry2 = AO_load(a -> AO_stack_bl + 1);
+    if (entry1 == x_bits || entry2 == x_bits)
+      {
+        /* Entry is currently being removed.  Change it a little.     */
+          ++x_bits;
+          if ((x_bits & AO_BIT_MASK) == 0)
+            /* Version count overflowed;         */
+            /* EXTREMELY unlikely, but possible. */
+            x_bits = (AO_t)x;
+        goto retry;
+      }
+  }
+# else
+    for (i = 0; i < AO_BL_SIZE; ++i)
+      {
+        if (AO_load(a -> AO_stack_bl + i) == x_bits)
+          {
+            /* Entry is currently being removed.  Change it a little.     */
+              ++x_bits;
+              if ((x_bits & AO_BIT_MASK) == 0)
+                /* Version count overflowed;         */
+                /* EXTREMELY unlikely, but possible. */
+                x_bits = (AO_t)x;
+            goto retry;
+          }
+      }
+# endif
+  /* x_bits is not currently being deleted */
+  do
+    {
+      next = AO_load(list);
+      *x = next;
+    }
+  while(!AO_compare_and_swap_release(list, next, x_bits));
+}
+
+/*
+ * I concluded experimentally that checking a value first before
+ * performing a compare-and-swap is usually beneficial on X86, but
+ * slows things down appreciably with contention on Itanium.
+ * Since the Itanium behavior makes more sense to me (more cache line
+ * movement unless we're mostly reading, but back-off should guard
+ * against that), we take Itanium as the default.  Measurements on
+ * other multiprocessor architectures would be useful.  (On a uniprocessor,
+ * the initial check is almost certainly a very small loss.) - HB
+ */
+#ifdef __i386__
+# define PRECHECK(a) (a) == 0 &&
+#else
+# define PRECHECK(a)
+#endif
+
+AO_t *
+AO_stack_pop_explicit_aux_acquire(volatile AO_t *list, AO_stack_aux * a)
+{
+  unsigned i;
+  int j = 0;
+  AO_t first;
+  AO_t * first_ptr;
+  AO_t next;
+
+ retry:
+  first = AO_load(list);
+  if (0 == first) return 0;
+  /* Insert first into aux black list.                                  */
+  /* This may spin if more than AO_BL_SIZE removals using auxiliary     */
+  /* structure a are currently in progress.                             */
+  for (i = 0; ; )
+    {
+      if (PRECHECK(a -> AO_stack_bl[i])
+          AO_compare_and_swap_acquire(a->AO_stack_bl+i, 0, first))
+        break;
+      ++i;
+      if ( i >= AO_BL_SIZE )
+        {
+          i = 0;
+          AO_pause(++j);
+        }
+    }
+  assert(i >= 0 && i < AO_BL_SIZE);
+  assert(a -> AO_stack_bl[i] == first);
+  /* First is on the auxiliary black list.  It may be removed by        */
+  /* another thread before we get to it, but a new insertion of x       */
+  /* cannot be started here.                                            */
+  /* Only we can remove it from the black list.                         */
+  /* We need to make sure that first is still the first entry on the    */
+  /* list.  Otherwise it's possible that a reinsertion of it was        */
+  /* already started before we added the black list entry.              */
+  if (first != AO_load(list)) {
+    AO_store_release(a->AO_stack_bl+i, 0);
+    goto retry;
+  }
+  first_ptr = AO_REAL_NEXT_PTR(first);
+  next = AO_load(first_ptr);
+  if (!AO_compare_and_swap_release(list, first, next)) {
+    AO_store_release(a->AO_stack_bl+i, 0);
+    goto retry;
+  }
+  assert(*list != first);
+  /* Since we never insert an entry on the black list, this cannot have */
+  /* succeeded unless first remained on the list while we were running. */
+  /* Thus its next link cannot have changed out from under us, and we   */
+  /* removed exactly one entry and preserved the rest of the list.      */
+  /* Note that it is quite possible that an additional entry was        */
+  /* inserted and removed while we were running; this is OK since the   */
+  /* part of the list following first must have remained unchanged, and */
+  /* first must again have been at the head of the list when the        */
+  /* compare_and_swap succeeded.                                        */
+  AO_store_release(a->AO_stack_bl+i, 0);
+  return first_ptr;
+}
+
+#else /* ! USE_ALMOST_LOCK_FREE */
+
+/* Better names for fields in AO_stack_t */
+#define ptr AO_val2
+#define version AO_val1
+
+#if defined(AO_HAVE_compare_double_and_swap_double)
+
+void AO_stack_push_release(AO_stack_t *list, AO_t *element)
+{
+    AO_t next;
+
+    do {
+      next = AO_load(&(list -> ptr));
+      *element = next;
+    } while (!AO_compare_and_swap_release
+                    ( &(list -> ptr), next, (AO_t) element));
+    /* This uses a narrow CAS here, an old optimization suggested       */
+    /* by Treiber.  Pop is still safe, since we run into the ABA        */
+    /* problem only if there were both intervening "pop"s and "push"es. */
+    /* In that case we still see a change in the version number.        */
+}
+
+AO_t *AO_stack_pop_acquire(AO_stack_t *list)
+{
+    AO_t *cptr;
+    AO_t next;
+    AO_t cversion;
+
+    do {
+      /* Version must be loaded first.  */
+      cversion = AO_load_acquire(&(list -> version));
+      cptr = (AO_t *)AO_load(&(list -> ptr));
+      if (cptr == 0) return 0;
+      next = *cptr;
+    } while (!AO_compare_double_and_swap_double_release
+                    (list, cversion, (AO_t) cptr, cversion+1, (AO_t) next));
+    return cptr;
+}
+
+
+#elif defined(AO_HAVE_compare_and_swap_double)
+
+/* Needed for future IA64 processors.  No current clients? */
+
+#error Untested!  Probably doesnt work.
+
+/* We have a wide CAS, but only does an AO_t-wide comparison.   */
+/* We can't use the Treiber optimization, since we only check   */
+/* for an unchanged version number, not an unchanged pointer.   */
+void AO_stack_push_release(AO_stack_t *list, AO_t *element)
+{
+    AO_t version;
+    AO_t next_ptr;
+
+    do {
+      /* Again version must be loaded first, for different reason.      */
+      version = AO_load_acquire(&(list -> version));
+      next_ptr = AO_load(&(list -> ptr));
+      *element = next_ptr;
+    } while (!AO_compare_and_swap_double_release(
+                           list, version,
+                           version+1, (AO_t) element));
+}
+
+AO_t *AO_stack_pop_acquire(AO_stack_t *list)
+{
+    AO_t *cptr;
+    AO_t next;
+    AO_t cversion;
+
+    do {
+      cversion = AO_load_acquire(&(list -> version));
+      cptr = (AO_t *)AO_load(&(list -> ptr));
+      if (cptr == 0) return 0;
+      next = *cptr;
+    } while (!AO_compare_double_and_swap_double_release
+                    (list, cversion, (AO_t) cptr, cversion+1, next));
+    return cptr;
+}
+
+
+#endif /* AO_HAVE_compare_and_swap_double */
+
+#endif /* ! USE_ALMOST_LOCK_FREE */
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops_stack.h b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops_stack.h
new file mode 100644 (file)
index 0000000..6c8b5bb
--- /dev/null
@@ -0,0 +1,188 @@
+/*
+ * The implementation of the routines described here is covered by the GPL.
+ * This header file is covered by the following license:
+ */
+
+/*
+ * Copyright (c) 2005 Hewlett-Packard Development Company, L.P.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/* Almost lock-free LIFO linked lists (linked stacks).  */
+#ifndef AO_STACK_H
+#define AO_STACK_H
+
+#include "atomic_ops.h"
+
+#if !defined(AO_HAVE_compare_double_and_swap_double) \
+    && !defined(AO_HAVE_compare_double_and_swap) \
+    && defined(AO_HAVE_compare_and_swap)
+# define AO_USE_ALMOST_LOCK_FREE
+#else
+  /* If we have no compare-and-swap operation defined, we assume        */
+  /* that we will actually be using CAS emulation.  If we do that,      */
+  /* it's cheaper to use the version-based implementation.              */
+# define AO_STACK_IS_LOCK_FREE
+#endif
+
+/*
+ * These are not guaranteed to be completely lock-free.
+ * List insertion may spin under extremely unlikely conditions.
+ * It cannot deadlock due to recursive reentry unless AO_list_remove
+ * is called while at least AO_BL_SIZE activations of
+ * AO_list_remove are currently active in the same thread, i.e.
+ * we must have at least AO_BL_SIZE recursive signal handler
+ * invocations.
+ *
+ * All operations take an AO_list_aux argument.  It is safe to
+ * share a single AO_list_aux structure among all lists, but that
+ * may increase contention.  Any given list must always be accessed
+ * with the same AO_list_aux structure.
+ *
+ * We make some machine-dependent assumptions:
+ *   - We have a compare-and-swap operation.
+ *   - At least _AO_N_BITS low order bits in pointers are
+ *     zero and normally unused.
+ *   - size_t and pointers have the same size.
+ *
+ * We do use a fully lock-free implementation if double-width
+ * compare-and-swap operations are available.
+ */
+
+#ifdef AO_USE_ALMOST_LOCK_FREE
+/* The number of low order pointer bits we can use for a small  */
+/* version number.                                              */
+# if defined(__LP64__) || defined(_LP64) || defined(_WIN64)
+   /* WIN64 isn't really supported yet. */
+#  define AO_N_BITS 3
+# else
+#  define AO_N_BITS 2
+# endif
+
+# define AO_BIT_MASK ((1 << AO_N_BITS) - 1)
+/*
+ * AO_stack_aux should be treated as opaque.
+ * It is fully defined here, so it can be allocated, and to facilitate
+ * debugging.
+ */
+#ifndef AO_BL_SIZE
+#  define AO_BL_SIZE 2
+#endif
+
+#if AO_BL_SIZE > (1 << AO_N_BITS)
+#  error AO_BL_SIZE too big
+#endif
+
+typedef struct AO__stack_aux {
+  volatile AO_t AO_stack_bl[AO_BL_SIZE];
+} AO_stack_aux;
+
+/* The stack implementation knows only about the location of    */
+/* link fields in nodes, and nothing about the rest of the      */
+/* stack elements.  Link fields hold an AO_t, which is not      */
+/* necessarily a real pointer.  This converts the AO_t to a     */
+/* real (AO_t *) which is either o, or points at the link       */
+/* field in the next node.                                      */
+#define AO_REAL_NEXT_PTR(x) (AO_t *)((x) & ~AO_BIT_MASK)
+
+/* The following two routines should not normally be used directly.     */
+/* We make them visible here for the rare cases in which it makes sense */
+/* to share the an AO_stack_aux between stacks.                         */
+void
+AO_stack_push_explicit_aux_release(volatile AO_t *list, AO_t *x,
+                                  AO_stack_aux *);
+
+AO_t *
+AO_stack_pop_explicit_aux_acquire(volatile AO_t *list, AO_stack_aux *);
+
+/* And now AO_stack_t for the real interface:                           */
+
+typedef struct AO__stack {
+  volatile AO_t AO_ptr;
+  AO_stack_aux AO_aux;
+} AO_stack_t;
+
+#define AO_STACK_INITIALIZER {0}
+
+AO_INLINE void AO_stack_init(AO_stack_t *list)
+{
+# if AO_BL_SIZE == 2
+    list -> AO_aux.AO_stack_bl[0] = 0;
+    list -> AO_aux.AO_stack_bl[1] = 0;
+# else
+    int i;
+    for (i = 0; i < AO_BL_SIZE; ++i)
+      list -> AO_aux.AO_stack_bl[i] = 0;
+# endif
+  list -> AO_ptr = 0;
+}
+
+/* Convert an AO_stack_t to a pointer to the link field in      */
+/* the first element.                                           */
+#define AO_REAL_HEAD_PTR(x) AO_REAL_NEXT_PTR((x).AO_ptr)
+
+#define AO_stack_push_release(l, e) \
+        AO_stack_push_explicit_aux_release(&((l)->AO_ptr), e, &((l)->AO_aux))
+#define AO_HAVE_stack_push_release
+
+#define AO_stack_pop_acquire(l) \
+        AO_stack_pop_explicit_aux_acquire(&((l)->AO_ptr), &((l)->AO_aux))
+#define AO_HAVE_stack_pop_acquire
+
+# else /* Use fully non-blocking data structure, wide CAS       */
+
+#ifndef AO_HAVE_double_t
+  /* Can happen if we're using CAS emulation, since we don't want to    */
+  /* force that here, in case other atomic_ops clients don't want it.   */
+# include "atomic_ops/sysdeps/standard_ao_double_t.h"
+#endif
+
+typedef volatile AO_double_t AO_stack_t;
+/* AO_val1 is version, AO_val2 is pointer.      */
+
+#define AO_STACK_INITIALIZER {0}
+
+AO_INLINE void AO_stack_init(AO_stack_t *list)
+{
+  list -> AO_val1 = 0;
+  list -> AO_val2 = 0;
+}
+
+#define AO_REAL_HEAD_PTR(x) (AO_t *)((x).AO_val2)
+#define AO_REAL_NEXT_PTR(x) (AO_t *)(x)
+
+void AO_stack_push_release(AO_stack_t *list, AO_t *new_element);
+#define AO_HAVE_stack_push_release
+AO_t * AO_stack_pop_acquire(AO_stack_t *list);
+#define AO_HAVE_stack_pop_acquire
+
+#endif /* Wide CAS case */
+
+#if defined(AO_HAVE_stack_push_release) && !defined(AO_HAVE_stack_push)
+# define AO_stack_push(l, e) AO_stack_push_release(l, e)
+# define AO_HAVE_stack_push
+#endif
+
+#if defined(AO_HAVE_stack_pop_acquire) && !defined(AO_HAVE_stack_pop)
+# define AO_stack_pop(l) AO_stack_pop_acquire(l)
+# define AO_HAVE_stack_pop
+#endif
+
+#endif /* !AO_STACK_H */
diff --git a/src/mm/boehm-gc/libatomic_ops/src/atomic_ops_sysdeps.S b/src/mm/boehm-gc/libatomic_ops/src/atomic_ops_sysdeps.S
new file mode 100644 (file)
index 0000000..f586f23
--- /dev/null
@@ -0,0 +1,9 @@
+/*
+ * Include the appropriate system-dependent assembly file, if any.
+ * This is used only if the platform supports neither inline assembly
+ * code, nor appropriate compiler intrinsics.
+ */
+
+#if !defined(__GNUC__) && (defined(sparc) || defined(__sparc))
+#  include "atomic_ops/sysdeps/sunc/sparc.S"
+#endif
diff --git a/src/mm/boehm-gc/libatomic_ops/src/config.h.in b/src/mm/boehm-gc/libatomic_ops/src/config.h.in
new file mode 100644 (file)
index 0000000..54eed1a
--- /dev/null
@@ -0,0 +1,64 @@
+/* src/config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
diff --git a/src/mm/boehm-gc/libatomic_ops/tests/Makefile.am b/src/mm/boehm-gc/libatomic_ops/tests/Makefile.am
new file mode 100644 (file)
index 0000000..0f186cc
--- /dev/null
@@ -0,0 +1,51 @@
+EXTRA_DIST=test_atomic.template list_atomic.template run_parallel.inc \
+          test_atomic_include.h
+# We distribute test_atomic_include.h, since it's hard to regenerate
+# on Windows without sed.
+
+BUILT_SOURCES = test_atomic_include.h list_atomic.i
+CLEANFILES = test_atomic_include.h list_atomic.c list_atomic.i
+
+AM_CPPFLAGS=-I$(srcdir)/../src
+
+TESTS=test_atomic test_atomic_pthreads test_stack test_malloc
+
+#create the test_atomic test program
+check_PROGRAMS=test_atomic test_atomic_pthreads test_stack test_malloc
+
+test_atomic_SOURCES=test_atomic.c
+test_atomic_LDADD=-lpthread ../src/libatomic_ops.a
+
+test_atomic_pthreads_SOURCES=test_atomic.c 
+test_atomic_pthreads_CPPFLAGS=-DAO_USE_PTHREAD_DEFS $(AM_CPPFLAGS)
+test_atomic_pthreads_LDADD=-lpthread ../src/libatomic_ops.a
+
+test_stack_SOURCES=test_stack.c 
+test_stack_LDADD=-lpthread ../src/libatomic_ops_gpl.a ../src/libatomic_ops.a 
+
+test_malloc_SOURCES=test_malloc.c 
+test_malloc_LDADD=-lpthread ../src/libatomic_ops_gpl.a ../src/libatomic_ops.a 
+
+test_atomic_include.h: test_atomic.template
+       sed -e s/XX// $? > $@
+       sed -e s/XX/_release/ $? >> $@
+       sed -e s/XX/_acquire/ $? >> $@
+       sed -e s/XX/_read/ $? >> $@
+       sed -e s/XX/_write/ $? >> $@
+       sed -e s/XX/_full/ $? >> $@
+       sed -e s/XX/_release_write/ $? >> $@
+       sed -e s/XX/_acquire_read/ $? >> $@
+
+list_atomic.c: list_atomic.template
+       echo "#include \"atomic_ops.h\" " > $@
+       sed -e s/XX// $? >> $@
+       sed -e s/XX/_release/ $? >> $@
+       sed -e s/XX/_acquire/ $? >> $@
+       sed -e s/XX/_read/ $? >> $@
+       sed -e s/XX/_write/ $? >> $@
+       sed -e s/XX/_full/ $? >> $@
+       sed -e s/XX/_release_write/ $? >> $@
+       sed -e s/XX/_acquire_read/ $? >> $@
+
+list_atomic.i: list_atomic.c
+       $(COMPILE) $? -E > list_atomic.i
diff --git a/src/mm/boehm-gc/libatomic_ops/tests/Makefile.in b/src/mm/boehm-gc/libatomic_ops/tests/Makefile.in
new file mode 100644 (file)
index 0000000..12df1f5
--- /dev/null
@@ -0,0 +1,577 @@
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+TESTS = test_atomic$(EXEEXT) test_atomic_pthreads$(EXEEXT) \
+       test_stack$(EXEEXT) test_malloc$(EXEEXT)
+check_PROGRAMS = test_atomic$(EXEEXT) test_atomic_pthreads$(EXEEXT) \
+       test_stack$(EXEEXT) test_malloc$(EXEEXT)
+subdir = tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+am_test_atomic_OBJECTS = test_atomic.$(OBJEXT)
+test_atomic_OBJECTS = $(am_test_atomic_OBJECTS)
+test_atomic_DEPENDENCIES = ../src/libatomic_ops.a
+am_test_atomic_pthreads_OBJECTS =  \
+       test_atomic_pthreads-test_atomic.$(OBJEXT)
+test_atomic_pthreads_OBJECTS = $(am_test_atomic_pthreads_OBJECTS)
+test_atomic_pthreads_DEPENDENCIES = ../src/libatomic_ops.a
+am_test_malloc_OBJECTS = test_malloc.$(OBJEXT)
+test_malloc_OBJECTS = $(am_test_malloc_OBJECTS)
+test_malloc_DEPENDENCIES = ../src/libatomic_ops_gpl.a \
+       ../src/libatomic_ops.a
+am_test_stack_OBJECTS = test_stack.$(OBJEXT)
+test_stack_OBJECTS = $(am_test_stack_OBJECTS)
+test_stack_DEPENDENCIES = ../src/libatomic_ops_gpl.a \
+       ../src/libatomic_ops.a
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(test_atomic_SOURCES) $(test_atomic_pthreads_SOURCES) \
+       $(test_malloc_SOURCES) $(test_stack_SOURCES)
+DIST_SOURCES = $(test_atomic_SOURCES) $(test_atomic_pthreads_SOURCES) \
+       $(test_malloc_SOURCES) $(test_stack_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PICFLAG = @PICFLAG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = test_atomic.template list_atomic.template run_parallel.inc \
+          test_atomic_include.h
+
+# We distribute test_atomic_include.h, since it's hard to regenerate
+# on Windows without sed.
+BUILT_SOURCES = test_atomic_include.h list_atomic.i
+CLEANFILES = test_atomic_include.h list_atomic.c list_atomic.i
+AM_CPPFLAGS = -I$(srcdir)/../src
+test_atomic_SOURCES = test_atomic.c
+test_atomic_LDADD = -lpthread ../src/libatomic_ops.a
+test_atomic_pthreads_SOURCES = test_atomic.c 
+test_atomic_pthreads_CPPFLAGS = -DAO_USE_PTHREAD_DEFS $(AM_CPPFLAGS)
+test_atomic_pthreads_LDADD = -lpthread ../src/libatomic_ops.a
+test_stack_SOURCES = test_stack.c 
+test_stack_LDADD = -lpthread ../src/libatomic_ops_gpl.a ../src/libatomic_ops.a 
+test_malloc_SOURCES = test_malloc.c 
+test_malloc_LDADD = -lpthread ../src/libatomic_ops_gpl.a ../src/libatomic_ops.a 
+all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-checkPROGRAMS:
+       -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+test_atomic$(EXEEXT): $(test_atomic_OBJECTS) $(test_atomic_DEPENDENCIES) 
+       @rm -f test_atomic$(EXEEXT)
+       $(LINK) $(test_atomic_OBJECTS) $(test_atomic_LDADD) $(LIBS)
+test_atomic_pthreads$(EXEEXT): $(test_atomic_pthreads_OBJECTS) $(test_atomic_pthreads_DEPENDENCIES) 
+       @rm -f test_atomic_pthreads$(EXEEXT)
+       $(LINK) $(test_atomic_pthreads_OBJECTS) $(test_atomic_pthreads_LDADD) $(LIBS)
+test_malloc$(EXEEXT): $(test_malloc_OBJECTS) $(test_malloc_DEPENDENCIES) 
+       @rm -f test_malloc$(EXEEXT)
+       $(LINK) $(test_malloc_OBJECTS) $(test_malloc_LDADD) $(LIBS)
+test_stack$(EXEEXT): $(test_stack_OBJECTS) $(test_stack_DEPENDENCIES) 
+       @rm -f test_stack$(EXEEXT)
+       $(LINK) $(test_stack_OBJECTS) $(test_stack_LDADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_atomic.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_atomic_pthreads-test_atomic.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_malloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_stack.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+test_atomic_pthreads-test_atomic.o: test_atomic.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_atomic_pthreads_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_atomic_pthreads-test_atomic.o -MD -MP -MF $(DEPDIR)/test_atomic_pthreads-test_atomic.Tpo -c -o test_atomic_pthreads-test_atomic.o `test -f 'test_atomic.c' || echo '$(srcdir)/'`test_atomic.c
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/test_atomic_pthreads-test_atomic.Tpo $(DEPDIR)/test_atomic_pthreads-test_atomic.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='test_atomic.c' object='test_atomic_pthreads-test_atomic.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_atomic_pthreads_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_atomic_pthreads-test_atomic.o `test -f 'test_atomic.c' || echo '$(srcdir)/'`test_atomic.c
+
+test_atomic_pthreads-test_atomic.obj: test_atomic.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_atomic_pthreads_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_atomic_pthreads-test_atomic.obj -MD -MP -MF $(DEPDIR)/test_atomic_pthreads-test_atomic.Tpo -c -o test_atomic_pthreads-test_atomic.obj `if test -f 'test_atomic.c'; then $(CYGPATH_W) 'test_atomic.c'; else $(CYGPATH_W) '$(srcdir)/test_atomic.c'; fi`
+@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/test_atomic_pthreads-test_atomic.Tpo $(DEPDIR)/test_atomic_pthreads-test_atomic.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='test_atomic.c' object='test_atomic_pthreads-test_atomic.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_atomic_pthreads_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_atomic_pthreads-test_atomic.obj `if test -f 'test_atomic.c'; then $(CYGPATH_W) 'test_atomic.c'; else $(CYGPATH_W) '$(srcdir)/test_atomic.c'; fi`
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+       @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+       srcdir=$(srcdir); export srcdir; \
+       list=' $(TESTS) '; \
+       if test -n "$$list"; then \
+         for tst in $$list; do \
+           if test -f ./$$tst; then dir=./; \
+           elif test -f $$tst; then dir=; \
+           else dir="$(srcdir)/"; fi; \
+           if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+             all=`expr $$all + 1`; \
+             case " $(XFAIL_TESTS) " in \
+             *[\ \     ]$$tst[\ \      ]*) \
+               xpass=`expr $$xpass + 1`; \
+               failed=`expr $$failed + 1`; \
+               echo "XPASS: $$tst"; \
+             ;; \
+             *) \
+               echo "PASS: $$tst"; \
+             ;; \
+             esac; \
+           elif test $$? -ne 77; then \
+             all=`expr $$all + 1`; \
+             case " $(XFAIL_TESTS) " in \
+             *[\ \     ]$$tst[\ \      ]*) \
+               xfail=`expr $$xfail + 1`; \
+               echo "XFAIL: $$tst"; \
+             ;; \
+             *) \
+               failed=`expr $$failed + 1`; \
+               echo "FAIL: $$tst"; \
+             ;; \
+             esac; \
+           else \
+             skip=`expr $$skip + 1`; \
+             echo "SKIP: $$tst"; \
+           fi; \
+         done; \
+         if test "$$all" -eq 1; then \
+           tests="test"; \
+           All=""; \
+         else \
+           tests="tests"; \
+           All="All "; \
+         fi; \
+         if test "$$failed" -eq 0; then \
+           if test "$$xfail" -eq 0; then \
+             banner="$$All$$all $$tests passed"; \
+           else \
+             if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+             banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+           fi; \
+         else \
+           if test "$$xpass" -eq 0; then \
+             banner="$$failed of $$all $$tests failed"; \
+           else \
+             if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+             banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+           fi; \
+         fi; \
+         dashes="$$banner"; \
+         skipped=""; \
+         if test "$$skip" -ne 0; then \
+           if test "$$skip" -eq 1; then \
+             skipped="($$skip test was not run)"; \
+           else \
+             skipped="($$skip tests were not run)"; \
+           fi; \
+           test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+             dashes="$$skipped"; \
+         fi; \
+         report=""; \
+         if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+           report="Please report to $(PACKAGE_BUGREPORT)"; \
+           test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+             dashes="$$report"; \
+         fi; \
+         dashes=`echo "$$dashes" | sed s/./=/g`; \
+         echo "$$dashes"; \
+         echo "$$banner"; \
+         test -z "$$skipped" || echo "$$skipped"; \
+         test -z "$$report" || echo "$$report"; \
+         echo "$$dashes"; \
+         test "$$failed" -eq 0; \
+       else :; fi
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+       $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+       $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile
+installdirs:
+install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+       clean-checkPROGRAMS clean-generic ctags distclean \
+       distclean-compile distclean-generic distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-data install-data-am install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+       uninstall-am
+
+
+test_atomic_include.h: test_atomic.template
+       sed -e s/XX// $? > $@
+       sed -e s/XX/_release/ $? >> $@
+       sed -e s/XX/_acquire/ $? >> $@
+       sed -e s/XX/_read/ $? >> $@
+       sed -e s/XX/_write/ $? >> $@
+       sed -e s/XX/_full/ $? >> $@
+       sed -e s/XX/_release_write/ $? >> $@
+       sed -e s/XX/_acquire_read/ $? >> $@
+
+list_atomic.c: list_atomic.template
+       echo "#include \"atomic_ops.h\" " > $@
+       sed -e s/XX// $? >> $@
+       sed -e s/XX/_release/ $? >> $@
+       sed -e s/XX/_acquire/ $? >> $@
+       sed -e s/XX/_read/ $? >> $@
+       sed -e s/XX/_write/ $? >> $@
+       sed -e s/XX/_full/ $? >> $@
+       sed -e s/XX/_release_write/ $? >> $@
+       sed -e s/XX/_acquire_read/ $? >> $@
+
+list_atomic.i: list_atomic.c
+       $(COMPILE) $? -E > list_atomic.i
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/mm/boehm-gc/libatomic_ops/tests/list_atomic.c b/src/mm/boehm-gc/libatomic_ops/tests/list_atomic.c
new file mode 100644 (file)
index 0000000..1faf5c4
--- /dev/null
@@ -0,0 +1,569 @@
+#include "atomic_ops.h" 
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* This generates a compilable program.  But it is really meant to be  */
+/* be used only with cc -E, to inspect the expensions generated by     */
+/* primitives.                                                         */
+
+/* The result will not link or run.                                    */
+
+void list_atomic(void)
+{
+  AO_T *addr, val, newval, oldval;
+  AO_TS_T tsaddr;
+  long incr;
+
+# if defined(AO_HAVE_nop)
+    "AO_nop(): ";
+    AO_nop();
+# else
+    "No AO_nop";
+# endif
+# if defined(AO_HAVE_load)
+    "AO_load(addr):";
+    AO_load(addr);
+# else
+    "No AO_load";
+# endif
+# if defined(AO_HAVE_store)
+    "AO_store(addr, val):";
+    AO_store(addr, val);
+# else
+    "No AO_store";
+# endif
+# if defined(AO_HAVE_test_and_set)
+    "AO_test_and_set(tsaddr):";
+    AO_test_and_set(tsaddr);
+# else
+    "No AO_test_and_set";
+# endif
+# if defined(AO_HAVE_fetch_and_add1)
+    "AO_fetch_and_add1(addr):";
+    AO_fetch_and_add1(addr);
+# else
+    "No AO_fetch_and_add1";
+# endif
+# if defined(AO_HAVE_fetch_and_sub1)
+    "AO_fetch_and_sub1(addr):";
+    AO_fetch_and_sub1(addr);
+# else
+    "No AO_fetch_and_sub1";
+# endif
+# if defined(AO_HAVE_fetch_and_add)
+    "AO_fetch_and_add(addr, incr):";
+    AO_fetch_and_add(addr, incr);
+# else
+    "No AO_fetch_and_add";
+# endif
+# if defined(AO_HAVE_compare_and_swap)
+    "AO_compare_and_swap(addr, oldval, newval):";
+    AO_compare_and_swap(addr, oldval, newval);
+# else
+    "No AO_compare_and_swap";
+# endif
+}
+
+
+    
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* This generates a compilable program.  But it is really meant to be  */
+/* be used only with cc -E, to inspect the expensions generated by     */
+/* primitives.                                                         */
+
+/* The result will not link or run.                                    */
+
+void list_atomic_release(void)
+{
+  AO_T *addr, val, newval, oldval;
+  AO_TS_T tsaddr;
+  long incr;
+
+# if defined(AO_HAVE_nop_release)
+    "AO_nop_release(): ";
+    AO_nop_release();
+# else
+    "No AO_nop_release";
+# endif
+# if defined(AO_HAVE_load_release)
+    "AO_load_release(addr):";
+    AO_load_release(addr);
+# else
+    "No AO_load_release";
+# endif
+# if defined(AO_HAVE_store_release)
+    "AO_store_release(addr, val):";
+    AO_store_release(addr, val);
+# else
+    "No AO_store_release";
+# endif
+# if defined(AO_HAVE_test_and_set_release)
+    "AO_test_and_set_release(tsaddr):";
+    AO_test_and_set_release(tsaddr);
+# else
+    "No AO_test_and_set_release";
+# endif
+# if defined(AO_HAVE_fetch_and_add1_release)
+    "AO_fetch_and_add1_release(addr):";
+    AO_fetch_and_add1_release(addr);
+# else
+    "No AO_fetch_and_add1_release";
+# endif
+# if defined(AO_HAVE_fetch_and_sub1_release)
+    "AO_fetch_and_sub1_release(addr):";
+    AO_fetch_and_sub1_release(addr);
+# else
+    "No AO_fetch_and_sub1_release";
+# endif
+# if defined(AO_HAVE_fetch_and_add_release)
+    "AO_fetch_and_add_release(addr, incr):";
+    AO_fetch_and_add_release(addr, incr);
+# else
+    "No AO_fetch_and_add_release";
+# endif
+# if defined(AO_HAVE_compare_and_swap_release)
+    "AO_compare_and_swap_release(addr, oldval, newval):";
+    AO_compare_and_swap_release(addr, oldval, newval);
+# else
+    "No AO_compare_and_swap_release";
+# endif
+}
+
+
+    
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* This generates a compilable program.  But it is really meant to be  */
+/* be used only with cc -E, to inspect the expensions generated by     */
+/* primitives.                                                         */
+
+/* The result will not link or run.                                    */
+
+void list_atomic_acquire(void)
+{
+  AO_T *addr, val, newval, oldval;
+  AO_TS_T tsaddr;
+  long incr;
+
+# if defined(AO_HAVE_nop_acquire)
+    "AO_nop_acquire(): ";
+    AO_nop_acquire();
+# else
+    "No AO_nop_acquire";
+# endif
+# if defined(AO_HAVE_load_acquire)
+    "AO_load_acquire(addr):";
+    AO_load_acquire(addr);
+# else
+    "No AO_load_acquire";
+# endif
+# if defined(AO_HAVE_store_acquire)
+    "AO_store_acquire(addr, val):";
+    AO_store_acquire(addr, val);
+# else
+    "No AO_store_acquire";
+# endif
+# if defined(AO_HAVE_test_and_set_acquire)
+    "AO_test_and_set_acquire(tsaddr):";
+    AO_test_and_set_acquire(tsaddr);
+# else
+    "No AO_test_and_set_acquire";
+# endif
+# if defined(AO_HAVE_fetch_and_add1_acquire)
+    "AO_fetch_and_add1_acquire(addr):";
+    AO_fetch_and_add1_acquire(addr);
+# else
+    "No AO_fetch_and_add1_acquire";
+# endif
+# if defined(AO_HAVE_fetch_and_sub1_acquire)
+    "AO_fetch_and_sub1_acquire(addr):";
+    AO_fetch_and_sub1_acquire(addr);
+# else
+    "No AO_fetch_and_sub1_acquire";
+# endif
+# if defined(AO_HAVE_fetch_and_add_acquire)
+    "AO_fetch_and_add_acquire(addr, incr):";
+    AO_fetch_and_add_acquire(addr, incr);
+# else
+    "No AO_fetch_and_add_acquire";
+# endif
+# if defined(AO_HAVE_compare_and_swap_acquire)
+    "AO_compare_and_swap_acquire(addr, oldval, newval):";
+    AO_compare_and_swap_acquire(addr, oldval, newval);
+# else
+    "No AO_compare_and_swap_acquire";
+# endif
+}
+
+
+    
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* This generates a compilable program.  But it is really meant to be  */
+/* be used only with cc -E, to inspect the expensions generated by     */
+/* primitives.                                                         */
+
+/* The result will not link or run.                                    */
+
+void list_atomic_read(void)
+{
+  AO_T *addr, val, newval, oldval;
+  AO_TS_T tsaddr;
+  long incr;
+
+# if defined(AO_HAVE_nop_read)
+    "AO_nop_read(): ";
+    AO_nop_read();
+# else
+    "No AO_nop_read";
+# endif
+# if defined(AO_HAVE_load_read)
+    "AO_load_read(addr):";
+    AO_load_read(addr);
+# else
+    "No AO_load_read";
+# endif
+# if defined(AO_HAVE_store_read)
+    "AO_store_read(addr, val):";
+    AO_store_read(addr, val);
+# else
+    "No AO_store_read";
+# endif
+# if defined(AO_HAVE_test_and_set_read)
+    "AO_test_and_set_read(tsaddr):";
+    AO_test_and_set_read(tsaddr);
+# else
+    "No AO_test_and_set_read";
+# endif
+# if defined(AO_HAVE_fetch_and_add1_read)
+    "AO_fetch_and_add1_read(addr):";
+    AO_fetch_and_add1_read(addr);
+# else
+    "No AO_fetch_and_add1_read";
+# endif
+# if defined(AO_HAVE_fetch_and_sub1_read)
+    "AO_fetch_and_sub1_read(addr):";
+    AO_fetch_and_sub1_read(addr);
+# else
+    "No AO_fetch_and_sub1_read";
+# endif
+# if defined(AO_HAVE_fetch_and_add_read)
+    "AO_fetch_and_add_read(addr, incr):";
+    AO_fetch_and_add_read(addr, incr);
+# else
+    "No AO_fetch_and_add_read";
+# endif
+# if defined(AO_HAVE_compare_and_swap_read)
+    "AO_compare_and_swap_read(addr, oldval, newval):";
+    AO_compare_and_swap_read(addr, oldval, newval);
+# else
+    "No AO_compare_and_swap_read";
+# endif
+}
+
+
+    
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* This generates a compilable program.  But it is really meant to be  */
+/* be used only with cc -E, to inspect the expensions generated by     */
+/* primitives.                                                         */
+
+/* The result will not link or run.                                    */
+
+void list_atomic_write(void)
+{
+  AO_T *addr, val, newval, oldval;
+  AO_TS_T tsaddr;
+  long incr;
+
+# if defined(AO_HAVE_nop_write)
+    "AO_nop_write(): ";
+    AO_nop_write();
+# else
+    "No AO_nop_write";
+# endif
+# if defined(AO_HAVE_load_write)
+    "AO_load_write(addr):";
+    AO_load_write(addr);
+# else
+    "No AO_load_write";
+# endif
+# if defined(AO_HAVE_store_write)
+    "AO_store_write(addr, val):";
+    AO_store_write(addr, val);
+# else
+    "No AO_store_write";
+# endif
+# if defined(AO_HAVE_test_and_set_write)
+    "AO_test_and_set_write(tsaddr):";
+    AO_test_and_set_write(tsaddr);
+# else
+    "No AO_test_and_set_write";
+# endif
+# if defined(AO_HAVE_fetch_and_add1_write)
+    "AO_fetch_and_add1_write(addr):";
+    AO_fetch_and_add1_write(addr);
+# else
+    "No AO_fetch_and_add1_write";
+# endif
+# if defined(AO_HAVE_fetch_and_sub1_write)
+    "AO_fetch_and_sub1_write(addr):";
+    AO_fetch_and_sub1_write(addr);
+# else
+    "No AO_fetch_and_sub1_write";
+# endif
+# if defined(AO_HAVE_fetch_and_add_write)
+    "AO_fetch_and_add_write(addr, incr):";
+    AO_fetch_and_add_write(addr, incr);
+# else
+    "No AO_fetch_and_add_write";
+# endif
+# if defined(AO_HAVE_compare_and_swap_write)
+    "AO_compare_and_swap_write(addr, oldval, newval):";
+    AO_compare_and_swap_write(addr, oldval, newval);
+# else
+    "No AO_compare_and_swap_write";
+# endif
+}
+
+
+    
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* This generates a compilable program.  But it is really meant to be  */
+/* be used only with cc -E, to inspect the expensions generated by     */
+/* primitives.                                                         */
+
+/* The result will not link or run.                                    */
+
+void list_atomic_full(void)
+{
+  AO_T *addr, val, newval, oldval;
+  AO_TS_T tsaddr;
+  long incr;
+
+# if defined(AO_HAVE_nop_full)
+    "AO_nop_full(): ";
+    AO_nop_full();
+# else
+    "No AO_nop_full";
+# endif
+# if defined(AO_HAVE_load_full)
+    "AO_load_full(addr):";
+    AO_load_full(addr);
+# else
+    "No AO_load_full";
+# endif
+# if defined(AO_HAVE_store_full)
+    "AO_store_full(addr, val):";
+    AO_store_full(addr, val);
+# else
+    "No AO_store_full";
+# endif
+# if defined(AO_HAVE_test_and_set_full)
+    "AO_test_and_set_full(tsaddr):";
+    AO_test_and_set_full(tsaddr);
+# else
+    "No AO_test_and_set_full";
+# endif
+# if defined(AO_HAVE_fetch_and_add1_full)
+    "AO_fetch_and_add1_full(addr):";
+    AO_fetch_and_add1_full(addr);
+# else
+    "No AO_fetch_and_add1_full";
+# endif
+# if defined(AO_HAVE_fetch_and_sub1_full)
+    "AO_fetch_and_sub1_full(addr):";
+    AO_fetch_and_sub1_full(addr);
+# else
+    "No AO_fetch_and_sub1_full";
+# endif
+# if defined(AO_HAVE_fetch_and_add_full)
+    "AO_fetch_and_add_full(addr, incr):";
+    AO_fetch_and_add_full(addr, incr);
+# else
+    "No AO_fetch_and_add_full";
+# endif
+# if defined(AO_HAVE_compare_and_swap_full)
+    "AO_compare_and_swap_full(addr, oldval, newval):";
+    AO_compare_and_swap_full(addr, oldval, newval);
+# else
+    "No AO_compare_and_swap_full";
+# endif
+}
+
+
+    
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* This generates a compilable program.  But it is really meant to be  */
+/* be used only with cc -E, to inspect the expensions generated by     */
+/* primitives.                                                         */
+
+/* The result will not link or run.                                    */
+
+void list_atomic_release_write(void)
+{
+  AO_T *addr, val, newval, oldval;
+  AO_TS_T tsaddr;
+  long incr;
+
+# if defined(AO_HAVE_nop_release_write)
+    "AO_nop_release_write(): ";
+    AO_nop_release_write();
+# else
+    "No AO_nop_release_write";
+# endif
+# if defined(AO_HAVE_load_release_write)
+    "AO_load_release_write(addr):";
+    AO_load_release_write(addr);
+# else
+    "No AO_load_release_write";
+# endif
+# if defined(AO_HAVE_store_release_write)
+    "AO_store_release_write(addr, val):";
+    AO_store_release_write(addr, val);
+# else
+    "No AO_store_release_write";
+# endif
+# if defined(AO_HAVE_test_and_set_release_write)
+    "AO_test_and_set_release_write(tsaddr):";
+    AO_test_and_set_release_write(tsaddr);
+# else
+    "No AO_test_and_set_release_write";
+# endif
+# if defined(AO_HAVE_fetch_and_add1_release_write)
+    "AO_fetch_and_add1_release_write(addr):";
+    AO_fetch_and_add1_release_write(addr);
+# else
+    "No AO_fetch_and_add1_release_write";
+# endif
+# if defined(AO_HAVE_fetch_and_sub1_release_write)
+    "AO_fetch_and_sub1_release_write(addr):";
+    AO_fetch_and_sub1_release_write(addr);
+# else
+    "No AO_fetch_and_sub1_release_write";
+# endif
+# if defined(AO_HAVE_fetch_and_add_release_write)
+    "AO_fetch_and_add_release_write(addr, incr):";
+    AO_fetch_and_add_release_write(addr, incr);
+# else
+    "No AO_fetch_and_add_release_write";
+# endif
+# if defined(AO_HAVE_compare_and_swap_release_write)
+    "AO_compare_and_swap_release_write(addr, oldval, newval):";
+    AO_compare_and_swap_release_write(addr, oldval, newval);
+# else
+    "No AO_compare_and_swap_release_write";
+# endif
+}
+
+
+    
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* This generates a compilable program.  But it is really meant to be  */
+/* be used only with cc -E, to inspect the expensions generated by     */
+/* primitives.                                                         */
+
+/* The result will not link or run.                                    */
+
+void list_atomic_acquire_read(void)
+{
+  AO_T *addr, val, newval, oldval;
+  AO_TS_T tsaddr;
+  long incr;
+
+# if defined(AO_HAVE_nop_acquire_read)
+    "AO_nop_acquire_read(): ";
+    AO_nop_acquire_read();
+# else
+    "No AO_nop_acquire_read";
+# endif
+# if defined(AO_HAVE_load_acquire_read)
+    "AO_load_acquire_read(addr):";
+    AO_load_acquire_read(addr);
+# else
+    "No AO_load_acquire_read";
+# endif
+# if defined(AO_HAVE_store_acquire_read)
+    "AO_store_acquire_read(addr, val):";
+    AO_store_acquire_read(addr, val);
+# else
+    "No AO_store_acquire_read";
+# endif
+# if defined(AO_HAVE_test_and_set_acquire_read)
+    "AO_test_and_set_acquire_read(tsaddr):";
+    AO_test_and_set_acquire_read(tsaddr);
+# else
+    "No AO_test_and_set_acquire_read";
+# endif
+# if defined(AO_HAVE_fetch_and_add1_acquire_read)
+    "AO_fetch_and_add1_acquire_read(addr):";
+    AO_fetch_and_add1_acquire_read(addr);
+# else
+    "No AO_fetch_and_add1_acquire_read";
+# endif
+# if defined(AO_HAVE_fetch_and_sub1_acquire_read)
+    "AO_fetch_and_sub1_acquire_read(addr):";
+    AO_fetch_and_sub1_acquire_read(addr);
+# else
+    "No AO_fetch_and_sub1_acquire_read";
+# endif
+# if defined(AO_HAVE_fetch_and_add_acquire_read)
+    "AO_fetch_and_add_acquire_read(addr, incr):";
+    AO_fetch_and_add_acquire_read(addr, incr);
+# else
+    "No AO_fetch_and_add_acquire_read";
+# endif
+# if defined(AO_HAVE_compare_and_swap_acquire_read)
+    "AO_compare_and_swap_acquire_read(addr, oldval, newval):";
+    AO_compare_and_swap_acquire_read(addr, oldval, newval);
+# else
+    "No AO_compare_and_swap_acquire_read";
+# endif
+}
+
+
+    
diff --git a/src/mm/boehm-gc/libatomic_ops/tests/list_atomic.template b/src/mm/boehm-gc/libatomic_ops/tests/list_atomic.template
new file mode 100644 (file)
index 0000000..a3d36e3
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* This generates a compilable program.  But it is really meant to be  */
+/* be used only with cc -E, to inspect the expensions generated by     */
+/* primitives.                                                         */
+
+/* The result will not link or run.                                    */
+
+void list_atomicXX(void)
+{
+  AO_T *addr, val, newval, oldval;
+  AO_TS_T tsaddr;
+  long incr;
+
+# if defined(AO_HAVE_nopXX)
+    "AO_nopXX(): ";
+    AO_nopXX();
+# else
+    "No AO_nopXX";
+# endif
+# if defined(AO_HAVE_loadXX)
+    "AO_loadXX(addr):";
+    AO_loadXX(addr);
+# else
+    "No AO_loadXX";
+# endif
+# if defined(AO_HAVE_storeXX)
+    "AO_storeXX(addr, val):";
+    AO_storeXX(addr, val);
+# else
+    "No AO_storeXX";
+# endif
+# if defined(AO_HAVE_test_and_setXX)
+    "AO_test_and_setXX(tsaddr):";
+    AO_test_and_setXX(tsaddr);
+# else
+    "No AO_test_and_setXX";
+# endif
+# if defined(AO_HAVE_fetch_and_add1XX)
+    "AO_fetch_and_add1XX(addr):";
+    AO_fetch_and_add1XX(addr);
+# else
+    "No AO_fetch_and_add1XX";
+# endif
+# if defined(AO_HAVE_fetch_and_sub1XX)
+    "AO_fetch_and_sub1XX(addr):";
+    AO_fetch_and_sub1XX(addr);
+# else
+    "No AO_fetch_and_sub1XX";
+# endif
+# if defined(AO_HAVE_fetch_and_addXX)
+    "AO_fetch_and_addXX(addr, incr):";
+    AO_fetch_and_addXX(addr, incr);
+# else
+    "No AO_fetch_and_addXX";
+# endif
+# if defined(AO_HAVE_compare_and_swapXX)
+    "AO_compare_and_swapXX(addr, oldval, newval):";
+    AO_compare_and_swapXX(addr, oldval, newval);
+# else
+    "No AO_compare_and_swapXX";
+# endif
+}
+
+
+    
diff --git a/src/mm/boehm-gc/libatomic_ops/tests/run_parallel.inc b/src/mm/boehm-gc/libatomic_ops/tests/run_parallel.inc
new file mode 100644 (file)
index 0000000..1a87c8b
--- /dev/null
@@ -0,0 +1,204 @@
+/*
+ * Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+#if defined(_MSC_VER) || \
+    defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__CYGWIN__) || \
+    defined(_WIN32_WINCE)
+#  define USE_WINTHREADS
+#elif defined(__vxworks)
+#  define USE_VXTHREADS
+#else
+#  define USE_PTHREADS
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#ifdef USE_PTHREADS
+# include <pthread.h>
+#endif
+
+#ifdef USE_VXTHREADS
+# include <vxworks.h>
+# include <taskLib.h>
+#endif
+
+#ifdef USE_WINTHREADS
+# include <windows.h>
+#endif
+
+#include "atomic_ops.h"
+
+typedef void * (* thr_func)(void *);
+
+typedef int (* test_func)(void);       /* Returns != 0 on success */
+
+void * run_parallel(int nthreads, thr_func f1, test_func t, const char *name);
+
+#ifdef USE_PTHREADS
+void * run_parallel(int nthreads, thr_func f1, test_func t, const char *name)
+{
+  pthread_attr_t attr;
+  pthread_t thr[100];
+  int i;
+  int code;
+
+  fprintf(stderr, "Testing %s\n", name);
+  if (nthreads > 100) 
+    {
+      fprintf(stderr, "run_parallel: requested too many threads\n");
+      abort();
+    }
+
+# ifdef _HPUX_SOURCE
+   /* Default stack size is too small, especially with the 64 bit ABI */
+   /* Increase it.                                                    */
+    if (pthread_default_stacksize_np(1024*1024, 0) != 0) {
+      fprintf(stderr, "pthread_default_stacksize_np failed. "
+                     "OK after first call.\n");
+    }
+# endif
+
+  pthread_attr_init(&attr);
+
+  for (i = 0; i < nthreads; ++i)
+    {
+      if ((code = pthread_create(thr + i, &attr, f1, (void *)(long)i)) != 0)
+       {
+         perror("Thread creation failed");
+         fprintf(stderr, "Pthread_create returned %d, thread %d\n", code, i);
+         abort();
+        }
+    }
+  for (i = 0; i < nthreads; ++i)
+    {
+      if ((code = pthread_join(thr[i], NULL)) != 0)
+       {
+         perror("Thread join failed");
+         fprintf(stderr, "Pthread_join returned %d, thread %d\n", code, i);
+         abort();
+        }
+    }
+  if (t())
+    {
+      fprintf(stderr, "Succeeded\n");
+    }
+  else
+    {
+      fprintf(stderr, "Failed\n");
+      abort();
+    }
+  return 0;
+}
+#endif /* USE_PTHREADS */
+
+#ifdef USE_VXTHREADS
+void * run_parallel(int nthreads, thr_func f1, test_func t, const char *name)
+{
+  int thr[100];
+  int i;
+
+  fprintf(stderr, "Testing %s\n", name);
+  if (nthreads > 100) 
+    {
+      fprintf(stderr, "run_parallel: requested too many threads\n");
+      taskSuspend(0);
+    }
+
+  for (i = 0; i < nthreads; ++i)
+    {
+      thr[i] = taskSpawn((char*) name, 180, 0, 32768, (FUNCPTR) f1, i,
+                         1, 2, 3, 4, 5, 6, 7, 8, 9);
+      if (thr[i] == ERROR)
+       {
+         fprintf(stderr, "taskSpawn failed with %d, thread %d\n",
+                         errno, i);
+         taskSuspend(0);
+        }
+    }
+  for (i = 0; i < nthreads; ++i)
+    {
+      while (taskIdVerify(thr[i]) == OK)
+        taskDelay(60);
+    }
+  if (t())
+    {
+      fprintf(stderr, "Succeeded\n");
+    }
+  else
+    {
+      fprintf(stderr, "Failed\n");
+      taskSuspend(0);
+    }
+  return 0;
+}
+#endif /* USE_VXTHREADS */
+
+#ifdef USE_WINTHREADS
+
+struct tramp_args {
+  thr_func fn;
+  long arg;
+};
+
+DWORD WINAPI tramp(LPVOID param)
+{
+  struct tramp_args *args = (struct tramp_args *)param;
+
+  return (DWORD)(args -> fn)((LPVOID)(args -> arg));
+}
+
+void * run_parallel(int nthreads, thr_func f1, test_func t, const char *name)
+{
+  HANDLE thr[100];
+  struct tramp_args args[100];
+  int i;
+  DWORD code;
+
+  fprintf(stderr, "Testing %s\n", name);
+  if (nthreads > 100) 
+    {
+      fprintf(stderr, "run_parallel: requested too many threads\n");
+      abort();
+    }
+
+  for (i = 0; i < nthreads; ++i)
+    {
+      args[i].fn = f1;
+      args[i].arg = i;
+      if ((thr[i] = CreateThread(NULL, 0, tramp, (LPVOID)(args+i), 0, NULL))
+         == NULL)
+       {
+         perror("Thread creation failed");
+         fprintf(stderr, "CreateThread failed with %d, thread %d\n",
+                         GetLastError(), i);
+         abort();
+        }
+    }
+  for (i = 0; i < nthreads; ++i)
+    {
+      if ((code = WaitForSingleObject(thr[i], INFINITE)) != WAIT_OBJECT_0)
+       {
+         perror("Thread join failed");
+         fprintf(stderr, "WaitForSingleObject returned %d, thread %d\n",
+                         code, i);
+         abort();
+        }
+    }
+  if (t())
+    {
+      fprintf(stderr, "Succeeded\n");
+    }
+  else
+    {
+      fprintf(stderr, "Failed\n");
+      abort();
+    }
+  return 0;
+}
+#endif /* USE_WINTHREADS */
+
diff --git a/src/mm/boehm-gc/libatomic_ops/tests/test_atomic.c b/src/mm/boehm-gc/libatomic_ops/tests/test_atomic.c
new file mode 100644 (file)
index 0000000..d31297d
--- /dev/null
@@ -0,0 +1,190 @@
+/*  
+ * Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P.
+ * Original Author: Hans Boehm
+ *
+ * This file may be redistributed and/or modified under the
+ * terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2, or (at your option) any later version.
+ * 
+ * It is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License in the
+ * file doc/COPYING for more details.
+ */
+
+#if defined(HAVE_CONFIG_H)
+# include "config.h"
+#endif
+
+
+#include "run_parallel.inc"
+
+#include "test_atomic_include.h"
+
+#ifdef AO_USE_PTHREAD_DEFS
+# define NITERS 100000
+#else
+# define NITERS 10000000
+#endif
+
+void * add1sub1_thr(void * id);
+int add1sub1_test(void);
+void * acqrel_thr(void *id);
+int acqrel_test(void);
+void * test_and_set_thr(void * id);
+int test_and_set_test(void);
+
+#if defined(AO_HAVE_fetch_and_add1) && defined(AO_HAVE_fetch_and_sub1)
+
+AO_t counter = 0;
+
+void * add1sub1_thr(void * id)
+{
+  int me = (int)(long)id;
+
+  int i;
+
+  for (i = 0; i < NITERS; ++i)
+    if (me & 1)
+      AO_fetch_and_sub1(&counter);
+    else
+      AO_fetch_and_add1(&counter);
+
+  return 0;
+}
+
+int add1sub1_test(void)
+{
+  return counter == 0;
+}
+
+#endif /* defined(AO_HAVE_fetch_and_add1) && defined(AO_HAVE_fetch_and_sub1) */
+
+#if defined(AO_HAVE_store_release_write) && defined(AO_HAVE_load_acquire_read)
+
+/* Invariant: counter1 >= counter2 */
+AO_t counter1 = 0;
+AO_t counter2 = 0;
+
+void * acqrel_thr(void *id)
+{
+  int me = (int)(long)id;
+
+  int i;
+
+  for (i = 0; i < NITERS; ++i)
+    if (me & 1)
+      {
+        AO_t my_counter1;
+       if (me != 1)
+         fprintf(stderr, "acqrel test: too many threads\n");
+       my_counter1 = AO_load(&counter1);
+       AO_store(&counter1, my_counter1 + 1);
+       AO_store_release_write(&counter2, my_counter1 + 1);
+      }
+    else
+      {
+       AO_t my_counter1a, my_counter2a;
+       AO_t my_counter1b, my_counter2b;
+
+       my_counter2a = AO_load_acquire_read(&counter2);
+       my_counter1a = AO_load(&counter1);
+       /* Redo this, to make sure that the second load of counter1     */
+       /* is not viewed as a common subexpression.                     */
+       my_counter2b = AO_load_acquire_read(&counter2);
+       my_counter1b = AO_load(&counter1);
+       if (my_counter1a < my_counter2a)
+         {
+           fprintf(stderr, "Saw release store out of order: %lu < %lu\n",
+                   (unsigned long)my_counter1a, (unsigned long)my_counter2a);
+           abort();
+         }
+       if (my_counter1b < my_counter2b)
+         {
+           fprintf(stderr,
+                   "Saw release store out of order (bad CSE?): %lu < %lu\n",
+                   (unsigned long)my_counter1b, (unsigned long)my_counter2b);
+           abort();
+         }
+      }
+
+  return 0;
+}
+
+int acqrel_test(void)
+{
+  return counter1 == NITERS && counter2 == NITERS;
+}
+
+#endif /* AO_HAVE_store_release_write && AO_HAVE_load_acquire_read */
+
+#if defined(AO_HAVE_test_and_set_acquire)
+
+AO_TS_T lock = AO_TS_INITIALIZER;
+
+unsigned long locked_counter;
+volatile unsigned long junk = 13;
+
+void * test_and_set_thr(void * id)
+{
+  unsigned long i;
+
+  for (i = 0; i < NITERS/10; ++i)
+    {
+      while (AO_test_and_set_acquire(&lock) != AO_TS_CLEAR);
+      ++locked_counter;
+      if (locked_counter != 1)
+        {
+          fprintf(stderr, "Test and set failure 1, counter = %ld\n",
+                     locked_counter);
+          abort();
+        }
+      locked_counter *= 2;
+      locked_counter -= 1;
+      locked_counter *= 5;
+      locked_counter -= 4;
+      if (locked_counter != 1)
+        {
+          fprintf(stderr, "Test and set failure 2, counter = %ld\n",
+                     locked_counter);
+          abort();
+        }
+      --locked_counter;
+      AO_CLEAR(&lock);
+      /* Spend a bit of time outside the lock. */
+        junk *= 17;
+        junk *= 17;
+    }
+  return 0;
+}
+
+int test_and_set_test(void)
+{
+  return locked_counter == 0;
+}
+
+#endif /* defined(AO_HAVE_test_and_set_acquire) */
+
+int main()
+{
+  test_atomic();
+  test_atomic_acquire();
+  test_atomic_release();
+  test_atomic_read();
+  test_atomic_write();
+  test_atomic_full();
+  test_atomic_release_write();
+  test_atomic_acquire_read();
+# if defined(AO_HAVE_fetch_and_add1) && defined(AO_HAVE_fetch_and_sub1)
+    run_parallel(4, add1sub1_thr, add1sub1_test, "add1/sub1");
+# endif
+# if defined(AO_HAVE_store_release_write) && defined(AO_HAVE_load_acquire_read)
+    run_parallel(3, acqrel_thr, acqrel_test,
+                "store_release_write/load_acquire_read");
+# endif
+# if defined(AO_HAVE_test_and_set_acquire)
+    run_parallel(5, test_and_set_thr, test_and_set_test,
+                "test_and_set");
+# endif
+  return 0;
+}
diff --git a/src/mm/boehm-gc/libatomic_ops/tests/test_atomic.template b/src/mm/boehm-gc/libatomic_ops/tests/test_atomic.template
new file mode 100644 (file)
index 0000000..f80eac8
--- /dev/null
@@ -0,0 +1,203 @@
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* Some basic sanity tests.  These do not test the barrier semantics. */
+
+#undef TA_assert
+#define TA_assert(e) \
+  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: XX)\n", \
+                   __FILE__, __LINE__), exit(1); }
+
+#undef MISSING
+#define MISSING(name) \
+  fprintf(stderr, "Missing: %s\n", #name "XX")
+
+void test_atomicXX(void)
+{
+  AO_t x;
+  unsigned char b;
+  unsigned short s;
+  unsigned int zz;
+# if defined(AO_HAVE_test_and_setXX)
+    AO_TS_t z = AO_TS_INITIALIZER;
+# endif
+# if defined(AO_HAVE_double_t)
+    AO_double_t w;
+    w.AO_val1 = 0;
+    w.AO_val2 = 0;
+# endif
+
+# if defined(AO_HAVE_nopXX)
+    AO_nopXX();
+# else
+    MISSING(AO_nop);
+# endif
+# if defined(AO_HAVE_storeXX)
+    AO_storeXX(&x, 13);
+    TA_assert (x == 13);
+# else
+    MISSING(AO_store);
+    x = 13;
+# endif
+# if defined(AO_HAVE_loadXX)
+    TA_assert(AO_loadXX(&x) == 13);
+# else
+    MISSING(AO_load);
+# endif
+# if defined(AO_HAVE_test_and_setXX)
+    assert(AO_test_and_setXX(&z) == AO_TS_CLEAR);
+    assert(AO_test_and_setXX(&z) == AO_TS_SET);
+    assert(AO_test_and_setXX(&z) == AO_TS_SET);
+    AO_CLEAR(&z);
+# else
+    MISSING(AO_test_and_set);
+# endif
+# if defined(AO_HAVE_fetch_and_addXX)
+    TA_assert(AO_fetch_and_addXX(&x, 42) == 13);
+    TA_assert(AO_fetch_and_addXX(&x, -42) == 55);
+# else
+    MISSING(AO_fetch_and_add);
+# endif
+# if defined(AO_HAVE_fetch_and_add1XX)
+    TA_assert(AO_fetch_and_add1XX(&x) == 13);
+# else
+    MISSING(AO_fetch_and_add1);
+    ++x;
+# endif
+# if defined(AO_HAVE_fetch_and_sub1XX)
+    TA_assert(AO_fetch_and_sub1XX(&x) == 14);
+# else
+    MISSING(AO_fetch_and_sub1);
+    --x;
+# endif
+# if defined(AO_HAVE_short_storeXX)
+    AO_short_storeXX(&s, 13);
+# else
+    MISSING(AO_short_store);
+    s = 13;
+# endif
+# if defined(AO_HAVE_short_loadXX)
+    TA_assert(AO_short_load(&s) == 13);
+# else
+    MISSING(AO_short_load);
+# endif
+# if defined(AO_HAVE_short_fetch_and_addXX)
+    TA_assert(AO_short_fetch_and_addXX(&s, 42) == 13);
+    TA_assert(AO_short_fetch_and_addXX(&s, -42) == 55);
+# else
+    MISSING(AO_short_fetch_and_add);
+# endif
+# if defined(AO_HAVE_short_fetch_and_add1XX)
+    TA_assert(AO_short_fetch_and_add1XX(&s) == 13);
+# else
+    MISSING(AO_short_fetch_and_add1);
+    ++s;
+# endif
+# if defined(AO_HAVE_short_fetch_and_sub1XX)
+    TA_assert(AO_short_fetch_and_sub1XX(&s) == 14);
+# else
+    MISSING(AO_short_fetch_and_sub1);
+    --s;
+# endif
+# if defined(AO_HAVE_char_storeXX)
+    AO_char_storeXX(&b, 13);
+# else
+    MISSING(AO_char_store);
+    b = 13;
+# endif
+# if defined(AO_HAVE_char_loadXX)
+    TA_assert(AO_char_load(&b) == 13);
+# else
+    MISSING(AO_char_load);
+# endif
+# if defined(AO_HAVE_char_fetch_and_addXX)
+    TA_assert(AO_char_fetch_and_addXX(&b, 42) == 13);
+    TA_assert(AO_char_fetch_and_addXX(&b, -42) == 55);
+# else
+    MISSING(AO_char_fetch_and_add);
+# endif
+# if defined(AO_HAVE_char_fetch_and_add1XX)
+    TA_assert(AO_char_fetch_and_add1XX(&b) == 13);
+# else
+    MISSING(AO_char_fetch_and_add1);
+    ++b;
+# endif
+# if defined(AO_HAVE_char_fetch_and_sub1XX)
+    TA_assert(AO_char_fetch_and_sub1XX(&b) == 14);
+# else
+    MISSING(AO_char_fetch_and_sub1);
+    --b;
+# endif
+# if defined(AO_HAVE_int_storeXX)
+    AO_int_storeXX(&zz, 13);
+# else
+    MISSING(AO_int_store);
+    zz = 13;
+# endif
+# if defined(AO_HAVE_int_loadXX)
+    TA_assert(AO_int_load(&zz) == 13);
+# else
+    MISSING(AO_int_load);
+# endif
+# if defined(AO_HAVE_int_fetch_and_addXX)
+    TA_assert(AO_int_fetch_and_addXX(&zz, 42) == 13);
+    TA_assert(AO_int_fetch_and_addXX(&zz, -42) == 55);
+# else
+    MISSING(AO_int_fetch_and_add);
+# endif
+# if defined(AO_HAVE_int_fetch_and_add1XX)
+    TA_assert(AO_int_fetch_and_add1XX(&zz) == 13);
+# else
+    MISSING(AO_int_fetch_and_add1);
+    ++zz;
+# endif
+# if defined(AO_HAVE_int_fetch_and_sub1XX)
+    TA_assert(AO_int_fetch_and_sub1XX(&zz) == 14);
+# else
+    MISSING(AO_int_fetch_and_sub1);
+    --zz;
+# endif
+# if defined(AO_HAVE_compare_and_swapXX)
+    TA_assert(!AO_compare_and_swapXX(&x, 14, 42));
+    TA_assert(x == 13);
+    TA_assert(AO_compare_and_swapXX(&x, 13, 42));
+    TA_assert(x == 42);
+# else
+    MISSING(AO_compare_and_swap);
+# endif
+# if defined(AO_HAVE_orXX)
+    AO_orXX(&x, 66);
+    TA_assert(x == 106);
+# else
+    MISSING(AO_or);
+    x |= 34;
+# endif
+# if defined(AO_HAVE_compare_double_and_swap_doubleXX)
+    TA_assert(!AO_compare_double_and_swap_doubleXX(&w, 17, 42, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_double_and_swap_doubleXX(&w, 0, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_double_and_swap_doubleXX(&w, 12, 13, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+    w.AO_val1 = 0; w.AO_val2 = 0;
+# else
+    MISSING(AO_compare_double_and_swap_double);
+# endif
+# if defined(AO_HAVE_compare_and_swap_doubleXX)
+    TA_assert(!AO_compare_and_swap_doubleXX(&w, 17, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_and_swap_doubleXX(&w, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_and_swap_doubleXX(&w, 12, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+# else
+    MISSING(AO_compare_and_swap_double);
+# endif
+}
+
+
+    
diff --git a/src/mm/boehm-gc/libatomic_ops/tests/test_atomic_include.h b/src/mm/boehm-gc/libatomic_ops/tests/test_atomic_include.h
new file mode 100644 (file)
index 0000000..bc280eb
--- /dev/null
@@ -0,0 +1,1633 @@
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+void test_atomic(void);
+void test_atomic_release(void);
+void test_atomic_acquire(void);
+void test_atomic_read(void);
+void test_atomic_write(void);
+void test_atomic_full(void);
+void test_atomic_release_write(void);
+void test_atomic_acquire_read(void);
+
+/* Some basic sanity tests.  These do not test the barrier semantics. */
+
+#undef TA_assert
+#define TA_assert(e) \
+  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: )\n", \
+                   __FILE__, __LINE__), exit(1); }
+
+#undef MISSING
+#define MISSING(name) \
+  fprintf(stderr, "Missing: %s\n", #name "")
+
+void test_atomic(void)
+{
+  AO_t x;
+  unsigned char b;
+  unsigned short s;
+  unsigned int zz;
+# if defined(AO_HAVE_test_and_set)
+    AO_TS_t z = AO_TS_INITIALIZER;
+# endif
+# if defined(AO_HAVE_double_t)
+    AO_double_t w;
+    w.AO_val1 = 0;
+    w.AO_val2 = 0;
+# endif
+
+# if defined(AO_HAVE_nop)
+    AO_nop();
+# else
+    MISSING(AO_nop);
+# endif
+# if defined(AO_HAVE_store)
+    AO_store(&x, 13);
+    TA_assert (x == 13);
+# else
+    MISSING(AO_store);
+    x = 13;
+# endif
+# if defined(AO_HAVE_load)
+    TA_assert(AO_load(&x) == 13);
+# else
+    MISSING(AO_load);
+# endif
+# if defined(AO_HAVE_test_and_set)
+    assert(AO_test_and_set(&z) == AO_TS_CLEAR);
+    assert(AO_test_and_set(&z) == AO_TS_SET);
+    assert(AO_test_and_set(&z) == AO_TS_SET);
+    AO_CLEAR(&z);
+# else
+    MISSING(AO_test_and_set);
+# endif
+# if defined(AO_HAVE_fetch_and_add)
+    TA_assert(AO_fetch_and_add(&x, 42) == 13);
+    TA_assert(AO_fetch_and_add(&x, -42) == 55);
+# else
+    MISSING(AO_fetch_and_add);
+# endif
+# if defined(AO_HAVE_fetch_and_add1)
+    TA_assert(AO_fetch_and_add1(&x) == 13);
+# else
+    MISSING(AO_fetch_and_add1);
+    ++x;
+# endif
+# if defined(AO_HAVE_fetch_and_sub1)
+    TA_assert(AO_fetch_and_sub1(&x) == 14);
+# else
+    MISSING(AO_fetch_and_sub1);
+    --x;
+# endif
+# if defined(AO_HAVE_short_store)
+    AO_short_store(&s, 13);
+# else
+    MISSING(AO_short_store);
+    s = 13;
+# endif
+# if defined(AO_HAVE_short_load)
+    TA_assert(AO_short_load(&s) == 13);
+# else
+    MISSING(AO_short_load);
+# endif
+# if defined(AO_HAVE_short_fetch_and_add)
+    TA_assert(AO_short_fetch_and_add(&s, 42) == 13);
+    TA_assert(AO_short_fetch_and_add(&s, -42) == 55);
+# else
+    MISSING(AO_short_fetch_and_add);
+# endif
+# if defined(AO_HAVE_short_fetch_and_add1)
+    TA_assert(AO_short_fetch_and_add1(&s) == 13);
+# else
+    MISSING(AO_short_fetch_and_add1);
+    ++s;
+# endif
+# if defined(AO_HAVE_short_fetch_and_sub1)
+    TA_assert(AO_short_fetch_and_sub1(&s) == 14);
+# else
+    MISSING(AO_short_fetch_and_sub1);
+    --s;
+# endif
+# if defined(AO_HAVE_char_store)
+    AO_char_store(&b, 13);
+# else
+    MISSING(AO_char_store);
+    b = 13;
+# endif
+# if defined(AO_HAVE_char_load)
+    TA_assert(AO_char_load(&b) == 13);
+# else
+    MISSING(AO_char_load);
+# endif
+# if defined(AO_HAVE_char_fetch_and_add)
+    TA_assert(AO_char_fetch_and_add(&b, 42) == 13);
+    TA_assert(AO_char_fetch_and_add(&b, -42) == 55);
+# else
+    MISSING(AO_char_fetch_and_add);
+# endif
+# if defined(AO_HAVE_char_fetch_and_add1)
+    TA_assert(AO_char_fetch_and_add1(&b) == 13);
+# else
+    MISSING(AO_char_fetch_and_add1);
+    ++b;
+# endif
+# if defined(AO_HAVE_char_fetch_and_sub1)
+    TA_assert(AO_char_fetch_and_sub1(&b) == 14);
+# else
+    MISSING(AO_char_fetch_and_sub1);
+    --b;
+# endif
+# if defined(AO_HAVE_int_store)
+    AO_int_store(&zz, 13);
+# else
+    MISSING(AO_int_store);
+    zz = 13;
+# endif
+# if defined(AO_HAVE_int_load)
+    TA_assert(AO_int_load(&zz) == 13);
+# else
+    MISSING(AO_int_load);
+# endif
+# if defined(AO_HAVE_int_fetch_and_add)
+    TA_assert(AO_int_fetch_and_add(&zz, 42) == 13);
+    TA_assert(AO_int_fetch_and_add(&zz, -42) == 55);
+# else
+    MISSING(AO_int_fetch_and_add);
+# endif
+# if defined(AO_HAVE_int_fetch_and_add1)
+    TA_assert(AO_int_fetch_and_add1(&zz) == 13);
+# else
+    MISSING(AO_int_fetch_and_add1);
+    ++zz;
+# endif
+# if defined(AO_HAVE_int_fetch_and_sub1)
+    TA_assert(AO_int_fetch_and_sub1(&zz) == 14);
+# else
+    MISSING(AO_int_fetch_and_sub1);
+    --zz;
+# endif
+# if defined(AO_HAVE_compare_and_swap)
+    TA_assert(!AO_compare_and_swap(&x, 14, 42));
+    TA_assert(x == 13);
+    TA_assert(AO_compare_and_swap(&x, 13, 42));
+    TA_assert(x == 42);
+# else
+    MISSING(AO_compare_and_swap);
+# endif
+# if defined(AO_HAVE_or)
+    AO_or(&x, 66);
+    TA_assert(x == 106);
+# else
+    MISSING(AO_or);
+    x |= 34;
+# endif
+# if defined(AO_HAVE_compare_double_and_swap_double)
+    TA_assert(!AO_compare_double_and_swap_double(&w, 17, 42, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_double_and_swap_double(&w, 0, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_double_and_swap_double(&w, 12, 13, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+    w.AO_val1 = 0; w.AO_val2 = 0;
+# else
+    MISSING(AO_compare_double_and_swap_double);
+# endif
+# if defined(AO_HAVE_compare_and_swap_double)
+    TA_assert(!AO_compare_and_swap_double(&w, 17, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_and_swap_double(&w, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_and_swap_double(&w, 12, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+# else
+    MISSING(AO_compare_and_swap_double);
+# endif
+}
+
+
+    
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* Some basic sanity tests.  These do not test the barrier semantics. */
+
+#undef TA_assert
+#define TA_assert(e) \
+  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: _release)\n", \
+                   __FILE__, __LINE__), exit(1); }
+
+#undef MISSING
+#define MISSING(name) \
+  fprintf(stderr, "Missing: %s\n", #name "_release")
+
+void test_atomic_release(void)
+{
+  AO_t x;
+  unsigned char b;
+  unsigned short s;
+  unsigned int zz;
+# if defined(AO_HAVE_test_and_set_release)
+    AO_TS_t z = AO_TS_INITIALIZER;
+# endif
+# if defined(AO_HAVE_double_t)
+    AO_double_t w;
+    w.AO_val1 = 0;
+    w.AO_val2 = 0;
+# endif
+
+# if defined(AO_HAVE_nop_release)
+    AO_nop_release();
+# else
+    MISSING(AO_nop);
+# endif
+# if defined(AO_HAVE_store_release)
+    AO_store_release(&x, 13);
+    TA_assert (x == 13);
+# else
+    MISSING(AO_store);
+    x = 13;
+# endif
+# if defined(AO_HAVE_load_release)
+    TA_assert(AO_load_release(&x) == 13);
+# else
+    MISSING(AO_load);
+# endif
+# if defined(AO_HAVE_test_and_set_release)
+    assert(AO_test_and_set_release(&z) == AO_TS_CLEAR);
+    assert(AO_test_and_set_release(&z) == AO_TS_SET);
+    assert(AO_test_and_set_release(&z) == AO_TS_SET);
+    AO_CLEAR(&z);
+# else
+    MISSING(AO_test_and_set);
+# endif
+# if defined(AO_HAVE_fetch_and_add_release)
+    TA_assert(AO_fetch_and_add_release(&x, 42) == 13);
+    TA_assert(AO_fetch_and_add_release(&x, -42) == 55);
+# else
+    MISSING(AO_fetch_and_add);
+# endif
+# if defined(AO_HAVE_fetch_and_add1_release)
+    TA_assert(AO_fetch_and_add1_release(&x) == 13);
+# else
+    MISSING(AO_fetch_and_add1);
+    ++x;
+# endif
+# if defined(AO_HAVE_fetch_and_sub1_release)
+    TA_assert(AO_fetch_and_sub1_release(&x) == 14);
+# else
+    MISSING(AO_fetch_and_sub1);
+    --x;
+# endif
+# if defined(AO_HAVE_short_store_release)
+    AO_short_store_release(&s, 13);
+# else
+    MISSING(AO_short_store);
+    s = 13;
+# endif
+# if defined(AO_HAVE_short_load_release)
+    TA_assert(AO_short_load(&s) == 13);
+# else
+    MISSING(AO_short_load);
+# endif
+# if defined(AO_HAVE_short_fetch_and_add_release)
+    TA_assert(AO_short_fetch_and_add_release(&s, 42) == 13);
+    TA_assert(AO_short_fetch_and_add_release(&s, -42) == 55);
+# else
+    MISSING(AO_short_fetch_and_add);
+# endif
+# if defined(AO_HAVE_short_fetch_and_add1_release)
+    TA_assert(AO_short_fetch_and_add1_release(&s) == 13);
+# else
+    MISSING(AO_short_fetch_and_add1);
+    ++s;
+# endif
+# if defined(AO_HAVE_short_fetch_and_sub1_release)
+    TA_assert(AO_short_fetch_and_sub1_release(&s) == 14);
+# else
+    MISSING(AO_short_fetch_and_sub1);
+    --s;
+# endif
+# if defined(AO_HAVE_char_store_release)
+    AO_char_store_release(&b, 13);
+# else
+    MISSING(AO_char_store);
+    b = 13;
+# endif
+# if defined(AO_HAVE_char_load_release)
+    TA_assert(AO_char_load(&b) == 13);
+# else
+    MISSING(AO_char_load);
+# endif
+# if defined(AO_HAVE_char_fetch_and_add_release)
+    TA_assert(AO_char_fetch_and_add_release(&b, 42) == 13);
+    TA_assert(AO_char_fetch_and_add_release(&b, -42) == 55);
+# else
+    MISSING(AO_char_fetch_and_add);
+# endif
+# if defined(AO_HAVE_char_fetch_and_add1_release)
+    TA_assert(AO_char_fetch_and_add1_release(&b) == 13);
+# else
+    MISSING(AO_char_fetch_and_add1);
+    ++b;
+# endif
+# if defined(AO_HAVE_char_fetch_and_sub1_release)
+    TA_assert(AO_char_fetch_and_sub1_release(&b) == 14);
+# else
+    MISSING(AO_char_fetch_and_sub1);
+    --b;
+# endif
+# if defined(AO_HAVE_int_store_release)
+    AO_int_store_release(&zz, 13);
+# else
+    MISSING(AO_int_store);
+    zz = 13;
+# endif
+# if defined(AO_HAVE_int_load_release)
+    TA_assert(AO_int_load(&zz) == 13);
+# else
+    MISSING(AO_int_load);
+# endif
+# if defined(AO_HAVE_int_fetch_and_add_release)
+    TA_assert(AO_int_fetch_and_add_release(&zz, 42) == 13);
+    TA_assert(AO_int_fetch_and_add_release(&zz, -42) == 55);
+# else
+    MISSING(AO_int_fetch_and_add);
+# endif
+# if defined(AO_HAVE_int_fetch_and_add1_release)
+    TA_assert(AO_int_fetch_and_add1_release(&zz) == 13);
+# else
+    MISSING(AO_int_fetch_and_add1);
+    ++zz;
+# endif
+# if defined(AO_HAVE_int_fetch_and_sub1_release)
+    TA_assert(AO_int_fetch_and_sub1_release(&zz) == 14);
+# else
+    MISSING(AO_int_fetch_and_sub1);
+    --zz;
+# endif
+# if defined(AO_HAVE_compare_and_swap_release)
+    TA_assert(!AO_compare_and_swap_release(&x, 14, 42));
+    TA_assert(x == 13);
+    TA_assert(AO_compare_and_swap_release(&x, 13, 42));
+    TA_assert(x == 42);
+# else
+    MISSING(AO_compare_and_swap);
+# endif
+# if defined(AO_HAVE_or_release)
+    AO_or_release(&x, 66);
+    TA_assert(x == 106);
+# else
+    MISSING(AO_or);
+    x |= 34;
+# endif
+# if defined(AO_HAVE_compare_double_and_swap_double_release)
+    TA_assert(!AO_compare_double_and_swap_double_release(&w, 17, 42, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_double_and_swap_double_release(&w, 0, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_double_and_swap_double_release(&w, 12, 13, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+    w.AO_val1 = 0; w.AO_val2 = 0;
+# else
+    MISSING(AO_compare_double_and_swap_double);
+# endif
+# if defined(AO_HAVE_compare_and_swap_double_release)
+    TA_assert(!AO_compare_and_swap_double_release(&w, 17, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_and_swap_double_release(&w, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_and_swap_double_release(&w, 12, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+# else
+    MISSING(AO_compare_and_swap_double);
+# endif
+}
+
+
+    
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* Some basic sanity tests.  These do not test the barrier semantics. */
+
+#undef TA_assert
+#define TA_assert(e) \
+  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: _acquire)\n", \
+                   __FILE__, __LINE__), exit(1); }
+
+#undef MISSING
+#define MISSING(name) \
+  fprintf(stderr, "Missing: %s\n", #name "_acquire")
+
+void test_atomic_acquire(void)
+{
+  AO_t x;
+  unsigned char b;
+  unsigned short s;
+  unsigned int zz;
+# if defined(AO_HAVE_test_and_set_acquire)
+    AO_TS_t z = AO_TS_INITIALIZER;
+# endif
+# if defined(AO_HAVE_double_t)
+    AO_double_t w;
+    w.AO_val1 = 0;
+    w.AO_val2 = 0;
+# endif
+
+# if defined(AO_HAVE_nop_acquire)
+    AO_nop_acquire();
+# else
+    MISSING(AO_nop);
+# endif
+# if defined(AO_HAVE_store_acquire)
+    AO_store_acquire(&x, 13);
+    TA_assert (x == 13);
+# else
+    MISSING(AO_store);
+    x = 13;
+# endif
+# if defined(AO_HAVE_load_acquire)
+    TA_assert(AO_load_acquire(&x) == 13);
+# else
+    MISSING(AO_load);
+# endif
+# if defined(AO_HAVE_test_and_set_acquire)
+    assert(AO_test_and_set_acquire(&z) == AO_TS_CLEAR);
+    assert(AO_test_and_set_acquire(&z) == AO_TS_SET);
+    assert(AO_test_and_set_acquire(&z) == AO_TS_SET);
+    AO_CLEAR(&z);
+# else
+    MISSING(AO_test_and_set);
+# endif
+# if defined(AO_HAVE_fetch_and_add_acquire)
+    TA_assert(AO_fetch_and_add_acquire(&x, 42) == 13);
+    TA_assert(AO_fetch_and_add_acquire(&x, -42) == 55);
+# else
+    MISSING(AO_fetch_and_add);
+# endif
+# if defined(AO_HAVE_fetch_and_add1_acquire)
+    TA_assert(AO_fetch_and_add1_acquire(&x) == 13);
+# else
+    MISSING(AO_fetch_and_add1);
+    ++x;
+# endif
+# if defined(AO_HAVE_fetch_and_sub1_acquire)
+    TA_assert(AO_fetch_and_sub1_acquire(&x) == 14);
+# else
+    MISSING(AO_fetch_and_sub1);
+    --x;
+# endif
+# if defined(AO_HAVE_short_store_acquire)
+    AO_short_store_acquire(&s, 13);
+# else
+    MISSING(AO_short_store);
+    s = 13;
+# endif
+# if defined(AO_HAVE_short_load_acquire)
+    TA_assert(AO_short_load(&s) == 13);
+# else
+    MISSING(AO_short_load);
+# endif
+# if defined(AO_HAVE_short_fetch_and_add_acquire)
+    TA_assert(AO_short_fetch_and_add_acquire(&s, 42) == 13);
+    TA_assert(AO_short_fetch_and_add_acquire(&s, -42) == 55);
+# else
+    MISSING(AO_short_fetch_and_add);
+# endif
+# if defined(AO_HAVE_short_fetch_and_add1_acquire)
+    TA_assert(AO_short_fetch_and_add1_acquire(&s) == 13);
+# else
+    MISSING(AO_short_fetch_and_add1);
+    ++s;
+# endif
+# if defined(AO_HAVE_short_fetch_and_sub1_acquire)
+    TA_assert(AO_short_fetch_and_sub1_acquire(&s) == 14);
+# else
+    MISSING(AO_short_fetch_and_sub1);
+    --s;
+# endif
+# if defined(AO_HAVE_char_store_acquire)
+    AO_char_store_acquire(&b, 13);
+# else
+    MISSING(AO_char_store);
+    b = 13;
+# endif
+# if defined(AO_HAVE_char_load_acquire)
+    TA_assert(AO_char_load(&b) == 13);
+# else
+    MISSING(AO_char_load);
+# endif
+# if defined(AO_HAVE_char_fetch_and_add_acquire)
+    TA_assert(AO_char_fetch_and_add_acquire(&b, 42) == 13);
+    TA_assert(AO_char_fetch_and_add_acquire(&b, -42) == 55);
+# else
+    MISSING(AO_char_fetch_and_add);
+# endif
+# if defined(AO_HAVE_char_fetch_and_add1_acquire)
+    TA_assert(AO_char_fetch_and_add1_acquire(&b) == 13);
+# else
+    MISSING(AO_char_fetch_and_add1);
+    ++b;
+# endif
+# if defined(AO_HAVE_char_fetch_and_sub1_acquire)
+    TA_assert(AO_char_fetch_and_sub1_acquire(&b) == 14);
+# else
+    MISSING(AO_char_fetch_and_sub1);
+    --b;
+# endif
+# if defined(AO_HAVE_int_store_acquire)
+    AO_int_store_acquire(&zz, 13);
+# else
+    MISSING(AO_int_store);
+    zz = 13;
+# endif
+# if defined(AO_HAVE_int_load_acquire)
+    TA_assert(AO_int_load(&zz) == 13);
+# else
+    MISSING(AO_int_load);
+# endif
+# if defined(AO_HAVE_int_fetch_and_add_acquire)
+    TA_assert(AO_int_fetch_and_add_acquire(&zz, 42) == 13);
+    TA_assert(AO_int_fetch_and_add_acquire(&zz, -42) == 55);
+# else
+    MISSING(AO_int_fetch_and_add);
+# endif
+# if defined(AO_HAVE_int_fetch_and_add1_acquire)
+    TA_assert(AO_int_fetch_and_add1_acquire(&zz) == 13);
+# else
+    MISSING(AO_int_fetch_and_add1);
+    ++zz;
+# endif
+# if defined(AO_HAVE_int_fetch_and_sub1_acquire)
+    TA_assert(AO_int_fetch_and_sub1_acquire(&zz) == 14);
+# else
+    MISSING(AO_int_fetch_and_sub1);
+    --zz;
+# endif
+# if defined(AO_HAVE_compare_and_swap_acquire)
+    TA_assert(!AO_compare_and_swap_acquire(&x, 14, 42));
+    TA_assert(x == 13);
+    TA_assert(AO_compare_and_swap_acquire(&x, 13, 42));
+    TA_assert(x == 42);
+# else
+    MISSING(AO_compare_and_swap);
+# endif
+# if defined(AO_HAVE_or_acquire)
+    AO_or_acquire(&x, 66);
+    TA_assert(x == 106);
+# else
+    MISSING(AO_or);
+    x |= 34;
+# endif
+# if defined(AO_HAVE_compare_double_and_swap_double_acquire)
+    TA_assert(!AO_compare_double_and_swap_double_acquire(&w, 17, 42, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_double_and_swap_double_acquire(&w, 0, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_double_and_swap_double_acquire(&w, 12, 13, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+    w.AO_val1 = 0; w.AO_val2 = 0;
+# else
+    MISSING(AO_compare_double_and_swap_double);
+# endif
+# if defined(AO_HAVE_compare_and_swap_double_acquire)
+    TA_assert(!AO_compare_and_swap_double_acquire(&w, 17, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_and_swap_double_acquire(&w, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_and_swap_double_acquire(&w, 12, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+# else
+    MISSING(AO_compare_and_swap_double);
+# endif
+}
+
+
+    
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* Some basic sanity tests.  These do not test the barrier semantics. */
+
+#undef TA_assert
+#define TA_assert(e) \
+  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: _read)\n", \
+                   __FILE__, __LINE__), exit(1); }
+
+#undef MISSING
+#define MISSING(name) \
+  fprintf(stderr, "Missing: %s\n", #name "_read")
+
+void test_atomic_read(void)
+{
+  AO_t x;
+  unsigned char b;
+  unsigned short s;
+  unsigned int zz;
+# if defined(AO_HAVE_test_and_set_read)
+    AO_TS_t z = AO_TS_INITIALIZER;
+# endif
+# if defined(AO_HAVE_double_t)
+    AO_double_t w;
+    w.AO_val1 = 0;
+    w.AO_val2 = 0;
+# endif
+
+# if defined(AO_HAVE_nop_read)
+    AO_nop_read();
+# else
+    MISSING(AO_nop);
+# endif
+# if defined(AO_HAVE_store_read)
+    AO_store_read(&x, 13);
+    TA_assert (x == 13);
+# else
+    MISSING(AO_store);
+    x = 13;
+# endif
+# if defined(AO_HAVE_load_read)
+    TA_assert(AO_load_read(&x) == 13);
+# else
+    MISSING(AO_load);
+# endif
+# if defined(AO_HAVE_test_and_set_read)
+    assert(AO_test_and_set_read(&z) == AO_TS_CLEAR);
+    assert(AO_test_and_set_read(&z) == AO_TS_SET);
+    assert(AO_test_and_set_read(&z) == AO_TS_SET);
+    AO_CLEAR(&z);
+# else
+    MISSING(AO_test_and_set);
+# endif
+# if defined(AO_HAVE_fetch_and_add_read)
+    TA_assert(AO_fetch_and_add_read(&x, 42) == 13);
+    TA_assert(AO_fetch_and_add_read(&x, -42) == 55);
+# else
+    MISSING(AO_fetch_and_add);
+# endif
+# if defined(AO_HAVE_fetch_and_add1_read)
+    TA_assert(AO_fetch_and_add1_read(&x) == 13);
+# else
+    MISSING(AO_fetch_and_add1);
+    ++x;
+# endif
+# if defined(AO_HAVE_fetch_and_sub1_read)
+    TA_assert(AO_fetch_and_sub1_read(&x) == 14);
+# else
+    MISSING(AO_fetch_and_sub1);
+    --x;
+# endif
+# if defined(AO_HAVE_short_store_read)
+    AO_short_store_read(&s, 13);
+# else
+    MISSING(AO_short_store);
+    s = 13;
+# endif
+# if defined(AO_HAVE_short_load_read)
+    TA_assert(AO_short_load(&s) == 13);
+# else
+    MISSING(AO_short_load);
+# endif
+# if defined(AO_HAVE_short_fetch_and_add_read)
+    TA_assert(AO_short_fetch_and_add_read(&s, 42) == 13);
+    TA_assert(AO_short_fetch_and_add_read(&s, -42) == 55);
+# else
+    MISSING(AO_short_fetch_and_add);
+# endif
+# if defined(AO_HAVE_short_fetch_and_add1_read)
+    TA_assert(AO_short_fetch_and_add1_read(&s) == 13);
+# else
+    MISSING(AO_short_fetch_and_add1);
+    ++s;
+# endif
+# if defined(AO_HAVE_short_fetch_and_sub1_read)
+    TA_assert(AO_short_fetch_and_sub1_read(&s) == 14);
+# else
+    MISSING(AO_short_fetch_and_sub1);
+    --s;
+# endif
+# if defined(AO_HAVE_char_store_read)
+    AO_char_store_read(&b, 13);
+# else
+    MISSING(AO_char_store);
+    b = 13;
+# endif
+# if defined(AO_HAVE_char_load_read)
+    TA_assert(AO_char_load(&b) == 13);
+# else
+    MISSING(AO_char_load);
+# endif
+# if defined(AO_HAVE_char_fetch_and_add_read)
+    TA_assert(AO_char_fetch_and_add_read(&b, 42) == 13);
+    TA_assert(AO_char_fetch_and_add_read(&b, -42) == 55);
+# else
+    MISSING(AO_char_fetch_and_add);
+# endif
+# if defined(AO_HAVE_char_fetch_and_add1_read)
+    TA_assert(AO_char_fetch_and_add1_read(&b) == 13);
+# else
+    MISSING(AO_char_fetch_and_add1);
+    ++b;
+# endif
+# if defined(AO_HAVE_char_fetch_and_sub1_read)
+    TA_assert(AO_char_fetch_and_sub1_read(&b) == 14);
+# else
+    MISSING(AO_char_fetch_and_sub1);
+    --b;
+# endif
+# if defined(AO_HAVE_int_store_read)
+    AO_int_store_read(&zz, 13);
+# else
+    MISSING(AO_int_store);
+    zz = 13;
+# endif
+# if defined(AO_HAVE_int_load_read)
+    TA_assert(AO_int_load(&zz) == 13);
+# else
+    MISSING(AO_int_load);
+# endif
+# if defined(AO_HAVE_int_fetch_and_add_read)
+    TA_assert(AO_int_fetch_and_add_read(&zz, 42) == 13);
+    TA_assert(AO_int_fetch_and_add_read(&zz, -42) == 55);
+# else
+    MISSING(AO_int_fetch_and_add);
+# endif
+# if defined(AO_HAVE_int_fetch_and_add1_read)
+    TA_assert(AO_int_fetch_and_add1_read(&zz) == 13);
+# else
+    MISSING(AO_int_fetch_and_add1);
+    ++zz;
+# endif
+# if defined(AO_HAVE_int_fetch_and_sub1_read)
+    TA_assert(AO_int_fetch_and_sub1_read(&zz) == 14);
+# else
+    MISSING(AO_int_fetch_and_sub1);
+    --zz;
+# endif
+# if defined(AO_HAVE_compare_and_swap_read)
+    TA_assert(!AO_compare_and_swap_read(&x, 14, 42));
+    TA_assert(x == 13);
+    TA_assert(AO_compare_and_swap_read(&x, 13, 42));
+    TA_assert(x == 42);
+# else
+    MISSING(AO_compare_and_swap);
+# endif
+# if defined(AO_HAVE_or_read)
+    AO_or_read(&x, 66);
+    TA_assert(x == 106);
+# else
+    MISSING(AO_or);
+    x |= 34;
+# endif
+# if defined(AO_HAVE_compare_double_and_swap_double_read)
+    TA_assert(!AO_compare_double_and_swap_double_read(&w, 17, 42, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_double_and_swap_double_read(&w, 0, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_double_and_swap_double_read(&w, 12, 13, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+    w.AO_val1 = 0; w.AO_val2 = 0;
+# else
+    MISSING(AO_compare_double_and_swap_double);
+# endif
+# if defined(AO_HAVE_compare_and_swap_double_read)
+    TA_assert(!AO_compare_and_swap_double_read(&w, 17, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_and_swap_double_read(&w, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_and_swap_double_read(&w, 12, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+# else
+    MISSING(AO_compare_and_swap_double);
+# endif
+}
+
+
+    
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* Some basic sanity tests.  These do not test the barrier semantics. */
+
+#undef TA_assert
+#define TA_assert(e) \
+  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: _write)\n", \
+                   __FILE__, __LINE__), exit(1); }
+
+#undef MISSING
+#define MISSING(name) \
+  fprintf(stderr, "Missing: %s\n", #name "_write")
+
+void test_atomic_write(void)
+{
+  AO_t x;
+  unsigned char b;
+  unsigned short s;
+  unsigned int zz;
+# if defined(AO_HAVE_test_and_set_write)
+    AO_TS_t z = AO_TS_INITIALIZER;
+# endif
+# if defined(AO_HAVE_double_t)
+    AO_double_t w;
+    w.AO_val1 = 0;
+    w.AO_val2 = 0;
+# endif
+
+# if defined(AO_HAVE_nop_write)
+    AO_nop_write();
+# else
+    MISSING(AO_nop);
+# endif
+# if defined(AO_HAVE_store_write)
+    AO_store_write(&x, 13);
+    TA_assert (x == 13);
+# else
+    MISSING(AO_store);
+    x = 13;
+# endif
+# if defined(AO_HAVE_load_write)
+    TA_assert(AO_load_write(&x) == 13);
+# else
+    MISSING(AO_load);
+# endif
+# if defined(AO_HAVE_test_and_set_write)
+    assert(AO_test_and_set_write(&z) == AO_TS_CLEAR);
+    assert(AO_test_and_set_write(&z) == AO_TS_SET);
+    assert(AO_test_and_set_write(&z) == AO_TS_SET);
+    AO_CLEAR(&z);
+# else
+    MISSING(AO_test_and_set);
+# endif
+# if defined(AO_HAVE_fetch_and_add_write)
+    TA_assert(AO_fetch_and_add_write(&x, 42) == 13);
+    TA_assert(AO_fetch_and_add_write(&x, -42) == 55);
+# else
+    MISSING(AO_fetch_and_add);
+# endif
+# if defined(AO_HAVE_fetch_and_add1_write)
+    TA_assert(AO_fetch_and_add1_write(&x) == 13);
+# else
+    MISSING(AO_fetch_and_add1);
+    ++x;
+# endif
+# if defined(AO_HAVE_fetch_and_sub1_write)
+    TA_assert(AO_fetch_and_sub1_write(&x) == 14);
+# else
+    MISSING(AO_fetch_and_sub1);
+    --x;
+# endif
+# if defined(AO_HAVE_short_store_write)
+    AO_short_store_write(&s, 13);
+# else
+    MISSING(AO_short_store);
+    s = 13;
+# endif
+# if defined(AO_HAVE_short_load_write)
+    TA_assert(AO_short_load(&s) == 13);
+# else
+    MISSING(AO_short_load);
+# endif
+# if defined(AO_HAVE_short_fetch_and_add_write)
+    TA_assert(AO_short_fetch_and_add_write(&s, 42) == 13);
+    TA_assert(AO_short_fetch_and_add_write(&s, -42) == 55);
+# else
+    MISSING(AO_short_fetch_and_add);
+# endif
+# if defined(AO_HAVE_short_fetch_and_add1_write)
+    TA_assert(AO_short_fetch_and_add1_write(&s) == 13);
+# else
+    MISSING(AO_short_fetch_and_add1);
+    ++s;
+# endif
+# if defined(AO_HAVE_short_fetch_and_sub1_write)
+    TA_assert(AO_short_fetch_and_sub1_write(&s) == 14);
+# else
+    MISSING(AO_short_fetch_and_sub1);
+    --s;
+# endif
+# if defined(AO_HAVE_char_store_write)
+    AO_char_store_write(&b, 13);
+# else
+    MISSING(AO_char_store);
+    b = 13;
+# endif
+# if defined(AO_HAVE_char_load_write)
+    TA_assert(AO_char_load(&b) == 13);
+# else
+    MISSING(AO_char_load);
+# endif
+# if defined(AO_HAVE_char_fetch_and_add_write)
+    TA_assert(AO_char_fetch_and_add_write(&b, 42) == 13);
+    TA_assert(AO_char_fetch_and_add_write(&b, -42) == 55);
+# else
+    MISSING(AO_char_fetch_and_add);
+# endif
+# if defined(AO_HAVE_char_fetch_and_add1_write)
+    TA_assert(AO_char_fetch_and_add1_write(&b) == 13);
+# else
+    MISSING(AO_char_fetch_and_add1);
+    ++b;
+# endif
+# if defined(AO_HAVE_char_fetch_and_sub1_write)
+    TA_assert(AO_char_fetch_and_sub1_write(&b) == 14);
+# else
+    MISSING(AO_char_fetch_and_sub1);
+    --b;
+# endif
+# if defined(AO_HAVE_int_store_write)
+    AO_int_store_write(&zz, 13);
+# else
+    MISSING(AO_int_store);
+    zz = 13;
+# endif
+# if defined(AO_HAVE_int_load_write)
+    TA_assert(AO_int_load(&zz) == 13);
+# else
+    MISSING(AO_int_load);
+# endif
+# if defined(AO_HAVE_int_fetch_and_add_write)
+    TA_assert(AO_int_fetch_and_add_write(&zz, 42) == 13);
+    TA_assert(AO_int_fetch_and_add_write(&zz, -42) == 55);
+# else
+    MISSING(AO_int_fetch_and_add);
+# endif
+# if defined(AO_HAVE_int_fetch_and_add1_write)
+    TA_assert(AO_int_fetch_and_add1_write(&zz) == 13);
+# else
+    MISSING(AO_int_fetch_and_add1);
+    ++zz;
+# endif
+# if defined(AO_HAVE_int_fetch_and_sub1_write)
+    TA_assert(AO_int_fetch_and_sub1_write(&zz) == 14);
+# else
+    MISSING(AO_int_fetch_and_sub1);
+    --zz;
+# endif
+# if defined(AO_HAVE_compare_and_swap_write)
+    TA_assert(!AO_compare_and_swap_write(&x, 14, 42));
+    TA_assert(x == 13);
+    TA_assert(AO_compare_and_swap_write(&x, 13, 42));
+    TA_assert(x == 42);
+# else
+    MISSING(AO_compare_and_swap);
+# endif
+# if defined(AO_HAVE_or_write)
+    AO_or_write(&x, 66);
+    TA_assert(x == 106);
+# else
+    MISSING(AO_or);
+    x |= 34;
+# endif
+# if defined(AO_HAVE_compare_double_and_swap_double_write)
+    TA_assert(!AO_compare_double_and_swap_double_write(&w, 17, 42, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_double_and_swap_double_write(&w, 0, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_double_and_swap_double_write(&w, 12, 13, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+    w.AO_val1 = 0; w.AO_val2 = 0;
+# else
+    MISSING(AO_compare_double_and_swap_double);
+# endif
+# if defined(AO_HAVE_compare_and_swap_double_write)
+    TA_assert(!AO_compare_and_swap_double_write(&w, 17, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_and_swap_double_write(&w, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_and_swap_double_write(&w, 12, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+# else
+    MISSING(AO_compare_and_swap_double);
+# endif
+}
+
+
+    
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* Some basic sanity tests.  These do not test the barrier semantics. */
+
+#undef TA_assert
+#define TA_assert(e) \
+  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: _full)\n", \
+                   __FILE__, __LINE__), exit(1); }
+
+#undef MISSING
+#define MISSING(name) \
+  fprintf(stderr, "Missing: %s\n", #name "_full")
+
+void test_atomic_full(void)
+{
+  AO_t x;
+  unsigned char b;
+  unsigned short s;
+  unsigned int zz;
+# if defined(AO_HAVE_test_and_set_full)
+    AO_TS_t z = AO_TS_INITIALIZER;
+# endif
+# if defined(AO_HAVE_double_t)
+    AO_double_t w;
+    w.AO_val1 = 0;
+    w.AO_val2 = 0;
+# endif
+
+# if defined(AO_HAVE_nop_full)
+    AO_nop_full();
+# else
+    MISSING(AO_nop);
+# endif
+# if defined(AO_HAVE_store_full)
+    AO_store_full(&x, 13);
+    TA_assert (x == 13);
+# else
+    MISSING(AO_store);
+    x = 13;
+# endif
+# if defined(AO_HAVE_load_full)
+    TA_assert(AO_load_full(&x) == 13);
+# else
+    MISSING(AO_load);
+# endif
+# if defined(AO_HAVE_test_and_set_full)
+    assert(AO_test_and_set_full(&z) == AO_TS_CLEAR);
+    assert(AO_test_and_set_full(&z) == AO_TS_SET);
+    assert(AO_test_and_set_full(&z) == AO_TS_SET);
+    AO_CLEAR(&z);
+# else
+    MISSING(AO_test_and_set);
+# endif
+# if defined(AO_HAVE_fetch_and_add_full)
+    TA_assert(AO_fetch_and_add_full(&x, 42) == 13);
+    TA_assert(AO_fetch_and_add_full(&x, -42) == 55);
+# else
+    MISSING(AO_fetch_and_add);
+# endif
+# if defined(AO_HAVE_fetch_and_add1_full)
+    TA_assert(AO_fetch_and_add1_full(&x) == 13);
+# else
+    MISSING(AO_fetch_and_add1);
+    ++x;
+# endif
+# if defined(AO_HAVE_fetch_and_sub1_full)
+    TA_assert(AO_fetch_and_sub1_full(&x) == 14);
+# else
+    MISSING(AO_fetch_and_sub1);
+    --x;
+# endif
+# if defined(AO_HAVE_short_store_full)
+    AO_short_store_full(&s, 13);
+# else
+    MISSING(AO_short_store);
+    s = 13;
+# endif
+# if defined(AO_HAVE_short_load_full)
+    TA_assert(AO_short_load(&s) == 13);
+# else
+    MISSING(AO_short_load);
+# endif
+# if defined(AO_HAVE_short_fetch_and_add_full)
+    TA_assert(AO_short_fetch_and_add_full(&s, 42) == 13);
+    TA_assert(AO_short_fetch_and_add_full(&s, -42) == 55);
+# else
+    MISSING(AO_short_fetch_and_add);
+# endif
+# if defined(AO_HAVE_short_fetch_and_add1_full)
+    TA_assert(AO_short_fetch_and_add1_full(&s) == 13);
+# else
+    MISSING(AO_short_fetch_and_add1);
+    ++s;
+# endif
+# if defined(AO_HAVE_short_fetch_and_sub1_full)
+    TA_assert(AO_short_fetch_and_sub1_full(&s) == 14);
+# else
+    MISSING(AO_short_fetch_and_sub1);
+    --s;
+# endif
+# if defined(AO_HAVE_char_store_full)
+    AO_char_store_full(&b, 13);
+# else
+    MISSING(AO_char_store);
+    b = 13;
+# endif
+# if defined(AO_HAVE_char_load_full)
+    TA_assert(AO_char_load(&b) == 13);
+# else
+    MISSING(AO_char_load);
+# endif
+# if defined(AO_HAVE_char_fetch_and_add_full)
+    TA_assert(AO_char_fetch_and_add_full(&b, 42) == 13);
+    TA_assert(AO_char_fetch_and_add_full(&b, -42) == 55);
+# else
+    MISSING(AO_char_fetch_and_add);
+# endif
+# if defined(AO_HAVE_char_fetch_and_add1_full)
+    TA_assert(AO_char_fetch_and_add1_full(&b) == 13);
+# else
+    MISSING(AO_char_fetch_and_add1);
+    ++b;
+# endif
+# if defined(AO_HAVE_char_fetch_and_sub1_full)
+    TA_assert(AO_char_fetch_and_sub1_full(&b) == 14);
+# else
+    MISSING(AO_char_fetch_and_sub1);
+    --b;
+# endif
+# if defined(AO_HAVE_int_store_full)
+    AO_int_store_full(&zz, 13);
+# else
+    MISSING(AO_int_store);
+    zz = 13;
+# endif
+# if defined(AO_HAVE_int_load_full)
+    TA_assert(AO_int_load(&zz) == 13);
+# else
+    MISSING(AO_int_load);
+# endif
+# if defined(AO_HAVE_int_fetch_and_add_full)
+    TA_assert(AO_int_fetch_and_add_full(&zz, 42) == 13);
+    TA_assert(AO_int_fetch_and_add_full(&zz, -42) == 55);
+# else
+    MISSING(AO_int_fetch_and_add);
+# endif
+# if defined(AO_HAVE_int_fetch_and_add1_full)
+    TA_assert(AO_int_fetch_and_add1_full(&zz) == 13);
+# else
+    MISSING(AO_int_fetch_and_add1);
+    ++zz;
+# endif
+# if defined(AO_HAVE_int_fetch_and_sub1_full)
+    TA_assert(AO_int_fetch_and_sub1_full(&zz) == 14);
+# else
+    MISSING(AO_int_fetch_and_sub1);
+    --zz;
+# endif
+# if defined(AO_HAVE_compare_and_swap_full)
+    TA_assert(!AO_compare_and_swap_full(&x, 14, 42));
+    TA_assert(x == 13);
+    TA_assert(AO_compare_and_swap_full(&x, 13, 42));
+    TA_assert(x == 42);
+# else
+    MISSING(AO_compare_and_swap);
+# endif
+# if defined(AO_HAVE_or_full)
+    AO_or_full(&x, 66);
+    TA_assert(x == 106);
+# else
+    MISSING(AO_or);
+    x |= 34;
+# endif
+# if defined(AO_HAVE_compare_double_and_swap_double_full)
+    TA_assert(!AO_compare_double_and_swap_double_full(&w, 17, 42, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_double_and_swap_double_full(&w, 0, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_double_and_swap_double_full(&w, 12, 13, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+    w.AO_val1 = 0; w.AO_val2 = 0;
+# else
+    MISSING(AO_compare_double_and_swap_double);
+# endif
+# if defined(AO_HAVE_compare_and_swap_double_full)
+    TA_assert(!AO_compare_and_swap_double_full(&w, 17, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_and_swap_double_full(&w, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_and_swap_double_full(&w, 12, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+# else
+    MISSING(AO_compare_and_swap_double);
+# endif
+}
+
+
+    
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* Some basic sanity tests.  These do not test the barrier semantics. */
+
+#undef TA_assert
+#define TA_assert(e) \
+  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: _release_write)\n", \
+                   __FILE__, __LINE__), exit(1); }
+
+#undef MISSING
+#define MISSING(name) \
+  fprintf(stderr, "Missing: %s\n", #name "_release_write")
+
+void test_atomic_release_write(void)
+{
+  AO_t x;
+  unsigned char b;
+  unsigned short s;
+  unsigned int zz;
+# if defined(AO_HAVE_test_and_set_release_write)
+    AO_TS_t z = AO_TS_INITIALIZER;
+# endif
+# if defined(AO_HAVE_double_t)
+    AO_double_t w;
+    w.AO_val1 = 0;
+    w.AO_val2 = 0;
+# endif
+
+# if defined(AO_HAVE_nop_release_write)
+    AO_nop_release_write();
+# else
+    MISSING(AO_nop);
+# endif
+# if defined(AO_HAVE_store_release_write)
+    AO_store_release_write(&x, 13);
+    TA_assert (x == 13);
+# else
+    MISSING(AO_store);
+    x = 13;
+# endif
+# if defined(AO_HAVE_load_release_write)
+    TA_assert(AO_load_release_write(&x) == 13);
+# else
+    MISSING(AO_load);
+# endif
+# if defined(AO_HAVE_test_and_set_release_write)
+    assert(AO_test_and_set_release_write(&z) == AO_TS_CLEAR);
+    assert(AO_test_and_set_release_write(&z) == AO_TS_SET);
+    assert(AO_test_and_set_release_write(&z) == AO_TS_SET);
+    AO_CLEAR(&z);
+# else
+    MISSING(AO_test_and_set);
+# endif
+# if defined(AO_HAVE_fetch_and_add_release_write)
+    TA_assert(AO_fetch_and_add_release_write(&x, 42) == 13);
+    TA_assert(AO_fetch_and_add_release_write(&x, -42) == 55);
+# else
+    MISSING(AO_fetch_and_add);
+# endif
+# if defined(AO_HAVE_fetch_and_add1_release_write)
+    TA_assert(AO_fetch_and_add1_release_write(&x) == 13);
+# else
+    MISSING(AO_fetch_and_add1);
+    ++x;
+# endif
+# if defined(AO_HAVE_fetch_and_sub1_release_write)
+    TA_assert(AO_fetch_and_sub1_release_write(&x) == 14);
+# else
+    MISSING(AO_fetch_and_sub1);
+    --x;
+# endif
+# if defined(AO_HAVE_short_store_release_write)
+    AO_short_store_release_write(&s, 13);
+# else
+    MISSING(AO_short_store);
+    s = 13;
+# endif
+# if defined(AO_HAVE_short_load_release_write)
+    TA_assert(AO_short_load(&s) == 13);
+# else
+    MISSING(AO_short_load);
+# endif
+# if defined(AO_HAVE_short_fetch_and_add_release_write)
+    TA_assert(AO_short_fetch_and_add_release_write(&s, 42) == 13);
+    TA_assert(AO_short_fetch_and_add_release_write(&s, -42) == 55);
+# else
+    MISSING(AO_short_fetch_and_add);
+# endif
+# if defined(AO_HAVE_short_fetch_and_add1_release_write)
+    TA_assert(AO_short_fetch_and_add1_release_write(&s) == 13);
+# else
+    MISSING(AO_short_fetch_and_add1);
+    ++s;
+# endif
+# if defined(AO_HAVE_short_fetch_and_sub1_release_write)
+    TA_assert(AO_short_fetch_and_sub1_release_write(&s) == 14);
+# else
+    MISSING(AO_short_fetch_and_sub1);
+    --s;
+# endif
+# if defined(AO_HAVE_char_store_release_write)
+    AO_char_store_release_write(&b, 13);
+# else
+    MISSING(AO_char_store);
+    b = 13;
+# endif
+# if defined(AO_HAVE_char_load_release_write)
+    TA_assert(AO_char_load(&b) == 13);
+# else
+    MISSING(AO_char_load);
+# endif
+# if defined(AO_HAVE_char_fetch_and_add_release_write)
+    TA_assert(AO_char_fetch_and_add_release_write(&b, 42) == 13);
+    TA_assert(AO_char_fetch_and_add_release_write(&b, -42) == 55);
+# else
+    MISSING(AO_char_fetch_and_add);
+# endif
+# if defined(AO_HAVE_char_fetch_and_add1_release_write)
+    TA_assert(AO_char_fetch_and_add1_release_write(&b) == 13);
+# else
+    MISSING(AO_char_fetch_and_add1);
+    ++b;
+# endif
+# if defined(AO_HAVE_char_fetch_and_sub1_release_write)
+    TA_assert(AO_char_fetch_and_sub1_release_write(&b) == 14);
+# else
+    MISSING(AO_char_fetch_and_sub1);
+    --b;
+# endif
+# if defined(AO_HAVE_int_store_release_write)
+    AO_int_store_release_write(&zz, 13);
+# else
+    MISSING(AO_int_store);
+    zz = 13;
+# endif
+# if defined(AO_HAVE_int_load_release_write)
+    TA_assert(AO_int_load(&zz) == 13);
+# else
+    MISSING(AO_int_load);
+# endif
+# if defined(AO_HAVE_int_fetch_and_add_release_write)
+    TA_assert(AO_int_fetch_and_add_release_write(&zz, 42) == 13);
+    TA_assert(AO_int_fetch_and_add_release_write(&zz, -42) == 55);
+# else
+    MISSING(AO_int_fetch_and_add);
+# endif
+# if defined(AO_HAVE_int_fetch_and_add1_release_write)
+    TA_assert(AO_int_fetch_and_add1_release_write(&zz) == 13);
+# else
+    MISSING(AO_int_fetch_and_add1);
+    ++zz;
+# endif
+# if defined(AO_HAVE_int_fetch_and_sub1_release_write)
+    TA_assert(AO_int_fetch_and_sub1_release_write(&zz) == 14);
+# else
+    MISSING(AO_int_fetch_and_sub1);
+    --zz;
+# endif
+# if defined(AO_HAVE_compare_and_swap_release_write)
+    TA_assert(!AO_compare_and_swap_release_write(&x, 14, 42));
+    TA_assert(x == 13);
+    TA_assert(AO_compare_and_swap_release_write(&x, 13, 42));
+    TA_assert(x == 42);
+# else
+    MISSING(AO_compare_and_swap);
+# endif
+# if defined(AO_HAVE_or_release_write)
+    AO_or_release_write(&x, 66);
+    TA_assert(x == 106);
+# else
+    MISSING(AO_or);
+    x |= 34;
+# endif
+# if defined(AO_HAVE_compare_double_and_swap_double_release_write)
+    TA_assert(!AO_compare_double_and_swap_double_release_write(&w, 17, 42, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_double_and_swap_double_release_write(&w, 0, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_double_and_swap_double_release_write(&w, 12, 13, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+    w.AO_val1 = 0; w.AO_val2 = 0;
+# else
+    MISSING(AO_compare_double_and_swap_double);
+# endif
+# if defined(AO_HAVE_compare_and_swap_double_release_write)
+    TA_assert(!AO_compare_and_swap_double_release_write(&w, 17, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_and_swap_double_release_write(&w, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_and_swap_double_release_write(&w, 12, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+# else
+    MISSING(AO_compare_and_swap_double);
+# endif
+}
+
+
+    
+/*
+ * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
+ *
+ * This file is covered by the GNU general public license, version 2.
+ * see doc/COPYING for details.
+ */
+
+/* Some basic sanity tests.  These do not test the barrier semantics. */
+
+#undef TA_assert
+#define TA_assert(e) \
+  if (!(e)) { fprintf(stderr, "Assertion failed %s:%d (barrier: _acquire_read)\n", \
+                   __FILE__, __LINE__), exit(1); }
+
+#undef MISSING
+#define MISSING(name) \
+  fprintf(stderr, "Missing: %s\n", #name "_acquire_read")
+
+void test_atomic_acquire_read(void)
+{
+  AO_t x;
+  unsigned char b;
+  unsigned short s;
+  unsigned int zz;
+# if defined(AO_HAVE_test_and_set_acquire_read)
+    AO_TS_t z = AO_TS_INITIALIZER;
+# endif
+# if defined(AO_HAVE_double_t)
+    AO_double_t w;
+    w.AO_val1 = 0;
+    w.AO_val2 = 0;
+# endif
+
+# if defined(AO_HAVE_nop_acquire_read)
+    AO_nop_acquire_read();
+# else
+    MISSING(AO_nop);
+# endif
+# if defined(AO_HAVE_store_acquire_read)
+    AO_store_acquire_read(&x, 13);
+    TA_assert (x == 13);
+# else
+    MISSING(AO_store);
+    x = 13;
+# endif
+# if defined(AO_HAVE_load_acquire_read)
+    TA_assert(AO_load_acquire_read(&x) == 13);
+# else
+    MISSING(AO_load);
+# endif
+# if defined(AO_HAVE_test_and_set_acquire_read)
+    assert(AO_test_and_set_acquire_read(&z) == AO_TS_CLEAR);
+    assert(AO_test_and_set_acquire_read(&z) == AO_TS_SET);
+    assert(AO_test_and_set_acquire_read(&z) == AO_TS_SET);
+    AO_CLEAR(&z);
+# else
+    MISSING(AO_test_and_set);
+# endif
+# if defined(AO_HAVE_fetch_and_add_acquire_read)
+    TA_assert(AO_fetch_and_add_acquire_read(&x, 42) == 13);
+    TA_assert(AO_fetch_and_add_acquire_read(&x, -42) == 55);
+# else
+    MISSING(AO_fetch_and_add);
+# endif
+# if defined(AO_HAVE_fetch_and_add1_acquire_read)
+    TA_assert(AO_fetch_and_add1_acquire_read(&x) == 13);
+# else
+    MISSING(AO_fetch_and_add1);
+    ++x;
+# endif
+# if defined(AO_HAVE_fetch_and_sub1_acquire_read)
+    TA_assert(AO_fetch_and_sub1_acquire_read(&x) == 14);
+# else
+    MISSING(AO_fetch_and_sub1);
+    --x;
+# endif
+# if defined(AO_HAVE_short_store_acquire_read)
+    AO_short_store_acquire_read(&s, 13);
+# else
+    MISSING(AO_short_store);
+    s = 13;
+# endif
+# if defined(AO_HAVE_short_load_acquire_read)
+    TA_assert(AO_short_load(&s) == 13);
+# else
+    MISSING(AO_short_load);
+# endif
+# if defined(AO_HAVE_short_fetch_and_add_acquire_read)
+    TA_assert(AO_short_fetch_and_add_acquire_read(&s, 42) == 13);
+    TA_assert(AO_short_fetch_and_add_acquire_read(&s, -42) == 55);
+# else
+    MISSING(AO_short_fetch_and_add);
+# endif
+# if defined(AO_HAVE_short_fetch_and_add1_acquire_read)
+    TA_assert(AO_short_fetch_and_add1_acquire_read(&s) == 13);
+# else
+    MISSING(AO_short_fetch_and_add1);
+    ++s;
+# endif
+# if defined(AO_HAVE_short_fetch_and_sub1_acquire_read)
+    TA_assert(AO_short_fetch_and_sub1_acquire_read(&s) == 14);
+# else
+    MISSING(AO_short_fetch_and_sub1);
+    --s;
+# endif
+# if defined(AO_HAVE_char_store_acquire_read)
+    AO_char_store_acquire_read(&b, 13);
+# else
+    MISSING(AO_char_store);
+    b = 13;
+# endif
+# if defined(AO_HAVE_char_load_acquire_read)
+    TA_assert(AO_char_load(&b) == 13);
+# else
+    MISSING(AO_char_load);
+# endif
+# if defined(AO_HAVE_char_fetch_and_add_acquire_read)
+    TA_assert(AO_char_fetch_and_add_acquire_read(&b, 42) == 13);
+    TA_assert(AO_char_fetch_and_add_acquire_read(&b, -42) == 55);
+# else
+    MISSING(AO_char_fetch_and_add);
+# endif
+# if defined(AO_HAVE_char_fetch_and_add1_acquire_read)
+    TA_assert(AO_char_fetch_and_add1_acquire_read(&b) == 13);
+# else
+    MISSING(AO_char_fetch_and_add1);
+    ++b;
+# endif
+# if defined(AO_HAVE_char_fetch_and_sub1_acquire_read)
+    TA_assert(AO_char_fetch_and_sub1_acquire_read(&b) == 14);
+# else
+    MISSING(AO_char_fetch_and_sub1);
+    --b;
+# endif
+# if defined(AO_HAVE_int_store_acquire_read)
+    AO_int_store_acquire_read(&zz, 13);
+# else
+    MISSING(AO_int_store);
+    zz = 13;
+# endif
+# if defined(AO_HAVE_int_load_acquire_read)
+    TA_assert(AO_int_load(&zz) == 13);
+# else
+    MISSING(AO_int_load);
+# endif
+# if defined(AO_HAVE_int_fetch_and_add_acquire_read)
+    TA_assert(AO_int_fetch_and_add_acquire_read(&zz, 42) == 13);
+    TA_assert(AO_int_fetch_and_add_acquire_read(&zz, -42) == 55);
+# else
+    MISSING(AO_int_fetch_and_add);
+# endif
+# if defined(AO_HAVE_int_fetch_and_add1_acquire_read)
+    TA_assert(AO_int_fetch_and_add1_acquire_read(&zz) == 13);
+# else
+    MISSING(AO_int_fetch_and_add1);
+    ++zz;
+# endif
+# if defined(AO_HAVE_int_fetch_and_sub1_acquire_read)
+    TA_assert(AO_int_fetch_and_sub1_acquire_read(&zz) == 14);
+# else
+    MISSING(AO_int_fetch_and_sub1);
+    --zz;
+# endif
+# if defined(AO_HAVE_compare_and_swap_acquire_read)
+    TA_assert(!AO_compare_and_swap_acquire_read(&x, 14, 42));
+    TA_assert(x == 13);
+    TA_assert(AO_compare_and_swap_acquire_read(&x, 13, 42));
+    TA_assert(x == 42);
+# else
+    MISSING(AO_compare_and_swap);
+# endif
+# if defined(AO_HAVE_or_acquire_read)
+    AO_or_acquire_read(&x, 66);
+    TA_assert(x == 106);
+# else
+    MISSING(AO_or);
+    x |= 34;
+# endif
+# if defined(AO_HAVE_compare_double_and_swap_double_acquire_read)
+    TA_assert(!AO_compare_double_and_swap_double_acquire_read(&w, 17, 42, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_double_and_swap_double_acquire_read(&w, 0, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_double_and_swap_double_acquire_read(&w, 12, 13, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+    w.AO_val1 = 0; w.AO_val2 = 0;
+# else
+    MISSING(AO_compare_double_and_swap_double);
+# endif
+# if defined(AO_HAVE_compare_and_swap_double_acquire_read)
+    TA_assert(!AO_compare_and_swap_double_acquire_read(&w, 17, 12, 13));
+    TA_assert(w.AO_val1 == 0 && w.AO_val2 == 0);
+    TA_assert(AO_compare_and_swap_double_acquire_read(&w, 0, 12, 13));
+    TA_assert(w.AO_val1 == 12 && w.AO_val2 == 13);
+    TA_assert(AO_compare_and_swap_double_acquire_read(&w, 12, 17, 42));
+    TA_assert(w.AO_val1 == 17 && w.AO_val2 == 42);
+# else
+    MISSING(AO_compare_and_swap_double);
+# endif
+}
+
+
+    
diff --git a/src/mm/boehm-gc/libatomic_ops/tests/test_malloc.c b/src/mm/boehm-gc/libatomic_ops/tests/test_malloc.c
new file mode 100644 (file)
index 0000000..4026e62
--- /dev/null
@@ -0,0 +1,182 @@
+/*  
+ * Copyright (c) 2005 Hewlett-Packard Development Company, L.P.
+ * Original Author: Hans Boehm
+ *
+ * This file may be redistributed and/or modified under the
+ * terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2, or (at your option) any later version.
+ * 
+ * It is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License in the
+ * file doc/COPYING for more details.
+ */
+
+#if defined(HAVE_CONFIG_H)
+# include "config.h"
+#endif
+
+#include "run_parallel.inc"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "atomic_ops_malloc.h"
+#define MAX_NTHREADS 100
+#define N_REVERSALS 1000 /* must be even */
+#define LENGTH 1000
+
+#ifdef USE_STANDARD_MALLOC
+# define AO_malloc(n) malloc(n)
+# define AO_free(p) free(p)
+# define AO_malloc_enable_mmap() 
+#endif
+
+typedef struct list_node {
+       struct list_node *next;
+       int data;
+} ln;
+
+ln *cons(int d, ln *tail)
+{
+  static size_t extra = 0;
+  size_t my_extra = extra;
+  ln *result;
+  int * extras;
+  int i;
+
+  if (my_extra > 100) 
+    extra = my_extra = 0;
+  else
+    ++extra;
+  result = AO_malloc(sizeof(ln) + sizeof(int)*my_extra);
+  if (result == 0)
+    {
+      fprintf(stderr, "Out of memory\n");
+       /* Normal for more than about 10 threads without mmap? */
+      abort();
+    }
+
+  result -> data = d;
+  result -> next = tail;
+  extras = (int *)(result+1);
+  for (i = 0; i < my_extra; ++i) extras[i] = 42;
+  return result;
+}
+
+void print_list(ln *l)
+{
+  ln *p;
+
+  for (p = l; p != 0; p = p -> next)
+    {
+      fprintf(stderr, "%d, ", p -> data);
+    }
+  fprintf(stderr, "\n");
+}
+
+/* Check that l contains numbers from m to n inclusive in ascending order */
+void check_list(ln *l, int m, int n)
+{
+  ln *p;
+  int i;
+
+  for (p = l, i = m; p != 0; p = p -> next, ++i)
+    {
+      if (i != p -> data)
+       {
+         fprintf(stderr, "Found %d, expected %d\n", p -> data, i);
+         abort();
+       }
+    }
+}
+
+/* Create a list of integers from m to n */
+ln *
+make_list(int m, int n)
+{
+  if (m > n) return 0;
+  return cons(m, make_list(m+1, n));
+}
+
+/* Reverse list x, and concatenate it to y, deallocating no longer needed */
+/* nodes in x.                                                           */
+ln *
+reverse(ln *x, ln *y)
+{
+  ln * result;
+
+  if (x == 0) return y;
+  result = reverse(x -> next, cons(x -> data, y));
+  AO_free(x);
+  return result;
+}
+
+int dummy_test(void) { return 1; }
+
+#define LARGE 200000
+
+void * run_one_test(void * arg) {
+  ln * x = make_list(1, LENGTH);
+  int i;
+  char *p = AO_malloc(LARGE);
+  char *q;
+
+  if (0 == p) {
+    fprintf(stderr, "AO_malloc(%d) failed: This is normal without mmap\n",
+           LARGE);
+    AO_free(p);
+  } else {
+    p[0] = p[LARGE/2] = p[LARGE-1] = 'a';
+    q = AO_malloc(LARGE);
+    q[0] = q[LARGE/2] = q[LARGE-1] = 'b';
+    if (p[0] != 'a' || p[LARGE/2] != 'a' || p[LARGE-1] != 'a') {
+      fprintf(stderr, "First large allocation smashed\n");
+      abort();
+    }
+    AO_free(p);
+    if (q[0] != 'b' || q[LARGE/2] != 'b' || q[LARGE-1] != 'b') {
+      fprintf(stderr, "Second large allocation smashed\n");
+      abort();
+    }
+    AO_free(q);
+  }
+# if 0 /* enable for debugging */
+    x = reverse(x, 0);
+    print_list(x);
+    x = reverse(x, 0);
+    print_list(x);
+# endif
+  for (i = 0; i < N_REVERSALS; ++i) {
+    x = reverse(x, 0);
+  }
+  check_list(x, 1, LENGTH);
+  return 0;
+}
+
+int main(int argc, char **argv) {
+    int nthreads;
+    int exper_n;
+
+    if (1 == argc) {
+#     if !defined(HAVE_MMAP)
+       nthreads = 3;
+#     else
+        nthreads = 10;
+#     endif
+    } else if (2 == argc) {
+      nthreads = atoi(argv[1]);
+      if (nthreads < 1 || nthreads > MAX_NTHREADS) {
+       fprintf(stderr, "Invalid # of threads argument\n");
+       exit(1);
+      }
+    } else {
+      fprintf(stderr, "Usage: %s [# of threads]\n", argv[0]);
+      exit(1);
+    }
+    printf("Performing %d reversals of %d element lists in %d threads\n",
+          N_REVERSALS, LENGTH, nthreads);
+    AO_malloc_enable_mmap();
+    run_parallel(nthreads, run_one_test, dummy_test, "AO_malloc/AO_free");
+    return 0;
+}
+
diff --git a/src/mm/boehm-gc/libatomic_ops/tests/test_stack.c b/src/mm/boehm-gc/libatomic_ops/tests/test_stack.c
new file mode 100644 (file)
index 0000000..8a8ba50
--- /dev/null
@@ -0,0 +1,232 @@
+/*  
+ * Copyright (c) 2005 Hewlett-Packard Development Company, L.P.
+ * Original Author: Hans Boehm
+ *
+ * This file may be redistributed and/or modified under the
+ * terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2, or (at your option) any later version.
+ * 
+ * It is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License in the
+ * file doc/COPYING for more details.
+ */
+
+#if defined(HAVE_CONFIG_H)
+# include "config.h"
+#endif
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "atomic_ops.h"
+#include "atomic_ops_stack.h"
+#define MAX_NTHREADS 100
+
+#ifndef NO_TIMES
+#include <time.h>
+#include <sys/time.h>
+/* Need 64-bit long long support */
+long long
+get_msecs(void)
+{
+  struct timeval tv;
+
+  gettimeofday(&tv, 0);
+  return (long long)tv.tv_sec * 1000 + tv.tv_usec/1000;
+}
+#else
+# define get_msecs() 0
+#endif
+
+typedef struct le {
+    AO_t next;
+    int data;
+} list_element;
+
+AO_stack_t the_list = AO_STACK_INITIALIZER;
+
+void add_elements(int n)
+{
+  list_element * le;
+  if (n == 0) return;
+  add_elements(n-1);
+  le = malloc(sizeof(list_element));
+  le -> data = n;
+  AO_stack_push(&the_list, (AO_t *)le);
+}
+
+void print_list()
+{
+  list_element *p;
+
+  for (p = (list_element *)AO_REAL_HEAD_PTR(the_list);
+       p != 0;
+       p = (list_element *)AO_REAL_NEXT_PTR(p -> next))
+    printf("%d\n", p -> data);
+}
+
+static char marks[MAX_NTHREADS * MAX_NTHREADS];
+
+void check_list(int n)
+{
+  list_element *p;
+  int i;
+
+  for (i = 1; i <= n; ++i) marks[i] = 0;
+  for (p = (list_element *)AO_REAL_HEAD_PTR(the_list);
+       p != 0;
+       p = (list_element *)AO_REAL_NEXT_PTR(p -> next))
+    {
+      if (p -> data > n || p -> data <= 0)
+        fprintf(stderr, "Found erroneous list element %d\n", p -> data);
+      if (marks[p -> data] != 0)
+        fprintf(stderr, "Found duplicate list element %d\n", p -> data);
+      marks[p -> data] = 1;
+    }
+  for (i = 1; i <= n; ++i)
+    if (marks[i] != 1)
+      fprintf(stderr, "Missing list element %d\n", i);
+}
+     
+volatile AO_t ops_performed = 0;
+
+#define LIMIT 1000000
+       /* Total number of push/pop ops in all threads per test. */
+
+#ifdef AO_HAVE_fetch_and_add
+# define fetch_and_add(addr, val) AO_fetch_and_add(addr, val)
+#else
+  /* Fake it.  This is really quite unacceptable for timing    */
+  /* purposes.  But as a correctness test, it should be OK.    */
+  AO_INLINE AO_t fetch_and_add(volatile AO_t * addr, AO_t val)
+  {
+    AO_t result = AO_load(addr);
+    AO_store(addr, result + val);
+    return result;
+  }
+#endif
+
+void * run_one_test(void * arg)
+{
+  list_element * t[MAX_NTHREADS + 1];
+  list_element * aux; 
+  long index = (long)arg;
+  int i;
+  int j = 0;
+
+# ifdef VERBOSE
+    printf("starting thread %d\n", index);
+# endif
+  while (fetch_and_add(&ops_performed, index + 1) + index + 1 < LIMIT)
+    {
+      for (i = 0; i < index + 1; ++i)
+        {
+          t[i] = (list_element *)AO_stack_pop(&the_list);
+          if (0 == t[i])
+           {
+              fprintf(stderr, "FAILED\n");
+              abort();
+            }
+        }
+      for (i = 0; i < index + 1; ++i)
+        {
+          AO_stack_push(&the_list, (AO_t *)t[i]);
+        }
+      j += (index + 1);
+    }
+# ifdef VERBOSE
+    printf("finished thread %d: %d total ops\n", index, j);
+# endif
+  return 0;
+}
+
+#define N_EXPERIMENTS 1
+
+unsigned long times[MAX_NTHREADS + 1][N_EXPERIMENTS];
+
+int main(int argc, char **argv)
+{
+  int nthreads;
+  int max_nthreads;
+  int exper_n;
+
+  if (1 == argc)
+    max_nthreads = 4;
+  else if (2 == argc)
+    {
+      max_nthreads = atoi(argv[1]);
+      if (max_nthreads < 1 || max_nthreads > MAX_NTHREADS)
+        {
+         fprintf(stderr, "Invalid max # of threads argument\n");
+         exit(1);
+        }
+    }
+  else
+    {
+      fprintf(stderr, "Usage: %s [max # of threads]\n", argv[0]);
+      exit(1);
+    }
+  for (exper_n = 0; exper_n < N_EXPERIMENTS; ++ exper_n)
+    for (nthreads = 1; nthreads <= max_nthreads; ++nthreads)
+      {
+        int i;
+        pthread_t thread[MAX_NTHREADS];
+        int list_length = nthreads*(nthreads+1)/2;
+        long long start_time;
+  
+        add_elements(list_length);
+  #     ifdef VERBOSE
+          printf("Initial list (nthreads = %d):\n", nthreads);
+          print_list();
+  #     endif
+        ops_performed = 0;
+        start_time = get_msecs();
+        for (i = 1; i < nthreads; ++i) {
+       int code;
+  
+          if ((code = pthread_create(thread+i, 0, run_one_test,
+           (void *)(long)i)) != 0) {
+             fprintf(stderr, "Thread creation failed %u\n", code);
+            exit(1);
+          }
+        }
+        /* We use the main thread to run one test.  This allows gprof  */
+        /* profiling to work, for example.                             */
+          run_one_test(0);
+        for (i = 1; i < nthreads; ++i) {
+         int code;
+          if ((code = pthread_join(thread[i], 0)) != 0) {
+           fprintf(stderr, "Thread join failed %u\n", code);
+          }
+        }
+        times[nthreads][exper_n] = (unsigned long)(get_msecs() - start_time);
+  #     ifdef VERBOSE
+          printf("%d %lu\n", nthreads,
+                            (unsigned long)(get_msecs() - start_time));
+          printf("final list (should be reordered initial list):\n");
+          print_list();
+  #     endif
+        check_list(list_length);
+        while ((list_element *)AO_stack_pop(&the_list));
+      }
+# ifndef NO_TIMES
+    for (nthreads = 1; nthreads <= max_nthreads; ++nthreads)
+      {
+        unsigned long sum = 0;
+
+        printf("About %d pushes + %d pops in %d threads:",
+               LIMIT, LIMIT, nthreads);
+        for (exper_n = 0; exper_n < N_EXPERIMENTS; ++exper_n)
+         {
+#           if defined(VERBOSE)
+             printf("[%lu] ", times[nthreads][exper_n]);
+#          endif
+           sum += times[nthreads][exper_n];
+          }
+        printf(" %lu msecs\n", (sum + N_EXPERIMENTS/2)/N_EXPERIMENTS);
+      }
+# endif /* NO_TIMES */
+  return 0;
+}
+
diff --git a/src/mm/boehm-gc/libtool.m4 b/src/mm/boehm-gc/libtool.m4
deleted file mode 100644 (file)
index 0f53cb5..0000000
+++ /dev/null
@@ -1,6397 +0,0 @@
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
-## Free Software Foundation, Inc.
-## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-##
-## This file is free software; the Free Software Foundation gives
-## unlimited permission to copy and/or distribute it, with or without
-## modifications, as long as this notice is preserved.
-
-# serial 48 AC_PROG_LIBTOOL
-
-
-# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
-# -----------------------------------------------------------
-# If this macro is not defined by Autoconf, define it here.
-m4_ifdef([AC_PROVIDE_IFELSE],
-         [],
-         [m4_define([AC_PROVIDE_IFELSE],
-                [m4_ifdef([AC_PROVIDE_$1],
-                          [$2], [$3])])])
-
-
-# AC_PROG_LIBTOOL
-# ---------------
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
-  AC_PROVIDE_IFELSE([AC_PROG_CXX],
-    [AC_LIBTOOL_CXX],
-    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
-  ])])
-dnl And a similar setup for Fortran 77 support
-  AC_PROVIDE_IFELSE([AC_PROG_F77],
-    [AC_LIBTOOL_F77],
-    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
-])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
-  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
-    [AC_LIBTOOL_GCJ],
-    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
-      [AC_LIBTOOL_GCJ],
-      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
-       [AC_LIBTOOL_GCJ],
-      [ifdef([AC_PROG_GCJ],
-            [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
-       ifdef([A][M_PROG_GCJ],
-            [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
-       ifdef([LT_AC_PROG_GCJ],
-            [define([LT_AC_PROG_GCJ],
-               defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
-])])# AC_PROG_LIBTOOL
-
-
-# _AC_PROG_LIBTOOL
-# ----------------
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Prevent multiple expansion
-define([AC_PROG_LIBTOOL], [])
-])# _AC_PROG_LIBTOOL
-
-
-# AC_LIBTOOL_SETUP
-# ----------------
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.50)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-
-AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-dnl
-
-AC_LIBTOOL_SYS_MAX_CMD_LEN
-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-AC_LIBTOOL_OBJDIR
-
-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-_LT_AC_PROG_ECHO_BACKSLASH
-
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
-
-# Same as above, but do not quote variable references.
-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Constants:
-rm="rm -f"
-
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-AC_CHECK_TOOL(AR, ar, false)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$SED" && SED=sed
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$ac_objext" && ac_objext=o
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
-    ;;
-  *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    AC_PATH_MAGIC
-  fi
-  ;;
-esac
-
-AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
-enable_win32_dll=yes, enable_win32_dll=no)
-
-AC_ARG_ENABLE([libtool-lock],
-    [AC_HELP_STRING([--disable-libtool-lock],
-       [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-AC_ARG_WITH([pic],
-    [AC_HELP_STRING([--with-pic],
-       [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
-    [pic_mode=default])
-test -z "$pic_mode" && pic_mode=default
-
-# Use C for the default configuration in the libtool script
-tagname=
-AC_LIBTOOL_LANG_C_CONFIG
-_LT_AC_TAGCONFIG
-])# AC_LIBTOOL_SETUP
-
-
-# _LT_AC_SYS_COMPILER
-# -------------------
-AC_DEFUN([_LT_AC_SYS_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_AC_SYS_COMPILER
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
-AC_DEFUN([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
-  case $cc_temp in
-    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
-    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-])
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-AC_DEFUN([_LT_COMPILER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-AC_DEFUN([_LT_LINKER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
-])# _LT_LINKER_BOILERPLATE
-
-
-# _LT_AC_SYS_LIBPATH_AIX
-# ----------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_AC_SYS_LIBPATH_AIX
-
-
-# _LT_AC_SHELL_INIT(ARG)
-# ----------------------
-AC_DEFUN([_LT_AC_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
-            [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
-        [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_AC_SHELL_INIT
-
-
-# _LT_AC_PROG_ECHO_BACKSLASH
-# --------------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
-[_LT_AC_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
-  ;;
-esac
-
-echo=${ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X[$]1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell.
-  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-[$]*
-EOF
-  exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$ECHO"; then
-if test "X${echo_test_string+set}" != Xset; then
-# find a string as large as possible, as long as the shell can cope with it
-  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
-    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
-       echo_test_string=`eval $cmd` &&
-       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
-    then
-      break
-    fi
-  done
-fi
-
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-   test "X$echo_testing_string" = "X$echo_test_string"; then
-  :
-else
-  # The Solaris, AIX, and Digital Unix default echo programs unquote
-  # backslashes.  This makes it impossible to quote backslashes using
-  #   echo "$something" | sed 's/\\/\\\\/g'
-  #
-  # So, first we look for a working echo in the user's PATH.
-
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for dir in $PATH /usr/ucb; do
-    IFS="$lt_save_ifs"
-    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      echo="$dir/echo"
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-
-  if test "X$echo" = Xecho; then
-    # We didn't find a better echo, so look for alternatives.
-    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      # This shell has a builtin print -r that does the trick.
-      echo='print -r'
-    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
-        test "X$CONFIG_SHELL" != X/bin/ksh; then
-      # If we have ksh, try running configure again with it.
-      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-      export ORIGINAL_CONFIG_SHELL
-      CONFIG_SHELL=/bin/ksh
-      export CONFIG_SHELL
-      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
-    else
-      # Try using printf.
-      echo='printf %s\n'
-      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-        echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-        test "X$echo_testing_string" = "X$echo_test_string"; then
-       # Cool, printf works
-       :
-      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-          test "X$echo_testing_string" = 'X\t' &&
-          echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-          test "X$echo_testing_string" = "X$echo_test_string"; then
-       CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-       export CONFIG_SHELL
-       SHELL="$CONFIG_SHELL"
-       export SHELL
-       echo="$CONFIG_SHELL [$]0 --fallback-echo"
-      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-          test "X$echo_testing_string" = 'X\t' &&
-          echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-          test "X$echo_testing_string" = "X$echo_test_string"; then
-       echo="$CONFIG_SHELL [$]0 --fallback-echo"
-      else
-       # maybe with a smaller string...
-       prev=:
-
-       for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
-         if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
-         then
-           break
-         fi
-         prev="$cmd"
-       done
-
-       if test "$prev" != 'sed 50q "[$]0"'; then
-         echo_test_string=`eval $prev`
-         export echo_test_string
-         exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
-       else
-         # Oops.  We lost completely, so just stick with echo.
-         echo=echo
-       fi
-      fi
-    fi
-  fi
-fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
-   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-
-AC_SUBST(ECHO)
-])])# _LT_AC_PROG_ECHO_BACKSLASH
-
-
-# _LT_AC_LOCK
-# -----------
-AC_DEFUN([_LT_AC_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
-    [AC_HELP_STRING([--disable-libtool-lock],
-       [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *ELF-32*)
-      HPUX_IA64_MODE="32"
-      ;;
-    *ELF-64*)
-      HPUX_IA64_MODE="64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-   if test "$lt_cv_prog_gnu_ld" = yes; then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -melf32bsmip"
-      ;;
-    *N32*)
-      LD="${LD-ld} -melf32bmipn32"
-      ;;
-    *64-bit*)
-      LD="${LD-ld} -melf64bmip"
-      ;;
-    esac
-   else
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -32"
-      ;;
-    *N32*)
-      LD="${LD-ld} -n32"
-      ;;
-    *64-bit*)
-      LD="${LD-ld} -64"
-      ;;
-    esac
-   fi
-  fi
-  rm -rf conftest*
-  ;;
-
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
-    *32-bit*)
-      case $host in
-        x86_64-*linux*)
-          LD="${LD-ld} -m elf_i386"
-          ;;
-        ppc64-*linux*|powerpc64-*linux*)
-          LD="${LD-ld} -m elf32ppclinux"
-          ;;
-        s390x-*linux*)
-          LD="${LD-ld} -m elf_s390"
-          ;;
-        sparc64-*linux*)
-          LD="${LD-ld} -m elf32_sparc"
-          ;;
-      esac
-      ;;
-    *64-bit*)
-      case $host in
-        x86_64-*linux*)
-          LD="${LD-ld} -m elf_x86_64"
-          ;;
-        ppc*-*linux*|powerpc*-*linux*)
-          LD="${LD-ld} -m elf64ppc"
-          ;;
-        s390*-*linux*)
-          LD="${LD-ld} -m elf64_s390"
-          ;;
-        sparc*-*linux*)
-          LD="${LD-ld} -m elf64_sparc"
-          ;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
-    [AC_LANG_PUSH(C)
-     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
-     AC_LANG_POP])
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
-  ;;
-sparc*-*solaris*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
-    *64-bit*)
-      case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
-      *)    LD="${LD-ld} -64" ;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-
-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-  AC_CHECK_TOOL(AS, as, false)
-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
-  ;;
-  ])
-esac
-
-need_locks="$enable_libtool_lock"
-
-])# _LT_AC_LOCK
-
-
-# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#              [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
-[AC_REQUIRE([LT_AC_PROG_SED])
-AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$3"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       $2=yes
-     fi
-   fi
-   $rm conftest*
-])
-
-if test x"[$]$2" = xyes; then
-    ifelse([$5], , :, [$5])
-else
-    ifelse([$6], , :, [$6])
-fi
-])# AC_LIBTOOL_COMPILER_OPTION
-
-
-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#                          [ACTION-SUCCESS], [ACTION-FAILURE])
-# ------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
-[AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $3"
-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&AS_MESSAGE_LOG_FD
-       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         $2=yes
-       fi
-     else
-       $2=yes
-     fi
-   fi
-   $rm conftest*
-   LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
-    ifelse([$4], , :, [$4])
-else
-    ifelse([$5], , :, [$5])
-fi
-])# AC_LIBTOOL_LINKER_OPTION
-
-
-# AC_LIBTOOL_SYS_MAX_CMD_LEN
-# --------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
-[# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
-  i=0
-  teststring="ABCD"
-
-  case $build_os in
-  msdosdjgpp*)
-    # On DJGPP, this test can blow up pretty badly due to problems in libc
-    # (any single argument exceeding 2000 bytes causes a buffer overrun
-    # during glob expansion).  Even if it were fixed, the result of this
-    # check would be larger than it should be.
-    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-    ;;
-
-  gnu*)
-    # Under GNU Hurd, this test is not required because there is
-    # no limit to the length of command line arguments.
-    # Libtool will interpret -1 as no limit whatsoever
-    lt_cv_sys_max_cmd_len=-1;
-    ;;
-
-  cygwin* | mingw*)
-    # On Win9x/ME, this test blows up -- it succeeds, but takes
-    # about 5 minutes as the teststring grows exponentially.
-    # Worse, since 9x/ME are not pre-emptively multitasking,
-    # you end up with a "frozen" computer, even though with patience
-    # the test eventually succeeds (with a max line length of 256k).
-    # Instead, let's just punt: use the minimum linelength reported by
-    # all of the supported platforms: 8192 (on NT/2K/XP).
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  amigaos*)
-    # On AmigaOS with pdksh, this test takes hours, literally.
-    # So we just punt and use a minimum line length of 8192.
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
-    # This has been around since 386BSD, at least.  Likely further.
-    if test -x /sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
-    elif test -x /usr/sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
-    else
-      lt_cv_sys_max_cmd_len=65536      # usable default for all BSDs
-    fi
-    # And add a safety zone
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    ;;
-
-  interix*)
-    # We know the value 262144 and hardcode it with a safety zone (like BSD)
-    lt_cv_sys_max_cmd_len=196608
-    ;;
-
-  osf*)
-    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
-    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
-    # nice to cause kernel panics so lets avoid the loop below.
-    # First set a reasonable default.
-    lt_cv_sys_max_cmd_len=16384
-    #
-    if test -x /sbin/sysconfig; then
-      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
-        *1*) lt_cv_sys_max_cmd_len=-1 ;;
-      esac
-    fi
-    ;;
-  sco3.2v5*)
-    lt_cv_sys_max_cmd_len=102400
-    ;;
-  sysv5* | sco5v6* | sysv4.2uw2*)
-    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
-    if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[       ]]//'`
-    else
-      lt_cv_sys_max_cmd_len=32768
-    fi
-    ;;
-  *)
-    # If test is not a shell built-in, we'll probably end up computing a
-    # maximum length that is only half of the actual maximum length, but
-    # we can't tell.
-    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
-    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
-              = "XX$teststring") >/dev/null 2>&1 &&
-           new_result=`expr "X$teststring" : ".*" 2>&1` &&
-           lt_cv_sys_max_cmd_len=$new_result &&
-           test $i != 17 # 1/2 MB should be enough
-    do
-      i=`expr $i + 1`
-      teststring=$teststring$teststring
-    done
-    teststring=
-    # Add a significant safety factor because C++ compilers can tack on massive
-    # amounts of additional arguments before passing them to the linker.
-    # It appears as though 1/2 is a usable value.
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
-    ;;
-  esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
-  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
-  AC_MSG_RESULT(none)
-fi
-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
-
-
-# _LT_AC_CHECK_DLFCN
-# ------------------
-AC_DEFUN([_LT_AC_CHECK_DLFCN],
-[AC_CHECK_HEADERS(dlfcn.h)dnl
-])# _LT_AC_CHECK_DLFCN
-
-
-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ---------------------------------------------------------------------
-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
-  [$4]
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL          RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL                DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL                0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW         DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW       RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW     DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW     0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
-
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
-
-    exit (status);
-}]
-EOF
-  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) $1 ;;
-      x$lt_dlneed_uscore) $2 ;;
-      x$lt_dlunknown|x*) $3 ;;
-    esac
-  else :
-    # compilation failed
-    $3
-  fi
-fi
-rm -fr conftest*
-])# _LT_AC_TRY_DLOPEN_SELF
-
-
-# AC_LIBTOOL_DLOPEN_SELF
-# ----------------------
-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
-
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
-
-  mingw* | pw32*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-   ;;
-
-  cygwin*)
-    lt_cv_dlopen="dlopen"
-    lt_cv_dlopen_libs=
-   ;;
-
-  darwin*)
-  # if libdl is installed we need to link against it
-    AC_CHECK_LIB([dl], [dlopen],
-               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
-    lt_cv_dlopen="dyld"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ])
-   ;;
-
-  *)
-    AC_CHECK_FUNC([shl_load],
-         [lt_cv_dlopen="shl_load"],
-      [AC_CHECK_LIB([dld], [shl_load],
-           [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
-       [AC_CHECK_FUNC([dlopen],
-             [lt_cv_dlopen="dlopen"],
-         [AC_CHECK_LIB([dl], [dlopen],
-               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
-           [AC_CHECK_LIB([svld], [dlopen],
-                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
-             [AC_CHECK_LIB([dld], [dld_link],
-                   [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
-             ])
-           ])
-         ])
-       ])
-      ])
-    ;;
-  esac
-
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
-    enable_dlopen=no
-  fi
-
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
-    save_LDFLAGS="$LDFLAGS"
-    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-    AC_CACHE_CHECK([whether a program can dlopen itself],
-         lt_cv_dlopen_self, [dnl
-         _LT_AC_TRY_DLOPEN_SELF(
-           lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
-           lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
-    ])
-
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
-      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
-         lt_cv_dlopen_self_static, [dnl
-         _LT_AC_TRY_DLOPEN_SELF(
-           lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
-           lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
-      ])
-    fi
-
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
-
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
-
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
-fi
-])# AC_LIBTOOL_DLOPEN_SELF
-
-
-# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
-# ---------------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler
-AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
-   $rm -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-     fi
-   fi
-   chmod u+w . 2>&AS_MESSAGE_LOG_FD
-   $rm conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-   $rm out/* && rmdir out
-   cd ..
-   rmdir conftest
-   $rm conftest*
-])
-])# AC_LIBTOOL_PROG_CC_C_O
-
-
-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
-# -----------------------------------------
-# Check to see if we can do hard links to lock some files if needed
-AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
-[AC_REQUIRE([_LT_AC_LOCK])dnl
-
-hard_links="nottested"
-if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  AC_MSG_CHECKING([if we can lock with hard links])
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  AC_MSG_RESULT([$hard_links])
-  if test "$hard_links" = no; then
-    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
-
-
-# AC_LIBTOOL_OBJDIR
-# -----------------
-AC_DEFUN([AC_LIBTOOL_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-])# AC_LIBTOOL_OBJDIR
-
-
-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
-# ----------------------------------------------
-# Check hardcoding attributes.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_AC_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
-   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
-   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
-
-  # We can hardcode non-existant directories.
-  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
-     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
-    # Linking always hardcodes the temporary library directory.
-    _LT_AC_TAGVAR(hardcode_action, $1)=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
-
-
-# AC_LIBTOOL_SYS_LIB_STRIP
-# ------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
-[striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-   darwin*)
-       if test -n "$STRIP" ; then
-         striplib="$STRIP -x"
-         AC_MSG_RESULT([yes])
-       else
-  AC_MSG_RESULT([no])
-fi
-       ;;
-   *)
-  AC_MSG_RESULT([no])
-    ;;
-  esac
-fi
-])# AC_LIBTOOL_SYS_LIB_STRIP
-
-
-# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
-[AC_MSG_CHECKING([dynamic linker characteristics])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
-
-aix4* | aix5*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[[01]] | aix4.[[01]].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-          echo ' yes '
-          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
-       :
-      else
-       can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
-
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  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'
-  ;;
-
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi[[45]]*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
-
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $rm \$dlpath'
-    shlibpath_overrides_runpath=yes
-
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-      ;;
-    mingw*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    ;;
-
-  *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
-  else
-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
-  fi
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
-
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
-kfreebsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[[123]]*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
-  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  freebsd*) # from 4.6 on
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-   hppa*64*)
-     shrext_cmds='.sl'
-     hardcode_into_libs=yes
-     dynamic_linker="$host_os dld.sl"
-     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-     soname_spec='${libname}${release}${shared_ext}$major'
-     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-     ;;
-   *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
-
-interix3*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
-       else
-               version_type=irix
-       fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
-
-# This must be Linux ELF.
-linux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,   ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-  fi
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-knetbsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-nto-qnx*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[[89]] | openbsd2.[[89]].*)
-       shlibpath_overrides_runpath=no
-       ;;
-      *)
-       shlibpath_overrides_runpath=yes
-       ;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
-
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-    shlibpath_overrides_runpath=no
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    shlibpath_overrides_runpath=yes
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-       ;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-
-
-# _LT_AC_TAGCONFIG
-# ----------------
-AC_DEFUN([_LT_AC_TAGCONFIG],
-[AC_ARG_WITH([tags],
-    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
-        [include additional configurations @<:@automatic@:>@])],
-    [tagnames="$withval"])
-
-if test -f "$ltmain" && test -n "$tagnames"; then
-  if test ! -f "${ofile}"; then
-    AC_MSG_WARN([output file `$ofile' does not exist])
-  fi
-
-  if test -z "$LTCC"; then
-    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
-    if test -z "$LTCC"; then
-      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
-    else
-      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
-    fi
-  fi
-  if test -z "$LTCFLAGS"; then
-    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
-  fi
-
-  # Extract list of available tagged configurations in $ofile.
-  # Note that this assumes the entire list is on one line.
-  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
-
-  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-  for tagname in $tagnames; do
-    IFS="$lt_save_ifs"
-    # Check whether tagname contains only valid characters
-    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
-    "") ;;
-    *)  AC_MSG_ERROR([invalid tag name: $tagname])
-       ;;
-    esac
-
-    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
-    then
-      AC_MSG_ERROR([tag name \"$tagname\" already exists])
-    fi
-
-    # Update the list of available tags.
-    if test -n "$tagname"; then
-      echo appending configuration tag \"$tagname\" to $ofile
-
-      case $tagname in
-      CXX)
-       if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-           ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-           (test "X$CXX" != "Xg++"))) ; then
-         AC_LIBTOOL_LANG_CXX_CONFIG
-       else
-         tagname=""
-       fi
-       ;;
-
-      F77)
-       if test -n "$F77" && test "X$F77" != "Xno"; then
-         AC_LIBTOOL_LANG_F77_CONFIG
-       else
-         tagname=""
-       fi
-       ;;
-
-      GCJ)
-       if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
-         AC_LIBTOOL_LANG_GCJ_CONFIG
-       else
-         tagname=""
-       fi
-       ;;
-
-      RC)
-       AC_LIBTOOL_LANG_RC_CONFIG
-       ;;
-
-      *)
-       AC_MSG_ERROR([Unsupported tag name: $tagname])
-       ;;
-      esac
-
-      # Append the new tag name to the list of available tags.
-      if test -n "$tagname" ; then
-      available_tags="$available_tags $tagname"
-    fi
-    fi
-  done
-  IFS="$lt_save_ifs"
-
-  # Now substitute the updated list of available tags.
-  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
-    mv "${ofile}T" "$ofile"
-    chmod +x "$ofile"
-  else
-    rm -f "${ofile}T"
-    AC_MSG_ERROR([unable to update list of available tagged configurations.])
-  fi
-fi
-])# _LT_AC_TAGCONFIG
-
-
-# AC_LIBTOOL_DLOPEN
-# -----------------
-# enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN],
- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_DLOPEN
-
-
-# AC_LIBTOOL_WIN32_DLL
-# --------------------
-# declare package support for building win32 DLLs
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_WIN32_DLL
-
-
-# AC_ENABLE_SHARED([DEFAULT])
-# ---------------------------
-# implement the --enable-shared flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([shared],
-    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
-       [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_shared=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
-])# AC_ENABLE_SHARED
-
-
-# AC_DISABLE_SHARED
-# -----------------
-# set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)
-])# AC_DISABLE_SHARED
-
-
-# AC_ENABLE_STATIC([DEFAULT])
-# ---------------------------
-# implement the --enable-static flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([static],
-    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
-       [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_static=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
-])# AC_ENABLE_STATIC
-
-
-# AC_DISABLE_STATIC
-# -----------------
-# set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)
-])# AC_DISABLE_STATIC
-
-
-# AC_ENABLE_FAST_INSTALL([DEFAULT])
-# ---------------------------------
-# implement the --enable-fast-install flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([fast-install],
-    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
-    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_fast_install=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
-])# AC_ENABLE_FAST_INSTALL
-
-
-# AC_DISABLE_FAST_INSTALL
-# -----------------------
-# set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)
-])# AC_DISABLE_FAST_INSTALL
-
-
-# AC_LIBTOOL_PICMODE([MODE])
-# --------------------------
-# implement the --with-pic flag
-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)
-])# AC_LIBTOOL_PICMODE
-
-
-# AC_PROG_EGREP
-# -------------
-# This is predefined starting with Autoconf 2.54, so this conditional
-# definition can be removed once we require Autoconf 2.54 or later.
-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
-[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
-   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
-    then ac_cv_prog_egrep='grep -E'
-    else ac_cv_prog_egrep='egrep'
-    fi])
- EGREP=$ac_cv_prog_egrep
- AC_SUBST([EGREP])
-])])
-
-
-# AC_PATH_TOOL_PREFIX
-# -------------------
-# find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] |  ?:[\\/]*])
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word.  This closes a longstanding sh security hole.
-  ac_dummy="ifelse([$2], , $PATH, [$2])"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$1; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
-      if test -n "$file_magic_test_file"; then
-       case $deplibs_check_method in
-       "file_magic "*)
-         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-           $EGREP "$file_magic_regex" > /dev/null; then
-           :
-         else
-           cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
-         fi ;;
-       esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  AC_MSG_RESULT($MAGIC_CMD)
-else
-  AC_MSG_RESULT(no)
-fi
-])# AC_PATH_TOOL_PREFIX
-
-
-# AC_PATH_MAGIC
-# -------------
-# find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
-  else
-    MAGIC_CMD=:
-  fi
-fi
-])# AC_PATH_MAGIC
-
-
-# AC_PROG_LD
-# ----------
-# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH([gnu-ld],
-    [AC_HELP_STRING([--with-gnu-ld],
-       [assume the C compiler uses GNU ld @<:@default=no@:>@])],
-    [test "$withval" = no || with_gnu_ld=yes],
-    [with_gnu_ld=no])
-AC_REQUIRE([LT_AC_PROG_SED])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by $CC])
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [[\\/]]* | ?:[[\\/]]*)
-      re_direlt='/[[^/]][[^/]]*/\.\./'
-      # Canonicalize the pathname of ld
-      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-       ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some variants of GNU ld only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
-      *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break
-       ;;
-      *)
-       test "$with_gnu_ld" != yes && break
-       ;;
-      esac
-    fi
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])# AC_PROG_LD
-
-
-# AC_PROG_LD_GNU
-# --------------
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  lt_cv_prog_gnu_ld=yes
-  ;;
-*)
-  lt_cv_prog_gnu_ld=no
-  ;;
-esac])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# AC_PROG_LD_GNU
-
-
-# AC_PROG_LD_RELOAD_FLAG
-# ----------------------
-# find reload flag for linker
-#   -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files],
-  lt_cv_ld_reload_flag,
-  [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
-  darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-    else
-      reload_cmds='$LD$reload_flag -o $output$reload_objs'
-    fi
-    ;;
-esac
-])# AC_PROG_LD_RELOAD_FLAG
-
-
-# AC_DEPLIBS_CHECK_METHOD
-# -----------------------
-# how to check for library dependencies
-#  -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependent libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix4* | aix5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-bsdi[[45]]*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  ;;
-
-cygwin*)
-  # func_win32_libid is a shell function defined in ltmain.sh
-  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-  lt_cv_file_magic_cmd='func_win32_libid'
-  ;;
-
-mingw* | pw32*)
-  # Base MSYS/MinGW do not provide the 'file' command needed by
-  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
-
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-freebsd* | kfreebsd*-gnu | dragonfly*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-      ;;
-    esac
-  else
-    lt_cv_deplibs_check_method=pass_all
-  fi
-  ;;
-
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  case $host_cpu in
-  ia64*)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
-    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
-    ;;
-  hppa*64*)
-    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
-    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
-    ;;
-  *)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
-    lt_cv_file_magic_test_file=/usr/lib/libc.sl
-    ;;
-  esac
-  ;;
-
-interix3*)
-  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
-  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $LD in
-  *-32|*"-32 ") libmagic=32-bit;;
-  *-n32|*"-n32 ") libmagic=N32;;
-  *-64|*"-64 ") libmagic=64-bit;;
-  *) libmagic=never-match;;
-  esac
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-# This must be Linux ELF.
-linux*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-netbsd*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
-  fi
-  ;;
-
-newos6*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=/usr/lib/libnls.so
-  ;;
-
-nto-qnx*)
-  lt_cv_deplibs_check_method=unknown
-  ;;
-
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
-  fi
-  ;;
-
-osf3* | osf4* | osf5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv4 | sysv4.3*)
-  case $host_vendor in
-  motorola)
-    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]]'
-    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
-    ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  sequent)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
-    ;;
-  sni)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
-    lt_cv_file_magic_test_file=/lib/libc.so
-    ;;
-  siemens)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  pc)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  esac
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-])# AC_DEPLIBS_CHECK_METHOD
-
-
-# AC_PROG_NM
-# ----------
-# find the pathname to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
-[if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  lt_nm_to_check="${ac_tool_prefix}nm"
-  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
-    lt_nm_to_check="$lt_nm_to_check nm"
-  fi
-  for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
-      test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-       # Check to see if the nm accepts a BSD-compat flag.
-       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
-       #   nm: unknown option "B" ignored
-       # Tru64's nm complains that /dev/null is an invalid object file
-       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-       */dev/null* | *'Invalid file or object type'*)
-         lt_cv_path_NM="$tmp_nm -B"
-         break
-         ;;
-       *)
-         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
-         */dev/null*)
-           lt_cv_path_NM="$tmp_nm -p"
-           break
-           ;;
-         *)
-           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-           continue # so that we can try to find one that supports BSD flags
-           ;;
-         esac
-         ;;
-       esac
-      fi
-    done
-    IFS="$lt_save_ifs"
-  done
-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-])# AC_PROG_NM
-
-
-# AC_CHECK_LIBM
-# -------------
-# check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
-  # These system don't have libm, or don't need it
-  ;;
-*-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
-  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
-  ;;
-*)
-  AC_CHECK_LIB(m, cos, LIBM="-lm")
-  ;;
-esac
-])# AC_CHECK_LIBM
-
-
-# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl convenience library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-convenience to the configure arguments.  Note that
-# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
-# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
-# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
-# (note the single quotes!).  If your package is not flat and you're not
-# using automake, define top_builddir and top_srcdir appropriately in
-# the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  case $enable_ltdl_convenience in
-  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
-  "") enable_ltdl_convenience=yes
-      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
-  esac
-  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
-  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-  # For backwards non-gettext consistent compatibility...
-  INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_CONVENIENCE
-
-
-# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl installable library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-install to the configure arguments.  Note that
-# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
-# and an installed libltdl is not found, it is assumed to be `libltdl'.
-# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
-# '${top_srcdir}/' (note the single quotes!).  If your package is not
-# flat and you're not using automake, define top_builddir and top_srcdir
-# appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  AC_CHECK_LIB(ltdl, lt_dlinit,
-  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
-  [if test x"$enable_ltdl_install" = xno; then
-     AC_MSG_WARN([libltdl not installed, but installation disabled])
-   else
-     enable_ltdl_install=yes
-   fi
-  ])
-  if test x"$enable_ltdl_install" = x"yes"; then
-    ac_configure_args="$ac_configure_args --enable-ltdl-install"
-    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
-    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-  else
-    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
-    LIBLTDL="-lltdl"
-    LTDLINCL=
-  fi
-  # For backwards non-gettext consistent compatibility...
-  INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_INSTALLABLE
-
-
-# AC_LIBTOOL_CXX
-# --------------
-# enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX],
-[AC_REQUIRE([_LT_AC_LANG_CXX])
-])# AC_LIBTOOL_CXX
-
-
-# _LT_AC_LANG_CXX
-# ---------------
-AC_DEFUN([_LT_AC_LANG_CXX],
-[AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
-])# _LT_AC_LANG_CXX
-
-# _LT_AC_PROG_CXXCPP
-# ------------------
-AC_DEFUN([_LT_AC_PROG_CXXCPP],
-[
-AC_REQUIRE([AC_PROG_CXX])
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  AC_PROG_CXXCPP
-fi
-])# _LT_AC_PROG_CXXCPP
-
-# AC_LIBTOOL_F77
-# --------------
-# enable support for Fortran 77 libraries
-AC_DEFUN([AC_LIBTOOL_F77],
-[AC_REQUIRE([_LT_AC_LANG_F77])
-])# AC_LIBTOOL_F77
-
-
-# _LT_AC_LANG_F77
-# ---------------
-AC_DEFUN([_LT_AC_LANG_F77],
-[AC_REQUIRE([AC_PROG_F77])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
-])# _LT_AC_LANG_F77
-
-
-# AC_LIBTOOL_GCJ
-# --------------
-# enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],
-[AC_REQUIRE([_LT_AC_LANG_GCJ])
-])# AC_LIBTOOL_GCJ
-
-
-# _LT_AC_LANG_GCJ
-# ---------------
-AC_DEFUN([_LT_AC_LANG_GCJ],
-[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
-  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
-    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
-      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
-        [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
-          [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
-])# _LT_AC_LANG_GCJ
-
-
-# AC_LIBTOOL_RC
-# -------------
-# enable support for Windows resource files
-AC_DEFUN([AC_LIBTOOL_RC],
-[AC_REQUIRE([LT_AC_PROG_RC])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
-])# AC_LIBTOOL_RC
-
-
-# AC_LIBTOOL_LANG_C_CONFIG
-# ------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
-AC_DEFUN([_LT_AC_LANG_C_CONFIG],
-[lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}\n'
-
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_DLOPEN_SELF
-
-# Report which library types will actually be built
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
-
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-
-aix4* | aix5*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-    ;;
-esac
-AC_MSG_RESULT([$enable_shared])
-
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_C_CONFIG
-
-
-# AC_LIBTOOL_LANG_CXX_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
-AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
-[AC_LANG_PUSH(C++)
-AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
-
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
-_LT_AC_TAGVAR(always_export_symbols, $1)=no
-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_direct, $1)=no
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
-_LT_AC_TAGVAR(module_cmds, $1)=
-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_AC_TAGVAR(no_undefined_flag, $1)=
-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Dependencies to place before and after the object being linked:
-_LT_AC_TAGVAR(predep_objects, $1)=
-_LT_AC_TAGVAR(postdep_objects, $1)=
-_LT_AC_TAGVAR(predeps, $1)=
-_LT_AC_TAGVAR(postdeps, $1)=
-_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
-lt_save_LD=$LD
-lt_save_GCC=$GCC
-GCC=$GXX
-lt_save_with_gnu_ld=$with_gnu_ld
-lt_save_path_LD=$lt_cv_path_LD
-if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
-  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
-else
-  $as_unset lt_cv_prog_gnu_ld
-fi
-if test -n "${lt_cv_path_LDCXX+set}"; then
-  lt_cv_path_LD=$lt_cv_path_LDCXX
-else
-  $as_unset lt_cv_path_LD
-fi
-test -z "${LDCXX+set}" || LD=$LDCXX
-CC=${CXX-"c++"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-
-# We don't want -fno-exception wen compiling C++ code, so set the
-# no_builtin_flag separately
-if test "$GXX" = yes; then
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-else
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-fi
-
-if test "$GXX" = yes; then
-  # Set up default GNU C++ configuration
-
-  AC_PROG_LD
-
-  # Check if GNU C++ uses GNU ld as the underlying linker, since the
-  # archiving commands below assume that GNU ld is being used.
-  if test "$with_gnu_ld" = yes; then
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
-    #     investigate it a little bit more. (MM)
-    wlarc='${wl}'
-
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
-       grep 'no-whole-archive' > /dev/null; then
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-  else
-    with_gnu_ld=no
-    wlarc=
-
-    # A generic and very simple default shared library creation
-    # command for GNU C++ for the case where it uses the native
-    # linker, instead of GNU ld.  If possible, this setting should
-    # overridden to take advantage of the native linker features on
-    # the platform it is being used on.
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-  fi
-
-  # Commands to make compiler produce verbose output that lists
-  # what "hidden" libraries, object files and flags are used when
-  # linking a shared library.
-  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-else
-  GXX=no
-  with_gnu_ld=no
-  wlarc=
-fi
-
-# PORTME: fill in a description of your system's C++ link characteristics
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-_LT_AC_TAGVAR(ld_shlibs, $1)=yes
-case $host_os in
-  aix3*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  aix4* | aix5*)
-    if test "$host_cpu" = ia64; then
-      # On IA64, the linker does run time linking by default, so we don't
-      # have to do anything special.
-      aix_use_runtimelinking=no
-      exp_sym_flag='-Bexport'
-      no_entry_flag=""
-    else
-      aix_use_runtimelinking=no
-
-      # Test if we are trying to use run time linking or normal
-      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-      # need to do runtime linking.
-      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
-       for ld_flag in $LDFLAGS; do
-         case $ld_flag in
-         *-brtl*)
-           aix_use_runtimelinking=yes
-           break
-           ;;
-         esac
-       done
-       ;;
-      esac
-
-      exp_sym_flag='-bexport'
-      no_entry_flag='-bnoentry'
-    fi
-
-    # When large executables or shared objects are built, AIX ld can
-    # have problems creating the table of contents.  If linking a library
-    # or program results in "error TOC overflow" add -mminimal-toc to
-    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-    _LT_AC_TAGVAR(archive_cmds, $1)=''
-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-    if test "$GXX" = yes; then
-      case $host_os in aix4.[[012]]|aix4.[[012]].*)
-      # We only want to do this on AIX 4.2 and lower, the check
-      # below for broken collect2 doesn't work under 4.3+
-       collect2name=`${CC} -print-prog-name=collect2`
-       if test -f "$collect2name" && \
-          strings "$collect2name" | grep resolve_lib_name >/dev/null
-       then
-         # We have reworked collect2
-         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-       else
-         # We have old collect2
-         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-       fi
-       ;;
-      esac
-      shared_flag='-shared'
-      if test "$aix_use_runtimelinking" = yes; then
-       shared_flag="$shared_flag "'${wl}-G'
-      fi
-    else
-      # not using gcc
-      if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-       shared_flag='-G'
-      else
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag='${wl}-G'
-       else
-         shared_flag='${wl}-bM:SRE'
-       fi
-      fi
-    fi
-
-    # It seems that -bexpall does not export symbols beginning with
-    # underscore (_), so it is better to generate a list of symbols to export.
-    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-    if test "$aix_use_runtimelinking" = yes; then
-      # Warning - without using the other runtime loading flags (-brtl),
-      # -berok will link without error, but may produce a broken library.
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
-      # Determine the default libpath from the value encoded in an empty executable.
-      _LT_AC_SYS_LIBPATH_AIX
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-     else
-      if test "$host_cpu" = ia64; then
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-      else
-       # Determine the default libpath from the value encoded in an empty executable.
-       _LT_AC_SYS_LIBPATH_AIX
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-       # Warning - without using the other run time loading flags,
-       # -berok will link without error, but may produce a broken library.
-       _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-       # Exported symbols can be pulled into shared objects from archives
-       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
-       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-       # This is similar to how AIX traditionally builds its shared libraries.
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-      fi
-    fi
-    ;;
-
-  beos*)
-    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-      # support --undefined.  This deserves some investigation.  FIXME
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-    else
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    fi
-    ;;
-
-  chorus*)
-    case $cc_basename in
-      *)
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-    esac
-    ;;
-
-  cygwin* | mingw* | pw32*)
-    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-    # as there is no search path for DLLs.
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-    _LT_AC_TAGVAR(always_export_symbols, $1)=no
-    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
-    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      # If the export-symbols file already is a .def file (1st line
-      # is EXPORTS), use it as is; otherwise, prepend...
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-       cp $export_symbols $output_objdir/$soname.def;
-      else
-       echo EXPORTS > $output_objdir/$soname.def;
-       cat $export_symbols >> $output_objdir/$soname.def;
-      fi~
-      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-    else
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    fi
-  ;;
-      darwin* | rhapsody*)
-        case $host_os in
-        rhapsody* | darwin1.[[012]])
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[[012]])
-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-        esac
-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-    if test "$GXX" = yes ; then
-      lt_int_apple_cc_single_mod=no
-      output_verbose_link_cmd='echo'
-      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
-       lt_int_apple_cc_single_mod=yes
-      fi
-      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      else
-          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-        fi
-        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          else
-            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          fi
-            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
-          ;;
-      esac
-      fi
-        ;;
-
-  dgux*)
-    case $cc_basename in
-      ec++*)
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      ghcx*)
-       # Green Hills C++ Compiler
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      *)
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-    esac
-    ;;
-  freebsd[[12]]*)
-    # C++ shared libraries reported to be fairly broken before switch to ELF
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  freebsd-elf*)
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    ;;
-  freebsd* | kfreebsd*-gnu | dragonfly*)
-    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-    # conventions
-    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
-    ;;
-  gnu*)
-    ;;
-  hpux9*)
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-                               # but as the default
-                               # location of the library.
-
-    case $cc_basename in
-    CC*)
-      # FIXME: insert proper C++ library support
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-    aCC*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      # Commands to make compiler produce verbose output that lists
-      # what "hidden" libraries, object files and flags are used when
-      # linking a shared library.
-      #
-      # There doesn't appear to be a way to prevent this compiler from
-      # explicitly linking system object files so we need to strip them
-      # from the output so that they don't get included in the library
-      # dependencies.
-      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-      ;;
-    *)
-      if test "$GXX" = yes; then
-        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-        # FIXME: insert proper C++ library support
-        _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-    esac
-    ;;
-  hpux10*|hpux11*)
-    if test $with_gnu_ld = no; then
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-      case $host_cpu in
-      hppa*64*|ia64*)
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
-        ;;
-      *)
-       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-        ;;
-      esac
-    fi
-    case $host_cpu in
-    hppa*64*|ia64*)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-    *)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-                                             # but as the default
-                                             # location of the library.
-      ;;
-    esac
-
-    case $cc_basename in
-      CC*)
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      aCC*)
-       case $host_cpu in
-       hppa*64*)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-         ;;
-       ia64*)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-         ;;
-       *)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-         ;;
-       esac
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-      *)
-       if test "$GXX" = yes; then
-         if test $with_gnu_ld = no; then
-           case $host_cpu in
-           hppa*64*)
-             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             ;;
-           ia64*)
-             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             ;;
-           *)
-             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             ;;
-           esac
-         fi
-       else
-         # FIXME: insert proper C++ library support
-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       fi
-       ;;
-    esac
-    ;;
-  interix3*)
-    _LT_AC_TAGVAR(hardcode_direct, $1)=no
-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-    # Instead, shared libraries are loaded at an image base (0x10000000 by
-    # default) and relocated if they conflict, which is a slow very memory
-    # consuming and fragmenting process.  To avoid this, we pick a random,
-    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-    ;;
-  irix5* | irix6*)
-    case $cc_basename in
-      CC*)
-       # SGI C++
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
-       # Archives containing C++ object files must be created using
-       # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
-       # necessary to make sure instantiated templates are included
-       # in the archive.
-       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
-       ;;
-      *)
-       if test "$GXX" = yes; then
-         if test "$with_gnu_ld" = no; then
-           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $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'
-         else
-           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
-         fi
-       fi
-       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-       ;;
-    esac
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-    ;;
-  linux*)
-    case $cc_basename in
-      KCC*)
-       # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-       # KCC will only create a shared library if the output file
-       # ends with ".so" (or ".sl" for HP-UX), so rename the library
-       # to its proper name (with version) after linking.
-       _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
-       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-       # Archives containing C++ object files must be created using
-       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
-       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-       ;;
-      icpc*)
-       # Intel C++
-       with_gnu_ld=yes
-       # version 8.0 and above of icpc choke on multiply defined symbols
-       # if we add $predep_objects and $postdep_objects, however 7.1 and
-       # earlier do not add the objects themselves.
-       case `$CC -V 2>&1` in
-       *"Version 7."*)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-         ;;
-       *)  # Version 8.0 or newer
-         tmp_idyn=
-         case $host_cpu in
-           ia64*) tmp_idyn=' -i_dynamic';;
-         esac
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-         ;;
-       esac
-       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-       ;;
-      pgCC*)
-        # Portland Group C++ compiler
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-        ;;
-      cxx*)
-       # Compaq C++
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
-       runpath_var=LD_RUN_PATH
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-    esac
-    ;;
-  lynxos*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  m88k*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  mvs*)
-    case $cc_basename in
-      cxx*)
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      *)
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-    esac
-    ;;
-  netbsd*)
-    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
-      wlarc=
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    fi
-    # Workaround some broken pre-1.5 toolchains
-    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
-    ;;
-  openbsd2*)
-    # C++ shared libraries are fairly broken
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  openbsd*)
-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    fi
-    output_verbose_link_cmd='echo'
-    ;;
-  osf3*)
-    case $cc_basename in
-      KCC*)
-       # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-       # KCC will only create a shared library if the output file
-       # ends with ".so" (or ".sl" for HP-UX), so rename the library
-       # to its proper name (with version) after linking.
-       _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-       # Archives containing C++ object files must be created using
-       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
-       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-
-       ;;
-      RCC*)
-       # Rational C++ 2.4.1
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      cxx*)
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-      *)
-       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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'
-
-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-         # Commands to make compiler produce verbose output that lists
-         # what "hidden" libraries, object files and flags are used when
-         # linking a shared library.
-         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-       else
-         # FIXME: insert proper C++ library support
-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       fi
-       ;;
-    esac
-    ;;
-  osf4* | osf5*)
-    case $cc_basename in
-      KCC*)
-       # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-       # KCC will only create a shared library if the output file
-       # ends with ".so" (or ".sl" for HP-UX), so rename the library
-       # to its proper name (with version) after linking.
-       _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-       # Archives containing C++ object files must be created using
-       # the KAI C++ compiler.
-       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
-       ;;
-      RCC*)
-       # Rational C++ 2.4.1
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      cxx*)
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-         echo "-hidden">> $lib.exp~
-         $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
-         $rm $lib.exp'
-
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-      *)
-       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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'
-
-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-         # Commands to make compiler produce verbose output that lists
-         # what "hidden" libraries, object files and flags are used when
-         # linking a shared library.
-         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-       else
-         # FIXME: insert proper C++ library support
-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       fi
-       ;;
-    esac
-    ;;
-  psos*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  sunos4*)
-    case $cc_basename in
-      CC*)
-       # Sun C++ 4.x
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      lcc*)
-       # Lucid
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      *)
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-    esac
-    ;;
-  solaris*)
-    case $cc_basename in
-      CC*)
-       # Sun C++ 4.2, 5.x and Centerline C++
-        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
-       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-       $CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-       case $host_os in
-         solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-         *)
-           # The C++ compiler is used as linker so we must use $wl
-           # flag to pass the commands to the underlying system
-           # linker. We must also pass each convience library through
-           # to the system linker between allextract/defaultextract.
-           # The C++ compiler will combine linker options so we
-           # cannot just pass the convience library names through
-           # without $wl.
-           # Supported since Solaris 2.6 (maybe 2.5.1?)
-           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
-           ;;
-       esac
-       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-       output_verbose_link_cmd='echo'
-
-       # Archives containing C++ object files must be created using
-       # "CC -xar", where "CC" is the Sun C++ compiler.  This is
-       # necessary to make sure instantiated templates are included
-       # in the archive.
-       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
-       ;;
-      gcx*)
-       # Green Hills C++ Compiler
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
-       # The C++ compiler must be used to create the archive.
-       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-       ;;
-      *)
-       # GNU C++ compiler with Solaris linker
-       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-         _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
-         if $CC --version | grep -v '^2\.7' > /dev/null; then
-           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-               $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
-         else
-           # g++ 2.7 appears to require `-G' NOT `-shared' on this
-           # platform.
-           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-               $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
-         fi
-
-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
-       fi
-       ;;
-    esac
-    ;;
-  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    runpath_var='LD_RUN_PATH'
-
-    case $cc_basename in
-      CC*)
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       ;;
-      *)
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       ;;
-    esac
-    ;;
-  sysv5* | sco3.2v5* | sco5v6*)
-    # Note: We can NOT use -z defs as we might desire, because we do not
-    # link with -lc, and that would cause any symbols used from libc to
-    # always be unresolved, which means just about no library would
-    # ever link correctly.  If we're not using GNU ld we use -z text
-    # though, which does catch some bad symbols but isn't as heavy-handed
-    # as -z defs.
-    # For security reasons, it is highly recommended that you always
-    # use absolute paths for naming shared libraries, and exclude the
-    # DT_RUNPATH tag from executables and libraries.  But doing so
-    # requires that you compile everything twice, which is a pain.
-    # So that behaviour is only enabled if SCOABSPATH is set to a
-    # non-empty value in the environment.  Most likely only useful for
-    # creating official distributions of packages.
-    # This is a hack until libtool officially supports absolute path
-    # names for shared libraries.
-    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-    runpath_var='LD_RUN_PATH'
-
-    case $cc_basename in
-      CC*)
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       ;;
-      *)
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       ;;
-    esac
-    ;;
-  tandem*)
-    case $cc_basename in
-      NCC*)
-       # NonStop-UX NCC 3.20
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      *)
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-    esac
-    ;;
-  vxworks*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  *)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-esac
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_AC_TAGVAR(GCC, $1)="$GXX"
-_LT_AC_TAGVAR(LD, $1)="$LD"
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-AC_LIBTOOL_POSTDEP_PREDEP($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC=$lt_save_CC
-LDCXX=$LD
-LD=$lt_save_LD
-GCC=$lt_save_GCC
-with_gnu_ldcxx=$with_gnu_ld
-with_gnu_ld=$lt_save_with_gnu_ld
-lt_cv_path_LDCXX=$lt_cv_path_LD
-lt_cv_path_LD=$lt_save_path_LD
-lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
-lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-])# AC_LIBTOOL_LANG_CXX_CONFIG
-
-# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
-# ------------------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library.  It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
-int a;
-void foo (void) { a = 0; }
-EOF
-],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
-class Foo
-{
-public:
-  Foo (void) { a = 0; }
-private:
-  int a;
-};
-EOF
-],[$1],[F77],[cat > conftest.$ac_ext <<EOF
-      subroutine foo
-      implicit none
-      integer*4 a
-      a=0
-      return
-      end
-EOF
-],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
-public class foo {
-  private int a;
-  public void bar (void) {
-    a = 0;
-  }
-};
-EOF
-])
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
-  # Parse the compiler output and extract the necessary
-  # objects, libraries and library flags.
-
-  # Sentinel used to keep track of whether or not we are before
-  # the conftest object file.
-  pre_test_object_deps_done=no
-
-  # The `*' in the case matches for architectures that use `case' in
-  # $output_verbose_cmd can trigger glob expansion during the loop
-  # eval without this substitution.
-  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
-
-  for p in `eval $output_verbose_link_cmd`; do
-    case $p in
-
-    -L* | -R* | -l*)
-       # Some compilers place space between "-{L,R}" and the path.
-       # Remove the space.
-       if test $p = "-L" \
-         || test $p = "-R"; then
-        prev=$p
-        continue
-       else
-        prev=
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-        case $p in
-        -L* | -R*)
-          # Internal compiler library paths should come after those
-          # provided the user.  The postdeps already come after the
-          # user supplied libs so there is no need to process them.
-          if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
-            _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
-          else
-            _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
-          fi
-          ;;
-        # The "-l" case would never come before the object being
-        # linked, so don't bother handling this case.
-        esac
-       else
-        if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
-          _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
-        else
-          _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
-        fi
-       fi
-       ;;
-
-    *.$objext)
-       # This assumes that the test object file only shows up
-       # once in the compiler output.
-       if test "$p" = "conftest.$objext"; then
-        pre_test_object_deps_done=yes
-        continue
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-        if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
-          _LT_AC_TAGVAR(predep_objects, $1)="$p"
-        else
-          _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
-        fi
-       else
-        if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
-          _LT_AC_TAGVAR(postdep_objects, $1)="$p"
-        else
-          _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
-        fi
-       fi
-       ;;
-
-    *) ;; # Ignore the rest.
-
-    esac
-  done
-
-  # Clean up.
-  rm -f a.out a.exe
-else
-  echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$rm -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-ifelse([$1],[CXX],
-[case $host_os in
-interix3*)
-  # Interix 3.5 installs completely hosed .la files for C++, so rather than
-  # hack all around it, let's just trust "g++" to DTRT.
-  _LT_AC_TAGVAR(predep_objects,$1)=
-  _LT_AC_TAGVAR(postdep_objects,$1)=
-  _LT_AC_TAGVAR(postdeps,$1)=
-  ;;
-
-solaris*)
-  case $cc_basename in
-  CC*)
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
-    ;;
-  esac
-  ;;
-esac
-])
-
-case " $_LT_AC_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
-])# AC_LIBTOOL_POSTDEP_PREDEP
-
-# AC_LIBTOOL_LANG_F77_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
-AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
-[AC_REQUIRE([AC_PROG_F77])
-AC_LANG_PUSH(Fortran 77)
-
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
-_LT_AC_TAGVAR(always_export_symbols, $1)=no
-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_direct, $1)=no
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
-_LT_AC_TAGVAR(module_cmds, $1)=
-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_AC_TAGVAR(no_undefined_flag, $1)=
-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="      program t\n      end\n"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${F77-"f77"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
-
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-aix4* | aix5*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-  ;;
-esac
-AC_MSG_RESULT([$enable_shared])
-
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-
-_LT_AC_TAGVAR(GCC, $1)="$G77"
-_LT_AC_TAGVAR(LD, $1)="$LD"
-
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_F77_CONFIG
-
-
-# AC_LIBTOOL_LANG_GCJ_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
-AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${GCJ-"gcj"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_GCJ_CONFIG
-
-
-# AC_LIBTOOL_LANG_RC_CONFIG
-# -------------------------
-# Ensure that the configuration vars for the Windows resource compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
-AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${RC-"windres"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_RC_CONFIG
-
-
-# AC_LIBTOOL_CONFIG([TAGNAME])
-# ----------------------------
-# If TAGNAME is not passed, then create an initial libtool script
-# with a default configuration from the untagged config vars.  Otherwise
-# add code to config.status for appending the configuration named by
-# TAGNAME from the matching tagged config vars.
-AC_DEFUN([AC_LIBTOOL_CONFIG],
-[# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    _LT_AC_TAGVAR(compiler, $1) \
-    _LT_AC_TAGVAR(CC, $1) \
-    _LT_AC_TAGVAR(LD, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
-    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
-    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
-    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
-    _LT_AC_TAGVAR(old_archive_cmds, $1) \
-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
-    _LT_AC_TAGVAR(predep_objects, $1) \
-    _LT_AC_TAGVAR(postdep_objects, $1) \
-    _LT_AC_TAGVAR(predeps, $1) \
-    _LT_AC_TAGVAR(postdeps, $1) \
-    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
-    _LT_AC_TAGVAR(archive_cmds, $1) \
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
-    _LT_AC_TAGVAR(postinstall_cmds, $1) \
-    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
-    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
-    _LT_AC_TAGVAR(no_undefined_flag, $1) \
-    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
-    _LT_AC_TAGVAR(hardcode_automatic, $1) \
-    _LT_AC_TAGVAR(module_cmds, $1) \
-    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
-    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
-    _LT_AC_TAGVAR(exclude_expsyms, $1) \
-    _LT_AC_TAGVAR(include_expsyms, $1); do
-
-    case $var in
-    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
-    _LT_AC_TAGVAR(archive_cmds, $1) | \
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
-    _LT_AC_TAGVAR(module_cmds, $1) | \
-    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
-    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
-
-  case $lt_echo in
-  *'\[$]0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
-    ;;
-  esac
-
-ifelse([$1], [],
-  [cfgfile="${ofile}T"
-  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
-  $rm -f "$cfgfile"
-  AC_MSG_NOTICE([creating $ofile])],
-  [cfgfile="$ofile"])
-
-  cat <<__EOF__ >> "$cfgfile"
-ifelse([$1], [],
-[#! $SHELL
-
-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="$SED -e 1s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# The names of the tagged configurations supported by this script.
-available_tags=
-
-# ### BEGIN LIBTOOL CONFIG],
-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
-
-# A language-specific compiler.
-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
-
-# Is the compiler the GNU C compiler?
-with_gcc=$_LT_AC_TAGVAR(GCC, $1)
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$lt_STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
-archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
-module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
-
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
-
-# Symbols that must always be exported.
-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
-
-ifelse([$1],[],
-[# ### END LIBTOOL CONFIG],
-[# ### END LIBTOOL TAG CONFIG: $tagname])
-
-__EOF__
-
-ifelse([$1],[], [
-  case $host_os in
-  aix3*)
-    cat <<\EOF >> "$cfgfile"
-
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-EOF
-    ;;
-  esac
-
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" || \
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
-])
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
-  fi
-fi
-])# AC_LIBTOOL_CONFIG
-
-
-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-
-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-
-  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
-    lt_cv_prog_compiler_rtti_exceptions,
-    [-fno-rtti -fno-exceptions], [],
-    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
-
-
-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-# ---------------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_NM])
-AC_REQUIRE([AC_OBJEXT])
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-
-# Define system-specific variables.
-case $host_os in
-aix*)
-  symcode='[[BCDT]]'
-  ;;
-cygwin* | mingw* | pw32*)
-  symcode='[[ABCDGISTW]]'
-  ;;
-hpux*) # Its linker distinguishes data from code symbols
-  if test "$host_cpu" = ia64; then
-    symcode='[[ABCDEGRST]]'
-  fi
-  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-  ;;
-linux*)
-  if test "$host_cpu" = ia64; then
-    symcode='[[ABCDGIRSTW]]'
-    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-  fi
-  ;;
-irix* | nonstopux*)
-  symcode='[[BCDEGRST]]'
-  ;;
-osf*)
-  symcode='[[BCDEGQRST]]'
-  ;;
-solaris*)
-  symcode='[[BDRT]]'
-  ;;
-sco3.2v5*)
-  symcode='[[DT]]'
-  ;;
-sysv4.2uw2*)
-  symcode='[[DT]]'
-  ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
-  symcode='[[ABDT]]'
-  ;;
-sysv4)
-  symcode='[[DFNSTU]]'
-  ;;
-esac
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
-  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-  ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
-  symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
-  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
-  symxfrm="\\1 $ac_symprfx\\2 \\2"
-
-  # Write the raw and C identifiers.
-  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
-
-  # Check to see that the pipe works correctly.
-  pipe_works=no
-
-  rm -f conftest*
-  cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
-
-  if AC_TRY_EVAL(ac_compile); then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-       mv -f "$nlist"T "$nlist"
-      else
-       rm -f "$nlist"T
-      fi
-
-      # Make sure that we snagged all the symbols we need.
-      if grep ' nm_test_var$' "$nlist" >/dev/null; then
-       if grep ' nm_test_func$' "$nlist" >/dev/null; then
-         cat <<EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
-         # Now generate the symbol file.
-         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
-
-         cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
-  const char *name;
-  lt_ptr_t address;
-}
-lt_preloaded_symbols[[]] =
-{
-EOF
-         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
-         cat <<\EOF >> conftest.$ac_ext
-  {0, (lt_ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
-         # Now try linking the two files.
-         mv conftest.$ac_objext conftstm.$ac_objext
-         lt_save_LIBS="$LIBS"
-         lt_save_CFLAGS="$CFLAGS"
-         LIBS="conftstm.$ac_objext"
-         CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
-         if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
-           pipe_works=yes
-         fi
-         LIBS="$lt_save_LIBS"
-         CFLAGS="$lt_save_CFLAGS"
-       else
-         echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
-       fi
-      else
-       echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
-      fi
-    else
-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
-    fi
-  else
-    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
-    cat conftest.$ac_ext >&5
-  fi
-  rm -f conftest* conftst*
-
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    lt_cv_sys_global_symbol_pipe=
-  fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
-  lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  AC_MSG_RESULT(failed)
-else
-  AC_MSG_RESULT(ok)
-fi
-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-
-
-# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
-# ---------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
-[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
-
-AC_MSG_CHECKING([for $compiler option to produce PIC])
- ifelse([$1],[CXX],[
-  # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-    aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-      ;;
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-    mingw* | os2* | pw32*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-    *djgpp*)
-      # DJGPP does not support shared libraries at all
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-      ;;
-    interix3*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-    hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       ;;
-      *)
-       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-       ;;
-      esac
-      ;;
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    case $host_os in
-      aix4* | aix5*)
-       # All AIX code is PIC.
-       if test "$host_cpu" = ia64; then
-         # AIX 5 now supports IA64 processor
-         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-       else
-         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-       fi
-       ;;
-      chorus*)
-       case $cc_basename in
-       cxch68*)
-         # Green Hills C++ Compiler
-         # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
-         ;;
-       esac
-       ;;
-       darwin*)
-         # PIC is the default on this platform
-         # Common symbols not allowed in MH_DYLIB files
-         case $cc_basename in
-           xlc*)
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           ;;
-         esac
-       ;;
-      dgux*)
-       case $cc_basename in
-         ec++*)
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           ;;
-         ghcx*)
-           # Green Hills C++ Compiler
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      freebsd* | kfreebsd*-gnu | dragonfly*)
-       # FreeBSD uses GNU C++
-       ;;
-      hpux9* | hpux10* | hpux11*)
-       case $cc_basename in
-         CC*)
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-           if test "$host_cpu" != ia64; then
-             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-           fi
-           ;;
-         aCC*)
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-           case $host_cpu in
-           hppa*64*|ia64*)
-             # +Z the default
-             ;;
-           *)
-             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-             ;;
-           esac
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      interix*)
-       # This is c89, which is MS Visual C++ (no shared libs)
-       # Anyone wants to do a port?
-       ;;
-      irix5* | irix6* | nonstopux*)
-       case $cc_basename in
-         CC*)
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-           # CC pic flag -KPIC is the default.
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      linux*)
-       case $cc_basename in
-         KCC*)
-           # KAI C++ Compiler
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-           ;;
-         icpc* | ecpc*)
-           # Intel C++
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-           ;;
-         pgCC*)
-           # Portland Group C++ compiler.
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-           ;;
-         cxx*)
-           # Compaq C++
-           # Make sure the PIC flag is empty.  It appears that all Alpha
-           # Linux and Compaq Tru64 Unix objects are PIC.
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      lynxos*)
-       ;;
-      m88k*)
-       ;;
-      mvs*)
-       case $cc_basename in
-         cxx*)
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      netbsd*)
-       ;;
-      osf3* | osf4* | osf5*)
-       case $cc_basename in
-         KCC*)
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-           ;;
-         RCC*)
-           # Rational C++ 2.4.1
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-           ;;
-         cxx*)
-           # Digital/Compaq C++
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           # Make sure the PIC flag is empty.  It appears that all Alpha
-           # Linux and Compaq Tru64 Unix objects are PIC.
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      psos*)
-       ;;
-      solaris*)
-       case $cc_basename in
-         CC*)
-           # Sun C++ 4.2, 5.x and Centerline C++
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-           ;;
-         gcx*)
-           # Green Hills C++ Compiler
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      sunos4*)
-       case $cc_basename in
-         CC*)
-           # Sun C++ 4.x
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-           ;;
-         lcc*)
-           # Lucid
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      tandem*)
-       case $cc_basename in
-         NCC*)
-           # NonStop-UX NCC 3.20
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-       case $cc_basename in
-         CC*)
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-           ;;
-       esac
-       ;;
-      vxworks*)
-       ;;
-      *)
-       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-       ;;
-    esac
-  fi
-],
-[
-  if test "$GCC" = yes; then
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-      ;;
-
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
-
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-
-    interix3*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      enable_shared=no
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-
-    hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-       ;;
-      esac
-      ;;
-
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      else
-       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-      darwin*)
-        # PIC is the default on this platform
-        # Common symbols not allowed in MH_DYLIB files
-       case $cc_basename in
-         xlc*)
-         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
-         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-         ;;
-       esac
-       ;;
-
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-       ;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC (with -KPIC) is the default.
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    newsos6)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    linux*)
-      case $cc_basename in
-      icc* | ecc*)
-       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-       # which looks to be a dead project)
-       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-        ;;
-      ccc*)
-        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-        # All Alpha code is PIC.
-        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-        ;;
-      esac
-      ;;
-
-    osf3* | osf4* | osf5*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # All OSF/1 code is PIC.
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    solaris*)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
-      *)
-       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
-      esac
-      ;;
-
-    sunos4*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
-       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    unicos*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-
-    uts4*)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-    esac
-  fi
-])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
-  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
-    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
-    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
-    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
-     "" | " "*) ;;
-     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
-     esac],
-    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-    ;;
-  *)
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
-    ;;
-esac
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
-  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
-  $lt_tmp_static_flag,
-  [],
-  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
-])
-
-
-# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
-# ------------------------------------
-# See if the linker supports building shared libraries.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-ifelse([$1],[CXX],[
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  case $host_os in
-  aix4* | aix5*)
-    # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-    else
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-    fi
-    ;;
-  pw32*)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
-  ;;
-  cygwin* | mingw*)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  *)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  esac
-],[
-  runpath_var=
-  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
-  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-  _LT_AC_TAGVAR(archive_cmds, $1)=
-  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
-  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
-  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-  _LT_AC_TAGVAR(hardcode_direct, $1)=no
-  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
-  _LT_AC_TAGVAR(module_cmds, $1)=
-  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
-  _LT_AC_TAGVAR(always_export_symbols, $1)=no
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  _LT_AC_TAGVAR(include_expsyms, $1)=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  extract_expsyms_cmds=
-  # Just being paranoid about ensuring that cc_basename is set.
-  _LT_CC_BASENAME([$compiler])
-  case $host_os in
-  cygwin* | mingw* | pw32*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  esac
-
-  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
-
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
-       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>/dev/null` in
-      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
-
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix3* | aix4* | aix5*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       cat <<EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
-      fi
-      ;;
-
-    amigaos*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$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)'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-
-      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can't use
-      # them.
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-       # support --undefined.  This deserves some investigation.  FIXME
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-      # as there is no search path for DLLs.
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(always_export_symbols, $1)=no
-      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
-
-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    interix3*)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
-
-    linux*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       tmp_addflag=
-       case $cc_basename,$host_cpu in
-       pgcc*)                          # Portland Group C compiler
-         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag'
-         ;;
-       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
-         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag -Mnomain' ;;
-       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
-         tmp_addflag=' -i_dynamic' ;;
-       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
-         tmp_addflag=' -i_dynamic -nofor_main' ;;
-       ifc* | ifort*)                  # Intel Fortran compiler
-         tmp_addflag=' -nofor_main' ;;
-       esac
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
-       if test $supports_anon_versioning = yes; then
-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
-  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-  $echo "local: *; };" >> $output_objdir/$libname.ver~
-         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-       fi
-      else
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-       wlarc=
-      else
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
-
-    solaris*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-       ;;
-       *)
-         if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
-           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
-           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
-         else
-           _LT_AC_TAGVAR(ld_shlibs, $1)=no
-         fi
-       ;;
-      esac
-      ;;
-
-    sunos4*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-    esac
-
-    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
-      runpath_var=
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-       # Neither direct hardcoding nor static linking is supported with a
-       # broken collect2.
-       _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-      fi
-      ;;
-
-    aix4* | aix5*)
-      if test "$host_cpu" = ia64; then
-       # On IA64, the linker does run time linking by default, so we don't
-       # have to do anything special.
-       aix_use_runtimelinking=no
-       exp_sym_flag='-Bexport'
-       no_entry_flag=""
-      else
-       # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
-       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-         _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-       else
-         _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-       fi
-       aix_use_runtimelinking=no
-
-       # Test if we are trying to use run time linking or normal
-       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
-       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
-         for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-           aix_use_runtimelinking=yes
-           break
-         fi
-         done
-         ;;
-       esac
-
-       exp_sym_flag='-bexport'
-       no_entry_flag='-bnoentry'
-      fi
-
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-      _LT_AC_TAGVAR(archive_cmds, $1)=''
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-      if test "$GCC" = yes; then
-       case $host_os in aix4.[[012]]|aix4.[[012]].*)
-       # We only want to do this on AIX 4.2 and lower, the check
-       # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
-         if test -f "$collect2name" && \
-          strings "$collect2name" | grep resolve_lib_name >/dev/null
-         then
-         # We have reworked collect2
-         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-         else
-         # We have old collect2
-         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-         fi
-         ;;
-       esac
-       shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
-       fi
-      else
-       # not using gcc
-       if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-         shared_flag='-G'
-       else
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
-         else
-           shared_flag='${wl}-bM:SRE'
-         fi
-       fi
-      fi
-
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-      if test "$aix_use_runtimelinking" = yes; then
-       # Warning - without using the other runtime loading flags (-brtl),
-       # -berok will link without error, but may produce a broken library.
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
-       # Determine the default libpath from the value encoded in an empty executable.
-       _LT_AC_SYS_LIBPATH_AIX
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-       else
-       if test "$host_cpu" = ia64; then
-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-       else
-        # Determine the default libpath from the value encoded in an empty executable.
-        _LT_AC_SYS_LIBPATH_AIX
-        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-         # Warning - without using the other run time loading flags,
-         # -berok will link without error, but may produce a broken library.
-         _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-         # Exported symbols can be pulled into shared objects from archives
-         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
-         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-       fi
-      fi
-      ;;
-
-    amigaos*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$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)'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      # see comment about different semantics on the GNU ld section
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
-    bsdi[[45]]*)
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
-      ;;
-
-    cygwin* | mingw* | pw32*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
-      # FIXME: Should let the user specify the lib program.
-      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
-      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      ;;
-
-    darwin* | rhapsody*)
-      case $host_os in
-        rhapsody* | darwin1.[[012]])
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[[012]])
-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-      esac
-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-    if test "$GCC" = yes ; then
-       output_verbose_link_cmd='echo'
-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
-          ;;
-      esac
-    fi
-      ;;
-
-    dgux*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    freebsd1*)
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | kfreebsd*-gnu | dragonfly*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    hpux9*)
-      if test "$GCC" = yes; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-       _LT_AC_TAGVAR(archive_cmds, $1)='$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'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      ;;
-
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
-       # hardcode_minus_L: Not really in the search PATH,
-       # but as the default location of the library.
-       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      fi
-      ;;
-
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      else
-       case $host_cpu in
-       hppa*64*)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      fi
-      if test "$with_gnu_ld" = no; then
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-       case $host_cpu in
-       hppa*64*|ia64*)
-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
-         _LT_AC_TAGVAR(hardcode_direct, $1)=no
-         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-         ;;
-       *)
-         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-         ;;
-       esac
-      fi
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$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'
-      else
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    newsos6)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    openbsd*)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      else
-       case $host_os in
-        openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
-          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-          ;;
-        *)
-          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-          ;;
-       esac
-      fi
-      ;;
-
-    os2*)
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(archive_cmds, $1)='$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'
-      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
-
-    osf3*)
-      if test "$GCC" = yes; then
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-       _LT_AC_TAGVAR(archive_cmds, $1)='$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'
-      else
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-       _LT_AC_TAGVAR(archive_cmds, $1)='$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'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    osf4* | osf5*)     # as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-       _LT_AC_TAGVAR(archive_cmds, $1)='$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'
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      else
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-       _LT_AC_TAGVAR(archive_cmds, $1)='$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'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
-
-       # Both c and cxx compiler support -rpath directly
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    solaris*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
-      if test "$GCC" = yes; then
-       wlarc='${wl}'
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
-      else
-       wlarc=''
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      case $host_os in
-      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-      *)
-       # The compiler driver will combine linker options so we
-       # cannot just pass the convience library names through
-       # without $wl, iff we do not link with $LD.
-       # Luckily, gcc supports the same syntax we need for Sun Studio.
-       # Supported since Solaris 2.6 (maybe 2.5.1?)
-       case $wlarc in
-       '')
-         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
-       *)
-         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
-       esac ;;
-      esac
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-       # Use $CC to link under sequent, because it throws in some extra .o
-       # files that make .init and .fini sections work.
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4)
-      case $host_vendor in
-       sni)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
-       ;;
-       siemens)
-         ## LD is ld it makes a PLAMLIB
-         ## CC just makes a GrossModule.
-         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-         _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
-         _LT_AC_TAGVAR(hardcode_direct, $1)=no
-        ;;
-       motorola)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
-       ;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4.3*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-       runpath_var=LD_RUN_PATH
-       hardcode_runpath_var=yes
-       _LT_AC_TAGVAR(ld_shlibs, $1)=yes
-      fi
-      ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    uts4*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-    esac
-  fi
-])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
-x|xyes)
-  # Assume -lc should be added
-  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $_LT_AC_TAGVAR(archive_cmds, $1) in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
-      $rm conftest*
-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
-       pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
-        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
-        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
-        then
-         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-        else
-         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-        fi
-        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $rm conftest*
-      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
-      ;;
-    esac
-  fi
-  ;;
-esac
-])# AC_LIBTOOL_PROG_LD_SHLIBS
-
-
-# _LT_AC_FILE_LTDLL_C
-# -------------------
-# Be careful that the start marker always follows a newline.
-AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# #  ifdef __CYGWIN32__
-# #    define __CYGWIN__ __CYGWIN32__
-# #  endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-#   __hDllInstance_base = hInst;
-#   return TRUE;
-# }
-# /* ltdll.c ends here */
-])# _LT_AC_FILE_LTDLL_C
-
-
-# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
-# ---------------------------------
-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
-
-
-# old names
-AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
-
-# This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])
-
-AC_DEFUN([LT_AC_PROG_GCJ],
-[AC_CHECK_TOOL(GCJ, gcj, no)
-  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
-  AC_SUBST(GCJFLAGS)
-])
-
-AC_DEFUN([LT_AC_PROG_RC],
-[AC_CHECK_TOOL(RC, windres, no)
-])
-
-############################################################
-# NOTE: This macro has been submitted for inclusion into   #
-#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
-#  a released version of Autoconf we should remove this    #
-#  macro and use it instead.                               #
-############################################################
-# LT_AC_PROG_SED
-# --------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible.  Prefer GNU sed if found.
-AC_DEFUN([LT_AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for lt_ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
-        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
-      fi
-    done
-  done
-done
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f $lt_ac_sed && continue
-  cat /dev/null > conftest.in
-  lt_ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
-  # Check for GNU sed and select it if it is found.
-  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
-    lt_cv_path_SED=$lt_ac_sed
-    break
-  fi
-  while true; do
-    cat conftest.in conftest.in >conftest.tmp
-    mv conftest.tmp conftest.in
-    cp conftest.in conftest.nl
-    echo >>conftest.nl
-    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
-    cmp -s conftest.out conftest.nl || break
-    # 10000 chars as input seems more than enough
-    test $lt_ac_count -gt 10 && break
-    lt_ac_count=`expr $lt_ac_count + 1`
-    if test $lt_ac_count -gt $lt_ac_max; then
-      lt_ac_max=$lt_ac_count
-      lt_cv_path_SED=$lt_ac_sed
-    fi
-  done
-done
-])
-SED=$lt_cv_path_SED
-AC_MSG_RESULT([$SED])
-])
index 06823e057a578f95dabd0f233875dcf0553173c7..dc1e50f6e6c5915eb31a3a27cbcda093f01afb1c 100644 (file)
-# ltmain.sh - Provide generalized library-building support services.
-# NOTE: Changing this file will not affect anything until you rerun configure.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
+# Generated from ltmain.m4sh.
+
+# ltmain.sh (GNU libtool) 2.2
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
 # (at your option) any later version.
 #
-# This program is distributed in the hope that it will be useful, but
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
 #
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+#     --config             show all configuration variables
+#     --debug              enable verbose shell tracing
+# -n, --dry-run            display commands without modifying any files
+#     --features           display basic configuration information and exit
+#     --mode=MODE          use operation mode MODE
+#     --preserve-dup-deps  don't remove duplicate dependency libraries
+#     --quiet, --silent    don't print informational messages
+#     --tag=TAG            use configuration variables from tag TAG
+# -v, --verbose            print informational messages (default)
+#     --version            print version information
+# -h, --help               print short or long help message
+#
+# MODE must be one of the following:
+#
+#       clean              remove files from the build directory
+#       compile            compile a source file into a libtool object
+#       execute            automatically set library path, then run a program
+#       finish             complete the installation of libtool libraries
+#       install            install libraries or executables
+#       link               create a library or an executable
+#       uninstall          remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+#       host-triplet:  $host
+#       shell:         $SHELL
+#       compiler:              $LTCC
+#       compiler flags:                $LTCFLAGS
+#       linker:                $LD (gnu? $with_gnu_ld)
+#       $progname:             (GNU libtool) 2.2
+#       automake:              $automake_version
+#       autoconf:              $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=2.2
+TIMESTAMP=""
+package_revision=1.2599
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# NLS nuisances: We save the old values to restore during execute mode.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+  eval "if test \"\${$lt_var+set}\" = set; then
+          save_$lt_var=\$$lt_var
+          $lt_var=C
+         export $lt_var
+       fi"
+done
+
+$lt_unset CDPATH
+
+
+
+
+
+: ${CP="cp -f"}
+: ${ECHO="echo"}
+: ${EGREP="/usr/bin/grep -E"}
+: ${FGREP="/usr/bin/grep -F"}
+: ${GREP="/usr/bin/grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="/usr/bin/sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
 
-basename="s,^.*/,,g"
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77     # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS="  $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
 
 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
 # is ksh but when the shell is invoked as "sh" and the current value of
@@ -34,112 +148,166 @@ basename="s,^.*/,,g"
 progpath="$0"
 
 # The name of this program:
-progname=`echo "$progpath" | $SED $basename`
-modename="$progname"
+# In the unlikely event $progname began with a '-', it would play havoc with
+# func_echo (imagine progname=-n), so we prepend ./ in that case:
+progname=`$ECHO "X$progpath" | $Xsed -e "$basename" -e 's,^-,./-,'`
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+  [\\/]*|[A-Za-z]:\\*) ;;
+  *[\\/]*)
+     progdir=`$ECHO "X$progpath" | $Xsed -e "$dirname"`
+     progdir=`cd "$progdir" && pwd`
+     progpath="$progdir/$progname"
+     ;;
+  *)
+     save_IFS="$IFS"
+     IFS=:
+     for progdir in $PATH; do
+       IFS="$save_IFS"
+       test -x "$progdir/$progname" && break
+     done
+     IFS="$save_IFS"
+     test -n "$progdir" || progdir=`pwd`
+     progpath="$progdir/$progname"
+     ;;
+esac
 
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+  s/$bs4/&\\
+/g
+  s/^$bs2$dollar/$bs&/
+  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+  s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+    $ECHO "$progname${mode+: }$mode: $*"
+}
 
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=1.5.22
-TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+    $opt_verbose && func_echo ${1+"$@"}
 
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes.
-if test -n "${ZSH_VERSION+set}" ; then
-  setopt NO_GLOB_SUBST
-fi
+    # A bug in bash halts the script if the last line of a function
+    # fails when set -e is in force, so we need another command to
+    # work around that:
+    :
+}
 
-# Check that we have a working $echo.
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell, and then maybe $echo will work.
-  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
-fi
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+    $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+}
 
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-$*
-EOF
-  exit $EXIT_SUCCESS
-fi
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+    $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
+}
 
-default_mode=
-help="Try \`$progname --help' for more information."
-magic="%%%MAGIC variable%%%"
-mkdir="mkdir"
-mv="mv -f"
-rm="rm -f"
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+    func_error ${1+"$@"}
+    exit $EXIT_FAILURE
+}
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
-    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
-  SP2NL='tr \040 \012'
-  NL2SP='tr \015\012 \040\040'
-  ;;
- *) # EBCDIC based system
-  SP2NL='tr \100 \n'
-  NL2SP='tr \r\n \100\100'
-  ;;
-esac
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+    func_error ${1+"$@"}
+    func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information."  ## default
 
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
-  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
-  save_LANG="$LANG"; LANG=C; export LANG
-fi
 
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS="  $lt_nl"
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+    $GREP "$1" "$2" >/dev/null 2>&1
+}
 
-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-  $echo "$modename: not configured to build any kind of library" 1>&2
-  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-  exit $EXIT_FAILURE
-fi
 
-# Global variables.
-mode=$default_mode
-nonopt=
-prev=
-prevopt=
-run=
-show="$echo"
-show_help=
-execute_dlfiles=
-duplicate_deps=no
-preserve_args=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+    my_directory_path="$1"
+    my_dir_list=
+
+    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+      # Protect directory names starting with `-'
+      case $my_directory_path in
+        -*) my_directory_path="./$my_directory_path" ;;
+      esac
+
+      # While some portion of DIR does not yet exist...
+      while test ! -d "$my_directory_path"; do
+        # ...make a list in topmost first order.  Use a colon delimited
+       # list incase some portion of path contains whitespace.
+        my_dir_list="$my_directory_path:$my_dir_list"
+
+        # If the last portion added has no slash in it, the list is done
+        case $my_directory_path in */*) ;; *) break ;; esac
+
+        # ...otherwise throw away the child directory and loop
+        my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
+      done
+      my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
+
+      save_mkdir_p_IFS="$IFS"; IFS=':'
+      for my_dir in $my_dir_list; do
+       IFS="$save_mkdir_p_IFS"
+        # mkdir can fail with a `File exist' error if two processes
+        # try to create one of the directories concurrently.  Don't
+        # stop in that case!
+        $MKDIR "$my_dir" 2>/dev/null || :
+      done
+      IFS="$save_mkdir_p_IFS"
+
+      # Bail out if we (or some other process) failed to create a directory.
+      test -d "$my_directory_path" || \
+        func_fatal_error "Failed to create \`$1'"
+    fi
+}
 
-#####################################
-# Shell function definitions:
-# This seems to be the best place for them
 
 # func_mktempdir [string]
 # Make a temporary directory that won't clash with other running
@@ -149,7 +317,7 @@ func_mktempdir ()
 {
     my_template="${TMPDIR-/tmp}/${1-$progname}"
 
-    if test "$run" = ":"; then
+    if test "$opt_dry_run" = ":"; then
       # Return a directory name, but don't create it in dry-run mode
       my_tmpdir="${my_template}-$$"
     else
@@ -158,6285 +326,7215 @@ func_mktempdir ()
       my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
 
       if test ! -d "$my_tmpdir"; then
-       # Failing that, at least try and use $RANDOM to avoid a race
-       my_tmpdir="${my_template}-${RANDOM-0}$$"
+        # Failing that, at least try and use $RANDOM to avoid a race
+        my_tmpdir="${my_template}-${RANDOM-0}$$"
 
-       save_mktempdir_umask=`umask`
-       umask 0077
-       $mkdir "$my_tmpdir"
-       umask $save_mktempdir_umask
+        save_mktempdir_umask=`umask`
+        umask 0077
+        $MKDIR "$my_tmpdir"
+        umask $save_mktempdir_umask
       fi
 
       # If we're not in dry-run mode, bomb out on failure
-      test -d "$my_tmpdir" || {
-        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
-       exit $EXIT_FAILURE
-      }
+      test -d "$my_tmpdir" || \
+        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
     fi
 
-    $echo "X$my_tmpdir" | $Xsed
+    $ECHO "X$my_tmpdir" | $Xsed
 }
 
 
-# func_win32_libid arg
-# return the library type of file 'arg'
-#
-# Need a lot of goo to handle *both* DLLs and import libs
-# Has to be a shell function in order to 'eat' the argument
-# that is supplied when $file_magic_command is called.
-func_win32_libid ()
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
 {
-  win32_libid_type="unknown"
-  win32_fileres=`file -L $1 2>/dev/null`
-  case $win32_fileres in
-  *ar\ archive\ import\ library*) # definitely import
-    win32_libid_type="x86 archive import"
-    ;;
-  *ar\ archive*) # could be an import, or static
-    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
-      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
-      win32_nmres=`eval $NM -f posix -A $1 | \
-       $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
-      case $win32_nmres in
-      import*)  win32_libid_type="x86 archive import";;
-      *)        win32_libid_type="x86 archive static";;
-      esac
-    fi
-    ;;
-  *DLL*)
-    win32_libid_type="x86 DLL"
-    ;;
-  *executable*) # but shell scripts are "executable" too...
-    case $win32_fileres in
-    *MS\ Windows\ PE\ Intel*)
-      win32_libid_type="x86 DLL"
-      ;;
+    case $1 in
+      *[\\\`\"\$]*)
+       func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
+      *)
+        func_quote_for_eval_unquoted_result="$1" ;;
+    esac
+
+    case $func_quote_for_eval_unquoted_result in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting, command substitution and and variable
+      # expansion for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+        ;;
+      *)
+        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
     esac
-    ;;
-  esac
-  $echo $win32_libid_type
 }
 
 
-# func_infer_tag arg
-# Infer tagged configuration to use if any are available and
-# if one wasn't chosen via the "--tag" command line option.
-# Only attempt this if the compiler in the base compile
-# command doesn't match the default compiler.
-# arg is usually of the form 'gcc ...'
-func_infer_tag ()
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
 {
-    if test -n "$available_tags" && test -z "$tagname"; then
-      CC_quoted=
-      for arg in $CC; do
-       case $arg in
-         *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
-         arg="\"$arg\""
-         ;;
-       esac
-       CC_quoted="$CC_quoted $arg"
-      done
-      case $@ in
-      # Blanks in the command may have been stripped by the calling shell,
-      # but not from the CC environment variable when configure was run.
-      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
-      # Blanks at the start of $base_compile will cause this to fail
-      # if we don't check for them as well.
+    case $1 in
+      *[\\\`\"]*)
+       my_arg=`$ECHO "X$1" | $Xsed \
+           -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
       *)
-       for z in $available_tags; do
-         if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
-           # Evaluate the configuration.
-           eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
-           CC_quoted=
-           for arg in $CC; do
-           # Double-quote args containing other shell metacharacters.
-           case $arg in
-             *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
-             arg="\"$arg\""
-             ;;
-           esac
-           CC_quoted="$CC_quoted $arg"
-         done
-           case "$@ " in
-             " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
-             # The compiler in the base compile command matches
-             # the one in the tagged configuration.
-             # Assume this is the tagged configuration we want.
-             tagname=$z
-             break
-             ;;
-           esac
-         fi
-       done
-       # If $tagname still isn't set, then no tagged configuration
-       # was found and let the user know that the "--tag" command
-       # line option must be used.
-       if test -z "$tagname"; then
-         $echo "$modename: unable to infer tagged configuration"
-         $echo "$modename: specify a tag with \`--tag'" 1>&2
-         exit $EXIT_FAILURE
-#        else
-#          $echo "$modename: using $tagname tagged configuration"
-       fi
-       ;;
-      esac
-    fi
+        my_arg="$1" ;;
+    esac
+
+    case $my_arg in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting and command substitution for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+        my_arg="\"$my_arg\""
+        ;;
+    esac
+
+    func_quote_for_expand_result="$my_arg"
 }
 
 
-# func_extract_an_archive dir oldlib
-func_extract_an_archive ()
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
 {
-    f_ex_an_ar_dir="$1"; shift
-    f_ex_an_ar_oldlib="$1"
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
 
-    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
-    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
-    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
-     :
-    else
-      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
-      exit $EXIT_FAILURE
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    if ${opt_dry_run-false}; then :; else
+      eval "$my_cmd"
+      my_status=$?
+      if test "$my_status" -eq 0; then :; else
+       eval "(exit $my_status); $my_fail_exp"
+      fi
     fi
 }
 
-# func_extract_archives gentop oldlib ...
-func_extract_archives ()
+
+
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
 {
-    my_gentop="$1"; shift
-    my_oldlibs=${1+"$@"}
-    my_oldobjs=""
-    my_xlib=""
-    my_xabs=""
-    my_xdir=""
-    my_status=""
-
-    $show "${rm}r $my_gentop"
-    $run ${rm}r "$my_gentop"
-    $show "$mkdir $my_gentop"
-    $run $mkdir "$my_gentop"
-    my_status=$?
-    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
-      exit $my_status
-    fi
+    $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
+        s/^# //
+       s/^# *$//
+        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+        p
+     }' < "$progpath"
+     exit $?
+}
 
-    for my_xlib in $my_oldlibs; do
-      # Extract the objects.
-      case $my_xlib in
-       [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
-       *) my_xabs=`pwd`"/$my_xlib" ;;
-      esac
-      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
-      my_xdir="$my_gentop/$my_xlib"
-
-      $show "${rm}r $my_xdir"
-      $run ${rm}r "$my_xdir"
-      $show "$mkdir $my_xdir"
-      $run $mkdir "$my_xdir"
-      exit_status=$?
-      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
-       exit $exit_status
-      fi
-      case $host in
-      *-darwin*)
-       $show "Extracting $my_xabs"
-       # Do not bother doing anything if just a dry run
-       if test -z "$run"; then
-         darwin_orig_dir=`pwd`
-         cd $my_xdir || exit $?
-         darwin_archive=$my_xabs
-         darwin_curdir=`pwd`
-         darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
-         darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
-         if test -n "$darwin_arches"; then 
-           darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
-           darwin_arch=
-           $show "$darwin_base_archive has multiple architectures $darwin_arches"
-           for darwin_arch in  $darwin_arches ; do
-             mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-             lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
-             cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-             func_extract_an_archive "`pwd`" "${darwin_base_archive}"
-             cd "$darwin_curdir"
-             $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
-           done # $darwin_arches
-      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
-           darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
-           darwin_file=
-           darwin_files=
-           for darwin_file in $darwin_filelist; do
-             darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
-             lipo -create -output "$darwin_file" $darwin_files
-           done # $darwin_filelist
-           ${rm}r unfat-$$
-           cd "$darwin_orig_dir"
-         else
-           cd "$darwin_orig_dir"
-           func_extract_an_archive "$my_xdir" "$my_xabs"
-         fi # $darwin_arches
-       fi # $run
-       ;;
-      *)
-        func_extract_an_archive "$my_xdir" "$my_xabs"
-        ;;
-      esac
-      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
-    done
-    func_extract_archives_result="$my_oldobjs"
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+    $SED -n '/^# Usage:/,/# -h/ {
+        s/^# //
+       s/^# *$//
+       s/\$progname/'$progname'/
+       p
+    }' < "$progpath"
+    $ECHO
+    $ECHO "run \`$progname --help | more' for full usage"
+    exit $?
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+    $SED -n '/^# Usage:/,/# Report bugs to/ {
+        s/^# //
+       s/^# *$//
+       s*\$progname*'$progname'*
+       s*\$host*'"$host"'*
+       s*\$SHELL*'"$SHELL"'*
+       s*\$LTCC*'"$LTCC"'*
+       s*\$LTCFLAGS*'"$LTCFLAGS"'*
+       s*\$LD*'"$LD"'*
+       s/\$with_gnu_ld/'"$with_gnu_ld"'/
+       s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+       s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+       p
+     }' < "$progpath"
+    exit $?
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+    func_error "missing argument for $1"
+    exit_cmd=exit
 }
-# End of Shell function definitions
-#####################################
 
-# Darwin sucks
-eval std_shrext=\"$shrext_cmds\"
+exit_cmd=:
 
-disable_libs=no
 
-# Parse our command line options once, thoroughly.
-while test "$#" -gt 0
-do
-  arg="$1"
+
+
+
+# Check that we have a working $ECHO.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
   shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
+  # Yippee, $ECHO works!
+  :
+else
+  # Restart under the correct shell, and then maybe $ECHO will work.
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
 
-  case $arg in
-  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) optarg= ;;
-  esac
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
 
-  # If the previous option needs an argument, assign it.
-  if test -n "$prev"; then
-    case $prev in
-    execute_dlfiles)
-      execute_dlfiles="$execute_dlfiles $arg"
-      ;;
-    tag)
-      tagname="$arg"
-      preserve_args="${preserve_args}=$arg"
-
-      # Check whether tagname contains only valid characters
-      case $tagname in
-      *[!-_A-Za-z0-9,/]*)
-       $echo "$progname: invalid tag name: $tagname" 1>&2
-       exit $EXIT_FAILURE
-       ;;
-      esac
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
 
-      case $tagname in
-      CC)
-       # Don't test for the "default" C tag, as we know, it's there, but
-       # not specially marked.
-       ;;
-      *)
-       if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
-         taglist="$taglist $tagname"
-         # Evaluate the configuration.
-         eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
-       else
-         $echo "$progname: ignoring unknown tag $tagname" 1>&2
-       fi
-       ;;
-      esac
-      ;;
-    *)
-      eval "$prev=\$arg"
-      ;;
-    esac
+# Global variables.
+# $mode is unset
+nonopt=
+execute_dlfiles=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
 
-    prev=
-    prevopt=
-    continue
-  fi
+opt_dry_run=false
+opt_duplicate_deps=false
+opt_silent=false
+opt_debug=:
 
-  # Have we seen a non-optional argument yet?
-  case $arg in
-  --help)
-    show_help=yes
-    ;;
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
 
-  --version)
-    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
-    $echo
-    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
-    $echo "This is free software; see the source for copying conditions.  There is NO"
-    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-    exit $?
-    ;;
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+    func_error ${1+"$@"}
+    func_error "See the $PACKAGE documentation for more information."
+    func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+    re_begincf='^# ### BEGIN LIBTOOL'
+    re_endcf='^# ### END LIBTOOL'
+
+    # Default configuration.
+    $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
 
-  --config)
-    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
     # Now print the configurations for the tags.
     for tagname in $taglist; do
-      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
+      $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
     done
-    exit $?
-    ;;
-
-  --debug)
-    $echo "$progname: enabling shell trace mode"
-    set -x
-    preserve_args="$preserve_args $arg"
-    ;;
 
-  --dry-run | -n)
-    run=:
-    ;;
+    exit $?
+}
 
-  --features)
-    $echo "host: $host"
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+    $ECHO "host: $host"
     if test "$build_libtool_libs" = yes; then
-      $echo "enable shared libraries"
+      $ECHO "enable shared libraries"
     else
-      $echo "disable shared libraries"
+      $ECHO "disable shared libraries"
     fi
     if test "$build_old_libs" = yes; then
-      $echo "enable static libraries"
+      $ECHO "enable static libraries"
     else
-      $echo "disable static libraries"
+      $ECHO "disable static libraries"
     fi
+
     exit $?
-    ;;
+}
 
-  --finish) mode="finish" ;;
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+  # Global variable:
+  tagname="$1"
 
-  --mode) prevopt="--mode" prev=mode ;;
-  --mode=*) mode="$optarg" ;;
+  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+  sed_extractcf="/$re_begincf/,/$re_endcf/p"
 
-  --preserve-dup-deps) duplicate_deps="yes" ;;
+  # Validate tagname.
+  case $tagname in
+    *[!-_A-Za-z0-9,/]*)
+      func_fatal_error "invalid tag name: $tagname"
+      ;;
+  esac
 
-  --quiet | --silent)
-    show=:
-    preserve_args="$preserve_args $arg"
-    ;;
+  # Don't test for the "default" C tag, as we know it's
+  # there but not specially marked.
+  case $tagname in
+    CC) ;;
+    *)
+      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+       taglist="$taglist $tagname"
+
+       # Evaluate the configuration.  Be careful to quote the path
+       # and the sed script, to avoid splitting on whitespace, but
+       # also don't use non-portable quotes within backquotes within
+       # quotes we have to do it in 2 steps:
+       extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+       eval "$extractedcf"
+      else
+       func_error "ignoring unknown tag $tagname"
+      fi
+      ;;
+  esac
+}
 
-  --tag)
-    prevopt="--tag"
-    prev=tag
-    preserve_args="$preserve_args --tag"
-    ;;
-  --tag=*)
-    set tag "$optarg" ${1+"$@"}
-    shift
-    prev=tag
-    preserve_args="$preserve_args --tag"
-    ;;
 
-  -dlopen)
-    prevopt="-dlopen"
-    prev=execute_dlfiles
-    ;;
+func_mode_help ()
+{
+    # We need to display help for each of the modes.
+    case $mode in
+      "")
+        # Generic help is extracted from the usage comments
+        # at the start of this file.
+        func_help
+        ;;
 
-  -*)
-    $echo "$modename: unrecognized option \`$arg'" 1>&2
-    $echo "$help" 1>&2
-    exit $EXIT_FAILURE
-    ;;
+      clean)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
 
-  *)
-    nonopt="$arg"
-    break
-    ;;
-  esac
-done
+Remove files from the build directory.
 
-if test -n "$prevopt"; then
-  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
-  $echo "$help" 1>&2
-  exit $EXIT_FAILURE
-fi
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
 
-case $disable_libs in
-no) 
-  ;;
-shared)
-  build_libtool_libs=no
-  build_old_libs=yes
-  ;;
-static)
-  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
-  ;;
-esac
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+        ;;
 
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end.  This prevents here-documents from being
-# left over by shells.
-exec_cmd=
+      compile)
+      $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
 
-if test -z "$show_help"; then
+Compile a source file into a libtool library object.
 
-  # Infer the operation mode.
-  if test -z "$mode"; then
-    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
-    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
-    case $nonopt in
-    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
-      mode=link
-      for arg
-      do
-       case $arg in
-       -c)
-          mode=compile
-          break
-          ;;
-       esac
-      done
-      ;;
-    *db | *dbx | *strace | *truss)
-      mode=execute
-      ;;
-    *install*|cp|mv)
-      mode=install
-      ;;
-    *rm)
-      mode=uninstall
-      ;;
-    *)
-      # If we have no mode, but dlfiles were specified, then do execute mode.
-      test -n "$execute_dlfiles" && mode=execute
+This mode accepts the following additional options:
 
-      # Just use the default operation mode.
-      if test -z "$mode"; then
-       if test -n "$nonopt"; then
-         $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
-       else
-         $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
-       fi
-      fi
-      ;;
-    esac
-  fi
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -no-suppress      do not suppress compiler output for multiple passes
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -shared           do not build a \`.o' file suitable for static linking
+  -static           only build a \`.o' file suitable for static linking
 
-  # Only execute mode is allowed to have -dlopen flags.
-  if test -n "$execute_dlfiles" && test "$mode" != execute; then
-    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
-    $echo "$help" 1>&2
-    exit $EXIT_FAILURE
-  fi
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
 
-  # Change the help message to a mode-specific one.
-  generic_help="$help"
-  help="Try \`$modename --help --mode=$mode' for more information."
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+        ;;
 
-  # These modes are in order of execution frequency so that they run quickly.
-  case $mode in
-  # libtool compile mode
-  compile)
-    modename="$modename: compile"
-    # Get the compilation command and the source file.
-    base_compile=
-    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
-    suppress_opt=yes
-    suppress_output=
-    arg_mode=normal
-    libobj=
-    later=
+      execute)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
 
-    for arg
-    do
-      case $arg_mode in
-      arg  )
-       # do not "continue".  Instead, add this to base_compile
-       lastarg="$arg"
-       arg_mode=normal
-       ;;
+Automatically set library path, then run a program.
 
-      target )
-       libobj="$arg"
-       arg_mode=normal
-       continue
-       ;;
+This mode accepts the following additional options:
 
-      normal )
-       # Accept any command-line options.
-       case $arg in
-       -o)
-         if test -n "$libobj" ; then
-           $echo "$modename: you cannot specify \`-o' more than once" 1>&2
-           exit $EXIT_FAILURE
-         fi
-         arg_mode=target
-         continue
-         ;;
+  -dlopen FILE      add the directory containing FILE to the library path
 
-       -static | -prefer-pic | -prefer-non-pic)
-         later="$later $arg"
-         continue
-         ;;
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
 
-       -no-suppress)
-         suppress_opt=no
-         continue
-         ;;
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
 
-       -Xcompiler)
-         arg_mode=arg  #  the next one goes into the "base_compile" arg list
-         continue      #  The current "srcfile" will either be retained or
-         ;;            #  replaced later.  I would guess that would be a bug.
+Then, COMMAND is executed, with ARGS as arguments."
+        ;;
 
-       -Wc,*)
-         args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
-         lastarg=
-         save_ifs="$IFS"; IFS=','
-         for arg in $args; do
-           IFS="$save_ifs"
+      finish)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
 
-           # Double-quote args containing other shell metacharacters.
-           # Many Bourne shells cannot handle close brackets correctly
-           # in scan sets, so we specify it separately.
-           case $arg in
-             *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
-             arg="\"$arg\""
-             ;;
-           esac
-           lastarg="$lastarg $arg"
-         done
-         IFS="$save_ifs"
-         lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+Complete the installation of libtool libraries.
 
-         # Add the arguments to base_compile.
-         base_compile="$base_compile $lastarg"
-         continue
-         ;;
+Each LIBDIR is a directory that contains libtool libraries.
 
-       * )
-         # Accept the current argument as the source file.
-         # The previous "srcfile" becomes the current argument.
-         #
-         lastarg="$srcfile"
-         srcfile="$arg"
-         ;;
-       esac  #  case $arg
-       ;;
-      esac    #  case $arg_mode
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+        ;;
 
-      # Aesthetically quote the previous argument.
-      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+      install)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
 
-      case $lastarg in
-      # Double-quote args containing other shell metacharacters.
-      # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, and some SunOS ksh mistreat backslash-escaping
-      # in scan sets (worked around with variable expansion),
-      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
-      # at all, so we specify them separately.
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-       lastarg="\"$lastarg\""
-       ;;
-      esac
+Install executables or libraries.
 
-      base_compile="$base_compile $lastarg"
-    done # for arg
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
 
-    case $arg_mode in
-    arg)
-      $echo "$modename: you must specify an argument for -Xcompile"
-      exit $EXIT_FAILURE
-      ;;
-    target)
-      $echo "$modename: you must specify a target with \`-o'" 1>&2
-      exit $EXIT_FAILURE
-      ;;
-    *)
-      # Get the name of the library object.
-      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
-      ;;
-    esac
+The following components of INSTALL-COMMAND are treated specially:
 
-    # Recognize several different file suffixes.
-    # If the user specifies -o file.o, it is replaced with file.lo
-    xform='[cCFSifmso]'
-    case $libobj in
-    *.ada) xform=ada ;;
-    *.adb) xform=adb ;;
-    *.ads) xform=ads ;;
-    *.asm) xform=asm ;;
-    *.c++) xform=c++ ;;
-    *.cc) xform=cc ;;
-    *.ii) xform=ii ;;
-    *.class) xform=class ;;
-    *.cpp) xform=cpp ;;
-    *.cxx) xform=cxx ;;
-    *.f90) xform=f90 ;;
-    *.for) xform=for ;;
-    *.java) xform=java ;;
-    esac
+  -inst-prefix PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
 
-    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+        ;;
 
-    case $libobj in
-    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
-    *)
-      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
-      exit $EXIT_FAILURE
-      ;;
-    esac
+      link)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
 
-    func_infer_tag $base_compile
+Link object files or libraries together to form another library, or to
+create an executable program.
 
-    for arg in $later; do
-      case $arg in
-      -static)
-       build_old_libs=yes
-       continue
-       ;;
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
 
-      -prefer-pic)
-       pic_mode=yes
-       continue
-       ;;
+The following components of LINK-COMMAND are treated specially:
 
-      -prefer-non-pic)
-       pic_mode=no
-       continue
-       ;;
-      esac
-    done
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+                    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+                    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -shared           only do dynamic linking of libtool libraries
+  -shrext SUFFIX    override the standard shared library file extension
+  -static           do not do any dynamic linking of uninstalled libtool libraries
+  -static-libtool-libs
+                    do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+                    specify library version info [each variable defaults to 0]
+  -weak LIBNAME     declare that the target provides the LIBNAME interface
 
-    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
-    case $qlibobj in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-       qlibobj="\"$qlibobj\"" ;;
-    esac
-    test "X$libobj" != "X$qlibobj" \
-       && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"'  &()|`$[]' \
-       && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
-    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
-    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
-    if test "X$xdir" = "X$obj"; then
-      xdir=
-    else
-      xdir=$xdir/
-    fi
-    lobj=${xdir}$objdir/$objname
+All other options (arguments beginning with \`-') are ignored.
 
-    if test -z "$base_compile"; then
-      $echo "$modename: you must specify a compilation command" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
 
-    # Delete any leftover library objects.
-    if test "$build_old_libs" = yes; then
-      removelist="$obj $lobj $libobj ${libobj}T"
-    else
-      removelist="$lobj $libobj ${libobj}T"
-    fi
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
 
-    $run $rm $removelist
-    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
 
-    # On Cygwin there's no "real" PIC flag so we must build both object types
-    case $host_os in
-    cygwin* | mingw* | pw32* | os2*)
-      pic_mode=default
-      ;;
-    esac
-    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
-      # non-PIC code in shared libraries is not supported
-      pic_mode=default
-    fi
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+        ;;
 
-    # Calculate the filename of the output object if compiler does
-    # not support -o with -c
-    if test "$compiler_c_o" = no; then
-      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
-      lockfile="$output_obj.lock"
-      removelist="$removelist $output_obj $lockfile"
-      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
-    else
-      output_obj=
-      need_locks=no
-      lockfile=
-    fi
+      uninstall)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
 
-    # Lock this critical section if it is needed
-    # We use this script file to make the link, it avoids creating a new file
-    if test "$need_locks" = yes; then
-      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
-       $show "Waiting for $lockfile to be removed"
-       sleep 2
-      done
-    elif test "$need_locks" = warn; then
-      if test -f "$lockfile"; then
-       $echo "\
-*** ERROR, $lockfile exists and contains:
-`cat $lockfile 2>/dev/null`
+Remove libraries from an installation directory.
 
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
 
-       $run $rm $removelist
-       exit $EXIT_FAILURE
-      fi
-      $echo "$srcfile" > "$lockfile"
-    fi
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+        ;;
 
-    if test -n "$fix_srcfile_path"; then
-      eval srcfile=\"$fix_srcfile_path\"
-    fi
-    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
-    case $qsrcfile in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-      qsrcfile="\"$qsrcfile\"" ;;
+      *)
+        func_fatal_help "invalid operation mode \`$mode'"
+        ;;
     esac
 
-    $run $rm "$libobj" "${libobj}T"
+    $ECHO
+    $ECHO "Try \`$progname --help' for more information about other modes."
 
-    # Create a libtool object file (analogous to a ".la" file),
-    # but don't create it if we're doing a dry run.
-    test -z "$run" && cat > ${libobj}T <<EOF
-# $libobj - a libtool object file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
+    exit $?
+}
 
-# Name of the PIC object.
-EOF
+# Generated shell functions inserted here.
 
-    # Only build a PIC object if we are building libtool libraries.
-    if test "$build_libtool_libs" = yes; then
-      # Without this assignment, base_compile gets emptied.
-      fbsd_hideous_sh_bug=$base_compile
 
-      if test "$pic_mode" != no; then
-       command="$base_compile $qsrcfile $pic_flag"
-      else
-       # Don't build PIC code
-       command="$base_compile $qsrcfile"
-      fi
+# Parse options once, thoroughly.  This comes as soon as possible in
+# the script to make things like `libtool --version' happen quickly.
+{
 
-      if test ! -d "${xdir}$objdir"; then
-       $show "$mkdir ${xdir}$objdir"
-       $run $mkdir ${xdir}$objdir
-       exit_status=$?
-       if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
-         exit $exit_status
-       fi
-      fi
+  # Shorthand for --mode=foo, only valid as the first argument
+  case $1 in
+  clean|clea|cle|cl)
+    shift; set dummy --mode clean ${1+"$@"}; shift
+    ;;
+  compile|compil|compi|comp|com|co|c)
+    shift; set dummy --mode compile ${1+"$@"}; shift
+    ;;
+  execute|execut|execu|exec|exe|ex|e)
+    shift; set dummy --mode execute ${1+"$@"}; shift
+    ;;
+  finish|finis|fini|fin|fi|f)
+    shift; set dummy --mode finish ${1+"$@"}; shift
+    ;;
+  install|instal|insta|inst|ins|in|i)
+    shift; set dummy --mode install ${1+"$@"}; shift
+    ;;
+  link|lin|li|l)
+    shift; set dummy --mode link ${1+"$@"}; shift
+    ;;
+  uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+    shift; set dummy --mode uninstall ${1+"$@"}; shift
+    ;;
+  esac
 
-      if test -z "$output_obj"; then
-       # Place PIC objects in $objdir
-       command="$command -o $lobj"
-      fi
+  # Parse non-mode specific arguments:
+  while test "$#" -gt 0; do
+    opt="$1"
+    shift
 
-      $run $rm "$lobj" "$output_obj"
+    case $opt in
+      --config)                func_config                                     ;;
 
-      $show "$command"
-      if $run eval "$command"; then :
-      else
-       test -n "$output_obj" && $run $rm $removelist
-       exit $EXIT_FAILURE
-      fi
+      --debug)         preserve_args="$preserve_args $opt"
+                       func_echo "enabling shell trace mode"
+                       opt_debug='set -x'
+                       $opt_debug
+                       ;;
 
-      if test "$need_locks" = warn &&
-        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-       $echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
+      -dlopen)         test "$#" -eq 0 && func_missing_arg "$opt" && break
+                       execute_dlfiles="$execute_dlfiles $1"
+                       shift
+                       ;;
 
-but it should contain:
-$srcfile
+      --dry-run | -n)  opt_dry_run=:                                   ;;
+      --features)       func_features                                  ;;
+      --finish)                mode="finish"                                   ;;
+
+      --mode)          test "$#" -eq 0 && func_missing_arg "$opt" && break
+                       case $1 in
+                         # Valid mode arguments:
+                         clean)        ;;
+                         compile)      ;;
+                         execute)      ;;
+                         finish)       ;;
+                         install)      ;;
+                         link)         ;;
+                         relink)       ;;
+                         uninstall)    ;;
+
+                         # Catch anything else as an error
+                         *) func_error "invalid argument for $opt"
+                            exit_cmd=exit
+                            break
+                            ;;
+                       esac
+
+                       mode="$1"
+                       shift
+                       ;;
 
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
+      --preserve-dup-deps)
+                       opt_duplicate_deps=:                            ;;
 
-       $run $rm $removelist
-       exit $EXIT_FAILURE
-      fi
+      --quiet|--silent)        preserve_args="$preserve_args $opt"
+                       opt_silent=:
+                       ;;
 
-      # Just move the object if needed, then go on to compile the next one
-      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
-       $show "$mv $output_obj $lobj"
-       if $run $mv $output_obj $lobj; then :
-       else
-         error=$?
-         $run $rm $removelist
-         exit $error
-       fi
-      fi
+      --verbose| -v)   preserve_args="$preserve_args $opt"
+                       opt_silent=false
+                       ;;
 
-      # Append the name of the PIC object to the libtool object file.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object='$objdir/$objname'
+      --tag)           test "$#" -eq 0 && func_missing_arg "$opt" && break
+                       preserve_args="$preserve_args $opt $1"
+                       func_enable_tag "$1"    # tagname is set here
+                       shift
+                       ;;
 
-EOF
+      # Separate optargs to long options:
+      -dlopen=*|--mode=*|--tag=*)
+                       func_opt_split "$opt"
+                       set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+                       shift
+                       ;;
 
-      # Allow error messages only from the first compilation.
-      if test "$suppress_opt" = yes; then
-        suppress_output=' >/dev/null 2>&1'
-      fi
-    else
-      # No PIC object so indicate it doesn't exist in the libtool
-      # object file.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object=none
+      -\?|-h)          func_usage                                      ;;
+      --help)          opt_help=:                                      ;;
+      --version)       func_version                                    ;;
 
-EOF
-    fi
+      -*)              func_fatal_help "unrecognized option \`$opt'"   ;;
 
-    # Only build a position-dependent object if we build old libraries.
-    if test "$build_old_libs" = yes; then
-      if test "$pic_mode" != yes; then
-       # Don't build PIC code
-       command="$base_compile $qsrcfile"
-      else
-       command="$base_compile $qsrcfile $pic_flag"
-      fi
-      if test "$compiler_c_o" = yes; then
-       command="$command -o $obj"
-      fi
+      *)               nonopt="$opt"
+                       break
+                       ;;
+    esac
+  done
 
-      # Suppress compiler output if we already did a PIC compilation.
-      command="$command$suppress_output"
-      $run $rm "$obj" "$output_obj"
-      $show "$command"
-      if $run eval "$command"; then :
+  # Now that we've collected a possible --mode arg, show help if necessary
+  $opt_help && func_mode_help
+
+  case $host in
+    *cygwin* | *mingw* | *pw32*)
+      # don't eliminate duplications in $postdeps and $predeps
+      opt_duplicate_compiler_generated_deps=:
+      ;;
+    *)
+      opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+      ;;
+  esac
+
+  # Having warned about all mis-specified options, bail out if
+  # anything was wrong.
+  $exit_cmd $EXIT_FAILURE
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+  if test "$package_revision" != "$macro_revision"; then
+    if test "$VERSION" != "$macro_version"; then
+      if test -z "$macro_version"; then
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
       else
-       $run $rm $removelist
-       exit $EXIT_FAILURE
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
       fi
+    else
+      cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+    fi
 
-      if test "$need_locks" = warn &&
-        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-       $echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
+    exit $EXIT_MISMATCH
+  fi
+}
 
-but it should contain:
-$srcfile
 
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
+## ----------- ##
+##    Main.    ##
+## ----------- ##
 
-       $run $rm $removelist
-       exit $EXIT_FAILURE
-      fi
+{
+  # Sanity checks first:
+  func_check_version_match
 
-      # Just move the object if needed
-      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
-       $show "$mv $output_obj $obj"
-       if $run $mv $output_obj $obj; then :
-       else
-         error=$?
-         $run $rm $removelist
-         exit $error
-       fi
-      fi
+  if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+    func_fatal_configuration "not configured to build any kind of library"
+  fi
 
-      # Append the name of the non-PIC object the libtool object file.
-      # Only append if the libtool object file exists.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object='$objname'
+  test -z "$mode" && func_fatal_error "error: you must specify a MODE."
 
-EOF
-    else
-      # Append the name of the non-PIC object the libtool object file.
-      # Only append if the libtool object file exists.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object=none
 
-EOF
+  # Darwin sucks
+  eval std_shrext=\"$shrext_cmds\"
+
+
+  # Only execute mode is allowed to have -dlopen flags.
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
+    func_error "unrecognized option \`-dlopen'"
+    $ECHO "$help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+
+  # Change the help message to a mode-specific one.
+  generic_help="$help"
+  help="Try \`$progname --help --mode=$mode' for more information."
+}
+
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+    $SED -e 4q "$1" 2>/dev/null \
+      | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs.  To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway.  Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+    lalib_p=no
+    if test -r "$1" && exec 5<&1 <"$1"; then
+       for lalib_p_l in 1 2 3 4
+       do
+           read lalib_p_line
+           case "$lalib_p_line" in
+               \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+           esac
+       done
+       exec 1<&5 5<&-
     fi
+    test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+    func_lalib_p "$1"
+}
 
-    $run $mv "${libobj}T" "${libobj}"
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+    func_ltwrapper_exec_suffix=
+    case $1 in
+    *.exe) ;;
+    *) func_ltwrapper_exec_suffix=.exe ;;
+    esac
+    $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
 
-    # Unlock the critical section if it was locked
-    if test "$need_locks" != no; then
-      $run $rm "$lockfile"
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+    func_ltwrapper_scriptname_result=""
+    if func_ltwrapper_executable_p "$1"; then
+       func_dirname_and_basename "$1" "" "."
+       func_stripname '' '.exe' "$func_basename_result"
+       func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
     fi
+}
 
-    exit $EXIT_SUCCESS
-    ;;
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+    func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
 
-  # libtool link mode
-  link | relink)
-    modename="$modename: link"
-    case $host in
-    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-      # It is impossible to link a dll without this setting, and
-      # we shouldn't force the makefile maintainer to figure out
-      # which system we are compiling for in order to pass an extra
-      # flag for every libtool invocation.
-      # allow_undefined=no
 
-      # FIXME: Unfortunately, there are problems with the above when trying
-      # to make a dll which has undefined symbols, in which case not
-      # even a static library is built.  For now, we need to specify
-      # -no-undefined on the libtool link line when we can be certain
-      # that all symbols are satisfied, otherwise we get a static library.
-      allow_undefined=yes
-      ;;
-    *)
-      allow_undefined=yes
-      ;;
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+    $opt_debug
+    save_ifs=$IFS; IFS='~'
+    for cmd in $1; do
+      IFS=$save_ifs
+      eval cmd=\"$cmd\"
+      func_show_eval "$cmd" "${2-:}"
+    done
+    IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)!  Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+    $opt_debug
+    case $1 in
+    */* | *\\*)        . "$1" ;;
+    *)         . "./$1" ;;
     esac
-    libtool_args="$nonopt"
-    base_compile="$nonopt $@"
-    compile_command="$nonopt"
-    finalize_command="$nonopt"
+}
 
-    compile_rpath=
-    finalize_rpath=
-    compile_shlibpath=
-    finalize_shlibpath=
-    convenience=
-    old_convenience=
-    deplibs=
-    old_deplibs=
-    compiler_flags=
-    linker_flags=
-    dllsearchpath=
-    lib_search_path=`pwd`
-    inst_prefix_dir=
 
-    avoid_version=no
-    dlfiles=
-    dlprefiles=
-    dlself=no
-    export_dynamic=no
-    export_symbols=
-    export_symbols_regex=
-    generated=
-    libobjs=
-    ltlibs=
-    module=no
-    no_install=no
-    objs=
-    non_pic_objects=
-    notinst_path= # paths that contain not-installed libtool libraries
-    precious_files_regex=
-    prefer_static_libs=no
-    preload=no
-    prev=
-    prevarg=
-    release=
-    rpath=
-    xrpath=
-    perm_rpath=
-    temp_rpath=
-    thread_safe=no
-    vinfo=
-    vinfo_number=no
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+  $opt_debug
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+       $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 |
+       $SED -n -e '
+           1,100{
+               / I /{
+                   s,.*,import,
+                   p
+                   q
+               }
+           }'`
+      case $win32_nmres in
+      import*)  win32_libid_type="x86 archive import";;
+      *)        win32_libid_type="x86 archive static";;
+      esac
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $ECHO "$win32_libid_type"
+}
 
-    func_infer_tag $base_compile
 
-    # We need to know -static, to get the right output filenames.
-    for arg
-    do
-      case $arg in
-      -all-static | -static)
-       if test "X$arg" = "X-all-static"; then
-         if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
-           $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
-         fi
-         if test -n "$link_static_flag"; then
-           dlopen_self=$dlopen_self_static
-         fi
-         prefer_static_libs=yes
-       else
-         if test -z "$pic_flag" && test -n "$link_static_flag"; then
-           dlopen_self=$dlopen_self_static
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+    $opt_debug
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+        func_quote_for_eval "$arg"
+       CC_quoted="$CC_quoted $func_quote_for_eval_result"
+      done
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+       for z in $available_tags; do
+         if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+           # Evaluate the configuration.
+           eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+           CC_quoted=
+           for arg in $CC; do
+             # Double-quote args containing other shell metacharacters.
+             func_quote_for_eval "$arg"
+             CC_quoted="$CC_quoted $func_quote_for_eval_result"
+           done
+           case "$@ " in
+             " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
+             # The compiler in the base compile command matches
+             # the one in the tagged configuration.
+             # Assume this is the tagged configuration we want.
+             tagname=$z
+             break
+             ;;
+           esac
          fi
-         prefer_static_libs=built
+       done
+       # If $tagname still isn't set, then no tagged configuration
+       # was found and let the user know that the "--tag" command
+       # line option must be used.
+       if test -z "$tagname"; then
+         func_echo "unable to infer tagged configuration"
+         func_fatal_error "specify a tag with \`--tag'"
+#      else
+#        func_verbose "using $tagname tagged configuration"
        fi
-       build_libtool_libs=no
-       build_old_libs=yes
-       break
        ;;
       esac
-    done
+    fi
+}
 
-    # See if our shared archives depend on static archives.
-    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
 
-    # Go through the arguments, transforming them on the way.
-    while test "$#" -gt 0; do
-      arg="$1"
-      shift
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-       qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
-       ;;
-      *) qarg=$arg ;;
-      esac
-      libtool_args="$libtool_args $qarg"
 
-      # If the previous option needs an argument, assign it.
-      if test -n "$prev"; then
-       case $prev in
-       output)
-         compile_command="$compile_command @OUTPUT@"
-         finalize_command="$finalize_command @OUTPUT@"
-         ;;
-       esac
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+    $opt_debug
+    my_outputname="$1"
+    my_originator="$2"
+    my_pic_p="${3-no}"
+    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+    my_dlsyms=
+
+    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+      if test -n "$NM" && test -n "$global_symbol_pipe"; then
+       my_dlsyms="${my_outputname}S.c"
+      else
+       func_error "not configured to extract global symbols from dlpreopened files"
+      fi
+    fi
 
-       case $prev in
-       dlfiles|dlprefiles)
-         if test "$preload" = no; then
-           # Add the symbol object into the linking commands.
-           compile_command="$compile_command @SYMFILE@"
-           finalize_command="$finalize_command @SYMFILE@"
-           preload=yes
+    if test -n "$my_dlsyms"; then
+      case $my_dlsyms in
+      "") ;;
+      *.c)
+       # Discover the nlist of each of the dlfiles.
+       nlist="$output_objdir/${my_outputname}.nm"
+
+       func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+       # Parse the name list into a source file.
+       func_verbose "creating $output_objdir/$my_dlsyms"
+
+       $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+       if test "$dlself" = yes; then
+         func_verbose "generating symbol list for \`$output'"
+
+         $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+         # Add our own program objects to the symbol list.
+         progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+         for progfile in $progfiles; do
+           func_verbose "extracting global C symbols from \`$progfile'"
+           $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
+         done
+
+         if test -n "$exclude_expsyms"; then
+           $opt_dry_run || {
+             eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+             eval '$MV "$nlist"T "$nlist"'
+           }
          fi
-         case $arg in
-         *.la | *.lo) ;;  # We handle these cases below.
-         force)
-           if test "$dlself" = no; then
-             dlself=needless
-             export_dynamic=yes
-           fi
-           prev=
-           continue
-           ;;
-         self)
-           if test "$prev" = dlprefiles; then
-             dlself=yes
-           elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
-             dlself=yes
-           else
-             dlself=needless
-             export_dynamic=yes
-           fi
-           prev=
-           continue
-           ;;
-         *)
-           if test "$prev" = dlfiles; then
-             dlfiles="$dlfiles $arg"
-           else
-             dlprefiles="$dlprefiles $arg"
-           fi
-           prev=
-           continue
-           ;;
-         esac
-         ;;
-       expsyms)
-         export_symbols="$arg"
-         if test ! -f "$arg"; then
-           $echo "$modename: symbol file \`$arg' does not exist"
-           exit $EXIT_FAILURE
+
+         if test -n "$export_symbols_regex"; then
+           $opt_dry_run || {
+             eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+             eval '$MV "$nlist"T "$nlist"'
+           }
          fi
-         prev=
-         continue
-         ;;
-       expsyms_regex)
-         export_symbols_regex="$arg"
-         prev=
-         continue
-         ;;
-       inst_prefix)
-         inst_prefix_dir="$arg"
-         prev=
-         continue
-         ;;
-       precious_regex)
-         precious_files_regex="$arg"
-         prev=
-         continue
-         ;;
-       release)
-         release="-$arg"
-         prev=
-         continue
-         ;;
-       objectlist)
-         if test -f "$arg"; then
-           save_arg=$arg
-           moreargs=
-           for fil in `cat $save_arg`
-           do
-#            moreargs="$moreargs $fil"
-             arg=$fil
-             # A libtool-controlled object.
 
-             # Check to see that this really is a libtool object.
-             if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-               pic_object=
-               non_pic_object=
+         # Prepare the list of exported symbols
+         if test -z "$export_symbols"; then
+           export_symbols="$output_objdir/$outputname.exp"
+           $opt_dry_run || {
+             $RM $export_symbols
+             eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+             case $host in
+             *cygwin* | *mingw* )
+                eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+               ;;
+             esac
+           }
+         else
+           $opt_dry_run || {
+             eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+             eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+             eval '$MV "$nlist"T "$nlist"'
+             case $host in
+               *cygwin | *mingw* )
+                 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+                 ;;
+             esac
+           }
+         fi
+       fi
 
-               # Read the .lo file
-               # If there is no directory component, then add one.
-               case $arg in
-               */* | *\\*) . $arg ;;
-               *) . ./$arg ;;
-               esac
+       for dlprefile in $dlprefiles; do
+         func_verbose "extracting global C symbols from \`$dlprefile'"
+         func_basename "$dlprefile"
+         name="$func_basename_result"
+         $opt_dry_run || {
+           eval '$ECHO ": $name " >> "$nlist"'
+           eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+         }
+       done
 
-               if test -z "$pic_object" || \
-                  test -z "$non_pic_object" ||
-                  test "$pic_object" = none && \
-                  test "$non_pic_object" = none; then
-                 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
-                 exit $EXIT_FAILURE
-               fi
+       $opt_dry_run || {
+         # Make sure we have at least an empty file.
+         test -f "$nlist" || : > "$nlist"
 
-               # Extract subdirectory from the argument.
-               xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-               if test "X$xdir" = "X$arg"; then
-                 xdir=
-               else
-                 xdir="$xdir/"
-               fi
+         if test -n "$exclude_expsyms"; then
+           $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+           $MV "$nlist"T "$nlist"
+         fi
 
-               if test "$pic_object" != none; then
-                 # Prepend the subdirectory the object is found in.
-                 pic_object="$xdir$pic_object"
+         # Try sorting and uniquifying the output.
+         if $GREP -v "^: " < "$nlist" |
+             if sort -k 3 </dev/null >/dev/null 2>&1; then
+               sort -k 3
+             else
+               sort +2
+             fi |
+             uniq > "$nlist"S; then
+           :
+         else
+           $GREP -v "^: " < "$nlist" > "$nlist"S
+         fi
 
-                 if test "$prev" = dlfiles; then
-                   if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-                     dlfiles="$dlfiles $pic_object"
-                     prev=
-                     continue
-                   else
-                     # If libtool objects are unsupported, then we need to preload.
-                     prev=dlprefiles
-                   fi
-                 fi
+         if test -f "$nlist"S; then
+           eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+         else
+           $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
+         fi
 
-                 # CHECK ME:  I think I busted this.  -Ossama
-                 if test "$prev" = dlprefiles; then
-                   # Preload the old-style object.
-                   dlprefiles="$dlprefiles $pic_object"
-                   prev=
-                 fi
+         $ECHO >> "$output_objdir/$my_dlsyms" "\
 
-                 # A PIC object.
-                 libobjs="$libobjs $pic_object"
-                 arg="$pic_object"
-               fi
+/* The mapping between symbol names and symbols.  */
+typedef struct {
+  const char *name;
+  void *address;
+} lt_dlsymlist;
+"
+         case $host in
+         *cygwin* | *mingw* )
+           $ECHO >> "$output_objdir/$my_dlsyms" "\
+/* DATA imports from DLLs on WIN32 con't be const, because
+   runtime relocations are performed -- see ld's documentation
+   on pseudo-relocs.  */"
+           lt_dlsym_const= ;;
+         *osf5*)
+           echo >> "$output_objdir/$my_dlsyms" "\
+/* This system does not cope well with relocations in const data */"
+           lt_dlsym_const= ;;
+         *)
+           lt_dlsym_const=const ;;
+         esac
 
-               # Non-PIC object.
-               if test "$non_pic_object" != none; then
-                 # Prepend the subdirectory the object is found in.
-                 non_pic_object="$xdir$non_pic_object"
+         $ECHO >> "$output_objdir/$my_dlsyms" "\
+extern $lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+$lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+  { \"$my_originator\", (void *) 0 },"
 
-                 # A standard non-PIC object
-                 non_pic_objects="$non_pic_objects $non_pic_object"
-                 if test -z "$pic_object" || test "$pic_object" = none ; then
-                   arg="$non_pic_object"
-                 fi
-               else
-                 # If the PIC object exists, use it instead.
-                 # $xdir was prepended to $pic_object above.
-                 non_pic_object="$pic_object"
-                 non_pic_objects="$non_pic_objects $non_pic_object"
-               fi
-             else
-               # Only an error if not doing a dry-run.
-               if test -z "$run"; then
-                 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
-                 exit $EXIT_FAILURE
-               else
-                 # Dry-run case.
+         case $need_lib_prefix in
+         no)
+           eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+           ;;
+         *)
+           eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+           ;;
+         esac
+         $ECHO >> "$output_objdir/$my_dlsyms" "\
+  {0, (void *) 0}
+};
 
-                 # Extract subdirectory from the argument.
-                 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-                 if test "X$xdir" = "X$arg"; then
-                   xdir=
-                 else
-                   xdir="$xdir/"
-                 fi
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
 
-                 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
-                 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
-                 libobjs="$libobjs $pic_object"
-                 non_pic_objects="$non_pic_objects $non_pic_object"
-               fi
-             fi
-           done
-         else
-           $echo "$modename: link input file \`$save_arg' does not exist"
-           exit $EXIT_FAILURE
-         fi
-         arg=$save_arg
-         prev=
-         continue
-         ;;
-       rpath | xrpath)
-         # We need an absolute path.
-         case $arg in
-         [\\/]* | [A-Za-z]:[\\/]*) ;;
+#ifdef __cplusplus
+}
+#endif\
+"
+       } # !$opt_dry_run
+
+       pic_flag_for_symtable=
+       case "$compile_command " in
+       *" -static "*) ;;
+       *)
+         case $host in
+         # compiling the symbol table file with pic_flag works around
+         # a FreeBSD bug that causes programs to crash when -lm is
+         # linked before any other PIC object.  But we must not use
+         # pic_flag when linking with -static.  The problem exists in
+         # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+         *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+           pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+         *-*-hpux*)
+           pic_flag_for_symtable=" $pic_flag"  ;;
          *)
-           $echo "$modename: only absolute run-paths are allowed" 1>&2
-           exit $EXIT_FAILURE
+           if test "X$my_pic_p" != Xno; then
+             pic_flag_for_symtable=" $pic_flag"
+           fi
            ;;
          esac
-         if test "$prev" = rpath; then
-           case "$rpath " in
-           *" $arg "*) ;;
-           *) rpath="$rpath $arg" ;;
-           esac
+         ;;
+       esac
+       symtab_cflags=
+       for arg in $LTCFLAGS; do
+         case $arg in
+         -pie | -fpie | -fPIE) ;;
+         *) symtab_cflags="$symtab_cflags $arg" ;;
+         esac
+       done
+
+       # Now compile the dynamic symbol file.
+       func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+       # Clean up the generated files.
+       func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+       # Transform the symbol file into the correct name.
+       symfileobj="$output_objdir/${my_outputname}S.$objext"
+       case $host in
+       *cygwin* | *mingw* )
+         if test -f "$output_objdir/$my_outputname.def"; then
+           compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+           finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
          else
-           case "$xrpath " in
-           *" $arg "*) ;;
-           *) xrpath="$xrpath $arg" ;;
-           esac
+           compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+           finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
          fi
-         prev=
-         continue
-         ;;
-       xcompiler)
-         compiler_flags="$compiler_flags $qarg"
-         prev=
-         compile_command="$compile_command $qarg"
-         finalize_command="$finalize_command $qarg"
-         continue
-         ;;
-       xlinker)
-         linker_flags="$linker_flags $qarg"
-         compiler_flags="$compiler_flags $wl$qarg"
-         prev=
-         compile_command="$compile_command $wl$qarg"
-         finalize_command="$finalize_command $wl$qarg"
-         continue
-         ;;
-       xcclinker)
-         linker_flags="$linker_flags $qarg"
-         compiler_flags="$compiler_flags $qarg"
-         prev=
-         compile_command="$compile_command $qarg"
-         finalize_command="$finalize_command $qarg"
-         continue
-         ;;
-       shrext)
-         shrext_cmds="$arg"
-         prev=
-         continue
-         ;;
-       darwin_framework|darwin_framework_skip)
-         test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
-         compile_command="$compile_command $arg"
-         finalize_command="$finalize_command $arg"
-         prev=
-         continue
          ;;
        *)
-         eval "$prev=\"\$arg\""
-         prev=
-         continue
+         compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+         finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
          ;;
        esac
-      fi # test -n "$prev"
-
-      prevarg="$arg"
-
-      case $arg in
-      -all-static)
-       if test -n "$link_static_flag"; then
-         compile_command="$compile_command $link_static_flag"
-         finalize_command="$finalize_command $link_static_flag"
-       fi
-       continue
-       ;;
-
-      -allow-undefined)
-       # FIXME: remove this flag sometime in the future.
-       $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
-       continue
-       ;;
-
-      -avoid-version)
-       avoid_version=yes
-       continue
        ;;
-
-      -dlopen)
-       prev=dlfiles
-       continue
+      *)
+       func_fatal_error "unknown suffix for \`$my_dlsyms'"
        ;;
+      esac
+    else
+      # We keep going just in case the user didn't refer to
+      # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+      # really was required.
 
-      -dlpreopen)
-       prev=dlprefiles
-       continue
-       ;;
+      # Nullify the symbol file.
+      compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+      finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+    fi
+}
 
-      -export-dynamic)
-       export_dynamic=yes
-       continue
-       ;;
-
-      -export-symbols | -export-symbols-regex)
-       if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-         $echo "$modename: more than one -exported-symbols argument is not allowed"
-         exit $EXIT_FAILURE
-       fi
-       if test "X$arg" = "X-export-symbols"; then
-         prev=expsyms
-       else
-         prev=expsyms_regex
-       fi
-       continue
-       ;;
-
-      -framework|-arch|-isysroot)
-       case " $CC " in
-         *" ${arg} ${1} "* | *" ${arg} ${1} "*) 
-               prev=darwin_framework_skip ;;
-         *) compiler_flags="$compiler_flags $arg"
-            prev=darwin_framework ;;
-       esac
-       compile_command="$compile_command $arg"
-       finalize_command="$finalize_command $arg"
-       continue
-       ;;
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    $opt_debug
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+    fi
+}
 
-      -inst-prefix-dir)
-       prev=inst_prefix
-       continue
-       ;;
 
-      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
-      # so, if we see these flags be careful not to treat them like -L
-      -L[A-Z][A-Z]*:*)
-       case $with_gcc/$host in
-       no/*-*-irix* | /*-*-irix*)
-         compile_command="$compile_command $arg"
-         finalize_command="$finalize_command $arg"
-         ;;
-       esac
-       continue
-       ;;
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    $opt_debug
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
 
-      -L*)
-       dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
-       # We need an absolute path.
-       case $dir in
-       [\\/]* | [A-Za-z]:[\\/]*) ;;
-       *)
-         absdir=`cd "$dir" && pwd`
-         if test -z "$absdir"; then
-           $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
-           absdir="$dir"
-           notinst_path="$notinst_path $dir"
-         fi
-         dir="$absdir"
-         ;;
-       esac
-       case "$deplibs " in
-       *" -L$dir "*) ;;
-       *)
-         deplibs="$deplibs -L$dir"
-         lib_search_path="$lib_search_path $dir"
-         ;;
-       esac
-       case $host in
-       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-         testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
-         case :$dllsearchpath: in
-         *":$dir:"*) ;;
-         *) dllsearchpath="$dllsearchpath:$dir";;
-         esac
-         case :$dllsearchpath: in
-         *":$testbindir:"*) ;;
-         *) dllsearchpath="$dllsearchpath:$testbindir";;
-         esac
-         ;;
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+       [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+       *) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      func_basename "$my_xlib"
+      my_xlib="$func_basename_result"
+      my_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+       *" $my_xlib_u "*)
+         extracted_serial=`expr $extracted_serial + 1`
+         my_xlib_u=lt$extracted_serial-$my_xlib ;;
+       *) break ;;
        esac
-       continue
-       ;;
+      done
+      extracted_archives="$extracted_archives $my_xlib_u"
+      my_xdir="$my_gentop/$my_xlib_u"
 
-      -l*)
-       if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
-         case $host in
-         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
-           # These systems don't actually have a C or math library (as such)
-           continue
-           ;;
-         *-*-os2*)
-           # These systems don't actually have a C library (as such)
-           test "X$arg" = "X-lc" && continue
-           ;;
-         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
-           # Do not include libc due to us having libc/libc_r.
-           test "X$arg" = "X-lc" && continue
-           ;;
-         *-*-rhapsody* | *-*-darwin1.[012])
-           # Rhapsody C and math libraries are in the System framework
-           deplibs="$deplibs -framework System"
-           continue
-           ;;
-         *-*-sco3.2v5* | *-*-sco5v6*)
-           # Causes problems with __ctype
-           test "X$arg" = "X-lc" && continue
-           ;;
-         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
-           # Compiler inserts libc in the correct place for threads to work
-           test "X$arg" = "X-lc" && continue
-           ;;
-         esac
-       elif test "X$arg" = "X-lc_r"; then
-        case $host in
-        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
-          # Do not include libc_r directly, use -pthread flag.
-          continue
-          ;;
-        esac
-       fi
-       deplibs="$deplibs $arg"
-       continue
-       ;;
+      func_mkdir_p "$my_xdir"
 
-      # Tru64 UNIX uses -model [arg] to determine the layout of C++
-      # classes, name mangling, and exception handling.
-      -model)
-       compile_command="$compile_command $arg"
-       compiler_flags="$compiler_flags $arg"
-       finalize_command="$finalize_command $arg"
-       prev=xcompiler
-       continue
+      case $host in
+      *-darwin*)
+       func_verbose "Extracting $my_xabs"
+       # Do not bother doing anything if just a dry run
+       $opt_dry_run || {
+         darwin_orig_dir=`pwd`
+         cd $my_xdir || exit $?
+         darwin_archive=$my_xabs
+         darwin_curdir=`pwd`
+         darwin_base_archive=`basename "$darwin_archive"`
+         darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+         if test -n "$darwin_arches"; then
+           darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+           darwin_arch=
+           func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+           for darwin_arch in  $darwin_arches ; do
+             func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+             lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+             cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+             func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+             cd "$darwin_curdir"
+             $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+           done # $darwin_arches
+            ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+           darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
+           darwin_file=
+           darwin_files=
+           for darwin_file in $darwin_filelist; do
+             darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+             lipo -create -output "$darwin_file" $darwin_files
+           done # $darwin_filelist
+           $RM -rf unfat-$$
+           cd "$darwin_orig_dir"
+         else
+           cd $darwin_orig_dir
+           func_extract_an_archive "$my_xdir" "$my_xabs"
+         fi # $darwin_arches
+       } # !$opt_dry_run
        ;;
-
-     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
-       compiler_flags="$compiler_flags $arg"
-       compile_command="$compile_command $arg"
-       finalize_command="$finalize_command $arg"
-       continue
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
        ;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+    done
 
-      -module)
-       module=yes
-       continue
-       ;;
+    func_extract_archives_result="$my_oldobjs"
+}
 
-      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
-      # -r[0-9][0-9]* specifies the processor on the SGI compiler
-      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
-      # +DA*, +DD* enable 64-bit mode on the HP compiler
-      # -q* pass through compiler args for the IBM compiler
-      # -m* pass through architecture-specific compiler args for GCC
-      # -m*, -t[45]*, -txscale* pass through architecture-specific
-      # compiler args for GCC
-      # -pg pass through profiling flag for GCC
-      # @file GCC response files
-      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
-      -t[45]*|-txscale*|@*)
 
-       # Unknown arguments in both finalize_command and compile_command need
-       # to be aesthetically quoted because they are evaled later.
-       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-       case $arg in
-       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
-         arg="\"$arg\""
-         ;;
-       esac
-        compile_command="$compile_command $arg"
-        finalize_command="$finalize_command $arg"
-        compiler_flags="$compiler_flags $arg"
-        continue
-        ;;
 
-      -shrext)
-       prev=shrext
-       continue
-       ;;
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+    write_libobj=${1}
+    if test "$build_libtool_libs" = yes; then
+      write_lobj=\'${2}\'
+    else
+      write_lobj=none
+    fi
 
-      -no-fast-install)
-       fast_install=no
-       continue
-       ;;
+    if test "$build_old_libs" = yes; then
+      write_oldobj=\'${3}\'
+    else
+      write_oldobj=none
+    fi
 
-      -no-install)
-       case $host in
-       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-         # The PATH hackery in wrapper scripts is required on Windows
-         # in order for the loader to find any dlls it needs.
-         $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
-         $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
-         fast_install=no
-         ;;
-       *) no_install=yes ;;
-       esac
-       continue
-       ;;
+    $opt_dry_run || {
+      cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
 
-      -no-undefined)
-       allow_undefined=no
-       continue
-       ;;
+# Name of the PIC object.
+pic_object=$write_lobj
 
-      -objectlist)
-       prev=objectlist
-       continue
-       ;;
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
 
-      -o) prev=output ;;
+EOF
+      mv -f "${write_libobj}T" "${write_libobj}"
+    }
+}
 
-      -precious-files-regex)
-       prev=precious_regex
-       continue
-       ;;
+# func_mode_compile arg...
+func_mode_compile ()
+{
+    $opt_debug
+    # Get the compilation command and the source file.
+    base_compile=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+    pie_flag=
 
-      -release)
-       prev=release
-       continue
+    for arg
+    do
+      case $arg_mode in
+      arg  )
+       # do not "continue".  Instead, add this to base_compile
+       lastarg="$arg"
+       arg_mode=normal
        ;;
 
-      -rpath)
-       prev=rpath
+      target )
+       libobj="$arg"
+       arg_mode=normal
        continue
        ;;
 
-      -R)
-       prev=xrpath
-       continue
-       ;;
+      normal )
+       # Accept any command-line options.
+       case $arg in
+       -o)
+         test -n "$libobj" && \
+           func_fatal_error "you cannot specify \`-o' more than once"
+         arg_mode=target
+         continue
+         ;;
 
-      -R*)
-       dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
-       # We need an absolute path.
-       case $dir in
-       [\\/]* | [A-Za-z]:[\\/]*) ;;
-       *)
-         $echo "$modename: only absolute run-paths are allowed" 1>&2
-         exit $EXIT_FAILURE
+       -pie | -fpie | -fPIE)
+          pie_flag="$pie_flag $arg"
+         continue
          ;;
-       esac
-       case "$xrpath " in
-       *" $dir "*) ;;
-       *) xrpath="$xrpath $dir" ;;
-       esac
-       continue
-       ;;
 
-      -static)
-       # The effects of -static are defined in a previous loop.
-       # We used to do the same as -all-static on platforms that
-       # didn't have a PIC flag, but the assumption that the effects
-       # would be equivalent was wrong.  It would break on at least
-       # Digital Unix and AIX.
-       continue
-       ;;
+       -shared | -static | -prefer-pic | -prefer-non-pic)
+         later="$later $arg"
+         continue
+         ;;
 
-      -thread-safe)
-       thread_safe=yes
-       continue
-       ;;
+       -no-suppress)
+         suppress_opt=no
+         continue
+         ;;
 
-      -version-info)
-       prev=vinfo
-       continue
-       ;;
-      -version-number)
-       prev=vinfo
-       vinfo_number=yes
-       continue
-       ;;
+       -Xcompiler)
+         arg_mode=arg  #  the next one goes into the "base_compile" arg list
+         continue      #  The current "srcfile" will either be retained or
+         ;;            #  replaced later.  I would guess that would be a bug.
 
-      -Wc,*)
-       args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
-       arg=
-       save_ifs="$IFS"; IFS=','
-       for flag in $args; do
+       -Wc,*)
+         func_stripname '-Wc,' '' "$arg"
+         args=$func_stripname_result
+         lastarg=
+         save_ifs="$IFS"; IFS=','
+         for arg in $args; do
+           IFS="$save_ifs"
+           func_quote_for_eval "$arg"
+           lastarg="$lastarg $func_quote_for_eval_result"
+         done
          IFS="$save_ifs"
-         case $flag in
-           *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
-           flag="\"$flag\""
-           ;;
-         esac
-         arg="$arg $wl$flag"
-         compiler_flags="$compiler_flags $flag"
-       done
-       IFS="$save_ifs"
-       arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
-       ;;
+         func_stripname ' ' '' "$lastarg"
+         lastarg=$func_stripname_result
 
-      -Wl,*)
-       args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
-       arg=
-       save_ifs="$IFS"; IFS=','
-       for flag in $args; do
-         IFS="$save_ifs"
-         case $flag in
-           *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
-           flag="\"$flag\""
-           ;;
-         esac
-         arg="$arg $wl$flag"
-         compiler_flags="$compiler_flags $wl$flag"
-         linker_flags="$linker_flags $flag"
-       done
-       IFS="$save_ifs"
-       arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+         # Add the arguments to base_compile.
+         base_compile="$base_compile $lastarg"
+         continue
+         ;;
+
+       *)
+         # Accept the current argument as the source file.
+         # The previous "srcfile" becomes the current argument.
+         #
+         lastarg="$srcfile"
+         srcfile="$arg"
+         ;;
+       esac  #  case $arg
        ;;
+      esac    #  case $arg_mode
 
-      -Xcompiler)
-       prev=xcompiler
+      # Aesthetically quote the previous argument.
+      func_quote_for_eval "$lastarg"
+      base_compile="$base_compile $func_quote_for_eval_result"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      func_fatal_error "you must specify an argument for -Xcompile"
+      ;;
+    target)
+      func_fatal_error "you must specify a target with \`-o'"
+      ;;
+    *)
+      # Get the name of the library object.
+      test -z "$libobj" && {
+       func_basename "$srcfile"
+       libobj="$func_basename_result"
+      }
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    xform='[cCFSifmso]'
+    case $libobj in
+    *.ada) xform=ada ;;
+    *.adb) xform=adb ;;
+    *.ads) xform=ads ;;
+    *.asm) xform=asm ;;
+    *.c++) xform=c++ ;;
+    *.cc) xform=cc ;;
+    *.ii) xform=ii ;;
+    *.class) xform=class ;;
+    *.cpp) xform=cpp ;;
+    *.cxx) xform=cxx ;;
+    *.[fF][09]?) xform='[fF][09].' ;;
+    *.for) xform=for ;;
+    *.java) xform=java ;;
+    *.obj) xform=obj ;;
+    *.sx) xform=sx ;;
+    esac
+
+    libobj=`$ECHO "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+    case $libobj in
+    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+    *)
+      func_fatal_error "cannot determine name of library object from \`$libobj'"
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -shared)
+       test "$build_libtool_libs" != yes && \
+         func_fatal_configuration "can not build a shared library"
+       build_old_libs=no
        continue
        ;;
 
-      -Xlinker)
-       prev=xlinker
+      -static)
+       build_libtool_libs=no
+       build_old_libs=yes
        continue
        ;;
 
-      -XCClinker)
-       prev=xcclinker
+      -prefer-pic)
+       pic_mode=yes
        continue
        ;;
 
-      # Some other compiler flag.
-      -* | +*)
-       # Unknown arguments in both finalize_command and compile_command need
-       # to be aesthetically quoted because they are evaled later.
-       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-       case $arg in
-       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
-         arg="\"$arg\""
-         ;;
-       esac
+      -prefer-non-pic)
+       pic_mode=no
+       continue
        ;;
+      esac
+    done
 
-      *.$objext)
-       # A standard object.
-       objs="$objs $arg"
-       ;;
+    func_quote_for_eval "$libobj"
+    test "X$libobj" != "X$func_quote_for_eval_result" \
+      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'   &()|`$[]' \
+      && func_warning "libobj name \`$libobj' may not contain shell special characters."
+    func_dirname_and_basename "$obj" "/" ""
+    objname="$func_basename_result"
+    xdir="$func_dirname_result"
+    lobj=${xdir}$objdir/$objname
 
-      *.lo)
-       # A libtool-controlled object.
+    test -z "$base_compile" && \
+      func_fatal_help "you must specify a compilation command"
 
-       # Check to see that this really is a libtool object.
-       if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-         pic_object=
-         non_pic_object=
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
 
-         # Read the .lo file
-         # If there is no directory component, then add one.
-         case $arg in
-         */* | *\\*) . $arg ;;
-         *) . ./$arg ;;
-         esac
+    $opt_dry_run || $RM $removelist
+    trap "$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE" 1 2 15
 
-         if test -z "$pic_object" || \
-            test -z "$non_pic_object" ||
-            test "$pic_object" = none && \
-            test "$non_pic_object" = none; then
-           $echo "$modename: cannot find name of object for \`$arg'" 1>&2
-           exit $EXIT_FAILURE
-         fi
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
 
-         # Extract subdirectory from the argument.
-         xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-         if test "X$xdir" = "X$arg"; then
-           xdir=
-         else
-           xdir="$xdir/"
-         fi
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+      removelist="$removelist $output_obj $lockfile"
+      trap "$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE" 1 2 15
+    else
+      output_obj=
+      need_locks=no
+      lockfile=
+    fi
 
-         if test "$pic_object" != none; then
-           # Prepend the subdirectory the object is found in.
-           pic_object="$xdir$pic_object"
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+       func_echo "Waiting for $lockfile to be removed"
+       sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+       $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
 
-           if test "$prev" = dlfiles; then
-             if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-               dlfiles="$dlfiles $pic_object"
-               prev=
-               continue
-             else
-               # If libtool objects are unsupported, then we need to preload.
-               prev=dlprefiles
-             fi
-           fi
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
 
-           # CHECK ME:  I think I busted this.  -Ossama
-           if test "$prev" = dlprefiles; then
-             # Preload the old-style object.
-             dlprefiles="$dlprefiles $pic_object"
-             prev=
-           fi
+       $opt_dry_run || $RM $removelist
+       exit $EXIT_FAILURE
+      fi
+      $ECHO "$srcfile" > "$lockfile"
+    fi
 
-           # A PIC object.
-           libobjs="$libobjs $pic_object"
-           arg="$pic_object"
-         fi
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+    func_quote_for_eval "$srcfile"
+    qsrcfile=$func_quote_for_eval_result
 
-         # Non-PIC object.
-         if test "$non_pic_object" != none; then
-           # Prepend the subdirectory the object is found in.
-           non_pic_object="$xdir$non_pic_object"
+    $opt_dry_run || $RM "$libobj" "${libobj}T"
 
-           # A standard non-PIC object
-           non_pic_objects="$non_pic_objects $non_pic_object"
-           if test -z "$pic_object" || test "$pic_object" = none ; then
-             arg="$non_pic_object"
-           fi
-         else
-           # If the PIC object exists, use it instead.
-           # $xdir was prepended to $pic_object above.
-           non_pic_object="$pic_object"
-           non_pic_objects="$non_pic_objects $non_pic_object"
-         fi
-       else
-         # Only an error if not doing a dry-run.
-         if test -z "$run"; then
-           $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
-           exit $EXIT_FAILURE
-         else
-           # Dry-run case.
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
 
-           # Extract subdirectory from the argument.
-           xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-           if test "X$xdir" = "X$arg"; then
-             xdir=
-           else
-             xdir="$xdir/"
-           fi
+      if test "$pic_mode" != no; then
+       command="$base_compile $qsrcfile $pic_flag"
+      else
+       # Don't build PIC code
+       command="$base_compile $qsrcfile"
+      fi
 
-           pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
-           non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
-           libobjs="$libobjs $pic_object"
-           non_pic_objects="$non_pic_objects $non_pic_object"
-         fi
-       fi
-       ;;
+      func_mkdir_p "$xdir$objdir"
 
-      *.$libext)
-       # An archive.
-       deplibs="$deplibs $arg"
-       old_deplibs="$old_deplibs $arg"
-       continue
-       ;;
+      if test -z "$output_obj"; then
+       # Place PIC objects in $objdir
+       command="$command -o $lobj"
+      fi
+
+      $opt_dry_run || $RM "$lobj" "$output_obj"
+
+      func_show_eval "$command"        \
+          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+      if test "$need_locks" = warn &&
+        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+       $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+       $opt_dry_run || $RM $removelist
+       exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+       func_show_eval '$MV "$output_obj" "$lobj"' \
+         'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+       suppress_output=' >/dev/null 2>&1'
+      fi
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+       # Don't build PIC code
+       command="$base_compile $qsrcfile$pie_flag"
+      else
+       command="$base_compile $qsrcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+       command="$command -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      $opt_dry_run || $RM "$obj" "$output_obj"
+      func_show_eval "$command" \
+        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+      if test "$need_locks" = warn &&
+        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+       $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+       $opt_dry_run || $RM $removelist
+       exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+       func_show_eval '$MV "$output_obj" "$obj"' \
+         'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+    fi
+
+    $opt_dry_run || {
+      func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
 
+      # Unlock the critical section if it was locked
+      if test "$need_locks" != no; then
+        $RM "$lockfile"
+      fi
+    }
+
+    exit $EXIT_SUCCESS
+}
+
+test "$mode" = compile && func_mode_compile ${1+"$@"}
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+    $opt_debug
+    # The first argument is the command name.
+    cmd="$nonopt"
+    test -z "$cmd" && \
+      func_fatal_help "you must specify a COMMAND"
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      test -f "$file" \
+       || func_fatal_help "\`$file' is not a file"
+
+      dir=
+      case $file in
       *.la)
-       # A libtool-controlled library.
+       # Check to see that this really is a libtool archive.
+       func_lalib_unsafe_p "$file" \
+         || func_fatal_help "\`$lib' is not a valid libtool archive"
 
-       if test "$prev" = dlfiles; then
-         # This library was specified with -dlopen.
-         dlfiles="$dlfiles $arg"
-         prev=
-       elif test "$prev" = dlprefiles; then
-         # The library was specified with -dlpreopen.
-         dlprefiles="$dlprefiles $arg"
-         prev=
+       # Read the libtool library.
+       dlname=
+       library_names=
+       func_source "$file"
+
+       # Skip this library if it cannot be dlopened.
+       if test -z "$dlname"; then
+         # Warn if it was a shared library.
+         test -n "$library_names" && \
+           func_warning "\`$file' was not linked with \`-export-dynamic'"
+         continue
+       fi
+
+       func_dirname "$file" "" "."
+       dir="$func_dirname_result"
+
+       if test -f "$dir/$objdir/$dlname"; then
+         dir="$dir/$objdir"
        else
-         deplibs="$deplibs $arg"
+         if test ! -f "$dir/$dlname"; then
+           func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+         fi
        fi
+       ;;
+
+      *.lo)
+       # Just add the directory containing the .lo file.
+       func_dirname "$file" "" "."
+       dir="$func_dirname_result"
+       ;;
+
+      *)
+       func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
        continue
        ;;
+      esac
 
-      # Some other compiler argument.
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+       eval "$shlibpath_var=\"\$dir\""
+      else
+       eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -*) ;;
       *)
-       # Unknown arguments in both finalize_command and compile_command need
-       # to be aesthetically quoted because they are evaled later.
-       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-       case $arg in
-       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
-         arg="\"$arg\""
-         ;;
-       esac
+       # Do a test to see if this is really a libtool program.
+       if func_ltwrapper_script_p "$file"; then
+         func_source "$file"
+       elif func_ltwrapper_executable_p "$file"; then
+         func_ltwrapper_scriptname "$file"
+         func_source "$func_ltwrapper_scriptname_result"
+       fi
+       # Transform arg to wrapped name.
+       file="$progdir/$program"
        ;;
-      esac # arg
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      func_quote_for_eval "$file"
+      args="$args $func_quote_for_eval_result"
+    done
 
-      # Now actually substitute the argument into the commands.
-      if test -n "$arg"; then
-       compile_command="$compile_command $arg"
-       finalize_command="$finalize_command $arg"
+    if test "X$opt_dry_run" = Xfalse; then
+      if test -n "$shlibpath_var"; then
+       # Export the shlibpath_var.
+       eval "export $shlibpath_var"
       fi
-    done # argument parsing loop
 
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
+      # Restore saved environment variables
+      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+      do
+       eval "if test \"\${save_$lt_var+set}\" = set; then
+                $lt_var=\$save_$lt_var; export $lt_var
+             else
+               $lt_unset $lt_var
+             fi"
+      done
+
+      # Now prepare to actually exec the command.
+      exec_cmd="\$cmd$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+       eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+       $ECHO "export $shlibpath_var"
+      fi
+      $ECHO "$cmd$args"
+      exit $EXIT_SUCCESS
     fi
+}
 
-    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
-      eval arg=\"$export_dynamic_flag_spec\"
-      compile_command="$compile_command $arg"
-      finalize_command="$finalize_command $arg"
+test "$mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+    $opt_debug
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+       libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+       if test -n "$finish_cmds"; then
+         # Do each command in the finish commands.
+         func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+       fi
+       if test -n "$finish_eval"; then
+         # Do the single finish_eval.
+         eval cmds=\"$finish_eval\"
+         $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+       $cmds"
+       fi
+      done
     fi
 
-    oldlibs=
-    # calculate the name of the file, without its directory
-    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
-    libobjs_save="$libobjs"
+    # Exit here if they wanted silent mode.
+    $opt_silent && exit $EXIT_SUCCESS
 
+    $ECHO "X----------------------------------------------------------------------" | $Xsed
+    $ECHO "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      $ECHO "   $libdir"
+    done
+    $ECHO
+    $ECHO "If you ever happen to want to link against installed libraries"
+    $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
+    $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    $ECHO "flag during linking and do at least one of the following:"
     if test -n "$shlibpath_var"; then
-      # get the directories listed in $shlibpath_var
-      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
-    else
-      shlib_search_path=
+      $ECHO "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      $ECHO "     during execution"
     fi
-    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
-    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+    if test -n "$runpath_var"; then
+      $ECHO "   - add LIBDIR to the \`$runpath_var' environment variable"
+      $ECHO "     during linking"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
 
-    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
-    if test "X$output_objdir" = "X$output"; then
-      output_objdir="$objdir"
-    else
-      output_objdir="$output_objdir/$objdir"
+      $ECHO "   - use the \`$flag' linker flag"
     fi
-    # Create the object directory.
-    if test ! -d "$output_objdir"; then
-      $show "$mkdir $output_objdir"
-      $run $mkdir $output_objdir
-      exit_status=$?
-      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
-       exit $exit_status
-      fi
+    if test -n "$admincmds"; then
+      $ECHO "   - have your system administrator run these commands:$admincmds"
     fi
+    if test -f /etc/ld.so.conf; then
+      $ECHO "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+    fi
+    $ECHO
 
-    # Determine the type of output
-    case $output in
-    "")
-      $echo "$modename: you must specify an output file" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-      ;;
-    *.$libext) linkmode=oldlib ;;
-    *.lo | *.$objext) linkmode=obj ;;
-    *.la) linkmode=lib ;;
-    *) linkmode=prog ;; # Anything else should be a program.
-    esac
-
+    $ECHO "See any operating system documentation about shared libraries for"
     case $host in
-    *cygwin* | *mingw* | *pw32*)
-      # don't eliminate duplications in $postdeps and $predeps
-      duplicate_compiler_generated_deps=yes
-      ;;
-    *)
-      duplicate_compiler_generated_deps=$duplicate_deps
-      ;;
+      solaris2.[6789]|solaris2.1[0-9])
+        $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+       $ECHO "pages."
+       ;;
+      *)
+        $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
+        ;;
     esac
-    specialdeplibs=
+    $ECHO "X----------------------------------------------------------------------" | $Xsed
+    exit $EXIT_SUCCESS
+}
 
-    libs=
-    # Find all interdependent deplibs by searching for libraries
-    # that are linked more than once (e.g. -la -lb -la)
-    for deplib in $deplibs; do
-      if test "X$duplicate_deps" = "Xyes" ; then
-       case "$libs " in
-       *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-       esac
-      fi
-      libs="$libs $deplib"
-    done
+test "$mode" = finish && func_mode_finish ${1+"$@"}
 
-    if test "$linkmode" = lib; then
-      libs="$predeps $libs $compiler_lib_search_path $postdeps"
 
-      # Compute libraries that are listed more than once in $predeps
-      # $postdeps and mark them as special (i.e., whose duplicates are
-      # not to be eliminated).
-      pre_post_deps=
-      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
-       for pre_post_dep in $predeps $postdeps; do
-         case "$pre_post_deps " in
-         *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
-         esac
-         pre_post_deps="$pre_post_deps $pre_post_dep"
-       done
-      fi
-      pre_post_deps=
+# func_mode_install arg...
+func_mode_install ()
+{
+    $opt_debug
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
+      # Aesthetically quote it.
+      func_quote_for_eval "$nonopt"
+      install_prog="$func_quote_for_eval_result "
+      arg=$1
+      shift
+    else
+      install_prog=
+      arg=$nonopt
     fi
 
-    deplibs=
-    newdependency_libs=
-    newlib_search_path=
-    need_relink=no # whether we're linking any uninstalled libtool libraries
-    notinst_deplibs= # not-installed libtool libraries
-    case $linkmode in
-    lib)
-       passes="conv link"
-       for file in $dlfiles $dlprefiles; do
-         case $file in
-         *.la) ;;
-         *)
-           $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
-           exit $EXIT_FAILURE
-           ;;
-         esac
-       done
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    func_quote_for_eval "$arg"
+    install_prog="$install_prog$func_quote_for_eval_result"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+       files="$files $dest"
+       dest=$arg
+       continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f)
+       case " $install_prog " in
+       *[\\\ /]cp\ *) ;;
+       *) prev=$arg ;;
+       esac
        ;;
-    prog)
-       compile_deplibs=
-       finalize_deplibs=
-       alldeplibs=no
-       newdlfiles=
-       newdlprefiles=
-       passes="conv scan dlopen dlpreopen link"
+      -g | -m | -o)
+       prev=$arg
        ;;
-    *)  passes="conv"
+      -s)
+       stripme=" -s"
+       continue
        ;;
-    esac
-    for pass in $passes; do
-      if test "$linkmode,$pass" = "lib,link" ||
-        test "$linkmode,$pass" = "prog,scan"; then
-       libs="$deplibs"
-       deplibs=
+      -*)
+       ;;
+      *)
+       # If the previous option needed an argument, then skip it.
+       if test -n "$prev"; then
+         prev=
+       else
+         dest=$arg
+         continue
+       fi
+       ;;
+      esac
+
+      # Aesthetically quote the argument.
+      func_quote_for_eval "$arg"
+      install_prog="$install_prog $func_quote_for_eval_result"
+    done
+
+    test -z "$install_prog" && \
+      func_fatal_help "you must specify an install program"
+
+    test -n "$prev" && \
+      func_fatal_help "the \`$prev' option requires an argument"
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+       func_fatal_help "no file or destination specified"
+      else
+       func_fatal_help "you must specify a destination"
       fi
-      if test "$linkmode" = prog; then
-       case $pass in
-       dlopen) libs="$dlfiles" ;;
-       dlpreopen) libs="$dlprefiles" ;;
-       link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+    fi
+
+    # Strip any trailing slash from the destination.
+    func_stripname '' '/' "$dest"
+    dest=$func_stripname_result
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      func_dirname_and_basename "$dest" "" "."
+      destdir="$func_dirname_result"
+      destname="$func_basename_result"
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files; shift
+      test "$#" -gt 1 && \
+       func_fatal_help "\`$dest' is not a directory"
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+       case $file in
+       *.lo) ;;
+       *)
+         func_fatal_help "\`$destdir' must be an absolute directory name"
+         ;;
        esac
-      fi
-      if test "$pass" = dlopen; then
-       # Collect dlpreopened libraries
-       save_deplibs="$deplibs"
-       deplibs=
-      fi
-      for deplib in $libs; do
-       lib=
-       found=no
-       case $deplib in
-       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
-         if test "$linkmode,$pass" = "prog,link"; then
-           compile_deplibs="$deplib $compile_deplibs"
-           finalize_deplibs="$deplib $finalize_deplibs"
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+       # Do the static libraries later.
+       staticlibs="$staticlibs $file"
+       ;;
+
+      *.la)
+       # Check to see that this really is a libtool archive.
+       func_lalib_unsafe_p "$file" \
+         || func_fatal_help "\`$file' is not a valid libtool archive"
+
+       library_names=
+       old_library=
+       relink_command=
+       func_source "$file"
+
+       # Add the libdir to current_libdirs if it is the destination.
+       if test "X$destdir" = "X$libdir"; then
+         case "$current_libdirs " in
+         *" $libdir "*) ;;
+         *) current_libdirs="$current_libdirs $libdir" ;;
+         esac
+       else
+         # Note the libdir as a future libdir.
+         case "$future_libdirs " in
+         *" $libdir "*) ;;
+         *) future_libdirs="$future_libdirs $libdir" ;;
+         esac
+       fi
+
+       func_dirname "$file" "/" ""
+       dir="$func_dirname_result"
+       dir="$dir$objdir"
+
+       if test -n "$relink_command"; then
+         # Determine the prefix the user has applied to our future dir.
+         inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
+
+         # Don't allow the user to place us outside of our expected
+         # location b/c this prevents finding dependent libraries that
+         # are installed to the same prefix.
+         # At present, this check doesn't affect windows .dll's that
+         # are installed into $libdir/../bin (currently, that works fine)
+         # but it's something to keep an eye on.
+         test "$inst_prefix_dir" = "$destdir" && \
+           func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+         if test -n "$inst_prefix_dir"; then
+           # Stick the inst_prefix_dir data into the link command.
+           relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
          else
-           compiler_flags="$compiler_flags $deplib"
+           relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
          fi
-         continue
-         ;;
-       -l*)
-         if test "$linkmode" != lib && test "$linkmode" != prog; then
-           $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
-           continue
+
+         func_warning "relinking \`$file'"
+         func_show_eval "$relink_command" \
+           'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+       fi
+
+       # See the names of the shared library.
+       set dummy $library_names; shift
+       if test -n "$1"; then
+         realname="$1"
+         shift
+
+         srcname="$realname"
+         test -n "$relink_command" && srcname="$realname"T
+
+         # Install the shared library and build the symlinks.
+         func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+             'exit $?'
+         tstripme="$stripme"
+         case $host_os in
+         cygwin* | mingw* | pw32*)
+           case $realname in
+           *.dll.a)
+             tstripme=""
+             ;;
+           esac
+           ;;
+         esac
+         if test -n "$tstripme" && test -n "$striplib"; then
+           func_show_eval "$striplib $destdir/$realname" 'exit $?'
          fi
-         name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
-         for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
-           for search_ext in .la $std_shrext .so .a; do
-             # Search the libtool library
-             lib="$searchdir/lib${name}${search_ext}"
-             if test -f "$lib"; then
-               if test "$search_ext" = ".la"; then
-                 found=yes
-               else
-                 found=no
-               fi
-               break 2
-             fi
+
+         if test "$#" -gt 0; then
+           # Delete the old symlinks, and create new ones.
+           # Try `ln -sf' first, because the `ln' binary might depend on
+           # the symlink we replace!  Solaris /bin/ln does not understand -f,
+           # so we also need to try rm && ln -s.
+           for linkname
+           do
+             test "$linkname" != "$realname" \
+               && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
            done
-         done
-         if test "$found" != yes; then
-           # deplib doesn't seem to be a libtool library
-           if test "$linkmode,$pass" = "prog,link"; then
-             compile_deplibs="$deplib $compile_deplibs"
-             finalize_deplibs="$deplib $finalize_deplibs"
-           else
-             deplibs="$deplib $deplibs"
-             test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
-           fi
-           continue
-         else # deplib is a libtool library
-           # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
-           # We need to do some special things here, and not later.
-           if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-             case " $predeps $postdeps " in
-             *" $deplib "*)
-               if (${SED} -e '2q' $lib |
-                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-                 library_names=
-                 old_library=
-                 case $lib in
-                 */* | *\\*) . $lib ;;
-                 *) . ./$lib ;;
-                 esac
-                 for l in $old_library $library_names; do
-                   ll="$l"
-                 done
-                 if test "X$ll" = "X$old_library" ; then # only static version available
-                   found=no
-                   ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
-                   test "X$ladir" = "X$lib" && ladir="."
-                   lib=$ladir/$old_library
-                   if test "$linkmode,$pass" = "prog,link"; then
-                     compile_deplibs="$deplib $compile_deplibs"
-                     finalize_deplibs="$deplib $finalize_deplibs"
-                   else
-                     deplibs="$deplib $deplibs"
-                     test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
-                   fi
-                   continue
-                 fi
-               fi
-               ;;
-             *) ;;
-             esac
-           fi
-         fi
-         ;; # -l
-       -L*)
-         case $linkmode in
-         lib)
-           deplibs="$deplib $deplibs"
-           test "$pass" = conv && continue
-           newdependency_libs="$deplib $newdependency_libs"
-           newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
-           ;;
-         prog)
-           if test "$pass" = conv; then
-             deplibs="$deplib $deplibs"
-             continue
-           fi
-           if test "$pass" = scan; then
-             deplibs="$deplib $deplibs"
-           else
-             compile_deplibs="$deplib $compile_deplibs"
-             finalize_deplibs="$deplib $finalize_deplibs"
-           fi
-           newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
-           ;;
-         *)
-           $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
-           ;;
-         esac # linkmode
-         continue
-         ;; # -L
-       -R*)
-         if test "$pass" = link; then
-           dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
-           # Make sure the xrpath contains only unique directories.
-           case "$xrpath " in
-           *" $dir "*) ;;
-           *) xrpath="$xrpath $dir" ;;
-           esac
          fi
-         deplibs="$deplib $deplibs"
-         continue
+
+         # Do each command in the postinstall commands.
+         lib="$destdir/$realname"
+         func_execute_cmds "$postinstall_cmds" 'exit $?'
+       fi
+
+       # Install the pseudo-library for information purposes.
+       func_basename "$file"
+       name="$func_basename_result"
+       instname="$dir/$name"i
+       func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+       # Maybe install the static library, too.
+       test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+       ;;
+
+      *.lo)
+       # Install (i.e. copy) a libtool object.
+
+       # Figure out destination file name, if it wasn't already specified.
+       if test -n "$destname"; then
+         destfile="$destdir/$destname"
+       else
+         func_basename "$file"
+         destfile="$func_basename_result"
+         destfile="$destdir/$destfile"
+       fi
+
+       # Deduce the name of the destination old-style object file.
+       case $destfile in
+       *.lo)
+         func_lo2o "$destfile"
+         staticdest=$func_lo2o_result
          ;;
-       *.la) lib="$deplib" ;;
-       *.$libext)
-         if test "$pass" = conv; then
-           deplibs="$deplib $deplibs"
-           continue
-         fi
-         case $linkmode in
-         lib)
-           valid_a_lib=no
-           case $deplibs_check_method in
-             match_pattern*)
-               set dummy $deplibs_check_method
-               match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
-               if eval $echo \"$deplib\" 2>/dev/null \
-                   | $SED 10q \
-                   | $EGREP "$match_pattern_regex" > /dev/null; then
-                 valid_a_lib=yes
-               fi
-               ;;
-             pass_all)
-               valid_a_lib=yes
-               ;;
-            esac
-           if test "$valid_a_lib" != yes; then
-             $echo
-             $echo "*** Warning: Trying to link with static lib archive $deplib."
-             $echo "*** I have the capability to make that library automatically link in when"
-             $echo "*** you link to this library.  But I can only do this if you have a"
-             $echo "*** shared version of the library, which you do not appear to have"
-             $echo "*** because the file extensions .$libext of this argument makes me believe"
-             $echo "*** that it is just a static archive that I should not used here."
-           else
-             $echo
-             $echo "*** Warning: Linking the shared library $output against the"
-             $echo "*** static library $deplib is not portable!"
-             deplibs="$deplib $deplibs"
-           fi
-           continue
-           ;;
-         prog)
-           if test "$pass" != link; then
-             deplibs="$deplib $deplibs"
-           else
-             compile_deplibs="$deplib $compile_deplibs"
-             finalize_deplibs="$deplib $finalize_deplibs"
-           fi
-           continue
-           ;;
-         esac # linkmode
-         ;; # *.$libext
-       *.lo | *.$objext)
-         if test "$pass" = conv; then
-           deplibs="$deplib $deplibs"
-         elif test "$linkmode" = prog; then
-           if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
-             # If there is no dlopen support or we're linking statically,
-             # we need to preload.
-             newdlprefiles="$newdlprefiles $deplib"
-             compile_deplibs="$deplib $compile_deplibs"
-             finalize_deplibs="$deplib $finalize_deplibs"
-           else
-             newdlfiles="$newdlfiles $deplib"
-           fi
-         fi
-         continue
+       *.$objext)
+         staticdest="$destfile"
+         destfile=
          ;;
-       %DEPLIBS%)
-         alldeplibs=yes
-         continue
+       *)
+         func_fatal_help "cannot copy a libtool object to \`$destfile'"
          ;;
-       esac # case $deplib
-       if test "$found" = yes || test -f "$lib"; then :
-       else
-         $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
-         exit $EXIT_FAILURE
+       esac
+
+       # Install the libtool object if requested.
+       test -n "$destfile" && \
+         func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+       # Install the old object if enabled.
+       if test "$build_old_libs" = yes; then
+         # Deduce the name of the old-style object file.
+         func_lo2o "$file"
+         staticobj=$func_lo2o_result
+         func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
        fi
+       exit $EXIT_SUCCESS
+       ;;
 
-       # Check to see that this really is a libtool archive.
-       if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+      *)
+       # Figure out destination file name, if it wasn't already specified.
+       if test -n "$destname"; then
+         destfile="$destdir/$destname"
        else
-         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-         exit $EXIT_FAILURE
+         func_basename "$file"
+         destfile="$func_basename_result"
+         destfile="$destdir/$destfile"
        fi
 
-       ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
-       test "X$ladir" = "X$lib" && ladir="."
-
-       dlname=
-       dlopen=
-       dlpreopen=
-       libdir=
-       library_names=
-       old_library=
-       # If the library was installed with an old release of libtool,
-       # it will not redefine variables installed, or shouldnotlink
-       installed=yes
-       shouldnotlink=no
-       avoidtemprpath=
-
+       # If the file is missing, and there is a .exe on the end, strip it
+       # because it is most likely a libtool script we actually want to
+       # install
+       stripped_ext=""
+       case $file in
+         *.exe)
+           if test ! -f "$file"; then
+             func_stripname '' '.exe' "$file"
+             file=$func_stripname_result
+             stripped_ext=".exe"
+           fi
+           ;;
+       esac
 
-       # Read the .la file
-       case $lib in
-       */* | *\\*) . $lib ;;
-       *) . ./$lib ;;
+       # Do a test to see if this is really a libtool program.
+       case $host in
+       *cygwin*|*mingw*)
+           if func_ltwrapper_executable_p "$file"; then
+             func_ltwrapper_scriptname "$file"
+             wrapper=$func_ltwrapper_scriptname_result
+           else
+             func_stripname '' '.exe' "$file"
+             wrapper=$func_stripname_result
+           fi
+           ;;
+       *)
+           wrapper=$file
+           ;;
        esac
+       if func_ltwrapper_script_p "$wrapper"; then
+         notinst_deplibs=
+         relink_command=
 
-       if test "$linkmode,$pass" = "lib,link" ||
-          test "$linkmode,$pass" = "prog,scan" ||
-          { test "$linkmode" != prog && test "$linkmode" != lib; }; then
-         test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
-         test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
-       fi
+         func_source "$wrapper"
 
-       if test "$pass" = conv; then
-         # Only check for convenience libraries
-         deplibs="$lib $deplibs"
-         if test -z "$libdir"; then
-           if test -z "$old_library"; then
-             $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
-             exit $EXIT_FAILURE
+         # Check the variables that should have been set.
+         test -z "$generated_by_libtool_version" && \
+           func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+         finalize=yes
+         for lib in $notinst_deplibs; do
+           # Check to see that each library is installed.
+           libdir=
+           if test -f "$lib"; then
+             func_source "$lib"
            fi
-           # It is a libtool convenience library, so add in its objects.
-           convenience="$convenience $ladir/$objdir/$old_library"
-           old_convenience="$old_convenience $ladir/$objdir/$old_library"
-           tmp_libs=
-           for deplib in $dependency_libs; do
-             deplibs="$deplib $deplibs"
-              if test "X$duplicate_deps" = "Xyes" ; then
-               case "$tmp_libs " in
-               *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-               esac
-              fi
-             tmp_libs="$tmp_libs $deplib"
-           done
-         elif test "$linkmode" != prog && test "$linkmode" != lib; then
-           $echo "$modename: \`$lib' is not a convenience library" 1>&2
-           exit $EXIT_FAILURE
-         fi
-         continue
-       fi # $pass = conv
+           libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+           if test -n "$libdir" && test ! -f "$libfile"; then
+             func_warning "\`$lib' has not been installed in \`$libdir'"
+             finalize=no
+           fi
+         done
 
+         relink_command=
+         func_source "$wrapper"
 
-       # Get the name of the library we link against.
-       linklib=
-       for l in $old_library $library_names; do
-         linklib="$l"
-       done
-       if test -z "$linklib"; then
-         $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
-         exit $EXIT_FAILURE
+         outputname=
+         if test "$fast_install" = no && test -n "$relink_command"; then
+           $opt_dry_run || {
+             if test "$finalize" = yes; then
+               tmpdir=`func_mktempdir`
+               func_basename "$file$stripped_ext"
+               file="$func_basename_result"
+               outputname="$tmpdir/$file"
+               # Replace the output file specification.
+               relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+               $opt_silent || {
+                 func_quote_for_expand "$relink_command"
+                 eval "func_echo $func_quote_for_expand_result"
+               }
+               if eval "$relink_command"; then :
+                 else
+                 func_error "error: relink \`$file' with the above command before installing it"
+                 $opt_dry_run || ${RM}r "$tmpdir"
+                 continue
+               fi
+               file="$outputname"
+             else
+               func_warning "cannot relink \`$file'"
+             fi
+           }
+         else
+           # Install the binary that we compiled earlier.
+           file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+         fi
        fi
 
-       # This library was specified with -dlopen.
-       if test "$pass" = dlopen; then
-         if test -z "$libdir"; then
-           $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
-           exit $EXIT_FAILURE
-         fi
-         if test -z "$dlname" ||
-            test "$dlopen_support" != yes ||
-            test "$build_libtool_libs" = no; then
-           # If there is no dlname, no dlopen support or we're linking
-           # statically, we need to preload.  We also need to preload any
-           # dependent libraries so libltdl's deplib preloader doesn't
-           # bomb out in the load deplibs phase.
-           dlprefiles="$dlprefiles $lib $dependency_libs"
-         else
-           newdlfiles="$newdlfiles $lib"
-         fi
-         continue
-       fi # $pass = dlopen
-
-       # We need an absolute path.
-       case $ladir in
-       [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
-       *)
-         abs_ladir=`cd "$ladir" && pwd`
-         if test -z "$abs_ladir"; then
-           $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
-           $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
-           abs_ladir="$ladir"
-         fi
+       # remove .exe since cygwin /usr/bin/install will append another
+       # one anyway
+       case $install_prog,$host in
+       */usr/bin/install*,*cygwin*)
+         case $file:$destfile in
+         *.exe:*.exe)
+           # this is ok
+           ;;
+         *.exe:*)
+           destfile=$destfile.exe
+           ;;
+         *:*.exe)
+           func_stripname '' '.exe' "$destfile"
+           destfile=$func_stripname_result
+           ;;
+         esac
          ;;
        esac
-       laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+       func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+       $opt_dry_run || if test -n "$outputname"; then
+         ${RM}r "$tmpdir"
+       fi
+       ;;
+      esac
+    done
 
-       # Find the relevant object directory and library name.
-       if test "X$installed" = Xyes; then
-         if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-           $echo "$modename: warning: library \`$lib' was moved." 1>&2
-           dir="$ladir"
-           absdir="$abs_ladir"
-           libdir="$abs_ladir"
-         else
-           dir="$libdir"
-           absdir="$libdir"
-         fi
-         test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
-       else
-         if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-           dir="$ladir"
-           absdir="$abs_ladir"
-           # Remove this search path later
-           notinst_path="$notinst_path $abs_ladir"
-         else
-           dir="$ladir/$objdir"
-           absdir="$abs_ladir/$objdir"
-           # Remove this search path later
-           notinst_path="$notinst_path $abs_ladir"
-         fi
-       fi # $installed = yes
-       name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+    for file in $staticlibs; do
+      func_basename "$file"
+      name="$func_basename_result"
 
-       # This library was specified with -dlpreopen.
-       if test "$pass" = dlpreopen; then
-         if test -z "$libdir"; then
-           $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
-           exit $EXIT_FAILURE
-         fi
-         # Prefer using a static library (so that no silly _DYNAMIC symbols
-         # are required to link).
-         if test -n "$old_library"; then
-           newdlprefiles="$newdlprefiles $dir/$old_library"
-         # Otherwise, use the dlname, so that lt_dlopen finds it.
-         elif test -n "$dlname"; then
-           newdlprefiles="$newdlprefiles $dir/$dlname"
-         else
-           newdlprefiles="$newdlprefiles $dir/$linklib"
-         fi
-       fi # $pass = dlpreopen
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
 
-       if test -z "$libdir"; then
-         # Link the convenience library
-         if test "$linkmode" = lib; then
-           deplibs="$dir/$old_library $deplibs"
-         elif test "$linkmode,$pass" = "prog,link"; then
-           compile_deplibs="$dir/$old_library $compile_deplibs"
-           finalize_deplibs="$dir/$old_library $finalize_deplibs"
-         else
-           deplibs="$lib $deplibs" # used for prog,scan pass
-         fi
-         continue
-       fi
+      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
 
+      if test -n "$stripme" && test -n "$old_striplib"; then
+       func_show_eval "$old_striplib $oldlib" 'exit $?'
+      fi
 
-       if test "$linkmode" = prog && test "$pass" != link; then
-         newlib_search_path="$newlib_search_path $ladir"
-         deplibs="$lib $deplibs"
+      # Do each command in the postinstall commands.
+      func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+    done
 
-         linkalldeplibs=no
-         if test "$link_all_deplibs" != no || test -z "$library_names" ||
-            test "$build_libtool_libs" = no; then
-           linkalldeplibs=yes
-         fi
+    test -n "$future_libdirs" && \
+      func_warning "remember to run \`$progname --finish$future_libdirs'"
 
-         tmp_libs=
-         for deplib in $dependency_libs; do
-           case $deplib in
-           -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
-           esac
-           # Need to link against all dependency_libs?
-           if test "$linkalldeplibs" = yes; then
-             deplibs="$deplib $deplibs"
-           else
-             # Need to hardcode shared library paths
-             # or/and link against static libraries
-             newdependency_libs="$deplib $newdependency_libs"
-           fi
-           if test "X$duplicate_deps" = "Xyes" ; then
-             case "$tmp_libs " in
-             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-             esac
-           fi
-           tmp_libs="$tmp_libs $deplib"
-         done # for deplib
-         continue
-       fi # $linkmode = prog...
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      $opt_dry_run && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+}
 
-       if test "$linkmode,$pass" = "prog,link"; then
-         if test -n "$library_names" &&
-            { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
-           # We need to hardcode the library path
-           if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
-             # Make sure the rpath contains only unique directories.
-             case "$temp_rpath " in
-             *" $dir "*) ;;
-             *" $absdir "*) ;;
-             *) temp_rpath="$temp_rpath $absdir" ;;
-             esac
-           fi
+test "$mode" = install && func_mode_install ${1+"$@"}
 
-           # Hardcode the library path.
-           # Skip directories that are in the system default run-time
-           # search path.
-           case " $sys_lib_dlsearch_path " in
-           *" $absdir "*) ;;
-           *)
-             case "$compile_rpath " in
-             *" $absdir "*) ;;
-             *) compile_rpath="$compile_rpath $absdir"
-             esac
-             ;;
-           esac
-           case " $sys_lib_dlsearch_path " in
-           *" $libdir "*) ;;
-           *)
-             case "$finalize_rpath " in
-             *" $libdir "*) ;;
-             *) finalize_rpath="$finalize_rpath $libdir"
-             esac
-             ;;
-           esac
-         fi # $linkmode,$pass = prog,link...
 
-         if test "$alldeplibs" = yes &&
-            { test "$deplibs_check_method" = pass_all ||
-              { test "$build_libtool_libs" = yes &&
-                test -n "$library_names"; }; }; then
-           # We only need to search for static libraries
-           continue
-         fi
+# func_emit_wrapper arg
+#
+# emit a libtool wrapper script on stdout
+# don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable.  Must ONLY be called from within
+# func_mode_link because it depends on a number of variable
+# set therein.
+#
+# arg is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take.  If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the '.lib' directory.  This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+       func_emit_wrapper_arg1=no
+       if test -n "$1" ; then
+         func_emit_wrapper_arg1=$1
        fi
 
-       link_static=no # Whether the deplib will be linked statically
-       use_static_libs=$prefer_static_libs
-       if test "$use_static_libs" = built && test "$installed" = yes ; then
-         use_static_libs=no
-       fi
-       if test -n "$library_names" &&
-          { test "$use_static_libs" = no || test -z "$old_library"; }; then
-         if test "$installed" = no; then
-           notinst_deplibs="$notinst_deplibs $lib"
-           need_relink=yes
-         fi
-         # This is a shared library
+       $ECHO "\
+#! $SHELL
 
-         # Warn about portability, can't link against -module's on
-         # some systems (darwin)
-         if test "$shouldnotlink" = yes && test "$pass" = link ; then
-           $echo
-           if test "$linkmode" = prog; then
-             $echo "*** Warning: Linking the executable $output against the loadable module"
-           else
-             $echo "*** Warning: Linking the shared library $output against the loadable module"
-           fi
-           $echo "*** $linklib is not portable!"
-         fi
-         if test "$linkmode" = lib &&
-            test "$hardcode_into_libs" = yes; then
-           # Hardcode the library path.
-           # Skip directories that are in the system default run-time
-           # search path.
-           case " $sys_lib_dlsearch_path " in
-           *" $absdir "*) ;;
-           *)
-             case "$compile_rpath " in
-             *" $absdir "*) ;;
-             *) compile_rpath="$compile_rpath $absdir"
-             esac
-             ;;
-           esac
-           case " $sys_lib_dlsearch_path " in
-           *" $libdir "*) ;;
-           *)
-             case "$finalize_rpath " in
-             *" $libdir "*) ;;
-             *) finalize_rpath="$finalize_rpath $libdir"
-             esac
-             ;;
-           esac
-         fi
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
 
-         if test -n "$old_archive_from_expsyms_cmds"; then
-           # figure out the soname
-           set dummy $library_names
-           realname="$2"
-           shift; shift
-           libname=`eval \\$echo \"$libname_spec\"`
-           # use dlname if we got it. it's perfectly good, no?
-           if test -n "$dlname"; then
-             soname="$dlname"
-           elif test -n "$soname_spec"; then
-             # bleh windows
-             case $host in
-             *cygwin* | mingw*)
-               major=`expr $current - $age`
-               versuffix="-$major"
-               ;;
-             esac
-             eval soname=\"$soname_spec\"
-           else
-             soname="$realname"
-           fi
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
 
-           # Make a new name for the extract_expsyms_cmds to use
-           soroot="$soname"
-           soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
-           newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
 
-           # If the library has no export list, then create one now
-           if test -f "$output_objdir/$soname-def"; then :
-           else
-             $show "extracting exported symbol list from \`$soname'"
-             save_ifs="$IFS"; IFS='~'
-             cmds=$extract_expsyms_cmds
-             for cmd in $cmds; do
-               IFS="$save_ifs"
-               eval cmd=\"$cmd\"
-               $show "$cmd"
-               $run eval "$cmd" || exit $?
-             done
-             IFS="$save_ifs"
-           fi
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
-           # Create $newlib
-           if test -f "$output_objdir/$newlib"; then :; else
-             $show "generating import library for \`$soname'"
-             save_ifs="$IFS"; IFS='~'
-             cmds=$old_archive_from_expsyms_cmds
-             for cmd in $cmds; do
-               IFS="$save_ifs"
-               eval cmd=\"$cmd\"
-               $show "$cmd"
-               $run eval "$cmd" || exit $?
-             done
-             IFS="$save_ifs"
-           fi
-           # make sure the library variables are pointing to the new library
-           dir=$output_objdir
-           linklib=$newlib
-         fi # test -n "$old_archive_from_expsyms_cmds"
+relink_command=\"$relink_command\"
 
-         if test "$linkmode" = prog || test "$mode" != relink; then
-           add_shlibpath=
-           add_dir=
-           add=
-           lib_linked=yes
-           case $hardcode_action in
-           immediate | unsupported)
-             if test "$hardcode_direct" = no; then
-               add="$dir/$linklib"
-               case $host in
-                 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
-                 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
-                 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
-                   *-*-unixware7*) add_dir="-L$dir" ;;
-                 *-*-darwin* )
-                   # if the lib is a module then we can not link against
-                   # it, someone is ignoring the new warnings I added
-                   if /usr/bin/file -L $add 2> /dev/null |
-                      $EGREP ": [^:]* bundle" >/dev/null ; then
-                     $echo "** Warning, lib $linklib is a module, not a shared library"
-                     if test -z "$old_library" ; then
-                       $echo
-                       $echo "** And there doesn't seem to be a static archive available"
-                       $echo "** The link will probably fail, sorry"
-                     else
-                       add="$dir/$old_library"
-                     fi
-                   fi
-               esac
-             elif test "$hardcode_minus_L" = no; then
-               case $host in
-               *-*-sunos*) add_shlibpath="$dir" ;;
-               esac
-               add_dir="-L$dir"
-               add="-l$name"
-             elif test "$hardcode_shlibpath_var" = no; then
-               add_shlibpath="$dir"
-               add="-l$name"
-             else
-               lib_linked=no
-             fi
-             ;;
-           relink)
-             if test "$hardcode_direct" = yes; then
-               add="$dir/$linklib"
-             elif test "$hardcode_minus_L" = yes; then
-               add_dir="-L$dir"
-               # Try looking first in the location we're being installed to.
-               if test -n "$inst_prefix_dir"; then
-                 case $libdir in
-                   [\\/]*)
-                     add_dir="$add_dir -L$inst_prefix_dir$libdir"
-                     ;;
-                 esac
-               fi
-               add="-l$name"
-             elif test "$hardcode_shlibpath_var" = yes; then
-               add_shlibpath="$dir"
-               add="-l$name"
-             else
-               lib_linked=no
-             fi
-             ;;
-           *) lib_linked=no ;;
-           esac
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variables:
+  generated_by_libtool_version='$macro_version'
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$ECHO are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    ECHO=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$ECHO works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$ECHO will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+       $ECHO "\
 
-           if test "$lib_linked" != yes; then
-             $echo "$modename: configuration error: unsupported hardcode properties"
-             exit $EXIT_FAILURE
-           fi
+  # Find the directory that this script lives in.
+  thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
 
-           if test -n "$add_shlibpath"; then
-             case :$compile_shlibpath: in
-             *":$add_shlibpath:"*) ;;
-             *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
-             esac
-           fi
-           if test "$linkmode" = prog; then
-             test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
-             test -n "$add" && compile_deplibs="$add $compile_deplibs"
-           else
-             test -n "$add_dir" && deplibs="$add_dir $deplibs"
-             test -n "$add" && deplibs="$add $deplibs"
-             if test "$hardcode_direct" != yes && \
-                test "$hardcode_minus_L" != yes && \
-                test "$hardcode_shlibpath_var" = yes; then
-               case :$finalize_shlibpath: in
-               *":$libdir:"*) ;;
-               *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
-               esac
-             fi
-           fi
-         fi
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
 
-         if test "$linkmode" = prog || test "$mode" = relink; then
-           add_shlibpath=
-           add_dir=
-           add=
-           # Finalize command for both is simple: just hardcode it.
-           if test "$hardcode_direct" = yes; then
-             add="$libdir/$linklib"
-           elif test "$hardcode_minus_L" = yes; then
-             add_dir="-L$libdir"
-             add="-l$name"
-           elif test "$hardcode_shlibpath_var" = yes; then
-             case :$finalize_shlibpath: in
-             *":$libdir:"*) ;;
-             *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
-             esac
-             add="-l$name"
-           elif test "$hardcode_automatic" = yes; then
-             if test -n "$inst_prefix_dir" &&
-                test -f "$inst_prefix_dir$libdir/$linklib" ; then
-               add="$inst_prefix_dir$libdir/$linklib"
-             else
-               add="$libdir/$linklib"
-             fi
-           else
-             # We cannot seem to hardcode it, guess we'll fake it.
-             add_dir="-L$libdir"
-             # Try looking first in the location we're being installed to.
-             if test -n "$inst_prefix_dir"; then
-               case $libdir in
-                 [\\/]*)
-                   add_dir="$add_dir -L$inst_prefix_dir$libdir"
-                   ;;
-               esac
-             fi
-             add="-l$name"
-           fi
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
 
-           if test "$linkmode" = prog; then
-             test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
-             test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
-           else
-             test -n "$add_dir" && deplibs="$add_dir $deplibs"
-             test -n "$add" && deplibs="$add $deplibs"
-           fi
-         fi
-       elif test "$linkmode" = prog; then
-         # Here we assume that one of hardcode_direct or hardcode_minus_L
-         # is not unsupported.  This is valid on all known static and
-         # shared platforms.
-         if test "$hardcode_direct" != unsupported; then
-           test -n "$old_library" && linklib="$old_library"
-           compile_deplibs="$dir/$linklib $compile_deplibs"
-           finalize_deplibs="$dir/$linklib $finalize_deplibs"
-         else
-           compile_deplibs="-l$name -L$dir $compile_deplibs"
-           finalize_deplibs="-l$name -L$dir $finalize_deplibs"
-         fi
-       elif test "$build_libtool_libs" = yes; then
-         # Not a shared library
-         if test "$deplibs_check_method" != pass_all; then
-           # We're trying link a shared library against a static one
-           # but the system doesn't support it.
+    file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+  done
 
-           # Just print a warning and add the library to dependency_libs so
-           # that the program can be linked against the static library.
-           $echo
-           $echo "*** Warning: This system can not link to static lib archive $lib."
-           $echo "*** I have the capability to make that library automatically link in when"
-           $echo "*** you link to this library.  But I can only do this if you have a"
-           $echo "*** shared version of the library, which you do not appear to have."
-           if test "$module" = yes; then
-             $echo "*** But as you try to build a module library, libtool will still create "
-             $echo "*** a static module, that should work as long as the dlopening application"
-             $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
-             if test -z "$global_symbol_pipe"; then
-               $echo
-               $echo "*** However, this would only work if libtool was able to extract symbol"
-               $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-               $echo "*** not find such a program.  So, this module is probably useless."
-               $echo "*** \`nm' from GNU binutils and a full rebuild may help."
-             fi
-             if test "$build_old_libs" = no; then
-               build_libtool_libs=module
-               build_old_libs=yes
-             else
-               build_libtool_libs=no
-             fi
-           fi
-         else
-           deplibs="$dir/$old_library $deplibs"
-           link_static=yes
-         fi
-       fi # link shared/static library?
+  # Usually 'no', except on cygwin/mingw when embedded into
+  # the cwrapper.
+  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+    # special case for '.'
+    if test \"\$thisdir\" = \".\"; then
+      thisdir=\`pwd\`
+    fi
+    # remove .libs from thisdir
+    case \"\$thisdir\" in
+    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
+    $objdir )   thisdir=. ;;
+    esac
+  fi
 
-       if test "$linkmode" = lib; then
-         if test -n "$dependency_libs" &&
-            { test "$hardcode_into_libs" != yes ||
-              test "$build_old_libs" = yes ||
-              test "$link_static" = yes; }; then
-           # Extract -R from dependency_libs
-           temp_deplibs=
-           for libdir in $dependency_libs; do
-             case $libdir in
-             -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
-                  case " $xrpath " in
-                  *" $temp_xrpath "*) ;;
-                  *) xrpath="$xrpath $temp_xrpath";;
-                  esac;;
-             *) temp_deplibs="$temp_deplibs $libdir";;
-             esac
-           done
-           dependency_libs="$temp_deplibs"
-         fi
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
 
-         newlib_search_path="$newlib_search_path $absdir"
-         # Link against this library
-         test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
-         # ... and its dependency_libs
-         tmp_libs=
-         for deplib in $dependency_libs; do
-           newdependency_libs="$deplib $newdependency_libs"
-           if test "X$duplicate_deps" = "Xyes" ; then
-             case "$tmp_libs " in
-             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-             esac
-           fi
-           tmp_libs="$tmp_libs $deplib"
-         done
+       if test "$fast_install" = yes; then
+         $ECHO "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
 
-         if test "$link_all_deplibs" != no; then
-           # Add the search paths of all dependency libraries
-           for deplib in $dependency_libs; do
-             case $deplib in
-             -L*) path="$deplib" ;;
-             *.la)
-               dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
-               test "X$dir" = "X$deplib" && dir="."
-               # We need an absolute path.
-               case $dir in
-               [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
-               *)
-                 absdir=`cd "$dir" && pwd`
-                 if test -z "$absdir"; then
-                   $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
-                   absdir="$dir"
-                 fi
-                 ;;
-               esac
-               if grep "^installed=no" $deplib > /dev/null; then
-                 path="$absdir/$objdir"
-               else
-                 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
-                 if test -z "$libdir"; then
-                   $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
-                   exit $EXIT_FAILURE
-                 fi
-                 if test "$absdir" != "$libdir"; then
-                   $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
-                 fi
-                 path="$absdir"
-               fi
-               depdepl=
-               case $host in
-               *-*-darwin*)
-                 # we do not want to link against static libs,
-                 # but need to link against shared
-                 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
-                 if test -n "$deplibrary_names" ; then
-                   for tmp in $deplibrary_names ; do
-                     depdepl=$tmp
-                   done
-                   if test -f "$path/$depdepl" ; then
-                     depdepl="$path/$depdepl"
-                   fi
-                   # do not add paths which are already there
-                   case " $newlib_search_path " in
-                   *" $path "*) ;;
-                   *) newlib_search_path="$newlib_search_path $path";;
-                   esac
-                 fi
-                 path=""
-                 ;;
-               *)
-                 path="-L$path"
-                 ;;
-               esac
-               ;;
-             -l*)
-               case $host in
-               *-*-darwin*)
-                 # Again, we only want to link against shared libraries
-                 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
-                 for tmp in $newlib_search_path ; do
-                   if test -f "$tmp/lib$tmp_libs.dylib" ; then
-                     eval depdepl="$tmp/lib$tmp_libs.dylib"
-                     break
-                   fi
-                 done
-                 path=""
-                 ;;
-               *) continue ;;
-               esac
-               ;;
-             *) continue ;;
-             esac
-             case " $deplibs " in
-             *" $path "*) ;;
-             *) deplibs="$path $deplibs" ;;
-             esac
-             case " $deplibs " in
-             *" $depdepl "*) ;;
-             *) deplibs="$depdepl $deplibs" ;;
-             esac
-           done
-         fi # link_all_deplibs != no
-       fi # linkmode = lib
-      done # for deplib in $libs
-      dependency_libs="$newdependency_libs"
-      if test "$pass" = dlpreopen; then
-       # Link the dlpreopened libraries before other libraries
-       for deplib in $save_deplibs; do
-         deplibs="$deplib $deplibs"
-       done
-      fi
-      if test "$pass" != dlopen; then
-       if test "$pass" != conv; then
-         # Make sure lib_search_path contains only unique directories.
-         lib_search_path=
-         for dir in $newlib_search_path; do
-           case "$lib_search_path " in
-           *" $dir "*) ;;
-           *) lib_search_path="$lib_search_path $dir" ;;
-           esac
-         done
-         newlib_search_path=
-       fi
+  if test ! -f \"\$progdir/\$program\" ||
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
 
-       if test "$linkmode,$pass" != "prog,link"; then
-         vars="deplibs"
-       else
-         vars="compile_deplibs finalize_deplibs"
-       fi
-       for var in $vars dependency_libs; do
-         # Add libraries to $var in reverse order
-         eval tmp_libs=\"\$$var\"
-         new_libs=
-         for deplib in $tmp_libs; do
-           # FIXME: Pedantically, this is the right thing to do, so
-           #        that some nasty dependency loop isn't accidentally
-           #        broken:
-           #new_libs="$deplib $new_libs"
-           # Pragmatically, this seems to cause very few problems in
-           # practice:
-           case $deplib in
-           -L*) new_libs="$deplib $new_libs" ;;
-           -R*) ;;
-           *)
-             # And here is the reason: when a library appears more
-             # than once as an explicit dependence of a library, or
-             # is implicitly linked in more than once by the
-             # compiler, it is considered special, and multiple
-             # occurrences thereof are not removed.  Compare this
-             # with having the same library being listed as a
-             # dependency of multiple other libraries: in this case,
-             # we know (pedantically, we assume) the library does not
-             # need to be listed more than once, so we keep only the
-             # last copy.  This is not always right, but it is rare
-             # enough that we require users that really mean to play
-             # such unportable linking tricks to link the library
-             # using -Wl,-lname, so that libtool does not consider it
-             # for duplicate removal.
-             case " $specialdeplibs " in
-             *" $deplib "*) new_libs="$deplib $new_libs" ;;
-             *)
-               case " $new_libs " in
-               *" $deplib "*) ;;
-               *) new_libs="$deplib $new_libs" ;;
-               esac
-               ;;
-             esac
-             ;;
-           esac
-         done
-         tmp_libs=
-         for deplib in $new_libs; do
-           case $deplib in
-           -L*)
-             case " $tmp_libs " in
-             *" $deplib "*) ;;
-             *) tmp_libs="$tmp_libs $deplib" ;;
-             esac
-             ;;
-           *) tmp_libs="$tmp_libs $deplib" ;;
-           esac
-         done
-         eval $var=\"$tmp_libs\"
-       done # for var
-      fi
-      # Last step: remove runtime libs from dependency_libs
-      # (they stay in deplibs)
-      tmp_libs=
-      for i in $dependency_libs ; do
-       case " $predeps $postdeps $compiler_lib_search_path " in
-       *" $i "*)
-         i=""
-         ;;
-       esac
-       if test -n "$i" ; then
-         tmp_libs="$tmp_libs $i"
-       fi
-      done
-      dependency_libs=$tmp_libs
-    done # for pass
-    if test "$linkmode" = prog; then
-      dlfiles="$newdlfiles"
-      dlprefiles="$newdlprefiles"
-    fi
+    file=\"\$\$-\$program\"
 
-    case $linkmode in
-    oldlib)
-      if test -n "$deplibs"; then
-       $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
-      fi
+    if test ! -d \"\$progdir\"; then
+      $MKDIR \"\$progdir\"
+    else
+      $RM \"\$progdir/\$file\"
+    fi"
 
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-       $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
-      fi
+         $ECHO "\
 
-      if test -n "$rpath"; then
-       $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+       $ECHO \"\$relink_command_output\" >&2
+       $RM \"\$progdir/\$file\"
+       exit 1
       fi
+    fi
 
-      if test -n "$xrpath"; then
-       $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
-      fi
+    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $RM \"\$progdir/\$program\";
+      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $RM \"\$progdir/\$file\"
+  fi"
+       else
+         $ECHO "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+       fi
 
-      if test -n "$vinfo"; then
-       $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
-      fi
+       $ECHO "\
 
-      if test -n "$release"; then
-       $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
-      fi
+  if test -f \"\$progdir/\$program\"; then"
 
-      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-       $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
-      fi
+       # Export our shlibpath_var if we have one.
+       if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+         $ECHO "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
 
-      # Now set the variables for building old libraries.
-      build_libtool_libs=no
-      oldlibs="$output"
-      objs="$objs$old_deplibs"
-      ;;
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
 
-    lib)
-      # Make sure we only generate libraries of the form `libNAME.la'.
-      case $outputname in
-      lib*)
-       name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
-       eval shared_ext=\"$shrext_cmds\"
-       eval libname=\"$libname_spec\"
-       ;;
-      *)
-       if test "$module" = no; then
-         $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
-       fi
-       if test "$need_lib_prefix" != no; then
-         # Add the "lib" prefix for modules if required
-         name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
-         eval shared_ext=\"$shrext_cmds\"
-         eval libname=\"$libname_spec\"
-       else
-         libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+    export $shlibpath_var
+"
        fi
-       ;;
-      esac
 
-      if test -n "$objs"; then
-       if test "$deplibs_check_method" != pass_all; then
-         $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
-         exit $EXIT_FAILURE
-       else
-         $echo
-         $echo "*** Warning: Linking the shared library $output against the non-libtool"
-         $echo "*** objects $objs is not portable!"
-         libobjs="$libobjs $objs"
+       # fixup the dll searchpath if we need to.
+       if test -n "$dllsearchpath"; then
+         $ECHO "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
        fi
-      fi
 
-      if test "$dlself" != no; then
-       $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
-      fi
+       $ECHO "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+       case $host in
+       # Backslashes separate directories on plain windows
+       *-*-mingw | *-*-os2*)
+         $ECHO "\
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+         ;;
 
-      set dummy $rpath
-      if test "$#" -gt 2; then
-       $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
-      fi
-      install_libdir="$2"
+       *)
+         $ECHO "\
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+         ;;
+       esac
+       $ECHO "\
+      \$ECHO \"\$0: cannot exec \$program \$*\"
+      exit 1
+    fi
+  else
+    # The program doesn't exist.
+    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+    \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+    $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit 1
+  fi
+fi\
+"
+}
+# end: func_emit_wrapper
 
-      oldlibs=
-      if test -z "$rpath"; then
-       if test "$build_libtool_libs" = yes; then
-         # Building a libtool convenience library.
-         # Some compilers have problems with a `.al' extension so
-         # convenience libraries should have the same extension an
-         # archive normally would.
-         oldlibs="$output_objdir/$libname.$libext $oldlibs"
-         build_libtool_libs=convenience
-         build_old_libs=yes
-       fi
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+       cat <<EOF
 
-       if test -n "$vinfo"; then
-         $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
-       fi
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
 
-       if test -n "$release"; then
-         $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
-       fi
-      else
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
 
-       # Parse the version information argument.
-       save_ifs="$IFS"; IFS=':'
-       set dummy $vinfo 0 0 0
-       IFS="$save_ifs"
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
 
-       if test -n "$8"; then
-         $echo "$modename: too many parameters to \`-version-info'" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
-       fi
+   Currently, it simply execs the wrapper *script* "$SHELL $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+           cat <<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <sys/stat.h>
 
-       # convert absolute version numbers to libtool ages
-       # this retains compatibility with .la files and attempts
-       # to make the code below a bit more comprehensible
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
 
-       case $vinfo_number in
-       yes)
-         number_major="$2"
-         number_minor="$3"
-         number_revision="$4"
-         #
-         # There are really only two kinds -- those that
-         # use the current revision as the major version
-         # and those that subtract age and use age as
-         # a minor version.  But, then there is irix
-         # which has an extra 1 added just for fun
-         #
-         case $version_type in
-         darwin|linux|osf|windows)
-           current=`expr $number_major + $number_minor`
-           age="$number_minor"
-           revision="$number_revision"
-           ;;
-         freebsd-aout|freebsd-elf|sunos)
-           current="$number_major"
-           revision="$number_minor"
-           age="0"
-           ;;
-         irix|nonstopux)
-           current=`expr $number_major + $number_minor - 1`
-           age="$number_minor"
-           revision="$number_minor"
-           ;;
-         esac
-         ;;
-       no)
-         current="$2"
-         revision="$3"
-         age="$4"
-         ;;
-       esac
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
 
-       # Check that each of the things are valid numbers.
-       case $current in
-       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-       *)
-         $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
-         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
+#ifdef _MSC_VER
+# define S_IXUSR _S_IEXEC
+# define stat _stat
+# ifndef _INTPTR_T_DEFINED
+#  define intptr_t int
+# endif
+#endif
 
-       case $revision in
-       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-       *)
-         $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
-         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
 
-       case $age in
-       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-       *)
-         $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
-         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# ifndef DIR_SEPARATOR_2
+#  define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+#  define PATH_SEPARATOR_2 ';'
+# endif
+#endif
 
-       if test "$age" -gt "$current"; then
-         $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
-         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-         exit $EXIT_FAILURE
-       fi
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+       (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
 
-       # Calculate the version variables.
-       major=
-       versuffix=
-       verstring=
-       case $version_type in
-       none) ;;
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
 
-       darwin)
-         # Like Linux, but with the current version available in
-         # verstring for coding it into the library header
-         major=.`expr $current - $age`
-         versuffix="$major.$age.$revision"
-         # Darwin ld doesn't like 0 for these options...
-         minor_current=`expr $current + 1`
-         verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
-         ;;
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
 
-       freebsd-aout)
-         major=".$current"
-         versuffix=".$current.$revision";
-         ;;
+#undef LTWRAPPER_DEBUGPRINTF
+#if defined DEBUGWRAPPER
+# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
+static void
+ltwrapper_debugprintf (const char *fmt, ...)
+{
+    va_list args;
+    va_start (args, fmt);
+    (void) vfprintf (stderr, fmt, args);
+    va_end (args);
+}
+#else
+# define LTWRAPPER_DEBUGPRINTF(args)
+#endif
 
-       freebsd-elf)
-         major=".$current"
-         versuffix=".$current";
-         ;;
+const char *program_name = NULL;
 
-       irix | nonstopux)
-         major=`expr $current - $age + 1`
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_fatal (const char *message, ...);
 
-         case $version_type in
-           nonstopux) verstring_prefix=nonstopux ;;
-           *)         verstring_prefix=sgi ;;
-         esac
-         verstring="$verstring_prefix$major.$revision"
+static const char *script_text =
+EOF
 
-         # Add in all the interfaces that we are compatible with.
-         loop=$revision
-         while test "$loop" -ne 0; do
-           iface=`expr $revision - $loop`
-           loop=`expr $loop - 1`
-           verstring="$verstring_prefix$major.$iface:$verstring"
-         done
+           func_emit_wrapper yes |
+               $SED -e 's/\([\\"]\)/\\\1/g' \
+                    -e 's/^/  "/' -e 's/$/\\n"/'
+           echo ";"
 
-         # Before this point, $major must not contain `.'.
-         major=.$major
-         versuffix="$major.$revision"
-         ;;
+           cat <<EOF
+const char * MAGIC_EXE = "$magic_exe";
 
-       linux)
-         major=.`expr $current - $age`
-         versuffix="$major.$age.$revision"
-         ;;
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  char *tmp_pathspec;
+  char *actual_cwrapper_path;
+  char *shwrapper_name;
+  intptr_t rval = 127;
+  FILE *shwrapper;
 
-       osf)
-         major=.`expr $current - $age`
-         versuffix=".$current.$age.$revision"
-         verstring="$current.$age.$revision"
+  const char *dumpscript_opt = "--lt-dump-script";
+  int i;
 
-         # Add in all the interfaces that we are compatible with.
-         loop=$age
-         while test "$loop" -ne 0; do
-           iface=`expr $current - $loop`
-           loop=`expr $loop - 1`
-           verstring="$verstring:${iface}.0"
-         done
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
+  LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
 
-         # Make executables depend on our current version.
-         verstring="$verstring:${current}.0"
-         ;;
+  /* very simple arg parsing; don't want to rely on getopt */
+  for (i = 1; i < argc; i++)
+    {
+      if (strcmp (argv[i], dumpscript_opt) == 0)
+       {
+         printf ("%s", script_text);
+         return 0;
+       }
+    }
 
-       sunos)
-         major=".$current"
-         versuffix=".$current.$revision"
-         ;;
+  newargz = XMALLOC (char *, argc + 2);
+EOF
 
-       windows)
-         # Use '-' rather than '.', since we only want one
-         # extension on DOS 8.3 filesystems.
-         major=`expr $current - $age`
-         versuffix="-$major"
-         ;;
+           if test -n "$TARGETSHELL" ; then
+             # no path translation at all
+             lt_newargv0=$TARGETSHELL
+           else
+             case "$host" in
+               *mingw* )
+                 # awkward: cmd appends spaces to result
+                 lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+                 lt_newargv0=`( cmd //c echo $SHELL | $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo $SHELL`
+                 case $lt_newargv0 in
+                   *.exe | *.EXE) ;;
+                   *) lt_newargv0=$lt_newargv0.exe ;;
+                 esac
+                 ;;
+               * ) lt_newargv0=$SHELL ;;
+             esac
+           fi
 
-       *)
-         $echo "$modename: unknown library version type \`$version_type'" 1>&2
-         $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
+               cat <<EOF
+  newargz[0] = (char *) xstrdup ("$lt_newargv0");
+EOF
 
-       # Clear the version info if we defaulted, and they specified a release.
-       if test -z "$vinfo" && test -n "$release"; then
-         major=
-         case $version_type in
-         darwin)
-           # we can't check for "0.0" in archive_cmds due to quoting
-           # problems, so we reset it completely
-           verstring=
-           ;;
-         *)
-           verstring="0.0"
-           ;;
-         esac
-         if test "$need_version" = no; then
-           versuffix=
-         else
-           versuffix=".0.0"
-         fi
-       fi
+           cat <<"EOF"
+  tmp_pathspec = find_executable (argv[0]);
+  if (tmp_pathspec == NULL)
+    lt_fatal ("Couldn't find %s", argv[0]);
+  LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
+                         tmp_pathspec));
+
+  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+  LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
+                         actual_cwrapper_path));
+  XFREE (tmp_pathspec);
+
+  shwrapper_name = (char *) xstrdup (base_name (actual_cwrapper_path));
+  strendzap (actual_cwrapper_path, shwrapper_name);
+
+  /* shwrapper_name transforms */
+  strendzap (shwrapper_name, ".exe");
+  tmp_pathspec = XMALLOC (char, (strlen (shwrapper_name) +
+                                strlen ("_ltshwrapperTMP") + 1));
+  strcpy (tmp_pathspec, shwrapper_name);
+  strcat (tmp_pathspec, "_ltshwrapperTMP");
+  XFREE (shwrapper_name);
+  shwrapper_name = tmp_pathspec;
+  tmp_pathspec = 0;
+  LTWRAPPER_DEBUGPRINTF (("(main) libtool shell wrapper name: %s\n",
+                         shwrapper_name));
+EOF
 
-       # Remove version info from name if versioning should be avoided
-       if test "$avoid_version" = yes && test "$need_version" = no; then
-         major=
-         versuffix=
-         verstring=""
-       fi
+           cat <<EOF
+  newargz[1] =
+    XMALLOC (char, (strlen (actual_cwrapper_path) +
+                   strlen ("$objdir") + 1 + strlen (shwrapper_name) + 1));
+  strcpy (newargz[1], actual_cwrapper_path);
+  strcat (newargz[1], "$objdir");
+  strcat (newargz[1], "/");
+  strcat (newargz[1], shwrapper_name);
+EOF
 
-       # Check to see if the archive will have undefined symbols.
-       if test "$allow_undefined" = yes; then
-         if test "$allow_undefined_flag" = unsupported; then
-           $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
-           build_libtool_libs=no
-           build_old_libs=yes
-         fi
-       else
-         # Don't allow undefined symbols.
-         allow_undefined_flag="$no_undefined_flag"
-       fi
-      fi
 
-      if test "$mode" != relink; then
-       # Remove our outputs, but don't remove object files since they
-       # may have been created when compiling PIC objects.
-       removelist=
-       tempremovelist=`$echo "$output_objdir/*"`
-       for p in $tempremovelist; do
-         case $p in
-           *.$objext)
-              ;;
-           $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
-              if test "X$precious_files_regex" != "X"; then
-                if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
-                then
-                  continue
-                fi
-              fi
-              removelist="$removelist $p"
-              ;;
-           *) ;;
-         esac
-       done
-       if test -n "$removelist"; then
-         $show "${rm}r $removelist"
-         $run ${rm}r $removelist
-       fi
-      fi
+           case $host_os in
+             mingw*)
+           cat <<"EOF"
+  {
+    char* p;
+    while ((p = strchr (newargz[1], '\\')) != NULL)
+      {
+       *p = '/';
+      }
+  }
+EOF
+           ;;
+           esac
 
-      # Now set the variables for building old libraries.
-      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
-       oldlibs="$oldlibs $output_objdir/$libname.$libext"
+           cat <<"EOF"
+  XFREE (shwrapper_name);
+  XFREE (actual_cwrapper_path);
 
-       # Transform .lo files to .o files.
-       oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
-      fi
+  /* note: do NOT use "wt" here! -- defer to underlying
+   * mount type on cygwin
+   */
+  if ((shwrapper = fopen (newargz[1], "w")) == 0)
+    {
+      lt_fatal ("Could not open %s for writing", newargz[1]);
+    }
+  fprintf (shwrapper, "%s", script_text);
+  fclose (shwrapper);
 
-      # Eliminate all temporary directories.
-      for path in $notinst_path; do
-       lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
-       deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
-       dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
-      done
+  make_executable (newargz[1]);
 
-      if test -n "$xrpath"; then
-       # If the user specified any rpath flags, then add them.
-       temp_xrpath=
-       for libdir in $xrpath; do
-         temp_xrpath="$temp_xrpath -R$libdir"
-         case "$finalize_rpath " in
-         *" $libdir "*) ;;
-         *) finalize_rpath="$finalize_rpath $libdir" ;;
-         esac
-       done
-       if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
-         dependency_libs="$temp_xrpath $dependency_libs"
-       fi
-      fi
+  for (i = 1; i < argc; i++)
+    newargz[i + 1] = xstrdup (argv[i]);
+  newargz[argc + 1] = NULL;
 
-      # Make sure dlfiles contains only unique files that won't be dlpreopened
-      old_dlfiles="$dlfiles"
-      dlfiles=
-      for lib in $old_dlfiles; do
-       case " $dlprefiles $dlfiles " in
-       *" $lib "*) ;;
-       *) dlfiles="$dlfiles $lib" ;;
+  for (i = 0; i < argc + 1; i++)
+    {
+      LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d]   : %s\n", i, newargz[i]));
+    }
+
+EOF
+
+           case $host_os in
+             mingw*)
+               cat <<EOF
+  /* execv doesn't actually work on mingw as expected on unix */
+  rval = _spawnv (_P_WAIT, "$lt_newargv0", (const char * const *) newargz);
+  if (rval == -1)
+    {
+      /* failed to start process */
+      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"$lt_newargv0\": errno = %d\n", errno));
+      return 127;
+    }
+  return rval;
+}
+EOF
+               ;;
+             *)
+               cat <<EOF
+  execv ("$lt_newargv0", newargz);
+  return rval; /* =127, but avoids unused variable warning */
+}
+EOF
+               ;;
+           esac
+
+           cat <<"EOF"
+
+void *
+xmalloc (size_t num)
+{
+  void *p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+                         string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return base;
+}
+
+int
+check_executable (const char *path)
+{
+  struct stat st;
+
+  LTWRAPPER_DEBUGPRINTF (("(check_executable)  : %s\n",
+                         path ? (*path ? path : "EMPTY!") : "NULL!"));
+  if ((!path) || (!*path))
+    return 0;
+
+  if ((stat (path, &st) >= 0)
+      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+    return 1;
+  else
+    return 0;
+}
+
+int
+make_executable (const char *path)
+{
+  int rval = 0;
+  struct stat st;
+
+  LTWRAPPER_DEBUGPRINTF (("(make_executable)   : %s\n",
+                         path ? (*path ? path : "EMPTY!") : "NULL!"));
+  if ((!path) || (!*path))
+    return 0;
+
+  if (stat (path, &st) >= 0)
+    {
+      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+    }
+  return rval;
+}
+
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise
+   Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+  int has_slash = 0;
+  const char *p;
+  const char *p_next;
+  /* static buffer for getcwd */
+  char tmp[LT_PATHMAX + 1];
+  int tmp_len;
+  char *concat_name;
+
+  LTWRAPPER_DEBUGPRINTF (("(find_executable)   : %s\n",
+                         wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
+
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
+
+  /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+    {
+      concat_name = xstrdup (wrapper);
+      if (check_executable (concat_name))
+       return concat_name;
+      XFREE (concat_name);
+    }
+  else
+    {
+#endif
+      if (IS_DIR_SEPARATOR (wrapper[0]))
+       {
+         concat_name = xstrdup (wrapper);
+         if (check_executable (concat_name))
+           return concat_name;
+         XFREE (concat_name);
+       }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+    }
+#endif
+
+  for (p = wrapper; *p; p++)
+    if (*p == '/')
+      {
+       has_slash = 1;
+       break;
+      }
+  if (!has_slash)
+    {
+      /* no slashes; search PATH */
+      const char *path = getenv ("PATH");
+      if (path != NULL)
+       {
+         for (p = path; *p; p = p_next)
+           {
+             const char *q;
+             size_t p_len;
+             for (q = p; *q; q++)
+               if (IS_PATH_SEPARATOR (*q))
+                 break;
+             p_len = q - p;
+             p_next = (*q == '\0' ? q : q + 1);
+             if (p_len == 0)
+               {
+                 /* empty path: current directory */
+                 if (getcwd (tmp, LT_PATHMAX) == NULL)
+                   lt_fatal ("getcwd failed");
+                 tmp_len = strlen (tmp);
+                 concat_name =
+                   XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+                 memcpy (concat_name, tmp, tmp_len);
+                 concat_name[tmp_len] = '/';
+                 strcpy (concat_name + tmp_len + 1, wrapper);
+               }
+             else
+               {
+                 concat_name =
+                   XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+                 memcpy (concat_name, p, p_len);
+                 concat_name[p_len] = '/';
+                 strcpy (concat_name + p_len + 1, wrapper);
+               }
+             if (check_executable (concat_name))
+               return concat_name;
+             XFREE (concat_name);
+           }
+       }
+      /* not found in PATH; assume curdir */
+    }
+  /* Relative path | not found in path: prepend cwd */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  tmp_len = strlen (tmp);
+  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+  memcpy (concat_name, tmp, tmp_len);
+  concat_name[tmp_len] = '/';
+  strcpy (concat_name + tmp_len + 1, wrapper);
+
+  if (check_executable (concat_name))
+    return concat_name;
+  XFREE (concat_name);
+  return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+  return xstrdup (pathspec);
+#else
+  char buf[LT_PATHMAX];
+  struct stat s;
+  char *tmp_pathspec = xstrdup (pathspec);
+  char *p;
+  int has_symlinks = 0;
+  while (strlen (tmp_pathspec) && !has_symlinks)
+    {
+      LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
+                             tmp_pathspec));
+      if (lstat (tmp_pathspec, &s) == 0)
+       {
+         if (S_ISLNK (s.st_mode) != 0)
+           {
+             has_symlinks = 1;
+             break;
+           }
+
+         /* search backwards for last DIR_SEPARATOR */
+         p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+         while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+           p--;
+         if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+           {
+             /* no more DIR_SEPARATORS left */
+             break;
+           }
+         *p = '\0';
+       }
+      else
+       {
+         char *errstr = strerror (errno);
+         lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
+       }
+    }
+  XFREE (tmp_pathspec);
+
+  if (!has_symlinks)
+    {
+      return xstrdup (pathspec);
+    }
+
+  tmp_pathspec = realpath (pathspec, buf);
+  if (tmp_pathspec == 0)
+    {
+      lt_fatal ("Could not follow symlinks for %s", pathspec);
+    }
+  return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert (str != NULL);
+  assert (pat != NULL);
+
+  len = strlen (str);
+  patlen = strlen (pat);
+
+  if (patlen <= len)
+    {
+      str += len - patlen;
+      if (strcmp (str, pat) == 0)
+       *str = '\0';
+    }
+  return str;
+}
+
+static void
+lt_error_core (int exit_status, const char *mode,
+              const char *message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_mode_link arg...
+func_mode_link ()
+{
+    $opt_debug
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invocation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args=$nonopt
+    base_compile="$nonopt $@"
+    compile_command=$nonopt
+    finalize_command=$nonopt
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+    new_inherited_linker_flags=
+
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+    weak_libs=
+    single_module="${wl}-single_module"
+    func_infer_tag $base_compile
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -shared)
+       test "$build_libtool_libs" != yes && \
+         func_fatal_configuration "can not build a shared library"
+       build_old_libs=no
+       break
+       ;;
+      -all-static | -static | -static-libtool-libs)
+       case $arg in
+       -all-static)
+         if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+           func_warning "complete static linking is impossible in this configuration"
+         fi
+         if test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+           # See comment for -static flag below, for more details.
+           func_append compile_command " $link_static_flag"
+           func_append finalize_command " $link_static_flag"
+         fi
+         prefer_static_libs=yes
+         ;;
+       -static)
+         if test -z "$pic_flag" && test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+         prefer_static_libs=built
+         ;;
+       -static-libtool-libs)
+         if test -z "$pic_flag" && test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+         prefer_static_libs=yes
+         ;;
        esac
-      done
+       build_libtool_libs=no
+       build_old_libs=yes
+       break
+       ;;
+      esac
+    done
 
-      # Make sure dlprefiles contains only unique files
-      old_dlprefiles="$dlprefiles"
-      dlprefiles=
-      for lib in $old_dlprefiles; do
-       case "$dlprefiles " in
-       *" $lib "*) ;;
-       *) dlprefiles="$dlprefiles $lib" ;;
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      func_quote_for_eval "$arg"
+      qarg=$func_quote_for_eval_unquoted_result
+      func_append libtool_args " $func_quote_for_eval_result"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+       case $prev in
+       output)
+         func_append compile_command " @OUTPUT@"
+         func_append finalize_command " @OUTPUT@"
+         ;;
        esac
-      done
 
-      if test "$build_libtool_libs" = yes; then
-       if test -n "$rpath"; then
-         case $host in
-         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
-           # these systems don't actually have a c library (as such)!
-           ;;
-         *-*-rhapsody* | *-*-darwin1.[012])
-           # Rhapsody C library is in the System framework
-           deplibs="$deplibs -framework System"
-           ;;
-         *-*-netbsd*)
-           # Don't link with libc until the a.out ld.so is fixed.
-           ;;
-         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
-           # Do not include libc due to us having libc/libc_r.
-           ;;
-         *-*-sco3.2v5* | *-*-sco5v6*)
-           # Causes problems with __ctype
+       case $prev in
+       dlfiles|dlprefiles)
+         if test "$preload" = no; then
+           # Add the symbol object into the linking commands.
+           func_append compile_command " @SYMFILE@"
+           func_append finalize_command " @SYMFILE@"
+           preload=yes
+         fi
+         case $arg in
+         *.la | *.lo) ;;  # We handle these cases below.
+         force)
+           if test "$dlself" = no; then
+             dlself=needless
+             export_dynamic=yes
+           fi
+           prev=
+           continue
            ;;
-         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
-           # Compiler inserts libc in the correct place for threads to work
+         self)
+           if test "$prev" = dlprefiles; then
+             dlself=yes
+           elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+             dlself=yes
+           else
+             dlself=needless
+             export_dynamic=yes
+           fi
+           prev=
+           continue
            ;;
-         *)
-           # Add libc to deplibs on all other systems if necessary.
-           if test "$build_libtool_need_lc" = "yes"; then
-             deplibs="$deplibs -lc"
+         *)
+           if test "$prev" = dlfiles; then
+             dlfiles="$dlfiles $arg"
+           else
+             dlprefiles="$dlprefiles $arg"
            fi
+           prev=
+           continue
            ;;
          esac
-       fi
-
-       # Transform deplibs into only deplibs that can be linked in shared.
-       name_save=$name
-       libname_save=$libname
-       release_save=$release
-       versuffix_save=$versuffix
-       major_save=$major
-       # I'm not sure if I'm treating the release correctly.  I think
-       # release should show up in the -l (ie -lgmp5) so we don't want to
-       # add it in twice.  Is that correct?
-       release=""
-       versuffix=""
-       major=""
-       newdeplibs=
-       droppeddeps=no
-       case $deplibs_check_method in
-       pass_all)
-         # Don't check for shared/static.  Everything works.
-         # This might be a little naive.  We might want to check
-         # whether the library exists or not.  But this is on
-         # osf3 & osf4 and I'm not really sure... Just
-         # implementing what was already the behavior.
-         newdeplibs=$deplibs
          ;;
-       test_compile)
-         # This code stresses the "libraries are programs" paradigm to its
-         # limits. Maybe even breaks it.  We compile a program, linking it
-         # against the deplibs as a proxy for the library.  Then we can check
-         # whether they linked in statically or dynamically with ldd.
-         $rm conftest.c
-         cat > conftest.c <<EOF
-         int main() { return 0; }
-EOF
-         $rm conftest
-         $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
-         if test "$?" -eq 0 ; then
-           ldd_output=`ldd conftest`
-           for i in $deplibs; do
-             name=`expr $i : '-l\(.*\)'`
-             # If $name is empty we are operating on a -L argument.
-              if test "$name" != "" && test "$name" -ne "0"; then
-               if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-                 case " $predeps $postdeps " in
-                 *" $i "*)
-                   newdeplibs="$newdeplibs $i"
-                   i=""
-                   ;;
-                 esac
-               fi
-               if test -n "$i" ; then
-                 libname=`eval \\$echo \"$libname_spec\"`
-                 deplib_matches=`eval \\$echo \"$library_names_spec\"`
-                 set dummy $deplib_matches
-                 deplib_match=$2
-                 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-                   newdeplibs="$newdeplibs $i"
-                 else
-                   droppeddeps=yes
-                   $echo
-                   $echo "*** Warning: dynamic linker does not accept needed library $i."
-                   $echo "*** I have the capability to make that library automatically link in when"
-                   $echo "*** you link to this library.  But I can only do this if you have a"
-                   $echo "*** shared version of the library, which I believe you do not have"
-                   $echo "*** because a test_compile did reveal that the linker did not use it for"
-                   $echo "*** its dynamic dependency list that programs get resolved with at runtime."
-                 fi
+       expsyms)
+         export_symbols="$arg"
+         test -f "$arg" \
+           || func_fatal_error "symbol file \`$arg' does not exist"
+         prev=
+         continue
+         ;;
+       expsyms_regex)
+         export_symbols_regex="$arg"
+         prev=
+         continue
+         ;;
+       framework)
+         case $host in
+           *-*-darwin*)
+             case "$deplibs " in
+               *" $qarg.ltframework "*) ;;
+               *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+                  ;;
+             esac
+             ;;
+         esac
+         prev=
+         continue
+         ;;
+       inst_prefix)
+         inst_prefix_dir="$arg"
+         prev=
+         continue
+         ;;
+       objectlist)
+         if test -f "$arg"; then
+           save_arg=$arg
+           moreargs=
+           for fil in `cat "$save_arg"`
+           do
+#            moreargs="$moreargs $fil"
+             arg=$fil
+             # A libtool-controlled object.
+
+             # Check to see that this really is a libtool object.
+             if func_lalib_unsafe_p "$arg"; then
+               pic_object=
+               non_pic_object=
+
+               # Read the .lo file
+               func_source "$arg"
+
+               if test -z "$pic_object" ||
+                  test -z "$non_pic_object" ||
+                  test "$pic_object" = none &&
+                  test "$non_pic_object" = none; then
+                 func_fatal_error "cannot find name of object for \`$arg'"
                fi
-             else
-               newdeplibs="$newdeplibs $i"
-             fi
-           done
-         else
-           # Error occurred in the first compile.  Let's try to salvage
-           # the situation: Compile a separate program for each library.
-           for i in $deplibs; do
-             name=`expr $i : '-l\(.*\)'`
-             # If $name is empty we are operating on a -L argument.
-              if test "$name" != "" && test "$name" != "0"; then
-               $rm conftest
-               $LTCC $LTCFLAGS -o conftest conftest.c $i
-               # Did it work?
-               if test "$?" -eq 0 ; then
-                 ldd_output=`ldd conftest`
-                 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-                   case " $predeps $postdeps " in
-                   *" $i "*)
-                     newdeplibs="$newdeplibs $i"
-                     i=""
-                     ;;
-                   esac
-                 fi
-                 if test -n "$i" ; then
-                   libname=`eval \\$echo \"$libname_spec\"`
-                   deplib_matches=`eval \\$echo \"$library_names_spec\"`
-                   set dummy $deplib_matches
-                   deplib_match=$2
-                   if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-                     newdeplibs="$newdeplibs $i"
+
+               # Extract subdirectory from the argument.
+               func_dirname "$arg" "/" ""
+               xdir="$func_dirname_result"
+
+               if test "$pic_object" != none; then
+                 # Prepend the subdirectory the object is found in.
+                 pic_object="$xdir$pic_object"
+
+                 if test "$prev" = dlfiles; then
+                   if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+                     dlfiles="$dlfiles $pic_object"
+                     prev=
+                     continue
                    else
-                     droppeddeps=yes
-                     $echo
-                     $echo "*** Warning: dynamic linker does not accept needed library $i."
-                     $echo "*** I have the capability to make that library automatically link in when"
-                     $echo "*** you link to this library.  But I can only do this if you have a"
-                     $echo "*** shared version of the library, which you do not appear to have"
-                     $echo "*** because a test_compile did reveal that the linker did not use this one"
-                     $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+                     # If libtool objects are unsupported, then we need to preload.
+                     prev=dlprefiles
                    fi
                  fi
+
+                 # CHECK ME:  I think I busted this.  -Ossama
+                 if test "$prev" = dlprefiles; then
+                   # Preload the old-style object.
+                   dlprefiles="$dlprefiles $pic_object"
+                   prev=
+                 fi
+
+                 # A PIC object.
+                 func_append libobjs " $pic_object"
+                 arg="$pic_object"
+               fi
+
+               # Non-PIC object.
+               if test "$non_pic_object" != none; then
+                 # Prepend the subdirectory the object is found in.
+                 non_pic_object="$xdir$non_pic_object"
+
+                 # A standard non-PIC object
+                 func_append non_pic_objects " $non_pic_object"
+                 if test -z "$pic_object" || test "$pic_object" = none ; then
+                   arg="$non_pic_object"
+                 fi
                else
-                 droppeddeps=yes
-                 $echo
-                 $echo "*** Warning!  Library $i is needed by this library but I was not able to"
-                 $echo "***  make it link in!  You will probably need to install it or some"
-                 $echo "*** library that it depends on before this library will be fully"
-                 $echo "*** functional.  Installing it before continuing would be even better."
+                 # If the PIC object exists, use it instead.
+                 # $xdir was prepended to $pic_object above.
+                 non_pic_object="$pic_object"
+                 func_append non_pic_objects " $non_pic_object"
                fi
              else
-               newdeplibs="$newdeplibs $i"
+               # Only an error if not doing a dry-run.
+               if $opt_dry_run; then
+                 # Extract subdirectory from the argument.
+                 func_dirname "$arg" "/" ""
+                 xdir="$func_dirname_result"
+
+                 func_lo2o "$arg"
+                 pic_object=$xdir$objdir/$func_lo2o_result
+                 non_pic_object=$xdir$func_lo2o_result
+                 func_append libobjs " $pic_object"
+                 func_append non_pic_objects " $non_pic_object"
+               else
+                 func_fatal_error "\`$arg' is not a valid libtool object"
+               fi
              fi
            done
+         else
+           func_fatal_error "link input file \`$arg' does not exist"
          fi
+         arg=$save_arg
+         prev=
+         continue
          ;;
-       file_magic*)
-         set dummy $deplibs_check_method
-         file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
-         for a_deplib in $deplibs; do
-           name=`expr $a_deplib : '-l\(.*\)'`
-           # If $name is empty we are operating on a -L argument.
-            if test "$name" != "" && test  "$name" != "0"; then
-             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-               case " $predeps $postdeps " in
-               *" $a_deplib "*)
-                 newdeplibs="$newdeplibs $a_deplib"
-                 a_deplib=""
-                 ;;
-               esac
-             fi
-             if test -n "$a_deplib" ; then
-               libname=`eval \\$echo \"$libname_spec\"`
-               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-                 for potent_lib in $potential_libs; do
-                     # Follow soft links.
-                     if ls -lLd "$potent_lib" 2>/dev/null \
-                        | grep " -> " >/dev/null; then
-                       continue
-                     fi
-                     # The statement above tries to avoid entering an
-                     # endless loop below, in case of cyclic links.
-                     # We might still enter an endless loop, since a link
-                     # loop can be closed while we follow links,
-                     # but so what?
-                     potlib="$potent_lib"
-                     while test -h "$potlib" 2>/dev/null; do
-                       potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
-                       case $potliblink in
-                       [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
-                       *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
-                       esac
-                     done
-                     if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
-                        | ${SED} 10q \
-                        | $EGREP "$file_magic_regex" > /dev/null; then
-                       newdeplibs="$newdeplibs $a_deplib"
-                       a_deplib=""
-                       break 2
-                     fi
-                 done
-               done
-             fi
-             if test -n "$a_deplib" ; then
-               droppeddeps=yes
-               $echo
-               $echo "*** Warning: linker path does not have real file for library $a_deplib."
-               $echo "*** I have the capability to make that library automatically link in when"
-               $echo "*** you link to this library.  But I can only do this if you have a"
-               $echo "*** shared version of the library, which you do not appear to have"
-               $echo "*** because I did check the linker path looking for a file starting"
-               if test -z "$potlib" ; then
-                 $echo "*** with $libname but no candidates were found. (...for file magic test)"
-               else
-                 $echo "*** with $libname and none of the candidates passed a file format test"
-                 $echo "*** using a file magic. Last file checked: $potlib"
-               fi
-             fi
-           else
-             # Add a -L argument.
-             newdeplibs="$newdeplibs $a_deplib"
-           fi
-         done # Gone through all deplibs.
+       precious_regex)
+         precious_files_regex="$arg"
+         prev=
+         continue
          ;;
-       match_pattern*)
-         set dummy $deplibs_check_method
-         match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
-         for a_deplib in $deplibs; do
-           name=`expr $a_deplib : '-l\(.*\)'`
-           # If $name is empty we are operating on a -L argument.
-           if test -n "$name" && test "$name" != "0"; then
-             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-               case " $predeps $postdeps " in
-               *" $a_deplib "*)
-                 newdeplibs="$newdeplibs $a_deplib"
-                 a_deplib=""
-                 ;;
-               esac
-             fi
-             if test -n "$a_deplib" ; then
-               libname=`eval \\$echo \"$libname_spec\"`
-               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-                 for potent_lib in $potential_libs; do
-                   potlib="$potent_lib" # see symlink-check above in file_magic test
-                   if eval $echo \"$potent_lib\" 2>/dev/null \
-                       | ${SED} 10q \
-                       | $EGREP "$match_pattern_regex" > /dev/null; then
-                     newdeplibs="$newdeplibs $a_deplib"
-                     a_deplib=""
-                     break 2
-                   fi
-                 done
-               done
-             fi
-             if test -n "$a_deplib" ; then
-               droppeddeps=yes
-               $echo
-               $echo "*** Warning: linker path does not have real file for library $a_deplib."
-               $echo "*** I have the capability to make that library automatically link in when"
-               $echo "*** you link to this library.  But I can only do this if you have a"
-               $echo "*** shared version of the library, which you do not appear to have"
-               $echo "*** because I did check the linker path looking for a file starting"
-               if test -z "$potlib" ; then
-                 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
-               else
-                 $echo "*** with $libname and none of the candidates passed a file format test"
-                 $echo "*** using a regex pattern. Last file checked: $potlib"
-               fi
-             fi
-           else
-             # Add a -L argument.
-             newdeplibs="$newdeplibs $a_deplib"
-           fi
-         done # Gone through all deplibs.
+       release)
+         release="-$arg"
+         prev=
+         continue
          ;;
-       none | unknown | *)
-         newdeplibs=""
-         tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
-           -e 's/ -[LR][^ ]*//g'`
-         if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-           for i in $predeps $postdeps ; do
-             # can't use Xsed below, because $i might contain '/'
-             tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
-           done
-         fi
-         if $echo "X $tmp_deplibs" | $Xsed -e 's/[     ]//g' \
-           | grep . >/dev/null; then
-           $echo
-           if test "X$deplibs_check_method" = "Xnone"; then
-             $echo "*** Warning: inter-library dependencies are not supported in this platform."
-           else
-             $echo "*** Warning: inter-library dependencies are not known to be supported."
-           fi
-           $echo "*** All declared inter-library dependencies are being dropped."
-           droppeddeps=yes
+       rpath | xrpath)
+         # We need an absolute path.
+         case $arg in
+         [\\/]* | [A-Za-z]:[\\/]*) ;;
+         *)
+           func_fatal_error "only absolute run-paths are allowed"
+           ;;
+         esac
+         if test "$prev" = rpath; then
+           case "$rpath " in
+           *" $arg "*) ;;
+           *) rpath="$rpath $arg" ;;
+           esac
+         else
+           case "$xrpath " in
+           *" $arg "*) ;;
+           *) xrpath="$xrpath $arg" ;;
+           esac
          fi
+         prev=
+         continue
+         ;;
+       shrext)
+         shrext_cmds="$arg"
+         prev=
+         continue
+         ;;
+       weak)
+         weak_libs="$weak_libs $arg"
+         prev=
+         continue
+         ;;
+       xcclinker)
+         linker_flags="$linker_flags $qarg"
+         compiler_flags="$compiler_flags $qarg"
+         prev=
+         func_append compile_command " $qarg"
+         func_append finalize_command " $qarg"
+         continue
+         ;;
+       xcompiler)
+         compiler_flags="$compiler_flags $qarg"
+         prev=
+         func_append compile_command " $qarg"
+         func_append finalize_command " $qarg"
+         continue
+         ;;
+       xlinker)
+         linker_flags="$linker_flags $qarg"
+         compiler_flags="$compiler_flags $wl$qarg"
+         prev=
+         func_append compile_command " $wl$qarg"
+         func_append finalize_command " $wl$qarg"
+         continue
+         ;;
+       *)
+         eval "$prev=\"\$arg\""
+         prev=
+         continue
+         ;;
+       esac
+      fi # test -n "$prev"
+
+      prevarg="$arg"
+
+      case $arg in
+      -all-static)
+       # The effects of -all-static are defined in a previous loop.
+       continue
+       ;;
+
+      -allow-undefined)
+       # FIXME: remove this flag sometime in the future.
+       func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+       ;;
+
+      -avoid-version)
+       avoid_version=yes
+       continue
+       ;;
+
+      -dlopen)
+       prev=dlfiles
+       continue
+       ;;
+
+      -dlpreopen)
+       prev=dlprefiles
+       continue
+       ;;
+
+      -export-dynamic)
+       export_dynamic=yes
+       continue
+       ;;
+
+      -export-symbols | -export-symbols-regex)
+       if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+         func_fatal_error "more than one -exported-symbols argument is not allowed"
+       fi
+       if test "X$arg" = "X-export-symbols"; then
+         prev=expsyms
+       else
+         prev=expsyms_regex
+       fi
+       continue
+       ;;
+
+      -framework)
+       prev=framework
+       continue
+       ;;
+
+      -inst-prefix-dir)
+       prev=inst_prefix
+       continue
+       ;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+       case $with_gcc/$host in
+       no/*-*-irix* | /*-*-irix*)
+         func_append compile_command " $arg"
+         func_append finalize_command " $arg"
          ;;
        esac
-       versuffix=$versuffix_save
-       major=$major_save
-       release=$release_save
-       libname=$libname_save
-       name=$name_save
+       continue
+       ;;
 
-       case $host in
-       *-*-rhapsody* | *-*-darwin1.[012])
-         # On Rhapsody replace the C library is the System framework
-         newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+      -L*)
+       func_stripname '-L' '' "$arg"
+       dir=$func_stripname_result
+       # We need an absolute path.
+       case $dir in
+       [\\/]* | [A-Za-z]:[\\/]*) ;;
+       *)
+         absdir=`cd "$dir" && pwd`
+         test -z "$absdir" && \
+           func_fatal_error "cannot determine absolute directory name of \`$dir'"
+         dir="$absdir"
          ;;
        esac
-
-       if test "$droppeddeps" = yes; then
-         if test "$module" = yes; then
-           $echo
-           $echo "*** Warning: libtool could not satisfy all declared inter-library"
-           $echo "*** dependencies of module $libname.  Therefore, libtool will create"
-           $echo "*** a static module, that should work as long as the dlopening"
-           $echo "*** application is linked with the -dlopen flag."
-           if test -z "$global_symbol_pipe"; then
-             $echo
-             $echo "*** However, this would only work if libtool was able to extract symbol"
-             $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-             $echo "*** not find such a program.  So, this module is probably useless."
-             $echo "*** \`nm' from GNU binutils and a full rebuild may help."
-           fi
-           if test "$build_old_libs" = no; then
-             oldlibs="$output_objdir/$libname.$libext"
-             build_libtool_libs=module
-             build_old_libs=yes
-           else
-             build_libtool_libs=no
-           fi
-         else
-           $echo "*** The inter-library dependencies that have been dropped here will be"
-           $echo "*** automatically added whenever a program is linked with this library"
-           $echo "*** or is declared to -dlopen it."
-
-           if test "$allow_undefined" = no; then
-             $echo
-             $echo "*** Since this library must not contain undefined symbols,"
-             $echo "*** because either the platform does not support them or"
-             $echo "*** it was explicitly requested with -no-undefined,"
-             $echo "*** libtool will only create a static version of it."
-             if test "$build_old_libs" = no; then
-               oldlibs="$output_objdir/$libname.$libext"
-               build_libtool_libs=module
-               build_old_libs=yes
-             else
-               build_libtool_libs=no
-             fi
-           fi
-         fi
-       fi
-       # Done checking deplibs!
-       deplibs=$newdeplibs
-      fi
-
-
-      # move library search paths that coincide with paths to not yet
-      # installed libraries to the beginning of the library search list
-      new_libs=
-      for path in $notinst_path; do
-       case " $new_libs " in
-       *" -L$path/$objdir "*) ;;
+       case "$deplibs " in
+       *" -L$dir "*) ;;
        *)
-         case " $deplibs " in
-         *" -L$path/$objdir "*)
-           new_libs="$new_libs -L$path/$objdir" ;;
-         esac
+         deplibs="$deplibs -L$dir"
+         lib_search_path="$lib_search_path $dir"
          ;;
        esac
-      done
-      for deplib in $deplibs; do
-       case $deplib in
-       -L*)
-         case " $new_libs " in
-         *" $deplib "*) ;;
-         *) new_libs="$new_libs $deplib" ;;
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+         testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+         case :$dllsearchpath: in
+         *":$dir:"*) ;;
+         *) dllsearchpath="$dllsearchpath:$dir";;
+         esac
+         case :$dllsearchpath: in
+         *":$testbindir:"*) ;;
+         *) dllsearchpath="$dllsearchpath:$testbindir";;
          esac
          ;;
-       *) new_libs="$new_libs $deplib" ;;
        esac
-      done
-      deplibs="$new_libs"
-
-
-      # All the library-specific variables (install_libdir is set above).
-      library_names=
-      old_library=
-      dlname=
+       continue
+       ;;
 
-      # Test again, we may have decided not to build it any more
-      if test "$build_libtool_libs" = yes; then
-       if test "$hardcode_into_libs" = yes; then
-         # Hardcode the library paths
-         hardcode_libdirs=
-         dep_rpath=
-         rpath="$finalize_rpath"
-         test "$mode" != relink && rpath="$compile_rpath$rpath"
-         for libdir in $rpath; do
-           if test -n "$hardcode_libdir_flag_spec"; then
-             if test -n "$hardcode_libdir_separator"; then
-               if test -z "$hardcode_libdirs"; then
-                 hardcode_libdirs="$libdir"
-               else
-                 # Just accumulate the unique libdirs.
-                 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-                 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-                   ;;
-                 *)
-                   hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-                   ;;
-                 esac
-               fi
-             else
-               eval flag=\"$hardcode_libdir_flag_spec\"
-               dep_rpath="$dep_rpath $flag"
-             fi
-           elif test -n "$runpath_var"; then
-             case "$perm_rpath " in
-             *" $libdir "*) ;;
-             *) perm_rpath="$perm_rpath $libdir" ;;
-             esac
-           fi
-         done
-         # Substitute the hardcoded libdirs into the rpath.
-         if test -n "$hardcode_libdir_separator" &&
-            test -n "$hardcode_libdirs"; then
-           libdir="$hardcode_libdirs"
-           if test -n "$hardcode_libdir_flag_spec_ld"; then
-             eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
-           else
-             eval dep_rpath=\"$hardcode_libdir_flag_spec\"
-           fi
-         fi
-         if test -n "$runpath_var" && test -n "$perm_rpath"; then
-           # We should set the runpath_var.
-           rpath=
-           for dir in $perm_rpath; do
-             rpath="$rpath$dir:"
-           done
-           eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
-         fi
-         test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+      -l*)
+       if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+         case $host in
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
+           # These systems don't actually have a C or math library (as such)
+           continue
+           ;;
+         *-*-os2*)
+           # These systems don't actually have a C library (as such)
+           test "X$arg" = "X-lc" && continue
+           ;;
+         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+           # Do not include libc due to us having libc/libc_r.
+           test "X$arg" = "X-lc" && continue
+           ;;
+         *-*-rhapsody* | *-*-darwin1.[012])
+           # Rhapsody C and math libraries are in the System framework
+           deplibs="$deplibs System.ltframework"
+           continue
+           ;;
+         *-*-sco3.2v5* | *-*-sco5v6*)
+           # Causes problems with __ctype
+           test "X$arg" = "X-lc" && continue
+           ;;
+         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+           # Compiler inserts libc in the correct place for threads to work
+           test "X$arg" = "X-lc" && continue
+           ;;
+         esac
+       elif test "X$arg" = "X-lc_r"; then
+        case $host in
+        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+          # Do not include libc_r directly, use -pthread flag.
+          continue
+          ;;
+        esac
        fi
+       deplibs="$deplibs $arg"
+       continue
+       ;;
 
-       shlibpath="$finalize_shlibpath"
-       test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
-       if test -n "$shlibpath"; then
-         eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
-       fi
+      -module)
+       module=yes
+       continue
+       ;;
 
-       # Get the real and link names of the library.
-       eval shared_ext=\"$shrext_cmds\"
-       eval library_names=\"$library_names_spec\"
-       set dummy $library_names
-       realname="$2"
-       shift; shift
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      # Darwin uses the -arch flag to determine output architecture.
+      -model|-arch|-isysroot)
+       compiler_flags="$compiler_flags $arg"
+       func_append compile_command " $arg"
+       func_append finalize_command " $arg"
+       prev=xcompiler
+       continue
+       ;;
 
-       if test -n "$soname_spec"; then
-         eval soname=\"$soname_spec\"
-       else
-         soname="$realname"
-       fi
-       if test -z "$dlname"; then
-         dlname=$soname
-       fi
+      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+       compiler_flags="$compiler_flags $arg"
+       func_append compile_command " $arg"
+       func_append finalize_command " $arg"
+       case "$new_inherited_linker_flags " in
+           *" $arg "*) ;;
+           * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
+       esac
+       continue
+       ;;
 
-       lib="$output_objdir/$realname"
-       linknames=
-       for link
-       do
-         linknames="$linknames $link"
-       done
+      -multi_module)
+       single_module="${wl}-multi_module"
+       continue
+       ;;
 
-       # Use standard objects if they are pic
-       test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      -no-fast-install)
+       fast_install=no
+       continue
+       ;;
 
-       # Prepare the list of exported symbols
-       if test -z "$export_symbols"; then
-         if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
-           $show "generating symbol list for \`$libname.la'"
-           export_symbols="$output_objdir/$libname.exp"
-           $run $rm $export_symbols
-           cmds=$export_symbols_cmds
-           save_ifs="$IFS"; IFS='~'
-           for cmd in $cmds; do
-             IFS="$save_ifs"
-             eval cmd=\"$cmd\"
-             if len=`expr "X$cmd" : ".*"` &&
-              test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-               $show "$cmd"
-               $run eval "$cmd" || exit $?
-               skipped_export=false
-             else
-               # The command line is too long to execute in one step.
-               $show "using reloadable object file for export list..."
-               skipped_export=:
-               # Break out early, otherwise skipped_export may be
-               # set to false by a later but shorter cmd.
-               break
-             fi
-           done
-           IFS="$save_ifs"
-           if test -n "$export_symbols_regex"; then
-             $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
-             $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
-             $show "$mv \"${export_symbols}T\" \"$export_symbols\""
-             $run eval '$mv "${export_symbols}T" "$export_symbols"'
-           fi
-         fi
-       fi
+      -no-install)
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
+         # The PATH hackery in wrapper scripts is required on Windows
+         # and Darwin in order for the loader to find any dlls it needs.
+         func_warning "\`-no-install' is ignored for $host"
+         func_warning "assuming \`-no-fast-install' instead"
+         fast_install=no
+         ;;
+       *) no_install=yes ;;
+       esac
+       continue
+       ;;
 
-       if test -n "$export_symbols" && test -n "$include_expsyms"; then
-         $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
-       fi
+      -no-undefined)
+       allow_undefined=no
+       continue
+       ;;
 
-       tmp_deplibs=
-       for test_deplib in $deplibs; do
-               case " $convenience " in
-               *" $test_deplib "*) ;;
-               *)
-                       tmp_deplibs="$tmp_deplibs $test_deplib"
-                       ;;
-               esac
-       done
-       deplibs="$tmp_deplibs"
+      -objectlist)
+       prev=objectlist
+       continue
+       ;;
 
-       if test -n "$convenience"; then
-         if test -n "$whole_archive_flag_spec"; then
-           save_libobjs=$libobjs
-           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-         else
-           gentop="$output_objdir/${outputname}x"
-           generated="$generated $gentop"
+      -o) prev=output ;;
 
-           func_extract_archives $gentop $convenience
-           libobjs="$libobjs $func_extract_archives_result"
-         fi
-       fi
-       
-       if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
-         eval flag=\"$thread_safe_flag_spec\"
-         linker_flags="$linker_flags $flag"
-       fi
+      -precious-files-regex)
+       prev=precious_regex
+       continue
+       ;;
 
-       # Make a backup of the uninstalled library when relinking
-       if test "$mode" = relink; then
-         $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
-       fi
+      -release)
+       prev=release
+       continue
+       ;;
 
-       # Do each of the archive commands.
-       if test "$module" = yes && test -n "$module_cmds" ; then
-         if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
-           eval test_cmds=\"$module_expsym_cmds\"
-           cmds=$module_expsym_cmds
-         else
-           eval test_cmds=\"$module_cmds\"
-           cmds=$module_cmds
-         fi
-       else
-       if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-         eval test_cmds=\"$archive_expsym_cmds\"
-         cmds=$archive_expsym_cmds
-       else
-         eval test_cmds=\"$archive_cmds\"
-         cmds=$archive_cmds
-         fi
-       fi
+      -rpath)
+       prev=rpath
+       continue
+       ;;
 
-       if test "X$skipped_export" != "X:" &&
-          len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
-          test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-         :
-       else
-         # The command line is too long to link in one step, link piecewise.
-         $echo "creating reloadable object files..."
+      -R)
+       prev=xrpath
+       continue
+       ;;
 
-         # Save the value of $output and $libobjs because we want to
-         # use them later.  If we have whole_archive_flag_spec, we
-         # want to use save_libobjs as it was before
-         # whole_archive_flag_spec was expanded, because we can't
-         # assume the linker understands whole_archive_flag_spec.
-         # This may have to be revisited, in case too many
-         # convenience libraries get linked in and end up exceeding
-         # the spec.
-         if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
-           save_libobjs=$libobjs
-         fi
-         save_output=$output
-         output_la=`$echo "X$output" | $Xsed -e "$basename"`
+      -R*)
+       func_stripname '-R' '' "$arg"
+       dir=$func_stripname_result
+       # We need an absolute path.
+       case $dir in
+       [\\/]* | [A-Za-z]:[\\/]*) ;;
+       *)
+         func_fatal_error "only absolute run-paths are allowed"
+         ;;
+       esac
+       case "$xrpath " in
+       *" $dir "*) ;;
+       *) xrpath="$xrpath $dir" ;;
+       esac
+       continue
+       ;;
 
-         # Clear the reloadable object creation command queue and
-         # initialize k to one.
-         test_cmds=
-         concat_cmds=
-         objlist=
-         delfiles=
-         last_robj=
-         k=1
-         output=$output_objdir/$output_la-${k}.$objext
-         # Loop over the list of objects to be linked.
-         for obj in $save_libobjs
-         do
-           eval test_cmds=\"$reload_cmds $objlist $last_robj\"
-           if test "X$objlist" = X ||
-              { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
-                test "$len" -le "$max_cmd_len"; }; then
-             objlist="$objlist $obj"
-           else
-             # The command $test_cmds is almost too long, add a
-             # command to the queue.
-             if test "$k" -eq 1 ; then
-               # The first file doesn't have a previous command to add.
-               eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
-             else
-               # All subsequent reloadable object files will link in
-               # the last one created.
-               eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
-             fi
-             last_robj=$output_objdir/$output_la-${k}.$objext
-             k=`expr $k + 1`
-             output=$output_objdir/$output_la-${k}.$objext
-             objlist=$obj
-             len=1
-           fi
-         done
-         # Handle the remaining objects by creating one last
-         # reloadable object file.  All subsequent reloadable object
-         # files will link in the last one created.
-         test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-         eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
-
-         if ${skipped_export-false}; then
-           $show "generating symbol list for \`$libname.la'"
-           export_symbols="$output_objdir/$libname.exp"
-           $run $rm $export_symbols
-           libobjs=$output
-           # Append the command to create the export file.
-           eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
-          fi
-
-         # Set up a command to remove the reloadable object files
-         # after they are used.
-         i=0
-         while test "$i" -lt "$k"
-         do
-           i=`expr $i + 1`
-           delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
-         done
+      -shared)
+       # The effects of -shared are defined in a previous loop.
+       continue
+       ;;
 
-         $echo "creating a temporary reloadable object file: $output"
+      -shrext)
+       prev=shrext
+       continue
+       ;;
 
-         # Loop through the commands generated above and execute them.
-         save_ifs="$IFS"; IFS='~'
-         for cmd in $concat_cmds; do
-           IFS="$save_ifs"
-           $show "$cmd"
-           $run eval "$cmd" || exit $?
-         done
-         IFS="$save_ifs"
+      -static | -static-libtool-libs)
+       # The effects of -static are defined in a previous loop.
+       # We used to do the same as -all-static on platforms that
+       # didn't have a PIC flag, but the assumption that the effects
+       # would be equivalent was wrong.  It would break on at least
+       # Digital Unix and AIX.
+       continue
+       ;;
 
-         libobjs=$output
-         # Restore the value of output.
-         output=$save_output
+      -thread-safe)
+       thread_safe=yes
+       continue
+       ;;
 
-         if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
-           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-         fi
-         # Expand the library linking commands again to reset the
-         # value of $libobjs for piecewise linking.
+      -version-info)
+       prev=vinfo
+       continue
+       ;;
 
-         # Do each of the archive commands.
-         if test "$module" = yes && test -n "$module_cmds" ; then
-           if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
-             cmds=$module_expsym_cmds
-           else
-             cmds=$module_cmds
-           fi
-         else
-         if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-           cmds=$archive_expsym_cmds
-         else
-           cmds=$archive_cmds
-           fi
-         fi
+      -version-number)
+       prev=vinfo
+       vinfo_number=yes
+       continue
+       ;;
 
-         # Append the command to remove the reloadable object files
-         # to the just-reset $cmds.
-         eval cmds=\"\$cmds~\$rm $delfiles\"
-       fi
-       save_ifs="$IFS"; IFS='~'
-       for cmd in $cmds; do
-         IFS="$save_ifs"
-         eval cmd=\"$cmd\"
-         $show "$cmd"
-         $run eval "$cmd" || {
-           lt_exit=$?
+      -weak)
+        prev=weak
+       continue
+       ;;
 
-           # Restore the uninstalled library and exit
-           if test "$mode" = relink; then
-             $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
-           fi
+      -Wc,*)
+       func_stripname '-Wc,' '' "$arg"
+       args=$func_stripname_result
+       arg=
+       save_ifs="$IFS"; IFS=','
+       for flag in $args; do
+         IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+         arg="$arg $wl$func_quote_for_eval_result"
+         compiler_flags="$compiler_flags $func_quote_for_eval_result"
+       done
+       IFS="$save_ifs"
+       func_stripname ' ' '' "$arg"
+       arg=$func_stripname_result
+       ;;
 
-           exit $lt_exit
-         }
+      -Wl,*)
+       func_stripname '-Wl,' '' "$arg"
+       args=$func_stripname_result
+       arg=
+       save_ifs="$IFS"; IFS=','
+       for flag in $args; do
+         IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+         arg="$arg $wl$func_quote_for_eval_result"
+         compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
+         linker_flags="$linker_flags $func_quote_for_eval_result"
        done
        IFS="$save_ifs"
+       func_stripname ' ' '' "$arg"
+       arg=$func_stripname_result
+       ;;
 
-       # Restore the uninstalled library and exit
-       if test "$mode" = relink; then
-         $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+      -Xcompiler)
+       prev=xcompiler
+       continue
+       ;;
 
-         if test -n "$convenience"; then
-           if test -z "$whole_archive_flag_spec"; then
-             $show "${rm}r $gentop"
-             $run ${rm}r "$gentop"
-           fi
-         fi
+      -Xlinker)
+       prev=xlinker
+       continue
+       ;;
 
-         exit $EXIT_SUCCESS
-       fi
+      -XCClinker)
+       prev=xcclinker
+       continue
+       ;;
 
-       # Create links to the real library.
-       for linkname in $linknames; do
-         if test "$realname" != "$linkname"; then
-           $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
-           $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
-         fi
-       done
+      # -msg_* for osf cc
+      -msg_*)
+       func_quote_for_eval "$arg"
+       arg="$func_quote_for_eval_result"
+       ;;
 
-       # If -module or -export-dynamic was specified, set the dlname.
-       if test "$module" = yes || test "$export_dynamic" = yes; then
-         # On all known operating systems, these are identical.
-         dlname="$soname"
-       fi
-      fi
-      ;;
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+      # -r[0-9][0-9]* specifies the processor on the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
+      # -q* pass through compiler args for the IBM compiler
+      # -m*, -t[45]*, -txscale* pass through architecture-specific
+      # compiler args for GCC
+      # -F/path gives path to uninstalled frameworks, gcc on darwin
+      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+      # @file GCC response files
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+        func_quote_for_eval "$arg"
+       arg="$func_quote_for_eval_result"
+        func_append compile_command " $arg"
+        func_append finalize_command " $arg"
+        compiler_flags="$compiler_flags $arg"
+        continue
+        ;;
+
+      # Some other compiler flag.
+      -* | +*)
+        func_quote_for_eval "$arg"
+       arg="$func_quote_for_eval_result"
+       ;;
+
+      *.$objext)
+       # A standard object.
+       objs="$objs $arg"
+       ;;
+
+      *.lo)
+       # A libtool-controlled object.
+
+       # Check to see that this really is a libtool object.
+       if func_lalib_unsafe_p "$arg"; then
+         pic_object=
+         non_pic_object=
+
+         # Read the .lo file
+         func_source "$arg"
+
+         if test -z "$pic_object" ||
+            test -z "$non_pic_object" ||
+            test "$pic_object" = none &&
+            test "$non_pic_object" = none; then
+           func_fatal_error "cannot find name of object for \`$arg'"
+         fi
 
-    obj)
-      if test -n "$deplibs"; then
-       $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
-      fi
+         # Extract subdirectory from the argument.
+         func_dirname "$arg" "/" ""
+         xdir="$func_dirname_result"
 
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-       $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
-      fi
+         if test "$pic_object" != none; then
+           # Prepend the subdirectory the object is found in.
+           pic_object="$xdir$pic_object"
 
-      if test -n "$rpath"; then
-       $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
-      fi
+           if test "$prev" = dlfiles; then
+             if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+               dlfiles="$dlfiles $pic_object"
+               prev=
+               continue
+             else
+               # If libtool objects are unsupported, then we need to preload.
+               prev=dlprefiles
+             fi
+           fi
 
-      if test -n "$xrpath"; then
-       $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
-      fi
+           # CHECK ME:  I think I busted this.  -Ossama
+           if test "$prev" = dlprefiles; then
+             # Preload the old-style object.
+             dlprefiles="$dlprefiles $pic_object"
+             prev=
+           fi
 
-      if test -n "$vinfo"; then
-       $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
-      fi
+           # A PIC object.
+           func_append libobjs " $pic_object"
+           arg="$pic_object"
+         fi
 
-      if test -n "$release"; then
-       $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
-      fi
+         # Non-PIC object.
+         if test "$non_pic_object" != none; then
+           # Prepend the subdirectory the object is found in.
+           non_pic_object="$xdir$non_pic_object"
 
-      case $output in
-      *.lo)
-       if test -n "$objs$old_deplibs"; then
-         $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
-         exit $EXIT_FAILURE
+           # A standard non-PIC object
+           func_append non_pic_objects " $non_pic_object"
+           if test -z "$pic_object" || test "$pic_object" = none ; then
+             arg="$non_pic_object"
+           fi
+         else
+           # If the PIC object exists, use it instead.
+           # $xdir was prepended to $pic_object above.
+           non_pic_object="$pic_object"
+           func_append non_pic_objects " $non_pic_object"
+         fi
+       else
+         # Only an error if not doing a dry-run.
+         if $opt_dry_run; then
+           # Extract subdirectory from the argument.
+           func_dirname "$arg" "/" ""
+           xdir="$func_dirname_result"
+
+           func_lo2o "$arg"
+           pic_object=$xdir$objdir/$func_lo2o_result
+           non_pic_object=$xdir$func_lo2o_result
+           func_append libobjs " $pic_object"
+           func_append non_pic_objects " $non_pic_object"
+         else
+           func_fatal_error "\`$arg' is not a valid libtool object"
+         fi
        fi
-       libobj="$output"
-       obj=`$echo "X$output" | $Xsed -e "$lo2o"`
-       ;;
-      *)
-       libobj=
-       obj="$output"
        ;;
-      esac
 
-      # Delete the old objects.
-      $run $rm $obj $libobj
+      *.$libext)
+       # An archive.
+       deplibs="$deplibs $arg"
+       old_deplibs="$old_deplibs $arg"
+       continue
+       ;;
 
-      # Objects from convenience libraries.  This assumes
-      # single-version convenience libraries.  Whenever we create
-      # different ones for PIC/non-PIC, this we'll have to duplicate
-      # the extraction.
-      reload_conv_objs=
-      gentop=
-      # reload_cmds runs $LD directly, so let us get rid of
-      # -Wl from whole_archive_flag_spec
-      wl=
+      *.la)
+       # A libtool-controlled library.
 
-      if test -n "$convenience"; then
-       if test -n "$whole_archive_flag_spec"; then
-         eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+       if test "$prev" = dlfiles; then
+         # This library was specified with -dlopen.
+         dlfiles="$dlfiles $arg"
+         prev=
+       elif test "$prev" = dlprefiles; then
+         # The library was specified with -dlpreopen.
+         dlprefiles="$dlprefiles $arg"
+         prev=
        else
-         gentop="$output_objdir/${obj}x"
-         generated="$generated $gentop"
-
-         func_extract_archives $gentop $convenience
-         reload_conv_objs="$reload_objs $func_extract_archives_result"
+         deplibs="$deplibs $arg"
        fi
-      fi
-
-      # Create the old-style object.
-      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
-
-      output="$obj"
-      cmds=$reload_cmds
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-       IFS="$save_ifs"
-       eval cmd=\"$cmd\"
-       $show "$cmd"
-       $run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
+       continue
+       ;;
 
-      # Exit if we aren't doing a library object file.
-      if test -z "$libobj"; then
-       if test -n "$gentop"; then
-         $show "${rm}r $gentop"
-         $run ${rm}r $gentop
-       fi
+      # Some other compiler argument.
+      *)
+       # Unknown arguments in both finalize_command and compile_command need
+       # to be aesthetically quoted because they are evaled later.
+       func_quote_for_eval "$arg"
+       arg="$func_quote_for_eval_result"
+       ;;
+      esac # arg
 
-       exit $EXIT_SUCCESS
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+       func_append compile_command " $arg"
+       func_append finalize_command " $arg"
       fi
+    done # argument parsing loop
 
-      if test "$build_libtool_libs" != yes; then
-       if test -n "$gentop"; then
-         $show "${rm}r $gentop"
-         $run ${rm}r $gentop
-       fi
+    test -n "$prev" && \
+      func_fatal_help "the \`$prevarg' option requires an argument"
 
-       # Create an invalid libtool object if no PIC, so that we don't
-       # accidentally link it into a program.
-       # $show "echo timestamp > $libobj"
-       # $run eval "echo timestamp > $libobj" || exit $?
-       exit $EXIT_SUCCESS
-      fi
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      func_append compile_command " $arg"
+      func_append finalize_command " $arg"
+    fi
 
-      if test -n "$pic_flag" || test "$pic_mode" != default; then
-       # Only do commands if we really have different PIC objects.
-       reload_objs="$libobjs $reload_conv_objs"
-       output="$libobj"
-       cmds=$reload_cmds
-       save_ifs="$IFS"; IFS='~'
-       for cmd in $cmds; do
-         IFS="$save_ifs"
-         eval cmd=\"$cmd\"
-         $show "$cmd"
-         $run eval "$cmd" || exit $?
-       done
-       IFS="$save_ifs"
-      fi
+    oldlibs=
+    # calculate the name of the file, without its directory
+    func_basename "$output"
+    outputname="$func_basename_result"
+    libobjs_save="$libobjs"
 
-      if test -n "$gentop"; then
-       $show "${rm}r $gentop"
-       $run ${rm}r $gentop
-      fi
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
 
-      exit $EXIT_SUCCESS
-      ;;
+    func_dirname "$output" "/" ""
+    output_objdir="$func_dirname_result$objdir"
+    # Create the object directory.
+    func_mkdir_p "$output_objdir"
 
-    prog)
-      case $host in
-       *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
-      esac
-      if test -n "$vinfo"; then
-       $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
-      fi
+    # Determine the type of output
+    case $output in
+    "")
+      func_fatal_help "you must specify an output file"
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
 
-      if test -n "$release"; then
-       $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
-      fi
+    specialdeplibs=
 
-      if test "$preload" = yes; then
-       if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
-          test "$dlopen_self_static" = unknown; then
-         $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
-       fi
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      if $opt_duplicate_deps ; then
+       case "$libs " in
+       *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+       esac
       fi
+      libs="$libs $deplib"
+    done
 
-      case $host in
-      *-*-rhapsody* | *-*-darwin1.[012])
-       # On Rhapsody replace the C library is the System framework
-       compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
-       finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
-       ;;
-      esac
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
 
-      case $host in
-      *darwin*)
-        # Don't allow lazy linking, it breaks C++ global constructors
-        if test "$tagname" = CXX ; then
-        compile_command="$compile_command ${wl}-bind_at_load"
-        finalize_command="$finalize_command ${wl}-bind_at_load"
-        fi
-        ;;
-      esac
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      if $opt_duplicate_compiler_generated_deps; then
+       for pre_post_dep in $predeps $postdeps; do
+         case "$pre_post_deps " in
+         *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+         esac
+         pre_post_deps="$pre_post_deps $pre_post_dep"
+       done
+      fi
+      pre_post_deps=
+    fi
 
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    notinst_path= # paths that contain not-installed libtool libraries
 
-      # move library search paths that coincide with paths to not yet
-      # installed libraries to the beginning of the library search list
-      new_libs=
-      for path in $notinst_path; do
-       case " $new_libs " in
-       *" -L$path/$objdir "*) ;;
-       *)
-         case " $compile_deplibs " in
-         *" -L$path/$objdir "*)
-           new_libs="$new_libs -L$path/$objdir" ;;
-         esac
-         ;;
-       esac
-      done
-      for deplib in $compile_deplibs; do
-       case $deplib in
-       -L*)
-         case " $new_libs " in
-         *" $deplib "*) ;;
-         *) new_libs="$new_libs $deplib" ;;
+    case $linkmode in
+    lib)
+       passes="conv dlpreopen link"
+       for file in $dlfiles $dlprefiles; do
+         case $file in
+         *.la) ;;
+         *)
+           func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+           ;;
          esac
-         ;;
-       *) new_libs="$new_libs $deplib" ;;
-       esac
-      done
-      compile_deplibs="$new_libs"
-
+       done
+       ;;
+    prog)
+       compile_deplibs=
+       finalize_deplibs=
+       alldeplibs=no
+       newdlfiles=
+       newdlprefiles=
+       passes="conv scan dlopen dlpreopen link"
+       ;;
+    *)  passes="conv"
+       ;;
+    esac
 
-      compile_command="$compile_command $compile_deplibs"
-      finalize_command="$finalize_command $finalize_deplibs"
+    for pass in $passes; do
+      # The preopen pass in lib mode reverses $deplibs; put it back here
+      # so that -L comes before libs that need it for instance...
+      if test "$linkmode,$pass" = "lib,link"; then
+       ## FIXME: Find the place where the list is rebuilt in the wrong
+       ##        order, and fix it there properly
+        tmp_deplibs=
+       for deplib in $deplibs; do
+         tmp_deplibs="$deplib $tmp_deplibs"
+       done
+       deplibs="$tmp_deplibs"
+      fi
 
-      if test -n "$rpath$xrpath"; then
-       # If the user specified any rpath flags, then add them.
-       for libdir in $rpath $xrpath; do
-         # This is the magic to use -rpath.
-         case "$finalize_rpath " in
-         *" $libdir "*) ;;
-         *) finalize_rpath="$finalize_rpath $libdir" ;;
+      if test "$linkmode,$pass" = "lib,link" ||
+        test "$linkmode,$pass" = "prog,scan"; then
+       libs="$deplibs"
+       deplibs=
+      fi
+      if test "$linkmode" = prog; then
+       case $pass in
+       dlopen) libs="$dlfiles" ;;
+       dlpreopen) libs="$dlprefiles" ;;
+       link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+       esac
+      fi
+      if test "$linkmode,$pass" = "lib,dlpreopen"; then
+       # Collect and forward deplibs of preopened libtool libs
+       for lib in $dlprefiles; do
+         # Ignore non-libtool-libs
+         dependency_libs=
+         case $lib in
+         *.la) func_source "$lib" ;;
          esac
+
+         # Collect preopened libtool deplibs, except any this library
+         # has declared as weak libs
+         for deplib in $dependency_libs; do
+            deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+           case " $weak_libs " in
+           *" $deplib_base "*) ;;
+           *) deplibs="$deplibs $deplib" ;;
+           esac
+         done
        done
+       libs="$dlprefiles"
+      fi
+      if test "$pass" = dlopen; then
+       # Collect dlpreopened libraries
+       save_deplibs="$deplibs"
+       deplibs=
       fi
 
-      # Now hardcode the library paths
-      rpath=
-      hardcode_libdirs=
-      for libdir in $compile_rpath $finalize_rpath; do
-       if test -n "$hardcode_libdir_flag_spec"; then
-         if test -n "$hardcode_libdir_separator"; then
-           if test -z "$hardcode_libdirs"; then
-             hardcode_libdirs="$libdir"
+      for deplib in $libs; do
+       lib=
+       found=no
+       case $deplib in
+       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+         if test "$linkmode,$pass" = "prog,link"; then
+           compile_deplibs="$deplib $compile_deplibs"
+           finalize_deplibs="$deplib $finalize_deplibs"
+         else
+           compiler_flags="$compiler_flags $deplib"
+           if test "$linkmode" = lib ; then
+               case "$new_inherited_linker_flags " in
+                   *" $deplib "*) ;;
+                   * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+               esac
+           fi
+         fi
+         continue
+         ;;
+       -l*)
+         if test "$linkmode" != lib && test "$linkmode" != prog; then
+           func_warning "\`-l' is ignored for archives/objects"
+           continue
+         fi
+         func_stripname '-l' '' "$deplib"
+         name=$func_stripname_result
+         if test "$linkmode" = lib; then
+           searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+         else
+           searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+         fi
+         for searchdir in $searchdirs; do
+           for search_ext in .la $std_shrext .so .a; do
+             # Search the libtool library
+             lib="$searchdir/lib${name}${search_ext}"
+             if test -f "$lib"; then
+               if test "$search_ext" = ".la"; then
+                 found=yes
+               else
+                 found=no
+               fi
+               break 2
+             fi
+           done
+         done
+         if test "$found" != yes; then
+           # deplib doesn't seem to be a libtool library
+           if test "$linkmode,$pass" = "prog,link"; then
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
            else
-             # Just accumulate the unique libdirs.
-             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-               ;;
-             *)
-               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+             deplibs="$deplib $deplibs"
+             test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+           fi
+           continue
+         else # deplib is a libtool library
+           # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+           # We need to do some special things here, and not later.
+           if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+             case " $predeps $postdeps " in
+             *" $deplib "*)
+               if func_lalib_p "$lib"; then
+                 library_names=
+                 old_library=
+                 func_source "$lib"
+                 for l in $old_library $library_names; do
+                   ll="$l"
+                 done
+                 if test "X$ll" = "X$old_library" ; then # only static version available
+                   found=no
+                   func_dirname "$lib" "" "."
+                   ladir="$func_dirname_result"
+                   lib=$ladir/$old_library
+                   if test "$linkmode,$pass" = "prog,link"; then
+                     compile_deplibs="$deplib $compile_deplibs"
+                     finalize_deplibs="$deplib $finalize_deplibs"
+                   else
+                     deplibs="$deplib $deplibs"
+                     test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+                   fi
+                   continue
+                 fi
+               fi
                ;;
+             *) ;;
              esac
            fi
+         fi
+         ;; # -l
+       *.ltframework)
+         if test "$linkmode,$pass" = "prog,link"; then
+           compile_deplibs="$deplib $compile_deplibs"
+           finalize_deplibs="$deplib $finalize_deplibs"
          else
-           eval flag=\"$hardcode_libdir_flag_spec\"
-           rpath="$rpath $flag"
+           deplibs="$deplib $deplibs"
+           if test "$linkmode" = lib ; then
+               case "$new_inherited_linker_flags " in
+                   *" $deplib "*) ;;
+                   * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+               esac
+           fi
          fi
-       elif test -n "$runpath_var"; then
-         case "$perm_rpath " in
-         *" $libdir "*) ;;
-         *) perm_rpath="$perm_rpath $libdir" ;;
-         esac
-       fi
-       case $host in
-       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-         testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
-         case :$dllsearchpath: in
-         *":$libdir:"*) ;;
-         *) dllsearchpath="$dllsearchpath:$libdir";;
-         esac
-         case :$dllsearchpath: in
-         *":$testbindir:"*) ;;
-         *) dllsearchpath="$dllsearchpath:$testbindir";;
-         esac
+         continue
          ;;
-       esac
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-        test -n "$hardcode_libdirs"; then
-       libdir="$hardcode_libdirs"
-       eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      compile_rpath="$rpath"
+       -L*)
+         case $linkmode in
+         lib)
+           deplibs="$deplib $deplibs"
+           test "$pass" = conv && continue
+           newdependency_libs="$deplib $newdependency_libs"
+           func_stripname '-L' '' "$deplib"
+           newlib_search_path="$newlib_search_path $func_stripname_result"
+           ;;
+         prog)
+           if test "$pass" = conv; then
+             deplibs="$deplib $deplibs"
+             continue
+           fi
+           if test "$pass" = scan; then
+             deplibs="$deplib $deplibs"
+           else
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           fi
+           func_stripname '-L' '' "$deplib"
+           newlib_search_path="$newlib_search_path $func_stripname_result"
+           ;;
+         *)
+           func_warning "\`-L' is ignored for archives/objects"
+           ;;
+         esac # linkmode
+         continue
+         ;; # -L
+       -R*)
+         if test "$pass" = link; then
+           func_stripname '-R' '' "$deplib"
+           dir=$func_stripname_result
+           # Make sure the xrpath contains only unique directories.
+           case "$xrpath " in
+           *" $dir "*) ;;
+           *) xrpath="$xrpath $dir" ;;
+           esac
+         fi
+         deplibs="$deplib $deplibs"
+         continue
+         ;;
+       *.la) lib="$deplib" ;;
+       *.$libext)
+         if test "$pass" = conv; then
+           deplibs="$deplib $deplibs"
+           continue
+         fi
+         case $linkmode in
+         lib)
+           # Linking convenience modules into shared libraries is allowed,
+           # but linking other static libraries is non-portable.
+           case " $dlpreconveniencelibs " in
+           *" $deplib "*) ;;
+           *)
+             valid_a_lib=no
+             case $deplibs_check_method in
+               match_pattern*)
+                 set dummy $deplibs_check_method; shift
+                 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+                 if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
+                   | $EGREP "$match_pattern_regex" > /dev/null; then
+                   valid_a_lib=yes
+                 fi
+               ;;
+               pass_all)
+                 valid_a_lib=yes
+               ;;
+             esac
+             if test "$valid_a_lib" != yes; then
+               $ECHO
+               $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+               $ECHO "*** I have the capability to make that library automatically link in when"
+               $ECHO "*** you link to this library.  But I can only do this if you have a"
+               $ECHO "*** shared version of the library, which you do not appear to have"
+               $ECHO "*** because the file extensions .$libext of this argument makes me believe"
+               $ECHO "*** that it is just a static archive that I should not use here."
+             else
+               $ECHO
+               $ECHO "*** Warning: Linking the shared library $output against the"
+               $ECHO "*** static library $deplib is not portable!"
+               deplibs="$deplib $deplibs"
+             fi
+             ;;
+           esac
+           continue
+           ;;
+         prog)
+           if test "$pass" != link; then
+             deplibs="$deplib $deplibs"
+           else
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           fi
+           continue
+           ;;
+         esac # linkmode
+         ;; # *.$libext
+       *.lo | *.$objext)
+         if test "$pass" = conv; then
+           deplibs="$deplib $deplibs"
+         elif test "$linkmode" = prog; then
+           if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+             # If there is no dlopen support or we're linking statically,
+             # we need to preload.
+             newdlprefiles="$newdlprefiles $deplib"
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           else
+             newdlfiles="$newdlfiles $deplib"
+           fi
+         fi
+         continue
+         ;;
+       %DEPLIBS%)
+         alldeplibs=yes
+         continue
+         ;;
+       esac # case $deplib
+
+       if test "$found" = yes || test -f "$lib"; then :
+       else
+         func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+       fi
+
+       # Check to see that this really is a libtool archive.
+       func_lalib_unsafe_p "$lib" \
+         || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+       func_dirname "$lib" "" "."
+       ladir="$func_dirname_result"
+
+       dlname=
+       dlopen=
+       dlpreopen=
+       libdir=
+       library_names=
+       old_library=
+       inherited_linker_flags=
+       # If the library was installed with an old release of libtool,
+       # it will not redefine variables installed, or shouldnotlink
+       installed=yes
+       shouldnotlink=no
+       avoidtemprpath=
+
+
+       # Read the .la file
+       func_source "$lib"
+
+       # Convert "-framework foo" to "foo.ltframework"
+       if test -n "$inherited_linker_flags"; then
+         tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+         for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+           case " $new_inherited_linker_flags " in
+             *" $tmp_inherited_linker_flag "*) ;;
+             *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+           esac
+         done
+       fi
+       dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+       if test "$linkmode,$pass" = "lib,link" ||
+          test "$linkmode,$pass" = "prog,scan" ||
+          { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+         test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+         test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+       fi
 
-      rpath=
-      hardcode_libdirs=
-      for libdir in $finalize_rpath; do
-       if test -n "$hardcode_libdir_flag_spec"; then
-         if test -n "$hardcode_libdir_separator"; then
-           if test -z "$hardcode_libdirs"; then
-             hardcode_libdirs="$libdir"
-           else
-             # Just accumulate the unique libdirs.
-             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-               ;;
-             *)
-               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-               ;;
+       if test "$pass" = conv; then
+         # Only check for convenience libraries
+         deplibs="$lib $deplibs"
+         if test -z "$libdir"; then
+           if test -z "$old_library"; then
+             func_fatal_error "cannot find name of link library for \`$lib'"
+           fi
+           # It is a libtool convenience library, so add in its objects.
+           convenience="$convenience $ladir/$objdir/$old_library"
+           old_convenience="$old_convenience $ladir/$objdir/$old_library"
+         elif test "$linkmode" != prog && test "$linkmode" != lib; then
+           func_fatal_error "\`$lib' is not a convenience library"
+         fi
+         tmp_libs=
+         for deplib in $dependency_libs; do
+           deplibs="$deplib $deplibs"
+           if $opt_duplicate_deps ; then
+             case "$tmp_libs " in
+             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
              esac
            fi
+           tmp_libs="$tmp_libs $deplib"
+         done
+         continue
+       fi # $pass = conv
+
+
+       # Get the name of the library we link against.
+       linklib=
+       for l in $old_library $library_names; do
+         linklib="$l"
+       done
+       if test -z "$linklib"; then
+         func_fatal_error "cannot find name of link library for \`$lib'"
+       fi
+
+       # This library was specified with -dlopen.
+       if test "$pass" = dlopen; then
+         if test -z "$libdir"; then
+           func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+         fi
+         if test -z "$dlname" ||
+            test "$dlopen_support" != yes ||
+            test "$build_libtool_libs" = no; then
+           # If there is no dlname, no dlopen support or we're linking
+           # statically, we need to preload.  We also need to preload any
+           # dependent libraries so libltdl's deplib preloader doesn't
+           # bomb out in the load deplibs phase.
+           dlprefiles="$dlprefiles $lib $dependency_libs"
          else
-           eval flag=\"$hardcode_libdir_flag_spec\"
-           rpath="$rpath $flag"
+           newdlfiles="$newdlfiles $lib"
          fi
-       elif test -n "$runpath_var"; then
-         case "$finalize_perm_rpath " in
-         *" $libdir "*) ;;
-         *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
-         esac
-       fi
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-        test -n "$hardcode_libdirs"; then
-       libdir="$hardcode_libdirs"
-       eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      finalize_rpath="$rpath"
+         continue
+       fi # $pass = dlopen
 
-      if test -n "$libobjs" && test "$build_old_libs" = yes; then
-       # Transform all the library objects into standard objects.
-       compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-       finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-      fi
+       # We need an absolute path.
+       case $ladir in
+       [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+       *)
+         abs_ladir=`cd "$ladir" && pwd`
+         if test -z "$abs_ladir"; then
+           func_warning "cannot determine absolute directory name of \`$ladir'"
+           func_warning "passing it literally to the linker, although it might fail"
+           abs_ladir="$ladir"
+         fi
+         ;;
+       esac
+       func_basename "$lib"
+       laname="$func_basename_result"
 
-      dlsyms=
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-       if test -n "$NM" && test -n "$global_symbol_pipe"; then
-         dlsyms="${outputname}S.c"
+       # Find the relevant object directory and library name.
+       if test "X$installed" = Xyes; then
+         if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+           func_warning "library \`$lib' was moved."
+           dir="$ladir"
+           absdir="$abs_ladir"
+           libdir="$abs_ladir"
+         else
+           dir="$libdir"
+           absdir="$libdir"
+         fi
+         test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
        else
-         $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
-       fi
-      fi
-
-      if test -n "$dlsyms"; then
-       case $dlsyms in
-       "") ;;
-       *.c)
-         # Discover the nlist of each of the dlfiles.
-         nlist="$output_objdir/${outputname}.nm"
+         if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+           dir="$ladir"
+           absdir="$abs_ladir"
+           # Remove this search path later
+           notinst_path="$notinst_path $abs_ladir"
+         else
+           dir="$ladir/$objdir"
+           absdir="$abs_ladir/$objdir"
+           # Remove this search path later
+           notinst_path="$notinst_path $abs_ladir"
+         fi
+       fi # $installed = yes
+       func_stripname 'lib' '.la' "$laname"
+       name=$func_stripname_result
 
-         $show "$rm $nlist ${nlist}S ${nlist}T"
-         $run $rm "$nlist" "${nlist}S" "${nlist}T"
+       # This library was specified with -dlpreopen.
+       if test "$pass" = dlpreopen; then
+         if test -z "$libdir" && test "$linkmode" = prog; then
+           func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+         fi
+         # Prefer using a static library (so that no silly _DYNAMIC symbols
+         # are required to link).
+         if test -n "$old_library"; then
+           newdlprefiles="$newdlprefiles $dir/$old_library"
+           # Keep a list of preopened convenience libraries to check
+           # that they are being used correctly in the link pass.
+           test -z "$libdir" && \
+               dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
+         # Otherwise, use the dlname, so that lt_dlopen finds it.
+         elif test -n "$dlname"; then
+           newdlprefiles="$newdlprefiles $dir/$dlname"
+         else
+           newdlprefiles="$newdlprefiles $dir/$linklib"
+         fi
+       fi # $pass = dlpreopen
 
-         # Parse the name list into a source file.
-         $show "creating $output_objdir/$dlsyms"
+       if test -z "$libdir"; then
+         # Link the convenience library
+         if test "$linkmode" = lib; then
+           deplibs="$dir/$old_library $deplibs"
+         elif test "$linkmode,$pass" = "prog,link"; then
+           compile_deplibs="$dir/$old_library $compile_deplibs"
+           finalize_deplibs="$dir/$old_library $finalize_deplibs"
+         else
+           deplibs="$lib $deplibs" # used for prog,scan pass
+         fi
+         continue
+       fi
 
-         test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
 
-#ifdef __cplusplus
-extern \"C\" {
-#endif
+       if test "$linkmode" = prog && test "$pass" != link; then
+         newlib_search_path="$newlib_search_path $ladir"
+         deplibs="$lib $deplibs"
 
-/* Prevent the only kind of declaration conflicts we can make. */
-#define lt_preloaded_symbols some_other_symbol
+         linkalldeplibs=no
+         if test "$link_all_deplibs" != no || test -z "$library_names" ||
+            test "$build_libtool_libs" = no; then
+           linkalldeplibs=yes
+         fi
 
-/* External symbol declarations for the compiler. */\
-"
+         tmp_libs=
+         for deplib in $dependency_libs; do
+           case $deplib in
+           -L*) func_stripname '-L' '' "$deplib"
+                newlib_search_path="$newlib_search_path $func_stripname_result"
+                ;;
+           esac
+           # Need to link against all dependency_libs?
+           if test "$linkalldeplibs" = yes; then
+             deplibs="$deplib $deplibs"
+           else
+             # Need to hardcode shared library paths
+             # or/and link against static libraries
+             newdependency_libs="$deplib $newdependency_libs"
+           fi
+           if $opt_duplicate_deps ; then
+             case "$tmp_libs " in
+             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+             esac
+           fi
+           tmp_libs="$tmp_libs $deplib"
+         done # for deplib
+         continue
+       fi # $linkmode = prog...
 
-         if test "$dlself" = yes; then
-           $show "generating symbol list for \`$output'"
+       if test "$linkmode,$pass" = "prog,link"; then
+         if test -n "$library_names" &&
+            { { test "$prefer_static_libs" = no ||
+                test "$prefer_static_libs,$installed" = "built,yes"; } ||
+              test -z "$old_library"; }; then
+           # We need to hardcode the library path
+           if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+             # Make sure the rpath contains only unique directories.
+             case "$temp_rpath:" in
+             *"$absdir:"*) ;;
+             *) temp_rpath="$temp_rpath$absdir:" ;;
+             esac
+           fi
 
-           test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+           # Hardcode the library path.
+           # Skip directories that are in the system default run-time
+           # search path.
+           case " $sys_lib_dlsearch_path " in
+           *" $absdir "*) ;;
+           *)
+             case "$compile_rpath " in
+             *" $absdir "*) ;;
+             *) compile_rpath="$compile_rpath $absdir"
+             esac
+             ;;
+           esac
+           case " $sys_lib_dlsearch_path " in
+           *" $libdir "*) ;;
+           *)
+             case "$finalize_rpath " in
+             *" $libdir "*) ;;
+             *) finalize_rpath="$finalize_rpath $libdir"
+             esac
+             ;;
+           esac
+         fi # $linkmode,$pass = prog,link...
 
-           # Add our own program objects to the symbol list.
-           progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-           for arg in $progfiles; do
-             $show "extracting global C symbols from \`$arg'"
-             $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-           done
+         if test "$alldeplibs" = yes &&
+            { test "$deplibs_check_method" = pass_all ||
+              { test "$build_libtool_libs" = yes &&
+                test -n "$library_names"; }; }; then
+           # We only need to search for static libraries
+           continue
+         fi
+       fi
 
-           if test -n "$exclude_expsyms"; then
-             $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
-             $run eval '$mv "$nlist"T "$nlist"'
+       link_static=no # Whether the deplib will be linked statically
+       use_static_libs=$prefer_static_libs
+       if test "$use_static_libs" = built && test "$installed" = yes; then
+         use_static_libs=no
+       fi
+       if test -n "$library_names" &&
+          { test "$use_static_libs" = no || test -z "$old_library"; }; then
+         case $host in
+         *cygwin* | *mingw*)
+             # No point in relinking DLLs because paths are not encoded
+             notinst_deplibs="$notinst_deplibs $lib"
+             need_relink=no
+           ;;
+         *)
+           if test "$installed" = no; then
+             notinst_deplibs="$notinst_deplibs $lib"
+             need_relink=yes
            fi
+           ;;
+         esac
+         # This is a shared library
 
-           if test -n "$export_symbols_regex"; then
-             $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
-             $run eval '$mv "$nlist"T "$nlist"'
+         # Warn about portability, can't link against -module's on some
+         # systems (darwin).  Don't bleat about dlopened modules though!
+         dlopenmodule=""
+         for dlpremoduletest in $dlprefiles; do
+           if test "X$dlpremoduletest" = "X$lib"; then
+             dlopenmodule="$dlpremoduletest"
+             break
+           fi
+         done
+         if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+           $ECHO
+           if test "$linkmode" = prog; then
+             $ECHO "*** Warning: Linking the executable $output against the loadable module"
+           else
+             $ECHO "*** Warning: Linking the shared library $output against the loadable module"
            fi
+           $ECHO "*** $linklib is not portable!"
+         fi
+         if test "$linkmode" = lib &&
+            test "$hardcode_into_libs" = yes; then
+           # Hardcode the library path.
+           # Skip directories that are in the system default run-time
+           # search path.
+           case " $sys_lib_dlsearch_path " in
+           *" $absdir "*) ;;
+           *)
+             case "$compile_rpath " in
+             *" $absdir "*) ;;
+             *) compile_rpath="$compile_rpath $absdir"
+             esac
+             ;;
+           esac
+           case " $sys_lib_dlsearch_path " in
+           *" $libdir "*) ;;
+           *)
+             case "$finalize_rpath " in
+             *" $libdir "*) ;;
+             *) finalize_rpath="$finalize_rpath $libdir"
+             esac
+             ;;
+           esac
+         fi
 
-           # Prepare the list of exported symbols
-           if test -z "$export_symbols"; then
-             export_symbols="$output_objdir/$outputname.exp"
-             $run $rm $export_symbols
-             $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
-              case $host in
-              *cygwin* | *mingw* )
-               $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
-               $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
-                ;;
-              esac
+         if test -n "$old_archive_from_expsyms_cmds"; then
+           # figure out the soname
+           set dummy $library_names
+           shift
+           realname="$1"
+           shift
+           libname=`eval "\\$ECHO \"$libname_spec\""`
+           # use dlname if we got it. it's perfectly good, no?
+           if test -n "$dlname"; then
+             soname="$dlname"
+           elif test -n "$soname_spec"; then
+             # bleh windows
+             case $host in
+             *cygwin* | mingw*)
+               major=`expr $current - $age`
+               versuffix="-$major"
+               ;;
+             esac
+             eval soname=\"$soname_spec\"
            else
-             $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
-             $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
-             $run eval 'mv "$nlist"T "$nlist"'
-              case $host in
-              *cygwin* | *mingw* )
-               $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
-               $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
-                ;;
-              esac
+             soname="$realname"
            fi
-         fi
-
-         for arg in $dlprefiles; do
-           $show "extracting global C symbols from \`$arg'"
-           name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
-           $run eval '$echo ": $name " >> "$nlist"'
-           $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-         done
 
-         if test -z "$run"; then
-           # Make sure we have at least an empty file.
-           test -f "$nlist" || : > "$nlist"
-
-           if test -n "$exclude_expsyms"; then
-             $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
-             $mv "$nlist"T "$nlist"
-           fi
+           # Make a new name for the extract_expsyms_cmds to use
+           soroot="$soname"
+           func_basename "$soroot"
+           soname="$func_basename_result"
+           func_stripname 'lib' '.dll' "$soname"
+           newlib=libimp-$func_stripname_result.a
 
-           # Try sorting and uniquifying the output.
-           if grep -v "^: " < "$nlist" |
-               if sort -k 3 </dev/null >/dev/null 2>&1; then
-                 sort -k 3
-               else
-                 sort +2
-               fi |
-               uniq > "$nlist"S; then
-             :
+           # If the library has no export list, then create one now
+           if test -f "$output_objdir/$soname-def"; then :
            else
-             grep -v "^: " < "$nlist" > "$nlist"S
+             func_verbose "extracting exported symbol list from \`$soname'"
+             func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
            fi
 
-           if test -f "$nlist"S; then
-             eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
-           else
-             $echo '/* NONE */' >> "$output_objdir/$dlsyms"
+           # Create $newlib
+           if test -f "$output_objdir/$newlib"; then :; else
+             func_verbose "generating import library for \`$soname'"
+             func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
            fi
+           # make sure the library variables are pointing to the new library
+           dir=$output_objdir
+           linklib=$newlib
+         fi # test -n "$old_archive_from_expsyms_cmds"
 
-           $echo >> "$output_objdir/$dlsyms" "\
-
-#undef lt_preloaded_symbols
-
-#if defined (__STDC__) && __STDC__
-# define lt_ptr void *
-#else
-# define lt_ptr char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-"
-
-           case $host in
-           *cygwin* | *mingw* )
-         $echo >> "$output_objdir/$dlsyms" "\
-/* DATA imports from DLLs on WIN32 can't be const, because
-   runtime relocations are performed -- see ld's documentation
-   on pseudo-relocs */
-struct {
-"
+         if test "$linkmode" = prog || test "$mode" != relink; then
+           add_shlibpath=
+           add_dir=
+           add=
+           lib_linked=yes
+           case $hardcode_action in
+           immediate | unsupported)
+             if test "$hardcode_direct" = no; then
+               add="$dir/$linklib"
+               case $host in
+                 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+                 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+                 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+                   *-*-unixware7*) add_dir="-L$dir" ;;
+                 *-*-darwin* )
+                   # if the lib is a (non-dlopened) module then we can not
+                   # link against it, someone is ignoring the earlier warnings
+                   if /usr/bin/file -L $add 2> /dev/null |
+                        $GREP ": [^:]* bundle" >/dev/null ; then
+                     if test "X$dlopenmodule" != "X$lib"; then
+                       $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+                       if test -z "$old_library" ; then
+                         $ECHO
+                         $ECHO "*** And there doesn't seem to be a static archive available"
+                         $ECHO "*** The link will probably fail, sorry"
+                       else
+                         add="$dir/$old_library"
+                       fi
+                     elif test -n "$old_library"; then
+                       add="$dir/$old_library"
+                     fi
+                   fi
+               esac
+             elif test "$hardcode_minus_L" = no; then
+               case $host in
+               *-*-sunos*) add_shlibpath="$dir" ;;
+               esac
+               add_dir="-L$dir"
+               add="-l$name"
+             elif test "$hardcode_shlibpath_var" = no; then
+               add_shlibpath="$dir"
+               add="-l$name"
+             else
+               lib_linked=no
+             fi
              ;;
-           * )
-         $echo >> "$output_objdir/$dlsyms" "\
-const struct {
-"
+           relink)
+             if test "$hardcode_direct" = yes &&
+                test "$hardcode_direct_absolute" = no; then
+               add="$dir/$linklib"
+             elif test "$hardcode_minus_L" = yes; then
+               add_dir="-L$dir"
+               # Try looking first in the location we're being installed to.
+               if test -n "$inst_prefix_dir"; then
+                 case $libdir in
+                   [\\/]*)
+                     add_dir="$add_dir -L$inst_prefix_dir$libdir"
+                     ;;
+                 esac
+               fi
+               add="-l$name"
+             elif test "$hardcode_shlibpath_var" = yes; then
+               add_shlibpath="$dir"
+               add="-l$name"
+             else
+               lib_linked=no
+             fi
              ;;
+           *) lib_linked=no ;;
            esac
 
+           if test "$lib_linked" != yes; then
+             func_fatal_configuration "unsupported hardcode properties"
+           fi
 
-         $echo >> "$output_objdir/$dlsyms" "\
-  const char *name;
-  lt_ptr address;
-}
-lt_preloaded_symbols[] =
-{\
-"
-
-           eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
-
-           $echo >> "$output_objdir/$dlsyms" "\
-  {0, (lt_ptr) 0}
-};
+           if test -n "$add_shlibpath"; then
+             case :$compile_shlibpath: in
+             *":$add_shlibpath:"*) ;;
+             *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+             esac
+           fi
+           if test "$linkmode" = prog; then
+             test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+             test -n "$add" && compile_deplibs="$add $compile_deplibs"
+           else
+             test -n "$add_dir" && deplibs="$add_dir $deplibs"
+             test -n "$add" && deplibs="$add $deplibs"
+             if test "$hardcode_direct" != yes &&
+                test "$hardcode_minus_L" != yes &&
+                test "$hardcode_shlibpath_var" = yes; then
+               case :$finalize_shlibpath: in
+               *":$libdir:"*) ;;
+               *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+               esac
+             fi
+           fi
+         fi
 
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt_preloaded_symbols;
-}
-#endif
+         if test "$linkmode" = prog || test "$mode" = relink; then
+           add_shlibpath=
+           add_dir=
+           add=
+           # Finalize command for both is simple: just hardcode it.
+           if test "$hardcode_direct" = yes &&
+              test "$hardcode_direct_absolute" = no; then
+             add="$libdir/$linklib"
+           elif test "$hardcode_minus_L" = yes; then
+             add_dir="-L$libdir"
+             add="-l$name"
+           elif test "$hardcode_shlibpath_var" = yes; then
+             case :$finalize_shlibpath: in
+             *":$libdir:"*) ;;
+             *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+             esac
+             add="-l$name"
+           elif test "$hardcode_automatic" = yes; then
+             if test -n "$inst_prefix_dir" &&
+                test -f "$inst_prefix_dir$libdir/$linklib" ; then
+               add="$inst_prefix_dir$libdir/$linklib"
+             else
+               add="$libdir/$linklib"
+             fi
+           else
+             # We cannot seem to hardcode it, guess we'll fake it.
+             add_dir="-L$libdir"
+             # Try looking first in the location we're being installed to.
+             if test -n "$inst_prefix_dir"; then
+               case $libdir in
+                 [\\/]*)
+                   add_dir="$add_dir -L$inst_prefix_dir$libdir"
+                   ;;
+               esac
+             fi
+             add="-l$name"
+           fi
 
-#ifdef __cplusplus
-}
-#endif\
-"
+           if test "$linkmode" = prog; then
+             test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+             test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+           else
+             test -n "$add_dir" && deplibs="$add_dir $deplibs"
+             test -n "$add" && deplibs="$add $deplibs"
+           fi
          fi
+       elif test "$linkmode" = prog; then
+         # Here we assume that one of hardcode_direct or hardcode_minus_L
+         # is not unsupported.  This is valid on all known static and
+         # shared platforms.
+         if test "$hardcode_direct" != unsupported; then
+           test -n "$old_library" && linklib="$old_library"
+           compile_deplibs="$dir/$linklib $compile_deplibs"
+           finalize_deplibs="$dir/$linklib $finalize_deplibs"
+         else
+           compile_deplibs="-l$name -L$dir $compile_deplibs"
+           finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+         fi
+       elif test "$build_libtool_libs" = yes; then
+         # Not a shared library
+         if test "$deplibs_check_method" != pass_all; then
+           # We're trying link a shared library against a static one
+           # but the system doesn't support it.
 
-         pic_flag_for_symtable=
-         case $host in
-         # compiling the symbol table file with pic_flag works around
-         # a FreeBSD bug that causes programs to crash when -lm is
-         # linked before any other PIC object.  But we must not use
-         # pic_flag when linking with -static.  The problem exists in
-         # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
-         *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
-           case "$compile_command " in
-           *" -static "*) ;;
-           *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
-           esac;;
-         *-*-hpux*)
-           case "$compile_command " in
-           *" -static "*) ;;
-           *) pic_flag_for_symtable=" $pic_flag";;
-           esac
-         esac
-
-         # Now compile the dynamic symbol file.
-         $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
-         $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
-
-         # Clean up the generated files.
-         $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
-         $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
-
-         # Transform the symbol file into the correct name.
-          case $host in
-          *cygwin* | *mingw* )
-            if test -f "$output_objdir/${outputname}.def" ; then
-              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
-              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
-            else
-              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-             fi
-            ;;
-          * )
-            compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-            finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-            ;;
-          esac
-         ;;
-       *)
-         $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-      else
-       # We keep going just in case the user didn't refer to
-       # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
-       # really was required.
+           # Just print a warning and add the library to dependency_libs so
+           # that the program can be linked against the static library.
+           $ECHO
+           $ECHO "*** Warning: This system can not link to static lib archive $lib."
+           $ECHO "*** I have the capability to make that library automatically link in when"
+           $ECHO "*** you link to this library.  But I can only do this if you have a"
+           $ECHO "*** shared version of the library, which you do not appear to have."
+           if test "$module" = yes; then
+             $ECHO "*** But as you try to build a module library, libtool will still create "
+             $ECHO "*** a static module, that should work as long as the dlopening application"
+             $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
+             if test -z "$global_symbol_pipe"; then
+               $ECHO
+               $ECHO "*** However, this would only work if libtool was able to extract symbol"
+               $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+               $ECHO "*** not find such a program.  So, this module is probably useless."
+               $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+             fi
+             if test "$build_old_libs" = no; then
+               build_libtool_libs=module
+               build_old_libs=yes
+             else
+               build_libtool_libs=no
+             fi
+           fi
+         else
+           deplibs="$dir/$old_library $deplibs"
+           link_static=yes
+         fi
+       fi # link shared/static library?
 
-       # Nullify the symbol file.
-       compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
-       finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
-      fi
+       if test "$linkmode" = lib; then
+         if test -n "$dependency_libs" &&
+            { test "$hardcode_into_libs" != yes ||
+              test "$build_old_libs" = yes ||
+              test "$link_static" = yes; }; then
+           # Extract -R from dependency_libs
+           temp_deplibs=
+           for libdir in $dependency_libs; do
+             case $libdir in
+             -R*) func_stripname '-R' '' "$libdir"
+                  temp_xrpath=$func_stripname_result
+                  case " $xrpath " in
+                  *" $temp_xrpath "*) ;;
+                  *) xrpath="$xrpath $temp_xrpath";;
+                  esac;;
+             *) temp_deplibs="$temp_deplibs $libdir";;
+             esac
+           done
+           dependency_libs="$temp_deplibs"
+         fi
 
-      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
-       # Replace the output file specification.
-       compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-       link_command="$compile_command$compile_rpath"
+         newlib_search_path="$newlib_search_path $absdir"
+         # Link against this library
+         test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+         # ... and its dependency_libs
+         tmp_libs=
+         for deplib in $dependency_libs; do
+           newdependency_libs="$deplib $newdependency_libs"
+           if $opt_duplicate_deps ; then
+             case "$tmp_libs " in
+             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+             esac
+           fi
+           tmp_libs="$tmp_libs $deplib"
+         done
 
-       # We have no uninstalled library dependencies, so finalize right now.
-       $show "$link_command"
-       $run eval "$link_command"
-       exit_status=$?
+         if test "$link_all_deplibs" != no; then
+           # Add the search paths of all dependency libraries
+           for deplib in $dependency_libs; do
+             case $deplib in
+             -L*) path="$deplib" ;;
+             *.la)
+               func_dirname "$deplib" "" "."
+               dir="$func_dirname_result"
+               # We need an absolute path.
+               case $dir in
+               [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+               *)
+                 absdir=`cd "$dir" && pwd`
+                 if test -z "$absdir"; then
+                   func_warning "cannot determine absolute directory name of \`$dir'"
+                   absdir="$dir"
+                 fi
+                 ;;
+               esac
+               if $GREP "^installed=no" $deplib > /dev/null; then
+               case $host in
+               *-*-darwin*)
+                 depdepl=
+                 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+                 if test -n "$deplibrary_names" ; then
+                   for tmp in $deplibrary_names ; do
+                     depdepl=$tmp
+                   done
+                   if test -f "$absdir/$objdir/$depdepl" ; then
+                     depdepl="$absdir/$objdir/$depdepl"
+                     darwin_install_name=`otool -L $depdepl | $SED -n -e '3q;2,2p' | $SED -e 's/(.*//'`
+                     darwin_install_name=`$ECHO $darwin_install_name`
+                      if test -z "$darwin_install_name"; then
+                          darwin_install_name=`otool64 -L $depdepl | $SED -n -e '3q;2,2p' | $SED -e 's/(.*//'`
+                          darwin_install_name=`$ECHO $darwin_install_name`
+                      fi
+                     compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+                     linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
+                     path=
+                   fi
+                 fi
+                 ;;
+               *)
+                 path="-L$absdir/$objdir"
+                 ;;
+               esac
+               else
+                 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+                 test -z "$libdir" && \
+                   func_fatal_error "\`$deplib' is not a valid libtool archive"
+                 test "$absdir" != "$libdir" && \
+                   func_warning "\`$deplib' seems to be moved"
 
-       # Delete the generated files.
-       if test -n "$dlsyms"; then
-         $show "$rm $output_objdir/${outputname}S.${objext}"
-         $run $rm "$output_objdir/${outputname}S.${objext}"
+                 path="-L$absdir"
+               fi
+               ;;
+             esac
+             case " $deplibs " in
+             *" $path "*) ;;
+             *) deplibs="$path $deplibs" ;;
+             esac
+           done
+         fi # link_all_deplibs != no
+       fi # linkmode = lib
+      done # for deplib in $libs
+      if test "$pass" = link; then
+       if test "$linkmode" = "prog"; then
+         compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+         finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+       else
+         compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
        fi
-
-       exit $exit_status
       fi
-
-      if test -n "$shlibpath_var"; then
-       # We should set the shlibpath_var
-       rpath=
-       for dir in $temp_rpath; do
-         case $dir in
-         [\\/]* | [A-Za-z]:[\\/]*)
-           # Absolute path.
-           rpath="$rpath$dir:"
-           ;;
-         *)
-           # Relative path: add a thisdir entry.
-           rpath="$rpath\$thisdir/$dir:"
-           ;;
-         esac
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+       # Link the dlpreopened libraries before other libraries
+       for deplib in $save_deplibs; do
+         deplibs="$deplib $deplibs"
        done
-       temp_rpath="$rpath"
-      fi
-
-      if test -n "$compile_shlibpath$finalize_shlibpath"; then
-       compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
-      fi
-      if test -n "$finalize_shlibpath"; then
-       finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
       fi
-
-      compile_var=
-      finalize_var=
-      if test -n "$runpath_var"; then
-       if test -n "$perm_rpath"; then
-         # We should set the runpath_var.
-         rpath=
-         for dir in $perm_rpath; do
-           rpath="$rpath$dir:"
+      if test "$pass" != dlopen; then
+       if test "$pass" != conv; then
+         # Make sure lib_search_path contains only unique directories.
+         lib_search_path=
+         for dir in $newlib_search_path; do
+           case "$lib_search_path " in
+           *" $dir "*) ;;
+           *) lib_search_path="$lib_search_path $dir" ;;
+           esac
          done
-         compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+         newlib_search_path=
        fi
-       if test -n "$finalize_perm_rpath"; then
-         # We should set the runpath_var.
-         rpath=
-         for dir in $finalize_perm_rpath; do
-           rpath="$rpath$dir:"
-         done
-         finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+
+       if test "$linkmode,$pass" != "prog,link"; then
+         vars="deplibs"
+       else
+         vars="compile_deplibs finalize_deplibs"
        fi
+       for var in $vars dependency_libs; do
+         # Add libraries to $var in reverse order
+         eval tmp_libs=\"\$$var\"
+         new_libs=
+         for deplib in $tmp_libs; do
+           # FIXME: Pedantically, this is the right thing to do, so
+           #        that some nasty dependency loop isn't accidentally
+           #        broken:
+           #new_libs="$deplib $new_libs"
+           # Pragmatically, this seems to cause very few problems in
+           # practice:
+           case $deplib in
+           -L*) new_libs="$deplib $new_libs" ;;
+           -R*) ;;
+           *)
+             # And here is the reason: when a library appears more
+             # than once as an explicit dependence of a library, or
+             # is implicitly linked in more than once by the
+             # compiler, it is considered special, and multiple
+             # occurrences thereof are not removed.  Compare this
+             # with having the same library being listed as a
+             # dependency of multiple other libraries: in this case,
+             # we know (pedantically, we assume) the library does not
+             # need to be listed more than once, so we keep only the
+             # last copy.  This is not always right, but it is rare
+             # enough that we require users that really mean to play
+             # such unportable linking tricks to link the library
+             # using -Wl,-lname, so that libtool does not consider it
+             # for duplicate removal.
+             case " $specialdeplibs " in
+             *" $deplib "*) new_libs="$deplib $new_libs" ;;
+             *)
+               case " $new_libs " in
+               *" $deplib "*) ;;
+               *) new_libs="$deplib $new_libs" ;;
+               esac
+               ;;
+             esac
+             ;;
+           esac
+         done
+         tmp_libs=
+         for deplib in $new_libs; do
+           case $deplib in
+           -L*)
+             case " $tmp_libs " in
+             *" $deplib "*) ;;
+             *) tmp_libs="$tmp_libs $deplib" ;;
+             esac
+             ;;
+           *) tmp_libs="$tmp_libs $deplib" ;;
+           esac
+         done
+         eval $var=\"$tmp_libs\"
+       done # for var
       fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+       case " $predeps $postdeps $compiler_lib_search_path " in
+       *" $i "*)
+         i=""
+         ;;
+       esac
+       if test -n "$i" ; then
+         tmp_libs="$tmp_libs $i"
+       fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+    fi
+    if test "$linkmode" = prog || test "$linkmode" = lib; then
+      dlprefiles="$newdlprefiles"
+    fi
 
-      if test "$no_install" = yes; then
-       # We don't need to create a wrapper script.
-       link_command="$compile_var$compile_command$compile_rpath"
-       # Replace the output file specification.
-       link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-       # Delete the old output file.
-       $run $rm $output
-       # Link the executable and exit
-       $show "$link_command"
-       $run eval "$link_command" || exit $?
-       exit $EXIT_SUCCESS
+    case $linkmode in
+    oldlib)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+       func_warning "\`-dlopen' is ignored for archives"
       fi
 
-      if test "$hardcode_action" = relink; then
-       # Fast installation is not supported
-       link_command="$compile_var$compile_command$compile_rpath"
-       relink_command="$finalize_var$finalize_command$finalize_rpath"
-
-       $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
-       $echo "$modename: \`$output' will be relinked during installation" 1>&2
-      else
-       if test "$fast_install" != no; then
-         link_command="$finalize_var$compile_command$finalize_rpath"
-         if test "$fast_install" = yes; then
-           relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
-         else
-           # fast_install is set to needless
-           relink_command=
-         fi
-       else
-         link_command="$compile_var$compile_command$compile_rpath"
-         relink_command="$finalize_var$finalize_command$finalize_rpath"
-       fi
-      fi
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+       func_warning "\`-l' and \`-L' are ignored for archives" ;;
+      esac
 
-      # Replace the output file specification.
-      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+      test -n "$rpath" && \
+       func_warning "\`-rpath' is ignored for archives"
 
-      # Delete the old output files.
-      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+      test -n "$xrpath" && \
+       func_warning "\`-R' is ignored for archives"
 
-      $show "$link_command"
-      $run eval "$link_command" || exit $?
+      test -n "$vinfo" && \
+       func_warning "\`-version-info/-version-number' is ignored for archives"
 
-      # Now create the wrapper script.
-      $show "creating $output"
+      test -n "$release" && \
+       func_warning "\`-release' is ignored for archives"
 
-      # Quote the relink command for shipping.
-      if test -n "$relink_command"; then
-       # Preserve any variables that may affect compiler behavior
-       for var in $variables_saved_for_relink; do
-         if eval test -z \"\${$var+set}\"; then
-           relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
-         elif eval var_value=\$$var; test -z "$var_value"; then
-           relink_command="$var=; export $var; $relink_command"
-         else
-           var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
-           relink_command="$var=\"$var_value\"; export $var; $relink_command"
-         fi
-       done
-       relink_command="(cd `pwd`; $relink_command)"
-       relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
-      fi
+      test -n "$export_symbols$export_symbols_regex" && \
+       func_warning "\`-export-symbols' is ignored for archives"
 
-      # Quote $echo for shipping.
-      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
-       case $progpath in
-       [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
-       *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
-       esac
-       qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
-      else
-       qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
-      fi
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
 
-      # Only actually do things if our run command is non-null.
-      if test -z "$run"; then
-       # win32 will think the script is a binary if it has
-       # a .exe suffix, so we strip it off here.
-       case $output in
-         *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
-       esac
-       # test for cygwin because mv fails w/o .exe extensions
-       case $host in
-         *cygwin*)
-           exeext=.exe
-           outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
-         *) exeext= ;;
-       esac
-       case $host in
-         *cygwin* | *mingw* )
-            output_name=`basename $output`
-            output_path=`dirname $output`
-            cwrappersource="$output_path/$objdir/lt-$output_name.c"
-            cwrapper="$output_path/$output_name.exe"
-            $rm $cwrappersource $cwrapper
-            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+       func_stripname 'lib' '.la' "$outputname"
+       name=$func_stripname_result
+       eval shared_ext=\"$shrext_cmds\"
+       eval libname=\"$libname_spec\"
+       ;;
+      *)
+       test "$module" = no && \
+         func_fatal_help "libtool library \`$output' must begin with \`lib'"
 
-           cat > $cwrappersource <<EOF
+       if test "$need_lib_prefix" != no; then
+         # Add the "lib" prefix for modules if required
+         func_stripname '' '.la' "$outputname"
+         name=$func_stripname_result
+         eval shared_ext=\"$shrext_cmds\"
+         eval libname=\"$libname_spec\"
+       else
+         func_stripname '' '.la' "$outputname"
+         libname=$func_stripname_result
+       fi
+       ;;
+      esac
 
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
-   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+      if test -n "$objs"; then
+       if test "$deplibs_check_method" != pass_all; then
+         func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+       else
+         $ECHO
+         $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+         $ECHO "*** objects $objs is not portable!"
+         libobjs="$libobjs $objs"
+       fi
+      fi
 
-   The $output program cannot be directly executed until all the libtool
-   libraries that it depends on are installed.
+      test "$dlself" != no && \
+       func_warning "\`-dlopen self' is ignored for libtool libraries"
 
-   This wrapper executable should never be moved out of the build directory.
-   If it is, it will not operate correctly.
+      set dummy $rpath
+      shift
+      test "$#" -gt 1 && \
+       func_warning "ignoring multiple \`-rpath's for a libtool library"
 
-   Currently, it simply execs the wrapper *script* "/bin/sh $output",
-   but could eventually absorb all of the scripts functionality and
-   exec $objdir/$outputname directly.
-*/
-EOF
-           cat >> $cwrappersource<<"EOF"
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/stat.h>
+      install_libdir="$1"
 
-#if defined(PATH_MAX)
-# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
-# define LT_PATHMAX MAXPATHLEN
-#else
-# define LT_PATHMAX 1024
-#endif
+      oldlibs=
+      if test -z "$rpath"; then
+       if test "$build_libtool_libs" = yes; then
+         # Building a libtool convenience library.
+         # Some compilers have problems with a `.al' extension so
+         # convenience libraries should have the same extension an
+         # archive normally would.
+         oldlibs="$output_objdir/$libname.$libext $oldlibs"
+         build_libtool_libs=convenience
+         build_old_libs=yes
+       fi
 
-#ifndef DIR_SEPARATOR
-# define DIR_SEPARATOR '/'
-# define PATH_SEPARATOR ':'
-#endif
+       test -n "$vinfo" && \
+         func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
 
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
-  defined (__OS2__)
-# define HAVE_DOS_BASED_FILE_SYSTEM
-# ifndef DIR_SEPARATOR_2
-#  define DIR_SEPARATOR_2 '\\'
-# endif
-# ifndef PATH_SEPARATOR_2
-#  define PATH_SEPARATOR_2 ';'
-# endif
-#endif
+       test -n "$release" && \
+         func_warning "\`-release' is ignored for convenience libraries"
+      else
 
-#ifndef DIR_SEPARATOR_2
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-#else /* DIR_SEPARATOR_2 */
-# define IS_DIR_SEPARATOR(ch) \
-        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-#endif /* DIR_SEPARATOR_2 */
+       # Parse the version information argument.
+       save_ifs="$IFS"; IFS=':'
+       set dummy $vinfo 0 0 0
+       shift
+       IFS="$save_ifs"
 
-#ifndef PATH_SEPARATOR_2
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
-#else /* PATH_SEPARATOR_2 */
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
-#endif /* PATH_SEPARATOR_2 */
+       test -n "$7" && \
+         func_fatal_help "too many parameters to \`-version-info'"
 
-#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
-#define XFREE(stale) do { \
-  if (stale) { free ((void *) stale); stale = 0; } \
-} while (0)
+       # convert absolute version numbers to libtool ages
+       # this retains compatibility with .la files and attempts
+       # to make the code below a bit more comprehensible
 
-/* -DDEBUG is fairly common in CFLAGS.  */
-#undef DEBUG
-#if defined DEBUGWRAPPER
-# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
-#else
-# define DEBUG(format, ...)
-#endif
+       case $vinfo_number in
+       yes)
+         number_major="$1"
+         number_minor="$2"
+         number_revision="$3"
+         #
+         # There are really only two kinds -- those that
+         # use the current revision as the major version
+         # and those that subtract age and use age as
+         # a minor version.  But, then there is irix
+         # which has an extra 1 added just for fun
+         #
+         case $version_type in
+         darwin|linux|osf|windows|none)
+           current=`expr $number_major + $number_minor`
+           age="$number_minor"
+           revision="$number_revision"
+           ;;
+         freebsd-aout|freebsd-elf|sunos)
+           current="$number_major"
+           revision="$number_minor"
+           age="0"
+           ;;
+         irix|nonstopux)
+           current=`expr $number_major + $number_minor`
+           age="$number_minor"
+           revision="$number_minor"
+           lt_irix_increment=no
+           ;;
+         esac
+         ;;
+       no)
+         current="$1"
+         revision="$2"
+         age="$3"
+         ;;
+       esac
 
-const char *program_name = NULL;
+       # Check that each of the things are valid numbers.
+       case $current in
+       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+       *)
+         func_error "CURRENT \`$current' must be a nonnegative integer"
+         func_fatal_error "\`$vinfo' is not valid version information"
+         ;;
+       esac
 
-void * xmalloc (size_t num);
-char * xstrdup (const char *string);
-const char * base_name (const char *name);
-char * find_executable(const char *wrapper);
-int    check_executable(const char *path);
-char * strendzap(char *str, const char *pat);
-void lt_fatal (const char *message, ...);
+       case $revision in
+       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+       *)
+         func_error "REVISION \`$revision' must be a nonnegative integer"
+         func_fatal_error "\`$vinfo' is not valid version information"
+         ;;
+       esac
 
-int
-main (int argc, char *argv[])
-{
-  char **newargz;
-  int i;
+       case $age in
+       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+       *)
+         func_error "AGE \`$age' must be a nonnegative integer"
+         func_fatal_error "\`$vinfo' is not valid version information"
+         ;;
+       esac
 
-  program_name = (char *) xstrdup (base_name (argv[0]));
-  DEBUG("(main) argv[0]      : %s\n",argv[0]);
-  DEBUG("(main) program_name : %s\n",program_name);
-  newargz = XMALLOC(char *, argc+2);
-EOF
+       if test "$age" -gt "$current"; then
+         func_error "AGE \`$age' is greater than the current interface number \`$current'"
+         func_fatal_error "\`$vinfo' is not valid version information"
+       fi
 
-            cat >> $cwrappersource <<EOF
-  newargz[0] = (char *) xstrdup("$SHELL");
-EOF
+       # Calculate the version variables.
+       major=
+       versuffix=
+       verstring=
+       case $version_type in
+       none) ;;
 
-            cat >> $cwrappersource <<"EOF"
-  newargz[1] = find_executable(argv[0]);
-  if (newargz[1] == NULL)
-    lt_fatal("Couldn't find %s", argv[0]);
-  DEBUG("(main) found exe at : %s\n",newargz[1]);
-  /* we know the script has the same name, without the .exe */
-  /* so make sure newargz[1] doesn't end in .exe */
-  strendzap(newargz[1],".exe");
-  for (i = 1; i < argc; i++)
-    newargz[i+1] = xstrdup(argv[i]);
-  newargz[argc+1] = NULL;
+       darwin)
+         # Like Linux, but with the current version available in
+         # verstring for coding it into the library header
+         major=.`expr $current - $age`
+         versuffix="$major.$age.$revision"
+         # Darwin ld doesn't like 0 for these options...
+         minor_current=`expr $current + 1`
+         xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+         verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+         ;;
 
-  for (i=0; i<argc+1; i++)
-  {
-    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
-    ;
-  }
+       freebsd-aout)
+         major=".$current"
+         versuffix=".$current.$revision";
+         ;;
 
-EOF
+       freebsd-elf)
+         major=".$current"
+         versuffix=".$current"
+         ;;
 
-            case $host_os in
-              mingw*)
-                cat >> $cwrappersource <<EOF
-  execv("$SHELL",(char const **)newargz);
-EOF
-              ;;
-              *)
-                cat >> $cwrappersource <<EOF
-  execv("$SHELL",newargz);
-EOF
-              ;;
-            esac
+       irix | nonstopux)
+         if test "X$lt_irix_increment" = "Xno"; then
+           major=`expr $current - $age`
+         else
+           major=`expr $current - $age + 1`
+         fi
 
-            cat >> $cwrappersource <<"EOF"
-  return 127;
-}
+         case $version_type in
+           nonstopux) verstring_prefix=nonstopux ;;
+           *)         verstring_prefix=sgi ;;
+         esac
+         verstring="$verstring_prefix$major.$revision"
 
-void *
-xmalloc (size_t num)
-{
-  void * p = (void *) malloc (num);
-  if (!p)
-    lt_fatal ("Memory exhausted");
+         # Add in all the interfaces that we are compatible with.
+         loop=$revision
+         while test "$loop" -ne 0; do
+           iface=`expr $revision - $loop`
+           loop=`expr $loop - 1`
+           verstring="$verstring_prefix$major.$iface:$verstring"
+         done
 
-  return p;
-}
+         # Before this point, $major must not contain `.'.
+         major=.$major
+         versuffix="$major.$revision"
+         ;;
 
-char *
-xstrdup (const char *string)
-{
-  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
-;
-}
+       linux)
+         major=.`expr $current - $age`
+         versuffix="$major.$age.$revision"
+         ;;
 
-const char *
-base_name (const char *name)
-{
-  const char *base;
+       osf)
+         major=.`expr $current - $age`
+         versuffix=".$current.$age.$revision"
+         verstring="$current.$age.$revision"
 
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  /* Skip over the disk name in MSDOS pathnames. */
-  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
-    name += 2;
-#endif
+         # Add in all the interfaces that we are compatible with.
+         loop=$age
+         while test "$loop" -ne 0; do
+           iface=`expr $current - $loop`
+           loop=`expr $loop - 1`
+           verstring="$verstring:${iface}.0"
+         done
 
-  for (base = name; *name; name++)
-    if (IS_DIR_SEPARATOR (*name))
-      base = name + 1;
-  return base;
-}
+         # Make executables depend on our current version.
+         verstring="$verstring:${current}.0"
+         ;;
 
-int
-check_executable(const char * path)
-{
-  struct stat st;
+       qnx)
+         major=".$current"
+         versuffix=".$current"
+         ;;
 
-  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
-  if ((!path) || (!*path))
-    return 0;
+       sunos)
+         major=".$current"
+         versuffix=".$current.$revision"
+         ;;
+
+       windows)
+         # Use '-' rather than '.', since we only want one
+         # extension on DOS 8.3 filesystems.
+         major=`expr $current - $age`
+         versuffix="-$major"
+         ;;
 
-  if ((stat (path, &st) >= 0) &&
-      (
-        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
-#if defined (S_IXOTH)
-       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
-#endif
-#if defined (S_IXGRP)
-       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
-#endif
-       ((st.st_mode & S_IXUSR) == S_IXUSR))
-      )
-    return 1;
-  else
-    return 0;
-}
+       *)
+         func_fatal_configuration "unknown library version type \`$version_type'"
+         ;;
+       esac
 
-/* Searches for the full path of the wrapper.  Returns
-   newly allocated full path name if found, NULL otherwise */
-char *
-find_executable (const char* wrapper)
-{
-  int has_slash = 0;
-  const char* p;
-  const char* p_next;
-  /* static buffer for getcwd */
-  char tmp[LT_PATHMAX + 1];
-  int tmp_len;
-  char* concat_name;
+       # Clear the version info if we defaulted, and they specified a release.
+       if test -z "$vinfo" && test -n "$release"; then
+         major=
+         case $version_type in
+         darwin)
+           # we can't check for "0.0" in archive_cmds due to quoting
+           # problems, so we reset it completely
+           verstring=
+           ;;
+         *)
+           verstring="0.0"
+           ;;
+         esac
+         if test "$need_version" = no; then
+           versuffix=
+         else
+           versuffix=".0.0"
+         fi
+       fi
 
-  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
+       # Remove version info from name if versioning should be avoided
+       if test "$avoid_version" = yes && test "$need_version" = no; then
+         major=
+         versuffix=
+         verstring=""
+       fi
 
-  if ((wrapper == NULL) || (*wrapper == '\0'))
-    return NULL;
+       # Check to see if the archive will have undefined symbols.
+       if test "$allow_undefined" = yes; then
+         if test "$allow_undefined_flag" = unsupported; then
+           func_warning "undefined symbols not allowed in $host shared libraries"
+           build_libtool_libs=no
+           build_old_libs=yes
+         fi
+       else
+         # Don't allow undefined symbols.
+         allow_undefined_flag="$no_undefined_flag"
+       fi
 
-  /* Absolute path? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
-  {
-    concat_name = xstrdup (wrapper);
-    if (check_executable(concat_name))
-      return concat_name;
-    XFREE(concat_name);
-  }
-  else
-  {
-#endif
-    if (IS_DIR_SEPARATOR (wrapper[0]))
-    {
-      concat_name = xstrdup (wrapper);
-      if (check_executable(concat_name))
-        return concat_name;
-      XFREE(concat_name);
-    }
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  }
-#endif
+      fi
 
-  for (p = wrapper; *p; p++)
-    if (*p == '/')
-    {
-      has_slash = 1;
-      break;
-    }
-  if (!has_slash)
-  {
-    /* no slashes; search PATH */
-    const char* path = getenv ("PATH");
-    if (path != NULL)
-    {
-      for (p = path; *p; p = p_next)
-      {
-        const char* q;
-        size_t p_len;
-        for (q = p; *q; q++)
-          if (IS_PATH_SEPARATOR(*q))
-            break;
-        p_len = q - p;
-        p_next = (*q == '\0' ? q : q + 1);
-        if (p_len == 0)
-        {
-          /* empty path: current directory */
-          if (getcwd (tmp, LT_PATHMAX) == NULL)
-            lt_fatal ("getcwd failed");
-          tmp_len = strlen(tmp);
-          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
-          memcpy (concat_name, tmp, tmp_len);
-          concat_name[tmp_len] = '/';
-          strcpy (concat_name + tmp_len + 1, wrapper);
-        }
-        else
-        {
-          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
-          memcpy (concat_name, p, p_len);
-          concat_name[p_len] = '/';
-          strcpy (concat_name + p_len + 1, wrapper);
-        }
-        if (check_executable(concat_name))
-          return concat_name;
-        XFREE(concat_name);
-      }
-    }
-    /* not found in PATH; assume curdir */
-  }
-  /* Relative path | not found in path: prepend cwd */
-  if (getcwd (tmp, LT_PATHMAX) == NULL)
-    lt_fatal ("getcwd failed");
-  tmp_len = strlen(tmp);
-  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
-  memcpy (concat_name, tmp, tmp_len);
-  concat_name[tmp_len] = '/';
-  strcpy (concat_name + tmp_len + 1, wrapper);
+      func_generate_dlsyms "$libname" "$libname" "yes"
+      libobjs="$libobjs $symfileobj"
+      test "X$libobjs" = "X " && libobjs=
 
-  if (check_executable(concat_name))
-    return concat_name;
-  XFREE(concat_name);
-  return NULL;
-}
+      if test "$mode" != relink; then
+       # Remove our outputs, but don't remove object files since they
+       # may have been created when compiling PIC objects.
+       removelist=
+       tempremovelist=`$ECHO "$output_objdir/*"`
+       for p in $tempremovelist; do
+         case $p in
+           *.$objext)
+              ;;
+           $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+              if test "X$precious_files_regex" != "X"; then
+                if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+                then
+                  continue
+                fi
+              fi
+              removelist="$removelist $p"
+              ;;
+           *) ;;
+         esac
+       done
+       test -n "$removelist" && \
+         func_show_eval "${RM}r \$removelist"
+      fi
 
-char *
-strendzap(char *str, const char *pat)
-{
-  size_t len, patlen;
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+       oldlibs="$oldlibs $output_objdir/$libname.$libext"
 
-  assert(str != NULL);
-  assert(pat != NULL);
+       # Transform .lo files to .o files.
+       oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
 
-  len = strlen(str);
-  patlen = strlen(pat);
+      # Eliminate all temporary directories.
+      #for path in $notinst_path; do
+      #        lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
+      #        deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
+      #        dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
+      #done
 
-  if (patlen <= len)
-  {
-    str += len - patlen;
-    if (strcmp(str, pat) == 0)
-      *str = '\0';
-  }
-  return str;
-}
+      if test -n "$xrpath"; then
+       # If the user specified any rpath flags, then add them.
+       temp_xrpath=
+       for libdir in $xrpath; do
+         temp_xrpath="$temp_xrpath -R$libdir"
+         case "$finalize_rpath " in
+         *" $libdir "*) ;;
+         *) finalize_rpath="$finalize_rpath $libdir" ;;
+         esac
+       done
+       if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+         dependency_libs="$temp_xrpath $dependency_libs"
+       fi
+      fi
 
-static void
-lt_error_core (int exit_status, const char * mode,
-          const char * message, va_list ap)
-{
-  fprintf (stderr, "%s: %s: ", program_name, mode);
-  vfprintf (stderr, message, ap);
-  fprintf (stderr, ".\n");
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+       case " $dlprefiles $dlfiles " in
+       *" $lib "*) ;;
+       *) dlfiles="$dlfiles $lib" ;;
+       esac
+      done
 
-  if (exit_status >= 0)
-    exit (exit_status);
-}
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+       case "$dlprefiles " in
+       *" $lib "*) ;;
+       *) dlprefiles="$dlprefiles $lib" ;;
+       esac
+      done
 
-void
-lt_fatal (const char *message, ...)
-{
-  va_list ap;
-  va_start (ap, message);
-  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
-  va_end (ap);
-}
-EOF
-          # we should really use a build-platform specific compiler
-          # here, but OTOH, the wrappers (shell script and this C one)
-          # are only useful if you want to execute the "real" binary.
-          # Since the "real" binary is built for $host, then this
-          # wrapper might as well be built for $host, too.
-          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
-          ;;
-        esac
-        $rm $output
-        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
-
-       $echo > $output "\
-#! $SHELL
+      if test "$build_libtool_libs" = yes; then
+       if test -n "$rpath"; then
+         case $host in
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+           # these systems don't actually have a c library (as such)!
+           ;;
+         *-*-rhapsody* | *-*-darwin1.[012])
+           # Rhapsody C library is in the System framework
+           deplibs="$deplibs System.ltframework"
+           ;;
+         *-*-netbsd*)
+           # Don't link with libc until the a.out ld.so is fixed.
+           ;;
+         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+           # Do not include libc due to us having libc/libc_r.
+           ;;
+         *-*-sco3.2v5* | *-*-sco5v6*)
+           # Causes problems with __ctype
+           ;;
+         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+           # Compiler inserts libc in the correct place for threads to work
+           ;;
+         *)
+           # Add libc to deplibs on all other systems if necessary.
+           if test "$build_libtool_need_lc" = "yes"; then
+             deplibs="$deplibs -lc"
+           fi
+           ;;
+         esac
+       fi
 
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
+       # Transform deplibs into only deplibs that can be linked in shared.
+       name_save=$name
+       libname_save=$libname
+       release_save=$release
+       versuffix_save=$versuffix
+       major_save=$major
+       # I'm not sure if I'm treating the release correctly.  I think
+       # release should show up in the -l (ie -lgmp5) so we don't want to
+       # add it in twice.  Is that correct?
+       release=""
+       versuffix=""
+       major=""
+       newdeplibs=
+       droppeddeps=no
+       case $deplibs_check_method in
+       pass_all)
+         # Don't check for shared/static.  Everything works.
+         # This might be a little naive.  We might want to check
+         # whether the library exists or not.  But this is on
+         # osf3 & osf4 and I'm not really sure... Just
+         # implementing what was already the behavior.
+         newdeplibs=$deplibs
+         ;;
+       test_compile)
+         # This code stresses the "libraries are programs" paradigm to its
+         # limits. Maybe even breaks it.  We compile a program, linking it
+         # against the deplibs as a proxy for the library.  Then we can check
+         # whether they linked in statically or dynamically with ldd.
+         $opt_dry_run || $RM conftest.c
+         cat > conftest.c <<EOF
+         int main() { return 0; }
+EOF
+         $opt_dry_run || $RM conftest
+         if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+           ldd_output=`ldd conftest`
+           for i in $deplibs; do
+             name=`expr $i : '-l\(.*\)'`
+             # If $name is empty we are operating on a -L argument.
+             if test "$name" != "" && test "$name" != "0"; then
+               if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+                 case " $predeps $postdeps " in
+                 *" $i "*)
+                   newdeplibs="$newdeplibs $i"
+                   i=""
+                   ;;
+                 esac
+               fi
+               if test -n "$i" ; then
+                 libname=`eval "\\$ECHO \"$libname_spec\""`
+                 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+                 set dummy $deplib_matches; shift
+                 deplib_match=$1
+                 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+                   newdeplibs="$newdeplibs $i"
+                 else
+                   droppeddeps=yes
+                   $ECHO
+                   $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+                   $ECHO "*** I have the capability to make that library automatically link in when"
+                   $ECHO "*** you link to this library.  But I can only do this if you have a"
+                   $ECHO "*** shared version of the library, which I believe you do not have"
+                   $ECHO "*** because a test_compile did reveal that the linker did not use it for"
+                   $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
+                 fi
+               fi
+             else
+               newdeplibs="$newdeplibs $i"
+             fi
+           done
+         else
+           # Error occurred in the first compile.  Let's try to salvage
+           # the situation: Compile a separate program for each library.
+           for i in $deplibs; do
+             name=`expr $i : '-l\(.*\)'`
+             # If $name is empty we are operating on a -L argument.
+             if test "$name" != "" && test "$name" != "0"; then
+               $opt_dry_run || $RM conftest
+               if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+                 ldd_output=`ldd conftest`
+                 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+                   case " $predeps $postdeps " in
+                   *" $i "*)
+                     newdeplibs="$newdeplibs $i"
+                     i=""
+                     ;;
+                   esac
+                 fi
+                 if test -n "$i" ; then
+                   libname=`eval "\\$ECHO \"$libname_spec\""`
+                   deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+                   set dummy $deplib_matches; shift
+                   deplib_match=$1
+                   if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+                     newdeplibs="$newdeplibs $i"
+                   else
+                     droppeddeps=yes
+                     $ECHO
+                     $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+                     $ECHO "*** I have the capability to make that library automatically link in when"
+                     $ECHO "*** you link to this library.  But I can only do this if you have a"
+                     $ECHO "*** shared version of the library, which you do not appear to have"
+                     $ECHO "*** because a test_compile did reveal that the linker did not use this one"
+                     $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
+                   fi
+                 fi
+               else
+                 droppeddeps=yes
+                 $ECHO
+                 $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
+                 $ECHO "*** make it link in!  You will probably need to install it or some"
+                 $ECHO "*** library that it depends on before this library will be fully"
+                 $ECHO "*** functional.  Installing it before continuing would be even better."
+               fi
+             else
+               newdeplibs="$newdeplibs $i"
+             fi
+           done
+         fi
+         ;;
+       file_magic*)
+         set dummy $deplibs_check_method; shift
+         file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+         for a_deplib in $deplibs; do
+           name=`expr $a_deplib : '-l\(.*\)'`
+           # If $name is empty we are operating on a -L argument.
+           if test "$name" != "" && test  "$name" != "0"; then
+             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+               case " $predeps $postdeps " in
+               *" $a_deplib "*)
+                 newdeplibs="$newdeplibs $a_deplib"
+                 a_deplib=""
+                 ;;
+               esac
+             fi
+             if test -n "$a_deplib" ; then
+               libname=`eval "\\$ECHO \"$libname_spec\""`
+               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+                 for potent_lib in $potential_libs; do
+                     # Follow soft links.
+                     if ls -lLd "$potent_lib" 2>/dev/null |
+                        $GREP " -> " >/dev/null; then
+                       continue
+                     fi
+                     # The statement above tries to avoid entering an
+                     # endless loop below, in case of cyclic links.
+                     # We might still enter an endless loop, since a link
+                     # loop can be closed while we follow links,
+                     # but so what?
+                     potlib="$potent_lib"
+                     while test -h "$potlib" 2>/dev/null; do
+                       potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+                       case $potliblink in
+                       [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+                       *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+                       esac
+                     done
+                     if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+                        $SED -e 10q |
+                        $EGREP "$file_magic_regex" > /dev/null; then
+                       newdeplibs="$newdeplibs $a_deplib"
+                       a_deplib=""
+                       break 2
+                     fi
+                 done
+               done
+             fi
+             if test -n "$a_deplib" ; then
+               droppeddeps=yes
+               $ECHO
+               $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+               $ECHO "*** I have the capability to make that library automatically link in when"
+               $ECHO "*** you link to this library.  But I can only do this if you have a"
+               $ECHO "*** shared version of the library, which you do not appear to have"
+               $ECHO "*** because I did check the linker path looking for a file starting"
+               if test -z "$potlib" ; then
+                 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+               else
+                 $ECHO "*** with $libname and none of the candidates passed a file format test"
+                 $ECHO "*** using a file magic. Last file checked: $potlib"
+               fi
+             fi
+           else
+             # Add a -L argument.
+             newdeplibs="$newdeplibs $a_deplib"
+           fi
+         done # Gone through all deplibs.
+         ;;
+       match_pattern*)
+         set dummy $deplibs_check_method; shift
+         match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+         for a_deplib in $deplibs; do
+           name=`expr $a_deplib : '-l\(.*\)'`
+           # If $name is empty we are operating on a -L argument.
+           if test -n "$name" && test "$name" != "0"; then
+             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+               case " $predeps $postdeps " in
+               *" $a_deplib "*)
+                 newdeplibs="$newdeplibs $a_deplib"
+                 a_deplib=""
+                 ;;
+               esac
+             fi
+             if test -n "$a_deplib" ; then
+               libname=`eval "\\$ECHO \"$libname_spec\""`
+               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+                 for potent_lib in $potential_libs; do
+                   potlib="$potent_lib" # see symlink-check above in file_magic test
+                   if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
+                      $EGREP "$match_pattern_regex" > /dev/null; then
+                     newdeplibs="$newdeplibs $a_deplib"
+                     a_deplib=""
+                     break 2
+                   fi
+                 done
+               done
+             fi
+             if test -n "$a_deplib" ; then
+               droppeddeps=yes
+               $ECHO
+               $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+               $ECHO "*** I have the capability to make that library automatically link in when"
+               $ECHO "*** you link to this library.  But I can only do this if you have a"
+               $ECHO "*** shared version of the library, which you do not appear to have"
+               $ECHO "*** because I did check the linker path looking for a file starting"
+               if test -z "$potlib" ; then
+                 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+               else
+                 $ECHO "*** with $libname and none of the candidates passed a file format test"
+                 $ECHO "*** using a regex pattern. Last file checked: $potlib"
+               fi
+             fi
+           else
+             # Add a -L argument.
+             newdeplibs="$newdeplibs $a_deplib"
+           fi
+         done # Gone through all deplibs.
+         ;;
+       none | unknown | *)
+         newdeplibs=""
+         tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
+             -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
+         if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+           for i in $predeps $postdeps ; do
+             # can't use Xsed below, because $i might contain '/'
+             tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
+           done
+         fi
+         if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[      ]//g' |
+            $GREP . >/dev/null; then
+           $ECHO
+           if test "X$deplibs_check_method" = "Xnone"; then
+             $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
+           else
+             $ECHO "*** Warning: inter-library dependencies are not known to be supported."
+           fi
+           $ECHO "*** All declared inter-library dependencies are being dropped."
+           droppeddeps=yes
+         fi
+         ;;
+       esac
+       versuffix=$versuffix_save
+       major=$major_save
+       release=$release_save
+       libname=$libname_save
+       name=$name_save
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='${SED} -e 1s/^X//'
-sed_quote_subst='$sed_quote_subst'
+       case $host in
+       *-*-rhapsody* | *-*-darwin1.[012])
+         # On Rhapsody replace the C library with the System framework
+         newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+         ;;
+       esac
 
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+       if test "$droppeddeps" = yes; then
+         if test "$module" = yes; then
+           $ECHO
+           $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
+           $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
+           $ECHO "*** a static module, that should work as long as the dlopening"
+           $ECHO "*** application is linked with the -dlopen flag."
+           if test -z "$global_symbol_pipe"; then
+             $ECHO
+             $ECHO "*** However, this would only work if libtool was able to extract symbol"
+             $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+             $ECHO "*** not find such a program.  So, this module is probably useless."
+             $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+           fi
+           if test "$build_old_libs" = no; then
+             oldlibs="$output_objdir/$libname.$libext"
+             build_libtool_libs=module
+             build_old_libs=yes
+           else
+             build_libtool_libs=no
+           fi
+         else
+           $ECHO "*** The inter-library dependencies that have been dropped here will be"
+           $ECHO "*** automatically added whenever a program is linked with this library"
+           $ECHO "*** or is declared to -dlopen it."
 
-relink_command=\"$relink_command\"
+           if test "$allow_undefined" = no; then
+             $ECHO
+             $ECHO "*** Since this library must not contain undefined symbols,"
+             $ECHO "*** because either the platform does not support them or"
+             $ECHO "*** it was explicitly requested with -no-undefined,"
+             $ECHO "*** libtool will only create a static version of it."
+             if test "$build_old_libs" = no; then
+               oldlibs="$output_objdir/$libname.$libext"
+               build_libtool_libs=module
+               build_old_libs=yes
+             else
+               build_libtool_libs=no
+             fi
+           fi
+         fi
+       fi
+       # Done checking deplibs!
+       deplibs=$newdeplibs
+      fi
+      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+      case $host in
+       *-*-darwin*)
+         newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+         new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+         deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+         ;;
+      esac
 
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
-  # install mode needs the following variable:
-  notinst_deplibs='$notinst_deplibs'
-else
-  # When we are sourced in execute mode, \$file and \$echo are already set.
-  if test \"\$libtool_execute_magic\" != \"$magic\"; then
-    echo=\"$qecho\"
-    file=\"\$0\"
-    # Make sure echo works.
-    if test \"X\$1\" = X--no-reexec; then
-      # Discard the --no-reexec flag, and continue.
-      shift
-    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
-      # Yippee, \$echo works!
-      :
-    else
-      # Restart under the correct shell, and then maybe \$echo will work.
-      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
-    fi
-  fi\
-"
-       $echo >> $output "\
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+       case " $new_libs " in
+       *" -L$path/$objdir "*) ;;
+       *)
+         case " $deplibs " in
+         *" -L$path/$objdir "*)
+           new_libs="$new_libs -L$path/$objdir" ;;
+         esac
+         ;;
+       esac
+      done
+      for deplib in $deplibs; do
+       case $deplib in
+       -L*)
+         case " $new_libs " in
+         *" $deplib "*) ;;
+         *) new_libs="$new_libs $deplib" ;;
+         esac
+         ;;
+       *) new_libs="$new_libs $deplib" ;;
+       esac
+      done
+      deplibs="$new_libs"
 
-  # Find the directory that this script lives in.
-  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
-  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
 
-  # Follow symbolic links until we get to the real thisdir.
-  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
-  while test -n \"\$file\"; do
-    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+       if test "$hardcode_into_libs" = yes; then
+         # Hardcode the library paths
+         hardcode_libdirs=
+         dep_rpath=
+         rpath="$finalize_rpath"
+         test "$mode" != relink && rpath="$compile_rpath$rpath"
+         for libdir in $rpath; do
+           if test -n "$hardcode_libdir_flag_spec"; then
+             if test -n "$hardcode_libdir_separator"; then
+               if test -z "$hardcode_libdirs"; then
+                 hardcode_libdirs="$libdir"
+               else
+                 # Just accumulate the unique libdirs.
+                 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+                 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+                   ;;
+                 *)
+                   hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+                   ;;
+                 esac
+               fi
+             else
+               eval flag=\"$hardcode_libdir_flag_spec\"
+               dep_rpath="$dep_rpath $flag"
+             fi
+           elif test -n "$runpath_var"; then
+             case "$perm_rpath " in
+             *" $libdir "*) ;;
+             *) perm_rpath="$perm_rpath $libdir" ;;
+             esac
+           fi
+         done
+         # Substitute the hardcoded libdirs into the rpath.
+         if test -n "$hardcode_libdir_separator" &&
+            test -n "$hardcode_libdirs"; then
+           libdir="$hardcode_libdirs"
+           if test -n "$hardcode_libdir_flag_spec_ld"; then
+             eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+           else
+             eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+           fi
+         fi
+         if test -n "$runpath_var" && test -n "$perm_rpath"; then
+           # We should set the runpath_var.
+           rpath=
+           for dir in $perm_rpath; do
+             rpath="$rpath$dir:"
+           done
+           eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+         fi
+         test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+       fi
 
-    # If there was a directory component, then change thisdir.
-    if test \"x\$destdir\" != \"x\$file\"; then
-      case \"\$destdir\" in
-      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
-      *) thisdir=\"\$thisdir/\$destdir\" ;;
-      esac
-    fi
+       shlibpath="$finalize_shlibpath"
+       test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+       if test -n "$shlibpath"; then
+         eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+       fi
 
-    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
-    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
-  done
+       # Get the real and link names of the library.
+       eval shared_ext=\"$shrext_cmds\"
+       eval library_names=\"$library_names_spec\"
+       set dummy $library_names
+       shift
+       realname="$1"
+       shift
 
-  # Try to get the absolute directory name.
-  absdir=\`cd \"\$thisdir\" && pwd\`
-  test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
+       if test -n "$soname_spec"; then
+         eval soname=\"$soname_spec\"
+       else
+         soname="$realname"
+       fi
+       if test -z "$dlname"; then
+         dlname=$soname
+       fi
 
-       if test "$fast_install" = yes; then
-         $echo >> $output "\
-  program=lt-'$outputname'$exeext
-  progdir=\"\$thisdir/$objdir\"
+       lib="$output_objdir/$realname"
+       linknames=
+       for link
+       do
+         linknames="$linknames $link"
+       done
 
-  if test ! -f \"\$progdir/\$program\" || \\
-     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
-       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+       # Use standard objects if they are pic
+       test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+       test "X$libobjs" = "X " && libobjs=
 
-    file=\"\$\$-\$program\"
+       delfiles=
+       if test -n "$export_symbols" && test -n "$include_expsyms"; then
+         $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+         export_symbols="$output_objdir/$libname.uexp"
+         delfiles="$delfiles $export_symbols"
+       fi
 
-    if test ! -d \"\$progdir\"; then
-      $mkdir \"\$progdir\"
-    else
-      $rm \"\$progdir/\$file\"
-    fi"
+       orig_export_symbols=
+       case $host_os in
+       cygwin* | mingw*)
+         if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+           # exporting using user supplied symfile
+           if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+             # and it's NOT already a .def file. Must figure out
+             # which of the given symbols are data symbols and tag
+             # them as such. So, trigger use of export_symbols_cmds.
+             # export_symbols gets reassigned inside the "prepare
+             # the list of exported symbols" if statement, so the
+             # include_expsyms logic still works.
+             orig_export_symbols="$export_symbols"
+             export_symbols=
+             always_export_symbols=yes
+           fi
+         fi
+         ;;
+       esac
 
-         $echo >> $output "\
+       # Prepare the list of exported symbols
+       if test -z "$export_symbols"; then
+         if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+           func_verbose "generating symbol list for \`$libname.la'"
+           export_symbols="$output_objdir/$libname.exp"
+           $opt_dry_run || $RM $export_symbols
+           cmds=$export_symbols_cmds
+           save_ifs="$IFS"; IFS='~'
+           for cmd in $cmds; do
+             IFS="$save_ifs"
+             eval cmd=\"$cmd\"
+             if len=`expr "X$cmd" : ".*"` &&
+              test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+               func_show_eval "$cmd" 'exit $?'
+               skipped_export=false
+             else
+               # The command line is too long to execute in one step.
+               func_verbose "using reloadable object file for export list..."
+               skipped_export=:
+               # Break out early, otherwise skipped_export may be
+               # set to false by a later but shorter cmd.
+               break
+             fi
+           done
+           IFS="$save_ifs"
+           if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+             func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+             func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+           fi
+         fi
+       fi
 
-    # relink executable if necessary
-    if test -n \"\$relink_command\"; then
-      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
-      else
-       $echo \"\$relink_command_output\" >&2
-       $rm \"\$progdir/\$file\"
-       exit $EXIT_FAILURE
-      fi
-    fi
+       if test -n "$export_symbols" && test -n "$include_expsyms"; then
+         tmp_export_symbols="$export_symbols"
+         test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+         $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+       fi
 
-    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
-    { $rm \"\$progdir/\$program\";
-      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
-    $rm \"\$progdir/\$file\"
-  fi"
-       else
-         $echo >> $output "\
-  program='$outputname'
-  progdir=\"\$thisdir/$objdir\"
-"
+       if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+         # The given exports_symbols file has to be filtered, so filter it.
+         func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+         # FIXME: $output_objdir/$libname.filter potentially contains lots of
+         # 's' commands which not all seds can handle. GNU sed should be fine
+         # though. Also, the filter scales superlinearly with the number of
+         # global variables. join(1) would be nice here, but unfortunately
+         # isn't a blessed tool.
+         $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+         delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+         export_symbols=$output_objdir/$libname.def
+         $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
        fi
 
-       $echo >> $output "\
+       tmp_deplibs=
+       for test_deplib in $deplibs; do
+         case " $convenience " in
+         *" $test_deplib "*) ;;
+         *)
+           tmp_deplibs="$tmp_deplibs $test_deplib"
+           ;;
+         esac
+       done
+       deplibs="$tmp_deplibs"
 
-  if test -f \"\$progdir/\$program\"; then"
+       if test -n "$convenience"; then
+         if test -n "$whole_archive_flag_spec" &&
+           test "$compiler_needs_object" = yes &&
+           test -z "$libobjs"; then
+           # extract the archives, so we have objects to list.
+           # TODO: could optimize this to just extract one archive.
+           whole_archive_flag_spec=
+         fi
+         if test -n "$whole_archive_flag_spec"; then
+           save_libobjs=$libobjs
+           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+           test "X$libobjs" = "X " && libobjs=
+         else
+           gentop="$output_objdir/${outputname}x"
+           generated="$generated $gentop"
 
-       # Export our shlibpath_var if we have one.
-       if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-         $echo >> $output "\
-    # Add our own library path to $shlibpath_var
-    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+           func_extract_archives $gentop $convenience
+           libobjs="$libobjs $func_extract_archives_result"
+           test "X$libobjs" = "X " && libobjs=
+         fi
+       fi
 
-    # Some systems cannot cope with colon-terminated $shlibpath_var
-    # The second colon is a workaround for a bug in BeOS R4 sed
-    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+       if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+         eval flag=\"$thread_safe_flag_spec\"
+         linker_flags="$linker_flags $flag"
+       fi
 
-    export $shlibpath_var
-"
+       # Make a backup of the uninstalled library when relinking
+       if test "$mode" = relink; then
+         $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
        fi
 
-       # fixup the dll searchpath if we need to.
-       if test -n "$dllsearchpath"; then
-         $echo >> $output "\
-    # Add the dll search path components to the executable PATH
-    PATH=$dllsearchpath:\$PATH
-"
+       # Do each of the archive commands.
+       if test "$module" = yes && test -n "$module_cmds" ; then
+         if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+           eval test_cmds=\"$module_expsym_cmds\"
+           cmds=$module_expsym_cmds
+         else
+           eval test_cmds=\"$module_cmds\"
+           cmds=$module_cmds
+         fi
+       else
+         if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+           eval test_cmds=\"$archive_expsym_cmds\"
+           cmds=$archive_expsym_cmds
+         else
+           eval test_cmds=\"$archive_cmds\"
+           cmds=$archive_cmds
+         fi
        fi
 
-       $echo >> $output "\
-    if test \"\$libtool_execute_magic\" != \"$magic\"; then
-      # Run the actual program with our arguments.
-"
-       case $host in
-       # Backslashes separate directories on plain windows
-       *-*-mingw | *-*-os2*)
-         $echo >> $output "\
-      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
-         ;;
+       if test "X$skipped_export" != "X:" &&
+          len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+          test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+         :
+       else
+         # The command line is too long to link in one step, link piecewise
+         # or, if using GNU ld and skipped_export is not :, use a linker
+         # script.
 
-       *)
-         $echo >> $output "\
-      exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
-         ;;
-       esac
-       $echo >> $output "\
-      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
-      exit $EXIT_FAILURE
-    fi
-  else
-    # The program doesn't exist.
-    \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
-    \$echo \"This script is just a wrapper for \$program.\" 1>&2
-    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
-    exit $EXIT_FAILURE
-  fi
-fi\
-"
-       chmod +x $output
-      fi
-      exit $EXIT_SUCCESS
-      ;;
-    esac
+         # Save the value of $output and $libobjs because we want to
+         # use them later.  If we have whole_archive_flag_spec, we
+         # want to use save_libobjs as it was before
+         # whole_archive_flag_spec was expanded, because we can't
+         # assume the linker understands whole_archive_flag_spec.
+         # This may have to be revisited, in case too many
+         # convenience libraries get linked in and end up exceeding
+         # the spec.
+         if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+           save_libobjs=$libobjs
+         fi
+         save_output=$output
+         output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
 
-    # See if we need to build an old-fashioned archive.
-    for oldlib in $oldlibs; do
+         # Clear the reloadable object creation command queue and
+         # initialize k to one.
+         test_cmds=
+         concat_cmds=
+         objlist=
+         last_robj=
+         k=1
 
-      if test "$build_libtool_libs" = convenience; then
-       oldobjs="$libobjs_save"
-       addlibs="$convenience"
-       build_libtool_libs=no
-      else
-       if test "$build_libtool_libs" = module; then
-         oldobjs="$libobjs_save"
-         build_libtool_libs=no
-       else
-         oldobjs="$old_deplibs $non_pic_objects"
-       fi
-       addlibs="$old_convenience"
-      fi
+         if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+           output=${output_objdir}/${output_la}.lnkscript
+           func_verbose "creating GNU ld script: $output"
+           $ECHO 'INPUT (' > $output
+           for obj in $save_libobjs
+           do
+             $ECHO "$obj" >> $output
+           done
+           $ECHO ')' >> $output
+           delfiles="$delfiles $output"
+         elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+           output=${output_objdir}/${output_la}.lnk
+           func_verbose "creating linker input file list: $output"
+           : > $output
+           set x $save_libobjs
+           shift
+           firstobj=
+           if test "$compiler_needs_object" = yes; then
+             firstobj="$1 "
+             shift
+           fi
+           for obj
+           do
+             $ECHO "$obj" >> $output
+           done
+           delfiles="$delfiles $output"
+           output=$firstobj\"$file_list_spec$output\"
+         else
+           if test -n "$save_libobjs"; then
+             func_verbose "creating reloadable object files..."
+             output=$output_objdir/$output_la-${k}.$objext
+             # Loop over the list of objects to be linked.
+             for obj in $save_libobjs
+             do
+               eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+               if test "X$objlist" = X ||
+                  { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+                    test "$len" -le "$max_cmd_len"; }; then
+                 objlist="$objlist $obj"
+               else
+                 # The command $test_cmds is almost too long, add a
+                 # command to the queue.
+                 if test "$k" -eq 1 ; then
+                   # The first file doesn't have a previous command to add.
+                   eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+                 else
+                   # All subsequent reloadable object files will link in
+                   # the last one created.
+                   eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
+                 fi
+                 last_robj=$output_objdir/$output_la-${k}.$objext
+                 k=`expr $k + 1`
+                 output=$output_objdir/$output_la-${k}.$objext
+                 objlist=$obj
+                 len=1
+               fi
+             done
+             # Handle the remaining objects by creating one last
+             # reloadable object file.  All subsequent reloadable object
+             # files will link in the last one created.
+             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+             eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+             if test -n "$last_robj"; then
+               eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+             fi
+             delfiles="$delfiles $output"
 
-      if test -n "$addlibs"; then
-       gentop="$output_objdir/${outputname}x"
-       generated="$generated $gentop"
+           else
+             output=
+           fi
+
+           if ${skipped_export-false}; then
+             func_verbose "generating symbol list for \`$libname.la'"
+             export_symbols="$output_objdir/$libname.exp"
+             $opt_dry_run || $RM $export_symbols
+             libobjs=$output
+             # Append the command to create the export file.
+             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+             eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+             if test -n "$last_robj"; then
+               eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+             fi
+           fi
 
-       func_extract_archives $gentop $addlibs
-       oldobjs="$oldobjs $func_extract_archives_result"
-      fi
+           test -n "$save_libobjs" &&
+             func_verbose "creating a temporary reloadable object file: $output"
 
-      # Do each command in the archive commands.
-      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
-       cmds=$old_archive_from_new_cmds
-      else
-       # POSIX demands no paths to be encoded in archives.  We have
-       # to avoid creating archives with duplicate basenames if we
-       # might have to extract them afterwards, e.g., when creating a
-       # static archive out of a convenience library, or when linking
-       # the entirety of a libtool archive into another (currently
-       # not supported by libtool).
-       if (for obj in $oldobjs
-           do
-             $echo "X$obj" | $Xsed -e 's%^.*/%%'
-           done | sort | sort -uc >/dev/null 2>&1); then
-         :
-       else
-         $echo "copying selected object files to avoid basename conflicts..."
+           # Loop through the commands generated above and execute them.
+           save_ifs="$IFS"; IFS='~'
+           for cmd in $concat_cmds; do
+             IFS="$save_ifs"
+             $opt_silent || {
+                 func_quote_for_expand "$cmd"
+                 eval "func_echo $func_quote_for_expand_result"
+             }
+             $opt_dry_run || eval "$cmd" || {
+               lt_exit=$?
+
+               # Restore the uninstalled library and exit
+               if test "$mode" = relink; then
+                 ( cd "$output_objdir" && \
+                   $RM "${realname}T" && \
+                   $MV "${realname}U" "$realname" )
+               fi
 
-         if test -z "$gentop"; then
-           gentop="$output_objdir/${outputname}x"
-           generated="$generated $gentop"
+               exit $lt_exit
+             }
+           done
+           IFS="$save_ifs"
 
-           $show "${rm}r $gentop"
-           $run ${rm}r "$gentop"
-           $show "$mkdir $gentop"
-           $run $mkdir "$gentop"
-           exit_status=$?
-           if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
-             exit $exit_status
+           if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+             func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+             func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
            fi
          fi
 
-         save_oldobjs=$oldobjs
-         oldobjs=
-         counter=1
-         for obj in $save_oldobjs
-         do
-           objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
-           case " $oldobjs " in
-           " ") oldobjs=$obj ;;
-           *[\ /]"$objbase "*)
-             while :; do
-               # Make sure we don't pick an alternate name that also
-               # overlaps.
-               newobj=lt$counter-$objbase
-               counter=`expr $counter + 1`
-               case " $oldobjs " in
-               *[\ /]"$newobj "*) ;;
-               *) if test ! -f "$gentop/$newobj"; then break; fi ;;
-               esac
-             done
-             $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
-             $run ln "$obj" "$gentop/$newobj" ||
-             $run cp "$obj" "$gentop/$newobj"
-             oldobjs="$oldobjs $gentop/$newobj"
-             ;;
-           *) oldobjs="$oldobjs $obj" ;;
-           esac
-         done
-       fi
+          if ${skipped_export-false}; then
+           if test -n "$export_symbols" && test -n "$include_expsyms"; then
+             tmp_export_symbols="$export_symbols"
+             test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+             $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+           fi
 
-       eval cmds=\"$old_archive_cmds\"
+           if test -n "$orig_export_symbols"; then
+             # The given exports_symbols file has to be filtered, so filter it.
+             func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+             # FIXME: $output_objdir/$libname.filter potentially contains lots of
+             # 's' commands which not all seds can handle. GNU sed should be fine
+             # though. Also, the filter scales superlinearly with the number of
+             # global variables. join(1) would be nice here, but unfortunately
+             # isn't a blessed tool.
+             $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+             delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+             export_symbols=$output_objdir/$libname.def
+             $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+           fi
+         fi
 
-       if len=`expr "X$cmds" : ".*"` &&
-            test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-         cmds=$old_archive_cmds
-       else
-         # the command line is too long to link in one step, link in parts
-         $echo "using piecewise archive linking..."
-         save_RANLIB=$RANLIB
-         RANLIB=:
-         objlist=
-         concat_cmds=
-         save_oldobjs=$oldobjs
+         libobjs=$output
+         # Restore the value of output.
+         output=$save_output
 
-         # Is there a better way of finding the last object in the list?
-         for obj in $save_oldobjs
-         do
-           last_oldobj=$obj
-         done
-         for obj in $save_oldobjs
-         do
-           oldobjs="$objlist $obj"
-           objlist="$objlist $obj"
-           eval test_cmds=\"$old_archive_cmds\"
-           if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
-              test "$len" -le "$max_cmd_len"; then
-             :
+         if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+           test "X$libobjs" = "X " && libobjs=
+         fi
+         # Expand the library linking commands again to reset the
+         # value of $libobjs for piecewise linking.
+
+         # Do each of the archive commands.
+         if test "$module" = yes && test -n "$module_cmds" ; then
+           if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+             cmds=$module_expsym_cmds
            else
-             # the above command should be used before it gets too long
-             oldobjs=$objlist
-             if test "$obj" = "$last_oldobj" ; then
-               RANLIB=$save_RANLIB
-             fi
-             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-             eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
-             objlist=
+             cmds=$module_cmds
            fi
-         done
-         RANLIB=$save_RANLIB
-         oldobjs=$objlist
-         if test "X$oldobjs" = "X" ; then
-           eval cmds=\"\$concat_cmds\"
          else
-           eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+           if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+             cmds=$archive_expsym_cmds
+           else
+             cmds=$archive_cmds
+           fi
          fi
        fi
-      fi
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-        eval cmd=\"$cmd\"
-       IFS="$save_ifs"
-       $show "$cmd"
-       $run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
 
-    if test -n "$generated"; then
-      $show "${rm}r$generated"
-      $run ${rm}r$generated
-    fi
+       if test -n "$delfiles"; then
+         # Append the command to remove temporary files to $cmds.
+         eval cmds=\"\$cmds~\$RM $delfiles\"
+       fi
 
-    # Now create the libtool archive.
-    case $output in
-    *.la)
-      old_library=
-      test "$build_old_libs" = yes && old_library="$libname.$libext"
-      $show "creating $output"
+       # Add any objects from preloaded convenience libraries
+       if test -n "$dlprefiles"; then
+         gentop="$output_objdir/${outputname}x"
+         generated="$generated $gentop"
 
-      # Preserve any variables that may affect compiler behavior
-      for var in $variables_saved_for_relink; do
-       if eval test -z \"\${$var+set}\"; then
-         relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
-       elif eval var_value=\$$var; test -z "$var_value"; then
-         relink_command="$var=; export $var; $relink_command"
-       else
-         var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
-         relink_command="$var=\"$var_value\"; export $var; $relink_command"
+         func_extract_archives $gentop $dlprefiles
+         libobjs="$libobjs $func_extract_archives_result"
+         test "X$libobjs" = "X " && libobjs=
        fi
-      done
-      # Quote the link command for shipping.
-      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
-      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
-      if test "$hardcode_automatic" = yes ; then
-       relink_command=
-      fi
 
+       save_ifs="$IFS"; IFS='~'
+       for cmd in $cmds; do
+         IFS="$save_ifs"
+         eval cmd=\"$cmd\"
+         $opt_silent || {
+           func_quote_for_expand "$cmd"
+           eval "func_echo $func_quote_for_expand_result"
+         }
+         $opt_dry_run || eval "$cmd" || {
+           lt_exit=$?
 
-      # Only create the output if not a dry run.
-      if test -z "$run"; then
-       for installed in no yes; do
-         if test "$installed" = yes; then
-           if test -z "$install_libdir"; then
-             break
+           # Restore the uninstalled library and exit
+           if test "$mode" = relink; then
+             ( cd "$output_objdir" && \
+               $RM "${realname}T" && \
+               $MV "${realname}U" "$realname" )
            fi
-           output="$output_objdir/$outputname"i
-           # Replace all uninstalled libtool libraries with the installed ones
-           newdependency_libs=
-           for deplib in $dependency_libs; do
-             case $deplib in
-             *.la)
-               name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
-               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
-               if test -z "$libdir"; then
-                 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
-                 exit $EXIT_FAILURE
-               fi
-               newdependency_libs="$newdependency_libs $libdir/$name"
-               ;;
-             *) newdependency_libs="$newdependency_libs $deplib" ;;
-             esac
-           done
-           dependency_libs="$newdependency_libs"
-           newdlfiles=
-           for lib in $dlfiles; do
-             name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-             eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
-             if test -z "$libdir"; then
-               $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-               exit $EXIT_FAILURE
-             fi
-             newdlfiles="$newdlfiles $libdir/$name"
-           done
-           dlfiles="$newdlfiles"
-           newdlprefiles=
-           for lib in $dlprefiles; do
-             name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-             eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
-             if test -z "$libdir"; then
-               $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-               exit $EXIT_FAILURE
-             fi
-             newdlprefiles="$newdlprefiles $libdir/$name"
-           done
-           dlprefiles="$newdlprefiles"
-         else
-           newdlfiles=
-           for lib in $dlfiles; do
-             case $lib in
-               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
-               *) abs=`pwd`"/$lib" ;;
-             esac
-             newdlfiles="$newdlfiles $abs"
-           done
-           dlfiles="$newdlfiles"
-           newdlprefiles=
-           for lib in $dlprefiles; do
-             case $lib in
-               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
-               *) abs=`pwd`"/$lib" ;;
-             esac
-             newdlprefiles="$newdlprefiles $abs"
-           done
-           dlprefiles="$newdlprefiles"
-         fi
-         $rm $output
-         # place dlname in correct position for cygwin
-         tdlname=$dlname
-         case $host,$output,$installed,$module,$dlname in
-           *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
-         esac
-         $echo > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
 
-# The name that we can dlopen(3).
-dlname='$tdlname'
+           exit $lt_exit
+         }
+       done
+       IFS="$save_ifs"
 
-# Names of this library.
-library_names='$library_names'
+       # Restore the uninstalled library and exit
+       if test "$mode" = relink; then
+         $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
 
-# The name of the static archive.
-old_library='$old_library'
+         if test -n "$convenience"; then
+           if test -z "$whole_archive_flag_spec"; then
+             func_show_eval '${RM}r "$gentop"'
+           fi
+         fi
 
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
+         exit $EXIT_SUCCESS
+       fi
 
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
+       # Create links to the real library.
+       for linkname in $linknames; do
+         if test "$realname" != "$linkname"; then
+           func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+         fi
+       done
 
-# Is this an already installed library?
-installed=$installed
+       # If -module or -export-dynamic was specified, set the dlname.
+       if test "$module" = yes || test "$export_dynamic" = yes; then
+         # On all known operating systems, these are identical.
+         dlname="$soname"
+       fi
+      fi
+      ;;
 
-# Should we warn about portability when linking against -modules?
-shouldnotlink=$module
+    obj)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+       func_warning "\`-dlopen' is ignored for objects"
+      fi
 
-# Files to dlopen/dlpreopen
-dlopen='$dlfiles'
-dlpreopen='$dlprefiles'
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+       func_warning "\`-l' and \`-L' are ignored for objects" ;;
+      esac
 
-# Directory that this library needs to be installed in:
-libdir='$install_libdir'"
-         if test "$installed" = no && test "$need_relink" = yes; then
-           $echo >> $output "\
-relink_command=\"$relink_command\""
-         fi
-       done
-      fi
+      test -n "$rpath" && \
+       func_warning "\`-rpath' is ignored for objects"
 
-      # Do a symbolic link so that the libtool archive can be found in
-      # LD_LIBRARY_PATH before the program is installed.
-      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
-      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
-      ;;
-    esac
-    exit $EXIT_SUCCESS
-    ;;
+      test -n "$xrpath" && \
+       func_warning "\`-R' is ignored for objects"
+
+      test -n "$vinfo" && \
+       func_warning "\`-version-info' is ignored for objects"
+
+      test -n "$release" && \
+       func_warning "\`-release' is ignored for objects"
 
-  # libtool install mode
-  install)
-    modename="$modename: install"
+      case $output in
+      *.lo)
+       test -n "$objs$old_deplibs" && \
+         func_fatal_error "cannot build library object \`$output' from non-libtool objects"
 
-    # There may be an optional sh(1) argument at the beginning of
-    # install_prog (especially on Windows NT).
-    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
-       # Allow the use of GNU shtool's install command.
-       $echo "X$nonopt" | grep shtool > /dev/null; then
-      # Aesthetically quote it.
-      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-       arg="\"$arg\""
+       libobj=$output
+       func_lo2o "$libobj"
+       obj=$func_lo2o_result
+       ;;
+      *)
+       libobj=
+       obj="$output"
        ;;
       esac
-      install_prog="$arg "
-      arg="$1"
-      shift
-    else
-      install_prog=
-      arg=$nonopt
-    fi
 
-    # The real first argument should be the name of the installation program.
-    # Aesthetically quote it.
-    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-    case $arg in
-    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \      ]*|*]*|"")
-      arg="\"$arg\""
-      ;;
-    esac
-    install_prog="$install_prog$arg"
+      # Delete the old objects.
+      $opt_dry_run || $RM $obj $libobj
 
-    # We need to accept at least all the BSD install flags.
-    dest=
-    files=
-    opts=
-    prev=
-    install_type=
-    isdir=no
-    stripme=
-    for arg
-    do
-      if test -n "$dest"; then
-       files="$files $dest"
-       dest=$arg
-       continue
-      fi
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec and hope we can get by with
+      # turning comma into space..
+      wl=
 
-      case $arg in
-      -d) isdir=yes ;;
-      -f) 
-       case " $install_prog " in
-       *[\\\ /]cp\ *) ;;
-       *) prev=$arg ;;
-       esac
-       ;;
-      -g | -m | -o) prev=$arg ;;
-      -s)
-       stripme=" -s"
-       continue
-       ;;
-      -*)
-       ;;
-      *)
-       # If the previous option needed an argument, then skip it.
-       if test -n "$prev"; then
-         prev=
+      if test -n "$convenience"; then
+       if test -n "$whole_archive_flag_spec"; then
+         eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+         reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
        else
-         dest=$arg
-         continue
+         gentop="$output_objdir/${obj}x"
+         generated="$generated $gentop"
+
+         func_extract_archives $gentop $convenience
+         reload_conv_objs="$reload_objs $func_extract_archives_result"
        fi
-       ;;
-      esac
+      fi
 
-      # Aesthetically quote the argument.
-      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-       arg="\"$arg\""
-       ;;
-      esac
-      install_prog="$install_prog $arg"
-    done
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
 
-    if test -z "$install_prog"; then
-      $echo "$modename: you must specify an install program" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
+      output="$obj"
+      func_execute_cmds "$reload_cmds" 'exit $?'
 
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prev' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+       if test -n "$gentop"; then
+         func_show_eval '${RM}r "$gentop"'
+       fi
 
-    if test -z "$files"; then
-      if test -z "$dest"; then
-       $echo "$modename: no file or destination specified" 1>&2
-      else
-       $echo "$modename: you must specify a destination" 1>&2
+       exit $EXIT_SUCCESS
       fi
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
 
-    # Strip any trailing slash from the destination.
-    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+      if test "$build_libtool_libs" != yes; then
+       if test -n "$gentop"; then
+         func_show_eval '${RM}r "$gentop"'
+       fi
 
-    # Check to see that the destination is a directory.
-    test -d "$dest" && isdir=yes
-    if test "$isdir" = yes; then
-      destdir="$dest"
-      destname=
-    else
-      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
-      test "X$destdir" = "X$dest" && destdir=.
-      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+       # Create an invalid libtool object if no PIC, so that we don't
+       # accidentally link it into a program.
+       # $show "echo timestamp > $libobj"
+       # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+       exit $EXIT_SUCCESS
+      fi
 
-      # Not a directory, so check to see that there is only one file specified.
-      set dummy $files
-      if test "$#" -gt 2; then
-       $echo "$modename: \`$dest' is not a directory" 1>&2
-       $echo "$help" 1>&2
-       exit $EXIT_FAILURE
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+       # Only do commands if we really have different PIC objects.
+       reload_objs="$libobjs $reload_conv_objs"
+       output="$libobj"
+       func_execute_cmds "$reload_cmds" 'exit $?'
       fi
-    fi
-    case $destdir in
-    [\\/]* | [A-Za-z]:[\\/]*) ;;
-    *)
-      for file in $files; do
-       case $file in
-       *.lo) ;;
-       *)
-         $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-      done
+
+      if test -n "$gentop"; then
+       func_show_eval '${RM}r "$gentop"'
+      fi
+
+      exit $EXIT_SUCCESS
       ;;
-    esac
 
-    # This variable tells wrapper scripts just to set variables rather
-    # than running their programs.
-    libtool_install_magic="$magic"
+    prog)
+      case $host in
+       *cygwin*) func_stripname '' '.exe' "$output"
+                 output=$func_stripname_result.exe;;
+      esac
+      test -n "$vinfo" && \
+       func_warning "\`-version-info' is ignored for programs"
 
-    staticlibs=
-    future_libdirs=
-    current_libdirs=
-    for file in $files; do
+      test -n "$release" && \
+       func_warning "\`-release' is ignored for programs"
 
-      # Do each installation.
-      case $file in
-      *.$libext)
-       # Do the static libraries later.
-       staticlibs="$staticlibs $file"
+      test "$preload" = yes \
+        && test "$dlopen_support" = unknown \
+       && test "$dlopen_self" = unknown \
+       && test "$dlopen_self_static" = unknown && \
+         func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+       # On Rhapsody replace the C library is the System framework
+       compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+       finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
        ;;
+      esac
 
-      *.la)
-       # Check to see that this really is a libtool archive.
-       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-       else
-         $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
+      case $host in
+      *-*-darwin*)
+       # Don't allow lazy linking, it breaks C++ global constructors
+       # But is supposedly fixed on 10.4 or later (yay!).
+       if test "$tagname" = CXX ; then
+         case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+           10.[0123])
+             compile_command="$compile_command ${wl}-bind_at_load"
+             finalize_command="$finalize_command ${wl}-bind_at_load"
+           ;;
+         esac
        fi
+       # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+       compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+       finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+       ;;
+      esac
 
-       library_names=
-       old_library=
-       relink_command=
-       # If there is no directory component, then add one.
-       case $file in
-       */* | *\\*) . $file ;;
-       *) . ./$file ;;
-       esac
 
-       # Add the libdir to current_libdirs if it is the destination.
-       if test "X$destdir" = "X$libdir"; then
-         case "$current_libdirs " in
-         *" $libdir "*) ;;
-         *) current_libdirs="$current_libdirs $libdir" ;;
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+       case " $new_libs " in
+       *" -L$path/$objdir "*) ;;
+       *)
+         case " $compile_deplibs " in
+         *" -L$path/$objdir "*)
+           new_libs="$new_libs -L$path/$objdir" ;;
          esac
-       else
-         # Note the libdir as a future libdir.
-         case "$future_libdirs " in
-         *" $libdir "*) ;;
-         *) future_libdirs="$future_libdirs $libdir" ;;
+         ;;
+       esac
+      done
+      for deplib in $compile_deplibs; do
+       case $deplib in
+       -L*)
+         case " $new_libs " in
+         *" $deplib "*) ;;
+         *) new_libs="$new_libs $deplib" ;;
          esac
-       fi
+         ;;
+       *) new_libs="$new_libs $deplib" ;;
+       esac
+      done
+      compile_deplibs="$new_libs"
 
-       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
-       test "X$dir" = "X$file/" && dir=
-       dir="$dir$objdir"
 
-       if test -n "$relink_command"; then
-         # Determine the prefix the user has applied to our future dir.
-         inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
 
-         # Don't allow the user to place us outside of our expected
-         # location b/c this prevents finding dependent libraries that
-         # are installed to the same prefix.
-         # At present, this check doesn't affect windows .dll's that
-         # are installed into $libdir/../bin (currently, that works fine)
-         # but it's something to keep an eye on.
-         if test "$inst_prefix_dir" = "$destdir"; then
-           $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
-           exit $EXIT_FAILURE
-         fi
+      if test -n "$rpath$xrpath"; then
+       # If the user specified any rpath flags, then add them.
+       for libdir in $rpath $xrpath; do
+         # This is the magic to use -rpath.
+         case "$finalize_rpath " in
+         *" $libdir "*) ;;
+         *) finalize_rpath="$finalize_rpath $libdir" ;;
+         esac
+       done
+      fi
 
-         if test -n "$inst_prefix_dir"; then
-           # Stick the inst_prefix_dir data into the link command.
-           relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+       if test -n "$hardcode_libdir_flag_spec"; then
+         if test -n "$hardcode_libdir_separator"; then
+           if test -z "$hardcode_libdirs"; then
+             hardcode_libdirs="$libdir"
+           else
+             # Just accumulate the unique libdirs.
+             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+               ;;
+             *)
+               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+               ;;
+             esac
+           fi
          else
-           relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+           eval flag=\"$hardcode_libdir_flag_spec\"
+           rpath="$rpath $flag"
          fi
+       elif test -n "$runpath_var"; then
+         case "$perm_rpath " in
+         *" $libdir "*) ;;
+         *) perm_rpath="$perm_rpath $libdir" ;;
+         esac
+       fi
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+         testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+         case :$dllsearchpath: in
+         *":$libdir:"*) ;;
+         *) dllsearchpath="$dllsearchpath:$libdir";;
+         esac
+         case :$dllsearchpath: in
+         *":$testbindir:"*) ;;
+         *) dllsearchpath="$dllsearchpath:$testbindir";;
+         esac
+         ;;
+       esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+        test -n "$hardcode_libdirs"; then
+       libdir="$hardcode_libdirs"
+       eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
 
-         $echo "$modename: warning: relinking \`$file'" 1>&2
-         $show "$relink_command"
-         if $run eval "$relink_command"; then :
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+       if test -n "$hardcode_libdir_flag_spec"; then
+         if test -n "$hardcode_libdir_separator"; then
+           if test -z "$hardcode_libdirs"; then
+             hardcode_libdirs="$libdir"
+           else
+             # Just accumulate the unique libdirs.
+             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+               ;;
+             *)
+               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+               ;;
+             esac
+           fi
          else
-           $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-           exit $EXIT_FAILURE
+           eval flag=\"$hardcode_libdir_flag_spec\"
+           rpath="$rpath $flag"
          fi
+       elif test -n "$runpath_var"; then
+         case "$finalize_perm_rpath " in
+         *" $libdir "*) ;;
+         *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+         esac
        fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+        test -n "$hardcode_libdirs"; then
+       libdir="$hardcode_libdirs"
+       eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
 
-       # See the names of the shared library.
-       set dummy $library_names
-       if test -n "$2"; then
-         realname="$2"
-         shift
-         shift
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+       # Transform all the library objects into standard objects.
+       compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+       finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
 
-         srcname="$realname"
-         test -n "$relink_command" && srcname="$realname"T
+      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
 
-         # Install the shared library and build the symlinks.
-         $show "$install_prog $dir/$srcname $destdir/$realname"
-         $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
-         if test -n "$stripme" && test -n "$striplib"; then
-           $show "$striplib $destdir/$realname"
-           $run eval "$striplib $destdir/$realname" || exit $?
-         fi
+      # template prelinking step
+      if test -n "$prelink_cmds"; then
+       func_execute_cmds "$prelink_cmds" 'exit $?'
+      fi
 
-         if test "$#" -gt 0; then
-           # Delete the old symlinks, and create new ones.
-           # Try `ln -sf' first, because the `ln' binary might depend on
-           # the symlink we replace!  Solaris /bin/ln does not understand -f,
-           # so we also need to try rm && ln -s.
-           for linkname
-           do
-             if test "$linkname" != "$realname"; then
-                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
-                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
-             fi
-           done
-         fi
+      wrappers_required=yes
+      case $host in
+      *cygwin* | *mingw* )
+        if test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      *)
+        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      esac
+      if test "$wrappers_required" = no; then
+       # Replace the output file specification.
+       compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+       link_command="$compile_command$compile_rpath"
 
-         # Do each command in the postinstall commands.
-         lib="$destdir/$realname"
-         cmds=$postinstall_cmds
-         save_ifs="$IFS"; IFS='~'
-         for cmd in $cmds; do
-           IFS="$save_ifs"
-           eval cmd=\"$cmd\"
-           $show "$cmd"
-           $run eval "$cmd" || {
-             lt_exit=$?
-
-             # Restore the uninstalled library and exit
-             if test "$mode" = relink; then
-               $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
-             fi
+       # We have no uninstalled library dependencies, so finalize right now.
+       exit_status=0
+       func_show_eval "$link_command" 'exit_status=$?'
 
-             exit $lt_exit
-           }
-         done
-         IFS="$save_ifs"
+       # Delete the generated files.
+       if test -f "$output_objdir/${outputname}S.${objext}"; then
+         func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
        fi
 
-       # Install the pseudo-library for information purposes.
-       name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-       instname="$dir/$name"i
-       $show "$install_prog $instname $destdir/$name"
-       $run eval "$install_prog $instname $destdir/$name" || exit $?
-
-       # Maybe install the static library, too.
-       test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
-       ;;
+       exit $exit_status
+      fi
 
-      *.lo)
-       # Install (i.e. copy) a libtool object.
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+       compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+       finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
 
-       # Figure out destination file name, if it wasn't already specified.
-       if test -n "$destname"; then
-         destfile="$destdir/$destname"
-       else
-         destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-         destfile="$destdir/$destfile"
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+       if test -n "$perm_rpath"; then
+         # We should set the runpath_var.
+         rpath=
+         for dir in $perm_rpath; do
+           rpath="$rpath$dir:"
+         done
+         compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
        fi
-
-       # Deduce the name of the destination old-style object file.
-       case $destfile in
-       *.lo)
-         staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
-         ;;
-       *.$objext)
-         staticdest="$destfile"
-         destfile=
-         ;;
-       *)
-         $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-
-       # Install the libtool object if requested.
-       if test -n "$destfile"; then
-         $show "$install_prog $file $destfile"
-         $run eval "$install_prog $file $destfile" || exit $?
+       if test -n "$finalize_perm_rpath"; then
+         # We should set the runpath_var.
+         rpath=
+         for dir in $finalize_perm_rpath; do
+           rpath="$rpath$dir:"
+         done
+         finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
        fi
+      fi
 
-       # Install the old object if enabled.
-       if test "$build_old_libs" = yes; then
-         # Deduce the name of the old-style object file.
-         staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
-
-         $show "$install_prog $staticobj $staticdest"
-         $run eval "$install_prog \$staticobj \$staticdest" || exit $?
-       fi
+      if test "$no_install" = yes; then
+       # We don't need to create a wrapper script.
+       link_command="$compile_var$compile_command$compile_rpath"
+       # Replace the output file specification.
+       link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+       # Delete the old output file.
+       $opt_dry_run || $RM $output
+       # Link the executable and exit
+       func_show_eval "$link_command" 'exit $?'
        exit $EXIT_SUCCESS
-       ;;
+      fi
 
-      *)
-       # Figure out destination file name, if it wasn't already specified.
-       if test -n "$destname"; then
-         destfile="$destdir/$destname"
+      if test "$hardcode_action" = relink; then
+       # Fast installation is not supported
+       link_command="$compile_var$compile_command$compile_rpath"
+       relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+       func_warning "this platform does not like uninstalled shared libraries"
+       func_warning "\`$output' will be relinked during installation"
+      else
+       if test "$fast_install" != no; then
+         link_command="$finalize_var$compile_command$finalize_rpath"
+         if test "$fast_install" = yes; then
+           relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+         else
+           # fast_install is set to needless
+           relink_command=
+         fi
        else
-         destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-         destfile="$destdir/$destfile"
+         link_command="$compile_var$compile_command$compile_rpath"
+         relink_command="$finalize_var$finalize_command$finalize_rpath"
        fi
+      fi
 
-       # If the file is missing, and there is a .exe on the end, strip it
-       # because it is most likely a libtool script we actually want to
-       # install
-       stripped_ext=""
-       case $file in
-         *.exe)
-           if test ! -f "$file"; then
-             file=`$echo $file|${SED} 's,.exe$,,'`
-             stripped_ext=".exe"
-           fi
-           ;;
-       esac
-
-       # Do a test to see if this is really a libtool program.
-       case $host in
-       *cygwin*|*mingw*)
-           wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
-           ;;
-       *)
-           wrapper=$file
-           ;;
-       esac
-       if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
-         notinst_deplibs=
-         relink_command=
-
-         # Note that it is not necessary on cygwin/mingw to append a dot to
-         # foo even if both foo and FILE.exe exist: automatic-append-.exe
-         # behavior happens only for exec(3), not for open(2)!  Also, sourcing
-         # `FILE.' does not work on cygwin managed mounts.
-         #
-         # If there is no directory component, then add one.
-         case $wrapper in
-         */* | *\\*) . ${wrapper} ;;
-         *) . ./${wrapper} ;;
-         esac
+      # Replace the output file specification.
+      link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
 
-         # Check the variables that should have been set.
-         if test -z "$notinst_deplibs"; then
-           $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
-           exit $EXIT_FAILURE
-         fi
+      # Delete the old output files.
+      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
 
-         finalize=yes
-         for lib in $notinst_deplibs; do
-           # Check to see that each library is installed.
-           libdir=
-           if test -f "$lib"; then
-             # If there is no directory component, then add one.
-             case $lib in
-             */* | *\\*) . $lib ;;
-             *) . ./$lib ;;
-             esac
-           fi
-           libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
-           if test -n "$libdir" && test ! -f "$libfile"; then
-             $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
-             finalize=no
-           fi
-         done
+      func_show_eval "$link_command" 'exit $?'
 
-         relink_command=
-         # Note that it is not necessary on cygwin/mingw to append a dot to
-         # foo even if both foo and FILE.exe exist: automatic-append-.exe
-         # behavior happens only for exec(3), not for open(2)!  Also, sourcing
-         # `FILE.' does not work on cygwin managed mounts.
-         #
-         # If there is no directory component, then add one.
-         case $wrapper in
-         */* | *\\*) . ${wrapper} ;;
-         *) . ./${wrapper} ;;
-         esac
+      # Now create the wrapper script.
+      func_verbose "creating $output"
 
-         outputname=
-         if test "$fast_install" = no && test -n "$relink_command"; then
-           if test "$finalize" = yes && test -z "$run"; then
-             tmpdir=`func_mktempdir`
-             file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
-             outputname="$tmpdir/$file"
-             # Replace the output file specification.
-             relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
-
-             $show "$relink_command"
-             if $run eval "$relink_command"; then :
-             else
-               $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-               ${rm}r "$tmpdir"
-               continue
-             fi
-             file="$outputname"
-           else
-             $echo "$modename: warning: cannot relink \`$file'" 1>&2
-           fi
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+       # Preserve any variables that may affect compiler behavior
+       for var in $variables_saved_for_relink; do
+         if eval test -z \"\${$var+set}\"; then
+           relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+         elif eval var_value=\$$var; test -z "$var_value"; then
+           relink_command="$var=; export $var; $relink_command"
          else
-           # Install the binary that we compiled earlier.
-           file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+           func_quote_for_eval "$var_value"
+           relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
          fi
-       fi
+       done
+       relink_command="(cd `pwd`; $relink_command)"
+       relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      fi
 
-       # remove .exe since cygwin /usr/bin/install will append another
-       # one anyway 
-       case $install_prog,$host in
-       */usr/bin/install*,*cygwin*)
-         case $file:$destfile in
-         *.exe:*.exe)
-           # this is ok
-           ;;
-         *.exe:*)
-           destfile=$destfile.exe
-           ;;
-         *:*.exe)
-           destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
-           ;;
-         esac
-         ;;
+      # Quote $ECHO for shipping.
+      if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
+       case $progpath in
+       [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+       *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+       esac
+       qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+       qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if not in dry run mode.
+      $opt_dry_run || {
+       # win32 will think the script is a binary if it has
+       # a .exe suffix, so we strip it off here.
+       case $output in
+         *.exe) func_stripname '' '.exe' "$output"
+                output=$func_stripname_result ;;
        esac
-       $show "$install_prog$stripme $file $destfile"
-       $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
-       test -n "$outputname" && ${rm}r "$tmpdir"
-       ;;
-      esac
-    done
+       # test for cygwin because mv fails w/o .exe extensions
+       case $host in
+         *cygwin*)
+           exeext=.exe
+           func_stripname '' '.exe' "$outputname"
+           outputname=$func_stripname_result ;;
+         *) exeext= ;;
+       esac
+       case $host in
+         *cygwin* | *mingw* )
+           func_dirname_and_basename "$output" "" "."
+           output_name=$func_basename_result
+           output_path=$func_dirname_result
+           cwrappersource="$output_path/$objdir/lt-$output_name.c"
+           cwrapper="$output_path/$output_name.exe"
+           $RM $cwrappersource $cwrapper
+           trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+           func_emit_cwrapperexe_src > $cwrappersource
+
+           # we should really use a build-platform specific compiler
+           # here, but OTOH, the wrappers (shell script and this C one)
+           # are only useful if you want to execute the "real" binary.
+           # Since the "real" binary is built for $host, then this
+           # wrapper might as well be built for $host, too.
+           $opt_dry_run || {
+             $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+             $STRIP $cwrapper
+           }
 
-    for file in $staticlibs; do
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+           # Now, create the wrapper script for func_source use:
+           func_ltwrapper_scriptname $cwrapper
+           $RM $func_ltwrapper_scriptname_result
+           trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+           $opt_dry_run || {
+             $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+           }
+         ;;
+         * )
+           $RM $output
+           trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
 
-      # Set up the ranlib parameters.
-      oldlib="$destdir/$name"
+           func_emit_wrapper no > $output
+           chmod +x $output
+         ;;
+       esac
+      }
+      exit $EXIT_SUCCESS
+      ;;
+    esac
 
-      $show "$install_prog $file $oldlib"
-      $run eval "$install_prog \$file \$oldlib" || exit $?
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
 
-      if test -n "$stripme" && test -n "$old_striplib"; then
-       $show "$old_striplib $oldlib"
-       $run eval "$old_striplib $oldlib" || exit $?
+      if test "$build_libtool_libs" = convenience; then
+       oldobjs="$libobjs_save $symfileobj"
+       addlibs="$convenience"
+       build_libtool_libs=no
+      else
+       if test "$build_libtool_libs" = module; then
+         oldobjs="$libobjs_save"
+         build_libtool_libs=no
+       else
+         oldobjs="$old_deplibs $non_pic_objects"
+         if test "$preload" = yes && test -f "$symfileobj"; then
+           oldobjs="$oldobjs $symfileobj"
+         fi
+       fi
+       addlibs="$old_convenience"
       fi
 
-      # Do each command in the postinstall commands.
-      cmds=$old_postinstall_cmds
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-       IFS="$save_ifs"
-       eval cmd=\"$cmd\"
-       $show "$cmd"
-       $run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
+      if test -n "$addlibs"; then
+       gentop="$output_objdir/${outputname}x"
+       generated="$generated $gentop"
 
-    if test -n "$future_libdirs"; then
-      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
-    fi
+       func_extract_archives $gentop $addlibs
+       oldobjs="$oldobjs $func_extract_archives_result"
+      fi
 
-    if test -n "$current_libdirs"; then
-      # Maybe just do a dry run.
-      test -n "$run" && current_libdirs=" -n$current_libdirs"
-      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
-    else
-      exit $EXIT_SUCCESS
-    fi
-    ;;
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+       cmds=$old_archive_from_new_cmds
+      else
 
-  # libtool finish mode
-  finish)
-    modename="$modename: finish"
-    libdirs="$nonopt"
-    admincmds=
+       # Add any objects from preloaded convenience libraries
+       if test -n "$dlprefiles"; then
+         gentop="$output_objdir/${outputname}x"
+         generated="$generated $gentop"
 
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      for dir
-      do
-       libdirs="$libdirs $dir"
-      done
+         func_extract_archives $gentop $dlprefiles
+         oldobjs="$oldobjs $func_extract_archives_result"
+       fi
 
-      for libdir in $libdirs; do
-       if test -n "$finish_cmds"; then
-         # Do each command in the finish commands.
-         cmds=$finish_cmds
-         save_ifs="$IFS"; IFS='~'
-         for cmd in $cmds; do
-           IFS="$save_ifs"
-           eval cmd=\"$cmd\"
-           $show "$cmd"
-           $run eval "$cmd" || admincmds="$admincmds
-       $cmd"
+       # POSIX demands no paths to be encoded in archives.  We have
+       # to avoid creating archives with duplicate basenames if we
+       # might have to extract them afterwards, e.g., when creating a
+       # static archive out of a convenience library, or when linking
+       # the entirety of a libtool archive into another (currently
+       # not supported by libtool).
+       if (for obj in $oldobjs
+           do
+             func_basename "$obj"
+             $ECHO "$func_basename_result"
+           done | sort | sort -uc >/dev/null 2>&1); then
+         :
+       else
+         $ECHO "copying selected object files to avoid basename conflicts..."
+         gentop="$output_objdir/${outputname}x"
+         generated="$generated $gentop"
+         func_mkdir_p "$gentop"
+         save_oldobjs=$oldobjs
+         oldobjs=
+         counter=1
+         for obj in $save_oldobjs
+         do
+           func_basename "$obj"
+           objbase="$func_basename_result"
+           case " $oldobjs " in
+           " ") oldobjs=$obj ;;
+           *[\ /]"$objbase "*)
+             while :; do
+               # Make sure we don't pick an alternate name that also
+               # overlaps.
+               newobj=lt$counter-$objbase
+               counter=`expr $counter + 1`
+               case " $oldobjs " in
+               *[\ /]"$newobj "*) ;;
+               *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+               esac
+             done
+             func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+             oldobjs="$oldobjs $gentop/$newobj"
+             ;;
+           *) oldobjs="$oldobjs $obj" ;;
+           esac
          done
-         IFS="$save_ifs"
        fi
-       if test -n "$finish_eval"; then
-         # Do the single finish_eval.
-         eval cmds=\"$finish_eval\"
-         $run eval "$cmds" || admincmds="$admincmds
-       $cmds"
-       fi
-      done
-    fi
-
-    # Exit here if they wanted silent mode.
-    test "$show" = : && exit $EXIT_SUCCESS
+       eval cmds=\"$old_archive_cmds\"
 
-    $echo "X----------------------------------------------------------------------" | $Xsed
-    $echo "Libraries have been installed in:"
-    for libdir in $libdirs; do
-      $echo "   $libdir"
+       if len=`expr "X$cmds" : ".*" 2>/dev/null` &&
+          test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+         cmds=$old_archive_cmds
+       else
+         # the command line is too long to link in one step, link in parts
+         func_verbose "using piecewise archive linking..."
+         save_RANLIB=$RANLIB
+         RANLIB=:
+         objlist=
+         concat_cmds=
+         save_oldobjs=$oldobjs
+         # Is there a better way of finding the last object in the list?
+         for obj in $save_oldobjs
+         do
+           last_oldobj=$obj
+         done
+         for obj in $save_oldobjs
+         do
+           oldobjs="$objlist $obj"
+           objlist="$objlist $obj"
+           eval test_cmds=\"$old_archive_cmds\"
+           if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+              test "$len" -le "$max_cmd_len"; then
+             :
+           else
+             # the above command should be used before it gets too long
+             oldobjs=$objlist
+             if test "$obj" = "$last_oldobj" ; then
+               RANLIB=$save_RANLIB
+             fi
+             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+             eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+             objlist=
+           fi
+         done
+         RANLIB=$save_RANLIB
+         oldobjs=$objlist
+         if test "X$oldobjs" = "X" ; then
+           eval cmds=\"\$concat_cmds\"
+         else
+           eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+         fi
+       fi
+      fi
+      func_execute_cmds "$cmds" 'exit $?'
     done
-    $echo
-    $echo "If you ever happen to want to link against installed libraries"
-    $echo "in a given directory, LIBDIR, you must either use libtool, and"
-    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
-    $echo "flag during linking and do at least one of the following:"
-    if test -n "$shlibpath_var"; then
-      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
-      $echo "     during execution"
-    fi
-    if test -n "$runpath_var"; then
-      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
-      $echo "     during linking"
-    fi
-    if test -n "$hardcode_libdir_flag_spec"; then
-      libdir=LIBDIR
-      eval flag=\"$hardcode_libdir_flag_spec\"
-
-      $echo "   - use the \`$flag' linker flag"
-    fi
-    if test -n "$admincmds"; then
-      $echo "   - have your system administrator run these commands:$admincmds"
-    fi
-    if test -f /etc/ld.so.conf; then
-      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
-    fi
-    $echo
-    $echo "See any operating system documentation about shared libraries for"
-    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
-    $echo "X----------------------------------------------------------------------" | $Xsed
-    exit $EXIT_SUCCESS
-    ;;
-
-  # libtool execute mode
-  execute)
-    modename="$modename: execute"
 
-    # The first argument is the command name.
-    cmd="$nonopt"
-    if test -z "$cmd"; then
-      $echo "$modename: you must specify a COMMAND" 1>&2
-      $echo "$help"
-      exit $EXIT_FAILURE
-    fi
+    test -n "$generated" && \
+      func_show_eval "${RM}r$generated"
 
-    # Handle -dlopen flags immediately.
-    for file in $execute_dlfiles; do
-      if test ! -f "$file"; then
-       $echo "$modename: \`$file' is not a file" 1>&2
-       $echo "$help" 1>&2
-       exit $EXIT_FAILURE
-      fi
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      func_verbose "creating $output"
 
-      dir=
-      case $file in
-      *.la)
-       # Check to see that this really is a libtool archive.
-       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+       if eval test -z \"\${$var+set}\"; then
+         relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+       elif eval var_value=\$$var; test -z "$var_value"; then
+         relink_command="$var=; export $var; $relink_command"
        else
-         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
+         func_quote_for_eval "$var_value"
+         relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
        fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      if test "$hardcode_automatic" = yes ; then
+       relink_command=
+      fi
 
-       # Read the libtool library.
-       dlname=
-       library_names=
+      # Only create the output if not a dry run.
+      $opt_dry_run || {
+       for installed in no yes; do
+         if test "$installed" = yes; then
+           if test -z "$install_libdir"; then
+             break
+           fi
+           output="$output_objdir/$outputname"i
+           # Replace all uninstalled libtool libraries with the installed ones
+           newdependency_libs=
+           for deplib in $dependency_libs; do
+             case $deplib in
+             *.la)
+               func_basename "$deplib"
+               name="$func_basename_result"
+               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+               test -z "$libdir" && \
+                 func_fatal_error "\`$deplib' is not a valid libtool archive"
+               newdependency_libs="$newdependency_libs $libdir/$name"
+               ;;
+             *) newdependency_libs="$newdependency_libs $deplib" ;;
+             esac
+           done
+           dependency_libs="$newdependency_libs"
+           newdlfiles=
+
+           for lib in $dlfiles; do
+             case $lib in
+             *.la)
+               func_basename "$lib"
+               name="$func_basename_result"
+               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+               test -z "$libdir" && \
+                 func_fatal_error "\`$lib' is not a valid libtool archive"
+               newdlfiles="$newdlfiles $libdir/$name"
+               ;;
+             *) newdlfiles="$newdlfiles $lib" ;;
+             esac
+           done
+           dlfiles="$newdlfiles"
+           newdlprefiles=
+           for lib in $dlprefiles; do
+             case $lib in
+             *.la)
+               # Only pass preopened files to the pseudo-archive (for
+               # eventual linking with the app. that links it) if we
+               # didn't already link the preopened objects directly into
+               # the library:
+               func_basename "$lib"
+               name="$func_basename_result"
+               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+               test -z "$libdir" && \
+                 func_fatal_error "\`$lib' is not a valid libtool archive"
+               newdlprefiles="$newdlprefiles $libdir/$name"
+               ;;
+             esac
+           done
+           dlprefiles="$newdlprefiles"
+         else
+           newdlfiles=
+           for lib in $dlfiles; do
+             case $lib in
+               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+               *) abs=`pwd`"/$lib" ;;
+             esac
+             newdlfiles="$newdlfiles $abs"
+           done
+           dlfiles="$newdlfiles"
+           newdlprefiles=
+           for lib in $dlprefiles; do
+             case $lib in
+               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+               *) abs=`pwd`"/$lib" ;;
+             esac
+             newdlprefiles="$newdlprefiles $abs"
+           done
+           dlprefiles="$newdlprefiles"
+         fi
+         $RM $output
+         # place dlname in correct position for cygwin
+         tdlname=$dlname
+         case $host,$output,$installed,$module,$dlname in
+           *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+         esac
+         $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
 
-       # If there is no directory component, then add one.
-       case $file in
-       */* | *\\*) . $file ;;
-       *) . ./$file ;;
-       esac
+# The name that we can dlopen(3).
+dlname='$tdlname'
 
-       # Skip this library if it cannot be dlopened.
-       if test -z "$dlname"; then
-         # Warn if it was a shared library.
-         test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
-         continue
-       fi
+# Names of this library.
+library_names='$library_names'
 
-       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-       test "X$dir" = "X$file" && dir=.
+# The name of the static archive.
+old_library='$old_library'
 
-       if test -f "$dir/$objdir/$dlname"; then
-         dir="$dir/$objdir"
-       else
-         $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
-         exit $EXIT_FAILURE
-       fi
-       ;;
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
 
-      *.lo)
-       # Just add the directory containing the .lo file.
-       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-       test "X$dir" = "X$file" && dir=.
-       ;;
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
 
-      *)
-       $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
-       continue
-       ;;
-      esac
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
 
-      # Get the absolute pathname.
-      absdir=`cd "$dir" && pwd`
-      test -n "$absdir" && dir="$absdir"
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
 
-      # Now add the directory to shlibpath_var.
-      if eval "test -z \"\$$shlibpath_var\""; then
-       eval "$shlibpath_var=\"\$dir\""
-      else
-       eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
-      fi
-    done
+# Is this an already installed library?
+installed=$installed
 
-    # This variable tells wrapper scripts just to set shlibpath_var
-    # rather than running their programs.
-    libtool_execute_magic="$magic"
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
 
-    # Check if any of the arguments is a wrapper script.
-    args=
-    for file
-    do
-      case $file in
-      -*) ;;
-      *)
-       # Do a test to see if this is really a libtool program.
-       if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-         # If there is no directory component, then add one.
-         case $file in
-         */* | *\\*) . $file ;;
-         *) . ./$file ;;
-         esac
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
 
-         # Transform arg to wrapped name.
-         file="$progdir/$program"
-       fi
-       ;;
-      esac
-      # Quote arguments (to preserve shell metacharacters).
-      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
-      args="$args \"$file\""
-    done
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+         if test "$installed" = no && test "$need_relink" = yes; then
+           $ECHO >> $output "\
+relink_command=\"$relink_command\""
+         fi
+       done
+      }
 
-    if test -z "$run"; then
-      if test -n "$shlibpath_var"; then
-       # Export the shlibpath_var.
-       eval "export $shlibpath_var"
-      fi
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+}
 
-      # Restore saved environment variables
-      if test "${save_LC_ALL+set}" = set; then
-       LC_ALL="$save_LC_ALL"; export LC_ALL
-      fi
-      if test "${save_LANG+set}" = set; then
-       LANG="$save_LANG"; export LANG
-      fi
+{ test "$mode" = link || test "$mode" = relink; } &&
+    func_mode_link ${1+"$@"}
 
-      # Now prepare to actually exec the command.
-      exec_cmd="\$cmd$args"
-    else
-      # Display what would be done.
-      if test -n "$shlibpath_var"; then
-       eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
-       $echo "export $shlibpath_var"
-      fi
-      $echo "$cmd$args"
-      exit $EXIT_SUCCESS
-    fi
-    ;;
 
-  # libtool clean and uninstall mode
-  clean | uninstall)
-    modename="$modename: $mode"
-    rm="$nonopt"
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+    $opt_debug
+    RM="$nonopt"
     files=
     rmforce=
     exit_status=0
@@ -6448,30 +7546,28 @@ relink_command=\"$relink_command\""
     for arg
     do
       case $arg in
-      -f) rm="$rm $arg"; rmforce=yes ;;
-      -*) rm="$rm $arg" ;;
+      -f) RM="$RM $arg"; rmforce=yes ;;
+      -*) RM="$RM $arg" ;;
       *) files="$files $arg" ;;
       esac
     done
 
-    if test -z "$rm"; then
-      $echo "$modename: you must specify an RM program" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
+    test -z "$RM" && \
+      func_fatal_help "you must specify an RM program"
 
     rmdirs=
 
     origobjdir="$objdir"
     for file in $files; do
-      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-      if test "X$dir" = "X$file"; then
-       dir=.
+      func_dirname "$file" "" "."
+      dir="$func_dirname_result"
+      if test "X$dir" = X.; then
        objdir="$origobjdir"
       else
        objdir="$dir/$origobjdir"
       fi
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+      func_basename "$file"
+      name="$func_basename_result"
       test "$mode" = uninstall && objdir="$dir"
 
       # Remember objdir for removal later, being careful to avoid duplicates
@@ -6483,9 +7579,9 @@ relink_command=\"$relink_command\""
       fi
 
       # Don't error if the file doesn't exist and rm -f was used.
-      if (test -L "$file") >/dev/null 2>&1 \
-       || (test -h "$file") >/dev/null 2>&1 \
-       || test -f "$file"; then
+      if { test -L "$file"; } >/dev/null 2>&1 ||
+        { test -h "$file"; } >/dev/null 2>&1 ||
+        test -f "$file"; then
        :
       elif test -d "$file"; then
        exit_status=1
@@ -6499,8 +7595,8 @@ relink_command=\"$relink_command\""
       case $name in
       *.la)
        # Possibly a libtool archive, so verify it.
-       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-         . $dir/$name
+       if func_lalib_p "$file"; then
+         func_source $dir/$name
 
          # Delete the libtool libraries and symlinks.
          for n in $library_names; do
@@ -6515,39 +7611,17 @@ relink_command=\"$relink_command\""
            *" $dlname "*) ;;
            *) rmfiles="$rmfiles $objdir/$dlname" ;;
            esac
-            test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+           test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
            ;;
          uninstall)
            if test -n "$library_names"; then
              # Do each command in the postuninstall commands.
-             cmds=$postuninstall_cmds
-             save_ifs="$IFS"; IFS='~'
-             for cmd in $cmds; do
-               IFS="$save_ifs"
-               eval cmd=\"$cmd\"
-               $show "$cmd"
-               $run eval "$cmd"
-               if test "$?" -ne 0 && test "$rmforce" != yes; then
-                 exit_status=1
-               fi
-             done
-             IFS="$save_ifs"
+             func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
            fi
 
            if test -n "$old_library"; then
              # Do each command in the old_postuninstall commands.
-             cmds=$old_postuninstall_cmds
-             save_ifs="$IFS"; IFS='~'
-             for cmd in $cmds; do
-               IFS="$save_ifs"
-               eval cmd=\"$cmd\"
-               $show "$cmd"
-               $run eval "$cmd"
-               if test "$?" -ne 0 && test "$rmforce" != yes; then
-                 exit_status=1
-               fi
-             done
-             IFS="$save_ifs"
+             func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
            fi
            # FIXME: should reinstall the best remaining shared library.
            ;;
@@ -6557,20 +7631,20 @@ relink_command=\"$relink_command\""
 
       *.lo)
        # Possibly a libtool object, so verify it.
-       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+       if func_lalib_p "$file"; then
 
          # Read the .lo file
-         . $dir/$name
+         func_source $dir/$name
 
          # Add PIC object to the list of files to remove.
-         if test -n "$pic_object" \
-            && test "$pic_object" != none; then
+         if test -n "$pic_object" &&
+            test "$pic_object" != none; then
            rmfiles="$rmfiles $dir/$pic_object"
          fi
 
          # Add non-PIC object to the list of files to remove.
-         if test -n "$non_pic_object" \
-            && test "$non_pic_object" != none; then
+         if test -n "$non_pic_object" &&
+            test "$non_pic_object" != none; then
            rmfiles="$rmfiles $dir/$non_pic_object"
          fi
        fi
@@ -6581,17 +7655,26 @@ relink_command=\"$relink_command\""
          noexename=$name
          case $file in
          *.exe)
-           file=`$echo $file|${SED} 's,.exe$,,'`
-           noexename=`$echo $name|${SED} 's,.exe$,,'`
+           func_stripname '' '.exe' "$file"
+           file=$func_stripname_result
+           func_stripname '' '.exe' "$name"
+           noexename=$func_stripname_result
            # $file with .exe has already been added to rmfiles,
            # add $file without .exe
            rmfiles="$rmfiles $file"
            ;;
          esac
          # Do a test to see if this is a libtool program.
-         if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-           relink_command=
-           . $dir/$noexename
+         if func_ltwrapper_p "$file"; then
+           if func_ltwrapper_executable_p "$file"; then
+             func_ltwrapper_scriptname "$file"
+             relink_command=
+             func_source $func_ltwrapper_scriptname_result
+             rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+           else
+             relink_command=
+             func_source $dir/$noexename
+           fi
 
            # note $name still contains .exe if it was in $file originally
            # as does the version of $file that was added into $rmfiles
@@ -6606,237 +7689,38 @@ relink_command=\"$relink_command\""
        fi
        ;;
       esac
-      $show "$rm $rmfiles"
-      $run $rm $rmfiles || exit_status=1
+      func_show_eval "$RM $rmfiles" 'exit_status=1'
     done
     objdir="$origobjdir"
 
     # Try to remove the ${objdir}s in the directories where we deleted files
     for dir in $rmdirs; do
       if test -d "$dir"; then
-       $show "rmdir $dir"
-       $run rmdir $dir >/dev/null 2>&1
+       func_show_eval "rmdir $dir >/dev/null 2>&1"
       fi
     done
 
     exit $exit_status
-    ;;
+}
 
-  "")
-    $echo "$modename: you must specify a MODE" 1>&2
-    $echo "$generic_help" 1>&2
-    exit $EXIT_FAILURE
-    ;;
-  esac
+{ test "$mode" = uninstall || test "$mode" = clean; } &&
+    func_mode_uninstall ${1+"$@"}
 
-  if test -z "$exec_cmd"; then
-    $echo "$modename: invalid operation mode \`$mode'" 1>&2
-    $echo "$generic_help" 1>&2
-    exit $EXIT_FAILURE
-  fi
-fi # test -z "$show_help"
+test -z "$mode" && {
+  help="$generic_help"
+  func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+  func_fatal_help "invalid operation mode \`$mode'"
 
 if test -n "$exec_cmd"; then
-  eval exec $exec_cmd
+  eval exec "$exec_cmd"
   exit $EXIT_FAILURE
 fi
 
-# We need to display help for each of the modes.
-case $mode in
-"") $echo \
-"Usage: $modename [OPTION]... [MODE-ARG]...
-
-Provide generalized library-building support services.
-
-    --config          show all configuration variables
-    --debug           enable verbose shell tracing
--n, --dry-run         display commands without modifying any files
-    --features        display basic configuration information and exit
-    --finish          same as \`--mode=finish'
-    --help            display this help message and exit
-    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
-    --quiet           same as \`--silent'
-    --silent          don't print informational messages
-    --tag=TAG         use configuration variables from tag TAG
-    --version         print version information
-
-MODE must be one of the following:
-
-      clean           remove files from the build directory
-      compile         compile a source file into a libtool object
-      execute         automatically set library path, then run a program
-      finish          complete the installation of libtool libraries
-      install         install libraries or executables
-      link            create a library or an executable
-      uninstall       remove libraries from an installed directory
-
-MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE.
-
-Report bugs to <bug-libtool@gnu.org>."
-  exit $EXIT_SUCCESS
-  ;;
-
-clean)
-  $echo \
-"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
-
-Remove files from the build directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, object or program, all the files associated
-with it are deleted. Otherwise, only FILE itself is deleted using RM."
-  ;;
-
-compile)
-  $echo \
-"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-This mode accepts the following additional options:
-
-  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
-  -prefer-pic       try to building PIC objects only
-  -prefer-non-pic   try to building non-PIC objects only
-  -static           always build a \`.o' file suitable for static linking
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
-  ;;
-
-execute)
-  $echo \
-"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
-  -dlopen FILE      add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
-  ;;
-
-finish)
-  $echo \
-"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges.  Use
-the \`--dry-run' option if you just want to see what would be executed."
-  ;;
-
-install)
-  $echo \
-"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command.  The first component should be
-either the \`install' or \`cp' program.
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
-  ;;
-
-link)
-  $echo \
-"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
-  -all-static       do not do any dynamic linking at all
-  -avoid-version    do not add a version suffix if possible
-  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
-  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
-  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-  -export-symbols SYMFILE
-                   try to export only the symbols listed in SYMFILE
-  -export-symbols-regex REGEX
-                   try to export only the symbols matching REGEX
-  -LLIBDIR          search LIBDIR for required installed libraries
-  -lNAME            OUTPUT-FILE requires the installed library libNAME
-  -module           build a library that can dlopened
-  -no-fast-install  disable the fast-install mode
-  -no-install       link a not-installable executable
-  -no-undefined     declare that a library does not refer to external symbols
-  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
-  -objectlist FILE  Use a list of object files found in FILE to specify objects
-  -precious-files-regex REGEX
-                    don't remove output files matching REGEX
-  -release RELEASE  specify package release information
-  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
-  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
-  -static           do not do any dynamic linking of libtool libraries
-  -version-info CURRENT[:REVISION[:AGE]]
-                   specify library version info [each variable defaults to 0]
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename.  Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
-required, except when creating a convenience library.
-
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-is created, otherwise an executable program is created."
-  ;;
-
-uninstall)
-  $echo \
-"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
+exit $exit_status
 
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
-  ;;
-
-*)
-  $echo "$modename: invalid operation mode \`$mode'" 1>&2
-  $echo "$help" 1>&2
-  exit $EXIT_FAILURE
-  ;;
-esac
-
-$echo
-$echo "Try \`$modename --help' for more information about other modes."
-
-exit $?
 
 # The TAGs below are defined such that we never get into a situation
 # in which we disable both kinds of libraries.  Given conflicting
@@ -6850,14 +7734,17 @@ exit $?
 # configuration.  But we'll never go from static-only to shared-only.
 
 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-disable_libs=shared
+build_libtool_libs=no
+build_old_libs=yes
 # ### END LIBTOOL TAG CONFIG: disable-shared
 
 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
-disable_libs=static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
 # ### END LIBTOOL TAG CONFIG: disable-static
 
 # Local Variables:
 # mode:shell-script
 # sh-indentation:2
 # End:
+# vi:sw=2
+
diff --git a/src/mm/boehm-gc/m4/gc_set_version.m4 b/src/mm/boehm-gc/m4/gc_set_version.m4
new file mode 100644 (file)
index 0000000..0c18172
--- /dev/null
@@ -0,0 +1,52 @@
+# 
+# 
+# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+# OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+# 
+# Permission is hereby granted to use or copy this program
+# for any purpose,  provided the above notices are retained on all copies.
+# Permission to modify the code and to distribute modified code is granted,
+# provided the above notices are retained, and a notice that the code was
+# modified is included with the above copyright notice.
+#
+# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
+
+# GC_SET_VERSION
+# sets and AC_DEFINEs GC_VERSION_MAJOR, GC_VERSION_MINOR and GC_ALPHA_VERSION
+# based on the contents of PACKAGE_VERSION; PACKAGE_VERSION must conform to
+# [0-9]+[.][0-9]+(alpha[0.9]+)? 
+# in lex syntax; if there is no alpha number, GC_ALPHA_VERSION is empty
+#
+AC_DEFUN([GC_SET_VERSION], [
+  AC_MSG_CHECKING(GC version numbers)
+  GC_VERSION_MAJOR=`echo $PACKAGE_VERSION | sed 's/^\([[0-9]][[0-9]]*\)[[.]].*$/\1/g'`
+  GC_VERSION_MINOR=`echo $PACKAGE_VERSION | sed 's/^[[^.]]*[[.]]\([[0-9]][[0-9]]*\).*$/\1/g'`
+  GC_ALPHA_VERSION=`echo $PACKAGE_VERSION | sed 's/^[[^.]]*[[.]][[0-9]]*//'`
+
+  case "$GC_ALPHA_VERSION" in
+    alpha*) 
+      GC_ALPHA_VERSION=`echo $GC_ALPHA_VERSION \
+      | sed 's/alpha\([[0-9]][[0-9]]*\)/\1/'` ;;
+    *)  GC_ALPHA_MAJOR='' ;;
+  esac
+
+  if test :$GC_VERSION_MAJOR: = :: \
+     -o   :$GC_VERSION_MINOR: = :: ;
+  then
+    AC_MSG_RESULT(invalid)
+    AC_MSG_ERROR([nonconforming PACKAGE_VERSION='$PACKAGE_VERSION'])
+  fi
+  
+  AC_DEFINE_UNQUOTED([GC_VERSION_MAJOR], $GC_VERSION_MAJOR,
+                    [The major version number of this GC release.])
+  AC_DEFINE_UNQUOTED([GC_VERSION_MINOR], $GC_VERSION_MINOR,
+                    [The minor version number of this GC release.])
+  if test :$GC_ALPHA_VERSION: != :: ; then
+    AC_DEFINE_UNQUOTED([GC_ALPHA_VERSION], $GC_ALPHA_VERSION,
+                      [The alpha version number, if applicable.])
+  fi
+  AC_MSG_RESULT(major=$GC_VERSION_MAJOR minor=$GC_VERSION_MINOR \
+${GC_ALPHA_VERSION:+alpha=}$GC_ALPHA_VERSION)
+])
+
+sinclude(libtool.m4)
index b3f696164d2183f436ad38b9fabb4b54f5784efb..7a8ebc57cdc92fe5c9edb7e1dd762c15b763e828 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  *
  * provided the above notices are retained, and a notice that the code was
  * modified is included with the above copyright notice.
  */
-/* Boehm, November 17, 1995 12:13 pm PST */
-# include "private/gc_priv.h"
-# include <stdio.h>
-# include <setjmp.h>
-# if defined(OS2) || defined(CX_UX)
-#   define _setjmp(b) setjmp(b)
-#   define _longjmp(b,v) longjmp(b,v)
-# endif
-# ifdef AMIGA
-#   ifndef __GNUC__
-#     include <dos.h>
-#   else
-#     include <machine/reg.h>
-#   endif
+
+#include "private/gc_priv.h"
+
+#include <stdio.h>
+#include <setjmp.h>
+
+#if defined(OS2) || defined(CX_UX)
+# define _setjmp(b) setjmp(b)
+# define _longjmp(b,v) longjmp(b,v)
+#endif
+
+#ifdef AMIGA
+# ifndef __GNUC__
+#   include <dos.h>
+# else
+#   include <machine/reg.h>
 # endif
+#endif
 
 #if defined(__MWERKS__) && !defined(POWERPC)
 
@@ -33,29 +36,29 @@ asm static void PushMacRegisters()
 {
     sub.w   #4,sp                   // reserve space for one parameter.
     move.l  a2,(sp)
-    jsr                GC_push_one
+    jsr         GC_push_one
     move.l  a3,(sp)
-    jsr                GC_push_one
+    jsr         GC_push_one
     move.l  a4,(sp)
-    jsr                GC_push_one
+    jsr         GC_push_one
 #   if !__option(a6frames)
-       // <pcb> perhaps a6 should be pushed if stack frames are not being used.    
-       move.l  a6,(sp)
-       jsr             GC_push_one
+        // <pcb> perhaps a6 should be pushed if stack frames are not being used.
+        move.l  a6,(sp)
+        jsr             GC_push_one
 #   endif
-       // skip a5 (globals), a6 (frame pointer), and a7 (stack pointer)
+        // skip a5 (globals), a6 (frame pointer), and a7 (stack pointer)
     move.l  d2,(sp)
-    jsr                GC_push_one
+    jsr         GC_push_one
     move.l  d3,(sp)
-    jsr                GC_push_one
+    jsr         GC_push_one
     move.l  d4,(sp)
-    jsr                GC_push_one
+    jsr         GC_push_one
     move.l  d5,(sp)
-    jsr                GC_push_one
+    jsr         GC_push_one
     move.l  d6,(sp)
-    jsr                GC_push_one
+    jsr         GC_push_one
     move.l  d7,(sp)
-    jsr                GC_push_one
+    jsr         GC_push_one
     add.w   #4,sp                   // fix stack.
     rts
 }
@@ -64,71 +67,77 @@ asm static void PushMacRegisters()
 
 # if defined(SPARC) || defined(IA64)
     /* Value returned from register flushing routine; either sp (SPARC) */
-    /* or ar.bsp (IA64)                                                        */
-    ptr_t GC_save_regs_ret_val;
+    /* or ar.bsp (IA64).                                                */
+    GC_INNER ptr_t GC_save_regs_ret_val = NULL;
 # endif
 
 /* Routine to mark from registers that are preserved by the C compiler. */
-/* This must be ported to every new architecture.  It is not optional, */
-/* and should not be used on platforms that are either UNIX-like, or   */
-/* require thread support.                                             */
+/* This must be ported to every new architecture.  It is not optional,  */
+/* and should not be used on platforms that are either UNIX-like, or    */
+/* require thread support.                                              */
 
 #undef HAVE_PUSH_REGS
 
 #if defined(USE_ASM_PUSH_REGS)
-#  define HAVE_PUSH_REGS
+# define HAVE_PUSH_REGS
 #else  /* No asm implementation */
-void GC_push_regs()
-{
-#      if defined(M68K) && defined(AMIGA)
-        /*  AMIGA - could be replaced by generic code                  */
-        /* a0, a1, d0 and d1 are caller save */
-
-#        ifdef __GNUC__
-         asm("subq.w &0x4,%sp");       /* allocate word on top of stack */
-
-         asm("mov.l %a2,(%sp)"); asm("jsr _GC_push_one");
-         asm("mov.l %a3,(%sp)"); asm("jsr _GC_push_one");
-         asm("mov.l %a4,(%sp)"); asm("jsr _GC_push_one");
-         asm("mov.l %a5,(%sp)"); asm("jsr _GC_push_one");
-         asm("mov.l %a6,(%sp)"); asm("jsr _GC_push_one");
-         /* Skip frame pointer and stack pointer */
-         asm("mov.l %d2,(%sp)"); asm("jsr _GC_push_one");
-         asm("mov.l %d3,(%sp)"); asm("jsr _GC_push_one");
-         asm("mov.l %d4,(%sp)"); asm("jsr _GC_push_one");
-         asm("mov.l %d5,(%sp)"); asm("jsr _GC_push_one");
-         asm("mov.l %d6,(%sp)"); asm("jsr _GC_push_one");
-         asm("mov.l %d7,(%sp)"); asm("jsr _GC_push_one");
-
-         asm("addq.w &0x4,%sp");       /* put stack back where it was  */
-#        define HAVE_PUSH_REGS
-#        else /* !__GNUC__ */
-         GC_push_one(getreg(REG_A2));
-         GC_push_one(getreg(REG_A3));
+
+# if defined(M68K) && defined(AMIGA)
+    /* This function is not static because it could also be             */
+    /* errorneously defined in .S file, so this error would be caught   */
+    /* by the linker.                                                   */
+    void GC_push_regs(void)
+    {
+         /*  AMIGA - could be replaced by generic code                  */
+         /* a0, a1, d0 and d1 are caller save */
+
+#       ifdef __GNUC__
+          asm("subq.w &0x4,%sp");       /* allocate word on top of stack */
+
+          asm("mov.l %a2,(%sp)"); asm("jsr _GC_push_one");
+          asm("mov.l %a3,(%sp)"); asm("jsr _GC_push_one");
+          asm("mov.l %a4,(%sp)"); asm("jsr _GC_push_one");
+          asm("mov.l %a5,(%sp)"); asm("jsr _GC_push_one");
+          asm("mov.l %a6,(%sp)"); asm("jsr _GC_push_one");
+          /* Skip frame pointer and stack pointer */
+          asm("mov.l %d2,(%sp)"); asm("jsr _GC_push_one");
+          asm("mov.l %d3,(%sp)"); asm("jsr _GC_push_one");
+          asm("mov.l %d4,(%sp)"); asm("jsr _GC_push_one");
+          asm("mov.l %d5,(%sp)"); asm("jsr _GC_push_one");
+          asm("mov.l %d6,(%sp)"); asm("jsr _GC_push_one");
+          asm("mov.l %d7,(%sp)"); asm("jsr _GC_push_one");
+
+          asm("addq.w &0x4,%sp");       /* put stack back where it was  */
+#       else /* !__GNUC__ */
+          GC_push_one(getreg(REG_A2));
+          GC_push_one(getreg(REG_A3));
 #         ifndef __SASC
-             /* Can probably be changed to #if 0 -Kjetil M. (a4=globals)*/
-           GC_push_one(getreg(REG_A4));
-#        endif
-         GC_push_one(getreg(REG_A5));
-         GC_push_one(getreg(REG_A6));
-         /* Skip stack pointer */
-         GC_push_one(getreg(REG_D2));
-         GC_push_one(getreg(REG_D3));
-         GC_push_one(getreg(REG_D4));
-         GC_push_one(getreg(REG_D5));
-         GC_push_one(getreg(REG_D6));
-         GC_push_one(getreg(REG_D7));
-#        define HAVE_PUSH_REGS
-#       endif /* !__GNUC__ */
-#       endif /* AMIGA */
-
-#      if defined(M68K) && defined(MACOS)
-#      if defined(THINK_C)
-#         define PushMacReg(reg) \
+            /* Can probably be changed to #if 0 -Kjetil M. (a4=globals) */
+            GC_push_one(getreg(REG_A4));
+#         endif
+          GC_push_one(getreg(REG_A5));
+          GC_push_one(getreg(REG_A6));
+          /* Skip stack pointer */
+          GC_push_one(getreg(REG_D2));
+          GC_push_one(getreg(REG_D3));
+          GC_push_one(getreg(REG_D4));
+          GC_push_one(getreg(REG_D5));
+          GC_push_one(getreg(REG_D6));
+          GC_push_one(getreg(REG_D7));
+#       endif /* !__GNUC__ */
+    }
+#   define HAVE_PUSH_REGS
+
+# elif defined(M68K) && defined(MACOS)
+
+#   if defined(THINK_C)
+#     define PushMacReg(reg) \
               move.l  reg,(sp) \
               jsr             GC_push_one
-         asm {
-              sub.w   #4,sp                   ; reserve space for one parameter.
+      void GC_push_regs(void)
+      {
+          asm {
+              sub.w   #4,sp          ; reserve space for one parameter.
               PushMacReg(a2);
               PushMacReg(a3);
               PushMacReg(a4);
@@ -139,33 +148,37 @@ void GC_push_regs()
               PushMacReg(d5);
               PushMacReg(d6);
               PushMacReg(d7);
-              add.w   #4,sp                   ; fix stack.
-         }
-#        define HAVE_PUSH_REGS
-#        undef PushMacReg
-#      endif /* THINK_C */
-#      if defined(__MWERKS__)
-         PushMacRegisters();
-#        define HAVE_PUSH_REGS
-#      endif   /* __MWERKS__ */
-#   endif      /* MACOS */
-}
+              add.w   #4,sp          ; fix stack.
+          }
+      }
+#     define HAVE_PUSH_REGS
+#     undef PushMacReg
+#   elif defined(__MWERKS__)
+      void GC_push_regs(void)
+      {
+          PushMacRegisters();
+      }
+#     define HAVE_PUSH_REGS
+#   endif /* __MWERKS__ */
+# endif /* MACOS */
+
 #endif /* !USE_ASM_PUSH_REGS */
 
 #if defined(HAVE_PUSH_REGS) && defined(THREADS)
 # error GC_push_regs cannot be used with threads
- /* Would fail for GC_do_blocking.  There are probably other safety    */
- /* issues.                                                            */
+ /* Would fail for GC_do_blocking.  There are probably other safety     */
+ /* issues.                                                             */
 # undef HAVE_PUSH_REGS
 #endif
 
-#if defined(UNIX_LIKE) && !defined(NO_GETCONTEXT) &&  \
-       (defined(DARWIN) || defined(HURD) || defined(ARM32) || defined(MIPS))
-#  define NO_GETCONTEXT
+#if defined(UNIX_LIKE) && !defined(NO_GETCONTEXT) && \
+        (defined(DARWIN) || defined(HURD) || defined(OPENBSD) \
+         || defined(ARM32) || defined(MIPS))
+# define NO_GETCONTEXT
 #endif
 
 #if defined(LINUX) && defined(SPARC) && !defined(NO_GETCONTEXT)
-#  define NO_GETCONTEXT
+# define NO_GETCONTEXT
 #endif
 
 #if !defined(HAVE_PUSH_REGS) && defined(UNIX_LIKE)
@@ -175,11 +188,11 @@ void GC_push_regs()
 # endif
 #endif
 
-/* Ensure that either registers are pushed, or callee-save registers   */
-/* are somewhere on the stack, and then call fn(arg, ctxt).            */
-/* ctxt is either a pointer to a ucontext_t we generated, or NULL.     */
-void GC_with_callee_saves_pushed(void (*fn)(ptr_t, void *),
-                                ptr_t arg)
+/* Ensure that either registers are pushed, or callee-save registers    */
+/* are somewhere on the stack, and then call fn(arg, ctxt).             */
+/* ctxt is either a pointer to a ucontext_t we generated, or NULL.      */
+GC_INNER void GC_with_callee_saves_pushed(void (*fn)(ptr_t, void *),
+                                          ptr_t arg)
 {
     word dummy;
     void * context = 0;
@@ -189,29 +202,27 @@ void GC_with_callee_saves_pushed(void (*fn)(ptr_t, void *),
 #   elif defined(UNIX_LIKE) && !defined(NO_GETCONTEXT)
       /* Older versions of Darwin seem to lack getcontext(). */
       /* ARM and MIPS Linux often doesn't support a real     */
-      /* getcontext().                                              */
+      /* getcontext().                                       */
       ucontext_t ctxt;
       if (getcontext(&ctxt) < 0)
-       ABORT ("Getcontext failed: Use another register retrieval method?");
+        ABORT ("Getcontext failed: Use another register retrieval method?");
       context = &ctxt;
 #     if defined(SPARC) || defined(IA64)
-        /* On a register window machine, we need to save register      */
-        /* contents on the stack for this to work.  This may already be        */
-        /* subsumed by the getcontext() call.                          */
-        {
-          GC_save_regs_ret_val = GC_save_regs_in_stack();
-        }
+        /* On a register window machine, we need to save register       */
+        /* contents on the stack for this to work.  This may already be */
+        /* subsumed by the getcontext() call.                           */
+        GC_save_regs_ret_val = GC_save_regs_in_stack();
 #     endif /* register windows. */
 #   elif defined(HAVE_BUILTIN_UNWIND_INIT) && \
-        !(defined(POWERPC) && defined(DARWIN))
-      /* This was suggested by Richard Henderson as the way to */
-      /* force callee-save registers and register windows onto */
-      /* the stack.                                            */
-      /* Mark Sibly points out that this doesn't seem to work  */
-      /* on MacOS 10.3.9/PowerPC.                              */
+         !(defined(POWERPC) && defined(DARWIN))
+      /* This was suggested by Richard Henderson as the way to  */
+      /* force callee-save registers and register windows onto  */
+      /* the stack.                                             */
+      /* Mark Sibly points out that this doesn't seem to work   */
+      /* on MacOS 10.3.9/PowerPC.                               */
       __builtin_unwind_init();
 #   else /* !HAVE_BUILTIN_UNWIND_INIT && !UNIX_LIKE  */
-         /* && !HAVE_PUSH_REGS                      */
+         /* && !HAVE_PUSH_REGS                       */
         /* Generic code                          */
         /* The idea is due to Parag Patel at HP. */
         /* We're not sure whether he would like  */
@@ -219,37 +230,38 @@ void GC_with_callee_saves_pushed(void (*fn)(ptr_t, void *),
         jmp_buf regs;
         register word * i = (word *) regs;
         register ptr_t lim = (ptr_t)(regs) + (sizeof regs);
-  
-        /* Setjmp doesn't always clear all of the buffer.              */
-        /* That tends to preserve garbage.  Clear it.                  */
-       for (; (char *)i < lim; i++) {
-           *i = 0;
-       }
+
+        /* Setjmp doesn't always clear all of the buffer.               */
+        /* That tends to preserve garbage.  Clear it.                   */
+        for (; (char *)i < lim; i++) {
+            *i = 0;
+        }
 #       if defined(MSWIN32) || defined(MSWINCE) \
                   || defined(UTS4) || defined(LINUX) || defined(EWS4800)
-         (void) setjmp(regs);
+          (void) setjmp(regs);
 #       else
           (void) _setjmp(regs);
-         /* We don't want to mess with signals. According to   */
-         /* SUSV3, setjmp() may or may not save signal mask.   */
-         /* _setjmp won't, but is less portable.               */
+          /* We don't want to mess with signals. According to   */
+          /* SUSV3, setjmp() may or may not save signal mask.   */
+          /* _setjmp won't, but is less portable.               */
 #       endif
 #   endif /* !HAVE_PUSH_REGS ... */
-    /* FIXME: context here is sometimes just zero.  At the moment the callees  */
-    /* don't really need it.                                                   */
+    /* FIXME: context here is sometimes just zero.  At the moment the   */
+    /* callees don't really need it.                                    */
     fn(arg, context);
-    /* Strongly discourage the compiler from treating the above        */
-    /* as a tail-call, since that would pop the register       */
-    /* contents before we get a chance to look at them.                */
+    /* Strongly discourage the compiler from treating the above */
+    /* as a tail-call, since that would pop the register        */
+    /* contents before we get a chance to look at them.         */
     GC_noop1((word)(&dummy));
 }
 
 #if defined(ASM_CLEAR_CODE)
 # ifdef LINT
     /*ARGSUSED*/
-    ptr_t GC_clear_stack_inner(arg, limit)
-    ptr_t arg; word limit;
-    { return(arg); }
+    ptr_t GC_clear_stack_inner(ptr_t arg, word limit)
+    {
+      return(arg);
+    }
     /* The real version is in a .S file */
 # endif
-#endif /* ASM_CLEAR_CODE */ 
+#endif /* ASM_CLEAR_CODE */
index 62fc64cfa38f66d5a385c0a4cdd1c1af0551716d..f6a3f3fdedd911ca9cc1035771d8118bd5c5559f 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1999-2004 Hewlett-Packard Development Company, L.P.
  * provided the above notices are retained, and a notice that the code was
  * modified is included with the above copyright notice.
  */
+
+#include "private/gc_priv.h"
+
 #include <stdio.h>
 #include <string.h>
-#include <errno.h>
-#include "private/gc_priv.h"
+#ifndef MSWINCE
+# include <errno.h>
+#endif
 
-extern void * GC_clear_stack(void *);  /* in misc.c, behaves like identity */
-void GC_extend_size_map(size_t);       /* in misc.c. */
+GC_INNER void GC_extend_size_map(size_t); /* in misc.c */
 
-/* Allocate reclaim list for kind:     */
-/* Return TRUE on success              */
+/* Allocate reclaim list for kind:      */
+/* Return TRUE on success               */
 STATIC GC_bool GC_alloc_reclaim_list(struct obj_kind *kind)
 {
     struct hblk ** result = (struct hblk **)
-               GC_scratch_alloc((MAXOBJGRANULES+1) * sizeof(struct hblk *));
+                GC_scratch_alloc((MAXOBJGRANULES+1) * sizeof(struct hblk *));
     if (result == 0) return(FALSE);
     BZERO(result, (MAXOBJGRANULES+1)*sizeof(struct hblk *));
     kind -> ok_reclaim_list = result;
     return(TRUE);
 }
 
-/* Allocate a large block of size lb bytes.    */
-/* The block is not cleared.                   */
-/* Flags is 0 or IGNORE_OFF_PAGE.              */
-/* We hold the allocation lock.                        */
-/* EXTRA_BYTES were already added to lb.       */
-ptr_t GC_alloc_large(size_t lb, int k, unsigned flags)
+GC_INNER GC_bool GC_collect_or_expand(word needed_blocks,
+                                      GC_bool ignore_off_page,
+                                      GC_bool retry); /* from alloc.c */
+
+/* Allocate a large block of size lb bytes.     */
+/* The block is not cleared.                    */
+/* Flags is 0 or IGNORE_OFF_PAGE.               */
+/* We hold the allocation lock.                 */
+/* EXTRA_BYTES were already added to lb.        */
+GC_INNER ptr_t GC_alloc_large(size_t lb, int k, unsigned flags)
 {
     struct hblk * h;
     word n_blocks;
     ptr_t result;
-       
+    GC_bool retry = FALSE;
+
     /* Round up to a multiple of a granule. */
       lb = (lb + GRANULE_BYTES - 1) & ~(GRANULE_BYTES - 1);
     n_blocks = OBJ_SZ_TO_BLOCKS(lb);
-    if (!GC_is_initialized) GC_init_inner();
+    if (!GC_is_initialized) GC_init();
     /* Do our share of marking work */
-        if(GC_incremental && !GC_dont_gc)
-           GC_collect_a_little_inner((int)n_blocks);
+        if (GC_incremental && !GC_dont_gc)
+            GC_collect_a_little_inner((int)n_blocks);
     h = GC_allochblk(lb, k, flags);
 #   ifdef USE_MUNMAP
-       if (0 == h) {
-           GC_merge_unmapped();
-           h = GC_allochblk(lb, k, flags);
-       }
+        if (0 == h) {
+            GC_merge_unmapped();
+            h = GC_allochblk(lb, k, flags);
+        }
 #   endif
-    while (0 == h && GC_collect_or_expand(n_blocks, (flags != 0))) {
-       h = GC_allochblk(lb, k, flags);
+    while (0 == h && GC_collect_or_expand(n_blocks, flags != 0, retry)) {
+        h = GC_allochblk(lb, k, flags);
+        retry = TRUE;
     }
     if (h == 0) {
-       result = 0;
+        result = 0;
     } else {
-       size_t total_bytes = n_blocks * HBLKSIZE;
-       if (n_blocks > 1) {
-           GC_large_allocd_bytes += total_bytes;
-           if (GC_large_allocd_bytes > GC_max_large_allocd_bytes)
-               GC_max_large_allocd_bytes = GC_large_allocd_bytes;
-       }
-       result = h -> hb_body;
+        size_t total_bytes = n_blocks * HBLKSIZE;
+        if (n_blocks > 1) {
+            GC_large_allocd_bytes += total_bytes;
+            if (GC_large_allocd_bytes > GC_max_large_allocd_bytes)
+                GC_max_large_allocd_bytes = GC_large_allocd_bytes;
+        }
+        result = h -> hb_body;
     }
     return result;
 }
 
-
-/* Allocate a large block of size lb bytes.  Clear if appropriate.     */
-/* We hold the allocation lock.                                                */
-/* EXTRA_BYTES were already added to lb.                               */
-ptr_t GC_alloc_large_and_clear(size_t lb, int k, unsigned flags)
+/* Allocate a large block of size lb bytes.  Clear if appropriate.      */
+/* We hold the allocation lock.                                         */
+/* EXTRA_BYTES were already added to lb.                                */
+STATIC ptr_t GC_alloc_large_and_clear(size_t lb, int k, unsigned flags)
 {
     ptr_t result = GC_alloc_large(lb, k, flags);
     word n_blocks = OBJ_SZ_TO_BLOCKS(lb);
 
     if (0 == result) return 0;
     if (GC_debugging_started || GC_obj_kinds[k].ok_init) {
-       /* Clear the whole block, in case of GC_realloc call. */
-       BZERO(result, n_blocks * HBLKSIZE);
+        /* Clear the whole block, in case of GC_realloc call. */
+        BZERO(result, n_blocks * HBLKSIZE);
     }
     return result;
 }
 
-/* allocate lb bytes for an object of kind k.  */
-/* Should not be used to directly to allocate  */
-/* objects such as STUBBORN objects that       */
-/* require special handling on allocation.     */
-/* First a version that assumes we already     */
-/* hold lock:                                  */
-void * GC_generic_malloc_inner(size_t lb, int k)
+/* allocate lb bytes for an object of kind k.   */
+/* Should not be used to directly to allocate   */
+/* objects such as STUBBORN objects that        */
+/* require special handling on allocation.      */
+/* First a version that assumes we already      */
+/* hold lock:                                   */
+GC_INNER void * GC_generic_malloc_inner(size_t lb, int k)
 {
     void *op;
 
     if(SMALL_OBJ(lb)) {
         struct obj_kind * kind = GC_obj_kinds + k;
-       size_t lg = GC_size_map[lb];
-       void ** opp = &(kind -> ok_freelist[lg]);
+        size_t lg = GC_size_map[lb];
+        void ** opp = &(kind -> ok_freelist[lg]);
 
         if( (op = *opp) == 0 ) {
-           if (GC_size_map[lb] == 0) {
-             if (!GC_is_initialized)  GC_init_inner();
-             if (GC_size_map[lb] == 0) GC_extend_size_map(lb);
-             return(GC_generic_malloc_inner(lb, k));
-           }
-           if (kind -> ok_reclaim_list == 0) {
-               if (!GC_alloc_reclaim_list(kind)) goto out;
-           }
-           op = GC_allocobj(lg, k);
-           if (op == 0) goto out;
+            if (GC_size_map[lb] == 0) {
+              if (!GC_is_initialized) GC_init();
+              if (GC_size_map[lb] == 0) GC_extend_size_map(lb);
+              return(GC_generic_malloc_inner(lb, k));
+            }
+            if (kind -> ok_reclaim_list == 0) {
+                if (!GC_alloc_reclaim_list(kind)) goto out;
+            }
+            op = GC_allocobj(lg, k);
+            if (op == 0) goto out;
         }
         *opp = obj_link(op);
         obj_link(op) = 0;
         GC_bytes_allocd += GRANULES_TO_BYTES(lg);
     } else {
-       op = (ptr_t)GC_alloc_large_and_clear(ADD_SLOP(lb), k, 0);
+        op = (ptr_t)GC_alloc_large_and_clear(ADD_SLOP(lb), k, 0);
         GC_bytes_allocd += lb;
     }
-    
+
 out:
     return op;
 }
@@ -134,7 +141,7 @@ out:
 /* Allocate a composite object of size n bytes.  The caller guarantees  */
 /* that pointers past the first page are not relevant.  Caller holds    */
 /* allocation lock.                                                     */
-void * GC_generic_malloc_inner_ignore_off_page(size_t lb, int k)
+GC_INNER void * GC_generic_malloc_inner_ignore_off_page(size_t lb, int k)
 {
     word lb_adjusted;
     void * op;
@@ -147,7 +154,7 @@ void * GC_generic_malloc_inner_ignore_off_page(size_t lb, int k)
     return op;
 }
 
-void * GC_generic_malloc(size_t lb, int k)
+GC_API void * GC_CALL GC_generic_malloc(size_t lb, int k)
 {
     void * result;
     DCL_LOCK_STATE;
@@ -155,56 +162,50 @@ void * GC_generic_malloc(size_t lb, int k)
     if (GC_have_errors) GC_print_all_errors();
     GC_INVOKE_FINALIZERS();
     if (SMALL_OBJ(lb)) {
-       LOCK();
+        LOCK();
         result = GC_generic_malloc_inner((word)lb, k);
-       UNLOCK();
+        UNLOCK();
     } else {
-       size_t lg;
-       size_t lb_rounded;
-       word n_blocks;
-       GC_bool init;
-       lg = ROUNDED_UP_GRANULES(lb);
-       lb_rounded = GRANULES_TO_BYTES(lg);
-       n_blocks = OBJ_SZ_TO_BLOCKS(lb_rounded);
-       init = GC_obj_kinds[k].ok_init;
-       LOCK();
-       result = (ptr_t)GC_alloc_large(lb_rounded, k, 0);
-       if (0 != result) {
-         if (GC_debugging_started) {
-           BZERO(result, n_blocks * HBLKSIZE);
-         } else {
+        size_t lg;
+        size_t lb_rounded;
+        word n_blocks;
+        GC_bool init;
+        lg = ROUNDED_UP_GRANULES(lb);
+        lb_rounded = GRANULES_TO_BYTES(lg);
+        n_blocks = OBJ_SZ_TO_BLOCKS(lb_rounded);
+        init = GC_obj_kinds[k].ok_init;
+        LOCK();
+        result = (ptr_t)GC_alloc_large(lb_rounded, k, 0);
+        if (0 != result) {
+          if (GC_debugging_started) {
+            BZERO(result, n_blocks * HBLKSIZE);
+          } else {
 #           ifdef THREADS
-             /* Clear any memory that might be used for GC descriptors */
-             /* before we release the lock.                          */
-               ((word *)result)[0] = 0;
-               ((word *)result)[1] = 0;
-               ((word *)result)[GRANULES_TO_WORDS(lg)-1] = 0;
-               ((word *)result)[GRANULES_TO_WORDS(lg)-2] = 0;
-#          endif
-         }
-       }
-       GC_bytes_allocd += lb_rounded;
-       UNLOCK();
-       if (init && !GC_debugging_started && 0 != result) {
-           BZERO(result, n_blocks * HBLKSIZE);
+              /* Clear any memory that might be used for GC descriptors */
+              /* before we release the lock.                          */
+                ((word *)result)[0] = 0;
+                ((word *)result)[1] = 0;
+                ((word *)result)[GRANULES_TO_WORDS(lg)-1] = 0;
+                ((word *)result)[GRANULES_TO_WORDS(lg)-2] = 0;
+#           endif
+          }
+        }
+        GC_bytes_allocd += lb_rounded;
+        UNLOCK();
+        if (init && !GC_debugging_started && 0 != result) {
+            BZERO(result, n_blocks * HBLKSIZE);
         }
     }
     if (0 == result) {
-        return((*GC_oom_fn)(lb));
+        return((*GC_get_oom_fn())(lb));
     } else {
         return(result);
     }
-}   
-
-
-#define GENERAL_MALLOC(lb,k) \
-    GC_clear_stack(GC_generic_malloc(lb, k))
-/* We make the GC_clear_stack_call a tail call, hoping to get more of  */
-/* the stack.                                                          */
+}
 
 /* Allocate lb bytes of atomic (pointerfree) data */
 #ifdef THREAD_LOCAL_ALLOC
-  void * GC_core_malloc_atomic(size_t lb)
+  GC_INNER void * GC_core_malloc_atomic(size_t lb)
 #else
   GC_API void * GC_CALL GC_malloc_atomic(size_t lb)
 #endif
@@ -215,9 +216,9 @@ void * GC_generic_malloc(size_t lb, int k)
     DCL_LOCK_STATE;
 
     if(SMALL_OBJ(lb)) {
-       lg = GC_size_map[lb];
-       opp = &(GC_aobjfreelist[lg]);
-       LOCK();
+        lg = GC_size_map[lb];
+        opp = &(GC_aobjfreelist[lg]);
+        LOCK();
         if( EXPECT((op = *opp) == 0, 0) ) {
             UNLOCK();
             return(GENERAL_MALLOC((word)lb, PTRFREE));
@@ -236,19 +237,27 @@ void * GC_generic_malloc(size_t lb, int k)
 GC_API char * GC_CALL GC_strdup(const char *s)
 {
   char *copy;
-
+  size_t lb;
   if (s == NULL) return NULL;
-  if ((copy = GC_malloc_atomic(strlen(s) + 1)) == NULL) {
-    errno = ENOMEM;
+  lb = strlen(s) + 1;
+  if ((copy = GC_malloc_atomic(lb)) == NULL) {
+#   ifndef MSWINCE
+      errno = ENOMEM;
+#   endif
     return NULL;
   }
-  strcpy(copy, s);
+# ifndef MSWINCE
+    strcpy(copy, s);
+# else
+    /* strcpy() is deprecated in WinCE */
+    memcpy(copy, s, lb);
+# endif
   return copy;
 }
 
 /* Allocate lb bytes of composite (pointerful) data */
 #ifdef THREAD_LOCAL_ALLOC
-  void * GC_core_malloc(size_t lb)
+  GC_INNER void * GC_core_malloc(size_t lb)
 #else
   GC_API void * GC_CALL GC_malloc(size_t lb)
 #endif
@@ -259,19 +268,18 @@ GC_API char * GC_CALL GC_strdup(const char *s)
     DCL_LOCK_STATE;
 
     if(SMALL_OBJ(lb)) {
-       lg = GC_size_map[lb];
-       opp = (void **)&(GC_objfreelist[lg]);
-       LOCK();
+        lg = GC_size_map[lb];
+        opp = (void **)&(GC_objfreelist[lg]);
+        LOCK();
         if( EXPECT((op = *opp) == 0, 0) ) {
             UNLOCK();
             return(GENERAL_MALLOC((word)lb, NORMAL));
         }
-        /* See above comment on signals.       */
-       GC_ASSERT(0 == obj_link(op)
-                 || ((word)obj_link(op)
-                       <= (word)GC_greatest_plausible_heap_addr
-                    && (word)obj_link(op)
-                       >= (word)GC_least_plausible_heap_addr));
+        GC_ASSERT(0 == obj_link(op)
+                  || ((word)obj_link(op)
+                        <= (word)GC_greatest_plausible_heap_addr
+                     && (word)obj_link(op)
+                        >= (word)GC_least_plausible_heap_addr));
         *opp = obj_link(op);
         obj_link(op) = 0;
         GC_bytes_allocd += GRANULES_TO_BYTES(lg);
@@ -284,23 +292,23 @@ GC_API char * GC_CALL GC_strdup(const char *s)
 
 # ifdef REDIRECT_MALLOC
 
-/* Avoid unnecessary nested procedure calls here, by #defining some    */
-/* malloc replacements.  Otherwise we end up saving a                  */
-/* meaningless return address in the object.  It also speeds things up,        */
-/* but it is admittedly quite ugly.                                    */
+/* Avoid unnecessary nested procedure calls here, by #defining some     */
+/* malloc replacements.  Otherwise we end up saving a                   */
+/* meaningless return address in the object.  It also speeds things up, */
+/* but it is admittedly quite ugly.                                     */
 # ifdef GC_ADD_CALLER
 #   define RA GC_RETURN_ADDR,
 # else
 #   define RA
 # endif
 # define GC_debug_malloc_replacement(lb) \
-       GC_debug_malloc(lb, RA "unknown", 0)
+                        GC_debug_malloc(lb, RA "unknown", 0)
 
 void * malloc(size_t lb)
-  {
-    /* It might help to manually inline the GC_malloc call here.       */
-    /* But any decent compiler should reduce the extra procedure call  */
-    /* to at most a jump instruction in this case.                     */
+{
+    /* It might help to manually inline the GC_malloc call here.        */
+    /* But any decent compiler should reduce the extra procedure call   */
+    /* to at most a jump instruction in this case.                      */
 #   if defined(I386) && defined(GC_SOLARIS_THREADS)
       /*
        * Thread initialisation can call malloc before
@@ -312,29 +320,29 @@ void * malloc(size_t lb)
       if (!GC_is_initialized) return sbrk(lb);
 #   endif /* I386 && GC_SOLARIS_THREADS */
     return((void *)REDIRECT_MALLOC(lb));
-  }
+}
 
 #if defined(GC_LINUX_THREADS) /* && !defined(USE_PROC_FOR_LIBRARIES) */
-  static ptr_t GC_libpthread_start = 0;
-  static ptr_t GC_libpthread_end = 0;
-  static ptr_t GC_libld_start = 0;
-  static ptr_t GC_libld_end = 0;
-  extern GC_bool GC_text_mapping(char *nm, ptr_t *startp, ptr_t *endp);
-       /* From os_dep.c */
+  STATIC ptr_t GC_libpthread_start = 0;
+  STATIC ptr_t GC_libpthread_end = 0;
+  STATIC ptr_t GC_libld_start = 0;
+  STATIC ptr_t GC_libld_end = 0;
+  GC_INNER GC_bool GC_text_mapping(char *nm, ptr_t *startp, ptr_t *endp);
+                                                /* From os_dep.c */
 
   STATIC void GC_init_lib_bounds(void)
   {
     if (GC_libpthread_start != 0) return;
     if (!GC_text_mapping("libpthread-",
-                        &GC_libpthread_start, &GC_libpthread_end)) {
-       WARN("Failed to find libpthread.so text mapping: Expect crash\n", 0);
-        /* This might still work with some versions of libpthread,     */
-       /* so we don't abort.  Perhaps we should.                       */
-        /* Generate message only once:                                 */
+                         &GC_libpthread_start, &GC_libpthread_end)) {
+        WARN("Failed to find libpthread.so text mapping: Expect crash\n", 0);
+        /* This might still work with some versions of libpthread,      */
+        /* so we don't abort.  Perhaps we should.                       */
+        /* Generate message only once:                                  */
           GC_libpthread_start = (ptr_t)1;
     }
     if (!GC_text_mapping("ld-", &GC_libld_start, &GC_libld_end)) {
-       WARN("Failed to find ld.so text mapping: Expect crash\n", 0);
+        WARN("Failed to find ld.so text mapping: Expect crash\n", 0);
     }
   }
 #endif
@@ -342,23 +350,23 @@ void * malloc(size_t lb)
 void * calloc(size_t n, size_t lb)
 {
 #   if defined(GC_LINUX_THREADS) /* && !defined(USE_PROC_FOR_LIBRARIES) */
-       /* libpthread allocated some memory that is only pointed to by  */
-       /* mmapped thread stacks.  Make sure it's not collectable.      */
-       {
-         static GC_bool lib_bounds_set = FALSE;
-         ptr_t caller = (ptr_t)__builtin_return_address(0);
-         /* This test does not need to ensure memory visibility, since */
-         /* the bounds will be set when/if we create another thread.   */
-         if (!lib_bounds_set) {
-           GC_init_lib_bounds();
-           lib_bounds_set = TRUE;
-         }
-         if (caller >= GC_libpthread_start && caller < GC_libpthread_end
-             || (caller >= GC_libld_start && caller < GC_libld_end))
-           return GC_malloc_uncollectable(n*lb);
-         /* The two ranges are actually usually adjacent, so there may */
-         /* be a way to speed this up.                                 */
-       }
+        /* libpthread allocated some memory that is only pointed to by  */
+        /* mmapped thread stacks.  Make sure it's not collectable.      */
+        {
+          static GC_bool lib_bounds_set = FALSE;
+          ptr_t caller = (ptr_t)__builtin_return_address(0);
+          /* This test does not need to ensure memory visibility, since */
+          /* the bounds will be set when/if we create another thread.   */
+          if (!lib_bounds_set) {
+            GC_init_lib_bounds();
+            lib_bounds_set = TRUE;
+          }
+          if (caller >= GC_libpthread_start && caller < GC_libpthread_end
+              || (caller >= GC_libld_start && caller < GC_libld_end))
+            return GC_malloc_uncollectable(n*lb);
+          /* The two ranges are actually usually adjacent, so there may */
+          /* be a way to speed this up.                                 */
+        }
 #   endif
     return((void *)REDIRECT_MALLOC(n*lb));
 }
@@ -378,40 +386,40 @@ void * calloc(size_t n, size_t lb)
   }
 #endif /* !defined(strdup) */
  /* If strdup is macro defined, we assume that it actually calls malloc, */
- /* and thus the right thing will happen even without overriding it.    */
- /* This seems to be true on most Linux systems.                        */
+ /* and thus the right thing will happen even without overriding it.     */
+ /* This seems to be true on most Linux systems.                         */
 
 #undef GC_debug_malloc_replacement
 
 # endif /* REDIRECT_MALLOC */
 
-/* Explicitly deallocate an object p.                          */
+/* Explicitly deallocate an object p.                           */
 GC_API void GC_CALL GC_free(void * p)
 {
     struct hblk *h;
     hdr *hhdr;
     size_t sz; /* In bytes */
-    size_t ngranules;  /* sz in granules */
+    size_t ngranules;   /* sz in granules */
     void **flh;
     int knd;
     struct obj_kind * ok;
     DCL_LOCK_STATE;
 
     if (p == 0) return;
-       /* Required by ANSI.  It's not my fault ...     */
+        /* Required by ANSI.  It's not my fault ...     */
 #   ifdef LOG_ALLOCS
       GC_err_printf("GC_free(%p): %lu\n", p, (unsigned long)GC_gc_no);
 #   endif
     h = HBLKPTR(p);
     hhdr = HDR(h);
 #   if defined(REDIRECT_MALLOC) && \
-       (defined(GC_SOLARIS_THREADS) || defined(GC_LINUX_THREADS) \
-        || defined(MSWIN32))
-       /* For Solaris, we have to redirect malloc calls during         */
-       /* initialization.  For the others, this seems to happen        */
-       /* implicitly.                                                  */
-       /* Don't try to deallocate that memory.                         */
-       if (0 == hhdr) return;
+        (defined(GC_SOLARIS_THREADS) || defined(GC_LINUX_THREADS) \
+         || defined(MSWIN32))
+        /* For Solaris, we have to redirect malloc calls during         */
+        /* initialization.  For the others, this seems to happen        */
+        /* implicitly.                                                  */
+        /* Don't try to deallocate that memory.                         */
+        if (0 == hhdr) return;
 #   endif
     GC_ASSERT(GC_base(p) == p);
     sz = hhdr -> hb_sz;
@@ -419,38 +427,38 @@ GC_API void GC_CALL GC_free(void * p)
     knd = hhdr -> hb_obj_kind;
     ok = &GC_obj_kinds[knd];
     if (EXPECT((ngranules <= MAXOBJGRANULES), 1)) {
-       LOCK();
-       GC_bytes_freed += sz;
-       if (IS_UNCOLLECTABLE(knd)) GC_non_gc_bytes -= sz;
-               /* Its unnecessary to clear the mark bit.  If the       */
-               /* object is reallocated, it doesn't matter.  O.w. the  */
-               /* collector will do it, since it's on a free list.     */
-       if (ok -> ok_init) {
-           BZERO((word *)p + 1, sz-sizeof(word));
-       }
-       flh = &(ok -> ok_freelist[ngranules]);
-       obj_link(p) = *flh;
-       *flh = (ptr_t)p;
-       UNLOCK();
+        LOCK();
+        GC_bytes_freed += sz;
+        if (IS_UNCOLLECTABLE(knd)) GC_non_gc_bytes -= sz;
+                /* Its unnecessary to clear the mark bit.  If the       */
+                /* object is reallocated, it doesn't matter.  O.w. the  */
+                /* collector will do it, since it's on a free list.     */
+        if (ok -> ok_init) {
+            BZERO((word *)p + 1, sz-sizeof(word));
+        }
+        flh = &(ok -> ok_freelist[ngranules]);
+        obj_link(p) = *flh;
+        *flh = (ptr_t)p;
+        UNLOCK();
     } else {
         size_t nblocks = OBJ_SZ_TO_BLOCKS(sz);
         LOCK();
         GC_bytes_freed += sz;
-       if (IS_UNCOLLECTABLE(knd)) GC_non_gc_bytes -= sz;
-       if (nblocks > 1) {
-         GC_large_allocd_bytes -= nblocks * HBLKSIZE;
-       }  
+        if (IS_UNCOLLECTABLE(knd)) GC_non_gc_bytes -= sz;
+        if (nblocks > 1) {
+          GC_large_allocd_bytes -= nblocks * HBLKSIZE;
+        }
         GC_freehblk(h);
         UNLOCK();
     }
 }
 
-/* Explicitly deallocate an object p when we already hold lock.                */
-/* Only used for internally allocated objects, so we can take some     */
-/* shortcuts.                                                          */
+/* Explicitly deallocate an object p when we already hold lock.         */
+/* Only used for internally allocated objects, so we can take some      */
+/* shortcuts.                                                           */
 #ifdef THREADS
-void GC_free_inner(void * p)
-{
+  GC_INNER void GC_free_inner(void * p)
+  {
     struct hblk *h;
     hdr *hhdr;
     size_t sz; /* bytes */
@@ -467,49 +475,50 @@ void GC_free_inner(void * p)
     ngranules = BYTES_TO_GRANULES(sz);
     ok = &GC_obj_kinds[knd];
     if (ngranules <= MAXOBJGRANULES) {
-       GC_bytes_freed += sz;
-       if (IS_UNCOLLECTABLE(knd)) GC_non_gc_bytes -= sz;
-       if (ok -> ok_init) {
-           BZERO((word *)p + 1, sz-sizeof(word));
-       }
-       flh = &(ok -> ok_freelist[ngranules]);
-       obj_link(p) = *flh;
-       *flh = (ptr_t)p;
+        GC_bytes_freed += sz;
+        if (IS_UNCOLLECTABLE(knd)) GC_non_gc_bytes -= sz;
+        if (ok -> ok_init) {
+            BZERO((word *)p + 1, sz-sizeof(word));
+        }
+        flh = &(ok -> ok_freelist[ngranules]);
+        obj_link(p) = *flh;
+        *flh = (ptr_t)p;
     } else {
         size_t nblocks = OBJ_SZ_TO_BLOCKS(sz);
         GC_bytes_freed += sz;
-       if (IS_UNCOLLECTABLE(knd)) GC_non_gc_bytes -= sz;
-       if (nblocks > 1) {
-         GC_large_allocd_bytes -= nblocks * HBLKSIZE;
-       }
+        if (IS_UNCOLLECTABLE(knd)) GC_non_gc_bytes -= sz;
+        if (nblocks > 1) {
+          GC_large_allocd_bytes -= nblocks * HBLKSIZE;
+        }
         GC_freehblk(h);
     }
-}
+  }
 #endif /* THREADS */
 
-# if defined(REDIRECT_MALLOC) && !defined(REDIRECT_FREE)
-#   define REDIRECT_FREE GC_free
-# endif
-# ifdef REDIRECT_FREE
+#if defined(REDIRECT_MALLOC) && !defined(REDIRECT_FREE)
+# define REDIRECT_FREE GC_free
+#endif
+
+#ifdef REDIRECT_FREE
   void free(void * p)
   {
 #   if defined(GC_LINUX_THREADS) && !defined(USE_PROC_FOR_LIBRARIES)
-       {
-         /* Don't bother with initialization checks.  If nothing       */
-         /* has been initialized, the check fails, and that's safe,    */
-         /* since we haven't allocated uncollectable objects either.   */
-         ptr_t caller = (ptr_t)__builtin_return_address(0);
-         /* This test does not need to ensure memory visibility, since */
-         /* the bounds will be set when/if we create another thread.   */
-         if (caller >= GC_libpthread_start && caller < GC_libpthread_end
-             || (caller >= GC_libld_start && caller < GC_libld_end)) {
-           GC_free(p);
-           return;
-         }
-       }
+        {
+          /* Don't bother with initialization checks.  If nothing       */
+          /* has been initialized, the check fails, and that's safe,    */
+          /* since we haven't allocated uncollectable objects either.   */
+          ptr_t caller = (ptr_t)__builtin_return_address(0);
+          /* This test does not need to ensure memory visibility, since */
+          /* the bounds will be set when/if we create another thread.   */
+          if (caller >= GC_libpthread_start && caller < GC_libpthread_end
+              || (caller >= GC_libld_start && caller < GC_libld_end)) {
+            GC_free(p);
+            return;
+          }
+        }
 #   endif
 #   ifndef IGNORE_FREE
       REDIRECT_FREE(p);
 #   endif
   }
-# endif  /* REDIRECT_MALLOC */
+#endif /* REDIRECT_FREE */
index a86601d9dbd115826fc71803bad26bce6c2a9bdf..99a0336e94cd6a03b45c48497db1fa5cda2323b8 100644 (file)
@@ -14,6 +14,8 @@
  * modified is included with the above copyright notice.
  */
 
+#include "private/gc_priv.h"
+
 /*
  * These are extra allocation routines which are likely to be less
  * frequently used than those in malloc.c.  They are separate in the
  */
 
 #include <stdio.h>
-#include "private/gc_priv.h"
-
-void * GC_clear_stack(void *); /* in misc.c, behaves like identity */
 
 /* Some externally visible but unadvertised variables to allow access to */
-/* free lists from inlined allocators without including gc_priv.h       */
-/* or introducing dependencies on internal data structure layouts.      */
+/* free lists from inlined allocators without including gc_priv.h        */
+/* or introducing dependencies on internal data structure layouts.       */
 void ** const GC_objfreelist_ptr = GC_objfreelist;
 void ** const GC_aobjfreelist_ptr = GC_aobjfreelist;
 void ** const GC_uobjfreelist_ptr = GC_uobjfreelist;
@@ -41,38 +40,37 @@ STATIC void * GC_generic_or_special_malloc(size_t lb, int knd)
 {
     switch(knd) {
 #     ifdef STUBBORN_ALLOC
-       case STUBBORN:
-           return(GC_malloc_stubborn((size_t)lb));
+        case STUBBORN:
+            return(GC_malloc_stubborn((size_t)lb));
 #     endif
-       case PTRFREE:
-           return(GC_malloc_atomic((size_t)lb));
-       case NORMAL:
-           return(GC_malloc((size_t)lb));
-       case UNCOLLECTABLE:
-           return(GC_malloc_uncollectable((size_t)lb));
+        case PTRFREE:
+            return(GC_malloc_atomic((size_t)lb));
+        case NORMAL:
+            return(GC_malloc((size_t)lb));
+        case UNCOLLECTABLE:
+            return(GC_malloc_uncollectable((size_t)lb));
 #       ifdef ATOMIC_UNCOLLECTABLE
-         case AUNCOLLECTABLE:
-           return(GC_malloc_atomic_uncollectable((size_t)lb));
-#      endif /* ATOMIC_UNCOLLECTABLE */
-       default:
-           return(GC_generic_malloc(lb,knd));
+          case AUNCOLLECTABLE:
+            return(GC_malloc_atomic_uncollectable((size_t)lb));
+#       endif /* ATOMIC_UNCOLLECTABLE */
+        default:
+            return(GC_generic_malloc(lb,knd));
     }
 }
 
-
 /* Change the size of the block pointed to by p to contain at least   */
 /* lb bytes.  The object may be (and quite likely will be) moved.     */
-/* The kind (e.g. atomic) is the same as that of the old.            */
+/* The kind (e.g. atomic) is the same as that of the old.             */
 /* Shrinking of large blocks is not implemented well.                 */
 GC_API void * GC_CALL GC_realloc(void * p, size_t lb)
 {
     struct hblk * h;
     hdr * hhdr;
-    size_t sz;  /* Current size in bytes       */
-    size_t orig_sz;     /* Original sz in bytes        */
+    size_t sz;   /* Current size in bytes       */
+    size_t orig_sz;      /* Original sz in bytes        */
     int obj_kind;
 
-    if (p == 0) return(GC_malloc(lb)); /* Required by ANSI */
+    if (p == 0) return(GC_malloc(lb));  /* Required by ANSI */
     h = HBLKPTR(p);
     hhdr = HDR(h);
     sz = hhdr -> hb_sz;
@@ -80,60 +78,60 @@ GC_API void * GC_CALL GC_realloc(void * p, size_t lb)
     orig_sz = sz;
 
     if (sz > MAXOBJBYTES) {
-       /* Round it up to the next whole heap block */
-         register word descr;
-         
-         sz = (sz+HBLKSIZE-1) & (~HBLKMASK);
-         hhdr -> hb_sz = sz;
-         descr = GC_obj_kinds[obj_kind].ok_descriptor;
+        /* Round it up to the next whole heap block */
+          word descr;
+
+          sz = (sz+HBLKSIZE-1) & (~HBLKMASK);
+          hhdr -> hb_sz = sz;
+          descr = GC_obj_kinds[obj_kind].ok_descriptor;
           if (GC_obj_kinds[obj_kind].ok_relocate_descr) descr += sz;
           hhdr -> hb_descr = descr;
-#        ifdef MARK_BIT_PER_OBJ
-           GC_ASSERT(hhdr -> hb_inv_sz == LARGE_INV_SZ);
-#        else
-           GC_ASSERT(hhdr -> hb_large_block &&
-                     hhdr -> hb_map[ANY_INDEX] == 1);
-#        endif
-         if (IS_UNCOLLECTABLE(obj_kind)) GC_non_gc_bytes += (sz - orig_sz);
-         /* Extra area is already cleared by GC_alloc_large_and_clear. */
+#         ifdef MARK_BIT_PER_OBJ
+            GC_ASSERT(hhdr -> hb_inv_sz == LARGE_INV_SZ);
+#         else
+            GC_ASSERT(hhdr -> hb_large_block &&
+                      hhdr -> hb_map[ANY_INDEX] == 1);
+#         endif
+          if (IS_UNCOLLECTABLE(obj_kind)) GC_non_gc_bytes += (sz - orig_sz);
+          /* Extra area is already cleared by GC_alloc_large_and_clear. */
     }
     if (ADD_SLOP(lb) <= sz) {
-       if (lb >= (sz >> 1)) {
-#          ifdef STUBBORN_ALLOC
-               if (obj_kind == STUBBORN) GC_change_stubborn(p);
-#          endif
-           if (orig_sz > lb) {
-             /* Clear unneeded part of object to avoid bogus pointer */
-             /* tracing.                                             */
-             /* Safe for stubborn objects.                           */
-               BZERO(((ptr_t)p) + lb, orig_sz - lb);
-           }
-           return(p);
-       } else {
-           /* shrink */
-             void * result =
-                       GC_generic_or_special_malloc((word)lb, obj_kind);
-
-             if (result == 0) return(0);
-                 /* Could also return original object.  But this       */
-                 /* gives the client warning of imminent disaster.     */
-             BCOPY(p, result, lb);
-#            ifndef IGNORE_FREE
-               GC_free(p);
-#            endif
-             return(result);
-       }
+        if (lb >= (sz >> 1)) {
+#           ifdef STUBBORN_ALLOC
+                if (obj_kind == STUBBORN) GC_change_stubborn(p);
+#           endif
+            if (orig_sz > lb) {
+              /* Clear unneeded part of object to avoid bogus pointer */
+              /* tracing.                                             */
+              /* Safe for stubborn objects.                           */
+                BZERO(((ptr_t)p) + lb, orig_sz - lb);
+            }
+            return(p);
+        } else {
+            /* shrink */
+              void * result =
+                        GC_generic_or_special_malloc((word)lb, obj_kind);
+
+              if (result == 0) return(0);
+                  /* Could also return original object.  But this       */
+                  /* gives the client warning of imminent disaster.     */
+              BCOPY(p, result, lb);
+#             ifndef IGNORE_FREE
+                GC_free(p);
+#             endif
+              return(result);
+        }
     } else {
-       /* grow */
-         void * result =
-               GC_generic_or_special_malloc((word)lb, obj_kind);
-
-         if (result == 0) return(0);
-         BCOPY(p, result, sz);
-#        ifndef IGNORE_FREE
-           GC_free(p);
-#        endif
-         return(result);
+        /* grow */
+          void * result =
+                GC_generic_or_special_malloc((word)lb, obj_kind);
+
+          if (result == 0) return(0);
+          BCOPY(p, result, sz);
+#         ifndef IGNORE_FREE
+            GC_free(p);
+#         endif
+          return(result);
     }
 }
 
@@ -143,14 +141,14 @@ GC_API void * GC_CALL GC_realloc(void * p, size_t lb)
 
 # ifdef REDIRECT_REALLOC
 
-/* As with malloc, avoid two levels of extra calls here.       */
+/* As with malloc, avoid two levels of extra calls here.        */
 # ifdef GC_ADD_CALLER
 #   define RA GC_RETURN_ADDR,
 # else
 #   define RA
 # endif
 # define GC_debug_realloc_replacement(p, lb) \
-       GC_debug_realloc(p, lb, RA "unknown", 0)
+        GC_debug_realloc(p, lb, RA "unknown", 0)
 
 void * realloc(void * p, size_t lb)
   {
@@ -163,8 +161,8 @@ void * realloc(void * p, size_t lb)
 
 /* Allocate memory such that only pointers to near the          */
 /* beginning of the object are considered.                      */
-/* We avoid holding allocation lock while we clear memory.     */
-void * GC_generic_malloc_ignore_off_page(size_t lb, int k)
+/* We avoid holding allocation lock while we clear memory.      */
+GC_INNER void * GC_generic_malloc_ignore_off_page(size_t lb, int k)
 {
     void *result;
     size_t lg;
@@ -172,7 +170,7 @@ void * GC_generic_malloc_ignore_off_page(size_t lb, int k)
     word n_blocks;
     GC_bool init;
     DCL_LOCK_STATE;
-    
+
     if (SMALL_OBJ(lb))
         return(GC_generic_malloc((word)lb, k));
     lg = ROUNDED_UP_GRANULES(lb);
@@ -185,25 +183,27 @@ void * GC_generic_malloc_ignore_off_page(size_t lb, int k)
     result = (ptr_t)GC_alloc_large(ADD_SLOP(lb), k, IGNORE_OFF_PAGE);
     if (0 != result) {
         if (GC_debugging_started) {
-           BZERO(result, n_blocks * HBLKSIZE);
+            BZERO(result, n_blocks * HBLKSIZE);
         } else {
 #           ifdef THREADS
-             /* Clear any memory that might be used for GC descriptors */
-             /* before we release the lock.                          */
-               ((word *)result)[0] = 0;
-               ((word *)result)[1] = 0;
-               ((word *)result)[GRANULES_TO_WORDS(lg)-1] = 0;
-               ((word *)result)[GRANULES_TO_WORDS(lg)-2] = 0;
-#          endif
+              /* Clear any memory that might be used for GC descriptors */
+              /* before we release the lock.                          */
+                ((word *)result)[0] = 0;
+                ((word *)result)[1] = 0;
+                ((word *)result)[GRANULES_TO_WORDS(lg)-1] = 0;
+                ((word *)result)[GRANULES_TO_WORDS(lg)-2] = 0;
+#           endif
         }
     }
     GC_bytes_allocd += lb_rounded;
-    UNLOCK();
     if (0 == result) {
-        return((*GC_oom_fn)(lb));
+        GC_oom_func oom_fn = GC_oom_fn;
+        UNLOCK();
+        return((*oom_fn)(lb));
     } else {
-       if (init && !GC_debugging_started) {
-           BZERO(result, n_blocks * HBLKSIZE);
+        UNLOCK();
+        if (init && !GC_debugging_started) {
+            BZERO(result, n_blocks * HBLKSIZE);
         }
         return(result);
     }
@@ -219,25 +219,23 @@ GC_API void * GC_CALL GC_malloc_atomic_ignore_off_page(size_t lb)
     return((void *)GC_generic_malloc_ignore_off_page(lb, PTRFREE));
 }
 
-/* Increment GC_bytes_allocd from code that doesn't have direct access         */
-/* to GC_arrays.                                                       */
-void GC_incr_bytes_allocd(size_t n)
+/* Increment GC_bytes_allocd from code that doesn't have direct access  */
+/* to GC_arrays.                                                        */
+GC_API void GC_CALL GC_incr_bytes_allocd(size_t n)
 {
     GC_bytes_allocd += n;
 }
 
-/* The same for GC_bytes_freed.                                */
-void GC_incr_bytes_freed(size_t n)
+/* The same for GC_bytes_freed.                         */
+GC_API void GC_CALL GC_incr_bytes_freed(size_t n)
 {
     GC_bytes_freed += n;
 }
 
 #if defined(THREADS)
 
-extern signed_word GC_bytes_found;   /* Protected by GC lock.  */
-
-#ifdef PARALLEL_MARK
-volatile signed_word GC_bytes_allocd_tmp = 0;
+# ifdef PARALLEL_MARK
+    STATIC volatile signed_word GC_bytes_allocd_tmp = 0;
                         /* Number of bytes of memory allocated since    */
                         /* we released the GC lock.  Instead of         */
                         /* reacquiring the GC lock just to add this in, */
@@ -245,40 +243,40 @@ volatile signed_word GC_bytes_allocd_tmp = 0;
                         /* the lock.  (Atomically adding it doesn't     */
                         /* work, since we would have to atomically      */
                         /* update it in GC_malloc, which is too         */
-                        /* expensive.)                                   */
-#endif /* PARALLEL_MARK */
+                        /* expensive.)                                  */
+# endif /* PARALLEL_MARK */
 
-/* Return a list of 1 or more objects of the indicated size, linked    */
-/* through the first word in the object.  This has the advantage that  */
-/* it acquires the allocation lock only once, and may greatly reduce   */
+/* Return a list of 1 or more objects of the indicated size, linked     */
+/* through the first word in the object.  This has the advantage that   */
+/* it acquires the allocation lock only once, and may greatly reduce    */
 /* time wasted contending for the allocation lock.  Typical usage would */
-/* be in a thread that requires many items of the same size.  It would */
-/* keep its own free list in thread-local storage, and call            */
-/* GC_malloc_many or friends to replenish it.  (We do not round up     */
-/* object sizes, since a call indicates the intention to consume many  */
-/* objects of exactly this size.)                                      */
-/* We assume that the size is a multiple of GRANULE_BYTES.             */
-/* We return the free-list by assigning it to *result, since it is     */
-/* not safe to return, e.g. a linked list of pointer-free objects,     */
-/* since the collector would not retain the entire list if it were     */
-/* invoked just as we were returning.                                  */
-/* Note that the client should usually clear the link field.           */
-void GC_generic_malloc_many(size_t lb, int k, void **result)
+/* be in a thread that requires many items of the same size.  It would  */
+/* keep its own free list in thread-local storage, and call             */
+/* GC_malloc_many or friends to replenish it.  (We do not round up      */
+/* object sizes, since a call indicates the intention to consume many   */
+/* objects of exactly this size.)                                       */
+/* We assume that the size is a multiple of GRANULE_BYTES.              */
+/* We return the free-list by assigning it to *result, since it is      */
+/* not safe to return, e.g. a linked list of pointer-free objects,      */
+/* since the collector would not retain the entire list if it were      */
+/* invoked just as we were returning.                                   */
+/* Note that the client should usually clear the link field.            */
+GC_API void GC_CALL GC_generic_malloc_many(size_t lb, int k, void **result)
 {
-void *op;
-void *p;
-void **opp;
-size_t lw;     /* Length in words.     */
-size_t lg;     /* Length in granules.  */
-signed_word my_bytes_allocd = 0;
-struct obj_kind * ok = &(GC_obj_kinds[k]);
-DCL_LOCK_STATE;
+    void *op;
+    void *p;
+    void **opp;
+    size_t lw;      /* Length in words.     */
+    size_t lg;      /* Length in granules.  */
+    signed_word my_bytes_allocd = 0;
+    struct obj_kind * ok = &(GC_obj_kinds[k]);
+    DCL_LOCK_STATE;
 
     GC_ASSERT(lb != 0 && (lb & (GRANULE_BYTES-1)) == 0);
     if (!SMALL_OBJ(lb)) {
         op = GC_generic_malloc(lb, k);
         if(0 != op) obj_link(op) = 0;
-       *result = op;
+        *result = op;
         return;
     }
     lw = BYTES_TO_WORDS(lb);
@@ -286,91 +284,91 @@ DCL_LOCK_STATE;
     if (GC_have_errors) GC_print_all_errors();
     GC_INVOKE_FINALIZERS();
     LOCK();
-    if (!GC_is_initialized) GC_init_inner();
+    if (!GC_is_initialized) GC_init();
     /* Do our share of marking work */
       if (GC_incremental && !GC_dont_gc) {
         ENTER_GC();
-       GC_collect_a_little_inner(1);
+        GC_collect_a_little_inner(1);
         EXIT_GC();
       }
     /* First see if we can reclaim a page of objects waiting to be */
-    /* reclaimed.                                                 */
+    /* reclaimed.                                                  */
     {
-       struct hblk ** rlh = ok -> ok_reclaim_list;
-       struct hblk * hbp;
-       hdr * hhdr;
+        struct hblk ** rlh = ok -> ok_reclaim_list;
+        struct hblk * hbp;
+        hdr * hhdr;
 
-       rlh += lg;
-       while ((hbp = *rlh) != 0) {
+        rlh += lg;
+        while ((hbp = *rlh) != 0) {
             hhdr = HDR(hbp);
             *rlh = hhdr -> hb_next;
-           GC_ASSERT(hhdr -> hb_sz == lb);
-           hhdr -> hb_last_reclaimed = (unsigned short) GC_gc_no;
-#          ifdef PARALLEL_MARK
-             if (GC_parallel) {
-                 signed_word my_bytes_allocd_tmp = GC_bytes_allocd_tmp;
-
-                 GC_ASSERT(my_bytes_allocd_tmp >= 0);
-                 /* We only decrement it while holding the GC lock.    */
-                 /* Thus we can't accidentally adjust it down in more  */
-                 /* than one thread simultaneously.                    */
-                 if (my_bytes_allocd_tmp != 0) {
-                   (void)AO_fetch_and_add(
-                               (volatile void *)(&GC_bytes_allocd_tmp),
-                               (AO_t)(-my_bytes_allocd_tmp));
-                   GC_bytes_allocd += my_bytes_allocd_tmp;
-                 }
-                 GC_acquire_mark_lock();
-                 ++ GC_fl_builder_count;
-                 UNLOCK();
-                 GC_release_mark_lock();
-             }
-#          endif
-           op = GC_reclaim_generic(hbp, hhdr, lb,
-                                   ok -> ok_init, 0, &my_bytes_allocd);
+            GC_ASSERT(hhdr -> hb_sz == lb);
+            hhdr -> hb_last_reclaimed = (unsigned short) GC_gc_no;
+#           ifdef PARALLEL_MARK
+              if (GC_parallel) {
+                  signed_word my_bytes_allocd_tmp = GC_bytes_allocd_tmp;
+
+                  GC_ASSERT(my_bytes_allocd_tmp >= 0);
+                  /* We only decrement it while holding the GC lock.    */
+                  /* Thus we can't accidentally adjust it down in more  */
+                  /* than one thread simultaneously.                    */
+                  if (my_bytes_allocd_tmp != 0) {
+                    (void)AO_fetch_and_add(
+                                (volatile void *)(&GC_bytes_allocd_tmp),
+                                (AO_t)(-my_bytes_allocd_tmp));
+                    GC_bytes_allocd += my_bytes_allocd_tmp;
+                  }
+                  GC_acquire_mark_lock();
+                  ++ GC_fl_builder_count;
+                  UNLOCK();
+                  GC_release_mark_lock();
+              }
+#           endif
+            op = GC_reclaim_generic(hbp, hhdr, lb,
+                                    ok -> ok_init, 0, &my_bytes_allocd);
             if (op != 0) {
-             /* We also reclaimed memory, so we need to adjust         */
-             /* that count.                                            */
-             /* This should be atomic, so the results may be           */
-             /* inaccurate.                                            */
-             GC_bytes_found += my_bytes_allocd;
-#            ifdef PARALLEL_MARK
-               if (GC_parallel) {
-                 *result = op;
-                 (void)AO_fetch_and_add(
-                               (volatile AO_t *)(&GC_bytes_allocd_tmp),
-                               (AO_t)(my_bytes_allocd));
-                 GC_acquire_mark_lock();
-                 -- GC_fl_builder_count;
-                 if (GC_fl_builder_count == 0) GC_notify_all_builder();
-                 GC_release_mark_lock();
-                 (void) GC_clear_stack(0);
-                 return;
-               }
-#            endif
-             GC_bytes_allocd += my_bytes_allocd;
-             goto out;
-           }
-#          ifdef PARALLEL_MARK
-             if (GC_parallel) {
-               GC_acquire_mark_lock();
-               -- GC_fl_builder_count;
-               if (GC_fl_builder_count == 0) GC_notify_all_builder();
-               GC_release_mark_lock();
-               LOCK();
-               /* GC lock is needed for reclaim list access.   We      */
-               /* must decrement fl_builder_count before reaquiring GC */
-               /* lock.  Hopefully this path is rare.                  */
-             }
-#          endif
-       }
+              /* We also reclaimed memory, so we need to adjust         */
+              /* that count.                                            */
+              /* This should be atomic, so the results may be           */
+              /* inaccurate.                                            */
+              GC_bytes_found += my_bytes_allocd;
+#             ifdef PARALLEL_MARK
+                if (GC_parallel) {
+                  *result = op;
+                  (void)AO_fetch_and_add(
+                                (volatile AO_t *)(&GC_bytes_allocd_tmp),
+                                (AO_t)(my_bytes_allocd));
+                  GC_acquire_mark_lock();
+                  -- GC_fl_builder_count;
+                  if (GC_fl_builder_count == 0) GC_notify_all_builder();
+                  GC_release_mark_lock();
+                  (void) GC_clear_stack(0);
+                  return;
+                }
+#             endif
+              GC_bytes_allocd += my_bytes_allocd;
+              goto out;
+            }
+#           ifdef PARALLEL_MARK
+              if (GC_parallel) {
+                GC_acquire_mark_lock();
+                -- GC_fl_builder_count;
+                if (GC_fl_builder_count == 0) GC_notify_all_builder();
+                GC_release_mark_lock();
+                LOCK();
+                /* GC lock is needed for reclaim list access.   We      */
+                /* must decrement fl_builder_count before reaquiring GC */
+                /* lock.  Hopefully this path is rare.                  */
+              }
+#           endif
+        }
     }
-    /* Next try to use prefix of global free list if there is one.     */
-    /* We don't refill it, but we need to use it up before allocating  */
-    /* a new block ourselves.                                          */
+    /* Next try to use prefix of global free list if there is one.      */
+    /* We don't refill it, but we need to use it up before allocating   */
+    /* a new block ourselves.                                           */
       opp = &(GC_obj_kinds[k].ok_freelist[lg]);
       if ( (op = *opp) != 0 ) {
-       *opp = 0;
+        *opp = 0;
         my_bytes_allocd = 0;
         for (p = op; p != 0; p = obj_link(p)) {
           my_bytes_allocd += lb;
@@ -378,46 +376,46 @@ DCL_LOCK_STATE;
             *opp = obj_link(p);
             obj_link(p) = 0;
             break;
-         }
+          }
         }
-       GC_bytes_allocd += my_bytes_allocd;
-       goto out;
+        GC_bytes_allocd += my_bytes_allocd;
+        goto out;
       }
-    /* Next try to allocate a new block worth of objects of this size. */
+    /* Next try to allocate a new block worth of objects of this size.  */
     {
-       struct hblk *h = GC_allochblk(lb, k, 0);
-       if (h != 0) {
-         if (IS_UNCOLLECTABLE(k)) GC_set_hdr_marks(HDR(h));
-         GC_bytes_allocd += HBLKSIZE - HBLKSIZE % lb;
-#        ifdef PARALLEL_MARK
-           if (GC_parallel) {
-             GC_acquire_mark_lock();
-             ++ GC_fl_builder_count;
-             UNLOCK();
-             GC_release_mark_lock();
-
-             op = GC_build_fl(h, lw,
-                       (ok -> ok_init || GC_debugging_started), 0);
-           
-             *result = op;
-             GC_acquire_mark_lock();
-             -- GC_fl_builder_count;
-             if (GC_fl_builder_count == 0) GC_notify_all_builder();
-             GC_release_mark_lock();
-             (void) GC_clear_stack(0);
-             return;
-           }
-#        endif
-         op = GC_build_fl(h, lw, (ok -> ok_init || GC_debugging_started), 0);
-         goto out;
-       }
+        struct hblk *h = GC_allochblk(lb, k, 0);
+        if (h != 0) {
+          if (IS_UNCOLLECTABLE(k)) GC_set_hdr_marks(HDR(h));
+          GC_bytes_allocd += HBLKSIZE - HBLKSIZE % lb;
+#         ifdef PARALLEL_MARK
+            if (GC_parallel) {
+              GC_acquire_mark_lock();
+              ++ GC_fl_builder_count;
+              UNLOCK();
+              GC_release_mark_lock();
+
+              op = GC_build_fl(h, lw,
+                        (ok -> ok_init || GC_debugging_started), 0);
+
+              *result = op;
+              GC_acquire_mark_lock();
+              -- GC_fl_builder_count;
+              if (GC_fl_builder_count == 0) GC_notify_all_builder();
+              GC_release_mark_lock();
+              (void) GC_clear_stack(0);
+              return;
+            }
+#         endif
+          op = GC_build_fl(h, lw, (ok -> ok_init || GC_debugging_started), 0);
+          goto out;
+        }
     }
-    
-    /* As a last attempt, try allocating a single object.  Note that   */
-    /* this may trigger a collection or expand the heap.               */
+
+    /* As a last attempt, try allocating a single object.  Note that    */
+    /* this may trigger a collection or expand the heap.                */
       op = GC_generic_malloc_inner(lb, k);
       if (0 != op) obj_link(op) = 0;
-    
+
   out:
     *result = op;
     UNLOCK();
@@ -428,14 +426,14 @@ GC_API void * GC_CALL GC_malloc_many(size_t lb)
 {
     void *result;
     GC_generic_malloc_many(((lb + EXTRA_BYTES + GRANULE_BYTES-1)
-                          & ~(GRANULE_BYTES-1)),
-                          NORMAL, &result);
+                           & ~(GRANULE_BYTES-1)),
+                           NORMAL, &result);
     return result;
 }
 
-/* Note that the "atomic" version of this would be unsafe, since the   */
-/* links would not be seen by the collector.                           */
-# endif
+/* Note that the "atomic" version of this would be unsafe, since the    */
+/* links would not be seen by the collector.                            */
+#endif /* THREADS */
 
 /* Allocate lb bytes of pointerful, traced, but not collectable data */
 GC_API void * GC_CALL GC_malloc_uncollectable(size_t lb)
@@ -446,128 +444,129 @@ GC_API void * GC_CALL GC_malloc_uncollectable(size_t lb)
     DCL_LOCK_STATE;
 
     if( SMALL_OBJ(lb) ) {
-       if (EXTRA_BYTES != 0 && lb != 0) lb--;
-                 /* We don't need the extra byte, since this won't be  */
-                 /* collected anyway.                                  */
-       lg = GC_size_map[lb];
-       opp = &(GC_uobjfreelist[lg]);
-       LOCK();
+        if (EXTRA_BYTES != 0 && lb != 0) lb--;
+                  /* We don't need the extra byte, since this won't be  */
+                  /* collected anyway.                                  */
+        lg = GC_size_map[lb];
+        opp = &(GC_uobjfreelist[lg]);
+        LOCK();
         if( (op = *opp) != 0 ) {
             *opp = obj_link(op);
             obj_link(op) = 0;
             GC_bytes_allocd += GRANULES_TO_BYTES(lg);
-            /* Mark bit ws already set on free list.  It will be       */
-           /* cleared only temporarily during a collection, as a       */
-           /* result of the normal free list mark bit clearing.        */
+            /* Mark bit ws already set on free list.  It will be        */
+            /* cleared only temporarily during a collection, as a       */
+            /* result of the normal free list mark bit clearing.        */
             GC_non_gc_bytes += GRANULES_TO_BYTES(lg);
             UNLOCK();
         } else {
             UNLOCK();
             op = (ptr_t)GC_generic_malloc((word)lb, UNCOLLECTABLE);
-           /* For small objects, the free lists are completely marked. */
-       }
-       GC_ASSERT(0 == op || GC_is_marked(op));
+            /* For small objects, the free lists are completely marked. */
+        }
+        GC_ASSERT(0 == op || GC_is_marked(op));
         return((void *) op);
     } else {
-       hdr * hhdr;
-       
-       op = (ptr_t)GC_generic_malloc((word)lb, UNCOLLECTABLE);
+        hdr * hhdr;
+
+        op = (ptr_t)GC_generic_malloc((word)lb, UNCOLLECTABLE);
         if (0 == op) return(0);
-       
-       GC_ASSERT(((word)op & (HBLKSIZE - 1)) == 0); /* large block */
-       hhdr = HDR(op);
-       /* We don't need the lock here, since we have an undisguised    */
-       /* pointer.  We do need to hold the lock while we adjust        */
-       /* mark bits.                                                   */
-       LOCK();
-       set_mark_bit_from_hdr(hhdr, 0); /* Only object. */
-       GC_ASSERT(hhdr -> hb_n_marks == 0);
-       hhdr -> hb_n_marks = 1;
-       UNLOCK();
-       return((void *) op);
+
+        GC_ASSERT(((word)op & (HBLKSIZE - 1)) == 0); /* large block */
+        hhdr = HDR(op);
+        /* We don't need the lock here, since we have an undisguised    */
+        /* pointer.  We do need to hold the lock while we adjust        */
+        /* mark bits.                                                   */
+        LOCK();
+        set_mark_bit_from_hdr(hhdr, 0); /* Only object. */
+        GC_ASSERT(hhdr -> hb_n_marks == 0);
+        hhdr -> hb_n_marks = 1;
+        UNLOCK();
+        return((void *) op);
     }
 }
 
-/* Not well tested nor integrated.     */
-/* Debug version is tricky and currently missing.      */
+/* Not well tested nor integrated.      */
+/* Debug version is tricky and currently missing.       */
 #include <limits.h>
 
-GC_API void * GC_CALL GC_memalign(size_t align, size_t lb) 
-{ 
+GC_API void * GC_CALL GC_memalign(size_t align, size_t lb)
+{
     size_t new_lb;
     size_t offset;
     ptr_t result;
 
     if (align <= GRANULE_BYTES) return GC_malloc(lb);
     if (align >= HBLKSIZE/2 || lb >= HBLKSIZE/2) {
-        if (align > HBLKSIZE) return GC_oom_fn(LONG_MAX-1024) /* Fail */;
-       return GC_malloc(lb <= HBLKSIZE? HBLKSIZE : lb);
-           /* Will be HBLKSIZE aligned.        */
+        if (align > HBLKSIZE) {
+          return (*GC_get_oom_fn())(LONG_MAX-1024); /* Fail */
+        }
+        return GC_malloc(lb <= HBLKSIZE? HBLKSIZE : lb);
+            /* Will be HBLKSIZE aligned.        */
     }
     /* We could also try to make sure that the real rounded-up object size */
-    /* is a multiple of align.  That would be correct up to HBLKSIZE.     */
+    /* is a multiple of align.  That would be correct up to HBLKSIZE.      */
     new_lb = lb + align - 1;
     result = GC_malloc(new_lb);
     offset = (word)result % align;
     if (offset != 0) {
-       offset = align - offset;
+        offset = align - offset;
         if (!GC_all_interior_pointers) {
-           if (offset >= VALID_OFFSET_SZ) return GC_malloc(HBLKSIZE);
-           GC_register_displacement(offset);
-       }
+            if (offset >= VALID_OFFSET_SZ) return GC_malloc(HBLKSIZE);
+            GC_register_displacement(offset);
+        }
     }
     result = (void *) ((ptr_t)result + offset);
     GC_ASSERT((word)result % align == 0);
     return result;
 }
 
-# ifdef ATOMIC_UNCOLLECTABLE
-/* Allocate lb bytes of pointerfree, untraced, uncollectable data      */
-/* This is normally roughly equivalent to the system malloc.           */
-/* But it may be useful if malloc is redefined.                                */
-GC_API void * GC_CALL GC_malloc_atomic_uncollectable(size_t lb)
-{
+#ifdef ATOMIC_UNCOLLECTABLE
+  /* Allocate lb bytes of pointerfree, untraced, uncollectable data     */
+  /* This is normally roughly equivalent to the system malloc.          */
+  /* But it may be useful if malloc is redefined.                       */
+  GC_API void * GC_CALL GC_malloc_atomic_uncollectable(size_t lb)
+  {
     void *op;
     void **opp;
     size_t lg;
     DCL_LOCK_STATE;
 
     if( SMALL_OBJ(lb) ) {
-       if (EXTRA_BYTES != 0 && lb != 0) lb--;
-                 /* We don't need the extra byte, since this won't be  */
-                 /* collected anyway.                                  */
-       lg = GC_size_map[lb];
-       opp = &(GC_auobjfreelist[lg]);
-       LOCK();
+        if (EXTRA_BYTES != 0 && lb != 0) lb--;
+                  /* We don't need the extra byte, since this won't be  */
+                  /* collected anyway.                                  */
+        lg = GC_size_map[lb];
+        opp = &(GC_auobjfreelist[lg]);
+        LOCK();
         if( (op = *opp) != 0 ) {
             *opp = obj_link(op);
             obj_link(op) = 0;
             GC_bytes_allocd += GRANULES_TO_BYTES(lg);
-           /* Mark bit was already set while object was on free list. */
+            /* Mark bit was already set while object was on free list. */
             GC_non_gc_bytes += GRANULES_TO_BYTES(lg);
             UNLOCK();
         } else {
             UNLOCK();
             op = (ptr_t)GC_generic_malloc(lb, AUNCOLLECTABLE);
-       }
-       GC_ASSERT(0 == op || GC_is_marked(op));
+        }
+        GC_ASSERT(0 == op || GC_is_marked(op));
         return((void *) op);
     } else {
-       hdr * hhdr;
-       
-       op = (ptr_t)GC_generic_malloc(lb, AUNCOLLECTABLE);
+        hdr * hhdr;
+
+        op = (ptr_t)GC_generic_malloc(lb, AUNCOLLECTABLE);
         if (0 == op) return(0);
 
-       GC_ASSERT(((word)op & (HBLKSIZE - 1)) == 0);
-       hhdr = HDR(op);
-       
-       LOCK();
-       set_mark_bit_from_hdr(hhdr, 0); /* Only object. */
-       GC_ASSERT(hhdr -> hb_n_marks == 0);
-       hhdr -> hb_n_marks = 1;
-       UNLOCK();
-       return((void *) op);
-    }
-}
+        GC_ASSERT(((word)op & (HBLKSIZE - 1)) == 0);
+        hhdr = HDR(op);
 
+        LOCK();
+        set_mark_bit_from_hdr(hhdr, 0); /* Only object. */
+        GC_ASSERT(hhdr -> hb_n_marks == 0);
+        hhdr -> hb_n_marks = 1;
+        UNLOCK();
+        return((void *) op);
+    }
+  }
 #endif /* ATOMIC_UNCOLLECTABLE */
index da9dc1c2c6470dd62c58f919330a0391b1d3d253..072d6215d2b5394cee3ac4034455cecbca5560d1 100644 (file)
@@ -1,4 +1,3 @@
-
 /*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1995 by Xerox Corporation.  All rights reserved.
@@ -15,9 +14,9 @@
  *
  */
 
+#include "private/gc_pmark.h"
 
-# include <stdio.h>
-# include "private/gc_pmark.h"
+#include <stdio.h>
 
 #if defined(MSWIN32) && defined(__GNUC__)
 # include <excpt.h>
@@ -46,55 +45,56 @@ GC_API void GC_CALL GC_noop1(word x)
 
 /* mark_proc GC_mark_procs[MAX_MARK_PROCS] = {0} -- declared in gc_priv.h */
 
-unsigned GC_n_mark_procs = GC_RESERVED_MARK_PROCS;
+GC_INNER unsigned GC_n_mark_procs = GC_RESERVED_MARK_PROCS;
 
-/* Initialize GC_obj_kinds properly and standard free lists properly.          */
-/* This must be done statically since they may be accessed before      */
-/* GC_init is called.                                                  */
-/* It's done here, since we need to deal with mark descriptors.                */
-struct obj_kind GC_obj_kinds[MAXOBJKINDS] = {
+/* Initialize GC_obj_kinds properly and standard free lists properly.   */
+/* This must be done statically since they may be accessed before       */
+/* GC_init is called.                                                   */
+/* It's done here, since we need to deal with mark descriptors.         */
+GC_INNER struct obj_kind GC_obj_kinds[MAXOBJKINDS] = {
 /* PTRFREE */ { &GC_aobjfreelist[0], 0 /* filled in dynamically */,
-               0 | GC_DS_LENGTH, FALSE, FALSE },
+                0 | GC_DS_LENGTH, FALSE, FALSE },
 /* NORMAL  */ { &GC_objfreelist[0], 0,
-               0 | GC_DS_LENGTH,  /* Adjusted in GC_init_inner for EXTRA_BYTES */
-               TRUE /* add length to descr */, TRUE },
+                0 | GC_DS_LENGTH,  /* Adjusted in GC_init for EXTRA_BYTES */
+                TRUE /* add length to descr */, TRUE },
 /* UNCOLLECTABLE */
-             { &GC_uobjfreelist[0], 0,
-               0 | GC_DS_LENGTH, TRUE /* add length to descr */, TRUE },
+              { &GC_uobjfreelist[0], 0,
+                0 | GC_DS_LENGTH, TRUE /* add length to descr */, TRUE },
 # ifdef ATOMIC_UNCOLLECTABLE
    /* AUNCOLLECTABLE */
-             { &GC_auobjfreelist[0], 0,
-               0 | GC_DS_LENGTH, FALSE /* add length to descr */, FALSE },
+              { &GC_auobjfreelist[0], 0,
+                0 | GC_DS_LENGTH, FALSE /* add length to descr */, FALSE },
 # endif
 # ifdef STUBBORN_ALLOC
 /*STUBBORN*/ { (void **)&GC_sobjfreelist[0], 0,
-               0 | GC_DS_LENGTH, TRUE /* add length to descr */, TRUE },
+                0 | GC_DS_LENGTH, TRUE /* add length to descr */, TRUE },
 # endif
 };
 
 # ifdef ATOMIC_UNCOLLECTABLE
 #   ifdef STUBBORN_ALLOC
-      unsigned GC_n_kinds = 5;
+#     define GC_N_KINDS_INITIAL_VALUE 5
 #   else
-      unsigned GC_n_kinds = 4;
+#     define GC_N_KINDS_INITIAL_VALUE 4
 #   endif
 # else
 #   ifdef STUBBORN_ALLOC
-      unsigned GC_n_kinds = 4;
+#     define GC_N_KINDS_INITIAL_VALUE 4
 #   else
-      unsigned GC_n_kinds = 3;
+#     define GC_N_KINDS_INITIAL_VALUE 3
 #   endif
 # endif
 
+GC_INNER unsigned GC_n_kinds = GC_N_KINDS_INITIAL_VALUE;
 
 # ifndef INITIAL_MARK_STACK_SIZE
 #   define INITIAL_MARK_STACK_SIZE (1*HBLKSIZE)
-               /* INITIAL_MARK_STACK_SIZE * sizeof(mse) should be a    */
-               /* multiple of HBLKSIZE.                                */
-               /* The incremental collector actually likes a larger    */
-               /* size, since it want to push all marked dirty objs    */
-               /* before marking anything new.  Currently we let it    */
-               /* grow dynamically.                                    */
+                /* INITIAL_MARK_STACK_SIZE * sizeof(mse) should be a    */
+                /* multiple of HBLKSIZE.                                */
+                /* The incremental collector actually likes a larger    */
+                /* size, since it want to push all marked dirty objs    */
+                /* before marking anything new.  Currently we let it    */
+                /* grow dynamically.                                    */
 # endif
 
 /*
@@ -103,48 +103,45 @@ struct obj_kind GC_obj_kinds[MAXOBJKINDS] = {
  * need to be marked from.
  */
 
-STATIC word GC_n_rescuing_pages;/* Number of dirty pages we marked from */
-                               /* excludes ptrfree pages, etc.         */
-
-mse * GC_mark_stack;
+STATIC word GC_n_rescuing_pages = 0;
+                                /* Number of dirty pages we marked from */
+                                /* excludes ptrfree pages, etc.         */
 
-mse * GC_mark_stack_limit;
+GC_INNER mse * GC_mark_stack = NULL;
+GC_INNER mse * GC_mark_stack_limit = NULL;
+GC_INNER size_t GC_mark_stack_size = 0;
 
-size_t GC_mark_stack_size = 0;
 #ifdef PARALLEL_MARK
-# include "atomic_ops.h"
-
-  mse * volatile GC_mark_stack_top;
-  /* Updated only with mark lock held, but read asynchronously.        */
-  volatile AO_t GC_first_nonempty;
-       /* Lowest entry on mark stack   */
-       /* that may be nonempty.        */
-       /* Updated only by initiating   */
-       /* thread.                      */
+  GC_INNER mse * volatile GC_mark_stack_top = NULL;
+        /* Updated only with mark lock held, but read asynchronously.   */
+  STATIC volatile AO_t GC_first_nonempty = 0;
+        /* Lowest entry on mark stack   */
+        /* that may be nonempty.        */
+        /* Updated only by initiating   */
+        /* thread.                      */
 #else
-  mse * GC_mark_stack_top;
+  GC_INNER mse * GC_mark_stack_top = NULL;
 #endif
 
-static struct hblk * scan_ptr;
+GC_INNER mark_state_t GC_mark_state = MS_NONE;
 
-mark_state_t GC_mark_state = MS_NONE;
+GC_INNER GC_bool GC_mark_stack_too_small = FALSE;
 
-GC_bool GC_mark_stack_too_small = FALSE;
+static struct hblk * scan_ptr;
 
-GC_bool GC_objects_are_marked = FALSE; /* Are there collectable marked */
-                                       /* objects in the heap?         */
+STATIC GC_bool GC_objects_are_marked = FALSE;
+                /* Are there collectable marked objects in the heap?    */
 
-/* Is a collection in progress?  Note that this can return true in the */
-/* nonincremental case, if a collection has been abandoned and the     */
-/* mark state is now MS_INVALID.                                       */
-GC_bool GC_collection_in_progress(void)
+/* Is a collection in progress?  Note that this can return true in the  */
+/* nonincremental case, if a collection has been abandoned and the      */
+/* mark state is now MS_INVALID.                                        */
+GC_INNER GC_bool GC_collection_in_progress(void)
 {
     return(GC_mark_state != MS_NONE);
 }
 
 /* clear all mark bits in the header */
-void GC_clear_hdr_marks(hdr *hhdr)
+GC_INNER void GC_clear_hdr_marks(hdr *hhdr)
 {
     size_t last_bit = FINAL_MARK_BIT(hhdr -> hb_sz);
 
@@ -159,7 +156,7 @@ void GC_clear_hdr_marks(hdr *hhdr)
 }
 
 /* Set all mark bits in the header.  Used for uncollectable blocks. */
-void GC_set_hdr_marks(hdr *hhdr)
+GC_INNER void GC_set_hdr_marks(hdr *hhdr)
 {
     unsigned i;
     size_t sz = hhdr -> hb_sz;
@@ -167,11 +164,11 @@ void GC_set_hdr_marks(hdr *hhdr)
 
 #   ifdef USE_MARK_BYTES
       for (i = 0; i <= n_marks; i += (unsigned)MARK_BIT_OFFSET(sz)) {
-       hhdr -> hb_marks[i] = 1;
+        hhdr -> hb_marks[i] = 1;
       }
 #   else
       for (i = 0; i < divWORDSZ(n_marks + WORDSZ); ++i) {
-       hhdr -> hb_marks[i] = ONES;
+        hhdr -> hb_marks[i] = ONES;
       }
 #   endif
 #   ifdef MARK_BIT_PER_OBJ
@@ -188,45 +185,45 @@ void GC_set_hdr_marks(hdr *hhdr)
 static void clear_marks_for_block(struct hblk *h, word dummy)
 {
     register hdr * hhdr = HDR(h);
-    
+
     if (IS_UNCOLLECTABLE(hhdr -> hb_obj_kind)) return;
-        /* Mark bit for these is cleared only once the object is       */
-        /* explicitly deallocated.  This either frees the block, or    */
-        /* the bit is cleared once the object is on the free list.     */
+        /* Mark bit for these is cleared only once the object is        */
+        /* explicitly deallocated.  This either frees the block, or     */
+        /* the bit is cleared once the object is on the free list.      */
     GC_clear_hdr_marks(hhdr);
 }
 
 /* Slow but general routines for setting/clearing/asking about mark bits */
-void GC_set_mark_bit(ptr_t p)
+GC_INNER void GC_set_mark_bit(ptr_t p)
 {
     struct hblk *h = HBLKPTR(p);
     hdr * hhdr = HDR(h);
     word bit_no = MARK_BIT_NO(p - (ptr_t)h, hhdr -> hb_sz);
-    
+
     if (!mark_bit_from_hdr(hhdr, bit_no)) {
       set_mark_bit_from_hdr(hhdr, bit_no);
       ++hhdr -> hb_n_marks;
     }
 }
 
-void GC_clear_mark_bit(ptr_t p)
+GC_INNER void GC_clear_mark_bit(ptr_t p)
 {
     struct hblk *h = HBLKPTR(p);
     hdr * hhdr = HDR(h);
     word bit_no = MARK_BIT_NO(p - (ptr_t)h, hhdr -> hb_sz);
-    
+
     if (mark_bit_from_hdr(hhdr, bit_no)) {
       size_t n_marks;
       clear_mark_bit_from_hdr(hhdr, bit_no);
       n_marks = hhdr -> hb_n_marks - 1;
 #     ifdef PARALLEL_MARK
         if (n_marks != 0 || !GC_parallel)
-          hhdr -> hb_n_marks = n_marks; 
-        /* Don't decrement to zero.  The counts are approximate due to */
-        /* concurrency issues, but we need to ensure that a count of   */
-        /* zero implies an empty block.                                        */
+          hhdr -> hb_n_marks = n_marks;
+        /* Don't decrement to zero.  The counts are approximate due to  */
+        /* concurrency issues, but we need to ensure that a count of    */
+        /* zero implies an empty block.                                 */
 #     else
-          hhdr -> hb_n_marks = n_marks; 
+          hhdr -> hb_n_marks = n_marks;
 #     endif
     }
 }
@@ -236,7 +233,7 @@ GC_bool GC_is_marked(ptr_t p)
     struct hblk *h = HBLKPTR(p);
     hdr * hhdr = HDR(h);
     word bit_no = MARK_BIT_NO(p - (ptr_t)h, hhdr -> hb_sz);
-    
+
     return((GC_bool)mark_bit_from_hdr(hhdr, bit_no));
 }
 
@@ -246,7 +243,7 @@ GC_bool GC_is_marked(ptr_t p)
  * the marker invariant, and sets GC_mark_state to reflect this.
  * (This implicitly starts marking to reestablish the invariant.)
  */
-void GC_clear_marks(void)
+GC_INNER void GC_clear_marks(void)
 {
     GC_apply_to_all_blocks(clear_marks_for_block, (word)0);
     GC_objects_are_marked = FALSE;
@@ -255,27 +252,27 @@ void GC_clear_marks(void)
 }
 
 #ifdef CHECKSUMS
-extern void GC_check_dirty(void);
+  void GC_check_dirty(void);
 #endif
 
-/* Initiate a garbage collection.  Initiates a full collection if the  */
-/* mark        state is invalid.                                               */
-void GC_initiate_gc(void)
+/* Initiate a garbage collection.  Initiates a full collection if the   */
+/* mark state is invalid.                                               */
+GC_INNER void GC_initiate_gc(void)
 {
     if (GC_dirty_maintained) GC_read_dirty();
 #   ifdef STUBBORN_ALLOC
-       GC_read_changed();
+        GC_read_changed();
 #   endif
 #   ifdef CHECKSUMS
-       if (GC_dirty_maintained) GC_check_dirty();
+        if (GC_dirty_maintained) GC_check_dirty();
 #   endif
     GC_n_rescuing_pages = 0;
     if (GC_mark_state == MS_NONE) {
         GC_mark_state = MS_PUSH_RESCUERS;
     } else if (GC_mark_state != MS_INVALID) {
-       ABORT("unexpected state");
-    } /* else this is really a full collection, and mark       */
-      /* bits are invalid.                                     */
+        ABORT("unexpected state");
+    } /* else this is really a full collection, and mark        */
+      /* bits are invalid.                                      */
     scan_ptr = 0;
 }
 
@@ -283,166 +280,183 @@ void GC_initiate_gc(void)
     STATIC void GC_do_parallel_mark(void); /* initiate parallel marking. */
 #endif /* PARALLEL_MARK */
 
+#ifdef GC_DISABLE_INCREMENTAL
+# define GC_push_next_marked_dirty(h) GC_push_next_marked(h)
+#else
+  STATIC struct hblk * GC_push_next_marked_dirty(struct hblk *h);
+                /* Invoke GC_push_marked on next dirty block above h.   */
+                /* Return a pointer just past the end of this block.    */
+#endif /* !GC_DISABLE_INCREMENTAL */
+STATIC struct hblk * GC_push_next_marked(struct hblk *h);
+                /* Ditto, but also mark from clean pages.       */
+STATIC struct hblk * GC_push_next_marked_uncollectable(struct hblk *h);
+                /* Ditto, but mark only from uncollectable pages.       */
+
 static void alloc_mark_stack(size_t);
 
-# if defined(MSWIN32) && (!defined(__GNUC__) || !defined(_WIN64)) \
-       || defined(USE_PROC_FOR_LIBRARIES) && defined(THREADS)
+# if (defined(MSWIN32) || defined(MSWINCE)) && !defined(__GNUC__) \
+        || defined(MSWIN32) && defined(I386) /* for Win98 */ \
+        || defined(USE_PROC_FOR_LIBRARIES) && defined(THREADS)
     /* Under rare conditions, we may end up marking from nonexistent memory. */
-    /* Hence we need to be prepared to recover by running GC_mark_some      */
-    /* with a suitable handler in place.                                    */
+    /* Hence we need to be prepared to recover by running GC_mark_some       */
+    /* with a suitable handler in place.                                     */
+    /* FIXME: Should we really need it for WinCE?  If yes then          */
+    /* WRAP_MARK_SOME should be also defined for CeGCC which requires   */
+    /* CPU/OS-specific code in mark_ex_handler() and GC_mark_some()     */
+    /* (for manual stack unwinding and exception handler installation). */
 #   define WRAP_MARK_SOME
 # endif
 
-/* Perform a small amount of marking.                  */
-/* We try to touch roughly a page of memory.           */
-/* Return TRUE if we just finished a mark phase.       */
-/* Cold_gc_frame is an address inside a GC frame that  */
-/* remains valid until all marking is complete.                */
-/* A zero value indicates that it's OK to miss some    */
-/* register values.                                    */
-/* We hold the allocation lock.  In the case of        */
+/* Perform a small amount of marking.                   */
+/* We try to touch roughly a page of memory.            */
+/* Return TRUE if we just finished a mark phase.        */
+/* Cold_gc_frame is an address inside a GC frame that   */
+/* remains valid until all marking is complete.         */
+/* A zero value indicates that it's OK to miss some     */
+/* register values.                                     */
+/* We hold the allocation lock.  In the case of         */
 /* incremental collection, the world may not be stopped.*/
 #ifdef WRAP_MARK_SOME
-  /* For win32, this is called after we establish a structured */
-  /* exception handler, in case Windows unmaps one of our root */
-  /* segments.  See below.  In either case, we acquire the     */
-  /* allocator lock long before we get here.                   */
+  /* For win32, this is called after we establish a structured  */
+  /* exception handler, in case Windows unmaps one of our root  */
+  /* segments.  See below.  In either case, we acquire the      */
+  /* allocator lock long before we get here.                    */
   STATIC GC_bool GC_mark_some_inner(ptr_t cold_gc_frame)
 #else
-  GC_bool GC_mark_some(ptr_t cold_gc_frame)
+  GC_INNER GC_bool GC_mark_some(ptr_t cold_gc_frame)
 #endif
 {
     switch(GC_mark_state) {
-       case MS_NONE:
-           return(FALSE);
-           
-       case MS_PUSH_RESCUERS:
-           if (GC_mark_stack_top
-               >= GC_mark_stack_limit - INITIAL_MARK_STACK_SIZE/2) {
-               /* Go ahead and mark, even though that might cause us to */
-               /* see more marked dirty objects later on.  Avoid this   */
-               /* in the future.                                        */
-               GC_mark_stack_too_small = TRUE;
-               MARK_FROM_MARK_STACK();
-               return(FALSE);
-           } else {
-               scan_ptr = GC_push_next_marked_dirty(scan_ptr);
-               if (scan_ptr == 0) {
-                   if (GC_print_stats) {
-                       GC_log_printf("Marked from %lu dirty pages\n",
-                                     (unsigned long)GC_n_rescuing_pages);
-                   }
-                   GC_push_roots(FALSE, cold_gc_frame);
-                   GC_objects_are_marked = TRUE;
-                   if (GC_mark_state != MS_INVALID) {
-                       GC_mark_state = MS_ROOTS_PUSHED;
-                   }
-               }
-           }
-           return(FALSE);
-       
-       case MS_PUSH_UNCOLLECTABLE:
-           if (GC_mark_stack_top
-               >= GC_mark_stack + GC_mark_stack_size/4) {
-#              ifdef PARALLEL_MARK
-                 /* Avoid this, since we don't parallelize the marker  */
-                 /* here.                                              */
-                 if (GC_parallel) GC_mark_stack_too_small = TRUE;
-#              endif
-               MARK_FROM_MARK_STACK();
-               return(FALSE);
-           } else {
-               scan_ptr = GC_push_next_marked_uncollectable(scan_ptr);
-               if (scan_ptr == 0) {
-                   GC_push_roots(TRUE, cold_gc_frame);
-                   GC_objects_are_marked = TRUE;
-                   if (GC_mark_state != MS_INVALID) {
-                       GC_mark_state = MS_ROOTS_PUSHED;
-                   }
-               }
-           }
-           return(FALSE);
-       
-       case MS_ROOTS_PUSHED:
-#          ifdef PARALLEL_MARK
-             /* In the incremental GC case, this currently doesn't     */
-             /* quite do the right thing, since it runs to             */
-             /* completion.  On the other hand, starting a             */
-             /* parallel marker is expensive, so perhaps it is         */
-             /* the right thing?                                       */
-             /* Eventually, incremental marking should run             */
-             /* asynchronously in multiple threads, without grabbing   */
-             /* the allocation lock.                                   */
-               if (GC_parallel) {
-                 GC_do_parallel_mark();
-                 GC_ASSERT(GC_mark_stack_top < (mse *)GC_first_nonempty);
-                 GC_mark_stack_top = GC_mark_stack - 1;
-                 if (GC_mark_stack_too_small) {
-                   alloc_mark_stack(2*GC_mark_stack_size);
-                 }
-                 if (GC_mark_state == MS_ROOTS_PUSHED) {
-                   GC_mark_state = MS_NONE;
-                   return(TRUE);
-                 } else {
-                   return(FALSE);
-                 }
-               }
-#          endif
-           if (GC_mark_stack_top >= GC_mark_stack) {
-               MARK_FROM_MARK_STACK();
-               return(FALSE);
-           } else {
-               GC_mark_state = MS_NONE;
-               if (GC_mark_stack_too_small) {
-                   alloc_mark_stack(2*GC_mark_stack_size);
-               }
-               return(TRUE);
-           }
-           
-       case MS_INVALID:
-       case MS_PARTIALLY_INVALID:
-           if (!GC_objects_are_marked) {
-               GC_mark_state = MS_PUSH_UNCOLLECTABLE;
-               return(FALSE);
-           }
-           if (GC_mark_stack_top >= GC_mark_stack) {
-               MARK_FROM_MARK_STACK();
-               return(FALSE);
-           }
-           if (scan_ptr == 0 && GC_mark_state == MS_INVALID) {
-               /* About to start a heap scan for marked objects. */
-               /* Mark stack is empty.  OK to reallocate.        */
-               if (GC_mark_stack_too_small) {
-                   alloc_mark_stack(2*GC_mark_stack_size);
-               }
-               GC_mark_state = MS_PARTIALLY_INVALID;
-           }
-           scan_ptr = GC_push_next_marked(scan_ptr);
-           if (scan_ptr == 0 && GC_mark_state == MS_PARTIALLY_INVALID) {
-               GC_push_roots(TRUE, cold_gc_frame);
-               GC_objects_are_marked = TRUE;
-               if (GC_mark_state != MS_INVALID) {
-                   GC_mark_state = MS_ROOTS_PUSHED;
-               }
-           }
-           return(FALSE);
-       default:
-           ABORT("GC_mark_some: bad state");
-           return(FALSE);
+        case MS_NONE:
+            return(FALSE);
+
+        case MS_PUSH_RESCUERS:
+            if (GC_mark_stack_top
+                >= GC_mark_stack_limit - INITIAL_MARK_STACK_SIZE/2) {
+                /* Go ahead and mark, even though that might cause us to */
+                /* see more marked dirty objects later on.  Avoid this   */
+                /* in the future.                                        */
+                GC_mark_stack_too_small = TRUE;
+                MARK_FROM_MARK_STACK();
+                return(FALSE);
+            } else {
+                scan_ptr = GC_push_next_marked_dirty(scan_ptr);
+                if (scan_ptr == 0) {
+                    if (GC_print_stats) {
+                        GC_log_printf("Marked from %lu dirty pages\n",
+                                      (unsigned long)GC_n_rescuing_pages);
+                    }
+                    GC_push_roots(FALSE, cold_gc_frame);
+                    GC_objects_are_marked = TRUE;
+                    if (GC_mark_state != MS_INVALID) {
+                        GC_mark_state = MS_ROOTS_PUSHED;
+                    }
+                }
+            }
+            return(FALSE);
+
+        case MS_PUSH_UNCOLLECTABLE:
+            if (GC_mark_stack_top
+                >= GC_mark_stack + GC_mark_stack_size/4) {
+#               ifdef PARALLEL_MARK
+                  /* Avoid this, since we don't parallelize the marker  */
+                  /* here.                                              */
+                  if (GC_parallel) GC_mark_stack_too_small = TRUE;
+#               endif
+                MARK_FROM_MARK_STACK();
+                return(FALSE);
+            } else {
+                scan_ptr = GC_push_next_marked_uncollectable(scan_ptr);
+                if (scan_ptr == 0) {
+                    GC_push_roots(TRUE, cold_gc_frame);
+                    GC_objects_are_marked = TRUE;
+                    if (GC_mark_state != MS_INVALID) {
+                        GC_mark_state = MS_ROOTS_PUSHED;
+                    }
+                }
+            }
+            return(FALSE);
+
+        case MS_ROOTS_PUSHED:
+#           ifdef PARALLEL_MARK
+              /* In the incremental GC case, this currently doesn't     */
+              /* quite do the right thing, since it runs to             */
+              /* completion.  On the other hand, starting a             */
+              /* parallel marker is expensive, so perhaps it is         */
+              /* the right thing?                                       */
+              /* Eventually, incremental marking should run             */
+              /* asynchronously in multiple threads, without grabbing   */
+              /* the allocation lock.                                   */
+                if (GC_parallel) {
+                  GC_do_parallel_mark();
+                  GC_ASSERT(GC_mark_stack_top < (mse *)GC_first_nonempty);
+                  GC_mark_stack_top = GC_mark_stack - 1;
+                  if (GC_mark_stack_too_small) {
+                    alloc_mark_stack(2*GC_mark_stack_size);
+                  }
+                  if (GC_mark_state == MS_ROOTS_PUSHED) {
+                    GC_mark_state = MS_NONE;
+                    return(TRUE);
+                  } else {
+                    return(FALSE);
+                  }
+                }
+#           endif
+            if (GC_mark_stack_top >= GC_mark_stack) {
+                MARK_FROM_MARK_STACK();
+                return(FALSE);
+            } else {
+                GC_mark_state = MS_NONE;
+                if (GC_mark_stack_too_small) {
+                    alloc_mark_stack(2*GC_mark_stack_size);
+                }
+                return(TRUE);
+            }
+
+        case MS_INVALID:
+        case MS_PARTIALLY_INVALID:
+            if (!GC_objects_are_marked) {
+                GC_mark_state = MS_PUSH_UNCOLLECTABLE;
+                return(FALSE);
+            }
+            if (GC_mark_stack_top >= GC_mark_stack) {
+                MARK_FROM_MARK_STACK();
+                return(FALSE);
+            }
+            if (scan_ptr == 0 && GC_mark_state == MS_INVALID) {
+                /* About to start a heap scan for marked objects. */
+                /* Mark stack is empty.  OK to reallocate.        */
+                if (GC_mark_stack_too_small) {
+                    alloc_mark_stack(2*GC_mark_stack_size);
+                }
+                GC_mark_state = MS_PARTIALLY_INVALID;
+            }
+            scan_ptr = GC_push_next_marked(scan_ptr);
+            if (scan_ptr == 0 && GC_mark_state == MS_PARTIALLY_INVALID) {
+                GC_push_roots(TRUE, cold_gc_frame);
+                GC_objects_are_marked = TRUE;
+                if (GC_mark_state != MS_INVALID) {
+                    GC_mark_state = MS_ROOTS_PUSHED;
+                }
+            }
+            return(FALSE);
+        default:
+            ABORT("GC_mark_some: bad state");
+            return(FALSE);
     }
 }
 
+#ifdef WRAP_MARK_SOME
 
-#if defined(MSWIN32) && defined(__GNUC__) && !defined(_WIN64)
+# if (defined(MSWIN32) || defined(MSWINCE)) && defined(__GNUC__)
 
     typedef struct {
       EXCEPTION_REGISTRATION ex_reg;
       void *alt_path;
     } ext_ex_regn;
 
-
     static EXCEPTION_DISPOSITION mark_ex_handler(
-        struct _EXCEPTION_RECORD *ex_rec, 
+        struct _EXCEPTION_RECORD *ex_rec,
         void *est_frame,
         struct _CONTEXT *context,
         void *disp_ctxt)
@@ -470,18 +484,17 @@ static void alloc_mark_stack(size_t);
     }
 # endif /* __GNUC__  && MSWIN32 */
 
-#ifdef GC_WIN32_THREADS
-  extern GC_bool GC_started_thread_while_stopped(void);
-  /* In win32_threads.c.  Did we invalidate mark phase with an */
-  /* unexpected thread start?                                  */
+#if defined(GC_WIN32_THREADS) && !defined(__GNUC__)
+  GC_bool GC_started_thread_while_stopped(void);
+  /* In win32_threads.c.  Did we invalidate mark phase with an  */
+  /* unexpected thread start?                                   */
 #endif
 
-# ifdef WRAP_MARK_SOME
-  GC_bool GC_mark_some(ptr_t cold_gc_frame)
+  GC_INNER GC_bool GC_mark_some(ptr_t cold_gc_frame)
   {
       GC_bool ret_val;
 
-#   ifdef MSWIN32
+#   if defined(MSWIN32) || defined(MSWINCE)
 #    ifndef __GNUC__
       /* Windows 98 appears to asynchronously create and remove  */
       /* writable memory mappings, for reasons we haven't yet    */
@@ -490,25 +503,28 @@ static void alloc_mark_stack(size_t);
       /* address range that disappeared since we started the     */
       /* collection.  Thus we have to recover from faults here.  */
       /* This code does not appear to be necessary for Windows   */
-      /* 95/NT/2000. Note that this code should never generate   */
+      /* 95/NT/2000+. Note that this code should never generate  */
       /* an incremental GC write fault.                          */
-      /* It's conceivable that this is the same issue with      */
-      /* terminating threads that we see with Linux and                 */
-      /* USE_PROC_FOR_LIBRARIES.                                */
+      /* This code seems to be necessary for WinCE (at least in  */
+      /* the case we'd decide to add MEM_PRIVATE sections to     */
+      /* data roots in GC_register_dynamic_libraries()).         */
+      /* It's conceivable that this is the same issue with       */
+      /* terminating threads that we see with Linux and          */
+      /* USE_PROC_FOR_LIBRARIES.                                 */
 
       __try {
           ret_val = GC_mark_some_inner(cold_gc_frame);
       } __except (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ?
                 EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) {
-         goto handle_ex;
+          goto handle_ex;
       }
 #     ifdef GC_WIN32_THREADS
-       /* With DllMain-based thread tracking, a thread may have        */
-       /* started while we were marking.  This is logically equivalent */
-       /* to the exception case; our results are invalid and we have   */
-       /* to start over.  This cannot be prevented since we can't      */
-       /* block in DllMain.                                            */
-       if (GC_started_thread_while_stopped()) goto handle_ex;
+        /* With DllMain-based thread tracking, a thread may have        */
+        /* started while we were marking.  This is logically equivalent */
+        /* to the exception case; our results are invalid and we have   */
+        /* to start over.  This cannot be prevented since we can't      */
+        /* block in DllMain.                                            */
+        if (GC_started_thread_while_stopped()) goto handle_ex;
 #     endif
      rm_handler:
       return ret_val;
@@ -537,33 +553,34 @@ static void alloc_mark_stack(size_t);
 
 #    endif /* __GNUC__ */
 #   else /* !MSWIN32 */
-      /* Here we are handling the case in which /proc is used for root */
-      /* finding, and we have threads.  We may find a stack for a      */
-      /* thread that is in the process of exiting, and disappears      */
-      /* while we are marking it.  This seems extremely difficult to   */
-      /* avoid otherwise.                                              */
-      if (GC_incremental)
-             WARN("Incremental GC incompatible with /proc roots\n", 0);
-       /* I'm not sure if this could still work ...    */
+      /* Here we are handling the case in which /proc is used for root  */
+      /* finding, and we have threads.  We may find a stack for a       */
+      /* thread that is in the process of exiting, and disappears       */
+      /* while we are marking it.  This seems extremely difficult to    */
+      /* avoid otherwise.                                               */
+      if (GC_incremental) {
+        WARN("Incremental GC incompatible with /proc roots\n", 0);
+        /* I'm not sure if this could still work ...    */
+      }
       GC_setup_temporary_fault_handler();
       if(SETJMP(GC_jmp_buf) != 0) goto handle_ex;
       ret_val = GC_mark_some_inner(cold_gc_frame);
     rm_handler:
       GC_reset_fault_handler();
       return ret_val;
-      
+
 #   endif /* !MSWIN32 */
 
 handle_ex:
     /* Exception handler starts here for all cases. */
       if (GC_print_stats) {
         GC_log_printf("Caught ACCESS_VIOLATION in marker. "
-                     "Memory mapping disappeared.\n");
+                      "Memory mapping disappeared.\n");
       }
 
-      /* We have bad roots on the stack.  Discard mark stack.  */
-      /* Rescan from marked objects.  Redetermine roots.       */
-      GC_invalidate_mark_state();      
+      /* We have bad roots on the stack.  Discard mark stack.   */
+      /* Rescan from marked objects.  Redetermine roots.        */
+      GC_invalidate_mark_state();
       scan_ptr = 0;
 
       ret_val = FALSE;
@@ -571,25 +588,24 @@ handle_ex:
   }
 #endif /* WRAP_MARK_SOME */
 
-
-GC_bool GC_mark_stack_empty(void)
+GC_INNER GC_bool GC_mark_stack_empty(void)
 {
     return(GC_mark_stack_top < GC_mark_stack);
-}      
+}
 
-void GC_invalidate_mark_state(void)
+GC_INNER void GC_invalidate_mark_state(void)
 {
     GC_mark_state = MS_INVALID;
     GC_mark_stack_top = GC_mark_stack-1;
 }
 
-mse * GC_signal_mark_stack_overflow(mse *msp)
+GC_INNER mse * GC_signal_mark_stack_overflow(mse *msp)
 {
     GC_mark_state = MS_INVALID;
     GC_mark_stack_too_small = TRUE;
     if (GC_print_stats) {
-       GC_log_printf("Mark stack overflow; current size = %lu entries\n",
-                     (unsigned long)GC_mark_stack_size);
+        GC_log_printf("Mark stack overflow; current size = %lu entries\n",
+                      (unsigned long)GC_mark_stack_size);
     }
     return(msp - GC_MARK_STACK_DISCARDS);
 }
@@ -606,191 +622,192 @@ mse * GC_signal_mark_stack_overflow(mse *msp)
  * things up.  In particular, we avoid procedure calls on the common
  * path, we take advantage of peculiarities of the mark descriptor
  * encoding, we optionally maintain a cache for the block address to
- * header mapping, we prefetch when an object is "grayed", etc. 
+ * header mapping, we prefetch when an object is "grayed", etc.
  */
-mse * GC_mark_from(mse *mark_stack_top, mse *mark_stack, mse *mark_stack_limit)
+GC_INNER mse * GC_mark_from(mse *mark_stack_top, mse *mark_stack,
+                            mse *mark_stack_limit)
 {
-  signed_word credit = HBLKSIZE;  /* Remaining credit for marking work */
-  ptr_t current_p;     /* Pointer to current candidate ptr.    */
-  word current;        /* Candidate pointer.                   */
-  ptr_t limit; /* (Incl) limit of current candidate    */
-                               /* range                                */
+  signed_word credit = HBLKSIZE;  /* Remaining credit for marking work  */
+  ptr_t current_p;      /* Pointer to current candidate ptr.    */
+  word current; /* Candidate pointer.                   */
+  ptr_t limit;  /* (Incl) limit of current candidate    */
+                                /* range                                */
   word descr;
   ptr_t greatest_ha = GC_greatest_plausible_heap_addr;
   ptr_t least_ha = GC_least_plausible_heap_addr;
   DECLARE_HDR_CACHE;
 
-# define SPLIT_RANGE_WORDS 128  /* Must be power of 2.         */
+# define SPLIT_RANGE_WORDS 128  /* Must be power of 2.          */
 
   GC_objects_are_marked = TRUE;
   INIT_HDR_CACHE;
 # ifdef OS2 /* Use untweaked version to circumvent compiler problem */
-  while (mark_stack_top >= mark_stack && credit >= 0) {
+    while (mark_stack_top >= mark_stack && credit >= 0)
 # else
-  while ((((ptr_t)mark_stack_top - (ptr_t)mark_stack) | credit)
-       >= 0) {
+    while ((((ptr_t)mark_stack_top - (ptr_t)mark_stack) | credit) >= 0)
 # endif
+  {
     current_p = mark_stack_top -> mse_start;
     descr = mark_stack_top -> mse_descr;
   retry:
-    /* current_p and descr describe the current object.                */
-    /* *mark_stack_top is vacant.                              */
-    /* The following is 0 only for small objects described by a simple */
-    /* length descriptor.  For many applications this is the common    */
-    /* case, so we try to detect it quickly.                           */
+    /* current_p and descr describe the current object.         */
+    /* *mark_stack_top is vacant.                               */
+    /* The following is 0 only for small objects described by a simple  */
+    /* length descriptor.  For many applications this is the common     */
+    /* case, so we try to detect it quickly.                            */
     if (descr & ((~(WORDS_TO_BYTES(SPLIT_RANGE_WORDS) - 1)) | GC_DS_TAGS)) {
       word tag = descr & GC_DS_TAGS;
-      
+
       switch(tag) {
         case GC_DS_LENGTH:
-          /* Large length.                                             */
-          /* Process part of the range to avoid pushing too much on the        */
-          /* stack.                                                    */
-         GC_ASSERT(descr < (word)GC_greatest_plausible_heap_addr
-                           - (word)GC_least_plausible_heap_addr);
-#        ifdef ENABLE_TRACE
-           if (GC_trace_addr >= current_p
-               && GC_trace_addr < current_p + descr) {
-               GC_log_printf("GC:%u Large section; start %p len %lu\n",
-                             (unsigned)GC_gc_no, current_p,
-                             (unsigned long) descr);
-           }
-#        endif /* ENABLE_TRACE */
-#        ifdef PARALLEL_MARK
-#          define SHARE_BYTES 2048
-           if (descr > SHARE_BYTES && GC_parallel
-               && mark_stack_top < mark_stack_limit - 1) {
-             int new_size = (descr/2) & ~(sizeof(word)-1);
-             mark_stack_top -> mse_start = current_p;
-             mark_stack_top -> mse_descr = new_size + sizeof(word);
-                                       /* makes sure we handle         */
-                                       /* misaligned pointers.         */
-             mark_stack_top++;
-#            ifdef ENABLE_TRACE
-               if (GC_trace_addr >= current_p
-                   && GC_trace_addr < current_p + descr) {
-                   GC_log_printf("GC:%u splitting (parallel) %p at %p\n",
-                                 (unsigned)GC_gc_no, current_p,
-                                 current_p + new_size);
-               }
-#            endif /* ENABLE_TRACE */
-             current_p += new_size;
-             descr -= new_size;
-             goto retry;
-           }
-#        endif /* PARALLEL_MARK */
+          /* Large length.                                              */
+          /* Process part of the range to avoid pushing too much on the */
+          /* stack.                                                     */
+          GC_ASSERT(descr < (word)GC_greatest_plausible_heap_addr
+                            - (word)GC_least_plausible_heap_addr);
+#         ifdef ENABLE_TRACE
+            if (GC_trace_addr >= current_p
+                && GC_trace_addr < current_p + descr) {
+                GC_log_printf("GC:%u Large section; start %p len %lu\n",
+                              (unsigned)GC_gc_no, current_p,
+                              (unsigned long) descr);
+            }
+#         endif /* ENABLE_TRACE */
+#         ifdef PARALLEL_MARK
+#           define SHARE_BYTES 2048
+            if (descr > SHARE_BYTES && GC_parallel
+                && mark_stack_top < mark_stack_limit - 1) {
+              int new_size = (descr/2) & ~(sizeof(word)-1);
+              mark_stack_top -> mse_start = current_p;
+              mark_stack_top -> mse_descr = new_size + sizeof(word);
+                                        /* makes sure we handle         */
+                                        /* misaligned pointers.         */
+              mark_stack_top++;
+#             ifdef ENABLE_TRACE
+                if (GC_trace_addr >= current_p
+                    && GC_trace_addr < current_p + descr) {
+                    GC_log_printf("GC:%u splitting (parallel) %p at %p\n",
+                                  (unsigned)GC_gc_no, current_p,
+                                  current_p + new_size);
+                }
+#             endif /* ENABLE_TRACE */
+              current_p += new_size;
+              descr -= new_size;
+              goto retry;
+            }
+#         endif /* PARALLEL_MARK */
           mark_stack_top -> mse_start =
-               limit = current_p + WORDS_TO_BYTES(SPLIT_RANGE_WORDS-1);
+                limit = current_p + WORDS_TO_BYTES(SPLIT_RANGE_WORDS-1);
           mark_stack_top -> mse_descr =
-                       descr - WORDS_TO_BYTES(SPLIT_RANGE_WORDS-1);
-#        ifdef ENABLE_TRACE
-           if (GC_trace_addr >= current_p
-               && GC_trace_addr < current_p + descr) {
-               GC_log_printf("GC:%u splitting %p at %p\n",
-                             (unsigned)GC_gc_no, current_p, limit);
-           }
-#        endif /* ENABLE_TRACE */
-          /* Make sure that pointers overlapping the two ranges are    */
-          /* considered.                                               */
+                        descr - WORDS_TO_BYTES(SPLIT_RANGE_WORDS-1);
+#         ifdef ENABLE_TRACE
+            if (GC_trace_addr >= current_p
+                && GC_trace_addr < current_p + descr) {
+                GC_log_printf("GC:%u splitting %p at %p\n",
+                              (unsigned)GC_gc_no, current_p, limit);
+            }
+#         endif /* ENABLE_TRACE */
+          /* Make sure that pointers overlapping the two ranges are     */
+          /* considered.                                                */
           limit += sizeof(word) - ALIGNMENT;
           break;
         case GC_DS_BITMAP:
           mark_stack_top--;
-#        ifdef ENABLE_TRACE
-           if (GC_trace_addr >= current_p
-               && GC_trace_addr < current_p + WORDS_TO_BYTES(WORDSZ-2)) {
-               GC_log_printf("GC:%u Tracing from %p bitmap descr %lu\n",
-                             (unsigned)GC_gc_no, current_p,
-                             (unsigned long) descr);
-           }
-#        endif /* ENABLE_TRACE */
+#         ifdef ENABLE_TRACE
+            if (GC_trace_addr >= current_p
+                && GC_trace_addr < current_p + WORDS_TO_BYTES(WORDSZ-2)) {
+                GC_log_printf("GC:%u Tracing from %p bitmap descr %lu\n",
+                              (unsigned)GC_gc_no, current_p,
+                              (unsigned long) descr);
+            }
+#         endif /* ENABLE_TRACE */
           descr &= ~GC_DS_TAGS;
           credit -= WORDS_TO_BYTES(WORDSZ/2); /* guess */
           while (descr != 0) {
             if ((signed_word)descr < 0) {
               current = *(word *)current_p;
-             FIXUP_POINTER(current);
-             if ((ptr_t)current >= least_ha && (ptr_t)current < greatest_ha) {
-               PREFETCH((ptr_t)current);
+              FIXUP_POINTER(current);
+              if ((ptr_t)current >= least_ha && (ptr_t)current < greatest_ha) {
+                PREFETCH((ptr_t)current);
 #               ifdef ENABLE_TRACE
-                 if (GC_trace_addr == current_p) {
-                   GC_log_printf("GC:%u Considering(3) %p -> %p\n",
-                                 (unsigned)GC_gc_no, current_p,
-                                 (ptr_t) current);
-                 }
+                  if (GC_trace_addr == current_p) {
+                    GC_log_printf("GC:%u Considering(3) %p -> %p\n",
+                                  (unsigned)GC_gc_no, current_p,
+                                  (ptr_t) current);
+                  }
 #               endif /* ENABLE_TRACE */
                 PUSH_CONTENTS((ptr_t)current, mark_stack_top,
-                             mark_stack_limit, current_p, exit1);
-             }
+                              mark_stack_limit, current_p, exit1);
+              }
             }
-           descr <<= 1;
-           current_p += sizeof(word);
+            descr <<= 1;
+            current_p += sizeof(word);
           }
           continue;
         case GC_DS_PROC:
           mark_stack_top--;
-#        ifdef ENABLE_TRACE
-           if (GC_trace_addr >= current_p
-               && GC_base(current_p) != 0
-               && GC_base(current_p) == GC_base(GC_trace_addr)) {
-               GC_log_printf("GC:%u Tracing from %p proc descr %lu\n",
-                             (unsigned)GC_gc_no, current_p,
-                             (unsigned long) descr);
-           }
-#        endif /* ENABLE_TRACE */
+#         ifdef ENABLE_TRACE
+            if (GC_trace_addr >= current_p
+                && GC_base(current_p) != 0
+                && GC_base(current_p) == GC_base(GC_trace_addr)) {
+                GC_log_printf("GC:%u Tracing from %p proc descr %lu\n",
+                              (unsigned)GC_gc_no, current_p,
+                              (unsigned long) descr);
+            }
+#         endif /* ENABLE_TRACE */
           credit -= GC_PROC_BYTES;
           mark_stack_top =
               (*PROC(descr))
-                   ((word *)current_p, mark_stack_top,
-                   mark_stack_limit, ENV(descr));
+                    ((word *)current_p, mark_stack_top,
+                    mark_stack_limit, ENV(descr));
           continue;
         case GC_DS_PER_OBJECT:
-         if ((signed_word)descr >= 0) {
-           /* Descriptor is in the object.     */
+          if ((signed_word)descr >= 0) {
+            /* Descriptor is in the object.     */
             descr = *(word *)(current_p + descr - GC_DS_PER_OBJECT);
-         } else {
-           /* Descriptor is in type descriptor pointed to by first     */
-           /* word in object.                                          */
-           ptr_t type_descr = *(ptr_t *)current_p;
-           /* type_descr is either a valid pointer to the descriptor   */
-           /* structure, or this object was on a free list.  If it     */
-           /* it was anything but the last object on the free list,    */
-           /* we will misinterpret the next object on the free list as */
-           /* the type descriptor, and get a 0 GC descriptor, which    */
-           /* is ideal.  Unfortunately, we need to check for the last  */
-           /* object case explicitly.                                  */
-           if (0 == type_descr) {
-               /* Rarely executed.     */
-               mark_stack_top--;
-               continue;
-           }
+          } else {
+            /* Descriptor is in type descriptor pointed to by first     */
+            /* word in object.                                          */
+            ptr_t type_descr = *(ptr_t *)current_p;
+            /* type_descr is either a valid pointer to the descriptor   */
+            /* structure, or this object was on a free list.  If it     */
+            /* it was anything but the last object on the free list,    */
+            /* we will misinterpret the next object on the free list as */
+            /* the type descriptor, and get a 0 GC descriptor, which    */
+            /* is ideal.  Unfortunately, we need to check for the last  */
+            /* object case explicitly.                                  */
+            if (0 == type_descr) {
+                /* Rarely executed.     */
+                mark_stack_top--;
+                continue;
+            }
             descr = *(word *)(type_descr
-                             - (descr + (GC_INDIR_PER_OBJ_BIAS
-                                         - GC_DS_PER_OBJECT)));
-         }
-         if (0 == descr) {
-             /* Can happen either because we generated a 0 descriptor  */
-             /* or we saw a pointer to a free object.          */
-             mark_stack_top--;
-             continue;
-         }
+                              - (descr + (GC_INDIR_PER_OBJ_BIAS
+                                          - GC_DS_PER_OBJECT)));
+          }
+          if (0 == descr) {
+              /* Can happen either because we generated a 0 descriptor  */
+              /* or we saw a pointer to a free object.          */
+              mark_stack_top--;
+              continue;
+          }
           goto retry;
-       default:
-         /* Can't happen. */
-         limit = 0; /* initialized to prevent warning. */
+        default:
+          /* Can't happen. */
+          limit = 0; /* initialized to prevent warning. */
       }
     } else /* Small object with length descriptor */ {
       mark_stack_top--;
       limit = current_p + (word)descr;
     }
 #   ifdef ENABLE_TRACE
-       if (GC_trace_addr >= current_p
-           && GC_trace_addr < limit) {
-           GC_log_printf("GC:%u Tracing from %p len %lu\n",
-                         (int)GC_gc_no, current_p, (unsigned long) descr);
-       }
+        if (GC_trace_addr >= current_p
+            && GC_trace_addr < limit) {
+            GC_log_printf("GC:%u Tracing from %p len %lu\n",
+                          (int)GC_gc_no, current_p, (unsigned long) descr);
+        }
 #   endif /* ENABLE_TRACE */
-    /* The simple case in which we're scanning a range.        */
+    /* The simple case in which we're scanning a range. */
     GC_ASSERT(!((word)current_p & (ALIGNMENT-1)));
     credit -= limit - current_p;
     limit -= sizeof(word);
@@ -800,72 +817,72 @@ mse * GC_mark_from(mse *mark_stack_top, mse *mark_stack, mse *mark_stack_limit)
 #     ifndef SMALL_CONFIG
         word deferred;
 
-       /* Try to prefetch the next pointer to be examined asap.        */
-       /* Empirically, this also seems to help slightly without        */
-       /* prefetches, at least on linux/X86.  Presumably this loop     */
-       /* ends up with less register pressure, and gcc thus ends up    */
-       /* generating slightly better code.  Overall gcc code quality   */
-       /* for this loop is still not great.                            */
-       for(;;) {
-         PREFETCH(limit - PREF_DIST*CACHE_LINE_SIZE);
-         GC_ASSERT(limit >= current_p);
-         deferred = *(word *)limit;
-         FIXUP_POINTER(deferred);
-         limit -= ALIGNMENT;
-         if ((ptr_t)deferred >= least_ha && (ptr_t)deferred <  greatest_ha) {
-           PREFETCH((ptr_t)deferred);
-           break;
-         }
-         if (current_p > limit) goto next_object;
-         /* Unroll once, so we don't do too many of the prefetches     */
-         /* based on limit.                                            */
-         deferred = *(word *)limit;
-         FIXUP_POINTER(deferred);
-         limit -= ALIGNMENT;
-         if ((ptr_t)deferred >= least_ha && (ptr_t)deferred <  greatest_ha) {
-           PREFETCH((ptr_t)deferred);
-           break;
-         }
-         if (current_p > limit) goto next_object;
-       }
+        /* Try to prefetch the next pointer to be examined asap.        */
+        /* Empirically, this also seems to help slightly without        */
+        /* prefetches, at least on linux/X86.  Presumably this loop     */
+        /* ends up with less register pressure, and gcc thus ends up    */
+        /* generating slightly better code.  Overall gcc code quality   */
+        /* for this loop is still not great.                            */
+        for(;;) {
+          PREFETCH(limit - PREF_DIST*CACHE_LINE_SIZE);
+          GC_ASSERT(limit >= current_p);
+          deferred = *(word *)limit;
+          FIXUP_POINTER(deferred);
+          limit -= ALIGNMENT;
+          if ((ptr_t)deferred >= least_ha && (ptr_t)deferred <  greatest_ha) {
+            PREFETCH((ptr_t)deferred);
+            break;
+          }
+          if (current_p > limit) goto next_object;
+          /* Unroll once, so we don't do too many of the prefetches     */
+          /* based on limit.                                            */
+          deferred = *(word *)limit;
+          FIXUP_POINTER(deferred);
+          limit -= ALIGNMENT;
+          if ((ptr_t)deferred >= least_ha && (ptr_t)deferred <  greatest_ha) {
+            PREFETCH((ptr_t)deferred);
+            break;
+          }
+          if (current_p > limit) goto next_object;
+        }
 #     endif
 
       while (current_p <= limit) {
-       /* Empirically, unrolling this loop doesn't help a lot. */
-       /* Since PUSH_CONTENTS expands to a lot of code,        */
-       /* we don't.                                            */
+        /* Empirically, unrolling this loop doesn't help a lot. */
+        /* Since PUSH_CONTENTS expands to a lot of code,        */
+        /* we don't.                                            */
         current = *(word *)current_p;
-       FIXUP_POINTER(current);
+        FIXUP_POINTER(current);
         PREFETCH(current_p + PREF_DIST*CACHE_LINE_SIZE);
         if ((ptr_t)current >= least_ha && (ptr_t)current <  greatest_ha) {
-         /* Prefetch the contents of the object we just pushed.  It's  */
-         /* likely we will need them soon.                             */
-         PREFETCH((ptr_t)current);
+          /* Prefetch the contents of the object we just pushed.  It's  */
+          /* likely we will need them soon.                             */
+          PREFETCH((ptr_t)current);
 #         ifdef ENABLE_TRACE
-           if (GC_trace_addr == current_p) {
-               GC_log_printf("GC:%u Considering(1) %p -> %p\n",
-                             (unsigned)GC_gc_no, current_p, (ptr_t) current);
-           }
+            if (GC_trace_addr == current_p) {
+                GC_log_printf("GC:%u Considering(1) %p -> %p\n",
+                              (unsigned)GC_gc_no, current_p, (ptr_t) current);
+            }
 #         endif /* ENABLE_TRACE */
           PUSH_CONTENTS((ptr_t)current, mark_stack_top,
-                          mark_stack_limit, current_p, exit2);
+                           mark_stack_limit, current_p, exit2);
         }
         current_p += ALIGNMENT;
       }
 
 #     ifndef SMALL_CONFIG
-       /* We still need to mark the entry we previously prefetched.    */
-       /* We already know that it passes the preliminary pointer       */
-       /* validity test.                                               */
+        /* We still need to mark the entry we previously prefetched.    */
+        /* We already know that it passes the preliminary pointer       */
+        /* validity test.                                               */
 #       ifdef ENABLE_TRACE
-           if (GC_trace_addr == current_p) {
-               GC_log_printf("GC:%u Considering(2) %p -> %p\n",
-                             (unsigned)GC_gc_no, current_p, (ptr_t) deferred);
-           }
+            if (GC_trace_addr == current_p) {
+                GC_log_printf("GC:%u Considering(2) %p -> %p\n",
+                              (unsigned)GC_gc_no, current_p, (ptr_t) deferred);
+            }
 #       endif /* ENABLE_TRACE */
         PUSH_CONTENTS((ptr_t)deferred, mark_stack_top,
-                        mark_stack_limit, current_p, exit4);
-       next_object:;
+                         mark_stack_limit, current_p, exit4);
+        next_object:;
 #     endif
     }
   }
@@ -874,31 +891,31 @@ mse * GC_mark_from(mse *mark_stack_top, mse *mark_stack, mse *mark_stack_limit)
 
 #ifdef PARALLEL_MARK
 
-STATIC GC_bool GC_help_wanted = FALSE; /* Protected by mark lock       */
-STATIC unsigned GC_helper_count = 0;   /* Number of running helpers.   */
-                                       /* Protected by mark lock       */
-STATIC unsigned GC_active_count = 0;   /* Number of active helpers.    */
-                                       /* Protected by mark lock       */
-                                       /* May increase and decrease    */
-                                       /* within each mark cycle.  But */
-                                       /* once it returns to 0, it     */
-                                       /* stays zero for the cycle.    */
+STATIC GC_bool GC_help_wanted = FALSE;  /* Protected by mark lock       */
+STATIC unsigned GC_helper_count = 0;    /* Number of running helpers.   */
+                                        /* Protected by mark lock       */
+STATIC unsigned GC_active_count = 0;    /* Number of active helpers.    */
+                                        /* Protected by mark lock       */
+                                        /* May increase and decrease    */
+                                        /* within each mark cycle.  But */
+                                        /* once it returns to 0, it     */
+                                        /* stays zero for the cycle.    */
 
-word GC_mark_no = 0;
+GC_INNER word GC_mark_no = 0;
 
 #define LOCAL_MARK_STACK_SIZE HBLKSIZE
-       /* Under normal circumstances, this is big enough to guarantee  */
-       /* We don't overflow half of it in a single call to             */
-       /* GC_mark_from.                                                */
+        /* Under normal circumstances, this is big enough to guarantee  */
+        /* We don't overflow half of it in a single call to             */
+        /* GC_mark_from.                                                */
 
 
-/* Steal mark stack entries starting at mse low into mark stack local  */
-/* until we either steal mse high, or we have max entries.             */
-/* Return a pointer to the top of the local mark stack.                        */
-/* *next is replaced by a pointer to the next unscanned mark stack     */
-/* entry.                                                              */
+/* Steal mark stack entries starting at mse low into mark stack local   */
+/* until we either steal mse high, or we have max entries.              */
+/* Return a pointer to the top of the local mark stack.                 */
+/* *next is replaced by a pointer to the next unscanned mark stack      */
+/* entry.                                                               */
 STATIC mse * GC_steal_mark_stack(mse * low, mse * high, mse * local,
-                                unsigned max, mse **next)
+                                 unsigned max, mse **next)
 {
     mse *p;
     mse *top = local - 1;
@@ -906,30 +923,30 @@ STATIC mse * GC_steal_mark_stack(mse * low, mse * high, mse * local,
 
     GC_ASSERT(high >= low-1 && (word)(high - low + 1) <= GC_mark_stack_size);
     for (p = low; p <= high && i <= max; ++p) {
-       word descr = AO_load((volatile AO_t *) &(p -> mse_descr));
-       if (descr != 0) {
-           /* Must be ordered after read of descr: */
-           AO_store_release_write((volatile AO_t *) &(p -> mse_descr), 0);
-           /* More than one thread may get this entry, but that's only */
-           /* a minor performance problem.                             */
-           ++top;
-           top -> mse_descr = descr;
-           top -> mse_start = p -> mse_start;
-           GC_ASSERT((top -> mse_descr & GC_DS_TAGS) != GC_DS_LENGTH || 
-                     top -> mse_descr < (word)GC_greatest_plausible_heap_addr
-                                        - (word)GC_least_plausible_heap_addr);
-           /* If this is a big object, count it as                     */
-           /* size/256 + 1 objects.                                    */
-           ++i;
-           if ((descr & GC_DS_TAGS) == GC_DS_LENGTH) i += (int)(descr >> 8);
-       }
+        word descr = AO_load((volatile AO_t *) &(p -> mse_descr));
+        if (descr != 0) {
+            /* Must be ordered after read of descr: */
+            AO_store_release_write((volatile AO_t *) &(p -> mse_descr), 0);
+            /* More than one thread may get this entry, but that's only */
+            /* a minor performance problem.                             */
+            ++top;
+            top -> mse_descr = descr;
+            top -> mse_start = p -> mse_start;
+            GC_ASSERT((top -> mse_descr & GC_DS_TAGS) != GC_DS_LENGTH ||
+                      top -> mse_descr < (word)GC_greatest_plausible_heap_addr
+                                         - (word)GC_least_plausible_heap_addr);
+            /* If this is a big object, count it as                     */
+            /* size/256 + 1 objects.                                    */
+            ++i;
+            if ((descr & GC_DS_TAGS) == GC_DS_LENGTH) i += (int)(descr >> 8);
+        }
     }
     *next = p;
     return top;
 }
 
-/* Copy back a local mark stack.       */
-/* low and high are inclusive bounds.  */
+/* Copy back a local mark stack.        */
+/* low and high are inclusive bounds.   */
 STATIC void GC_return_mark_stack(mse * low, mse * high)
 {
     mse * my_top;
@@ -939,31 +956,31 @@ STATIC void GC_return_mark_stack(mse * low, mse * high)
     if (high < low) return;
     stack_size = high - low + 1;
     GC_acquire_mark_lock();
-    my_top = GC_mark_stack_top;        /* Concurrent modification impossible. */
+    my_top = GC_mark_stack_top; /* Concurrent modification impossible. */
     my_start = my_top + 1;
     if (my_start - GC_mark_stack + stack_size > GC_mark_stack_size) {
       if (GC_print_stats) {
-         GC_log_printf("No room to copy back mark stack\n");
+          GC_log_printf("No room to copy back mark stack\n");
       }
       GC_mark_state = MS_INVALID;
       GC_mark_stack_too_small = TRUE;
-      /* We drop the local mark stack.  We'll fix things later.        */
+      /* We drop the local mark stack.  We'll fix things later. */
     } else {
       BCOPY(low, my_start, stack_size * sizeof(mse));
       GC_ASSERT((mse *)AO_load((volatile AO_t *)(&GC_mark_stack_top))
-               == my_top);
+                == my_top);
       AO_store_release_write((volatile AO_t *)(&GC_mark_stack_top),
-                            (AO_t)(my_top + stack_size));
-               /* Ensures visibility of previously written stack contents. */
+                             (AO_t)(my_top + stack_size));
+                /* Ensures visibility of previously written stack contents. */
     }
     GC_release_mark_lock();
     GC_notify_all_marker();
 }
 
-/* Mark from the local mark stack.             */
-/* On return, the local mark stack is empty.   */
-/* But this may be achieved by copying the     */
-/* local mark stack back into the global one.  */
+/* Mark from the local mark stack.              */
+/* On return, the local mark stack is empty.    */
+/* But this may be achieved by copying the      */
+/* local mark stack back into the global one.   */
 STATIC void GC_do_local_mark(mse *local_mark_stack, mse *local_top)
 {
     unsigned n;
@@ -971,51 +988,51 @@ STATIC void GC_do_local_mark(mse *local_mark_stack, mse *local_top)
 
 #   ifdef GC_ASSERTIONS
       /* Make sure we don't hold mark lock. */
-       GC_acquire_mark_lock();
-       GC_release_mark_lock();
+        GC_acquire_mark_lock();
+        GC_release_mark_lock();
 #   endif
     for (;;) {
         for (n = 0; n < N_LOCAL_ITERS; ++n) {
-           local_top = GC_mark_from(local_top, local_mark_stack,
-                                    local_mark_stack + LOCAL_MARK_STACK_SIZE);
-           if (local_top < local_mark_stack) return;
-           if (local_top - local_mark_stack >= LOCAL_MARK_STACK_SIZE/2) {
-               GC_return_mark_stack(local_mark_stack, local_top);
-               return;
-           }
-       }
-       if ((mse *)AO_load((volatile AO_t *)(&GC_mark_stack_top))
-           < (mse *)AO_load(&GC_first_nonempty)
-           && GC_active_count < GC_helper_count
-           && local_top > local_mark_stack + 1) {
-           /* Try to share the load, since the main stack is empty,    */
-           /* and helper threads are waiting for a refill.             */
-           /* The entries near the bottom of the stack are likely      */
-           /* to require more work.  Thus we return those, eventhough  */
-           /* it's harder.                                             */
-           mse * new_bottom = local_mark_stack
-                               + (local_top - local_mark_stack)/2;
-           GC_ASSERT(new_bottom > local_mark_stack
-                     && new_bottom < local_top);
-           GC_return_mark_stack(local_mark_stack, new_bottom - 1);
-           memmove(local_mark_stack, new_bottom,
-                   (local_top - new_bottom + 1) * sizeof(mse));
-           local_top -= (new_bottom - local_mark_stack);
-       }
+            local_top = GC_mark_from(local_top, local_mark_stack,
+                                     local_mark_stack + LOCAL_MARK_STACK_SIZE);
+            if (local_top < local_mark_stack) return;
+            if (local_top - local_mark_stack >= LOCAL_MARK_STACK_SIZE/2) {
+                GC_return_mark_stack(local_mark_stack, local_top);
+                return;
+            }
+        }
+        if ((mse *)AO_load((volatile AO_t *)(&GC_mark_stack_top))
+            < (mse *)AO_load(&GC_first_nonempty)
+            && GC_active_count < GC_helper_count
+            && local_top > local_mark_stack + 1) {
+            /* Try to share the load, since the main stack is empty,    */
+            /* and helper threads are waiting for a refill.             */
+            /* The entries near the bottom of the stack are likely      */
+            /* to require more work.  Thus we return those, eventhough  */
+            /* it's harder.                                             */
+            mse * new_bottom = local_mark_stack
+                                + (local_top - local_mark_stack)/2;
+            GC_ASSERT(new_bottom > local_mark_stack
+                      && new_bottom < local_top);
+            GC_return_mark_stack(local_mark_stack, new_bottom - 1);
+            memmove(local_mark_stack, new_bottom,
+                    (local_top - new_bottom + 1) * sizeof(mse));
+            local_top -= (new_bottom - local_mark_stack);
+        }
     }
 }
 
 #define ENTRIES_TO_GET 5
 
-long GC_markers = 2;           /* Normally changed by thread-library-  */
-                               /* -specific code.                      */
+GC_INNER long GC_markers = 2;   /* Normally changed by thread-library-  */
+                                /* -specific code.                      */
 
-/* Mark using the local mark stack until the global mark stack is empty        */
-/* and there are no active workers. Update GC_first_nonempty to reflect        */
-/* progress.                                                           */
-/* Caller does not hold mark lock.                                     */
-/* Caller has already incremented GC_helper_count.  We decrement it,   */
-/* and maintain GC_active_count.                                       */
+/* Mark using the local mark stack until the global mark stack is empty */
+/* and there are no active workers. Update GC_first_nonempty to reflect */
+/* progress.                                                            */
+/* Caller does not hold mark lock.                                      */
+/* Caller has already incremented GC_helper_count.  We decrement it,    */
+/* and maintain GC_active_count.                                        */
 STATIC void GC_mark_local(mse *local_mark_stack, int id)
 {
     mse * my_first_nonempty;
@@ -1023,141 +1040,141 @@ STATIC void GC_mark_local(mse *local_mark_stack, int id)
     GC_acquire_mark_lock();
     GC_active_count++;
     my_first_nonempty = (mse *)AO_load(&GC_first_nonempty);
-    GC_ASSERT((mse *)AO_load(&GC_first_nonempty) >= GC_mark_stack && 
-             (mse *)AO_load(&GC_first_nonempty) <=
-             (mse *)AO_load((volatile AO_t *)(&GC_mark_stack_top)) + 1);
+    GC_ASSERT((mse *)AO_load(&GC_first_nonempty) >= GC_mark_stack &&
+              (mse *)AO_load(&GC_first_nonempty) <=
+              (mse *)AO_load((volatile AO_t *)(&GC_mark_stack_top)) + 1);
     if (GC_print_stats == VERBOSE)
-       GC_log_printf("Starting mark helper %lu\n", (unsigned long)id);
+        GC_log_printf("Starting mark helper %lu\n", (unsigned long)id);
     GC_release_mark_lock();
     for (;;) {
-       size_t n_on_stack;
+        size_t n_on_stack;
         unsigned n_to_get;
-       mse * my_top;
-       mse * local_top;
+        mse * my_top;
+        mse * local_top;
         mse * global_first_nonempty = (mse *)AO_load(&GC_first_nonempty);
 
-       GC_ASSERT(my_first_nonempty >= GC_mark_stack && 
-                 my_first_nonempty <=
-                 (mse *)AO_load((volatile AO_t *)(&GC_mark_stack_top))  + 1);
-       GC_ASSERT(global_first_nonempty >= GC_mark_stack && 
-                 global_first_nonempty <= 
-                 (mse *)AO_load((volatile AO_t *)(&GC_mark_stack_top))  + 1);
-       if (my_first_nonempty < global_first_nonempty) {
-           my_first_nonempty = global_first_nonempty;
+        GC_ASSERT(my_first_nonempty >= GC_mark_stack &&
+                  my_first_nonempty <=
+                  (mse *)AO_load((volatile AO_t *)(&GC_mark_stack_top))  + 1);
+        GC_ASSERT(global_first_nonempty >= GC_mark_stack &&
+                  global_first_nonempty <=
+                  (mse *)AO_load((volatile AO_t *)(&GC_mark_stack_top))  + 1);
+        if (my_first_nonempty < global_first_nonempty) {
+            my_first_nonempty = global_first_nonempty;
         } else if (global_first_nonempty < my_first_nonempty) {
-           AO_compare_and_swap(&GC_first_nonempty, 
-                               (AO_t) global_first_nonempty,
-                               (AO_t) my_first_nonempty);
-           /* If this fails, we just go ahead, without updating        */
-           /* GC_first_nonempty.                                       */
-       }
-       /* Perhaps we should also update GC_first_nonempty, if it */
-       /* is less.  But that would require using atomic updates. */
-       my_top = (mse *)AO_load_acquire((volatile AO_t *)(&GC_mark_stack_top));
-       n_on_stack = my_top - my_first_nonempty + 1;
+            AO_compare_and_swap(&GC_first_nonempty,
+                                (AO_t) global_first_nonempty,
+                                (AO_t) my_first_nonempty);
+            /* If this fails, we just go ahead, without updating        */
+            /* GC_first_nonempty.                                       */
+        }
+        /* Perhaps we should also update GC_first_nonempty, if it */
+        /* is less.  But that would require using atomic updates. */
+        my_top = (mse *)AO_load_acquire((volatile AO_t *)(&GC_mark_stack_top));
+        n_on_stack = my_top - my_first_nonempty + 1;
         if (0 == n_on_stack) {
-           GC_acquire_mark_lock();
+            GC_acquire_mark_lock();
             my_top = GC_mark_stack_top;
-               /* Asynchronous modification impossible here,   */
-               /* since we hold mark lock.                     */
+                /* Asynchronous modification impossible here,   */
+                /* since we hold mark lock.                     */
             n_on_stack = my_top - my_first_nonempty + 1;
-           if (0 == n_on_stack) {
-               GC_active_count--;
-               GC_ASSERT(GC_active_count <= GC_helper_count);
-               /* Other markers may redeposit objects  */
-               /* on the stack.                                */
-               if (0 == GC_active_count) GC_notify_all_marker();
-               while (GC_active_count > 0
-                      && (mse *)AO_load(&GC_first_nonempty)
-                         > GC_mark_stack_top) {
-                   /* We will be notified if either GC_active_count    */
-                   /* reaches zero, or if more objects are pushed on   */
-                   /* the global mark stack.                           */
-                   GC_wait_marker();
-               }
-               if (GC_active_count == 0 &&
-                   (mse *)AO_load(&GC_first_nonempty) > GC_mark_stack_top) { 
-                   GC_bool need_to_notify = FALSE;
-                   /* The above conditions can't be falsified while we */
-                   /* hold the mark lock, since neither                */
-                   /* GC_active_count nor GC_mark_stack_top can        */
-                   /* change.  GC_first_nonempty can only be           */
-                   /* incremented asynchronously.  Thus we know that   */
-                   /* both conditions actually held simultaneously.    */
-                   GC_helper_count--;
-                   if (0 == GC_helper_count) need_to_notify = TRUE;
-                   if (GC_print_stats == VERBOSE)
-                     GC_log_printf(
-                       "Finished mark helper %lu\n", (unsigned long)id);
-                   GC_release_mark_lock();
-                   if (need_to_notify) GC_notify_all_marker();
-                   return;
-               }
-               /* else there's something on the stack again, or        */
-               /* another helper may push something.                   */
-               GC_active_count++;
-               GC_ASSERT(GC_active_count > 0);
-               GC_release_mark_lock();
-               continue;
-           } else {
-               GC_release_mark_lock();
-           }
-       }
-       n_to_get = ENTRIES_TO_GET;
-       if (n_on_stack < 2 * ENTRIES_TO_GET) n_to_get = 1;
-       local_top = GC_steal_mark_stack(my_first_nonempty, my_top,
-                                       local_mark_stack, n_to_get,
-                                       &my_first_nonempty);
-        GC_ASSERT(my_first_nonempty >= GC_mark_stack && 
-                 my_first_nonempty <=
-                   (mse *)AO_load((volatile AO_t *)(&GC_mark_stack_top)) + 1);
-       GC_do_local_mark(local_mark_stack, local_top);
+            if (0 == n_on_stack) {
+                GC_active_count--;
+                GC_ASSERT(GC_active_count <= GC_helper_count);
+                /* Other markers may redeposit objects  */
+                /* on the stack.                                */
+                if (0 == GC_active_count) GC_notify_all_marker();
+                while (GC_active_count > 0
+                       && (mse *)AO_load(&GC_first_nonempty)
+                          > GC_mark_stack_top) {
+                    /* We will be notified if either GC_active_count    */
+                    /* reaches zero, or if more objects are pushed on   */
+                    /* the global mark stack.                           */
+                    GC_wait_marker();
+                }
+                if (GC_active_count == 0 &&
+                    (mse *)AO_load(&GC_first_nonempty) > GC_mark_stack_top) {
+                    GC_bool need_to_notify = FALSE;
+                    /* The above conditions can't be falsified while we */
+                    /* hold the mark lock, since neither                */
+                    /* GC_active_count nor GC_mark_stack_top can        */
+                    /* change.  GC_first_nonempty can only be           */
+                    /* incremented asynchronously.  Thus we know that   */
+                    /* both conditions actually held simultaneously.    */
+                    GC_helper_count--;
+                    if (0 == GC_helper_count) need_to_notify = TRUE;
+                    if (GC_print_stats == VERBOSE)
+                      GC_log_printf(
+                        "Finished mark helper %lu\n", (unsigned long)id);
+                    GC_release_mark_lock();
+                    if (need_to_notify) GC_notify_all_marker();
+                    return;
+                }
+                /* else there's something on the stack again, or        */
+                /* another helper may push something.                   */
+                GC_active_count++;
+                GC_ASSERT(GC_active_count > 0);
+                GC_release_mark_lock();
+                continue;
+            } else {
+                GC_release_mark_lock();
+            }
+        }
+        n_to_get = ENTRIES_TO_GET;
+        if (n_on_stack < 2 * ENTRIES_TO_GET) n_to_get = 1;
+        local_top = GC_steal_mark_stack(my_first_nonempty, my_top,
+                                        local_mark_stack, n_to_get,
+                                        &my_first_nonempty);
+        GC_ASSERT(my_first_nonempty >= GC_mark_stack &&
+                  my_first_nonempty <=
+                    (mse *)AO_load((volatile AO_t *)(&GC_mark_stack_top)) + 1);
+        GC_do_local_mark(local_mark_stack, local_top);
     }
 }
 
-/* Perform Parallel mark.                      */
-/* We hold the GC lock, not the mark lock.     */
-/* Currently runs until the mark stack is      */
-/* empty.                                      */
+/* Perform Parallel mark.                       */
+/* We hold the GC lock, not the mark lock.      */
+/* Currently runs until the mark stack is       */
+/* empty.                                       */
 STATIC void GC_do_parallel_mark(void)
 {
     mse local_mark_stack[LOCAL_MARK_STACK_SIZE];
 
     GC_acquire_mark_lock();
     GC_ASSERT(I_HOLD_LOCK());
-    /* This could be a GC_ASSERT, but it seems safer to keep it on     */
-    /* all the time, especially since it's cheap.                      */
+    /* This could be a GC_ASSERT, but it seems safer to keep it on      */
+    /* all the time, especially since it's cheap.                       */
     if (GC_help_wanted || GC_active_count != 0 || GC_helper_count != 0)
-       ABORT("Tried to start parallel mark in bad state");
+        ABORT("Tried to start parallel mark in bad state");
     if (GC_print_stats == VERBOSE)
-       GC_log_printf("Starting marking for mark phase number %lu\n",
-                  (unsigned long)GC_mark_no);
+        GC_log_printf("Starting marking for mark phase number %lu\n",
+                   (unsigned long)GC_mark_no);
     GC_first_nonempty = (AO_t)GC_mark_stack;
     GC_active_count = 0;
     GC_helper_count = 1;
     GC_help_wanted = TRUE;
     GC_release_mark_lock();
     GC_notify_all_marker();
-       /* Wake up potential helpers.   */
+        /* Wake up potential helpers.   */
     GC_mark_local(local_mark_stack, 0);
     GC_acquire_mark_lock();
     GC_help_wanted = FALSE;
-    /* Done; clean up. */
+    /* Done; clean up.  */
     while (GC_helper_count > 0) GC_wait_marker();
     /* GC_helper_count cannot be incremented while GC_help_wanted == FALSE */
     if (GC_print_stats == VERBOSE)
-       GC_log_printf(
-           "Finished marking for mark phase number %lu\n",
-           (unsigned long)GC_mark_no);
+        GC_log_printf(
+            "Finished marking for mark phase number %lu\n",
+            (unsigned long)GC_mark_no);
     GC_mark_no++;
     GC_release_mark_lock();
     GC_notify_all_marker();
 }
 
 
-/* Try to help out the marker, if it's running.                */
-/* We do not hold the GC lock, but the requestor does. */
-void GC_help_marker(word my_mark_no)
+/* Try to help out the marker, if it's running.         */
+/* We do not hold the GC lock, but the requestor does.  */
+GC_INNER void GC_help_marker(word my_mark_no)
 {
     mse local_mark_stack[LOCAL_MARK_STACK_SIZE];
     unsigned my_id;
@@ -1170,8 +1187,8 @@ void GC_help_marker(word my_mark_no)
     }
     my_id = GC_helper_count;
     if (GC_mark_no != my_mark_no || my_id >= (unsigned)GC_markers) {
-      /* Second test is useful only if original threads can also       */
-      /* act as helpers.  Under Linux they can't.                      */
+      /* Second test is useful only if original threads can also        */
+      /* act as helpers.  Under Linux they can't.                       */
       GC_release_mark_lock();
       return;
     }
@@ -1184,13 +1201,13 @@ void GC_help_marker(word my_mark_no)
 #endif /* PARALLEL_MARK */
 
 /* Allocate or reallocate space for mark stack of size n entries.  */
-/* May silently fail.                                             */
+/* May silently fail.                                              */
 static void alloc_mark_stack(size_t n)
 {
     mse * new_stack = (mse *)GC_scratch_alloc(n * sizeof(struct GC_ms_entry));
 #   ifdef GWW_VDB
-      /* Don't recycle a stack segment obtained with the wrong flags.  */
-      /* Win32 GetWriteWatch requires the right kind of memory.                */
+      /* Don't recycle a stack segment obtained with the wrong flags.   */
+      /* Win32 GetWriteWatch requires the right kind of memory.         */
       static GC_bool GC_incremental_at_stack_alloc = 0;
       GC_bool recycle_old = (!GC_incremental || GC_incremental_at_stack_alloc);
 
@@ -1198,35 +1215,35 @@ static void alloc_mark_stack(size_t n)
 #   else
 #     define recycle_old 1
 #   endif
-    
+
     GC_mark_stack_too_small = FALSE;
     if (GC_mark_stack_size != 0) {
         if (new_stack != 0) {
-         if (recycle_old) {
+          if (recycle_old) {
             /* Recycle old space */
               size_t page_offset = (word)GC_mark_stack & (GC_page_size - 1);
               size_t size = GC_mark_stack_size * sizeof(struct GC_ms_entry);
-             size_t displ = 0;
-          
-             if (0 != page_offset) displ = GC_page_size - page_offset;
-             size = (size - displ) & ~(GC_page_size - 1);
-             if (size > 0) {
-               GC_add_to_heap((struct hblk *)
-                               ((word)GC_mark_stack + displ), (word)size);
-             }
-         }
+              size_t displ = 0;
+
+              if (0 != page_offset) displ = GC_page_size - page_offset;
+              size = (size - displ) & ~(GC_page_size - 1);
+              if (size > 0) {
+                GC_add_to_heap((struct hblk *)
+                                ((word)GC_mark_stack + displ), (word)size);
+              }
+          }
           GC_mark_stack = new_stack;
           GC_mark_stack_size = n;
-         GC_mark_stack_limit = new_stack + n;
-         if (GC_print_stats) {
-             GC_log_printf("Grew mark stack to %lu frames\n",
-                           (unsigned long) GC_mark_stack_size);
-         }
+          GC_mark_stack_limit = new_stack + n;
+          if (GC_print_stats) {
+              GC_log_printf("Grew mark stack to %lu frames\n",
+                            (unsigned long) GC_mark_stack_size);
+          }
         } else {
-         if (GC_print_stats) {
-             GC_log_printf("Failed to grow mark stack to %lu frames\n",
-                           (unsigned long) n);
-         }
+          if (GC_print_stats) {
+              GC_log_printf("Failed to grow mark stack to %lu frames\n",
+                            (unsigned long) n);
+          }
         }
     } else {
         if (new_stack == 0) {
@@ -1235,12 +1252,12 @@ static void alloc_mark_stack(size_t n)
         }
         GC_mark_stack = new_stack;
         GC_mark_stack_size = n;
-       GC_mark_stack_limit = new_stack + n;
+        GC_mark_stack_limit = new_stack + n;
     }
     GC_mark_stack_top = GC_mark_stack-1;
 }
 
-void GC_mark_init(void)
+GC_INNER void GC_mark_init(void)
 {
     alloc_mark_stack(INITIAL_MARK_STACK_SIZE);
 }
@@ -1252,40 +1269,42 @@ void GC_mark_init(void)
  * Should only be used if there is no possibility of mark stack
  * overflow.
  */
-void GC_push_all(ptr_t bottom, ptr_t top)
+GC_INNER void GC_push_all(ptr_t bottom, ptr_t top)
 {
     register word length;
-    
+
     bottom = (ptr_t)(((word) bottom + ALIGNMENT-1) & ~(ALIGNMENT-1));
     top = (ptr_t)(((word) top) & ~(ALIGNMENT-1));
     if (top == 0 || bottom == top) return;
     GC_mark_stack_top++;
     if (GC_mark_stack_top >= GC_mark_stack_limit) {
-       ABORT("unexpected mark stack overflow");
+        ABORT("unexpected mark stack overflow");
     }
     length = top - bottom;
 #   if GC_DS_TAGS > ALIGNMENT - 1
-       length += GC_DS_TAGS;
-       length &= ~GC_DS_TAGS;
+        length += GC_DS_TAGS;
+        length &= ~GC_DS_TAGS;
 #   endif
     GC_mark_stack_top -> mse_start = bottom;
     GC_mark_stack_top -> mse_descr = length;
 }
 
-/*
- * Analogous to the above, but push only those pages h with dirty_fn(h) != 0.
- * We use push_fn to actually push the block.
- * Used both to selectively push dirty pages, or to push a block
- * in piecemeal fashion, to allow for more marking concurrency.
- * Will not overflow mark stack if push_fn pushes a small fixed number
- * of entries.  (This is invoked only if push_fn pushes a single entry,
- * or if it marks each object before pushing it, thus ensuring progress
- * in the event of a stack overflow.)
- */
-void GC_push_selected(ptr_t bottom, ptr_t top,
-                     int (*dirty_fn) (struct hblk *),
-                     void (*push_fn) (ptr_t, ptr_t))
-{
+#ifndef GC_DISABLE_INCREMENTAL
+
+  /*
+   * Analogous to the above, but push only those pages h with
+   * dirty_fn(h) != 0.  We use push_fn to actually push the block.
+   * Used both to selectively push dirty pages, or to push a block
+   * in piecemeal fashion, to allow for more marking concurrency.
+   * Will not overflow mark stack if push_fn pushes a small fixed number
+   * of entries.  (This is invoked only if push_fn pushes a single entry,
+   * or if it marks each object before pushing it, thus ensuring progress
+   * in the event of a stack overflow.)
+   */
+  STATIC void GC_push_selected(ptr_t bottom, ptr_t top,
+                               int (*dirty_fn)(struct hblk *),
+                               void (*push_fn)(ptr_t, ptr_t))
+  {
     struct hblk * h;
 
     bottom = (ptr_t)(((word) bottom + ALIGNMENT-1) & ~(ALIGNMENT-1));
@@ -1294,72 +1313,76 @@ void GC_push_selected(ptr_t bottom, ptr_t top,
     if (top == 0 || bottom == top) return;
     h = HBLKPTR(bottom + HBLKSIZE);
     if (top <= (ptr_t) h) {
-       if ((*dirty_fn)(h-1)) {
-           (*push_fn)(bottom, top);
-       }
-       return;
+        if ((*dirty_fn)(h-1)) {
+            (*push_fn)(bottom, top);
+        }
+        return;
     }
     if ((*dirty_fn)(h-1)) {
         (*push_fn)(bottom, (ptr_t)h);
     }
     while ((ptr_t)(h+1) <= top) {
-       if ((*dirty_fn)(h)) {
-           if ((word)(GC_mark_stack_top - GC_mark_stack)
-               > 3 * GC_mark_stack_size / 4) {
-               /* Danger of mark stack overflow */
-               (*push_fn)((ptr_t)h, top);
-               return;
-           } else {
-               (*push_fn)((ptr_t)h, (ptr_t)(h+1));
-           }
-       }
-       h++;
+        if ((*dirty_fn)(h)) {
+            if ((word)(GC_mark_stack_top - GC_mark_stack)
+                > 3 * GC_mark_stack_size / 4) {
+                /* Danger of mark stack overflow */
+                (*push_fn)((ptr_t)h, top);
+                return;
+            } else {
+                (*push_fn)((ptr_t)h, (ptr_t)(h+1));
+            }
+        }
+        h++;
     }
     if ((ptr_t)h != top) {
-       if ((*dirty_fn)(h)) {
+        if ((*dirty_fn)(h)) {
             (*push_fn)((ptr_t)h, top);
         }
     }
     if (GC_mark_stack_top >= GC_mark_stack_limit) {
         ABORT("unexpected mark stack overflow");
     }
-}
+  }
 
-# ifndef SMALL_CONFIG
+# ifdef PROC_VDB
+    GC_INNER GC_bool GC_page_was_ever_dirty(struct hblk *h);
+                        /* Could the page contain valid heap pointers?  */
+# endif
 
-void GC_push_conditional(ptr_t bottom, ptr_t top, GC_bool all)
-{
+  GC_INNER void GC_push_conditional(ptr_t bottom, ptr_t top, GC_bool all)
+  {
     if (all) {
       if (GC_dirty_maintained) {
-#      ifdef PROC_VDB
-           /* Pages that were never dirtied cannot contain pointers    */
-           GC_push_selected(bottom, top, GC_page_was_ever_dirty, GC_push_all);
-#      else
-           GC_push_all(bottom, top);
-#      endif
+#       ifdef PROC_VDB
+            /* Pages that were never dirtied cannot contain pointers    */
+            GC_push_selected(bottom, top, GC_page_was_ever_dirty,
+                             GC_push_all);
+#       else
+            GC_push_all(bottom, top);
+#       endif
       } else {
-       GC_push_all(bottom, top);
+        GC_push_all(bottom, top);
       }
     } else {
-       GC_push_selected(bottom, top, GC_page_was_dirty, GC_push_all);
+        GC_push_selected(bottom, top, GC_page_was_dirty, GC_push_all);
     }
-}
-#endif
+  }
+#endif /* !GC_DISABLE_INCREMENTAL */
 
-# if defined(MSWIN32) || defined(MSWINCE)
+#if defined(MSWIN32) || defined(MSWINCE)
   void __cdecl GC_push_one(word p)
-# else
+#else
   void GC_push_one(word p)
-# endif
+#endif
 {
     GC_PUSH_ONE_STACK(p, MARKED_FROM_REGISTER);
 }
 
 /*ARGSUSED*/
-struct GC_ms_entry *GC_mark_and_push(void *obj,
-                                    mse *mark_stack_ptr,
-                                    mse *mark_stack_limit,
-                                    void **src)
+GC_API struct GC_ms_entry * GC_CALL GC_mark_and_push(void *obj,
+                                                mse *mark_stack_ptr,
+                                                mse *mark_stack_limit,
+                                                void **src)
 {
     hdr * hhdr;
 
@@ -1367,73 +1390,74 @@ struct GC_ms_entry *GC_mark_and_push(void *obj,
     GET_HDR(obj, hhdr);
     if (EXPECT(IS_FORWARDING_ADDR_OR_NIL(hhdr),FALSE)) {
       if (GC_all_interior_pointers) {
-       hhdr = GC_find_header(GC_base(obj));
-       if (hhdr == 0) {
+        hhdr = GC_find_header(GC_base(obj));
+        if (hhdr == 0) {
           GC_ADD_TO_BLACK_LIST_NORMAL(obj, (ptr_t)src);
-         return mark_stack_ptr;
-       }
+          return mark_stack_ptr;
+        }
       } else {
         GC_ADD_TO_BLACK_LIST_NORMAL(obj, (ptr_t)src);
-       return mark_stack_ptr;
+        return mark_stack_ptr;
       }
     }
     if (EXPECT(HBLK_IS_FREE(hhdr),0)) {
-       GC_ADD_TO_BLACK_LIST_NORMAL(obj, (ptr_t)src);
-       return mark_stack_ptr;
+        GC_ADD_TO_BLACK_LIST_NORMAL(obj, (ptr_t)src);
+        return mark_stack_ptr;
     }
 
     PUSH_CONTENTS_HDR(obj, mark_stack_ptr /* modified */, mark_stack_limit,
-                     (ptr_t)src, was_marked, hhdr, TRUE);
+                      (ptr_t)src, was_marked, hhdr, TRUE);
  was_marked:
     return mark_stack_ptr;
 }
 
-/* Mark and push (i.e. gray) a single object p onto the main   */
-/* mark stack.  Consider p to be valid if it is an interior    */
-/* pointer.                                                    */
-/* The object p has passed a preliminary pointer validity      */
-/* test, but we do not definitely know whether it is valid.    */
-/* Mark bits are NOT atomically updated.  Thus this must be the        */
-/* only thread setting them.                                   */
+/* Mark and push (i.e. gray) a single object p onto the main    */
+/* mark stack.  Consider p to be valid if it is an interior     */
+/* pointer.                                                     */
+/* The object p has passed a preliminary pointer validity       */
+/* test, but we do not definitely know whether it is valid.     */
+/* Mark bits are NOT atomically updated.  Thus this must be the */
+/* only thread setting them.                                    */
 # if defined(PRINT_BLACK_LIST) || defined(KEEP_BACK_PTRS)
-    void GC_mark_and_push_stack(ptr_t p, ptr_t source)
+    GC_INNER void GC_mark_and_push_stack(ptr_t p, ptr_t source)
 # else
-    void GC_mark_and_push_stack(ptr_t p)
+    GC_INNER void GC_mark_and_push_stack(ptr_t p)
 #   define source ((ptr_t)0)
 # endif
 {
-    hdr * hhdr; 
+    hdr * hhdr;
     ptr_t r = p;
-  
+
     PREFETCH(p);
     GET_HDR(p, hhdr);
     if (EXPECT(IS_FORWARDING_ADDR_OR_NIL(hhdr),FALSE)) {
         if (hhdr != 0) {
           r = GC_base(p);
-         hhdr = HDR(r);
-       }
+          hhdr = HDR(r);
+        }
         if (hhdr == 0) {
             GC_ADD_TO_BLACK_LIST_STACK(p, source);
-           return;
-       }
+            return;
+        }
     }
     if (EXPECT(HBLK_IS_FREE(hhdr),0)) {
-       GC_ADD_TO_BLACK_LIST_NORMAL(p, source);
-       return;
+        GC_ADD_TO_BLACK_LIST_NORMAL(p, source);
+        return;
     }
 #   if defined(MANUAL_VDB) && defined(THREADS)
-      /* Pointer is on the stack.  We may have dirtied the object      */
-      /* it points to, but not yet have called GC_dirty();     */
-      GC_dirty(p);     /* Implicitly affects entire object.    */
+      /* Pointer is on the stack.  We may have dirtied the object       */
+      /* it points to, but not yet have called GC_dirty();      */
+      GC_dirty(p);      /* Implicitly affects entire object.    */
 #   endif
     PUSH_CONTENTS_HDR(r, GC_mark_stack_top, GC_mark_stack_limit,
-                     source, mark_and_push_exit, hhdr, FALSE);
+                      source, mark_and_push_exit, hhdr, FALSE);
   mark_and_push_exit: ;
-    /* We silently ignore pointers to near the end of a block, */
-    /* which is very mildly suboptimal.                                */
-    /* FIXME: We should probably add a header word to address  */
-    /* this.                                                   */
+    /* We silently ignore pointers to near the end of a block,  */
+    /* which is very mildly suboptimal.                         */
+    /* FIXME: We should probably add a header word to address   */
+    /* this.                                                    */
 }
+# undef source
 
 # ifdef TRACE_BUF
 
@@ -1464,16 +1488,16 @@ void GC_print_trace(word gc_no, GC_bool lock)
 {
     int i;
     struct trace_entry *p;
-    
+
     if (lock) LOCK();
     for (i = GC_trace_buf_ptr-1; i != GC_trace_buf_ptr; i--) {
-       if (i < 0) i = TRACE_ENTRIES-1;
-       p = GC_trace_buf + i;
-       if (p -> gc_no < gc_no || p -> kind == 0) return;
-       printf("Trace:%s (gc:%u,bytes:%lu) 0x%X, 0x%X\n",
-               p -> kind, (unsigned)p -> gc_no,
-               (unsigned long)p -> bytes_allocd,
-               (p -> arg1) ^ 0x80000000, (p -> arg2) ^ 0x80000000);
+        if (i < 0) i = TRACE_ENTRIES-1;
+        p = GC_trace_buf + i;
+        if (p -> gc_no < gc_no || p -> kind == 0) return;
+        printf("Trace:%s (gc:%u,bytes:%lu) 0x%X, 0x%X\n",
+                p -> kind, (unsigned)p -> gc_no,
+                (unsigned long)p -> bytes_allocd,
+                (p -> arg1) ^ 0x80000000, (p -> arg2) ^ 0x80000000);
     }
     printf("Trace incomplete\n");
     if (lock) UNLOCK();
@@ -1486,7 +1510,7 @@ void GC_print_trace(word gc_no, GC_bool lock)
  * and scans the entire region immediately, in case the contents
  * change.
  */
-void GC_push_all_eager(ptr_t bottom, ptr_t top)
+GC_INNER void GC_push_all_eager(ptr_t bottom, ptr_t top)
 {
     word * b = (word *)(((word) bottom + ALIGNMENT-1) & ~(ALIGNMENT-1));
     word * t = (word *)(((word) top) & ~(ALIGNMENT-1));
@@ -1499,58 +1523,18 @@ void GC_push_all_eager(ptr_t bottom, ptr_t top)
 #   define GC_least_plausible_heap_addr least_ha
 
     if (top == 0) return;
-    /* check all pointers in range and push if they appear     */
-    /* to be valid.                                            */
+    /* check all pointers in range and push if they appear      */
+    /* to be valid.                                             */
       lim = t - 1 /* longword */;
       for (p = b; p <= lim; p = (word *)(((ptr_t)p) + ALIGNMENT)) {
-       q = *p;
-       GC_PUSH_ONE_STACK(q, p);
+        q = *p;
+        GC_PUSH_ONE_STACK(q, p);
       }
 #   undef GC_greatest_plausible_heap_addr
 #   undef GC_least_plausible_heap_addr
 }
 
-#ifndef THREADS
-/*
- * A version of GC_push_all that treats all interior pointers as valid
- * and scans part of the area immediately, to make sure that saved
- * register values are not lost.
- * Cold_gc_frame delimits the stack section that must be scanned
- * eagerly.  A zero value indicates that no eager scanning is needed.
- * We don't need to worry about the MANUAL_VDB case here, since this
- * is only called in the single-threaded case.  We assume that we
- * cannot collect between an assignment and the corresponding
- * GC_dirty() call.
- */
-void GC_push_all_stack_partially_eager(ptr_t bottom, ptr_t top,
-                                      ptr_t cold_gc_frame)
-{
-  if (!NEED_FIXUP_POINTER && GC_all_interior_pointers) {
-    /* Push the hot end of the stack eagerly, so that register values   */
-    /* saved inside GC frames are marked before they disappear.                */
-    /* The rest of the marking can be deferred until later.            */
-    if (0 == cold_gc_frame) {
-       GC_push_all_stack(bottom, top);
-       return;
-    }
-    GC_ASSERT(bottom <= cold_gc_frame && cold_gc_frame <= top);
-#   ifdef STACK_GROWS_DOWN
-       GC_push_all(cold_gc_frame - sizeof(ptr_t), top);
-       GC_push_all_eager(bottom, cold_gc_frame);
-#   else /* STACK_GROWS_UP */
-       GC_push_all(bottom, cold_gc_frame + sizeof(ptr_t));
-       GC_push_all_eager(cold_gc_frame, top);
-#   endif /* STACK_GROWS_UP */
-  } else {
-    GC_push_all_eager(bottom, top);
-  }
-# ifdef TRACE_BUF
-      GC_add_trace_entry("GC_push_all_stack", bottom, top);
-# endif
-}
-#endif /* !THREADS */
-
-void GC_push_all_stack(ptr_t bottom, ptr_t top)
+GC_INNER void GC_push_all_stack(ptr_t bottom, ptr_t top)
 {
 # if defined(THREADS) && defined(MPROTECT_VDB)
     GC_push_all_eager(bottom, top);
@@ -1568,33 +1552,33 @@ void GC_push_all_stack(ptr_t bottom, ptr_t top)
 # if GC_GRANULE_WORDS == 1
 #   define USE_PUSH_MARKED_ACCELERATORS
 #   define PUSH_GRANULE(q) \
-               { word qcontents = (q)[0]; \
-                 GC_PUSH_ONE_HEAP(qcontents, (q)); }
+                { word qcontents = (q)[0]; \
+                  GC_PUSH_ONE_HEAP(qcontents, (q)); }
 # elif GC_GRANULE_WORDS == 2
 #   define USE_PUSH_MARKED_ACCELERATORS
 #   define PUSH_GRANULE(q) \
-               { word qcontents = (q)[0]; \
-                 GC_PUSH_ONE_HEAP(qcontents, (q)); \
-                 qcontents = (q)[1]; \
-                 GC_PUSH_ONE_HEAP(qcontents, (q)+1); }
+                { word qcontents = (q)[0]; \
+                  GC_PUSH_ONE_HEAP(qcontents, (q)); \
+                  qcontents = (q)[1]; \
+                  GC_PUSH_ONE_HEAP(qcontents, (q)+1); }
 # elif GC_GRANULE_WORDS == 4
 #   define USE_PUSH_MARKED_ACCELERATORS
 #   define PUSH_GRANULE(q) \
-               { word qcontents = (q)[0]; \
-                 GC_PUSH_ONE_HEAP(qcontents, (q)); \
-                 qcontents = (q)[1]; \
-                 GC_PUSH_ONE_HEAP(qcontents, (q)+1); \
-                 qcontents = (q)[2]; \
-                 GC_PUSH_ONE_HEAP(qcontents, (q)+2); \
-                 qcontents = (q)[3]; \
-                 GC_PUSH_ONE_HEAP(qcontents, (q)+3); }
+                { word qcontents = (q)[0]; \
+                  GC_PUSH_ONE_HEAP(qcontents, (q)); \
+                  qcontents = (q)[1]; \
+                  GC_PUSH_ONE_HEAP(qcontents, (q)+1); \
+                  qcontents = (q)[2]; \
+                  GC_PUSH_ONE_HEAP(qcontents, (q)+2); \
+                  qcontents = (q)[3]; \
+                  GC_PUSH_ONE_HEAP(qcontents, (q)+3); }
 # endif
 #endif
 
 #ifdef USE_PUSH_MARKED_ACCELERATORS
 /* Push all objects reachable from marked objects in the given block */
-/* containing objects of size 1 granule.                            */
-void GC_push_marked1(struct hblk *h, hdr *hhdr)
+/* containing objects of size 1 granule.                             */
+STATIC void GC_push_marked1(struct hblk *h, hdr *hhdr)
 {
     word * mark_word_addr = &(hhdr->hb_marks[0]);
     word *p;
@@ -1602,9 +1586,9 @@ void GC_push_marked1(struct hblk *h, hdr *hhdr)
     word *q;
     word mark_word;
 
-    /* Allow registers to be used for some frequently acccessed        */
-    /* global variables.  Otherwise aliasing issues are likely */
-    /* to prevent that.                                                */
+    /* Allow registers to be used for some frequently acccessed */
+    /* global variables.  Otherwise aliasing issues are likely  */
+    /* to prevent that.                                         */
     ptr_t greatest_ha = GC_greatest_plausible_heap_addr;
     ptr_t least_ha = GC_least_plausible_heap_addr;
     mse * mark_stack_top = GC_mark_stack_top;
@@ -1613,26 +1597,26 @@ void GC_push_marked1(struct hblk *h, hdr *hhdr)
 #   define GC_mark_stack_limit mark_stack_limit
 #   define GC_greatest_plausible_heap_addr greatest_ha
 #   define GC_least_plausible_heap_addr least_ha
-    
+
     p = (word *)(h->hb_body);
     plim = (word *)(((word)h) + HBLKSIZE);
 
     /* go through all words in block */
-       while( p < plim )  {
-           mark_word = *mark_word_addr++;
-           q = p;
-           while(mark_word != 0) {
-             if (mark_word & 1) {
-                 PUSH_GRANULE(q);
-             }
-             q += GC_GRANULE_WORDS;
-             mark_word >>= 1;
-           }
-           p += WORDSZ*GC_GRANULE_WORDS;
-       }
+        while (p < plim) {
+            mark_word = *mark_word_addr++;
+            q = p;
+            while(mark_word != 0) {
+              if (mark_word & 1) {
+                  PUSH_GRANULE(q);
+              }
+              q += GC_GRANULE_WORDS;
+              mark_word >>= 1;
+            }
+            p += WORDSZ*GC_GRANULE_WORDS;
+        }
 
 #   undef GC_greatest_plausible_heap_addr
-#   undef GC_least_plausible_heap_addr        
+#   undef GC_least_plausible_heap_addr
 #   undef GC_mark_stack_top
 #   undef GC_mark_stack_limit
 
@@ -1640,11 +1624,11 @@ void GC_push_marked1(struct hblk *h, hdr *hhdr)
 }
 
 
-#ifndef UNALIGNED
+#ifndef UNALIGNED_PTRS
 
 /* Push all objects reachable from marked objects in the given block */
-/* of size 2 (granules) objects.                                    */
-void GC_push_marked2(struct hblk *h, hdr *hhdr)
+/* of size 2 (granules) objects.                                     */
+STATIC void GC_push_marked2(struct hblk *h, hdr *hhdr)
 {
     word * mark_word_addr = &(hhdr->hb_marks[0]);
     word *p;
@@ -1661,27 +1645,27 @@ void GC_push_marked2(struct hblk *h, hdr *hhdr)
 #   define GC_mark_stack_limit mark_stack_limit
 #   define GC_greatest_plausible_heap_addr greatest_ha
 #   define GC_least_plausible_heap_addr least_ha
-    
+
     p = (word *)(h->hb_body);
     plim = (word *)(((word)h) + HBLKSIZE);
 
     /* go through all words in block */
-       while( p < plim )  {
-           mark_word = *mark_word_addr++;
-           q = p;
-           while(mark_word != 0) {
-             if (mark_word & 1) {
-                 PUSH_GRANULE(q);
-                 PUSH_GRANULE(q + GC_GRANULE_WORDS);
-             }
-             q += 2 * GC_GRANULE_WORDS;
-             mark_word >>= 2;
-           }
-           p += WORDSZ*GC_GRANULE_WORDS;
-       }
+        while (p < plim) {
+            mark_word = *mark_word_addr++;
+            q = p;
+            while(mark_word != 0) {
+              if (mark_word & 1) {
+                  PUSH_GRANULE(q);
+                  PUSH_GRANULE(q + GC_GRANULE_WORDS);
+              }
+              q += 2 * GC_GRANULE_WORDS;
+              mark_word >>= 2;
+            }
+            p += WORDSZ*GC_GRANULE_WORDS;
+        }
 
 #   undef GC_greatest_plausible_heap_addr
-#   undef GC_least_plausible_heap_addr        
+#   undef GC_least_plausible_heap_addr
 #   undef GC_mark_stack_top
 #   undef GC_mark_stack_limit
 
@@ -1690,10 +1674,10 @@ void GC_push_marked2(struct hblk *h, hdr *hhdr)
 
 # if GC_GRANULE_WORDS < 4
 /* Push all objects reachable from marked objects in the given block */
-/* of size 4 (granules) objects.                                    */
+/* of size 4 (granules) objects.                                     */
 /* There is a risk of mark stack overflow here.  But we handle that. */
 /* And only unmarked objects get pushed, so it's not very likely.    */
-void GC_push_marked4(struct hblk *h, hdr *hhdr)
+STATIC void GC_push_marked4(struct hblk *h, hdr *hhdr)
 {
     word * mark_word_addr = &(hhdr->hb_marks[0]);
     word *p;
@@ -1709,28 +1693,28 @@ void GC_push_marked4(struct hblk *h, hdr *hhdr)
 #   define GC_mark_stack_limit mark_stack_limit
 #   define GC_greatest_plausible_heap_addr greatest_ha
 #   define GC_least_plausible_heap_addr least_ha
-    
+
     p = (word *)(h->hb_body);
     plim = (word *)(((word)h) + HBLKSIZE);
 
     /* go through all words in block */
-       while( p < plim )  {
-           mark_word = *mark_word_addr++;
-           q = p;
-           while(mark_word != 0) {
-             if (mark_word & 1) {
-                 PUSH_GRANULE(q);
-                 PUSH_GRANULE(q + GC_GRANULE_WORDS);
-                 PUSH_GRANULE(q + 2*GC_GRANULE_WORDS);
-                 PUSH_GRANULE(q + 3*GC_GRANULE_WORDS);
-             }
-             q += 4 * GC_GRANULE_WORDS;
-             mark_word >>= 4;
-           }
-           p += WORDSZ*GC_GRANULE_WORDS;
-       }
+        while (p < plim) {
+            mark_word = *mark_word_addr++;
+            q = p;
+            while(mark_word != 0) {
+              if (mark_word & 1) {
+                  PUSH_GRANULE(q);
+                  PUSH_GRANULE(q + GC_GRANULE_WORDS);
+                  PUSH_GRANULE(q + 2*GC_GRANULE_WORDS);
+                  PUSH_GRANULE(q + 3*GC_GRANULE_WORDS);
+              }
+              q += 4 * GC_GRANULE_WORDS;
+              mark_word >>= 4;
+            }
+            p += WORDSZ*GC_GRANULE_WORDS;
+        }
 #   undef GC_greatest_plausible_heap_addr
-#   undef GC_least_plausible_heap_addr        
+#   undef GC_least_plausible_heap_addr
 #   undef GC_mark_stack_top
 #   undef GC_mark_stack_limit
     GC_mark_stack_top = mark_stack_top;
@@ -1738,12 +1722,12 @@ void GC_push_marked4(struct hblk *h, hdr *hhdr)
 
 #endif /* GC_GRANULE_WORDS < 4 */
 
-#endif /* UNALIGNED */
+#endif /* UNALIGNED_PTRS */
 
 #endif /* USE_PUSH_MARKED_ACCELERATORS */
 
 /* Push all objects reachable from marked objects in the given block */
-void GC_push_marked(struct hblk *h, hdr *hhdr)
+STATIC void GC_push_marked(struct hblk *h, hdr *hhdr)
 {
     size_t sz = hhdr -> hb_sz;
     word descr = hhdr -> hb_descr;
@@ -1752,9 +1736,9 @@ void GC_push_marked(struct hblk *h, hdr *hhdr)
     ptr_t lim;
     mse * GC_mark_stack_top_reg;
     mse * mark_stack_limit = GC_mark_stack_limit;
-    
+
     /* Some quick shortcuts: */
-       if ((0 | GC_DS_LENGTH) == descr) return;
+        if ((0 | GC_DS_LENGTH) == descr) return;
         if (GC_block_empty(hhdr)/* nothing marked */) return;
     GC_n_rescuing_pages++;
     GC_objects_are_marked = TRUE;
@@ -1763,13 +1747,13 @@ void GC_push_marked(struct hblk *h, hdr *hhdr)
     } else {
         lim = (h + 1)->hb_body - sz;
     }
-    
+
     switch(BYTES_TO_GRANULES(sz)) {
 #   if defined(USE_PUSH_MARKED_ACCELERATORS)
      case 1:
        GC_push_marked1(h, hhdr);
        break;
-#    if !defined(UNALIGNED)
+#    if !defined(UNALIGNED_PTRS)
        case 2:
          GC_push_marked2(h, hhdr);
          break;
@@ -1779,11 +1763,11 @@ void GC_push_marked(struct hblk *h, hdr *hhdr)
          break;
 #     endif
 #    endif
-#   endif       
+#   endif
      default:
       GC_mark_stack_top_reg = GC_mark_stack_top;
       for (p = h -> hb_body, bit_no = 0; p <= lim;
-          p += sz, bit_no += MARK_BIT_OFFSET(sz)) {
+           p += sz, bit_no += MARK_BIT_OFFSET(sz)) {
          if (mark_bit_from_hdr(hhdr, bit_no)) {
            /* Mark from fields inside the object */
              PUSH_OBJ(p, hhdr, GC_mark_stack_top_reg, mark_stack_limit);
@@ -1793,31 +1777,31 @@ void GC_push_marked(struct hblk *h, hdr *hhdr)
     }
 }
 
-#ifndef SMALL_CONFIG
-/* Test whether any page in the given block is dirty   */
-STATIC GC_bool GC_block_was_dirty(struct hblk *h, hdr *hhdr)
-{
+#ifndef GC_DISABLE_INCREMENTAL
+  /* Test whether any page in the given block is dirty.   */
+  STATIC GC_bool GC_block_was_dirty(struct hblk *h, hdr *hhdr)
+  {
     size_t sz = hhdr -> hb_sz;
-    
+
     if (sz <= MAXOBJBYTES) {
          return(GC_page_was_dirty(h));
     } else {
-        ptr_t p = (ptr_t)h;
+         ptr_t p = (ptr_t)h;
          while (p < (ptr_t)h + sz) {
              if (GC_page_was_dirty((struct hblk *)p)) return(TRUE);
              p += HBLKSIZE;
          }
          return(FALSE);
     }
-}
-#endif /* SMALL_CONFIG */
+  }
+#endif /* GC_DISABLE_INCREMENTAL */
 
-/* Similar to GC_push_marked, but skip over unallocated blocks */
-/* and return address of next plausible block.                 */
-struct hblk * GC_push_next_marked(struct hblk *h)
+/* Similar to GC_push_marked, but skip over unallocated blocks  */
+/* and return address of next plausible block.                  */
+STATIC struct hblk * GC_push_next_marked(struct hblk *h)
 {
     hdr * hhdr = HDR(h);
-    
+
     if (EXPECT(IS_FORWARDING_ADDR_OR_NIL(hhdr) || HBLK_IS_FREE(hhdr), FALSE)) {
       h = GC_next_used_block(h);
       if (h == 0) return(0);
@@ -1827,21 +1811,21 @@ struct hblk * GC_push_next_marked(struct hblk *h)
     return(h + OBJ_SZ_TO_BLOCKS(hhdr -> hb_sz));
 }
 
-#ifndef SMALL_CONFIG
-/* Identical to above, but mark only from dirty pages  */
-struct hblk * GC_push_next_marked_dirty(struct hblk *h)
-{
+#ifndef GC_DISABLE_INCREMENTAL
+  /* Identical to above, but mark only from dirty pages   */
+  STATIC struct hblk * GC_push_next_marked_dirty(struct hblk *h)
+  {
     hdr * hhdr = HDR(h);
-    
+
     if (!GC_dirty_maintained) { ABORT("dirty bits not set up"); }
     for (;;) {
-       if (EXPECT(IS_FORWARDING_ADDR_OR_NIL(hhdr)
-                  || HBLK_IS_FREE(hhdr), FALSE)) {
+        if (EXPECT(IS_FORWARDING_ADDR_OR_NIL(hhdr)
+                   || HBLK_IS_FREE(hhdr), FALSE)) {
           h = GC_next_used_block(h);
           if (h == 0) return(0);
           hhdr = GC_find_header((ptr_t)h);
-       }
-#      ifdef STUBBORN_ALLOC
+        }
+#       ifdef STUBBORN_ALLOC
           if (hhdr -> hb_obj_kind == STUBBORN) {
             if (GC_page_was_changed(h) && GC_block_was_dirty(h, hhdr)) {
                 break;
@@ -1849,35 +1833,34 @@ struct hblk * GC_push_next_marked_dirty(struct hblk *h)
           } else {
             if (GC_block_was_dirty(h, hhdr)) break;
           }
-#      else
-         if (GC_block_was_dirty(h, hhdr)) break;
-#      endif
+#       else
+          if (GC_block_was_dirty(h, hhdr)) break;
+#       endif
         h += OBJ_SZ_TO_BLOCKS(hhdr -> hb_sz);
-       hhdr = HDR(h);
+        hhdr = HDR(h);
     }
     GC_push_marked(h, hhdr);
     return(h + OBJ_SZ_TO_BLOCKS(hhdr -> hb_sz));
-}
-#endif
+  }
+#endif /* !GC_DISABLE_INCREMENTAL */
 
-/* Similar to above, but for uncollectable pages.  Needed since we     */
-/* do not clear marks for such pages, even for full collections.       */
-struct hblk * GC_push_next_marked_uncollectable(struct hblk *h)
+/* Similar to above, but for uncollectable pages.  Needed since we      */
+/* do not clear marks for such pages, even for full collections.        */
+STATIC struct hblk * GC_push_next_marked_uncollectable(struct hblk *h)
 {
     hdr * hhdr = HDR(h);
-    
+
     for (;;) {
-       if (EXPECT(IS_FORWARDING_ADDR_OR_NIL(hhdr)
-                  || HBLK_IS_FREE(hhdr), FALSE)) {
+        if (EXPECT(IS_FORWARDING_ADDR_OR_NIL(hhdr)
+                   || HBLK_IS_FREE(hhdr), FALSE)) {
           h = GC_next_used_block(h);
           if (h == 0) return(0);
           hhdr = GC_find_header((ptr_t)h);
-       }
-       if (hhdr -> hb_obj_kind == UNCOLLECTABLE) break;
+        }
+        if (hhdr -> hb_obj_kind == UNCOLLECTABLE) break;
         h += OBJ_SZ_TO_BLOCKS(hhdr -> hb_sz);
-       hhdr = HDR(h);
+        hhdr = HDR(h);
     }
     GC_push_marked(h, hhdr);
     return(h + OBJ_SZ_TO_BLOCKS(hhdr -> hb_sz));
 }
-
index 3554627a6a1ec24dee6d7cdd232963470a9759a9..f53393e5921e5adbd3303cfb1815e78bb96f34ea 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  *
  * provided the above notices are retained, and a notice that the code was
  * modified is included with the above copyright notice.
  */
-# include <stdio.h>
-# include "private/gc_priv.h"
 
-/* Data structure for list of root sets.                               */
-/* We keep a hash table, so that we can filter out duplicate additions.        */
-/* Under Win32, we need to do a better job of filtering overlaps, so   */
-/* we resort to sequential search, and pay the price.                  */
+#include "private/gc_priv.h"
+
+#include <stdio.h>
+
+/* Data structure for list of root sets.                                */
+/* We keep a hash table, so that we can filter out duplicate additions. */
+/* Under Win32, we need to do a better job of filtering overlaps, so    */
+/* we resort to sequential search, and pay the price.                   */
 /* This is really declared in gc_priv.h:
 struct roots {
-       ptr_t r_start;
-       ptr_t r_end;
- #     if !defined(MSWIN32) && !defined(MSWINCE)
-         struct roots * r_next;
- #     endif
-       GC_bool r_tmp;
-               -- Delete before registering new dynamic libraries
+        ptr_t r_start;
+        ptr_t r_end;
+#       if !defined(MSWIN32) && !defined(MSWINCE)
+          struct roots * r_next;
+#       endif
+        GC_bool r_tmp;
+                -- Delete before registering new dynamic libraries
 };
 
 struct roots GC_static_roots[MAX_ROOT_SETS];
 */
 
-int GC_no_dls = 0;     /* Register dynamic library data segments.      */
+int GC_no_dls = 0;      /* Register dynamic library data segments.      */
 
 static int n_root_sets = 0;
+        /* GC_static_roots[0..n_root_sets) contains the valid root sets. */
 
-       /* GC_static_roots[0..n_root_sets) contains the valid root sets. */
-
-# if !defined(NO_DEBUGGING)
-/* For debugging:      */
-void GC_print_static_roots(void)
-{
-    register int i;
+#if !defined(NO_DEBUGGING)
+  /* For debugging:     */
+  void GC_print_static_roots(void)
+  {
+    int i;
     size_t total = 0;
-    
+
     for (i = 0; i < n_root_sets; i++) {
         GC_printf("From %p to %p%s\n",
-                 GC_static_roots[i].r_start,
-                 GC_static_roots[i].r_end,
-                 GC_static_roots[i].r_tmp ? " (temporary)" : "");
+                  GC_static_roots[i].r_start,
+                  GC_static_roots[i].r_end,
+                  GC_static_roots[i].r_tmp ? " (temporary)" : "");
         total += GC_static_roots[i].r_end - GC_static_roots[i].r_start;
     }
     GC_printf("Total size: %ld\n", (unsigned long) total);
     if (GC_root_size != total) {
-       GC_printf("GC_root_size incorrect: %ld!!\n",
-                 (unsigned long) GC_root_size);
+        GC_err_printf("GC_root_size incorrect: %ld!!\n",
+                      (long) GC_root_size);
     }
-}
-# endif /* NO_DEBUGGING */
-
-/* Primarily for debugging support:    */
-/* Is the address p in one of the registered static                    */
-/* root sections?                                                      */
-GC_bool GC_is_static_root(ptr_t p)
-{
+  }
+#endif /* !NO_DEBUGGING */
+
+#ifndef THREADS
+  /* Primarily for debugging support:     */
+  /* Is the address p in one of the registered static root sections?      */
+  GC_INNER GC_bool GC_is_static_root(ptr_t p)
+  {
     static int last_root_set = MAX_ROOT_SETS;
-    register int i;
-    
-    
+    int i;
+
     if (last_root_set < n_root_sets
-       && p >= GC_static_roots[last_root_set].r_start
+        && p >= GC_static_roots[last_root_set].r_start
         && p < GC_static_roots[last_root_set].r_end) return(TRUE);
     for (i = 0; i < n_root_sets; i++) {
-       if (p >= GC_static_roots[i].r_start
+        if (p >= GC_static_roots[i].r_start
             && p < GC_static_roots[i].r_end) {
             last_root_set = i;
             return(TRUE);
         }
     }
     return(FALSE);
-}
+  }
+#endif /* !THREADS */
 
 #if !defined(MSWIN32) && !defined(MSWINCE)
-/* 
+/*
 #   define LOG_RT_SIZE 6
 #   define RT_SIZE (1 << LOG_RT_SIZE)  -- Power of 2, may be != MAX_ROOT_SETS
 
     struct roots * GC_root_index[RT_SIZE];
-       -- Hash table header.  Used only to check whether a range is
-       -- already present.
-       -- really defined in gc_priv.h
+        -- Hash table header.  Used only to check whether a range is
+        -- already present.
+        -- really defined in gc_priv.h
 */
 
-static INLINE int rt_hash(ptr_t addr)
-{
+  GC_INLINE int rt_hash(ptr_t addr)
+  {
     word result = (word) addr;
 #   if CPP_WORDSZ > 8*LOG_RT_SIZE
-       result ^= result >> 8*LOG_RT_SIZE;
+        result ^= result >> 8*LOG_RT_SIZE;
 #   endif
 #   if CPP_WORDSZ > 4*LOG_RT_SIZE
-       result ^= result >> 4*LOG_RT_SIZE;
+        result ^= result >> 4*LOG_RT_SIZE;
 #   endif
     result ^= result >> 2*LOG_RT_SIZE;
     result ^= result >> LOG_RT_SIZE;
     result &= (RT_SIZE-1);
     return(result);
-}
+  }
 
-/* Is a range starting at b already in the table? If so return a       */
-/* pointer to it, else NIL.                                            */
-struct roots * GC_roots_present(ptr_t b)
-{
+  /* Is a range starting at b already in the table? If so return a        */
+  /* pointer to it, else NIL.                                             */
+  GC_INNER struct roots * GC_roots_present(ptr_t b)
+  {
     int h = rt_hash(b);
     struct roots *p = GC_root_index[h];
-    
+
     while (p != 0) {
         if (p -> r_start == (ptr_t)b) return(p);
         p = p -> r_next;
     }
     return(FALSE);
-}
+  }
 
-/* Add the given root structure to the index. */
-static void add_roots_to_index(struct roots *p)
-{
+  /* Add the given root structure to the index. */
+  GC_INLINE void add_roots_to_index(struct roots *p)
+  {
     int h = rt_hash(p -> r_start);
-    
+
     p -> r_next = GC_root_index[h];
     GC_root_index[h] = p;
-}
-
-# endif
-
-
-
+  }
+#endif /* !MSWIN32 */
 
-word GC_root_size = 0;
+GC_INNER word GC_root_size = 0;
 
 GC_API void GC_CALL GC_add_roots(void *b, void *e)
 {
     DCL_LOCK_STATE;
-    
+
     if (!GC_is_initialized) GC_init();
     LOCK();
     GC_add_roots_inner((ptr_t)b, (ptr_t)e, FALSE);
@@ -149,23 +146,29 @@ GC_API void GC_CALL GC_add_roots(void *b, void *e)
 }
 
 
-/* Add [b,e) to the root set.  Adding the same interval a second time  */
-/* is a moderately fast no-op, and hence benign.  We do not handle     */
-/* different but overlapping intervals efficiently.  (We do handle     */
-/* them correctly.)                                                    */
-/* Tmp specifies that the interval may be deleted before               */
-/* re-registering dynamic libraries.                                   */ 
+/* Add [b,e) to the root set.  Adding the same interval a second time   */
+/* is a moderately fast no-op, and hence benign.  We do not handle      */
+/* different but overlapping intervals efficiently.  (We do handle      */
+/* them correctly.)                                                     */
+/* Tmp specifies that the interval may be deleted before                */
+/* re-registering dynamic libraries.                                    */
 void GC_add_roots_inner(ptr_t b, ptr_t e, GC_bool tmp)
 {
     struct roots * old;
-    
+
+    /* Adjust and check range boundaries for safety */
+    GC_ASSERT((word)b % sizeof(word) == 0);
+    e = (ptr_t)((word)e & ~(sizeof(word) - 1));
+    GC_ASSERT(b <= e);
+    if (b == e) return;  /* nothing to do? */
+
 #   if defined(MSWIN32) || defined(MSWINCE)
-      /* Spend the time to ensure that there are no overlapping        */
-      /* or adjacent intervals.                                        */
-      /* This could be done faster with e.g. a                 */
-      /* balanced tree.  But the execution time here is                */
-      /* virtually guaranteed to be dominated by the time it   */
-      /* takes to scan the roots.                              */
+      /* Spend the time to ensure that there are no overlapping */
+      /* or adjacent intervals.                                 */
+      /* This could be done faster with e.g. a                  */
+      /* balanced tree.  But the execution time here is         */
+      /* virtually guaranteed to be dominated by the time it    */
+      /* takes to scan the roots.                               */
       {
         register int i;
         old = 0; /* initialized to prevent warning. */
@@ -187,7 +190,7 @@ void GC_add_roots_inner(ptr_t b, ptr_t e, GC_bool tmp)
         if (i < n_root_sets) {
           /* merge other overlapping intervals */
             struct roots *other;
-            
+
             for (i++; i < n_root_sets; i++) {
               other = GC_static_roots + i;
               b = other -> r_start;
@@ -238,27 +241,26 @@ void GC_add_roots_inner(ptr_t b, ptr_t e, GC_bool tmp)
 
 static GC_bool roots_were_cleared = FALSE;
 
-GC_API void GC_CALL GC_clear_roots (void)
+GC_API void GC_CALL GC_clear_roots(void)
 {
     DCL_LOCK_STATE;
-    
+
     if (!GC_is_initialized) GC_init();
     LOCK();
     roots_were_cleared = TRUE;
     n_root_sets = 0;
     GC_root_size = 0;
 #   if !defined(MSWIN32) && !defined(MSWINCE)
-    {
-       register int i;
-       
-       for (i = 0; i < RT_SIZE; i++) GC_root_index[i] = 0;
-    }
+      {
+        int i;
+        for (i = 0; i < RT_SIZE; i++) GC_root_index[i] = 0;
+      }
 #   endif
     UNLOCK();
 }
 
-/* Internal use only; lock held.       */
-static void GC_remove_root_at_pos(int i) 
+/* Internal use only; lock held.        */
+STATIC void GC_remove_root_at_pos(int i)
 {
     GC_root_size -= (GC_static_roots[i].r_end - GC_static_roots[i].r_start);
     GC_static_roots[i].r_start = GC_static_roots[n_root_sets-1].r_start;
@@ -268,29 +270,29 @@ static void GC_remove_root_at_pos(int i)
 }
 
 #if !defined(MSWIN32) && !defined(MSWINCE)
-static void GC_rebuild_root_index(void)
-{
+  STATIC void GC_rebuild_root_index(void)
+  {
     int i;
-       
+
     for (i = 0; i < RT_SIZE; i++) GC_root_index[i] = 0;
     for (i = 0; i < n_root_sets; i++)
-       add_roots_to_index(GC_static_roots + i);
-}
+        add_roots_to_index(GC_static_roots + i);
+  }
 #endif
 
 #if defined(DYNAMIC_LOADING) || defined(MSWIN32) || defined(MSWINCE) \
      || defined(PCR)
-/* Internal use only; lock held.       */
+/* Internal use only; lock held.        */
 STATIC void GC_remove_tmp_roots(void)
 {
     int i;
-    
+
     for (i = 0; i < n_root_sets; ) {
-       if (GC_static_roots[i].r_tmp) {
+        if (GC_static_roots[i].r_tmp) {
             GC_remove_root_at_pos(i);
-       } else {
-           i++;
-       }
+        } else {
+            i++;
+        }
     }
 #   if !defined(MSWIN32) && !defined(MSWINCE)
       GC_rebuild_root_index();
@@ -299,62 +301,69 @@ STATIC void GC_remove_tmp_roots(void)
 #endif
 
 #if !defined(MSWIN32) && !defined(MSWINCE)
-GC_API void GC_CALL GC_remove_roots(void *b, void *e)
-{
+  STATIC void GC_remove_roots_inner(ptr_t b, ptr_t e);
+
+  GC_API void GC_CALL GC_remove_roots(void *b, void *e)
+  {
     DCL_LOCK_STATE;
-    
+
+    /* Quick check whether has nothing to do */
+    if ((((word)b + (sizeof(word) - 1)) & ~(sizeof(word) - 1)) >=
+        ((word)e & ~(sizeof(word) - 1)))
+      return;
+
     LOCK();
     GC_remove_roots_inner((ptr_t)b, (ptr_t)e);
     UNLOCK();
-}
+  }
 
-/* Should only be called when the lock is held */
-void GC_remove_roots_inner(ptr_t b, ptr_t e)
-{
+  /* Should only be called when the lock is held */
+  STATIC void GC_remove_roots_inner(ptr_t b, ptr_t e)
+  {
     int i;
     for (i = 0; i < n_root_sets; ) {
-       if (GC_static_roots[i].r_start >= b
-           && GC_static_roots[i].r_end <= e) {
+        if (GC_static_roots[i].r_start >= b
+            && GC_static_roots[i].r_end <= e) {
             GC_remove_root_at_pos(i);
-       } else {
-           i++;
-       }
+        } else {
+            i++;
+        }
     }
     GC_rebuild_root_index();
-}
+  }
 #endif /* !defined(MSWIN32) && !defined(MSWINCE) */
 
-#if defined(MSWIN32) || defined(_WIN32_WCE_EMULATION)
-/* Workaround for the OS mapping and unmapping behind our back:                */
-/* Is the address p in one of the temporary static root sections?      */
-GC_bool GC_is_tmp_root(ptr_t p)
-{
+#if (defined(MSWIN32) || defined(MSWINCE)) && !defined(NO_DEBUGGING)
+  /* Not used at present (except for, may be, debugging purpose).       */
+  /* Workaround for the OS mapping and unmapping behind our back:       */
+  /* Is the address p in one of the temporary static root sections?     */
+  GC_bool GC_is_tmp_root(ptr_t p)
+  {
     static int last_root_set = MAX_ROOT_SETS;
     register int i;
-    
+
     if (last_root_set < n_root_sets
-       && p >= GC_static_roots[last_root_set].r_start
+        && p >= GC_static_roots[last_root_set].r_start
         && p < GC_static_roots[last_root_set].r_end)
-       return GC_static_roots[last_root_set].r_tmp;
+        return GC_static_roots[last_root_set].r_tmp;
     for (i = 0; i < n_root_sets; i++) {
-       if (p >= GC_static_roots[i].r_start
+        if (p >= GC_static_roots[i].r_start
             && p < GC_static_roots[i].r_end) {
             last_root_set = i;
             return GC_static_roots[i].r_tmp;
         }
     }
     return(FALSE);
-}
-#endif /* MSWIN32 || _WIN32_WCE_EMULATION */
+  }
+#endif /* MSWIN32 || MSWINCE */
 
-ptr_t GC_approx_sp(void)
+GC_INNER ptr_t GC_approx_sp(void)
 {
     volatile word sp;
     sp = (word)&sp;
-               /* Also force stack to grow if necessary. Otherwise the */
-               /* later accesses might cause the kernel to think we're */
-               /* doing something wrong.                               */
-
+                /* Also force stack to grow if necessary. Otherwise the */
+                /* later accesses might cause the kernel to think we're */
+                /* doing something wrong.                               */
     return((ptr_t)sp);
 }
 
@@ -368,15 +377,15 @@ struct exclusion {
 };
 
 struct exclusion GC_excl_table[MAX_EXCLUSIONS];
-                                       -- Array of exclusions, ascending
-                                       -- address order.
+                                        -- Array of exclusions, ascending
+                                        -- address order.
 */
 
-STATIC size_t GC_excl_table_entries = 0;/* Number of entries in use.     */
+STATIC size_t GC_excl_table_entries = 0;/* Number of entries in use.      */
 
 /* Return the first exclusion range that includes an address >= start_addr */
-/* Assumes the exclusion table contains at least one entry (namely the    */
-/* GC data structures).                                                           */
+/* Assumes the exclusion table contains at least one entry (namely the     */
+/* GC data structures).                                                    */
 STATIC struct exclusion * GC_next_exclusion(ptr_t start_addr)
 {
     size_t low = 0;
@@ -384,41 +393,46 @@ STATIC struct exclusion * GC_next_exclusion(ptr_t start_addr)
     size_t mid;
 
     while (high > low) {
-       mid = (low + high) >> 1;
-       /* low <= mid < high    */
-       if ((word) GC_excl_table[mid].e_end <= (word) start_addr) {
-           low = mid + 1;
-       } else {
-           high = mid;
-       }
+        mid = (low + high) >> 1;
+        /* low <= mid < high    */
+        if ((word) GC_excl_table[mid].e_end <= (word) start_addr) {
+            low = mid + 1;
+        } else {
+            high = mid;
+        }
     }
     if ((word) GC_excl_table[low].e_end <= (word) start_addr) return 0;
     return GC_excl_table + low;
 }
 
-GC_API void GC_CALL GC_exclude_static_roots(void *start, void *finish)
+/* Should only be called when the lock is held.  The range boundaries   */
+/* should be properly aligned and valid.                                */
+GC_INNER void GC_exclude_static_roots_inner(void *start, void *finish)
 {
     struct exclusion * next;
     size_t next_index, i;
 
+    GC_ASSERT((word)start % sizeof(word) == 0);
+    GC_ASSERT(start < finish);
+
     if (0 == GC_excl_table_entries) {
-       next = 0;
+        next = 0;
     } else {
-       next = GC_next_exclusion(start);
+        next = GC_next_exclusion(start);
     }
     if (0 != next) {
       if ((word)(next -> e_start) < (word) finish) {
-       /* incomplete error check. */
-       ABORT("exclusion ranges overlap");
-      }  
+        /* incomplete error check. */
+        ABORT("exclusion ranges overlap");
+      }
       if ((word)(next -> e_start) == (word) finish) {
-        /* extend old range backwards  */
+        /* extend old range backwards   */
           next -> e_start = (ptr_t)start;
-         return;
+          return;
       }
       next_index = next - GC_excl_table;
       for (i = GC_excl_table_entries; i > next_index; --i) {
-       GC_excl_table[i] = GC_excl_table[i-1];
+        GC_excl_table[i] = GC_excl_table[i-1];
       }
     } else {
       next_index = GC_excl_table_entries;
@@ -429,34 +443,180 @@ GC_API void GC_CALL GC_exclude_static_roots(void *start, void *finish)
     ++GC_excl_table_entries;
 }
 
+GC_API void GC_CALL GC_exclude_static_roots(void *b, void *e)
+{
+    DCL_LOCK_STATE;
+
+    /* Adjust the upper boundary for safety (round down) */
+    e = (void *)((word)e & ~(sizeof(word) - 1));
+
+    if (b == e) return;  /* nothing to exclude? */
+
+    LOCK();
+    GC_exclude_static_roots_inner(b, e);
+    UNLOCK();
+}
+
 /* Invoke push_conditional on ranges that are not excluded. */
 /*ARGSUSED*/
 STATIC void GC_push_conditional_with_exclusions(ptr_t bottom, ptr_t top,
-                                               GC_bool all)
+                                                GC_bool all)
 {
     struct exclusion * next;
     ptr_t excl_start;
 
     while (bottom < top) {
         next = GC_next_exclusion(bottom);
-       if (0 == next || (excl_start = next -> e_start) >= top) {
-           GC_push_conditional(bottom, top, all);
-           return;
-       }
-       if (excl_start > bottom) GC_push_conditional(bottom, excl_start, all);
-       bottom = next -> e_end;
+        if (0 == next || (excl_start = next -> e_start) >= top) {
+            GC_push_conditional(bottom, top, all);
+            return;
+        }
+        if (excl_start > bottom) GC_push_conditional(bottom, excl_start, all);
+        bottom = next -> e_end;
+    }
+}
+
+#ifdef IA64
+  /* Similar to GC_push_all_stack_frames() but for IA-64 registers store. */
+  GC_INNER void GC_push_all_register_frames(ptr_t bs_lo, ptr_t bs_hi,
+                    int eager, struct GC_activation_frame_s *activation_frame)
+  {
+    while (activation_frame != NULL) {
+        ptr_t frame_bs_lo = activation_frame -> backing_store_end;
+        GC_ASSERT(frame_bs_lo <= bs_hi);
+        if (eager) {
+            GC_push_all_eager(frame_bs_lo, bs_hi);
+        } else {
+            GC_push_all_stack(frame_bs_lo, bs_hi);
+        }
+        bs_hi = activation_frame -> saved_backing_store_ptr;
+        activation_frame = activation_frame -> prev;
+    }
+    GC_ASSERT(bs_lo <= bs_hi);
+    if (eager) {
+        GC_push_all_eager(bs_lo, bs_hi);
+    } else {
+        GC_push_all_stack(bs_lo, bs_hi);
+    }
+  }
+#endif /* IA64 */
+
+#ifdef THREADS
+
+GC_INNER void GC_push_all_stack_frames(ptr_t lo, ptr_t hi,
+                        struct GC_activation_frame_s *activation_frame)
+{
+    while (activation_frame != NULL) {
+        GC_ASSERT(lo HOTTER_THAN (ptr_t)activation_frame);
+#       ifdef STACK_GROWS_UP
+            GC_push_all_stack((ptr_t)activation_frame, lo);
+#       else /* STACK_GROWS_DOWN */
+            GC_push_all_stack(lo, (ptr_t)activation_frame);
+#       endif
+        lo = activation_frame -> saved_stack_ptr;
+        GC_ASSERT(lo != NULL);
+        activation_frame = activation_frame -> prev;
+    }
+    GC_ASSERT(!(hi HOTTER_THAN lo));
+#   ifdef STACK_GROWS_UP
+        /* We got them backwards! */
+        GC_push_all_stack(hi, lo);
+#   else /* STACK_GROWS_DOWN */
+        GC_push_all_stack(lo, hi);
+#   endif
+}
+
+#else /* !THREADS */
+
+# ifdef TRACE_BUF
+    /* Defined in mark.c.       */
+    void GC_add_trace_entry(char *kind, word arg1, word arg2);
+# endif
+
+                        /* Similar to GC_push_all_eager, but only the   */
+                        /* part hotter than cold_gc_frame is scanned    */
+                        /* immediately.  Needed to ensure that callee-  */
+                        /* save registers are not missed.               */
+/*
+ * A version of GC_push_all that treats all interior pointers as valid
+ * and scans part of the area immediately, to make sure that saved
+ * register values are not lost.
+ * Cold_gc_frame delimits the stack section that must be scanned
+ * eagerly.  A zero value indicates that no eager scanning is needed.
+ * We don't need to worry about the MANUAL_VDB case here, since this
+ * is only called in the single-threaded case.  We assume that we
+ * cannot collect between an assignment and the corresponding
+ * GC_dirty() call.
+ */
+STATIC void GC_push_all_stack_partially_eager(ptr_t bottom, ptr_t top,
+                                              ptr_t cold_gc_frame)
+{
+  if (!NEED_FIXUP_POINTER && GC_all_interior_pointers) {
+    /* Push the hot end of the stack eagerly, so that register values   */
+    /* saved inside GC frames are marked before they disappear.         */
+    /* The rest of the marking can be deferred until later.             */
+    if (0 == cold_gc_frame) {
+        GC_push_all_stack(bottom, top);
+        return;
     }
+    GC_ASSERT(bottom <= cold_gc_frame && cold_gc_frame <= top);
+#   ifdef STACK_GROWS_DOWN
+        GC_push_all(cold_gc_frame - sizeof(ptr_t), top);
+        GC_push_all_eager(bottom, cold_gc_frame);
+#   else /* STACK_GROWS_UP */
+        GC_push_all(bottom, cold_gc_frame + sizeof(ptr_t));
+        GC_push_all_eager(cold_gc_frame, top);
+#   endif /* STACK_GROWS_UP */
+  } else {
+    GC_push_all_eager(bottom, top);
+  }
+# ifdef TRACE_BUF
+      GC_add_trace_entry("GC_push_all_stack", bottom, top);
+# endif
 }
 
-                       /* Push enough of the current stack eagerly to  */
-                       /* ensure that callee-save registers saved in   */
-                       /* GC frames are scanned.                       */
-                       /* In the non-threads case, schedule entire     */
-                       /* stack for scanning.                          */
-                       /* The second argument is a pointer to the      */
-                       /* (possibly null) thread context, for          */
-                       /* (currently hypothetical) more precise        */
-                       /* stack scanning.                              */
+/* Similar to GC_push_all_stack_frames() but also uses cold_gc_frame.   */
+STATIC void GC_push_all_stack_part_eager_frames(ptr_t lo, ptr_t hi,
+        ptr_t cold_gc_frame, struct GC_activation_frame_s *activation_frame)
+{
+    GC_ASSERT(activation_frame == NULL || cold_gc_frame == NULL ||
+                cold_gc_frame HOTTER_THAN (ptr_t)activation_frame);
+
+    while (activation_frame != NULL) {
+        GC_ASSERT(lo HOTTER_THAN (ptr_t)activation_frame);
+#       ifdef STACK_GROWS_UP
+            GC_push_all_stack_partially_eager((ptr_t)activation_frame, lo,
+                                                cold_gc_frame);
+#       else /* STACK_GROWS_DOWN */
+            GC_push_all_stack_partially_eager(lo, (ptr_t)activation_frame,
+                                                cold_gc_frame);
+#       endif
+        lo = activation_frame -> saved_stack_ptr;
+        GC_ASSERT(lo != NULL);
+        activation_frame = activation_frame -> prev;
+        cold_gc_frame = NULL; /* Use at most once.      */
+    }
+
+    GC_ASSERT(!(hi HOTTER_THAN lo));
+#   ifdef STACK_GROWS_UP
+        /* We got them backwards! */
+        GC_push_all_stack_partially_eager(hi, lo, cold_gc_frame);
+#   else /* STACK_GROWS_DOWN */
+        GC_push_all_stack_partially_eager(lo, hi, cold_gc_frame);
+#   endif
+}
+
+#endif /* !THREADS */
+
+                        /* Push enough of the current stack eagerly to  */
+                        /* ensure that callee-save registers saved in   */
+                        /* GC frames are scanned.                       */
+                        /* In the non-threads case, schedule entire     */
+                        /* stack for scanning.                          */
+                        /* The second argument is a pointer to the      */
+                        /* (possibly null) thread context, for          */
+                        /* (currently hypothetical) more precise        */
+                        /* stack scanning.                              */
 /*
  * In the absence of threads, push the stack contents.
  * In the presence of threads, push enough of the current stack
@@ -468,58 +628,55 @@ STATIC void GC_push_conditional_with_exclusions(ptr_t bottom, ptr_t top,
 STATIC void GC_push_current_stack(ptr_t cold_gc_frame, void * context)
 {
 #   if defined(THREADS)
-       if (0 == cold_gc_frame) return;
+        if (0 == cold_gc_frame) return;
 #       ifdef STACK_GROWS_DOWN
-         GC_push_all_eager(GC_approx_sp(), cold_gc_frame);
-         /* For IA64, the register stack backing store is handled      */
-         /* in the thread-specific code.                               */
+          GC_push_all_eager(GC_approx_sp(), cold_gc_frame);
+          /* For IA64, the register stack backing store is handled      */
+          /* in the thread-specific code.                               */
 #       else
-         GC_push_all_eager( cold_gc_frame, GC_approx_sp() );
+          GC_push_all_eager(cold_gc_frame, GC_approx_sp());
 #       endif
 #   else
-#      ifdef STACK_GROWS_DOWN
-           GC_push_all_stack_partially_eager( GC_approx_sp(), GC_stackbottom,
-                                              cold_gc_frame );
-#          ifdef IA64
-             /* We also need to push the register stack backing store. */
-             /* This should really be done in the same way as the      */
-             /* regular stack.  For now we fudge it a bit.             */
-             /* Note that the backing store grows up, so we can't use  */
-             /* GC_push_all_stack_partially_eager.                     */
-             {
-               extern word GC_save_regs_ret_val;
-                       /* Previously set to backing store pointer.     */
-               ptr_t bsp = (ptr_t) GC_save_regs_ret_val;
-               ptr_t cold_gc_bs_pointer;
-               if (GC_all_interior_pointers) {
-                 cold_gc_bs_pointer = bsp - 2048;
-                 if (cold_gc_bs_pointer < BACKING_STORE_BASE) {
-                   cold_gc_bs_pointer = BACKING_STORE_BASE;
-                 } else {
-                   GC_push_all_stack(BACKING_STORE_BASE, cold_gc_bs_pointer);
-                 }
-               } else {
-                 cold_gc_bs_pointer = BACKING_STORE_BASE;
-               }
-               GC_push_all_eager(cold_gc_bs_pointer, bsp);
-               /* All values should be sufficiently aligned that we    */
-               /* dont have to worry about the boundary.               */
-             }
-#          endif
-#       else
-           GC_push_all_stack_partially_eager( GC_stackbottom, GC_approx_sp(),
-                                              cold_gc_frame );
+        GC_push_all_stack_part_eager_frames(GC_approx_sp(), GC_stackbottom,
+                                        cold_gc_frame, GC_activation_frame);
+#       ifdef IA64
+              /* We also need to push the register stack backing store. */
+              /* This should really be done in the same way as the      */
+              /* regular stack.  For now we fudge it a bit.             */
+              /* Note that the backing store grows up, so we can't use  */
+              /* GC_push_all_stack_partially_eager.                     */
+              {
+                ptr_t bsp = GC_save_regs_ret_val;
+                ptr_t cold_gc_bs_pointer = bsp - 2048;
+                if (GC_all_interior_pointers &&
+                    cold_gc_bs_pointer > BACKING_STORE_BASE) {
+                  /* Adjust cold_gc_bs_pointer if below our innermost   */
+                  /* "activation frame" in backing store.               */
+                  if (GC_activation_frame != NULL && cold_gc_bs_pointer <
+                                GC_activation_frame->backing_store_end)
+                    cold_gc_bs_pointer =
+                                GC_activation_frame->backing_store_end;
+                  GC_push_all_register_frames(BACKING_STORE_BASE,
+                        cold_gc_bs_pointer, FALSE, GC_activation_frame);
+                  GC_push_all_eager(cold_gc_bs_pointer, bsp);
+                } else {
+                  GC_push_all_register_frames(BACKING_STORE_BASE, bsp,
+                                TRUE /* eager */, GC_activation_frame);
+                }
+                /* All values should be sufficiently aligned that we    */
+                /* don't have to worry about the boundary.              */
+              }
 #       endif
 #   endif /* !THREADS */
 }
 
-void (*GC_push_typed_structures) (void) = NULL;
+GC_INNER void (*GC_push_typed_structures)(void) = 0;
 
-                       /* Push GC internal roots.  These are normally  */
-                       /* included in the static data segment, and     */
-                       /* Thus implicitly pushed.  But we must do this */
-                       /* explicitly if normal root processing is      */
-                       /* disabled.                                    */
+                        /* Push GC internal roots.  These are normally  */
+                        /* included in the static data segment, and     */
+                        /* Thus implicitly pushed.  But we must do this */
+                        /* explicitly if normal root processing is      */
+                        /* disabled.                                    */
 /*
  * Push GC internal roots.  Only called if there is some reason to believe
  * these would not otherwise get registered.
@@ -535,10 +692,10 @@ STATIC void GC_push_gc_structures(void)
 }
 
 #ifdef THREAD_LOCAL_ALLOC
-  void GC_mark_thread_local_free_lists(void);
+  GC_INNER void GC_mark_thread_local_free_lists(void);
 #endif
 
-void GC_cond_register_dynamic_libraries(void)
+GC_INNER void GC_cond_register_dynamic_libraries(void)
 {
 # if defined(DYNAMIC_LOADING) || defined(MSWIN32) || defined(MSWINCE) \
      || defined(PCR)
@@ -563,7 +720,7 @@ STATIC void GC_push_regs_and_stack(ptr_t cold_gc_frame)
  * A zero value indicates that it's OK to miss some
  * register values.
  */
-void GC_push_roots(GC_bool all, ptr_t cold_gc_frame)
+GC_INNER void GC_push_roots(GC_bool all, ptr_t cold_gc_frame)
 {
     int i;
     unsigned kind;
@@ -572,11 +729,11 @@ void GC_push_roots(GC_bool all, ptr_t cold_gc_frame)
      * Next push static data.  This must happen early on, since it's
      * not robust against mark stack overflow.
      */
-     /* Re-register dynamic libraries, in case one got added.          */
-     /* There is some argument for doing this as late as possible,     */
-     /* especially on win32, where it can change asynchronously.       */
-     /* In those cases, we do it here.  But on other platforms, it's   */
-     /* not safe with the world stopped, so we do it earlier.          */
+     /* Re-register dynamic libraries, in case one got added.           */
+     /* There is some argument for doing this as late as possible,      */
+     /* especially on win32, where it can change asynchronously.        */
+     /* In those cases, we do it here.  But on other platforms, it's    */
+     /* not safe with the world stopped, so we do it earlier.           */
 #      if !defined(REGISTER_LIBRARIES_EARLY)
          GC_cond_register_dynamic_libraries();
 #      endif
@@ -584,33 +741,33 @@ void GC_push_roots(GC_bool all, ptr_t cold_gc_frame)
      /* Mark everything in static data areas                             */
        for (i = 0; i < n_root_sets; i++) {
          GC_push_conditional_with_exclusions(
-                            GC_static_roots[i].r_start,
-                            GC_static_roots[i].r_end, all);
+                             GC_static_roots[i].r_start,
+                             GC_static_roots[i].r_end, all);
        }
 
-     /* Mark all free list header blocks, if those were allocated from */
-     /* the garbage collected heap.  This makes sure they don't        */
-     /* disappear if we are not marking from static data.  It also     */
-     /* saves us the trouble of scanning them, and possibly that of    */
-     /* marking the freelists.                                         */
+     /* Mark all free list header blocks, if those were allocated from  */
+     /* the garbage collected heap.  This makes sure they don't         */
+     /* disappear if we are not marking from static data.  It also      */
+     /* saves us the trouble of scanning them, and possibly that of     */
+     /* marking the freelists.                                          */
        for (kind = 0; kind < GC_n_kinds; kind++) {
-        void *base = GC_base(GC_obj_kinds[kind].ok_freelist);
-        if (0 != base) {
-          GC_set_mark_bit(base);
-        }
+         void *base = GC_base(GC_obj_kinds[kind].ok_freelist);
+         if (0 != base) {
+           GC_set_mark_bit(base);
+         }
        }
-       
-     /* Mark from GC internal roots if those might otherwise have      */
-     /* been excluded.                                                 */
+
+     /* Mark from GC internal roots if those might otherwise have       */
+     /* been excluded.                                                  */
        if (GC_no_dls || roots_were_cleared) {
-          GC_push_gc_structures();
+           GC_push_gc_structures();
        }
 
-     /* Mark thread local free lists, even if their mark       */
-     /* descriptor excludes the link field.                    */
-     /* If the world is not stopped, this is unsafe.  It is    */
-     /* also unnecessary, since we will do this again with the */
-     /* world stopped.                                         */
+     /* Mark thread local free lists, even if their mark        */
+     /* descriptor excludes the link field.                     */
+     /* If the world is not stopped, this is unsafe.  It is     */
+     /* also unnecessary, since we will do this again with the  */
+     /* world stopped.                                          */
 #      if defined(THREAD_LOCAL_ALLOC)
          if (GC_world_stopped) GC_mark_thread_local_free_lists();
 #      endif
@@ -625,9 +782,8 @@ void GC_push_roots(GC_bool all, ptr_t cold_gc_frame)
       GC_push_regs_and_stack(cold_gc_frame);
 
     if (GC_push_other_roots != 0) (*GC_push_other_roots)();
-       /* In the threads case, this also pushes thread stacks. */
-        /* Note that without interior pointer recognition lots */
-       /* of stuff may have been pushed already, and this      */
-       /* should be careful about mark stack overflows.        */
+        /* In the threads case, this also pushes thread stacks. */
+        /* Note that without interior pointer recognition lots  */
+        /* of stuff may have been pushed already, and this      */
+        /* should be careful about mark stack overflows.        */
 }
-
index d8fc82b5b4e4955d306dda64b9700891869e2348..549788614d600379b278515b1b308b45fa9e54d0 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1999-2001 by Hewlett-Packard Company. All rights reserved.
  * provided the above notices are retained, and a notice that the code was
  * modified is included with the above copyright notice.
  */
-/* Boehm, July 31, 1995 5:02 pm PDT */
 
+#include "private/gc_pmark.h"
 
 #include <stdio.h>
 #include <limits.h>
 #include <stdarg.h>
-#ifndef _WIN32_WCE
-#include <signal.h>
-#endif
 
-#define I_HIDE_POINTERS        /* To make GC_call_with_alloc_lock visible */
-#include "private/gc_pmark.h"
+#ifndef MSWINCE
+# include <signal.h>
+#endif
 
 #ifdef GC_SOLARIS_THREADS
 # include <sys/syscall.h>
 #endif
 #if defined(MSWIN32) || defined(MSWINCE)
-# define WIN32_LEAN_AND_MEAN
+# ifndef WIN32_LEAN_AND_MEAN
+#   define WIN32_LEAN_AND_MEAN 1
+# endif
 # define NOSERVICE
 # include <windows.h>
-# include <tchar.h>
 #endif
 
 #if defined(UNIX_LIKE) || defined(CYGWIN32)
 # include <fcntl.h>
 # include <sys/types.h>
 # include <sys/stat.h>
-
-  int GC_log;  /* Forward decl, so we can set it.      */
 #endif
 
 #ifdef NONSTOP
 
 #if defined(THREADS) && defined(PCR)
 # include "il/PCR_IL.h"
-  PCR_Th_ML GC_allocate_ml;
+  GC_INNER PCR_Th_ML GC_allocate_ml;
 #endif
-/* For other platforms with threads, the lock and possibly             */
-/* GC_lock_holder variables are defined in the thread support code.    */
+/* For other platforms with threads, the lock and possibly              */
+/* GC_lock_holder variables are defined in the thread support code.     */
 
-#if defined(NOSYS) || defined(ECOS)
-#undef STACKBASE
-#endif
-
-/* Dont unnecessarily call GC_register_main_static_data() in case      */
-/* dyn_load.c isn't linked in.                                         */
 #ifdef DYNAMIC_LOADING
+  /* We need to register the main data segment.  Returns  TRUE unless   */
+  /* this is done implicitly as part of dynamic library registration.   */
+  GC_INNER GC_bool GC_register_main_static_data(void);
 # define GC_REGISTER_MAIN_STATIC_DATA() GC_register_main_static_data()
 #else
+  /* Don't unnecessarily call GC_register_main_static_data() in case    */
+  /* dyn_load.c isn't linked in.                                        */
 # define GC_REGISTER_MAIN_STATIC_DATA() TRUE
 #endif
 
-GC_FAR struct _GC_arrays GC_arrays /* = { 0 } */;
-
+#ifdef NEED_CANCEL_DISABLE_COUNT
+  __thread unsigned char GC_cancel_disable_count = 0;
+#endif
 
-GC_bool GC_debugging_started = FALSE;
-       /* defined here so we don't have to load debug_malloc.o */
+GC_FAR struct _GC_arrays GC_arrays /* = { 0 } */;
 
-void (*GC_check_heap) (void) = (void (*) (void))0;
-void (*GC_print_all_smashed) (void) = (void (*) (void))0;
+GC_INNER GC_bool GC_debugging_started = FALSE;
+        /* defined here so we don't have to load debug_malloc.o */
 
-void (*GC_start_call_back) (void) = (void (*) (void))0;
+GC_INNER void (*GC_check_heap)(void) = 0;
+GC_INNER void (*GC_print_all_smashed)(void) = 0;
 
 ptr_t GC_stackbottom = 0;
 
@@ -87,21 +84,22 @@ GC_bool GC_dont_gc = 0;
 
 GC_bool GC_dont_precollect = 0;
 
-GC_bool GC_quiet = 0;
+GC_bool GC_quiet = 0; /* used also in pcr_interface.c */
 
 #ifndef SMALL_CONFIG
   GC_bool GC_print_stats = 0;
 #endif
 
-GC_bool GC_print_back_height = 0;
+GC_INNER GC_bool GC_print_back_height = 0;
 
 #ifndef NO_DEBUGGING
-  GC_bool GC_dump_regularly = 0;  /* Generate regular debugging dumps. */
+  GC_INNER GC_bool GC_dump_regularly = 0;
+                                /* Generate regular debugging dumps. */
 #endif
 
 #ifdef KEEP_BACK_PTRS
-  long GC_backtraces = 0;      /* Number of random backtraces to       */
-                               /* generate for each GC.                */
+  GC_INNER long GC_backtraces = 0;
+                /* Number of random backtraces to generate for each GC. */
 #endif
 
 #ifdef FIND_LEAK
@@ -116,11 +114,19 @@ GC_bool GC_print_back_height = 0;
   int GC_all_interior_pointers = 0;
 #endif
 
-long GC_large_alloc_warn_interval = 5;
-       /* Interval between unsuppressed warnings.      */
+#ifdef GC_FORCE_UNMAP_ON_GCOLLECT
+  /* Has no effect unless USE_MUNMAP.                           */
+  /* Has no effect on implicitly-initiated garbage collections. */
+  GC_INNER GC_bool GC_force_unmap_on_gcollect = TRUE;
+#else
+  GC_INNER GC_bool GC_force_unmap_on_gcollect = FALSE;
+#endif
 
-long GC_large_alloc_warn_suppressed = 0;
-       /* Number of warnings suppressed so far.        */
+#ifndef GC_LARGE_ALLOC_WARN_INTERVAL
+# define GC_LARGE_ALLOC_WARN_INTERVAL 5
+#endif
+GC_INNER long GC_large_alloc_warn_interval = GC_LARGE_ALLOC_WARN_INTERVAL;
+                        /* Interval between unsuppressed warnings.      */
 
 /*ARGSUSED*/
 STATIC void * GC_CALLBACK GC_default_oom_fn(size_t bytes_requested)
@@ -128,48 +134,49 @@ STATIC void * GC_CALLBACK GC_default_oom_fn(size_t bytes_requested)
     return(0);
 }
 
+/* All accesses to it should be synchronized to avoid data races.       */
 GC_oom_func GC_oom_fn = GC_default_oom_fn;
 
-/* Set things up so that GC_size_map[i] >= granules(i),                */
-/* but not too much bigger                                             */
-/* and so that size_map contains relatively few distinct entries       */
-/* This was originally stolen from Russ Atkinson's Cedar               */
-/* quantization algorithm (but we precompute it).                      */ 
+/* Set things up so that GC_size_map[i] >= granules(i),         */
+/* but not too much bigger                                              */
+/* and so that size_map contains relatively few distinct entries        */
+/* This was originally stolen from Russ Atkinson's Cedar                */
+/* quantization algorithm (but we precompute it).                       */
 STATIC void GC_init_size_map(void)
 {
     int i;
 
-    /* Map size 0 to something bigger.                 */
-    /* This avoids problems at lower levels.           */
+    /* Map size 0 to something bigger.                  */
+    /* This avoids problems at lower levels.            */
       GC_size_map[0] = 1;
     for (i = 1; i <= GRANULES_TO_BYTES(TINY_FREELISTS-1) - EXTRA_BYTES; i++) {
         GC_size_map[i] = ROUNDED_UP_GRANULES(i);
 #       ifndef _MSC_VER
           GC_ASSERT(GC_size_map[i] < TINY_FREELISTS);
-         /* Seems to tickle bug in VC++ 2008 for AMD64 */
-#      endif
+          /* Seems to tickle bug in VC++ 2008 for AMD64 */
+#       endif
     }
     /* We leave the rest of the array to be filled in on demand. */
 }
 
 /* Fill in additional entries in GC_size_map, including the ith one */
-/* We assume the ith entry is currently 0.                             */
+/* We assume the ith entry is currently 0.                              */
 /* Note that a filled in section of the array ending at n always    */
-/* has length at least n/4.                                            */
-void GC_extend_size_map(size_t i)
+/* has length at least n/4.                                             */
+GC_INNER void GC_extend_size_map(size_t i)
 {
     size_t orig_granule_sz = ROUNDED_UP_GRANULES(i);
     size_t granule_sz = orig_granule_sz;
     size_t byte_sz = GRANULES_TO_BYTES(granule_sz);
-                       /* The size we try to preserve.         */
-                       /* Close to i, unless this would        */
-                       /* introduce too many distinct sizes.   */
+                        /* The size we try to preserve.         */
+                        /* Close to i, unless this would        */
+                        /* introduce too many distinct sizes.   */
     size_t smaller_than_i = byte_sz - (byte_sz >> 3);
     size_t much_smaller_than_i = byte_sz - (byte_sz >> 2);
-    size_t low_limit;  /* The lowest indexed entry we  */
-                       /* initialize.                  */
+    size_t low_limit;   /* The lowest indexed entry we  */
+                        /* initialize.                  */
     size_t j;
-    
+
     if (GC_size_map[smaller_than_i] == 0) {
         low_limit = much_smaller_than_i;
         while (GC_size_map[low_limit] != 0) low_limit++;
@@ -180,27 +187,27 @@ void GC_extend_size_map(size_t i)
         granule_sz += granule_sz >> 3;
         if (granule_sz < orig_granule_sz) granule_sz = orig_granule_sz;
     }
-    /* For these larger sizes, we use an even number of granules.      */
-    /* This makes it easier to, for example, construct a 16byte-aligned        */
-    /* allocator even if GRANULE_BYTES is 8.                           */
+    /* For these larger sizes, we use an even number of granules.       */
+    /* This makes it easier to, for example, construct a 16byte-aligned */
+    /* allocator even if GRANULE_BYTES is 8.                            */
         granule_sz += 1;
         granule_sz &= ~1;
     if (granule_sz > MAXOBJGRANULES) {
         granule_sz = MAXOBJGRANULES;
     }
-    /* If we can fit the same number of larger objects in a block,     */
-    /* do so.                                                  */ 
+    /* If we can fit the same number of larger objects in a block,      */
+    /* do so.                                                   */
     {
         size_t number_of_objs = HBLK_GRANULES/granule_sz;
         granule_sz = HBLK_GRANULES/number_of_objs;
-       granule_sz &= ~1;
+        granule_sz &= ~1;
     }
     byte_sz = GRANULES_TO_BYTES(granule_sz);
-    /* We may need one extra byte;                     */
-    /* don't always fill in GC_size_map[byte_sz]       */
+    /* We may need one extra byte;                      */
+    /* don't always fill in GC_size_map[byte_sz]        */
     byte_sz -= EXTRA_BYTES;
 
-    for (j = low_limit; j <= byte_sz; j++) GC_size_map[j] = granule_sz;  
+    for (j = low_limit; j <= byte_sz; j++) GC_size_map[j] = granule_sz;
 }
 
 
@@ -213,82 +220,85 @@ void GC_extend_size_map(size_t i)
  * sections of the stack whenever we get control.
  */
 # ifdef THREADS
-#   define BIG_CLEAR_SIZE 2048 /* Clear this much now and then.        */
-#   define SMALL_CLEAR_SIZE 256 /* Clear this much every time.         */
+#   define BIG_CLEAR_SIZE 2048  /* Clear this much now and then.        */
+#   define SMALL_CLEAR_SIZE 256 /* Clear this much every time.          */
 # else
   STATIC word GC_stack_last_cleared = 0; /* GC_no when we last did this */
-  STATIC ptr_t GC_min_sp; /* Coolest stack pointer value from which    */
-                         /* we've already cleared the stack.           */
-  STATIC ptr_t GC_high_water;
-                       /* "hottest" stack pointer value we have seen   */
-                       /* recently.  Degrades over time.               */
-  STATIC word GC_bytes_allocd_at_reset;
+  STATIC ptr_t GC_min_sp = NULL;
+                        /* Coolest stack pointer value from which       */
+                        /* we've already cleared the stack.             */
+  STATIC ptr_t GC_high_water = NULL;
+                        /* "hottest" stack pointer value we have seen   */
+                        /* recently.  Degrades over time.               */
+  STATIC word GC_bytes_allocd_at_reset = 0;
 #   define DEGRADE_RATE 50
 # endif
 
 # define CLEAR_SIZE 213  /* Granularity for GC_clear_stack_inner */
 
 #if defined(ASM_CLEAR_CODE)
-  extern void *GC_clear_stack_inner(void *, ptr_t);
-#else  
-/* Clear the stack up to about limit.  Return arg. */
-/*ARGSUSED*/
-void * GC_clear_stack_inner(void *arg, ptr_t limit)
-{
+  void *GC_clear_stack_inner(void *, ptr_t);
+#else
+  /* Clear the stack up to about limit.  Return arg.  This function is  */
+  /* not static because it could also be errorneously defined in .S     */
+  /* file, so this error would be caught by the linker.                 */
+  /*ARGSUSED*/
+  void * GC_clear_stack_inner(void *arg, ptr_t limit)
+  {
     word dummy[CLEAR_SIZE];
-    
+
     BZERO(dummy, CLEAR_SIZE*sizeof(word));
     if ((ptr_t)(dummy) COOLER_THAN limit) {
         (void) GC_clear_stack_inner(arg, limit);
     }
-    /* Make sure the recursive call is not a tail call, and the bzero  */
-    /* call is not recognized as dead code.                            */
+    /* Make sure the recursive call is not a tail call, and the bzero   */
+    /* call is not recognized as dead code.                             */
     GC_noop1((word)dummy);
     return(arg);
-}
+  }
 #endif
 
-/* Clear some of the inaccessible part of the stack.  Returns its      */
+/* Clear some of the inaccessible part of the stack.  Returns its       */
 /* argument, so it can be used in a tail call position, hence clearing  */
-/* another frame.                                                      */
-void * GC_clear_stack(void *arg)
+/* another frame.                                                       */
+GC_INNER void * GC_clear_stack(void *arg)
 {
     ptr_t sp = GC_approx_sp();  /* Hotter than actual sp */
 #   ifdef THREADS
         word dummy[SMALL_CLEAR_SIZE];
-       static unsigned random_no = 0;
-                                        /* Should be more random than it is ... */
-                                /* Used to occasionally clear a bigger  */
-                                /* chunk.                               */
+        static unsigned random_no = 0;
+                                 /* Should be more random than it is ... */
+                                 /* Used to occasionally clear a bigger  */
+                                 /* chunk.                               */
 #   endif
     ptr_t limit;
-    
+
 #   define SLOP 400
-       /* Extra bytes we clear every time.  This clears our own        */
-       /* activation record, and should cause more frequent            */
-       /* clearing near the cold end of the stack, a good thing.       */
+        /* Extra bytes we clear every time.  This clears our own        */
+        /* activation record, and should cause more frequent            */
+        /* clearing near the cold end of the stack, a good thing.       */
 #   define GC_SLOP 4000
-       /* We make GC_high_water this much hotter than we really saw    */
-       /* saw it, to cover for GC noise etc. above our current frame.  */
+        /* We make GC_high_water this much hotter than we really saw    */
+        /* saw it, to cover for GC noise etc. above our current frame.  */
 #   define CLEAR_THRESHOLD 100000
-       /* We restart the clearing process after this many bytes of     */
-       /* allocation.  Otherwise very heavily recursive programs       */
-       /* with sparse stacks may result in heaps that grow almost      */
-       /* without bounds.  As the heap gets larger, collection         */
-       /* frequency decreases, thus clearing frequency would decrease, */
-       /* thus more junk remains accessible, thus the heap gets        */
-       /* larger ...                                                   */
+        /* We restart the clearing process after this many bytes of     */
+        /* allocation.  Otherwise very heavily recursive programs       */
+        /* with sparse stacks may result in heaps that grow almost      */
+        /* without bounds.  As the heap gets larger, collection         */
+        /* frequency decreases, thus clearing frequency would decrease, */
+        /* thus more junk remains accessible, thus the heap gets        */
+        /* larger ...                                                   */
 # ifdef THREADS
     if (++random_no % 13 == 0) {
-       limit = sp;
-       MAKE_HOTTER(limit, BIG_CLEAR_SIZE*sizeof(word));
-       limit = (ptr_t)((word)limit & ~0xf);
-                       /* Make it sufficiently aligned for assembly    */
-                       /* implementations of GC_clear_stack_inner.     */
-       return GC_clear_stack_inner(arg, limit);
+        limit = sp;
+        MAKE_HOTTER(limit, BIG_CLEAR_SIZE*sizeof(word));
+        limit = (ptr_t)((word)limit & ~0xf);
+                        /* Make it sufficiently aligned for assembly    */
+                        /* implementations of GC_clear_stack_inner.     */
+        return GC_clear_stack_inner(arg, limit);
     } else {
-       BZERO(dummy, SMALL_CLEAR_SIZE*sizeof(word));
-       return arg;
+        BZERO(dummy, SMALL_CLEAR_SIZE*sizeof(word));
+        return arg;
     }
 # else
     if (GC_gc_no > GC_stack_last_cleared) {
@@ -308,24 +318,24 @@ void * GC_clear_stack(void *arg)
     MAKE_HOTTER(limit, SLOP);
     if (sp COOLER_THAN limit) {
         limit = (ptr_t)((word)limit & ~0xf);
-                       /* Make it sufficiently aligned for assembly    */
-                       /* implementations of GC_clear_stack_inner.     */
+                        /* Make it sufficiently aligned for assembly    */
+                        /* implementations of GC_clear_stack_inner.     */
         GC_min_sp = sp;
         return(GC_clear_stack_inner(arg, limit));
     } else if (GC_bytes_allocd - GC_bytes_allocd_at_reset > CLEAR_THRESHOLD) {
-       /* Restart clearing process, but limit how much clearing we do. */
-       GC_min_sp = sp;
-       MAKE_HOTTER(GC_min_sp, CLEAR_THRESHOLD/4);
-       if (GC_min_sp HOTTER_THAN GC_high_water) GC_min_sp = GC_high_water;
-       GC_bytes_allocd_at_reset = GC_bytes_allocd;
-    }  
+        /* Restart clearing process, but limit how much clearing we do. */
+        GC_min_sp = sp;
+        MAKE_HOTTER(GC_min_sp, CLEAR_THRESHOLD/4);
+        if (GC_min_sp HOTTER_THAN GC_high_water) GC_min_sp = GC_high_water;
+        GC_bytes_allocd_at_reset = GC_bytes_allocd;
+    }
     return(arg);
 # endif
 }
 
 
-/* Return a pointer to the base address of p, given a pointer to a     */
-/* an address within an object.  Return 0 o.w.                         */
+/* Return a pointer to the base address of p, given a pointer to a      */
+/* an address within an object.  Return 0 o.w.                          */
 GC_API void * GC_CALL GC_base(void * p)
 {
     ptr_t r;
@@ -333,46 +343,46 @@ GC_API void * GC_CALL GC_base(void * p)
     bottom_index *bi;
     hdr *candidate_hdr;
     ptr_t limit;
-    
+
     r = p;
     if (!GC_is_initialized) return 0;
     h = HBLKPTR(r);
     GET_BI(r, bi);
     candidate_hdr = HDR_FROM_BI(bi, r);
     if (candidate_hdr == 0) return(0);
-    /* If it's a pointer to the middle of a large object, move it      */
-    /* to the beginning.                                               */
-       while (IS_FORWARDING_ADDR_OR_NIL(candidate_hdr)) {
-          h = FORWARDED_ADDR(h,candidate_hdr);
-          r = (ptr_t)h;
-          candidate_hdr = HDR(h);
-       }
+    /* If it's a pointer to the middle of a large object, move it       */
+    /* to the beginning.                                                */
+        while (IS_FORWARDING_ADDR_OR_NIL(candidate_hdr)) {
+           h = FORWARDED_ADDR(h,candidate_hdr);
+           r = (ptr_t)h;
+           candidate_hdr = HDR(h);
+        }
     if (HBLK_IS_FREE(candidate_hdr)) return(0);
     /* Make sure r points to the beginning of the object */
-       r = (ptr_t)((word)r & ~(WORDS_TO_BYTES(1) - 1));
+        r = (ptr_t)((word)r & ~(WORDS_TO_BYTES(1) - 1));
         {
-           size_t offset = HBLKDISPL(r);
-           signed_word sz = candidate_hdr -> hb_sz;
-           size_t obj_displ = offset % sz;
+            size_t offset = HBLKDISPL(r);
+            signed_word sz = candidate_hdr -> hb_sz;
+            size_t obj_displ = offset % sz;
 
-           r -= obj_displ;
+            r -= obj_displ;
             limit = r + sz;
-           if (limit > (ptr_t)(h + 1) && sz <= HBLKSIZE) {
-               return(0);
-           }
-           if ((ptr_t)p >= limit) return(0);
-       }
+            if (limit > (ptr_t)(h + 1) && sz <= HBLKSIZE) {
+                return(0);
+            }
+            if ((ptr_t)p >= limit) return(0);
+        }
     return((void *)r);
 }
 
 
-/* Return the size of an object, given a pointer to its base.          */
-/* (For small objects this also happens to work from interior pointers,        */
-/* but that shouldn't be relied upon.)                                 */
-GC_API size_t GC_CALL GC_size(void * p)
+/* Return the size of an object, given a pointer to its base.           */
+/* (For small objects this also happens to work from interior pointers, */
+/* but that shouldn't be relied upon.)                                  */
+GC_API size_t GC_CALL GC_size(const void * p)
 {
     hdr * hhdr = HDR(p);
-    
+
     return hhdr -> hb_sz;
 }
 
@@ -381,8 +391,8 @@ GC_API size_t GC_CALL GC_get_heap_size(void)
     size_t value;
     DCL_LOCK_STATE;
     LOCK();
-    /* ignore the memory space returned to OS (i.e. count only the     */
-    /* space owned by the garbage collector)                           */
+    /* ignore the memory space returned to OS (i.e. count only the      */
+    /* space owned by the garbage collector)                            */
     value = (size_t)(GC_heapsize - GC_unmapped_bytes);
     UNLOCK();
     return value;
@@ -399,6 +409,18 @@ GC_API size_t GC_CALL GC_get_free_bytes(void)
     return value;
 }
 
+/* The _inner versions assume the caller holds the allocation lock.     */
+/* Declared in gc_mark.h (where other public "inner" functions reside). */
+GC_API size_t GC_CALL GC_get_heap_size_inner(void)
+{
+    return (size_t)(GC_heapsize - GC_unmapped_bytes);
+}
+
+GC_API size_t GC_CALL GC_get_free_bytes_inner(void)
+{
+    return (size_t)(GC_large_free_bytes - GC_unmapped_bytes);
+}
+
 GC_API size_t GC_CALL GC_get_unmapped_bytes(void)
 {
 # ifdef USE_MUNMAP
@@ -433,29 +455,28 @@ GC_API size_t GC_CALL GC_get_total_bytes(void)
     return value;
 }
 
-GC_bool GC_is_initialized = FALSE;
-
-# if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC)
-  extern void GC_init_parallel(void);
-# endif /* PARALLEL_MARK || THREAD_LOCAL_ALLOC */
+#ifdef THREADS
+  GC_API int GC_CALL GC_get_suspend_signal(void)
+  {
+#   ifdef SIG_SUSPEND
+      return SIG_SUSPEND;
+#   else
+      return -1;
+#   endif
+  }
+#endif /* THREADS */
 
-/* FIXME: The GC_init/GC_init_inner distinction should go away. */
-GC_API void GC_CALL GC_init(void)
-{
-    /* LOCK(); -- no longer does anything this early. */
-    GC_init_inner();
-    /* UNLOCK(); */
-}
+GC_INNER GC_bool GC_is_initialized = FALSE;
 
 #if (defined(MSWIN32) || defined(MSWINCE)) && defined(THREADS)
-    CRITICAL_SECTION GC_write_cs;
+    GC_INNER CRITICAL_SECTION GC_write_cs;
 #endif
 
 #ifdef MSWIN32
-    extern void GC_init_win32(void);
+    GC_INNER void GC_init_win32(void);
 #endif
 
-extern void GC_setpagesize(void);
+GC_INNER void GC_setpagesize(void);
 
 STATIC void GC_exit_check(void)
 {
@@ -463,102 +484,118 @@ STATIC void GC_exit_check(void)
 }
 
 #ifdef SEARCH_FOR_DATA_START
-  extern void GC_init_linux_data_start(void);
+  GC_INNER void GC_init_linux_data_start(void);
 #endif
 
 #ifdef UNIX_LIKE
 
-extern void GC_set_and_save_fault_handler(void (*handler)(int));
+  GC_INNER void GC_set_and_save_fault_handler(void (*handler)(int));
 
-static void looping_handler(int sig)
-{
+  static void looping_handler(int sig)
+  {
     GC_err_printf("Caught signal %d: looping in handler\n", sig);
-    for(;;);
-}
+    for (;;) {}
+  }
 
-static GC_bool installed_looping_handler = FALSE;
+  static GC_bool installed_looping_handler = FALSE;
 
-static void maybe_install_looping_handler(void)
-{
-    /* Install looping handler before the write fault handler, so we   */
-    /* handle write faults correctly.                                  */
-      if (!installed_looping_handler && 0 != GETENV("GC_LOOP_ON_ABORT")) {
-        GC_set_and_save_fault_handler(looping_handler);
-        installed_looping_handler = TRUE;
-      }
-}
+  static void maybe_install_looping_handler(void)
+  {
+    /* Install looping handler before the write fault handler, so we    */
+    /* handle write faults correctly.                                   */
+    if (!installed_looping_handler && 0 != GETENV("GC_LOOP_ON_ABORT")) {
+      GC_set_and_save_fault_handler(looping_handler);
+      installed_looping_handler = TRUE;
+    }
+  }
 
 #else /* !UNIX_LIKE */
-
 # define maybe_install_looping_handler()
+#endif
 
+#if defined(DYNAMIC_LOADING) && defined(DARWIN)
+  GC_INNER void GC_init_dyld(void);
 #endif
 
-#if defined(GC_PTHREADS) || defined(GC_WIN32_THREADS)
-  void GC_thr_init(void);
+#if defined(NETBSD) && defined(__ELF__)
+  GC_INNER void GC_init_netbsd_elf(void);
 #endif
 
-void GC_init_inner(void)
+#if !defined(OS2) && !defined(MACOS) && !defined(MSWIN32) && !defined(MSWINCE)
+  STATIC int GC_log = 2;
+#endif
+
+GC_API void GC_CALL GC_init(void)
 {
+    /* LOCK(); -- no longer does anything this early. */
 #   if !defined(THREADS) && defined(GC_ASSERTIONS)
         word dummy;
 #   endif
 
 #   ifdef GC_INITIAL_HEAP_SIZE
-       word initial_heap_sz = divHBLKSZ(GC_INITIAL_HEAP_SIZE);
+        word initial_heap_sz = divHBLKSZ(GC_INITIAL_HEAP_SIZE);
 #   else
-       word initial_heap_sz = (word)MINHINCR;
+        word initial_heap_sz = (word)MINHINCR;
 #   endif
-    
+    IF_CANCEL(int cancel_state;)
+
     if (GC_is_initialized) return;
 
+    DISABLE_CANCEL(cancel_state);
     /* Note that although we are nominally called with the */
-    /* allocation lock held, the allocation lock is now           */
+    /* allocation lock held, the allocation lock is now    */
     /* only really acquired once a second thread is forked.*/
     /* And the initialization code needs to run before     */
     /* then.  Thus we really don't hold any locks, and can */
-    /* in fact safely initialize them here.               */
+    /* in fact safely initialize them here.                */
 #   ifdef THREADS
       GC_ASSERT(!GC_need_to_lock);
 #   endif
 #   if defined(GC_WIN32_THREADS) && !defined(GC_PTHREADS)
-      if (!GC_is_initialized) {
+     {
+#     ifndef MSWINCE
         BOOL (WINAPI *pfn) (LPCRITICAL_SECTION, DWORD) = NULL;
-        HMODULE hK32 = GetModuleHandleA("kernel32.dll");
+        HMODULE hK32 = GetModuleHandle(TEXT("kernel32.dll"));
         if (hK32)
-         pfn = (BOOL (WINAPI *) (LPCRITICAL_SECTION, DWORD))
-               GetProcAddress (hK32,
-                               "InitializeCriticalSectionAndSpinCount");
+          pfn = (BOOL (WINAPI *) (LPCRITICAL_SECTION, DWORD))
+                GetProcAddress (hK32,
+                                "InitializeCriticalSectionAndSpinCount");
         if (pfn)
             pfn(&GC_allocate_ml, 4000);
         else
-         InitializeCriticalSection (&GC_allocate_ml);
-      }
-#endif /* MSWIN32 */
+#     endif /* !MSWINCE */
+        /* else */ InitializeCriticalSection (&GC_allocate_ml);
+     }
+#   endif /* GC_WIN32_THREADS */
 #   if (defined(MSWIN32) || defined(MSWINCE)) && defined(THREADS)
       InitializeCriticalSection(&GC_write_cs);
 #   endif
-#   if (!defined(SMALL_CONFIG))
-      if (0 != GETENV("GC_PRINT_STATS")) {
-        GC_print_stats = 1;
-      } 
-      if (0 != GETENV("GC_PRINT_VERBOSE_STATS")) {
+#   ifndef SMALL_CONFIG
+#     ifdef GC_PRINT_VERBOSE_STATS
+        /* This is useful for debugging and profiling on platforms with */
+        /* missing getenv() (like WinCE).                               */
         GC_print_stats = VERBOSE;
-      } 
+#     else
+        if (0 != GETENV("GC_PRINT_VERBOSE_STATS")) {
+          GC_print_stats = VERBOSE;
+        } else if (0 != GETENV("GC_PRINT_STATS")) {
+          GC_print_stats = 1;
+        }
+#     endif
 #     if defined(UNIX_LIKE) || defined(CYGWIN32)
         {
-         char * file_name = GETENV("GC_LOG_FILE");
+          char * file_name = GETENV("GC_LOG_FILE");
           if (0 != file_name) {
-           int log_d = open(file_name, O_CREAT|O_WRONLY|O_APPEND, 0666);
-           if (log_d < 0) {
-             GC_log_printf("Failed to open %s as log file\n", file_name);
-           } else {
-             GC_log = log_d;
-           }
-         }
-       }
+            int log_d = open(file_name, O_CREAT|O_WRONLY|O_APPEND, 0666);
+            if (log_d < 0) {
+              GC_err_printf("Failed to open %s as log file\n", file_name);
+            } else {
+              GC_log = log_d;
+            }
+          }
+        }
 #     endif
-#   endif
+#   endif /* !SMALL_CONFIG */
 #   ifndef NO_DEBUGGING
       if (0 != GETENV("GC_DUMP_REGULARLY")) {
         GC_dump_regularly = 1;
@@ -569,7 +606,7 @@ void GC_init_inner(void)
         char * backtraces_string = GETENV("GC_BACKTRACES");
         if (0 != backtraces_string) {
           GC_backtraces = atol(backtraces_string);
-         if (backtraces_string[0] == '\0') GC_backtraces = 1;
+          if (backtraces_string[0] == '\0') GC_backtraces = 1;
         }
       }
 #   endif
@@ -593,35 +630,37 @@ void GC_init_inner(void)
       char * addr_string = GETENV("GC_TRACE");
       if (0 != addr_string) {
 #       ifndef ENABLE_TRACE
-         WARN("Tracing not enabled: Ignoring GC_TRACE value\n", 0);
+          WARN("Tracing not enabled: Ignoring GC_TRACE value\n", 0);
 #       else
-         word addr = (word)STRTOULL(addr_string, NULL, 16);
-         if (addr < 0x1000)
-             WARN("Unlikely trace address: %p\n", addr);
-         GC_trace_addr = (ptr_t)addr;
-#      endif
+          word addr = (word)STRTOULL(addr_string, NULL, 16);
+          if (addr < 0x1000)
+              WARN("Unlikely trace address: %p\n", addr);
+          GC_trace_addr = (ptr_t)addr;
+#       endif
       }
     }
-#   ifndef SMALL_CONFIG
+#   ifndef GC_DISABLE_INCREMENTAL
       {
-       char * time_limit_string = GETENV("GC_PAUSE_TIME_TARGET");
-       if (0 != time_limit_string) {
-         long time_limit = atol(time_limit_string);
-         if (time_limit < 5) {
-           WARN("GC_PAUSE_TIME_TARGET environment variable value too small "
-                "or bad syntax: Ignoring\n", 0);
-         } else {
-           GC_time_limit = time_limit;
-         }
-       }
+        char * time_limit_string = GETENV("GC_PAUSE_TIME_TARGET");
+        if (0 != time_limit_string) {
+          long time_limit = atol(time_limit_string);
+          if (time_limit < 5) {
+            WARN("GC_PAUSE_TIME_TARGET environment variable value too small "
+                 "or bad syntax: Ignoring\n", 0);
+          } else {
+            GC_time_limit = time_limit;
+          }
+        }
       }
+#   endif
+#   ifndef SMALL_CONFIG
       {
-       char * full_freq_string = GETENV("GC_FULL_FREQUENCY");
-       if (full_freq_string != NULL) {
-         int full_freq = atoi(full_freq_string);
-         if (full_freq > 0)
-           GC_full_freq = full_freq;
-       }
+        char * full_freq_string = GETENV("GC_FULL_FREQUENCY");
+        if (full_freq_string != NULL) {
+          int full_freq = atoi(full_freq_string);
+          if (full_freq > 0)
+            GC_full_freq = full_freq;
+        }
       }
 #   endif
     {
@@ -629,65 +668,91 @@ void GC_init_inner(void)
       if (0 != interval_string) {
         long interval = atol(interval_string);
         if (interval <= 0) {
-         WARN("GC_LARGE_ALLOC_WARN_INTERVAL environment variable has "
-              "bad value: Ignoring\n", 0);
+          WARN("GC_LARGE_ALLOC_WARN_INTERVAL environment variable has "
+               "bad value: Ignoring\n", 0);
         } else {
-         GC_large_alloc_warn_interval = interval;
+          GC_large_alloc_warn_interval = interval;
         }
       }
     }
     {
-       char * space_divisor_string = GETENV("GC_FREE_SPACE_DIVISOR");
-       if (space_divisor_string != NULL) {
-         int space_divisor = atoi(space_divisor_string);
-         if (space_divisor > 0)
-           GC_free_space_divisor = (GC_word)space_divisor;
-       }
+        char * space_divisor_string = GETENV("GC_FREE_SPACE_DIVISOR");
+        if (space_divisor_string != NULL) {
+          int space_divisor = atoi(space_divisor_string);
+          if (space_divisor > 0)
+            GC_free_space_divisor = (GC_word)space_divisor;
+        }
     }
+#   ifdef USE_MUNMAP
+      {
+        char * string = GETENV("GC_UNMAP_THRESHOLD");
+        if (string != NULL) {
+          if (*string == '0' && *(string + 1) == '\0') {
+            /* "0" is used to disable unmapping. */
+            GC_unmap_threshold = 0;
+          } else {
+            int unmap_threshold = atoi(string);
+            if (unmap_threshold > 0)
+              GC_unmap_threshold = unmap_threshold;
+          }
+        }
+      }
+      {
+        char * string = GETENV("GC_FORCE_UNMAP_ON_GCOLLECT");
+        if (string != NULL) {
+          if (*string == '0' && *(string + 1) == '\0') {
+            /* "0" is used to turn off the mode. */
+            GC_force_unmap_on_gcollect = FALSE;
+          } else {
+            GC_force_unmap_on_gcollect = TRUE;
+          }
+        }
+      }
+#   endif
     maybe_install_looping_handler();
-    /* Adjust normal object descriptor for extra allocation.   */
+    /* Adjust normal object descriptor for extra allocation.    */
     if (ALIGNMENT > GC_DS_TAGS && EXTRA_BYTES != 0) {
       GC_obj_kinds[NORMAL].ok_descriptor = ((word)(-ALIGNMENT) | GC_DS_LENGTH);
     }
     GC_setpagesize();
-    GC_exclude_static_roots(beginGC_arrays, endGC_arrays);
-    GC_exclude_static_roots(beginGC_obj_kinds, endGC_obj_kinds);
+    GC_exclude_static_roots_inner(beginGC_arrays, endGC_arrays);
+    GC_exclude_static_roots_inner(beginGC_obj_kinds, endGC_obj_kinds);
 #   ifdef SEPARATE_GLOBALS
-      GC_exclude_static_roots(beginGC_objfreelist, endGC_objfreelist);
-      GC_exclude_static_roots(beginGC_aobjfreelist, endGC_aobjfreelist);
+      GC_exclude_static_roots_inner(beginGC_objfreelist, endGC_objfreelist);
+      GC_exclude_static_roots_inner(beginGC_aobjfreelist, endGC_aobjfreelist);
 #   endif
 #   ifdef MSWIN32
-       GC_init_win32();
+        GC_init_win32();
 #   endif
 #   if defined(USE_PROC_FOR_LIBRARIES) && defined(GC_LINUX_THREADS)
-       WARN("USE_PROC_FOR_LIBRARIES + GC_LINUX_THREADS performs poorly.\n", 0);
-       /* If thread stacks are cached, they tend to be scanned in      */
-       /* entirety as part of the root set.  This wil grow them to     */
-       /* maximum size, and is generally not desirable.                */
+        WARN("USE_PROC_FOR_LIBRARIES + GC_LINUX_THREADS performs poorly.\n", 0);
+        /* If thread stacks are cached, they tend to be scanned in      */
+        /* entirety as part of the root set.  This wil grow them to     */
+        /* maximum size, and is generally not desirable.                */
 #   endif
 #   if defined(SEARCH_FOR_DATA_START)
-       GC_init_linux_data_start();
+        GC_init_linux_data_start();
 #   endif
-#   if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__)
-       GC_init_netbsd_elf();
+#   if defined(NETBSD) && defined(__ELF__)
+        GC_init_netbsd_elf();
 #   endif
 #   if !defined(THREADS) || defined(GC_PTHREADS) || defined(GC_WIN32_THREADS) \
-       || defined(GC_SOLARIS_THREADS)
+        || defined(GC_SOLARIS_THREADS)
       if (GC_stackbottom == 0) {
-       GC_stackbottom = GC_get_main_stack_base();
+        GC_stackbottom = GC_get_main_stack_base();
 #       if (defined(LINUX) || defined(HPUX)) && defined(IA64)
-         GC_register_stackbottom = GC_get_register_stack_base();
+          GC_register_stackbottom = GC_get_register_stack_base();
 #       endif
       } else {
 #       if (defined(LINUX) || defined(HPUX)) && defined(IA64)
-         if (GC_register_stackbottom == 0) {
-           WARN("GC_register_stackbottom should be set with GC_stackbottom\n", 0);
-           /* The following may fail, since we may rely on             */
-           /* alignment properties that may not hold with a user set   */
-           /* GC_stackbottom.                                          */
-           GC_register_stackbottom = GC_get_register_stack_base();
-         }
-#      endif
+          if (GC_register_stackbottom == 0) {
+            WARN("GC_register_stackbottom should be set with GC_stackbottom\n", 0);
+            /* The following may fail, since we may rely on             */
+            /* alignment properties that may not hold with a user set   */
+            /* GC_stackbottom.                                          */
+            GC_register_stackbottom = GC_get_register_stack_base();
+          }
+#       endif
       }
 #   endif
     GC_STATIC_ASSERT(sizeof (ptr_t) == sizeof(word));
@@ -705,50 +770,48 @@ void GC_init_inner(void)
       /* word should be unsigned */
 #   endif
 #   if !defined(__BORLANDC__) /* Workaround for Borland C */
-       GC_STATIC_ASSERT((ptr_t)(word)(-1) > (ptr_t)0);
-       /* Ptr_t comparisons should behave as unsigned comparisons.     */
+        GC_STATIC_ASSERT((ptr_t)(word)(-1) > (ptr_t)0);
+        /* Ptr_t comparisons should behave as unsigned comparisons.     */
 #   endif
     GC_STATIC_ASSERT((signed_word)(-1) < (signed_word)0);
-#   if !defined(SMALL_CONFIG)
+#   ifndef GC_DISABLE_INCREMENTAL
       if (GC_incremental || 0 != GETENV("GC_ENABLE_INCREMENTAL")) {
-       /* This used to test for !GC_no_win32_dlls.  Why? */
-        GC_setpagesize();
-       /* For GWW_MPROTECT on Win32, this needs to happen before any   */
-       /* heap memory is allocated.                                    */
+        /* For GWW_MPROTECT on Win32, this needs to happen before any   */
+        /* heap memory is allocated.                                    */
         GC_dirty_init();
         GC_ASSERT(GC_bytes_allocd == 0)
-       GC_incremental = TRUE;
+        GC_incremental = TRUE;
       }
-#   endif /* !SMALL_CONFIG */
-    
-    /* Add initial guess of root sets.  Do this first, since sbrk(0)   */
-    /* might be used.                                                  */
+#   endif
+
+    /* Add initial guess of root sets.  Do this first, since sbrk(0)    */
+    /* might be used.                                                   */
       if (GC_REGISTER_MAIN_STATIC_DATA()) GC_register_data_segments();
     GC_init_headers();
     GC_bl_init();
     GC_mark_init();
     {
-       char * sz_str = GETENV("GC_INITIAL_HEAP_SIZE");
-       if (sz_str != NULL) {
-         initial_heap_sz = (word)STRTOULL(sz_str, NULL, 10);
-         if (initial_heap_sz <= MINHINCR * HBLKSIZE) {
-           WARN("Bad initial heap size %s - ignoring it.\n",
-                sz_str);
-         } 
-         initial_heap_sz = divHBLKSZ(initial_heap_sz);
-       }
+        char * sz_str = GETENV("GC_INITIAL_HEAP_SIZE");
+        if (sz_str != NULL) {
+          initial_heap_sz = (word)STRTOULL(sz_str, NULL, 10);
+          if (initial_heap_sz <= MINHINCR * HBLKSIZE) {
+            WARN("Bad initial heap size %s - ignoring it.\n",
+                 sz_str);
+          }
+          initial_heap_sz = divHBLKSZ(initial_heap_sz);
+        }
     }
     {
-       char * sz_str = GETENV("GC_MAXIMUM_HEAP_SIZE");
-       if (sz_str != NULL) {
-         word max_heap_sz = (word)STRTOULL(sz_str, NULL, 10);
-         if (max_heap_sz < initial_heap_sz * HBLKSIZE) {
-           WARN("Bad maximum heap size %s - ignoring it.\n",
-                sz_str);
-         } 
-         if (0 == GC_max_retries) GC_max_retries = 2;
-         GC_set_max_heap_size(max_heap_sz);
-       }
+        char * sz_str = GETENV("GC_MAXIMUM_HEAP_SIZE");
+        if (sz_str != NULL) {
+          word max_heap_sz = (word)STRTOULL(sz_str, NULL, 10);
+          if (max_heap_sz < initial_heap_sz * HBLKSIZE) {
+            WARN("Bad maximum heap size %s - ignoring it.\n",
+                 sz_str);
+          }
+          if (0 == GC_max_retries) GC_max_retries = 2;
+          GC_set_max_heap_size(max_heap_sz);
+        }
     }
     if (!GC_expand_hp_inner(initial_heap_sz)) {
         GC_err_printf("Can't start up: not enough memory\n");
@@ -758,7 +821,7 @@ void GC_init_inner(void)
     GC_register_displacement_inner(0L);
 #   if defined(GC_LINUX_THREADS) && defined(REDIRECT_MALLOC)
       if (!GC_all_interior_pointers) {
-       /* TLS ABI uses pointer-sized offsets for dtv. */
+        /* TLS ABI uses pointer-sized offsets for dtv. */
         GC_register_displacement_inner(sizeof(void *));
       }
 #   endif
@@ -781,96 +844,81 @@ void GC_init_inner(void)
     /* Get black list set up and/or incremental GC started */
       if (!GC_dont_precollect || GC_incremental) GC_gcollect_inner();
 #   ifdef STUBBORN_ALLOC
-       GC_stubborn_init();
+        GC_stubborn_init();
 #   endif
     /* Convince lint that some things are used */
 #   ifdef LINT
       {
-          extern char * GC_copyright[];
-          extern int GC_read();
-          extern void GC_register_finalizer_no_order();
-          
-          GC_noop(GC_copyright, GC_find_header,
-                  GC_push_one, GC_call_with_alloc_lock, GC_read,
-                  GC_dont_expand,
-#                ifndef NO_DEBUGGING
-                   GC_dump,
-#                endif
+          extern char * const GC_copyright[];
+          GC_noop(GC_copyright, GC_find_header, GC_push_one,
+                  GC_call_with_alloc_lock, GC_dont_expand,
+#                 ifndef NO_DEBUGGING
+                    GC_dump,
+#                 endif
                   GC_register_finalizer_no_order);
       }
 #   endif
 
-    /* The rest of this again assumes we don't really hold     */
-    /* the allocation lock.                                    */
+    /* The rest of this again assumes we don't really hold      */
+    /* the allocation lock.                                     */
 #   if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC)
-       /* Make sure marker threads are started and thread local */
-       /* allocation is initialized, in case we didn't get      */
-       /* called from GC_init_parallel();                       */
-        {
-         GC_init_parallel();
-       }
+        /* Make sure marker threads are started and thread local */
+        /* allocation is initialized, in case we didn't get      */
+        /* called from GC_init_parallel.                         */
+        GC_init_parallel();
 #   endif /* PARALLEL_MARK || THREAD_LOCAL_ALLOC */
 
 #   if defined(DYNAMIC_LOADING) && defined(DARWIN)
-    {
-        /* This must be called WITHOUT the allocation lock held
-        and before any threads are created */
-        extern void GC_init_dyld();
+        /* This must be called WITHOUT the allocation lock held */
+        /* and before any threads are created.                  */
         GC_init_dyld();
-    }
 #   endif
+    RESTORE_CANCEL(cancel_state);
 }
 
 GC_API void GC_CALL GC_enable_incremental(void)
 {
-# if !defined(SMALL_CONFIG) && !defined(KEEP_BACK_PTRS)
-  /* If we are keeping back pointers, the GC itself dirties all        */
-  /* pages on which objects have been marked, making           */
-  /* incremental GC pointless.                                 */
-  if (!GC_find_leak && 0 == GETENV("GC_DISABLE_INCREMENTAL")) {
+# if !defined(GC_DISABLE_INCREMENTAL) && !defined(KEEP_BACK_PTRS)
     DCL_LOCK_STATE;
-    
-    LOCK();
-    if (GC_incremental) goto out;
-    GC_setpagesize();
-    /* if (GC_no_win32_dlls) goto out; Should be win32S test? */
-    maybe_install_looping_handler();  /* Before write fault handler! */
-    GC_incremental = TRUE;
-    if (!GC_is_initialized) {
-        GC_init_inner();
-    } else {
-       GC_dirty_init();
-    }
-    if (!GC_dirty_maintained) goto out;
-    if (GC_dont_gc) {
-        /* Can't easily do it. */
-        UNLOCK();
-       return;
+    /* If we are keeping back pointers, the GC itself dirties all */
+    /* pages on which objects have been marked, making            */
+    /* incremental GC pointless.                                  */
+    if (!GC_find_leak && 0 == GETENV("GC_DISABLE_INCREMENTAL")) {
+      LOCK();
+      if (!GC_incremental) {
+        GC_setpagesize();
+        /* if (GC_no_win32_dlls) goto out; Should be win32S test? */
+        maybe_install_looping_handler(); /* Before write fault handler! */
+        GC_incremental = TRUE;
+        if (!GC_is_initialized) {
+          GC_init();
+        } else {
+          GC_dirty_init();
+        }
+        if (GC_dirty_maintained && !GC_dont_gc) {
+                                /* Can't easily do it if GC_dont_gc.    */
+          if (GC_bytes_allocd > 0) {
+            /* There may be unmarked reachable objects. */
+            GC_gcollect_inner();
+          }
+            /* else we're OK in assuming everything's   */
+            /* clean since nothing can point to an      */
+            /* unmarked object.                         */
+          GC_read_dirty();
+        }
+      }
+      UNLOCK();
+      return;
     }
-    if (GC_bytes_allocd > 0) {
-       /* There may be unmarked reachable objects      */
-       GC_gcollect_inner();
-    }   /* else we're OK in assuming everything's      */
-       /* clean since nothing can point to an          */
-       /* unmarked object.                             */
-    GC_read_dirty();
-out:
-    UNLOCK();
-  } else {
-    GC_init();
-  }
-# else
-    GC_init();
 # endif
+  GC_init();
 }
 
 
 #if defined(MSWIN32) || defined(MSWINCE)
-# if defined(_MSC_VER) && defined(_DEBUG)
-#  include <crtdbg.h>
-# endif
-# ifdef OLD_WIN32_LOG_FILE
-#   define LOG_FILE _T("gc.log")
+
+# if defined(_MSC_VER) && defined(_DEBUG) && !defined(MSWINCE)
+#   include <crtdbg.h>
 # endif
 
   STATIC HANDLE GC_stdout = 0;
@@ -879,7 +927,7 @@ out:
   {
 #   ifdef THREADS
       if (GC_is_initialized) {
-       DeleteCriticalSection(&GC_write_cs);
+        DeleteCriticalSection(&GC_write_cs);
       }
 #   endif
   }
@@ -894,64 +942,108 @@ out:
 # define IF_NEED_TO_LOCK(x)
 #endif
 
-  int GC_write(const char *buf, size_t len)
+#ifndef _MAX_PATH
+# define _MAX_PATH MAX_PATH
+#endif
+
+  STATIC HANDLE GC_CreateLogFile(void)
+  {
+#   if !defined(NO_GETENV_WIN32) || !defined(OLD_WIN32_LOG_FILE)
+      TCHAR logPath[_MAX_PATH + 0x10]; /* buffer for path + ext */
+#   endif
+    /* Use GetEnvironmentVariable instead of GETENV() for unicode support. */
+#   ifndef NO_GETENV_WIN32
+      if (GetEnvironmentVariable(TEXT("GC_LOG_FILE"), logPath,
+                                 _MAX_PATH + 1) - 1U >= (DWORD)_MAX_PATH)
+#   endif
+    {
+      /* Env var not found or its value too long.       */
+#     ifdef OLD_WIN32_LOG_FILE
+        return CreateFile(TEXT("gc.log"), GENERIC_WRITE, FILE_SHARE_READ,
+                          NULL /* lpSecurityAttributes */, CREATE_ALWAYS,
+                          FILE_FLAG_WRITE_THROUGH, NULL /* hTemplateFile */);
+#     else
+        int len = (int)GetModuleFileName(NULL /* hModule */, logPath,
+                                         _MAX_PATH + 1);
+        /* If GetModuleFileName() has failed then len is 0. */
+        if (len > 4 && logPath[len - 4] == (TCHAR)'.') {
+          len -= 4; /* strip executable file extension */
+        }
+        /* strcat/wcscat() are deprecated on WinCE, so use memcpy()     */
+        memcpy(&logPath[len], TEXT(".gc.log"), sizeof(TEXT(".gc.log")));
+#     endif
+    }
+#   if !defined(NO_GETENV_WIN32) || !defined(OLD_WIN32_LOG_FILE)
+      return CreateFile(logPath, GENERIC_WRITE, FILE_SHARE_READ,
+                        NULL /* lpSecurityAttributes */, CREATE_ALWAYS,
+                        GC_print_stats == VERBOSE ? FILE_ATTRIBUTE_NORMAL :
+                            /* immediately flush writes unless very verbose */
+                            FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH,
+                        NULL /* hTemplateFile */);
+#   endif
+  }
+
+  STATIC int GC_write(const char *buf, size_t len)
   {
       BOOL tmp;
       DWORD written;
       if (len == 0)
-         return 0;
+          return 0;
       IF_NEED_TO_LOCK(EnterCriticalSection(&GC_write_cs));
+#     ifdef THREADS
+        GC_ASSERT(!GC_write_disabled);
+#     endif
       if (GC_stdout == INVALID_HANDLE_VALUE) {
-         IF_NEED_TO_LOCK(LeaveCriticalSection(&GC_write_cs));
-         return -1;
+          IF_NEED_TO_LOCK(LeaveCriticalSection(&GC_write_cs));
+          return -1;
       } else if (GC_stdout == 0) {
-       char * file_name = GETENV("GC_LOG_FILE");
-       char logPath[_MAX_PATH + 5];
-
-        if (0 == file_name) {
-#         ifdef OLD_WIN32_LOG_FILE
-           strcpy(logPath, LOG_FILE);
-#        else
-           GetModuleFileNameA(NULL, logPath, _MAX_PATH);
-           strcat(logPath, ".log");
-#        endif
-         file_name = logPath;
-       }
-       GC_stdout = CreateFileA(file_name, GENERIC_WRITE,
-                              FILE_SHARE_READ,
-                              NULL, CREATE_ALWAYS, FILE_FLAG_WRITE_THROUGH,
-                              NULL); 
-       if (GC_stdout == INVALID_HANDLE_VALUE)
-           ABORT("Open of log file failed");
+        GC_stdout = GC_CreateLogFile();
+        /* Ignore open log failure if the collector is built with       */
+        /* print_stats always set on.                                   */
+#       ifndef GC_PRINT_VERBOSE_STATS
+          if (GC_stdout == INVALID_HANDLE_VALUE)
+            ABORT("Open of log file failed");
+#       endif
       }
       tmp = WriteFile(GC_stdout, buf, (DWORD)len, &written, NULL);
       if (!tmp)
-         DebugBreak();
+          DebugBreak();
 #     if defined(_MSC_VER) && defined(_DEBUG)
-         _CrtDbgReport(_CRT_WARN, NULL, 0, NULL, "%.*s", len, buf);
+#         ifdef MSWINCE
+              /* There is no CrtDbgReport() in WinCE */
+              {
+                  WCHAR wbuf[1024];
+                  /* Always use Unicode variant of OutputDebugString() */
+                  wbuf[MultiByteToWideChar(CP_ACP, 0 /* dwFlags */,
+                                buf, len, wbuf,
+                                sizeof(wbuf) / sizeof(wbuf[0]) - 1)] = 0;
+                  OutputDebugStringW(wbuf);
+              }
+#         else
+              _CrtDbgReport(_CRT_WARN, NULL, 0, NULL, "%.*s", len, buf);
+#         endif
 #     endif
       IF_NEED_TO_LOCK(LeaveCriticalSection(&GC_write_cs));
       return tmp ? (int)written : -1;
   }
 
-#endif
+#endif /* MSWIN32 */
 
 #if defined(OS2) || defined(MACOS)
-STATIC FILE * GC_stdout = NULL;
-STATIC FILE * GC_stderr = NULL;
-STATIC FILE * GC_log = NULL;
-STATIC int GC_tmp;  /* Should really be local ... */
+  STATIC FILE * GC_stdout = NULL;
+  STATIC FILE * GC_stderr = NULL;
+  STATIC FILE * GC_log = NULL;
 
   STATIC void GC_set_files(void)
   {
       if (GC_stdout == NULL) {
-       GC_stdout = stdout;
+        GC_stdout = stdout;
     }
     if (GC_stderr == NULL) {
-       GC_stderr = stderr;
+        GC_stderr = stderr;
     }
     if (GC_log == NULL) {
-       GC_log = stderr;
+        GC_log = stderr;
     }
   }
 #endif
@@ -959,7 +1051,6 @@ STATIC int GC_tmp;  /* Should really be local ... */
 #if !defined(OS2) && !defined(MACOS) && !defined(MSWIN32) && !defined(MSWINCE)
   STATIC int GC_stdout = 1;
   STATIC int GC_stderr = 2;
-  int GC_log = 2;
 # if !defined(AMIGA)
 #   include <unistd.h>
 # endif
@@ -967,39 +1058,46 @@ STATIC int GC_tmp;  /* Should really be local ... */
 
 #if !defined(MSWIN32) && !defined(MSWINCE) && !defined(OS2) \
     && !defined(MACOS)  && !defined(ECOS) && !defined(NOSYS)
-int GC_write(int fd, const char *buf, size_t len)
+STATIC int GC_write(int fd, const char *buf, size_t len)
 {
-     register int bytes_written = 0;
-     register int result;
-     
+     int bytes_written = 0;
+     int result;
+     IF_CANCEL(int cancel_state;)
+
+     DISABLE_CANCEL(cancel_state);
      while (bytes_written < len) {
-#      ifdef GC_SOLARIS_THREADS
-           result = syscall(SYS_write, fd, buf + bytes_written,
-                                           len - bytes_written);
-#      else
-           result = write(fd, buf + bytes_written, len - bytes_written);
-#      endif
-       if (-1 == result) return(result);
-       bytes_written += result;
+#       ifdef GC_SOLARIS_THREADS
+            result = syscall(SYS_write, fd, buf + bytes_written,
+                                            len - bytes_written);
+#       else
+            result = write(fd, buf + bytes_written, len - bytes_written);
+#       endif
+        if (-1 == result) {
+            RESTORE_CANCEL(cancel_state);
+            return(result);
+        }
+        bytes_written += result;
     }
+    RESTORE_CANCEL(cancel_state);
     return(bytes_written);
 }
 #endif /* UN*X */
 
 #ifdef ECOS
-int GC_write(int fd, const char *buf, size_t len)
-{
-  _Jv_diag_write (buf, len);
-  return len;
-}
+  STATIC int GC_write(int fd, const char *buf, size_t len)
+  {
+    /* FIXME: This seems to be defined nowhere at present. */
+    /* _Jv_diag_write(buf, len); */
+    return len;
+  }
 #endif
 
 #ifdef NOSYS
-int GC_write(int fd, const char *buf, size_t len)
-{
-  /* No writing.  */
-  return len;
-}
+  STATIC int GC_write(int fd, const char *buf, size_t len)
+  {
+    /* No writing.  */
+    return len;
+  }
 #endif
 
 
@@ -1008,9 +1106,10 @@ int GC_write(int fd, const char *buf, size_t len)
 #   define WRITE(f, buf, len) GC_write(buf, len)
 #else
 #   if defined(OS2) || defined(MACOS)
+    static int fwrite_gc_res; /* Should really be local ... */
 #   define WRITE(f, buf, len) (GC_set_files(), \
-                              GC_tmp = fwrite((buf), 1, (len), (f)), \
-                              fflush(f), GC_tmp)
+                               fwrite_gc_res = fwrite((buf), 1, (len), (f)), \
+                               fflush(f), fwrite_gc_res)
 #   else
 #     define WRITE(f, buf, len) GC_write((f), (buf), (len))
 #   endif
@@ -1018,51 +1117,59 @@ int GC_write(int fd, const char *buf, size_t len)
 
 #define BUFSZ 1024
 #ifdef _MSC_VER
-# define vsnprintf _vsnprintf
+# ifdef MSWINCE
+    /* _vsnprintf is deprecated in WinCE */
+#   define vsnprintf StringCchVPrintfA
+# else
+#   define vsnprintf _vsnprintf
+# endif
 #endif
 /* A version of printf that is unlikely to call malloc, and is thus safer */
 /* to call from the collector in case malloc has been bound to GC_malloc. */
-/* Floating point arguments and formats should be avoided, since fp      */
-/* conversion is more likely to allocate.                                */
-/* Assumes that no more than BUFSZ-1 characters are written at once.     */
+/* Floating point arguments and formats should be avoided, since fp       */
+/* conversion is more likely to allocate.                                 */
+/* Assumes that no more than BUFSZ-1 characters are written at once.      */
 void GC_printf(const char *format, ...)
 {
     va_list args;
     char buf[BUFSZ+1];
-    
+
     va_start(args, format);
     if (GC_quiet) return;
     buf[BUFSZ] = 0x15;
     (void) vsnprintf(buf, BUFSZ, format, args);
     va_end(args);
     if (buf[BUFSZ] != 0x15) ABORT("GC_printf clobbered stack");
-    if (WRITE(GC_stdout, buf, strlen(buf)) < 0) ABORT("write to stdout failed");
+    if (WRITE(GC_stdout, buf, strlen(buf)) < 0)
+      ABORT("write to stdout failed");
 }
 
 void GC_err_printf(const char *format, ...)
 {
     va_list args;
     char buf[BUFSZ+1];
-    
+
     va_start(args, format);
     buf[BUFSZ] = 0x15;
     (void) vsnprintf(buf, BUFSZ, format, args);
     va_end(args);
     if (buf[BUFSZ] != 0x15) ABORT("GC_printf clobbered stack");
-    if (WRITE(GC_stderr, buf, strlen(buf)) < 0) ABORT("write to stderr failed");
+    if (WRITE(GC_stderr, buf, strlen(buf)) < 0)
+      ABORT("write to stderr failed");
 }
 
 void GC_log_printf(const char *format, ...)
 {
     va_list args;
     char buf[BUFSZ+1];
-    
+
     va_start(args, format);
     buf[BUFSZ] = 0x15;
     (void) vsnprintf(buf, BUFSZ, format, args);
     va_end(args);
     if (buf[BUFSZ] != 0x15) ABORT("GC_printf clobbered stack");
-    if (WRITE(GC_log, buf, strlen(buf)) < 0) ABORT("write to log failed");
+    if (WRITE(GC_log, buf, strlen(buf)) < 0)
+      ABORT("write to log failed");
 }
 
 void GC_err_puts(const char *s)
@@ -1071,10 +1178,10 @@ void GC_err_puts(const char *s)
 }
 
 #if defined(LINUX) && !defined(SMALL_CONFIG)
-void GC_err_write(const char *buf, size_t len)
-{
+  GC_INNER void GC_err_write(const char *buf, size_t len)
+  {
     if (WRITE(GC_stderr, buf, len) < 0) ABORT("write to stderr failed");
-}
+  }
 #endif
 
 STATIC void GC_CALLBACK GC_default_warn_proc(char *msg, GC_word arg)
@@ -1082,7 +1189,7 @@ STATIC void GC_CALLBACK GC_default_warn_proc(char *msg, GC_word arg)
     GC_err_printf(msg, arg);
 }
 
-GC_warn_proc GC_current_warn_proc = GC_default_warn_proc;
+GC_INNER GC_warn_proc GC_current_warn_proc = GC_default_warn_proc;
 
 /* This is recommended for production code (release). */
 GC_API void GC_CALLBACK GC_ignore_warn_proc(char *msg, GC_word arg)
@@ -1098,10 +1205,10 @@ GC_API void GC_CALL GC_set_warn_proc(GC_warn_proc p)
     GC_ASSERT(p != 0);
 #   ifdef GC_WIN32_THREADS
 #     ifdef CYGWIN32
-       /* Need explicit GC_INIT call */
+        /* Need explicit GC_INIT call */
         GC_ASSERT(GC_is_initialized);
 #     else
-       if (!GC_is_initialized) GC_init();
+        if (!GC_is_initialized) GC_init();
 #     endif
 #   endif
     LOCK();
@@ -1119,31 +1226,51 @@ GC_API GC_warn_proc GC_CALL GC_get_warn_proc(void)
 }
 
 #if !defined(PCR) && !defined(SMALL_CONFIG)
-void GC_abort(const char *msg)
-{
-#   if defined(MSWIN32) && !defined(DONT_USE_USER32_DLL)
-      (void) MessageBoxA(NULL, msg, "Fatal error in gc", MB_ICONERROR|MB_OK);
-#   else
-      /* Avoid calling GC_err_printf() here, as GC_abort() could be    */
-      /* called from it.  Note 1: this is not an atomic output.                */
-      /* Note 2: possible write errors are ignored.                    */
-      if (WRITE(GC_stderr, (void *)msg, strlen(msg)) >= 0)
-       (void)WRITE(GC_stderr, (void *)("\n"), 1);
+  /* Abort the program with a message. msg must not be NULL. */
+  void GC_abort(const char *msg)
+  {
+#   if defined(MSWIN32)
+#     ifndef DONT_USE_USER32_DLL
+        /* Use static binding to "user32.dll".  */
+        (void)MessageBoxA(NULL, msg, "Fatal error in GC", MB_ICONERROR|MB_OK);
+#     else
+        /* This simplifies linking - resolve "MessageBoxA" at run-time. */
+        HINSTANCE hU32 = LoadLibrary(TEXT("user32.dll"));
+        if (hU32) {
+          FARPROC pfn = GetProcAddress(hU32, "MessageBoxA");
+          if (pfn)
+            (void)(*(int (WINAPI *)(HWND, LPCSTR, LPCSTR, UINT))pfn)(
+                                NULL /* hWnd */, msg, "Fatal error in GC",
+                                MB_ICONERROR | MB_OK);
+          (void)FreeLibrary(hU32);
+        }
+#     endif
+      /* Also duplicate msg to GC log file.     */
 #   endif
+      /* Avoid calling GC_err_printf() here, as GC_abort() could be     */
+      /* called from it.  Note 1: this is not an atomic output.         */
+      /* Note 2: possible write errors are ignored.                     */
+      if (WRITE(GC_stderr, (void *)msg, strlen(msg)) >= 0)
+        (void)WRITE(GC_stderr, (void *)("\n"), 1);
+
     if (GETENV("GC_LOOP_ON_ABORT") != NULL) {
-           /* In many cases it's easier to debug a running process.    */
-           /* It's arguably nicer to sleep, but that makes it harder   */
-           /* to look at the thread if the debugger doesn't know much  */
-           /* about threads.                                           */
-           for(;;) {}
+            /* In many cases it's easier to debug a running process.    */
+            /* It's arguably nicer to sleep, but that makes it harder   */
+            /* to look at the thread if the debugger doesn't know much  */
+            /* about threads.                                           */
+            for(;;) {}
     }
-#   if defined(MSWIN32) || defined(MSWINCE)
-       DebugBreak();
+#   if defined(MSWIN32) && defined(NO_DEBUGGING)
+      /* A more user-friendly abort after showing fatal message.        */
+      if (msg) /* to suppress compiler warnings in ABORT callers. */
+        _exit(-1); /* exit on error without running "at-exit" callbacks */
+#   elif defined(MSWIN32) || defined(MSWINCE)
+        DebugBreak();
 #   else
         (void) abort();
 #   endif
-}
-#endif
+  }
+#endif /* !SMALL_CONFIG */
 
 GC_API void GC_CALL GC_enable(void)
 {
@@ -1159,17 +1286,17 @@ GC_API void GC_CALL GC_disable(void)
     UNLOCK();
 }
 
-/* Helper procedures for new kind creation.    */
-void ** GC_new_free_list_inner(void)
+/* Helper procedures for new kind creation.     */
+GC_API void ** GC_CALL GC_new_free_list_inner(void)
 {
     void *result = GC_INTERNAL_MALLOC((MAXOBJGRANULES+1)*sizeof(ptr_t),
-                                     PTRFREE);
+                                      PTRFREE);
     if (result == 0) ABORT("Failed to allocate freelist for new kind");
     BZERO(result, (MAXOBJGRANULES+1)*sizeof(ptr_t));
     return result;
 }
 
-void ** GC_new_free_list(void)
+GC_API void ** GC_CALL GC_new_free_list(void)
 {
     void *result;
     LOCK();
@@ -1178,7 +1305,8 @@ void ** GC_new_free_list(void)
     return result;
 }
 
-unsigned GC_new_kind_inner(void **fl, GC_word descr, int adjust, int clear)
+GC_API unsigned GC_CALL GC_new_kind_inner(void **fl, GC_word descr,
+                                        int adjust, int clear)
 {
     unsigned result = GC_n_kinds++;
 
@@ -1191,7 +1319,8 @@ unsigned GC_new_kind_inner(void **fl, GC_word descr, int adjust, int clear)
     return result;
 }
 
-unsigned GC_new_kind(void **fl, GC_word descr, int adjust, int clear)
+GC_API unsigned GC_CALL GC_new_kind(void **fl, GC_word descr, int adjust,
+                                    int clear)
 {
     unsigned result;
     LOCK();
@@ -1200,7 +1329,7 @@ unsigned GC_new_kind(void **fl, GC_word descr, int adjust, int clear)
     return result;
 }
 
-unsigned GC_new_proc_inner(GC_mark_proc proc)
+GC_API unsigned GC_CALL GC_new_proc_inner(GC_mark_proc proc)
 {
     unsigned result = GC_n_mark_procs++;
 
@@ -1209,7 +1338,7 @@ unsigned GC_new_proc_inner(GC_mark_proc proc)
     return result;
 }
 
-unsigned GC_new_proc(GC_mark_proc proc)
+GC_API unsigned GC_CALL GC_new_proc(GC_mark_proc proc)
 {
     unsigned result;
     LOCK();
@@ -1226,16 +1355,121 @@ GC_API void * GC_CALL GC_call_with_stack_base(GC_stack_base_func fn, void *arg)
     base.mem_base = (void *)&dummy;
 #   ifdef IA64
       base.reg_base = (void *)GC_save_regs_in_stack();
-      /* Unnecessarily flushes register stack,                 */
-      /* but that probably doesn't hurt.               */
+      /* Unnecessarily flushes register stack,          */
+      /* but that probably doesn't hurt.                */
 #   endif
     return fn(&base, arg);
 }
 
-#if !defined(NO_DEBUGGING)
+#ifdef THREADS
 
-GC_API void GC_CALL GC_dump(void)
+  /* Defined in pthread_support.c or win32_threads.c.     */
+  GC_INNER void GC_do_blocking_inner(ptr_t data, void * context);
+
+#else
+
+GC_INNER ptr_t GC_blocked_sp = NULL;
+        /* NULL value means we are not inside GC_do_blocking() call. */
+# ifdef IA64
+    STATIC ptr_t GC_blocked_register_sp = NULL;
+# endif
+
+GC_INNER struct GC_activation_frame_s *GC_activation_frame = NULL;
+
+/* This is nearly the same as in win32_threads.c        */
+GC_API void * GC_CALL GC_call_with_gc_active(GC_fn_type fn,
+                                             void * client_data)
+{
+    struct GC_activation_frame_s frame;
+    GC_ASSERT(GC_is_initialized);
+
+    /* Adjust our stack base value (this could happen if        */
+    /* GC_get_main_stack_base() is unimplemented or broken for  */
+    /* the platform).                                           */
+    if (GC_stackbottom HOTTER_THAN (ptr_t)(&frame))
+      GC_stackbottom = (ptr_t)(&frame);
+
+    if (GC_blocked_sp == NULL) {
+      /* We are not inside GC_do_blocking() - do nothing more.  */
+      return fn(client_data);
+    }
+
+    /* Setup new "frame".       */
+    frame.saved_stack_ptr = GC_blocked_sp;
+#   ifdef IA64
+      /* This is the same as in GC_call_with_stack_base().      */
+      frame.backing_store_end = GC_save_regs_in_stack();
+      /* Unnecessarily flushes register stack,          */
+      /* but that probably doesn't hurt.                */
+      frame.saved_backing_store_ptr = GC_blocked_register_sp;
+#   endif
+    frame.prev = GC_activation_frame;
+    GC_blocked_sp = NULL;
+    GC_activation_frame = &frame;
+
+    client_data = fn(client_data);
+    GC_ASSERT(GC_blocked_sp == NULL);
+    GC_ASSERT(GC_activation_frame == &frame);
+
+    /* Restore original "frame".        */
+    GC_activation_frame = frame.prev;
+#   ifdef IA64
+      GC_blocked_register_sp = frame.saved_backing_store_ptr;
+#   endif
+    GC_blocked_sp = frame.saved_stack_ptr;
+
+    return client_data; /* result */
+}
+
+/* This is nearly the same as in win32_threads.c        */
+/*ARGSUSED*/
+STATIC void GC_do_blocking_inner(ptr_t data, void * context)
 {
+    struct blocking_data * d = (struct blocking_data *) data;
+    GC_ASSERT(GC_is_initialized);
+    GC_ASSERT(GC_blocked_sp == NULL);
+#   ifdef SPARC
+        GC_blocked_sp = GC_save_regs_in_stack();
+#   else
+        GC_blocked_sp = (ptr_t) &d; /* save approx. sp */
+#   endif
+#   ifdef IA64
+        GC_blocked_register_sp = GC_save_regs_in_stack();
+#   endif
+
+    d -> client_data = (d -> fn)(d -> client_data);
+
+#   ifdef SPARC
+        GC_ASSERT(GC_blocked_sp != NULL);
+#   else
+        GC_ASSERT(GC_blocked_sp == (ptr_t) &d);
+#   endif
+    GC_blocked_sp = NULL;
+}
+
+#endif /* !THREADS */
+
+/* Wrapper for functions that are likely to block (or, at least, do not */
+/* allocate garbage collected memory and/or manipulate pointers to the  */
+/* garbage collected heap) for an appreciable length of time.           */
+/* In the single threaded case, GC_do_blocking() (together              */
+/* with GC_call_with_gc_active()) might be used to make stack scanning  */
+/* more precise (i.e. scan only stack frames of functions that allocate */
+/* garbage collected memory and/or manipulate pointers to the garbage   */
+/* collected heap).                                                     */
+GC_API void * GC_CALL GC_do_blocking(GC_fn_type fn, void * client_data)
+{
+    struct blocking_data my_data;
+
+    my_data.fn = fn;
+    my_data.client_data = client_data;
+    GC_with_callee_saves_pushed(GC_do_blocking_inner, (ptr_t)(&my_data));
+    return my_data.client_data; /* result */
+}
+
+#if !defined(NO_DEBUGGING)
+  GC_API void GC_CALL GC_dump(void)
+  {
     GC_printf("***Static roots:\n");
     GC_print_static_roots();
     GC_printf("\n***Heap sections:\n");
@@ -1244,12 +1478,14 @@ GC_API void GC_CALL GC_dump(void)
     GC_print_hblkfreelist();
     GC_printf("\n***Blocks in use:\n");
     GC_print_block_list();
-    GC_printf("\n***Finalization statistics:\n");
-    GC_print_finalization_stats();
-}
+  }
+#endif /* !NO_DEBUGGING */
 
-#endif /* NO_DEBUGGING */
+/* Getter functions for the public Read-only variables.                 */
 
+/* GC_get_gc_no() is unsynchronized and should be typically called      */
+/* inside the context of GC_call_with_alloc_lock() to prevent data      */
+/* races (on multiprocessors).                                          */
 GC_API GC_word GC_CALL GC_get_gc_no(void)
 {
     return GC_gc_no;
@@ -1257,32 +1493,55 @@ GC_API GC_word GC_CALL GC_get_gc_no(void)
 
 GC_API int GC_CALL GC_get_parallel(void)
 {
+    /* GC_parallel is initialized at start-up.  */
     return GC_parallel;
 }
 
-/* Setter and getter functions for the public R/W variables.   */
+/* Setter and getter functions for the public R/W function variables.   */
+/* These functions are synchronized (like GC_set_warn_proc() and        */
+/* GC_get_warn_proc()).                                                 */
 
 GC_API void GC_CALL GC_set_oom_fn(GC_oom_func fn)
 {
     GC_ASSERT(fn != 0);
+    LOCK();
     GC_oom_fn = fn;
+    UNLOCK();
 }
 
 GC_API GC_oom_func GC_CALL GC_get_oom_fn(void)
 {
-    return GC_oom_fn;
+    GC_oom_func fn;
+    LOCK();
+    fn = GC_oom_fn;
+    UNLOCK();
+    return fn;
 }
 
 GC_API void GC_CALL GC_set_finalizer_notifier(GC_finalizer_notifier_proc fn)
 {
+    /* fn may be 0 (means no finalizer notifier). */
+    LOCK();
     GC_finalizer_notifier = fn;
+    UNLOCK();
 }
 
 GC_API GC_finalizer_notifier_proc GC_CALL GC_get_finalizer_notifier(void)
 {
-    return GC_finalizer_notifier;
+    GC_finalizer_notifier_proc fn;
+    LOCK();
+    fn = GC_finalizer_notifier;
+    UNLOCK();
+    return fn;
 }
 
+/* Setter and getter functions for the public numeric R/W variables.    */
+/* It is safe to call these functions even before GC_INIT().            */
+/* These functions are unsynchronized and should be typically called    */
+/* inside the context of GC_call_with_alloc_lock() (if called after     */
+/* GC_INIT()) to prevent data races (unless it is guaranteed the        */
+/* collector is not multi-threaded at that execution point).            */
+
 GC_API void GC_CALL GC_set_find_leak(int value)
 {
     /* value is of boolean type. */
@@ -1419,3 +1678,13 @@ GC_API unsigned long GC_CALL GC_get_time_limit(void)
 {
     return GC_time_limit;
 }
+
+GC_API void GC_CALL GC_set_force_unmap_on_gcollect(int value)
+{
+    GC_force_unmap_on_gcollect = (GC_bool)value;
+}
+
+GC_API int GC_CALL GC_get_force_unmap_on_gcollect(void)
+{
+    return (int)GC_force_unmap_on_gcollect;
+}
index dd583709f535918128e0f8d3b6a4fddf64c87cec..1c8ff7049d8f3aaa9741c53e7f3145d9b76a77d8 100755 (executable)
@@ -1,6 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
-# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+
+scriptversion=2006-05-10.23
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
+#   Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -15,8 +19,8 @@
 
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -29,6 +33,8 @@ if test $# -eq 0; then
 fi
 
 run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
 
 # In the cases where this matters, `missing' is being run in the
 # srcdir already.
@@ -38,18 +44,24 @@ else
   configure_ac=configure.in
 fi
 
-case "$1" in
+msg="missing on your system"
+
+case $1 in
 --run)
   # Try to run requested program, and just exit if it succeeds.
   run=
   shift
   "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
   ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
 
   -h|--h|--he|--hel|--help)
     echo "\
@@ -67,6 +79,7 @@ Supported PROGRAM values:
   aclocal      touch file \`aclocal.m4'
   autoconf     touch file \`configure'
   autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
   automake     touch all \`Makefile.in' files
   bison        create \`y.tab.[ch]', if possible, from existing .[ch]
   flex         create \`lex.yy.c', if possible, from existing .c
@@ -74,11 +87,15 @@ Supported PROGRAM values:
   lex          create \`lex.yy.c', if possible, from existing .c
   makeinfo     touch the output file
   tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+    exit $?
     ;;
 
   -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing 0.4 - GNU automake"
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
     ;;
 
   -*)
@@ -87,14 +104,44 @@ Supported PROGRAM values:
     exit 1
     ;;
 
-  aclocal*)
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case $1 in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
     if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
        # We have it, but it failed.
        exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
     fi
+    ;;
+esac
 
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $1 in
+  aclocal*)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
          to install the \`Automake' and \`Perl' packages.  Grab them from
          any GNU archive site."
@@ -102,13 +149,8 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   autoconf)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`${configure_ac}'.  You might want to install the
          \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
          archive site."
@@ -116,13 +158,8 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   autoheader)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acconfig.h' or \`${configure_ac}'.  You might want
          to install the \`Autoconf' and \`GNU m4' packages.  Grab them
          from any GNU archive site."
@@ -130,7 +167,7 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     test -z "$files" && files="config.h"
     touch_files=
     for f in $files; do
-      case "$f" in
+      case $f in
       *:*) touch_files="$touch_files "`echo "$f" |
                                       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
       *) touch_files="$touch_files $f.in";;
@@ -140,13 +177,8 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   automake*)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
          You might want to install the \`Automake' and \`Perl' packages.
          Grab them from any GNU archive site."
@@ -156,20 +188,15 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   autom4te)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
          proper tools for further handling them.
-         You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+         You can get \`$1' as part of \`Autoconf' from any GNU
          archive site."
 
-    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
-    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
     if test -f "$file"; then
        touch $file
     else
@@ -185,74 +212,67 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
 
   bison|yacc)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' $msg.  You should only need it if
          you modified a \`.y' file.  You may need the \`Bison' package
          in order for those modifications to take effect.  You can get
          \`Bison' from any GNU archive site."
     rm -f y.tab.c y.tab.h
-    if [ $# -ne 1 ]; then
+    if test $# -ne 1; then
         eval LASTARG="\${$#}"
-       case "$LASTARG" in
+       case $LASTARG in
        *.y)
            SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-           if [ -f "$SRCFILE" ]; then
+           if test -f "$SRCFILE"; then
                 cp "$SRCFILE" y.tab.c
            fi
            SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-           if [ -f "$SRCFILE" ]; then
+           if test -f "$SRCFILE"; then
                 cp "$SRCFILE" y.tab.h
            fi
          ;;
        esac
     fi
-    if [ ! -f y.tab.h ]; then
+    if test ! -f y.tab.h; then
        echo >y.tab.h
     fi
-    if [ ! -f y.tab.c ]; then
+    if test ! -f y.tab.c; then
        echo 'main() { return 0; }' >y.tab.c
     fi
     ;;
 
   lex|flex)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.l' file.  You may need the \`Flex' package
          in order for those modifications to take effect.  You can get
          \`Flex' from any GNU archive site."
     rm -f lex.yy.c
-    if [ $# -ne 1 ]; then
+    if test $# -ne 1; then
         eval LASTARG="\${$#}"
-       case "$LASTARG" in
+       case $LASTARG in
        *.l)
            SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-           if [ -f "$SRCFILE" ]; then
+           if test -f "$SRCFILE"; then
                 cp "$SRCFILE" lex.yy.c
            fi
          ;;
        esac
     fi
-    if [ ! -f lex.yy.c ]; then
+    if test ! -f lex.yy.c; then
        echo 'main() { return 0; }' >lex.yy.c
     fi
     ;;
 
   help2man)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
         you modified a dependency of a manual page.  You may need the
         \`Help2man' package in order for those modifications to take
         effect.  You can get \`Help2man' from any GNU archive site."
 
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-       file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
-    fi
-    if [ -f "$file" ]; then
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
        touch $file
     else
        test -z "$file" || exec >$file
@@ -262,54 +282,58 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   makeinfo)
-    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
-       # We have makeinfo, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.texi' or \`.texinfo' file, or any other file
          indirectly affecting the aspect of the manual.  The spurious
          call might also be the consequence of using a buggy \`make' (AIX,
          DU, IRIX).  You might want to install the \`Texinfo' package or
          the \`GNU make' package.  Grab either from any GNU archive site."
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
     if test -z "$file"; then
-      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+       /^@setfilename/{
+         s/.* \([^ ]*\) *$/\1/
+         p
+         q
+       }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
     fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
     touch $file
     ;;
 
   tar)
     shift
-    if test -n "$run"; then
-      echo 1>&2 "ERROR: \`tar' requires --run"
-      exit 1
-    fi
 
     # We have already tried tar in the generic part.
     # Look for gnutar/gtar before invocation to avoid ugly error
     # messages.
     if (gnutar --version > /dev/null 2>&1); then
-       gnutar ${1+"$@"} && exit 0
+       gnutar "$@" && exit 0
     fi
     if (gtar --version > /dev/null 2>&1); then
-       gtar ${1+"$@"} && exit 0
+       gtar "$@" && exit 0
     fi
     firstarg="$1"
     if shift; then
-       case "$firstarg" in
+       case $firstarg in
        *o*)
            firstarg=`echo "$firstarg" | sed s/o//`
-           tar "$firstarg" ${1+"$@"} && exit 0
+           tar "$firstarg" "$@" && exit 0
            ;;
        esac
-       case "$firstarg" in
+       case $firstarg in
        *h*)
            firstarg=`echo "$firstarg" | sed s/h//`
-           tar "$firstarg" ${1+"$@"} && exit 0
+           tar "$firstarg" "$@" && exit 0
            ;;
        esac
     fi
@@ -323,10 +347,10 @@ WARNING: I can't seem to be able to run \`tar' with the given arguments.
 
   *)
     echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
          proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequirements for installing
+         it often tells you about the needed prerequisites for installing
          this package.  You may also peek at any GNU archive site, in case
          some other package would contain this missing \`$1' program."
     exit 1
@@ -334,3 +358,10 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
 esac
 
 exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
index 82a561f435bc5d8e0dd3edbf6a234baf8daa739e..ef7e16fdafe243ab5e368763bd4cda18c5872c1f 100755 (executable)
@@ -1,31 +1,59 @@
 #! /bin/sh
 # mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
 
-# $Id: mkinstalldirs,v 1.1.1.1 2005/10/10 22:33:34 hboehm Exp $
+scriptversion=2006-05-11.19
 
+# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain.
+#
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+IFS=" ""       $nl"
 errstatus=0
-dirmode=""
+dirmode=
 
 usage="\
-Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
+
+Create each directory DIR (with mode MODE, if specified), including all
+leading file name components.
+
+Report bugs to <bug-automake@gnu.org>."
 
 # process command line arguments
 while test $# -gt 0 ; do
-   case "${1}" in
-     -h | --help | --h* )                      # -h for help
-       echo "${usage}" 1>&2; exit 0 ;;
-     -m )                                      # -m PERM arg
-       shift
-       test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
-       dirmode="${1}"
-       shift ;;
-     -- ) shift; break ;;                      # stop option processing
-     -* ) echo "${usage}" 1>&2; exit 1 ;;      # unknown option
-     * )  break ;;                             # first non-opt arg
-   esac
+  case $1 in
+    -h | --help | --h*)         # -h for help
+      echo "$usage"
+      exit $?
+      ;;
+    -m)                         # -m PERM arg
+      shift
+      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+      dirmode=$1
+      shift
+      ;;
+    --version)
+      echo "$0 $scriptversion"
+      exit $?
+      ;;
+    --)                         # stop option processing
+      shift
+      break
+      ;;
+    -*)                         # unknown option
+      echo "$usage" 1>&2
+      exit 1
+      ;;
+    *)                          # first non-opt arg
+      break
+      ;;
+  esac
 done
 
 for file
@@ -38,64 +66,96 @@ do
 done
 
 case $# in
-0) exit 0 ;;
+  0) exit 0 ;;
 esac
 
+# Solaris 8's mkdir -p isn't thread-safe.  If you mkdir -p a/b and
+# mkdir -p a/c at the same time, both will detect that a is missing,
+# one will create a, then the other will try to create a and die with
+# a "File exists" error.  This is a problem when calling mkinstalldirs
+# from a parallel make.  We use --version in the probe to restrict
+# ourselves to GNU mkdir, which is thread-safe.
 case $dirmode in
-'')
-  if mkdir -p -- . 2>/dev/null; then
-    echo "mkdir -p -- $*"
-    exec mkdir -p -- "$@"
-  fi ;;
-*)
-  if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
-    echo "mkdir -m $dirmode -p -- $*"
-    exec mkdir -m "$dirmode" -p -- "$@"
-  fi ;;
+  '')
+    if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+      echo "mkdir -p -- $*"
+      exec mkdir -p -- "$@"
+    else
+      # On NextStep and OpenStep, the `mkdir' command does not
+      # recognize any option.  It will interpret all options as
+      # directories to create, and then abort because `.' already
+      # exists.
+      test -d ./-p && rmdir ./-p
+      test -d ./--version && rmdir ./--version
+    fi
+    ;;
+  *)
+    if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
+       test ! -d ./--version; then
+      echo "mkdir -m $dirmode -p -- $*"
+      exec mkdir -m "$dirmode" -p -- "$@"
+    else
+      # Clean up after NextStep and OpenStep mkdir.
+      for d in ./-m ./-p ./--version "./$dirmode";
+      do
+        test -d $d && rmdir $d
+      done
+    fi
+    ;;
 esac
 
 for file
 do
-   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
-   shift
-
-   pathcomp=
-   for d
-   do
-     pathcomp="$pathcomp$d"
-     case "$pathcomp" in
-       -* ) pathcomp=./$pathcomp ;;
-     esac
-
-     if test ! -d "$pathcomp"; then
-       echo "mkdir $pathcomp"
-
-       mkdir "$pathcomp" || lasterr=$?
-
-       if test ! -d "$pathcomp"; then
-         errstatus=$lasterr
-       else
-         if test ! -z "$dirmode"; then
-            echo "chmod $dirmode $pathcomp"
-
-            lasterr=""
-            chmod "$dirmode" "$pathcomp" || lasterr=$?
-
-            if test ! -z "$lasterr"; then
-              errstatus=$lasterr
-            fi
+  case $file in
+    /*) pathcomp=/ ;;
+    *)  pathcomp= ;;
+  esac
+  oIFS=$IFS
+  IFS=/
+  set fnord $file
+  shift
+  IFS=$oIFS
+
+  for d
+  do
+    test "x$d" = x && continue
+
+    pathcomp=$pathcomp$d
+    case $pathcomp in
+      -*) pathcomp=./$pathcomp ;;
+    esac
+
+    if test ! -d "$pathcomp"; then
+      echo "mkdir $pathcomp"
+
+      mkdir "$pathcomp" || lasterr=$?
+
+      if test ! -d "$pathcomp"; then
+       errstatus=$lasterr
+      else
+       if test ! -z "$dirmode"; then
+         echo "chmod $dirmode $pathcomp"
+         lasterr=
+         chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+         if test ! -z "$lasterr"; then
+           errstatus=$lasterr
          fi
        fi
-     fi
+      fi
+    fi
 
-     pathcomp="$pathcomp/"
-   done
+    pathcomp=$pathcomp/
+  done
 done
 
 exit $errstatus
 
 # Local Variables:
 # mode: shell-script
-# sh-indentation: 3
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
 # End:
-# mkinstalldirs ends here
diff --git a/src/mm/boehm-gc/msvc_dbg.c b/src/mm/boehm-gc/msvc_dbg.c
deleted file mode 100644 (file)
index 2420a44..0000000
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
-  Copyright (c) 2004 Andrei Polushin
-
-  Permission is hereby granted, free of charge,  to any person obtaining a copy
-  of this software and associated documentation files (the "Software"), to deal
-  in the Software without restriction,  including without limitation the rights
-  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-  copies of the Software, and to permit persons to whom the Software is
-  furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in
-  all copies or substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-  THE SOFTWARE.
-*/
-#ifndef _M_AMD64
-
-/* X86_64 is ccurrently missing some meachine-dependent code below. */
-
-#include "private/msvc_dbg.h"
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-#pragma pack(push, 8)
-#include <imagehlp.h>
-#pragma pack(pop)
-
-#pragma comment(lib, "dbghelp.lib")
-#pragma optimize("gy", off)
-
-#ifdef _WIN64
-       typedef ULONG_PTR ULONG_ADDR;
-#else
-       typedef ULONG     ULONG_ADDR;
-#endif
-
-static HANDLE GetSymHandle()
-{
-       static HANDLE symHandle = NULL;
-       if (!symHandle) {
-               BOOL bRet = SymInitialize(symHandle = GetCurrentProcess(), NULL, FALSE);
-               if (bRet) {
-                       DWORD dwOptions = SymGetOptions();
-                       dwOptions &= ~SYMOPT_UNDNAME;
-                       dwOptions |= SYMOPT_LOAD_LINES;
-                       SymSetOptions(dwOptions);
-               }
-       }
-       return symHandle;
-}
-
-static void* CALLBACK FunctionTableAccess(HANDLE hProcess, ULONG_ADDR dwAddrBase)
-{
-       return SymFunctionTableAccess(hProcess, dwAddrBase);
-}
-
-static ULONG_ADDR CALLBACK GetModuleBase(HANDLE hProcess, ULONG_ADDR dwAddress)
-{
-       MEMORY_BASIC_INFORMATION memoryInfo;
-       ULONG_ADDR dwAddrBase = SymGetModuleBase(hProcess, dwAddress);
-       if (dwAddrBase) {
-               return dwAddrBase;
-       }
-       if (VirtualQueryEx(hProcess, (void*)(ULONG_PTR)dwAddress, &memoryInfo, sizeof(memoryInfo))) {
-               char filePath[_MAX_PATH];
-               char curDir[_MAX_PATH];
-               char exePath[_MAX_PATH];
-               DWORD size = GetModuleFileNameA((HINSTANCE)memoryInfo.AllocationBase, filePath, sizeof(filePath));
-
-               // Save and restore current directory around SymLoadModule, see KB article Q189780
-               GetCurrentDirectoryA(sizeof(curDir), curDir);
-               GetModuleFileNameA(NULL, exePath, sizeof(exePath));
-#if defined(_MSC_VER) && _MSC_VER == 1200
-               /* use strcat for VC6 */
-               strcat(exePath, "\\..");
-#else
-               strcat_s(exePath, sizeof(exePath), "\\..");
-#endif /* _MSC_VER >= 1200 */
-               SetCurrentDirectoryA(exePath);
-#ifdef _DEBUG
-               GetCurrentDirectoryA(sizeof(exePath), exePath);
-#endif
-               SymLoadModule(hProcess, NULL, size ? filePath : NULL, NULL, (ULONG_ADDR)(ULONG_PTR)memoryInfo.AllocationBase, 0);
-               SetCurrentDirectoryA(curDir);
-       }
-       return (ULONG_ADDR)(ULONG_PTR)memoryInfo.AllocationBase;
-}
-
-static ULONG_ADDR CheckAddress(void* address)
-{
-       ULONG_ADDR dwAddress = (ULONG_ADDR)(ULONG_PTR)address;
-       GetModuleBase(GetSymHandle(), dwAddress);
-       return dwAddress;
-}
-
-size_t GetStackFrames(size_t skip, void* frames[], size_t maxFrames)
-{
-       HANDLE hProcess = GetSymHandle();
-       HANDLE hThread = GetCurrentThread();
-       CONTEXT context;
-       context.ContextFlags = CONTEXT_FULL;
-       if (!GetThreadContext(hThread, &context)) {
-               return 0;
-       }
-       // GetThreadContext might return invalid context for the current thread
-#if defined(_M_IX86)
-    __asm mov context.Ebp, ebp
-#endif
-       return GetStackFramesFromContext(hProcess, hThread, &context, skip + 1, frames, maxFrames);
-}
-
-size_t GetStackFramesFromContext(HANDLE hProcess, HANDLE hThread, CONTEXT* context, size_t skip, void* frames[], size_t maxFrames)
-{
-       size_t frameIndex;
-       DWORD machineType;
-       STACKFRAME stackFrame = { 0 };
-       stackFrame.AddrPC.Mode      = AddrModeFlat;
-#if defined(_M_IX86)
-       machineType                 = IMAGE_FILE_MACHINE_I386;
-       stackFrame.AddrPC.Offset    = context->Eip;
-       stackFrame.AddrStack.Mode   = AddrModeFlat;
-       stackFrame.AddrStack.Offset = context->Esp;
-       stackFrame.AddrFrame.Mode   = AddrModeFlat;
-       stackFrame.AddrFrame.Offset = context->Ebp;
-#elif defined(_M_MRX000)
-       machineType                 = IMAGE_FILE_MACHINE_R4000;
-       stackFrame.AddrPC.Offset    = context->Fir;
-#elif defined(_M_ALPHA)
-       machineType                 = IMAGE_FILE_MACHINE_ALPHA;
-       stackFrame.AddrPC.Offset    = (unsigned long)context->Fir;
-#elif defined(_M_PPC)
-       machineType                 = IMAGE_FILE_MACHINE_POWERPC;
-       stackFrame.AddrPC.Offset    = context->Iar;
-#elif defined(_M_IA64)
-       machineType                 = IMAGE_FILE_MACHINE_IA64;
-       stackFrame.AddrPC.Offset    = context->StIIP;
-#elif defined(_M_ALPHA64)
-       machineType                 = IMAGE_FILE_MACHINE_ALPHA64;
-       stackFrame.AddrPC.Offset    = context->Fir;
-#else
-#error Unknown CPU
-#endif
-       for (frameIndex = 0; frameIndex < maxFrames; ) {
-               BOOL bRet = StackWalk(machineType, hProcess, hThread, &stackFrame, &context, NULL, FunctionTableAccess, GetModuleBase, NULL);
-               if (!bRet) {
-                       break;
-               }
-               if (skip) {
-                       skip--;
-               } else {
-                       frames[frameIndex++] = (void*)(ULONG_PTR)stackFrame.AddrPC.Offset;
-               }
-       }
-       return frameIndex;
-}
-
-size_t GetModuleNameFromAddress(void* address, char* moduleName, size_t size)
-{
-       if (size) *moduleName = 0;
-       {
-               const char* sourceName;
-               IMAGEHLP_MODULE moduleInfo = { sizeof (moduleInfo) };
-               if (!SymGetModuleInfo(GetSymHandle(), CheckAddress(address), &moduleInfo)) {
-                       return 0;
-               }
-               sourceName = strrchr(moduleInfo.ImageName, '\\');
-               if (sourceName) {
-                       sourceName++;
-               } else {
-                       sourceName = moduleInfo.ImageName;
-               }
-               if (size) {
-                       strncpy(moduleName, sourceName, size)[size - 1] = 0;
-               }
-               return strlen(sourceName);
-       }
-}
-
-size_t GetModuleNameFromStack(size_t skip, char* moduleName, size_t size)
-{
-       void* address = NULL;
-       GetStackFrames(skip + 1, &address, 1);
-       if (address) {
-               return GetModuleNameFromAddress(address, moduleName, size);
-       }
-       return 0;
-}
-
-size_t GetSymbolNameFromAddress(void* address, char* symbolName, size_t size, size_t* offsetBytes)
-{
-       if (size) *symbolName = 0;
-       if (offsetBytes) *offsetBytes = 0;
-       __try {
-               ULONG_ADDR dwOffset = 0;
-               union {
-                       IMAGEHLP_SYMBOL sym;
-                       char symNameBuffer[sizeof(IMAGEHLP_SYMBOL) + MAX_SYM_NAME];
-               } u;
-               u.sym.SizeOfStruct  = sizeof(u.sym);
-               u.sym.MaxNameLength = sizeof(u.symNameBuffer) - sizeof(u.sym);
-
-               if (!SymGetSymFromAddr(GetSymHandle(), CheckAddress(address), &dwOffset, &u.sym)) {
-                       return 0;
-               } else {
-                       const char* sourceName = u.sym.Name;
-                       char undName[1024];
-                       if (UnDecorateSymbolName(u.sym.Name, undName, sizeof(undName), UNDNAME_NO_MS_KEYWORDS | UNDNAME_NO_ACCESS_SPECIFIERS)) {
-                               sourceName = undName;
-                       } else if (SymUnDName(&u.sym, undName, sizeof(undName))) {
-                               sourceName = undName;
-                       }
-                       if (offsetBytes) {
-                               *offsetBytes = dwOffset;
-                       }
-                       if (size) {
-                               strncpy(symbolName, sourceName, size)[size - 1] = 0;
-                       }
-                       return strlen(sourceName);
-               }
-       } __except (EXCEPTION_EXECUTE_HANDLER) {
-               SetLastError(GetExceptionCode());
-       }
-       return 0;
-}
-
-size_t GetSymbolNameFromStack(size_t skip, char* symbolName, size_t size, size_t* offsetBytes)
-{
-       void* address = NULL;
-       GetStackFrames(skip + 1, &address, 1);
-       if (address) {
-               return GetSymbolNameFromAddress(address, symbolName, size, offsetBytes);
-       }
-       return 0;
-}
-
-size_t GetFileLineFromAddress(void* address, char* fileName, size_t size, size_t* lineNumber, size_t* offsetBytes)
-{
-       if (size) *fileName = 0;
-       if (lineNumber) *lineNumber = 0;
-       if (offsetBytes) *offsetBytes = 0;
-       {
-               char* sourceName;
-               IMAGEHLP_LINE line = { sizeof (line) };
-               ULONG_PTR dwOffset = 0;
-               if (!SymGetLineFromAddr(GetSymHandle(), CheckAddress(address), &dwOffset, &line)) {
-                       return 0;
-               }
-               if (lineNumber) {
-                       *lineNumber = line.LineNumber;
-               }
-               if (offsetBytes) {
-                       *offsetBytes = dwOffset;
-               }
-               sourceName = line.FileName;
-               // TODO: resolve relative filenames, found in 'source directories' registered with MSVC IDE.
-               if (size) {
-                       strncpy(fileName, sourceName, size)[size - 1] = 0;
-               }
-               return strlen(sourceName);
-       }
-}
-
-size_t GetFileLineFromStack(size_t skip, char* fileName, size_t size, size_t* lineNumber, size_t* offsetBytes)
-{
-       void* address = NULL;
-       GetStackFrames(skip + 1, &address, 1);
-       if (address) {
-               return GetFileLineFromAddress(address, fileName, size, lineNumber, offsetBytes);
-       }
-       return 0;
-}
-
-size_t GetDescriptionFromAddress(void* address, const char* format, char* buffer, size_t size)
-{
-       char*const begin = buffer;
-       char*const end = buffer + size;
-       size_t line_number = 0;
-       char   str[128];
-
-       if (size) {
-               *buffer = 0;
-       }
-       buffer += GetFileLineFromAddress(address, buffer, size, &line_number, NULL);
-       size = end < buffer ? 0 : end - buffer;
-
-       if (line_number) {
-               wsprintf(str, "(%d) : ", line_number);
-               if (size) {
-                       strncpy(buffer, str, size)[size - 1] = 0;
-               }
-               buffer += strlen(str);
-               size = end < buffer ? 0 : end - buffer;
-       }
-
-       if (size) {
-               strncpy(buffer, "at ", size)[size - 1] = 0;
-       }
-       buffer += strlen("at ");
-       size = end < buffer ? 0 : end - buffer;
-
-       buffer += GetSymbolNameFromAddress(address, buffer, size, NULL);
-       size = end < buffer ? 0 : end - buffer;
-
-       if (size) {
-               strncpy(buffer, " in ", size)[size - 1] = 0;
-       }
-       buffer += strlen(" in ");
-       size = end < buffer ? 0 : end - buffer;
-       
-       buffer += GetModuleNameFromAddress(address, buffer, size);
-       size = end < buffer ? 0 : end - buffer;
-       
-       return buffer - begin;
-}
-
-size_t GetDescriptionFromStack(void*const frames[], size_t count, const char* format, char* description[], size_t size)
-{
-       char*const begin = (char*)description;
-       char*const end = begin + size;
-       char* buffer = begin + (count + 1) * sizeof(char*);
-       size_t i;
-       for (i = 0; i < count; ++i) {
-               if (description) description[i] = buffer;
-               size = end < buffer ? 0 : end - buffer;
-               buffer += 1 + GetDescriptionFromAddress(frames[i], NULL, buffer, size);
-       }
-       if (description) description[count] = NULL;
-       return buffer - begin;
-}
-
-/* Compatibility with <execinfo.h> */
-
-int backtrace(void* addresses[], int count)
-{
-       return GetStackFrames(1, addresses, count);
-}
-
-char** backtrace_symbols(void*const* addresses, int count)
-{
-       size_t size = GetDescriptionFromStack(addresses, count, NULL, NULL, 0);
-       char** symbols = (char**)malloc(size);
-       GetDescriptionFromStack(addresses, count, NULL, symbols, size);
-       return symbols;
-}
-
-#endif /* !_M_AMD64 */
index 6c5c0caeb099bd7fff942f14be8c0a024c8c012b..62e96f6bbd7e961de343dd90dfe9f2e920706774 100644 (file)
  * Permission to modify the code and to distribute modified code is granted,
  * provided the above notices are retained, and a notice that the code was
  * modified is included with the above copyright notice.
- *
- * This file contains the functions:
- *     ptr_t GC_build_flXXX(h, old_fl)
- *     void GC_new_hblk(size)
  */
-/* Boehm, May 19, 1994 2:09 pm PDT */
 
+#include "private/gc_priv.h"
+
+/*
+ * This file contains the functions:
+ *      ptr_t GC_build_flXXX(h, old_fl)
+ *      void GC_new_hblk(size)
+ */
 
-# include <stdio.h>
-# include "private/gc_priv.h"
+#include <stdio.h>
 
 #ifndef SMALL_CONFIG
 /*
@@ -32,7 +33,7 @@ STATIC ptr_t GC_build_fl_clear2(struct hblk *h, ptr_t ofl)
 {
     word * p = (word *)(h -> hb_body);
     word * lim = (word *)(h + 1);
-    
+
     p[0] = (word)ofl;
     p[1] = 0;
     p[2] = (word)p;
@@ -52,17 +53,17 @@ STATIC ptr_t GC_build_fl_clear4(struct hblk *h, ptr_t ofl)
 {
     word * p = (word *)(h -> hb_body);
     word * lim = (word *)(h + 1);
-    
+
     p[0] = (word)ofl;
     p[1] = 0;
     p[2] = 0;
     p[3] = 0;
     p += 4;
     for (; p < lim; p += 4) {
-       PREFETCH_FOR_WRITE((ptr_t)(p+64));
+        PREFETCH_FOR_WRITE((ptr_t)(p+64));
         p[0] = (word)(p-4);
         p[1] = 0;
-       CLEAR_DOUBLE(p+2);
+        CLEAR_DOUBLE(p+2);
     };
     return((ptr_t)(p-4));
 }
@@ -72,7 +73,7 @@ STATIC ptr_t GC_build_fl2(struct hblk *h, ptr_t ofl)
 {
     word * p = (word *)(h -> hb_body);
     word * lim = (word *)(h + 1);
-    
+
     p[0] = (word)ofl;
     p[2] = (word)p;
     p += 4;
@@ -88,12 +89,12 @@ STATIC ptr_t GC_build_fl4(struct hblk *h, ptr_t ofl)
 {
     word * p = (word *)(h -> hb_body);
     word * lim = (word *)(h + 1);
-    
+
     p[0] = (word)ofl;
     p[4] = (word)p;
     p += 8;
     for (; p < lim; p += 8) {
-       PREFETCH_FOR_WRITE((ptr_t)(p+64));
+        PREFETCH_FOR_WRITE((ptr_t)(p+64));
         p[0] = (word)(p-4);
         p[4] = (word)p;
     };
@@ -103,62 +104,63 @@ STATIC ptr_t GC_build_fl4(struct hblk *h, ptr_t ofl)
 #endif /* !SMALL_CONFIG */
 
 
-/* Build a free list for objects of size sz inside heap block h.       */
-/* Clear objects inside h if clear is set.  Add list to the end of     */
-/* the free list we build.  Return the new free list.                  */
-/* This could be called without the main GC lock, if we ensure that    */
-/* there is no concurrent collection which might reclaim objects that  */
-/* we have not yet allocated.                                          */
-ptr_t GC_build_fl(struct hblk *h, size_t sz, GC_bool clear, ptr_t list)
+/* Build a free list for objects of size sz inside heap block h.        */
+/* Clear objects inside h if clear is set.  Add list to the end of      */
+/* the free list we build.  Return the new free list.                   */
+/* This could be called without the main GC lock, if we ensure that     */
+/* there is no concurrent collection which might reclaim objects that   */
+/* we have not yet allocated.                                           */
+GC_INNER ptr_t GC_build_fl(struct hblk *h, size_t sz, GC_bool clear,
+                           ptr_t list)
 {
   word *p, *prev;
-  word *last_object;           /* points to last object in new hblk    */
+  word *last_object;            /* points to last object in new hblk    */
 
-  /* Do a few prefetches here, just because its cheap.         */
-  /* If we were more serious about it, these should go inside  */
-  /* the loops.  But write prefetches usually don't seem to    */
-  /* matter much.                                              */
+  /* Do a few prefetches here, just because its cheap.          */
+  /* If we were more serious about it, these should go inside   */
+  /* the loops.  But write prefetches usually don't seem to     */
+  /* matter much.                                               */
     PREFETCH_FOR_WRITE((ptr_t)h);
     PREFETCH_FOR_WRITE((ptr_t)h + 128);
     PREFETCH_FOR_WRITE((ptr_t)h + 256);
     PREFETCH_FOR_WRITE((ptr_t)h + 378);
-  /* Handle small objects sizes more efficiently.  For larger objects  */
-  /* the difference is less significant.                               */
+  /* Handle small objects sizes more efficiently.  For larger objects   */
+  /* the difference is less significant.                                */
 #  ifndef SMALL_CONFIG
-    switch (sz) {
+     switch (sz) {
         case 2: if (clear) {
-                   return GC_build_fl_clear2(h, list);
-               } else {
-                   return GC_build_fl2(h, list);
-               }
+                    return GC_build_fl_clear2(h, list);
+                } else {
+                    return GC_build_fl2(h, list);
+                }
         case 4: if (clear) {
-                   return GC_build_fl_clear4(h, list);
-               } else {
-                   return GC_build_fl4(h, list);
-               }
+                    return GC_build_fl_clear4(h, list);
+                } else {
+                    return GC_build_fl4(h, list);
+                }
         default:
-               break;
-    }
+                break;
+     }
 #  endif /* !SMALL_CONFIG */
-    
+
   /* Clear the page if necessary. */
     if (clear) BZERO(h, HBLKSIZE);
-    
+
   /* Add objects to free list */
-    p = (word *)(h -> hb_body) + sz;   /* second object in *h  */
-    prev = (word *)(h -> hb_body);             /* One object behind p  */
+    p = (word *)(h -> hb_body) + sz;    /* second object in *h  */
+    prev = (word *)(h -> hb_body);              /* One object behind p  */
     last_object = (word *)((char *)h + HBLKSIZE);
     last_object -= sz;
-                           /* Last place for last object to start */
+                            /* Last place for last object to start */
 
   /* make a list of all objects in *h with head as last object */
     while (p <= last_object) {
       /* current object's link points to last object */
         obj_link(p) = (ptr_t)prev;
-       prev = p;
-       p += sz;
+        prev = p;
+        p += sz;
     }
-    p -= sz;                   /* p now points to last object */
+    p -= sz;                    /* p now points to last object */
 
   /*
    * put p (which is now head of list of objects in *h) as first
@@ -176,13 +178,13 @@ ptr_t GC_build_fl(struct hblk *h, size_t sz, GC_bool clear, ptr_t list)
  * Set all mark bits if objects are uncollectable.
  * Will fail to do anything if we are out of memory.
  */
-void GC_new_hblk(size_t gran, int kind)
+GC_INNER void GC_new_hblk(size_t gran, int kind)
 {
-  struct hblk *h;      /* the new heap block                   */
+  struct hblk *h;       /* the new heap block                   */
   GC_bool clear = GC_obj_kinds[kind].ok_init;
 
   GC_STATIC_ASSERT((sizeof (struct hblk)) == HBLKSIZE);
-  
+
   if (GC_debugging_started) clear = TRUE;
 
   /* Allocate a new heap block */
@@ -194,7 +196,6 @@ void GC_new_hblk(size_t gran, int kind)
 
   /* Build the free list */
       GC_obj_kinds[kind].ok_freelist[gran] =
-       GC_build_fl(h, GRANULES_TO_WORDS(gran), clear,
-                   GC_obj_kinds[kind].ok_freelist[gran]);
+        GC_build_fl(h, GRANULES_TO_WORDS(gran), clear,
+                    GC_obj_kinds[kind].ok_freelist[gran]);
 }
-
index 8198a7e5a6b7ef5a1d7bd8d21bbbe5b53f8a029a..972ba4916265b97c74cf6bf41a2017343b551e3e 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991, 1992 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1999-2001 by Hewlett-Packard Company. All rights reserved.
  * provided the above notices are retained, and a notice that the code was
  * modified is included with the above copyright notice.
  */
-  
+
+#include "private/gc_priv.h"
+
 /* Routines for maintaining maps describing heap block
  * layouts for various object sizes.  Allows fast pointer validity checks
  * and fast location of object start locations on machines (such as SPARC)
  * with slow division.
  */
-# include "private/gc_priv.h"
 
 /* Consider pointers that are offset bytes displaced from the beginning */
 /* of an object to be valid.                                            */
 GC_API void GC_CALL GC_register_displacement(size_t offset)
 {
     DCL_LOCK_STATE;
-    
+
     LOCK();
     GC_register_displacement_inner(offset);
     UNLOCK();
 }
 
-void GC_register_displacement_inner(size_t offset) 
+GC_INNER void GC_register_displacement_inner(size_t offset)
 {
     if (offset >= VALID_OFFSET_SZ) {
         ABORT("Bad argument to GC_register_displacement");
@@ -45,14 +45,14 @@ void GC_register_displacement_inner(size_t offset)
 }
 
 #ifdef MARK_BIT_PER_GRANULE
-/* Add a heap block map for objects of size granules to obj_map.       */
-/* Return FALSE on failure.                                            */
-/* A size of 0 granules is used for large objects.                     */
-GC_bool GC_add_map_entry(size_t granules)
-{
+  /* Add a heap block map for objects of size granules to obj_map.      */
+  /* Return FALSE on failure.                                           */
+  /* A size of 0 granules is used for large objects.                    */
+  GC_INNER GC_bool GC_add_map_entry(size_t granules)
+  {
     unsigned displ;
     short * new_map;
-    
+
     if (granules > BYTES_TO_GRANULES(MAXOBJBYTES)) granules = 0;
     if (GC_obj_map[granules] != 0) {
         return(TRUE);
@@ -61,29 +61,30 @@ GC_bool GC_add_map_entry(size_t granules)
     if (new_map == 0) return(FALSE);
     if (GC_print_stats)
         GC_log_printf("Adding block map for size of %u granules (%u bytes)\n",
-                 (unsigned)granules, (unsigned)(GRANULES_TO_BYTES(granules)));
+                  (unsigned)granules, (unsigned)(GRANULES_TO_BYTES(granules)));
     if (granules == 0) {
       for (displ = 0; displ < BYTES_TO_GRANULES(HBLKSIZE); displ++) {
         new_map[displ] = 1;  /* Nonzero to get us out of marker fast path. */
       }
     } else {
       for (displ = 0; displ < BYTES_TO_GRANULES(HBLKSIZE); displ++) {
-       new_map[displ] = (short)(displ % granules);
+        new_map[displ] = (short)(displ % granules);
       }
     }
     GC_obj_map[granules] = new_map;
     return(TRUE);
-}
+  }
 #endif
 
-static GC_bool offsets_initialized = FALSE;
-
-void GC_initialize_offsets(void)
+GC_INNER void GC_initialize_offsets(void)
 {
+    static GC_bool offsets_initialized = FALSE;
+
     if (!offsets_initialized) {
       int i;
       if (GC_all_interior_pointers) {
-       for (i = 0; i < VALID_OFFSET_SZ; ++i) GC_valid_offsets[i] = TRUE;
+        for (i = 0; i < VALID_OFFSET_SZ; ++i)
+          GC_valid_offsets[i] = TRUE;
       }
       offsets_initialized = TRUE;
     }
index 9b80603a9aac3dac01cfa0b607df8b3f5225ca74..a525283ca982ee224773f4ed3c2b402458b70498 100644 (file)
  * modified is included with the above copyright notice.
  */
 
-# include "private/gc_priv.h"
-# ifdef THREADS
-#   include "atomic_ops.h"
+#include "private/gc_priv.h"
+
+#if defined(LINUX) && !defined(POWERPC)
+# include <linux/version.h>
+# if (LINUX_VERSION_CODE <= 0x10400)
+    /* Ugly hack to get struct sigcontext_struct definition.  Required      */
+    /* for some early 1.3.X releases.  Will hopefully go away soon. */
+    /* in some later Linux releases, asm/sigcontext.h may have to   */
+    /* be included instead.                                         */
+#   define __KERNEL__
+#   include <asm/signal.h>
+#   undef __KERNEL__
+# else
+    /* Kernels prior to 2.1.1 defined struct sigcontext_struct instead of */
+    /* struct sigcontext.  libc6 (glibc2) uses "struct sigcontext" in     */
+    /* prototypes, so we have to include the top-level sigcontext.h to    */
+    /* make sure the former gets defined to be the latter if appropriate. */
+#   include <features.h>
+#   if 2 <= __GLIBC__
+#     if 2 == __GLIBC__ && 0 == __GLIBC_MINOR__
+        /* glibc 2.1 no longer has sigcontext.h.  But signal.h        */
+        /* has the right declaration for glibc 2.1.                   */
+#       include <sigcontext.h>
+#     endif /* 0 == __GLIBC_MINOR__ */
+#   else /* not 2 <= __GLIBC__ */
+      /* libc5 doesn't have <sigcontext.h>: go directly with the kernel   */
+      /* one.  Check LINUX_VERSION_CODE to see which we should reference. */
+#     include <asm/sigcontext.h>
+#   endif /* 2 <= __GLIBC__ */
 # endif
+#endif
 
-# if defined(LINUX) && !defined(POWERPC)
-#   include <linux/version.h>
-#   if (LINUX_VERSION_CODE <= 0x10400)
-      /* Ugly hack to get struct sigcontext_struct definition.  Required      */
-      /* for some early 1.3.X releases.  Will hopefully go away soon. */
-      /* in some later Linux releases, asm/sigcontext.h may have to   */
-      /* be included instead.                                         */
-#     define __KERNEL__
-#     include <asm/signal.h>
-#     undef __KERNEL__
-#   else
-      /* Kernels prior to 2.1.1 defined struct sigcontext_struct instead of */
-      /* struct sigcontext.  libc6 (glibc2) uses "struct sigcontext" in     */
-      /* prototypes, so we have to include the top-level sigcontext.h to    */
-      /* make sure the former gets defined to be the latter if appropriate. */
-#     include <features.h>
-#     if 2 <= __GLIBC__
-#       if 2 == __GLIBC__ && 0 == __GLIBC_MINOR__
-         /* glibc 2.1 no longer has sigcontext.h.  But signal.h        */
-         /* has the right declaration for glibc 2.1.                   */
-#         include <sigcontext.h>
-#       endif /* 0 == __GLIBC_MINOR__ */
-#     else /* not 2 <= __GLIBC__ */
-        /* libc5 doesn't have <sigcontext.h>: go directly with the kernel   */
-        /* one.  Check LINUX_VERSION_CODE to see which we should reference. */
-#       include <asm/sigcontext.h>
-#     endif /* 2 <= __GLIBC__ */
-#   endif
-# endif
-# if !defined(OS2) && !defined(PCR) && !defined(AMIGA) && !defined(MACOS) \
+#if !defined(OS2) && !defined(PCR) && !defined(AMIGA) && !defined(MACOS) \
     && !defined(MSWINCE)
-#   include <sys/types.h>
-#   if !defined(MSWIN32)
-#      include <unistd.h>
-#   endif
+# include <sys/types.h>
+# if !defined(MSWIN32)
+#   include <unistd.h>
 # endif
+#endif
 
-# include <stdio.h>
-# if defined(MSWINCE)
-#   define SIGSEGV 0 /* value is irrelevant */
-# else
-#   include <signal.h>
-# endif
+#include <stdio.h>
+#if defined(MSWINCE)
+# define SIGSEGV 0 /* value is irrelevant */
+#else
+# include <signal.h>
+#endif
 
 #if defined(UNIX_LIKE) || defined(CYGWIN32)
 # include <fcntl.h>
 # include <ctype.h>
 #endif
 
-/* Blatantly OS dependent routines, except for those that are related  */
-/* to dynamic loading.                                                 */
+/* Blatantly OS dependent routines, except for those that are related   */
+/* to dynamic loading.                                                  */
 
 #ifdef AMIGA
 # define GC_AMIGA_DEF
-# include "AmigaOS.c"
+# include "extra/AmigaOS.c"
 # undef GC_AMIGA_DEF
 #endif
 
 #if defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32)
-# define WIN32_LEAN_AND_MEAN
+# ifndef WIN32_LEAN_AND_MEAN
+#   define WIN32_LEAN_AND_MEAN 1
+# endif
 # define NOSERVICE
 # include <windows.h>
-  /* It's not clear this is completely kosher under Cygwin.  But it    */
-  /* allows us to get a working GC_get_stack_base.                     */
+  /* It's not clear this is completely kosher under Cygwin.  But it     */
+  /* allows us to get a working GC_get_stack_base.                      */
 #endif
 
 #ifdef MACOS
 #endif
 
 #if defined(LINUX) || defined(FREEBSD) || defined(SOLARIS) || defined(IRIX5) \
-       || ((defined(USE_MMAP) || defined(USE_MUNMAP)) \
-       && !defined(MSWIN32) && !defined(MSWINCE))
+        || ((defined(USE_MMAP) || defined(USE_MUNMAP)) \
+        && !defined(MSWIN32) && !defined(MSWINCE))
 # define MMAP_SUPPORTED
 #endif
 
 #if defined(MMAP_SUPPORTED) || defined(ADD_HEAP_GUARD_PAGES)
 # if defined(USE_MUNMAP) && !defined(USE_MMAP)
-    --> USE_MUNMAP requires USE_MMAP
+#   error "invalid config - USE_MUNMAP requires USE_MMAP"
 # endif
 # include <sys/types.h>
 # include <sys/mman.h>
 #endif
 
 #ifdef DARWIN
-/* for get_etext and friends */
-#include <mach-o/getsect.h>
+  /* for get_etext and friends */
+# include <mach-o/getsect.h>
 #endif
 
 #ifdef DJGPP
-  /* Apparently necessary for djgpp 2.01.  May cause problems with     */
-  /* other versions.                                                   */
+  /* Apparently necessary for djgpp 2.01.  May cause problems with      */
+  /* other versions.                                                    */
   typedef long unsigned int caddr_t;
 #endif
 
 # define OPT_PROT_EXEC 0
 #endif
 
-#if defined(LINUX) && \
-    (defined(USE_PROC_FOR_LIBRARIES) || defined(IA64) || !defined(SMALL_CONFIG))
+#if defined(LINUX) && (defined(USE_PROC_FOR_LIBRARIES) || defined(IA64) \
+                       || !defined(SMALL_CONFIG))
 # define NEED_PROC_MAPS
 #endif
 
 #ifdef NEED_PROC_MAPS
-/* We need to parse /proc/self/maps, either to find dynamic libraries, */
-/* and/or to find the register backing store base (IA64).  Do it once  */
-/* here.                                                               */
+/* We need to parse /proc/self/maps, either to find dynamic libraries, */
+/* and/or to find the register backing store base (IA64).  Do it once  */
+/* here.                                                               */
 
 #define READ read
 
-/* Repeatedly perform a read call until the buffer is filled or        */
-/* we encounter EOF.                                           */
-ssize_t GC_repeat_read(int fd, char *buf, size_t count)
+/* Repeatedly perform a read call until the buffer is filled or */
+/* we encounter EOF.                                            */
+STATIC ssize_t GC_repeat_read(int fd, char *buf, size_t count)
 {
     ssize_t num_read = 0;
     ssize_t result;
-    
+
+    ASSERT_CANCEL_DISABLED();
     while (num_read < count) {
-       result = READ(fd, buf + num_read, count - num_read);
-       if (result < 0) return result;
-       if (result == 0) break;
-       num_read += result;
+        result = READ(fd, buf + num_read, count - num_read);
+        if (result < 0) return result;
+        if (result == 0) break;
+        num_read += result;
     }
     return num_read;
 }
 
 #ifdef THREADS
-/* Determine the length of a file by incrementally reading it into a   */
-/* This would be silly to use on a file supporting lseek, but Linux    */
-/* /proc files usually do not.                                         */
-STATIC size_t GC_get_file_len(int f)
-{
+  /* Determine the length of a file by incrementally reading it into a  */
+  /* This would be silly to use on a file supporting lseek, but Linux   */
+  /* /proc files usually do not.                                        */
+  STATIC size_t GC_get_file_len(int f)
+  {
     size_t total = 0;
     ssize_t result;
 #   define GET_FILE_LEN_BUF_SZ 500
     char buf[GET_FILE_LEN_BUF_SZ];
 
     do {
-       result = read(f, buf, GET_FILE_LEN_BUF_SZ);
-       if (result == -1) return 0;
-       total += result;
+        result = read(f, buf, GET_FILE_LEN_BUF_SZ);
+        if (result == -1) return 0;
+        total += result;
     } while (result > 0);
     return total;
-}
+  }
 
-STATIC size_t GC_get_maps_len(void)
-{
+  STATIC size_t GC_get_maps_len(void)
+  {
     int f = open("/proc/self/maps", O_RDONLY);
     size_t result = GC_get_file_len(f);
     close(f);
     return result;
-}
-#endif
+  }
+#endif /* THREADS */
 
 /*
  * Copy the contents of /proc/self/maps to a buffer in our address space.
@@ -198,7 +199,7 @@ STATIC size_t GC_get_maps_len(void)
  * This code could be simplified if we could determine its size
  * ahead of time.
  */
-char * GC_get_maps(void)
+GC_INNER char * GC_get_maps(void)
 {
     int f;
     int result;
@@ -210,74 +211,74 @@ char * GC_get_maps(void)
     /* The buffer is essentially static, so there must be a single client. */
     GC_ASSERT(I_HOLD_LOCK());
 
-    /* Note that in the presence of threads, the maps file can */
-    /* essentially shrink asynchronously and unexpectedly as   */
-    /* threads that we already think of as dead release their  */
-    /* stacks.  And there is no easy way to read the entire    */
-    /* file atomically.  This is arguably a misfeature of the  */
-    /* /proc/.../maps interface.                               */
-
-    /* Since we dont believe the file can grow                 */
-    /* asynchronously, it should suffice to first determine    */
-    /* the size (using lseek or read), and then to reread the  */
-    /* file.  If the size is inconsistent we have to retry.    */
-    /* This only matters with threads enabled, and if we use   */
-    /* this to locate roots (not the default).                 */
-
-    /* Determine the initial size of /proc/self/maps.          */
-    /* Note that lseek doesn't work, at least as of 2.6.15.    */
+    /* Note that in the presence of threads, the maps file can  */
+    /* essentially shrink asynchronously and unexpectedly as    */
+    /* threads that we already think of as dead release their   */
+    /* stacks.  And there is no easy way to read the entire     */
+    /* file atomically.  This is arguably a misfeature of the   */
+    /* /proc/.../maps interface.                                */
+
+    /* Since we don't believe the file can grow                 */
+    /* asynchronously, it should suffice to first determine     */
+    /* the size (using lseek or read), and then to reread the   */
+    /* file.  If the size is inconsistent we have to retry.     */
+    /* This only matters with threads enabled, and if we use    */
+    /* this to locate roots (not the default).                  */
+
+    /* Determine the initial size of /proc/self/maps.           */
+    /* Note that lseek doesn't work, at least as of 2.6.15.     */
 #   ifdef THREADS
-       maps_size = GC_get_maps_len();
-       if (0 == maps_size) return 0;
+        maps_size = GC_get_maps_len();
+        if (0 == maps_size) return 0;
 #   else
-       maps_size = 4000;       /* Guess */
+        maps_size = 4000;       /* Guess */
 #   endif
 
-    /* Read /proc/self/maps, growing maps_buf as necessary.    */
-    /* Note that we may not allocate conventionally, and       */
-    /* thus can't use stdio.                                   */
-       do {
-           while (maps_size >= maps_buf_sz) {
-             /* Grow only by powers of 2, since we leak "too small" buffers. */
-             while (maps_size >= maps_buf_sz) maps_buf_sz *= 2;
-             maps_buf = GC_scratch_alloc(maps_buf_sz);
-#            ifdef THREADS
-               /* Recompute initial length, since we allocated.        */
-               /* This can only happen a few times per program         */
-               /* execution.                                           */
-               maps_size = GC_get_maps_len();
-               if (0 == maps_size) return 0;
-#            endif
-             if (maps_buf == 0) return 0;
-           }
-           GC_ASSERT(maps_buf_sz >= maps_size + 1);
-           f = open("/proc/self/maps", O_RDONLY);
-           if (-1 == f) return 0;
-#          ifdef THREADS
-             old_maps_size = maps_size;
-#          endif
-           maps_size = 0;
-           do {
-               result = GC_repeat_read(f, maps_buf, maps_buf_sz-1);
-               if (result <= 0) return 0;
-               maps_size += result;
-           } while (result == maps_buf_sz-1);
-           close(f);
-#          ifdef THREADS
-             if (maps_size > old_maps_size) {
-               GC_err_printf("Old maps size = %lu, new maps size = %lu\n",
-                             (unsigned long)old_maps_size,
-                             (unsigned long)maps_size);
-               ABORT("Unexpected asynchronous /proc/self/maps growth: "
-                     "Unregistered thread?");
-             }
-#          endif
-       } while (maps_size >= maps_buf_sz || maps_size < old_maps_size);
-               /* In the single-threaded case, the second clause is false.     */
+    /* Read /proc/self/maps, growing maps_buf as necessary.     */
+    /* Note that we may not allocate conventionally, and        */
+    /* thus can't use stdio.                                    */
+        do {
+            while (maps_size >= maps_buf_sz) {
+              /* Grow only by powers of 2, since we leak "too small" buffers. */
+              while (maps_size >= maps_buf_sz) maps_buf_sz *= 2;
+              maps_buf = GC_scratch_alloc(maps_buf_sz);
+#             ifdef THREADS
+                /* Recompute initial length, since we allocated.        */
+                /* This can only happen a few times per program         */
+                /* execution.                                           */
+                maps_size = GC_get_maps_len();
+                if (0 == maps_size) return 0;
+#             endif
+              if (maps_buf == 0) return 0;
+            }
+            GC_ASSERT(maps_buf_sz >= maps_size + 1);
+            f = open("/proc/self/maps", O_RDONLY);
+            if (-1 == f) return 0;
+#           ifdef THREADS
+              old_maps_size = maps_size;
+#           endif
+            maps_size = 0;
+            do {
+                result = GC_repeat_read(f, maps_buf, maps_buf_sz-1);
+                if (result <= 0) return 0;
+                maps_size += result;
+            } while (result == maps_buf_sz-1);
+            close(f);
+#           ifdef THREADS
+              if (maps_size > old_maps_size) {
+                GC_err_printf("Old maps size = %lu, new maps size = %lu\n",
+                              (unsigned long)old_maps_size,
+                              (unsigned long)maps_size);
+                ABORT("Unexpected asynchronous /proc/self/maps growth: "
+                      "Unregistered thread?");
+              }
+#           endif
+        } while (maps_size >= maps_buf_sz || maps_size < old_maps_size);
+                /* In the single-threaded case, the second clause is false.     */
         maps_buf[maps_size] = '\0';
-       
+
     /* Apply fn to result. */
-       return maps_buf;
+        return maps_buf;
 }
 
 /*
@@ -300,9 +301,9 @@ char * GC_get_maps(void)
  * *prot and *mapping_name are assigned pointers into the original
  * buffer.
  */
-char *GC_parse_map_entry(char *buf_ptr, ptr_t *start, ptr_t *end,
-                                char **prot, unsigned int *maj_dev,
-                               char **mapping_name)
+GC_INNER char *GC_parse_map_entry(char *buf_ptr, ptr_t *start, ptr_t *end,
+                                  char **prot, unsigned int *maj_dev,
+                                  char **mapping_name)
 {
     char *start_start, *end_start, *maj_dev_start;
     char *p;
@@ -348,10 +349,10 @@ char *GC_parse_map_entry(char *buf_ptr, ptr_t *start, ptr_t *end,
     return p;
 }
 
-/* Try to read the backing store base from /proc/self/maps.            */
-/* Return the bounds of the writable mapping with a 0 major device,    */
-/* which includes the address passed as data.                          */
-/* Return FALSE if there is no such mapping.                           */
+/* Try to read the backing store base from /proc/self/maps.             */
+/* Return the bounds of the writable mapping with a 0 major device,     */
+/* which includes the address passed as data.                           */
+/* Return FALSE if there is no such mapping.                            */
 GC_bool GC_enclosing_mapping(ptr_t addr, ptr_t *startp, ptr_t *endp)
 {
   char *prot;
@@ -359,28 +360,28 @@ GC_bool GC_enclosing_mapping(ptr_t addr, ptr_t *startp, ptr_t *endp)
   unsigned int maj_dev;
   char *maps = GC_get_maps();
   char *buf_ptr = maps;
-  
+
   if (0 == maps) return(FALSE);
   for (;;) {
     buf_ptr = GC_parse_map_entry(buf_ptr, &my_start, &my_end,
-                                &prot, &maj_dev, 0);
+                                 &prot, &maj_dev, 0);
 
     if (buf_ptr == NULL) return FALSE;
     if (prot[1] == 'w' && maj_dev == 0) {
         if (my_end > addr && my_start <= addr) {
-         *startp = my_start;
-         *endp = my_end;
-         return TRUE;
-       }
+          *startp = my_start;
+          *endp = my_end;
+          return TRUE;
+        }
     }
   }
   return FALSE;
 }
 
 #if defined(REDIRECT_MALLOC)
-/* Find the text(code) mapping for the library whose name, after       */
-/* stripping the directory part, starts with nm.                       */
-GC_bool GC_text_mapping(char *nm, ptr_t *startp, ptr_t *endp)
+/* Find the text(code) mapping for the library whose name, after        */
+/* stripping the directory part, starts with nm.                        */
+GC_INNER GC_bool GC_text_mapping(char *nm, ptr_t *startp, ptr_t *endp)
 {
   size_t nm_len = strlen(nm);
   char *prot;
@@ -389,24 +390,24 @@ GC_bool GC_text_mapping(char *nm, ptr_t *startp, ptr_t *endp)
   unsigned int maj_dev;
   char *maps = GC_get_maps();
   char *buf_ptr = maps;
-  
+
   if (0 == maps) return(FALSE);
   for (;;) {
     buf_ptr = GC_parse_map_entry(buf_ptr, &my_start, &my_end,
-                                &prot, &maj_dev, &map_path);
+                                 &prot, &maj_dev, &map_path);
 
     if (buf_ptr == NULL) return FALSE;
     if (prot[0] == 'r' && prot[1] == '-' && prot[2] == 'x') {
-       char *p = map_path;
-       /* Set p to point just past last slash, if any. */
-         while (*p != '\0' && *p != '\n' && *p != ' ' && *p != '\t') ++p;
-         while (*p != '/' && p >= map_path) --p;
-         ++p;
-       if (strncmp(nm, p, nm_len) == 0) {
-         *startp = my_start;
-         *endp = my_end;
-         return TRUE;
-       }
+        char *p = map_path;
+        /* Set p to point just past last slash, if any. */
+          while (*p != '\0' && *p != '\n' && *p != ' ' && *p != '\t') ++p;
+          while (*p != '/' && p >= map_path) --p;
+          ++p;
+        if (strncmp(nm, p, nm_len) == 0) {
+          *startp = my_start;
+          *endp = my_end;
+          return TRUE;
+        }
     }
   }
   return FALSE;
@@ -414,33 +415,33 @@ GC_bool GC_text_mapping(char *nm, ptr_t *startp, ptr_t *endp)
 #endif /* REDIRECT_MALLOC */
 
 #ifdef IA64
-static ptr_t backing_store_base_from_proc(void)
-{
+  static ptr_t backing_store_base_from_proc(void)
+  {
     ptr_t my_start, my_end;
     if (!GC_enclosing_mapping(GC_save_regs_in_stack(), &my_start, &my_end)) {
-       if (GC_print_stats) {
-           GC_log_printf("Failed to find backing store base from /proc\n");
-       }
-       return 0;
+        if (GC_print_stats) {
+            GC_log_printf("Failed to find backing store base from /proc\n");
+        }
+        return 0;
     }
     return my_start;
-}
+  }
 #endif
 
-#endif /* NEED_PROC_MAPS */    
+#endif /* NEED_PROC_MAPS */
 
 #if defined(SEARCH_FOR_DATA_START)
-  /* The I386 case can be handled without a search.  The Alpha case    */
-  /* used to be handled differently as well, but the rules changed     */
-  /* for recent Linux versions.  This seems to be the easiest way to   */
-  /* cover all versions.                                               */
+  /* The I386 case can be handled without a search.  The Alpha case     */
+  /* used to be handled differently as well, but the rules changed      */
+  /* for recent Linux versions.  This seems to be the easiest way to    */
+  /* cover all versions.                                                */
 
 # if defined(LINUX) || defined(HURD)
-    /* Some Linux distributions arrange to define __data_start.  Some  */
-    /* define data_start as a weak symbol.  The latter is technically  */
-    /* broken, since the user program may define data_start, in which  */
+    /* Some Linux distributions arrange to define __data_start.  Some   */
+    /* define data_start as a weak symbol.  The latter is technically   */
+    /* broken, since the user program may define data_start, in which   */
     /* case we lose.  Nonetheless, we try both, preferring __data_start.*/
-    /* We assume gcc-compatible pragmas.       */
+    /* We assume gcc-compatible pragmas.        */
 #   pragma weak __data_start
     extern int __data_start[];
 #   pragma weak data_start
@@ -448,22 +449,22 @@ static ptr_t backing_store_base_from_proc(void)
 # endif /* LINUX */
   extern int _end[];
 
-  ptr_t GC_data_start;
+  ptr_t GC_data_start = NULL;
 
   ptr_t GC_find_limit(ptr_t, GC_bool);
 
-  void GC_init_linux_data_start(void)
+  GC_INNER void GC_init_linux_data_start(void)
   {
 
 #   if defined(LINUX) || defined(HURD)
-      /* Try the easy approaches first:        */
+      /* Try the easy approaches first: */
       if ((ptr_t)__data_start != 0) {
-         GC_data_start = (ptr_t)(__data_start);
-         return;
+          GC_data_start = (ptr_t)(__data_start);
+          return;
       }
       if ((ptr_t)data_start != 0) {
-         GC_data_start = (ptr_t)(data_start);
-         return;
+          GC_data_start = (ptr_t)(data_start);
+          return;
       }
 #   endif /* LINUX */
     GC_data_start = GC_find_limit((ptr_t)(_end), FALSE);
@@ -476,43 +477,133 @@ static ptr_t backing_store_base_from_proc(void)
 # define ECOS_GC_MEMORY_SIZE (448 * 1024)
 # endif /* ECOS_GC_MEMORY_SIZE */
 
-/* FIXME: This is a simple way of allocating memory which is           */
-/* compatible with ECOS early releases.  Later releases use a more     */
-/* sophisticated means of allocating memory than this simple static    */
-/* allocator, but this method is at least bound to work.               */
-static char memory[ECOS_GC_MEMORY_SIZE];
-static char *brk = memory;
+/* FIXME: This is a simple way of allocating memory which is            */
+/* compatible with ECOS early releases.  Later releases use a more      */
+/* sophisticated means of allocating memory than this simple static     */
+/* allocator, but this method is at least bound to work.                */
+static char ecos_gc_memory[ECOS_GC_MEMORY_SIZE];
+static char *ecos_gc_brk = ecos_gc_memory;
 
 static void *tiny_sbrk(ptrdiff_t increment)
 {
-  void *p = brk;
-
-  brk += increment;
-
-  if (brk >  memory + sizeof memory)
-    {
-      brk -= increment;
-      return NULL;
-    }
-
+  void *p = ecos_gc_brk;
+  ecos_gc_brk += increment;
+  if (ecos_gc_brk > ecos_gc_memory + sizeof(ecos_gc_memory)) {
+    ecos_gc_brk -= increment;
+    return NULL;
+  }
   return p;
 }
 #define sbrk tiny_sbrk
 # endif /* ECOS */
 
-#if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__)
-  ptr_t GC_data_start;
+#if defined(NETBSD) && defined(__ELF__)
+  ptr_t GC_data_start = NULL;
   ptr_t GC_find_limit(ptr_t, GC_bool);
+
   extern char **environ;
 
-  void GC_init_netbsd_elf(void)
+  GC_INNER void GC_init_netbsd_elf(void)
   {
-       /* This may need to be environ, without the underscore, for     */
-       /* some versions.                                               */
+        /* This may need to be environ, without the underscore, for     */
+        /* some versions.                                               */
     GC_data_start = GC_find_limit((ptr_t)&environ, FALSE);
   }
 #endif
 
+#ifdef OPENBSD
+  static struct sigaction old_segv_act;
+  STATIC sigjmp_buf GC_jmp_buf_openbsd;
+
+# ifdef THREADS
+#   include <sys/syscall.h>
+    extern sigset_t __syscall(quad_t, ...);
+# endif
+
+  /* Don't use GC_find_limit() because siglongjmp() outside of the      */
+  /* signal handler by-passes our userland pthreads lib, leaving        */
+  /* SIGSEGV and SIGPROF masked.  Instead, use this custom one that     */
+  /* works-around the issues.                                           */
+
+  /*ARGSUSED*/
+  STATIC void GC_fault_handler_openbsd(int sig)
+  {
+     siglongjmp(GC_jmp_buf_openbsd, 1);
+  }
+
+  /* Return the first non-addressible location > p or bound.    */
+  /* Requires the allocation lock.                              */
+  STATIC ptr_t GC_find_limit_openbsd(ptr_t p, ptr_t bound)
+  {
+    static volatile ptr_t result;
+             /* Safer if static, since otherwise it may not be  */
+             /* preserved across the longjmp.  Can safely be    */
+             /* static since it's only called with the          */
+             /* allocation lock held.                           */
+
+    struct sigaction act;
+    size_t pgsz = (size_t)sysconf(_SC_PAGESIZE);
+    GC_ASSERT(I_HOLD_LOCK());
+
+    act.sa_handler = GC_fault_handler_openbsd;
+    sigemptyset(&act.sa_mask);
+    act.sa_flags = SA_NODEFER | SA_RESTART;
+    sigaction(SIGSEGV, &act, &old_segv_act);
+
+    if (sigsetjmp(GC_jmp_buf_openbsd, 1) == 0) {
+      result = (ptr_t)((word)p & ~(pgsz-1));
+      for (;;) {
+        result += pgsz;
+        if (result >= bound) {
+          result = bound;
+          break;
+        }
+        GC_noop1((word)(*result));
+      }
+    }
+
+#   ifdef THREADS
+      /* Due to the siglongjump we need to manually unmask SIGPROF. */
+      __syscall(SYS_sigprocmask, SIG_UNBLOCK, sigmask(SIGPROF));
+#   endif
+
+    sigaction(SIGSEGV, &old_segv_act, 0);
+    return(result);
+  }
+
+  /* Return first addressable location > p or bound.    */
+  /* Requires the allocation lock.                      */
+  STATIC ptr_t GC_skip_hole_openbsd(ptr_t p, ptr_t bound)
+  {
+    static volatile ptr_t result;
+    static volatile int firstpass;
+
+    struct sigaction act;
+    size_t pgsz = (size_t)sysconf(_SC_PAGESIZE);
+    GC_ASSERT(I_HOLD_LOCK());
+
+    act.sa_handler = GC_fault_handler_openbsd;
+    sigemptyset(&act.sa_mask);
+    act.sa_flags = SA_NODEFER | SA_RESTART;
+    sigaction(SIGSEGV, &act, &old_segv_act);
+
+    firstpass = 1;
+    result = (ptr_t)((word)p & ~(pgsz-1));
+    if (sigsetjmp(GC_jmp_buf_openbsd, 1) != 0 || firstpass) {
+      firstpass = 0;
+      result += pgsz;
+      if (result >= bound) {
+        result = bound;
+      } else {
+        GC_noop1((word)(*result));
+      }
+    }
+
+    sigaction(SIGSEGV, &old_segv_act, 0);
+    return(result);
+  }
+#endif /* OPENBSD */
+
 # ifdef OS2
 
 # include <stddef.h>
@@ -526,19 +617,19 @@ struct exe_hdr {
 };
 
 #define E_MAGIC(x)      (x).magic_number
-#define EMAGIC          0x5A4D  
+#define EMAGIC          0x5A4D
 #define E_LFANEW(x)     (x).new_exe_offset
 
 struct e32_exe {
-    unsigned char       magic_number[2]; 
-    unsigned char       byte_order; 
-    unsigned char       word_order; 
+    unsigned char       magic_number[2];
+    unsigned char       byte_order;
+    unsigned char       word_order;
     unsigned long       exe_format_level;
-    unsigned short      cpu;       
+    unsigned short      cpu;
     unsigned short      os;
     unsigned long       padding1[13];
     unsigned long       object_table_offset;
-    unsigned long       object_count;    
+    unsigned long       object_count;
     unsigned long       padding2[31];
 };
 
@@ -556,11 +647,11 @@ struct e32_exe {
 #define E32_OBJCNT(x)   (x).object_count
 
 struct o32_obj {
-    unsigned long       size;  
+    unsigned long       size;
     unsigned long       base;
-    unsigned long       flags;  
+    unsigned long       flags;
     unsigned long       pagemap;
-    unsigned long       mapsize; 
+    unsigned long       mapsize;
     unsigned long       reserved;
 };
 
@@ -597,28 +688,56 @@ struct o32_obj {
 # endif /* OS/2 */
 
 /* Find the page size */
-word GC_page_size;
+GC_INNER word GC_page_size = 0;
 
 # if defined(MSWIN32) || defined(MSWINCE)
-  void GC_setpagesize(void)
-  {
-    GetSystemInfo(&GC_sysinfo);
-    GC_page_size = GC_sysinfo.dwPageSize;
-  }
 
-# else
-#   if defined(MPROTECT_VDB) || defined(PROC_VDB) || defined(USE_MMAP)
-       void GC_setpagesize(void)
-       {
-           GC_page_size = GETPAGESIZE();
-       }
-#   else
-       /* It's acceptable to fake it. */
-       void GC_setpagesize(void)
-       {
-           GC_page_size = HBLKSIZE;
-       }
+#   ifndef VER_PLATFORM_WIN32_CE
+#     define VER_PLATFORM_WIN32_CE 3
 #   endif
+
+#   if defined(MSWINCE) && defined(THREADS)
+      GC_INNER GC_bool GC_dont_query_stack_min = FALSE;
+#   endif
+
+    GC_INNER void GC_setpagesize(void)
+    {
+      GetSystemInfo(&GC_sysinfo);
+      GC_page_size = GC_sysinfo.dwPageSize;
+#     if defined(MSWINCE) && !defined(_WIN32_WCE_EMULATION)
+        {
+          OSVERSIONINFO verInfo;
+          /* Check the current WinCE version. */
+          verInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+          if (!GetVersionEx(&verInfo))
+            ABORT("GetVersionEx failed");
+          if (verInfo.dwPlatformId == VER_PLATFORM_WIN32_CE &&
+              verInfo.dwMajorVersion < 6) {
+            /* Only the first 32 MB of address space belongs to the     */
+            /* current process (unless WinCE 6.0+ or emulation).        */
+            GC_sysinfo.lpMaximumApplicationAddress = (LPVOID)((word)32 << 20);
+#           ifdef THREADS
+              /* On some old WinCE versions, it's observed that         */
+              /* VirtualQuery calls don't work properly when used to    */
+              /* get thread current stack committed minimum.            */
+              if (verInfo.dwMajorVersion < 5)
+                GC_dont_query_stack_min = TRUE;
+#           endif
+          }
+        }
+#     endif
+    }
+
+# else
+    GC_INNER void GC_setpagesize(void)
+    {
+#     if defined(MPROTECT_VDB) || defined(PROC_VDB) || defined(USE_MMAP)
+        GC_page_size = GETPAGESIZE();
+#     else
+        /* It's acceptable to fake it. */
+        GC_page_size = HBLKSIZE;
+#     endif
+    }
 # endif
 
 # if defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32)
@@ -626,19 +745,19 @@ word GC_page_size;
 #ifndef CYGWIN32
 
 # define is_writable(prot) ((prot) == PAGE_READWRITE \
-                           || (prot) == PAGE_WRITECOPY \
-                           || (prot) == PAGE_EXECUTE_READWRITE \
-                           || (prot) == PAGE_EXECUTE_WRITECOPY)
-/* Return the number of bytes that are writable starting at p. */
-/* The pointer p is assumed to be page aligned.                        */
-/* If base is not 0, *base becomes the beginning of the        */
-/* allocation region containing p.                             */
+                            || (prot) == PAGE_WRITECOPY \
+                            || (prot) == PAGE_EXECUTE_READWRITE \
+                            || (prot) == PAGE_EXECUTE_WRITECOPY)
+/* Return the number of bytes that are writable starting at p.  */
+/* The pointer p is assumed to be page aligned.                 */
+/* If base is not 0, *base becomes the beginning of the         */
+/* allocation region containing p.                              */
 STATIC word GC_get_writable_length(ptr_t p, ptr_t *base)
 {
     MEMORY_BASIC_INFORMATION buf;
     word result;
     word protect;
-    
+
     result = VirtualQuery(p, &buf, sizeof(buf));
     if (result != sizeof(buf)) ABORT("Weird VirtualQuery result");
     if (base != 0) *base = (ptr_t)(buf.AllocationBase);
@@ -655,46 +774,48 @@ GC_API int GC_CALL GC_get_stack_base(struct GC_stack_base *sb)
     int dummy;
     ptr_t sp = (ptr_t)(&dummy);
     ptr_t trunc_sp = (ptr_t)((word)sp & ~(GC_page_size - 1));
+    /* FIXME: This won't work if called from a deeply recursive */
+    /* client code (and the committed stack space has grown).   */
     word size = GC_get_writable_length(trunc_sp, 0);
-   
+    GC_ASSERT(size != 0);
     sb -> mem_base = trunc_sp + size;
     return GC_SUCCESS;
 }
 
 #else /* CYGWIN32 */
-  
-/* An alternate version for Cygwin (adapted from Dave Korn's   */
-/* gcc version of boehm-gc).                                   */
+
+/* An alternate version for Cygwin (adapted from Dave Korn's    */
+/* gcc version of boehm-gc).                                    */
   GC_API int GC_CALL GC_get_stack_base(struct GC_stack_base *sb)
   {
     extern void * _tlsbase __asm__ ("%fs:4");
     sb -> mem_base = _tlsbase;
     return GC_SUCCESS;
   }
-  
-#endif /* CYGWIN32 */
 
+#endif /* CYGWIN32 */
 
-#define HAVE_GET_STACK_BASE
+# define HAVE_GET_STACK_BASE
 
-/* This is always called from the main thread. */
+/* This is always called from the main thread.  */
 ptr_t GC_get_main_stack_base(void)
 {
     struct GC_stack_base sb;
-
     GC_get_stack_base(&sb);
+    GC_ASSERT((void *)&sb HOTTER_THAN sb.mem_base);
     return (ptr_t)sb.mem_base;
 }
 
 # endif /* MS Windows */
 
 # ifdef BEOS
-# include <kernel/OS.h>
-ptr_t GC_get_main_stack_base(void){
-       thread_info th;
-       get_thread_info(find_thread(NULL),&th);
-       return th.stack_end;
-}
+#   include <kernel/OS.h>
+    ptr_t GC_get_main_stack_base(void)
+    {
+      thread_info th;
+      get_thread_info(find_thread(NULL),&th);
+      return th.stack_end;
+    }
 # endif /* BEOS */
 
 
@@ -704,10 +825,10 @@ ptr_t GC_get_main_stack_base(void)
 {
     PTIB ptib;
     PPIB ppib;
-    
+
     if (DosGetInfoBlocks(&ptib, &ppib) != NO_ERROR) {
-       GC_err_printf("DosGetInfoBlocks failed\n");
-       ABORT("DosGetInfoBlocks failed\n");
+        GC_err_printf("DosGetInfoBlocks failed\n");
+        ABORT("DosGetInfoBlocks failed\n");
     }
     return((ptr_t)(ptib -> tib_pstacklimit));
 }
@@ -716,140 +837,140 @@ ptr_t GC_get_main_stack_base(void)
 
 # ifdef AMIGA
 #   define GC_AMIGA_SB
-#   include "AmigaOS.c"
+#   include "extra/AmigaOS.c"
 #   undef GC_AMIGA_SB
 # endif /* AMIGA */
 
 # if defined(NEED_FIND_LIMIT) || defined(UNIX_LIKE)
 
-    typedef void (*handler)(int);
+    typedef void (*GC_fault_handler_t)(int);
 
 #   if defined(SUNOS5SIGS) || defined(IRIX5) || defined(OSF1) \
     || defined(HURD) || defined(NETBSD)
-       static struct sigaction old_segv_act;
-#      if defined(_sigargs) /* !Irix6.x */ || defined(HPUX) \
-       || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
-           static struct sigaction old_bus_act;
-#      endif
+        static struct sigaction old_segv_act;
+#       if defined(_sigargs) /* !Irix6.x */ || defined(HPUX) \
+        || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
+            static struct sigaction old_bus_act;
+#       endif
 #   else
-        static handler old_segv_handler, old_bus_handler;
+        static GC_fault_handler_t old_segv_handler, old_bus_handler;
 #   endif
-    
-    void GC_set_and_save_fault_handler(handler h)
+
+    GC_INNER void GC_set_and_save_fault_handler(GC_fault_handler_t h)
     {
-#      if defined(SUNOS5SIGS) || defined(IRIX5)  \
+#       if defined(SUNOS5SIGS) || defined(IRIX5)  \
         || defined(OSF1) || defined(HURD) || defined(NETBSD)
-         struct sigaction      act;
+          struct sigaction      act;
 
-         act.sa_handler        = h;
-#        if 0 /* Was necessary for Solaris 2.3 and very temporary      */
-              /* NetBSD bugs.                                          */
+          act.sa_handler        = h;
+#         if 0 /* Was necessary for Solaris 2.3 and very temporary      */
+               /* NetBSD bugs.                                          */
             act.sa_flags          = SA_RESTART | SA_NODEFER;
 #         else
             act.sa_flags          = SA_RESTART;
-#        endif
-
-         (void) sigemptyset(&act.sa_mask);
-#        ifdef GC_IRIX_THREADS
-               /* Older versions have a bug related to retrieving and  */
-               /* and setting a handler at the same time.              */
-               (void) sigaction(SIGSEGV, 0, &old_segv_act);
-               (void) sigaction(SIGSEGV, &act, 0);
-#        else
-               (void) sigaction(SIGSEGV, &act, &old_segv_act);
-#              if defined(IRIX5) && defined(_sigargs) /* Irix 5.x, not 6.x */ \
-                  || defined(HPUX) || defined(HURD) || defined(NETBSD) \
-                  || defined(FREEBSD)
-                   /* Under Irix 5.x or HP/UX, we may get SIGBUS.      */
-                   /* Pthreads doesn't exist under Irix 5.x, so we     */
-                   /* don't have to worry in the threads case.         */
-                   (void) sigaction(SIGBUS, &act, &old_bus_act);
-#              endif
-#        endif /* GC_IRIX_THREADS */
-#      else
-         old_segv_handler = signal(SIGSEGV, h);
-#        ifdef SIGBUS
-           old_bus_handler = signal(SIGBUS, h);
-#        endif
-#      endif
+#         endif
+
+          (void) sigemptyset(&act.sa_mask);
+#         ifdef GC_IRIX_THREADS
+                /* Older versions have a bug related to retrieving and  */
+                /* and setting a handler at the same time.              */
+                (void) sigaction(SIGSEGV, 0, &old_segv_act);
+                (void) sigaction(SIGSEGV, &act, 0);
+#         else
+                (void) sigaction(SIGSEGV, &act, &old_segv_act);
+#               if defined(IRIX5) && defined(_sigargs) /* Irix 5.x, not 6.x */ \
+                   || defined(HPUX) || defined(HURD) || defined(NETBSD) \
+                   || defined(FREEBSD)
+                    /* Under Irix 5.x or HP/UX, we may get SIGBUS.      */
+                    /* Pthreads doesn't exist under Irix 5.x, so we     */
+                    /* don't have to worry in the threads case.         */
+                    (void) sigaction(SIGBUS, &act, &old_bus_act);
+#               endif
+#         endif /* GC_IRIX_THREADS */
+#       else
+          old_segv_handler = signal(SIGSEGV, h);
+#         ifdef SIGBUS
+            old_bus_handler = signal(SIGBUS, h);
+#         endif
+#       endif
     }
 # endif /* NEED_FIND_LIMIT || UNIX_LIKE */
 
 # if defined(NEED_FIND_LIMIT) || \
      defined(USE_PROC_FOR_LIBRARIES) && defined(THREADS)
-  /* Some tools to implement HEURISTIC2        */
-#   define MIN_PAGE_SIZE 256   /* Smallest conceivable page size, bytes */
-    
+  /* Some tools to implement HEURISTIC2 */
+#   define MIN_PAGE_SIZE 256    /* Smallest conceivable page size, bytes */
+
     /*ARGSUSED*/
     STATIC void GC_fault_handler(int sig)
     {
         LONGJMP(GC_jmp_buf, 1);
     }
 
-    void GC_setup_temporary_fault_handler(void)
+    GC_INNER void GC_setup_temporary_fault_handler(void)
     {
-       /* Handler is process-wide, so this should only happen in */
-       /* one thread at a time.                                  */
-       GC_ASSERT(I_HOLD_LOCK());
-       GC_set_and_save_fault_handler(GC_fault_handler);
+        /* Handler is process-wide, so this should only happen in */
+        /* one thread at a time.                                  */
+        GC_ASSERT(I_HOLD_LOCK());
+        GC_set_and_save_fault_handler(GC_fault_handler);
     }
-    
-    void GC_reset_fault_handler(void)
+
+    GC_INNER void GC_reset_fault_handler(void)
     {
 #       if defined(SUNOS5SIGS) || defined(IRIX5) \
-          || defined(OSF1) || defined(HURD) || defined(NETBSD)
-         (void) sigaction(SIGSEGV, &old_segv_act, 0);
-#        if defined(IRIX5) && defined(_sigargs) /* Irix 5.x, not 6.x */ \
-            || defined(HPUX) || defined(HURD) || defined(NETBSD) \
-            || defined(FREEBSD)
-             (void) sigaction(SIGBUS, &old_bus_act, 0);
-#        endif
+           || defined(OSF1) || defined(HURD) || defined(NETBSD)
+          (void) sigaction(SIGSEGV, &old_segv_act, 0);
+#         if defined(IRIX5) && defined(_sigargs) /* Irix 5.x, not 6.x */ \
+             || defined(HPUX) || defined(HURD) || defined(NETBSD) \
+             || defined(FREEBSD)
+              (void) sigaction(SIGBUS, &old_bus_act, 0);
+#         endif
 #       else
-         (void) signal(SIGSEGV, old_segv_handler);
-#        ifdef SIGBUS
-           (void) signal(SIGBUS, old_bus_handler);
-#        endif
+          (void) signal(SIGSEGV, old_segv_handler);
+#         ifdef SIGBUS
+            (void) signal(SIGBUS, old_bus_handler);
+#         endif
 #       endif
     }
 
-    /* Return the first non-addressable location > p (up) or   */
-    /* the smallest location q s.t. [q,p) is addressable (!up).        */
-    /* We assume that p (up) or p-1 (!up) is addressable.      */
-    /* Requires allocation lock.                               */
+    /* Return the first non-addressable location > p (up) or    */
+    /* the smallest location q s.t. [q,p) is addressable (!up). */
+    /* We assume that p (up) or p-1 (!up) is addressable.       */
+    /* Requires allocation lock.                                */
     STATIC ptr_t GC_find_limit_with_bound(ptr_t p, GC_bool up, ptr_t bound)
     {
         static volatile ptr_t result;
-               /* Safer if static, since otherwise it may not be       */
-               /* preserved across the longjmp.  Can safely be         */
-               /* static since it's only called with the               */
-               /* allocation lock held.                                */
-
-       GC_ASSERT(I_HOLD_LOCK());
-       GC_setup_temporary_fault_handler();
-       if (SETJMP(GC_jmp_buf) == 0) {
-           result = (ptr_t)(((word)(p))
-                             & ~(MIN_PAGE_SIZE-1));
-           for (;;) {
-               if (up) {
-                   result += MIN_PAGE_SIZE;
-                   if (result >= bound) return bound;
-               } else {
-                   result -= MIN_PAGE_SIZE;
-                   if (result <= bound) return bound;
-               }
-               GC_noop1((word)(*result));
-           }
-       }
-       GC_reset_fault_handler();
-       if (!up) {
-           result += MIN_PAGE_SIZE;
-       }
-       return(result);
+                /* Safer if static, since otherwise it may not be       */
+                /* preserved across the longjmp.  Can safely be         */
+                /* static since it's only called with the               */
+                /* allocation lock held.                                */
+
+        GC_ASSERT(I_HOLD_LOCK());
+        GC_setup_temporary_fault_handler();
+        if (SETJMP(GC_jmp_buf) == 0) {
+            result = (ptr_t)(((word)(p))
+                              & ~(MIN_PAGE_SIZE-1));
+            for (;;) {
+                if (up) {
+                    result += MIN_PAGE_SIZE;
+                    if (result >= bound) return bound;
+                } else {
+                    result -= MIN_PAGE_SIZE;
+                    if (result <= bound) return bound;
+                }
+                GC_noop1((word)(*result));
+            }
+        }
+        GC_reset_fault_handler();
+        if (!up) {
+            result += MIN_PAGE_SIZE;
+        }
+        return(result);
     }
 
     ptr_t GC_find_limit(ptr_t p, GC_bool up)
     {
-       return GC_find_limit_with_bound(p, up, up ? (ptr_t)(word)(-1) : 0);
+        return GC_find_limit_with_bound(p, up, up ? (ptr_t)(word)(-1) : 0);
     }
 # endif
 
@@ -865,7 +986,7 @@ ptr_t GC_get_main_stack_base(void)
 #include <sys/param.h>
 #include <sys/pstat.h>
 
-  ptr_t GC_get_register_stack_base(void)
+  GC_INNER ptr_t GC_get_register_stack_base(void)
   {
     struct pst_vm_status vm_status;
 
@@ -888,8 +1009,8 @@ ptr_t GC_get_main_stack_base(void)
 #include <sys/types.h>
 #include <sys/stat.h>
 
-# define STAT_SKIP 27   /* Number of fields preceding startstack       */
-                       /* field in /proc/self/stat                     */
+# define STAT_SKIP 27   /* Number of fields preceding startstack        */
+                        /* field in /proc/self/stat                     */
 
 #ifdef USE_LIBC_PRIVATES
 # pragma weak __libc_stack_end
@@ -902,26 +1023,26 @@ ptr_t GC_get_main_stack_base(void)
       extern ptr_t __libc_ia64_register_backing_store_base;
 #   endif
 
-    ptr_t GC_get_register_stack_base(void)
+    GC_INNER ptr_t GC_get_register_stack_base(void)
     {
       ptr_t result;
 
 #     ifdef USE_LIBC_PRIVATES
         if (0 != &__libc_ia64_register_backing_store_base
-           && 0 != __libc_ia64_register_backing_store_base) {
-         /* Glibc 2.2.4 has a bug such that for dynamically linked     */
-         /* executables __libc_ia64_register_backing_store_base is     */
-         /* defined but uninitialized during constructor calls.        */
-         /* Hence we check for both nonzero address and value.         */
-         return __libc_ia64_register_backing_store_base;
+            && 0 != __libc_ia64_register_backing_store_base) {
+          /* Glibc 2.2.4 has a bug such that for dynamically linked     */
+          /* executables __libc_ia64_register_backing_store_base is     */
+          /* defined but uninitialized during constructor calls.        */
+          /* Hence we check for both nonzero address and value.         */
+          return __libc_ia64_register_backing_store_base;
         }
 #     endif
       result = backing_store_base_from_proc();
       if (0 == result) {
-         result = GC_find_limit(GC_save_regs_in_stack(), FALSE);
-         /* Now seems to work better than constant displacement        */
-         /* heuristic used in 6.X versions.  The latter seems to       */
-         /* fail for 2.6 kernels.                                      */
+          result = GC_find_limit(GC_save_regs_in_stack(), FALSE);
+          /* Now seems to work better than constant displacement        */
+          /* heuristic used in 6.X versions.  The latter seems to       */
+          /* fail for 2.6 kernels.                                      */
       }
       return result;
     }
@@ -929,54 +1050,57 @@ ptr_t GC_get_main_stack_base(void)
 
   STATIC ptr_t GC_linux_stack_base(void)
   {
-    /* We read the stack base value from /proc/self/stat.  We do this  */
+    /* We read the stack base value from /proc/self/stat.  We do this   */
     /* using direct I/O system calls in order to avoid calling malloc   */
-    /* in case REDIRECT_MALLOC is defined.                             */ 
-#   define STAT_BUF_SIZE 4096
-#   define STAT_READ read
-         /* Should probably call the real read, if read is wrapped.    */
+    /* in case REDIRECT_MALLOC is defined.                              */
+#   ifndef STAT_READ
+      /* Also defined in pthread_support.c. */
+#     define STAT_BUF_SIZE 4096
+#     define STAT_READ read
+#   endif
+          /* Should probably call the real read, if read is wrapped.    */
     char stat_buf[STAT_BUF_SIZE];
     int f;
     char c;
     word result = 0;
     size_t i, buf_offset = 0;
 
-    /* First try the easy way.  This should work for glibc 2.2 */
+    /* First try the easy way.  This should work for glibc 2.2  */
     /* This fails in a prelinked ("prelink" command) executable */
-    /* since the correct value of __libc_stack_end never       */
-    /* becomes visible to us.  The second test works around    */
-    /* this.                                                   */  
+    /* since the correct value of __libc_stack_end never        */
+    /* becomes visible to us.  The second test works around     */
+    /* this.                                                    */
 #   ifdef USE_LIBC_PRIVATES
       if (0 != &__libc_stack_end && 0 != __libc_stack_end ) {
 #       if defined(IA64)
-         /* Some versions of glibc set the address 16 bytes too        */
-         /* low while the initialization code is running.              */
-         if (((word)__libc_stack_end & 0xfff) + 0x10 < 0x1000) {
-           return __libc_stack_end + 0x10;
-         } /* Otherwise it's not safe to add 16 bytes and we fall      */
-           /* back to using /proc.                                     */
-#      elif defined(SPARC)
-         /* Older versions of glibc for 64-bit Sparc do not set
-          * this variable correctly, it gets set to either zero
-          * or one.
-          */
-         if (__libc_stack_end != (ptr_t) (unsigned long)0x1)
-           return __libc_stack_end;
-#      else
-         return __libc_stack_end;
-#      endif
+          /* Some versions of glibc set the address 16 bytes too        */
+          /* low while the initialization code is running.              */
+          if (((word)__libc_stack_end & 0xfff) + 0x10 < 0x1000) {
+            return __libc_stack_end + 0x10;
+          } /* Otherwise it's not safe to add 16 bytes and we fall      */
+            /* back to using /proc.                                     */
+#       elif defined(SPARC)
+          /* Older versions of glibc for 64-bit Sparc do not set
+           * this variable correctly, it gets set to either zero
+           * or one.
+           */
+          if (__libc_stack_end != (ptr_t) (unsigned long)0x1)
+            return __libc_stack_end;
+#       else
+          return __libc_stack_end;
+#       endif
       }
 #   endif
     f = open("/proc/self/stat", O_RDONLY);
     if (f < 0 || STAT_READ(f, stat_buf, STAT_BUF_SIZE) < 2 * STAT_SKIP) {
-       ABORT("Couldn't read /proc/self/stat");
+        ABORT("Couldn't read /proc/self/stat");
     }
     c = stat_buf[buf_offset++];
-    /* Skip the required number of fields.  This number is hopefully   */
-    /* constant across all Linux implementations.                      */
+    /* Skip the required number of fields.  This number is hopefully    */
+    /* constant across all Linux implementations.                       */
       for (i = 0; i < STAT_SKIP; ++i) {
-       while (isspace(c)) c = stat_buf[buf_offset++];
-       while (!isspace(c)) c = stat_buf[buf_offset++];
+        while (isspace(c)) c = stat_buf[buf_offset++];
+        while (!isspace(c)) c = stat_buf[buf_offset++];
       }
     while (isspace(c)) c = stat_buf[buf_offset++];
     while (isdigit(c)) {
@@ -993,8 +1117,8 @@ ptr_t GC_get_main_stack_base(void)
 
 #ifdef FREEBSD_STACKBOTTOM
 
-/* This uses an undocumented sysctl call, but at least one expert      */
-/* believes it will stay.                                              */
+/* This uses an undocumented sysctl call, but at least one expert       */
+/* believes it will stay.                                               */
 
 #include <unistd.h>
 #include <sys/types.h>
@@ -1006,7 +1130,7 @@ ptr_t GC_get_main_stack_base(void)
     ptr_t base;
     size_t len = sizeof(ptr_t);
     int r = sysctl(nm, 2, &base, &len, NULL, 0);
-    
+
     if (r) ABORT("Error getting stack base");
 
     return base;
@@ -1016,58 +1140,58 @@ ptr_t GC_get_main_stack_base(void)
 
 #if !defined(BEOS) && !defined(AMIGA) && !defined(MSWIN32) \
     && !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS) \
-    && !defined(CYGWIN32)
+    && !defined(CYGWIN32) && !defined(GC_OPENBSD_THREADS)
 
 ptr_t GC_get_main_stack_base(void)
 {
 #   ifdef STACKBOTTOM
-       return(STACKBOTTOM);
+        return(STACKBOTTOM);
 #   else
-#      if defined(HEURISTIC1) || defined(HEURISTIC2)
-         word dummy;
-#      endif
-       ptr_t result;
-#      define STACKBOTTOM_ALIGNMENT_M1 ((word)STACK_GRAN - 1)
-#      ifdef HEURISTIC1
-#         ifdef STACK_GROWS_DOWN
-            result = (ptr_t)((((word)(&dummy))
-                              + STACKBOTTOM_ALIGNMENT_M1)
-                             & ~STACKBOTTOM_ALIGNMENT_M1);
-#         else
-            result = (ptr_t)(((word)(&dummy))
-                             & ~STACKBOTTOM_ALIGNMENT_M1);
-#         endif
-#      endif /* HEURISTIC1 */
-#      ifdef LINUX_STACKBOTTOM
-          result = GC_linux_stack_base();
-#      endif
-#      ifdef FREEBSD_STACKBOTTOM
-          result = GC_freebsd_stack_base();
-#      endif
-#      ifdef HEURISTIC2
-#          ifdef STACK_GROWS_DOWN
-               result = GC_find_limit((ptr_t)(&dummy), TRUE);
-#              ifdef HEURISTIC2_LIMIT
-                   if (result > HEURISTIC2_LIMIT
-                       && (ptr_t)(&dummy) < HEURISTIC2_LIMIT) {
-                           result = HEURISTIC2_LIMIT;
-                   }
-#              endif
-#          else
-               result = GC_find_limit((ptr_t)(&dummy), FALSE);
-#              ifdef HEURISTIC2_LIMIT
-                   if (result < HEURISTIC2_LIMIT
-                       && (ptr_t)(&dummy) > HEURISTIC2_LIMIT) {
-                           result = HEURISTIC2_LIMIT;
-                   }
-#              endif
-#          endif
-
-#      endif /* HEURISTIC2 */
-#      ifdef STACK_GROWS_DOWN
-           if (result == 0) result = (ptr_t)(signed_word)(-sizeof(ptr_t));
-#      endif
-       return(result);
+#       if defined(HEURISTIC1) || defined(HEURISTIC2)
+          word dummy;
+#       endif
+        ptr_t result;
+#       define STACKBOTTOM_ALIGNMENT_M1 ((word)STACK_GRAN - 1)
+#       ifdef HEURISTIC1
+#          ifdef STACK_GROWS_DOWN
+             result = (ptr_t)((((word)(&dummy))
+                               + STACKBOTTOM_ALIGNMENT_M1)
+                              & ~STACKBOTTOM_ALIGNMENT_M1);
+#          else
+             result = (ptr_t)(((word)(&dummy))
+                              & ~STACKBOTTOM_ALIGNMENT_M1);
+#          endif
+#       endif /* HEURISTIC1 */
+#       ifdef LINUX_STACKBOTTOM
+           result = GC_linux_stack_base();
+#       endif
+#       ifdef FREEBSD_STACKBOTTOM
+           result = GC_freebsd_stack_base();
+#       endif
+#       ifdef HEURISTIC2
+#           ifdef STACK_GROWS_DOWN
+                result = GC_find_limit((ptr_t)(&dummy), TRUE);
+#               ifdef HEURISTIC2_LIMIT
+                    if (result > HEURISTIC2_LIMIT
+                        && (ptr_t)(&dummy) < HEURISTIC2_LIMIT) {
+                            result = HEURISTIC2_LIMIT;
+                    }
+#               endif
+#           else
+                result = GC_find_limit((ptr_t)(&dummy), FALSE);
+#               ifdef HEURISTIC2_LIMIT
+                    if (result < HEURISTIC2_LIMIT
+                        && (ptr_t)(&dummy) > HEURISTIC2_LIMIT) {
+                            result = HEURISTIC2_LIMIT;
+                    }
+#               endif
+#           endif
+
+#       endif /* HEURISTIC2 */
+#       ifdef STACK_GROWS_DOWN
+            if (result == 0) result = (ptr_t)(signed_word)(-sizeof(ptr_t));
+#       endif
+        return(result);
 #   endif /* STACKBOTTOM */
 }
 
@@ -1079,8 +1203,8 @@ ptr_t GC_get_main_stack_base(void)
 /* extern int pthread_getattr_np(pthread_t, pthread_attr_t *); */
 
 #ifdef IA64
-  ptr_t GC_greatest_stack_base_below(ptr_t bound);
-       /* From pthread_support.c */
+  GC_INNER ptr_t GC_greatest_stack_base_below(ptr_t bound);
+                                /* From pthread_support.c */
 #endif
 
 GC_API int GC_CALL GC_get_stack_base(struct GC_stack_base *b)
@@ -1089,62 +1213,99 @@ GC_API int GC_CALL GC_get_stack_base(struct GC_stack_base *b)
     size_t size;
 
     if (pthread_getattr_np(pthread_self(), &attr) != 0) {
-       WARN("pthread_getattr_np failed\n", 0);
-       return GC_UNIMPLEMENTED;
+        WARN("pthread_getattr_np failed\n", 0);
+        return GC_UNIMPLEMENTED;
     }
     if (pthread_attr_getstack(&attr, &(b -> mem_base), &size) != 0) {
-       ABORT("pthread_attr_getstack failed");
+        ABORT("pthread_attr_getstack failed");
     }
     pthread_attr_destroy(&attr);
 #   ifdef STACK_GROWS_DOWN
         b -> mem_base = (char *)(b -> mem_base) + size;
 #   endif
 #   ifdef IA64
-      /* We could try backing_store_base_from_proc, but that's safe    */
-      /* only if no mappings are being asynchronously created.         */
-      /* Subtracting the size from the stack base doesn't work for at  */
-      /* least the main thread.                                                */
+      /* We could try backing_store_base_from_proc, but that's safe     */
+      /* only if no mappings are being asynchronously created.          */
+      /* Subtracting the size from the stack base doesn't work for at   */
+      /* least the main thread.                                         */
       LOCK();
       {
-       ptr_t bsp = GC_save_regs_in_stack();
-       ptr_t next_stack = GC_greatest_stack_base_below(bsp);
-       if (0 == next_stack) {
+        IF_CANCEL(int cancel_state;)
+        ptr_t bsp;
+        ptr_t next_stack;
+
+        DISABLE_CANCEL(cancel_state);
+        bsp = GC_save_regs_in_stack();
+        next_stack = GC_greatest_stack_base_below(bsp);
+        if (0 == next_stack) {
           b -> reg_base = GC_find_limit(bsp, FALSE);
-       } else {
-         /* Avoid walking backwards into preceding memory stack and    */
-         /* growing it.                                                */
+        } else {
+          /* Avoid walking backwards into preceding memory stack and    */
+          /* growing it.                                                */
           b -> reg_base = GC_find_limit_with_bound(bsp, FALSE, next_stack);
-       }
+        }
+        RESTORE_CANCEL(cancel_state);
       }
       UNLOCK();
 #   endif
     return GC_SUCCESS;
 }
 
-#define HAVE_GET_STACK_BASE
+# define HAVE_GET_STACK_BASE
 
 #endif /* GC_LINUX_THREADS */
 
+#ifdef GC_OPENBSD_THREADS
+
+# include <sys/signal.h>
+# include <pthread.h>
+# include <pthread_np.h>
+
+  /* Find the stack using pthread_stackseg_np(). */
+  GC_API int GC_CALL GC_get_stack_base(struct GC_stack_base *sb)
+  {
+    stack_t stack;
+    pthread_stackseg_np(pthread_self(), &stack);
+    sb->mem_base = stack.ss_sp;
+    return GC_SUCCESS;
+  }
+
+# define HAVE_GET_STACK_BASE
+
+  /* This is always called from the main thread. */
+  ptr_t GC_get_main_stack_base(void)
+  {
+    struct GC_stack_base sb;
+    GC_get_stack_base(&sb);
+    GC_ASSERT((void *)&sb HOTTER_THAN sb.mem_base);
+    return (ptr_t)sb.mem_base;
+  }
+
+#endif /* GC_OPENBSD_THREADS */
+
 #ifndef HAVE_GET_STACK_BASE
-/* Retrieve stack base.                                                */
-/* Using the GC_find_limit version is risky.                   */
-/* On IA64, for example, there is no guard page between the    */
-/* stack of one thread and the register backing store of the   */
-/* next.  Thus this is likely to identify way too large a      */
-/* "stack" and thus at least result in disastrous performance. */
-/* FIXME - Implement better strategies here.                   */
+/* Retrieve stack base.                                         */
+/* Using the GC_find_limit version is risky.                    */
+/* On IA64, for example, there is no guard page between the     */
+/* stack of one thread and the register backing store of the    */
+/* next.  Thus this is likely to identify way too large a       */
+/* "stack" and thus at least result in disastrous performance.  */
+/* FIXME - Implement better strategies here.                    */
 GC_API int GC_CALL GC_get_stack_base(struct GC_stack_base *b)
 {
 #   ifdef NEED_FIND_LIMIT
       int dummy;
+      IF_CANCEL(int cancel_state;)
+      DISABLE_CANCEL(cancel_state);  /* May be unnecessary? */
 #     ifdef STACK_GROWS_DOWN
-       b -> mem_base = GC_find_limit((ptr_t)(&dummy), TRUE);
+        b -> mem_base = GC_find_limit((ptr_t)(&dummy), TRUE);
 #       ifdef IA64
-         b -> reg_base = GC_find_limit(GC_save_regs_in_stack(), FALSE);
+          b -> reg_base = GC_find_limit(GC_save_regs_in_stack(), FALSE);
 #       endif
 #     else
-       b -> mem_base = GC_find_limit(&dummy, FALSE);
+        b -> mem_base = GC_find_limit(&dummy, FALSE);
 #     endif
+      RESTORE_CANCEL(cancel_state);
       return GC_SUCCESS;
 #   else
       return GC_UNIMPLEMENTED;
@@ -1170,20 +1331,20 @@ void GC_register_data_segments(void)
 #   define PBUFSIZ 512
     UCHAR path[PBUFSIZ];
     FILE * myexefile;
-    struct exe_hdr hdrdos;     /* MSDOS header.        */
-    struct e32_exe hdr386;     /* Real header for my executable */
-    struct o32_obj seg;        /* Currrent segment */
+    struct exe_hdr hdrdos;      /* MSDOS header.        */
+    struct e32_exe hdr386;      /* Real header for my executable */
+    struct o32_obj seg; /* Currrent segment */
     int nsegs;
-    
-    
+
+
     if (DosGetInfoBlocks(&ptib, &ppib) != NO_ERROR) {
-       GC_err_printf("DosGetInfoBlocks failed\n");
-       ABORT("DosGetInfoBlocks failed\n");
+        GC_err_printf("DosGetInfoBlocks failed\n");
+        ABORT("DosGetInfoBlocks failed\n");
     }
     module_handle = ppib -> pib_hmte;
     if (DosQueryModuleName(module_handle, PBUFSIZ, path) != NO_ERROR) {
-       GC_err_printf("DosQueryModuleName failed\n");
-       ABORT("DosGetInfoBlocks failed\n");
+        GC_err_printf("DosQueryModuleName failed\n");
+        ABORT("DosGetInfoBlocks failed\n");
     }
     myexefile = fopen(path, "rb");
     if (myexefile == 0) {
@@ -1227,7 +1388,7 @@ void GC_register_data_segments(void)
         EXIT();
     }
     if (fseek(myexefile, E_LFANEW(hdrdos) + E32_OBJTAB(hdr386),
-             SEEK_SET) != 0) {
+              SEEK_SET) != 0) {
         GC_err_puts("Seek to object table failed: ");
         GC_err_puts(path); GC_err_puts("\n");
         ABORT("Seek to object table failed");
@@ -1245,9 +1406,9 @@ void GC_register_data_segments(void)
       if (flags & OBJINVALID) {
           GC_err_printf("Object with invalid pages?\n");
           continue;
-      } 
+      }
       GC_add_roots_inner((ptr_t)O32_BASE(seg),
-                        (ptr_t)(O32_BASE(seg)+O32_SIZE(seg)), FALSE);
+                         (ptr_t)(O32_BASE(seg)+O32_SIZE(seg)), FALSE);
     }
 }
 
@@ -1263,18 +1424,13 @@ void GC_register_data_segments(void)
 #     define WRITE_WATCH_FLAG_RESET 1
 #   endif
 
-#   if !defined(_BASETSD_H_) && !defined(_BASETSD_H)
-#     ifdef _WIN64
-        typedef unsigned __int64 ULONG_PTR;
-#     else
-        typedef unsigned long ULONG_PTR;
-#     endif
-      typedef ULONG_PTR SIZE_T;
-      typedef ULONG_PTR * PULONG_PTR;
-#   endif
+    /* Since we can't easily check whether ULONG_PTR and SIZE_T are     */
+    /* defined in Win32 basetsd.h, we define own ULONG_PTR.             */
+#   define GC_ULONG_PTR word
 
     typedef UINT (WINAPI * GetWriteWatch_type)(
-      DWORD, PVOID, SIZE_T, PVOID*, PULONG_PTR, PULONG);
+                                DWORD, PVOID, GC_ULONG_PTR /* SIZE_T */,
+                                PVOID *, GC_ULONG_PTR *, PULONG);
     static GetWriteWatch_type GetWriteWatch_func;
     static DWORD GetWriteWatch_alloc_flag;
 
@@ -1283,32 +1439,34 @@ void GC_register_data_segments(void)
     static void detect_GetWriteWatch(void)
     {
       static GC_bool done;
+      HMODULE hK32;
       if (done)
         return;
 
 #     if defined(MPROTECT_VDB)
-       {
-         char * str = GETENV("GC_USE_GETWRITEWATCH");
-#        if defined(GC_PREFER_MPROTECT_VDB)
-           if (str == NULL || (*str == '0' && *(str + 1) == '\0')) {
-             /* GC_USE_GETWRITEWATCH is unset or set to "0".           */
-             done = TRUE; /* falling back to MPROTECT_VDB strategy.    */
-             /* This should work as if GWW_VDB is undefined. */
-             return;
-           }
-#        else
-           if (str != NULL && *str == '0' && *(str + 1) == '\0') {
-             /* GC_USE_GETWRITEWATCH is set "0".                       */
-             done = TRUE; /* falling back to MPROTECT_VDB strategy.    */
-             return;
-           }
-#        endif
-       }
+        {
+          char * str = GETENV("GC_USE_GETWRITEWATCH");
+#         if defined(GC_PREFER_MPROTECT_VDB)
+            if (str == NULL || (*str == '0' && *(str + 1) == '\0')) {
+              /* GC_USE_GETWRITEWATCH is unset or set to "0".           */
+              done = TRUE; /* falling back to MPROTECT_VDB strategy.    */
+              /* This should work as if GWW_VDB is undefined. */
+              return;
+            }
+#         else
+            if (str != NULL && *str == '0' && *(str + 1) == '\0') {
+              /* GC_USE_GETWRITEWATCH is set "0".                       */
+              done = TRUE; /* falling back to MPROTECT_VDB strategy.    */
+              return;
+            }
+#         endif
+        }
 #     endif
 
-      GetWriteWatch_func = (GetWriteWatch_type)
-        GetProcAddress(GetModuleHandle("kernel32.dll"), "GetWriteWatch");
-      if (GetWriteWatch_func != NULL) {
+      hK32 = GetModuleHandle(TEXT("kernel32.dll"));
+      if (hK32 != (HMODULE)0 &&
+          (GetWriteWatch_func = (GetWriteWatch_type)GetProcAddress(hK32,
+                                                "GetWriteWatch")) != NULL) {
         /* Also check whether VirtualAlloc accepts MEM_WRITE_WATCH,   */
         /* as some versions of kernel32.dll have one but not the      */
         /* other, making the feature completely broken.               */
@@ -1317,11 +1475,11 @@ void GC_register_data_segments(void)
                                     PAGE_READWRITE);
         if (page != NULL) {
           PVOID pages[16];
-          ULONG_PTR count = 16;
+          GC_ULONG_PTR count = 16;
           DWORD page_size;
-          /* Check that it actually works.  In spite of some           */
-         /* documentation it actually seems to exist on W2K.           */
-         /* This test may be unnecessary, but ...                      */
+          /* Check that it actually works.  In spite of some            */
+          /* documentation it actually seems to exist on W2K.           */
+          /* This test may be unnecessary, but ...                      */
           if (GetWriteWatch_func(WRITE_WATCH_FLAG_RESET,
                                  page, GC_page_size,
                                  pages,
@@ -1348,78 +1506,86 @@ void GC_register_data_segments(void)
       done = TRUE;
     }
 
+# else /* !GWW_VDB */
+#   define GetWriteWatch_alloc_flag 0
 # endif /* GWW_VDB */
 
 # if defined(MSWIN32) || defined(MSWINCE)
 
 # ifdef MSWIN32
-  /* Unfortunately, we have to handle win32s very differently from NT,         */
-  /* Since VirtualQuery has very different semantics.  In particular,  */
-  /* under win32s a VirtualQuery call on an unmapped page returns an   */
-  /* invalid result.  Under NT, GC_register_data_segments is a no-op   */
-  /* and all real work is done by GC_register_dynamic_libraries.  Under        */
-  /* win32s, we cannot find the data segments associated with dll's.   */
-  /* We register the main data segment here.                           */
-  GC_bool GC_no_win32_dlls = FALSE;
-       /* This used to be set for gcc, to avoid dealing with           */
-       /* the structured exception handling issues.  But we now have   */
-       /* assembly code to do that right.                              */
-
-  GC_bool GC_wnt = FALSE;
-         /* This is a Windows NT derivative, i.e. NT, W2K, XP or later.  */
-  
-  void GC_init_win32(void)
+  /* Unfortunately, we have to handle win32s very differently from NT,  */
+  /* Since VirtualQuery has very different semantics.  In particular,   */
+  /* under win32s a VirtualQuery call on an unmapped page returns an    */
+  /* invalid result.  Under NT, GC_register_data_segments is a no-op    */
+  /* and all real work is done by GC_register_dynamic_libraries.  Under */
+  /* win32s, we cannot find the data segments associated with dll's.    */
+  /* We register the main data segment here.                            */
+  GC_INNER GC_bool GC_no_win32_dlls = FALSE;
+        /* This used to be set for gcc, to avoid dealing with           */
+        /* the structured exception handling issues.  But we now have   */
+        /* assembly code to do that right.                              */
+
+  GC_INNER GC_bool GC_wnt = FALSE;
+         /* This is a Windows NT derivative, i.e. NT, W2K, XP or later. */
+
+  GC_INNER void GC_init_win32(void)
   {
-    /* Set GC_wnt.                                                      */
-    /* If we're running under win32s, assume that no DLLs will be loaded */
-    /* I doubt anyone still runs win32s, but ...                        */
+    /* Set GC_wnt.  If we're running under win32s, assume that no DLLs  */
+    /* will be loaded.  I doubt anyone still runs win32s, but...        */
     DWORD v = GetVersion();
     GC_wnt = !(v & 0x80000000);
     GC_no_win32_dlls |= ((!GC_wnt) && (v & 0xff) <= 3);
+#   ifdef USE_MUNMAP
+      if (GC_no_win32_dlls) {
+        /* Turn off unmapping for safety (since may not work well with  */
+        /* GlobalAlloc).                                                */
+        GC_unmap_threshold = 0;
+      }
+#   endif
   }
 
-  /* Return the smallest address a such that VirtualQuery              */
-  /* returns correct results for all addresses between a and start.    */
-  /* Assumes VirtualQuery returns correct information for start.       */
-  ptr_t GC_least_described_address(ptr_t start)
-  {  
+  /* Return the smallest address a such that VirtualQuery               */
+  /* returns correct results for all addresses between a and start.     */
+  /* Assumes VirtualQuery returns correct information for start.        */
+  STATIC ptr_t GC_least_described_address(ptr_t start)
+  {
     MEMORY_BASIC_INFORMATION buf;
     size_t result;
     LPVOID limit;
     ptr_t p;
     LPVOID q;
-    
+
     limit = GC_sysinfo.lpMinimumApplicationAddress;
     p = (ptr_t)((word)start & ~(GC_page_size - 1));
     for (;;) {
-       q = (LPVOID)(p - GC_page_size);
-       if ((ptr_t)q > (ptr_t)p /* underflow */ || q < limit) break;
-       result = VirtualQuery(q, &buf, sizeof(buf));
-       if (result != sizeof(buf) || buf.AllocationBase == 0) break;
-       p = (ptr_t)(buf.AllocationBase);
+        q = (LPVOID)(p - GC_page_size);
+        if ((ptr_t)q > (ptr_t)p /* underflow */ || q < limit) break;
+        result = VirtualQuery(q, &buf, sizeof(buf));
+        if (result != sizeof(buf) || buf.AllocationBase == 0) break;
+        p = (ptr_t)(buf.AllocationBase);
     }
     return p;
   }
 # endif
 
 # ifndef REDIRECT_MALLOC
-  /* We maintain a linked list of AllocationBase values that we know   */
+  /* We maintain a linked list of AllocationBase values that we know    */
   /* correspond to malloc heap sections.  Currently this is only called */
-  /* during a GC.  But there is some hope that for long running                */
-  /* programs we will eventually see most heap sections.               */
+  /* during a GC.  But there is some hope that for long running         */
+  /* programs we will eventually see most heap sections.                */
 
-  /* In the long run, it would be more reliable to occasionally walk   */
-  /* the malloc heap with HeapWalk on the default heap.  But that      */
-  /* apparently works only for NT-based Windows.                       */ 
+  /* In the long run, it would be more reliable to occasionally walk    */
+  /* the malloc heap with HeapWalk on the default heap.  But that       */
+  /* apparently works only for NT-based Windows.                        */
 
-  /* In the long run, a better data structure would also be nice ...   */
+  /* In the long run, a better data structure would also be nice ...    */
   STATIC struct GC_malloc_heap_list {
     void * allocation_base;
     struct GC_malloc_heap_list *next;
   } *GC_malloc_heap_l = 0;
 
-  /* Is p the base of one of the malloc heap sections we already know  */
-  /* about?                                                            */
+  /* Is p the base of one of the malloc heap sections we already know   */
+  /* about?                                                             */
   STATIC GC_bool GC_is_malloc_heap_base(ptr_t p)
   {
     struct GC_malloc_heap_list *q = GC_malloc_heap_l;
@@ -1441,9 +1607,9 @@ void GC_register_data_segments(void)
     return buf.AllocationBase;
   }
 
-  STATIC size_t GC_max_root_size = 100000;     /* Appr. largest root size.     */
+  STATIC size_t GC_max_root_size = 100000;      /* Appr. largest root size.     */
 
-  void GC_add_current_malloc_heap(void)
+  GC_INNER void GC_add_current_malloc_heap(void)
   {
     struct GC_malloc_heap_list *new_l =
                  malloc(sizeof(struct GC_malloc_heap_list));
@@ -1451,36 +1617,36 @@ void GC_register_data_segments(void)
 
     if (new_l == 0) return;
     if (GC_is_malloc_heap_base(candidate)) {
-      /* Try a little harder to find malloc heap.                      */
-       size_t req_size = 10000;
-       do {
-         void *p = malloc(req_size);
-         if (0 == p) { free(new_l); return; }
-         candidate = GC_get_allocation_base(p);
-         free(p);
-         req_size *= 2;
-       } while (GC_is_malloc_heap_base(candidate)
-                && req_size < GC_max_root_size/10 && req_size < 500000);
-       if (GC_is_malloc_heap_base(candidate)) {
-         free(new_l); return;
-       }
+      /* Try a little harder to find malloc heap.                       */
+        size_t req_size = 10000;
+        do {
+          void *p = malloc(req_size);
+          if (0 == p) { free(new_l); return; }
+          candidate = GC_get_allocation_base(p);
+          free(p);
+          req_size *= 2;
+        } while (GC_is_malloc_heap_base(candidate)
+                 && req_size < GC_max_root_size/10 && req_size < 500000);
+        if (GC_is_malloc_heap_base(candidate)) {
+          free(new_l); return;
+        }
     }
     if (GC_print_stats)
-         GC_log_printf("Found new system malloc AllocationBase at %p\n",
+          GC_log_printf("Found new system malloc AllocationBase at %p\n",
                         candidate);
     new_l -> allocation_base = candidate;
     new_l -> next = GC_malloc_heap_l;
     GC_malloc_heap_l = new_l;
   }
 # endif /* REDIRECT_MALLOC */
-  
+
+  STATIC word GC_n_heap_bases = 0;      /* See GC_heap_bases.   */
+
   /* Is p the start of either the malloc heap, or of one of our */
-  /* heap sections?                                            */
-  GC_bool GC_is_heap_base (ptr_t p)
+  /* heap sections?                                             */
+  GC_INNER GC_bool GC_is_heap_base(ptr_t p)
   {
-     
      unsigned i;
-     
 #    ifndef REDIRECT_MALLOC
        if (GC_root_size > GC_max_root_size) GC_max_root_size = GC_root_size;
        if (GC_is_malloc_heap_base(p)) return TRUE;
@@ -1488,7 +1654,7 @@ void GC_register_data_segments(void)
      for (i = 0; i < GC_n_heap_bases; i++) {
          if (GC_heap_bases[i] == p) return TRUE;
      }
-     return FALSE ;
+     return FALSE;
   }
 
 # ifdef MSWIN32
@@ -1500,7 +1666,7 @@ void GC_register_data_segments(void)
       LPVOID p;
       char * base;
       char * limit, * new_limit;
-    
+
       if (!GC_no_win32_dlls) return;
       p = base = limit = GC_least_described_address(static_root);
       while (p < GC_sysinfo.lpMaximumApplicationAddress) {
@@ -1525,13 +1691,13 @@ void GC_register_data_segments(void)
       if (base != limit) GC_add_roots_inner(base, limit, FALSE);
   }
 #endif
-  
+
   void GC_register_data_segments(void)
   {
-#     ifdef MSWIN32
+#   ifdef MSWIN32
       static char dummy;
       GC_register_root_section((ptr_t)(&dummy));
-#     endif
+#   endif
   }
 
 # else /* !OS2 && !Windows */
@@ -1541,87 +1707,108 @@ void GC_register_data_segments(void)
 ptr_t GC_SysVGetDataStart(size_t max_page_size, ptr_t etext_addr)
 {
     word text_end = ((word)(etext_addr) + sizeof(word) - 1)
-                   & ~(sizeof(word) - 1);
-       /* etext rounded to word boundary       */
+                    & ~(sizeof(word) - 1);
+        /* etext rounded to word boundary       */
     word next_page = ((text_end + (word)max_page_size - 1)
-                     & ~((word)max_page_size - 1));
+                      & ~((word)max_page_size - 1));
     word page_offset = (text_end & ((word)max_page_size - 1));
     volatile char * result = (char *)(next_page + page_offset);
-    /* Note that this isnt equivalent to just adding           */
-    /* max_page_size to &etext if &etext is at a page boundary */
-    
+    /* Note that this isnt equivalent to just adding            */
+    /* max_page_size to &etext if &etext is at a page boundary  */
+
     GC_setup_temporary_fault_handler();
     if (SETJMP(GC_jmp_buf) == 0) {
-       /* Try writing to the address.  */
-       *result = *result;
+        /* Try writing to the address.  */
+        *result = *result;
         GC_reset_fault_handler();
     } else {
         GC_reset_fault_handler();
-       /* We got here via a longjmp.  The address is not readable.     */
-       /* This is known to happen under Solaris 2.4 + gcc, which place */
-       /* string constants in the text segment, but after etext.       */
-       /* Use plan B.  Note that we now know there is a gap between    */
-       /* text and data segments, so plan A bought us something.       */
-       result = (char *)GC_find_limit((ptr_t)(DATAEND), FALSE);
+        /* We got here via a longjmp.  The address is not readable.     */
+        /* This is known to happen under Solaris 2.4 + gcc, which place */
+        /* string constants in the text segment, but after etext.       */
+        /* Use plan B.  Note that we now know there is a gap between    */
+        /* text and data segments, so plan A bought us something.       */
+        result = (char *)GC_find_limit((ptr_t)(DATAEND), FALSE);
     }
     return((ptr_t)result);
 }
 # endif
 
-# if defined(FREEBSD) && (defined(I386) || defined(X86_64) || defined(powerpc) || defined(__powerpc__)) && !defined(PCR)
-/* Its unclear whether this should be identical to the above, or       */
-/* whether it should apply to non-X86 architectures.                   */
-/* For now we don't assume that there is always an empty page after    */
+# if defined(FREEBSD) && !defined(PCR) && (defined(I386) || defined(X86_64) \
+                                || defined(powerpc) || defined(__powerpc__))
+
+/* Its unclear whether this should be identical to the above, or        */
+/* whether it should apply to non-X86 architectures.                    */
+/* For now we don't assume that there is always an empty page after     */
 /* etext.  But in some cases there actually seems to be slightly more.  */
-/* This also deals with holes between read-only data and writable data.        */
+/* This also deals with holes between read-only data and writable data. */
 ptr_t GC_FreeBSDGetDataStart(size_t max_page_size, ptr_t etext_addr)
 {
     word text_end = ((word)(etext_addr) + sizeof(word) - 1)
-                    & ~(sizeof(word) - 1);
-       /* etext rounded to word boundary       */
+                     & ~(sizeof(word) - 1);
+        /* etext rounded to word boundary       */
     volatile word next_page = (text_end + (word)max_page_size - 1)
-                             & ~((word)max_page_size - 1);
+                              & ~((word)max_page_size - 1);
     volatile ptr_t result = (ptr_t)text_end;
     GC_setup_temporary_fault_handler();
     if (SETJMP(GC_jmp_buf) == 0) {
-       /* Try reading at the address.                          */
-       /* This should happen before there is another thread.   */
-       for (; next_page < (word)(DATAEND); next_page += (word)max_page_size)
-           *(volatile char *)next_page;
-       GC_reset_fault_handler();
+        /* Try reading at the address.                          */
+        /* This should happen before there is another thread.   */
+        for (; next_page < (word)(DATAEND); next_page += (word)max_page_size)
+            *(volatile char *)next_page;
+        GC_reset_fault_handler();
     } else {
-       GC_reset_fault_handler();
-       /* As above, we go to plan B    */
-       result = GC_find_limit((ptr_t)(DATAEND), FALSE);
+        GC_reset_fault_handler();
+        /* As above, we go to plan B    */
+        result = GC_find_limit((ptr_t)(DATAEND), FALSE);
     }
     return(result);
 }
 
-# endif
+# endif /* FREEBSD */
 
 
 #ifdef AMIGA
 
 #  define GC_AMIGA_DS
-#  include "AmigaOS.c"
+#  include "extra/AmigaOS.c"
 #  undef GC_AMIGA_DS
 
-#else /* !OS2 && !Windows && !AMIGA */
+#elif defined(OPENBSD)
+
+/* Depending on arch alignment, there can be multiple holes     */
+/* between DATASTART and DATAEND.  Scan in DATASTART .. DATAEND */
+/* and register each region.                                    */
+void GC_register_data_segments(void)
+{
+  ptr_t region_start = DATASTART;
+  ptr_t region_end;
+
+  for (;;) {
+    region_end = GC_find_limit_openbsd(region_start, DATAEND);
+    GC_add_roots_inner(region_start, region_end, FALSE);
+    if (region_end >= DATAEND)
+      break;
+    region_start = GC_skip_hole_openbsd(region_end, DATAEND);
+  }
+}
+
+# else /* !OS2 && !Windows && !AMIGA && !OPENBSD */
 
 void GC_register_data_segments(void)
 {
 #   if !defined(PCR) && !defined(MACOS)
 #     if defined(REDIRECT_MALLOC) && defined(GC_SOLARIS_THREADS)
-       /* As of Solaris 2.3, the Solaris threads implementation        */
-       /* allocates the data structure for the initial thread with     */
-       /* sbrk at process startup.  It needs to be scanned, so that    */
-       /* we don't lose some malloc allocated data structures          */
-       /* hanging from it.  We're on thin ice here ...                 */
+        /* As of Solaris 2.3, the Solaris threads implementation        */
+        /* allocates the data structure for the initial thread with     */
+        /* sbrk at process startup.  It needs to be scanned, so that    */
+        /* we don't lose some malloc allocated data structures          */
+        /* hanging from it.  We're on thin ice here ...                 */
         extern caddr_t sbrk(int);
 
-       GC_add_roots_inner(DATASTART, (ptr_t)sbrk(0), FALSE);
+        GC_add_roots_inner(DATASTART, (ptr_t)sbrk(0), FALSE);
 #     else
-       GC_add_roots_inner(DATASTART, (ptr_t)(DATAEND), FALSE);
+        GC_add_roots_inner(DATASTART, (ptr_t)(DATAEND), FALSE);
 #       if defined(DATASTART2)
           GC_add_roots_inner(DATASTART2, (ptr_t)(DATAEND2), FALSE);
 #       endif
@@ -1630,31 +1817,31 @@ void GC_register_data_segments(void)
 #   if defined(MACOS)
     {
 #   if defined(THINK_C)
-       extern void* GC_MacGetDataStart(void);
-       /* globals begin above stack and end at a5. */
-       GC_add_roots_inner((ptr_t)GC_MacGetDataStart(),
-                          (ptr_t)LMGetCurrentA5(), FALSE);
+        extern void* GC_MacGetDataStart(void);
+        /* globals begin above stack and end at a5. */
+        GC_add_roots_inner((ptr_t)GC_MacGetDataStart(),
+                           (ptr_t)LMGetCurrentA5(), FALSE);
 #   else
 #     if defined(__MWERKS__)
 #       if !__POWERPC__
-         extern void* GC_MacGetDataStart(void);
-         /* MATTHEW: Function to handle Far Globals (CW Pro 3) */
+          extern void* GC_MacGetDataStart(void);
+          /* MATTHEW: Function to handle Far Globals (CW Pro 3) */
 #         if __option(far_data)
-         extern void* GC_MacGetDataEnd(void);
+          extern void* GC_MacGetDataEnd(void);
 #         endif
-         /* globals begin above stack and end at a5. */
-         GC_add_roots_inner((ptr_t)GC_MacGetDataStart(),
-                            (ptr_t)LMGetCurrentA5(), FALSE);
-         /* MATTHEW: Handle Far Globals */                          
+          /* globals begin above stack and end at a5. */
+          GC_add_roots_inner((ptr_t)GC_MacGetDataStart(),
+                             (ptr_t)LMGetCurrentA5(), FALSE);
+          /* MATTHEW: Handle Far Globals */
 #         if __option(far_data)
       /* Far globals follow he QD globals: */
-         GC_add_roots_inner((ptr_t)LMGetCurrentA5(),
-                            (ptr_t)GC_MacGetDataEnd(), FALSE);
+          GC_add_roots_inner((ptr_t)LMGetCurrentA5(),
+                             (ptr_t)GC_MacGetDataEnd(), FALSE);
 #         endif
 #       else
-         extern char __data_start__[], __data_end__[];
-         GC_add_roots_inner((ptr_t)&__data_start__,
-                            (ptr_t)&__data_end__, FALSE);
+          extern char __data_start__[], __data_end__[];
+          GC_add_roots_inner((ptr_t)&__data_start__,
+                             (ptr_t)&__data_end__, FALSE);
 #       endif /* __POWERPC__ */
 #     endif /* __MWERKS__ */
 #   endif /* !THINK_C */
@@ -1662,7 +1849,7 @@ void GC_register_data_segments(void)
 #   endif /* MACOS */
 
     /* Dynamic libraries are added at every collection, since they may  */
-    /* change.                                                         */
+    /* change.                                                          */
 }
 
 # endif  /* ! AMIGA */
@@ -1674,8 +1861,8 @@ void GC_register_data_segments(void)
  */
 
 # if !defined(OS2) && !defined(PCR) && !defined(AMIGA) \
-       && !defined(MSWIN32) && !defined(MSWINCE) \
-       && !defined(MACOS) && !defined(DOS4GW) && !defined(NONSTOP)
+        && !defined(MSWIN32) && !defined(MSWINCE) \
+        && !defined(MACOS) && !defined(DOS4GW) && !defined(NONSTOP)
 
 # define SBRK_ARG_T ptrdiff_t
 
@@ -1683,8 +1870,8 @@ void GC_register_data_segments(void)
 
 #ifdef USE_MMAP_FIXED
 #   define GC_MMAP_FLAGS MAP_FIXED | MAP_PRIVATE
-       /* Seems to yield better performance on Solaris 2, but can      */
-       /* be unreliable if something is already mapped at the address. */
+        /* Seems to yield better performance on Solaris 2, but can      */
+        /* be unreliable if something is already mapped at the address. */
 #else
 #   define GC_MMAP_FLAGS MAP_PRIVATE
 #endif
@@ -1699,7 +1886,7 @@ void GC_register_data_segments(void)
 #else
   static int zero_fd;
 # define OPT_MAP_ANON 0
-#endif 
+#endif
 
 #ifndef HEAP_START
 #   define HEAP_START ((ptr_t)0)
@@ -1714,26 +1901,26 @@ STATIC ptr_t GC_unix_mmap_get_mem(word bytes)
       static GC_bool initialized = FALSE;
 
       if (!initialized) {
-         zero_fd = open("/dev/zero", O_RDONLY);
-         fcntl(zero_fd, F_SETFD, FD_CLOEXEC);
-         initialized = TRUE;
+          zero_fd = open("/dev/zero", O_RDONLY);
+          fcntl(zero_fd, F_SETFD, FD_CLOEXEC);
+          initialized = TRUE;
       }
 #   endif
 
-    if (bytes & (GC_page_size -1)) ABORT("Bad GET_MEM arg");
+    if (bytes & (GC_page_size - 1)) ABORT("Bad GET_MEM arg");
     result = mmap(last_addr, bytes, PROT_READ | PROT_WRITE | OPT_PROT_EXEC,
-                 GC_MMAP_FLAGS | OPT_MAP_ANON, zero_fd, 0/* offset */);
+                  GC_MMAP_FLAGS | OPT_MAP_ANON, zero_fd, 0/* offset */);
     if (result == MAP_FAILED) return(0);
     last_addr = (ptr_t)result + bytes + GC_page_size - 1;
     last_addr = (ptr_t)((word)last_addr & ~(GC_page_size - 1));
 #   if !defined(LINUX)
       if (last_addr == 0) {
-        /* Oops.  We got the end of the address space.  This isn't     */
-       /* usable by arbitrary C code, since one-past-end pointers      */
-       /* don't work, so we discard it and try again.                  */
-       munmap(result, (size_t)(-GC_page_size) - (size_t)result);
-                       /* Leave last page mapped, so we can't repeat. */
-       return GC_unix_mmap_get_mem(bytes);
+        /* Oops.  We got the end of the address space.  This isn't      */
+        /* usable by arbitrary C code, since one-past-end pointers      */
+        /* don't work, so we discard it and try again.                  */
+        munmap(result, (size_t)(-GC_page_size) - (size_t)result);
+                        /* Leave last page mapped, so we can't repeat. */
+        return GC_unix_mmap_get_mem(bytes);
       }
 #   else
       GC_ASSERT(last_addr != 0);
@@ -1756,31 +1943,31 @@ STATIC ptr_t GC_unix_sbrk_get_mem(word bytes)
 {
   ptr_t result;
 # ifdef IRIX5
-    /* Bare sbrk isn't thread safe.  Play by malloc rules.     */
-    /* The equivalent may be needed on other systems as well.  */
+    /* Bare sbrk isn't thread safe.  Play by malloc rules.      */
+    /* The equivalent may be needed on other systems as well.   */
     __LOCK_MALLOC();
 # endif
   {
     ptr_t cur_brk = (ptr_t)sbrk(0);
     SBRK_ARG_T lsbs = (word)cur_brk & (GC_page_size-1);
-    
+
     if ((SBRK_ARG_T)bytes < 0) {
-       result = 0; /* too big */
-       goto out;
+        result = 0; /* too big */
+        goto out;
     }
     if (lsbs != 0) {
         if((ptr_t)sbrk(GC_page_size - lsbs) == (ptr_t)(-1)) {
-           result = 0;
-           goto out;
-       }
+            result = 0;
+            goto out;
+        }
     }
 #   ifdef ADD_HEAP_GUARD_PAGES
       /* This is useful for catching severe memory overwrite problems that */
-      /* span heap sections.  It shouldn't otherwise be turned on.        */
+      /* span heap sections.  It shouldn't otherwise be turned on.         */
       {
-       ptr_t guard = (ptr_t)sbrk((SBRK_ARG_T)GC_page_size);
-       if (mprotect(guard, GC_page_size, PROT_NONE) != 0)
-           ABORT("ADD_HEAP_GUARD_PAGES: mprotect failed");
+        ptr_t guard = (ptr_t)sbrk((SBRK_ARG_T)GC_page_size);
+        if (mprotect(guard, GC_page_size, PROT_NONE) != 0)
+            ABORT("ADD_HEAP_GUARD_PAGES: mprotect failed");
       }
 #   endif /* ADD_HEAP_GUARD_PAGES */
     result = (ptr_t)sbrk((SBRK_ARG_T)bytes);
@@ -1794,32 +1981,28 @@ STATIC ptr_t GC_unix_sbrk_get_mem(word bytes)
 }
 
 #if defined(MMAP_SUPPORTED)
-
-/* By default, we try both sbrk and mmap, in that order. */
-ptr_t GC_unix_get_mem(word bytes)
-{
+  /* By default, we try both sbrk and mmap, in that order. */
+  ptr_t GC_unix_get_mem(word bytes)
+  {
     static GC_bool sbrk_failed = FALSE;
     ptr_t result = 0;
 
     if (!sbrk_failed) result = GC_unix_sbrk_get_mem(bytes);
     if (0 == result) {
-       sbrk_failed = TRUE;
-       result = GC_unix_mmap_get_mem(bytes);
+        sbrk_failed = TRUE;
+        result = GC_unix_mmap_get_mem(bytes);
     }
     if (0 == result) {
-       /* Try sbrk again, in case sbrk memory became available. */
-       result = GC_unix_sbrk_get_mem(bytes);
+        /* Try sbrk again, in case sbrk memory became available. */
+        result = GC_unix_sbrk_get_mem(bytes);
     }
     return result;
-}
-
+  }
 #else /* !MMAP_SUPPORTED */
-
-ptr_t GC_unix_get_mem(word bytes)
-{
+  ptr_t GC_unix_get_mem(word bytes)
+  {
     return GC_unix_sbrk_get_mem(bytes);
-}
-
+  }
 #endif
 
 #endif /* Not USE_MMAP */
@@ -1833,9 +2016,9 @@ void * os2_alloc(size_t bytes)
     void * result;
 
     if (DosAllocMem(&result, bytes, PAG_EXECUTE | PAG_READ |
-                                   PAG_WRITE | PAG_COMMIT)
-                   != NO_ERROR) {
-       return(0);
+                                    PAG_WRITE | PAG_COMMIT)
+                    != NO_ERROR) {
+        return(0);
     }
     if (result == 0) return(os2_alloc(bytes));
     return(result);
@@ -1845,7 +2028,7 @@ void * os2_alloc(size_t bytes)
 
 
 # if defined(MSWIN32) || defined(MSWINCE)
-SYSTEM_INFO GC_sysinfo;
+    GC_INNER SYSTEM_INFO GC_sysinfo;
 # endif
 
 # ifdef MSWIN32
@@ -1856,13 +2039,11 @@ SYSTEM_INFO GC_sysinfo;
 #   define GLOBAL_ALLOC_TEST GC_no_win32_dlls
 # endif
 
-word GC_n_heap_bases = 0;
-
 #ifdef GC_USE_MEM_TOP_DOWN
   STATIC DWORD GC_mem_top_down = MEM_TOP_DOWN;
-                          /* Use GC_USE_MEM_TOP_DOWN for better 64-bit */
-                          /* testing.  Otherwise all addresses tend to */
-                          /* end up in first 4GB, hiding bugs.         */
+                           /* Use GC_USE_MEM_TOP_DOWN for better 64-bit */
+                           /* testing.  Otherwise all addresses tend to */
+                           /* end up in first 4GB, hiding bugs.         */
 #else
   STATIC DWORD GC_mem_top_down = 0;
 #endif
@@ -1872,65 +2053,73 @@ ptr_t GC_win32_get_mem(word bytes)
     ptr_t result;
 
     if (GLOBAL_ALLOC_TEST) {
-       /* VirtualAlloc doesn't like PAGE_EXECUTE_READWRITE.    */
-       /* There are also unconfirmed rumors of other           */
-       /* problems, so we dodge the issue.                     */
+        /* VirtualAlloc doesn't like PAGE_EXECUTE_READWRITE.    */
+        /* There are also unconfirmed rumors of other           */
+        /* problems, so we dodge the issue.                     */
         result = (ptr_t) GlobalAlloc(0, bytes + HBLKSIZE);
         result = (ptr_t)(((word)result + HBLKSIZE - 1) & ~(HBLKSIZE-1));
     } else {
-       /* VirtualProtect only works on regions returned by a   */
-       /* single VirtualAlloc call.  Thus we allocate one      */
-       /* extra page, which will prevent merging of blocks     */
-       /* in separate regions, and eliminate any temptation    */
-       /* to call VirtualProtect on a range spanning regions.  */
-       /* This wastes a small amount of memory, and risks      */
-       /* increased fragmentation.  But better alternatives    */
-       /* would require effort.                                */
+        /* VirtualProtect only works on regions returned by a   */
+        /* single VirtualAlloc call.  Thus we allocate one      */
+        /* extra page, which will prevent merging of blocks     */
+        /* in separate regions, and eliminate any temptation    */
+        /* to call VirtualProtect on a range spanning regions.  */
+        /* This wastes a small amount of memory, and risks      */
+        /* increased fragmentation.  But better alternatives    */
+        /* would require effort.                                */
+#       ifdef MPROTECT_VDB
+          /* We can't check for GC_incremental here (because    */
+          /* GC_enable_incremental() might be called some time  */
+          /* later after the GC initialization).                */
+#         ifdef GWW_VDB
+#           define VIRTUAL_ALLOC_PAD (GC_GWW_AVAILABLE() ? 0 : 1)
+#         else
+#           define VIRTUAL_ALLOC_PAD 1
+#         endif
+#       else
+#         define VIRTUAL_ALLOC_PAD 0
+#       endif
         /* Pass the MEM_WRITE_WATCH only if GetWriteWatch-based */
         /* VDBs are enabled and the GetWriteWatch function is   */
         /* available.  Otherwise we waste resources or possibly */
         /* cause VirtualAlloc to fail (observed in Windows 2000 */
         /* SP2).                                                */
-        result = (ptr_t) VirtualAlloc(NULL, bytes + 1,
-#                                     ifdef GWW_VDB
-                                        GetWriteWatch_alloc_flag |
-#                                     endif
-                                     MEM_COMMIT | MEM_RESERVE
-                                     | GC_mem_top_down,
-                                     PAGE_EXECUTE_READWRITE);
+        result = (ptr_t) VirtualAlloc(NULL, bytes + VIRTUAL_ALLOC_PAD,
+                                      GetWriteWatch_alloc_flag |
+                                      MEM_COMMIT | MEM_RESERVE
+                                      | GC_mem_top_down,
+                                      PAGE_EXECUTE_READWRITE);
     }
     if (HBLKDISPL(result) != 0) ABORT("Bad VirtualAlloc result");
-       /* If I read the documentation correctly, this can      */
-       /* only happen if HBLKSIZE > 64k or not a power of 2.   */
+        /* If I read the documentation correctly, this can      */
+        /* only happen if HBLKSIZE > 64k or not a power of 2.   */
     if (GC_n_heap_bases >= MAX_HEAP_SECTS) ABORT("Too many heap sections");
     if (0 != result) GC_heap_bases[GC_n_heap_bases++] = result;
-    return(result);                      
+    return(result);
 }
 
 GC_API void GC_CALL GC_win32_free_heap(void)
 {
     if (GC_no_win32_dlls) {
-       while (GC_n_heap_bases > 0) {
-           GlobalFree (GC_heap_bases[--GC_n_heap_bases]);
-           GC_heap_bases[GC_n_heap_bases] = 0;
-       }
+        while (GC_n_heap_bases > 0) {
+            GlobalFree (GC_heap_bases[--GC_n_heap_bases]);
+            GC_heap_bases[GC_n_heap_bases] = 0;
+        }
     }
 }
 # endif
 
 #ifdef AMIGA
 # define GC_AMIGA_AM
-# include "AmigaOS.c"
+# include "extra/AmigaOS.c"
 # undef GC_AMIGA_AM
 #endif
 
 
-# ifdef MSWINCE
-word GC_n_heap_bases = 0;
-
-ptr_t GC_wince_get_mem(word bytes)
-{
-    ptr_t result;
+#ifdef MSWINCE
+  ptr_t GC_wince_get_mem(word bytes)
+  {
+    ptr_t result = 0; /* initialized to prevent warning. */
     word i;
 
     /* Round up allocation size to multiple of page size */
@@ -1938,52 +2127,53 @@ ptr_t GC_wince_get_mem(word bytes)
 
     /* Try to find reserved, uncommitted pages */
     for (i = 0; i < GC_n_heap_bases; i++) {
-       if (((word)(-(signed_word)GC_heap_lengths[i])
-            & (GC_sysinfo.dwAllocationGranularity-1))
-           >= bytes) {
-           result = GC_heap_bases[i] + GC_heap_lengths[i];
-           break;
-       }
+        if (((word)(-(signed_word)GC_heap_lengths[i])
+             & (GC_sysinfo.dwAllocationGranularity-1))
+            >= bytes) {
+            result = GC_heap_bases[i] + GC_heap_lengths[i];
+            break;
+        }
     }
 
     if (i == GC_n_heap_bases) {
-       /* Reserve more pages */
-       word res_bytes = (bytes + GC_sysinfo.dwAllocationGranularity-1)
-                        & ~(GC_sysinfo.dwAllocationGranularity-1);
-       /* If we ever support MPROTECT_VDB here, we will probably need to    */
-       /* ensure that res_bytes is strictly > bytes, so that VirtualProtect */
-       /* never spans regions.  It seems to be OK for a VirtualFree         */
-       /* argument to span regions, so we should be OK for now.             */
-       result = (ptr_t) VirtualAlloc(NULL, res_bytes,
-                                     MEM_RESERVE | MEM_TOP_DOWN,
-                                     PAGE_EXECUTE_READWRITE);
-       if (HBLKDISPL(result) != 0) ABORT("Bad VirtualAlloc result");
-           /* If I read the documentation correctly, this can  */
-           /* only happen if HBLKSIZE > 64k or not a power of 2.       */
-       if (GC_n_heap_bases >= MAX_HEAP_SECTS) ABORT("Too many heap sections");
-       GC_heap_bases[GC_n_heap_bases] = result;
-       GC_heap_lengths[GC_n_heap_bases] = 0;
-       GC_n_heap_bases++;
+        /* Reserve more pages */
+        word res_bytes = (bytes + GC_sysinfo.dwAllocationGranularity-1)
+                         & ~(GC_sysinfo.dwAllocationGranularity-1);
+        /* If we ever support MPROTECT_VDB here, we will probably need to    */
+        /* ensure that res_bytes is strictly > bytes, so that VirtualProtect */
+        /* never spans regions.  It seems to be OK for a VirtualFree         */
+        /* argument to span regions, so we should be OK for now.             */
+        result = (ptr_t) VirtualAlloc(NULL, res_bytes,
+                                      MEM_RESERVE | MEM_TOP_DOWN,
+                                      PAGE_EXECUTE_READWRITE);
+        if (HBLKDISPL(result) != 0) ABORT("Bad VirtualAlloc result");
+            /* If I read the documentation correctly, this can  */
+            /* only happen if HBLKSIZE > 64k or not a power of 2.       */
+        if (GC_n_heap_bases >= MAX_HEAP_SECTS) ABORT("Too many heap sections");
+        if (result == NULL) return NULL;
+        GC_heap_bases[GC_n_heap_bases] = result;
+        GC_heap_lengths[GC_n_heap_bases] = 0;
+        GC_n_heap_bases++;
     }
 
     /* Commit pages */
     result = (ptr_t) VirtualAlloc(result, bytes,
-                                 MEM_COMMIT,
-                                 PAGE_EXECUTE_READWRITE);
+                                  MEM_COMMIT,
+                                  PAGE_EXECUTE_READWRITE);
     if (result != NULL) {
-       if (HBLKDISPL(result) != 0) ABORT("Bad VirtualAlloc result");
-       GC_heap_lengths[i] += bytes;
+        if (HBLKDISPL(result) != 0) ABORT("Bad VirtualAlloc result");
+        GC_heap_lengths[i] += bytes;
     }
 
-    return(result);                      
-}
-# endif
+    return(result);
+  }
+#endif
 
 #ifdef USE_MUNMAP
 
-/* For now, this only works on Win32/WinCE and some Unix-like  */
-/* systems.  If you have something else, don't define          */
-/* USE_MUNMAP.                                                 */
+/* For now, this only works on Win32/WinCE and some Unix-like   */
+/* systems.  If you have something else, don't define           */
+/* USE_MUNMAP.                                                  */
 
 #if !defined(MSWIN32) && !defined(MSWINCE)
 
@@ -1994,9 +2184,9 @@ ptr_t GC_wince_get_mem(word bytes)
 
 #endif
 
-/* Compute a page aligned starting address for the unmap       */
-/* operation on a block of size bytes starting at start.       */
-/* Return 0 if the block is too small to make this feasible.   */
+/* Compute a page aligned starting address for the unmap        */
+/* operation on a block of size bytes starting at start.        */
+/* Return 0 if the block is too small to make this feasible.    */
 STATIC ptr_t GC_unmap_start(ptr_t start, size_t bytes)
 {
     ptr_t result;
@@ -2006,25 +2196,25 @@ STATIC ptr_t GC_unmap_start(ptr_t start, size_t bytes)
     return result;
 }
 
-/* Compute end address for an unmap operation on the indicated */
-/* block.                                                      */
+/* Compute end address for an unmap operation on the indicated  */
+/* block.                                                       */
 STATIC ptr_t GC_unmap_end(ptr_t start, size_t bytes)
 {
     return (ptr_t)((word)(start + bytes) & ~(GC_page_size - 1));
 }
 
-/* Under Win32/WinCE we commit (map) and decommit (unmap)      */
-/* memory using        VirtualAlloc and VirtualFree.  These functions  */
-/* work on individual allocations of virtual memory, made      */
-/* previously using VirtualAlloc with the MEM_RESERVE flag.    */
-/* The ranges we need to (de)commit may span several of these  */
-/* allocations; therefore we use VirtualQuery to check         */
-/* allocation lengths, and split up the range as necessary.    */
-
-/* We assume that GC_remap is called on exactly the same range */
-/* as a previous call to GC_unmap.  It is safe to consistently */
-/* round the endpoints in both places.                         */
-void GC_unmap(ptr_t start, size_t bytes)
+/* Under Win32/WinCE we commit (map) and decommit (unmap)       */
+/* memory using VirtualAlloc and VirtualFree.  These functions  */
+/* work on individual allocations of virtual memory, made       */
+/* previously using VirtualAlloc with the MEM_RESERVE flag.     */
+/* The ranges we need to (de)commit may span several of these   */
+/* allocations; therefore we use VirtualQuery to check          */
+/* allocation lengths, and split up the range as necessary.     */
+
+/* We assume that GC_remap is called on exactly the same range  */
+/* as a previous call to GC_unmap.  It is safe to consistently  */
+/* round the endpoints in both places.                          */
+GC_INNER void GC_unmap(ptr_t start, size_t bytes)
 {
     ptr_t start_addr = GC_unmap_start(start, bytes);
     ptr_t end_addr = GC_unmap_end(start, bytes);
@@ -2033,82 +2223,87 @@ void GC_unmap(ptr_t start, size_t bytes)
 #   if defined(MSWIN32) || defined(MSWINCE)
       while (len != 0) {
           MEMORY_BASIC_INFORMATION mem_info;
-         GC_word free_len;
-         if (VirtualQuery(start_addr, &mem_info, sizeof(mem_info))
-             != sizeof(mem_info))
-             ABORT("Weird VirtualQuery result");
-         free_len = (len < mem_info.RegionSize) ? len : mem_info.RegionSize;
-         if (!VirtualFree(start_addr, free_len, MEM_DECOMMIT))
-             ABORT("VirtualFree failed");
-         GC_unmapped_bytes += free_len;
-         start_addr += free_len;
-         len -= free_len;
+          GC_word free_len;
+          if (VirtualQuery(start_addr, &mem_info, sizeof(mem_info))
+              != sizeof(mem_info))
+              ABORT("Weird VirtualQuery result");
+          free_len = (len < mem_info.RegionSize) ? len : mem_info.RegionSize;
+          if (!VirtualFree(start_addr, free_len, MEM_DECOMMIT))
+              ABORT("VirtualFree failed");
+          GC_unmapped_bytes += free_len;
+          start_addr += free_len;
+          len -= free_len;
       }
 #   else
-      /* We immediately remap it to prevent an intervening mmap from   */
-      /* accidentally grabbing the same address space.                 */
+      /* We immediately remap it to prevent an intervening mmap from    */
+      /* accidentally grabbing the same address space.                  */
       {
-       void * result;
+        void * result;
         result = mmap(start_addr, len, PROT_NONE,
-                     MAP_PRIVATE | MAP_FIXED | OPT_MAP_ANON,
-                     zero_fd, 0/* offset */);
+                      MAP_PRIVATE | MAP_FIXED | OPT_MAP_ANON,
+                      zero_fd, 0/* offset */);
         if (result != (void *)start_addr) ABORT("mmap(...PROT_NONE...) failed");
       }
       GC_unmapped_bytes += len;
 #   endif
 }
 
-
-void GC_remap(ptr_t start, size_t bytes)
+GC_INNER void GC_remap(ptr_t start, size_t bytes)
 {
     ptr_t start_addr = GC_unmap_start(start, bytes);
     ptr_t end_addr = GC_unmap_end(start, bytes);
     word len = end_addr - start_addr;
 
-    /* FIXME: Should we handle out-of-memory here? */
+    /* FIXME: Handle out-of-memory correctly (at least for Win32)       */
 #   if defined(MSWIN32) || defined(MSWINCE)
       ptr_t result;
 
       if (0 == start_addr) return;
       while (len != 0) {
           MEMORY_BASIC_INFORMATION mem_info;
-         GC_word alloc_len;
-         if (VirtualQuery(start_addr, &mem_info, sizeof(mem_info))
-             != sizeof(mem_info))
-             ABORT("Weird VirtualQuery result");
-         alloc_len = (len < mem_info.RegionSize) ? len : mem_info.RegionSize;
-         result = VirtualAlloc(start_addr, alloc_len,
-                               MEM_COMMIT,
-                               PAGE_EXECUTE_READWRITE);
-         if (result != start_addr) {
-             ABORT("VirtualAlloc remapping failed");
-         }
-         GC_unmapped_bytes -= alloc_len;
-         start_addr += alloc_len;
-         len -= alloc_len;
+          GC_word alloc_len;
+          if (VirtualQuery(start_addr, &mem_info, sizeof(mem_info))
+              != sizeof(mem_info))
+              ABORT("Weird VirtualQuery result");
+          alloc_len = (len < mem_info.RegionSize) ? len : mem_info.RegionSize;
+          result = VirtualAlloc(start_addr, alloc_len,
+                                MEM_COMMIT,
+                                PAGE_EXECUTE_READWRITE);
+          if (result != start_addr) {
+              if (GetLastError() == ERROR_NOT_ENOUGH_MEMORY ||
+                  GetLastError() == ERROR_OUTOFMEMORY) {
+                  ABORT("Not enough memory to process remapping");
+              } else {
+                  ABORT("VirtualAlloc remapping failed");
+              }
+          }
+          GC_unmapped_bytes -= alloc_len;
+          start_addr += alloc_len;
+          len -= alloc_len;
       }
 #   else
       /* It was already remapped with PROT_NONE. */
-      int result; 
+      int result;
 
       if (0 == start_addr) return;
       result = mprotect(start_addr, len,
-                       PROT_READ | PROT_WRITE | OPT_PROT_EXEC);
+                        PROT_READ | PROT_WRITE | OPT_PROT_EXEC);
       if (result != 0) {
-         GC_err_printf(
-               "Mprotect failed at %p (length %ld) with errno %d\n",
-               start_addr, (unsigned long)len, errno);
-         ABORT("Mprotect remapping failed");
+          GC_err_printf(
+                "Mprotect failed at %p (length %ld) with errno %d\n",
+                start_addr, (unsigned long)len, errno);
+          ABORT("Mprotect remapping failed");
       }
       GC_unmapped_bytes -= len;
 #   endif
 }
 
-/* Two adjacent blocks have already been unmapped and are about to     */
-/* be merged.  Unmap the whole block.  This typically requires         */
-/* that we unmap a small section in the middle that was not previously */
-/* unmapped due to alignment constraints.                              */
-void GC_unmap_gap(ptr_t start1, size_t bytes1, ptr_t start2, size_t bytes2)
+/* Two adjacent blocks have already been unmapped and are about to      */
+/* be merged.  Unmap the whole block.  This typically requires          */
+/* that we unmap a small section in the middle that was not previously  */
+/* unmapped due to alignment constraints.                               */
+GC_INNER void GC_unmap_gap(ptr_t start1, size_t bytes1, ptr_t start2,
+                           size_t bytes2)
 {
     ptr_t start1_addr = GC_unmap_start(start1, bytes1);
     ptr_t end1_addr = GC_unmap_end(start1, bytes1);
@@ -2124,24 +2319,24 @@ void GC_unmap_gap(ptr_t start1, size_t bytes1, ptr_t start2, size_t bytes2)
 #   if defined(MSWIN32) || defined(MSWINCE)
       while (len != 0) {
           MEMORY_BASIC_INFORMATION mem_info;
-         GC_word free_len;
-         if (VirtualQuery(start_addr, &mem_info, sizeof(mem_info))
-             != sizeof(mem_info))
-             ABORT("Weird VirtualQuery result");
-         free_len = (len < mem_info.RegionSize) ? len : mem_info.RegionSize;
-         if (!VirtualFree(start_addr, free_len, MEM_DECOMMIT))
-             ABORT("VirtualFree failed");
-         GC_unmapped_bytes += free_len;
-         start_addr += free_len;
-         len -= free_len;
+          GC_word free_len;
+          if (VirtualQuery(start_addr, &mem_info, sizeof(mem_info))
+              != sizeof(mem_info))
+              ABORT("Weird VirtualQuery result");
+          free_len = (len < mem_info.RegionSize) ? len : mem_info.RegionSize;
+          if (!VirtualFree(start_addr, free_len, MEM_DECOMMIT))
+              ABORT("VirtualFree failed");
+          GC_unmapped_bytes += free_len;
+          start_addr += free_len;
+          len -= free_len;
       }
 #   else
       if (len != 0) {
         /* Immediately remap as above. */
-       void * result;
+        void * result;
         result = mmap(start_addr, len, PROT_NONE,
-                     MAP_PRIVATE | MAP_FIXED | OPT_MAP_ANON,
-                     zero_fd, 0/* offset */);
+                      MAP_PRIVATE | MAP_FIXED | OPT_MAP_ANON,
+                      zero_fd, 0/* offset */);
         if (result != (void *)start_addr) ABORT("mmap(...PROT_NONE...) failed");
       }
       GC_unmapped_bytes += len;
@@ -2150,11 +2345,11 @@ void GC_unmap_gap(ptr_t start1, size_t bytes1, ptr_t start2, size_t bytes2)
 
 #endif /* USE_MUNMAP */
 
-/* Routine for pushing any additional roots.  In THREADS       */
-/* environment, this is also responsible for marking from      */
-/* thread stacks.                                              */
+/* Routine for pushing any additional roots.  In THREADS        */
+/* environment, this is also responsible for marking from       */
+/* thread stacks.                                               */
 #ifndef THREADS
-void (*GC_push_other_roots)(void) = 0;
+  GC_INNER void (*GC_push_other_roots)(void) = 0;
 #else /* THREADS */
 
 # ifdef PCR
@@ -2162,41 +2357,39 @@ PCR_ERes GC_push_thread_stack(PCR_Th_T *t, PCR_Any dummy)
 {
     struct PCR_ThCtl_TInfoRep info;
     PCR_ERes result;
-    
+
     info.ti_stkLow = info.ti_stkHi = 0;
     result = PCR_ThCtl_GetInfo(t, &info);
     GC_push_all_stack((ptr_t)(info.ti_stkLow), (ptr_t)(info.ti_stkHi));
     return(result);
 }
 
-/* Push the contents of an old object. We treat this as stack  */
-/* data only because that makes it robust against mark stack   */
-/* overflow.                                                   */
+/* Push the contents of an old object. We treat this as stack   */
+/* data only because that makes it robust against mark stack    */
+/* overflow.                                                    */
 PCR_ERes GC_push_old_obj(void *p, size_t size, PCR_Any data)
 {
     GC_push_all_stack((ptr_t)p, (ptr_t)p + size);
     return(PCR_ERes_okay);
 }
 
+extern struct PCR_MM_ProcsRep * GC_old_allocator;
+                                        /* defined in pcr_interface.c.  */
 
-void GC_default_push_other_roots(void)
+STATIC void GC_default_push_other_roots(void)
 {
-    /* Traverse data allocated by previous memory managers.            */
-       {
-         extern struct PCR_MM_ProcsRep * GC_old_allocator;
-         
-         if ((*(GC_old_allocator->mmp_enumerate))(PCR_Bool_false,
-                                                  GC_push_old_obj, 0)
-             != PCR_ERes_okay) {
-             ABORT("Old object enumeration failed");
-         }
-       }
+    /* Traverse data allocated by previous memory managers.             */
+          if ((*(GC_old_allocator->mmp_enumerate))(PCR_Bool_false,
+                                                   GC_push_old_obj, 0)
+              != PCR_ERes_okay) {
+              ABORT("Old object enumeration failed");
+          }
     /* Traverse all thread stacks. */
-       if (PCR_ERes_IsErr(
+        if (PCR_ERes_IsErr(
                 PCR_ThCtl_ApplyToAllOtherThreads(GC_push_thread_stack,0))
               || PCR_ERes_IsErr(GC_push_thread_stack(PCR_Th_CurrThread(), 0))) {
               ABORT("Thread stack marking failed\n");
-       }
+        }
 }
 
 # endif /* PCR */
@@ -2204,7 +2397,7 @@ void GC_default_push_other_roots(void)
 
 # if defined(GC_PTHREADS) || defined(GC_WIN32_THREADS)
 
-extern void GC_push_all_stacks(void);
+GC_INNER void GC_push_all_stacks(void);
 
 STATIC void GC_default_push_other_roots(void)
 {
@@ -2213,50 +2406,50 @@ STATIC void GC_default_push_other_roots(void)
 
 # endif /* GC_WIN32_THREADS || GC_PTHREADS */
 
-void (*GC_push_other_roots)(void) = GC_default_push_other_roots;
+  GC_INNER void (*GC_push_other_roots)(void) = GC_default_push_other_roots;
 
 #endif /* THREADS */
 
 /*
- * Routines for accessing dirty  bits on virtual pages.
+ * Routines for accessing dirty bits on virtual pages.
  * There are six ways to maintain this information:
- * DEFAULT_VDB:        A simple dummy implementation that treats every page
- *             as possibly dirty.  This makes incremental collection
- *             useless, but the implementation is still correct.
+ * DEFAULT_VDB: A simple dummy implementation that treats every page
+ *              as possibly dirty.  This makes incremental collection
+ *              useless, but the implementation is still correct.
  * MANUAL_VDB:  Stacks and static data are always considered dirty.
- *             Heap pages are considered dirty if GC_dirty(p) has been
- *             called on some pointer p pointing to somewhere inside
- *             an object on that page.  A GC_dirty() call on a large
- *             object directly dirties only a single page, but for
- *             MANUAL_VDB we are careful to treat an object with a dirty
- *             page as completely dirty.
- *             In order to avoid races, an object must be marked dirty
- *             after it is written, and a reference to the object
- *             must be kept on a stack or in a register in the interim.
- *             With threads enabled, an object directly reachable from the
- *             stack at the time of a collection is treated as dirty.
- *             In single-threaded mode, it suffices to ensure that no
- *             collection can take place between the pointer assignment
- *             and the GC_dirty() call.
- * PCR_VDB:    Use PPCRs virtual dirty bit facility.
- * PROC_VDB:   Use the /proc facility for reading dirty bits.  Only
- *             works under some SVR4 variants.  Even then, it may be
- *             too slow to be entirely satisfactory.  Requires reading
- *             dirty bits for entire address space.  Implementations tend
- *             to assume that the client is a (slow) debugger.
+ *              Heap pages are considered dirty if GC_dirty(p) has been
+ *              called on some pointer p pointing to somewhere inside
+ *              an object on that page.  A GC_dirty() call on a large
+ *              object directly dirties only a single page, but for
+ *              MANUAL_VDB we are careful to treat an object with a dirty
+ *              page as completely dirty.
+ *              In order to avoid races, an object must be marked dirty
+ *              after it is written, and a reference to the object
+ *              must be kept on a stack or in a register in the interim.
+ *              With threads enabled, an object directly reachable from the
+ *              stack at the time of a collection is treated as dirty.
+ *              In single-threaded mode, it suffices to ensure that no
+ *              collection can take place between the pointer assignment
+ *              and the GC_dirty() call.
+ * PCR_VDB:     Use PPCRs virtual dirty bit facility.
+ * PROC_VDB:    Use the /proc facility for reading dirty bits.  Only
+ *              works under some SVR4 variants.  Even then, it may be
+ *              too slow to be entirely satisfactory.  Requires reading
+ *              dirty bits for entire address space.  Implementations tend
+ *              to assume that the client is a (slow) debugger.
  * MPROTECT_VDB:Protect pages and then catch the faults to keep track of
- *             dirtied pages.  The implementation (and implementability)
- *             is highly system dependent.  This usually fails when system
- *             calls write to a protected page.  We prevent the read system
- *             call from doing so.  It is the clients responsibility to
- *             make sure that other system calls are similarly protected
- *             or write only to the stack.
+ *              dirtied pages.  The implementation (and implementability)
+ *              is highly system dependent.  This usually fails when system
+ *              calls write to a protected page.  We prevent the read system
+ *              call from doing so.  It is the clients responsibility to
+ *              make sure that other system calls are similarly protected
+ *              or write only to the stack.
  * GWW_VDB:     Use the Win32 GetWriteWatch functions, if available, to
  *              read dirty bits.  In case it is not available (because we
  *              are running on Windows 95, Windows 2000 or earlier),
  *              MPROTECT_VDB may be defined as a fallback strategy.
  */
-GC_bool GC_dirty_maintained = FALSE;
+GC_INNER GC_bool GC_dirty_maintained = FALSE;
 
 #if defined(PROC_VDB) || defined(GWW_VDB)
 
@@ -2264,7 +2457,7 @@ GC_bool GC_dirty_maintained = FALSE;
 STATIC void GC_or_pages(page_hash_table pht1, page_hash_table pht2)
 {
     register int i;
-    
+
     for (i = 0; i < PHT_SIZE; i++) pht1[i] |= pht2[i];
 }
 
@@ -2274,17 +2467,17 @@ STATIC void GC_or_pages(page_hash_table pht1, page_hash_table pht2)
 
 # define GC_GWW_BUF_LEN (MAXHINCR * HBLKSIZE / 4096 /* X86 page size */)
   /* Still susceptible to overflow, if there are very large allocations, */
-  /* and everything is dirty.                                           */
+  /* and everything is dirty.                                            */
   static PVOID gww_buf[GC_GWW_BUF_LEN];
 
 # ifdef MPROTECT_VDB
-    GC_bool GC_gww_dirty_init(void)
+    GC_INNER GC_bool GC_gww_dirty_init(void)
     {
       detect_GetWriteWatch();
       return GC_GWW_AVAILABLE();
     }
 # else
-    void GC_dirty_init(void)
+    GC_INNER void GC_dirty_init(void)
     {
       detect_GetWriteWatch();
       GC_dirty_maintained = GC_GWW_AVAILABLE();
@@ -2292,9 +2485,9 @@ STATIC void GC_or_pages(page_hash_table pht1, page_hash_table pht2)
 # endif
 
 # ifdef MPROTECT_VDB
-    static void GC_gww_read_dirty(void)
+    STATIC void GC_gww_read_dirty(void)
 # else
-    void GC_read_dirty(void)
+    GC_INNER void GC_read_dirty(void)
 # endif
   {
     word i;
@@ -2302,7 +2495,7 @@ STATIC void GC_or_pages(page_hash_table pht1, page_hash_table pht2)
     BZERO(GC_grungy_pages, sizeof(GC_grungy_pages));
 
     for (i = 0; i != GC_n_heap_sects; ++i) {
-      ULONG_PTR count;
+      GC_ULONG_PTR count;
 
       do {
         PVOID * pages, * pages_end;
@@ -2314,18 +2507,18 @@ STATIC void GC_or_pages(page_hash_table pht1, page_hash_table pht2)
         * GetWriteWatch is documented as returning non-zero when it fails,
         * but the documentation doesn't explicitly say why it would fail or
         * what its behaviour will be if it fails.
-       * It does appear to fail, at least on recent W2K instances, if
-       * the underlying memory was not allocated with the appropriate
-       * flag.  This is common if GC_enable_incremental is called
-       * shortly after GC initialization.  To avoid modifying the
-       * interface, we silently work around such a failure, it it only
-       * affects the initial (small) heap allocation.
-       * If there are more dirty
+        * It does appear to fail, at least on recent W2K instances, if
+        * the underlying memory was not allocated with the appropriate
+        * flag.  This is common if GC_enable_incremental is called
+        * shortly after GC initialization.  To avoid modifying the
+        * interface, we silently work around such a failure, it it only
+        * affects the initial (small) heap allocation.
+        * If there are more dirty
         * pages than will fit in the buffer, this is not treated as a
         * failure; we must check the page count in the loop condition.
-       * Since each partial call will reset the status of some
-       * pages, this should eventually terminate even in the overflow
-       * case.
+        * Since each partial call will reset the status of some
+        * pages, this should eventually terminate even in the overflow
+        * case.
         */
         if (GetWriteWatch_func(WRITE_WATCH_FLAG_RESET,
                                GC_heap_sects[i].hs_start,
@@ -2362,65 +2555,69 @@ STATIC void GC_or_pages(page_hash_table pht1, page_hash_table pht2)
         }
       } while (count == GC_GWW_BUF_LEN);
       /* FIXME: It's unclear from Microsoft's documentation if this loop  */
-      /* is useful.  We suspect the call just fails if the buffer fills          */
-      /* up.  But that should still be handled correctly.                */
+      /* is useful.  We suspect the call just fails if the buffer fills   */
+      /* up.  But that should still be handled correctly.                 */
     }
 
     GC_or_pages(GC_written_pages, GC_grungy_pages);
   }
 
 # ifdef MPROTECT_VDB
-    static GC_bool GC_gww_page_was_dirty(struct hblk * h)
+    STATIC GC_bool GC_gww_page_was_dirty(struct hblk * h)
 # else
-    GC_bool GC_page_was_dirty(struct hblk * h)
+    GC_INNER GC_bool GC_page_was_dirty(struct hblk * h)
 # endif
   {
-    return HDR(h) == 0 || get_pht_entry_from_index(GC_grungy_pages, PHT_HASH(h));
+    return HDR(h) == 0 ||
+            get_pht_entry_from_index(GC_grungy_pages, PHT_HASH(h));
   }
 
+#if 0
+  /* Used only if PROC_VDB. */
 # ifdef MPROTECT_VDB
-    static GC_bool GC_gww_page_was_ever_dirty(struct hblk * h)
+    STATIC GC_bool GC_gww_page_was_ever_dirty(struct hblk * h)
 # else
-    GC_bool GC_page_was_ever_dirty(struct hblk * h)
+    GC_INNER GC_bool GC_page_was_ever_dirty(struct hblk * h)
 # endif
   {
-    return HDR(h) == 0 || get_pht_entry_from_index(GC_written_pages, PHT_HASH(h));
+    return HDR(h) == 0 ||
+            get_pht_entry_from_index(GC_written_pages, PHT_HASH(h));
   }
+#endif
 
 # ifndef MPROTECT_VDB
     /*ARGSUSED*/
-    void GC_remove_protection(struct hblk *h, word nblocks, GC_bool is_ptrfree)
-    {}
+    GC_INNER void GC_remove_protection(struct hblk *h, word nblocks,
+                                       GC_bool is_ptrfree) {}
 # endif
 
 # endif /* GWW_VDB */
 
 # ifdef DEFAULT_VDB
 
-/* All of the following assume the allocation lock is held.    */
+/* All of the following assume the allocation lock is held.     */
 
-/* The client asserts that unallocated pages in the heap are never     */
-/* written.                                                            */
+/* The client asserts that unallocated pages in the heap are never      */
+/* written.                                                             */
 
-/* Initialize virtual dirty bit implementation.                        */
-void GC_dirty_init(void)
+/* Initialize virtual dirty bit implementation.                 */
+GC_INNER void GC_dirty_init(void)
 {
     if (GC_print_stats == VERBOSE)
       GC_log_printf("Initializing DEFAULT_VDB...\n");
     GC_dirty_maintained = TRUE;
 }
 
-/* Retrieve system dirty bits for heap to a local buffer.      */
-/* Restore the systems notion of which pages are dirty.                */
-void GC_read_dirty(void)
-{}
+/* Retrieve system dirty bits for heap to a local buffer.       */
+/* Restore the systems notion of which pages are dirty.         */
+GC_INNER void GC_read_dirty(void) {}
 
-/* Is the HBLKSIZE sized page at h marked dirty in the local buffer?   */
-/* If the actual page size is different, this returns TRUE if any      */
-/* of the pages overlapping h are dirty.  This routine may err on the  */
-/* side of labeling pages as dirty (and this implementation does).     */
+/* Is the HBLKSIZE sized page at h marked dirty in the local buffer?    */
+/* If the actual page size is different, this returns TRUE if any       */
+/* of the pages overlapping h are dirty.  This routine may err on the   */
+/* side of labeling pages as dirty (and this implementation does).      */
 /*ARGSUSED*/
-GC_bool GC_page_was_dirty(struct hblk *h)
+GC_INNER GC_bool GC_page_was_dirty(struct hblk *h)
 {
     return(TRUE);
 }
@@ -2431,32 +2628,33 @@ GC_bool GC_page_was_dirty(struct hblk *h)
  * stacks, e.g. under Solaris 2.X.  Otherwise the following default
  * versions are adequate.
  */
-/* Could any valid GC heap pointer ever have been written to this page?        */
+
+#if 0
+/* Could any valid GC heap pointer ever have been written to this page? */
 /*ARGSUSED*/
-GC_bool GC_page_was_ever_dirty(struct hblk *h)
+GC_INNER GC_bool GC_page_was_ever_dirty(struct hblk *h)
 {
     return(TRUE);
 }
+#endif
 
-/* A call that:                                                */
-/* I) hints that [h, h+nblocks) is about to be written.        */
-/* II) guarantees that protection is removed.          */
-/* (I) may speed up some dirty bit implementations.    */
-/* (II) may be essential if we need to ensure that     */
-/* pointer-free system call buffers in the heap are    */
-/* not protected.                                      */
+/* A call that:                                         */
+/* I) hints that [h, h+nblocks) is about to be written. */
+/* II) guarantees that protection is removed.           */
+/* (I) may speed up some dirty bit implementations.     */
+/* (II) may be essential if we need to ensure that      */
+/* pointer-free system call buffers in the heap are     */
+/* not protected.                                       */
 /*ARGSUSED*/
-void GC_remove_protection(struct hblk *h, word nblocks, GC_bool is_ptrfree)
-{
-}
+GC_INNER void GC_remove_protection(struct hblk *h, word nblocks,
+                                   GC_bool is_ptrfree) {}
 
 # endif /* DEFAULT_VDB */
 
 # ifdef MANUAL_VDB
 
-/* Initialize virtual dirty bit implementation.                        */
-void GC_dirty_init(void)
+/* Initialize virtual dirty bit implementation.                 */
+GC_INNER void GC_dirty_init(void)
 {
     if (GC_print_stats == VERBOSE)
       GC_log_printf("Initializing MANUAL_VDB...\n");
@@ -2464,37 +2662,29 @@ void GC_dirty_init(void)
     GC_dirty_maintained = TRUE;
 }
 
-/* Retrieve system dirty bits for heap to a local buffer.      */
-/* Restore the systems notion of which pages are dirty.                */
-void GC_read_dirty(void)
+/* Retrieve system dirty bits for heap to a local buffer.       */
+/* Restore the systems notion of which pages are dirty.         */
+GC_INNER void GC_read_dirty(void)
 {
     BCOPY((word *)GC_dirty_pages, GC_grungy_pages,
           (sizeof GC_dirty_pages));
     BZERO((word *)GC_dirty_pages, (sizeof GC_dirty_pages));
 }
 
-/* Is the HBLKSIZE sized page at h marked dirty in the local buffer?   */
-/* If the actual page size is different, this returns TRUE if any      */
-/* of the pages overlapping h are dirty.  This routine may err on the  */
-/* side of labeling pages as dirty (and this implementation does).     */
-GC_bool GC_page_was_dirty(struct hblk *h)
+/* Is the HBLKSIZE sized page at h marked dirty in the local buffer?    */
+/* If the actual page size is different, this returns TRUE if any       */
+/* of the pages overlapping h are dirty.  This routine may err on the   */
+/* side of labeling pages as dirty (and this implementation does).      */
+GC_INNER GC_bool GC_page_was_dirty(struct hblk *h)
 {
     register word index;
-    
+
     index = PHT_HASH(h);
     return(HDR(h) == 0 || get_pht_entry_from_index(GC_grungy_pages, index));
 }
-/* Could any valid GC heap pointer ever have been written to this page?        */
-/*ARGSUSED*/
-GC_bool GC_page_was_ever_dirty(struct hblk *h)
-{
-    /* FIXME - implement me.   */
-    return(TRUE);
-}
 
-/* Mark the page containing p as dirty.  Logically, this dirties the   */
-/* entire object.                                                      */
+/* Mark the page containing p as dirty.  Logically, this dirties the    */
+/* entire object.                                                       */
 void GC_dirty(ptr_t p)
 {
     word index = PHT_HASH(p);
@@ -2502,9 +2692,8 @@ void GC_dirty(ptr_t p)
 }
 
 /*ARGSUSED*/
-void GC_remove_protection(struct hblk *h, word nblocks, GC_bool is_ptrfree)
-{
-}
+GC_INNER void GC_remove_protection(struct hblk *h, word nblocks,
+                                   GC_bool is_ptrfree) {}
 
 # endif /* MANUAL_VDB */
 
@@ -2525,7 +2714,7 @@ void GC_remove_protection(struct hblk *h, word nblocks, GC_bool is_ptrfree)
  * heap, and do even that only if we are on a platform on which those
  * are not protected.  Another alternative is to wrap system calls
  * (see example for read below), but the current implementation holds
- * applications. 
+ * applications.
  * We assume the page size is a multiple of HBLKSIZE.
  * We prefer them to be the same.  We avoid protecting POINTERFREE
  * objects only if they are the same.
@@ -2538,51 +2727,51 @@ void GC_remove_protection(struct hblk *h, word nblocks, GC_bool is_ptrfree)
 #   include <sys/syscall.h>
 
 #   define PROTECT(addr, len) \
-         if (mprotect((caddr_t)(addr), (size_t)(len), \
-                      PROT_READ | OPT_PROT_EXEC) < 0) { \
-           ABORT("mprotect failed"); \
-         }
+          if (mprotect((caddr_t)(addr), (size_t)(len), \
+                       PROT_READ | OPT_PROT_EXEC) < 0) { \
+            ABORT("mprotect failed"); \
+          }
 #   define UNPROTECT(addr, len) \
-         if (mprotect((caddr_t)(addr), (size_t)(len), \
-                      PROT_WRITE | PROT_READ | OPT_PROT_EXEC ) < 0) { \
-           ABORT("un-mprotect failed"); \
-         }
-         
+          if (mprotect((caddr_t)(addr), (size_t)(len), \
+                       PROT_WRITE | PROT_READ | OPT_PROT_EXEC ) < 0) { \
+            ABORT("un-mprotect failed"); \
+          }
+
 # else
 
 # ifdef DARWIN
     /* Using vm_protect (mach syscall) over mprotect (BSD syscall) seems to
        decrease the likelihood of some of the problems described below. */
-    #include <mach/vm_map.h>
-    static mach_port_t GC_task_self;
+#   include <mach/vm_map.h>
+    STATIC mach_port_t GC_task_self = 0;
 #   define PROTECT(addr,len) \
         if(vm_protect(GC_task_self,(vm_address_t)(addr),(vm_size_t)(len), \
                 FALSE,VM_PROT_READ) != KERN_SUCCESS) { \
-            ABORT("vm_portect failed"); \
+            ABORT("vm_protect (PROTECT) failed"); \
         }
 #   define UNPROTECT(addr,len) \
         if(vm_protect(GC_task_self,(vm_address_t)(addr),(vm_size_t)(len), \
                 FALSE,VM_PROT_READ|VM_PROT_WRITE) != KERN_SUCCESS) { \
-            ABORT("vm_portect failed"); \
+            ABORT("vm_protect (UNPROTECT) failed"); \
         }
 # else
-    
+
 #   ifndef MSWINCE
 #     include <signal.h>
 #   endif
 
     static DWORD protect_junk;
 #   define PROTECT(addr, len) \
-         if (!VirtualProtect((addr), (len), PAGE_EXECUTE_READ, \
-                             &protect_junk)) { \
-           GC_printf("Last error code: %lx\n", (long)GetLastError()); \
-           ABORT("VirtualProtect failed"); \
-         }
+          if (!VirtualProtect((addr), (len), PAGE_EXECUTE_READ, \
+                              &protect_junk)) { \
+            GC_printf("Last error code: 0x%lx\n", (long)GetLastError()); \
+            ABORT("VirtualProtect failed"); \
+          }
 #   define UNPROTECT(addr, len) \
-         if (!VirtualProtect((addr), (len), PAGE_EXECUTE_READWRITE, \
-                             &protect_junk)) { \
-           ABORT("un-VirtualProtect failed"); \
-         }
+          if (!VirtualProtect((addr), (len), PAGE_EXECUTE_READWRITE, \
+                              &protect_junk)) { \
+            ABORT("un-VirtualProtect failed"); \
+          }
 # endif /* !DARWIN */
 # endif /* MSWIN32 || MSWINCE || DARWIN */
 
@@ -2603,73 +2792,79 @@ void GC_remove_protection(struct hblk *h, word nblocks, GC_bool is_ptrfree)
 
 #if defined(__GLIBC__)
 #   if __GLIBC__ < 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
-#      error glibc too old?
+#       error glibc too old?
 #   endif
 #endif
 
 #ifndef DARWIN
-STATIC SIG_HNDLR_PTR GC_old_segv_handler;
-                       /* Also old MSWIN32 ACCESS_VIOLATION filter */
-#if !defined(MSWIN32) && !defined(MSWINCE)
-STATIC SIG_HNDLR_PTR GC_old_bus_handler;
-STATIC GC_bool GC_old_bus_handler_used_si;
-STATIC GC_bool GC_old_segv_handler_used_si;
-#endif
+  STATIC SIG_HNDLR_PTR GC_old_segv_handler = 0;
+                        /* Also old MSWIN32 ACCESS_VIOLATION filter */
+# if !defined(MSWIN32) && !defined(MSWINCE)
+    STATIC SIG_HNDLR_PTR GC_old_bus_handler = 0;
+    STATIC GC_bool GC_old_bus_handler_used_si = FALSE;
+    STATIC GC_bool GC_old_segv_handler_used_si = FALSE;
+# endif
 #endif /* !DARWIN */
 
 #if defined(THREADS)
-/* We need to lock around the bitmap update in the write fault handler */
-/* in order to avoid the risk of losing a bit.  We do this with a      */
-/* test-and-set spin lock if we know how to do that.  Otherwise we     */
-/* check whether we are already in the handler and use the dumb but    */
-/* safe fallback algorithm of setting all bits in the word.            */
-/* Contention should be very rare, so we do the minimum to handle it   */
-/* correctly.                                                          */
+/* We need to lock around the bitmap update in the write fault handler  */
+/* in order to avoid the risk of losing a bit.  We do this with a       */
+/* test-and-set spin lock if we know how to do that.  Otherwise we      */
+/* check whether we are already in the handler and use the dumb but     */
+/* safe fallback algorithm of setting all bits in the word.             */
+/* Contention should be very rare, so we do the minimum to handle it    */
+/* correctly.                                                           */
 #ifdef AO_HAVE_test_and_set_acquire
-  volatile AO_TS_t GC_fault_handler_lock = 0;
-  void async_set_pht_entry_from_index(volatile page_hash_table db, size_t index) {
-    while (AO_test_and_set_acquire(&GC_fault_handler_lock) == AO_TS_SET) {}
-    /* Could also revert to set_pht_entry_from_index_safe if initial   */
-    /* GC_test_and_set fails.                                          */
+  GC_INNER volatile AO_TS_t GC_fault_handler_lock = AO_TS_INITIALIZER;
+  static void async_set_pht_entry_from_index(volatile page_hash_table db,
+                                             size_t index)
+  {
+    while (AO_test_and_set_acquire(&GC_fault_handler_lock) == AO_TS_SET) {
+      /* empty */
+    }
+    /* Could also revert to set_pht_entry_from_index_safe if initial    */
+    /* GC_test_and_set fails.                                           */
     set_pht_entry_from_index(db, index);
     AO_CLEAR(&GC_fault_handler_lock);
   }
-#else /* !AO_have_test_and_set_acquire */
+#else /* !AO_HAVE_test_and_set_acquire */
 # error No test_and_set operation: Introduces a race.
-  /* THIS WOULD BE INCORRECT!                                          */
-  /* The dirty bit vector may be temporarily wrong,                    */
+  /* THIS WOULD BE INCORRECT!                                           */
+  /* The dirty bit vector may be temporarily wrong,                     */
   /* just before we notice the conflict and correct it. We may end up   */
-  /* looking at it while it's wrong.  But this requires contention     */
-  /* exactly when a GC is triggered, which seems far less likely to    */
-  /* fail than the old code, which had no reported failures.  Thus we  */
-  /* leave it this way while we think of something better, or support  */
-  /* GC_test_and_set on the remaining platforms.                       */
+  /* looking at it while it's wrong.  But this requires contention      */
+  /* exactly when a GC is triggered, which seems far less likely to     */
+  /* fail than the old code, which had no reported failures.  Thus we   */
+  /* leave it this way while we think of something better, or support   */
+  /* GC_test_and_set on the remaining platforms.                        */
   static volatile word currently_updating = 0;
-  void async_set_pht_entry_from_index(volatile page_hash_table db, size_t index) {
+  static void async_set_pht_entry_from_index(volatile page_hash_table db,
+                                             size_t index)
+  {
     unsigned int update_dummy;
     currently_updating = (word)(&update_dummy);
     set_pht_entry_from_index(db, index);
-    /* If we get contention in the 10 or so instruction window here,   */
-    /* and we get stopped by a GC between the two updates, we lose!    */
+    /* If we get contention in the 10 or so instruction window here,    */
+    /* and we get stopped by a GC between the two updates, we lose!     */
     if (currently_updating != (word)(&update_dummy)) {
-       set_pht_entry_from_index_safe(db, index);
-       /* We claim that if two threads concurrently try to update the  */
-       /* dirty bit vector, the first one to execute UPDATE_START      */
-       /* will see it changed when UPDATE_END is executed.  (Note that */
-       /* &update_dummy must differ in two distinct threads.)  It      */
-       /* will then execute set_pht_entry_from_index_safe, thus        */
-       /* returning us to a safe state, though not soon enough.        */
+        set_pht_entry_from_index_safe(db, index);
+        /* We claim that if two threads concurrently try to update the  */
+        /* dirty bit vector, the first one to execute UPDATE_START      */
+        /* will see it changed when UPDATE_END is executed.  (Note that */
+        /* &update_dummy must differ in two distinct threads.)  It      */
+        /* will then execute set_pht_entry_from_index_safe, thus        */
+        /* returning us to a safe state, though not soon enough.        */
     }
   }
 #endif /* !AO_HAVE_test_and_set_acquire */
 #else /* !THREADS */
 # define async_set_pht_entry_from_index(db, index) \
-       set_pht_entry_from_index(db, index)
+                        set_pht_entry_from_index(db, index)
 #endif /* !THREADS */
 
 #ifdef CHECKSUMS
   void GC_record_fault(struct hblk * h);
-       /* From checksums.c */
+        /* From checksums.c */
 #endif
 
 #if !defined(DARWIN)
@@ -2684,33 +2879,34 @@ STATIC GC_bool GC_old_segv_handler_used_si;
 #     define SIG_OK (sig == SIGSEGV)
 #     define CODE_OK (si -> si_code == EACCES)
 #   elif defined(HURD)
-#     define SIG_OK (sig == SIGBUS || sig == SIGSEGV)  
+#     define SIG_OK (sig == SIGBUS || sig == SIGSEGV)
 #     define CODE_OK  TRUE
 #   elif defined(LINUX)
 #     define SIG_OK (sig == SIGSEGV)
 #     define CODE_OK TRUE
-       /* Empirically c.trapno == 14, on IA32, but is that useful?     */
-       /* Should probably consider alignment issues on other           */
-       /* architectures.                                               */
+        /* Empirically c.trapno == 14, on IA32, but is that useful?     */
+        /* Should probably consider alignment issues on other           */
+        /* architectures.                                               */
 #   elif defined(HPUX)
 #     define SIG_OK (sig == SIGSEGV || sig == SIGBUS)
 #     define CODE_OK (si -> si_code == SEGV_ACCERR) \
-                    || (si -> si_code == BUS_ADRERR) \
-                    || (si -> si_code == BUS_UNKNOWN) \
-                    || (si -> si_code == SEGV_UNKNOWN) \
-                    || (si -> si_code == BUS_OBJERR)
+                     || (si -> si_code == BUS_ADRERR) \
+                     || (si -> si_code == BUS_UNKNOWN) \
+                     || (si -> si_code == SEGV_UNKNOWN) \
+                     || (si -> si_code == BUS_OBJERR)
 #   elif defined(SUNOS5SIGS)
 #     define SIG_OK (sig == SIGSEGV)
 #     define CODE_OK (si -> si_code == SEGV_ACCERR)
 #   elif defined(MSWIN32) || defined(MSWINCE)
 #     define SIG_OK (exc_info -> ExceptionRecord -> ExceptionCode \
-                    == STATUS_ACCESS_VIOLATION)
+                     == STATUS_ACCESS_VIOLATION)
 #     define CODE_OK (exc_info -> ExceptionRecord -> ExceptionInformation[0] \
-                     == 1) /* Write fault */
-#   endif    
+                      == 1) /* Write fault */
+#   endif
 
 # if defined(MSWIN32) || defined(MSWINCE)
-    LONG WINAPI GC_write_fault_handler(struct _EXCEPTION_POINTERS *exc_info)
+    GC_INNER LONG WINAPI GC_write_fault_handler(
+                                struct _EXCEPTION_POINTERS *exc_info)
 # else
 #   include <ucontext.h>
     /*ARGSUSED*/
@@ -2718,103 +2914,103 @@ STATIC GC_bool GC_old_segv_handler_used_si;
 # endif /* MSWIN32 || MSWINCE */
 {
 #   if !defined(MSWIN32) && !defined(MSWINCE)
-       char *addr = si -> si_addr;
+        char *addr = si -> si_addr;
 #   else
-       char * addr = (char *) (exc_info -> ExceptionRecord
-                               -> ExceptionInformation[1]);
+        char * addr = (char *) (exc_info -> ExceptionRecord
+                                -> ExceptionInformation[1]);
 #   endif
     unsigned i;
-    
+
     if (SIG_OK && CODE_OK) {
         register struct hblk * h =
-                       (struct hblk *)((word)addr & ~(GC_page_size-1));
+                        (struct hblk *)((word)addr & ~(GC_page_size-1));
         GC_bool in_allocd_block;
-#      ifdef CHECKSUMS
-         GC_record_fault(h);
-#      endif /* CHECKSUMS */
-        
-#      ifdef SUNOS5SIGS
-           /* Address is only within the correct physical page.        */
-           in_allocd_block = FALSE;
+#       ifdef CHECKSUMS
+          GC_record_fault(h);
+#       endif /* CHECKSUMS */
+
+#       ifdef SUNOS5SIGS
+            /* Address is only within the correct physical page.        */
+            in_allocd_block = FALSE;
             for (i = 0; i < divHBLKSZ(GC_page_size); i++) {
               if (HDR(h+i) != 0) {
                 in_allocd_block = TRUE;
               }
             }
-#      else
-           in_allocd_block = (HDR(addr) != 0);
-#      endif
+#       else
+            in_allocd_block = (HDR(addr) != 0);
+#       endif
         if (!in_allocd_block) {
-           /* FIXME - We should make sure that we invoke the   */
-           /* old handler with the appropriate calling         */
-           /* sequence, which often depends on SA_SIGINFO.     */
+            /* FIXME - We should make sure that we invoke the   */
+            /* old handler with the appropriate calling         */
+            /* sequence, which often depends on SA_SIGINFO.     */
 
-           /* Heap blocks now begin and end on page boundaries */
+            /* Heap blocks now begin and end on page boundaries */
             SIG_HNDLR_PTR old_handler;
 
-#          if defined(MSWIN32) || defined(MSWINCE)
-               old_handler = GC_old_segv_handler;
-#          else
-               GC_bool used_si;
-
-               if (sig == SIGSEGV) {
-                  old_handler = GC_old_segv_handler;
-                  used_si = GC_old_segv_handler_used_si;
-               } else {
-                  old_handler = GC_old_bus_handler;
-                  used_si = GC_old_bus_handler_used_si;
-               }
-#          endif
-            
+#           if defined(MSWIN32) || defined(MSWINCE)
+                old_handler = GC_old_segv_handler;
+#           else
+                GC_bool used_si;
+
+                if (sig == SIGSEGV) {
+                   old_handler = GC_old_segv_handler;
+                   used_si = GC_old_segv_handler_used_si;
+                } else {
+                   old_handler = GC_old_bus_handler;
+                   used_si = GC_old_bus_handler_used_si;
+                }
+#           endif
+
             if (old_handler == (SIG_HNDLR_PTR)SIG_DFL) {
-#              if !defined(MSWIN32) && !defined(MSWINCE)
-                   GC_err_printf("Segfault at %p\n", addr);
+#               if !defined(MSWIN32) && !defined(MSWINCE)
+                    GC_err_printf("Segfault at %p\n", addr);
                     ABORT("Unexpected bus error or segmentation fault");
-#              else
-                   return(EXCEPTION_CONTINUE_SEARCH);
-#              endif
+#               else
+                    return(EXCEPTION_CONTINUE_SEARCH);
+#               endif
             } else {
                 /*
-                 * FIXME: This code should probably check if the 
+                 * FIXME: This code should probably check if the
                  * old signal handler used the traditional style and
                  * if so call it using that style.
                  */
-#              if defined(MSWIN32) || defined(MSWINCE)
-                   return((*old_handler)(exc_info));
-#              else
-                   if (used_si)
-                     ((SIG_HNDLR_PTR)old_handler) (sig, si, raw_sc);
-                   else
-                     /* FIXME: should pass nonstandard args as well. */
-                     ((PLAIN_HNDLR_PTR)old_handler) (sig);
-                   return;
-#              endif
+#               if defined(MSWIN32) || defined(MSWINCE)
+                    return((*old_handler)(exc_info));
+#               else
+                    if (used_si)
+                      ((SIG_HNDLR_PTR)old_handler) (sig, si, raw_sc);
+                    else
+                      /* FIXME: should pass nonstandard args as well. */
+                      ((PLAIN_HNDLR_PTR)old_handler) (sig);
+                    return;
+#               endif
             }
         }
         UNPROTECT(h, GC_page_size);
-       /* We need to make sure that no collection occurs between       */
-       /* the UNPROTECT and the setting of the dirty bit.  Otherwise   */
-       /* a write by a third thread might go unnoticed.  Reversing     */
-       /* the order is just as bad, since we would end up unprotecting */
-       /* a page in a GC cycle during which it's not marked.           */
-       /* Currently we do this by disabling the thread stopping        */
-       /* signals while this handler is running.  An alternative might */
-       /* be to record the fact that we're about to unprotect, or      */
-       /* have just unprotected a page in the GC's thread structure,   */
-       /* and then to have the thread stopping code set the dirty      */
-       /* flag, if necessary.                                          */
+        /* We need to make sure that no collection occurs between       */
+        /* the UNPROTECT and the setting of the dirty bit.  Otherwise   */
+        /* a write by a third thread might go unnoticed.  Reversing     */
+        /* the order is just as bad, since we would end up unprotecting */
+        /* a page in a GC cycle during which it's not marked.           */
+        /* Currently we do this by disabling the thread stopping        */
+        /* signals while this handler is running.  An alternative might */
+        /* be to record the fact that we're about to unprotect, or      */
+        /* have just unprotected a page in the GC's thread structure,   */
+        /* and then to have the thread stopping code set the dirty      */
+        /* flag, if necessary.                                          */
         for (i = 0; i < divHBLKSZ(GC_page_size); i++) {
             size_t index = PHT_HASH(h+i);
-            
+
             async_set_pht_entry_from_index(GC_dirty_pages, index);
         }
-       /* The write may not take place before dirty bits are read.     */
-       /* But then we'll fault again ...                               */
-#      if defined(MSWIN32) || defined(MSWINCE)
-           return(EXCEPTION_CONTINUE_EXECUTION);
-#      else
-           return;
-#      endif
+        /* The write may not take place before dirty bits are read.     */
+        /* But then we'll fault again ...                               */
+#       if defined(MSWIN32) || defined(MSWINCE)
+            return(EXCEPTION_CONTINUE_EXECUTION);
+#       else
+            return;
+#       endif
     }
 #if defined(MSWIN32) || defined(MSWINCE)
     return EXCEPTION_CONTINUE_SEARCH;
@@ -2830,24 +3026,27 @@ STATIC GC_bool GC_old_segv_handler_used_si;
  * shortly.  Ensure that all pages containing any part of the n hblks
  * starting at h are no longer protected.  If is_ptrfree is false,
  * also ensure that they will subsequently appear to be dirty.
+ * Not allowed to call GC_printf (and the friends) here, see Win32
+ * GC_stop_world() for the information.
  */
-void GC_remove_protection(struct hblk *h, word nblocks, GC_bool is_ptrfree)
+GC_INNER void GC_remove_protection(struct hblk *h, word nblocks,
+                                   GC_bool is_ptrfree)
 {
     struct hblk * h_trunc;  /* Truncated to page boundary */
     struct hblk * h_end;    /* Page boundary following block end */
     struct hblk * current;
-    
+
 #   if defined(GWW_VDB)
       if (GC_GWW_AVAILABLE()) return;
 #   endif
     if (!GC_dirty_maintained) return;
     h_trunc = (struct hblk *)((word)h & ~(GC_page_size-1));
     h_end = (struct hblk *)(((word)(h + nblocks) + GC_page_size-1)
-                           & ~(GC_page_size-1));
+                            & ~(GC_page_size-1));
     if (h_end == h_trunc + 1 &&
         get_pht_entry_from_index(GC_dirty_pages, PHT_HASH(h_trunc))) {
-       /* already marked dirty, and hence unprotected. */
-       return;
+        /* already marked dirty, and hence unprotected. */
+        return;
     }
     for (current = h_trunc; current < h_end; ++current) {
         size_t index = PHT_HASH(current);
@@ -2859,23 +3058,23 @@ void GC_remove_protection(struct hblk *h, word nblocks, GC_bool is_ptrfree)
 }
 
 #if !defined(DARWIN)
-void GC_dirty_init(void)
-{
+  GC_INNER void GC_dirty_init(void)
+  {
 #   if !defined(MSWIN32) && !defined(MSWINCE)
-      struct sigaction act, oldact;
-      act.sa_flags     = SA_RESTART | SA_SIGINFO;
+      struct sigaction  act, oldact;
+      act.sa_flags      = SA_RESTART | SA_SIGINFO;
       act.sa_sigaction = GC_write_fault_handler;
       (void)sigemptyset(&act.sa_mask);
 #     ifdef SIG_SUSPEND
-        /* Arrange to postpone SIG_SUSPEND while we're in a write fault        */
-        /* handler.  This effectively makes the handler atomic w.r.t.  */
-        /* stopping the world for GC.                                  */
+        /* Arrange to postpone SIG_SUSPEND while we're in a write fault */
+        /* handler.  This effectively makes the handler atomic w.r.t.   */
+        /* stopping the world for GC.                                   */
         (void)sigaddset(&act.sa_mask, SIG_SUSPEND);
 #     endif /* SIG_SUSPEND */
 #   endif
     if (GC_print_stats == VERBOSE)
-       GC_log_printf(
-               "Initializing mprotect virtual dirty bit implementation\n");
+        GC_log_printf(
+                "Initializing mprotect virtual dirty bit implementation\n");
     GC_dirty_maintained = TRUE;
     if (GC_page_size % HBLKSIZE != 0) {
         GC_err_printf("Page size not multiple of HBLKSIZE\n");
@@ -2883,46 +3082,46 @@ void GC_dirty_init(void)
     }
 #   if !defined(MSWIN32) && !defined(MSWINCE)
 #     if defined(GC_IRIX_THREADS)
-       sigaction(SIGSEGV, 0, &oldact);
-       sigaction(SIGSEGV, &act, 0);
-#     else 
-       {
-         int res = sigaction(SIGSEGV, &act, &oldact);
-         if (res != 0) ABORT("Sigaction failed");
-       }
+        sigaction(SIGSEGV, 0, &oldact);
+        sigaction(SIGSEGV, &act, 0);
+#     else
+        {
+          int res = sigaction(SIGSEGV, &act, &oldact);
+          if (res != 0) ABORT("Sigaction failed");
+        }
 #     endif
       if (oldact.sa_flags & SA_SIGINFO) {
         GC_old_segv_handler = oldact.sa_sigaction;
-       GC_old_segv_handler_used_si = TRUE;
+        GC_old_segv_handler_used_si = TRUE;
       } else {
         GC_old_segv_handler = (SIG_HNDLR_PTR)oldact.sa_handler;
-       GC_old_segv_handler_used_si = FALSE;
+        GC_old_segv_handler_used_si = FALSE;
       }
       if (GC_old_segv_handler == (SIG_HNDLR_PTR)SIG_IGN) {
-       GC_err_printf("Previously ignored segmentation violation!?\n");
-       GC_old_segv_handler = (SIG_HNDLR_PTR)SIG_DFL;
+        GC_err_printf("Previously ignored segmentation violation!?\n");
+        GC_old_segv_handler = (SIG_HNDLR_PTR)SIG_DFL;
       }
       if (GC_old_segv_handler != (SIG_HNDLR_PTR)SIG_DFL) {
-       if (GC_print_stats == VERBOSE)
-         GC_log_printf("Replaced other SIGSEGV handler\n");
+        if (GC_print_stats == VERBOSE)
+          GC_log_printf("Replaced other SIGSEGV handler\n");
       }
 #   if defined(HPUX) || defined(LINUX) || defined(HURD) \
       || (defined(FREEBSD) && defined(SUNOS5SIGS))
       sigaction(SIGBUS, &act, &oldact);
       if (oldact.sa_flags & SA_SIGINFO) {
         GC_old_bus_handler = oldact.sa_sigaction;
-       GC_old_bus_handler_used_si = TRUE;
+        GC_old_bus_handler_used_si = TRUE;
       } else {
         GC_old_bus_handler = (SIG_HNDLR_PTR)oldact.sa_handler;
-       GC_old_bus_handler_used_si = FALSE;
+        GC_old_bus_handler_used_si = FALSE;
       }
       if (GC_old_bus_handler == (SIG_HNDLR_PTR)SIG_IGN) {
-            GC_err_printf("Previously ignored bus error!?\n");
-            GC_old_bus_handler = (SIG_HNDLR_PTR)SIG_DFL;
+             GC_err_printf("Previously ignored bus error!?\n");
+             GC_old_bus_handler = (SIG_HNDLR_PTR)SIG_DFL;
       }
       if (GC_old_bus_handler != (SIG_HNDLR_PTR)SIG_DFL) {
-       if (GC_print_stats == VERBOSE)
-         GC_log_printf("Replaced other SIGBUS handler\n");
+        if (GC_print_stats == VERBOSE)
+          GC_log_printf("Replaced other SIGBUS handler\n");
       }
 #   endif /* HPUX || LINUX || HURD || (FREEBSD && SUNOS5SIGS) */
 #   endif /* ! MS windows */
@@ -2933,21 +3132,24 @@ void GC_dirty_init(void)
 #   if defined(MSWIN32)
       GC_old_segv_handler = SetUnhandledExceptionFilter(GC_write_fault_handler);
       if (GC_old_segv_handler != NULL) {
-       if (GC_print_stats)
+        if (GC_print_stats)
           GC_log_printf("Replaced other UnhandledExceptionFilter\n");
       } else {
           GC_old_segv_handler = SIG_DFL;
       }
+#   elif defined(MSWINCE)
+      /* MPROTECT_VDB is unsupported for WinCE at present.      */
+      /* FIXME: implement it (if possible). */
 #   endif
-}
+  }
 #endif /* !DARWIN */
 
 GC_API int GC_CALL GC_incremental_protection_needs(void)
 {
     if (GC_page_size == HBLKSIZE) {
-       return GC_PROTECTS_POINTER_HEAP;
+        return GC_PROTECTS_POINTER_HEAP;
     } else {
-       return GC_PROTECTS_POINTER_HEAP | GC_PROTECTS_PTRFREE_HEAP;
+        return GC_PROTECTS_POINTER_HEAP | GC_PROTECTS_PTRFREE_HEAP;
     }
 }
 
@@ -2964,61 +3166,61 @@ STATIC void GC_protect_heap(void)
     struct hblk * current_start;  /* Start of block to be protected. */
     struct hblk * limit;
     unsigned i;
-    GC_bool protect_all = 
-         (0 != (GC_incremental_protection_needs() & GC_PROTECTS_PTRFREE_HEAP));
+    GC_bool protect_all =
+          (0 != (GC_incremental_protection_needs() & GC_PROTECTS_PTRFREE_HEAP));
     for (i = 0; i < GC_n_heap_sects; i++) {
         start = GC_heap_sects[i].hs_start;
         len = GC_heap_sects[i].hs_bytes;
-       if (protect_all) {
+        if (protect_all) {
           PROTECT(start, len);
-       } else {
-         GC_ASSERT(PAGE_ALIGNED(len))
-         GC_ASSERT(PAGE_ALIGNED(start))
-         current_start = current = (struct hblk *)start;
-         limit = (struct hblk *)(start + len);
-         while (current < limit) {
+        } else {
+          GC_ASSERT(PAGE_ALIGNED(len))
+          GC_ASSERT(PAGE_ALIGNED(start))
+          current_start = current = (struct hblk *)start;
+          limit = (struct hblk *)(start + len);
+          while (current < limit) {
             hdr * hhdr;
-           word nhblks;
-           GC_bool is_ptrfree;
-
-           GC_ASSERT(PAGE_ALIGNED(current));
-           GET_HDR(current, hhdr);
-           if (IS_FORWARDING_ADDR_OR_NIL(hhdr)) {
-             /* This can happen only if we're at the beginning of a    */
-             /* heap segment, and a block spans heap segments.         */
-             /* We will handle that block as part of the preceding     */
-             /* segment.                                               */
-             GC_ASSERT(current_start == current);
-             current_start = ++current;
-             continue;
-           }
-           if (HBLK_IS_FREE(hhdr)) {
-             GC_ASSERT(PAGE_ALIGNED(hhdr -> hb_sz));
-             nhblks = divHBLKSZ(hhdr -> hb_sz);
-             is_ptrfree = TRUE;        /* dirty on alloc */
-           } else {
-             nhblks = OBJ_SZ_TO_BLOCKS(hhdr -> hb_sz);
-             is_ptrfree = IS_PTRFREE(hhdr);
-           }
-           if (is_ptrfree) {
-             if (current_start < current) {
-               PROTECT(current_start, (ptr_t)current - (ptr_t)current_start);
-             }
-             current_start = (current += nhblks);
-           } else {
-             current += nhblks;
-           }
-         } 
-         if (current_start < current) {
-           PROTECT(current_start, (ptr_t)current - (ptr_t)current_start);
-         }
-       }
+            word nhblks;
+            GC_bool is_ptrfree;
+
+            GC_ASSERT(PAGE_ALIGNED(current));
+            GET_HDR(current, hhdr);
+            if (IS_FORWARDING_ADDR_OR_NIL(hhdr)) {
+              /* This can happen only if we're at the beginning of a    */
+              /* heap segment, and a block spans heap segments.         */
+              /* We will handle that block as part of the preceding     */
+              /* segment.                                               */
+              GC_ASSERT(current_start == current);
+              current_start = ++current;
+              continue;
+            }
+            if (HBLK_IS_FREE(hhdr)) {
+              GC_ASSERT(PAGE_ALIGNED(hhdr -> hb_sz));
+              nhblks = divHBLKSZ(hhdr -> hb_sz);
+              is_ptrfree = TRUE;        /* dirty on alloc */
+            } else {
+              nhblks = OBJ_SZ_TO_BLOCKS(hhdr -> hb_sz);
+              is_ptrfree = IS_PTRFREE(hhdr);
+            }
+            if (is_ptrfree) {
+              if (current_start < current) {
+                PROTECT(current_start, (ptr_t)current - (ptr_t)current_start);
+              }
+              current_start = (current += nhblks);
+            } else {
+              current += nhblks;
+            }
+          }
+          if (current_start < current) {
+            PROTECT(current_start, (ptr_t)current - (ptr_t)current_start);
+          }
+        }
     }
 }
 
-/* We assume that either the world is stopped or its OK to lose dirty  */
-/* bits while this is happenning (as in GC_enable_incremental).                */
-void GC_read_dirty(void)
+/* We assume that either the world is stopped or its OK to lose dirty   */
+/* bits while this is happenning (as in GC_enable_incremental).         */
+GC_INNER void GC_read_dirty(void)
 {
 #   if defined(GWW_VDB)
       if (GC_GWW_AVAILABLE()) {
@@ -3032,10 +3234,10 @@ void GC_read_dirty(void)
     GC_protect_heap();
 }
 
-GC_bool GC_page_was_dirty(struct hblk *h)
+GC_INNER GC_bool GC_page_was_dirty(struct hblk *h)
 {
     register word index;
-    
+
 #   if defined(GWW_VDB)
       if (GC_GWW_AVAILABLE())
         return GC_gww_page_was_dirty(h);
@@ -3054,23 +3256,23 @@ GC_bool GC_page_was_dirty(struct hblk *h)
  */
 
 #if 0
-static GC_bool syscall_acquired_lock = FALSE;  /* Protected by GC lock. */
+static GC_bool syscall_acquired_lock = FALSE;   /* Protected by GC lock. */
+
 void GC_begin_syscall(void)
 {
-    /* FIXME: Resurrecting this code would require fixing the  */
-    /* test, which can spuriously return TRUE.                 */
+    /* FIXME: Resurrecting this code would require fixing the   */
+    /* test, which can spuriously return TRUE.                  */
     if (!I_HOLD_LOCK()) {
-       LOCK();
-       syscall_acquired_lock = TRUE;
+        LOCK();
+        syscall_acquired_lock = TRUE;
     }
 }
 
 void GC_end_syscall(void)
 {
     if (syscall_acquired_lock) {
-       syscall_acquired_lock = FALSE;
-       UNLOCK();
+        syscall_acquired_lock = FALSE;
+        UNLOCK();
     }
 }
 
@@ -3080,7 +3282,7 @@ void GC_unprotect_range(ptr_t addr, word len)
     struct hblk * end_block;
     register struct hblk *h;
     ptr_t obj_start;
-    
+
     if (!GC_dirty_maintained) return;
     obj_start = GC_base(addr);
     if (obj_start == 0) return;
@@ -3092,58 +3294,58 @@ void GC_unprotect_range(ptr_t addr, word len)
     end_block += GC_page_size/HBLKSIZE - 1;
     for (h = start_block; h <= end_block; h++) {
         register word index = PHT_HASH(h);
-        
+
         async_set_pht_entry_from_index(GC_dirty_pages, index);
     }
     UNPROTECT(start_block,
-             ((ptr_t)end_block - (ptr_t)start_block) + HBLKSIZE);
+              ((ptr_t)end_block - (ptr_t)start_block) + HBLKSIZE);
 }
 
 
-/* We no longer wrap read by default, since that was causing too many  */
-/* problems.  It is preferred that the client instead avoids writing   */
-/* to the write-protected heap with a system call.                     */
+/* We no longer wrap read by default, since that was causing too many   */
+/* problems.  It is preferred that the client instead avoids writing    */
+/* to the write-protected heap with a system call.                      */
 /* This still serves as sample code if you do want to wrap system calls.*/
 
 #if !defined(MSWIN32) && !defined(MSWINCE) && !defined(GC_USE_LD_WRAP)
-/* Replacement for UNIX system call.                                     */
-/* Other calls that write to the heap should be handled similarly.       */
-/* Note that this doesn't work well for blocking reads:  It will hold    */
+/* Replacement for UNIX system call.                                      */
+/* Other calls that write to the heap should be handled similarly.        */
+/* Note that this doesn't work well for blocking reads:  It will hold     */
 /* the allocation lock for the entire duration of the call. Multithreaded */
-/* clients should really ensure that it won't block, either by setting           */
-/* the descriptor nonblocking, or by calling select or poll first, to    */
-/* make sure that input is available.                                    */
-/* Another, preferred alternative is to ensure that system calls never           */
-/* write to the protected heap (see above).                              */
+/* clients should really ensure that it won't block, either by setting    */
+/* the descriptor nonblocking, or by calling select or poll first, to     */
+/* make sure that input is available.                                     */
+/* Another, preferred alternative is to ensure that system calls never    */
+/* write to the protected heap (see above).                               */
 # include <unistd.h>
 # include <sys/uio.h>
 ssize_t read(int fd, void *buf, size_t nbyte)
 {
     int result;
-    
+
     GC_begin_syscall();
     GC_unprotect_range(buf, (word)nbyte);
 #   if defined(IRIX5) || defined(GC_LINUX_THREADS)
-       /* Indirect system call may not always be easily available.     */
-       /* We could call _read, but that would interfere with the       */
-       /* libpthread interception of read.                             */
-       /* On Linux, we have to be careful with the linuxthreads        */
-       /* read interception.                                           */
-       {
-           struct iovec iov;
-
-           iov.iov_base = buf;
-           iov.iov_len = nbyte;
-           result = readv(fd, &iov, 1);
-       }
+        /* Indirect system call may not always be easily available.     */
+        /* We could call _read, but that would interfere with the       */
+        /* libpthread interception of read.                             */
+        /* On Linux, we have to be careful with the linuxthreads        */
+        /* read interception.                                           */
+        {
+            struct iovec iov;
+
+            iov.iov_base = buf;
+            iov.iov_len = nbyte;
+            result = readv(fd, &iov, 1);
+        }
 #   else
-#     if defined(HURD) 
-       result = __read(fd, buf, nbyte);
+#     if defined(HURD)
+        result = __read(fd, buf, nbyte);
 #     else
-       /* The two zero args at the end of this list are because one
-          IA-64 syscall() implementation actually requires six args
-          to be passed, even though they aren't always used. */
-       result = syscall(SYS_read, fd, buf, nbyte, 0, 0);
+        /* The two zero args at the end of this list are because one
+           IA-64 syscall() implementation actually requires six args
+           to be passed, even though they aren't always used. */
+        result = syscall(SYS_read, fd, buf, nbyte, 0, 0);
 #     endif /* !HURD */
 #   endif
     GC_end_syscall();
@@ -3152,31 +3354,29 @@ ssize_t read(int fd, void *buf, size_t nbyte)
 #endif /* !MSWIN32 && !MSWINCE && !GC_LINUX_THREADS */
 
 #if defined(GC_USE_LD_WRAP) && !defined(THREADS)
-    /* We use the GNU ld call wrapping facility.                       */
-    /* This requires that the linker be invoked with "--wrap read".    */
-    /* This can be done by passing -Wl,"--wrap read" to gcc.           */
-    /* I'm not sure that this actually wraps whatever version of read  */
-    /* is called by stdio.  That code also mentions __read.            */
+    /* We use the GNU ld call wrapping facility.                        */
+    /* This requires that the linker be invoked with "--wrap read".     */
+    /* This can be done by passing -Wl,"--wrap read" to gcc.            */
+    /* I'm not sure that this actually wraps whatever version of read   */
+    /* is called by stdio.  That code also mentions __read.             */
 #   include <unistd.h>
     ssize_t __wrap_read(int fd, void *buf, size_t nbyte)
     {
-       int result;
+        int result;
 
-       GC_begin_syscall();
-       GC_unprotect_range(buf, (word)nbyte);
-       result = __real_read(fd, buf, nbyte);
-       GC_end_syscall();
-       return(result);
+        GC_begin_syscall();
+        GC_unprotect_range(buf, (word)nbyte);
+        result = __real_read(fd, buf, nbyte);
+        GC_end_syscall();
+        return(result);
     }
 
-    /* We should probably also do this for __read, or whatever stdio   */
-    /* actually calls.                                                 */
+    /* We should probably also do this for __read, or whatever stdio    */
+    /* actually calls.                                                  */
 #endif
 
-#endif /* 0 */
-
 /*ARGSUSED*/
-GC_bool GC_page_was_ever_dirty(struct hblk *h)
+GC_INNER GC_bool GC_page_was_ever_dirty(struct hblk *h)
 {
 #   if defined(GWW_VDB)
       if (GC_GWW_AVAILABLE())
@@ -3185,6 +3385,8 @@ GC_bool GC_page_was_ever_dirty(struct hblk *h)
     return(TRUE);
 }
 
+#endif /* 0 */
+
 # endif /* MPROTECT_VDB */
 
 # ifdef PROC_VDB
@@ -3192,7 +3394,7 @@ GC_bool GC_page_was_ever_dirty(struct hblk *h)
 /*
  * See DEFAULT_VDB for interface descriptions.
  */
+
 /*
  * This implementation assumes a Solaris 2.X like /proc pseudo-file-system
  * from which we can read page modified bits.  This facility is far from
@@ -3210,49 +3412,48 @@ GC_bool GC_page_was_ever_dirty(struct hblk *h)
 
 #define INITIAL_BUF_SZ 16384
 STATIC word GC_proc_buf_size = INITIAL_BUF_SZ;
-STATIC char *GC_proc_buf;
+STATIC char *GC_proc_buf = NULL;
 
-STATIC int GC_proc_fd;
+STATIC int GC_proc_fd = 0;
 
-void GC_dirty_init(void)
+GC_INNER void GC_dirty_init(void)
 {
     int fd;
     char buf[30];
 
     GC_dirty_maintained = TRUE;
     if (GC_bytes_allocd != 0 || GC_bytes_allocd_before_gc != 0) {
-       register int i;
-    
+        register int i;
+
         for (i = 0; i < PHT_SIZE; i++) GC_written_pages[i] = (word)(-1);
-       if (GC_print_stats == VERBOSE)
-           GC_log_printf(
-                     "Allocated bytes:%lu:all pages may have been written\n",
-                     (unsigned long)
-                               (GC_bytes_allocd + GC_bytes_allocd_before_gc));
+        if (GC_print_stats == VERBOSE)
+            GC_log_printf(
+                      "Allocated bytes:%lu:all pages may have been written\n",
+                      (unsigned long)
+                                (GC_bytes_allocd + GC_bytes_allocd_before_gc));
     }
     sprintf(buf, "/proc/%ld", (long)getpid());
     fd = open(buf, O_RDONLY);
     if (fd < 0) {
-       ABORT("/proc open failed");
+        ABORT("/proc open failed");
     }
     GC_proc_fd = syscall(SYS_ioctl, fd, PIOCOPENPD, 0);
     close(fd);
     syscall(SYS_fcntl, GC_proc_fd, F_SETFD, FD_CLOEXEC);
     if (GC_proc_fd < 0) {
-       ABORT("/proc ioctl failed");
+        ABORT("/proc ioctl failed");
     }
     GC_proc_buf = GC_scratch_alloc(GC_proc_buf_size);
 }
 
-/* Ignore write hints. They don't help us here.        */
+/* Ignore write hints. They don't help us here. */
 /*ARGSUSED*/
-void GC_remove_protection(struct hblk *h, word nblocks, GC_bool is_ptrfree)
-{
-}
+GC_INNER void GC_remove_protection(struct hblk *h, word nblocks,
+                                   GC_bool is_ptrfree) {}
 
 # define READ(fd,buf,nbytes) read(fd, buf, nbytes)
 
-void GC_read_dirty(void)
+GC_INNER void GC_read_dirty(void)
 {
     unsigned long ps, np;
     int nmaps;
@@ -3263,76 +3464,74 @@ void GC_read_dirty(void)
     int i;
 
     BZERO(GC_grungy_pages, (sizeof GC_grungy_pages));
-    
+
     bufp = GC_proc_buf;
     if (READ(GC_proc_fd, bufp, GC_proc_buf_size) <= 0) {
-       if (GC_print_stats)
+        if (GC_print_stats)
             GC_log_printf("/proc read failed: GC_proc_buf_size = %lu\n",
-                         (unsigned long)GC_proc_buf_size);
+                          (unsigned long)GC_proc_buf_size);
         {
             /* Retry with larger buffer. */
             word new_size = 2 * GC_proc_buf_size;
             char * new_buf = GC_scratch_alloc(new_size);
-            
+
             if (new_buf != 0) {
                 GC_proc_buf = bufp = new_buf;
                 GC_proc_buf_size = new_size;
             }
             if (READ(GC_proc_fd, bufp, GC_proc_buf_size) <= 0) {
                 WARN("Insufficient space for /proc read\n", 0);
-                /* Punt:       */
-               memset(GC_grungy_pages, 0xff, sizeof (page_hash_table));
-               memset(GC_written_pages, 0xff, sizeof(page_hash_table));
-               return;
+                /* Punt:        */
+                memset(GC_grungy_pages, 0xff, sizeof (page_hash_table));
+                memset(GC_written_pages, 0xff, sizeof(page_hash_table));
+                return;
             }
         }
     }
     /* Copy dirty bits into GC_grungy_pages */
-       nmaps = ((struct prpageheader *)bufp) -> pr_nmap;
-       /* printf( "nmaps = %d, PG_REFERENCED = %d, PG_MODIFIED = %d\n",
-                    nmaps, PG_REFERENCED, PG_MODIFIED); */
-       bufp = bufp + sizeof(struct prpageheader);
-       for (i = 0; i < nmaps; i++) {
-           map = (struct prasmap *)bufp;
-           vaddr = (ptr_t)(map -> pr_vaddr);
-           ps = map -> pr_pagesize;
-           np = map -> pr_npage;
-           /* printf("vaddr = 0x%X, ps = 0x%X, np = 0x%X\n", vaddr, ps, np); */
-           limit = vaddr + ps * np;
-           bufp += sizeof (struct prasmap);
-           for (current_addr = vaddr;
-                current_addr < limit; current_addr += ps){
-               if ((*bufp++) & PG_MODIFIED) {
-                   register struct hblk * h = (struct hblk *) current_addr;
-                   
-                   while ((ptr_t)h < current_addr + ps) {
-                       register word index = PHT_HASH(h);
-                       
-                       set_pht_entry_from_index(GC_grungy_pages, index);
-                       h++;
-                   }
-               }
-           }
-           bufp += sizeof(long) - 1;
-           bufp = (char *)((unsigned long)bufp & ~(sizeof(long)-1));
-       }
+        nmaps = ((struct prpageheader *)bufp) -> pr_nmap;
+        /* printf( "nmaps = %d, PG_REFERENCED = %d, PG_MODIFIED = %d\n",
+                     nmaps, PG_REFERENCED, PG_MODIFIED); */
+        bufp = bufp + sizeof(struct prpageheader);
+        for (i = 0; i < nmaps; i++) {
+            map = (struct prasmap *)bufp;
+            vaddr = (ptr_t)(map -> pr_vaddr);
+            ps = map -> pr_pagesize;
+            np = map -> pr_npage;
+            /* printf("vaddr = 0x%X, ps = 0x%X, np = 0x%X\n", vaddr, ps, np); */
+            limit = vaddr + ps * np;
+            bufp += sizeof (struct prasmap);
+            for (current_addr = vaddr;
+                 current_addr < limit; current_addr += ps) {
+                if ((*bufp++) & PG_MODIFIED) {
+                    register struct hblk * h = (struct hblk *) current_addr;
+
+                    while ((ptr_t)h < current_addr + ps) {
+                        register word index = PHT_HASH(h);
+
+                        set_pht_entry_from_index(GC_grungy_pages, index);
+                        h++;
+                    }
+                }
+            }
+            bufp += sizeof(long) - 1;
+            bufp = (char *)((unsigned long)bufp & ~(sizeof(long)-1));
+        }
     /* Update GC_written_pages. */
         GC_or_pages(GC_written_pages, GC_grungy_pages);
 }
 
 #undef READ
 
-GC_bool GC_page_was_dirty(struct hblk *h)
+GC_INNER GC_bool GC_page_was_dirty(struct hblk *h)
 {
     register word index = PHT_HASH(h);
-    
     return get_pht_entry_from_index(GC_grungy_pages, index);
 }
 
-GC_bool GC_page_was_ever_dirty(struct hblk *h)
+GC_INNER GC_bool GC_page_was_ever_dirty(struct hblk *h)
 {
     register word index = PHT_HASH(h);
-    
     return get_pht_entry_from_index(GC_written_pages, index);
 }
 
@@ -3343,57 +3542,58 @@ GC_bool GC_page_was_ever_dirty(struct hblk *h)
 
 # include "vd/PCR_VD.h"
 
-# define NPAGES (32*1024)      /* 128 MB */
+# define NPAGES (32*1024)       /* 128 MB */
 
-PCR_VD_DB  GC_grungy_bits[NPAGES];
+PCR_VD_DB GC_grungy_bits[NPAGES];
 
-ptr_t GC_vd_base;      /* Address corresponding to GC_grungy_bits[0]   */
-                       /* HBLKSIZE aligned.                            */
+STATIC ptr_t GC_vd_base = NULL;
+                        /* Address corresponding to GC_grungy_bits[0]   */
+                        /* HBLKSIZE aligned.                            */
 
-void GC_dirty_init(void)
+GC_INNER void GC_dirty_init(void)
 {
     GC_dirty_maintained = TRUE;
     /* For the time being, we assume the heap generally grows up */
     GC_vd_base = GC_heap_sects[0].hs_start;
     if (GC_vd_base == 0) {
-       ABORT("Bad initial heap segment");
+        ABORT("Bad initial heap segment");
     }
     if (PCR_VD_Start(HBLKSIZE, GC_vd_base, NPAGES*HBLKSIZE)
-       != PCR_ERes_okay) {
-       ABORT("dirty bit initialization failed");
+        != PCR_ERes_okay) {
+        ABORT("dirty bit initialization failed");
     }
 }
 
-void GC_read_dirty(void)
+GC_INNER void GC_read_dirty(void)
 {
     /* lazily enable dirty bits on newly added heap sects */
     {
         static int onhs = 0;
         int nhs = GC_n_heap_sects;
-        for( ; onhs < nhs; onhs++ ) {
+        for(; onhs < nhs; onhs++) {
             PCR_VD_WriteProtectEnable(
                     GC_heap_sects[onhs].hs_start,
                     GC_heap_sects[onhs].hs_bytes );
         }
     }
 
-
     if (PCR_VD_Clear(GC_vd_base, NPAGES*HBLKSIZE, GC_grungy_bits)
         != PCR_ERes_okay) {
-       ABORT("dirty bit read failed");
+        ABORT("dirty bit read failed");
     }
 }
 
-GC_bool GC_page_was_dirty(struct hblk *h)
+GC_INNER GC_bool GC_page_was_dirty(struct hblk *h)
 {
     if((ptr_t)h < GC_vd_base || (ptr_t)h >= GC_vd_base + NPAGES*HBLKSIZE) {
-       return(TRUE);
+        return(TRUE);
     }
     return(GC_grungy_bits[h - (struct hblk *)GC_vd_base] & PCR_VD_DB_dirtyBit);
 }
 
 /*ARGSUSED*/
-void GC_remove_protection(struct hblk *h, word nblocks, GC_bool is_ptrfree)
+GC_INNER void GC_remove_protection(struct hblk *h, word nblocks,
+                                   GC_bool is_ptrfree)
 {
     PCR_VD_WriteProtectDisable(h, nblocks*HBLKSIZE);
     PCR_VD_WriteProtectEnable(h, nblocks*HBLKSIZE);
@@ -3423,30 +3623,27 @@ void GC_remove_protection(struct hblk *h, word nblocks, GC_bool is_ptrfree)
 #include <mach/task.h>
 #include <pthread.h>
 
-extern void GC_darwin_register_mach_handler_thread(mach_port_t);
-
 /* These are not defined in any header, although they are documented */
 extern boolean_t
 exc_server(mach_msg_header_t *, mach_msg_header_t *);
 
 extern kern_return_t
 exception_raise(mach_port_t, mach_port_t, mach_port_t, exception_type_t,
-               exception_data_t, mach_msg_type_number_t);
+                exception_data_t, mach_msg_type_number_t);
 
 extern kern_return_t
 exception_raise_state(mach_port_t, mach_port_t, mach_port_t, exception_type_t,
-                     exception_data_t, mach_msg_type_number_t,
-                     thread_state_flavor_t*, thread_state_t,
-                     mach_msg_type_number_t, thread_state_t,
-                     mach_msg_type_number_t*);
+                      exception_data_t, mach_msg_type_number_t,
+                      thread_state_flavor_t*, thread_state_t,
+                      mach_msg_type_number_t, thread_state_t,
+                      mach_msg_type_number_t*);
 
 extern kern_return_t
 exception_raise_state_identity(mach_port_t, mach_port_t, mach_port_t,
-                              exception_type_t, exception_data_t,
-                              mach_msg_type_number_t, thread_state_flavor_t*,
-                              thread_state_t, mach_msg_type_number_t,
-                              thread_state_t, mach_msg_type_number_t*);
-
+                               exception_type_t, exception_data_t,
+                               mach_msg_type_number_t, thread_state_flavor_t*,
+                               thread_state_t, mach_msg_type_number_t,
+                               thread_state_t, mach_msg_type_number_t*);
 
 #define MAX_EXCEPTION_PORTS 16
 
@@ -3458,12 +3655,12 @@ static struct {
     thread_state_flavor_t flavors[MAX_EXCEPTION_PORTS];
 } GC_old_exc_ports;
 
-static struct {
+STATIC struct {
     mach_port_t exception;
-#if defined(THREADS)
-    mach_port_t reply;
-#endif
-} GC_ports;
+#   if defined(THREADS)
+      mach_port_t reply;
+#   endif
+} GC_ports = {0};
 
 typedef struct {
     mach_msg_header_t head;
@@ -3474,7 +3671,7 @@ typedef enum {
 } GC_mprotect_state_t;
 
 /* FIXME: 1 and 2 seem to be safe to use in the msgh_id field,
-   but it isn't  documented. Use the source and see if they
+   but it isn't documented. Use the source and see if they
    should be ok. */
 #define ID_STOP 1
 #define ID_RESUME 2
@@ -3484,10 +3681,10 @@ typedef enum {
 
 #if defined(THREADS)
 
-GC_mprotect_state_t GC_mprotect_state;
+STATIC GC_mprotect_state_t GC_mprotect_state = 0;
 
 /* The following should ONLY be called when the world is stopped  */
-static void GC_mprotect_thread_notify(mach_msg_id_t id)
+STATIC void GC_mprotect_thread_notify(mach_msg_id_t id)
 {
 
   struct {
@@ -3504,8 +3701,8 @@ static void GC_mprotect_thread_notify(mach_msg_id_t id)
   buf.msg.head.msgh_id = id;
 
   r = mach_msg(&buf.msg.head, MACH_SEND_MSG | MACH_RCV_MSG | MACH_RCV_LARGE,
-              sizeof(buf.msg), sizeof(buf), GC_ports.reply,
-              MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+               sizeof(buf.msg), sizeof(buf), GC_ports.reply,
+               MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
   if(r != MACH_MSG_SUCCESS)
     ABORT("mach_msg failed in GC_mprotect_thread_notify");
   if(buf.msg.head.msgh_id != ID_ACK)
@@ -3513,9 +3710,8 @@ static void GC_mprotect_thread_notify(mach_msg_id_t id)
 }
 
 /* Should only be called by the mprotect thread */
-static void GC_mprotect_thread_reply(void)
+STATIC void GC_mprotect_thread_reply(void)
 {
-
   GC_msg_t msg;
   mach_msg_return_t r;
   /* remote, local */
@@ -3526,16 +3722,17 @@ static void GC_mprotect_thread_reply(void)
   msg.head.msgh_id = ID_ACK;
 
   r = mach_msg(&msg.head, MACH_SEND_MSG, sizeof(msg), 0, MACH_PORT_NULL,
-              MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+               MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
   if(r != MACH_MSG_SUCCESS)
     ABORT("mach_msg failed in GC_mprotect_thread_reply");
 }
 
-void GC_mprotect_stop(void)
+GC_INNER void GC_mprotect_stop(void)
 {
   GC_mprotect_thread_notify(ID_STOP);
 }
-void GC_mprotect_resume(void)
+
+GC_INNER void GC_mprotect_resume(void)
 {
   GC_mprotect_thread_notify(ID_RESUME);
 }
@@ -3545,7 +3742,9 @@ void GC_mprotect_resume(void)
 #define GC_mprotect_state GC_MP_NORMAL
 #endif
 
-static void *GC_mprotect_thread(void *arg)
+GC_INNER void GC_darwin_register_mach_handler_thread(mach_port_t thread);
+
+STATIC void *GC_mprotect_thread(void *arg)
 {
   mach_msg_return_t r;
   /* These two structures contain some private kernel data. We don't need to
@@ -3567,63 +3766,63 @@ static void *GC_mprotect_thread(void *arg)
 
   for(;;) {
     r = mach_msg(&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE |
-                (GC_mprotect_state == GC_MP_DISCARDING ? MACH_RCV_TIMEOUT : 0),
-                0, sizeof(msg), GC_ports.exception,
-                GC_mprotect_state == GC_MP_DISCARDING ? 0
-                : MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+                 (GC_mprotect_state == GC_MP_DISCARDING ? MACH_RCV_TIMEOUT : 0),
+                 0, sizeof(msg), GC_ports.exception,
+                 GC_mprotect_state == GC_MP_DISCARDING ? 0
+                 : MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
 
     id = r == MACH_MSG_SUCCESS ? msg.head.msgh_id : -1;
 
 #   if defined(THREADS)
       if(GC_mprotect_state == GC_MP_DISCARDING) {
-       if(r == MACH_RCV_TIMED_OUT) {
-         GC_mprotect_state = GC_MP_STOPPED;
-         GC_mprotect_thread_reply();
-         continue;
-       }
-       if(r == MACH_MSG_SUCCESS && (id == ID_STOP || id == ID_RESUME))
-         ABORT("out of order mprotect thread request");
+        if(r == MACH_RCV_TIMED_OUT) {
+          GC_mprotect_state = GC_MP_STOPPED;
+          GC_mprotect_thread_reply();
+          continue;
+        }
+        if(r == MACH_MSG_SUCCESS && (id == ID_STOP || id == ID_RESUME))
+          ABORT("out of order mprotect thread request");
       }
 #   endif /* THREADS */
 
     if(r != MACH_MSG_SUCCESS) {
       GC_err_printf("mach_msg failed with %d %s\n", (int)r,
-                   mach_error_string(r));
+                    mach_error_string(r));
       ABORT("mach_msg failed");
     }
 
     switch(id) {
 #     if defined(THREADS)
         case ID_STOP:
-         if(GC_mprotect_state != GC_MP_NORMAL)
-           ABORT("Called mprotect_stop when state wasn't normal");
-         GC_mprotect_state = GC_MP_DISCARDING;
-         break;
+          if(GC_mprotect_state != GC_MP_NORMAL)
+            ABORT("Called mprotect_stop when state wasn't normal");
+          GC_mprotect_state = GC_MP_DISCARDING;
+          break;
         case ID_RESUME:
-         if(GC_mprotect_state != GC_MP_STOPPED)
-           ABORT("Called mprotect_resume when state wasn't stopped");
-         GC_mprotect_state = GC_MP_NORMAL;
-         GC_mprotect_thread_reply();
-         break;
+          if(GC_mprotect_state != GC_MP_STOPPED)
+            ABORT("Called mprotect_resume when state wasn't stopped");
+          GC_mprotect_state = GC_MP_NORMAL;
+          GC_mprotect_thread_reply();
+          break;
 #     endif /* THREADS */
         default:
-         /* Handle the message (calls catch_exception_raise) */
-         if(!exc_server(&msg.head, &reply.head))
-           ABORT("exc_server failed");
-         /* Send the reply */
-         r = mach_msg(&reply.head, MACH_SEND_MSG, reply.head.msgh_size, 0,
-                      MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE,
-                      MACH_PORT_NULL);
-         if(r != MACH_MSG_SUCCESS) {
-           /* This will fail if the thread dies, but the thread */
-           /* shouldn't die... */
+          /* Handle the message (calls catch_exception_raise) */
+          if(!exc_server(&msg.head, &reply.head))
+            ABORT("exc_server failed");
+          /* Send the reply */
+          r = mach_msg(&reply.head, MACH_SEND_MSG, reply.head.msgh_size, 0,
+                       MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE,
+                       MACH_PORT_NULL);
+          if(r != MACH_MSG_SUCCESS) {
+            /* This will fail if the thread dies, but the thread */
+            /* shouldn't die... */
 #           ifdef BROKEN_EXCEPTION_HANDLING
-             GC_err_printf("mach_msg failed with %d %s while sending "
-                           "exc reply\n", (int)r,mach_error_string(r));
+              GC_err_printf("mach_msg failed with %d %s while sending "
+                            "exc reply\n", (int)r,mach_error_string(r));
 #           else
-             ABORT("mach_msg failed while sending exception reply");
+              ABORT("mach_msg failed while sending exception reply");
 #           endif
-         }
+          }
     } /* switch */
   } /* for(;;) */
     /* NOT REACHED */
@@ -3638,9 +3837,9 @@ static void *GC_mprotect_thread(void *arg)
 
 /* Updates to this aren't atomic, but the SIGBUSs seem pretty rare.
    Even if this doesn't get updated property, it isn't really a problem */
-static int GC_sigbus_count;
+STATIC int GC_sigbus_count = 0;
 
-static void GC_darwin_sigbus(int num, siginfo_t *sip, void *context)
+STATIC void GC_darwin_sigbus(int num, siginfo_t *sip, void *context)
 {
   if(num != SIGBUS)
     ABORT("Got a non-sigbus signal in the sigbus handler");
@@ -3657,7 +3856,7 @@ static void GC_darwin_sigbus(int num, siginfo_t *sip, void *context)
 }
 #endif /* BROKEN_EXCEPTION_HANDLING */
 
-void GC_dirty_init(void)
+GC_INNER void GC_dirty_init(void)
 {
   kern_return_t r;
   mach_port_t me;
@@ -3667,10 +3866,10 @@ void GC_dirty_init(void)
 
   if (GC_print_stats == VERBOSE)
     GC_log_printf("Initializing mach/darwin mprotect virtual dirty bit "
-                 "implementation\n");
+                  "implementation\n");
 # ifdef BROKEN_EXCEPTION_HANDLING
     WARN("Enabling workarounds for various darwin "
-        "exception handling bugs.\n", 0);
+         "exception handling bugs.\n", 0);
 # endif
   GC_dirty_maintained = TRUE;
   if (GC_page_size % HBLKSIZE != 0) {
@@ -3685,7 +3884,7 @@ void GC_dirty_init(void)
     ABORT("mach_port_allocate failed (exception port)");
 
   r = mach_port_insert_right(me, GC_ports.exception, GC_ports.exception,
-                            MACH_MSG_TYPE_MAKE_SEND);
+                             MACH_MSG_TYPE_MAKE_SEND);
   if(r != KERN_SUCCESS)
     ABORT("mach_port_insert_right failed (exception port)");
 
@@ -3699,14 +3898,14 @@ void GC_dirty_init(void)
   mask = EXC_MASK_BAD_ACCESS;
 
   r = task_get_exception_ports(me, mask, GC_old_exc_ports.masks,
-                              &GC_old_exc_ports.count, GC_old_exc_ports.ports,
-                              GC_old_exc_ports.behaviors,
-                              GC_old_exc_ports.flavors);
+                               &GC_old_exc_ports.count, GC_old_exc_ports.ports,
+                               GC_old_exc_ports.behaviors,
+                               GC_old_exc_ports.flavors);
   if(r != KERN_SUCCESS)
     ABORT("task_get_exception_ports failed");
 
   r = task_set_exception_ports(me, mask, GC_ports.exception, EXCEPTION_DEFAULT,
-                              GC_MACH_THREAD_STATE);
+                               GC_MACH_THREAD_STATE);
   if(r != KERN_SUCCESS)
     ABORT("task_set_exception_ports failed");
   if(pthread_attr_init(&attr) != 0)
@@ -3728,10 +3927,10 @@ void GC_dirty_init(void)
       sigemptyset(&sa.sa_mask);
       sa.sa_flags = SA_RESTART|SA_SIGINFO;
       if(sigaction(SIGBUS, &sa, &oldsa) < 0)
-       ABORT("sigaction");
+        ABORT("sigaction");
       if ((SIG_HNDLR_PTR)oldsa.sa_handler != SIG_DFL) {
-       if (GC_print_stats == VERBOSE)
-         GC_err_printf("Replaced other SIGBUS handler\n");
+        if (GC_print_stats == VERBOSE)
+          GC_err_printf("Replaced other SIGBUS handler\n");
       }
     }
 #  endif /* BROKEN_EXCEPTION_HANDLING  */
@@ -3740,10 +3939,10 @@ void GC_dirty_init(void)
 /* The source code for Apple's GDB was used as a reference for the exception
    forwarding code. This code is similar to be GDB code only because there is
    only one way to do it. */
-static kern_return_t GC_forward_exception(mach_port_t thread, mach_port_t task,
-                                         exception_type_t exception,
-                                         exception_data_t data,
-                                         mach_msg_type_number_t data_count)
+STATIC kern_return_t GC_forward_exception(mach_port_t thread, mach_port_t task,
+                                          exception_type_t exception,
+                                          exception_data_t data,
+                                          mach_msg_type_number_t data_count)
 {
   unsigned int i;
   kern_return_t r;
@@ -3751,7 +3950,7 @@ static kern_return_t GC_forward_exception(mach_port_t thread, mach_port_t task,
   exception_behavior_t behavior;
   thread_state_flavor_t flavor;
 
-  thread_state_t thread_state = NULL;
+  thread_state_data_t thread_state;
   mach_msg_type_number_t thread_state_count = THREAD_STATE_MAX;
 
   for(i=0; i < GC_old_exc_ports.count; i++)
@@ -3764,34 +3963,30 @@ static kern_return_t GC_forward_exception(mach_port_t thread, mach_port_t task,
   behavior = GC_old_exc_ports.behaviors[i];
   flavor = GC_old_exc_ports.flavors[i];
 
-  if(behavior != EXCEPTION_DEFAULT) {
+  if(behavior == EXCEPTION_STATE || behavior == EXCEPTION_STATE_IDENTITY) {
     r = thread_get_state(thread, flavor, thread_state, &thread_state_count);
     if(r != KERN_SUCCESS)
       ABORT("thread_get_state failed in forward_exception");
     }
 
   switch(behavior) {
-    case EXCEPTION_DEFAULT:
-      r = exception_raise(port, thread, task, exception, data, data_count);
-      break;
     case EXCEPTION_STATE:
       r = exception_raise_state(port, thread, task, exception, data, data_count,
-                               &flavor, thread_state, thread_state_count,
-                               thread_state, &thread_state_count);
+                                &flavor, thread_state, thread_state_count,
+                                thread_state, &thread_state_count);
       break;
     case EXCEPTION_STATE_IDENTITY:
       r = exception_raise_state_identity(port, thread, task, exception, data,
-                                        data_count, &flavor, thread_state,
-                                        thread_state_count, thread_state,
-                                        &thread_state_count);
-      break;
-    default:
-      r = KERN_FAILURE; /* make gcc happy */
-      ABORT("forward_exception: unknown behavior");
+                                         data_count, &flavor, thread_state,
+                                         thread_state_count, thread_state,
+                                         &thread_state_count);
       break;
+    /* case EXCEPTION_DEFAULT: */ /* default signal handlers */
+    default: /* user-supplied signal handlers */
+      r = exception_raise(port, thread, task, exception, data, data_count);
   }
 
-  if(behavior != EXCEPTION_DEFAULT) {
+  if(behavior == EXCEPTION_STATE || behavior == EXCEPTION_STATE_IDENTITY) {
     r = thread_set_state(thread, flavor, thread_state, thread_state_count);
     if(r != KERN_SUCCESS)
       ABORT("thread_set_state failed in forward_exception");
@@ -3803,11 +3998,11 @@ static kern_return_t GC_forward_exception(mach_port_t thread, mach_port_t task,
 #define FWD() GC_forward_exception(thread, task, exception, code, code_count)
 
 /* This violates the namespace rules but there isn't anything that can be done
-   about it. The exception handling stuff is hard coded to call this */
+   about it.  The exception handling stuff is hard coded to call this. */
 kern_return_t
 catch_exception_raise(mach_port_t exception_port, mach_port_t thread,
-                     mach_port_t task, exception_type_t exception,
-                     exception_data_t code, mach_msg_type_number_t code_count)
+                      mach_port_t task, exception_type_t exception,
+                      exception_data_t code, mach_msg_type_number_t code_count)
 {
   kern_return_t r;
   char *addr;
@@ -3842,13 +4037,13 @@ catch_exception_raise(mach_port_t exception_port, mach_port_t thread,
 #   ifdef DEBUG_EXCEPTION_HANDLING
       /* We aren't interested, pass it on to the old handler */
       GC_printf("Exception: 0x%x Code: 0x%x 0x%x in catch....\n", exception,
-               code_count > 0 ? code[0] : -1, code_count > 1 ? code[1] : -1);
+                code_count > 0 ? code[0] : -1, code_count > 1 ? code[1] : -1);
 #   endif
     return FWD();
   }
 
   r = thread_get_state(thread, flavor, (natural_t*)&exc_state,
-                      &exc_state_count);
+                       &exc_state_count);
   if(r != KERN_SUCCESS) {
     /* The thread is supposed to be suspended while the exception handler
        is called. This shouldn't fail. */
@@ -3871,34 +4066,34 @@ catch_exception_raise(mach_port_t exception_port, mach_port_t thread,
 
     if((HDR(addr)) == 0) {
       /* Ugh... just like the SIGBUS problem above, it seems we get a bogus
-        KERN_PROTECTION_FAILURE every once and a while. We wait till we get
-        a bunch in a row before doing anything about it. If a "real" fault
-        ever occurs it'll just keep faulting over and over and we'll hit
-        the limit pretty quickly. */
+         KERN_PROTECTION_FAILURE every once and a while. We wait till we get
+         a bunch in a row before doing anything about it. If a "real" fault
+         ever occurs it'll just keep faulting over and over and we'll hit
+         the limit pretty quickly. */
 #     ifdef BROKEN_EXCEPTION_HANDLING
         static char *last_fault;
-       static int last_fault_count;
-
-       if(addr != last_fault) {
-         last_fault = addr;
-         last_fault_count = 0;
-       }
-       if(++last_fault_count < 32) {
-         if(last_fault_count == 1)
-           WARN("Ignoring KERN_PROTECTION_FAILURE at %p\n", addr);
-         return KERN_SUCCESS;
-       }
-
-       GC_err_printf("Unexpected KERN_PROTECTION_FAILURE at %p\n",addr);
-       /* Can't pass it along to the signal handler because that is
-          ignoring SIGBUS signals. We also shouldn't call ABORT here as
-          signals don't always work too well from the exception handler. */
-       GC_err_printf("Aborting\n");
-       exit(EXIT_FAILURE);
+        static int last_fault_count;
+
+        if(addr != last_fault) {
+          last_fault = addr;
+          last_fault_count = 0;
+        }
+        if(++last_fault_count < 32) {
+          if(last_fault_count == 1)
+            WARN("Ignoring KERN_PROTECTION_FAILURE at %p\n", addr);
+          return KERN_SUCCESS;
+        }
+
+        GC_err_printf("Unexpected KERN_PROTECTION_FAILURE at %p\n",addr);
+        /* Can't pass it along to the signal handler because that is
+           ignoring SIGBUS signals. We also shouldn't call ABORT here as
+           signals don't always work too well from the exception handler. */
+        GC_err_printf("Aborting\n");
+        exit(EXIT_FAILURE);
 #     else /* BROKEN_EXCEPTION_HANDLING */
-       /* Pass it along to the next exception handler
-          (which should call SIGBUS/SIGSEGV) */
-       return FWD();
+        /* Pass it along to the next exception handler
+           (which should call SIGBUS/SIGSEGV) */
+        return FWD();
 #     endif /* !BROKEN_EXCEPTION_HANDLING */
     }
 
@@ -3911,13 +4106,13 @@ catch_exception_raise(mach_port_t exception_port, mach_port_t thread,
       h = (struct hblk*)((word)addr & ~(GC_page_size-1));
       UNPROTECT(h, GC_page_size);
       for (i = 0; i < divHBLKSZ(GC_page_size); i++) {
-       register int index = PHT_HASH(h+i);
-       async_set_pht_entry_from_index(GC_dirty_pages, index);
+        register int index = PHT_HASH(h+i);
+        async_set_pht_entry_from_index(GC_dirty_pages, index);
       }
     } else if(GC_mprotect_state == GC_MP_DISCARDING) {
       /* Lie to the thread for now. No sense UNPROTECT()ing the memory
-        when we're just going to PROTECT() it again later. The thread
-        will just fault again once it resumes */
+         when we're just going to PROTECT() it again later. The thread
+         will just fault again once it resumes */
     } else {
       /* Shouldn't happen, i don't think */
       GC_printf("KERN_PROTECTION_FAILURE while world is stopped\n");
@@ -3930,10 +4125,10 @@ catch_exception_raise(mach_port_t exception_port, mach_port_t thread,
 /* These should never be called, but just in case...  */
 kern_return_t
 catch_exception_raise_state(mach_port_name_t exception_port, int exception,
-                           exception_data_t code,
-                           mach_msg_type_number_t codeCnt, int flavor,
-                           thread_state_t old_state, int old_stateCnt,
-                           thread_state_t new_state, int new_stateCnt)
+                            exception_data_t code,
+                            mach_msg_type_number_t codeCnt, int flavor,
+                            thread_state_t old_state, int old_stateCnt,
+                            thread_state_t new_state, int new_stateCnt)
 {
   ABORT("catch_exception_raise_state");
   return(KERN_INVALID_ARGUMENT);
@@ -3941,17 +4136,16 @@ catch_exception_raise_state(mach_port_name_t exception_port, int exception,
 
 kern_return_t
 catch_exception_raise_state_identity(mach_port_name_t exception_port,
-                                    mach_port_t thread, mach_port_t task,
-                                    int exception, exception_data_t code,
-                                    mach_msg_type_number_t codeCnt, int flavor,
-                                    thread_state_t old_state, int old_stateCnt,
-                                    thread_state_t new_state, int new_stateCnt)
+                                     mach_port_t thread, mach_port_t task,
+                                     int exception, exception_data_t code,
+                                     mach_msg_type_number_t codeCnt, int flavor,
+                                     thread_state_t old_state, int old_stateCnt,
+                                     thread_state_t new_state, int new_stateCnt)
 {
   ABORT("catch_exception_raise_state_identity");
   return(KERN_INVALID_ARGUMENT);
 }
 
-
 #endif /* DARWIN && MPROTECT_VDB */
 
 # ifndef HAVE_INCREMENTAL_PROTECTION_NEEDS
@@ -3961,21 +4155,26 @@ catch_exception_raise_state_identity(mach_port_name_t exception_port,
   }
 # endif /* !HAVE_INCREMENTAL_PROTECTION_NEEDS */
 
+#ifdef ECOS
+  /* Undo sbrk() redirection. */
+# undef sbrk
+#endif
+
 /*
  * Call stack save code for debugging.
  * Should probably be in mach_dep.c, but that requires reorganization.
  */
 
-/* I suspect the following works for most X86 *nix variants, so        */
-/* long as the frame pointer is explicitly stored.  In the case of gcc,        */
-/* compiler flags (e.g. -fomit-frame-pointer) determine whether it is. */
+/* I suspect the following works for most X86 *nix variants, so         */
+/* long as the frame pointer is explicitly stored.  In the case of gcc, */
+/* compiler flags (e.g. -fomit-frame-pointer) determine whether it is.  */
 #if defined(I386) && defined(LINUX) && defined(SAVE_CALL_CHAIN)
 #   include <features.h>
 
     struct frame {
-       struct frame *fr_savfp;
-       long    fr_savpc;
-        long   fr_arg[NARGS];  /* All the arguments go here.   */
+        struct frame *fr_savfp;
+        long    fr_savpc;
+        long    fr_arg[NARGS];  /* All the arguments go here.   */
     };
 #endif
 
@@ -3984,15 +4183,15 @@ catch_exception_raise_state_identity(mach_port_name_t exception_port,
 #    include <features.h>
 
      struct frame {
-       long    fr_local[8];
-       long    fr_arg[6];
-       struct frame *fr_savfp;
-       long    fr_savpc;
+        long    fr_local[8];
+        long    fr_arg[6];
+        struct frame *fr_savfp;
+        long    fr_savpc;
 #       ifndef __arch64__
-         char  *fr_stret;
+          char  *fr_stret;
 #       endif
-       long    fr_argd[6];
-       long    fr_argx[0];
+        long    fr_argd[6];
+        long    fr_argx[0];
      };
 #  elif defined (DRSNX)
 #    include <sys/sparc/frame.h>
@@ -4009,8 +4208,8 @@ catch_exception_raise_state_identity(mach_port_name_t exception_port,
 #endif /* SPARC */
 
 #ifdef  NEED_CALLINFO
-/* Fill in the pc and argument information for up to NFRAMES of my     */
-/* callers.  Ignore my frame and my callers frame.                     */
+/* Fill in the pc and argument information for up to NFRAMES of my      */
+/* callers.  Ignore my frame and my callers frame.                      */
 
 #ifdef LINUX
 #   include <unistd.h>
@@ -4032,23 +4231,23 @@ catch_exception_raise_state_identity(mach_port_name_t exception_port,
     && defined(GC_HAVE_BUILTIN_BACKTRACE)
 
 #ifdef REDIRECT_MALLOC
-  /* Deal with possible malloc calls in backtrace by omitting  */
-  /* the infinitely recursing backtrace.                       */
+  /* Deal with possible malloc calls in backtrace by omitting   */
+  /* the infinitely recursing backtrace.                        */
 # ifdef THREADS
-    __thread   /* If your compiler doesn't understand this */
-               /* you could use something like pthread_getspecific.    */
+    __thread    /* If your compiler doesn't understand this */
+                /* you could use something like pthread_getspecific.    */
 # endif
   GC_in_save_callers = FALSE;
 #endif
 
-void GC_save_callers (struct callinfo info[NFRAMES]) 
+GC_INNER void GC_save_callers(struct callinfo info[NFRAMES])
 {
   void * tmp_info[NFRAMES + 1];
   int npcs, i;
 # define IGNORE_FRAMES 1
-  
-  /* We retrieve NFRAMES+1 pc values, but discard the first, since it  */
-  /* points to our own frame.                                          */
+
+  /* We retrieve NFRAMES+1 pc values, but discard the first, since it   */
+  /* points to our own frame.                                           */
 # ifdef REDIRECT_MALLOC
     if (GC_in_save_callers) {
       info[0].ci_pc = (word)(&GC_save_callers);
@@ -4082,7 +4281,7 @@ void GC_save_callers (struct callinfo info[NFRAMES])
 #   define BIAS 0
 #endif
 
-void GC_save_callers (struct callinfo info[NFRAMES]) 
+GC_INNER void GC_save_callers(struct callinfo info[NFRAMES])
 {
   struct frame *frame;
   struct frame *fp;
@@ -4092,19 +4291,19 @@ void GC_save_callers (struct callinfo info[NFRAMES])
     asm("movl %%ebp,%0" : "=r"(frame));
     fp = frame;
 # else
-    frame = (struct frame *) GC_save_regs_in_stack ();
+    frame = (struct frame *)GC_save_regs_in_stack();
     fp = (struct frame *)((long) frame -> FR_SAVFP + BIAS);
 #endif
-  
+
    for (; (!(fp HOTTER_THAN frame) && !(GC_stackbottom HOTTER_THAN (ptr_t)fp)
-          && (nframes < NFRAMES));
+           && (nframes < NFRAMES));
        fp = (struct frame *)((long) fp -> FR_SAVFP + BIAS), nframes++) {
       register int i;
-      
+
       info[nframes].ci_pc = fp->FR_SAVPC;
 #     if NARGS > 0
         for (i = 0; i < NARGS; i++) {
-         info[nframes].ci_arg[i] = ~(fp->fr_arg[i]);
+          info[nframes].ci_arg[i] = ~(fp->fr_arg[i]);
         }
 #     endif /* NARGS > 0 */
   }
@@ -4118,147 +4317,147 @@ void GC_save_callers (struct callinfo info[NFRAMES])
 #ifdef NEED_CALLINFO
 
 /* Print info to stderr.  We do NOT hold the allocation lock */
-void GC_print_callers (struct callinfo info[NFRAMES])
+GC_INNER void GC_print_callers(struct callinfo info[NFRAMES])
 {
-    register int i;
+    int i;
     static int reentry_count = 0;
     GC_bool stop = FALSE;
 
-    /* FIXME: This should probably use a different lock, so that we    */
-    /* become callable with or without the allocation lock.            */
+    /* FIXME: This should probably use a different lock, so that we     */
+    /* become callable with or without the allocation lock.             */
     LOCK();
       ++reentry_count;
     UNLOCK();
-    
+
 #   if NFRAMES == 1
       GC_err_printf("\tCaller at allocation:\n");
 #   else
       GC_err_printf("\tCall chain at allocation:\n");
 #   endif
-    for (i = 0; i < NFRAMES && !stop ; i++) {
-       if (info[i].ci_pc == 0) break;
-#      if NARGS > 0
-       {
-         int j;
-
-         GC_err_printf("\t\targs: ");
-         for (j = 0; j < NARGS; j++) {
-           if (j != 0) GC_err_printf(", ");
-           GC_err_printf("%d (0x%X)", ~(info[i].ci_arg[j]),
-                                       ~(info[i].ci_arg[j]));
-         }
-         GC_err_printf("\n");
-       }
-#      endif
+    for (i = 0; i < NFRAMES && !stop; i++) {
+        if (info[i].ci_pc == 0) break;
+#       if NARGS > 0
+        {
+          int j;
+
+          GC_err_printf("\t\targs: ");
+          for (j = 0; j < NARGS; j++) {
+            if (j != 0) GC_err_printf(", ");
+            GC_err_printf("%d (0x%X)", ~(info[i].ci_arg[j]),
+                                        ~(info[i].ci_arg[j]));
+          }
+          GC_err_printf("\n");
+        }
+#       endif
         if (reentry_count > 1) {
-           /* We were called during an allocation during       */
-           /* a previous GC_print_callers call; punt.          */
-           GC_err_printf("\t\t##PC##= 0x%lx\n", info[i].ci_pc);
-           continue;
-       }
-       {
-#        ifdef LINUX
-           FILE *pipe;
-#        endif
-#        if defined(GC_HAVE_BUILTIN_BACKTRACE) \
-            && !defined(GC_BACKTRACE_SYMBOLS_BROKEN)
-           char **sym_name =
-             backtrace_symbols((void **)(&(info[i].ci_pc)), 1);
-           char *name = sym_name[0];
-#        else
-           char buf[40];
-           char *name = buf;
-           sprintf(buf, "##PC##= 0x%lx", info[i].ci_pc);
-#        endif
-#        if defined(LINUX) && !defined(SMALL_CONFIG)
-           /* Try for a line number. */
-           {
-#              define EXE_SZ 100
-               static char exe_name[EXE_SZ];
-#              define CMD_SZ 200
-               char cmd_buf[CMD_SZ];
-#              define RESULT_SZ 200
-               static char result_buf[RESULT_SZ];
-               size_t result_len;
-               char *old_preload;
-#              define PRELOAD_SZ 200
-               char preload_buf[PRELOAD_SZ];
-               static GC_bool found_exe_name = FALSE;
-               static GC_bool will_fail = FALSE;
-               int ret_code;
-               /* Try to get it via a hairy and expensive scheme.      */
-               /* First we get the name of the executable:             */
-               if (will_fail) goto out;
-               if (!found_exe_name) { 
-                 ret_code = readlink("/proc/self/exe", exe_name, EXE_SZ);
-                 if (ret_code < 0 || ret_code >= EXE_SZ
-                     || exe_name[0] != '/') {
-                   will_fail = TRUE;   /* Dont try again. */
-                   goto out;
-                 }
-                 exe_name[ret_code] = '\0';
-                 found_exe_name = TRUE;
-               }
-               /* Then we use popen to start addr2line -e <exe> <addr> */
-               /* There are faster ways to do this, but hopefully this */
-               /* isn't time critical.                                 */
-               sprintf(cmd_buf, "/usr/bin/addr2line -f -e %s 0x%lx", exe_name,
-                                (unsigned long)info[i].ci_pc);
-               old_preload = getenv ("LD_PRELOAD");
-               if (0 != old_preload) {
-                 if (strlen (old_preload) >= PRELOAD_SZ) {
-                   will_fail = TRUE;
-                   goto out;
-                 }
-                 strcpy (preload_buf, old_preload);
-                 unsetenv ("LD_PRELOAD");
-               }
-               pipe = popen(cmd_buf, "r");
-               if (0 != old_preload
-                   && 0 != setenv ("LD_PRELOAD", preload_buf, 0)) {
-                 WARN("Failed to reset LD_PRELOAD\n", 0);
-               }
-               if (pipe == NULL
-                   || (result_len = fread(result_buf, 1, RESULT_SZ - 1, pipe))
-                      == 0) {
-                 if (pipe != NULL) pclose(pipe);
-                 will_fail = TRUE;
-                 goto out;
-               }
-               if (result_buf[result_len - 1] == '\n') --result_len;
-               result_buf[result_len] = 0;
-               if (result_buf[0] == '?'
-                   || (result_buf[result_len-2] == ':' 
-                       && result_buf[result_len-1] == '0')) {
-                   pclose(pipe);
-                   goto out;
-               }
-               /* Get rid of embedded newline, if any.  Test for "main" */
-               {
-                  char * nl = strchr(result_buf, '\n');
-                  if (nl != NULL && nl < result_buf + result_len) {
-                    *nl = ':';
-                  }
-                  if (strncmp(result_buf, "main", nl - result_buf) == 0) {
-                    stop = TRUE;
-                  }
-               }
-               if (result_len < RESULT_SZ - 25) {
-                 /* Add in hex address */
-                   sprintf(result_buf + result_len, " [0x%lx]",
-                         (unsigned long)info[i].ci_pc);
-               }
-               name = result_buf;
-               pclose(pipe);
-               out:;
-           }
-#        endif /* LINUX */
-         GC_err_printf("\t\t%s\n", name);
-#        if defined(GC_HAVE_BUILTIN_BACKTRACE) \
-            && !defined(GC_BACKTRACE_SYMBOLS_BROKEN)
-           free(sym_name);  /* May call GC_free; that's OK */
+            /* We were called during an allocation during       */
+            /* a previous GC_print_callers call; punt.          */
+            GC_err_printf("\t\t##PC##= 0x%lx\n", info[i].ci_pc);
+            continue;
+        }
+        {
+#         ifdef LINUX
+            FILE *pipe;
+#         endif
+#         if defined(GC_HAVE_BUILTIN_BACKTRACE) \
+             && !defined(GC_BACKTRACE_SYMBOLS_BROKEN)
+            char **sym_name =
+              backtrace_symbols((void **)(&(info[i].ci_pc)), 1);
+            char *name = sym_name[0];
+#         else
+            char buf[40];
+            char *name = buf;
+            sprintf(buf, "##PC##= 0x%lx", info[i].ci_pc);
+#         endif
+#         if defined(LINUX) && !defined(SMALL_CONFIG)
+            /* Try for a line number. */
+            {
+#               define EXE_SZ 100
+                static char exe_name[EXE_SZ];
+#               define CMD_SZ 200
+                char cmd_buf[CMD_SZ];
+#               define RESULT_SZ 200
+                static char result_buf[RESULT_SZ];
+                size_t result_len;
+                char *old_preload;
+#               define PRELOAD_SZ 200
+                char preload_buf[PRELOAD_SZ];
+                static GC_bool found_exe_name = FALSE;
+                static GC_bool will_fail = FALSE;
+                int ret_code;
+                /* Try to get it via a hairy and expensive scheme.      */
+                /* First we get the name of the executable:             */
+                if (will_fail) goto out;
+                if (!found_exe_name) {
+                  ret_code = readlink("/proc/self/exe", exe_name, EXE_SZ);
+                  if (ret_code < 0 || ret_code >= EXE_SZ
+                      || exe_name[0] != '/') {
+                    will_fail = TRUE;   /* Don't try again. */
+                    goto out;
+                  }
+                  exe_name[ret_code] = '\0';
+                  found_exe_name = TRUE;
+                }
+                /* Then we use popen to start addr2line -e <exe> <addr> */
+                /* There are faster ways to do this, but hopefully this */
+                /* isn't time critical.                                 */
+                sprintf(cmd_buf, "/usr/bin/addr2line -f -e %s 0x%lx", exe_name,
+                                 (unsigned long)info[i].ci_pc);
+                old_preload = GETENV("LD_PRELOAD");
+                if (0 != old_preload) {
+                  if (strlen (old_preload) >= PRELOAD_SZ) {
+                    will_fail = TRUE;
+                    goto out;
+                  }
+                  strcpy (preload_buf, old_preload);
+                  unsetenv ("LD_PRELOAD");
+                }
+                pipe = popen(cmd_buf, "r");
+                if (0 != old_preload
+                    && 0 != setenv ("LD_PRELOAD", preload_buf, 0)) {
+                  WARN("Failed to reset LD_PRELOAD\n", 0);
+                }
+                if (pipe == NULL
+                    || (result_len = fread(result_buf, 1, RESULT_SZ - 1, pipe))
+                       == 0) {
+                  if (pipe != NULL) pclose(pipe);
+                  will_fail = TRUE;
+                  goto out;
+                }
+                if (result_buf[result_len - 1] == '\n') --result_len;
+                result_buf[result_len] = 0;
+                if (result_buf[0] == '?'
+                    || (result_buf[result_len-2] == ':'
+                        && result_buf[result_len-1] == '0')) {
+                    pclose(pipe);
+                    goto out;
+                }
+                /* Get rid of embedded newline, if any.  Test for "main" */
+                {
+                   char * nl = strchr(result_buf, '\n');
+                   if (nl != NULL && nl < result_buf + result_len) {
+                     *nl = ':';
+                   }
+                   if (strncmp(result_buf, "main", nl - result_buf) == 0) {
+                     stop = TRUE;
+                   }
+                }
+                if (result_len < RESULT_SZ - 25) {
+                  /* Add in hex address */
+                    sprintf(result_buf + result_len, " [0x%lx]",
+                          (unsigned long)info[i].ci_pc);
+                }
+                name = result_buf;
+                pclose(pipe);
+                out:;
+            }
+#         endif /* LINUX */
+          GC_err_printf("\t\t%s\n", name);
+#         if defined(GC_HAVE_BUILTIN_BACKTRACE) \
+             && !defined(GC_BACKTRACE_SYMBOLS_BROKEN)
+            free(sym_name);  /* May call GC_free; that's OK */
 #         endif
-       }
+        }
     }
     LOCK();
       --reentry_count;
@@ -4267,8 +4466,6 @@ void GC_print_callers (struct callinfo info[NFRAMES])
 
 #endif /* NEED_CALLINFO */
 
-
-
 #if defined(LINUX) && defined(__ELF__) && !defined(SMALL_CONFIG)
 
 /* Dump /proc/self/maps to GC_stderr, to enable looking up names for
@@ -4288,5 +4485,3 @@ void GC_print_address_map(void)
 }
 
 #endif
-
-
index ae1d225a94c02d298487653e60d3a34b131d8a7a..d799eab2dfbd77275429978e13fb2355922f5f86 100644 (file)
@@ -1,15 +1,34 @@
+/*
+ * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
+ * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
+ * Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
+ * Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
+ * All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
 #include "private/pthread_support.h"
 
 #if defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS) && \
     !defined(GC_DARWIN_THREADS)
 
+#ifndef GC_OPENBSD_THREADS
+
 #include <signal.h>
 #include <semaphore.h>
 #include <errno.h>
 #include <unistd.h>
 #include "atomic_ops.h"
 
-#if DEBUG_THREADS
+#ifdef DEBUG_THREADS
 
 #ifndef NSIG
 # if defined(MAXSIG)
 # endif
 #endif
 
+/* It's safe to call original pthread_sigmask() here. */
+#undef pthread_sigmask
+
 void GC_print_sig_mask(void)
 {
     sigset_t blocked;
     int i;
 
     if (pthread_sigmask(SIG_BLOCK, NULL, &blocked) != 0)
-       ABORT("pthread_sigmask");
+        ABORT("pthread_sigmask");
     GC_printf("Blocked: ");
     for (i = 1; i < NSIG; i++) {
         if (sigismember(&blocked, i)) { GC_printf("%d ", i); }
@@ -37,27 +59,27 @@ void GC_print_sig_mask(void)
     GC_printf("\n");
 }
 
-#endif
+#endif /* DEBUG_THREADS */
 
-/* Remove the signals that we want to allow in thread stopping         */
-/* handler from a set.                                         */
+/* Remove the signals that we want to allow in thread stopping  */
+/* handler from a set.                                          */
 STATIC void GC_remove_allowed_signals(sigset_t *set)
 {
     if (sigdelset(set, SIGINT) != 0
-         || sigdelset(set, SIGQUIT) != 0
-         || sigdelset(set, SIGABRT) != 0
-         || sigdelset(set, SIGTERM) != 0) {
+          || sigdelset(set, SIGQUIT) != 0
+          || sigdelset(set, SIGABRT) != 0
+          || sigdelset(set, SIGTERM) != 0) {
         ABORT("sigdelset() failed");
     }
 
 #   ifdef MPROTECT_VDB
-      /* Handlers write to the thread structure, which is in the heap, */
-      /* and hence can trigger a protection fault.                     */
+      /* Handlers write to the thread structure, which is in the heap,  */
+      /* and hence can trigger a protection fault.                      */
       if (sigdelset(set, SIGSEGV) != 0
-#        ifdef SIGBUS
-           || sigdelset(set, SIGBUS) != 0
-#        endif
-         ) {
+#         ifdef SIGBUS
+            || sigdelset(set, SIGBUS) != 0
+#         endif
+          ) {
         ABORT("sigdelset() failed");
       }
 #   endif
@@ -65,14 +87,14 @@ STATIC void GC_remove_allowed_signals(sigset_t *set)
 
 static sigset_t suspend_handler_mask;
 
-volatile AO_t GC_stop_count;
-                       /* Incremented at the beginning of GC_stop_world. */
+STATIC volatile AO_t GC_stop_count = 0;
+                        /* Incremented at the beginning of GC_stop_world. */
 
-volatile AO_t GC_world_is_stopped = FALSE;
-                       /* FALSE ==> it is safe for threads to restart, i.e. */
-                       /* they will see another suspend signal before they  */
-                       /* are expected to stop (unless they have voluntarily */
-                       /* stopped).                                         */
+STATIC volatile AO_t GC_world_is_stopped = FALSE;
+                        /* FALSE ==> it is safe for threads to restart, i.e. */
+                        /* they will see another suspend signal before they  */
+                        /* are expected to stop (unless they have voluntarily */
+                        /* stopped).                                         */
 
 #ifdef GC_OSF1_THREADS
   STATIC GC_bool GC_retry_signals = TRUE;
@@ -82,7 +104,7 @@ volatile AO_t GC_world_is_stopped = FALSE;
 
 /*
  * We use signals to stop threads during GC.
- * 
+ *
  * Suspended threads wait in signal handler for SIG_THR_RESTART.
  * That's more portable than semaphores or condition variables.
  * (We do use sem_post from a signal handler, but that should be portable.)
@@ -108,8 +130,8 @@ STATIC sem_t GC_suspend_ack_sem;
 
 #ifdef GC_NETBSD_THREADS
 # define GC_NETBSD_THREADS_WORKAROUND
-  /* It seems to be necessary to wait until threads have restarted.    */
-  /* But it is unclear why that is the case.                           */
+  /* It seems to be necessary to wait until threads have restarted.     */
+  /* But it is unclear why that is the case.                            */
   STATIC sem_t GC_restart_ack_sem;
 #endif
 
@@ -117,10 +139,10 @@ STATIC void GC_suspend_handler_inner(ptr_t sig_arg, void *context);
 
 #if defined(IA64) || defined(HP_PA) || defined(M68K)
 #ifdef SA_SIGINFO
-/*ARGSUSED*/
-STATIC void GC_suspend_handler(int sig, siginfo_t *info, void *context)
+  /*ARGSUSED*/
+  STATIC void GC_suspend_handler(int sig, siginfo_t *info, void *context)
 #else
-STATIC void GC_suspend_handler(int sig)
+  STATIC void GC_suspend_handler(int sig)
 #endif
 {
   int old_errno = errno;
@@ -128,12 +150,12 @@ STATIC void GC_suspend_handler(int sig)
   errno = old_errno;
 }
 #else
-/* We believe that in all other cases the full context is already      */
-/* in the signal handler frame.                                                */
+/* We believe that in all other cases the full context is already       */
+/* in the signal handler frame.                                         */
 #ifdef SA_SIGINFO
-STATIC void GC_suspend_handler(int sig, siginfo_t *info, void *context)
+  STATIC void GC_suspend_handler(int sig, siginfo_t *info, void *context)
 #else
-STATIC void GC_suspend_handler(int sig)
+  STATIC void GC_suspend_handler(int sig)
 #endif
 {
   int old_errno = errno;
@@ -152,68 +174,79 @@ STATIC void GC_suspend_handler_inner(ptr_t sig_arg, void *context)
     int dummy;
     pthread_t my_thread = pthread_self();
     GC_thread me;
+    IF_CANCEL(int cancel_state;)
 
     AO_t my_stop_count = AO_load(&GC_stop_count);
 
     if (sig != SIG_SUSPEND) ABORT("Bad signal in suspend_handler");
 
-#   if DEBUG_THREADS
+    DISABLE_CANCEL(cancel_state);
+        /* pthread_setcancelstate is not defined to be async-signal-safe. */
+        /* But the glibc version appears to be in the absence of          */
+        /* asynchronous cancellation.  And since this signal handler      */
+        /* to block on sigsuspend, which is both async-signal-safe        */
+        /* and a cancellation point, there seems to be no obvious way     */
+        /* out of it.  In fact, it looks to me like an async-signal-safe  */
+        /* cancellation point is inherently a problem, unless there is    */
+        /* some way to disable cancellation in the handler.               */
+#   ifdef DEBUG_THREADS
       GC_printf("Suspending 0x%x\n", (unsigned)my_thread);
 #   endif
 
     me = GC_lookup_thread(my_thread);
     /* The lookup here is safe, since I'm doing this on behalf  */
-    /* of a thread which holds the allocation lock in order    */
-    /* to stop the world.  Thus concurrent modification of the */
-    /* data structure is impossible.                           */
+    /* of a thread which holds the allocation lock in order     */
+    /* to stop the world.  Thus concurrent modification of the  */
+    /* data structure is impossible.                            */
     if (me -> stop_info.last_stop_count == my_stop_count) {
-       /* Duplicate signal.  OK if we are retrying.    */
-       if (!GC_retry_signals) {
-           WARN("Duplicate suspend signal in thread %p\n",
-                (word)pthread_self());
-       }
-       return;
+        /* Duplicate signal.  OK if we are retrying.    */
+        if (!GC_retry_signals) {
+            WARN("Duplicate suspend signal in thread %p\n", pthread_self());
+        }
+        RESTORE_CANCEL(cancel_state);
+        return;
     }
 #   ifdef SPARC
-       me -> stop_info.stack_ptr = GC_save_regs_in_stack();
+        me -> stop_info.stack_ptr = GC_save_regs_in_stack();
 #   else
-       me -> stop_info.stack_ptr = (ptr_t)(&dummy);
+        me -> stop_info.stack_ptr = (ptr_t)(&dummy);
 #   endif
 #   ifdef IA64
-       me -> backing_store_ptr = GC_save_regs_in_stack();
+        me -> backing_store_ptr = GC_save_regs_in_stack();
 #   endif
 
     /* Tell the thread that wants to stop the world that this   */
-    /* thread has been stopped.  Note that sem_post() is       */
+    /* thread has been stopped.  Note that sem_post() is        */
     /* the only async-signal-safe primitive in LinuxThreads.    */
     sem_post(&GC_suspend_ack_sem);
     me -> stop_info.last_stop_count = my_stop_count;
 
     /* Wait until that thread tells us to restart by sending    */
-    /* this thread a SIG_THR_RESTART signal.                   */
-    /* SIG_THR_RESTART should be masked at this point.  Thus there     */
-    /* is no race.                                             */
-    /* We do not continue until we receive a SIG_THR_RESTART,  */
-    /* but we do not take that as authoritative.  (We may be   */
-    /* accidentally restarted by one of the user signals we    */
-    /* don't block.)  After we receive the signal, we use a    */
-    /* primitive and expensive mechanism to wait until it's    */
-    /* really safe to proceed.  Under normal circumstances,    */
-    /* this code should not be executed.                       */
+    /* this thread a SIG_THR_RESTART signal.                    */
+    /* SIG_THR_RESTART should be masked at this point.  Thus there      */
+    /* is no race.                                              */
+    /* We do not continue until we receive a SIG_THR_RESTART,   */
+    /* but we do not take that as authoritative.  (We may be    */
+    /* accidentally restarted by one of the user signals we     */
+    /* don't block.)  After we receive the signal, we use a     */
+    /* primitive and expensive mechanism to wait until it's     */
+    /* really safe to proceed.  Under normal circumstances,     */
+    /* this code should not be executed.                        */
     do {
-       sigsuspend (&suspend_handler_mask);
+        sigsuspend (&suspend_handler_mask);
     } while (AO_load_acquire(&GC_world_is_stopped)
-            && AO_load(&GC_stop_count) == my_stop_count);
+             && AO_load(&GC_stop_count) == my_stop_count);
     /* If the RESTART signal gets lost, we can still lose.  That should be  */
     /* less likely than losing the SUSPEND signal, since we don't do much   */
-    /* between the sem_post and sigsuspend.                                */
-    /* We'd need more handshaking to work around that.                     */
+    /* between the sem_post and sigsuspend.                                 */
+    /* We'd need more handshaking to work around that.                      */
     /* Simply dropping the sigsuspend call should be safe, but is unlikely  */
-    /* to be efficient.                                                            */
+    /* to be efficient.                                                     */
 
-#   if DEBUG_THREADS
+#   ifdef DEBUG_THREADS
       GC_printf("Continuing 0x%x\n", (unsigned)my_thread);
 #   endif
+    RESTORE_CANCEL(cancel_state);
 }
 
 STATIC void GC_restart_handler(int sig)
@@ -232,21 +265,21 @@ STATIC void GC_restart_handler(int sig)
     ** will thus not interrupt the sigsuspend() above.
     */
 
-#   if DEBUG_THREADS
+#   ifdef DEBUG_THREADS
       GC_printf("In GC_restart_handler for 0x%x\n", (unsigned)pthread_self());
 #   endif
 }
 
-void GC_thr_init(void);
+#endif /* !GC_OPENBSD_THREADS */
 
 # ifdef IA64
 #   define IF_IA64(x) x
 # else
 #   define IF_IA64(x)
 # endif
-/* We hold allocation lock.  Should do exactly the right thing if the  */
-/* world is stopped.  Should not fail if it isn't.                     */
-void GC_push_all_stacks(void)
+/* We hold allocation lock.  Should do exactly the right thing if the   */
+/* world is stopped.  Should not fail if it isn't.                      */
+GC_INNER void GC_push_all_stacks(void)
 {
     GC_bool found_me = FALSE;
     size_t nthreads = 0;
@@ -256,88 +289,90 @@ void GC_push_all_stacks(void)
     /* On IA64, we also need to scan the register backing store. */
     IF_IA64(ptr_t bs_lo; ptr_t bs_hi;)
     pthread_t me = pthread_self();
-    
+    word total_size = 0;
+
     if (!GC_thr_initialized) GC_thr_init();
-#   if DEBUG_THREADS
-        GC_printf("Pushing stacks from thread 0x%x\n", (unsigned) me);
+#   ifdef DEBUG_THREADS
+      GC_printf("Pushing stacks from thread 0x%x\n", (unsigned) me);
 #   endif
     for (i = 0; i < THREAD_TABLE_SZ; i++) {
       for (p = GC_threads[i]; p != 0; p = p -> next) {
         if (p -> flags & FINISHED) continue;
-       ++nthreads;
+        ++nthreads;
         if (THREAD_EQUAL(p -> id, me)) {
-           GC_ASSERT(!p->thread_blocked);
-#          ifdef SPARC
-               lo = (ptr_t)GC_save_regs_in_stack();
-#          else
-               lo = GC_approx_sp();
+            GC_ASSERT(!p->thread_blocked);
+#           ifdef SPARC
+                lo = (ptr_t)GC_save_regs_in_stack();
+#           else
+                lo = GC_approx_sp();
 #           endif
-           found_me = TRUE;
-           IF_IA64(bs_hi = (ptr_t)GC_save_regs_in_stack();)
-       } else {
-           lo = p -> stop_info.stack_ptr;
-           IF_IA64(bs_hi = p -> backing_store_ptr;)
-       }
+            found_me = TRUE;
+            IF_IA64(bs_hi = (ptr_t)GC_save_regs_in_stack();)
+        } else {
+            lo = p -> stop_info.stack_ptr;
+            IF_IA64(bs_hi = p -> backing_store_ptr;)
+        }
         if ((p -> flags & MAIN_THREAD) == 0) {
-           hi = p -> stack_end;
-           IF_IA64(bs_lo = p -> backing_store_end);
+            hi = p -> stack_end;
+            IF_IA64(bs_lo = p -> backing_store_end);
         } else {
             /* The original stack. */
             hi = GC_stackbottom;
-           IF_IA64(bs_lo = BACKING_STORE_BASE;)
+            IF_IA64(bs_lo = BACKING_STORE_BASE;)
         }
-#      if DEBUG_THREADS
-            GC_printf("Stack for thread 0x%x = [%p,%p)\n",
-                     (unsigned)(p -> id), lo, hi);
-#      endif
-       if (0 == lo) ABORT("GC_push_all_stacks: sp not set!\n");
+#       ifdef DEBUG_THREADS
+          GC_printf("Stack for thread 0x%x = [%p,%p)\n",
+                    (unsigned)(p -> id), lo, hi);
+#       endif
+        if (0 == lo) ABORT("GC_push_all_stacks: sp not set!\n");
+        GC_push_all_stack_frames(lo, hi, p -> activation_frame);
 #       ifdef STACK_GROWS_UP
-         /* We got them backwards! */
-          GC_push_all_stack(hi, lo);
+          total_size += lo - hi;
 #       else
-          GC_push_all_stack(lo, hi);
-#      endif
-#      ifdef IA64
-#         if DEBUG_THREADS
+          total_size += hi - lo; /* lo <= hi */
+#       endif
+#       ifdef IA64
+#         ifdef DEBUG_THREADS
             GC_printf("Reg stack for thread 0x%x = [%p,%p)\n",
-                     (unsigned)p -> id, bs_lo, bs_hi);
-#        endif
-          if (THREAD_EQUAL(p -> id, me)) {
-           /* FIXME:  This may add an unbounded number of entries,     */
-           /* and hence overflow the mark stack, which is bad.         */
-           GC_push_all_eager(bs_lo, bs_hi);
-         } else {
-           GC_push_all_stack(bs_lo, bs_hi);
-         }
-#      endif
+                      (unsigned)p -> id, bs_lo, bs_hi);
+#         endif
+          /* FIXME:  This (if p->id==me) may add an unbounded number of */
+          /* entries, and hence overflow the mark stack, which is bad.  */
+          GC_push_all_register_frames(bs_lo, bs_hi,
+                        THREAD_EQUAL(p -> id, me), p -> activation_frame);
+          total_size += bs_hi - bs_lo; /* bs_lo <= bs_hi */
+#       endif
       }
     }
     if (GC_print_stats == VERBOSE) {
-       GC_log_printf("Pushed %d thread stacks\n", (int)nthreads);
+        GC_log_printf("Pushed %d thread stacks\n", (int)nthreads);
     }
     if (!found_me && !GC_in_thread_creation)
       ABORT("Collecting from unknown thread.");
+    GC_total_stacksize = total_size;
 }
 
 /* There seems to be a very rare thread stopping problem.  To help us  */
 /* debug that, we save the ids of the stopping thread. */
-#if DEBUG_THREADS
-pthread_t GC_stopping_thread;
-int GC_stopping_pid;
+#ifdef DEBUG_THREADS
+  pthread_t GC_stopping_thread;
+  int GC_stopping_pid = 0;
 #endif
 
-/* We hold the allocation lock.  Suspend all threads that might        */
-/* still be running.  Return the number of suspend signals that        */
+/* We hold the allocation lock.  Suspend all threads that might */
+/* still be running.  Return the number of suspend signals that */
 /* were sent. */
 STATIC int GC_suspend_all(void)
 {
     int n_live_threads = 0;
     int i;
     GC_thread p;
-    int result;
+#   ifndef GC_OPENBSD_THREADS
+      int result;
+#   endif
     pthread_t my_thread = pthread_self();
-    
-#   if DEBUG_THREADS
+
+#   ifdef DEBUG_THREADS
       GC_stopping_thread = my_thread;
       GC_stopping_pid = getpid();
 #   endif
@@ -345,16 +380,29 @@ STATIC int GC_suspend_all(void)
       for (p = GC_threads[i]; p != 0; p = p -> next) {
         if (!THREAD_EQUAL(p -> id, my_thread)) {
             if (p -> flags & FINISHED) continue;
-            if (p -> stop_info.last_stop_count == GC_stop_count) continue;
-           if (p -> thread_blocked) /* Will wait */ continue;
-            n_live_threads++;
-#          if DEBUG_THREADS
-             GC_printf("Sending suspend signal to 0x%x\n",
-                       (unsigned)(p -> id));
-#          endif
-        
-            result = pthread_kill(p -> id, SIG_SUSPEND);
-           switch(result) {
+            if (p -> thread_blocked) /* Will wait */ continue;
+#           ifndef GC_OPENBSD_THREADS
+              if (p -> stop_info.last_stop_count == GC_stop_count) continue;
+              n_live_threads++;
+#           endif
+#           ifdef DEBUG_THREADS
+              GC_printf("Sending suspend signal to 0x%x\n",
+                        (unsigned)(p -> id));
+#           endif
+
+#           ifdef GC_OPENBSD_THREADS
+              if (pthread_suspend_np(p -> id) != 0)
+                ABORT("pthread_suspend_np failed");
+              /* This will only work for userland pthreads.  It will    */
+              /* fail badly on rthreads.  Perhaps we should consider    */
+              /* a pthread_sp_np() function that returns the stack      */
+              /* pointer for a suspended thread and implement in both   */
+              /* pthreads and rthreads.                                 */
+              p -> stop_info.stack_ptr =
+                        *(ptr_t *)((char *)p -> id + UTHREAD_SP_OFFSET);
+#           else
+              result = pthread_kill(p -> id, SIG_SUSPEND);
+              switch(result) {
                 case ESRCH:
                     /* Not really there anymore.  Possible? */
                     n_live_threads--;
@@ -363,120 +411,139 @@ STATIC int GC_suspend_all(void)
                     break;
                 default:
                     ABORT("pthread_kill failed");
-            }
+              }
+#           endif
         }
       }
     }
     return n_live_threads;
 }
 
-void GC_stop_world(void)
+GC_INNER void GC_stop_world(void)
 {
     int i;
-    int n_live_threads;
-    int code;
+#   ifndef GC_OPENBSD_THREADS
+      int n_live_threads;
+      int code;
+#   endif
 
     GC_ASSERT(I_HOLD_LOCK());
-#   if DEBUG_THREADS
+#   ifdef DEBUG_THREADS
       GC_printf("Stopping the world from 0x%x\n", (unsigned)pthread_self());
 #   endif
-       
+
     /* Make sure all free list construction has stopped before we start. */
-    /* No new construction can start, since free list construction is  */
-    /* required to acquire and release the GC lock before it starts,   */
-    /* and we have the lock.                                           */
+    /* No new construction can start, since free list construction is   */
+    /* required to acquire and release the GC lock before it starts,    */
+    /* and we have the lock.                                            */
 #   ifdef PARALLEL_MARK
       if (GC_parallel) {
-       GC_acquire_mark_lock();
-       GC_ASSERT(GC_fl_builder_count == 0);
-       /* We should have previously waited for it to become zero. */
+        GC_acquire_mark_lock();
+        GC_ASSERT(GC_fl_builder_count == 0);
+        /* We should have previously waited for it to become zero. */
       }
 #   endif /* PARALLEL_MARK */
+
+# ifdef GC_OPENBSD_THREADS
+    (void)GC_suspend_all();
+# else
     AO_store(&GC_stop_count, GC_stop_count+1);
-       /* Only concurrent reads are possible. */
+        /* Only concurrent reads are possible. */
     AO_store_release(&GC_world_is_stopped, TRUE);
     n_live_threads = GC_suspend_all();
 
       if (GC_retry_signals) {
-         unsigned long wait_usecs = 0;  /* Total wait since retry.     */
-#        define WAIT_UNIT 3000
-#        define RETRY_INTERVAL 100000
-         for (;;) {
-             int ack_count;
-
-             sem_getvalue(&GC_suspend_ack_sem, &ack_count);
-             if (ack_count == n_live_threads) break;
-             if (wait_usecs > RETRY_INTERVAL) {
-                 int newly_sent = GC_suspend_all();
-
-                 if (GC_print_stats) {
-                     GC_log_printf("Resent %d signals after timeout\n",
-                               newly_sent);
-                 }
-                 sem_getvalue(&GC_suspend_ack_sem, &ack_count);
-                 if (newly_sent < n_live_threads - ack_count) {
-                     WARN("Lost some threads during GC_stop_world?!\n",0);
-                     n_live_threads = ack_count + newly_sent;
-                 }
-                 wait_usecs = 0;
-             }
-             usleep(WAIT_UNIT);
-             wait_usecs += WAIT_UNIT;
-         }
+          unsigned long wait_usecs = 0;  /* Total wait since retry.     */
+#         define WAIT_UNIT 3000
+#         define RETRY_INTERVAL 100000
+          for (;;) {
+              int ack_count;
+
+              sem_getvalue(&GC_suspend_ack_sem, &ack_count);
+              if (ack_count == n_live_threads) break;
+              if (wait_usecs > RETRY_INTERVAL) {
+                  int newly_sent = GC_suspend_all();
+
+                  if (GC_print_stats) {
+                      GC_log_printf("Resent %d signals after timeout\n",
+                                newly_sent);
+                  }
+                  sem_getvalue(&GC_suspend_ack_sem, &ack_count);
+                  if (newly_sent < n_live_threads - ack_count) {
+                      WARN("Lost some threads during GC_stop_world?!\n",0);
+                      n_live_threads = ack_count + newly_sent;
+                  }
+                  wait_usecs = 0;
+              }
+              usleep(WAIT_UNIT);
+              wait_usecs += WAIT_UNIT;
+          }
       }
     for (i = 0; i < n_live_threads; i++) {
-       retry:
-         if (0 != (code = sem_wait(&GC_suspend_ack_sem))) {
-             /* On Linux, sem_wait is documented to always return zero.*/
-             /* But the documentation appears to be incorrect.         */
-             if (errno == EINTR) {
-               /* Seems to happen with some versions of gdb.   */
-               goto retry;
-             }
-             ABORT("sem_wait for handler failed");
-         }
+        retry:
+          if (0 != (code = sem_wait(&GC_suspend_ack_sem))) {
+              /* On Linux, sem_wait is documented to always return zero.*/
+              /* But the documentation appears to be incorrect.         */
+              if (errno == EINTR) {
+                /* Seems to happen with some versions of gdb.   */
+                goto retry;
+              }
+              ABORT("sem_wait for handler failed");
+          }
     }
+# endif
+
 #   ifdef PARALLEL_MARK
       if (GC_parallel)
-       GC_release_mark_lock();
+        GC_release_mark_lock();
 #   endif
-#   if DEBUG_THREADS
+#   ifdef DEBUG_THREADS
       GC_printf("World stopped from 0x%x\n", (unsigned)pthread_self());
       GC_stopping_thread = 0;
 #   endif
 }
 
-/* Caller holds allocation lock, and has held it continuously since    */
-/* the world stopped.                                                  */
-void GC_start_world(void)
+/* Caller holds allocation lock, and has held it continuously since     */
+/* the world stopped.                                                   */
+GC_INNER void GC_start_world(void)
 {
     pthread_t my_thread = pthread_self();
     register int i;
     register GC_thread p;
-    register int n_live_threads = 0;
-    register int result;
+#   ifndef GC_OPENBSD_THREADS
+      register int n_live_threads = 0;
+      register int result;
+#   endif
 #   ifdef GC_NETBSD_THREADS_WORKAROUND
       int code;
 #   endif
 
-#   if DEBUG_THREADS
+#   ifdef DEBUG_THREADS
       GC_printf("World starting\n");
 #   endif
 
-    AO_store(&GC_world_is_stopped, FALSE);
+#   ifndef GC_OPENBSD_THREADS
+      AO_store(&GC_world_is_stopped, FALSE);
+#   endif
     for (i = 0; i < THREAD_TABLE_SZ; i++) {
       for (p = GC_threads[i]; p != 0; p = p -> next) {
         if (!THREAD_EQUAL(p -> id, my_thread)) {
             if (p -> flags & FINISHED) continue;
-           if (p -> thread_blocked) continue;
-            n_live_threads++;
-#          if DEBUG_THREADS
-             GC_printf("Sending restart signal to 0x%x\n",
-                       (unsigned)(p -> id));
-#          endif
-        
+            if (p -> thread_blocked) continue;
+#           ifndef GC_OPENBSD_THREADS
+              n_live_threads++;
+#           endif
+#           ifdef DEBUG_THREADS
+              GC_printf("Sending restart signal to 0x%x\n",
+                        (unsigned)(p -> id));
+#           endif
+
+#         ifdef GC_OPENBSD_THREADS
+            if (pthread_resume_np(p -> id) != 0)
+              ABORT("pthread_kill failed");
+#         else
             result = pthread_kill(p -> id, SIG_THR_RESTART);
-           switch(result) {
+            switch(result) {
                 case ESRCH:
                     /* Not really there anymore.  Possible? */
                     n_live_threads--;
@@ -486,77 +553,81 @@ void GC_start_world(void)
                 default:
                     ABORT("pthread_kill failed");
             }
+#         endif
         }
       }
     }
 #   ifdef GC_NETBSD_THREADS_WORKAROUND
       for (i = 0; i < n_live_threads; i++)
-       while (0 != (code = sem_wait(&GC_restart_ack_sem)))
-           if (errno != EINTR) {
-               GC_err_printf("sem_wait() returned %d\n",
-                              code);
-               ABORT("sem_wait() for restart handler failed");
-           }
+        while (0 != (code = sem_wait(&GC_restart_ack_sem)))
+            if (errno != EINTR) {
+                GC_err_printf("sem_wait() returned %d\n",
+                               code);
+                ABORT("sem_wait() for restart handler failed");
+            }
 #    endif
-#    if DEBUG_THREADS
-      GC_printf("World started\n");
+#    ifdef DEBUG_THREADS
+       GC_printf("World started\n");
 #    endif
 }
 
-void GC_stop_init(void) {
+GC_INNER void GC_stop_init(void)
+{
+# ifndef GC_OPENBSD_THREADS
     struct sigaction act;
-    
+
     if (sem_init(&GC_suspend_ack_sem, 0, 0) != 0)
         ABORT("sem_init failed");
 #   ifdef GC_NETBSD_THREADS_WORKAROUND
       if (sem_init(&GC_restart_ack_sem, 0, 0) != 0)
-       ABORT("sem_init failed");
+        ABORT("sem_init failed");
 #   endif
 
     act.sa_flags = SA_RESTART
 #   ifdef SA_SIGINFO
-       | SA_SIGINFO
+        | SA_SIGINFO
 #   endif
-       ;
+        ;
     if (sigfillset(&act.sa_mask) != 0) {
-       ABORT("sigfillset() failed");
+        ABORT("sigfillset() failed");
     }
     GC_remove_allowed_signals(&act.sa_mask);
-    /* SIG_THR_RESTART is set in the resulting mask.           */
-    /* It is unmasked by the handler when necessary.           */
+    /* SIG_THR_RESTART is set in the resulting mask.            */
+    /* It is unmasked by the handler when necessary.            */
 #   ifdef SA_SIGINFO
-    act.sa_sigaction = GC_suspend_handler;
+      act.sa_sigaction = GC_suspend_handler;
 #   else
-    act.sa_handler = GC_suspend_handler;
+      act.sa_handler = GC_suspend_handler;
 #   endif
     if (sigaction(SIG_SUSPEND, &act, NULL) != 0) {
-       ABORT("Cannot set SIG_SUSPEND handler");
+        ABORT("Cannot set SIG_SUSPEND handler");
     }
 
 #   ifdef SA_SIGINFO
-    act.sa_flags &= ~ SA_SIGINFO;
+      act.sa_flags &= ~ SA_SIGINFO;
 #   endif
     act.sa_handler = GC_restart_handler;
     if (sigaction(SIG_THR_RESTART, &act, NULL) != 0) {
-       ABORT("Cannot set SIG_THR_RESTART handler");
+        ABORT("Cannot set SIG_THR_RESTART handler");
     }
 
     /* Initialize suspend_handler_mask. It excludes SIG_THR_RESTART. */
       if (sigfillset(&suspend_handler_mask) != 0) ABORT("sigfillset() failed");
       GC_remove_allowed_signals(&suspend_handler_mask);
       if (sigdelset(&suspend_handler_mask, SIG_THR_RESTART) != 0)
-         ABORT("sigdelset() failed");
+          ABORT("sigdelset() failed");
 
-    /* Check for GC_RETRY_SIGNALS.     */
+    /* Check for GC_RETRY_SIGNALS.      */
       if (0 != GETENV("GC_RETRY_SIGNALS")) {
-         GC_retry_signals = TRUE;
+          GC_retry_signals = TRUE;
       }
       if (0 != GETENV("GC_NO_RETRY_SIGNALS")) {
-         GC_retry_signals = FALSE;
+          GC_retry_signals = FALSE;
       }
       if (GC_print_stats && GC_retry_signals) {
           GC_log_printf("Will retry suspend signal if necessary.\n");
       }
+# endif /* !GC_OPENBSD_THREADS */
 }
 
 #endif
index e01d9704bf9b1f41bd7c7e7ddac43f1f5476f811..7ff0c6738d511a7b4fb181ce43dd9a2e3322de91 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
  * Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
@@ -13,6 +13,9 @@
  * provided the above notices are retained, and a notice that the code was
  * modified is included with the above copyright notice.
  */
+
+#include "private/pthread_support.h"
+
 /*
  * Support code originally for LinuxThreads, the clone()-based kernel
  * thread package for Linux which is included in libc6.
  * + #  define GC_LOCK_TAKEN GC_allocate_lock
  */
 
-/*#define DEBUG_THREADS 1*/
-
-# include "private/pthread_support.h"
-
-# if defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS)
-
-# if defined(GC_DGUX386_THREADS) && !defined(_POSIX4A_DRAFT10_SOURCE)
-#   define _POSIX4A_DRAFT10_SOURCE 1
-# endif
-
-# if defined(GC_DGUX386_THREADS) && !defined(_USING_POSIX4A_DRAFT10)
-#   define _USING_POSIX4A_DRAFT10 1
-# endif
+#if defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS)
 
 # include <stdlib.h>
 # include <pthread.h>
 #if defined(GC_NETBSD_THREADS)
 # include <sys/param.h>
 # include <sys/sysctl.h>
-#endif        /* GC_NETBSD_THREADS */
+#endif /* GC_NETBSD_THREADS */
 
-/* Allocator lock definitions.         */
+/* Allocator lock definitions.          */
 #if !defined(USE_SPIN_LOCK)
-  pthread_mutex_t GC_allocate_ml = PTHREAD_MUTEX_INITIALIZER;
+  GC_INNER pthread_mutex_t GC_allocate_ml = PTHREAD_MUTEX_INITIALIZER;
 #endif
-unsigned long GC_lock_holder = NO_THREAD;
-               /* Used only for assertions, and to prevent      */
-               /* recursive reentry in the system call wrapper. */
+GC_INNER unsigned long GC_lock_holder = NO_THREAD;
+                /* Used only for assertions, and to prevent      */
+                /* recursive reentry in the system call wrapper. */
 
 #if defined(GC_DGUX386_THREADS)
 # include <sys/dg_sys_info.h>
 # include <sys/_int_psem.h>
   /* sem_t is an uint in DG/UX */
-  typedef unsigned int  sem_t;
+  typedef unsigned int sem_t;
 #endif /* GC_DGUX386_THREADS */
 
-#ifndef __GNUC__
-#   define __inline__
-#endif
-
 /* Undefine macros used to redirect pthread primitives. */
 # undef pthread_create
-# if !defined(GC_DARWIN_THREADS)
+# if !defined(GC_DARWIN_THREADS) && !defined(GC_OPENBSD_THREADS)
 #   undef pthread_sigmask
 # endif
 # undef pthread_join
@@ -127,19 +114,19 @@ unsigned long GC_lock_holder = NO_THREAD;
 #     include <dlfcn.h>
 #     define WRAP_FUNC(f) f
 #     define REAL_FUNC(f) GC_real_##f
-      /* We define both GC_f and plain f to be the wrapped function.   */
-      /* In that way plain calls work, as do calls from files that     */
-      /* included gc.h, wich redefined f to GC_f.                      */
+      /* We define both GC_f and plain f to be the wrapped function.    */
+      /* In that way plain calls work, as do calls from files that      */
+      /* included gc.h, wich redefined f to GC_f.                       */
       /* FIXME: Needs work for DARWIN and True64 (OSF1) */
       typedef int (* GC_pthread_create_t)(pthread_t *, const pthread_attr_t *,
-                                         void * (*)(void *), void *);
-      static GC_pthread_create_t GC_real_pthread_create;
+                                          void * (*)(void *), void *);
+      static GC_pthread_create_t REAL_FUNC(pthread_create);
       typedef int (* GC_pthread_sigmask_t)(int, const sigset_t *, sigset_t *);
-      static GC_pthread_sigmask_t GC_real_pthread_sigmask;
+      static GC_pthread_sigmask_t REAL_FUNC(pthread_sigmask);
       typedef int (* GC_pthread_join_t)(pthread_t, void **);
-      static GC_pthread_join_t GC_real_pthread_join;
+      static GC_pthread_join_t REAL_FUNC(pthread_join);
       typedef int (* GC_pthread_detach_t)(pthread_t);
-      static GC_pthread_detach_t GC_real_pthread_detach;
+      static GC_pthread_detach_t REAL_FUNC(pthread_detach);
 #   else
 #     define WRAP_FUNC(f) GC_##f
 #     if !defined(GC_DGUX386_THREADS)
@@ -150,27 +137,35 @@ unsigned long GC_lock_holder = NO_THREAD;
 #   endif
 #endif
 
-#if defined(GC_USE_DL_WRAP) || defined(GC_USE_DLOPEN_WRAP)
-/* Define GC_ functions as aliases for the plain ones, which will      */
-/* be intercepted.  This allows files which include gc.h, and hence    */
-/* generate references to the GC_ symbols, to see the right symbols.   */
-      int GC_pthread_create(pthread_t * t, const pthread_attr_t * a,
-                        void * (* fn)(void *), void * arg) {
-         return pthread_create(t, a, fn, arg);
+#if defined(GC_USE_LD_WRAP) || defined(GC_USE_DLOPEN_WRAP)
+/* Define GC_ functions as aliases for the plain ones, which will       */
+/* be intercepted.  This allows files which include gc.h, and hence     */
+/* generate references to the GC_ symbols, to see the right symbols.    */
+      GC_API int GC_pthread_create(pthread_t * t, const pthread_attr_t * a,
+                                   void * (* fn)(void *), void * arg)
+      {
+          return pthread_create(t, a, fn, arg);
       }
-      int GC_pthread_sigmask(int how, const sigset_t *mask, sigset_t *old) {
-         return pthread_sigmask(how, mask, old);
+
+      GC_API int GC_pthread_sigmask(int how, const sigset_t *mask,
+                                    sigset_t *old)
+      {
+          return pthread_sigmask(how, mask, old);
       }
-      int GC_pthread_join(pthread_t t, void **res) {
-         return pthread_join(t, res);
+
+      GC_API int GC_pthread_join(pthread_t t, void **res)
+      {
+          return pthread_join(t, res);
       }
-      int GC_pthread_detach(pthread_t t) {
-         return pthread_detach(t);
+
+      GC_API int GC_pthread_detach(pthread_t t)
+      {
+          return pthread_detach(t);
       }
 #endif /* Linker-based interception. */
 
 #ifdef GC_USE_DLOPEN_WRAP
-  static GC_bool GC_syms_initialized = FALSE;
+  STATIC GC_bool GC_syms_initialized = FALSE;
 
   STATIC void GC_init_real_syms(void)
   {
@@ -195,14 +190,14 @@ unsigned long GC_lock_holder = NO_THREAD;
       }
       if (NULL == dl_handle) ABORT("Couldn't open libpthread\n");
 #   endif
-    GC_real_pthread_create = (GC_pthread_create_t)
-                               dlsym(dl_handle, "pthread_create");
-    GC_real_pthread_sigmask = (GC_pthread_sigmask_t)
-                               dlsym(dl_handle, "pthread_sigmask");
-    GC_real_pthread_join = (GC_pthread_join_t)
-                               dlsym(dl_handle, "pthread_join");
-    GC_real_pthread_detach = (GC_pthread_detach_t)
-                               dlsym(dl_handle, "pthread_detach");
+    REAL_FUNC(pthread_create) = (GC_pthread_create_t)
+                                dlsym(dl_handle, "pthread_create");
+    REAL_FUNC(pthread_sigmask) = (GC_pthread_sigmask_t)
+                                dlsym(dl_handle, "pthread_sigmask");
+    REAL_FUNC(pthread_join) = (GC_pthread_join_t)
+                                dlsym(dl_handle, "pthread_join");
+    REAL_FUNC(pthread_detach) = (GC_pthread_detach_t)
+                                dlsym(dl_handle, "pthread_detach");
     GC_syms_initialized = TRUE;
   }
 
@@ -211,32 +206,28 @@ unsigned long GC_lock_holder = NO_THREAD;
 # define INIT_REAL_SYMS()
 #endif
 
-void GC_thr_init(void);
-
 static GC_bool parallel_initialized = FALSE;
 
-GC_bool GC_need_to_lock = FALSE;
-
-void GC_init_parallel(void);
+GC_INNER GC_bool GC_need_to_lock = FALSE;
 
 STATIC long GC_nprocs = 1;
-                       /* Number of processors.  We may not have       */
-                       /* access to all of them, but this is as good   */
-                       /* a guess as any ...                           */
+                        /* Number of processors.  We may not have       */
+                        /* access to all of them, but this is as good   */
+                        /* a guess as any ...                           */
 
 #ifdef THREAD_LOCAL_ALLOC
-/* We must explicitly mark ptrfree and gcj free lists, since the free  */
-/* list links wouldn't otherwise be found.  We also set them in the    */
-/* normal free lists, since that involves touching less memory than if */
-/* we scanned them normally.                                           */
-void GC_mark_thread_local_free_lists(void)
+/* We must explicitly mark ptrfree and gcj free lists, since the free   */
+/* list links wouldn't otherwise be found.  We also set them in the     */
+/* normal free lists, since that involves touching less memory than if  */
+/* we scanned them normally.                                            */
+GC_INNER void GC_mark_thread_local_free_lists(void)
 {
     int i;
     GC_thread p;
-    
+
     for (i = 0; i < THREAD_TABLE_SZ; ++i) {
       for (p = GC_threads[i]; 0 != p; p = p -> next) {
-       GC_mark_thread_local_fls_for(&(p->tlfs));
+        GC_mark_thread_local_fls_for(&(p->tlfs));
       }
     }
 }
@@ -245,22 +236,23 @@ void GC_mark_thread_local_free_lists(void)
     void GC_check_tls_for(GC_tlfs p);
 #   if defined(USE_CUSTOM_SPECIFIC)
       void GC_check_tsd_marks(tsd *key);
-#   endif 
-    /* Check that all thread-local free-lists are completely marked.   */
-    /* also check that thread-specific-data structures are marked.     */
-    void GC_check_tls(void) {
-       int i;
-       GC_thread p;
-       
-       for (i = 0; i < THREAD_TABLE_SZ; ++i) {
-         for (p = GC_threads[i]; 0 != p; p = p -> next) {
-           GC_check_tls_for(&(p->tlfs));
-         }
-       }
+#   endif
+    /* Check that all thread-local free-lists are completely marked.    */
+    /* also check that thread-specific-data structures are marked.      */
+    void GC_check_tls(void)
+    {
+        int i;
+        GC_thread p;
+
+        for (i = 0; i < THREAD_TABLE_SZ; ++i) {
+          for (p = GC_threads[i]; 0 != p; p = p -> next) {
+            GC_check_tls_for(&(p->tlfs));
+          }
+        }
 #       if defined(USE_CUSTOM_SPECIFIC)
-         if (GC_thread_key != 0)
-           GC_check_tsd_marks(GC_thread_key);
-#      endif 
+          if (GC_thread_key != 0)
+            GC_check_tsd_marks(GC_thread_key);
+#       endif
     }
 #endif /* GC_ASSERTIONS */
 
@@ -280,7 +272,11 @@ static ptr_t marker_sp[MAX_MARKERS - 1] = {0};
 STATIC void * GC_mark_thread(void * id)
 {
   word my_mark_no = 0;
+  IF_CANCEL(int cancel_state;)
 
+  DISABLE_CANCEL(cancel_state);
+                         /* Mark threads are not cancellable; they      */
+                         /* should be invisible to client.              */
   marker_sp[(word)id] = GC_approx_sp();
 # ifdef IA64
     marker_bsp[(word)id] = GC_save_regs_in_stack();
@@ -289,30 +285,26 @@ STATIC void * GC_mark_thread(void * id)
   if ((word)id == (word)-1) return 0; /* to make compiler happy */
 
   for (;; ++my_mark_no) {
-    /* GC_mark_no is passed only to allow GC_help_marker to terminate  */
-    /* promptly.  This is important if it were called from the signal  */
-    /* handler or from the GC lock acquisition code.  Under Linux, it's        */
-    /* not safe to call it from a signal handler, since it uses mutexes        */
-    /* and condition variables.  Since it is called only here, the     */
-    /* argument is unnecessary.                                                */
+    /* GC_mark_no is passed only to allow GC_help_marker to terminate   */
+    /* promptly.  This is important if it were called from the signal   */
+    /* handler or from the GC lock acquisition code.  Under Linux, it's */
+    /* not safe to call it from a signal handler, since it uses mutexes */
+    /* and condition variables.  Since it is called only here, the      */
+    /* argument is unnecessary.                                         */
     if (my_mark_no < GC_mark_no || my_mark_no > GC_mark_no + 2) {
-       /* resynchronize if we get far off, e.g. because GC_mark_no     */
-       /* wrapped.                                                     */
-       my_mark_no = GC_mark_no;
+        /* resynchronize if we get far off, e.g. because GC_mark_no     */
+        /* wrapped.                                                     */
+        my_mark_no = GC_mark_no;
     }
 #   ifdef DEBUG_THREADS
-       GC_printf("Starting mark helper for mark number %lu\n",
-               (unsigned long)my_mark_no);
+      GC_printf("Starting mark helper for mark number %lu\n",
+                (unsigned long)my_mark_no);
 #   endif
     GC_help_marker(my_mark_no);
   }
 }
 
-extern long GC_markers;                /* Number of mark threads we would      */
-                               /* like to have.  Includes the          */
-                               /* initiating thread.                   */
-
-pthread_t GC_mark_threads[MAX_MARKERS];
+STATIC pthread_t GC_mark_threads[MAX_MARKERS];
 
 #define PTHREAD_CREATE REAL_FUNC(pthread_create)
 
@@ -322,44 +314,49 @@ static void start_mark_threads(void)
     pthread_attr_t attr;
 
     if (0 != pthread_attr_init(&attr)) ABORT("pthread_attr_init failed");
-       
+
     if (0 != pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED))
-       ABORT("pthread_attr_setdetachstate failed");
+        ABORT("pthread_attr_setdetachstate failed");
 
 #   if defined(HPUX) || defined(GC_DGUX386_THREADS)
       /* Default stack size is usually too small: fix it. */
-      /* Otherwise marker threads or GC may run out of   */
-      /* space.                                                  */
+      /* Otherwise marker threads or GC may run out of    */
+      /* space.                                           */
 #     define MIN_STACK_SIZE (8*HBLKSIZE*sizeof(word))
       {
-       size_t old_size;
-       int code;
+        size_t old_size;
+        int code;
 
         if (pthread_attr_getstacksize(&attr, &old_size) != 0)
-         ABORT("pthread_attr_getstacksize failed\n");
-       if (old_size < MIN_STACK_SIZE) {
-         if (pthread_attr_setstacksize(&attr, MIN_STACK_SIZE) != 0)
-                 ABORT("pthread_attr_setstacksize failed\n");
-       }
+          ABORT("pthread_attr_getstacksize failed\n");
+        if (old_size < MIN_STACK_SIZE) {
+          if (pthread_attr_setstacksize(&attr, MIN_STACK_SIZE) != 0)
+                  ABORT("pthread_attr_setstacksize failed\n");
+        }
       }
 #   endif /* HPUX || GC_DGUX386_THREADS */
-    if (GC_print_stats) {
-       GC_log_printf("Starting %ld marker threads\n", GC_markers - 1);
-    }
     for (i = 0; i < GC_markers - 1; ++i) {
       if (0 != PTHREAD_CREATE(GC_mark_threads + i, &attr,
-                             GC_mark_thread, (void *)(word)i)) {
-       WARN("Marker thread creation failed, errno = %ld.\n", errno);
+                              GC_mark_thread, (void *)(word)i)) {
+        WARN("Marker thread creation failed, errno = %" GC_PRIdPTR "\n",
+             errno);
+        /* Don't try to create other marker threads.    */
+        GC_markers = i + 1;
+        if (i == 0) GC_parallel = FALSE;
+        break;
       }
     }
+    if (GC_print_stats) {
+        GC_log_printf("Started %ld mark helper threads\n", GC_markers - 1);
+    }
     pthread_attr_destroy(&attr);
 }
 
 #endif /* PARALLEL_MARK */
 
-GC_bool GC_thr_initialized = FALSE;
+GC_INNER GC_bool GC_thr_initialized = FALSE;
 
-volatile GC_thread GC_threads[THREAD_TABLE_SZ];
+GC_INNER volatile GC_thread GC_threads[THREAD_TABLE_SZ] = {0};
 
 void GC_push_thread_structures(void)
 {
@@ -367,29 +364,29 @@ void GC_push_thread_structures(void)
     GC_push_all((ptr_t)(GC_threads), (ptr_t)(GC_threads)+sizeof(GC_threads));
 #   if defined(THREAD_LOCAL_ALLOC)
       GC_push_all((ptr_t)(&GC_thread_key),
-         (ptr_t)(&GC_thread_key)+sizeof(&GC_thread_key));
+          (ptr_t)(&GC_thread_key)+sizeof(&GC_thread_key));
 #   endif
 }
 
-/* It may not be safe to allocate when we register the first thread.   */
+/* It may not be safe to allocate when we register the first thread.    */
 static struct GC_Thread_Rep first_thread;
 
-/* Add a thread to GC_threads.  We assume it wasn't already there.     */
-/* Caller holds allocation lock.                                       */
+/* Add a thread to GC_threads.  We assume it wasn't already there.      */
+/* Caller holds allocation lock.                                        */
 STATIC GC_thread GC_new_thread(pthread_t id)
 {
     int hv = NUMERIC_THREAD_ID(id) % THREAD_TABLE_SZ;
     GC_thread result;
     static GC_bool first_thread_used = FALSE;
-    
+
     GC_ASSERT(I_HOLD_LOCK());
     if (!first_thread_used) {
-       result = &first_thread;
-       first_thread_used = TRUE;
+        result = &first_thread;
+        first_thread_used = TRUE;
     } else {
         result = (struct GC_Thread_Rep *)
-                GC_INTERNAL_MALLOC(sizeof(struct GC_Thread_Rep), NORMAL);
-       if (result == 0) return(0);
+                 GC_INTERNAL_MALLOC(sizeof(struct GC_Thread_Rep), NORMAL);
+        if (result == 0) return(0);
     }
     result -> id = id;
     result -> next = GC_threads[hv];
@@ -398,14 +395,14 @@ STATIC GC_thread GC_new_thread(pthread_t id)
     return(result);
 }
 
-/* Delete a thread from GC_threads.  We assume it is there.    */
-/* (The code intentionally traps if it wasn't.)                        */
+/* Delete a thread from GC_threads.  We assume it is there.     */
+/* (The code intentionally traps if it wasn't.)                 */
 STATIC void GC_delete_thread(pthread_t id)
 {
     int hv = NUMERIC_THREAD_ID(id) % THREAD_TABLE_SZ;
     register GC_thread p = GC_threads[hv];
     register GC_thread prev = 0;
-    
+
     GC_ASSERT(I_HOLD_LOCK());
     while (!THREAD_EQUAL(p -> id, id)) {
         prev = p;
@@ -417,15 +414,15 @@ STATIC void GC_delete_thread(pthread_t id)
         prev -> next = p -> next;
     }
 #   ifdef GC_DARWIN_THREADS
-       mach_port_deallocate(mach_task_self(), p->stop_info.mach_thread);
+        mach_port_deallocate(mach_task_self(), p->stop_info.mach_thread);
 #   endif
     GC_INTERNAL_FREE(p);
 }
 
-/* If a thread has been joined, but we have not yet            */
-/* been notified, then there may be more than one thread       */
-/* in the table with the same pthread id.                      */
-/* This is OK, but we need a way to delete a specific one.     */
+/* If a thread has been joined, but we have not yet             */
+/* been notified, then there may be more than one thread        */
+/* in the table with the same pthread id.                       */
+/* This is OK, but we need a way to delete a specific one.      */
 STATIC void GC_delete_gc_thread(GC_thread gc_id)
 {
     pthread_t id = gc_id -> id;
@@ -444,31 +441,73 @@ STATIC void GC_delete_gc_thread(GC_thread gc_id)
         prev -> next = p -> next;
     }
 #   ifdef GC_DARWIN_THREADS
-       mach_port_deallocate(mach_task_self(), p->stop_info.mach_thread);
+        mach_port_deallocate(mach_task_self(), p->stop_info.mach_thread);
 #   endif
     GC_INTERNAL_FREE(p);
 }
 
-/* Return a GC_thread corresponding to a given pthread_t.      */
-/* Returns 0 if it's not there.                                        */
-/* Caller holds  allocation lock or otherwise inhibits                 */
-/* updates.                                                    */
-/* If there is more than one thread with the given id we       */
-/* return the most recent one.                                 */
-GC_thread GC_lookup_thread(pthread_t id)
+/* Return a GC_thread corresponding to a given pthread_t.       */
+/* Returns 0 if it's not there.                                 */
+/* Caller holds allocation lock or otherwise inhibits           */
+/* updates.                                                     */
+/* If there is more than one thread with the given id we        */
+/* return the most recent one.                                  */
+GC_INNER GC_thread GC_lookup_thread(pthread_t id)
 {
     int hv = NUMERIC_THREAD_ID(id) % THREAD_TABLE_SZ;
     register GC_thread p = GC_threads[hv];
-    
+
     while (p != 0 && !THREAD_EQUAL(p -> id, id)) p = p -> next;
     return(p);
 }
 
+/* Called by GC_finalize() (in case of an allocation failure observed). */
+GC_INNER void GC_reset_finalizer_nested(void)
+{
+  GC_thread me = GC_lookup_thread(pthread_self());
+  me->finalizer_nested = 0;
+}
+
+/* Checks and updates the thread-local level of finalizers recursion.   */
+/* Returns NULL if GC_invoke_finalizers() should not be called by the   */
+/* collector (to minimize the risk of a deep finalizers recursion),     */
+/* otherwise returns a pointer to the thread-local finalizer_nested.    */
+/* Called by GC_notify_or_invoke_finalizers() only (the lock is held).  */
+GC_INNER unsigned *GC_check_finalizer_nested(void)
+{
+  GC_thread me = GC_lookup_thread(pthread_self());
+  unsigned nesting_level = me->finalizer_nested;
+  if (nesting_level) {
+    /* We are inside another GC_invoke_finalizers().            */
+    /* Skip some implicitly-called GC_invoke_finalizers()       */
+    /* depending on the nesting (recursion) level.              */
+    if (++me->finalizer_skipped < (1U << nesting_level)) return NULL;
+    me->finalizer_skipped = 0;
+  }
+  me->finalizer_nested = nesting_level + 1;
+  return &me->finalizer_nested;
+}
+
+#if defined(GC_ASSERTIONS) && defined(THREAD_LOCAL_ALLOC)
+  /* This is called from thread-local GC_malloc(). */
+  GC_bool GC_is_thread_tsd_valid(void *tsd)
+  {
+    char *me;
+    LOCK();
+    me = (char *)GC_lookup_thread(pthread_self());
+    UNLOCK();
+    /* FIXME: We can check tsd more correctly (since now we have access */
+    /* to the right declarations).  This old algorithm (moved from      */
+    /* thread_local_alloc.c) checks only that it's close.               */
+    return((char *)tsd > me && (char *)tsd < me + 1000);
+  }
+#endif
+
 #ifdef HANDLE_FORK
-/* Remove all entries from the GC_threads table, except the    */
-/* one for the current thread.  We need to do this in the child        */
-/* process after a fork(), since only the current thread       */
-/* survives in the child.                                      */
+/* Remove all entries from the GC_threads table, except the     */
+/* one for the current thread.  We need to do this in the child */
+/* process after a fork(), since only the current thread        */
+/* survives in the child.                                       */
 STATIC void GC_remove_all_threads_but_me(void)
 {
     pthread_t self = pthread_self();
@@ -478,18 +517,18 @@ STATIC void GC_remove_all_threads_but_me(void)
     for (hv = 0; hv < THREAD_TABLE_SZ; ++hv) {
       me = 0;
       for (p = GC_threads[hv]; 0 != p; p = next) {
-       next = p -> next;
-       if (THREAD_EQUAL(p -> id, self)) {
-         me = p;
-         p -> next = 0;
-       } else {
-#        ifdef THREAD_LOCAL_ALLOC
-           if (!(p -> flags & FINISHED)) {
-             GC_destroy_thread_local(&(p->tlfs));
-           }
-#        endif /* THREAD_LOCAL_ALLOC */
-         if (p != &first_thread) GC_INTERNAL_FREE(p);
-       }
+        next = p -> next;
+        if (THREAD_EQUAL(p -> id, self)) {
+          me = p;
+          p -> next = 0;
+        } else {
+#         ifdef THREAD_LOCAL_ALLOC
+            if (!(p -> flags & FINISHED)) {
+              GC_destroy_thread_local(&(p->tlfs));
+            }
+#         endif /* THREAD_LOCAL_ALLOC */
+          if (p != &first_thread) GC_INTERNAL_FREE(p);
+        }
       }
       GC_threads[hv] = me;
     }
@@ -497,169 +536,178 @@ STATIC void GC_remove_all_threads_but_me(void)
 #endif /* HANDLE_FORK */
 
 #ifdef USE_PROC_FOR_LIBRARIES
-GC_bool GC_segment_is_thread_stack(ptr_t lo, ptr_t hi)
-{
+  GC_INNER GC_bool GC_segment_is_thread_stack(ptr_t lo, ptr_t hi)
+  {
     int i;
     GC_thread p;
-    
+
     GC_ASSERT(I_HOLD_LOCK());
 #   ifdef PARALLEL_MARK
       for (i = 0; i < GC_markers - 1; ++i) {
-       if (marker_sp[i] > lo & marker_sp[i] < hi) return TRUE;
+        if (marker_sp[i] > lo & marker_sp[i] < hi) return TRUE;
 #       ifdef IA64
-         if (marker_bsp[i] > lo & marker_bsp[i] < hi) return TRUE;
-#      endif
+          if (marker_bsp[i] > lo & marker_bsp[i] < hi) return TRUE;
+#       endif
       }
 #   endif
     for (i = 0; i < THREAD_TABLE_SZ; i++) {
       for (p = GC_threads[i]; p != 0; p = p -> next) {
-       if (0 != p -> stack_end) {
-#        ifdef STACK_GROWS_UP
+        if (0 != p -> stack_end) {
+#         ifdef STACK_GROWS_UP
             if (p -> stack_end >= lo && p -> stack_end < hi) return TRUE;
-#        else /* STACK_GROWS_DOWN */
+#         else /* STACK_GROWS_DOWN */
             if (p -> stack_end > lo && p -> stack_end <= hi) return TRUE;
-#        endif
-       }
+#         endif
+        }
       }
     }
     return FALSE;
-}
+  }
 #endif /* USE_PROC_FOR_LIBRARIES */
 
 #ifdef IA64
-/* Find the largest stack_base smaller than bound.  May be used        */
-/* to find the boundary between a register stack and adjacent  */
-/* immediately preceding memory stack.                         */
-ptr_t GC_greatest_stack_base_below(ptr_t bound)
-{
+  /* Find the largest stack_base smaller than bound.  May be used       */
+  /* to find the boundary between a register stack and adjacent         */
+  /* immediately preceding memory stack.                                */
+  GC_INNER ptr_t GC_greatest_stack_base_below(ptr_t bound)
+  {
     int i;
     GC_thread p;
     ptr_t result = 0;
-    
+
     GC_ASSERT(I_HOLD_LOCK());
 #   ifdef PARALLEL_MARK
       for (i = 0; i < GC_markers - 1; ++i) {
-       if (marker_sp[i] > result && marker_sp[i] < bound)
-         result = marker_sp[i];
+        if (marker_sp[i] > result && marker_sp[i] < bound)
+          result = marker_sp[i];
       }
 #   endif
     for (i = 0; i < THREAD_TABLE_SZ; i++) {
       for (p = GC_threads[i]; p != 0; p = p -> next) {
-       if (p -> stack_end > result && p -> stack_end < bound) {
-         result = p -> stack_end;
-       }
+        if (p -> stack_end > result && p -> stack_end < bound) {
+          result = p -> stack_end;
+        }
       }
     }
     return result;
-}
+  }
 #endif /* IA64 */
 
 #ifdef GC_LINUX_THREADS
-/* Return the number of processors, or i<= 0 if it can't be determined.        */
-STATIC int GC_get_nprocs(void)
-{
-    /* Should be "return sysconf(_SC_NPROCESSORS_ONLN);" but that      */
-    /* appears to be buggy in many cases.                              */
-    /* We look for lines "cpu<n>" in /proc/stat.                       */
-#   define STAT_BUF_SIZE 4096
-#   define STAT_READ read
-       /* If read is wrapped, this may need to be redefined to call    */
-       /* the real one.                                                */
+  /* Return the number of processors, or i<= 0 if it can't be determined. */
+  STATIC int GC_get_nprocs(void)
+  {
+    /* Should be "return sysconf(_SC_NPROCESSORS_ONLN);" but that       */
+    /* appears to be buggy in many cases.                               */
+    /* We look for lines "cpu<n>" in /proc/stat.                        */
+#   ifndef STAT_READ
+      /* Also defined in os_dep.c. */
+#     define STAT_BUF_SIZE 4096
+#     define STAT_READ read
+#   endif
+        /* If read is wrapped, this may need to be redefined to call    */
+        /* the real one.                                                */
     char stat_buf[STAT_BUF_SIZE];
     int f;
     word result = 1;
-       /* Some old kernels only have a single "cpu nnnn ..."   */
-       /* entry in /proc/stat.  We identify those as           */
-       /* uniprocessors.                                       */
+        /* Some old kernels only have a single "cpu nnnn ..."   */
+        /* entry in /proc/stat.  We identify those as           */
+        /* uniprocessors.                                       */
     size_t i, len = 0;
 
     f = open("/proc/stat", O_RDONLY);
     if (f < 0 || (len = STAT_READ(f, stat_buf, STAT_BUF_SIZE)) < 100) {
-       WARN("Couldn't read /proc/stat\n", 0);
-       return -1;
+        WARN("Couldn't read /proc/stat\n", 0);
+        return -1;
     }
     for (i = 0; i < len - 100; ++i) {
         if (stat_buf[i] == '\n' && stat_buf[i+1] == 'c'
-           && stat_buf[i+2] == 'p' && stat_buf[i+3] == 'u') {
-           int cpu_no = atoi(stat_buf + i + 4);
-           if (cpu_no >= result) result = cpu_no + 1;
-       }
+            && stat_buf[i+2] == 'p' && stat_buf[i+3] == 'u') {
+            int cpu_no = atoi(stat_buf + i + 4);
+            if (cpu_no >= result) result = cpu_no + 1;
+        }
     }
     close(f);
     return result;
-}
+  }
 #endif /* GC_LINUX_THREADS */
 
-/* We hold the GC lock.  Wait until an in-progress GC has finished.    */
-/* Repeatedly RELEASES GC LOCK in order to wait.                       */
-/* If wait_for_all is true, then we exit with the GC lock held and no  */
-/* collection in progress; otherwise we just wait for the current GC   */
-/* to finish.                                                          */
-extern GC_bool GC_collection_in_progress(void);
+/* We hold the GC lock.  Wait until an in-progress GC has finished.     */
+/* Repeatedly RELEASES GC LOCK in order to wait.                        */
+/* If wait_for_all is true, then we exit with the GC lock held and no   */
+/* collection in progress; otherwise we just wait for the current GC    */
+/* to finish.                                                           */
 STATIC void GC_wait_for_gc_completion(GC_bool wait_for_all)
 {
     GC_ASSERT(I_HOLD_LOCK());
+    ASSERT_CANCEL_DISABLED();
     if (GC_incremental && GC_collection_in_progress()) {
-       int old_gc_no = GC_gc_no;
-
-       /* Make sure that no part of our stack is still on the mark stack, */
-       /* since it's about to be unmapped.                                */
-       while (GC_incremental && GC_collection_in_progress()
-              && (wait_for_all || old_gc_no == GC_gc_no)) {
-           ENTER_GC();
-           GC_in_thread_creation = TRUE;
+        int old_gc_no = GC_gc_no;
+
+        /* Make sure that no part of our stack is still on the mark stack, */
+        /* since it's about to be unmapped.                                */
+        while (GC_incremental && GC_collection_in_progress()
+               && (wait_for_all || old_gc_no == GC_gc_no)) {
+            ENTER_GC();
+            GC_in_thread_creation = TRUE;
             GC_collect_a_little_inner(1);
-           GC_in_thread_creation = FALSE;
-           EXIT_GC();
-           UNLOCK();
-           sched_yield();
-           LOCK();
-       }
+            GC_in_thread_creation = FALSE;
+            EXIT_GC();
+            UNLOCK();
+            sched_yield();
+            LOCK();
+        }
     }
 }
 
 #ifdef HANDLE_FORK
 /* Procedures called before and after a fork.  The goal here is to make */
-/* it safe to call GC_malloc() in a forked child.  It's unclear that is        */
-/* attainable, since the single UNIX spec seems to imply that one      */
-/* should only call async-signal-safe functions, and we probably can't */
-/* quite guarantee that.  But we give it our best shot.  (That same    */
-/* spec also implies that it's not safe to call the system malloc      */
-/* between fork() and exec().  Thus we're doing no worse than it.      */
-
-/* Called before a fork()              */
+/* it safe to call GC_malloc() in a forked child.  It's unclear that is */
+/* attainable, since the single UNIX spec seems to imply that one       */
+/* should only call async-signal-safe functions, and we probably can't  */
+/* quite guarantee that.  But we give it our best shot.  (That same     */
+/* spec also implies that it's not safe to call the system malloc       */
+/* between fork() and exec().  Thus we're doing no worse than it.)      */
+
+IF_CANCEL(static int fork_cancel_state;)
+                                /* protected by allocation lock.        */
+
+/* Called before a fork()               */
 STATIC void GC_fork_prepare_proc(void)
 {
-    /* Acquire all relevant locks, so that after releasing the locks   */
-    /* the child will see a consistent state in which monitor          */
-    /* invariants hold.         Unfortunately, we can't acquire libc locks     */
-    /* we might need, and there seems to be no guarantee that libc     */
-    /* must install a suitable fork handler.                           */
-    /* Wait for an ongoing GC to finish, since we can't finish it in   */
-    /* the (one remaining thread in) the child.                                */
+    /* Acquire all relevant locks, so that after releasing the locks    */
+    /* the child will see a consistent state in which monitor           */
+    /* invariants hold.  Unfortunately, we can't acquire libc locks     */
+    /* we might need, and there seems to be no guarantee that libc      */
+    /* must install a suitable fork handler.                            */
+    /* Wait for an ongoing GC to finish, since we can't finish it in    */
+    /* the (one remaining thread in) the child.                         */
       LOCK();
+      DISABLE_CANCEL(fork_cancel_state);
+                /* Following waits may include cancellation points. */
 #     if defined(PARALLEL_MARK)
-       if (GC_parallel)
+        if (GC_parallel)
           GC_wait_for_reclaim();
 #     endif
       GC_wait_for_gc_completion(TRUE);
 #     if defined(PARALLEL_MARK)
-       if (GC_parallel)
+        if (GC_parallel)
           GC_acquire_mark_lock();
 #     endif
 }
 
-/* Called in parent after a fork()     */
+/* Called in parent after a fork()      */
 STATIC void GC_fork_parent_proc(void)
 {
 #   if defined(PARALLEL_MARK)
       if (GC_parallel)
         GC_release_mark_lock();
 #   endif
+    RESTORE_CANCEL(fork_cancel_state);
     UNLOCK();
 }
 
-/* Called in child after a fork()      */
+/* Called in child after a fork()       */
 STATIC void GC_fork_child_proc(void)
 {
     /* Clean up the thread table, so that just our thread is left. */
@@ -669,26 +717,27 @@ STATIC void GC_fork_child_proc(void)
 #   endif
     GC_remove_all_threads_but_me();
 #   ifdef PARALLEL_MARK
-      /* Turn off parallel marking in the child, since we are probably         */
-      /* just going to exec, and we would have to restart mark threads.        */
+      /* Turn off parallel marking in the child, since we are probably  */
+      /* just going to exec, and we would have to restart mark threads. */
         GC_markers = 1;
         GC_parallel = FALSE;
 #   endif /* PARALLEL_MARK */
+    RESTORE_CANCEL(fork_cancel_state);
     UNLOCK();
 }
 #endif /* HANDLE_FORK */
 
 #if defined(GC_DGUX386_THREADS)
-/* Return the number of processors, or i<= 0 if it can't be determined. */
-STATIC int GC_get_nprocs(void)
-{
+  /* Return the number of processors, or i<= 0 if it can't be determined. */
+  STATIC int GC_get_nprocs(void)
+  {
     /* <takis@XFree86.Org> */
     int numCpus;
     struct dg_sys_info_pm_info pm_sysinfo;
     int status =0;
 
     status = dg_sys_info((long int *) &pm_sysinfo,
-       DG_SYS_INFO_PM_INFO_TYPE, DG_SYS_INFO_PM_CURRENT_VERSION);
+        DG_SYS_INFO_PM_INFO_TYPE, DG_SYS_INFO_PM_CURRENT_VERSION);
     if (status < 0)
        /* set -1 for error */
        numCpus = -1;
@@ -697,30 +746,30 @@ STATIC int GC_get_nprocs(void)
       numCpus = pm_sysinfo.idle_vp_count;
 
 #  ifdef DEBUG_THREADS
-    GC_printf("Number of active CPUs in this system: %d\n", numCpus);
+     GC_printf("Number of active CPUs in this system: %d\n", numCpus);
 #  endif
     return(numCpus);
-}
+  }
 #endif /* GC_DGUX386_THREADS */
 
 #if defined(GC_NETBSD_THREADS)
-static int get_ncpu(void)
-{
+  static int get_ncpu(void)
+  {
     int mib[] = {CTL_HW,HW_NCPU};
     int res;
     size_t len = sizeof(res);
 
     sysctl(mib, sizeof(mib)/sizeof(int), &res, &len, NULL, 0);
     return res;
-}
-#endif /* GC_NETBSD_THREADS */
+  }
+#endif  /* GC_NETBSD_THREADS */
 
-# if defined(GC_LINUX_THREADS) && defined(INCLUDE_LINUX_THREAD_DESCR)
-__thread int dummy_thread_local;
-# endif
+#if defined(GC_LINUX_THREADS) && defined(INCLUDE_LINUX_THREAD_DESCR)
+  __thread int GC_dummy_thread_local;
+#endif
 
-/* We hold the allocation lock.        */
-void GC_thr_init(void)
+/* We hold the allocation lock. */
+GC_INNER void GC_thr_init(void)
 {
 #   ifndef GC_DARWIN_THREADS
         int dummy;
@@ -729,28 +778,28 @@ void GC_thr_init(void)
 
     if (GC_thr_initialized) return;
     GC_thr_initialized = TRUE;
-    
+
 #   ifdef HANDLE_FORK
-      /* Prepare for a possible fork.  */
+      /* Prepare for a possible fork.   */
         pthread_atfork(GC_fork_prepare_proc, GC_fork_parent_proc,
-                      GC_fork_child_proc);
+                       GC_fork_child_proc);
 #   endif /* HANDLE_FORK */
 #   if defined(INCLUDE_LINUX_THREAD_DESCR)
-      /* Explicitly register the region including the address          */
-      /* of a thread local variable.  This should include thread       */
-      /* locals for the main thread, except for those allocated                */
-      /* in response to dlopen calls.                                  */  
-       {
-         ptr_t thread_local_addr = (ptr_t)(&dummy_thread_local);
-         ptr_t main_thread_start, main_thread_end;
+      /* Explicitly register the region including the address           */
+      /* of a thread local variable.  This should include thread        */
+      /* locals for the main thread, except for those allocated         */
+      /* in response to dlopen calls.                                   */
+        {
+          ptr_t thread_local_addr = (ptr_t)(&GC_dummy_thread_local);
+          ptr_t main_thread_start, main_thread_end;
           if (!GC_enclosing_mapping(thread_local_addr, &main_thread_start,
-                                   &main_thread_end)) {
-           ABORT("Failed to find mapping for main thread thread locals");
-         }
-         GC_add_roots_inner(main_thread_start, main_thread_end, FALSE);
-       }
+                                    &main_thread_end)) {
+            ABORT("Failed to find mapping for main thread thread locals");
+          }
+          GC_add_roots_inner(main_thread_start, main_thread_end, FALSE);
+        }
 #   endif
-    /* Add the initial thread, so we can stop it.      */
+    /* Add the initial thread, so we can stop it.       */
       t = GC_new_thread(pthread_self());
 #     ifdef GC_DARWIN_THREADS
          t -> stop_info.mach_thread = mach_thread_self();
@@ -763,75 +812,79 @@ void GC_thr_init(void)
 
     /* Set GC_nprocs.  */
       {
-       char * nprocs_string = GETENV("GC_NPROCS");
-       GC_nprocs = -1;
-       if (nprocs_string != NULL) GC_nprocs = atoi(nprocs_string);
+        char * nprocs_string = GETENV("GC_NPROCS");
+        GC_nprocs = -1;
+        if (nprocs_string != NULL) GC_nprocs = atoi(nprocs_string);
       }
       if (GC_nprocs <= 0) {
 #       if defined(GC_HPUX_THREADS)
-         GC_nprocs = pthread_num_processors_np();
+          GC_nprocs = pthread_num_processors_np();
+#       endif
+#       if defined(GC_OSF1_THREADS) || defined(GC_AIX_THREADS) \
+           || defined(GC_SOLARIS_THREADS) || defined(GC_GNU_THREADS)
+          GC_nprocs = sysconf(_SC_NPROCESSORS_ONLN);
+          if (GC_nprocs <= 0) GC_nprocs = 1;
 #       endif
-#      if defined(GC_OSF1_THREADS) || defined(GC_AIX_THREADS) \
-          || defined(GC_SOLARIS_THREADS) || defined(GC_GNU_THREADS)
-         GC_nprocs = sysconf(_SC_NPROCESSORS_ONLN);
-         if (GC_nprocs <= 0) GC_nprocs = 1;
-#      endif
 #       if defined(GC_IRIX_THREADS)
-         GC_nprocs = sysconf(_SC_NPROC_ONLN);
-         if (GC_nprocs <= 0) GC_nprocs = 1;
+          GC_nprocs = sysconf(_SC_NPROC_ONLN);
+          if (GC_nprocs <= 0) GC_nprocs = 1;
 #       endif
 #       if defined(GC_NETBSD_THREADS)
-         GC_nprocs = get_ncpu();
+          GC_nprocs = get_ncpu();
+#       endif
+#       if defined(GC_OPENBSD_THREADS)
+          /* FIXME: Implement real "get_ncpu". */
+          GC_nprocs = 2;
 #       endif
 #       if defined(GC_DARWIN_THREADS) || defined(GC_FREEBSD_THREADS)
-         int ncpus = 1;
-         size_t len = sizeof(ncpus);
-         sysctl((int[2]) {CTL_HW, HW_NCPU}, 2, &ncpus, &len, NULL, 0);
-         GC_nprocs = ncpus;
+          int ncpus = 1;
+          size_t len = sizeof(ncpus);
+          sysctl((int[2]) {CTL_HW, HW_NCPU}, 2, &ncpus, &len, NULL, 0);
+          GC_nprocs = ncpus;
 #       endif
-#      if defined(GC_LINUX_THREADS) || defined(GC_DGUX386_THREADS)
+#       if defined(GC_LINUX_THREADS) || defined(GC_DGUX386_THREADS)
           GC_nprocs = GC_get_nprocs();
-#      endif
+#       endif
       }
       if (GC_nprocs <= 0) {
-       WARN("GC_get_nprocs() returned %ld\n", GC_nprocs);
-       GC_nprocs = 2;
-#      ifdef PARALLEL_MARK
-         GC_markers = 1;
-#      endif
+        WARN("GC_get_nprocs() returned %" GC_PRIdPTR "\n", GC_nprocs);
+        GC_nprocs = 2;
+#       ifdef PARALLEL_MARK
+          GC_markers = 1;
+#       endif
       } else {
-#      ifdef PARALLEL_MARK
+#       ifdef PARALLEL_MARK
           {
-           char * markers_string = GETENV("GC_MARKERS");
-           if (markers_string != NULL) {
-             GC_markers = atoi(markers_string);
-             if (GC_markers > MAX_MARKERS) {
-               WARN("Limiting number of mark threads\n", 0);
-               GC_markers = MAX_MARKERS;
-             }
-           } else {
-             GC_markers = GC_nprocs;
-             if (GC_markers >= MAX_MARKERS)
-               GC_markers = MAX_MARKERS; /* silently limit GC_markers value */
-           }
+            char * markers_string = GETENV("GC_MARKERS");
+            if (markers_string != NULL) {
+              GC_markers = atoi(markers_string);
+              if (GC_markers > MAX_MARKERS) {
+                WARN("Limiting number of mark threads\n", 0);
+                GC_markers = MAX_MARKERS;
+              }
+            } else {
+              GC_markers = GC_nprocs;
+              if (GC_markers >= MAX_MARKERS)
+                GC_markers = MAX_MARKERS; /* silently limit GC_markers value */
+            }
           }
-#      endif
+#       endif
       }
 #   ifdef PARALLEL_MARK
       if (GC_print_stats) {
           GC_log_printf("Number of processors = %ld, "
-                "number of marker threads = %ld\n", GC_nprocs, GC_markers);
+                 "number of marker threads = %ld\n", GC_nprocs, GC_markers);
       }
       if (GC_markers <= 1) {
-       GC_parallel = FALSE;
-       if (GC_print_stats) {
-           GC_log_printf(
-               "Single marker thread, turning off parallel marking\n");
-       }
+        GC_parallel = FALSE;
+        if (GC_print_stats) {
+            GC_log_printf(
+                "Single marker thread, turning off parallel marking\n");
+        }
       } else {
-       GC_parallel = TRUE;
-       /* Disable true incremental collection, but generational is OK. */
-       GC_time_limit = GC_TIME_UNLIMITED;
+        GC_parallel = TRUE;
+        /* Disable true incremental collection, but generational is OK. */
+        GC_time_limit = GC_TIME_UNLIMITED;
       }
       /* If we are using a parallel marker, actually start helper threads.  */
         if (GC_parallel) start_mark_threads();
@@ -839,19 +892,19 @@ void GC_thr_init(void)
 }
 
 
-/* Perform all initializations, including those that   */
-/* may require allocation.                             */
-/* Called without allocation lock.                     */
-/* Must be called before a second thread is created.   */
-/* Did we say it's called without the allocation lock? */
-void GC_init_parallel(void)
+/* Perform all initializations, including those that    */
+/* may require allocation.                              */
+/* Called without allocation lock.                      */
+/* Must be called before a second thread is created.    */
+/* Did we say it's called without the allocation lock?  */
+GC_INNER void GC_init_parallel(void)
 {
     if (parallel_initialized) return;
     parallel_initialized = TRUE;
 
-    /* GC_init() calls us back, so set flag first.     */
+    /* GC_init() calls us back, so set flag first.      */
     if (!GC_is_initialized) GC_init();
-    /* Initialize thread local free lists if used.     */
+    /* Initialize thread local free lists if used.      */
 #   if defined(THREAD_LOCAL_ALLOC)
       LOCK();
       GC_init_thread_local(&(GC_lookup_thread(pthread_self())->tlfs));
@@ -859,12 +912,12 @@ void GC_init_parallel(void)
 #   endif
 }
 
-
-#if !defined(GC_DARWIN_THREADS)
-int WRAP_FUNC(pthread_sigmask)(int how, const sigset_t *set, sigset_t *oset)
-{
+#if !defined(GC_DARWIN_THREADS) && !defined(GC_OPENBSD_THREADS)
+  GC_API int WRAP_FUNC(pthread_sigmask)(int how, const sigset_t *set,
+                                        sigset_t *oset)
+  {
     sigset_t fudged_set;
-    
+
     INIT_REAL_SYMS();
     if (set != NULL && (how == SIG_BLOCK || how == SIG_SETMASK)) {
         fudged_set = *set;
@@ -872,101 +925,159 @@ int WRAP_FUNC(pthread_sigmask)(int how, const sigset_t *set, sigset_t *oset)
         set = &fudged_set;
     }
     return(REAL_FUNC(pthread_sigmask)(how, set, oset));
-}
+  }
 #endif /* !GC_DARWIN_THREADS */
 
-/* Wrapper for functions that are likely to block for an appreciable   */
-/* length of time.                                                     */
-
-struct blocking_data {
-    void (GC_CALLBACK *fn)(void *);
-    void *arg;
-};
+/* Wrapper for functions that are likely to block for an appreciable    */
+/* length of time.                                                      */
 
 /*ARGSUSED*/
-static void GC_do_blocking_inner(ptr_t data, void * context) {
+GC_INNER void GC_do_blocking_inner(ptr_t data, void * context)
+{
     struct blocking_data * d = (struct blocking_data *) data;
     GC_thread me;
     LOCK();
     me = GC_lookup_thread(pthread_self());
     GC_ASSERT(!(me -> thread_blocked));
 #   ifdef SPARC
-       me -> stop_info.stack_ptr = GC_save_regs_in_stack();
+        me -> stop_info.stack_ptr = GC_save_regs_in_stack();
 #   elif !defined(GC_DARWIN_THREADS)
-       me -> stop_info.stack_ptr = GC_approx_sp();
+        me -> stop_info.stack_ptr = GC_approx_sp();
 #   endif
 #   ifdef IA64
-       me -> backing_store_ptr = GC_save_regs_in_stack();
+        me -> backing_store_ptr = GC_save_regs_in_stack();
 #   endif
     me -> thread_blocked = TRUE;
     /* Save context here if we want to support precise stack marking */
     UNLOCK();
-    (d -> fn)(d -> arg);
-    LOCK();   /* This will block if the world is stopped.      */
+    d -> client_data = (d -> fn)(d -> client_data);
+    LOCK();   /* This will block if the world is stopped.       */
     me -> thread_blocked = FALSE;
     UNLOCK();
 }
 
-void GC_CALL GC_do_blocking(void (GC_CALLBACK *fn)(void *), void *arg) {
-    struct blocking_data my_data;
+/* GC_call_with_gc_active() has the opposite to GC_do_blocking()        */
+/* functionality.  It might be called from a user function invoked by   */
+/* GC_do_blocking() to temporarily back allow calling any GC function   */
+/* and/or manipulating pointers to the garbage collected heap.          */
+GC_API void * GC_CALL GC_call_with_gc_active(GC_fn_type fn,
+                                             void * client_data)
+{
+    struct GC_activation_frame_s frame;
+    GC_thread me;
+    LOCK();   /* This will block if the world is stopped.       */
+    me = GC_lookup_thread(pthread_self());
+
+    /* Adjust our stack base value (this could happen unless    */
+    /* GC_get_stack_base() was used which returned GC_SUCCESS). */
+    if ((me -> flags & MAIN_THREAD) == 0) {
+      GC_ASSERT(me -> stack_end != NULL);
+      if (me -> stack_end HOTTER_THAN (ptr_t)(&frame))
+        me -> stack_end = (ptr_t)(&frame);
+    } else {
+      /* The original stack. */
+      if (GC_stackbottom HOTTER_THAN (ptr_t)(&frame))
+        GC_stackbottom = (ptr_t)(&frame);
+    }
+
+    if (me -> thread_blocked == FALSE) {
+      /* We are not inside GC_do_blocking() - do nothing more.  */
+      UNLOCK();
+      return fn(client_data);
+    }
 
-    my_data.fn = fn;
-    my_data.arg = arg;
-    GC_with_callee_saves_pushed(GC_do_blocking_inner, (ptr_t)(&my_data));
+    /* Setup new "frame".       */
+#   ifdef GC_DARWIN_THREADS
+      /* FIXME: Implement it for Darwin ("frames" are ignored at present). */
+#   else
+      frame.saved_stack_ptr = me -> stop_info.stack_ptr;
+#   endif
+#   ifdef IA64
+      /* This is the same as in GC_call_with_stack_base().      */
+      frame.backing_store_end = GC_save_regs_in_stack();
+      /* Unnecessarily flushes register stack,          */
+      /* but that probably doesn't hurt.                */
+      frame.saved_backing_store_ptr = me -> backing_store_ptr;
+#   endif
+    frame.prev = me -> activation_frame;
+    me -> thread_blocked = FALSE;
+    me -> activation_frame = &frame;
+
+    UNLOCK();
+    client_data = fn(client_data);
+    GC_ASSERT(me -> thread_blocked == FALSE);
+    GC_ASSERT(me -> activation_frame == &frame);
+
+    /* Restore original "frame".        */
+    LOCK();
+    me -> activation_frame = frame.prev;
+#   ifdef IA64
+      me -> backing_store_ptr = frame.saved_backing_store_ptr;
+#   endif
+    me -> thread_blocked = TRUE;
+#   ifndef GC_DARWIN_THREADS
+      me -> stop_info.stack_ptr = frame.saved_stack_ptr;
+#   endif
+    UNLOCK();
+
+    return client_data; /* result */
 }
-    
+
 struct start_info {
     void *(*start_routine)(void *);
     void *arg;
     word flags;
-    sem_t registered;          /* 1 ==> in our thread table, but       */
-                               /* parent hasn't yet noticed.           */
+    sem_t registered;           /* 1 ==> in our thread table, but       */
+                                /* parent hasn't yet noticed.           */
 };
 
 GC_API int GC_CALL GC_unregister_my_thread(void)
 {
     GC_thread me;
+    IF_CANCEL(int cancel_state;)
 
     LOCK();
-    /* Wait for any GC that may be marking from our stack to   */
-    /* complete before we remove this thread.                  */
+    DISABLE_CANCEL(cancel_state);
+    /* Wait for any GC that may be marking from our stack to    */
+    /* complete before we remove this thread.                   */
     GC_wait_for_gc_completion(FALSE);
     me = GC_lookup_thread(pthread_self());
 #   if defined(THREAD_LOCAL_ALLOC)
       GC_destroy_thread_local(&(me->tlfs));
 #   endif
     if (me -> flags & DETACHED) {
-       GC_delete_thread(pthread_self());
+        GC_delete_thread(pthread_self());
     } else {
-       me -> flags |= FINISHED;
+        me -> flags |= FINISHED;
     }
 #   if defined(THREAD_LOCAL_ALLOC)
       GC_remove_specific(GC_thread_key);
 #   endif
+    RESTORE_CANCEL(cancel_state);
     UNLOCK();
     return GC_SUCCESS;
 }
 
-/* Called at thread exit.                              */
-/* Never called for main thread.  That's OK, since it  */
-/* results in at most a tiny one-time leak.  And       */
-/* linuxthreads doesn't reclaim the main threads       */
-/* resources or id anyway.                             */
+/* Called at thread exit.                               */
+/* Never called for main thread.  That's OK, since it   */
+/* results in at most a tiny one-time leak.  And        */
+/* linuxthreads doesn't reclaim the main threads        */
+/* resources or id anyway.                              */
 STATIC void GC_thread_exit_proc(void *arg)
 {
     GC_unregister_my_thread();
 }
 
-int WRAP_FUNC(pthread_join)(pthread_t thread, void **retval)
+GC_API int WRAP_FUNC(pthread_join)(pthread_t thread, void **retval)
 {
     int result;
     GC_thread thread_gc_id;
-    
+
     INIT_REAL_SYMS();
     LOCK();
     thread_gc_id = GC_lookup_thread(thread);
-    /* This is guaranteed to be the intended one, since the thread id  */
-    /* cant have been recycled by pthreads.                            */
+    /* This is guaranteed to be the intended one, since the thread id   */
+    /* can't have been recycled by pthreads.                            */
     UNLOCK();
     result = REAL_FUNC(pthread_join)(thread, retval);
 # if defined (GC_FREEBSD_THREADS)
@@ -989,12 +1100,11 @@ int WRAP_FUNC(pthread_join)(pthread_t thread, void **retval)
     return result;
 }
 
-int
-WRAP_FUNC(pthread_detach)(pthread_t thread)
+GC_API int WRAP_FUNC(pthread_detach)(pthread_t thread)
 {
     int result;
     GC_thread thread_gc_id;
-    
+
     INIT_REAL_SYMS();
     LOCK();
     thread_gc_id = GC_lookup_thread(thread);
@@ -1012,10 +1122,11 @@ WRAP_FUNC(pthread_detach)(pthread_t thread)
     return result;
 }
 
-GC_bool GC_in_thread_creation = FALSE;  /* Protected by allocation lock. */
+GC_INNER GC_bool GC_in_thread_creation = FALSE;
+                                /* Protected by allocation lock. */
 
-STATIC GC_thread GC_register_my_thread_inner(struct GC_stack_base *sb,
-                                            pthread_t my_pthread)
+STATIC GC_thread GC_register_my_thread_inner(const struct GC_stack_base *sb,
+                                             pthread_t my_pthread)
 {
     GC_thread me;
 
@@ -1046,34 +1157,34 @@ GC_API void GC_CALL GC_allow_register_threads(void)
     GC_need_to_lock = TRUE; /* We are multi-threaded now. */
 }
 
-GC_API int GC_CALL GC_register_my_thread(struct GC_stack_base *sb)
+GC_API int GC_CALL GC_register_my_thread(const struct GC_stack_base *sb)
 {
     pthread_t my_pthread = pthread_self();
     GC_thread me;
 
     if (GC_need_to_lock == FALSE)
-       ABORT("Threads explicit registering is not previously enabled");
+        ABORT("Threads explicit registering is not previously enabled");
 
     LOCK();
     me = GC_lookup_thread(my_pthread);
     if (0 == me) {
         me = GC_register_my_thread_inner(sb, my_pthread);
-       me -> flags |= DETACHED;
-         /* Treat as detached, since we do not need to worry about     */
-         /* pointer results.                                           */
+        me -> flags |= DETACHED;
+          /* Treat as detached, since we do not need to worry about     */
+          /* pointer results.                                           */
 #       if defined(THREAD_LOCAL_ALLOC)
           GC_init_thread_local(&(me->tlfs));
 #       endif
-       UNLOCK();
+        UNLOCK();
         return GC_SUCCESS;
     } else {
-       UNLOCK();
-       return GC_DUPLICATE;
+        UNLOCK();
+        return GC_DUPLICATE;
     }
 }
 
 STATIC void * GC_CALLBACK GC_inner_start_routine(struct GC_stack_base *sb,
-                                               void * arg)
+                                                 void * arg)
 {
     struct start_info * si = arg;
     void * result;
@@ -1084,9 +1195,8 @@ STATIC void * GC_CALLBACK GC_inner_start_routine(struct GC_stack_base *sb,
 
     my_pthread = pthread_self();
 #   ifdef DEBUG_THREADS
-        GC_printf("Starting thread 0x%x\n", (unsigned)my_pthread);
-        GC_printf("pid = %ld\n", (long) getpid());
-        GC_printf("sp = %p\n", &arg);
+        GC_printf("Starting thread 0x%x, pid = %ld, sp = %p\n",
+                  (unsigned)my_pthread, (long) getpid(), &arg);
 #   endif
     LOCK();
     me = GC_register_my_thread_inner(sb, my_pthread);
@@ -1097,21 +1207,21 @@ STATIC void * GC_CALLBACK GC_inner_start_routine(struct GC_stack_base *sb,
     UNLOCK();
     start = si -> start_routine;
 #   ifdef DEBUG_THREADS
-       GC_printf("start_routine = %p\n", (void *)(signed_word)start);
+        GC_printf("start_routine = %p\n", (void *)(signed_word)start);
 #   endif
     start_arg = si -> arg;
-    sem_post(&(si -> registered));     /* Last action on si.   */
-                                       /* OK to deallocate.    */
+    sem_post(&(si -> registered));      /* Last action on si.   */
+                                        /* OK to deallocate.    */
     pthread_cleanup_push(GC_thread_exit_proc, 0);
     result = (*start)(start_arg);
-#   if DEBUG_THREADS
+#   ifdef DEBUG_THREADS
         GC_printf("Finishing thread 0x%x\n", (unsigned)pthread_self());
 #   endif
     me -> status = result;
     pthread_cleanup_pop(1);
-    /* Cleanup acquires lock, ensuring that we can't exit              */
+    /* Cleanup acquires lock, ensuring that we can't exit               */
     /* while a collection that thinks we're alive is trying to stop     */
-    /* us.                                                             */
+    /* us.                                                              */
     return(result);
 }
 
@@ -1121,14 +1231,14 @@ STATIC void * GC_start_routine(void * arg)
       struct GC_stack_base sb;
 
 #     ifdef REDIRECT_MALLOC
-       /* GC_get_stack_base may call pthread_getattr_np, which can     */
-        /* unfortunately call realloc, which may allocate from an      */
-        /* unregistered thread.  This is unpleasant, since it might    */ 
-        /* force heap growth.                                          */
+        /* GC_get_stack_base may call pthread_getattr_np, which can     */
+        /* unfortunately call realloc, which may allocate from an       */
+        /* unregistered thread.  This is unpleasant, since it might     */
+        /* force heap growth.                                           */
         GC_disable();
 #     endif
       if (GC_get_stack_base(&sb) != GC_SUCCESS)
-       ABORT("Failed to get thread stack base.");
+        ABORT("Failed to get thread stack base.");
 #     ifdef REDIRECT_MALLOC
         GC_enable();
 #     endif
@@ -1138,30 +1248,30 @@ STATIC void * GC_start_routine(void * arg)
 #   endif
 }
 
-int
-WRAP_FUNC(pthread_create)(pthread_t *new_thread,
-                 const pthread_attr_t *attr,
+GC_API int WRAP_FUNC(pthread_create)(pthread_t *new_thread,
+                  const pthread_attr_t *attr,
                   void *(*start_routine)(void *), void *arg)
 {
     int result;
     int detachstate;
     word my_flags = 0;
-    struct start_info * si; 
-       /* This is otherwise saved only in an area mmapped by the thread */
-       /* library, which isn't visible to the collector.                */
-    /* We resist the temptation to muck with the stack size here,      */
-    /* even if the default is unreasonably small.  That's the client's */
-    /* responsibility.                                                 */
+    struct start_info * si;
+        /* This is otherwise saved only in an area mmapped by the thread */
+        /* library, which isn't visible to the collector.                */
+
+    /* We resist the temptation to muck with the stack size here,       */
+    /* even if the default is unreasonably small.  That's the client's  */
+    /* responsibility.                                                  */
 
     INIT_REAL_SYMS();
     LOCK();
     si = (struct start_info *)GC_INTERNAL_MALLOC(sizeof(struct start_info),
-                                                NORMAL);
+                                                 NORMAL);
     UNLOCK();
     if (!parallel_initialized) GC_init_parallel();
     if (0 == si &&
-        (si = (struct start_info *)GC_oom_fn(sizeof(struct start_info))) == 0)
+        (si = (struct start_info *)
+                (*GC_get_oom_fn())(sizeof(struct start_info))) == 0)
       return(ENOMEM);
     sem_init(&(si -> registered), 0, 0);
     si -> start_routine = start_routine;
@@ -1170,38 +1280,38 @@ WRAP_FUNC(pthread_create)(pthread_t *new_thread,
     if (!GC_thr_initialized) GC_thr_init();
 #   ifdef GC_ASSERTIONS
       {
-       size_t stack_size = 0;
-       if (NULL != attr) {
-          pthread_attr_getstacksize(attr, &stack_size);
-       }
-       if (0 == stack_size) {
-          pthread_attr_t my_attr;
-          pthread_attr_init(&my_attr);
-          pthread_attr_getstacksize(&my_attr, &stack_size);
-       }
-       /* On Solaris 10, with default attr initialization,     */
-       /* stack_size remains 0.  Fudge it.                     */
-       if (0 == stack_size) {
-#          ifndef SOLARIS
-             WARN("Failed to get stack size for assertion checking\n", 0);
-#          endif
-           stack_size = 1000000;
-       }
+        size_t stack_size = 0;
+        if (NULL != attr) {
+           pthread_attr_getstacksize(attr, &stack_size);
+        }
+        if (0 == stack_size) {
+           pthread_attr_t my_attr;
+           pthread_attr_init(&my_attr);
+           pthread_attr_getstacksize(&my_attr, &stack_size);
+        }
+        /* On Solaris 10, with default attr initialization,     */
+        /* stack_size remains 0.  Fudge it.                     */
+        if (0 == stack_size) {
+#           ifndef SOLARIS
+              WARN("Failed to get stack size for assertion checking\n", 0);
+#           endif
+            stack_size = 1000000;
+        }
 #       ifdef PARALLEL_MARK
-         GC_ASSERT(stack_size >= (8*HBLKSIZE*sizeof(word)));
+          GC_ASSERT(stack_size >= (8*HBLKSIZE*sizeof(word)));
 #       else
-          /* FreeBSD-5.3/Alpha: default pthread stack is 64K,  */
-         /* HBLKSIZE=8192, sizeof(word)=8                      */
-         GC_ASSERT(stack_size >= 65536);
+          /* FreeBSD-5.3/Alpha: default pthread stack is 64K,   */
+          /* HBLKSIZE=8192, sizeof(word)=8                      */
+          GC_ASSERT(stack_size >= 65536);
 #       endif
-       /* Our threads may need to do some work for the GC.     */
-       /* Ridiculously small threads won't work, and they      */
-       /* probably wouldn't work anyway.                       */
+        /* Our threads may need to do some work for the GC.     */
+        /* Ridiculously small threads won't work, and they      */
+        /* probably wouldn't work anyway.                       */
       }
 #   endif
     if (NULL == attr) {
-       detachstate = PTHREAD_CREATE_JOINABLE;
-    } else { 
+        detachstate = PTHREAD_CREATE_JOINABLE;
+    } else {
         pthread_attr_getdetachstate(attr, &detachstate);
     }
     if (PTHREAD_CREATE_DETACHED == detachstate) my_flags |= DETACHED;
@@ -1209,7 +1319,7 @@ WRAP_FUNC(pthread_create)(pthread_t *new_thread,
     UNLOCK();
 #   ifdef DEBUG_THREADS
         GC_printf("About to start new thread from thread 0x%x\n",
-                 (unsigned)pthread_self());
+                  (unsigned)pthread_self());
 #   endif
     GC_need_to_lock = TRUE;
 
@@ -1218,14 +1328,18 @@ WRAP_FUNC(pthread_create)(pthread_t *new_thread,
 #   ifdef DEBUG_THREADS
         GC_printf("Started thread 0x%x\n", (unsigned)(*new_thread));
 #   endif
-    /* Wait until child has been added to the thread table.            */
-    /* This also ensures that we hold onto si until the child is done  */
-    /* with it.  Thus it doesn't matter whether it is otherwise                */
-    /* visible to the collector.                                       */
+    /* Wait until child has been added to the thread table.             */
+    /* This also ensures that we hold onto si until the child is done   */
+    /* with it.  Thus it doesn't matter whether it is otherwise         */
+    /* visible to the collector.                                        */
     if (0 == result) {
-       while (0 != sem_wait(&(si -> registered))) {
+        IF_CANCEL(int cancel_state;)
+        DISABLE_CANCEL(cancel_state);
+                /* pthread_create is not a cancellation point. */
+        while (0 != sem_wait(&(si -> registered))) {
             if (EINTR != errno) ABORT("sem_wait failed");
-       }
+        }
+        RESTORE_CANCEL(cancel_state);
     }
     sem_destroy(&(si -> registered));
     LOCK();
@@ -1236,8 +1350,8 @@ WRAP_FUNC(pthread_create)(pthread_t *new_thread,
 }
 
 #if defined(USE_SPIN_LOCK) || !defined(NO_PTHREAD_TRYLOCK)
-/* Spend a few cycles in a way that can't introduce contention with    */
-/* other threads.                                                      */
+/* Spend a few cycles in a way that can't introduce contention with     */
+/* other threads.                                                       */
 STATIC void GC_pause(void)
 {
     int i;
@@ -1245,42 +1359,42 @@ STATIC void GC_pause(void)
       volatile word dummy = 0;
 #   endif
 
-    for (i = 0; i < 10; ++i) { 
+    for (i = 0; i < 10; ++i) {
 #     if defined(__GNUC__) && !defined(__INTEL_COMPILER)
         __asm__ __volatile__ (" " : : : "memory");
 #     else
-       /* Something that's unlikely to be optimized away. */
-       GC_noop(++dummy);
+        /* Something that's unlikely to be optimized away. */
+        GC_noop(++dummy);
 #     endif
     }
 }
 #endif
-    
-#define SPIN_MAX 128   /* Maximum number of calls to GC_pause before   */
-                       /* give up.                                     */
 
-volatile GC_bool GC_collecting = 0;
-                       /* A hint that we're in the collector and       */
+#define SPIN_MAX 128    /* Maximum number of calls to GC_pause before   */
+                        /* give up.                                     */
+
+GC_INNER volatile GC_bool GC_collecting = 0;
+                        /* A hint that we're in the collector and       */
                         /* holding the allocation lock for an           */
                         /* extended period.                             */
 
 #if (!defined(USE_SPIN_LOCK) && !defined(NO_PTHREAD_TRYLOCK)) \
-       || defined(PARALLEL_MARK)
-/* If we don't want to use the below spinlock implementation, either   */
-/* because we don't have a GC_test_and_set implementation, or because  */
-/* we don't want to risk sleeping, we can still try spinning on        */
-/* pthread_mutex_trylock for a while.  This appears to be very         */
-/* beneficial in many cases.                                           */
-/* I suspect that under high contention this is nearly always better   */
-/* than the spin lock.  But it's a bit slower on a uniprocessor.       */
-/* Hence we still default to the spin lock.                            */
-/* This is also used to acquire the mark lock for the parallel         */
-/* marker.                                                             */
-
-/* Here we use a strict exponential backoff scheme.  I don't know      */
-/* whether that's better or worse than the above.  We eventually       */
-/* yield by calling pthread_mutex_lock(); it never makes sense to      */
-/* explicitly sleep.                                                   */
+        || defined(PARALLEL_MARK)
+/* If we don't want to use the below spinlock implementation, either    */
+/* because we don't have a GC_test_and_set implementation, or because   */
+/* we don't want to risk sleeping, we can still try spinning on         */
+/* pthread_mutex_trylock for a while.  This appears to be very          */
+/* beneficial in many cases.                                            */
+/* I suspect that under high contention this is nearly always better    */
+/* than the spin lock.  But it's a bit slower on a uniprocessor.        */
+/* Hence we still default to the spin lock.                             */
+/* This is also used to acquire the mark lock for the parallel          */
+/* marker.                                                              */
+
+/* Here we use a strict exponential backoff scheme.  I don't know       */
+/* whether that's better or worse than the above.  We eventually        */
+/* yield by calling pthread_mutex_lock(); it never makes sense to       */
+/* explicitly sleep.                                                    */
 
 /* #define LOCK_STATS */
 #ifdef LOCK_STATS
@@ -1294,32 +1408,32 @@ STATIC void GC_generic_lock(pthread_mutex_t * lock)
 #ifndef NO_PTHREAD_TRYLOCK
     unsigned pause_length = 1;
     unsigned i;
-    
+
     if (0 == pthread_mutex_trylock(lock)) {
 #       ifdef LOCK_STATS
-           (void)AO_fetch_and_add1(&GC_unlocked_count);
+            (void)AO_fetch_and_add1(&GC_unlocked_count);
 #       endif
-       return;
+        return;
     }
     for (; pause_length <= SPIN_MAX; pause_length <<= 1) {
-       for (i = 0; i < pause_length; ++i) {
-           GC_pause();
-       }
+        for (i = 0; i < pause_length; ++i) {
+            GC_pause();
+        }
         switch(pthread_mutex_trylock(lock)) {
-           case 0:
-#              ifdef LOCK_STATS
-                   (void)AO_fetch_and_add1(&GC_spin_count);
-#              endif
-               return;
-           case EBUSY:
-               break;
-           default:
-               ABORT("Unexpected error from pthread_mutex_trylock");
+            case 0:
+#               ifdef LOCK_STATS
+                    (void)AO_fetch_and_add1(&GC_spin_count);
+#               endif
+                return;
+            case EBUSY:
+                break;
+            default:
+                ABORT("Unexpected error from pthread_mutex_trylock");
         }
     }
 #endif /* !NO_PTHREAD_TRYLOCK */
 #   ifdef LOCK_STATS
-       (void)AO_fetch_and_add1(&GC_block_count);
+        (void)AO_fetch_and_add1(&GC_block_count);
 #   endif
     pthread_mutex_lock(lock);
 }
@@ -1332,10 +1446,9 @@ STATIC void GC_generic_lock(pthread_mutex_t * lock)
 /* as STL alloc.h.  This isn't really the right way to do this.   */
 /* but until the POSIX scheduling mess gets straightened out ...  */
 
-volatile AO_TS_t GC_allocate_lock = 0;
-
+GC_INNER volatile AO_TS_t GC_allocate_lock = AO_TS_INITIALIZER;
 
-void GC_lock(void)
+GC_INNER void GC_lock(void)
 {
 #   define low_spin_max 30  /* spin cycles if we suspect uniprocessor */
 #   define high_spin_max SPIN_MAX /* spin cycles for multiprocessor */
@@ -1357,12 +1470,12 @@ void GC_lock(void)
             continue;
         }
         if (AO_test_and_set_acquire(&GC_allocate_lock) == AO_TS_CLEAR) {
-           /*
+            /*
              * got it!
              * Spinning worked.  Thus we're probably not being scheduled
              * against the other process with which we were contending.
              * Thus it makes sense to spin longer the next time.
-            */
+             */
             last_spins = i;
             spin_max = high_spin_max;
             return;
@@ -1376,33 +1489,33 @@ yield:
             return;
         }
 #       define SLEEP_THRESHOLD 12
-               /* Under Linux very short sleeps tend to wait until     */
-               /* the current time quantum expires.  On old Linux      */
-               /* kernels nanosleep(<= 2ms) just spins under Linux.    */
-               /* (Under 2.4, this happens only for real-time          */
-               /* processes.)  We want to minimize both behaviors      */
-               /* here.                                                */
+                /* Under Linux very short sleeps tend to wait until     */
+                /* the current time quantum expires.  On old Linux      */
+                /* kernels nanosleep(<= 2ms) just spins under Linux.    */
+                /* (Under 2.4, this happens only for real-time          */
+                /* processes.)  We want to minimize both behaviors      */
+                /* here.                                                */
         if (i < SLEEP_THRESHOLD) {
             sched_yield();
-       } else {
-           struct timespec ts;
-       
-           if (i > 24) i = 24;
-                       /* Don't wait for more than about 15msecs, even */
-                       /* under extreme contention.                    */
-           ts.tv_sec = 0;
-           ts.tv_nsec = 1 << i;
-           nanosleep(&ts, 0);
-       }
+        } else {
+            struct timespec ts;
+
+            if (i > 24) i = 24;
+                        /* Don't wait for more than about 15msecs, even */
+                        /* under extreme contention.                    */
+            ts.tv_sec = 0;
+            ts.tv_nsec = 1 << i;
+            nanosleep(&ts, 0);
+        }
     }
 }
 
 #else  /* !USE_SPINLOCK */
-void GC_lock(void)
+GC_INNER void GC_lock(void)
 {
 #ifndef NO_PTHREAD_TRYLOCK
     if (1 == GC_nprocs || GC_collecting) {
-       pthread_mutex_lock(&GC_allocate_ml);
+        pthread_mutex_lock(&GC_allocate_ml);
     } else {
         GC_generic_lock(&GC_allocate_ml);
     }
@@ -1416,7 +1529,7 @@ void GC_lock(void)
 #ifdef PARALLEL_MARK
 
 #ifdef GC_ASSERTIONS
-  unsigned long GC_mark_lock_holder = NO_THREAD;
+  GC_INNER unsigned long GC_mark_lock_holder = NO_THREAD;
 #endif
 
 #if 0
@@ -1435,92 +1548,93 @@ void GC_lock(void)
 
 static pthread_cond_t builder_cv = PTHREAD_COND_INITIALIZER;
 
-void GC_acquire_mark_lock(void)
+GC_INNER void GC_acquire_mark_lock(void)
 {
 /*
     if (pthread_mutex_lock(&mark_mutex) != 0) {
-       ABORT("pthread_mutex_lock failed");
+        ABORT("pthread_mutex_lock failed");
     }
 */
     GC_generic_lock(&mark_mutex);
 #   ifdef GC_ASSERTIONS
-       GC_mark_lock_holder = NUMERIC_THREAD_ID(pthread_self());
+        GC_mark_lock_holder = NUMERIC_THREAD_ID(pthread_self());
 #   endif
 }
 
-void GC_release_mark_lock(void)
+GC_INNER void GC_release_mark_lock(void)
 {
     GC_ASSERT(GC_mark_lock_holder == NUMERIC_THREAD_ID(pthread_self()));
 #   ifdef GC_ASSERTIONS
-       GC_mark_lock_holder = NO_THREAD;
+        GC_mark_lock_holder = NO_THREAD;
 #   endif
     if (pthread_mutex_unlock(&mark_mutex) != 0) {
-       ABORT("pthread_mutex_unlock failed");
+        ABORT("pthread_mutex_unlock failed");
     }
 }
 
-/* Collector must wait for a freelist builders for 2 reasons:          */
-/* 1) Mark bits may still be getting examined without lock.            */
-/* 2) Partial free lists referenced only by locals may not be scanned  */
-/*    correctly, e.g. if they contain "pointer-free" objects, since the        */
-/*    free-list link may be ignored.                                   */
-void GC_wait_builder(void)
+/* Collector must wait for a freelist builders for 2 reasons:           */
+/* 1) Mark bits may still be getting examined without lock.             */
+/* 2) Partial free lists referenced only by locals may not be scanned   */
+/*    correctly, e.g. if they contain "pointer-free" objects, since the */
+/*    free-list link may be ignored.                                    */
+STATIC void GC_wait_builder(void)
 {
     GC_ASSERT(GC_mark_lock_holder == NUMERIC_THREAD_ID(pthread_self()));
+    ASSERT_CANCEL_DISABLED();
 #   ifdef GC_ASSERTIONS
-       GC_mark_lock_holder = NO_THREAD;
+        GC_mark_lock_holder = NO_THREAD;
 #   endif
     if (pthread_cond_wait(&builder_cv, &mark_mutex) != 0) {
-       ABORT("pthread_cond_wait failed");
+        ABORT("pthread_cond_wait failed");
     }
     GC_ASSERT(GC_mark_lock_holder == NO_THREAD);
 #   ifdef GC_ASSERTIONS
-       GC_mark_lock_holder = NUMERIC_THREAD_ID(pthread_self());
+        GC_mark_lock_holder = NUMERIC_THREAD_ID(pthread_self());
 #   endif
 }
 
-void GC_wait_for_reclaim(void)
+GC_INNER void GC_wait_for_reclaim(void)
 {
     GC_acquire_mark_lock();
     while (GC_fl_builder_count > 0) {
-       GC_wait_builder();
+        GC_wait_builder();
     }
     GC_release_mark_lock();
 }
 
-void GC_notify_all_builder(void)
+GC_INNER void GC_notify_all_builder(void)
 {
     GC_ASSERT(GC_mark_lock_holder == NUMERIC_THREAD_ID(pthread_self()));
     if (pthread_cond_broadcast(&builder_cv) != 0) {
-       ABORT("pthread_cond_broadcast failed");
+        ABORT("pthread_cond_broadcast failed");
     }
 }
 
 static pthread_cond_t mark_cv = PTHREAD_COND_INITIALIZER;
 
-void GC_wait_marker(void)
+GC_INNER void GC_wait_marker(void)
 {
     GC_ASSERT(GC_mark_lock_holder == NUMERIC_THREAD_ID(pthread_self()));
+    ASSERT_CANCEL_DISABLED();
 #   ifdef GC_ASSERTIONS
-       GC_mark_lock_holder = NO_THREAD;
+        GC_mark_lock_holder = NO_THREAD;
 #   endif
     if (pthread_cond_wait(&mark_cv, &mark_mutex) != 0) {
-       ABORT("pthread_cond_wait failed");
+        ABORT("pthread_cond_wait failed");
     }
     GC_ASSERT(GC_mark_lock_holder == NO_THREAD);
 #   ifdef GC_ASSERTIONS
-       GC_mark_lock_holder = NUMERIC_THREAD_ID(pthread_self());
+        GC_mark_lock_holder = NUMERIC_THREAD_ID(pthread_self());
 #   endif
 }
 
-void GC_notify_all_marker(void)
+GC_INNER void GC_notify_all_marker(void)
 {
     if (pthread_cond_broadcast(&mark_cv) != 0) {
-       ABORT("pthread_cond_broadcast failed");
+        ABORT("pthread_cond_broadcast failed");
     }
 }
 
 #endif /* PARALLEL_MARK */
 
-# endif /* GC_LINUX_THREADS and friends */
-
+#endif /* GC_LINUX_THREADS and friends */
index 6b72ee2fa79640b45f6162e49e384049d7be9202..6195ac86e6df4c6ffb2388da43c1cc9d9dfa0494 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  *
  * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
  * modified is included with the above copyright notice.
  */
 
+#include "private/gc_pmark.h"
+
 /*
  * These are checking routines calls to which could be inserted by a
  * preprocessor to validate C pointer arithmetic.
  */
 
-#include "private/gc_pmark.h"
-
 STATIC void GC_CALLBACK GC_default_same_obj_print_proc(void * p, void * q)
 {
     GC_err_printf("%p and %p are not in the same object\n", p, q);
@@ -25,47 +25,47 @@ STATIC void GC_CALLBACK GC_default_same_obj_print_proc(void * p, void * q)
 }
 
 void (GC_CALLBACK *GC_same_obj_print_proc) (void *, void *)
-               = GC_default_same_obj_print_proc;
+                = GC_default_same_obj_print_proc;
 
-/* Check that p and q point to the same object.  Call          */
-/* *GC_same_obj_print_proc if they don't.                      */
-/* Returns the first argument.  (Return value may be hard      */
-/* to use,due to typing issues.  But if we had a suitable      */
-/* preprocessor ...)                                           */
-/* Succeeds if neither p nor q points to the heap.             */
-/* We assume this is performance critical.  (It shouldn't      */
-/* be called by production code, but this can easily make      */
-/* debugging intolerably slow.)                                        */
+/* Check that p and q point to the same object.  Call           */
+/* *GC_same_obj_print_proc if they don't.                       */
+/* Returns the first argument.  (Return value may be hard       */
+/* to use,due to typing issues.  But if we had a suitable       */
+/* preprocessor ...)                                            */
+/* Succeeds if neither p nor q points to the heap.              */
+/* We assume this is performance critical.  (It shouldn't       */
+/* be called by production code, but this can easily make       */
+/* debugging intolerably slow.)                                 */
 GC_API void * GC_CALL GC_same_obj(void *p, void *q)
 {
     struct hblk *h;
     hdr *hhdr;
     ptr_t base, limit;
     word sz;
-    
+
     if (!GC_is_initialized) GC_init();
     hhdr = HDR((word)p);
     if (hhdr == 0) {
-       if (divHBLKSZ((word)p) != divHBLKSZ((word)q)
-           && HDR((word)q) != 0) {
-           goto fail;
-       }
-       return(p);
+        if (divHBLKSZ((word)p) != divHBLKSZ((word)q)
+            && HDR((word)q) != 0) {
+            goto fail;
+        }
+        return(p);
     }
-    /* If it's a pointer to the middle of a large object, move it      */
-    /* to the beginning.                                               */
+    /* If it's a pointer to the middle of a large object, move it       */
+    /* to the beginning.                                                */
     if (IS_FORWARDING_ADDR_OR_NIL(hhdr)) {
-       h = HBLKPTR(p) - (word)hhdr;
-       hhdr = HDR(h);
-       while (IS_FORWARDING_ADDR_OR_NIL(hhdr)) {
-          h = FORWARDED_ADDR(h, hhdr);
-          hhdr = HDR(h);
-       }
-       limit = (ptr_t)h + hhdr -> hb_sz;
-       if ((ptr_t)p >= limit || (ptr_t)q >= limit || (ptr_t)q < (ptr_t)h ) {
-           goto fail;
-       }
-       return(p);
+        h = HBLKPTR(p) - (word)hhdr;
+        hhdr = HDR(h);
+        while (IS_FORWARDING_ADDR_OR_NIL(hhdr)) {
+           h = FORWARDED_ADDR(h, hhdr);
+           hhdr = HDR(h);
+        }
+        limit = (ptr_t)h + hhdr -> hb_sz;
+        if ((ptr_t)p >= limit || (ptr_t)q >= limit || (ptr_t)q < (ptr_t)h ) {
+            goto fail;
+        }
+        return(p);
     }
     sz = hhdr -> hb_sz;
     if (sz > MAXOBJBYTES) {
@@ -77,21 +77,21 @@ GC_API void * GC_CALL GC_same_obj(void *p, void *q)
     } else {
       size_t offset;
       size_t pdispl = HBLKDISPL(p);
-      
+
       offset = pdispl % sz;
       if (HBLKPTR(p) != HBLKPTR(q)) goto fail;
-               /* W/o this check, we might miss an error if    */
-               /* q points to the first object on a page, and  */
-               /* points just before the page.                 */
+                /* W/o this check, we might miss an error if    */
+                /* q points to the first object on a page, and  */
+                /* points just before the page.                 */
       base = (ptr_t)p - offset;
       limit = base + sz;
     }
-    /* [base, limit) delimits the object containing p, if any. */
-    /* If p is not inside a valid object, then either q is     */
-    /* also outside any valid object, or it is outside                 */
-    /* [base, limit).                                          */
+    /* [base, limit) delimits the object containing p, if any.  */
+    /* If p is not inside a valid object, then either q is      */
+    /* also outside any valid object, or it is outside          */
+    /* [base, limit).                                           */
     if ((ptr_t)q >= limit || (ptr_t)q < base) {
-       goto fail;
+        goto fail;
     }
     return(p);
 fail:
@@ -105,15 +105,15 @@ STATIC void GC_CALLBACK GC_default_is_valid_displacement_print_proc (void *p)
     ABORT("GC_is_valid_displacement test failed");
 }
 
-void (GC_CALLBACK *GC_is_valid_displacement_print_proc)(void *) = 
-       GC_default_is_valid_displacement_print_proc;
+void (GC_CALLBACK *GC_is_valid_displacement_print_proc)(void *) =
+        GC_default_is_valid_displacement_print_proc;
 
-/* Check that if p is a pointer to a heap page, then it points to      */
-/* a valid displacement within a heap object.                          */
-/* Uninteresting with GC_all_interior_pointers.                                */
-/* Always returns its argument.                                                */
-/* Note that we don't lock, since nothing relevant about the header    */
-/* should change while we have a valid object pointer to the block.    */
+/* Check that if p is a pointer to a heap page, then it points to       */
+/* a valid displacement within a heap object.                           */
+/* Uninteresting with GC_all_interior_pointers.                         */
+/* Always returns its argument.                                         */
+/* Note that we don't lock, since nothing relevant about the header     */
+/* should change while we have a valid object pointer to the block.     */
 GC_API void * GC_CALL GC_is_valid_displacement(void *p)
 {
     hdr *hhdr;
@@ -121,27 +121,27 @@ GC_API void * GC_CALL GC_is_valid_displacement(void *p)
     word offset;
     struct hblk *h;
     word sz;
-    
+
     if (!GC_is_initialized) GC_init();
     hhdr = HDR((word)p);
     if (hhdr == 0) return(p);
     h = HBLKPTR(p);
     if (GC_all_interior_pointers) {
-       while (IS_FORWARDING_ADDR_OR_NIL(hhdr)) {
-          h = FORWARDED_ADDR(h, hhdr);
-          hhdr = HDR(h);
-       }
+        while (IS_FORWARDING_ADDR_OR_NIL(hhdr)) {
+           h = FORWARDED_ADDR(h, hhdr);
+           hhdr = HDR(h);
+        }
     }
     if (IS_FORWARDING_ADDR_OR_NIL(hhdr)) {
-       goto fail;
+        goto fail;
     }
     sz = hhdr -> hb_sz;
     pdispl = HBLKDISPL(p);
     offset = pdispl % sz;
     if ((sz > MAXOBJBYTES && (ptr_t)p >= (ptr_t)h + sz)
-       || !GC_valid_offsets[offset]
-       || (ptr_t)p - offset + sz > (ptr_t)(h + 1)) {
-       goto fail;
+        || !GC_valid_offsets[offset]
+        || (ptr_t)p - offset + sz > (ptr_t)(h + 1)) {
+        goto fail;
     }
     return(p);
 fail:
@@ -156,42 +156,42 @@ STATIC void GC_CALLBACK GC_default_is_visible_print_proc(void * p)
 }
 
 void (GC_CALLBACK *GC_is_visible_print_proc)(void * p) =
-               GC_default_is_visible_print_proc;
+                GC_default_is_visible_print_proc;
 
 #ifndef THREADS
 /* Could p be a stack address? */
    STATIC GC_bool GC_on_stack(ptr_t p)
    {
-       int dummy;
-#      ifdef STACK_GROWS_DOWN
-           if ((ptr_t)p >= (ptr_t)(&dummy) && (ptr_t)p < GC_stackbottom ) {
-               return(TRUE);
-           }
-#      else
-           if ((ptr_t)p <= (ptr_t)(&dummy) && (ptr_t)p > GC_stackbottom ) {
-               return(TRUE);
-           }
-#      endif
-       return(FALSE);
+        int dummy;
+#       ifdef STACK_GROWS_DOWN
+            if ((ptr_t)p >= (ptr_t)(&dummy) && (ptr_t)p < GC_stackbottom ) {
+                return(TRUE);
+            }
+#       else
+            if ((ptr_t)p <= (ptr_t)(&dummy) && (ptr_t)p > GC_stackbottom ) {
+                return(TRUE);
+            }
+#       endif
+        return(FALSE);
    }
 #endif
 
-/* Check that p is visible                                             */
-/* to the collector as a possibly pointer containing location.         */
-/* If it isn't invoke *GC_is_visible_print_proc.                       */
-/* Returns the argument in all cases.  May erroneously succeed         */
-/* in hard cases.  (This is intended for debugging use with            */
-/* untyped allocations.  The idea is that it should be possible, though        */
-/* slow, to add such a call to all indirect pointer stores.)           */
-/* Currently useless for multithreaded worlds.                         */
+/* Check that p is visible                                              */
+/* to the collector as a possibly pointer containing location.          */
+/* If it isn't invoke *GC_is_visible_print_proc.                        */
+/* Returns the argument in all cases.  May erroneously succeed          */
+/* in hard cases.  (This is intended for debugging use with             */
+/* untyped allocations.  The idea is that it should be possible, though */
+/* slow, to add such a call to all indirect pointer stores.)            */
+/* Currently useless for multithreaded worlds.                          */
 GC_API void * GC_CALL GC_is_visible(void *p)
 {
     hdr *hhdr;
-    
+
     if ((word)p & (ALIGNMENT - 1)) goto fail;
     if (!GC_is_initialized) GC_init();
 #   ifdef THREADS
-       hhdr = HDR((word)p);
+        hhdr = HDR((word)p);
         if (hhdr != 0 && GC_base(p) == 0) {
             goto fail;
         } else {
@@ -199,70 +199,69 @@ GC_API void * GC_CALL GC_is_visible(void *p)
             return(p);
         }
 #   else
-       /* Check stack first: */
-         if (GC_on_stack(p)) return(p);
-       hhdr = HDR((word)p);
-       if (hhdr == 0) {
-           if (GC_is_static_root(p)) return(p);
-           /* Else do it again correctly:      */
+        /* Check stack first: */
+          if (GC_on_stack(p)) return(p);
+        hhdr = HDR((word)p);
+        if (hhdr == 0) {
+            if (GC_is_static_root(p)) return(p);
+            /* Else do it again correctly:      */
 #           if (defined(DYNAMIC_LOADING) || defined(MSWIN32) || \
-               defined(MSWINCE) || defined(PCR))
-               GC_register_dynamic_libraries();
-               if (GC_is_static_root(p))
-                   return(p);
-#          endif
-           goto fail;
-       } else {
-           /* p points to the heap. */
-           word descr;
-           ptr_t base = GC_base(p);    /* Should be manually inlined? */
-           
-           if (base == 0) goto fail;
-           if (HBLKPTR(base) != HBLKPTR(p)) hhdr = HDR((word)p);
-           descr = hhdr -> hb_descr;
+                defined(MSWINCE) || defined(PCR))
+                GC_register_dynamic_libraries();
+                if (GC_is_static_root(p))
+                    return(p);
+#           endif
+            goto fail;
+        } else {
+            /* p points to the heap. */
+            word descr;
+            ptr_t base = GC_base(p);    /* Should be manually inlined? */
+
+            if (base == 0) goto fail;
+            if (HBLKPTR(base) != HBLKPTR(p)) hhdr = HDR((word)p);
+            descr = hhdr -> hb_descr;
     retry:
-           switch(descr & GC_DS_TAGS) {
-               case GC_DS_LENGTH:
-                   if ((word)((ptr_t)p - (ptr_t)base) > (word)descr) goto fail;
-                   break;
-               case GC_DS_BITMAP:
-                   if ((ptr_t)p - (ptr_t)base
-                        >= WORDS_TO_BYTES(BITMAP_BITS)
-                        || ((word)p & (sizeof(word) - 1))) goto fail;
-                   if (!(((word)1 << (WORDSZ - ((ptr_t)p - (ptr_t)base) - 1))
-                         & descr)) goto fail;
-                   break;
-               case GC_DS_PROC:
-                   /* We could try to decipher this partially.         */
-                   /* For now we just punt.                            */
-                   break;
-               case GC_DS_PER_OBJECT:
-                   if ((signed_word)descr >= 0) {
-                     descr = *(word *)((ptr_t)base + (descr & ~GC_DS_TAGS));
-                   } else {
-                     ptr_t type_descr = *(ptr_t *)base;
-                     descr = *(word *)(type_descr
-                             - (descr - (GC_DS_PER_OBJECT
-                                         - GC_INDIR_PER_OBJ_BIAS)));
-                   }
-                   goto retry;
-           }
-           return(p);
-       }
+            switch(descr & GC_DS_TAGS) {
+                case GC_DS_LENGTH:
+                    if ((word)((ptr_t)p - (ptr_t)base) > (word)descr) goto fail;
+                    break;
+                case GC_DS_BITMAP:
+                    if ((ptr_t)p - (ptr_t)base
+                         >= WORDS_TO_BYTES(BITMAP_BITS)
+                         || ((word)p & (sizeof(word) - 1))) goto fail;
+                    if (!(((word)1 << (WORDSZ - ((ptr_t)p - (ptr_t)base) - 1))
+                          & descr)) goto fail;
+                    break;
+                case GC_DS_PROC:
+                    /* We could try to decipher this partially.         */
+                    /* For now we just punt.                            */
+                    break;
+                case GC_DS_PER_OBJECT:
+                    if ((signed_word)descr >= 0) {
+                      descr = *(word *)((ptr_t)base + (descr & ~GC_DS_TAGS));
+                    } else {
+                      ptr_t type_descr = *(ptr_t *)base;
+                      descr = *(word *)(type_descr
+                              - (descr - (GC_DS_PER_OBJECT
+                                          - GC_INDIR_PER_OBJ_BIAS)));
+                    }
+                    goto retry;
+            }
+            return(p);
+        }
 #   endif
 fail:
     (*GC_is_visible_print_proc)((ptr_t)p);
     return(p);
 }
 
-
 GC_API void * GC_CALL GC_pre_incr (void **p, ptrdiff_t how_much)
 {
     void * initial = *p;
     void * result = GC_same_obj((void *)((ptr_t)initial + how_much), initial);
-    
+
     if (!GC_all_interior_pointers) {
-       (void) GC_is_valid_displacement(result);
+        (void) GC_is_valid_displacement(result);
     }
     return (*p = result);
 }
@@ -271,9 +270,9 @@ GC_API void * GC_CALL GC_post_incr (void **p, ptrdiff_t how_much)
 {
     void * initial = *p;
     void * result = GC_same_obj((void *)((ptr_t)initial + how_much), initial);
+
     if (!GC_all_interior_pointers) {
-       (void) GC_is_valid_displacement(result);
+        (void) GC_is_valid_displacement(result);
     }
     *p = result;
     return(initial);
index 01be5f0fbb74fdc72b352888d42a5a109b05aa09..da11f342bbd3834d52ce9f85c32468c968728b07 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  *
  * provided the above notices are retained, and a notice that the code was
  * modified is included with the above copyright notice.
  */
-/* Boehm, May 19, 1994 2:04 pm PDT */
 
+# ifdef HAVE_CONFIG_H
+#   include "private/config.h"
+# endif
 
 # ifdef PCR
 /*
@@ -31,8 +33,7 @@ void * real_malloc(size_t size)
 # else
 
 extern int GC_quiet;
-       /* ANSI C doesn't allow translation units to be empty.  */
-       /* So we guarantee this one is nonempty.                */
+        /* ANSI C doesn't allow translation units to be empty.  */
+        /* So we guarantee this one is nonempty.                */
 
 #endif /* PCR */
-
index 12afa91822094eea57551293961eeca5846c1560..3c52d1fd20c7baba443a67252694d7aae94ad782 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1996 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
  * modified is included with the above copyright notice.
  */
 
-#include <stdio.h>
 #include "private/gc_priv.h"
 
-signed_word GC_bytes_found = 0;
-                       /* Number of bytes of memory reclaimed     */
-                       /* minus the number of bytes originally    */
-                       /* on free lists which we had to drop.     */
+#include <stdio.h>
+
+GC_INNER signed_word GC_bytes_found = 0;
+                        /* Number of bytes of memory reclaimed     */
+                        /* minus the number of bytes originally    */
+                        /* on free lists which we had to drop.     */
 
 #if defined(PARALLEL_MARK)
-  word GC_fl_builder_count = 0;
-       /* Number of threads currently building free lists without      */
-       /* holding GC lock.  It is not safe to collect if this is       */
-       /* nonzero.                                                     */
+  GC_INNER word GC_fl_builder_count = 0;
+        /* Number of threads currently building free lists without      */
+        /* holding GC lock.  It is not safe to collect if this is       */
+        /* nonzero.                                                     */
 #endif /* PARALLEL_MARK */
 
-/* We defer printing of leaked objects until we're done with the GC    */
-/* cycle, since the routine for printing objects needs to run outside  */
-/* the collector, e.g. without the allocation lock.                    */
+/* We defer printing of leaked objects until we're done with the GC     */
+/* cycle, since the routine for printing objects needs to run outside   */
+/* the collector, e.g. without the allocation lock.                     */
 #define MAX_LEAKED 40
-ptr_t GC_leaked[MAX_LEAKED];
+STATIC ptr_t GC_leaked[MAX_LEAKED] = { NULL };
 STATIC unsigned GC_n_leaked = 0;
 
-GC_bool GC_have_errors = FALSE;
+GC_INNER GC_bool GC_have_errors = FALSE;
 
 STATIC void GC_add_leaked(ptr_t leaked)
 {
@@ -48,32 +49,32 @@ STATIC void GC_add_leaked(ptr_t leaked)
     }
 }
 
-static GC_bool printing_errors = FALSE;
-/* Print all objects on the list after printing any smashed objs.      */
-/* Clear both lists.                                                   */
-void GC_print_all_errors (void)
+/* Print all objects on the list after printing any smashed objects.    */
+/* Clear both lists.                                                    */
+GC_INNER void GC_print_all_errors(void)
 {
+    static GC_bool printing_errors = FALSE;
     unsigned i;
 
     LOCK();
     if (printing_errors) {
-       UNLOCK();
-       return;
+        UNLOCK();
+        return;
     }
     printing_errors = TRUE;
     UNLOCK();
     if (GC_debugging_started) GC_print_all_smashed();
     for (i = 0; i < GC_n_leaked; ++i) {
-       ptr_t p = GC_leaked[i];
-       if (HDR(p) -> hb_obj_kind == PTRFREE) {
-           GC_err_printf("Leaked atomic object at ");
-       } else {
-           GC_err_printf("Leaked composite object at ");
-       }
-       GC_print_heap_obj(p);
-       GC_err_printf("\n");
-       GC_free(p);
-       GC_leaked[i] = 0;
+        ptr_t p = GC_leaked[i];
+        if (HDR(p) -> hb_obj_kind == PTRFREE) {
+            GC_err_printf("Leaked atomic object at ");
+        } else {
+            GC_err_printf("Leaked composite object at ");
+        }
+        GC_print_heap_obj(p);
+        GC_err_printf("\n");
+        GC_free(p);
+        GC_leaked[i] = 0;
     }
     GC_n_leaked = 0;
     printing_errors = FALSE;
@@ -85,14 +86,9 @@ void GC_print_all_errors (void)
  *
  */
 
-
-/*
- * Test whether a block is completely empty, i.e. contains no marked
- * objects.  This does not require the block to be in physical
- * memory.
- */
-GC_bool GC_block_empty(hdr *hhdr)
+/* Test whether a block is completely empty, i.e. contains no marked    */
+/* objects.  This does not require the block to be in physical memory.  */
+GC_INNER GC_bool GC_block_empty(hdr *hhdr)
 {
     return (hhdr -> hb_n_marks == 0);
 }
@@ -102,8 +98,8 @@ STATIC GC_bool GC_block_nearly_full(hdr *hhdr)
     return (hhdr -> hb_n_marks > 7 * HBLK_OBJS(hhdr -> hb_sz)/8);
 }
 
-/* FIXME: This should perhaps again be specialized for USE_MARK_BYTES  */
-/* and USE_MARK_BITS cases.                                            */
+/* FIXME: This should perhaps again be specialized for USE_MARK_BYTES   */
+/* and USE_MARK_BITS cases.                                             */
 
 /*
  * Restore unmarked small objects in h of size sz to the object
@@ -111,12 +107,12 @@ STATIC GC_bool GC_block_nearly_full(hdr *hhdr)
  * Clears unmarked objects.  Sz is in bytes.
  */
 STATIC ptr_t GC_reclaim_clear(struct hblk *hbp, hdr *hhdr, size_t sz,
-                             ptr_t list, signed_word *count)
+                              ptr_t list, signed_word *count)
 {
     word bit_no = 0;
     word *p, *q, *plim;
     signed_word n_bytes_found = 0;
-    
+
     GC_ASSERT(hhdr == GC_find_header((ptr_t)hbp));
     GC_ASSERT(sz == hhdr -> hb_sz);
     GC_ASSERT((sz & (BYTES_PER_WORD-1)) == 0);
@@ -124,61 +120,61 @@ STATIC ptr_t GC_reclaim_clear(struct hblk *hbp, hdr *hhdr, size_t sz,
     plim = (word *)(hbp->hb_body + HBLKSIZE - sz);
 
     /* go through all words in block */
-       while( p <= plim )  {
-           if( mark_bit_from_hdr(hhdr, bit_no) ) {
-               p = (word *)((ptr_t)p + sz);
-           } else {
-               n_bytes_found += sz;
-               /* object is available - put on list */
-                   obj_link(p) = list;
-                   list = ((ptr_t)p);
-               /* Clear object, advance p to next object in the process */
-                   q = (word *)((ptr_t)p + sz);
-#                  ifdef USE_MARK_BYTES
-                     GC_ASSERT(!(sz & 1)
-                               && !((word)p & (2 * sizeof(word) - 1)));
-                     p[1] = 0;
+        while (p <= plim) {
+            if( mark_bit_from_hdr(hhdr, bit_no) ) {
+                p = (word *)((ptr_t)p + sz);
+            } else {
+                n_bytes_found += sz;
+                /* object is available - put on list */
+                    obj_link(p) = list;
+                    list = ((ptr_t)p);
+                /* Clear object, advance p to next object in the process */
+                    q = (word *)((ptr_t)p + sz);
+#                   ifdef USE_MARK_BYTES
+                      GC_ASSERT(!(sz & 1)
+                                && !((word)p & (2 * sizeof(word) - 1)));
+                      p[1] = 0;
                       p += 2;
                       while (p < q) {
-                       CLEAR_DOUBLE(p);
-                       p += 2;
-                     }
-#                  else
+                        CLEAR_DOUBLE(p);
+                        p += 2;
+                      }
+#                   else
                       p++; /* Skip link field */
                       while (p < q) {
-                       *p++ = 0;
-                     }
-#                  endif
-           }
-           bit_no += MARK_BIT_OFFSET(sz);
-       }
+                        *p++ = 0;
+                      }
+#                   endif
+            }
+            bit_no += MARK_BIT_OFFSET(sz);
+        }
     *count += n_bytes_found;
     return(list);
 }
 
 /* The same thing, but don't clear objects: */
 STATIC ptr_t GC_reclaim_uninit(struct hblk *hbp, hdr *hhdr, size_t sz,
-                              ptr_t list, signed_word *count)
+                               ptr_t list, signed_word *count)
 {
     word bit_no = 0;
     word *p, *plim;
     signed_word n_bytes_found = 0;
-    
+
     GC_ASSERT(sz == hhdr -> hb_sz);
     p = (word *)(hbp->hb_body);
     plim = (word *)((ptr_t)hbp + HBLKSIZE - sz);
 
     /* go through all words in block */
-       while( p <= plim )  {
-           if( !mark_bit_from_hdr(hhdr, bit_no) ) {
-               n_bytes_found += sz;
-               /* object is available - put on list */
-                   obj_link(p) = list;
-                   list = ((ptr_t)p);
-           }
-           p = (word *)((ptr_t)p + sz);
-           bit_no += MARK_BIT_OFFSET(sz);
-       }
+        while (p <= plim) {
+            if( !mark_bit_from_hdr(hhdr, bit_no) ) {
+                n_bytes_found += sz;
+                /* object is available - put on list */
+                    obj_link(p) = list;
+                    list = ((ptr_t)p);
+            }
+            p = (word *)((ptr_t)p + sz);
+            bit_no += MARK_BIT_OFFSET(sz);
+        }
     *count += n_bytes_found;
     return(list);
 }
@@ -188,19 +184,19 @@ STATIC void GC_reclaim_check(struct hblk *hbp, hdr *hhdr, word sz)
 {
     word bit_no = 0;
     ptr_t p, plim;
-    
+
     GC_ASSERT(sz == hhdr -> hb_sz);
     p = hbp->hb_body;
     plim = p + HBLKSIZE - sz;
 
     /* go through all words in block */
-       while( p <= plim )  {
-           if( !mark_bit_from_hdr(hhdr, bit_no) ) {
-               GC_add_leaked(p);
-           }
-           p += sz;
-           bit_no += MARK_BIT_OFFSET(sz);
-       }
+        while (p <= plim) {
+            if( !mark_bit_from_hdr(hhdr, bit_no) ) {
+                GC_add_leaked(p);
+            }
+            p += sz;
+            bit_no += MARK_BIT_OFFSET(sz);
+        }
 }
 
 
@@ -209,8 +205,9 @@ STATIC void GC_reclaim_check(struct hblk *hbp, hdr *hhdr, word sz)
  * Also called directly from GC_malloc_many.
  * Sz is now in bytes.
  */
-ptr_t GC_reclaim_generic(struct hblk * hbp, hdr *hhdr, size_t sz,
-                        GC_bool init, ptr_t list, signed_word *count)
+GC_INNER ptr_t GC_reclaim_generic(struct hblk * hbp, hdr *hhdr, size_t sz,
+                                  GC_bool init, ptr_t list,
+                                  signed_word *count)
 {
     ptr_t result;
 
@@ -221,7 +218,7 @@ ptr_t GC_reclaim_generic(struct hblk * hbp, hdr *hhdr, size_t sz,
     } else {
       GC_ASSERT((hhdr)->hb_descr == 0 /* Pointer-free block */);
       result = GC_reclaim_uninit(hbp, hhdr, sz, list, count);
-    } 
+    }
     if (IS_UNCOLLECTABLE(hhdr -> hb_obj_kind)) GC_set_hdr_marks(hhdr);
     return result;
 }
@@ -233,22 +230,22 @@ ptr_t GC_reclaim_generic(struct hblk * hbp, hdr *hhdr, size_t sz,
  * caller should perform that check.
  */
 STATIC void GC_reclaim_small_nonempty_block(struct hblk *hbp,
-                                           int report_if_found)
+                                            int report_if_found)
 {
     hdr *hhdr = HDR(hbp);
     size_t sz = hhdr -> hb_sz;
     int kind = hhdr -> hb_obj_kind;
     struct obj_kind * ok = &GC_obj_kinds[kind];
     void **flh = &(ok -> ok_freelist[BYTES_TO_GRANULES(sz)]);
-    
+
     hhdr -> hb_last_reclaimed = (unsigned short) GC_gc_no;
 
     if (report_if_found) {
-       GC_reclaim_check(hbp, hhdr, sz);
+        GC_reclaim_check(hbp, hhdr, sz);
     } else {
         *flh = GC_reclaim_generic(hbp, hhdr, sz,
-                                 ok -> ok_init,
-                                 *flh, &GC_bytes_found);
+                                  ok -> ok_init,
+                                  *flh, &GC_bytes_found);
     }
 }
 
@@ -263,79 +260,79 @@ STATIC void GC_reclaim_small_nonempty_block(struct hblk *hbp,
 STATIC void GC_reclaim_block(struct hblk *hbp, word report_if_found)
 {
     hdr * hhdr = HDR(hbp);
-    size_t sz = hhdr -> hb_sz; /* size of objects in current block     */
+    size_t sz = hhdr -> hb_sz;  /* size of objects in current block     */
     struct obj_kind * ok = &GC_obj_kinds[hhdr -> hb_obj_kind];
     struct hblk ** rlh;
 
     if( sz > MAXOBJBYTES ) {  /* 1 big object */
         if( !mark_bit_from_hdr(hhdr, 0) ) {
-           if (report_if_found) {
-             GC_add_leaked((ptr_t)hbp);
-           } else {
-             size_t blocks = OBJ_SZ_TO_BLOCKS(sz);
-             if (blocks > 1) {
-               GC_large_allocd_bytes -= blocks * HBLKSIZE;
-             }
-             GC_bytes_found += sz;
-             GC_freehblk(hbp);
-           }
-       } else {
-           if (hhdr -> hb_descr != 0) {
-             GC_composite_in_use += sz;
-           } else {
-             GC_atomic_in_use += sz;
-           }
-       }
+            if (report_if_found) {
+              GC_add_leaked((ptr_t)hbp);
+            } else {
+              size_t blocks = OBJ_SZ_TO_BLOCKS(sz);
+              if (blocks > 1) {
+                GC_large_allocd_bytes -= blocks * HBLKSIZE;
+              }
+              GC_bytes_found += sz;
+              GC_freehblk(hbp);
+            }
+        } else {
+            if (hhdr -> hb_descr != 0) {
+              GC_composite_in_use += sz;
+            } else {
+              GC_atomic_in_use += sz;
+            }
+        }
     } else {
         GC_bool empty = GC_block_empty(hhdr);
-#      ifdef PARALLEL_MARK
-         /* Count can be low or one too high because we sometimes      */
-         /* have to ignore decrements.  Objects can also potentially   */
-         /* be repeatedly marked by each marker.                       */
-         /* Here we assume two markers, but this is extremely          */
-         /* unlikely to fail spuriously with more.  And if it does, it */
-         /* should be looked at.                                       */
-         GC_ASSERT(hhdr -> hb_n_marks <= 2 * (HBLKSIZE/sz + 1) + 16);
-#      else
-         GC_ASSERT(sz * hhdr -> hb_n_marks <= HBLKSIZE);
-#      endif
-       if (hhdr -> hb_descr != 0) {
-         GC_composite_in_use += sz * hhdr -> hb_n_marks;
-       } else {
-         GC_atomic_in_use += sz * hhdr -> hb_n_marks;
-       }
+#       ifdef PARALLEL_MARK
+          /* Count can be low or one too high because we sometimes      */
+          /* have to ignore decrements.  Objects can also potentially   */
+          /* be repeatedly marked by each marker.                       */
+          /* Here we assume two markers, but this is extremely          */
+          /* unlikely to fail spuriously with more.  And if it does, it */
+          /* should be looked at.                                       */
+          GC_ASSERT(hhdr -> hb_n_marks <= 2 * (HBLKSIZE/sz + 1) + 16);
+#       else
+          GC_ASSERT(sz * hhdr -> hb_n_marks <= HBLKSIZE);
+#       endif
+        if (hhdr -> hb_descr != 0) {
+          GC_composite_in_use += sz * hhdr -> hb_n_marks;
+        } else {
+          GC_atomic_in_use += sz * hhdr -> hb_n_marks;
+        }
         if (report_if_found) {
-         GC_reclaim_small_nonempty_block(hbp, (int)report_if_found);
+          GC_reclaim_small_nonempty_block(hbp, (int)report_if_found);
         } else if (empty) {
           GC_bytes_found += HBLKSIZE;
           GC_freehblk(hbp);
-        } else if (GC_find_leak || !GC_block_nearly_full(hhdr)){
+        } else if (GC_find_leak || !GC_block_nearly_full(hhdr)) {
           /* group of smaller objects, enqueue the real work */
           rlh = &(ok -> ok_reclaim_list[BYTES_TO_GRANULES(sz)]);
           hhdr -> hb_next = *rlh;
           *rlh = hbp;
         } /* else not worth salvaging. */
-       /* We used to do the nearly_full check later, but we    */
-       /* already have the right cache context here.  Also     */
-       /* doing it here avoids some silly lock contention in   */
-       /* GC_malloc_many.                                      */
+        /* We used to do the nearly_full check later, but we    */
+        /* already have the right cache context here.  Also     */
+        /* doing it here avoids some silly lock contention in   */
+        /* GC_malloc_many.                                      */
     }
 }
 
 #if !defined(NO_DEBUGGING)
-/* Routines to gather and print heap block info        */
-/* intended for debugging.  Otherwise should be called */
-/* with lock.                                          */
+/* Routines to gather and print heap block info         */
+/* intended for debugging.  Otherwise should be called  */
+/* with lock.                                           */
 
 struct Print_stats
 {
-       size_t number_of_blocks;
-       size_t total_bytes;
+        size_t number_of_blocks;
+        size_t total_bytes;
 };
 
 #ifdef USE_MARK_BYTES
 
-/* Return the number of set mark bits in the given header      */
+/* Return the number of set mark bits in the given header       */
 STATIC int GC_n_set_marks(hdr *hhdr)
 {
     int result = 0;
@@ -353,20 +350,20 @@ STATIC int GC_n_set_marks(hdr *hhdr)
 
 #else
 
-/* Number of set bits in a word.  Not performance critical.    */
+/* Number of set bits in a word.  Not performance critical.     */
 static int set_bits(word n)
 {
     word m = n;
     int result = 0;
-    
+
     while (m > 0) {
-       if (m & 1) result++;
-       m >>= 1;
+        if (m & 1) result++;
+        m >>= 1;
     }
     return(result);
 }
 
-/* Return the number of set mark bits in the given header      */
+/* Return the number of set mark bits in the given header       */
 STATIC int GC_n_set_marks(hdr *hhdr)
 {
     int result = 0;
@@ -374,7 +371,7 @@ STATIC int GC_n_set_marks(hdr *hhdr)
     int n_mark_words;
 #   ifdef MARK_BIT_PER_OBJ
       int n_objs = (int)HBLK_OBJS(hhdr -> hb_sz);
-    
+
       if (0 == n_objs) n_objs = 1;
       n_mark_words = divWORDSZ(n_objs + WORDSZ - 1);
 #   else /* MARK_BIT_PER_GRANULE */
@@ -385,7 +382,7 @@ STATIC int GC_n_set_marks(hdr *hhdr)
     }
 #   ifdef MARK_BIT_PER_OBJ
       result += set_bits((hhdr -> hb_marks[n_mark_words - 1])
-                        << (n_mark_words * WORDSZ - n_objs));
+                         << (n_mark_words * WORDSZ - n_objs));
 #   else
       result += set_bits(hhdr -> hb_marks[n_mark_words - 1]);
 #   endif
@@ -395,19 +392,19 @@ STATIC int GC_n_set_marks(hdr *hhdr)
 #endif /* !USE_MARK_BYTES  */
 
 STATIC void GC_print_block_descr(struct hblk *h,
-                                word /* struct PrintStats */ raw_ps)
+                                 word /* struct PrintStats */ raw_ps)
 {
     hdr * hhdr = HDR(h);
     size_t bytes = hhdr -> hb_sz;
     struct Print_stats *ps;
     unsigned n_marks = GC_n_set_marks(hhdr);
-    
+
     if (hhdr -> hb_n_marks != n_marks) {
       GC_printf("(%u:%u,%u!=%u)", hhdr -> hb_obj_kind, (unsigned)bytes,
-                                 (unsigned)hhdr -> hb_n_marks, n_marks);
+                                  (unsigned)hhdr -> hb_n_marks, n_marks);
     } else {
       GC_printf("(%u:%u,%u)", hhdr -> hb_obj_kind,
-                             (unsigned)bytes, n_marks);
+                              (unsigned)bytes, n_marks);
     }
     bytes += HBLKSIZE-1;
     bytes &= ~(HBLKSIZE-1);
@@ -426,8 +423,8 @@ void GC_print_block_list(void)
     pstats.total_bytes = 0;
     GC_apply_to_all_blocks(GC_print_block_descr, (word)&pstats);
     GC_printf("\nblocks = %lu, bytes = %lu\n",
-             (unsigned long)pstats.number_of_blocks,
-             (unsigned long)pstats.total_bytes);
+              (unsigned long)pstats.number_of_blocks,
+              (unsigned long)pstats.total_bytes);
 }
 
 /* Currently for debugger use only: */
@@ -438,9 +435,9 @@ void GC_print_free_list(int kind, size_t sz_in_granules)
     struct hblk *lastBlock = 0;
     int n = 0;
 
-    while (flh){
+    while (flh) {
         struct hblk *block = HBLKPTR(flh);
-        if (block != lastBlock){
+        if (block != lastBlock) {
             GC_printf("\nIn heap block at %p:\n\t", block);
             lastBlock = block;
         }
@@ -449,7 +446,7 @@ void GC_print_free_list(int kind, size_t sz_in_granules)
     }
 }
 
-#endif /* NO_DEBUGGING */
+#endif /* !NO_DEBUGGING */
 
 /*
  * Clear all obj_link pointers in the list of free objects *flp.
@@ -473,10 +470,10 @@ STATIC void GC_clear_fl_links(void **flp)
  * Perform GC_reclaim_block on the entire heap, after first clearing
  * small object free lists (if we are not just looking for leaks).
  */
-void GC_start_reclaim(GC_bool report_if_found)
+GC_INNER void GC_start_reclaim(GC_bool report_if_found)
 {
     unsigned kind;
-    
+
 #   if defined(PARALLEL_MARK)
       GC_ASSERT(0 == GC_fl_builder_count);
 #   endif
@@ -490,42 +487,42 @@ void GC_start_reclaim(GC_bool report_if_found)
         struct hblk ** rlp;
         struct hblk ** rlim;
         struct hblk ** rlist = GC_obj_kinds[kind].ok_reclaim_list;
-       GC_bool should_clobber = (GC_obj_kinds[kind].ok_descriptor != 0);
-        
-        if (rlist == 0) continue;      /* This kind not used.  */
+        GC_bool should_clobber = (GC_obj_kinds[kind].ok_descriptor != 0);
+
+        if (rlist == 0) continue;       /* This kind not used.  */
         if (!report_if_found) {
             lim = &(GC_obj_kinds[kind].ok_freelist[MAXOBJGRANULES+1]);
-           for( fop = GC_obj_kinds[kind].ok_freelist; fop < lim; fop++ ) {
-             if (*fop != 0) {
-               if (should_clobber) {
-                 GC_clear_fl_links(fop);
-               } else {
-                 *fop = 0;
-               }
-             }
-           }
-       } /* otherwise free list objects are marked,    */
-         /* and its safe to leave them                 */
-       rlim = rlist + MAXOBJGRANULES+1;
-       for( rlp = rlist; rlp < rlim; rlp++ ) {
-           *rlp = 0;
-       }
+            for( fop = GC_obj_kinds[kind].ok_freelist; fop < lim; fop++ ) {
+              if (*fop != 0) {
+                if (should_clobber) {
+                  GC_clear_fl_links(fop);
+                } else {
+                  *fop = 0;
+                }
+              }
+            }
+        } /* otherwise free list objects are marked,    */
+          /* and its safe to leave them                 */
+        rlim = rlist + MAXOBJGRANULES+1;
+        for( rlp = rlist; rlp < rlim; rlp++ ) {
+            *rlp = 0;
+        }
       }
-    
+
 
   /* Go through all heap blocks (in hblklist) and reclaim unmarked objects */
-  /* or enqueue the block for later processing.                                   */
+  /* or enqueue the block for later processing.                            */
     GC_apply_to_all_blocks(GC_reclaim_block, (word)report_if_found);
 
 # ifdef EAGER_SWEEP
-    /* This is a very stupid thing to do.  We make it possible anyway, */
-    /* so that you can convince yourself that it really is very stupid.        */
+    /* This is a very stupid thing to do.  We make it possible anyway,  */
+    /* so that you can convince yourself that it really is very stupid. */
     GC_reclaim_all((GC_stop_func)0, FALSE);
 # endif
 # if defined(PARALLEL_MARK)
     GC_ASSERT(0 == GC_fl_builder_count);
 # endif
-    
+
 }
 
 /*
@@ -533,15 +530,15 @@ void GC_start_reclaim(GC_bool report_if_found)
  * appropriate free list is nonempty, or there are no more blocks to
  * sweep.
  */
-void GC_continue_reclaim(size_t sz /* granules */, int kind)
+GC_INNER void GC_continue_reclaim(size_t sz /* granules */, int kind)
 {
     hdr * hhdr;
     struct hblk * hbp;
     struct obj_kind * ok = &(GC_obj_kinds[kind]);
     struct hblk ** rlh = ok -> ok_reclaim_list;
     void **flh = &(ok -> ok_freelist[sz]);
-    
-    if (rlh == 0) return;      /* No blocks of this kind.      */
+
+    if (rlh == 0) return;       /* No blocks of this kind.      */
     rlh += sz;
     while ((hbp = *rlh) != 0) {
         hhdr = HDR(hbp);
@@ -556,11 +553,11 @@ void GC_continue_reclaim(size_t sz /* granules */, int kind)
  * Abort and return FALSE when/if (*stop_func)() returns TRUE.
  * If this returns TRUE, then it's safe to restart the world
  * with incorrectly cleared mark bits.
- * If ignore_old is TRUE, then reclaim only blocks that have been 
+ * If ignore_old is TRUE, then reclaim only blocks that have been
  * recently reclaimed, and discard the rest.
  * Stop_func may be 0.
  */
-GC_bool GC_reclaim_all(GC_stop_func stop_func, GC_bool ignore_old)
+GC_INNER GC_bool GC_reclaim_all(GC_stop_func stop_func, GC_bool ignore_old)
 {
     word sz;
     unsigned kind;
@@ -572,37 +569,37 @@ GC_bool GC_reclaim_all(GC_stop_func stop_func, GC_bool ignore_old)
 #   ifndef SMALL_CONFIG
       CLOCK_TYPE start_time = 0; /* initialized to prevent warning. */
       CLOCK_TYPE done_time;
-       
+
       if (GC_print_stats == VERBOSE)
-       GET_TIME(start_time);
+        GET_TIME(start_time);
 #   endif
-    
+
     for (kind = 0; kind < GC_n_kinds; kind++) {
-       ok = &(GC_obj_kinds[kind]);
-       rlp = ok -> ok_reclaim_list;
-       if (rlp == 0) continue;
-       for (sz = 1; sz <= MAXOBJGRANULES; sz++) {
-           rlh = rlp + sz;
-           while ((hbp = *rlh) != 0) {
-               if (stop_func != (GC_stop_func)0 && (*stop_func)()) {
-                   return(FALSE);
-               }
-               hhdr = HDR(hbp);
-               *rlh = hhdr -> hb_next;
-               if (!ignore_old || hhdr -> hb_last_reclaimed == GC_gc_no - 1) {
-                   /* It's likely we'll need it this time, too */
-                   /* It's been touched recently, so this      */
-                   /* shouldn't trigger paging.                */
-                   GC_reclaim_small_nonempty_block(hbp, FALSE);
-               }
+        ok = &(GC_obj_kinds[kind]);
+        rlp = ok -> ok_reclaim_list;
+        if (rlp == 0) continue;
+        for (sz = 1; sz <= MAXOBJGRANULES; sz++) {
+            rlh = rlp + sz;
+            while ((hbp = *rlh) != 0) {
+                if (stop_func != (GC_stop_func)0 && (*stop_func)()) {
+                    return(FALSE);
+                }
+                hhdr = HDR(hbp);
+                *rlh = hhdr -> hb_next;
+                if (!ignore_old || hhdr -> hb_last_reclaimed == GC_gc_no - 1) {
+                    /* It's likely we'll need it this time, too */
+                    /* It's been touched recently, so this      */
+                    /* shouldn't trigger paging.                */
+                    GC_reclaim_small_nonempty_block(hbp, FALSE);
+                }
             }
         }
     }
 #   ifndef SMALL_CONFIG
       if (GC_print_stats == VERBOSE) {
-       GET_TIME(done_time);
-       GC_log_printf("Disposing of reclaim lists took %lu msecs\n",
-                 MS_TIME_DIFF(done_time,start_time));
+        GET_TIME(done_time);
+        GC_log_printf("Disposing of reclaim lists took %lu msecs\n",
+                  MS_TIME_DIFF(done_time,start_time));
       }
 #   endif
     return(TRUE);
diff --git a/src/mm/boehm-gc/setjmp_t.c b/src/mm/boehm-gc/setjmp_t.c
deleted file mode 100644 (file)
index 5a171df..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
- *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
- *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- */
-/* Check whether setjmp actually saves registers in jmp_buf. */
-/* If it doesn't, the generic mark_regs code won't work.     */
-/* Compilers vary as to whether they will put x in a        */
-/* (callee-save) register without -O.  The code is          */
-/* contrived such that any decent compiler should put x in   */
-/* a callee-save register with -O.  Thus it is is           */
-/* recommended that this be run optimized.  (If the machine  */
-/* has no callee-save registers, then the generic code is    */
-/* safe, but this will not be noticed by this piece of       */
-/* code.)  This test appears to be far from perfect.        */
-#include <stdio.h>
-#include <setjmp.h>
-#include <string.h>
-#include "private/gc_priv.h"
-
-#ifdef OS2
-/* GETPAGESIZE() is set to getpagesize() by default, but that  */
-/* doesn't really exist, and the collector doesn't need it.    */
-#define INCL_DOSFILEMGR
-#define INCL_DOSMISC
-#define INCL_DOSERRORS
-#include <os2.h>
-
-int
-getpagesize()
-{
-    ULONG result[1];
-    
-    if (DosQuerySysInfo(QSV_PAGE_SIZE, QSV_PAGE_SIZE,
-                       (void *)result, sizeof(ULONG)) != NO_ERROR) {
-       fprintf(stderr, "DosQuerySysInfo failed\n");
-       result[0] = 4096;
-    }
-    return((int)(result[0]));
-}
-#endif
-
-struct {char a_a; char * a_b;} a;
-
-int * nested_sp()
-{
-    int dummy;
-    
-    return(&dummy);
-}
-
-int main()
-{
-       int dummy;
-       long ps = GETPAGESIZE();
-       jmp_buf b;
-       register int x = (int)strlen("a");  /* 1, slightly disguised */
-       static int y = 0;
-
-       printf("This appears to be a %s running %s\n", MACH_TYPE, OS_TYPE);
-       if (nested_sp() < &dummy) {
-         printf("Stack appears to grow down, which is the default.\n");
-         printf("A good guess for STACKBOTTOM on this machine is 0x%lx.\n",
-                ((unsigned long)(&dummy) + ps) & ~(ps-1));
-       } else {
-         printf("Stack appears to grow up.\n");
-         printf("Define STACK_GROWS_UP in gc_private.h\n");
-         printf("A good guess for STACKBOTTOM on this machine is 0x%lx.\n",
-                ((unsigned long)(&dummy) + ps) & ~(ps-1));
-       }
-       printf("Note that this may vary between machines of ostensibly\n");
-       printf("the same architecture (e.g. Sun 3/50s and 3/80s).\n");
-       printf("On many machines the value is not fixed.\n");
-       printf("A good guess for ALIGNMENT on this machine is %ld.\n",
-              (unsigned long)(&(a.a_b))-(unsigned long)(&a));
-       
-       printf("The following is a very dubious test of one root marking"
-              " strategy.\n");
-       printf("Results may not be accurate/useful:\n");
-       /* Encourage the compiler to keep x in a callee-save register */
-       x = 2*x-1;
-       printf("");
-       x = 2*x-1;
-       setjmp(b);
-       if (y == 1) {
-           if (x == 2) {
-               printf("Setjmp-based generic mark_regs code probably wont work.\n");
-               printf("But we rarely try that anymore.  If you have getcontect()\n");
-               printf("this probably doesn't matter.\n");
-           } else if (x == 1) {
-               printf("Setjmp-based register marking code may work.\n");
-           } else {
-               printf("Very strange setjmp implementation.\n");
-           }
-       }
-       y++;
-       x = 2;
-       if (y == 1) longjmp(b,1);
-       printf("Some GC internal configuration stuff: \n");
-       printf("\tWORDSZ = %d, ALIGNMENT = %d, GC_GRANULE_BYTES = %d\n",
-              WORDSZ, ALIGNMENT, GC_GRANULE_BYTES);
-       printf("\tUsing one mark ");
-#       if defined(USE_MARK_BYTES)
-         printf("byte");
-#      elif defined(USE_MARK_BITS)
-         printf("bit");
-#       endif
-       printf(" per ");
-#       if defined(MARK_BIT_PER_OBJ)
-         printf("object.\n");
-#      elif defined(MARK_BIT_PER_GRANULE)
-         printf("granule.\n");
-#      endif
-#      ifdef THREAD_LOCAL_ALLOC
-         printf("Thread local allocation enabled.\n");
-#      endif
-#      ifdef PARALLEL_MARK
-         printf("Parallel marking enabled.\n");
-#      endif
-       return(0);
-}
-
-int g(x)
-int x;
-{
-       return(x);
-}
index e8ad6556f9dc9f7fb9c4543d9fdca190f2010b7b..d204dc43680b89fa079d7088a5364eff67648a2d 100644 (file)
@@ -6,7 +6,6 @@
 
        .seg    "text"
        .globl  GC_save_regs_in_stack
-       .globl  GC_push_regs
 GC_save_regs_in_stack:
 #if defined(__arch64__) || defined(__sparcv9)
        save    %sp,-128,%sp
@@ -21,12 +20,11 @@ GC_save_regs_in_stack:
 #endif /* 32 bit SPARC */
 .GC_save_regs_in_stack_end:
        .size GC_save_regs_in_stack,.GC_save_regs_in_stack_end-GC_save_regs_in_stack
-       
 
 ! GC_clear_stack_inner(arg, limit) clears stack area up to limit and
 ! returns arg.  Stack clearing is crucial on SPARC, so we supply
 ! an assembly version that s more careful.  Assumes limit is hotter
-! than sp, and limit is 8 byte aligned.        
+! than sp, and limit is 8 byte aligned.
        .globl  GC_clear_stack_inner
 GC_clear_stack_inner:
 #if defined(__arch64__) || defined(__sparcv9)
@@ -42,7 +40,7 @@ loop:
        bgu,pt %xcc, loop       ! if (p > limit) goto loop
           add %o3,-8,%o3       ! p -= 8 (delay slot)
        retl
-         mov %o2,%sp           ! Restore sp., delay slot       
+         mov %o2,%sp           ! Restore sp., delay slot
 #else  /* 32 bit SPARC */
        mov     %sp,%o2         ! Save sp
        add     %sp,-8,%o3      ! p = sp-8
@@ -61,10 +59,3 @@ loop:
 #endif  /* 32 bit SPARC */
 .GC_clear_stack_inner_end:
        .size GC_clear_stack_inner,.GC_clear_stack_inner_end-GC_clear_stack_inner
-
-       
-               
-               
-               
-               
-       
index e5d08e2016107226fad6bcc5f99765e6a488d83e..a297dd5109c68db40212ce8cad988321dd154e6c 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  *
  * provided the above notices are retained, and a notice that the code was
  * modified is included with the above copyright notice.
  */
-/* Boehm, July 31, 1995 5:02 pm PDT */
-
 
 #include "private/gc_priv.h"
 
 #if defined(MANUAL_VDB)
-/* Stubborn object (hard to change, nearly immutable) allocation. */
-/* This interface is deprecated.  We mostly emulate it using     */
-/* MANUAL_VDB.  But that imposes the additional constraint that          */
-/* written, but not yet GC_dirty()ed objects must be referenced          */
-/* by a stack.                                                   */
-GC_API void * GC_CALL GC_malloc_stubborn(size_t lb)
-{
+
+  /* Stubborn object (hard to change, nearly immutable) allocation.     */
+  /* This interface is deprecated.  We mostly emulate it using          */
+  /* MANUAL_VDB.  But that imposes the additional constraint that       */
+  /* written, but not yet GC_dirty()ed objects must be referenced       */
+  /* by a stack.                                                        */
+
+  GC_API void * GC_CALL GC_malloc_stubborn(size_t lb)
+  {
     return(GC_malloc(lb));
-}
+  }
 
-GC_API void GC_CALL GC_end_stubborn_change(void *p)
-{
+  GC_API void GC_CALL GC_end_stubborn_change(void *p)
+  {
     GC_dirty(p);
-}
+  }
 
-/*ARGSUSED*/
-GC_API void GC_CALL GC_change_stubborn(void *p)
-{
-}
+  /*ARGSUSED*/
+  GC_API void GC_CALL GC_change_stubborn(void *p)
+  {
+  }
 
 #else /* !MANUAL_VDB */
 
-GC_API void * GC_CALL GC_malloc_stubborn(size_t lb)
-{
+  GC_API void * GC_CALL GC_malloc_stubborn(size_t lb)
+  {
     return(GC_malloc(lb));
-}
+  }
 
-/*ARGSUSED*/
-GC_API void GC_CALL GC_end_stubborn_change(void *p)
-{
-}
+  /*ARGSUSED*/
+  GC_API void GC_CALL GC_end_stubborn_change(void *p)
+  {
+  }
 
-/*ARGSUSED*/
-GC_API void GC_CALL GC_change_stubborn(void *p)
-{
-}
+  /*ARGSUSED*/
+  GC_API void GC_CALL GC_change_stubborn(void *p)
+  {
+  }
 
 #endif /* !MANUAL_VDB */
index 248b1d71218a159d351244c03a546c9c0d43b199..5ecc8311b836db04cada25129186202e1c75faf6 100644 (file)
@@ -1,7 +1,16 @@
+
 #include <stdlib.h>
 #include <limits.h>
 #include <stdio.h>
-#include <gc.h>
+
+#ifndef GC_IGNORE_WARN
+  /* Ignore misleading "Out of Memory!" warning (which is printed on    */
+  /* every GC_MALLOC(LONG_MAX) call) by defining this macro before      */
+  /* "gc.h" inclusion.                                                  */
+# define GC_IGNORE_WARN
+#endif
+
+#include "gc.h"
 
 /*
  * Check that very large allocation requests fail.  "Success" would usually
  * expected manner.
  */
 
-
-main()
+int main(void)
 {
     GC_INIT();
 
     GC_set_max_heap_size(100*1024*1024);
-       /* Otherwise heap expansion aborts when deallocating large block. */
+        /* Otherwise heap expansion aborts when deallocating large block. */
         /* That's OK.  We test this corner case mostly to make sure that  */
-        /* it fails predictably.                                         */
+        /* it fails predictably.                                          */
     GC_expand_hp(1024*1024*5);
     if (sizeof(long) == sizeof(void *)) {
         void *r = GC_MALLOC(LONG_MAX-1024);
-       if (0 != r) {
-           fprintf(stderr,
-                   "Size LONG_MAX-1024 allocation unexpectedly succeeded\n");
-           exit(1);
-       }
+        if (0 != r) {
+            fprintf(stderr,
+                    "Size LONG_MAX-1024 allocation unexpectedly succeeded\n");
+            exit(1);
+        }
         r = GC_MALLOC(LONG_MAX);
-       if (0 != r) {
-           fprintf(stderr,
-                   "Size LONG_MAX allocation unexpectedly succeeded\n");
-           exit(1);
-       }
+        if (0 != r) {
+            fprintf(stderr,
+                    "Size LONG_MAX allocation unexpectedly succeeded\n");
+            exit(1);
+        }
         r = GC_MALLOC((size_t)LONG_MAX + 1024);
-       if (0 != r) {
-           fprintf(stderr,
-                   "Size LONG_MAX+1024 allocation unexpectedly succeeded\n");
-           exit(1);
-       }
+        if (0 != r) {
+            fprintf(stderr,
+                    "Size LONG_MAX+1024 allocation unexpectedly succeeded\n");
+            exit(1);
+        }
     }
     return 0;
 }
-
index 79ea8a0402b066b17920d77e8c73cab29e015d1e..49cfd24fcb15fce49d0f78caa1f0e4e05eee867c 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
  * provided the above notices are retained, and a notice that the code was
  * modified is included with the above copyright notice.
  */
-/* An incomplete test for the garbage collector.               */
-/* Some more obscure entry points are not tested at all.       */
-/* This must be compiled with the same flags used to build the         */
-/* GC.  It uses GC internals to allow more precise results     */
-/* checking for some of the tests.                             */
+/* An incomplete test for the garbage collector.                */
+/* Some more obscure entry points are not tested at all.        */
+/* This must be compiled with the same flags used to build the  */
+/* GC.  It uses GC internals to allow more precise results      */
+/* checking for some of the tests.                              */
+
+# ifdef HAVE_CONFIG_H
+#   include "private/config.h"
+# endif
 
 # undef GC_BUILD
 
-#ifndef NTHREADS /* Number of additional threads to fork. */
-#  define NTHREADS 5 /* excludes main thread, which also runs a test. */
-       /* Not respected by PCR test. */
-#endif
-
 #if (defined(DBG_HDRS_ALL) || defined(MAKE_BACK_GRAPH)) && !defined(GC_DEBUG)
 #  define GC_DEBUG
 #endif
 
+#include "gc.h"
+
+#ifndef NTHREADS /* Number of additional threads to fork. */
+#  define NTHREADS 5 /* excludes main thread, which also runs a test. */
+        /* Not respected by PCR test. */
+#endif
+
 # if defined(mips) && defined(SYSTYPE_BSD43)
     /* MIPS RISCOS 4 */
 # else
 #   include <stdlib.h>
 # endif
 # include <stdio.h>
-# ifdef _WIN32_WCE
+# if defined(_WIN32_WCE) && !defined(__GNUC__)
 #   include <winbase.h>
-#   define assert ASSERT
+/* #   define assert ASSERT */
 # else
 #   include <assert.h>        /* Not normally used, but handy for debugging. */
 # endif
-# include "gc.h"
+
 # include "gc_typed.h"
-# include "private/gc_priv.h"  /* For output, locking, MIN_WORDS,      */
-                               /* and some statistics, and gcconfig.h. */
+# include "private/gc_priv.h"   /* For output, locking, MIN_WORDS,      */
+                                /* and some statistics, and gcconfig.h. */
 
 # if defined(MSWIN32) || defined(MSWINCE)
 #   include <windows.h>
-#   ifdef GC_DLL
+# endif
+
+# ifdef GC_DLL
+#   ifdef GC_PRINT_VERBOSE_STATS
+#     define GC_print_stats VERBOSE
+#   else
 #     define GC_print_stats 0   /* Not exported from DLL */
-                               /* Redefine to 1 to generate output. */
+                                /* Redefine to 1 to generate output. */
 #   endif
 # endif
 
 
 # include <stdarg.h>
 
-/* Call GC_INIT only on platforms on which we think we really need it, */
-/* so that we can test automatic initialization on the rest.           */
+/* Call GC_INIT only on platforms on which we think we really need it,  */
+/* so that we can test automatic initialization on the rest.            */
 #if defined(CYGWIN32) || defined (AIX) || defined(DARWIN) \
-       || defined(THREAD_LOCAL_ALLOC)
+        || defined(THREAD_LOCAL_ALLOC) \
+        || (defined(MSWINCE) && !defined(GC_WINMAIN_REDIRECT))
 #  define GC_COND_INIT() GC_INIT()
 #else
 #  define GC_COND_INIT()
 #endif
 
 /* Allocation Statistics.  Incremented without synchronization. */
-/* FIXME: We should be using synchronization.                  */
+/* FIXME: We should be using synchronization.                   */
 int stubborn_count = 0;
 int uncollectable_count = 0;
 int collectable_count = 0;
@@ -89,19 +101,19 @@ int realloc_count = 0;
 
 #if defined(GC_AMIGA_FASTALLOC) && defined(AMIGA)
 
-  extern void GC_amiga_free_all_mem(void);
+  void GC_amiga_free_all_mem(void);
   void Amiga_Fail(void){GC_amiga_free_all_mem();abort();}
 # define FAIL (void)Amiga_Fail()
   void *GC_amiga_gctest_malloc_explicitly_typed(size_t lb, GC_descr d){
     void *ret=GC_malloc_explicitly_typed(lb,d);
     if(ret==NULL){
-               if(!GC_dont_gc){
-             GC_gcollect();
-             ret=GC_malloc_explicitly_typed(lb,d);
-               }
+                if(!GC_dont_gc){
+              GC_gcollect();
+              ret=GC_malloc_explicitly_typed(lb,d);
+                }
       if(ret==NULL){
         GC_printf("Out of memory, (typed allocations are not directly "
-                 "supported with the GC_AMIGA_FASTALLOC option.)\n");
+                  "supported with the GC_AMIGA_FASTALLOC option.)\n");
         FAIL;
       }
     }
@@ -110,43 +122,36 @@ int realloc_count = 0;
   void *GC_amiga_gctest_calloc_explicitly_typed(size_t a,size_t lb, GC_descr d){
     void *ret=GC_calloc_explicitly_typed(a,lb,d);
     if(ret==NULL){
-               if(!GC_dont_gc){
-             GC_gcollect();
-             ret=GC_calloc_explicitly_typed(a,lb,d);
-               }
+                if(!GC_dont_gc){
+              GC_gcollect();
+              ret=GC_calloc_explicitly_typed(a,lb,d);
+                }
       if(ret==NULL){
         GC_printf("Out of memory, (typed allocations are not directly "
-                 "supported with the GC_AMIGA_FASTALLOC option.)\n");
+                  "supported with the GC_AMIGA_FASTALLOC option.)\n");
         FAIL;
       }
     }
     return ret;
   }
-# define GC_malloc_explicitly_typed(a,b) GC_amiga_gctest_malloc_explicitly_typed(a,b) 
-# define GC_calloc_explicitly_typed(a,b,c) GC_amiga_gctest_calloc_explicitly_typed(a,b,c) 
+# define GC_malloc_explicitly_typed(a,b) GC_amiga_gctest_malloc_explicitly_typed(a,b)
+# define GC_calloc_explicitly_typed(a,b,c) GC_amiga_gctest_calloc_explicitly_typed(a,b,c)
 
 #else /* !AMIGA_FASTALLOC */
 
 # ifdef PCR
 #   define FAIL (void)abort()
 # else
-#   ifdef MSWINCE
-#     define FAIL DebugBreak()
-#   else
-#     ifdef SMALL_CONFIG
-       void GC_abort(const char * msg);
-#     endif
-#     define FAIL GC_abort("Test failed");
-#   endif
+#   define FAIL ABORT("Test failed")
 # endif
 
 #endif /* !AMIGA_FASTALLOC */
 
-/* AT_END may be defined to exercise the interior pointer test */
+/* AT_END may be defined to exercise the interior pointer test  */
 /* if the collector is configured with ALL_INTERIOR_POINTERS.   */
-/* As it stands, this test should succeed with either          */
-/* configuration.  In the FIND_LEAK configuration, it should   */
-/* find lots of leaks, since we free almost nothing.           */
+/* As it stands, this test should succeed with either           */
+/* configuration.  In the FIND_LEAK configuration, it should    */
+/* find lots of leaks, since we free almost nothing.            */
 
 struct SEXPR {
     struct SEXPR * sexpr_car;
@@ -178,7 +183,7 @@ sexpr cons (sexpr x, sexpr y)
     sexpr r;
     int *p;
     int my_extra = extra_count;
-    
+
     stubborn_count++;
     r = (sexpr) GC_MALLOC_STUBBORN(sizeof(struct SEXPR) + my_extra);
     if (r == 0) {
@@ -187,14 +192,14 @@ sexpr cons (sexpr x, sexpr y)
     }
     for (p = (int *)r;
          ((char *)p) < ((char *)r) + my_extra + sizeof(struct SEXPR); p++) {
-       if (*p) {
-           (void)GC_printf("Found nonzero at %p - allocator is broken\n", p);
-           FAIL;
+        if (*p) {
+            (void)GC_printf("Found nonzero at %p - allocator is broken\n", p);
+            FAIL;
         }
         *p = (int)((13 << 12) + ((p - (int *)r) & 0xfff));
     }
 #   ifdef AT_END
-       r = (sexpr)((char *)r + (my_extra & ~7));
+        r = (sexpr)((char *)r + (my_extra & ~7));
 #   endif
     r -> sexpr_car = x;
     r -> sexpr_cdr = y;
@@ -214,37 +219,37 @@ sexpr cons (sexpr x, sexpr y)
 #include "gc_mark.h"
 #include "gc_gcj.h"
 
-/* The following struct emulates the vtable in gcj.    */
+/* The following struct emulates the vtable in gcj.     */
 /* This assumes the default value of MARK_DESCR_OFFSET. */
 struct fake_vtable {
-  void * dummy;                /* class pointer in real gcj.   */
+  void * dummy;         /* class pointer in real gcj.   */
   GC_word descr;
 };
 
 struct fake_vtable gcj_class_struct1 = { 0, sizeof(struct SEXPR)
-                                           + sizeof(struct fake_vtable *) };
-                       /* length based descriptor.     */
+                                            + sizeof(struct fake_vtable *) };
+                        /* length based descriptor.     */
 struct fake_vtable gcj_class_struct2 =
-                       { 0, ((GC_word)3 << (CPP_WORDSZ - 3)) | GC_DS_BITMAP};
-                       /* Bitmap based descriptor.     */
+                        { 0, ((GC_word)3 << (CPP_WORDSZ - 3)) | GC_DS_BITMAP};
+                        /* Bitmap based descriptor.     */
 
 struct GC_ms_entry * fake_gcj_mark_proc(word * addr,
-                                       struct GC_ms_entry *mark_stack_ptr,
-                                       struct GC_ms_entry *mark_stack_limit,
-                                       word env   )
+                                        struct GC_ms_entry *mark_stack_ptr,
+                                        struct GC_ms_entry *mark_stack_limit,
+                                        word env   )
 {
     sexpr x;
     if (1 == env) {
-       /* Object allocated with debug allocator.       */
-       addr = (word *)GC_USR_PTR_FROM_BASE(addr);
+        /* Object allocated with debug allocator.       */
+        addr = (word *)GC_USR_PTR_FROM_BASE(addr);
     }
     x = (sexpr)(addr + 1); /* Skip the vtable pointer. */
     mark_stack_ptr = GC_MARK_AND_PUSH(
-                             (void *)(x -> sexpr_cdr), mark_stack_ptr,
-                             mark_stack_limit, (void * *)&(x -> sexpr_cdr));
+                              (void *)(x -> sexpr_cdr), mark_stack_ptr,
+                              mark_stack_limit, (void * *)&(x -> sexpr_cdr));
     mark_stack_ptr = GC_MARK_AND_PUSH(
-                             (void *)(x -> sexpr_car), mark_stack_ptr,
-                             mark_stack_limit, (void * *)&(x -> sexpr_car));
+                              (void *)(x -> sexpr_car), mark_stack_ptr,
+                              mark_stack_limit, (void * *)&(x -> sexpr_car));
     return(mark_stack_ptr);
 }
 
@@ -254,7 +259,7 @@ struct GC_ms_entry * fake_gcj_mark_proc(word * addr,
 sexpr small_cons (sexpr x, sexpr y)
 {
     sexpr r;
-    
+
     collectable_count++;
     r = (sexpr) GC_MALLOC(sizeof(struct SEXPR));
     if (r == 0) {
@@ -269,7 +274,7 @@ sexpr small_cons (sexpr x, sexpr y)
 sexpr small_cons_uncollectable (sexpr x, sexpr y)
 {
     sexpr r;
-    
+
     uncollectable_count++;
     r = (sexpr) GC_MALLOC_UNCOLLECTABLE(sizeof(struct SEXPR));
     if (r == 0) {
@@ -288,10 +293,10 @@ sexpr gcj_cons(sexpr x, sexpr y)
 {
     GC_word * r;
     sexpr result;
-    
+
     r = (GC_word *) GC_GCJ_MALLOC(sizeof(struct SEXPR)
-                                 + sizeof(struct fake_vtable*),
-                                  &gcj_class_struct2);
+                                  + sizeof(struct fake_vtable*),
+                                   &gcj_class_struct2);
     if (r == 0) {
         (void)GC_printf("Out of memory\n");
         exit(1);
@@ -324,7 +329,7 @@ sexpr reverse(sexpr x)
 sexpr ints(int low, int up)
 {
     if (low > up) {
-       return(nil);
+        return(nil);
     } else {
         return(small_cons(small_cons(INT_TO_SEXPR(low), nil), ints(low+1, up)));
     }
@@ -349,19 +354,19 @@ sexpr gcj_reverse(sexpr x)
 sexpr gcj_ints(int low, int up)
 {
     if (low > up) {
-       return(nil);
+        return(nil);
     } else {
         return(gcj_cons(gcj_cons(INT_TO_SEXPR(low), nil), gcj_ints(low+1, up)));
     }
 }
 #endif /* GC_GCJ_SUPPORT */
 
-/* To check uncollectable allocation we build lists with disguised cdr */
-/* pointers, and make sure they don't go away.                         */
+/* To check uncollectable allocation we build lists with disguised cdr  */
+/* pointers, and make sure they don't go away.                          */
 sexpr uncollectable_ints(int low, int up)
 {
     if (low > up) {
-       return(nil);
+        return(nil);
     } else {
         return(small_cons_uncollectable(small_cons(INT_TO_SEXPR(low), nil),
                uncollectable_ints(low+1, up)));
@@ -424,9 +429,9 @@ void print_int_list(sexpr x)
 void check_marks_int_list(sexpr x)
 {
     if (!GC_is_marked((ptr_t)x))
-       GC_printf("[unm:%p]", x);
+        GC_printf("[unm:%p]", x);
     else
-       GC_printf("[mkd:%p]", x);
+        GC_printf("[mkd:%p]", x);
     if (is_nil(x)) {
         (void)GC_printf("NIL\n");
     } else {
@@ -446,6 +451,12 @@ void check_marks_int_list(sexpr x)
  */
 #ifdef THREADS
 
+# ifdef VERY_SMALL_CONFIG
+#   define TINY_REVERSE_UPPER_VALUE 4
+# else
+#   define TINY_REVERSE_UPPER_VALUE 10
+# endif
+
 # if defined(GC_WIN32_THREADS) && !defined(GC_PTHREADS)
     DWORD  __stdcall tiny_reverse_test(void * arg)
 # else
@@ -454,7 +465,8 @@ void check_marks_int_list(sexpr x)
 {
     int i;
     for (i = 0; i < 5; ++i) {
-      check_ints(reverse(reverse(ints(1,10))), 1, 10);
+      check_ints(reverse(reverse(ints(1, TINY_REVERSE_UPPER_VALUE))),
+                 1, TINY_REVERSE_UPPER_VALUE);
     }
     return 0;
 }
@@ -465,8 +477,8 @@ void check_marks_int_list(sexpr x)
       pthread_t t;
       int code;
       if ((code = pthread_create(&t, 0, tiny_reverse_test, 0)) != 0) {
-       (void)GC_printf("Small thread creation failed %d\n", code);
-       FAIL;
+        (void)GC_printf("Small thread creation failed %d\n", code);
+        FAIL;
       }
       if ((code = pthread_join(t, 0)) != 0) {
         (void)GC_printf("Small thread join failed %d\n", code);
@@ -477,24 +489,24 @@ void check_marks_int_list(sexpr x)
 # elif defined(GC_WIN32_THREADS)
     void fork_a_thread(void)
     {
-       DWORD thread_id;
-       HANDLE h;
-       h = GC_CreateThread(NULL, 0, tiny_reverse_test, 0, 0, &thread_id);
+        DWORD thread_id;
+        HANDLE h;
+        h = GC_CreateThread(NULL, 0, tiny_reverse_test, 0, 0, &thread_id);
         if (h == (HANDLE)NULL) {
             (void)GC_printf("Small thread creation failed %d\n",
-                           (int)GetLastError());
-           FAIL;
+                            (int)GetLastError());
+            FAIL;
+        }
+        if (WaitForSingleObject(h, INFINITE) != WAIT_OBJECT_0) {
+            (void)GC_printf("Small thread wait failed %d\n",
+                            (int)GetLastError());
+            FAIL;
         }
-       if (WaitForSingleObject(h, INFINITE) != WAIT_OBJECT_0) {
-           (void)GC_printf("Small thread wait failed %d\n",
-                           (int)GetLastError());
-           FAIL;
-       }
     }
 
 # endif
 
-#endif 
+#endif
 
 /* Try to force a to be strangely aligned */
 struct {
@@ -519,21 +531,21 @@ void reverse_test(void)
       /* Win32S only allows 128K stacks */
 #     define BIG 1000
 #   else
-#     if defined PCR
-       /* PCR default stack is 100K.  Stack frames are up to 120 bytes. */
-#      define BIG 700
+#     if defined(PCR)
+        /* PCR default stack is 100K.  Stack frames are up to 120 bytes. */
+#       define BIG 700
 #     else
-#      if defined MSWINCE
-         /* WinCE only allows 64K stacks */
-#        define BIG 500
-#      else
-#        if defined(OSF1)
-           /* OSF has limited stack space by default, and large frames. */
+#       if defined(MSWINCE)
+          /* WinCE only allows 64K stacks */
+#         define BIG 500
+#       else
+#         if defined(OSF1)
+            /* OSF has limited stack space by default, and large frames. */
 #           define BIG 200
-#        else
+#         else
 #           define BIG 4500
-#        endif
-#      endif
+#         endif
+#       endif
 #     endif
 #   endif
 
@@ -560,7 +572,7 @@ void reverse_test(void)
     h = (sexpr *)GC_REALLOC((void *)h, 2000 * sizeof(sexpr));
 #   ifdef GC_GCJ_SUPPORT
       h[1999] = gcj_ints(1,200);
-      for (i = 0; i < 51; ++i) 
+      for (i = 0; i < 51; ++i)
         h[1999] = gcj_reverse(h[1999]);
       /* Leave it as the reveresed list for now. */
 #   else
@@ -585,21 +597,21 @@ void reverse_test(void)
     check_ints(b,1,50);
     check_ints(a,1,49);
     for (i = 0; i < 60; i++) {
-#      if defined(GC_PTHREADS) || defined(GC_WIN32_THREADS)
-           if (i % 10 == 0) fork_a_thread();
-#      endif
-       /* This maintains the invariant that a always points to a list of */
-       /* 49 integers.  Thus this is thread safe without locks,          */
-       /* assuming atomic pointer assignments.                           */
+#       if defined(GC_PTHREADS) || defined(GC_WIN32_THREADS)
+            if (i % 10 == 0) fork_a_thread();
+#       endif
+        /* This maintains the invariant that a always points to a list of */
+        /* 49 integers.  Thus this is thread safe without locks,          */
+        /* assuming atomic pointer assignments.                           */
         a = reverse(reverse(a));
-#      if !defined(AT_END) && !defined(THREADS)
-         /* This is not thread safe, since realloc explicitly deallocates */
+#       if !defined(AT_END) && !defined(THREADS)
+          /* This is not thread safe, since realloc explicitly deallocates */
           if (i & 1) {
             a = (sexpr)GC_REALLOC((void *)a, 500);
           } else {
             a = (sexpr)GC_REALLOC((void *)a, 8200);
           }
-#      endif
+#       endif
     }
     check_ints(a,1,49);
     check_ints(b,1,50);
@@ -614,8 +626,8 @@ void reverse_test(void)
 #   endif
     check_ints(h[1999], 1,200);
 #   ifndef THREADS
-       a = 0;
-#   endif  
+        a = 0;
+#   endif
     *(volatile void **)&b = 0;
     *(volatile void **)&c = 0;
 }
@@ -654,7 +666,7 @@ void GC_CALLBACK finalizer(void * obj, void * client_data)
      FAIL;
   }
   finalized_count++;
-  t -> level = -1;     /* detect duplicate finalization immediately */
+  t -> level = -1;      /* detect duplicate finalization immediately */
 # ifdef PCR
     PCR_ThCrSec_ExitSys();
 # endif
@@ -681,14 +693,14 @@ int live_indicators_count = 0;
 tn * mktree(int n)
 {
     tn * result = (tn *)GC_MALLOC(sizeof(tn));
-    
+
     collectable_count++;
 #   if defined(MACOS)
-       /* get around static data limitations. */
-       if (!live_indicators)
-               live_indicators =
-                   (GC_word*)NewPtrClear(MAX_FINALIZED * sizeof(GC_word));
-       if (!live_indicators) {
+        /* get around static data limitations. */
+        if (!live_indicators)
+                live_indicators =
+                    (GC_word*)NewPtrClear(MAX_FINALIZED * sizeof(GC_word));
+        if (!live_indicators) {
           (void)GC_printf("Out of memory\n");
           exit(1);
         }
@@ -703,62 +715,62 @@ tn * mktree(int n)
     result -> rchild = mktree(n-1);
     if (counter++ % 17 == 0 && n >= 2) {
         tn * tmp = result -> lchild -> rchild;
-        
+
         result -> lchild -> rchild = result -> rchild -> lchild;
         result -> rchild -> lchild = tmp;
     }
     if (counter++ % 119 == 0) {
         int my_index;
-        
+
         {
-#        ifdef PCR
-           PCR_ThCrSec_EnterSys();
-#        endif
+#         ifdef PCR
+            PCR_ThCrSec_EnterSys();
+#         endif
 #         if defined(GC_PTHREADS)
             static pthread_mutex_t incr_lock = PTHREAD_MUTEX_INITIALIZER;
             pthread_mutex_lock(&incr_lock);
 #         elif defined(GC_WIN32_THREADS)
             EnterCriticalSection(&incr_cs);
 #         endif
-               /* Losing a count here causes erroneous report of failure. */
+                /* Losing a count here causes erroneous report of failure. */
           finalizable_count++;
           my_index = live_indicators_count++;
-#        ifdef PCR
-           PCR_ThCrSec_ExitSys();
-#        endif
-#        if defined(GC_PTHREADS)
-           pthread_mutex_unlock(&incr_lock);
-#        elif defined(GC_WIN32_THREADS)
+#         ifdef PCR
+            PCR_ThCrSec_ExitSys();
+#         endif
+#         if defined(GC_PTHREADS)
+            pthread_mutex_unlock(&incr_lock);
+#         elif defined(GC_WIN32_THREADS)
             LeaveCriticalSection(&incr_cs);
 #         endif
-       }
+        }
 
         GC_REGISTER_FINALIZER((void *)result, finalizer, (void *)(GC_word)n,
-                             (GC_finalization_proc *)0, (void * *)0);
+                              (GC_finalization_proc *)0, (void * *)0);
         if (my_index >= MAX_FINALIZED) {
-               GC_printf("live_indicators overflowed\n");
-               FAIL;
-       }
+                GC_printf("live_indicators overflowed\n");
+                FAIL;
+        }
         live_indicators[my_index] = 13;
         if (GC_GENERAL_REGISTER_DISAPPEARING_LINK(
-               (void * *)(&(live_indicators[my_index])),
-               (void *)result) != 0) {
-               GC_printf("GC_general_register_disappearing_link failed\n");
-               FAIL;
+                (void * *)(&(live_indicators[my_index])),
+                (void *)result) != 0) {
+                GC_printf("GC_general_register_disappearing_link failed\n");
+                FAIL;
         }
         if (GC_unregister_disappearing_link(
-               (void * *)
-                  (&(live_indicators[my_index]))) == 0) {
-               GC_printf("GC_unregister_disappearing_link failed\n");
-               FAIL;
+                (void * *)
+                   (&(live_indicators[my_index]))) == 0) {
+                GC_printf("GC_unregister_disappearing_link failed\n");
+                FAIL;
         }
         if (GC_GENERAL_REGISTER_DISAPPEARING_LINK(
-               (void * *)(&(live_indicators[my_index])),
-               (void *)result) != 0) {
-               GC_printf("GC_general_register_disappearing_link failed 2\n");
-               FAIL;
+                (void * *)(&(live_indicators[my_index])),
+                (void *)result) != 0) {
+                GC_printf("GC_general_register_disappearing_link failed 2\n");
+                FAIL;
         }
-       GC_reachable_here(result);
+        GC_reachable_here(result);
     }
     return(result);
 }
@@ -775,13 +787,13 @@ void chktree(tn *t, int n)
         FAIL;
     }
     if (counter++ % 373 == 0) {
-       collectable_count++;
-       (void) GC_MALLOC(counter%5001);
+        collectable_count++;
+        (void) GC_MALLOC(counter%5001);
     }
     chktree(t -> lchild, n-1);
     if (counter++ % 73 == 0) {
-       collectable_count++;
-       (void) GC_MALLOC(counter%373);
+        collectable_count++;
+        (void) GC_MALLOC(counter%373);
     }
     chktree(t -> rchild, n-1);
 }
@@ -798,14 +810,14 @@ void * alloc8bytes(void)
 # else
     void ** my_free_list_ptr;
     void * my_free_list;
-    
+
     my_free_list_ptr = (void **)pthread_getspecific(fl_key);
     if (my_free_list_ptr == 0) {
         uncollectable_count++;
         my_free_list_ptr = GC_NEW_UNCOLLECTABLE(void *);
         if (pthread_setspecific(fl_key, my_free_list_ptr) != 0) {
-           (void)GC_printf("pthread_setspecific failed\n");
-           FAIL;
+            (void)GC_printf("pthread_setspecific failed\n");
+            FAIL;
         }
     }
     my_free_list = *my_free_list_ptr;
@@ -813,7 +825,7 @@ void * alloc8bytes(void)
         my_free_list = GC_malloc_many(8);
         if (my_free_list == 0) {
             (void)GC_printf("alloc8bytes out of memory\n");
-           FAIL;
+            FAIL;
         }
     }
     *my_free_list_ptr = GC_NEXT(my_free_list);
@@ -830,7 +842,7 @@ void * alloc8bytes(void)
 void alloc_small(int n)
 {
     int i;
-    
+
     for (i = 0; i < n; i += 8) {
         atomic_count++;
         if (alloc8bytes() == 0) {
@@ -857,7 +869,7 @@ void tree_test(void)
 {
     tn * root;
     int i;
-    
+
     root = mktree(TREE_HEIGHT);
 #   ifndef VERY_SMALL_CONFIG
       alloc_small(5000000);
@@ -868,8 +880,8 @@ void tree_test(void)
         FAIL;
     }
     dropped_something = 1;
-    GC_noop1((word)root);      /* Root needs to remain live until      */
-                               /* dropped_something is set.            */
+    GC_noop1((word)root);       /* Root needs to remain live until      */
+                                /* dropped_something is set.            */
     root = mktree(TREE_HEIGHT);
     chktree(root, TREE_HEIGHT);
     for (i = TREE_HEIGHT; i >= 0; i--) {
@@ -881,11 +893,7 @@ void tree_test(void)
 #   endif
 }
 
-#if defined(THREADS) && defined(AO_HAVE_fetch_and_add1_full)
-  AO_t n_tests = 0; /* Updated by AO_fetch_and_add1_full(). */
-#else
-  unsigned n_tests = 0;
-#endif
+unsigned n_tests = 0;
 
 GC_word bm_huge[10] = {
     0xffffffff,
@@ -900,7 +908,7 @@ GC_word bm_huge[10] = {
     0x00ffffff,
 };
 
-/* A very simple test of explicitly typed allocation   */
+/* A very simple test of explicitly typed allocation    */
 void typed_test(void)
 {
     GC_word * old, * new;
@@ -913,50 +921,50 @@ void typed_test(void)
     GC_descr d4 = GC_make_descriptor(bm_huge, 320);
     GC_word * x = (GC_word *)GC_malloc_explicitly_typed(2000, d4);
     int i;
-    
+
 #   ifndef LINT
       (void)GC_make_descriptor(&bm_large, 32);
 #   endif
     collectable_count++;
     old = 0;
     for (i = 0; i < 4000; i++) {
-       collectable_count++;
+        collectable_count++;
         new = (GC_word *) GC_malloc_explicitly_typed(4 * sizeof(GC_word), d1);
         if (0 != new[0] || 0 != new[1]) {
-           GC_printf("Bad initialization by GC_malloc_explicitly_typed\n");
-           FAIL;
-       }
+            GC_printf("Bad initialization by GC_malloc_explicitly_typed\n");
+            FAIL;
+        }
         new[0] = 17;
         new[1] = (GC_word)old;
         old = new;
-       collectable_count++;
+        collectable_count++;
         new = (GC_word *) GC_malloc_explicitly_typed(4 * sizeof(GC_word), d2);
         new[0] = 17;
         new[1] = (GC_word)old;
         old = new;
-       collectable_count++;
+        collectable_count++;
         new = (GC_word *) GC_malloc_explicitly_typed(33 * sizeof(GC_word), d3);
         new[0] = 17;
         new[1] = (GC_word)old;
         old = new;
-       collectable_count++;
+        collectable_count++;
         new = (GC_word *) GC_calloc_explicitly_typed(4, 2 * sizeof(GC_word),
-                                                    d1);
+                                                     d1);
         new[0] = 17;
         new[1] = (GC_word)old;
         old = new;
-       collectable_count++;
+        collectable_count++;
         if (i & 0xff) {
           new = (GC_word *) GC_calloc_explicitly_typed(7, 3 * sizeof(GC_word),
-                                                    d2);
+                                                     d2);
         } else {
           new = (GC_word *) GC_calloc_explicitly_typed(1001,
-                                                      3 * sizeof(GC_word),
-                                                      d2);
+                                                       3 * sizeof(GC_word),
+                                                       d2);
           if (0 != new[0] || 0 != new[1]) {
-           GC_printf("Bad initialization by GC_malloc_explicitly_typed\n");
-           FAIL;
-         }
+            GC_printf("Bad initialization by GC_malloc_explicitly_typed\n");
+            FAIL;
+          }
         }
         new[0] = 17;
         new[1] = (GC_word)old;
@@ -965,7 +973,7 @@ void typed_test(void)
     for (i = 0; i < 20000; i++) {
         if (new[0] != 17) {
             (void)GC_printf("typed alloc failed at %lu\n",
-                           (unsigned long)i);
+                            (unsigned long)i);
             FAIL;
         }
         new[0] = 0;
@@ -982,7 +990,7 @@ int fail_count = 0;
 void GC_CALLBACK fail_proc1(void * x)
 {
     fail_count++;
-}   
+}
 
 static void uniq(void *p, ...) {
   va_list a;
@@ -999,86 +1007,92 @@ static void uniq(void *p, ...) {
               "Apparently failed to mark from some function arguments.\n"
               "Perhaps GC_push_regs was configured incorrectly?\n"
         );
-       FAIL;
+        FAIL;
       }
 }
 
 #ifdef THREADS
 #   define TEST_FAIL_COUNT(n) 1
-#else 
+#else
 #   define TEST_FAIL_COUNT(n) (fail_count >= (n))
 #endif
 
+void * GC_CALLBACK inc_int_counter(void *pcounter)
+{
+ ++(*(int *)pcounter);
+ return NULL;
+}
+
 void run_one_test(void)
 {
 #   ifndef DBG_HDRS_ALL
-       char *x;
-       char **z;
-#      ifdef LINT
-           char *y = 0;
-#      else
-           char *y = (char *)(GC_word)fail_proc1;
-#      endif
-       CLOCK_TYPE typed_time;
+        char *x;
+        char **z;
+#       ifdef LINT
+            char *y = 0;
+#       else
+            char *y = (char *)(GC_word)fail_proc1;
+#       endif
+        CLOCK_TYPE typed_time;
 #   endif
     CLOCK_TYPE start_time;
     CLOCK_TYPE reverse_time;
     CLOCK_TYPE tree_time;
     unsigned long time_diff;
-    
+
 #   ifdef FIND_LEAK
-       GC_printf(
-               "This test program is not designed for leak detection mode\n");
-       GC_printf("Expect lots of problems.\n");
+        GC_printf(
+                "This test program is not designed for leak detection mode\n");
+        GC_printf("Expect lots of problems.\n");
 #   endif
     GC_FREE(0);
 #   ifndef DBG_HDRS_ALL
       collectable_count += 3;
       if ((GC_size(GC_malloc(7)) != 8 &&
-          GC_size(GC_malloc(7)) != MIN_WORDS * sizeof(GC_word))
-       || GC_size(GC_malloc(15)) != 16) {
-           GC_printf("GC_size produced unexpected results\n");
-           FAIL;
+           GC_size(GC_malloc(7)) != MIN_WORDS * sizeof(GC_word))
+        || GC_size(GC_malloc(15)) != 16) {
+            GC_printf("GC_size produced unexpected results\n");
+            FAIL;
       }
       collectable_count += 1;
       if (GC_size(GC_malloc(0)) != MIN_WORDS * sizeof(GC_word)) {
-       GC_printf("GC_malloc(0) failed: GC_size returns %ld\n",
-                       (unsigned long)GC_size(GC_malloc(0)));
-       FAIL;
+        GC_printf("GC_malloc(0) failed: GC_size returns %ld\n",
+                        (unsigned long)GC_size(GC_malloc(0)));
+        FAIL;
       }
       collectable_count += 1;
       if (GC_size(GC_malloc_uncollectable(0)) != MIN_WORDS * sizeof(GC_word)) {
-       GC_printf("GC_malloc_uncollectable(0) failed\n");
-       FAIL;
+        GC_printf("GC_malloc_uncollectable(0) failed\n");
+        FAIL;
       }
       GC_is_valid_displacement_print_proc = fail_proc1;
       GC_is_visible_print_proc = fail_proc1;
       collectable_count += 1;
       x = GC_malloc(16);
       if (GC_base(GC_PTR_ADD(x, 13)) != x) {
-       GC_printf("GC_base(heap ptr) produced incorrect result\n");
-       FAIL;
+        GC_printf("GC_base(heap ptr) produced incorrect result\n");
+        FAIL;
       }
       (void)GC_PRE_INCR(x, 0);
       (void)GC_POST_INCR(x);
       (void)GC_POST_DECR(x);
       if (GC_base(x) != x) {
-       GC_printf("Bad INCR/DECR result\n");
-       FAIL;
+        GC_printf("Bad INCR/DECR result\n");
+        FAIL;
       }
 #     ifndef PCR
         if (GC_base(y) != 0) {
-         GC_printf("GC_base(fn_ptr) produced incorrect result\n");
-         FAIL;
+          GC_printf("GC_base(fn_ptr) produced incorrect result\n");
+          FAIL;
         }
 #     endif
       if (GC_same_obj(x+5, x) != x + 5) {
-       GC_printf("GC_same_obj produced incorrect result\n");
-       FAIL;
+        GC_printf("GC_same_obj produced incorrect result\n");
+        FAIL;
       }
       if (GC_is_visible(y) != y || GC_is_visible(x) != x) {
-       GC_printf("GC_is_visible produced incorrect result\n");
-       FAIL;
+        GC_printf("GC_is_visible produced incorrect result\n");
+        FAIL;
       }
       z = GC_malloc(8);
       GC_PTR_STORE(z, x);
@@ -1087,75 +1101,74 @@ void run_one_test(void)
         FAIL;
       }
       if (!TEST_FAIL_COUNT(1)) {
-#      if!(defined(POWERPC) || defined(IA64)) || defined(M68K)
-         /* On POWERPCs function pointers point to a descriptor in the */
-         /* data segment, so there should have been no failures.       */
-         /* The same applies to IA64.  Something similar seems to      */
-         /* be going on with NetBSD/M68K.                              */
-         GC_printf("GC_is_visible produced wrong failure indication\n");
-         FAIL;
-#      endif
+#       if!(defined(POWERPC) || defined(IA64)) || defined(M68K)
+          /* On POWERPCs function pointers point to a descriptor in the */
+          /* data segment, so there should have been no failures.       */
+          /* The same applies to IA64.  Something similar seems to      */
+          /* be going on with NetBSD/M68K.                              */
+          GC_printf("GC_is_visible produced wrong failure indication\n");
+          FAIL;
+#       endif
       }
       if (GC_is_valid_displacement(y) != y
         || GC_is_valid_displacement(x) != x
         || GC_is_valid_displacement(x + 3) != x + 3) {
-       GC_printf(
-               "GC_is_valid_displacement produced incorrect result\n");
-       FAIL;
+        GC_printf(
+                "GC_is_valid_displacement produced incorrect result\n");
+        FAIL;
       }
-#     if !defined(MSWINCE)
         {
-         size_t i;
-
-         GC_malloc(17);
-         for (i = sizeof(GC_word); i < 512; i *= 2) {
-           GC_word result = (GC_word) GC_memalign(i, 17);
-           if (result % i != 0 || result == 0 || *(int *)result != 0) FAIL;
-         } 
-       }
-#     endif
+          size_t i;
+
+          GC_malloc(17);
+          for (i = sizeof(GC_word); i < 512; i *= 2) {
+            GC_word result = (GC_word) GC_memalign(i, 17);
+            if (result % i != 0 || result == 0 || *(int *)result != 0) FAIL;
+          }
+        }
 #     ifndef ALL_INTERIOR_POINTERS
 #      if defined(RS6000) || defined(POWERPC)
-        if (!TEST_FAIL_COUNT(1)) {
+        if (!TEST_FAIL_COUNT(1))
 #      else
         if ((GC_all_interior_pointers && !TEST_FAIL_COUNT(1))
-           || (!GC_all_interior_pointers && !TEST_FAIL_COUNT(2))) {
+            || (!GC_all_interior_pointers && !TEST_FAIL_COUNT(2)))
 #      endif
-         GC_printf("GC_is_valid_displacement produced wrong failure indication\n");
-         FAIL;
+        {
+          GC_printf("GC_is_valid_displacement produced wrong failure indication\n");
+          FAIL;
         }
 #     endif
 #   endif /* DBG_HDRS_ALL */
     /* Test floating point alignment */
         collectable_count += 2;
-       *(double *)GC_MALLOC(sizeof(double)) = 1.0;
-       *(double *)GC_MALLOC(sizeof(double)) = 1.0;
+        *(double *)GC_MALLOC(sizeof(double)) = 1.0;
+        *(double *)GC_MALLOC(sizeof(double)) = 1.0;
     /* Test size 0 allocation a bit more */
-       {
-          size_t i;
-          for (i = 0; i < 10000; ++i) {
-            GC_MALLOC(0);
-            GC_FREE(GC_MALLOC(0));
-            GC_MALLOC_ATOMIC(0);
-            GC_FREE(GC_MALLOC_ATOMIC(0));
-          }
-        }
+        {
+           size_t i;
+           for (i = 0; i < 10000; ++i) {
+             GC_MALLOC(0);
+             GC_FREE(GC_MALLOC(0));
+             GC_MALLOC_ATOMIC(0);
+             GC_FREE(GC_MALLOC_ATOMIC(0));
+           }
+         }
 #   ifdef GC_GCJ_SUPPORT
       GC_REGISTER_DISPLACEMENT(sizeof(struct fake_vtable *));
       GC_init_gcj_malloc(0, (void *)(GC_word)fake_gcj_mark_proc);
 #   endif
-    /* Make sure that fn arguments are visible to the collector.       */
+    /* Make sure that fn arguments are visible to the collector.        */
       uniq(
         GC_malloc(12), GC_malloc(12), GC_malloc(12),
         (GC_gcollect(),GC_malloc(12)),
         GC_malloc(12), GC_malloc(12), GC_malloc(12),
-       (GC_gcollect(),GC_malloc(12)),
+        (GC_gcollect(),GC_malloc(12)),
         GC_malloc(12), GC_malloc(12), GC_malloc(12),
-       (GC_gcollect(),GC_malloc(12)),
+        (GC_gcollect(),GC_malloc(12)),
         GC_malloc(12), GC_malloc(12), GC_malloc(12),
-       (GC_gcollect(),GC_malloc(12)),
+        (GC_gcollect(),GC_malloc(12)),
         GC_malloc(12), GC_malloc(12), GC_malloc(12),
-       (GC_gcollect(),GC_malloc(12)),
+        (GC_gcollect(),GC_malloc(12)),
         (void *)0);
     /* GC_malloc(0) must return NULL or something we can deallocate. */
         GC_free(GC_malloc(0));
@@ -1164,20 +1177,20 @@ void run_one_test(void)
         GC_free(GC_malloc_atomic(0));
     /* Repeated list reversal test. */
         GET_TIME(start_time);
-       reverse_test();
-       if (GC_print_stats) {
+        reverse_test();
+        if (GC_print_stats) {
           GET_TIME(reverse_time);
           time_diff = MS_TIME_DIFF(reverse_time, start_time);
-         GC_log_printf("-------------Finished reverse_test at time %u (%p)\n",
-                       (unsigned) time_diff, &start_time);
-       }
+          GC_log_printf("-------------Finished reverse_test at time %u (%p)\n",
+                        (unsigned) time_diff, &start_time);
+        }
 #   ifndef DBG_HDRS_ALL
       typed_test();
       if (GC_print_stats) {
         GET_TIME(typed_time);
         time_diff = MS_TIME_DIFF(typed_time, start_time);
-       GC_log_printf("-------------Finished typed_test at time %u (%p)\n",
-                     (unsigned) time_diff, &start_time);
+        GC_log_printf("-------------Finished typed_test at time %u (%p)\n",
+                      (unsigned) time_diff, &start_time);
       }
 #   endif /* DBG_HDRS_ALL */
     tree_test();
@@ -1185,34 +1198,27 @@ void run_one_test(void)
       GET_TIME(tree_time);
       time_diff = MS_TIME_DIFF(tree_time, start_time);
       GC_log_printf("-------------Finished tree_test at time %u (%p)\n",
-                     (unsigned) time_diff, &start_time);
+                      (unsigned) time_diff, &start_time);
     }
     /* Run reverse_test a second time, so we hopefully notice corruption. */
       reverse_test();
       if (GC_print_stats) {
           GET_TIME(reverse_time);
           time_diff = MS_TIME_DIFF(reverse_time, start_time);
-         GC_log_printf("-------------Finished second reverse_test at time %u (%p)\n",
-                       (unsigned) time_diff, &start_time);
+          GC_log_printf("-------------Finished second reverse_test at time %u (%p)\n",
+                        (unsigned) time_diff, &start_time);
       }
-#   if defined(THREADS) && defined(AO_HAVE_fetch_and_add1_full)
-      /* Use AO_fetch_and_add1_full() if available.            */
-      /* GC_allocate_ml may not always be visible outside GC.  */
-      (void)AO_fetch_and_add1_full(&n_tests);
-#   else
-      LOCK();
-      /* AO_fetch_and_add1 is not always available.    */
-      n_tests++;
-      UNLOCK();
-#   endif
+    /* GC_allocate_ml and GC_need_to_lock are no longer exported, and   */
+    /* AO_fetch_and_add1() may be unavailable to update a counter.      */
+    (void)GC_call_with_alloc_lock(inc_int_counter, &n_tests);
 #   if defined(THREADS) && defined(HANDLE_FORK)
       if (fork() == 0) {
-       GC_gcollect();
-       tiny_reverse_test(0);
-       GC_gcollect();
+        GC_gcollect();
+        tiny_reverse_test(0);
+        GC_gcollect();
         if (GC_print_stats)
-         GC_log_printf("Finished a child process\n");
-       exit(0);
+          GC_log_printf("Finished a child process\n");
+        exit(0);
       }
 #   endif
     if (GC_print_stats)
@@ -1225,59 +1231,59 @@ void check_heap_stats(void)
     int i;
     int still_live;
 #   ifdef FINALIZE_ON_DEMAND
-       int late_finalize_count = 0;
+        int late_finalize_count = 0;
 #   endif
-    
+
 #   ifdef VERY_SMALL_CONFIG
-    /* The upper bounds are a guess, which has been empirically        */
-    /* adjusted.  On low end uniprocessors with incremental GC */
+    /* The upper bounds are a guess, which has been empirically */
+    /* adjusted.  On low end uniprocessors with incremental GC  */
     /* these may be particularly dubious, since empirically the */
-    /* heap tends to grow largely as a result of the GC not    */
-    /* getting enough cycles.                                  */
-    if (sizeof(char *) > 4) {
+    /* heap tends to grow largely as a result of the GC not     */
+    /* getting enough cycles.                                   */
+#     if CPP_WORDSZ == 64
         max_heap_sz = 4500000;
-    } else {
-       max_heap_sz = 2800000;
-    }
+#     else
+        max_heap_sz = 2800000;
+#     endif
 #   else
-    if (sizeof(char *) > 4) {
+#     if CPP_WORDSZ == 64
         max_heap_sz = 19000000;
-    } else {
-       max_heap_sz = 12000000;
-    }
+#     else
+        max_heap_sz = 12000000;
+#     endif
 #   endif
 #   ifdef GC_DEBUG
-       max_heap_sz *= 2;
+        max_heap_sz *= 2;
 #       ifdef SAVE_CALL_CHAIN
-           max_heap_sz *= 3;
+            max_heap_sz *= 3;
 #           ifdef SAVE_CALL_COUNT
-               max_heap_sz += max_heap_sz * SAVE_CALL_COUNT/4;
-#          endif
+                max_heap_sz += max_heap_sz * SAVE_CALL_COUNT/4;
+#           endif
 #       endif
 #   endif
-    /* Garbage collect repeatedly so that all inaccessible objects     */
-    /* can be finalized.                                               */
+    /* Garbage collect repeatedly so that all inaccessible objects      */
+    /* can be finalized.                                                */
       while (GC_collect_a_little()) { }
       for (i = 0; i < 16; i++) {
         GC_gcollect();
 #   ifdef FINALIZE_ON_DEMAND
-          late_finalize_count +=
+           late_finalize_count +=
 #   endif
-               GC_invoke_finalizers();
+                GC_invoke_finalizers();
       }
-    (void)GC_printf("Completed %u tests\n", (unsigned) n_tests);
+    (void)GC_printf("Completed %u tests\n", n_tests);
     (void)GC_printf("Allocated %d collectable objects\n", collectable_count);
     (void)GC_printf("Allocated %d uncollectable objects\n",
-                   uncollectable_count);
+                    uncollectable_count);
     (void)GC_printf("Allocated %d atomic objects\n", atomic_count);
     (void)GC_printf("Allocated %d stubborn objects\n", stubborn_count);
     (void)GC_printf("Finalized %d/%d objects - ",
-                   finalized_count, finalizable_count);
+                    finalized_count, finalizable_count);
 #   ifdef FINALIZE_ON_DEMAND
-       if (finalized_count != late_finalize_count) {
+        if (finalized_count != late_finalize_count) {
             (void)GC_printf("Demand finalization error\n");
-           FAIL;
-       }
+            FAIL;
+        }
 #   endif
     if (finalized_count > finalizable_count
         || finalized_count < finalizable_count/2) {
@@ -1288,25 +1294,25 @@ void check_heap_stats(void)
     }
     still_live = 0;
     for (i = 0; i < MAX_FINALIZED; i++) {
-       if (live_indicators[i] != 0) {
-           still_live++;
-       }
+        if (live_indicators[i] != 0) {
+            still_live++;
+        }
     }
     i = finalizable_count - finalized_count - still_live;
     if (0 != i) {
         GC_printf("%d disappearing links remain and %d more objects "
-                 "were not finalized\n", still_live, i);
+                  "were not finalized\n", still_live, i);
         if (i > 10) {
-           GC_printf("\tVery suspicious!\n");
-       } else {
-           GC_printf("\tSlightly suspicious, but probably OK.\n");
-       }
+            GC_printf("\tVery suspicious!\n");
+        } else {
+            GC_printf("\tSlightly suspicious, but probably OK.\n");
+        }
     }
     (void)GC_printf("Total number of bytes allocated is %lu\n",
-               (unsigned long)
-                  (GC_bytes_allocd + GC_bytes_allocd_before_gc));
+                (unsigned long)
+                   (GC_bytes_allocd + GC_bytes_allocd_before_gc));
     (void)GC_printf("Final heap size is %lu bytes\n",
-                   (unsigned long)GC_get_heap_size());
+                    (unsigned long)GC_get_heap_size());
     if (GC_bytes_allocd + GC_bytes_allocd_before_gc < n_tests *
 #   ifdef VERY_SMALL_CONFIG
         2700000
@@ -1317,8 +1323,7 @@ void check_heap_stats(void)
         (void)GC_printf("Incorrect execution - missed some allocations\n");
         FAIL;
     }
-    if (GC_get_heap_size() > max_heap_sz*n_tests) {
-       /* FIXME: is the condition correct?     */
+    if (GC_get_heap_size() + GC_get_unmapped_bytes() > max_heap_sz*n_tests) {
         (void)GC_printf("Unexpected heap growth - collector may be broken\n");
         FAIL;
     }
@@ -1328,15 +1333,15 @@ void check_heap_stats(void)
 #if defined(MACOS)
 void SetMinimumStack(long minSize)
 {
-       long newApplLimit;
-
-       if (minSize > LMGetDefltStack())
-       {
-               newApplLimit = (long) GetApplLimit()
-                               - (minSize - LMGetDefltStack());
-               SetApplLimit((Ptr) newApplLimit);
-               MaxApplZone();
-       }
+        long newApplLimit;
+
+        if (minSize > LMGetDefltStack())
+        {
+                newApplLimit = (long) GetApplLimit()
+                                - (minSize - LMGetDefltStack());
+                SetApplLimit((Ptr) newApplLimit);
+                MaxApplZone();
+        }
 }
 
 #define cMinStackSpace (512L * 1024L)
@@ -1349,22 +1354,28 @@ void GC_CALLBACK warn_proc(char *msg, GC_word p)
     /*FAIL;*/
 }
 
+#if defined(MSWINCE) && defined(UNDER_CE)
+# define WINMAIN_LPTSTR LPWSTR
+#else
+# define WINMAIN_LPTSTR LPSTR
+#endif
 
 #if !defined(PCR) \
     && !defined(GC_WIN32_THREADS) && !defined(GC_PTHREADS) \
     || defined(LINT)
-#if defined(MSWIN32) && !defined(__MINGW32__)
-  int APIENTRY WinMain(HINSTANCE instance, HINSTANCE prev, LPTSTR cmd, int n)
+#if defined(MSWIN32) && !defined(__MINGW32__) || defined(MSWINCE)
+  int APIENTRY WinMain(HINSTANCE instance, HINSTANCE prev,
+                       WINMAIN_LPTSTR cmd, int n)
 #else
   int main(void)
 #endif
 {
     n_tests = 0;
 #   if defined(MACOS)
-       /* Make sure we have lots and lots of stack space.      */
-       SetMinimumStack(cMinStackSpace);
-       /* Cheat and let stdio initialize toolbox for us.       */
-       printf("Testing GC Macintosh port.\n");
+        /* Make sure we have lots and lots of stack space.      */
+        SetMinimumStack(cMinStackSpace);
+        /* Cheat and let stdio initialize toolbox for us.       */
+        printf("Testing GC Macintosh port.\n");
 #   endif
     GC_COND_INIT();
     GC_set_warn_proc(warn_proc);
@@ -1373,12 +1384,12 @@ void GC_CALLBACK warn_proc(char *msg, GC_word p)
       GC_enable_incremental();
       GC_printf("Switched to incremental mode\n");
 #     if defined(MPROTECT_VDB)
-       GC_printf("Emulating dirty bits with mprotect/signals\n");
+        GC_printf("Emulating dirty bits with mprotect/signals\n");
 #     else
 #       ifdef PROC_VDB
-         GC_printf("Reading dirty bits from /proc\n");
+          GC_printf("Reading dirty bits from /proc\n");
 #       else
-         GC_printf("Using DEFAULT_VDB dirty bit implementation\n");
+          GC_printf("Using DEFAULT_VDB dirty bit implementation\n");
 #       endif
 #      endif
 #   endif
@@ -1388,21 +1399,19 @@ void GC_CALLBACK warn_proc(char *msg, GC_word p)
       fflush(stdout);
 #   endif
 #   ifdef LINT
-       /* Entry points we should be testing, but aren't.                  */
-       /* Some can be tested by defining GC_DEBUG at the top of this file */
-       /* This is a bit SunOS4 specific.                                  */                   
-       GC_noop(GC_expand_hp, GC_add_roots, GC_clear_roots,
-               GC_register_disappearing_link,
-               GC_register_finalizer_ignore_self,
-               GC_debug_register_displacement,
-               GC_print_obj, GC_debug_change_stubborn,
-               GC_debug_end_stubborn_change, GC_debug_malloc_uncollectable,
-               GC_debug_free, GC_debug_realloc, GC_generic_malloc_words_small,
-               GC_init, GC_make_closure, GC_debug_invoke_finalizer,
-               GC_page_was_ever_dirty, GC_is_fresh,
-               GC_malloc_ignore_off_page, GC_malloc_atomic_ignore_off_page,
-               GC_set_max_heap_size, GC_get_bytes_since_gc,
-               GC_get_total_bytes, GC_pre_incr, GC_post_incr);
+        /* Entry points we should be testing, but aren't.                  */
+        /* Some can be tested by defining GC_DEBUG at the top of this file */
+        /* This is a bit SunOS4 specific.                                  */
+        GC_noop(GC_expand_hp, GC_add_roots, GC_clear_roots,
+                GC_register_disappearing_link,
+                GC_register_finalizer_ignore_self,
+                GC_debug_register_displacement, GC_debug_change_stubborn,
+                GC_debug_end_stubborn_change, GC_debug_malloc_uncollectable,
+                GC_debug_free, GC_debug_realloc,
+                GC_generic_malloc_words_small, GC_init,
+                GC_malloc_ignore_off_page, GC_malloc_atomic_ignore_off_page,
+                GC_set_max_heap_size, GC_get_bytes_since_gc,
+                GC_get_total_bytes, GC_pre_incr, GC_post_incr);
 #   endif
 #   ifdef MSWIN32
       GC_win32_free_heap();
@@ -1429,7 +1438,8 @@ LRESULT CALLBACK window_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
   switch (uMsg) {
     case WM_HIBERNATE:
       GC_printf("Received WM_HIBERNATE, calling GC_gcollect\n");
-      GC_gcollect();
+      /* Force "unmap as much memory as possible" mode. */
+      GC_gcollect_and_unmap();
       break;
     case WM_CLOSE:
       GC_printf("Received WM_CLOSE, closing window\n");
@@ -1457,7 +1467,7 @@ DWORD __stdcall thr_window(void *arg)
     NULL,
     (HBRUSH)(COLOR_APPWORKSPACE+1),
     NULL,
-    L"GCtestWindow"
+    TEXT("GCtestWindow")
   };
   MSG msg;
 
@@ -1466,8 +1476,8 @@ DWORD __stdcall thr_window(void *arg)
 
   win_handle = CreateWindowEx(
     0,
-    L"GCtestWindow",
-    L"GCtest",
+    TEXT("GCtestWindow"),
+    TEXT("GCtest"),
     0,
     CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
     NULL,
@@ -1492,11 +1502,8 @@ DWORD __stdcall thr_window(void *arg)
 }
 #endif
 
-# ifdef MSWINCE
-int APIENTRY GC_WinMain(HINSTANCE instance, HINSTANCE prev, LPWSTR cmd, int n)
-#   else
-int APIENTRY WinMain(HINSTANCE instance, HINSTANCE prev, LPSTR cmd, int n)
-# endif
+int APIENTRY WinMain(HINSTANCE instance, HINSTANCE prev,
+                     WINMAIN_LPTSTR cmd, int n)
 {
 # if NTHREADS > 0
    HANDLE h[NTHREADS];
@@ -1506,8 +1513,8 @@ int APIENTRY WinMain(HINSTANCE instance, HINSTANCE prev, LPSTR cmd, int n)
     HANDLE win_thr_h;
 # endif
   DWORD thread_id;
-
-# if defined(GC_DLL) && !defined(THREAD_LOCAL_ALLOC) && !defined(PARALLEL_MARK)
+# if defined(GC_DLL) && !defined(GC_NO_DLLMAIN) && !defined(MSWINCE) \
+        && !defined(THREAD_LOCAL_ALLOC) && !defined(PARALLEL_MARK)
     GC_use_DllMain();  /* Test with implicit thread registration if possible. */
     GC_printf("Using DllMain to track threads\n");
 # endif
@@ -1606,34 +1613,35 @@ int main(void)
     int code;
     int i;
 #   ifdef GC_IRIX_THREADS
-       /* Force a larger stack to be preallocated      */
-       /* Since the initial cant always grow later.    */
-       *((volatile char *)&code - 1024*1024) = 0;      /* Require 1 Mb */
+        /* Force a larger stack to be preallocated      */
+        /* Since the initial can't always grow later.   */
+        *((volatile char *)&code - 1024*1024) = 0;      /* Require 1 MB */
 #   endif /* GC_IRIX_THREADS */
 #   if defined(GC_HPUX_THREADS)
-       /* Default stack size is too small, especially with the 64 bit ABI */
-       /* Increase it.                                                    */
-       if (pthread_default_stacksize_np(1024*1024, 0) != 0) {
+        /* Default stack size is too small, especially with the 64 bit ABI */
+        /* Increase it.                                                    */
+        if (pthread_default_stacksize_np(1024*1024, 0) != 0) {
           (void)GC_printf("pthread_default_stacksize_np failed.\n");
-       }
-#   endif      /* GC_HPUX_THREADS */
+        }
+#   endif       /* GC_HPUX_THREADS */
 #   ifdef PTW32_STATIC_LIB
-       pthread_win32_process_attach_np ();
-       pthread_win32_thread_attach_np ();
+        pthread_win32_process_attach_np ();
+        pthread_win32_thread_attach_np ();
 #   endif
     GC_COND_INIT();
 
     pthread_attr_init(&attr);
 #   if defined(GC_IRIX_THREADS) || defined(GC_FREEBSD_THREADS) \
-       || defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)
-       pthread_attr_setstacksize(&attr, 1000000);
+        || defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS) \
+        || defined(GC_OPENBSD_THREADS)
+        pthread_attr_setstacksize(&attr, 1000000);
 #   endif
     n_tests = 0;
 #   if (defined(MPROTECT_VDB)) \
             && !defined(PARALLEL_MARK) &&!defined(REDIRECT_MALLOC) \
             && !defined(MAKE_BACK_GRAPH) && !defined(USE_PROC_FOR_LIBRARIES) \
-           && !defined(NO_INCREMENTAL)
-       GC_enable_incremental();
+            && !defined(NO_INCREMENTAL)
+        GC_enable_incremental();
         (void) GC_printf("Switched to incremental mode\n");
 #     if defined(MPROTECT_VDB)
         (void)GC_printf("Emulating dirty bits with mprotect/signals\n");
@@ -1648,12 +1656,12 @@ int main(void)
     GC_set_warn_proc(warn_proc);
     if ((code = pthread_key_create(&fl_key, 0)) != 0) {
         (void)GC_printf("Key creation failed %d\n", code);
-       FAIL;
+        FAIL;
     }
     for (i = 0; i < NTHREADS; ++i) {
       if ((code = pthread_create(th+i, &attr, thr_run_one_test, 0)) != 0) {
-       (void)GC_printf("Thread %d creation failed %d\n", i, code);
-       FAIL;
+        (void)GC_printf("Thread %d creation failed %d\n", i, code);
+        FAIL;
       }
     }
     run_one_test();
@@ -1668,8 +1676,8 @@ int main(void)
     pthread_attr_destroy(&attr);
     GC_printf("Completed %u collections\n", (unsigned)GC_gc_no);
 #   ifdef PTW32_STATIC_LIB
-       pthread_win32_thread_detach_np ();
-       pthread_win32_process_detach_np ();
+        pthread_win32_thread_detach_np ();
+        pthread_win32_process_detach_np ();
 #   endif
     return(0);
 }
index 98cb28196f0eb26fa4648a575710769f0b75e390..94a8ca37e4ae68477ac0ee5016b9ebe7b0a3f496 100644 (file)
@@ -1,9 +1,9 @@
 /****************************************************************************
 Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
+
 THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
 OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+
 Permission is hereby granted to use or copy this program for any
 purpose, provided the above notices are retained on all copies.
 Permission to modify the code and to distribute modified code is
@@ -24,6 +24,10 @@ few minutes to complete.
 
 ***************************************************************************/
 
+#ifdef HAVE_CONFIG_H
+# include "private/config.h"
+#endif
+#undef GC_BUILD
 #include "gc_cpp.h"
 #include <stdio.h>
 #include <stdlib.h>
@@ -40,8 +44,8 @@ extern "C" {
 # include "private/gcconfig.h"
   GC_API void GC_printf(const char *format, ...);
   /* Use GC private output to reach the same log file.  */
-  /* Don't include gc_priv.h, since that may include Windows system    */
-  /* header files that don't take kindly to this context.              */
+  /* Don't include gc_priv.h, since that may include Windows system     */
+  /* header files that don't take kindly to this context.               */
 }
 #ifdef MSWIN32
 #   include <windows.h>
@@ -66,7 +70,7 @@ class A {public:
 
     A( int iArg ): i( iArg ) {}
     void Test( int iArg ) {
-        my_assert( i == iArg );} 
+        my_assert( i == iArg );}
     int i;};
 
 
@@ -96,7 +100,7 @@ class C: public gc_cleanup, public A {public:
     ~C() {
         this->A::Test( level );
         nFreed++;
-        my_assert( level == 0 ? 
+        my_assert( level == 0 ?
                    left == 0 && right == 0 :
                    level == left->level + 1 && level == right->level + 1 );
         left = right = 0;
@@ -126,7 +130,7 @@ class D: public gc {public:
         my_assert( self->i == (int) (GC_word) data );}
     static void Test() {
         my_assert( nFreed >= .8 * nAllocated );}
-       
+
     int i;
     static int nFreed;
     static int nAllocated;};
@@ -145,10 +149,10 @@ class E: public gc_cleanup {public:
 
     static int nFreed;
     static int nAllocated;};
-    
+
 int E::nFreed = 0;
 int E::nAllocated = 0;
-   
+
 
 class F: public E {public:
     /* A collectable class with clean-up, a base with clean-up, and a
@@ -161,14 +165,14 @@ class F: public E {public:
     static void Test() {
         my_assert( nFreed >= .8 * nAllocated );
         my_assert( 2 * nFreed == E::nFreed );}
-       
+
     E e;
     static int nFreed;
     static int nAllocated;};
-    
+
 int F::nFreed = 0;
 int F::nAllocated = 0;
-   
+
 
 GC_word Disguise( void* p ) {
     return ~ (GC_word) p;}
@@ -179,7 +183,7 @@ void* Undisguise( GC_word i ) {
 
 #ifdef MSWIN32
 int APIENTRY WinMain(
-    HINSTANCE instance, HINSTANCE prev, LPSTR cmd, int cmdShow ) 
+    HINSTANCE instance, HINSTANCE prev, LPSTR cmd, int cmdShow )
 {
     int argc;
     char* argv[ 3 ];
@@ -202,13 +206,13 @@ int APIENTRY WinMain(
     char* argv_[] = {"test_cpp", "10"};     //   doesn't
     argv = argv_;                           //     have a
     argc = sizeof(argv_)/sizeof(argv_[0]);  //       commandline
-#  endif 
+#  endif
     int i, iters, n;
 #   ifdef USE_STD_ALLOCATOR
       int *x = gc_allocator<int>().allocate(1);
       int *xio = gc_allocator_ignore_off_page<int>().allocate(1);
       int **xptr = traceable_allocator<int *>().allocate(1);
-#   else 
+#   else
 #     ifdef __GNUC__
           int *x = (int *)gc_alloc::allocate(sizeof(int));
 #     else
@@ -223,7 +227,7 @@ int APIENTRY WinMain(
     if (argc != 2 || (0 >= (n = atoi( argv[ 1 ] )))) {
         GC_printf( "usage: test_cpp number-of-iterations\nAssuming 10 iters\n" );
         n = 10;}
-        
+
     for (iters = 1; iters <= n; iters++) {
         GC_printf( "Starting iteration %d\n", iters );
 
@@ -256,10 +260,10 @@ int APIENTRY WinMain(
                 B::Deleting( 1 );
                 delete b;
                 B::Deleting( 0 );}
-#          ifdef FINALIZE_ON_DEMAND
-             GC_invoke_finalizers();
-#          endif
-           }
+#           ifdef FINALIZE_ON_DEMAND
+              GC_invoke_finalizers();
+#           endif
+            }
 
             /* Make sure the uncollectable As and Bs are still there. */
         for (i = 0; i < 1000; i++) {
@@ -271,11 +275,11 @@ int APIENTRY WinMain(
             B::Deleting( 1 );
             delete b;
             B::Deleting( 0 );
-#          ifdef FINALIZE_ON_DEMAND
-                GC_invoke_finalizers();
-#          endif
+#           ifdef FINALIZE_ON_DEMAND
+                 GC_invoke_finalizers();
+#           endif
 
-           }
+            }
 
             /* Make sure most of the finalizable Cs, Ds, and Fs have
             gone away. */
@@ -289,5 +293,3 @@ int APIENTRY WinMain(
     my_assert (29 == x[0]);
     GC_printf( "The test appears to have succeeded.\n" );
     return( 0 );}
-    
-
index a9c0e73fb112593561c2babe4a9415ee46a4f6e4..9ad3c745fb30656518af8e53c5841b8f1d646ae1 100644 (file)
@@ -46,10 +46,12 @@ check_PROGRAMS += hugetest
 hugetest_SOURCES = tests/huge_test.c
 hugetest_LDADD = $(test_ldadd)
 
-#TESTS += tracetest$(EXEEXT)
-#check_PROGRAMS += tracetest
-#tracetest_SOURCES = tests/trace_test.c
-#tracetest_LDADD = $(test_ldadd)
+if KEEP_BACK_PTRS
+TESTS += tracetest$(EXEEXT)
+check_PROGRAMS += tracetest
+tracetest_SOURCES = tests/trace_test.c
+tracetest_LDADD = $(test_ldadd)
+endif
 
 if THREADS
 TESTS += threadleaktest$(EXEEXT)
index 4d907fe4c35176481747c13910bd75b3286a37c8..1e9120d46aed53d701db6493925614f39527d114 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) 2000-2005 by Hewlett-Packard Company.  All rights reserved.
  *
  * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
  * provided the above notices are retained, and a notice that the code was
  * modified is included with the above copyright notice.
  */
+
 #include "private/gc_priv.h"
 
-# if defined(THREAD_LOCAL_ALLOC)
+#if defined(THREAD_LOCAL_ALLOC)
+
+#ifndef THREADS
+# error "invalid config - THREAD_LOCAL_ALLOC requires GC_THREADS"
+#endif
 
 #include "private/thread_local_alloc.h"
-#include "gc_inline.h"
 
-# include <stdlib.h>
+#include <stdlib.h>
 
 #if defined(USE_COMPILER_TLS)
   __thread
@@ -28,8 +32,8 @@ GC_key_t GC_thread_key;
 
 static GC_bool keys_initialized;
 
-/* Return a single nonempty freelist fl to the global one pointed to   */
-/* by gfl.     */
+/* Return a single nonempty freelist fl to the global one pointed to    */
+/* by gfl.      */
 
 static void return_single_freelist(void *fl, void **gfl)
 {
@@ -40,30 +44,30 @@ static void return_single_freelist(void *fl, void **gfl)
     } else {
       GC_ASSERT(GC_size(fl) == GC_size(*gfl));
       /* Concatenate: */
-       qptr = &(obj_link(fl));
-       while ((word)(q = *qptr) >= HBLKSIZE)
-         qptr = &(obj_link(q));
-       GC_ASSERT(0 == q);
-       *qptr = *gfl;
-       *gfl = fl;
+        qptr = &(obj_link(fl));
+        while ((word)(q = *qptr) >= HBLKSIZE)
+          qptr = &(obj_link(q));
+        GC_ASSERT(0 == q);
+        *qptr = *gfl;
+        *gfl = fl;
     }
 }
 
 /* Recover the contents of the freelist array fl into the global one gfl.*/
-/* We hold the allocator lock.                                         */
+/* We hold the allocator lock.                                          */
 static void return_freelists(void **fl, void **gfl)
 {
     int i;
 
     for (i = 1; i < TINY_FREELISTS; ++i) {
-       if ((word)(fl[i]) >= HBLKSIZE) {
-         return_single_freelist(fl[i], gfl+i);
-       }
-       /* Clear fl[i], since the thread structure may hang around.     */
-       /* Do it in a way that is likely to trap if we access it.       */
-       fl[i] = (ptr_t)HBLKSIZE;
+        if ((word)(fl[i]) >= HBLKSIZE) {
+          return_single_freelist(fl[i], gfl+i);
+        }
+        /* Clear fl[i], since the thread structure may hang around.     */
+        /* Do it in a way that is likely to trap if we access it.       */
+        fl[i] = (ptr_t)HBLKSIZE;
     }
-    /* The 0 granule freelist really contains 1 granule objects.       */
+    /* The 0 granule freelist really contains 1 granule objects.        */
 #   ifdef GC_GCJ_SUPPORT
       if (fl[0] == ERROR_FL) return;
 #   endif
@@ -72,33 +76,33 @@ static void return_freelists(void **fl, void **gfl)
     }
 }
 
-/* Each thread structure must be initialized.  */
-/* This call must be made from the new thread. */
-void GC_init_thread_local(GC_tlfs p)
+/* Each thread structure must be initialized.   */
+/* This call must be made from the new thread.  */
+GC_INNER void GC_init_thread_local(GC_tlfs p)
 {
     int i;
 
     GC_ASSERT(I_HOLD_LOCK());
     if (!keys_initialized) {
-       if (0 != GC_key_create(&GC_thread_key, 0)) {
-           ABORT("Failed to create key for local allocator");
+        if (0 != GC_key_create(&GC_thread_key, 0)) {
+            ABORT("Failed to create key for local allocator");
         }
-       keys_initialized = TRUE;
+        keys_initialized = TRUE;
     }
     if (0 != GC_setspecific(GC_thread_key, p)) {
-       ABORT("Failed to set thread specific allocation pointers");
+        ABORT("Failed to set thread specific allocation pointers");
     }
     for (i = 1; i < TINY_FREELISTS; ++i) {
-       p -> ptrfree_freelists[i] = (void *)(word)1;
-       p -> normal_freelists[i] = (void *)(word)1;
-#      ifdef GC_GCJ_SUPPORT
-         p -> gcj_freelists[i] = (void *)(word)1;
-#      endif
-    }   
-    /* Set up the size 0 free lists.   */
-    /* We now handle most of them like regular free lists, to ensure   */
-    /* That explicit deallocation works.  However, allocation of a     */
-    /* size 0 "gcj" object is always an error.                         */
+        p -> ptrfree_freelists[i] = (void *)(word)1;
+        p -> normal_freelists[i] = (void *)(word)1;
+#       ifdef GC_GCJ_SUPPORT
+          p -> gcj_freelists[i] = (void *)(word)1;
+#       endif
+    }
+    /* Set up the size 0 free lists.    */
+    /* We now handle most of them like regular free lists, to ensure    */
+    /* That explicit deallocation works.  However, allocation of a      */
+    /* size 0 "gcj" object is always an error.                          */
     p -> ptrfree_freelists[0] = (void *)(word)1;
     p -> normal_freelists[0] = (void *)(word)1;
 #   ifdef GC_GCJ_SUPPORT
@@ -106,33 +110,24 @@ void GC_init_thread_local(GC_tlfs p)
 #   endif
 }
 
-#ifdef GC_GCJ_SUPPORT
-  extern void ** GC_gcjobjfreelist;
-#endif
-
-/* We hold the allocator lock. */
-void GC_destroy_thread_local(GC_tlfs p)
+/* We hold the allocator lock.  */
+GC_INNER void GC_destroy_thread_local(GC_tlfs p)
 {
-    /* We currently only do this from the thread itself or from        */
-    /* the fork handler for a child process.                   */
+    /* We currently only do this from the thread itself or from */
+    /* the fork handler for a child process.                    */
 #   ifndef HANDLE_FORK
       GC_ASSERT(GC_getspecific(GC_thread_key) == (void *)p);
 #   endif
     return_freelists(p -> ptrfree_freelists, GC_aobjfreelist);
     return_freelists(p -> normal_freelists, GC_objfreelist);
 #   ifdef GC_GCJ_SUPPORT
-       return_freelists(p -> gcj_freelists, GC_gcjobjfreelist);
+        return_freelists(p -> gcj_freelists, (void **)GC_gcjobjfreelist);
 #   endif
 }
 
-#if defined(GC_ASSERTIONS) && defined(GC_PTHREADS) && !defined(CYGWIN32) \
-    && !defined(GC_WIN32_PTHREADS)
-# include <pthread.h>
-  extern char * GC_lookup_thread(pthread_t id);
-#endif
-
-#if defined(GC_ASSERTIONS) && defined(GC_WIN32_THREADS)
-  void * /*GC_thread*/ GC_lookup_thread_inner(unsigned /*DWORD*/ thread_id);
+#ifdef GC_ASSERTIONS
+  /* Defined in pthread_support.c or win32_threads.c. */
+  GC_bool GC_is_thread_tsd_valid(void *tsd);
 #endif
 
 GC_API void * GC_CALL GC_malloc(size_t bytes)
@@ -145,9 +140,9 @@ GC_API void * GC_CALL GC_malloc(size_t bytes)
 #   if !defined(USE_PTHREAD_SPECIFIC) && !defined(USE_WIN32_SPECIFIC)
       GC_key_t k = GC_thread_key;
       if (EXPECT(0 == k, 0)) {
-       /* We haven't yet run GC_init_parallel.  That means     */
-       /* we also aren't locking, so this is fairly cheap.     */
-       return GC_core_malloc(bytes);
+        /* We haven't yet run GC_init_parallel.  That means     */
+        /* we also aren't locking, so this is fairly cheap.     */
+        return GC_core_malloc(bytes);
       }
       tsd = GC_getspecific(k);
 #   else
@@ -155,30 +150,19 @@ GC_API void * GC_CALL GC_malloc(size_t bytes)
 #   endif
 #   if defined(USE_PTHREAD_SPECIFIC) || defined(USE_WIN32_SPECIFIC)
       if (EXPECT(0 == tsd, 0)) {
-       return GC_core_malloc(bytes);
+        return GC_core_malloc(bytes);
       }
 #   endif
     GC_ASSERT(GC_is_initialized);
-#   ifdef GC_ASSERTIONS
-      /* We can't check tsd correctly, since we don't have access to   */
-      /* the right declarations.  But we can check that it's close.    */
-      LOCK();
-      {
-#      if defined(GC_WIN32_THREADS)
-         char * me = (char *)GC_lookup_thread_inner(GetCurrentThreadId());
-#       else
-         char * me = GC_lookup_thread(pthread_self());
-#      endif
-        GC_ASSERT((char *)tsd > me && (char *)tsd < me + 1000);
-      }
-      UNLOCK();
-#   endif
+
+    GC_ASSERT(GC_is_thread_tsd_valid(tsd));
+
     tiny_fl = ((GC_tlfs)tsd) -> normal_freelists;
     GC_FAST_MALLOC_GRANS(result, granules, tiny_fl, DIRECT_GRANULES,
-                        NORMAL, GC_core_malloc(bytes), obj_link(result)=0);
+                         NORMAL, GC_core_malloc(bytes), obj_link(result)=0);
 #   ifdef LOG_ALLOCS
       GC_err_printf("GC_malloc(%u) = %p : %u\n",
-                       (unsigned)bytes, result, (unsigned)GC_gc_no);
+                        (unsigned)bytes, result, (unsigned)GC_gc_no);
 #   endif
     return result;
 }
@@ -193,9 +177,9 @@ GC_API void * GC_CALL GC_malloc_atomic(size_t bytes)
 #   if !defined(USE_PTHREAD_SPECIFIC) && !defined(USE_WIN32_SPECIFIC)
       GC_key_t k = GC_thread_key;
       if (EXPECT(0 == k, 0)) {
-       /* We haven't yet run GC_init_parallel.  That means     */
-       /* we also aren't locking, so this is fairly cheap.     */
-       return GC_core_malloc(bytes);
+        /* We haven't yet run GC_init_parallel.  That means     */
+        /* we also aren't locking, so this is fairly cheap.     */
+        return GC_core_malloc(bytes);
       }
       tsd = GC_getspecific(k);
 #   else
@@ -203,48 +187,44 @@ GC_API void * GC_CALL GC_malloc_atomic(size_t bytes)
 #   endif
 #   if defined(USE_PTHREAD_SPECIFIC) || defined(USE_WIN32_SPECIFIC)
       if (EXPECT(0 == tsd, 0)) {
-       return GC_core_malloc(bytes);
+        return GC_core_malloc(bytes);
       }
 #   endif
     GC_ASSERT(GC_is_initialized);
     tiny_fl = ((GC_tlfs)tsd) -> ptrfree_freelists;
     GC_FAST_MALLOC_GRANS(result, granules, tiny_fl, DIRECT_GRANULES, PTRFREE,
-                        GC_core_malloc_atomic(bytes), (void)0 /* no init */);
+                         GC_core_malloc_atomic(bytes), (void)0 /* no init */);
     return result;
 }
 
 #ifdef GC_GCJ_SUPPORT
 
-#include "include/gc_gcj.h"
+# include "atomic_ops.h" /* for AO_compiler_barrier() */
 
-#ifdef GC_ASSERTIONS
-  extern GC_bool GC_gcj_malloc_initialized;
-#endif
+# include "include/gc_gcj.h"
 
-extern int GC_gcj_kind;
-
-/* Gcj-style allocation without locks is extremely tricky.  The        */
-/* fundamental issue is that we may end up marking a free list, which  */
-/* has freelist links instead of "vtable" pointers.  That is usually   */
-/* OK, since the next object on the free list will be cleared, and     */
-/* will thus be interpreted as containing a zero descriptor.  That's   */
-/* fine if the object has not yet been initialized.  But there are     */
-/* interesting potential races.                                                */
-/* In the case of incremental collection, this seems hopeless, since   */
-/* the marker may run asynchronously, and may pick up the pointer to   */
-/* the next freelist entry (which it thinks is a vtable pointer), get  */
-/* suspended for a while, and then see an allocated object instead     */
-/* of the vtable.  This made be avoidable with either a handshake with */
-/* the collector or, probably more easily, by moving the free list     */
-/* links to the second word of each object.  The latter isn't a                */
-/* universal win, since on architecture like Itanium, nonzero offsets  */
-/* are not necessarily free.  And there may be cache fill order issues.        */
-/* For now, we punt with incremental GC.  This probably means that     */
-/* incremental GC should be enabled before we fork a second thread.    */
-/* Unlike the other thread local allocation calls, we assume that the  */
-/* collector has been explicitly initialized.                          */
+/* Gcj-style allocation without locks is extremely tricky.  The         */
+/* fundamental issue is that we may end up marking a free list, which   */
+/* has freelist links instead of "vtable" pointers.  That is usually    */
+/* OK, since the next object on the free list will be cleared, and      */
+/* will thus be interpreted as containing a zero descriptor.  That's    */
+/* fine if the object has not yet been initialized.  But there are      */
+/* interesting potential races.                                         */
+/* In the case of incremental collection, this seems hopeless, since    */
+/* the marker may run asynchronously, and may pick up the pointer to    */
+/* the next freelist entry (which it thinks is a vtable pointer), get   */
+/* suspended for a while, and then see an allocated object instead      */
+/* of the vtable.  This may be avoidable with either a handshake with   */
+/* the collector or, probably more easily, by moving the free list      */
+/* links to the second word of each object.  The latter isn't a         */
+/* universal win, since on architecture like Itanium, nonzero offsets   */
+/* are not necessarily free.  And there may be cache fill order issues. */
+/* For now, we punt with incremental GC.  This probably means that      */
+/* incremental GC should be enabled before we fork a second thread.     */
+/* Unlike the other thread local allocation calls, we assume that the   */
+/* collector has been explicitly initialized.                           */
 GC_API void * GC_CALL GC_gcj_malloc(size_t bytes,
-                           void * ptr_to_struct_containing_descr)
+                                    void * ptr_to_struct_containing_descr)
 {
   if (GC_EXPECT(GC_incremental, 0)) {
     return GC_core_gcj_malloc(bytes, ptr_to_struct_containing_descr);
@@ -252,80 +232,79 @@ GC_API void * GC_CALL GC_gcj_malloc(size_t bytes,
     size_t granules = ROUNDED_UP_GRANULES(bytes);
     void *result;
     void **tiny_fl = ((GC_tlfs)GC_getspecific(GC_thread_key))
-                                       -> gcj_freelists;
+                                        -> gcj_freelists;
     GC_ASSERT(GC_gcj_malloc_initialized);
     GC_FAST_MALLOC_GRANS(result, granules, tiny_fl, DIRECT_GRANULES,
-                        GC_gcj_kind,
-                        GC_core_gcj_malloc(bytes,
-                                           ptr_to_struct_containing_descr),
-                        {AO_compiler_barrier();
-                         *(void **)result = ptr_to_struct_containing_descr;});
-       /* This forces the initialization of the "method ptr".          */
-        /* This is necessary to ensure some very subtle properties     */
-       /* required if a GC is run in the middle of such an allocation. */
-       /* Here we implicitly also assume atomicity for the free list.  */
-        /* and method pointer assignments.                             */
-       /* We must update the freelist before we store the pointer.     */
-       /* Otherwise a GC at this point would see a corrupted           */
-       /* free list.                                                   */
-       /* A real memory barrier is not needed, since the               */
-       /* action of stopping this thread will cause prior writes       */
-       /* to complete.                                                 */
-       /* We assert that any concurrent marker will stop us.           */
-       /* Thus it is impossible for a mark procedure to see the        */
-       /* allocation of the next object, but to see this object        */
-       /* still containing a free list pointer.  Otherwise the         */
-       /* marker, by misinterpreting the freelist link as a vtable     */
-        /* pointer, might find a random "mark descriptor" in the next  */
-        /* object.                                                     */
+                         GC_gcj_kind,
+                         GC_core_gcj_malloc(bytes,
+                                            ptr_to_struct_containing_descr),
+                         {AO_compiler_barrier();
+                          *(void **)result = ptr_to_struct_containing_descr;});
+        /* This forces the initialization of the "method ptr".          */
+        /* This is necessary to ensure some very subtle properties      */
+        /* required if a GC is run in the middle of such an allocation. */
+        /* Here we implicitly also assume atomicity for the free list.  */
+        /* and method pointer assignments.                              */
+        /* We must update the freelist before we store the pointer.     */
+        /* Otherwise a GC at this point would see a corrupted           */
+        /* free list.                                                   */
+        /* A real memory barrier is not needed, since the               */
+        /* action of stopping this thread will cause prior writes       */
+        /* to complete.                                                 */
+        /* We assert that any concurrent marker will stop us.           */
+        /* Thus it is impossible for a mark procedure to see the        */
+        /* allocation of the next object, but to see this object        */
+        /* still containing a free list pointer.  Otherwise the         */
+        /* marker, by misinterpreting the freelist link as a vtable     */
+        /* pointer, might find a random "mark descriptor" in the next   */
+        /* object.                                                      */
     return result;
   }
 }
 
 #endif /* GC_GCJ_SUPPORT */
 
-/* The thread support layer must arrange to mark thread-local  */
-/* free lists explicitly, since the link field is often        */
-/* invisible to the marker.  It knows how to find all threads; */
-/* we take care of an individual thread freelist structure.    */
-void GC_mark_thread_local_fls_for(GC_tlfs p)
+/* The thread support layer must arrange to mark thread-local   */
+/* free lists explicitly, since the link field is often         */
+/* invisible to the marker.  It knows how to find all threads;  */
+/* we take care of an individual thread freelist structure.     */
+GC_INNER void GC_mark_thread_local_fls_for(GC_tlfs p)
 {
     ptr_t q;
     int j;
-    
+
     for (j = 0; j < TINY_FREELISTS; ++j) {
       q = p -> ptrfree_freelists[j];
       if ((word)q > HBLKSIZE) GC_set_fl_marks(q);
       q = p -> normal_freelists[j];
       if ((word)q > HBLKSIZE) GC_set_fl_marks(q);
 #     ifdef GC_GCJ_SUPPORT
-       if (j > 0) {
+        if (j > 0) {
           q = p -> gcj_freelists[j];
           if ((word)q > HBLKSIZE) GC_set_fl_marks(q);
-       }
+        }
 #     endif /* GC_GCJ_SUPPORT */
     }
 }
 
 #if defined(GC_ASSERTIONS)
-    /* Check that all thread-local free-lists in p are completely marked.      */
+    /* Check that all thread-local free-lists in p are completely marked.       */
     void GC_check_tls_for(GC_tlfs p)
     {
-       ptr_t q;
-       int j;
-       
-       for (j = 1; j < TINY_FREELISTS; ++j) {
-         q = p -> ptrfree_freelists[j];
-         if ((word)q > HBLKSIZE) GC_check_fl_marks(q);
-         q = p -> normal_freelists[j];
-         if ((word)q > HBLKSIZE) GC_check_fl_marks(q);
-#        ifdef GC_GCJ_SUPPORT
-           q = p -> gcj_freelists[j];
-           if ((word)q > HBLKSIZE) GC_check_fl_marks(q);
-#        endif /* GC_GCJ_SUPPORT */
-       }
+        ptr_t q;
+        int j;
+
+        for (j = 1; j < TINY_FREELISTS; ++j) {
+          q = p -> ptrfree_freelists[j];
+          if ((word)q > HBLKSIZE) GC_check_fl_marks(q);
+          q = p -> normal_freelists[j];
+          if ((word)q > HBLKSIZE) GC_check_fl_marks(q);
+#         ifdef GC_GCJ_SUPPORT
+            q = p -> gcj_freelists[j];
+            if ((word)q > HBLKSIZE) GC_check_fl_marks(q);
+#         endif /* GC_GCJ_SUPPORT */
+        }
     }
 #endif /* GC_ASSERTIONS */
 
-# endif /* THREAD_LOCAL_ALLOC */
-
+#endif /* THREAD_LOCAL_ALLOC */
diff --git a/src/mm/boehm-gc/threadlibs.c b/src/mm/boehm-gc/threadlibs.c
deleted file mode 100644 (file)
index f2ab582..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-# include "gc_config_macros.h"
-# include "private/gcconfig.h"
-# include <stdio.h>
-
-int main()
-{
-#   if defined(GC_USE_LD_WRAP)
-       printf("-Wl,--wrap -Wl,dlopen "
-              "-Wl,--wrap -Wl,pthread_create -Wl,--wrap -Wl,pthread_join "
-              "-Wl,--wrap -Wl,pthread_detach "
-              "-Wl,--wrap -Wl,pthread_sigmask -Wl,--wrap -Wl,sleep\n");
-#   endif
-#   if defined(GC_LINUX_THREADS) || defined(GC_IRIX_THREADS) \
-       || defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS) \
-       || defined(GC_GNU_THREADS)
-#       ifdef GC_USE_DLOPEN_WRAP
-         printf("-ldl ");
-#      endif
-        printf("-lpthread\n");
-#   endif
-#   if defined(GC_FREEBSD_THREADS)
-#       ifdef GC_USE_DLOPEN_WRAP
-         printf("-ldl ");
-#      endif
-#       if (__FREEBSD_version >= 500000)
-          printf("-lpthread\n");
-#       else
-          printf("-pthread\n");
-#       endif
-#   endif
-#   if defined(GC_NETBSD_THREADS)
-         printf("-lpthread -lrt\n");
-#   endif
-
-#   if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS)
-       printf("-lpthread -lrt\n");
-#   endif
-#   if defined(GC_SOLARIS_THREADS)
-        printf("-lthread -lposix4\n");
-               /* Is this right for recent versions? */
-#   endif
-#   if defined(GC_WIN32_THREADS) && defined(CYGWIN32)
-        printf("-lpthread\n");
-#   endif
-#   if defined(GC_WIN32_PTHREADS)
-#      ifdef PTW32_STATIC_LIB
-        /* assume suffix s for static version of the win32 pthread library */
-         printf("-lpthreadGC2s -lws2_32\n");
-#      else
-         printf("-lpthreadGC2\n");
-#      endif
-#   endif
-#   if defined(GC_OSF1_THREADS)
-       printf("-pthread -lrt"); /* DOB: must be -pthread, not -lpthread */
-#   endif
-    /* You need GCC 3.0.3 to build this one!           */  
-    /* DG/UX native gcc doesnt know what "-pthread" is */
-#   if defined(GC_DGUX386_THREADS)
-        printf("-ldl -pthread\n");
-#   endif
-    return 0;
-}
-
index ded8b2d08b983a4ce3cf5c90a411b08b0ebe4512..b031f61e8bbf8c3f3f01debcf932f1893fa2af84 100644 (file)
@@ -13,6 +13,7 @@
  *
  */
 
+#include "private/gc_pmark.h"
 
 /*
  * Some simple primitives for allocation with explicit type information.
  * since they are not accessible through the current interface.
  */
 
-#include "private/gc_pmark.h"
 #include "gc_typed.h"
 
-# define TYPD_EXTRA_BYTES (sizeof(word) - EXTRA_BYTES)
+#define TYPD_EXTRA_BYTES (sizeof(word) - EXTRA_BYTES)
 
 STATIC GC_bool GC_explicit_typing_initialized = FALSE;
 
-STATIC int GC_explicit_kind;
-                       /* Object kind for objects with indirect        */
-                       /* (possibly extended) descriptors.             */
+STATIC int GC_explicit_kind = 0;
+                        /* Object kind for objects with indirect        */
+                        /* (possibly extended) descriptors.             */
 
-STATIC int GC_array_kind;
-                       /* Object kind for objects with complex         */
-                       /* descriptors and GC_array_mark_proc.          */
+STATIC int GC_array_kind = 0;
+                        /* Object kind for objects with complex         */
+                        /* descriptors and GC_array_mark_proc.          */
 
-/* Extended descriptors.  GC_typed_mark_proc understands these.        */
-/* These are used for simple objects that are larger than what */
-/* can be described by a BITMAP_BITS sized bitmap.             */
+/* Extended descriptors.  GC_typed_mark_proc understands these. */
+/* These are used for simple objects that are larger than what  */
+/* can be described by a BITMAP_BITS sized bitmap.              */
 typedef struct {
-       word ed_bitmap; /* lsb corresponds to first word.       */
-       GC_bool ed_continued;   /* next entry is continuation.  */
+        word ed_bitmap; /* lsb corresponds to first word.       */
+        GC_bool ed_continued;   /* next entry is continuation.  */
 } ext_descr;
 
-/* Array descriptors.  GC_array_mark_proc understands these.   */
-/* We may eventually need to add provisions for headers and    */
+/* Array descriptors.  GC_array_mark_proc understands these.    */
+/* We may eventually need to add provisions for headers and     */
 /* trailers.  Hence we provide for tree structured descriptors, */
-/* though we don't really use them currently.                  */
+/* though we don't really use them currently.                   */
 typedef union ComplexDescriptor {
-    struct LeafDescriptor {    /* Describes simple array       */
+    struct LeafDescriptor {     /* Describes simple array       */
         word ld_tag;
-#      define LEAF_TAG 1
-       size_t ld_size;         /* bytes per element    */
-                               /* multiple of ALIGNMENT        */
-       size_t ld_nelements;    /* Number of elements.  */
-       GC_descr ld_descriptor; /* A simple length, bitmap,     */
-                               /* or procedure descriptor.     */
+#       define LEAF_TAG 1
+        size_t ld_size;         /* bytes per element    */
+                                /* multiple of ALIGNMENT        */
+        size_t ld_nelements;    /* Number of elements.  */
+        GC_descr ld_descriptor; /* A simple length, bitmap,     */
+                                /* or procedure descriptor.     */
     } ld;
     struct ComplexArrayDescriptor {
         word ad_tag;
-#      define ARRAY_TAG 2
-       size_t ad_nelements;
-       union ComplexDescriptor * ad_element_descr;
+#       define ARRAY_TAG 2
+        size_t ad_nelements;
+        union ComplexDescriptor * ad_element_descr;
     } ad;
     struct SequenceDescriptor {
         word sd_tag;
-#      define SEQUENCE_TAG 3
-       union ComplexDescriptor * sd_first;
-       union ComplexDescriptor * sd_second;
+#       define SEQUENCE_TAG 3
+        union ComplexDescriptor * sd_first;
+        union ComplexDescriptor * sd_second;
     } sd;
 } complex_descriptor;
 #define TAG ld.ld_tag
 
-STATIC ext_descr * GC_ext_descriptors; /* Points to array of extended  */
-                                       /* descriptors.                 */
+STATIC ext_descr * GC_ext_descriptors = NULL;
+                                        /* Points to array of extended  */
+                                        /* descriptors.                 */
 
-STATIC size_t GC_ed_size = 0;  /* Current size of above arrays.        */
-# define ED_INITIAL_SIZE 100;
+STATIC size_t GC_ed_size = 0;   /* Current size of above arrays.        */
+#define ED_INITIAL_SIZE 100
 
-STATIC size_t GC_avail_descr = 0;      /* Next available slot.         */
+STATIC size_t GC_avail_descr = 0;       /* Next available slot.         */
 
-STATIC int GC_typed_mark_proc_index;   /* Indices of my mark           */
-STATIC int GC_array_mark_proc_index;   /* procedures.                  */
+STATIC int GC_typed_mark_proc_index = 0; /* Indices of my mark          */
+STATIC int GC_array_mark_proc_index = 0; /* procedures.                 */
 
-static void GC_push_typed_structures_proc (void)
+STATIC void GC_push_typed_structures_proc(void)
 {
-  GC_push_all((ptr_t)&GC_ext_descriptors, (ptr_t)&GC_ext_descriptors + sizeof(word));
+  GC_push_all((ptr_t)&GC_ext_descriptors,
+              (ptr_t)&GC_ext_descriptors + sizeof(word));
 }
 
-/* Add a multiword bitmap to GC_ext_descriptors arrays.  Return        */
-/* starting index.                                             */
-/* Returns -1 on failure.                                      */
-/* Caller does not hold allocation lock.                       */
+/* Add a multiword bitmap to GC_ext_descriptors arrays.  Return */
+/* starting index.                                              */
+/* Returns -1 on failure.                                       */
+/* Caller does not hold allocation lock.                        */
 STATIC signed_word GC_add_ext_descriptor(GC_bitmap bm, word nbits)
 {
     size_t nwords = divWORDSZ(nbits + WORDSZ-1);
@@ -119,30 +121,30 @@ STATIC signed_word GC_add_ext_descriptor(GC_bitmap bm, word nbits)
 
     LOCK();
     while (GC_avail_descr + nwords >= GC_ed_size) {
-       ext_descr * new;
-       size_t new_size;
-       word ed_size = GC_ed_size;
-       
-       if (ed_size == 0) {
-           GC_push_typed_structures = GC_push_typed_structures_proc;
-           UNLOCK();
-           new_size = ED_INITIAL_SIZE;
-       } else {
-           UNLOCK();
-           new_size = 2 * ed_size;
-           if (new_size > MAX_ENV) return(-1);
-       } 
-       new = (ext_descr *) GC_malloc_atomic(new_size * sizeof(ext_descr));
-       if (new == 0) return(-1);
+        ext_descr * new;
+        size_t new_size;
+        word ed_size = GC_ed_size;
+
+        if (ed_size == 0) {
+            GC_push_typed_structures = GC_push_typed_structures_proc;
+            UNLOCK();
+            new_size = ED_INITIAL_SIZE;
+        } else {
+            UNLOCK();
+            new_size = 2 * ed_size;
+            if (new_size > MAX_ENV) return(-1);
+        }
+        new = (ext_descr *) GC_malloc_atomic(new_size * sizeof(ext_descr));
+        if (new == 0) return(-1);
         LOCK();
         if (ed_size == GC_ed_size) {
             if (GC_avail_descr != 0) {
-               BCOPY(GC_ext_descriptors, new,
-                     GC_avail_descr * sizeof(ext_descr));
-           }
-           GC_ed_size = new_size;
-           GC_ext_descriptors = new;
-       }  /* else another thread already resized it in the meantime */
+                BCOPY(GC_ext_descriptors, new,
+                      GC_avail_descr * sizeof(ext_descr));
+            }
+            GC_ed_size = new_size;
+            GC_ext_descriptors = new;
+        }  /* else another thread already resized it in the meantime */
     }
     result = GC_avail_descr;
     for (i = 0; i < nwords-1; i++) {
@@ -161,14 +163,14 @@ STATIC signed_word GC_add_ext_descriptor(GC_bitmap bm, word nbits)
     return(result);
 }
 
-/* Table of bitmap descriptors for n word long all pointer objects.    */
-GC_descr GC_bm_table[WORDSZ/2];
-       
-/* Return a descriptor for the concatenation of 2 nwords long objects, */
-/* each of which is described by descriptor.                           */
-/* The result is known to be short enough to fit into a bitmap         */
-/* descriptor.                                                         */
-/* Descriptor is a GC_DS_LENGTH or GC_DS_BITMAP descriptor.            */
+/* Table of bitmap descriptors for n word long all pointer objects.     */
+STATIC GC_descr GC_bm_table[WORDSZ/2];
+
+/* Return a descriptor for the concatenation of 2 nwords long objects,  */
+/* each of which is described by descriptor.                            */
+/* The result is known to be short enough to fit into a bitmap          */
+/* descriptor.                                                          */
+/* Descriptor is a GC_DS_LENGTH or GC_DS_BITMAP descriptor.             */
 STATIC GC_descr GC_double_descr(GC_descr descriptor, word nwords)
 {
     if ((descriptor & GC_DS_TAGS) == GC_DS_LENGTH) {
@@ -180,40 +182,40 @@ STATIC GC_descr GC_double_descr(GC_descr descriptor, word nwords)
 
 STATIC complex_descriptor *
 GC_make_sequence_descriptor(complex_descriptor *first,
-                           complex_descriptor *second);
+                            complex_descriptor *second);
 
-/* Build a descriptor for an array with nelements elements,    */
-/* each of which can be described by a simple descriptor.      */
-/* We try to optimize some common cases.                       */
+/* Build a descriptor for an array with nelements elements,     */
+/* each of which can be described by a simple descriptor.       */
+/* We try to optimize some common cases.                        */
 /* If the result is COMPLEX, then a complex_descr* is returned  */
-/* in *complex_d.                                                      */
-/* If the result is LEAF, then we built a LeafDescriptor in    */
-/* the structure pointed to by leaf.                           */
-/* The tag in the leaf structure is not set.                   */
-/* If the result is SIMPLE, then a GC_descr                    */
-/* is returned in *simple_d.                                   */
-/* If the result is NO_MEM, then                               */
-/* we failed to allocate the descriptor.                       */
-/* The implementation knows that GC_DS_LENGTH is 0.            */
-/* *leaf, *complex_d, and *simple_d may be used as temporaries */
-/* during the construction.                                    */
-# define COMPLEX 2
-# define LEAF 1
-# define SIMPLE 0
-# define NO_MEM (-1)
+/* in *complex_d.                                                       */
+/* If the result is LEAF, then we built a LeafDescriptor in     */
+/* the structure pointed to by leaf.                            */
+/* The tag in the leaf structure is not set.                    */
+/* If the result is SIMPLE, then a GC_descr                     */
+/* is returned in *simple_d.                                    */
+/* If the result is NO_MEM, then                                */
+/* we failed to allocate the descriptor.                        */
+/* The implementation knows that GC_DS_LENGTH is 0.             */
+/* *leaf, *complex_d, and *simple_d may be used as temporaries  */
+/* during the construction.                                     */
+#define COMPLEX 2
+#define LEAF    1
+#define SIMPLE  0
+#define NO_MEM  (-1)
 STATIC int GC_make_array_descriptor(size_t nelements, size_t size,
-                                   GC_descr descriptor, GC_descr *simple_d,
-                                   complex_descriptor **complex_d,
-                                   struct LeafDescriptor * leaf)
+                                    GC_descr descriptor, GC_descr *simple_d,
+                                    complex_descriptor **complex_d,
+                                    struct LeafDescriptor * leaf)
 {
 #   define OPT_THRESHOLD 50
-       /* For larger arrays, we try to combine descriptors of adjacent */
-       /* descriptors to speed up marking, and to reduce the amount    */
-       /* of space needed on the mark stack.                           */
+        /* For larger arrays, we try to combine descriptors of adjacent */
+        /* descriptors to speed up marking, and to reduce the amount    */
+        /* of space needed on the mark stack.                           */
     if ((descriptor & GC_DS_TAGS) == GC_DS_LENGTH) {
       if (descriptor == (GC_descr)size) {
-       *simple_d = nelements * descriptor;
-       return(SIMPLE);
+        *simple_d = nelements * descriptor;
+        return(SIMPLE);
       } else if ((word)descriptor == 0) {
         *simple_d = (GC_descr)0;
         return(SIMPLE);
@@ -230,20 +232,20 @@ STATIC int GC_make_array_descriptor(size_t nelements, size_t size,
         }
       }
     } else if (size <= BITMAP_BITS/2
-              && (descriptor & GC_DS_TAGS) != GC_DS_PROC
-              && (size & (sizeof(word)-1)) == 0) {
-      int result =      
+               && (descriptor & GC_DS_TAGS) != GC_DS_PROC
+               && (size & (sizeof(word)-1)) == 0) {
+      int result =
           GC_make_array_descriptor(nelements/2, 2*size,
-                                  GC_double_descr(descriptor,
-                                                  BYTES_TO_WORDS(size)),
-                                  simple_d, complex_d, leaf);
+                                   GC_double_descr(descriptor,
+                                                   BYTES_TO_WORDS(size)),
+                                   simple_d, complex_d, leaf);
       if ((nelements & 1) == 0) {
           return(result);
       } else {
           struct LeafDescriptor * one_element =
               (struct LeafDescriptor *)
-               GC_malloc_atomic(sizeof(struct LeafDescriptor));
-          
+                GC_malloc_atomic(sizeof(struct LeafDescriptor));
+
           if (result == NO_MEM || one_element == 0) return(NO_MEM);
           one_element -> ld_tag = LEAF_TAG;
           one_element -> ld_size = size;
@@ -254,61 +256,60 @@ STATIC int GC_make_array_descriptor(size_t nelements, size_t size,
             {
               struct LeafDescriptor * beginning =
                 (struct LeafDescriptor *)
-                 GC_malloc_atomic(sizeof(struct LeafDescriptor));
+                  GC_malloc_atomic(sizeof(struct LeafDescriptor));
               if (beginning == 0) return(NO_MEM);
               beginning -> ld_tag = LEAF_TAG;
               beginning -> ld_size = size;
               beginning -> ld_nelements = 1;
               beginning -> ld_descriptor = *simple_d;
               *complex_d = GC_make_sequence_descriptor(
-                               (complex_descriptor *)beginning,
-                               (complex_descriptor *)one_element);
+                                (complex_descriptor *)beginning,
+                                (complex_descriptor *)one_element);
               break;
             }
             case LEAF:
             {
               struct LeafDescriptor * beginning =
                 (struct LeafDescriptor *)
-                 GC_malloc_atomic(sizeof(struct LeafDescriptor));
+                  GC_malloc_atomic(sizeof(struct LeafDescriptor));
               if (beginning == 0) return(NO_MEM);
               beginning -> ld_tag = LEAF_TAG;
               beginning -> ld_size = leaf -> ld_size;
               beginning -> ld_nelements = leaf -> ld_nelements;
               beginning -> ld_descriptor = leaf -> ld_descriptor;
               *complex_d = GC_make_sequence_descriptor(
-                               (complex_descriptor *)beginning,
-                               (complex_descriptor *)one_element);
+                                (complex_descriptor *)beginning,
+                                (complex_descriptor *)one_element);
               break;
             }
             case COMPLEX:
               *complex_d = GC_make_sequence_descriptor(
-                               *complex_d,
-                               (complex_descriptor *)one_element);
+                                *complex_d,
+                                (complex_descriptor *)one_element);
               break;
           }
           return(COMPLEX);
       }
     }
-    {
-        leaf -> ld_size = size;
-        leaf -> ld_nelements = nelements;
-        leaf -> ld_descriptor = descriptor;
-        return(LEAF);
-    }
+
+    leaf -> ld_size = size;
+    leaf -> ld_nelements = nelements;
+    leaf -> ld_descriptor = descriptor;
+    return(LEAF);
 }
 
 STATIC complex_descriptor *
 GC_make_sequence_descriptor(complex_descriptor *first,
-                           complex_descriptor *second)
+                            complex_descriptor *second)
 {
     struct SequenceDescriptor * result =
         (struct SequenceDescriptor *)
-               GC_malloc(sizeof(struct SequenceDescriptor));
-    /* Can't result in overly conservative marking, since tags are     */
-    /* very small integers. Probably faster than maintaining type      */
-    /* info.                                                           */    
+                GC_malloc(sizeof(struct SequenceDescriptor));
+    /* Can't result in overly conservative marking, since tags are      */
+    /* very small integers. Probably faster than maintaining type       */
+    /* info.                                                            */
     if (result != 0) {
-       result -> sd_tag = SEQUENCE_TAG;
+        result -> sd_tag = SEQUENCE_TAG;
         result -> sd_first = first;
         result -> sd_second = second;
     }
@@ -316,31 +317,31 @@ GC_make_sequence_descriptor(complex_descriptor *first,
 }
 
 #ifdef UNDEFINED
-complex_descriptor * GC_make_complex_array_descriptor(word nelements,
-                                                     complex_descriptor *descr)
-{
+  complex_descriptor * GC_make_complex_array_descriptor(word nelements,
+                                                complex_descriptor *descr)
+  {
     struct ComplexArrayDescriptor * result =
         (struct ComplexArrayDescriptor *)
-               GC_malloc(sizeof(struct ComplexArrayDescriptor));
-    
+                GC_malloc(sizeof(struct ComplexArrayDescriptor));
+
     if (result != 0) {
-       result -> ad_tag = ARRAY_TAG;
+        result -> ad_tag = ARRAY_TAG;
         result -> ad_nelements = nelements;
         result -> ad_element_descr = descr;
     }
     return((complex_descriptor *)result);
-}
+  }
 #endif
 
-STATIC ptr_t * GC_eobjfreelist;
+STATIC ptr_t * GC_eobjfreelist = NULL;
 
-STATIC ptr_t * GC_arobjfreelist;
+STATIC ptr_t * GC_arobjfreelist = NULL;
 
 STATIC mse * GC_typed_mark_proc(word * addr, mse * mark_stack_ptr,
-                               mse * mark_stack_limit, word env);
+                                mse * mark_stack_limit, word env);
 
 STATIC mse * GC_array_mark_proc(word * addr, mse * mark_stack_ptr,
-                               mse * mark_stack_limit, word env);
+                                mse * mark_stack_limit, word env);
 
 /* Caller does not hold allocation lock. */
 STATIC void GC_init_explicit_typing(void)
@@ -358,18 +359,18 @@ STATIC void GC_init_explicit_typing(void)
     /* Set up object kind with simple indirect descriptor. */
       GC_eobjfreelist = (ptr_t *)GC_new_free_list_inner();
       GC_explicit_kind = GC_new_kind_inner(
-                           (void **)GC_eobjfreelist,
-                           (((word)WORDS_TO_BYTES(-1)) | GC_DS_PER_OBJECT),
-                           TRUE, TRUE);
-               /* Descriptors are in the last word of the object. */
+                            (void **)GC_eobjfreelist,
+                            (((word)WORDS_TO_BYTES(-1)) | GC_DS_PER_OBJECT),
+                            TRUE, TRUE);
+                /* Descriptors are in the last word of the object. */
       GC_typed_mark_proc_index = GC_new_proc_inner(GC_typed_mark_proc);
     /* Set up object kind with array descriptor. */
       GC_arobjfreelist = (ptr_t *)GC_new_free_list_inner();
       GC_array_mark_proc_index = GC_new_proc_inner(GC_array_mark_proc);
       GC_array_kind = GC_new_kind_inner(
-                           (void **)GC_arobjfreelist,
-                           GC_MAKE_PROC(GC_array_mark_proc_index, 0),
-                           FALSE, TRUE);
+                            (void **)GC_arobjfreelist,
+                            GC_MAKE_PROC(GC_array_mark_proc_index, 0),
+                            FALSE, TRUE);
       for (i = 0; i < WORDSZ/2; i++) {
           GC_descr d = (((word)(-1)) >> (WORDSZ - i)) << (WORDSZ - i);
           d |= GC_DS_BITMAP;
@@ -379,7 +380,7 @@ STATIC void GC_init_explicit_typing(void)
 }
 
 STATIC mse * GC_typed_mark_proc(word * addr, mse * mark_stack_ptr,
-                               mse * mark_stack_limit, word env)
+                                mse * mark_stack_limit, word env)
 {
     word bm = GC_ext_descriptors[env].ed_bitmap;
     word * current_p = addr;
@@ -390,39 +391,39 @@ STATIC mse * GC_typed_mark_proc(word * addr, mse * mark_stack_ptr,
 
     INIT_HDR_CACHE;
     for (; bm != 0; bm >>= 1, current_p++) {
-       if (bm & 1) {
-           current = *current_p;
-           FIXUP_POINTER(current);
-           if ((ptr_t)current >= least_ha && (ptr_t)current <= greatest_ha) {
-               PUSH_CONTENTS((ptr_t)current, mark_stack_ptr,
-                             mark_stack_limit, (ptr_t)current_p, exit1);
-           }
-       }
+        if (bm & 1) {
+            current = *current_p;
+            FIXUP_POINTER(current);
+            if ((ptr_t)current >= least_ha && (ptr_t)current <= greatest_ha) {
+                PUSH_CONTENTS((ptr_t)current, mark_stack_ptr,
+                              mark_stack_limit, (ptr_t)current_p, exit1);
+            }
+        }
     }
     if (GC_ext_descriptors[env].ed_continued) {
-        /* Push an entry with the rest of the descriptor back onto the */
-        /* stack.  Thus we never do too much work at once.  Note that  */
-        /* we also can't overflow the mark stack unless we actually    */
-        /* mark something.                                             */
+        /* Push an entry with the rest of the descriptor back onto the  */
+        /* stack.  Thus we never do too much work at once.  Note that   */
+        /* we also can't overflow the mark stack unless we actually     */
+        /* mark something.                                              */
         mark_stack_ptr++;
         if (mark_stack_ptr >= mark_stack_limit) {
             mark_stack_ptr = GC_signal_mark_stack_overflow(mark_stack_ptr);
         }
         mark_stack_ptr -> mse_start = (ptr_t)(addr + WORDSZ);
         mark_stack_ptr -> mse_descr =
-               GC_MAKE_PROC(GC_typed_mark_proc_index, env+1);
+                GC_MAKE_PROC(GC_typed_mark_proc_index, env+1);
     }
     return(mark_stack_ptr);
 }
 
-/* Return the size of the object described by d.  It would be faster to        */
-/* store this directly, or to compute it as part of                    */
-/* GC_push_complex_descriptor, but hopefully it doesn't matter.                */
+/* Return the size of the object described by d.  It would be faster to */
+/* store this directly, or to compute it as part of                     */
+/* GC_push_complex_descriptor, but hopefully it doesn't matter.         */
 STATIC word GC_descr_obj_size(complex_descriptor *d)
 {
     switch(d -> TAG) {
       case LEAF_TAG:
-       return(d -> ld.ld_nelements * d -> ld.ld_size);
+        return(d -> ld.ld_nelements * d -> ld.ld_size);
       case ARRAY_TAG:
         return(d -> ad.ad_nelements
                * GC_descr_obj_size(d -> ad.ad_element_descr));
@@ -435,21 +436,21 @@ STATIC word GC_descr_obj_size(complex_descriptor *d)
     }
 }
 
-/* Push descriptors for the object at addr with complex descriptor d   */
-/* onto the mark stack.  Return 0 if the mark stack overflowed.        */
+/* Push descriptors for the object at addr with complex descriptor d    */
+/* onto the mark stack.  Return 0 if the mark stack overflowed.         */
 STATIC mse * GC_push_complex_descriptor(word *addr, complex_descriptor *d,
-                                       mse *msp, mse *msl)
+                                        mse *msp, mse *msl)
 {
     register ptr_t current = (ptr_t) addr;
     register word nelements;
     register word sz;
     register word i;
-    
+
     switch(d -> TAG) {
       case LEAF_TAG:
         {
           register GC_descr descr = d -> ld.ld_descriptor;
-          
+
           nelements = d -> ld.ld_nelements;
           if (msl - msp <= (ptrdiff_t)nelements) return(0);
           sz = d -> ld.ld_size;
@@ -464,12 +465,12 @@ STATIC mse * GC_push_complex_descriptor(word *addr, complex_descriptor *d,
       case ARRAY_TAG:
         {
           register complex_descriptor *descr = d -> ad.ad_element_descr;
-          
+
           nelements = d -> ad.ad_nelements;
           sz = GC_descr_obj_size(descr);
           for (i = 0; i < nelements; i++) {
               msp = GC_push_complex_descriptor((word *)current, descr,
-                                               msp, msl);
+                                                msp, msl);
               if (msp == 0) return(0);
               current += sz;
           }
@@ -479,11 +480,11 @@ STATIC mse * GC_push_complex_descriptor(word *addr, complex_descriptor *d,
         {
           sz = GC_descr_obj_size(d -> sd.sd_first);
           msp = GC_push_complex_descriptor((word *)current, d -> sd.sd_first,
-                                          msp, msl);
+                                           msp, msl);
           if (msp == 0) return(0);
           current += sz;
           msp = GC_push_complex_descriptor((word *)current, d -> sd.sd_second,
-                                          msp, msl);
+                                           msp, msl);
           return(msp);
         }
       default:
@@ -494,7 +495,7 @@ STATIC mse * GC_push_complex_descriptor(word *addr, complex_descriptor *d,
 
 /*ARGSUSED*/
 STATIC mse * GC_array_mark_proc(word * addr, mse * mark_stack_ptr,
-                               mse * mark_stack_limit, word env)
+                                mse * mark_stack_limit, word env)
 {
     hdr * hhdr = HDR(addr);
     size_t sz = hhdr -> hb_sz;
@@ -502,26 +503,26 @@ STATIC mse * GC_array_mark_proc(word * addr, mse * mark_stack_ptr,
     complex_descriptor * descr = (complex_descriptor *)(addr[nwords-1]);
     mse * orig_mark_stack_ptr = mark_stack_ptr;
     mse * new_mark_stack_ptr;
-    
+
     if (descr == 0) {
-       /* Found a reference to a free list entry.  Ignore it. */
-       return(orig_mark_stack_ptr);
+        /* Found a reference to a free list entry.  Ignore it. */
+        return(orig_mark_stack_ptr);
     }
-    /* In use counts were already updated when array descriptor was    */
-    /* pushed.  Here we only replace it by subobject descriptors, so   */
-    /* no update is necessary.                                         */
+    /* In use counts were already updated when array descriptor was     */
+    /* pushed.  Here we only replace it by subobject descriptors, so    */
+    /* no update is necessary.                                          */
     new_mark_stack_ptr = GC_push_complex_descriptor(addr, descr,
-                                                   mark_stack_ptr,
-                                                   mark_stack_limit-1);
+                                                    mark_stack_ptr,
+                                                    mark_stack_limit-1);
     if (new_mark_stack_ptr == 0) {
-       /* Doesn't fit.  Conservatively push the whole array as a unit  */
-       /* and request a mark stack expansion.                          */
-       /* This cannot cause a mark stack overflow, since it replaces   */
-       /* the original array entry.                                    */
-       GC_mark_stack_too_small = TRUE;
-       new_mark_stack_ptr = orig_mark_stack_ptr + 1;
-       new_mark_stack_ptr -> mse_start = (ptr_t)addr;
-       new_mark_stack_ptr -> mse_descr = sz | GC_DS_LENGTH;
+        /* Doesn't fit.  Conservatively push the whole array as a unit  */
+        /* and request a mark stack expansion.                          */
+        /* This cannot cause a mark stack overflow, since it replaces   */
+        /* the original array entry.                                    */
+        GC_mark_stack_too_small = TRUE;
+        new_mark_stack_ptr = orig_mark_stack_ptr + 1;
+        new_mark_stack_ptr -> mse_start = (ptr_t)addr;
+        new_mark_stack_ptr -> mse_descr = sz | GC_DS_LENGTH;
     } else {
         /* Push descriptor itself */
         new_mark_stack_ptr++;
@@ -537,7 +538,7 @@ GC_API GC_descr GC_CALL GC_make_descriptor(GC_bitmap bm, size_t len)
     GC_descr result;
     signed_word i;
 #   define HIGH_BIT (((word)1) << (WORDSZ - 1))
-    
+
     if (!GC_explicit_typing_initialized) GC_init_explicit_typing();
     while (last_set_bit >= 0 && !GC_get_bit(bm, last_set_bit)) last_set_bit --;
     if (last_set_bit < 0) return(0 /* no pointers */);
@@ -545,47 +546,39 @@ GC_API GC_descr GC_CALL GC_make_descriptor(GC_bitmap bm, size_t len)
     {
       register GC_bool all_bits_set = TRUE;
       for (i = 0; i < last_set_bit; i++) {
-       if (!GC_get_bit(bm, i)) {
-           all_bits_set = FALSE;
-           break;
-       }
+        if (!GC_get_bit(bm, i)) {
+            all_bits_set = FALSE;
+            break;
+        }
       }
       if (all_bits_set) {
-       /* An initial section contains all pointers.  Use length descriptor. */
+        /* An initial section contains all pointers.  Use length descriptor. */
         return (WORDS_TO_BYTES(last_set_bit+1) | GC_DS_LENGTH);
       }
     }
 #   endif
     if (last_set_bit < BITMAP_BITS) {
-       /* Hopefully the common case.                   */
-       /* Build bitmap descriptor (with bits reversed) */
-       result = HIGH_BIT;
-       for (i = last_set_bit - 1; i >= 0; i--) {
-           result >>= 1;
-           if (GC_get_bit(bm, i)) result |= HIGH_BIT;
-       }
-       result |= GC_DS_BITMAP;
-       return(result);
+        /* Hopefully the common case.                   */
+        /* Build bitmap descriptor (with bits reversed) */
+        result = HIGH_BIT;
+        for (i = last_set_bit - 1; i >= 0; i--) {
+            result >>= 1;
+            if (GC_get_bit(bm, i)) result |= HIGH_BIT;
+        }
+        result |= GC_DS_BITMAP;
+        return(result);
     } else {
-       signed_word index;
-       
-       index = GC_add_ext_descriptor(bm, (word)last_set_bit+1);
-       if (index == -1) return(WORDS_TO_BYTES(last_set_bit+1) | GC_DS_LENGTH);
-                               /* Out of memory: use conservative      */
-                               /* approximation.                       */
-       result = GC_MAKE_PROC(GC_typed_mark_proc_index, (word)index);
-       return result;
+        signed_word index;
+
+        index = GC_add_ext_descriptor(bm, (word)last_set_bit+1);
+        if (index == -1) return(WORDS_TO_BYTES(last_set_bit+1) | GC_DS_LENGTH);
+                                /* Out of memory: use conservative      */
+                                /* approximation.                       */
+        result = GC_MAKE_PROC(GC_typed_mark_proc_index, (word)index);
+        return result;
     }
 }
 
-void * GC_clear_stack(void *);
-
-#define GENERAL_MALLOC(lb,k) \
-    (void *)GC_clear_stack(GC_generic_malloc((word)lb, k))
-    
-#define GENERAL_MALLOC_IOP(lb,k) \
-    (void *)GC_clear_stack(GC_generic_malloc_ignore_off_page(lb, k))
-
 GC_API void * GC_CALL GC_malloc_explicitly_typed(size_t lb, GC_descr d)
 {
     ptr_t op;
@@ -595,104 +588,104 @@ GC_API void * GC_CALL GC_malloc_explicitly_typed(size_t lb, GC_descr d)
 
     lb += TYPD_EXTRA_BYTES;
     if(SMALL_OBJ(lb)) {
-       lg = GC_size_map[lb];
-       opp = &(GC_eobjfreelist[lg]);
-       LOCK();
+        lg = GC_size_map[lb];
+        opp = &(GC_eobjfreelist[lg]);
+        LOCK();
         if( (op = *opp) == 0 ) {
             UNLOCK();
             op = (ptr_t)GENERAL_MALLOC((word)lb, GC_explicit_kind);
-           if (0 == op) return 0;
-           lg = GC_size_map[lb];       /* May have been uninitialized. */
+            if (0 == op) return 0;
+            lg = GC_size_map[lb];       /* May have been uninitialized. */
         } else {
             *opp = obj_link(op);
-           obj_link(op) = 0;
+            obj_link(op) = 0;
             GC_bytes_allocd += GRANULES_TO_BYTES(lg);
             UNLOCK();
         }
-       ((word *)op)[GRANULES_TO_WORDS(lg) - 1] = d;
+        ((word *)op)[GRANULES_TO_WORDS(lg) - 1] = d;
    } else {
        op = (ptr_t)GENERAL_MALLOC((word)lb, GC_explicit_kind);
        if (op != NULL) {
-           lg = BYTES_TO_GRANULES(GC_size(op));
-           ((word *)op)[GRANULES_TO_WORDS(lg) - 1] = d;
+            lg = BYTES_TO_GRANULES(GC_size(op));
+            ((word *)op)[GRANULES_TO_WORDS(lg) - 1] = d;
        }
    }
    return((void *) op);
 }
 
 GC_API void * GC_CALL GC_malloc_explicitly_typed_ignore_off_page(size_t lb,
-                                                               GC_descr d)
+                                                                 GC_descr d)
 {
-ptr_t op;
-ptr_t * opp;
-size_t lg;
-DCL_LOCK_STATE;
+    ptr_t op;
+    ptr_t * opp;
+    size_t lg;
+    DCL_LOCK_STATE;
 
     lb += TYPD_EXTRA_BYTES;
     if( SMALL_OBJ(lb) ) {
-       lg = GC_size_map[lb];
-       opp = &(GC_eobjfreelist[lg]);
-       LOCK();
+        lg = GC_size_map[lb];
+        opp = &(GC_eobjfreelist[lg]);
+        LOCK();
         if( (op = *opp) == 0 ) {
             UNLOCK();
             op = (ptr_t)GENERAL_MALLOC_IOP(lb, GC_explicit_kind);
-           if (0 == op) return 0;
-           lg = GC_size_map[lb];       /* May have been uninitialized. */
+            if (0 == op) return 0;
+            lg = GC_size_map[lb];       /* May have been uninitialized. */
         } else {
             *opp = obj_link(op);
-           obj_link(op) = 0;
+            obj_link(op) = 0;
             GC_bytes_allocd += GRANULES_TO_BYTES(lg);
             UNLOCK();
         }
-       ((word *)op)[GRANULES_TO_WORDS(lg) - 1] = d;
+        ((word *)op)[GRANULES_TO_WORDS(lg) - 1] = d;
    } else {
        op = (ptr_t)GENERAL_MALLOC_IOP(lb, GC_explicit_kind);
        if (op != NULL) {
          lg = BYTES_TO_WORDS(GC_size(op));
-        ((word *)op)[GRANULES_TO_WORDS(lg) - 1] = d;
+         ((word *)op)[GRANULES_TO_WORDS(lg) - 1] = d;
        }
    }
    return((void *) op);
 }
 
 GC_API void * GC_CALL GC_calloc_explicitly_typed(size_t n, size_t lb,
-                                               GC_descr d)
+                                                 GC_descr d)
 {
-ptr_t op;
-ptr_t * opp;
-size_t lg;
-GC_descr simple_descr;
-complex_descriptor *complex_descr;
-register int descr_type;
-struct LeafDescriptor leaf;
-DCL_LOCK_STATE;
+    ptr_t op;
+    ptr_t * opp;
+    size_t lg;
+    GC_descr simple_descr;
+    complex_descriptor *complex_descr;
+    register int descr_type;
+    struct LeafDescriptor leaf;
+    DCL_LOCK_STATE;
 
     descr_type = GC_make_array_descriptor((word)n, (word)lb, d,
-                                         &simple_descr, &complex_descr, &leaf);
+                                          &simple_descr, &complex_descr, &leaf);
     switch(descr_type) {
-       case NO_MEM: return(0);
-       case SIMPLE: return(GC_malloc_explicitly_typed(n*lb, simple_descr));
-       case LEAF:
-           lb *= n;
-           lb += sizeof(struct LeafDescriptor) + TYPD_EXTRA_BYTES;
-           break;
-       case COMPLEX:
-           lb *= n;
-           lb += TYPD_EXTRA_BYTES;
-           break;
+        case NO_MEM: return(0);
+        case SIMPLE: return(GC_malloc_explicitly_typed(n*lb, simple_descr));
+        case LEAF:
+            lb *= n;
+            lb += sizeof(struct LeafDescriptor) + TYPD_EXTRA_BYTES;
+            break;
+        case COMPLEX:
+            lb *= n;
+            lb += TYPD_EXTRA_BYTES;
+            break;
     }
     if( SMALL_OBJ(lb) ) {
-       lg = GC_size_map[lb];
-       opp = &(GC_arobjfreelist[lg]);
-       LOCK();
+        lg = GC_size_map[lb];
+        opp = &(GC_arobjfreelist[lg]);
+        LOCK();
         if( (op = *opp) == 0 ) {
             UNLOCK();
             op = (ptr_t)GENERAL_MALLOC((word)lb, GC_array_kind);
-           if (0 == op) return(0);
-           lg = GC_size_map[lb];       /* May have been uninitialized. */            
+            if (0 == op) return(0);
+            lg = GC_size_map[lb];       /* May have been uninitialized. */
         } else {
             *opp = obj_link(op);
-           obj_link(op) = 0;
+            obj_link(op) = 0;
             GC_bytes_allocd += GRANULES_TO_BYTES(lg);
             UNLOCK();
         }
@@ -707,8 +700,8 @@ DCL_LOCK_STATE;
            (struct LeafDescriptor *)
                ((word *)op
                 + GRANULES_TO_WORDS(lg)
-               - (BYTES_TO_WORDS(sizeof(struct LeafDescriptor)) + 1));
-                
+                - (BYTES_TO_WORDS(sizeof(struct LeafDescriptor)) + 1));
+
        lp -> ld_tag = LEAF_TAG;
        lp -> ld_size = leaf.ld_size;
        lp -> ld_nelements = leaf.ld_nelements;
@@ -716,17 +709,17 @@ DCL_LOCK_STATE;
        ((volatile word *)op)[GRANULES_TO_WORDS(lg) - 1] = (word)lp;
    } else {
        size_t lw = GRANULES_TO_WORDS(lg);
-       
+
        ((word *)op)[lw - 1] = (word)complex_descr;
-       /* Make sure the descriptor is cleared once there is any danger */
-       /* it may have been collected.                                  */
+       /* Make sure the descriptor is cleared once there is any danger  */
+       /* it may have been collected.                                   */
        if (GC_general_register_disappearing_link((void * *)((word *)op+lw-1),
-                                                op) == 2) {
-          /* Couldn't register it due to lack of memory.  Punt.        */
-          /* This will probably fail too, but gives the recovery code  */
-          /* a chance.                                                 */
-          return(GC_malloc(n*lb));
-       }                                 
+                                                 op) == GC_NO_MEMORY) {
+           /* Couldn't register it due to lack of memory.  Punt.        */
+           /* This will probably fail too, but gives the recovery code  */
+           /* a chance.                                                 */
+           return(GC_malloc(n*lb));
+       }
    }
    return((void *) op);
 }
index 1ec73b845f31f992168697dab6d83275ca6beea3..0652203725172032513110bda57a6522b6149029 100755 (executable)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
  * Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
 # include "private/thread_local_alloc.h"
 #endif /* THREAD_LOCAL_ALLOC */
 
-/* Allocation lock declarations.       */
+/* Allocation lock declarations.        */
 #if !defined(USE_PTHREAD_LOCKS)
-# if defined(GC_DLL)
-    __declspec(dllexport) CRITICAL_SECTION GC_allocate_ml;
-# else
-    CRITICAL_SECTION GC_allocate_ml;
-# endif
-  DWORD GC_lock_holder = NO_THREAD;
-       /* Thread id for current holder of allocation lock */
+  GC_INNER CRITICAL_SECTION GC_allocate_ml;
+  GC_INNER DWORD GC_lock_holder = NO_THREAD;
+        /* Thread id for current holder of allocation lock */
 #else
-  pthread_mutex_t GC_allocate_ml = PTHREAD_MUTEX_INITIALIZER;
-  unsigned long GC_lock_holder = NO_THREAD;
+  GC_INNER pthread_mutex_t GC_allocate_ml = PTHREAD_MUTEX_INITIALIZER;
+  GC_INNER unsigned long GC_lock_holder = NO_THREAD;
 #endif
 
 #ifdef GC_PTHREADS
-# include <errno.h>
+# include <errno.h> /* for EAGAIN */
 
  /* Cygwin-specific forward decls */
-# undef pthread_create 
-# undef pthread_sigmask 
-# undef pthread_join 
+# undef pthread_create
+# undef pthread_sigmask
+# undef pthread_join
 # undef pthread_detach
-# undef dlopen 
 
 # ifdef DEBUG_THREADS
 #   ifdef CYGWIN32
 
 #else
 
-# ifdef DEBUG_THREADS
-#   define DEBUG_WIN32_THREADS 1
-# else
-#   define DEBUG_WIN32_THREADS 0
-# endif
-
 # undef CreateThread
 # undef ExitThread
 # undef _beginthreadex
 # undef _endthreadex
-# undef _beginthread
+
 # ifdef DEBUG_THREADS
 #   define DEBUG_WIN32_THREADS 1
 # else
 #   define DEBUG_WIN32_THREADS 0
 # endif
 
-# ifndef MSWINCE
+# ifdef MSWINCE
+    /* Force DONT_USE_SIGNALANDWAIT implementation of PARALLEL_MARK     */
+    /* for WinCE (since Win32 SignalObjectAndWait() is missing).        */
+#   ifndef DONT_USE_SIGNALANDWAIT
+#     define DONT_USE_SIGNALANDWAIT
+#   endif
+# else
 #   include <process.h>  /* For _beginthreadex, _endthreadex */
+#   include <errno.h> /* for errno, EAGAIN */
 # endif
 
 #endif
 
-/* DllMain-based thread registration is currently incompatible */
-/* with thread-local allocation, pthreads and WinCE.           */
-#if defined(GC_DLL) && !defined(MSWINCE) \
-       && !defined(THREAD_LOCAL_ALLOC) && !defined(GC_PTHREADS)
-  static GC_bool GC_win32_dll_threads = FALSE;
-  /* This code operates in two distinct modes, depending on    */
-  /* the setting of GC_win32_dll_threads.  If                  */
-  /* GC_win32_dll_threads is set, all threads in the process   */
-  /* are implicitly registered with the GC by DllMain.                 */
-  /* No explicit registration is required, and attempts at     */
-  /* explicit registration are ignored.  This mode is          */
-  /* very different from the Posix operation of the collector. */
-  /* In this mode access to the thread table is lock-free.     */
-  /* Hence there is a static limit on the number of threads.   */
-  
-  /* If GC_win32_dll_threads is FALSE, or the collector is     */
-  /* built without GC_DLL defined, things operate in a way     */
-  /* that is very similar to Posix platforms, and new threads  */
-  /* must be registered with the collector, e.g. by using      */
-  /* preprocessor-based interception of the thread primitives. */
-  /* In this case, we use a real data structure for the thread */
-  /* table.  Note that there is no equivalent of linker-based  */
-  /* call interception, since we don't have ELF-like           */
-  /* facilities.  The Windows analog appears to be "API                */
-  /* hooking", which really seems to be a standard way to      */
-  /* do minor binary rewriting (?).  I'd prefer not to have    */
-  /* the basic collector rely on such facilities, but an       */
-  /* optional package that intercepts thread calls this way    */
-  /* would probably be nice.                                   */
-
-  /* GC_win32_dll_threads must be set at initialization time,  */
-  /* i.e. before any collector or thread calls.  We make it a  */
-  /* "dynamic" option only to avoid multiple library versions. */
+/* DllMain-based thread registration is currently incompatible  */
+/* with thread-local allocation, pthreads and WinCE.            */
+#if defined(GC_DLL) && !defined(GC_NO_DLLMAIN) && !defined(MSWINCE) \
+        && !defined(THREAD_LOCAL_ALLOC) && !defined(GC_PTHREADS)
+# include "atomic_ops.h"
+
+  STATIC GC_bool GC_win32_dll_threads = FALSE;
+  /* This code operates in two distinct modes, depending on     */
+  /* the setting of GC_win32_dll_threads.  If                   */
+  /* GC_win32_dll_threads is set, all threads in the process    */
+  /* are implicitly registered with the GC by DllMain.          */
+  /* No explicit registration is required, and attempts at      */
+  /* explicit registration are ignored.  This mode is           */
+  /* very different from the Posix operation of the collector.  */
+  /* In this mode access to the thread table is lock-free.      */
+  /* Hence there is a static limit on the number of threads.    */
+
+  /* If GC_win32_dll_threads is FALSE, or the collector is      */
+  /* built without GC_DLL defined, things operate in a way      */
+  /* that is very similar to Posix platforms, and new threads   */
+  /* must be registered with the collector, e.g. by using       */
+  /* preprocessor-based interception of the thread primitives.  */
+  /* In this case, we use a real data structure for the thread  */
+  /* table.  Note that there is no equivalent of linker-based   */
+  /* call interception, since we don't have ELF-like            */
+  /* facilities.  The Windows analog appears to be "API         */
+  /* hooking", which really seems to be a standard way to       */
+  /* do minor binary rewriting (?).  I'd prefer not to have     */
+  /* the basic collector rely on such facilities, but an        */
+  /* optional package that intercepts thread calls this way     */
+  /* would probably be nice.                                    */
+
+  /* GC_win32_dll_threads must be set at initialization time,   */
+  /* i.e. before any collector or thread calls.  We make it a   */
+  /* "dynamic" option only to avoid multiple library versions.  */
 #else
+# ifndef GC_NO_DLLMAIN
+#   define GC_NO_DLLMAIN
+# endif
 # define GC_win32_dll_threads FALSE
 # undef MAX_THREADS
-# define MAX_THREADS 1 /* dll_thread_table[] is always empty.  */
+# define MAX_THREADS 1 /* dll_thread_table[] is always empty.   */
 #endif
 
-/* We have two versions of the thread table.  Which one        */
+/* We have two versions of the thread table.  Which one */
 /* we us depends on whether or not GC_win32_dll_threads */
-/* is set.  Note that before initialization, we don't  */
-/* add any entries to either table, even if DllMain is */
-/* called.  The main thread will be added on           */
-/* initialization.                                     */
-
-/* The type of the first argument to InterlockedExchange.      */
-/* Documented to be LONG volatile *, but at least gcc likes    */
-/* this better.                                                        */
+/* is set.  Note that before initialization, we don't   */
+/* add any entries to either table, even if DllMain is  */
+/* called.  The main thread will be added on            */
+/* initialization.                                      */
+
+/* The type of the first argument to InterlockedExchange.       */
+/* Documented to be LONG volatile *, but at least gcc likes     */
+/* this better.                                                 */
 typedef LONG * IE_t;
 
-GC_bool GC_thr_initialized = FALSE;
+STATIC GC_bool GC_thr_initialized = FALSE;
 
-GC_bool GC_need_to_lock = FALSE;
+GC_INNER GC_bool GC_need_to_lock = FALSE;
 
 static GC_bool parallel_initialized = FALSE;
 
-void GC_init_parallel(void);
-
-/* GC_use_DllMain() is currently incompatible with pthreads.               */
-/* It might be possible to get GC_DLL and DllMain-based thread registration */
-/* to work with Cygwin, but if you try, you are on your own.               */
-#if defined(GC_DLL) && !defined(GC_PTHREADS)
-  /* Turn on GC_win32_dll_threads      */
-  GC_API void GC_CALL GC_use_DllMain(void)
-  {
-#     ifdef THREAD_LOCAL_ALLOC
-         ABORT("Cannot use thread local allocation with DllMain-based "
-               "thread registration.");
-         /* Thread-local allocation really wants to lock at thread     */
-         /* entry and exit.                                            */
-#     else
-         GC_ASSERT(!parallel_initialized);
-         GC_win32_dll_threads = TRUE;
-         GC_init_parallel();
-#     endif
-  }
-#else
-  GC_API void GC_CALL GC_use_DllMain(void)
-  {
-      ABORT("GC not configured as DLL");
-  }
-#endif
+/* GC_use_DllMain() is currently incompatible with pthreads and WinCE.  */
+/* It might be possible to get DllMain-based thread registration to     */
+/* work with Cygwin, but if you try, you are on your own.               */
+GC_API void GC_CALL GC_use_DllMain(void)
+{
+# ifdef GC_NO_DLLMAIN
+    ABORT("GC DllMain-based thread registration unsupported");
+# else
+    /* Turn on GC_win32_dll_threads. */
+    GC_ASSERT(!parallel_initialized);
+    GC_win32_dll_threads = TRUE;
+    GC_init_parallel();
+# endif
+}
 
 STATIC DWORD GC_main_thread = 0;
 
@@ -182,42 +171,72 @@ STATIC DWORD GC_main_thread = 0;
 
 struct GC_Thread_Rep {
   union {
-    AO_t tm_in_use;    /* Updated without lock.                */
-                       /* We assert that unused                */
-                       /* entries have invalid ids of          */
-                       /* zero and zero stack fields.          */
-                       /* Used only with GC_win32_dll_threads. */
-    struct GC_Thread_Rep * tm_next;
-                       /* Hash table link without              */
-                       /* GC_win32_dll_threads.                */
-                       /* More recently allocated threads      */
-                       /* with a given pthread id come         */
-                       /* first.  (All but the first are       */
-                       /* guaranteed to be dead, but we may    */
-                       /* not yet have registered the join.)   */
-  } table_management;
-# define in_use table_management.tm_in_use
-# define next table_management.tm_next
+#   ifndef GC_NO_DLLMAIN
+      AO_t in_use;   /* Updated without lock.                */
+                        /* We assert that unused                */
+                        /* entries have invalid ids of          */
+                        /* zero and zero stack fields.          */
+                        /* Used only with GC_win32_dll_threads. */
+#   endif
+    struct GC_Thread_Rep * next;
+                        /* Hash table link without              */
+                        /* GC_win32_dll_threads.                */
+                        /* More recently allocated threads      */
+                        /* with a given pthread id come         */
+                        /* first.  (All but the first are       */
+                        /* guaranteed to be dead, but we may    */
+                        /* not yet have registered the join.)   */
+  } tm; /* table_management */
   DWORD id;
-  HANDLE handle;
-  ptr_t stack_base;    /* The cold end of the stack.   */
-                       /* 0 ==> entry not valid.       */
-                       /* !in_use ==> stack_base == 0  */
-  ptr_t last_stack_min;        /* Last known minimum (hottest) address */
-                       /* in stack or ADDR_LIMIT if unset      */
+
+# ifdef MSWINCE
+    /* According to MSDN specs for WinCE targets:                       */
+    /* - DuplicateHandle() is not applicable to thread handles; and     */
+    /* - the value returned by GetCurrentThreadId() could be used as    */
+    /* a "real" thread handle (for SuspendThread(), ResumeThread() and  */
+    /* GetThreadContext()).                                             */
+#   define THREAD_HANDLE(t) (HANDLE)(word)(t)->id
+# else
+    HANDLE handle;
+#   define THREAD_HANDLE(t) (t)->handle
+# endif
+
+  ptr_t stack_base;     /* The cold end of the stack.   */
+                        /* 0 ==> entry not valid.       */
+                        /* !in_use ==> stack_base == 0  */
+  ptr_t last_stack_min; /* Last known minimum (hottest) address */
+                        /* in stack or ADDR_LIMIT if unset      */
 # ifdef IA64
     ptr_t backing_store_end;
     ptr_t backing_store_ptr;
 # endif
 
+  ptr_t thread_blocked_sp;      /* Protected by GC lock.                */
+                                /* NULL value means thread unblocked.   */
+                                /* If set to non-NULL, thread will      */
+                                /* acquire GC lock before doing any     */
+                                /* pointer manipulations.  Thus it does */
+                                /* not need to stop this thread.        */
+
+  struct GC_activation_frame_s *activation_frame;
+                        /* Points to the "frame" data held in stack by  */
+                        /* the innermost GC_call_with_gc_active() of    */
+                        /* this thread.  May be NULL.                   */
+
+  unsigned finalizer_nested;
+  unsigned finalizer_skipped;   /* Used by GC_check_finalizer_nested()  */
+                                /* to minimize the level of recursion   */
+                                /* when a client finalizer allocates    */
+                                /* memory (initially both are 0).       */
+
   GC_bool suspended;
 
 # ifdef GC_PTHREADS
     void *status; /* hold exit value until join in case it's a pointer */
     pthread_t pthread_id;
-    short flags;               /* Protected by GC lock.        */
-#      define FINISHED 1       /* Thread has exited.   */
-#      define DETACHED 2       /* Thread is intended to be detached.   */
+    short flags;                /* Protected by GC lock.                */
+#   define FINISHED 1           /* Thread has exited.                   */
+#   define DETACHED 2           /* Thread is intended to be detached.   */
 #   define KNOWN_FINISHED(t) (((t) -> flags) & FINISHED)
 # else
 #   define KNOWN_FINISHED(t) 0
@@ -230,12 +249,13 @@ struct GC_Thread_Rep {
 typedef struct GC_Thread_Rep * GC_thread;
 typedef volatile struct GC_Thread_Rep * GC_vthread;
 
-/*
- * We assumed that volatile ==> memory ordering, at least among
- * volatiles.  This code should consistently use atomic_ops.
- */
-
-volatile GC_bool GC_please_stop = FALSE;
+#ifndef GC_NO_DLLMAIN
+  /* We assumed that volatile ==> memory ordering, at least among       */
+  /* volatiles.  This code should consistently use atomic_ops.          */
+  STATIC volatile GC_bool GC_please_stop = FALSE;
+#elif defined(GC_ASSERTIONS)
+  STATIC GC_bool GC_please_stop = FALSE;
+#endif
 
 /*
  * We track thread attachments while the world is supposed to be stopped.
@@ -244,91 +264,103 @@ volatile GC_bool GC_please_stop = FALSE;
  * If we notice this in the middle of marking.
  */
 
-AO_t GC_attached_thread = FALSE;
-/* Return TRUE if an thread was attached since we last asked or        */
-/* since GC_attached_thread was explicitly reset.              */
-GC_bool GC_started_thread_while_stopped(void)
-{
-  AO_t result;
+#ifndef GC_NO_DLLMAIN
+  STATIC AO_t GC_attached_thread = FALSE;
+#endif
 
-  if (GC_win32_dll_threads) {
-    AO_nop_full();     /* Prior heap reads need to complete earlier. */
-    result = AO_load(&GC_attached_thread);
-    if (result) {
-      AO_store(&GC_attached_thread, FALSE);
-    }
-    return ((GC_bool)result);
-  } else {
+#if !defined(__GNUC__)
+  /* Return TRUE if an thread was attached since we last asked or */
+  /* since GC_attached_thread was explicitly reset.               */
+  GC_bool GC_started_thread_while_stopped(void)
+  {
+#   ifndef GC_NO_DLLMAIN
+      AO_t result;
+
+      if (GC_win32_dll_threads) {
+        AO_nop_full();  /* Prior heap reads need to complete earlier. */
+        result = AO_load(&GC_attached_thread);
+        if (result) {
+          AO_store(&GC_attached_thread, FALSE);
+        }
+        return ((GC_bool)result);
+      }
+#   endif
     return FALSE;
   }
-}
+#endif /* !__GNUC__ */
 
-/* Thread table used if GC_win32_dll_threads is set.   */
-/* This is a fixed size array.                         */
-/* Since we use runtime conditionals, both versions    */
-/* are always defined.                                 */
+/* Thread table used if GC_win32_dll_threads is set.    */
+/* This is a fixed size array.                          */
+/* Since we use runtime conditionals, both versions     */
+/* are always defined.                                  */
 # ifndef MAX_THREADS
 #   define MAX_THREADS 512
-#  endif
-  /* Things may get quite slow for large numbers of threads,   */
-  /* since we look them up with sequential search.             */
+# endif
 
-  volatile struct GC_Thread_Rep dll_thread_table[MAX_THREADS];
+/* Things may get quite slow for large numbers of threads,      */
+/* since we look them up with sequential search.                */
+volatile struct GC_Thread_Rep dll_thread_table[MAX_THREADS];
 
-  volatile LONG GC_max_thread_index = 0;
-                       /* Largest index in dll_thread_table    */
-                       /* that was ever used.                  */
+STATIC volatile LONG GC_max_thread_index = 0;
+                        /* Largest index in dll_thread_table    */
+                        /* that was ever used.                  */
 
-/* And now the version used if GC_win32_dll_threads is not set.        */
-/* This is a chained hash table, with much of the code borrowed        */
-/* From the Posix implementation.                              */
+/* And now the version used if GC_win32_dll_threads is not set. */
+/* This is a chained hash table, with much of the code borrowed */
+/* From the Posix implementation.                               */
 #ifndef THREAD_TABLE_SZ
-# define THREAD_TABLE_SZ 256   /* Must be power of 2   */
+# define THREAD_TABLE_SZ 256    /* Power of 2 (for speed). */
 #endif
-  STATIC GC_thread GC_threads[THREAD_TABLE_SZ];
-  
-  /* It may not be safe to allocate when we register the first thread. */
-  /* Thus we allocated one statically.                                 */
-  static struct GC_Thread_Rep first_thread;
-  static GC_bool first_thread_used = FALSE;
-
-/* Add a thread to GC_threads.  We assume it wasn't already there.     */
-/* Caller holds allocation lock.                                       */
-/* Unlike the pthreads version, the id field is set by the caller.     */
+#define THREAD_TABLE_INDEX(id) (((word)(id) >> 2) % THREAD_TABLE_SZ)
+STATIC GC_thread GC_threads[THREAD_TABLE_SZ];
+
+/* It may not be safe to allocate when we register the first thread.    */
+/* Thus we allocated one statically.                                    */
+static struct GC_Thread_Rep first_thread;
+static GC_bool first_thread_used = FALSE;
+
+/* Add a thread to GC_threads.  We assume it wasn't already there.      */
+/* Caller holds allocation lock.                                        */
+/* Unlike the pthreads version, the id field is set by the caller.      */
 STATIC GC_thread GC_new_thread(DWORD id)
 {
-    word hv = ((word)id) % THREAD_TABLE_SZ;
-    GC_thread result;
-    
-    GC_ASSERT(I_HOLD_LOCK());
-    if (!first_thread_used) {
-       result = &first_thread;
-       first_thread_used = TRUE;
-    } else {
-        GC_ASSERT(!GC_win32_dll_threads);
-        result = (struct GC_Thread_Rep *)
-                GC_INTERNAL_MALLOC(sizeof(struct GC_Thread_Rep), NORMAL);
-       /* result can be NULL */
-       if (result == 0) return(0);
-    }
-    /* result -> id = id; Done by caller.      */
-    result -> next = GC_threads[hv];
-    GC_threads[hv] = result;
-#   ifdef GC_PTHREADS
-      GC_ASSERT(result -> flags == 0 /* && result -> thread_blocked == 0 */);
-#   endif
-    return(result);
+  word hv = THREAD_TABLE_INDEX(id);
+  GC_thread result;
+
+  GC_ASSERT(I_HOLD_LOCK());
+  if (!first_thread_used) {
+    result = &first_thread;
+    first_thread_used = TRUE;
+  } else {
+    GC_ASSERT(!GC_win32_dll_threads);
+    result = (struct GC_Thread_Rep *)
+                GC_INTERNAL_MALLOC(sizeof(struct GC_Thread_Rep), NORMAL);
+    /* result can be NULL */
+    if (result == 0) return(0);
+  }
+  /* result -> id = id; Done by caller.       */
+  result -> tm.next = GC_threads[hv];
+  GC_threads[hv] = result;
+# ifdef GC_PTHREADS
+    GC_ASSERT(result -> flags == 0);
+# endif
+  GC_ASSERT(result -> thread_blocked_sp == NULL);
+  return(result);
 }
 
-extern LONG WINAPI GC_write_fault_handler(struct _EXCEPTION_POINTERS *exc_info);
+#ifdef MPROTECT_VDB
+  GC_INNER LONG WINAPI GC_write_fault_handler(
+                                struct _EXCEPTION_POINTERS *exc_info);
+#endif
 
 #if defined(GWW_VDB) && defined(MPROTECT_VDB)
-  extern GC_bool GC_gww_dirty_init(void);
-  /* Defined in os_dep.c.  Returns TRUE if GetWriteWatch is available.         */
-  /* may be called repeatedly.                                         */
+  GC_INNER GC_bool GC_gww_dirty_init(void);
+  /* Defined in os_dep.c.  Returns TRUE if GetWriteWatch is available.  */
+  /* may be called repeatedly.                                          */
 #endif
 
-GC_bool GC_in_thread_creation = FALSE;  /* Protected by allocation lock. */
+STATIC GC_bool GC_in_thread_creation = FALSE;
+                                /* Protected by allocation lock. */
 
 /*
  * This may be called from DllMain, and hence operates under unusual
@@ -337,64 +369,68 @@ GC_bool GC_in_thread_creation = FALSE;  /* Protected by allocation lock. */
  * If GC_win32_dll_threads is not set, we already hold the allocation lock,
  * except possibly during single-threaded start-up code.
  */
-static GC_thread GC_register_my_thread_inner(struct GC_stack_base *sb,
-                                            DWORD thread_id)
+STATIC GC_thread GC_register_my_thread_inner(const struct GC_stack_base *sb,
+                                             DWORD thread_id)
 {
   GC_vthread me;
 
-  /* The following should be a no-op according to the win32    */
-  /* documentation.  There is empirical evidence that it       */
-  /* isn't.            - HB                                    */
+  /* The following should be a no-op according to the win32     */
+  /* documentation.  There is empirical evidence that it        */
+  /* isn't.             - HB                                    */
 # if defined(MPROTECT_VDB)
 #   if defined(GWW_VDB)
       if (GC_incremental && !GC_gww_dirty_init())
-       SetUnhandledExceptionFilter(GC_write_fault_handler);
+        SetUnhandledExceptionFilter(GC_write_fault_handler);
 #   else
       if (GC_incremental) SetUnhandledExceptionFilter(GC_write_fault_handler);
 #   endif
 # endif
 
-  if (GC_win32_dll_threads) {
-    int i;
-    /* It appears to be unsafe to acquire a lock here, since this      */
-    /* code is apparently not preemptible on some systems.             */
-    /* (This is based on complaints, not on Microsoft's official       */
-    /* documentation, which says this should perform "only simple      */
-    /* initialization tasks".)                                         */
-    /* Hence we make do with nonblocking synchronization.              */
-    /* It has been claimed that DllMain is really only executed with   */
-    /* a particular system lock held, and thus careful use of locking  */
-    /* around code that doesn't call back into the system libraries    */
-    /* might be OK.  But this hasn't been tested across all win32      */
-    /* variants.                                                       */
-                /* cast away volatile qualifier */
-    for (i = 0; InterlockedExchange((void*)&dll_thread_table[i].in_use,1) != 0;
-        i++) {
-      /* Compare-and-swap would make this cleaner, but that's not      */
-      /* supported before Windows 98 and NT 4.0.  In Windows 2000,     */
-      /* InterlockedExchange is supposed to be replaced by             */
-      /* InterlockedExchangePointer, but that's not really what I      */
-      /* want here.                                                    */
-      /* FIXME: We should eventually declare Win95 dead and use AO_    */
-      /* primitives here.                                              */
-      if (i == MAX_THREADS - 1)
-        ABORT("too many threads");
-    }
-    /* Update GC_max_thread_index if necessary.  The following is safe,        */
-    /* and unlike CompareExchange-based solutions seems to work on all */
-    /* Windows95 and later platforms.                                  */
-    /* Unfortunately, GC_max_thread_index may be temporarily out of    */
-    /* bounds, so readers have to compensate.                          */
-    while (i > GC_max_thread_index) {
-      InterlockedIncrement((IE_t)&GC_max_thread_index);
-    }
-    if (GC_max_thread_index >= MAX_THREADS) {
-      /* We overshot due to simultaneous increments.   */
-      /* Setting it to MAX_THREADS-1 is always safe.   */
-      GC_max_thread_index = MAX_THREADS - 1;
-    }
-    me = dll_thread_table + i;
-  } else /* Not using DllMain */ {
+# ifndef GC_NO_DLLMAIN
+    if (GC_win32_dll_threads) {
+      int i;
+      /* It appears to be unsafe to acquire a lock here, since this     */
+      /* code is apparently not preemptible on some systems.            */
+      /* (This is based on complaints, not on Microsoft's official      */
+      /* documentation, which says this should perform "only simple     */
+      /* initialization tasks".)                                        */
+      /* Hence we make do with nonblocking synchronization.             */
+      /* It has been claimed that DllMain is really only executed with  */
+      /* a particular system lock held, and thus careful use of locking */
+      /* around code that doesn't call back into the system libraries   */
+      /* might be OK.  But this hasn't been tested across all win32     */
+      /* variants.                                                      */
+                  /* cast away volatile qualifier */
+      for (i = 0;
+           InterlockedExchange((void*)&dll_thread_table[i].tm.in_use, 1) != 0;
+           i++) {
+        /* Compare-and-swap would make this cleaner, but that's not     */
+        /* supported before Windows 98 and NT 4.0.  In Windows 2000,    */
+        /* InterlockedExchange is supposed to be replaced by            */
+        /* InterlockedExchangePointer, but that's not really what I     */
+        /* want here.                                                   */
+        /* FIXME: We should eventually declare Win95 dead and use AO_   */
+        /* primitives here.                                             */
+        if (i == MAX_THREADS - 1)
+          ABORT("too many threads");
+      }
+      /* Update GC_max_thread_index if necessary.  The following is     */
+      /* safe, and unlike CompareExchange-based solutions seems to work */
+      /* on all Windows95 and later platforms.                          */
+      /* Unfortunately, GC_max_thread_index may be temporarily out of   */
+      /* bounds, so readers have to compensate.                         */
+      while (i > GC_max_thread_index) {
+        InterlockedIncrement((IE_t)&GC_max_thread_index);
+      }
+      if (GC_max_thread_index >= MAX_THREADS) {
+        /* We overshot due to simultaneous increments.  */
+        /* Setting it to MAX_THREADS-1 is always safe.  */
+        GC_max_thread_index = MAX_THREADS - 1;
+      }
+      me = dll_thread_table + i;
+    } else
+# endif
+  /* else */ /* Not using DllMain */ {
     GC_ASSERT(I_HOLD_LOCK());
     GC_in_thread_creation = TRUE; /* OK to collect from unknown thread. */
     me = GC_new_thread(thread_id);
@@ -406,44 +442,47 @@ static GC_thread GC_register_my_thread_inner(struct GC_stack_base *sb,
     /* me can be NULL -> segfault */
     me -> pthread_id = pthread_self();
 # endif
-
-  if (!DuplicateHandle(GetCurrentProcess(),
-                       GetCurrentThread(),
-                       GetCurrentProcess(),
-                       (HANDLE*)&(me -> handle),
-                       0,
-                       0,
-                       DUPLICATE_SAME_ACCESS)) {
-       GC_err_printf("Last error code: %d\n", (int)GetLastError());
-       ABORT("DuplicateHandle failed");
-  }
+# ifndef MSWINCE
+    /* GetCurrentThread() returns a pseudohandle (a const value).       */
+    if (!DuplicateHandle(GetCurrentProcess(), GetCurrentThread(),
+                        GetCurrentProcess(),
+                        (HANDLE*)&(me -> handle),
+                        0 /* dwDesiredAccess */, FALSE /* bInheritHandle */,
+                        DUPLICATE_SAME_ACCESS)) {
+        GC_err_printf("Last error code: %d\n", (int)GetLastError());
+        ABORT("DuplicateHandle failed");
+    }
+# endif
   me -> last_stack_min = ADDR_LIMIT;
   me -> stack_base = sb -> mem_base;
 # ifdef IA64
-      me -> backing_store_end = sb -> reg_base;
+    me -> backing_store_end = sb -> reg_base;
 # endif
-  /* Up until this point, GC_push_all_stacks considers this thread     */
-  /* invalid.                                                          */
-  /* Up until this point, this entry is viewed as reserved but invalid */
-  /* by GC_delete_thread.                                              */
+  /* Up until this point, GC_push_all_stacks considers this thread      */
+  /* invalid.                                                           */
+  /* Up until this point, this entry is viewed as reserved but invalid  */
+  /* by GC_delete_thread.                                               */
   me -> id = thread_id;
 # if defined(THREAD_LOCAL_ALLOC)
-      GC_init_thread_local((GC_tlfs)(&(me->tlfs)));
+    GC_init_thread_local((GC_tlfs)(&(me->tlfs)));
 # endif
-  if (me -> stack_base == NULL) 
-      ABORT("Bad stack base in GC_register_my_thread_inner");
-  if (GC_win32_dll_threads) {
-    if (GC_please_stop) {
-      AO_store(&GC_attached_thread, TRUE);
-      AO_nop_full();  /* Later updates must become visible after this. */
-    }
-    /* We'd like to wait here, but can't, since waiting in DllMain     */
-    /* provokes deadlocks.                                             */
-    /* Thus we force marking to be restarted instead.                  */
-  } else {
+  if (me -> stack_base == NULL)
+    ABORT("Bad stack base in GC_register_my_thread_inner");
+# ifndef GC_NO_DLLMAIN
+    if (GC_win32_dll_threads) {
+      if (GC_please_stop) {
+        AO_store(&GC_attached_thread, TRUE);
+        AO_nop_full(); /* Later updates must become visible after this. */
+      }
+      /* We'd like to wait here, but can't, since waiting in DllMain    */
+      /* provokes deadlocks.                                            */
+      /* Thus we force marking to be restarted instead.                 */
+    } else
+# endif
+  /* else */ {
     GC_ASSERT(!GC_please_stop);
-       /* Otherwise both we and the thread stopping code would be      */
-       /* holding the allocation lock.                                 */
+        /* Otherwise both we and the thread stopping code would be      */
+        /* holding the allocation lock.                                 */
   }
   return (GC_thread)(me);
 }
@@ -452,143 +491,198 @@ static GC_thread GC_register_my_thread_inner(struct GC_stack_base *sb,
  * GC_max_thread_index may temporarily be larger than MAX_THREADS.
  * To avoid subscript errors, we check on access.
  */
-#ifdef __GNUC__
-__inline__
-#endif
-STATIC LONG GC_get_max_thread_index(void)
+GC_INLINE LONG GC_get_max_thread_index(void)
 {
   LONG my_max = GC_max_thread_index;
-
-  if (my_max >= MAX_THREADS) return MAX_THREADS-1;
+  if (my_max >= MAX_THREADS) return MAX_THREADS - 1;
   return my_max;
 }
 
-/* Return the GC_thread corresponding to a thread id.  May be called   */
-/* without a lock, but should be called in contexts in which the       */
-/* requested thread cannot be asynchronously deleted, e.g. from the    */
-/* thread itself.                                                      */
-/* This version assumes that either GC_win32_dll_threads is set, or    */
-/* we hold the allocator lock.                                         */
-/* Also used (for assertion checking only) from thread_local_alloc.c.  */
-GC_thread GC_lookup_thread_inner(DWORD thread_id) {
-  if (GC_win32_dll_threads) {
-    int i;
-    LONG my_max = GC_get_max_thread_index();
-    for (i = 0;
-       i <= my_max &&
-       (!AO_load_acquire(&(dll_thread_table[i].in_use))
-       || dll_thread_table[i].id != thread_id);
-       /* Must still be in_use, since nobody else can store our thread_id. */
-       i++) {}
-    if (i > my_max) {
-      return 0;
-    } else {
-      return (GC_thread)(dll_thread_table + i);
+/* Return the GC_thread corresponding to a thread id.  May be called    */
+/* without a lock, but should be called in contexts in which the        */
+/* requested thread cannot be asynchronously deleted, e.g. from the     */
+/* thread itself.                                                       */
+/* This version assumes that either GC_win32_dll_threads is set, or     */
+/* we hold the allocator lock.                                          */
+/* Also used (for assertion checking only) from thread_local_alloc.c.   */
+STATIC GC_thread GC_lookup_thread_inner(DWORD thread_id)
+{
+# ifndef GC_NO_DLLMAIN
+    if (GC_win32_dll_threads) {
+      int i;
+      LONG my_max = GC_get_max_thread_index();
+      for (i = 0; i <= my_max &&
+                  (!AO_load_acquire(&dll_thread_table[i].tm.in_use)
+                  || dll_thread_table[i].id != thread_id);
+           /* Must still be in_use, since nobody else can store our     */
+           /* thread_id.                                                */
+           i++) {
+        /* empty */
+      }
+      if (i > my_max) {
+        return 0;
+      } else {
+        return (GC_thread)(dll_thread_table + i);
+      }
     }
-  } else {
-    word hv = ((word)thread_id) % THREAD_TABLE_SZ;
+# endif
+  {
+    word hv = THREAD_TABLE_INDEX(thread_id);
     register GC_thread p = GC_threads[hv];
-    
+
     GC_ASSERT(I_HOLD_LOCK());
-    while (p != 0 && p -> id != thread_id) p = p -> next;
+    while (p != 0 && p -> id != thread_id) p = p -> tm.next;
     return(p);
   }
 }
 
-/* Make sure thread descriptor t is not protected by the VDB           */
-/* implementation.                                                     */
-/* Used to prevent write faults when the world is (partially) stopped, */
-/* since it may have been stopped with a system lock held, and that    */
-/* lock may be required for fault handling.                            */
-# if defined(MPROTECT_VDB) && !defined(MSWINCE)
-#    define UNPROTECT(t) \
-       if (GC_dirty_maintained && !GC_win32_dll_threads && \
-           t != &first_thread) { \
-         GC_ASSERT(SMALL_OBJ(GC_size(t))); \
-         GC_remove_protection(HBLKPTR(t), 1, FALSE); \
-       }
-# else
-#    define UNPROTECT(p)
-# endif
+/* Called by GC_finalize() (in case of an allocation failure observed). */
+/* GC_reset_finalizer_nested() is the same as in pthread_support.c.     */
+GC_INNER void GC_reset_finalizer_nested(void)
+{
+  GC_thread me = GC_lookup_thread_inner(GetCurrentThreadId());
+  me->finalizer_nested = 0;
+}
 
-/* If a thread has been joined, but we have not yet            */
-/* been notified, then there may be more than one thread       */
-/* in the table with the same win32 id.                                */
-/* This is OK, but we need a way to delete a specific one.     */
-/* Assumes we hold the allocation lock unless                  */
-/* GC_win32_dll_threads is set.                                        */
-/* If GC_win32_dll_threads is set it should be called from the */
-/* thread being deleted.                                       */
+/* Checks and updates the thread-local level of finalizers recursion.   */
+/* Returns NULL if GC_invoke_finalizers() should not be called by the   */
+/* collector (to minimize the risk of a deep finalizers recursion),     */
+/* otherwise returns a pointer to the thread-local finalizer_nested.    */
+/* Called by GC_notify_or_invoke_finalizers() only (the lock is held).  */
+/* GC_check_finalizer_nested() is the same as in pthread_support.c.     */
+GC_INNER unsigned *GC_check_finalizer_nested(void)
+{
+  GC_thread me = GC_lookup_thread_inner(GetCurrentThreadId());
+  unsigned nesting_level = me->finalizer_nested;
+  if (nesting_level) {
+    /* We are inside another GC_invoke_finalizers().            */
+    /* Skip some implicitly-called GC_invoke_finalizers()       */
+    /* depending on the nesting (recursion) level.              */
+    if (++me->finalizer_skipped < (1U << nesting_level)) return NULL;
+    me->finalizer_skipped = 0;
+  }
+  me->finalizer_nested = nesting_level + 1;
+  return &me->finalizer_nested;
+}
+
+#if defined(GC_ASSERTIONS) && defined(THREAD_LOCAL_ALLOC)
+  /* This is called from thread-local GC_malloc(). */
+  GC_bool GC_is_thread_tsd_valid(void *tsd)
+  {
+    char *me;
+    LOCK();
+    me = (char *)GC_lookup_thread_inner(GetCurrentThreadId());
+    UNLOCK();
+    /* FIXME: We can check tsd more correctly (since now we have access */
+    /* to the right declarations).  This old algorithm (moved from      */
+    /* thread_local_alloc.c) checks only that it's close.               */
+    return((char *)tsd > me && (char *)tsd < me + 1000);
+  }
+#endif
+
+/* Make sure thread descriptor t is not protected by the VDB            */
+/* implementation.                                                      */
+/* Used to prevent write faults when the world is (partially) stopped,  */
+/* since it may have been stopped with a system lock held, and that     */
+/* lock may be required for fault handling.                             */
+#if defined(MPROTECT_VDB)
+# define UNPROTECT_THREAD(t) \
+    if (GC_dirty_maintained && !GC_win32_dll_threads && \
+        t != &first_thread) { \
+      GC_ASSERT(SMALL_OBJ(GC_size(t))); \
+      GC_remove_protection(HBLKPTR(t), 1, FALSE); \
+    }
+#else
+# define UNPROTECT_THREAD(t)
+#endif
+
+/* If a thread has been joined, but we have not yet             */
+/* been notified, then there may be more than one thread        */
+/* in the table with the same win32 id.                         */
+/* This is OK, but we need a way to delete a specific one.      */
+/* Assumes we hold the allocation lock unless                   */
+/* GC_win32_dll_threads is set.                                 */
+/* If GC_win32_dll_threads is set it should be called from the  */
+/* thread being deleted.                                        */
 STATIC void GC_delete_gc_thread(GC_vthread gc_id)
 {
-  CloseHandle(gc_id->handle);
-  if (GC_win32_dll_threads) {
-    /* This is intended to be lock-free.                               */
-    /* It is either called synchronously from the thread being deleted,        */
-    /* or by the joining thread.                                       */
-    /* In this branch asynchronous changes to *gc_id are possible.     */
-    gc_id -> stack_base = 0;
-    gc_id -> id = 0;
-#   ifdef CYGWIN32
-      gc_id -> pthread_id = 0;
-#   endif /* CYGWIN32 */
-#   ifdef GC_WIN32_PTHREADS
-      gc_id -> pthread_id.p = NULL;
-#   endif /* GC_WIN32_PTHREADS */
-    AO_store_release(&(gc_id->in_use), FALSE);
-  } else {
+# ifndef MSWINCE
+    CloseHandle(gc_id->handle);
+# endif
+# ifndef GC_NO_DLLMAIN
+    if (GC_win32_dll_threads) {
+      /* This is intended to be lock-free.                              */
+      /* It is either called synchronously from the thread being        */
+      /* deleted, or by the joining thread.                             */
+      /* In this branch asynchronous changes to *gc_id are possible.    */
+      /* It's not allowed to call GC_printf (and the friends) here,     */
+      /* see GC_stop_world() for the information.                       */
+      gc_id -> stack_base = 0;
+      gc_id -> id = 0;
+#     ifdef CYGWIN32
+        gc_id -> pthread_id = 0;
+#     endif /* CYGWIN32 */
+#     ifdef GC_WIN32_PTHREADS
+        gc_id -> pthread_id.p = NULL;
+#     endif /* GC_WIN32_PTHREADS */
+      AO_store_release(&gc_id->tm.in_use, FALSE);
+    } else
+# endif
+  /* else */ {
     /* Cast away volatile qualifier, since we have lock. */
     GC_thread gc_nvid = (GC_thread)gc_id;
     DWORD id = gc_nvid -> id;
-    word hv = ((word)id) % THREAD_TABLE_SZ;
+    word hv = THREAD_TABLE_INDEX(id);
     register GC_thread p = GC_threads[hv];
     register GC_thread prev = 0;
 
     GC_ASSERT(I_HOLD_LOCK());
     while (p != gc_nvid) {
-        prev = p;
-        p = p -> next;
+      prev = p;
+      p = p -> tm.next;
     }
     if (prev == 0) {
-        GC_threads[hv] = p -> next;
+      GC_threads[hv] = p -> tm.next;
     } else {
-        prev -> next = p -> next;
+      prev -> tm.next = p -> tm.next;
     }
     GC_INTERNAL_FREE(p);
   }
 }
 
-/* Delete a thread from GC_threads.  We assume it is there.    */
-/* (The code intentionally traps if it wasn't.)                        */
-/* Assumes we hold the allocation lock unless                  */
-/* GC_win32_dll_threads is set.                                        */
-/* If GC_win32_dll_threads is set it should be called from the */
-/* thread being deleted.                                       */
+/* Delete a thread from GC_threads.  We assume it is there.     */
+/* (The code intentionally traps if it wasn't.)                 */
+/* Assumes we hold the allocation lock unless                   */
+/* GC_win32_dll_threads is set.                                 */
+/* If GC_win32_dll_threads is set it should be called from the  */
+/* thread being deleted.                                        */
 STATIC void GC_delete_thread(DWORD id)
 {
   if (GC_win32_dll_threads) {
     GC_thread t = GC_lookup_thread_inner(id);
 
     if (0 == t) {
-      WARN("Removing nonexistent thread %ld\n", (long)id);
+      WARN("Removing nonexistent thread, id = %" GC_PRIdPTR "\n", id);
     } else {
       GC_delete_gc_thread(t);
     }
   } else {
-    word hv = ((word)id) % THREAD_TABLE_SZ;
+    word hv = THREAD_TABLE_INDEX(id);
     register GC_thread p = GC_threads[hv];
     register GC_thread prev = 0;
-    
+
     GC_ASSERT(I_HOLD_LOCK());
     while (p -> id != id) {
-        prev = p;
-        p = p -> next;
+      prev = p;
+      p = p -> tm.next;
     }
-    CloseHandle(p->handle);
+#   ifndef MSWINCE
+      CloseHandle(p->handle);
+#   endif
     if (prev == 0) {
-        GC_threads[hv] = p -> next;
+      GC_threads[hv] = p -> tm.next;
     } else {
-        prev -> next = p -> next;
+      prev -> tm.next = p -> tm.next;
     }
     GC_INTERNAL_FREE(p);
   }
@@ -599,20 +693,21 @@ GC_API void GC_CALL GC_allow_register_threads(void)
   /* Check GC is initialized and the current thread is registered. */
   GC_ASSERT(GC_lookup_thread_inner(GetCurrentThreadId()) != 0);
 
-# if defined(GC_DLL) && !defined(PARALLEL_MARK) && !defined(THREAD_LOCAL_ALLOC)
-    /* GC_init_parallel() is not called from GC_init_inner().  */
+# if !defined(GC_NO_DLLMAIN) && !defined(PARALLEL_MARK)
+    /* GC_init() doesn't call GC_init_parallel() in this case.  */
     parallel_initialized = TRUE;
 # endif
   GC_need_to_lock = TRUE; /* We are multi-threaded now. */
 }
 
-GC_API int GC_CALL GC_register_my_thread(struct GC_stack_base *sb) {
+GC_API int GC_CALL GC_register_my_thread(const struct GC_stack_base *sb)
+{
   DWORD t = GetCurrentThreadId();
 
   if (GC_need_to_lock == FALSE)
     ABORT("Threads explicit registering is not previously enabled");
 
-  /* We lock here, since we want to wait for an ongoing GC.    */
+  /* We lock here, since we want to wait for an ongoing GC.     */
   LOCK();
   if (0 == GC_lookup_thread_inner(t)) {
     GC_register_my_thread_inner(sb, t);
@@ -626,177 +721,263 @@ GC_API int GC_CALL GC_register_my_thread(struct GC_stack_base *sb) {
 
 GC_API int GC_CALL GC_unregister_my_thread(void)
 {
-    DWORD t = GetCurrentThreadId();
+  DWORD t = GetCurrentThreadId();
 
-    if (GC_win32_dll_threads) {
-#     if defined(THREAD_LOCAL_ALLOC)
-       /* Can't happen: see GC_use_DllMain(). */
-       GC_ASSERT(FALSE);
-#     endif
-      /* FIXME: Should we just ignore this? */
-      GC_delete_thread(t);
-    } else {
-      LOCK();
-#     if defined(THREAD_LOCAL_ALLOC)
-       {
-         GC_thread me = GC_lookup_thread_inner(t);
-         GC_destroy_thread_local(&(me->tlfs));
-       }
-#     endif
-      GC_delete_thread(t);
-      UNLOCK();
-    }
-    return GC_SUCCESS;
+  if (GC_win32_dll_threads) {
+#   if defined(THREAD_LOCAL_ALLOC)
+      /* Can't happen: see GC_use_DllMain(). */
+      GC_ASSERT(FALSE);
+#   endif
+    /* FIXME: Should we just ignore this? */
+    GC_delete_thread(t);
+  } else {
+    LOCK();
+#   if defined(THREAD_LOCAL_ALLOC)
+      {
+        GC_thread me = GC_lookup_thread_inner(t);
+        GC_destroy_thread_local(&(me->tlfs));
+      }
+#   endif
+    GC_delete_thread(t);
+    UNLOCK();
+  }
+  return GC_SUCCESS;
 }
 
+/* Wrapper for functions that are likely to block for an appreciable    */
+/* length of time.                                                      */
 
-#ifdef GC_PTHREADS
+/* GC_do_blocking_inner() is nearly the same as in pthread_support.c    */
+/*ARGSUSED*/
+GC_INNER void GC_do_blocking_inner(ptr_t data, void * context)
+{
+  struct blocking_data * d = (struct blocking_data *) data;
+  DWORD t = GetCurrentThreadId();
+  GC_thread me;
+  LOCK();
+  me = GC_lookup_thread_inner(t);
+  GC_ASSERT(me -> thread_blocked_sp == NULL);
+# ifdef IA64
+    me -> backing_store_ptr = GC_save_regs_in_stack();
+# endif
+  me -> thread_blocked_sp = (ptr_t) &d; /* save approx. sp */
+  /* Save context here if we want to support precise stack marking */
+  UNLOCK();
+  d -> client_data = (d -> fn)(d -> client_data);
+  LOCK();   /* This will block if the world is stopped. */
+  me -> thread_blocked_sp = NULL;
+  UNLOCK();
+}
 
-/* A quick-and-dirty cache of the mapping between pthread_t    */
-/* and win32 thread id.                                                */
-#define PTHREAD_MAP_SIZE 512
-DWORD GC_pthread_map_cache[PTHREAD_MAP_SIZE];
-#define HASH(pthread_id) ((NUMERIC_THREAD_ID(pthread_id) >> 5) % PTHREAD_MAP_SIZE)
-       /* It appears pthread_t is really a pointer type ... */
-#define SET_PTHREAD_MAP_CACHE(pthread_id, win32_id) \
-       (GC_pthread_map_cache[HASH(pthread_id)] = (win32_id))
-#define GET_PTHREAD_MAP_CACHE(pthread_id) \
-       GC_pthread_map_cache[HASH(pthread_id)]
-
-/* Return a GC_thread corresponding to a given pthread_t.      */
-/* Returns 0 if it's not there.                                        */
-/* We assume that this is only called for pthread ids that     */
-/* have not yet terminated or are still joinable, and          */
-/* cannot be concurrently terminated.                          */
-/* Assumes we do NOT hold the allocation lock.                 */
-static GC_thread GC_lookup_pthread(pthread_t id)
+/* GC_call_with_gc_active() has the opposite to GC_do_blocking()        */
+/* functionality.  It might be called from a user function invoked by   */
+/* GC_do_blocking() to temporarily back allow calling any GC function   */
+/* and/or manipulating pointers to the garbage collected heap.          */
+GC_API void * GC_CALL GC_call_with_gc_active(GC_fn_type fn,
+                                             void * client_data)
 {
-  if (GC_win32_dll_threads) {
-    int i;
-    LONG my_max = GC_get_max_thread_index();
+  struct GC_activation_frame_s frame;
+  GC_thread me;
+  LOCK();   /* This will block if the world is stopped.         */
+  me = GC_lookup_thread_inner(GetCurrentThreadId());
+
+  /* Adjust our stack base value (this could happen unless      */
+  /* GC_get_stack_base() was used which returned GC_SUCCESS).   */
+  GC_ASSERT(me -> stack_base != NULL);
+  if (me -> stack_base < (ptr_t)(&frame))
+    me -> stack_base = (ptr_t)(&frame);
+
+  if (me -> thread_blocked_sp == NULL) {
+    /* We are not inside GC_do_blocking() - do nothing more.    */
+    UNLOCK();
+    return fn(client_data);
+  }
 
-    for (i = 0;
-         i <= my_max &&
-         (!AO_load_acquire(&(dll_thread_table[i].in_use))
-         || THREAD_EQUAL(dll_thread_table[i].pthread_id, id));
-       /* Must still be in_use, since nobody else can store our thread_id. */
-       i++);
-    if (i > my_max) return 0;
-    return (GC_thread)(dll_thread_table + i);
-  } else {
-    /* We first try the cache.  If that fails, we use a very slow      */
-    /* approach.                                                       */
-    int hv_guess = GET_PTHREAD_MAP_CACHE(id) % THREAD_TABLE_SZ;
-    int hv;
-    GC_thread p;
+  /* Setup new "frame".       */
+  frame.saved_stack_ptr = me -> thread_blocked_sp;
+# ifdef IA64
+    /* This is the same as in GC_call_with_stack_base().        */
+    frame.backing_store_end = GC_save_regs_in_stack();
+    /* Unnecessarily flushes register stack,    */
+    /* but that probably doesn't hurt.          */
+    frame.saved_backing_store_ptr = me -> backing_store_ptr;
+# endif
+  frame.prev = me -> activation_frame;
+  me -> thread_blocked_sp = NULL;
+  me -> activation_frame = &frame;
 
-    LOCK();
-    for (p = GC_threads[hv_guess]; 0 != p; p = p -> next) {
-      if (THREAD_EQUAL(p -> pthread_id, id))
-       goto foundit; 
-    }
-    for (hv = 0; hv < THREAD_TABLE_SZ; ++hv) {
-      for (p = GC_threads[hv]; 0 != p; p = p -> next) {
+  UNLOCK();
+  client_data = fn(client_data);
+  GC_ASSERT(me -> thread_blocked_sp == NULL);
+  GC_ASSERT(me -> activation_frame == &frame);
+
+  /* Restore original "frame".  */
+  LOCK();
+  me -> activation_frame = frame.prev;
+# ifdef IA64
+    me -> backing_store_ptr = frame.saved_backing_store_ptr;
+# endif
+  me -> thread_blocked_sp = frame.saved_stack_ptr;
+  UNLOCK();
+
+  return client_data; /* result */
+}
+
+#ifdef GC_PTHREADS
+
+  /* A quick-and-dirty cache of the mapping between pthread_t   */
+  /* and win32 thread id.                                       */
+# define PTHREAD_MAP_SIZE 512
+  DWORD GC_pthread_map_cache[PTHREAD_MAP_SIZE] = {0};
+# define PTHREAD_MAP_INDEX(pthread_id) \
+                ((NUMERIC_THREAD_ID(pthread_id) >> 5) % PTHREAD_MAP_SIZE)
+        /* It appears pthread_t is really a pointer type ... */
+# define SET_PTHREAD_MAP_CACHE(pthread_id, win32_id) \
+          (GC_pthread_map_cache[PTHREAD_MAP_INDEX(pthread_id)] = (win32_id))
+# define GET_PTHREAD_MAP_CACHE(pthread_id) \
+          GC_pthread_map_cache[PTHREAD_MAP_INDEX(pthread_id)]
+
+  /* Return a GC_thread corresponding to a given pthread_t.     */
+  /* Returns 0 if it's not there.                               */
+  /* We assume that this is only called for pthread ids that    */
+  /* have not yet terminated or are still joinable, and         */
+  /* cannot be concurrently terminated.                         */
+  /* Assumes we do NOT hold the allocation lock.                */
+  STATIC GC_thread GC_lookup_pthread(pthread_t id)
+  {
+#   ifndef GC_NO_DLLMAIN
+      if (GC_win32_dll_threads) {
+        int i;
+        LONG my_max = GC_get_max_thread_index();
+
+        for (i = 0; i <= my_max &&
+                    (!AO_load_acquire(&dll_thread_table[i].tm.in_use)
+                    || THREAD_EQUAL(dll_thread_table[i].pthread_id, id));
+                    /* Must still be in_use, since nobody else can      */
+                    /* store our thread_id.                             */
+             i++) {
+          /* empty */
+        }
+        if (i > my_max) return 0;
+        return (GC_thread)(dll_thread_table + i);
+      }
+#   endif
+    {
+      /* We first try the cache.  If that fails, we use a very slow     */
+      /* approach.                                                      */
+      word hv_guess = THREAD_TABLE_INDEX(GET_PTHREAD_MAP_CACHE(id));
+      int hv;
+      GC_thread p;
+
+      LOCK();
+      for (p = GC_threads[hv_guess]; 0 != p; p = p -> tm.next) {
         if (THREAD_EQUAL(p -> pthread_id, id))
-         goto foundit; 
+          goto foundit;
       }
+      for (hv = 0; hv < THREAD_TABLE_SZ; ++hv) {
+        for (p = GC_threads[hv]; 0 != p; p = p -> tm.next) {
+          if (THREAD_EQUAL(p -> pthread_id, id))
+            goto foundit;
+        }
+      }
+      p = 0;
+     foundit:
+      UNLOCK();
+      return p;
     }
-    p = 0;
-   foundit:
-    UNLOCK();
-    return p;
   }
-}
 
 #endif /* GC_PTHREADS */
 
 void GC_push_thread_structures(void)
 {
   GC_ASSERT(I_HOLD_LOCK());
-  if (GC_win32_dll_threads) {
-    /* Unlike the other threads implementations, the thread table here */
-    /* contains no pointers to the collectable heap.  Thus we have     */
-    /* no private structures we need to preserve.                      */
-#   ifdef GC_PTHREADS 
-    { int i; /* pthreads may keep a pointer in the thread exit value */
-      LONG my_max = GC_get_max_thread_index();
+# ifndef GC_NO_DLLMAIN
+    if (GC_win32_dll_threads) {
+      /* Unlike the other threads implementations, the thread table here */
+      /* contains no pointers to the collectable heap.  Thus we have     */
+      /* no private structures we need to preserve.                      */
+#     ifdef GC_PTHREADS
+        int i; /* pthreads may keep a pointer in the thread exit value */
+        LONG my_max = GC_get_max_thread_index();
 
-      for (i = 0; i <= my_max; i++)
-        if (dll_thread_table[i].in_use)
-         GC_push_all((ptr_t)&(dll_thread_table[i].status),
-                      (ptr_t)(&(dll_thread_table[i].status)+1));
-    }
-#   endif
-  } else {
+        for (i = 0; i <= my_max; i++)
+          if (dll_thread_table[i].tm.in_use)
+            GC_push_all((ptr_t)&(dll_thread_table[i].status),
+                        (ptr_t)(&(dll_thread_table[i].status)+1));
+#     endif
+    } else
+# endif
+  /* else */ {
     GC_push_all((ptr_t)(GC_threads), (ptr_t)(GC_threads)+sizeof(GC_threads));
   }
 # if defined(THREAD_LOCAL_ALLOC)
     GC_push_all((ptr_t)(&GC_thread_key),
       (ptr_t)(&GC_thread_key)+sizeof(&GC_thread_key));
-    /* Just in case we ever use our own TLS implementation.    */
+    /* Just in case we ever use our own TLS implementation.     */
 # endif
 }
 
-#if defined(MPROTECT_VDB) && !defined(MSWINCE)
-  extern volatile AO_TS_t GC_fault_handler_lock;  /* from os_dep.c */
-#endif
-
-/* Suspend the given thread, if it's still active.     */
+/* Suspend the given thread, if it's still active.      */
 STATIC void GC_suspend(GC_thread t)
 {
-# ifdef MSWINCE
-    /* SuspendThread will fail if thread is running kernel code */
-      while (SuspendThread(t -> handle) == (DWORD)-1)
-       Sleep(10);
-# else
-    /* Apparently the Windows 95 GetOpenFileName call creates  */
-    /* a thread that does not properly get cleaned up, and             */
-    /* SuspendThread on its descriptor may provoke a crash.            */
-    /* This reduces the probability of that event, though it still     */
-    /* appears there's a race here.                                    */
-    DWORD exitCode; 
-
-    UNPROTECT(t);
+# ifndef MSWINCE
+    /* Apparently the Windows 95 GetOpenFileName call creates           */
+    /* a thread that does not properly get cleaned up, and              */
+    /* SuspendThread on its descriptor may provoke a crash.             */
+    /* This reduces the probability of that event, though it still      */
+    /* appears there's a race here.                                     */
+    DWORD exitCode;
+# endif
+  UNPROTECT_THREAD(t);
+# ifndef MSWINCE
     if (GetExitCodeThread(t -> handle, &exitCode) &&
         exitCode != STILL_ACTIVE) {
 #     ifdef GC_PTHREADS
-       t -> stack_base = 0; /* prevent stack from being pushed */
+        t -> stack_base = 0; /* prevent stack from being pushed */
 #     else
         /* this breaks pthread_join on Cygwin, which is guaranteed to  */
-        /* only see user pthreads                                     */
-       GC_ASSERT(GC_win32_dll_threads);
-       GC_delete_gc_thread(t);
+        /* only see user pthreads                                      */
+        GC_ASSERT(GC_win32_dll_threads);
+        GC_delete_gc_thread(t);
 #     endif
       return;
     }
-#   if defined(MPROTECT_VDB) && !defined(MSWINCE)
-      /* Acquire the spin lock we use to update dirty bits.    */
-      /* Threads shouldn't get stopped holding it.  But we may */
-      /* acquire and release it in the UNPROTECT call.         */
-      while (AO_test_and_set_acquire(&GC_fault_handler_lock) == AO_TS_SET) {}
-#   endif
+# endif
+# if defined(MPROTECT_VDB)
+    /* Acquire the spin lock we use to update dirty bits.       */
+    /* Threads shouldn't get stopped holding it.  But we may    */
+    /* acquire and release it in the UNPROTECT_THREAD call.     */
+    while (AO_test_and_set_acquire(&GC_fault_handler_lock) == AO_TS_SET) {
+      /* empty */
+    }
+# endif
 
+# ifdef MSWINCE
+    /* SuspendThread() will fail if thread is running kernel code.      */
+    while (SuspendThread(THREAD_HANDLE(t)) == (DWORD)-1)
+      Sleep(10); /* in millis */
+# else
     if (SuspendThread(t -> handle) == (DWORD)-1)
       ABORT("SuspendThread failed");
+# endif /* !MSWINCE */
+  t -> suspended = TRUE;
+# if defined(MPROTECT_VDB)
+    AO_CLEAR(&GC_fault_handler_lock);
 # endif
-   t -> suspended = TRUE;
-#  if defined(MPROTECT_VDB) && !defined(MSWINCE)
-     AO_CLEAR(&GC_fault_handler_lock);
-#  endif
 }
 
-/* Defined in misc.c */
-#ifndef CYGWIN32
-  extern CRITICAL_SECTION GC_write_cs;
+#if defined(GC_ASSERTIONS) && !defined(CYGWIN32)
+  GC_INNER GC_bool GC_write_disabled = FALSE;
+                /* TRUE only if GC_stop_world() acquired GC_write_cs.   */
 #endif
 
-void GC_stop_world(void)
+GC_INNER void GC_stop_world(void)
 {
   DWORD thread_id = GetCurrentThreadId();
-  int i;
-  int my_max;
 
-  if (!GC_thr_initialized) ABORT("GC_stop_world() called before GC_thr_init()");
+  if (!GC_thr_initialized)
+    ABORT("GC_stop_world() called before GC_thr_init()");
   GC_ASSERT(I_HOLD_LOCK());
 
   /* This code is the same as in pthread_stop_world.c */
@@ -808,48 +989,65 @@ void GC_stop_world(void)
     }
 # endif /* PARALLEL_MARK */
 
-  GC_please_stop = TRUE;
+# if !defined(GC_NO_DLLMAIN) || defined(GC_ASSERTIONS)
+    GC_please_stop = TRUE;
+# endif
 # ifndef CYGWIN32
+    GC_ASSERT(!GC_write_disabled);
     EnterCriticalSection(&GC_write_cs);
+    /* It's not allowed to call GC_printf() (and friends) here down to  */
+    /* LeaveCriticalSection (same applies recursively to                */
+    /* GC_get_max_thread_index(), GC_suspend(), GC_delete_gc_thread()   */
+    /* (only if GC_win32_dll_threads), GC_size() and                    */
+    /* GC_remove_protection()).                                         */
+#   ifdef GC_ASSERTIONS
+      GC_write_disabled = TRUE;
+#   endif
 # endif
-  if (GC_win32_dll_threads) {
-    /* Any threads being created during this loop will end up setting   */
-    /* GC_attached_thread when they start.  This will force marking to  */
-    /* restart.                                                                */
-    /* This is not ideal, but hopefully correct.                       */
-    GC_attached_thread = FALSE;
-    my_max = (int)GC_get_max_thread_index();
-    for (i = 0; i <= my_max; i++) {
-      GC_vthread t = dll_thread_table + i;
-      if (t -> stack_base != 0
-         && t -> id != thread_id) {
-         GC_suspend((GC_thread)t);
-      }
-    }
-  } else {
-      GC_thread t;
+# ifndef GC_NO_DLLMAIN
+    if (GC_win32_dll_threads) {
       int i;
+      int my_max;
+      /* Any threads being created during this loop will end up setting */
+      /* GC_attached_thread when they start.  This will force marking   */
+      /* to restart.  This is not ideal, but hopefully correct.         */
+      GC_attached_thread = FALSE;
+      my_max = (int)GC_get_max_thread_index();
+      for (i = 0; i <= my_max; i++) {
+        GC_vthread t = dll_thread_table + i;
+        if (t -> stack_base != 0 && t -> thread_blocked_sp == NULL
+            && t -> id != thread_id) {
+          GC_suspend((GC_thread)t);
+        }
+      }
+    } else
+# endif
+  /* else */ {
+    GC_thread t;
+    int i;
 
-      for (i = 0; i < THREAD_TABLE_SZ; i++) {
-        for (t = GC_threads[i]; t != 0; t = t -> next) {
-         if (t -> stack_base != 0
-         && !KNOWN_FINISHED(t)
-         && t -> id != thread_id) {
-           GC_suspend(t);
-         }
-       }
+    for (i = 0; i < THREAD_TABLE_SZ; i++) {
+      for (t = GC_threads[i]; t != 0; t = t -> tm.next) {
+        if (t -> stack_base != 0 && t -> thread_blocked_sp == NULL
+            && !KNOWN_FINISHED(t) && t -> id != thread_id) {
+          GC_suspend(t);
+        }
       }
+    }
   }
 # ifndef CYGWIN32
+#   ifdef GC_ASSERTIONS
+      GC_write_disabled = FALSE;
+#   endif
     LeaveCriticalSection(&GC_write_cs);
-# endif    
+# endif
 # ifdef PARALLEL_MARK
     if (GC_parallel)
       GC_release_mark_lock();
 # endif
 }
 
-void GC_start_world(void)
+GC_INNER void GC_start_world(void)
 {
   DWORD thread_id = GetCurrentThreadId();
   int i;
@@ -860,9 +1058,9 @@ void GC_start_world(void)
     for (i = 0; i <= my_max; i++) {
       GC_thread t = (GC_thread)(dll_thread_table + i);
       if (t -> stack_base != 0 && t -> suspended
-         && t -> id != thread_id) {
-        if (ResumeThread(t -> handle) == (DWORD)-1)
-         ABORT("ResumeThread failed");
+          && t -> id != thread_id) {
+        if (ResumeThread(THREAD_HANDLE(t)) == (DWORD)-1)
+          ABORT("ResumeThread failed");
         t -> suspended = FALSE;
       }
     }
@@ -871,225 +1069,263 @@ void GC_start_world(void)
     int i;
 
     for (i = 0; i < THREAD_TABLE_SZ; i++) {
-      for (t = GC_threads[i]; t != 0; t = t -> next) {
+      for (t = GC_threads[i]; t != 0; t = t -> tm.next) {
         if (t -> stack_base != 0 && t -> suspended
-           && t -> id != thread_id) {
-          if (ResumeThread(t -> handle) == (DWORD)-1)
-           ABORT("ResumeThread failed");
-         UNPROTECT(t);
+            && t -> id != thread_id) {
+          if (ResumeThread(THREAD_HANDLE(t)) == (DWORD)-1)
+            ABORT("ResumeThread failed");
+          UNPROTECT_THREAD(t);
           t -> suspended = FALSE;
         }
       }
     }
   }
-  GC_please_stop = FALSE;
+# if !defined(GC_NO_DLLMAIN) || defined(GC_ASSERTIONS)
+    GC_please_stop = FALSE;
+# endif
 }
 
-# ifdef MSWINCE
-    /* The VirtualQuery calls below won't work properly on WinCE, but  */
-    /* since each stack is restricted to an aligned 64K region of      */
-    /* virtual memory we can just take the next lowest multiple of 64K.        */
-#   define GC_get_stack_min(s) \
-        ((ptr_t)(((DWORD)(s) - 1) & 0xFFFF0000))
-# else
+#ifdef MSWINCE
+  /* The VirtualQuery calls below won't work properly on some old WinCE */
+  /* versions, but since each stack is restricted to an aligned 64 KiB  */
+  /* region of virtual memory we can just take the next lowest multiple */
+  /* of 64 KiB.  The result of this macro must not be used as its       */
+  /* argument later and must not be used as the lower bound for sp      */
+  /* check (since the stack may be bigger than 64 KiB).                 */
+# define GC_wince_evaluate_stack_min(s) \
+                        (ptr_t)(((word)(s) - 1) & ~(word)0xFFFF)
+#elif defined(GC_ASSERTIONS)
+# define GC_dont_query_stack_min FALSE
+#endif
 
-    /* A cache holding the results of the last VirtualQuery call.      */
-    /* Protected by the allocation lock.                               */
-    static ptr_t last_address = 0;
-    static MEMORY_BASIC_INFORMATION last_info;
+/* A cache holding the results of the recent VirtualQuery call. */
+/* Protected by the allocation lock.                            */
+static ptr_t last_address = 0;
+static MEMORY_BASIC_INFORMATION last_info;
 
-    /* Probe stack memory region (starting at "s") to find out its     */
-    /* lowest address (i.e. stack top).                                        */
-    /* S must be a mapped address inside the region, NOT the first     */
-    /* unmapped address.                                               */
-    static ptr_t GC_get_stack_min(ptr_t s)
-    {
-       ptr_t bottom;
-
-       GC_ASSERT(I_HOLD_LOCK());
-       if (s != last_address) {
-           VirtualQuery(s, &last_info, sizeof(last_info));
-           last_address = s;
-       }
-       do {
-           bottom = last_info.BaseAddress;
-           VirtualQuery(bottom - 1, &last_info, sizeof(last_info));
-           last_address = bottom - 1;
-       } while ((last_info.Protect & PAGE_READWRITE)
-                && !(last_info.Protect & PAGE_GUARD));
-       return(bottom);
-    }
+/* Probe stack memory region (starting at "s") to find out its  */
+/* lowest address (i.e. stack top).                             */
+/* S must be a mapped address inside the region, NOT the first  */
+/* unmapped address.                                            */
+STATIC ptr_t GC_get_stack_min(ptr_t s)
+{
+  ptr_t bottom;
 
-    /* Return true if the page at s has protections appropriate        */
-    /* for a stack page.                                       */
-    static GC_bool GC_may_be_in_stack(ptr_t s)
-    {
-       GC_ASSERT(I_HOLD_LOCK());
-       if (s != last_address) {
-           VirtualQuery(s, &last_info, sizeof(last_info));
-           last_address = s;
-       }
-       return (last_info.Protect & PAGE_READWRITE)
-               && !(last_info.Protect & PAGE_GUARD);
-    }
-# endif
+  GC_ASSERT(I_HOLD_LOCK());
+  if (s != last_address) {
+    VirtualQuery(s, &last_info, sizeof(last_info));
+    last_address = s;
+  }
+  do {
+    bottom = last_info.BaseAddress;
+    VirtualQuery(bottom - 1, &last_info, sizeof(last_info));
+    last_address = bottom - 1;
+  } while ((last_info.Protect & PAGE_READWRITE)
+           && !(last_info.Protect & PAGE_GUARD));
+  return(bottom);
+}
 
-STATIC void GC_push_stack_for(GC_thread thread)
+/* Return true if the page at s has protections appropriate     */
+/* for a stack page.                                            */
+static GC_bool may_be_in_stack(ptr_t s)
 {
-    int dummy;
-    ptr_t sp, stack_min;
-    DWORD me = GetCurrentThreadId();
+  GC_ASSERT(I_HOLD_LOCK());
+  if (s != last_address) {
+    VirtualQuery(s, &last_info, sizeof(last_info));
+    last_address = s;
+  }
+  return (last_info.Protect & PAGE_READWRITE)
+          && !(last_info.Protect & PAGE_GUARD);
+}
 
-    if (thread -> stack_base) {
-      if (thread -> id == me) {
-       sp = (ptr_t) &dummy;
-      } else {
-        CONTEXT context;
-        context.ContextFlags = CONTEXT_INTEGER|CONTEXT_CONTROL;
-        if (!GetThreadContext(thread -> handle, &context))
-         ABORT("GetThreadContext failed");
-
-        /* Push all registers that might point into the heap.  Frame   */
-        /* pointer registers are included in case client code was      */
-        /* compiled with the 'omit frame pointer' optimisation.                */
-#       define PUSH1(reg) GC_push_one((word)context.reg)
-#       define PUSH2(r1,r2) PUSH1(r1), PUSH1(r2)
-#       define PUSH4(r1,r2,r3,r4) PUSH2(r1,r2), PUSH2(r3,r4)
-#       if defined(I386)
-          PUSH4(Edi,Esi,Ebx,Edx), PUSH2(Ecx,Eax), PUSH1(Ebp);
-         sp = (ptr_t)context.Esp;
-#      elif defined(X86_64)
-         PUSH4(Rax,Rcx,Rdx,Rbx); PUSH2(Rbp, Rsi); PUSH1(Rdi);
-         PUSH4(R8, R9, R10, R11); PUSH4(R12, R13, R14, R15);
-         sp = (ptr_t)context.Rsp;
-#       elif defined(ARM32)
-         PUSH4(R0,R1,R2,R3),PUSH4(R4,R5,R6,R7),PUSH4(R8,R9,R10,R11),PUSH1(R12);
-         sp = (ptr_t)context.Sp;
-#       elif defined(SHx)
-         PUSH4(R0,R1,R2,R3), PUSH4(R4,R5,R6,R7), PUSH4(R8,R9,R10,R11);
-         PUSH2(R12,R13), PUSH1(R14);
-         sp = (ptr_t)context.R15;
-#       elif defined(MIPS)
-         PUSH4(IntAt,IntV0,IntV1,IntA0), PUSH4(IntA1,IntA2,IntA3,IntT0);
-         PUSH4(IntT1,IntT2,IntT3,IntT4), PUSH4(IntT5,IntT6,IntT7,IntS0);
-         PUSH4(IntS1,IntS2,IntS3,IntS4), PUSH4(IntS5,IntS6,IntS7,IntT8);
-         PUSH4(IntT9,IntK0,IntK1,IntS8);
-         sp = (ptr_t)context.IntSp;
-#       elif defined(PPC)
-         PUSH4(Gpr0, Gpr3, Gpr4, Gpr5),  PUSH4(Gpr6, Gpr7, Gpr8, Gpr9);
-         PUSH4(Gpr10,Gpr11,Gpr12,Gpr14), PUSH4(Gpr15,Gpr16,Gpr17,Gpr18);
-         PUSH4(Gpr19,Gpr20,Gpr21,Gpr22), PUSH4(Gpr23,Gpr24,Gpr25,Gpr26);
-         PUSH4(Gpr27,Gpr28,Gpr29,Gpr30), PUSH1(Gpr31);
-         sp = (ptr_t)context.Gpr1;
-#       elif defined(ALPHA)
-         PUSH4(IntV0,IntT0,IntT1,IntT2), PUSH4(IntT3,IntT4,IntT5,IntT6);
-         PUSH4(IntT7,IntS0,IntS1,IntS2), PUSH4(IntS3,IntS4,IntS5,IntFp);
-         PUSH4(IntA0,IntA1,IntA2,IntA3), PUSH4(IntA4,IntA5,IntT8,IntT9);
-         PUSH4(IntT10,IntT11,IntT12,IntAt);
-         sp = (ptr_t)context.IntSp;
-#       else
-#         error "architecture is not supported"
-#       endif
-      } /* ! current thread */
-
-      /* Set stack_min to the lowest address in the thread stack,      */
-      /* or to an address in the thread stack no larger than sp,       */
-      /* taking advantage of the old value to avoid slow traversals    */
-      /* of large stacks.                                              */
-      if (thread -> last_stack_min == ADDR_LIMIT) {
-       stack_min = GC_get_stack_min(thread -> stack_base);
-        UNPROTECT(thread);
-        thread -> last_stack_min = stack_min;
-      } else {
-       if (sp < thread -> stack_base && sp >= thread -> last_stack_min) {
-           stack_min = sp;
-       } else {
-#         ifdef MSWINCE
-           stack_min = GC_get_stack_min(thread -> stack_base);
-#         else
-            if (GC_may_be_in_stack(thread -> last_stack_min)) {
-              stack_min = GC_get_stack_min(thread -> last_stack_min);
-           } else {
-             /* Stack shrunk?  Is this possible? */
-             stack_min = GC_get_stack_min(thread -> stack_base);
-           }
-#        endif
-          UNPROTECT(thread);
-          thread -> last_stack_min = stack_min;
-       }
-      }
-      GC_ASSERT(stack_min == GC_get_stack_min(thread -> stack_base)
-               || (sp >= stack_min && stack_min < thread -> stack_base
-                  && stack_min > GC_get_stack_min(thread -> stack_base)));
+STATIC word GC_push_stack_for(GC_thread thread, DWORD me)
+{
+  int dummy;
+  ptr_t sp, stack_min;
+
+  struct GC_activation_frame_s *activation_frame =
+                                      thread -> activation_frame;
+  if (thread -> id == me) {
+    GC_ASSERT(thread -> thread_blocked_sp == NULL);
+    sp = (ptr_t) &dummy;
+  } else if ((sp = thread -> thread_blocked_sp) == NULL) {
+              /* Use saved sp value for blocked threads. */
+    /* For unblocked threads call GetThreadContext().   */
+    CONTEXT context;
+    context.ContextFlags = CONTEXT_INTEGER|CONTEXT_CONTROL;
+    if (!GetThreadContext(THREAD_HANDLE(thread), &context))
+      ABORT("GetThreadContext failed");
+
+    /* Push all registers that might point into the heap.  Frame        */
+    /* pointer registers are included in case client code was           */
+    /* compiled with the 'omit frame pointer' optimisation.             */
+#   define PUSH1(reg) GC_push_one((word)context.reg)
+#   define PUSH2(r1,r2) PUSH1(r1), PUSH1(r2)
+#   define PUSH4(r1,r2,r3,r4) PUSH2(r1,r2), PUSH2(r3,r4)
+#   if defined(I386)
+      PUSH4(Edi,Esi,Ebx,Edx), PUSH2(Ecx,Eax), PUSH1(Ebp);
+      sp = (ptr_t)context.Esp;
+#   elif defined(X86_64)
+      PUSH4(Rax,Rcx,Rdx,Rbx); PUSH2(Rbp, Rsi); PUSH1(Rdi);
+      PUSH4(R8, R9, R10, R11); PUSH4(R12, R13, R14, R15);
+      sp = (ptr_t)context.Rsp;
+#   elif defined(ARM32)
+      PUSH4(R0,R1,R2,R3),PUSH4(R4,R5,R6,R7),PUSH4(R8,R9,R10,R11);
+      PUSH1(R12);
+      sp = (ptr_t)context.Sp;
+#   elif defined(SHx)
+      PUSH4(R0,R1,R2,R3), PUSH4(R4,R5,R6,R7), PUSH4(R8,R9,R10,R11);
+      PUSH2(R12,R13), PUSH1(R14);
+      sp = (ptr_t)context.R15;
+#   elif defined(MIPS)
+      PUSH4(IntAt,IntV0,IntV1,IntA0), PUSH4(IntA1,IntA2,IntA3,IntT0);
+      PUSH4(IntT1,IntT2,IntT3,IntT4), PUSH4(IntT5,IntT6,IntT7,IntS0);
+      PUSH4(IntS1,IntS2,IntS3,IntS4), PUSH4(IntS5,IntS6,IntS7,IntT8);
+      PUSH4(IntT9,IntK0,IntK1,IntS8);
+      sp = (ptr_t)context.IntSp;
+#   elif defined(PPC)
+      PUSH4(Gpr0, Gpr3, Gpr4, Gpr5),  PUSH4(Gpr6, Gpr7, Gpr8, Gpr9);
+      PUSH4(Gpr10,Gpr11,Gpr12,Gpr14), PUSH4(Gpr15,Gpr16,Gpr17,Gpr18);
+      PUSH4(Gpr19,Gpr20,Gpr21,Gpr22), PUSH4(Gpr23,Gpr24,Gpr25,Gpr26);
+      PUSH4(Gpr27,Gpr28,Gpr29,Gpr30), PUSH1(Gpr31);
+      sp = (ptr_t)context.Gpr1;
+#   elif defined(ALPHA)
+      PUSH4(IntV0,IntT0,IntT1,IntT2), PUSH4(IntT3,IntT4,IntT5,IntT6);
+      PUSH4(IntT7,IntS0,IntS1,IntS2), PUSH4(IntS3,IntS4,IntS5,IntFp);
+      PUSH4(IntA0,IntA1,IntA2,IntA3), PUSH4(IntA4,IntA5,IntT8,IntT9);
+      PUSH4(IntT10,IntT11,IntT12,IntAt);
+      sp = (ptr_t)context.IntSp;
+#   else
+#     error "architecture is not supported"
+#   endif
+  } /* ! current thread */
+
+  /* Set stack_min to the lowest address in the thread stack,   */
+  /* or to an address in the thread stack no larger than sp,    */
+  /* taking advantage of the old value to avoid slow traversals */
+  /* of large stacks.                                           */
+  if (thread -> last_stack_min == ADDR_LIMIT) {
+#   ifdef MSWINCE
+      if (GC_dont_query_stack_min) {
+        stack_min = GC_wince_evaluate_stack_min(activation_frame != NULL ?
+                      (ptr_t)activation_frame : thread -> stack_base);
+        /* Keep last_stack_min value unmodified. */
+      } else
+#   endif
+    /* else */ {
+      stack_min = GC_get_stack_min(activation_frame != NULL ?
+                      (ptr_t)activation_frame : thread -> stack_base);
+      UNPROTECT_THREAD(thread);
+      thread -> last_stack_min = stack_min;
+    }
+  } else {
+    /* First, adjust the latest known minimum stack address if we       */
+    /* are inside GC_call_with_gc_active().                             */
+    if (activation_frame != NULL &&
+        thread -> last_stack_min > (ptr_t)activation_frame) {
+      UNPROTECT_THREAD(thread);
+      thread -> last_stack_min = (ptr_t)activation_frame;
+    }
 
-      if (sp >= stack_min && sp < thread->stack_base) {
-#       ifdef DEBUG_THREADS
-         GC_printf("Pushing stack for 0x%x from sp %p to %p from 0x%x\n",
-                   (int)thread -> id, sp, thread -> stack_base, (int)me);
-#       endif
-        GC_push_all_stack(sp, thread->stack_base);
+    if (sp < thread -> stack_base && sp >= thread -> last_stack_min) {
+      stack_min = sp;
+    } else {
+      /* In the current thread it is always safe to use sp value.       */
+      if (may_be_in_stack(thread -> id == me &&
+                          sp < thread -> last_stack_min ?
+                          sp : thread -> last_stack_min)) {
+        stack_min = last_info.BaseAddress;
+        /* Do not probe rest of the stack if sp is correct. */
+        if (sp < stack_min || sp >= thread->stack_base)
+          stack_min = GC_get_stack_min(thread -> last_stack_min);
       } else {
-       /* If not current thread then it is possible for sp to point to */
-       /* the guarded (untouched yet) page just below the current      */
-       /* stack_min of the thread.                                     */
-       if (thread -> id == me || sp >= thread->stack_base
-               || sp + GC_page_size < stack_min)
-         WARN("Thread stack pointer %p out of range, pushing everything\n",
-               sp);
-#       ifdef DEBUG_THREADS
-         GC_printf("Pushing stack for 0x%x from (min) %p to %p from 0x%x\n",
-                   (int)thread -> id, stack_min,
-                   thread -> stack_base, (int)me);
-#       endif
-        GC_push_all_stack(stack_min, thread->stack_base);
+        /* Stack shrunk?  Is this possible? */
+        stack_min = GC_get_stack_min(thread -> stack_base);
       }
-    } /* thread looks live */
+      UNPROTECT_THREAD(thread);
+      thread -> last_stack_min = stack_min;
+    }
+  }
+
+  GC_ASSERT(GC_dont_query_stack_min
+            || stack_min == GC_get_stack_min(thread -> stack_base)
+            || (sp >= stack_min && stack_min < thread -> stack_base
+                && stack_min > GC_get_stack_min(thread -> stack_base)));
+
+  if (sp >= stack_min && sp < thread->stack_base) {
+#   ifdef DEBUG_THREADS
+      GC_printf("Pushing stack for 0x%x from sp %p to %p from 0x%x\n",
+                (int)thread -> id, sp, thread -> stack_base, (int)me);
+#   endif
+    GC_push_all_stack_frames(sp, thread->stack_base, activation_frame);
+  } else {
+    /* If not current thread then it is possible for sp to point to     */
+    /* the guarded (untouched yet) page just below the current          */
+    /* stack_min of the thread.                                         */
+    if (thread -> id == me || sp >= thread->stack_base
+        || sp + GC_page_size < stack_min)
+      WARN("Thread stack pointer %p out of range, pushing everything\n",
+           sp);
+#   ifdef DEBUG_THREADS
+      GC_printf("Pushing stack for 0x%x from (min) %p to %p from 0x%x\n",
+                (int)thread -> id, stack_min,
+                thread -> stack_base, (int)me);
+#   endif
+    /* Push everything - ignore activation "frames" data.       */
+    GC_push_all_stack(stack_min, thread->stack_base);
+  }
+  return thread->stack_base - sp; /* stack grows down */
 }
 
-void GC_push_all_stacks(void)
+GC_INNER void GC_push_all_stacks(void)
 {
   DWORD me = GetCurrentThreadId();
   GC_bool found_me = FALSE;
 # ifndef SMALL_CONFIG
     unsigned nthreads = 0;
 # endif
-  
-  if (GC_win32_dll_threads) {
-    int i;
-    LONG my_max = GC_get_max_thread_index();
+  word total_size = 0;
+# ifndef GC_NO_DLLMAIN
+    if (GC_win32_dll_threads) {
+      int i;
+      LONG my_max = GC_get_max_thread_index();
 
-    for (i = 0; i <= my_max; i++) {
-      GC_thread t = (GC_thread)(dll_thread_table + i);
-      if (t -> in_use) {
-#      ifndef SMALL_CONFIG
-         ++nthreads;
-#      endif
-        GC_push_stack_for(t);
-        if (t -> id == me) found_me = TRUE;
+      for (i = 0; i <= my_max; i++) {
+        GC_thread t = (GC_thread)(dll_thread_table + i);
+        if (t -> tm.in_use && t -> stack_base) {
+#         ifndef SMALL_CONFIG
+            ++nthreads;
+#         endif
+          total_size += GC_push_stack_for(t, me);
+          if (t -> id == me) found_me = TRUE;
+        }
       }
-    }
-  } else {
-    GC_thread t;
+    } else
+# endif
+  /* else */ {
     int i;
-
     for (i = 0; i < THREAD_TABLE_SZ; i++) {
-      for (t = GC_threads[i]; t != 0; t = t -> next) {
-#      ifndef SMALL_CONFIG
-         ++nthreads;
-#      endif
-        if (!KNOWN_FINISHED(t)) GC_push_stack_for(t);
-        if (t -> id == me) found_me = TRUE;
+      GC_thread t;
+      for (t = GC_threads[i]; t != 0; t = t -> tm.next) {
+        if (!KNOWN_FINISHED(t) && t -> stack_base) {
+#         ifndef SMALL_CONFIG
+            ++nthreads;
+#         endif
+          total_size += GC_push_stack_for(t, me);
+          if (t -> id == me) found_me = TRUE;
+        }
       }
     }
   }
 # ifndef SMALL_CONFIG
     if (GC_print_stats == VERBOSE) {
       GC_log_printf("Pushed %d thread stacks%s\n", nthreads,
-            GC_win32_dll_threads ? " based on DllMain thread tracking" : "");
+            GC_win32_dll_threads ? " based on DllMain thread tracking" : "");
     }
 # endif
   if (!found_me && !GC_in_thread_creation)
     ABORT("Collecting from unknown thread.");
+  GC_total_stacksize = total_size;
 }
 
 #ifdef PARALLEL_MARK
@@ -1098,799 +1334,997 @@ void GC_push_all_stacks(void)
 #   define MAX_MARKERS 16
 # endif
 
-  extern long GC_markers;      /* Number of mark threads we would      */
-                               /* like to have.  Includes the          */
-                               /* initiating thread.                   */
-
-  STATIC ptr_t marker_sp[MAX_MARKERS - 1]; /* The cold end of the stack        */
-                                          /* for markers.              */
+  static ptr_t marker_sp[MAX_MARKERS - 1]; /* The cold end of the stack */
+                                           /* for markers.              */
 # ifdef IA64
-    STATIC ptr_t marker_bsp[MAX_MARKERS - 1];
+    static ptr_t marker_bsp[MAX_MARKERS - 1];
 # endif
 
-  STATIC ptr_t marker_last_stack_min[MAX_MARKERS - 1];
-                               /* Last known minimum (hottest) address */
-                               /* in stack (or ADDR_LIMIT if unset)    */
-                               /* for markers.                         */
+  static ptr_t marker_last_stack_min[MAX_MARKERS - 1];
+                                /* Last known minimum (hottest) address */
+                                /* in stack (or ADDR_LIMIT if unset)    */
+                                /* for markers.                         */
 
 #endif
 
-/* Find stack with the lowest address which overlaps the       */
-/* interval [start, limit).                                    */
-/* Return stack bounds in *lo and *hi.  If no such stack       */
-/* is found, both *hi and *lo will be set to an address        */
-/* higher than limit.                                          */
-void GC_get_next_stack(char *start, char *limit,
-                      char **lo, char **hi)
+/* Find stack with the lowest address which overlaps the        */
+/* interval [start, limit).                                     */
+/* Return stack bounds in *lo and *hi.  If no such stack        */
+/* is found, both *hi and *lo will be set to an address         */
+/* higher than limit.                                           */
+GC_INNER void GC_get_next_stack(char *start, char *limit,
+                                char **lo, char **hi)
 {
-    int i;
-    char * current_min = ADDR_LIMIT;  /* Least in-range stack base     */
-    ptr_t *plast_stack_min = NULL;    /* Address of last_stack_min     */
-                                     /* field for thread corresponding */
-                                     /* to current_min.                */
-    GC_thread thread = NULL;         /* Either NULL or points to the   */
-                                     /* thread's hash table entry      */
-                                     /* containing *plast_stack_min.   */
-
-    /* First set current_min, ignoring limit. */
-      if (GC_win32_dll_threads) {
-        LONG my_max = GC_get_max_thread_index();
-  
-        for (i = 0; i <= my_max; i++) {
-         ptr_t s = (ptr_t)(dll_thread_table[i].stack_base);
-
-         if (s > start && s < current_min) {
-           /* Update address of last_stack_min. */
-           plast_stack_min = (ptr_t * /* no volatile */)
-                               &dll_thread_table[i].last_stack_min;
-           current_min = s;
-         }
+  int i;
+  char * current_min = ADDR_LIMIT;  /* Least in-range stack base      */
+  ptr_t *plast_stack_min = NULL;    /* Address of last_stack_min      */
+                                    /* field for thread corresponding */
+                                    /* to current_min.                */
+  GC_thread thread = NULL;          /* Either NULL or points to the   */
+                                    /* thread's hash table entry      */
+                                    /* containing *plast_stack_min.   */
+
+  /* First set current_min, ignoring limit. */
+  if (GC_win32_dll_threads) {
+    LONG my_max = GC_get_max_thread_index();
+
+    for (i = 0; i <= my_max; i++) {
+      ptr_t s = (ptr_t)(dll_thread_table[i].stack_base);
+
+      if (s > start && s < current_min) {
+        /* Update address of last_stack_min. */
+        plast_stack_min = (ptr_t * /* no volatile */)
+                            &dll_thread_table[i].last_stack_min;
+        current_min = s;
+      }
+    }
+  } else {
+    for (i = 0; i < THREAD_TABLE_SZ; i++) {
+      GC_thread t;
+
+      for (t = GC_threads[i]; t != 0; t = t -> tm.next) {
+        ptr_t s = t -> stack_base;
+
+        if (s > start && s < current_min) {
+          /* Update address of last_stack_min. */
+          plast_stack_min = &t -> last_stack_min;
+          thread = t; /* Remember current thread to unprotect. */
+          current_min = s;
         }
-      } else {
-        for (i = 0; i < THREAD_TABLE_SZ; i++) {
-         GC_thread t;
-
-          for (t = GC_threads[i]; t != 0; t = t -> next) {
-           ptr_t s = t -> stack_base;
-
-           if (s > start && s < current_min) {
-             /* Update address of last_stack_min. */
-             plast_stack_min = &t -> last_stack_min;
-             thread = t; /* Remember current thread to unprotect. */
-             current_min = s;
-           }
-          }
+      }
+    }
+#   ifdef PARALLEL_MARK
+      for (i = 0; i < GC_markers - 1; ++i) {
+        ptr_t s = marker_sp[i];
+#       ifdef IA64
+          /* FIXME: not implemented */
+#       endif
+        if (s > start && s < current_min) {
+          GC_ASSERT(marker_last_stack_min[i] != NULL);
+          plast_stack_min = &marker_last_stack_min[i];
+          current_min = s;
+          thread = NULL; /* Not a thread's hash table entry. */
         }
-#      ifdef PARALLEL_MARK
-         for (i = 0; i < GC_markers - 1; ++i) {
-           ptr_t s = marker_sp[i];
-#          ifdef IA64
-               /* FIXME: not implemented */
-#          endif
-           if (s > start && s < current_min) {
-             GC_ASSERT(marker_last_stack_min[i] != NULL);
-             plast_stack_min = &marker_last_stack_min[i];
-             current_min = s;
-             thread = NULL; /* Not a thread's hash table entry. */
-           }
-         }
-#      endif
       }
+#   endif
+  }
+
+  *hi = current_min;
+  if (current_min == ADDR_LIMIT) {
+      *lo = ADDR_LIMIT;
+      return;
+  }
 
-    *hi = current_min;
-    if (current_min == ADDR_LIMIT) {
-       *lo = ADDR_LIMIT;
-       return;
+  GC_ASSERT(current_min > start);
+# ifdef MSWINCE
+    if (GC_dont_query_stack_min) {
+      *lo = GC_wince_evaluate_stack_min(current_min);
+      /* Keep last_stack_min value unmodified. */
+      return;
     }
+# endif
 
-    GC_ASSERT(current_min > start);
+  if (current_min > limit && !may_be_in_stack(limit)) {
+    /* Skip the rest since the memory region at limit address is        */
+    /* not a stack (so the lowest address of the found stack would      */
+    /* be above the limit value anyway).                                */
+    *lo = ADDR_LIMIT;
+    return;
+  }
 
-#   ifndef MSWINCE
-      if (current_min > limit && !GC_may_be_in_stack(limit)) {
-        /* Skip the rest since the memory region at limit address is    */
-       /* not a stack (so the lowest address of the found stack would  */
-       /* be above the limit value anyway).                            */
-        *lo = ADDR_LIMIT;
-        return;
-      }
-#   endif
-    
-    /* Get the minimum address of the found stack by probing its memory        */
-    /* region starting from the last known minimum (if set).           */
-      if (*plast_stack_min == ADDR_LIMIT
-#       ifndef MSWINCE
-          || !GC_may_be_in_stack(*plast_stack_min)
-#       endif
-         ) {
-        /* Unsafe to start from last value.    */
-        *lo = GC_get_stack_min(current_min);
-      } else {
-        /* Use last value value to optimize search for min address */
-       *lo = GC_get_stack_min(*plast_stack_min);
-      }
+  /* Get the minimum address of the found stack by probing its memory   */
+  /* region starting from the recent known minimum (if set).            */
+  if (*plast_stack_min == ADDR_LIMIT
+      || !may_be_in_stack(*plast_stack_min)) {
+    /* Unsafe to start from last_stack_min value. */
+    *lo = GC_get_stack_min(current_min);
+  } else {
+    /* Use the recent value to optimize search for min address. */
+    *lo = GC_get_stack_min(*plast_stack_min);
+  }
 
-    /* Remember current stack_min value. */
-      if (thread != NULL) {
-       UNPROTECT(thread);
-      }
-      *plast_stack_min = *lo;
+  /* Remember current stack_min value. */
+  if (thread != NULL) {
+    UNPROTECT_THREAD(thread);
+  }
+  *plast_stack_min = *lo;
 }
 
 #ifdef PARALLEL_MARK
 
-  /* GC_mark_thread() is the same as in pthread_support.c      */
-#ifdef GC_PTHREADS
-  STATIC void * GC_mark_thread(void * id)
-#else
-  STATIC unsigned __stdcall GC_mark_thread(void * id)
-#endif
-{
-  word my_mark_no = 0;
+# if defined(GC_PTHREADS) && !defined(GC_PTHREADS_PARAMARK)
+    /* Use pthread-based parallel mark implementation.    */
+#   define GC_PTHREADS_PARAMARK
+# endif
 
-  marker_sp[(word)id] = GC_approx_sp();
-# ifdef IA64
-    marker_bsp[(word)id] = GC_save_regs_in_stack();
+  /* GC_mark_thread() is the same as in pthread_support.c */
+# ifdef GC_PTHREADS_PARAMARK
+    STATIC void * GC_mark_thread(void * id)
+# else
+#   ifdef MSWINCE
+      STATIC DWORD WINAPI GC_mark_thread(LPVOID id)
+#   else
+      STATIC unsigned __stdcall GC_mark_thread(void * id)
+#   endif
 # endif
+  {
+    word my_mark_no = 0;
+
+    marker_sp[(word)id] = GC_approx_sp();
+#   ifdef IA64
+      marker_bsp[(word)id] = GC_save_regs_in_stack();
+#   endif
 
-  if ((word)id == (word)-1) return 0; /* to make compiler happy */
+    if ((word)id == (word)-1) return 0; /* to make compiler happy */
 
-  for (;; ++my_mark_no) {
-    if (my_mark_no - GC_mark_no > (word)2) {
-       /* resynchronize if we get far off, e.g. because GC_mark_no     */
-       /* wrapped.                                                     */
-       my_mark_no = GC_mark_no;
+    for (;; ++my_mark_no) {
+      if (my_mark_no - GC_mark_no > (word)2) {
+        /* resynchronize if we get far off, e.g. because GC_mark_no     */
+        /* wrapped.                                                     */
+        my_mark_no = GC_mark_no;
+      }
+#     ifdef DEBUG_THREADS
+        GC_printf("Starting mark helper for mark number %lu\n",
+                  (unsigned long)my_mark_no);
+#     endif
+      GC_help_marker(my_mark_no);
     }
-#   ifdef DEBUG_THREADS
-       GC_printf("Starting mark helper for mark number %lu\n",
-               (unsigned long)my_mark_no);
-#   endif
-    GC_help_marker(my_mark_no);
   }
-}
 
-#ifdef GC_ASSERTIONS
-  unsigned long GC_mark_lock_holder = NO_THREAD;
-#endif
+# ifdef GC_ASSERTIONS
+    GC_INNER unsigned long GC_mark_lock_holder = NO_THREAD;
+# endif
 
-/* GC_mark_threads[] is unused here unlike that in pthread_support.c */
+  /* GC_mark_threads[] is unused here unlike that in pthread_support.c  */
 
-#ifdef GC_PTHREADS
+# ifdef GC_PTHREADS_PARAMARK
+#   include <pthread.h>
 
-/* start_mark_threads() is the same as in pthread_support.c except for:        */
-/* - GC_markers value is adjusted already;                             */
-/* - thread stack is assumed to be large enough; and                   */
-/* - statistics about the number of marker threads is already printed. */
+#   ifndef NUMERIC_THREAD_ID
+#     define NUMERIC_THREAD_ID(id) (unsigned long)(id.p)
+#   endif
 
-STATIC void start_mark_threads(void)
-{
-    unsigned i;
-    pthread_attr_t attr;
-    pthread_t new_thread;
-
-    if (0 != pthread_attr_init(&attr)) ABORT("pthread_attr_init failed");
-       
-    if (0 != pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED))
-       ABORT("pthread_attr_setdetachstate failed");
-
-    for (i = 0; i < GC_markers - 1; ++i) {
-      marker_last_stack_min[i] = ADDR_LIMIT;
-      if (0 != pthread_create(&new_thread, &attr,
-                             GC_mark_thread, (void *)(word)i)) {
-       WARN("Marker thread creation failed, errno = %ld.\n",
-               /* (word) */ errno);
+    /* start_mark_threads() is the same as in pthread_support.c except for: */
+    /* - GC_markers value is adjusted already;                              */
+    /* - thread stack is assumed to be large enough; and                    */
+    /* - statistics about the number of marker threads is printed outside.  */
+    static void start_mark_threads(void)
+    {
+      int i;
+      pthread_attr_t attr;
+      pthread_t new_thread;
+
+      if (0 != pthread_attr_init(&attr)) ABORT("pthread_attr_init failed");
+
+      if (0 != pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED))
+        ABORT("pthread_attr_setdetachstate failed");
+
+      for (i = 0; i < GC_markers - 1; ++i) {
+        marker_last_stack_min[i] = ADDR_LIMIT;
+        if (0 != pthread_create(&new_thread, &attr,
+                                GC_mark_thread, (void *)(word)i)) {
+          WARN("Marker thread creation failed.\n", 0);
+          /* Don't try to create other marker threads.    */
+          GC_markers = i + 1;
+          if (i == 0) GC_parallel = FALSE;
+          break;
+        }
       }
+      pthread_attr_destroy(&attr);
     }
-    pthread_attr_destroy(&attr);
-}
-
-STATIC pthread_mutex_t mark_mutex = PTHREAD_MUTEX_INITIALIZER;
 
-STATIC pthread_cond_t builder_cv = PTHREAD_COND_INITIALIZER;
+    static pthread_mutex_t mark_mutex = PTHREAD_MUTEX_INITIALIZER;
 
-/* GC_acquire/release_mark_lock(), GC_wait_builder/marker(),           */
-/* GC_wait_for_reclaim(), GC_notify_all_builder/marker() are the same  */
-/* as in pthread_support.c except that GC_generic_lock() is not used.  */
+    static pthread_cond_t builder_cv = PTHREAD_COND_INITIALIZER;
 
-#ifdef LOCK_STATS
-  AO_t GC_block_count = 0;
-#endif
+    /* GC_acquire/release_mark_lock(), GC_wait_builder/marker(),          */
+    /* GC_wait_for_reclaim(), GC_notify_all_builder/marker() are the same */
+    /* as in pthread_support.c except that GC_generic_lock() is not used. */
 
-void GC_acquire_mark_lock(void)
-{
-    if (pthread_mutex_lock(&mark_mutex) != 0) {
-       ABORT("pthread_mutex_lock failed");
-    }
 #   ifdef LOCK_STATS
-       (void)AO_fetch_and_add1(&GC_block_count);
-#   endif
-    /* GC_generic_lock(&mark_mutex); */
-#   ifdef GC_ASSERTIONS
-       GC_mark_lock_holder = NUMERIC_THREAD_ID(pthread_self());
+      AO_t GC_block_count = 0;
 #   endif
-}
 
-void GC_release_mark_lock(void)
-{
-    GC_ASSERT(GC_mark_lock_holder == NUMERIC_THREAD_ID(pthread_self()));
-#   ifdef GC_ASSERTIONS
-       GC_mark_lock_holder = NO_THREAD;
-#   endif
-    if (pthread_mutex_unlock(&mark_mutex) != 0) {
-       ABORT("pthread_mutex_unlock failed");
+    GC_INNER void GC_acquire_mark_lock(void)
+    {
+      if (pthread_mutex_lock(&mark_mutex) != 0) {
+        ABORT("pthread_mutex_lock failed");
+      }
+#     ifdef LOCK_STATS
+        (void)AO_fetch_and_add1(&GC_block_count);
+#     endif
+      /* GC_generic_lock(&mark_mutex); */
+#     ifdef GC_ASSERTIONS
+        GC_mark_lock_holder = NUMERIC_THREAD_ID(pthread_self());
+#     endif
     }
-}
 
-/* Collector must wait for a freelist builders for 2 reasons:          */
-/* 1) Mark bits may still be getting examined without lock.            */
-/* 2) Partial free lists referenced only by locals may not be scanned  */
-/*    correctly, e.g. if they contain "pointer-free" objects, since the        */
-/*    free-list link may be ignored.                                   */
-/* STATIC */ void GC_wait_builder(void)
-{
-    GC_ASSERT(GC_mark_lock_holder == NUMERIC_THREAD_ID(pthread_self()));
-#   ifdef GC_ASSERTIONS
-       GC_mark_lock_holder = NO_THREAD;
-#   endif
-    if (pthread_cond_wait(&builder_cv, &mark_mutex) != 0) {
-       ABORT("pthread_cond_wait failed");
+    GC_INNER void GC_release_mark_lock(void)
+    {
+      GC_ASSERT(GC_mark_lock_holder == NUMERIC_THREAD_ID(pthread_self()));
+#     ifdef GC_ASSERTIONS
+        GC_mark_lock_holder = NO_THREAD;
+#     endif
+      if (pthread_mutex_unlock(&mark_mutex) != 0) {
+        ABORT("pthread_mutex_unlock failed");
+      }
     }
-    GC_ASSERT(GC_mark_lock_holder == NO_THREAD);
-#   ifdef GC_ASSERTIONS
-       GC_mark_lock_holder = NUMERIC_THREAD_ID(pthread_self());
-#   endif
-}
 
-void GC_wait_for_reclaim(void)
-{
-    GC_acquire_mark_lock();
-    while (GC_fl_builder_count > 0) {
-       GC_wait_builder();
+    /* Collector must wait for a freelist builders for 2 reasons:       */
+    /* 1) Mark bits may still be getting examined without lock.         */
+    /* 2) Partial free lists referenced only by locals may not be       */
+    /* scanned correctly, e.g. if they contain "pointer-free" objects,  */
+    /* since the free-list link may be ignored.                         */
+    STATIC void GC_wait_builder(void)
+    {
+      GC_ASSERT(GC_mark_lock_holder == NUMERIC_THREAD_ID(pthread_self()));
+#     ifdef GC_ASSERTIONS
+        GC_mark_lock_holder = NO_THREAD;
+#     endif
+      if (pthread_cond_wait(&builder_cv, &mark_mutex) != 0) {
+        ABORT("pthread_cond_wait failed");
+      }
+      GC_ASSERT(GC_mark_lock_holder == NO_THREAD);
+#     ifdef GC_ASSERTIONS
+        GC_mark_lock_holder = NUMERIC_THREAD_ID(pthread_self());
+#     endif
     }
-    GC_release_mark_lock();
-}
 
-void GC_notify_all_builder(void)
-{
-    GC_ASSERT(GC_mark_lock_holder == NUMERIC_THREAD_ID(pthread_self()));
-    if (pthread_cond_broadcast(&builder_cv) != 0) {
-       ABORT("pthread_cond_broadcast failed");
+    GC_INNER void GC_wait_for_reclaim(void)
+    {
+      GC_acquire_mark_lock();
+      while (GC_fl_builder_count > 0) {
+        GC_wait_builder();
+      }
+      GC_release_mark_lock();
+    }
+
+    GC_INNER void GC_notify_all_builder(void)
+    {
+      GC_ASSERT(GC_mark_lock_holder == NUMERIC_THREAD_ID(pthread_self()));
+      if (pthread_cond_broadcast(&builder_cv) != 0) {
+        ABORT("pthread_cond_broadcast failed");
+      }
     }
-}
 
-STATIC pthread_cond_t mark_cv = PTHREAD_COND_INITIALIZER;
+    static pthread_cond_t mark_cv = PTHREAD_COND_INITIALIZER;
 
-void GC_wait_marker(void)
-{
-    GC_ASSERT(GC_mark_lock_holder == NUMERIC_THREAD_ID(pthread_self()));
-#   ifdef GC_ASSERTIONS
-       GC_mark_lock_holder = NO_THREAD;
-#   endif
-    if (pthread_cond_wait(&mark_cv, &mark_mutex) != 0) {
-       ABORT("pthread_cond_wait failed");
+    GC_INNER void GC_wait_marker(void)
+    {
+      GC_ASSERT(GC_mark_lock_holder == NUMERIC_THREAD_ID(pthread_self()));
+#     ifdef GC_ASSERTIONS
+        GC_mark_lock_holder = NO_THREAD;
+#     endif
+      if (pthread_cond_wait(&mark_cv, &mark_mutex) != 0) {
+        ABORT("pthread_cond_wait failed");
+      }
+      GC_ASSERT(GC_mark_lock_holder == NO_THREAD);
+#     ifdef GC_ASSERTIONS
+        GC_mark_lock_holder = NUMERIC_THREAD_ID(pthread_self());
+#     endif
     }
-    GC_ASSERT(GC_mark_lock_holder == NO_THREAD);
-#   ifdef GC_ASSERTIONS
-       GC_mark_lock_holder = NUMERIC_THREAD_ID(pthread_self());
-#   endif
-}
 
-void GC_notify_all_marker(void)
-{
-    if (pthread_cond_broadcast(&mark_cv) != 0) {
-       ABORT("pthread_cond_broadcast failed");
+    GC_INNER void GC_notify_all_marker(void)
+    {
+      if (pthread_cond_broadcast(&mark_cv) != 0) {
+        ABORT("pthread_cond_broadcast failed");
+      }
     }
-}
 
-#else /* ! GC_PTHREADS */
+# else /* ! GC_PTHREADS_PARAMARK */
 
-STATIC void start_mark_threads(void)
-{
-      int i;
-      GC_uintptr_t handle;
-      unsigned thread_id;
+#   ifdef DONT_USE_SIGNALANDWAIT
+      STATIC HANDLE GC_marker_cv[MAX_MARKERS - 1] = {0};
+                        /* Events with manual reset (one for each       */
+                        /* mark helper).                                */
 
-      for (i = 0; i < GC_markers - 1; ++i) {
-       marker_last_stack_min[i] = ADDR_LIMIT;
-       handle = _beginthreadex(NULL /* security_attr */, 0 /* stack_size */,
-                       GC_mark_thread, (void *)(word)i, 0 /* flags */,
-                       &thread_id);
-       if (!handle || handle == (GC_uintptr_t)-1L)
-         WARN("Marker thread creation failed\n", 0);
-       else { /* We may detach the thread (if handle is of HANDLE type) */
-         /* CloseHandle((HANDLE)handle); */
-       }
-      }
-}
+      STATIC DWORD GC_marker_Id[MAX_MARKERS - 1] = {0};
+                        /* This table is used for mapping helper        */
+                        /* threads ID to mark helper index (linear      */
+                        /* search is used since the mapping contains    */
+                        /* only a few entries).                         */
+#   endif
 
-STATIC HANDLE mark_mutex_event = (HANDLE)0; /* Event with auto-reset. */
-volatile AO_t GC_mark_mutex_waitcnt = 0;       /* Number of waiters + 1; */
-                                               /* 0 - unlocked. */
+#   ifndef MARK_THREAD_STACK_SIZE
+#     define MARK_THREAD_STACK_SIZE 0   /* default value */
+#   endif
 
-STATIC HANDLE builder_cv = (HANDLE)0; /* Event with manual reset */
+    /* mark_mutex_event, builder_cv, mark_cv are initialized in GC_thr_init */
+    static HANDLE mark_mutex_event = (HANDLE)0; /* Event with auto-reset.   */
+    static HANDLE builder_cv = (HANDLE)0; /* Event with manual reset.       */
+    static HANDLE mark_cv = (HANDLE)0; /* Event with manual reset.          */
 
-/* mark_mutex_event, builder_cv, mark_cv are initialized in GC_thr_init(). */
+    static void start_mark_threads(void)
+    {
+      int i;
+#     ifdef MSWINCE
+        HANDLE handle;
+        DWORD thread_id;
+#     else
+        GC_uintptr_t handle;
+        unsigned thread_id;
+#     endif
 
-/* #define LOCK_STATS */
-#ifdef LOCK_STATS
-  AO_t GC_block_count = 0;
-  AO_t GC_unlocked_count = 0;
-#endif
+#     ifdef DONT_USE_SIGNALANDWAIT
+        /* Initialize GC_marker_cv[] and GC_marker_Id[] fully before    */
+        /* starting the first helper thread.                            */
+        for (i = 0; i < GC_markers - 1; ++i) {
+          GC_marker_Id[i] = GetCurrentThreadId();
+          if ((GC_marker_cv[i] = CreateEvent(NULL /* attrs */,
+                                        TRUE /* isManualReset */,
+                                        FALSE /* initialState */,
+                                        NULL /* name (A/W) */)) == (HANDLE)0)
+            ABORT("CreateEvent() failed");
+        }
+#     endif
 
-void GC_acquire_mark_lock(void)
-{
-    if (AO_fetch_and_add1_acquire(&GC_mark_mutex_waitcnt) != 0) {
-#      ifdef LOCK_STATS
-          (void)AO_fetch_and_add1(&GC_block_count);
-#      endif
-        if (WaitForSingleObject(mark_mutex_event, INFINITE) == WAIT_FAILED)
-          ABORT("WaitForSingleObject() failed");
+      for (i = 0; i < GC_markers - 1; ++i) {
+        marker_last_stack_min[i] = ADDR_LIMIT;
+#       ifdef MSWINCE
+          /* There is no _beginthreadex() in WinCE. */
+          handle = CreateThread(NULL /* lpsa */,
+                                MARK_THREAD_STACK_SIZE /* ignored */,
+                                GC_mark_thread, (LPVOID)(word)i,
+                                0 /* fdwCreate */, &thread_id);
+          if (handle == NULL) {
+            WARN("Marker thread creation failed\n", 0);
+            /* The most probable failure reason is "not enough memory". */
+            /* Don't try to create other marker threads.                */
+            break;
+          } else {
+            /* It's safe to detach the thread.  */
+            CloseHandle(handle);
+          }
+#       else
+          handle = _beginthreadex(NULL /* security_attr */,
+                                MARK_THREAD_STACK_SIZE, GC_mark_thread,
+                                (void *)(word)i, 0 /* flags */, &thread_id);
+          if (!handle || handle == (GC_uintptr_t)-1L) {
+            WARN("Marker thread creation failed\n", 0);
+            /* Don't try to create other marker threads.                */
+            break;
+          } else {/* We may detach the thread (if handle is of HANDLE type) */
+            /* CloseHandle((HANDLE)handle); */
+          }
+#       endif
+      }
+
+      /* Adjust GC_markers (and free unused resources) in case of failure. */
+#     ifdef DONT_USE_SIGNALANDWAIT
+        while ((int)GC_markers > i + 1) {
+          GC_markers--;
+          CloseHandle(GC_marker_cv[(int)GC_markers - 1]);
+        }
+#     else
+        GC_markers = i + 1;
+#     endif
+      if (i == 0) {
+        GC_parallel = FALSE;
+        CloseHandle(mark_cv);
+        CloseHandle(builder_cv);
+        CloseHandle(mark_mutex_event);
+      }
     }
-#   ifdef LOCK_STATS
-        else {
-         (void)AO_fetch_and_add1(&GC_unlocked_count);
-       }
-#   endif
-  
-    GC_ASSERT(GC_mark_lock_holder == NO_THREAD);
-#   ifdef GC_ASSERTIONS
-       GC_mark_lock_holder = (unsigned long)GetCurrentThreadId();
+
+#   ifdef DONT_USE_SIGNALANDWAIT
+      STATIC /* volatile */ LONG GC_mark_mutex_state = 0;
+                                /* Mutex state: 0 - unlocked,           */
+                                /* 1 - locked and no other waiters,     */
+                                /* -1 - locked and waiters may exist.   */
+                                /* Accessed by InterlockedExchange().   */
+#   else
+      STATIC volatile AO_t GC_mark_mutex_waitcnt = 0;
+                                /* Number of waiters + 1; 0 - unlocked. */
 #   endif
-}
 
-void GC_release_mark_lock(void)
-{
-    GC_ASSERT(GC_mark_lock_holder == (unsigned long)GetCurrentThreadId());
-#   ifdef GC_ASSERTIONS
-       GC_mark_lock_holder = NO_THREAD;
+    /* #define LOCK_STATS */
+#   ifdef LOCK_STATS
+      AO_t GC_block_count = 0;
+      AO_t GC_unlocked_count = 0;
 #   endif
-    GC_ASSERT(AO_load(&GC_mark_mutex_waitcnt) != 0);
-    if (AO_fetch_and_sub1_release(&GC_mark_mutex_waitcnt) > 1 &&
-        SetEvent(mark_mutex_event) == FALSE)
-       ABORT("SetEvent() failed");
-}
 
-/* In GC_wait_for_reclaim/GC_notify_all_builder() we emulate POSIX     */
-/* cond_wait/cond_broadcast() primitives with WinAPI Event object      */
-/* (working in "manual reset" mode).  This works here because          */
-/* GC_notify_all_builder() is always called holding lock on            */
-/* mark_mutex and the checked condition (GC_fl_builder_count == 0)     */
-/* is the only one for which broadcasting on builder_cv is performed.  */
+    GC_INNER void GC_acquire_mark_lock(void)
+    {
+#     ifdef DONT_USE_SIGNALANDWAIT
+        if (InterlockedExchange(&GC_mark_mutex_state, 1 /* locked */) != 0)
+#     else
+        if (AO_fetch_and_add1_acquire(&GC_mark_mutex_waitcnt) != 0)
+#     endif
+      {
+#       ifdef LOCK_STATS
+          (void)AO_fetch_and_add1(&GC_block_count);
+#       endif
+#       ifdef DONT_USE_SIGNALANDWAIT
+          /* Repeatedly reset the state and wait until acquire the lock. */
+          while (InterlockedExchange(&GC_mark_mutex_state,
+                                     -1 /* locked_and_has_waiters */) != 0)
+#       endif
+        {
+          if (WaitForSingleObject(mark_mutex_event, INFINITE) == WAIT_FAILED)
+            ABORT("WaitForSingleObject() failed");
+        }
+      }
+#     ifdef LOCK_STATS
+        else {
+          (void)AO_fetch_and_add1(&GC_unlocked_count);
+        }
+#     endif
 
-void GC_wait_for_reclaim(void)
-{
-    GC_ASSERT(builder_cv != 0);
-    for (;;) {
-       GC_acquire_mark_lock();
-       if (GC_fl_builder_count == 0)
-           break;
-       if (ResetEvent(builder_cv) == FALSE)
-           ABORT("ResetEvent() failed");
-       GC_release_mark_lock();
-       if (WaitForSingleObject(builder_cv, INFINITE) == WAIT_FAILED)
-           ABORT("WaitForSingleObject() failed");
+      GC_ASSERT(GC_mark_lock_holder == NO_THREAD);
+#     ifdef GC_ASSERTIONS
+        GC_mark_lock_holder = (unsigned long)GetCurrentThreadId();
+#     endif
     }
-    GC_release_mark_lock();
-}
 
-void GC_notify_all_builder(void)
-{
-    GC_ASSERT(GC_mark_lock_holder == (unsigned long)GetCurrentThreadId());
-    GC_ASSERT(builder_cv != 0);
-    GC_ASSERT(GC_fl_builder_count == 0);
-    if (SetEvent(builder_cv) == FALSE)
-       ABORT("SetEvent() failed");
-}
-
-/* For GC_wait_marker/GC_notify_all_marker() the above technique does  */
-/* not work because they are used with different checked conditions in */
-/* different places (and, in addition, notifying is done after leaving */
-/* critical section) and this could result in a signal loosing between */
-/* checking for a particular condition and calling WaitForSingleObject.        */
-/* So, we use PulseEvent() and NT SignalObjectAndWait() (which         */
-/* atomically sets mutex event to signaled state and starts waiting on */
-/* condvar). A special case here is GC_mark_mutex_waitcnt == 1 (i.e.   */
-/* nobody waits for mark lock at this moment) - we don't change it     */
-/* (otherwise we may loose a signal sent between decrementing          */
-/* GC_mark_mutex_waitcnt and calling WaitForSingleObject()).           */
-
-STATIC HANDLE mark_cv = (HANDLE)0; /* Event with manual reset */
-
-typedef DWORD (WINAPI * SignalObjectAndWait_type)(
-               HANDLE, HANDLE, DWORD, BOOL);
-STATIC SignalObjectAndWait_type signalObjectAndWait_func = 0;
-
-void GC_wait_marker(void)
-{
-    /* Here we assume that GC_wait_marker() is always called   */
-    /* from a while(check_cond) loop.                          */
-    AO_t waitcnt;
-    GC_ASSERT(mark_cv != 0);
-    GC_ASSERT(signalObjectAndWait_func != 0);
-
-    /* We inline GC_release_mark_lock() to have atomic         */
-    /* unlock-and-wait action here.                            */
-    GC_ASSERT(GC_mark_lock_holder == (unsigned long)GetCurrentThreadId());
-#   ifdef GC_ASSERTIONS
-       GC_mark_lock_holder = NO_THREAD;
-#   endif
-    
-    if ((waitcnt = AO_load(&GC_mark_mutex_waitcnt)) > 1) {
-       (void)AO_fetch_and_sub1_release(&GC_mark_mutex_waitcnt);
-    } else {
-       GC_ASSERT(AO_load(&GC_mark_mutex_waitcnt) != 0);
+    GC_INNER void GC_release_mark_lock(void)
+    {
+      GC_ASSERT(GC_mark_lock_holder == (unsigned long)GetCurrentThreadId());
+#     ifdef GC_ASSERTIONS
+        GC_mark_lock_holder = NO_THREAD;
+#     endif
+#     ifdef DONT_USE_SIGNALANDWAIT
+        if (InterlockedExchange(&GC_mark_mutex_state, 0 /* unlocked */) < 0)
+#     else
+        GC_ASSERT(AO_load(&GC_mark_mutex_waitcnt) != 0);
+        if (AO_fetch_and_sub1_release(&GC_mark_mutex_waitcnt) > 1)
+#     endif
+        {
+          /* wake a waiter */
+          if (SetEvent(mark_mutex_event) == FALSE)
+            ABORT("SetEvent() failed");
+        }
     }
 
-    /* The state of mark_cv is non-signaled here. */
-    if ((*signalObjectAndWait_func)(mark_mutex_event /* hObjectToSignal */,
-                               mark_cv /* hObjectToWaitOn */,
-                               INFINITE /* timeout */,
-                               FALSE /* isAlertable */) == WAIT_FAILED)
-       ABORT("SignalObjectAndWait() failed");
-    /* The state of mark_cv is non-signaled here again. */
+    /* In GC_wait_for_reclaim/GC_notify_all_builder() we emulate POSIX    */
+    /* cond_wait/cond_broadcast() primitives with WinAPI Event object     */
+    /* (working in "manual reset" mode).  This works here because         */
+    /* GC_notify_all_builder() is always called holding lock on           */
+    /* mark_mutex and the checked condition (GC_fl_builder_count == 0)    */
+    /* is the only one for which broadcasting on builder_cv is performed. */
 
-    if (waitcnt > 1) {
-       GC_acquire_mark_lock();
-    } else {
-       GC_ASSERT(GC_mark_mutex_waitcnt != 0);
-       /* Acquire mark lock */
-       if (WaitForSingleObject(mark_mutex_event, INFINITE) == WAIT_FAILED)
-           ABORT("WaitForSingleObject() failed");
-       GC_ASSERT(GC_mark_lock_holder == NO_THREAD);
-#      ifdef GC_ASSERTIONS
-           GC_mark_lock_holder = (unsigned long)GetCurrentThreadId();
-#      endif
+    GC_INNER void GC_wait_for_reclaim(void)
+    {
+      GC_ASSERT(builder_cv != 0);
+      for (;;) {
+        GC_acquire_mark_lock();
+        if (GC_fl_builder_count == 0)
+          break;
+        if (ResetEvent(builder_cv) == FALSE)
+          ABORT("ResetEvent() failed");
+        GC_release_mark_lock();
+        if (WaitForSingleObject(builder_cv, INFINITE) == WAIT_FAILED)
+          ABORT("WaitForSingleObject() failed");
+      }
+      GC_release_mark_lock();
     }
-}
 
-void GC_notify_all_marker(void)
-{
-    GC_ASSERT(mark_cv != 0);
-    if (PulseEvent(mark_cv) == FALSE)
-       ABORT("PulseEvent() failed");
-}
+    GC_INNER void GC_notify_all_builder(void)
+    {
+      GC_ASSERT(GC_mark_lock_holder == (unsigned long)GetCurrentThreadId());
+      GC_ASSERT(builder_cv != 0);
+      GC_ASSERT(GC_fl_builder_count == 0);
+      if (SetEvent(builder_cv) == FALSE)
+        ABORT("SetEvent() failed");
+    }
+
+#   ifdef DONT_USE_SIGNALANDWAIT
+
+      /* mark_cv is used (for waiting) by a non-helper thread.  */
+
+      GC_INNER void GC_wait_marker(void)
+      {
+        HANDLE event = mark_cv;
+        DWORD id = GetCurrentThreadId();
+        int i = (int)GC_markers - 1;
+        while (i-- > 0) {
+          if (GC_marker_Id[i] == id) {
+            event = GC_marker_cv[i];
+            break;
+          }
+        }
+
+        if (ResetEvent(event) == FALSE)
+          ABORT("ResetEvent() failed");
+        GC_release_mark_lock();
+        if (WaitForSingleObject(event, INFINITE) == WAIT_FAILED)
+          ABORT("WaitForSingleObject() failed");
+        GC_acquire_mark_lock();
+      }
+
+      GC_INNER void GC_notify_all_marker(void)
+      {
+        DWORD id = GetCurrentThreadId();
+        int i = (int)GC_markers - 1;
+        while (i-- > 0) {
+          /* Notify every marker ignoring self (for efficiency).  */
+          if (SetEvent(GC_marker_Id[i] != id ? GC_marker_cv[i] :
+                       mark_cv) == FALSE)
+            ABORT("SetEvent() failed");
+        }
+      }
+
+#   else /* DONT_USE_SIGNALANDWAIT */
+
+      /* For GC_wait_marker/GC_notify_all_marker() the above technique  */
+      /* does not work because they are used with different checked     */
+      /* conditions in different places (and, in addition, notifying is */
+      /* done after leaving critical section) and this could result in  */
+      /* a signal loosing between checking for a particular condition   */
+      /* and calling WaitForSingleObject.  So, we use PulseEvent() and  */
+      /* NT SignalObjectAndWait() (which atomically sets mutex event to */
+      /* signaled state and starts waiting on condvar).  A special      */
+      /* case here is GC_mark_mutex_waitcnt == 1 (i.e. nobody waits for */
+      /* mark lock at this moment) - we don't change it (otherwise we   */
+      /* may loose a signal sent between decrementing                   */
+      /* GC_mark_mutex_waitcnt and calling WaitForSingleObject()).      */
+
+#     ifdef MSWINCE
+        /* SignalObjectAndWait() is missing in WinCE (for now), so you  */
+        /* should supply its emulation (externally) to use this code.   */
+        WINBASEAPI DWORD WINAPI SignalObjectAndWait(HANDLE, HANDLE, DWORD,
+                                                    BOOL);
+#       define signalObjectAndWait_func SignalObjectAndWait
+#     else
+        typedef DWORD (WINAPI * SignalObjectAndWait_type)(HANDLE, HANDLE,
+                                                          DWORD, BOOL);
+        static SignalObjectAndWait_type signalObjectAndWait_func = 0;
+#     endif
+
+      GC_INNER void GC_wait_marker(void)
+      {
+        /* Here we assume that GC_wait_marker() is always called        */
+        /* from a while(check_cond) loop.                               */
+        AO_t waitcnt;
+        GC_ASSERT(mark_cv != 0);
+
+        /* We inline GC_release_mark_lock() to have atomic              */
+        /* unlock-and-wait action here.                                 */
+        GC_ASSERT(GC_mark_lock_holder == (unsigned long)GetCurrentThreadId());
+#       ifdef GC_ASSERTIONS
+          GC_mark_lock_holder = NO_THREAD;
+#       endif
+
+        if ((waitcnt = AO_load(&GC_mark_mutex_waitcnt)) > 1) {
+          (void)AO_fetch_and_sub1_release(&GC_mark_mutex_waitcnt);
+        } else {
+          GC_ASSERT(AO_load(&GC_mark_mutex_waitcnt) != 0);
+        }
+
+        /* The state of mark_cv is non-signaled here. */
+        if (signalObjectAndWait_func(mark_mutex_event /* hObjectToSignal */,
+                                     mark_cv /* hObjectToWaitOn */,
+                                     INFINITE /* timeout */,
+                                     FALSE /* isAlertable */) == WAIT_FAILED)
+          ABORT("SignalObjectAndWait() failed");
+        /* The state of mark_cv is non-signaled here again. */
+
+        if (waitcnt > 1) {
+          GC_acquire_mark_lock();
+        } else {
+          GC_ASSERT(GC_mark_mutex_waitcnt != 0);
+          /* Acquire mark lock */
+          if (WaitForSingleObject(mark_mutex_event, INFINITE) == WAIT_FAILED)
+            ABORT("WaitForSingleObject() failed");
+          GC_ASSERT(GC_mark_lock_holder == NO_THREAD);
+#         ifdef GC_ASSERTIONS
+            GC_mark_lock_holder = (unsigned long)GetCurrentThreadId();
+#         endif
+        }
+      }
 
-/* Defined in os_dep.c */
-extern GC_bool GC_wnt;
+      GC_INNER void GC_notify_all_marker(void)
+      {
+        GC_ASSERT(mark_cv != 0);
+        if (PulseEvent(mark_cv) == FALSE)
+          ABORT("PulseEvent() failed");
+      }
 
-#endif /* ! GC_PTHREADS */
+#   endif /* !DONT_USE_SIGNALANDWAIT */
+
+# endif /* ! GC_PTHREADS_PARAMARK */
 
 #endif /* PARALLEL_MARK */
 
 #ifndef GC_PTHREADS
 
-/* We have no DllMain to take care of new threads.  Thus we    */
-/* must properly intercept thread creation.                    */
+  /* We have no DllMain to take care of new threads.  Thus we   */
+  /* must properly intercept thread creation.                   */
 
-typedef struct {
+  typedef struct {
     LPTHREAD_START_ROUTINE start;
     LPVOID param;
-} thread_args;
+  } thread_args;
 
-STATIC void * GC_CALLBACK GC_win32_start_inner(struct GC_stack_base *sb,
-                                               void *arg)
-{
+  STATIC void * GC_CALLBACK GC_win32_start_inner(struct GC_stack_base *sb,
+                                                 void *arg)
+  {
     void * ret;
-    thread_args *args = (thread_args *)arg;
+    LPTHREAD_START_ROUTINE start = ((thread_args *)arg)->start;
+    LPVOID param = ((thread_args *)arg)->param;
 
-    GC_register_my_thread(sb); /* This waits for an in-progress GC. */
+    GC_register_my_thread(sb); /* This waits for an in-progress GC.     */
 
 #   if DEBUG_WIN32_THREADS
       GC_printf("thread 0x%x starting...\n", (unsigned)GetCurrentThreadId());
 #   endif
 
-    /* Clear the thread entry even if we exit with an exception.       */
-    /* This is probably pointless, since an uncaught exception is      */
-    /* supposed to result in the process being killed.                 */
-#ifndef __GNUC__
-    __try {
-#endif /* __GNUC__ */
-       ret = (void *)(word)args->start (args->param);
-#ifndef __GNUC__
-    } __finally {
-#endif /* __GNUC__ */
-       GC_unregister_my_thread();
-       GC_free(args);
-#ifndef __GNUC__
+    GC_free(arg);
+
+    /* Clear the thread entry even if we exit with an exception.        */
+    /* This is probably pointless, since an uncaught exception is       */
+    /* supposed to result in the process being killed.                  */
+#   ifndef __GNUC__
+      __try
+#   endif
+    {
+      ret = (void *)(word)(*start)(param);
+    }
+#   ifndef __GNUC__
+      __finally
+#   endif
+    {
+      GC_unregister_my_thread();
     }
-#endif /* __GNUC__ */
 
 #   if DEBUG_WIN32_THREADS
       GC_printf("thread 0x%x returned from start routine.\n",
-               (unsigned)GetCurrentThreadId());
+                (unsigned)GetCurrentThreadId());
 #   endif
     return ret;
-}
+  }
 
-DWORD WINAPI GC_win32_start(LPVOID arg)
-{
+  STATIC DWORD WINAPI GC_win32_start(LPVOID arg)
+  {
     return (DWORD)(word)GC_call_with_stack_base(GC_win32_start_inner, arg);
-}
+  }
 
-GC_API HANDLE WINAPI GC_CreateThread(
-    LPSECURITY_ATTRIBUTES lpThreadAttributes, 
-    DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, 
-    LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId )
-{
+  GC_API HANDLE WINAPI GC_CreateThread(
+                        LPSECURITY_ATTRIBUTES lpThreadAttributes,
+                        DWORD dwStackSize,
+                        LPTHREAD_START_ROUTINE lpStartAddress,
+                        LPVOID lpParameter, DWORD dwCreationFlags,
+                        LPDWORD lpThreadId)
+  {
     HANDLE thread_h;
-
     thread_args *args;
 
     if (!parallel_initialized) GC_init_parallel();
-               /* make sure GC is initialized (i.e. main thread is attached,
-                  tls initialized) */
+                /* make sure GC is initialized (i.e. main thread is     */
+                /* attached, tls initialized).                          */
 
 #   if DEBUG_WIN32_THREADS
       GC_printf("About to create a thread from 0x%x\n",
-               (unsigned)GetCurrentThreadId());
+                (unsigned)GetCurrentThreadId());
 #   endif
     if (GC_win32_dll_threads) {
       return CreateThread(lpThreadAttributes, dwStackSize, lpStartAddress,
-                        lpParameter, dwCreationFlags, lpThreadId);
+                          lpParameter, dwCreationFlags, lpThreadId);
     } else {
-      args = GC_malloc_uncollectable(sizeof(thread_args)); 
-       /* Handed off to and deallocated by child thread.       */
+      args = GC_malloc_uncollectable(sizeof(thread_args));
+                /* Handed off to and deallocated by child thread.       */
       if (0 == args) {
-       SetLastError(ERROR_NOT_ENOUGH_MEMORY);
+        SetLastError(ERROR_NOT_ENOUGH_MEMORY);
         return NULL;
       }
 
       /* set up thread arguments */
-       args -> start = lpStartAddress;
-       args -> param = lpParameter;
+      args -> start = lpStartAddress;
+      args -> param = lpParameter;
 
       GC_need_to_lock = TRUE;
-      thread_h = CreateThread(lpThreadAttributes,
-                             dwStackSize, GC_win32_start,
-                             args, dwCreationFlags,
-                             lpThreadId);
-      if( thread_h == 0 ) GC_free( args );
+      thread_h = CreateThread(lpThreadAttributes, dwStackSize, GC_win32_start,
+                              args, dwCreationFlags, lpThreadId);
+      if (thread_h == 0) GC_free(args);
       return thread_h;
     }
-}
+  }
 
-GC_API void WINAPI GC_ExitThread(DWORD dwExitCode)
-{
-  GC_unregister_my_thread();
-  ExitThread(dwExitCode);
-}
+  GC_API void WINAPI GC_ExitThread(DWORD dwExitCode)
+  {
+    GC_unregister_my_thread();
+    ExitThread(dwExitCode);
+  }
 
-#ifndef MSWINCE
+# ifndef MSWINCE
 
-GC_API GC_uintptr_t GC_CALL GC_beginthreadex(
-    void *security, unsigned stack_size,
-    unsigned ( __stdcall *start_address )( void * ),
-    void *arglist, unsigned initflag, unsigned *thrdaddr)
-{
-    GC_uintptr_t thread_h;
+    GC_API GC_uintptr_t GC_CALL GC_beginthreadex(
+                                  void *security, unsigned stack_size,
+                                  unsigned (__stdcall *start_address)(void *),
+                                  void *arglist, unsigned initflag,
+                                  unsigned *thrdaddr)
+    {
+      GC_uintptr_t thread_h;
+      thread_args *args;
+
+      if (!parallel_initialized) GC_init_parallel();
+                /* make sure GC is initialized (i.e. main thread is     */
+                /* attached, tls initialized).                          */
+#     if DEBUG_WIN32_THREADS
+        GC_printf("About to create a thread from 0x%x\n",
+                  (unsigned)GetCurrentThreadId());
+#     endif
 
-    thread_args *args;
+      if (GC_win32_dll_threads) {
+        return _beginthreadex(security, stack_size, start_address,
+                              arglist, initflag, thrdaddr);
+      } else {
+        args = GC_malloc_uncollectable(sizeof(thread_args));
+                /* Handed off to and deallocated by child thread.       */
+        if (0 == args) {
+          /* MSDN docs say _beginthreadex() returns 0 on error and sets */
+          /* errno to either EAGAIN (too many threads) or EINVAL (the   */
+          /* argument is invalid or the stack size is incorrect), so we */
+          /* set errno to EAGAIN on "not enough memory".                */
+          errno = EAGAIN;
+          return 0;
+        }
 
-    if (!parallel_initialized) GC_init_parallel();
-               /* make sure GC is initialized (i.e. main thread is attached,
-                  tls initialized) */
-#   if DEBUG_WIN32_THREADS
-      GC_printf("About to create a thread from 0x%x\n",
-               (unsigned)GetCurrentThreadId());
-#   endif
+        /* set up thread arguments */
+        args -> start = (LPTHREAD_START_ROUTINE)start_address;
+        args -> param = arglist;
 
-    if (GC_win32_dll_threads) {
-      return _beginthreadex(security, stack_size, start_address,
-                            arglist, initflag, thrdaddr);
-    } else {
-      args = GC_malloc_uncollectable(sizeof(thread_args)); 
-       /* Handed off to and deallocated by child thread.       */
-      if (0 == args) {
-       SetLastError(ERROR_NOT_ENOUGH_MEMORY);
-        return (GC_uintptr_t)(-1L);
+        GC_need_to_lock = TRUE;
+        thread_h = _beginthreadex(security, stack_size,
+                        (unsigned (__stdcall *)(void *))GC_win32_start,
+                        args, initflag, thrdaddr);
+        if (thread_h == 0) GC_free(args);
+        return thread_h;
       }
-
-      /* set up thread arguments */
-       args -> start = (LPTHREAD_START_ROUTINE)start_address;
-       args -> param = arglist;
-
-      GC_need_to_lock = TRUE;
-      thread_h = _beginthreadex(security, stack_size,
-                (unsigned (__stdcall *) (void *))GC_win32_start,
-                                args, initflag, thrdaddr);
-      if( thread_h == 0 ) GC_free( args );
-      return thread_h;
     }
-}
 
-GC_API void GC_CALL GC_endthreadex(unsigned retval)
-{
-  GC_unregister_my_thread();
-  _endthreadex(retval);
-}
+    GC_API void GC_CALL GC_endthreadex(unsigned retval)
+    {
+      GC_unregister_my_thread();
+      _endthreadex(retval);
+    }
 
-#endif /* !MSWINCE */
+# endif /* !MSWINCE */
 
 #endif /* !GC_PTHREADS */
 
-#ifdef MSWINCE
+#ifdef GC_WINMAIN_REDIRECT
+  /* This might be useful on WinCE.  Shouldn't be used with GC_DLL.     */
+
+# if defined(MSWINCE) && defined(UNDER_CE)
+#   define WINMAIN_LPTSTR LPWSTR
+# else
+#   define WINMAIN_LPTSTR LPSTR
+# endif
 
-typedef struct {
+  /* This is defined in gc.h.   */
+# undef WinMain
+
+  /* Defined outside GC by an application.      */
+  int WINAPI GC_WinMain(HINSTANCE, HINSTANCE, WINMAIN_LPTSTR, int);
+
+  typedef struct {
     HINSTANCE hInstance;
     HINSTANCE hPrevInstance;
-    LPWSTR lpCmdLine;
+    WINMAIN_LPTSTR lpCmdLine;
     int nShowCmd;
-} main_thread_args;
+  } main_thread_args;
 
-DWORD WINAPI main_thread_start(LPVOID arg);
+  static DWORD WINAPI main_thread_start(LPVOID arg)
+  {
+    main_thread_args * args = (main_thread_args *) arg;
+    return (DWORD)GC_WinMain(args->hInstance, args->hPrevInstance,
+                             args->lpCmdLine, args->nShowCmd);
+  }
 
-int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
-                  LPWSTR lpCmdLine, int nShowCmd)
-{
+  STATIC void * GC_waitForSingleObjectInfinite(void * handle)
+  {
+    return (void *)(word)WaitForSingleObject((HANDLE)handle, INFINITE);
+  }
+
+# ifndef WINMAIN_THREAD_STACK_SIZE
+#   define WINMAIN_THREAD_STACK_SIZE 0  /* default value */
+# endif
+
+  int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
+                     WINMAIN_LPTSTR lpCmdLine, int nShowCmd)
+  {
     DWORD exit_code = 1;
 
     main_thread_args args = {
-       hInstance, hPrevInstance, lpCmdLine, nShowCmd
+                hInstance, hPrevInstance, lpCmdLine, nShowCmd
     };
     HANDLE thread_h;
     DWORD thread_id;
 
     /* initialize everything */
-    GC_init();
+    GC_INIT();
 
     /* start the main thread */
-    thread_h = GC_CreateThread(
-       NULL, 0, main_thread_start, &args, 0, &thread_id);
-
-    if (thread_h != NULL)
-    {
-       WaitForSingleObject (thread_h, INFINITE);
-       GetExitCodeThread (thread_h, &exit_code);
-       CloseHandle (thread_h);
+    thread_h = GC_CreateThread(NULL /* lpsa */,
+                        WINMAIN_THREAD_STACK_SIZE /* ignored on WinCE */,
+                        main_thread_start, &args, 0 /* fdwCreate */,
+                        &thread_id);
+
+    if (thread_h != NULL) {
+      if ((DWORD)(word)GC_do_blocking(GC_waitForSingleObjectInfinite,
+                                      (void *)thread_h) == WAIT_FAILED)
+        ABORT("WaitForSingleObject(main_thread) failed");
+      GetExitCodeThread (thread_h, &exit_code);
+      CloseHandle (thread_h);
+    } else {
+      ABORT("GC_CreateThread(main_thread) failed");
     }
 
-    GC_deinit();
-    DeleteCriticalSection(&GC_allocate_ml);
-
+#   ifdef MSWINCE
+      GC_deinit();
+      DeleteCriticalSection(&GC_allocate_ml);
+#   endif
     return (int) exit_code;
-}
+  }
 
-DWORD WINAPI main_thread_start(LPVOID arg)
-{
-    main_thread_args * args = (main_thread_args *) arg;
+#endif /* GC_WINMAIN_REDIRECT */
 
-    return (DWORD) GC_WinMain (args->hInstance, args->hPrevInstance,
-                              args->lpCmdLine, args->nShowCmd);
-}
-
-# else /* !MSWINCE */
+/* Called by GC_init() - we hold the allocation lock.   */
+GC_INNER void GC_thr_init(void)
+{
+  struct GC_stack_base sb;
+# ifdef GC_ASSERTIONS
+    int sb_result;
+# endif
 
-/* Called by GC_init() - we hold the allocation lock.  */
-void GC_thr_init(void) {
-    struct GC_stack_base sb;
-#   ifdef GC_ASSERTIONS
-      int sb_result;
-#   endif
+  GC_ASSERT(I_HOLD_LOCK());
+  if (GC_thr_initialized) return;
+  GC_main_thread = GetCurrentThreadId();
+  GC_thr_initialized = TRUE;
 
-    GC_ASSERT(I_HOLD_LOCK());
-    if (GC_thr_initialized) return;
-    GC_main_thread = GetCurrentThreadId();
-    GC_thr_initialized = TRUE;
+  /* Add the initial thread, so we can stop it. */
+# ifdef GC_ASSERTIONS
+    sb_result =
+# endif
+        GC_get_stack_base(&sb);
+  GC_ASSERT(sb_result == GC_SUCCESS);
 
-    /* Add the initial thread, so we can stop it.      */
-#   ifdef GC_ASSERTIONS
-      sb_result =
-#   endif
-       GC_get_stack_base(&sb);
-    GC_ASSERT(sb_result == GC_SUCCESS);
-    
-#   ifdef PARALLEL_MARK
-      /* Set GC_markers. */
-      {
-       char * markers_string = GETENV("GC_MARKERS");
-       if (markers_string != NULL) {
-         GC_markers = atoi(markers_string);
-         if (GC_markers > MAX_MARKERS) {
-           WARN("Limiting number of mark threads\n", 0);
-           GC_markers = MAX_MARKERS;
-         }
-       } else {
-#        ifdef _WIN64
-           DWORD_PTR procMask = 0;
-           DWORD_PTR sysMask;
-#        else
-           DWORD procMask = 0;
-           DWORD sysMask;
-#        endif
-         int ncpu = 0;
-         if (GetProcessAffinityMask(GetCurrentProcess(),
-                               (void *)&procMask, (void *)&sysMask)
-             && procMask) {
-           do {
-             ncpu++;
-           } while ((procMask &= procMask - 1) != 0);
-         }
-         GC_markers = ncpu;
-         if (GC_markers >= MAX_MARKERS)
-           GC_markers = MAX_MARKERS; /* silently limit GC_markers value */
-       }
-      }        
-      
-      /* Set GC_parallel. */
-      {
-#      ifndef GC_PTHREADS
-         HMODULE hK32;
-         /* SignalObjectAndWait() API call works only under NT.        */
-#      endif
-       if (GC_markers <= 1 || GC_win32_dll_threads
-#          ifndef GC_PTHREADS
-             || GC_wnt == FALSE
-             || (hK32 = GetModuleHandleA("kernel32.dll")) == (HMODULE)0
-             || (signalObjectAndWait_func = (SignalObjectAndWait_type)
-                       GetProcAddress(hK32, "SignalObjectAndWait")) == 0
-#          endif
-          ) {
-         /* Disable parallel marking. */
-         GC_parallel = FALSE;
-         GC_markers = 1;
-       } else {
-#        ifndef GC_PTHREADS
-           /* Initialize Win32 event objects for parallel marking.     */
-           mark_mutex_event = CreateEventA(NULL /* attrs */,
-                               FALSE /* isManualReset */,
-                               FALSE /* initialState */, NULL /* name */);
-           builder_cv = CreateEventA(NULL /* attrs */,
-                               TRUE /* isManualReset */,
-                               FALSE /* initialState */, NULL /* name */);
-           mark_cv = CreateEventA(NULL /* attrs */, TRUE /* isManualReset */,
-                               FALSE /* initialState */, NULL /* name */);
-           if (mark_mutex_event == (HANDLE)0 || builder_cv == (HANDLE)0
-               || mark_cv == (HANDLE)0)
-             ABORT("CreateEvent() failed");
-#        endif
-         GC_parallel = TRUE;
-         /* Disable true incremental collection, but generational is OK. */
-         GC_time_limit = GC_TIME_UNLIMITED;
-       }
+# if defined(PARALLEL_MARK)
+    /* Set GC_markers. */
+    {
+      char * markers_string = GETENV("GC_MARKERS");
+      if (markers_string != NULL) {
+        GC_markers = atoi(markers_string);
+        if (GC_markers > MAX_MARKERS) {
+          WARN("Limiting number of mark threads\n", 0);
+          GC_markers = MAX_MARKERS;
+        }
+      } else {
+#       ifdef MSWINCE
+          /* There is no GetProcessAffinityMask() in WinCE.     */
+          /* GC_sysinfo is already initialized.                 */
+          GC_markers = GC_sysinfo.dwNumberOfProcessors;
+#       else
+#         ifdef _WIN64
+            DWORD_PTR procMask = 0;
+            DWORD_PTR sysMask;
+#         else
+            DWORD procMask = 0;
+            DWORD sysMask;
+#         endif
+          int ncpu = 0;
+          if (GetProcessAffinityMask(GetCurrentProcess(),
+                                     (void *)&procMask, (void *)&sysMask)
+              && procMask) {
+            do {
+              ncpu++;
+            } while ((procMask &= procMask - 1) != 0);
+          }
+          GC_markers = ncpu;
+#       endif
+#       ifdef GC_MIN_MARKERS
+          /* This is primarily for testing on systems without getenv(). */
+          if (GC_markers < GC_MIN_MARKERS)
+            GC_markers = GC_MIN_MARKERS;
+#       endif
+        if (GC_markers >= MAX_MARKERS)
+          GC_markers = MAX_MARKERS; /* silently limit GC_markers value  */
       }
-      
-      if (GC_print_stats) {
-       GC_log_printf("Number of marker threads = %ld\n", GC_markers);
+    }
+
+    /* Set GC_parallel. */
+    {
+#     if !defined(GC_PTHREADS_PARAMARK) && !defined(MSWINCE) \
+                && !defined(DONT_USE_SIGNALANDWAIT)
+        HMODULE hK32;
+        /* SignalObjectAndWait() API call works only under NT.          */
+#     endif
+      if (GC_markers <= 1 || GC_win32_dll_threads
+#         if !defined(GC_PTHREADS_PARAMARK) && !defined(MSWINCE) \
+                && !defined(DONT_USE_SIGNALANDWAIT)
+            || GC_wnt == FALSE
+            || (hK32 = GetModuleHandle(TEXT("kernel32.dll"))) == (HMODULE)0
+            || (signalObjectAndWait_func = (SignalObjectAndWait_type)
+                        GetProcAddress(hK32, "SignalObjectAndWait")) == 0
+#         endif
+         ) {
+        /* Disable parallel marking. */
+        GC_parallel = FALSE;
+        GC_markers = 1;
+      } else {
+#       ifndef GC_PTHREADS_PARAMARK
+          /* Initialize Win32 event objects for parallel marking.       */
+          mark_mutex_event = CreateEvent(NULL /* attrs */,
+                                FALSE /* isManualReset */,
+                                FALSE /* initialState */, NULL /* name */);
+          builder_cv = CreateEvent(NULL /* attrs */,
+                                TRUE /* isManualReset */,
+                                FALSE /* initialState */, NULL /* name */);
+          mark_cv = CreateEvent(NULL /* attrs */, TRUE /* isManualReset */,
+                                FALSE /* initialState */, NULL /* name */);
+          if (mark_mutex_event == (HANDLE)0 || builder_cv == (HANDLE)0
+              || mark_cv == (HANDLE)0)
+            ABORT("CreateEvent() failed");
+#       endif
+        GC_parallel = TRUE;
+        /* Disable true incremental collection, but generational is OK. */
+        GC_time_limit = GC_TIME_UNLIMITED;
       }
-#   endif /* PARALLEL_MARK */
-    
-    GC_ASSERT(0 == GC_lookup_thread_inner(GC_main_thread));
-    GC_register_my_thread_inner(&sb, GC_main_thread);
+    }
+# endif /* PARALLEL_MARK */
 
-#   ifdef PARALLEL_MARK
-      /* If we are using a parallel marker, actually start helper threads.  */
-      if (GC_parallel) start_mark_threads();
-#   endif
+  GC_ASSERT(0 == GC_lookup_thread_inner(GC_main_thread));
+  GC_register_my_thread_inner(&sb, GC_main_thread);
+
+# ifdef PARALLEL_MARK
+    /* If we are using a parallel marker, actually start helper threads. */
+    if (GC_parallel) start_mark_threads();
+    if (GC_print_stats) {
+      GC_log_printf("Started %ld mark helper threads\n", GC_markers - 1);
+    }
+# endif
 }
 
 #ifdef GC_PTHREADS
 
-struct start_info {
+  struct start_info {
     void *(*start_routine)(void *);
     void *arg;
     GC_bool detached;
-};
+  };
 
-int GC_pthread_join(pthread_t pthread_id, void **retval) {
+  GC_API int GC_pthread_join(pthread_t pthread_id, void **retval)
+  {
     int result;
     GC_thread joinee;
 
 #   if DEBUG_CYGWIN_THREADS
       GC_printf("thread 0x%x(0x%x) is joining thread 0x%x.\n",
-               (int)pthread_self(), (int)GetCurrentThreadId(),
-               (int)pthread_id);
+                (int)pthread_self(), (int)GetCurrentThreadId(),
+                (int)pthread_id);
 #   endif
 #   if DEBUG_WIN32_PTHREADS
       GC_printf("thread 0x%x(0x%x) is joining thread 0x%x.\n",
-               (int)(pthread_self()).p, (int)GetCurrentThreadId(),
-               pthread_id.p);
+                (int)(pthread_self()).p, (int)GetCurrentThreadId(),
+                pthread_id.p);
 #   endif
 
     if (!parallel_initialized) GC_init_parallel();
-    /* Thread being joined might not have registered itself yet. */
-    /* After the join,thread id may have been recycled.                 */
-    /* FIXME: It would be better if this worked more like       */
-    /* pthread_support.c.                                       */
 
+    /* Thread being joined might not have registered itself yet. */
+    /* After the join,thread id may have been recycled.          */
+    /* FIXME: It would be better if this worked more like        */
+    /* pthread_support.c.                                        */
 #   ifndef GC_WIN32_PTHREADS
       while ((joinee = GC_lookup_pthread(pthread_id)) == 0) Sleep(10);
 #   endif
@@ -1906,73 +2340,69 @@ int GC_pthread_join(pthread_t pthread_id, void **retval) {
       LOCK();
       GC_delete_gc_thread(joinee);
       UNLOCK();
-    } /* otherwise dllmain handles it. */
+    } /* otherwise dllmain handles it.  */
 
 #   if DEBUG_CYGWIN_THREADS
       GC_printf("thread 0x%x(0x%x) completed join with thread 0x%x.\n",
-               (int)pthread_self(), (int)GetCurrentThreadId(),
-               (int)pthread_id);
+                (int)pthread_self(), (int)GetCurrentThreadId(),
+                (int)pthread_id);
 #   endif
 #   if DEBUG_WIN32_PTHREADS
       GC_printf("thread 0x%x(0x%x) completed join with thread 0x%x.\n",
-               (int)(pthread_self()).p, (int)GetCurrentThreadId(),
-               pthread_id.p);
+                (int)(pthread_self()).p, (int)GetCurrentThreadId(),
+                pthread_id.p);
 #   endif
-
     return result;
-}
+  }
 
-/* Cygwin-pthreads calls CreateThread internally, but it's not
- * easily interceptible by us..
- *   so intercept pthread_create instead
- */
-int
-GC_pthread_create(pthread_t *new_thread,
-                 const pthread_attr_t *attr,
-                  void *(*start_routine)(void *), void *arg) {
+  /* Cygwin-pthreads calls CreateThread internally, but it's not easily */
+  /* interceptible by us..., so intercept pthread_create instead.       */
+  GC_API int GC_pthread_create(pthread_t *new_thread,
+                               const pthread_attr_t *attr,
+                               void *(*start_routine)(void *), void *arg)
+  {
     int result;
     struct start_info * si;
 
     if (!parallel_initialized) GC_init_parallel();
-               /* make sure GC is initialized (i.e. main thread is attached) */
+             /* make sure GC is initialized (i.e. main thread is attached) */
     if (GC_win32_dll_threads) {
       return pthread_create(new_thread, attr, start_routine, arg);
     }
-    
+
     /* This is otherwise saved only in an area mmapped by the thread */
-    /* library, which isn't visible to the collector.           */
-    si = GC_malloc_uncollectable(sizeof(struct start_info)); 
+    /* library, which isn't visible to the collector.            */
+    si = GC_malloc_uncollectable(sizeof(struct start_info));
     if (0 == si) return(EAGAIN);
 
     si -> start_routine = start_routine;
     si -> arg = arg;
     if (attr != 0 &&
         pthread_attr_getdetachstate(attr, &si->detached)
-       == PTHREAD_CREATE_DETACHED) {
+        == PTHREAD_CREATE_DETACHED) {
       si->detached = TRUE;
     }
 
 #   if DEBUG_CYGWIN_THREADS
       GC_printf("About to create a thread from 0x%x(0x%x)\n",
-               (int)pthread_self(), (int)GetCurrentThreadId);
+                (int)pthread_self(), (int)GetCurrentThreadId);
 #   endif
 #   if DEBUG_WIN32_PTHREADS
       GC_printf("About to create a thread from 0x%x(0x%x)\n",
-               (int)(pthread_self()).p, (int)GetCurrentThreadId());
+                (int)(pthread_self()).p, (int)GetCurrentThreadId());
 #   endif
     GC_need_to_lock = TRUE;
-    result = pthread_create(new_thread, attr, GC_pthread_start, si); 
+    result = pthread_create(new_thread, attr, GC_pthread_start, si);
 
     if (result) { /* failure */
-       GC_free(si);
-    } 
-
+        GC_free(si);
+    }
     return(result);
-}
+  }
 
-STATIC void * GC_CALLBACK GC_pthread_start_inner(struct GC_stack_base *sb,
-                                               void * arg)
-{
+  STATIC void * GC_CALLBACK GC_pthread_start_inner(struct GC_stack_base *sb,
+                                                   void * arg)
+  {
     struct start_info * si = arg;
     void * result;
     void *(*start)(void *);
@@ -1983,20 +2413,20 @@ STATIC void * GC_CALLBACK GC_pthread_start_inner(struct GC_stack_base *sb,
 
 #   if DEBUG_CYGWIN_THREADS
       GC_printf("thread 0x%x(0x%x) starting...\n",(int)pthread_id,
-                                                 (int)thread_id);
+                                                  (int)thread_id);
 #   endif
 #   if DEBUG_WIN32_PTHREADS
       GC_printf("thread 0x%x(0x%x) starting...\n",(int) pthread_id.p,
-                                                 (int)thread_id);
+                                                  (int)thread_id);
 #   endif
 
     GC_ASSERT(!GC_win32_dll_threads);
-    /* If a GC occurs before the thread is registered, that GC will    */
+    /* If a GC occurs before the thread is registered, that GC will     */
     /* ignore this thread.  That's fine, since it will block trying to  */
-    /* acquire the allocation lock, and won't yet hold interesting     */
-    /* pointers.                                                       */
+    /* acquire the allocation lock, and won't yet hold interesting      */
+    /* pointers.                                                        */
     LOCK();
-    /* We register the thread here instead of in the parent, so that   */
+    /* We register the thread here instead of in the parent, so that    */
     /* we don't need to hold the allocation lock during pthread_create. */
     me = GC_register_my_thread_inner(sb, thread_id);
     SET_PTHREAD_MAP_CACHE(pthread_id, thread_id);
@@ -2016,33 +2446,32 @@ STATIC void * GC_CALLBACK GC_pthread_start_inner(struct GC_stack_base *sb,
 
 #   if DEBUG_CYGWIN_THREADS
       GC_printf("thread 0x%x(0x%x) returned from start routine.\n",
-               (int)pthread_self(),(int)GetCurrentThreadId());
+                (int)pthread_self(),(int)GetCurrentThreadId());
 #   endif
 #   if DEBUG_WIN32_PTHREADS
       GC_printf("thread 0x%x(0x%x) returned from start routine.\n",
-               (int)(pthread_self()).p, (int)GetCurrentThreadId());
+                (int)(pthread_self()).p, (int)GetCurrentThreadId());
 #   endif
-
     return(result);
-}
+  }
 
-STATIC void * GC_pthread_start(void * arg)
-{
+  STATIC void * GC_pthread_start(void * arg)
+  {
     return GC_call_with_stack_base(GC_pthread_start_inner, arg);
-}
+  }
 
-STATIC void GC_thread_exit_proc(void *arg)
-{
+  STATIC void GC_thread_exit_proc(void *arg)
+  {
     GC_thread me = (GC_thread)arg;
 
     GC_ASSERT(!GC_win32_dll_threads);
 #   if DEBUG_CYGWIN_THREADS
       GC_printf("thread 0x%x(0x%x) called pthread_exit().\n",
-               (int)pthread_self(),(int)GetCurrentThreadId());
+                (int)pthread_self(),(int)GetCurrentThreadId());
 #   endif
 #   if DEBUG_WIN32_PTHREADS
       GC_printf("thread 0x%x(0x%x) called pthread_exit().\n",
-               (int)(pthread_self()).p,(int)GetCurrentThreadId());
+                (int)(pthread_self()).p,(int)GetCurrentThreadId());
 #   endif
 
     LOCK();
@@ -2056,22 +2485,24 @@ STATIC void GC_thread_exit_proc(void *arg)
       me -> flags |= FINISHED;
     }
     UNLOCK();
-}
+  }
 
-#ifndef GC_WIN32_PTHREADS
-/* win32 pthread does not support sigmask */
-/* nothing required here... */
-int GC_pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) {
-  if (!parallel_initialized) GC_init_parallel();
-  return pthread_sigmask(how, set, oset);
-}
-#endif
+# ifndef GC_WIN32_PTHREADS
+    /* win32 pthread does not support sigmask */
+    /* nothing required here... */
+    GC_API int GC_pthread_sigmask(int how, const sigset_t *set,
+                                  sigset_t *oset)
+    {
+      if (!parallel_initialized) GC_init_parallel();
+      return pthread_sigmask(how, set, oset);
+    }
+# endif
 
-int GC_pthread_detach(pthread_t thread)
-{
+  GC_API int GC_pthread_detach(pthread_t thread)
+  {
     int result;
     GC_thread thread_gc_id;
-    
+
     if (!parallel_initialized) GC_init_parallel();
     LOCK();
     thread_gc_id = GC_lookup_pthread(thread);
@@ -2087,179 +2518,178 @@ int GC_pthread_detach(pthread_t thread)
       UNLOCK();
     }
     return result;
-}
+  }
 
 #else /* !GC_PTHREADS */
 
-/*
- * We avoid acquiring locks here, since this doesn't seem to be preemptible.
- * This may run with an uninitialized collector, in which case we don't do much.
- * This implies that no threads other than the main one should be created
- * with an uninitialized collector.  (The alternative of initializing
- * the collector here seems dangerous, since DllMain is limited in what it
- * can do.)
- */
-#ifdef GC_DLL
-/*ARGSUSED*/
-BOOL WINAPI DllMain(HINSTANCE inst, ULONG reason, LPVOID reserved)
-{
-  struct GC_stack_base sb;
-  DWORD thread_id;
-# ifdef GC_ASSERTIONS
-    int sb_result;
-# endif
-  static int entry_count = 0;
+# ifndef GC_NO_DLLMAIN
+    /* We avoid acquiring locks here, since this doesn't seem to be     */
+    /* preemptible.  This may run with an uninitialized collector, in   */
+    /* which case we don't do much.  This implies that no threads other */
+    /* than the main one should be created with an uninitialized        */
+    /* collector.  (The alternative of initializing the collector here  */
+    /* seems dangerous, since DllMain is limited in what it can do.)    */
+
+    /*ARGSUSED*/
+    BOOL WINAPI DllMain(HINSTANCE inst, ULONG reason, LPVOID reserved)
+    {
+      struct GC_stack_base sb;
+      DWORD thread_id;
+#     ifdef GC_ASSERTIONS
+        int sb_result;
+#     endif
+      static int entry_count = 0;
 
-  if (parallel_initialized && !GC_win32_dll_threads) return TRUE;
+      if (parallel_initialized && !GC_win32_dll_threads) return TRUE;
 
-  switch (reason) {
-   case DLL_THREAD_ATTACH:
-#   ifdef PARALLEL_MARK
-      /* Don't register marker threads. */
-      if (GC_parallel) {
-         /* We could reach here only if parallel_initialized == FALSE. */
-         break;
-      }
-#   endif
-    GC_ASSERT(entry_count == 0 || parallel_initialized);
-    ++entry_count; /* and fall through: */
-   case DLL_PROCESS_ATTACH:
-    /* This may run with the collector uninitialized. */
-    thread_id = GetCurrentThreadId();
-    if (parallel_initialized && GC_main_thread != thread_id) {
-       /* Don't lock here.     */
-#      ifdef GC_ASSERTIONS
-          sb_result =
-#       endif
-           GC_get_stack_base(&sb);
-        GC_ASSERT(sb_result == GC_SUCCESS);
-#       if defined(THREAD_LOCAL_ALLOC) || defined(PARALLEL_MARK)
-         ABORT("Cannot initialize thread local cache from DllMain");
+      switch (reason) {
+       case DLL_THREAD_ATTACH:
+#       ifdef PARALLEL_MARK
+          /* Don't register marker threads. */
+          if (GC_parallel) {
+            /* We could reach here only if parallel_initialized == FALSE. */
+            break;
+          }
 #       endif
-       GC_register_my_thread_inner(&sb, thread_id);
-    } /* o.w. we already did it during GC_thr_init(), called by GC_init() */
-    break;
-
-   case DLL_THREAD_DETACH:
-    /* We are hopefully running in the context of the exiting thread.  */
-    GC_ASSERT(parallel_initialized);
-    if (!GC_win32_dll_threads) return TRUE;
-    GC_delete_thread(GetCurrentThreadId());
-    break;
-
-   case DLL_PROCESS_DETACH:
-    {
-      int i;
-      int my_max;
+        GC_ASSERT(entry_count == 0 || parallel_initialized);
+        ++entry_count; /* and fall through: */
+       case DLL_PROCESS_ATTACH:
+        /* This may run with the collector uninitialized. */
+        thread_id = GetCurrentThreadId();
+        if (parallel_initialized && GC_main_thread != thread_id) {
+          /* Don't lock here.   */
+#         ifdef GC_ASSERTIONS
+            sb_result =
+#         endif
+              GC_get_stack_base(&sb);
+          GC_ASSERT(sb_result == GC_SUCCESS);
+#         if defined(THREAD_LOCAL_ALLOC) || defined(PARALLEL_MARK)
+            ABORT("Cannot initialize thread local cache from DllMain");
+#         endif
+          GC_register_my_thread_inner(&sb, thread_id);
+        } /* o.w. we already did it during GC_thr_init, called by GC_init */
+        break;
+
+       case DLL_THREAD_DETACH:
+        /* We are hopefully running in the context of the exiting thread. */
+        GC_ASSERT(parallel_initialized);
+        if (!GC_win32_dll_threads) return TRUE;
+        GC_delete_thread(GetCurrentThreadId());
+        break;
+
+       case DLL_PROCESS_DETACH:
+        {
+          int i;
+          int my_max;
+
+          if (!GC_win32_dll_threads) return TRUE;
+          my_max = (int)GC_get_max_thread_index();
+          for (i = 0; i <= my_max; ++i) {
+           if (AO_load(&(dll_thread_table[i].tm.in_use)))
+             GC_delete_gc_thread(dll_thread_table + i);
+          }
 
-      if (!GC_win32_dll_threads) return TRUE;
-      my_max = (int)GC_get_max_thread_index();
-      for (i = 0; i <= my_max; ++i)
-      {
-          if (AO_load(&(dll_thread_table[i].in_use)))
-           GC_delete_gc_thread(dll_thread_table + i);
-      }
+          GC_deinit();
+          DeleteCriticalSection(&GC_allocate_ml);
+        }
+        break;
 
-      GC_deinit();
-      DeleteCriticalSection(&GC_allocate_ml);
+      }
+      return TRUE;
     }
-    break;
+# endif /* !GC_NO_DLLMAIN */
 
-  }
-  return TRUE;
-}
-#endif /* GC_DLL */
 #endif /* !GC_PTHREADS */
 
-# endif /* !MSWINCE */
-
-/* Perform all initializations, including those that   */
-/* may require allocation.                             */
-/* Called without allocation lock.                     */
-/* Must be called before a second thread is created.   */
-void GC_init_parallel(void)
+/* Perform all initializations, including those that    */
+/* may require allocation.                              */
+/* Called without allocation lock.                      */
+/* Must be called before a second thread is created.    */
+GC_INNER void GC_init_parallel(void)
 {
-    if (parallel_initialized) return;
-    parallel_initialized = TRUE;
-    /* GC_init() calls us back, so set flag first.     */
-    
-    if (!GC_is_initialized) GC_init();
-    if (GC_win32_dll_threads) {
-      GC_need_to_lock = TRUE;
-       /* Cannot intercept thread creation.  Hence we don't know if    */
-       /* other threads exist.  However, client is not allowed to      */
-       /* create other threads before collector initialization.        */
-       /* Thus it's OK not to lock before this.                        */
-    }
-    /* Initialize thread local free lists if used.     */
-#   if defined(THREAD_LOCAL_ALLOC)
-      LOCK();
-      GC_init_thread_local(&GC_lookup_thread_inner(GetCurrentThreadId())->tlfs);
-      UNLOCK();
-#   endif
+  if (parallel_initialized) return;
+  parallel_initialized = TRUE;
+  /* GC_init() calls us back, so set flag first.      */
+
+  if (!GC_is_initialized) GC_init();
+  if (GC_win32_dll_threads) {
+    GC_need_to_lock = TRUE;
+        /* Cannot intercept thread creation.  Hence we don't know if    */
+        /* other threads exist.  However, client is not allowed to      */
+        /* create other threads before collector initialization.        */
+        /* Thus it's OK not to lock before this.                        */
+  }
+  /* Initialize thread local free lists if used.        */
+# if defined(THREAD_LOCAL_ALLOC)
+    LOCK();
+    GC_init_thread_local(
+                &GC_lookup_thread_inner(GetCurrentThreadId())->tlfs);
+    UNLOCK();
+# endif
 }
 
 #if defined(USE_PTHREAD_LOCKS)
-  /* Support for pthread locking code.         */
-  /* Pthread_mutex_try_lock may not win here,  */
-  /* due to builtin support for spinning first?        */
+  /* Support for pthread locking code.          */
+  /* Pthread_mutex_try_lock may not win here,   */
+  /* due to builtin support for spinning first? */
 
-volatile GC_bool GC_collecting = 0;
-                       /* A hint that we're in the collector and       */
+  GC_INNER volatile GC_bool GC_collecting = 0;
+                        /* A hint that we're in the collector and       */
                         /* holding the allocation lock for an           */
                         /* extended period.                             */
 
-void GC_lock(void)
-{
+  GC_INNER void GC_lock(void)
+  {
     pthread_mutex_lock(&GC_allocate_ml);
-}
-#endif /* USE_PTHREAD ... */
+  }
+#endif /* USE_PTHREAD_LOCKS */
 
-# if defined(THREAD_LOCAL_ALLOC)
+#if defined(THREAD_LOCAL_ALLOC)
 
-/* Add thread-local allocation support.  Microsoft uses __declspec(thread) */
+  /* Add thread-local allocation support.  VC++ uses __declspec(thread).  */
 
-/* We must explicitly mark ptrfree and gcj free lists, since the free  */
-/* list links wouldn't otherwise be found.  We also set them in the    */
-/* normal free lists, since that involves touching less memory than if */
-/* we scanned them normally.                                           */
-void GC_mark_thread_local_free_lists(void)
-{
+  /* We must explicitly mark ptrfree and gcj free lists, since the free   */
+  /* list links wouldn't otherwise be found.  We also set them in the     */
+  /* normal free lists, since that involves touching less memory than if  */
+  /* we scanned them normally.                                            */
+  GC_INNER void GC_mark_thread_local_free_lists(void)
+  {
     int i;
     GC_thread p;
-    
+
     for (i = 0; i < THREAD_TABLE_SZ; ++i) {
-      for (p = GC_threads[i]; 0 != p; p = p -> next) {
+      for (p = GC_threads[i]; 0 != p; p = p -> tm.next) {
 #       ifdef DEBUG_THREADS
-         GC_printf("Marking thread locals for 0x%x\n", p -> id);
-#      endif
-       GC_mark_thread_local_fls_for(&(p->tlfs));
+          GC_printf("Marking thread locals for 0x%x\n", (int)p -> id);
+#       endif
+        GC_mark_thread_local_fls_for(&(p->tlfs));
       }
     }
-}
+  }
 
-#if defined(GC_ASSERTIONS)
+# if defined(GC_ASSERTIONS)
     void GC_check_tls_for(GC_tlfs p);
 #   if defined(USE_CUSTOM_SPECIFIC)
       void GC_check_tsd_marks(tsd *key);
-#   endif 
-    /* Check that all thread-local free-lists are completely marked.   */
-    /* also check that thread-specific-data structures are marked.     */
-    void GC_check_tls(void) {
-       int i;
-       GC_thread p;
-       
-       for (i = 0; i < THREAD_TABLE_SZ; ++i) {
-         for (p = GC_threads[i]; 0 != p; p = p -> next) {
-           GC_check_tls_for(&(p->tlfs));
-         }
-       }
+#   endif
+    /* Check that all thread-local free-lists are completely marked.    */
+    /* also check that thread-specific-data structures are marked.      */
+    void GC_check_tls(void)
+    {
+        int i;
+        GC_thread p;
+
+        for (i = 0; i < THREAD_TABLE_SZ; ++i) {
+          for (p = GC_threads[i]; 0 != p; p = p -> tm.next) {
+            GC_check_tls_for(&(p->tlfs));
+          }
+        }
 #       if defined(USE_CUSTOM_SPECIFIC)
-         if (GC_thread_key != 0)
-           GC_check_tsd_marks(GC_thread_key);
-#      endif 
+          if (GC_thread_key != 0)
+            GC_check_tsd_marks(GC_thread_key);
+#       endif
     }
-#endif /* GC_ASSERTIONS */
+# endif /* GC_ASSERTIONS */
 
 #endif /* THREAD_LOCAL_ALLOC ... */